History log of /libevent-2.1.12/include/event2/util.h (Results 1 – 25 of 76)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: release-2.2.1-alpha, release-2.1.12-stable
# f602211f 29-Oct-2019 Philip Homburg <[email protected]>

Parse IPv6 scope IDs.

(cherry picked from commit 9fecb59a94ef246088d7f3e0365c2fe80d0df2f4)


Revision tags: release-2.1.11-stable, release-2.1.10-stable
# 00ba9fa2 25-Feb-2019 Enji Cooper <[email protected]>

Define `_GNU_SOURCE` properly/consistently per autoconf

Although `_GNU_SOURCE` can be defined as an arbitrary #define per the
glibc docs [1], it's best to define it in a manner consistent with the w

Define `_GNU_SOURCE` properly/consistently per autoconf

Although `_GNU_SOURCE` can be defined as an arbitrary #define per the
glibc docs [1], it's best to define it in a manner consistent with the way
that autoconf defines it, i.e., `1`.

While this shouldn't matter in most cases, it does when the headers from
other projects follow the poorly defined GNU convention implemented by
autoconf and are included after the libevent's util.h header. An example
failure with clang, similar to the failure I encountered, is as follows:
```
$ printf "#define _GNU_SOURCE\n#define _GNU_SOURCE 1" | clang -c -x c -
<stdin>:2:9: warning: '_GNU_SOURCE' macro redefined [-Wmacro-redefined]
^
<stdin>:1:9: note: previous definition is here
^
1 warning generated.
```

This happened when compiling python [2] with a stale homebrew util.h file from
libevent (which admittedly would not happen in a correct libevent install, as the
header should be installed under /usr/local/include/event2/util.h). However, if
both headers had been combined (which is more likely), it would have failed as
shown above.

Removing the ad hoc definition unbreaks compiling python's pyconfig.h.in header
when included after util.h from libevent.

1. http://www.gnu.org/software/libc/manual/html_node/Feature-Test-Macros.html
2. https://github.com/python/cpython/blob/master/configure.ac#L126

Closes: #773 (cherry-picked)

Signed-off-by: Enji Cooper <[email protected]>
(cherry picked from commit 5f87be42f0ae0126938624a1419a572607078217)

show more ...


Revision tags: release-2.1.9-beta
# e66078a0 29-Jan-2019 Azat Khuzhin <[email protected]>

Eliminate fd conversion warnings and introduce EVUTIL_INVALID_SOCKET (windows)

windows has intptr_t instead of regular int.

Also tt_fd_op() had been introduced, since we cannot use tt_int_op() for

Eliminate fd conversion warnings and introduce EVUTIL_INVALID_SOCKET (windows)

windows has intptr_t instead of regular int.

Also tt_fd_op() had been introduced, since we cannot use tt_int_op() for
comparing fd, since it is not always int.

(cherry picked from commit b29207dceee33832bb28ab103a833df6a2fd29d3)

show more ...


Revision tags: release-2.0.23-beta
# 1c865238 28-Oct-2018 Azat Khuzhin <[email protected]>

Check existence of IPV6_V6ONLY in evutil_make_listen_socket_ipv6only() (mingw32)

MinGW 32-bit 5.3.0 does not defines it and our appveyour [1] build
reports this instantly:
evutil.c: In function

Check existence of IPV6_V6ONLY in evutil_make_listen_socket_ipv6only() (mingw32)

MinGW 32-bit 5.3.0 does not defines it and our appveyour [1] build
reports this instantly:
evutil.c: In function 'evutil_make_listen_socket_ipv6only':
evutil.c:392:40: error: 'IPV6_V6ONLY' undeclared (first use in this function)
return setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY, (void*) &one,

[1]: https://www.appveyor.com/docs/windows-images-software/#mingw-msys-cygwin

Another solution will be to use mingw64 which has it, but I guess we do
want that #ifdef anyway.

(cherry picked from commit 23e79fd764b9f36f560d470f0fb60295dd942ac2)

show more ...


# ba148796 04-Jun-2018 Murat Demirten <[email protected]>

listener: ipv6only socket bind support

According to RFC3493 and most Linux distributions, default value is to
work in IPv4-mapped mode. If there is a requirement to bind same port
on same ip address

listener: ipv6only socket bind support

According to RFC3493 and most Linux distributions, default value is to
work in IPv4-mapped mode. If there is a requirement to bind same port
on same ip addresses but different handlers for both IPv4 and IPv6,
it is required to set IPV6_V6ONLY socket option to be sure that the
code works as expected without affected by bindv6only sysctl setting
in system.

See an example working with this patch:
https://gist.github.com/demirten/023008a63cd966e48b0ebcf9af7fc113

Closes: #640 (cherry-pick)
(cherry picked from commit 387d91f9ab95df8ac3d7bb58493310ad4a377dcf)

show more ...


# 25150a62 17-Aug-2017 Carlo Marcelo Arenas Belón <[email protected]>

always define EV_INT16_MIN

somehow missing from 043ae7481f4a73b0f48055a0260afa454f02d136

(cherry picked from commit 5698cff73dac815dab937fd0262dd1f910ad1c3c)


# 303d6d77 27-Mar-2017 Azat Khuzhin <[email protected]>

Fix arc4random_addrandom() detecting and fallback (regression)

But this is kind of hot-fix, we definitelly need more sane arc4random
compat layer.

Fixes: #488
Introduced-in: 6541168 ("Detect arch4r

Fix arc4random_addrandom() detecting and fallback (regression)

But this is kind of hot-fix, we definitelly need more sane arc4random
compat layer.

Fixes: #488
Introduced-in: 6541168 ("Detect arch4random_addrandom() existence")
(cherry picked from commit 266f43af7798befa3d27bfabaa9ae699259c3924)

show more ...


# a0bfe2c4 08-Mar-2017 Azat Khuzhin <[email protected]>

Merge branch 'cmake-configure-fixes-v2'

Fixes in cmake, to make it more like configure and support some
cross-compiling.

* cmake-configure-fixes-v2:
cmake: fix extracting of the version from git

Merge branch 'cmake-configure-fixes-v2'

Fixes in cmake, to make it more like configure and support some
cross-compiling.

* cmake-configure-fixes-v2:
cmake: fix extracting of the version from git (check for number of matches)
Detect arch4random_addrandom() existence
Use off_t instead of ev_off_t for sendfile() (fixes android build)
cmake: detect _GNU_SOURCE not by __GNU_LIBRARY__ only (fallback to _GNU_SOURCE)
Check for WNOWAIT in waitpid() in runtime (not in cmake/configure)
cmake: add <pthread.h> into CMAKE_REQUIRED_INCLUDES for sizeof(pthread_t)
cmake: fix values for #cmakedefine
cmake: drop duplicates from event-config template
cmake: add value for the #cmakedefine macros (like autoconf)
cmake: Fix checking of enum values from sysctl.h

(cherry picked from commit 5aade2d30b6c5eff226cbf7b63fda5a01987ba4f)

show more ...


Revision tags: release-2.1.8-stable
# 4545807d 19-Dec-2016 Azat Khuzhin <[email protected]>

Fix UB in evutil_date_rfc1123()

As pointed in https://github.com/libevent/libevent/pull/417#issuecomment-267860738
"code is unsafe because in evutil_date_rfc1123() the pointer to the
automatic v

Fix UB in evutil_date_rfc1123()

As pointed in https://github.com/libevent/libevent/pull/417#issuecomment-267860738
"code is unsafe because in evutil_date_rfc1123() the pointer to the
automatic variable struct tm cur is used outside the scope it defined."

Checked with `clang -fsanitize=address -fsanitize-address-use-after-scope`
and test that call evutil_date_rfc1123() with tm==NULL

show more ...


# db60ade8 10-Nov-2016 Vis Virial <[email protected]>

http: do not use local settings for Date header


Revision tags: release-2.1.7-rc, release-2.1.6-beta
# 30316177 28-Jun-2016 Mark Ellzey <[email protected]>

[#372] check for errno.h


# a264da86 20-Dec-2015 Mark Ellzey <[email protected]>

Revert "The Windows socket type is defined as SOCKET."


# c9e6c3d7 16-Dec-2015 billsegall <[email protected]>

The Windows socket type is defined as SOCKET.

Under the hood it's an unsigned rather than a signed type and whilst C
compilers are largely happy with this C++ compilers tend to be fussy
about class

The Windows socket type is defined as SOCKET.

Under the hood it's an unsigned rather than a signed type and whilst C
compilers are largely happy with this C++ compilers tend to be fussy
about class function signatures which makes C++ usage of libevent
problematic.

show more ...


# 043ae748 11-May-2015 Mark Ellzey <[email protected]>

Fix garbage value in socketpair util function, stdint?

* Fixed an issue with evutil_ersatz_socketpair_, listen_addr could all
be compared against with agarbage values. So just memset it before
u

Fix garbage value in socketpair util function, stdint?

* Fixed an issue with evutil_ersatz_socketpair_, listen_addr could all
be compared against with agarbage values. So just memset it before
using it anywhere.

* Nick might punch me in the face, but if we have stdint.h; (as in
EVENT__HAVE_STDINT_H is defined), might as well use those instead of
the manual [U]INT[X}_MAX/MIN muck in there now.

show more ...


Revision tags: release-2.0.22-stable, release-1.4.15-stable, release-2.1.5-beta
# f2645f80 19-Nov-2014 Andrea Shepard <[email protected]>

Implement new/free for struct evutil_monotonic_timer and export monotonic time functions


# b625361a 13-Oct-2014 Maciej Soltysiak <[email protected]>

Provide support for SO_REUSEPORT through LEV_OPT_REUSABLE_PORT


Revision tags: release-2.1.4-alpha
# 4545fa9b 19-Feb-2014 Trond Norbye <[email protected]>

Add option to build shared library


# d44f91ad 13-Aug-2013 Nick Mathewson <[email protected]>

Finish a sentence


# 2bbb5d76 06-Aug-2013 Nick Mathewson <[email protected]>

Add evutil_secure_rng_set_urandom_device_file

This experimental function is needed for some seccomp2 hackery to
work, and should have no effect for systems that don't use it.


# 6e496961 10-Jun-2013 Nick Mathewson <[email protected]>

Document that arc4random is not a great cryptographic PRNG.


Revision tags: release-2.1.3-alpha, release-2.1.2-alpha, release-2.0.21-stable, release-2.0.20-stable
# 117e3273 14-Jun-2012 Nick Mathewson <[email protected]>

Add GCC annotations so that the vsprintf functions get checked properly


Revision tags: release-2.0.19-stable, release-2.1.1-alpha
# bcf52585 03-Apr-2012 Nick Mathewson <[email protected]>

Include ws2tcpip.h from util.h to get EAI_* definitions.

This is necessary on msvc, to get the EVUTIL_EAI_* values defined properly


Revision tags: release-2.0.18-stable
# da455e92 29-Feb-2012 Nick Mathewson <[email protected]>

Fix doxygen to use new macro conventions


# 946b5841 29-Feb-2012 Nick Mathewson <[email protected]>

Clean up lingering _identifiers.


# c9635349 29-Feb-2012 Nick Mathewson <[email protected]>

Fix some problems introduced by automated identifier cleanup script


1234