|
a2ed23b1
|
2024-11-24T23:32:04
|
|
Replace deprecated find_package(PythonInterp) with Python2/Python3
Fixes: #1751
|
|
e36398f1
|
2024-11-16T21:35:53
|
|
cmake: Remove redundant policy settings
The `cmake_minimum_required(VERSION 3.10)` command implicitly sets the
following policies to NEW by default:
- CMP0042 (introduced in CMake 3.0)
- CMP0054 (introduced in CMake 3.1)
- CMP0068 (introduced in CMake 3.9)
|
|
2d7a3b9b
|
2024-11-16T21:26:55
|
|
cmake: Update minimum required version
Compatibility with versions of CMake older than 3.10 is now deprecated
and will be removed from a future version.
See: https://cmake.org/cmake/help/v3.31/release/3.31.html
|
|
d6dbd7f8
|
2024-11-03T01:26:59
|
|
Windows platform supports reading IPv6 addresses for DNS server. (#1701)
When using libevent on the Windows platform in an IPv6 environment, I found that libevent could not read the DNS server address for IPv6 addresses during DNS initialization, resulting in constant DNS resolution failures. Then, on MSDN, I discovered that the GetNetworkParams interface does not support obtaining IPv6 addresses, and they provided another interface, GetAdaptersAddresses, to obtain both IPv4 and IPv6 addresses. Therefore, I replaced the GetNetworkParams interface with the GetAdaptersAddresses interface. Please review whether this modification can be merged into the master branch.
Reference MSDN documentation:
https://learn.microsoft.com/en-us/windows/win32/api/iphlpapi/nf-iphlpapi-getnetworkparams
https://learn.microsoft.com/en-us/windows/win32/api/iphlpapi/nf-iphlpapi-getadaptersaddresses
Co-authored-by: alphacheng <alphacheng@tencent.com>
Co-authored-by: Azat Khuzhin <azat@libevent.org>
Co-authored-by: Azat Khuzhin <a3at.mail@gmail.com>
|
|
f01879d5
|
2024-10-21T09:58:26
|
|
Align ELF sections to 16K boundaries (-Wl,-z,max-page-size=16384)
Even though the initial request was about Android, it is not only about
it, but it could be the case for Linux as well (so as Apple M1/...
chips)
And this should not affect anything, since this is just ELFs
Fixes: https://github.com/libevent/libevent/issues/1708
|
|
b456e4bd
|
2024-10-26T20:46:41
|
|
Use arc4random_stir over deprecated arc4random_addrandom (#1631)
Co-authored-by: Azat Khuzhin <azat@libevent.org>
|
|
e30b215f
|
2024-10-24T06:28:53
|
|
Add caching for evdns (#1717)
No evdns will do caching by default (with respect to TTL), to disable this set EVDNS_BASE_NO_CACHE
There are also helpers for manually manage the cache:
- evdns_cache_write()
- evdns_cache_lookup()
Initial PR: #571
Fixes: #1715
Co-authored-by: Greg Hazel <ghazel@gmail.com>
Co-authored-by: Keith Moore <kmoore@clostra.com>
|
|
68e18761
|
2024-10-03T09:20:52
|
|
Move find_dependency() directly to LibeventConfig.cmake
Patch-by: @ahuj9
Fixes: https://github.com/libevent/libevent/issues/1711
Follow-up for: https://github.com/libevent/libevent/pull/1544 (cc @kurtlau)
|
|
ccb18f5b
|
2024-09-20T20:56:14
|
|
fix cmake build error for android: threads not found
|
|
e5181b15
|
2024-06-24T03:37:49
|
|
Cleanup EVENT_HAVE_ macros (#1645)
|
|
a0fc31bf
|
2024-06-01T18:52:39
|
|
Sort symbols to check in cmake/autotools lexicographically
|
|
aef201a9
|
2024-04-29T13:35:33
|
|
Change ident for EVFILT_USER to 0 and add a test (#1582)
Conventionally, ident for EVFILT_USER is set to 0 to avoid
collision of file descriptors, which is what other renowned
networking frameworks like netty(java), mio(rust), gnet(go),
swift-nio(swift), etc. do currently.
Co-authored-by: Azat Khuzhin <azat@libevent.org>
|
|
a9426941
|
2024-04-28T13:16:54
|
|
Fix CMake Deprecation Warning
|
|
71d41cdf
|
2024-04-22T06:39:35
|
|
build: Add `Iphlpapi` to `Libs.private` in `*.pc` files on Windows
It has been required since https://github.com/libevent/libevent/pull/923
at least for the `if_nametoindex` call.
|
|
ed35b30f
|
2023-10-23T16:52:19
|
|
Fix two compiler errors for unused variable and undefined function
In buffer.c a variable "flags" and a label "done" are defined but
never used if "EVENT__HAVEMMAP" is not defined.
The code does not work on platforms which do not provide
the function `socketpair()`. Introduce EVENT__HAVE_SOCKETPAIR flag
which determines if `socketpair()` or `evutil_ersatz_socketpair()`
is used.
|
|
7870e85e
|
2024-01-24T13:19:23
|
|
install DESTINATION use CMAKE_INSTALL_<dir>
|
|
b698e6c4
|
2024-01-23T04:29:04
|
|
Make MbedTLS and OpenSSL dependencies configurable (#1544)
As acfac7a#r124469888 mentioned, LibeventConfig.cmake is looking for MBedTLS package, even if libevent is not configured to use MBedTLS.
This PR makes MbedTLS and OpenSSL dependencies configurable.
Fixes: #1543
|
|
c9ec6aaf
|
2023-08-01T14:02:34
|
|
Update cmake policy wrt. RPATH on OSX
Previous settings caused install outside CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES
to use install_name "lib/" in place of the expected (and useful) "@rpath/".
|
|
3c29a81b
|
2023-07-30T07:44:53
|
|
fixup RPATH computation
Handle cases where ${CMAKE_INSTALL_LIBDIR} is not ${CMAKE_INSTALL_PREFIX}/lib .
Also, preserve user provided ${CMAKE_INSTALL_RPATH} .
fixup for 41a7393f3ecd1e9f58331df4653dac2e6739304e
|
|
57d9eec6
|
2023-07-10T10:40:49
|
|
Disable signalfd by default
signalfd may behave differently to sigaction/signal, so to avoid
breaking libevent users (like [1], [2]) disable it by default.
[1]: https://github.com/tmux/tmux/pull/3621
[2]: https://github.com/tmux/tmux/pull/3626
Also signalfd is not that perfect:
- you need to SIG_BLOCK the signal before
- blocked signals are not reset on exec
- blocked signals are allowed to coalesce - so in case of multiple
signals sent you may get the signal only once (ok for most of the
signals, but may be a problem for SIGCHLD, though you may call
waitpid() in a loop or use pidfd)
- and also one implementation problem -
sigprocmask is unspecified in a multithreaded process
Refs:
- https://lwn.net/Articles/415684/
- https://ldpreload.com/blog/signalfd-is-useless
Refs: https://github.com/libevent/libevent/issues/1460
Refs: #1342 (cc @dmantipov)
|
|
13366d27
|
2023-06-13T07:23:10
|
|
Test timer - synchronize clock before tv_timeout calculation.
|
|
9ce6ae78
|
2023-06-05T18:38:22
|
|
Add option to auto-detect OpenSSL and MbedTLS
|
|
283a371f
|
2023-05-23T21:46:14
|
|
cmake: log when CMAKE_DEBUG_POSTFIX/CMAKE_BUILD_TYPE is changed
|
|
4effaee5
|
2023-05-22T00:01:17
|
|
cmake: Fix .pc files when building in Release mode
Don't define CMAKE_DEBUG_POSTFIX as this breaks Release builds, only apply when doing debug builds.
|
|
1c06b68f
|
2023-05-21T10:09:50
|
|
Add a note about the last number in NUMERIC_VERSION
|
|
8d1388a3
|
2023-05-21T08:40:48
|
|
Bump version to 2.2.1
|
|
2c2ffb8d
|
2023-05-20T16:00:09
|
|
Revert "cmake: Only use relative paths for install DESTINATION option (#1405)"
After rebasing I broke the initial intention of this patch, so it simply
should be reverted.
This reverts commit 81c6b8823c1b58d7837e827bb1098aa5f9e5956b.
|
|
acfac7ae
|
2022-12-01T18:39:52
|
|
Make dependency paths relocatable
The generated configurations for both CMake and pkg-config included
absolute paths to dependencies (OpenSSL, MbedTLS). This is contrary
to the general CMake advise to create relocatable packages [1].
Additionally, when building both mbedtls and libevent via CMake's
FetchContent in the same project, loading the project would fail with
INTERFACE_INCLUDE_DIRECTORIES property contains path:
"/home/user/project/cmake-build/_deps/mbedtls-build/include"
which is prefixed in the source directory.
The required changes include:
- Adding the outer includes only to the BUILD_INTERFACE solves the
makes the CMake paths relocatable and thus solves the FetchContent
problem.
- Updates to libevent_*.pc.in fixes the relocatable issues for
pkg-config and properly declares currently missing dependencies.
- Using components for linking to OpenSSL (requiring CMake 3.4)
and MbedTLS. The new MbedTLS target names now match the component
names of the MbedTLS' CMake project.
- Use the Threads CMake library reference instead of a direct
reference to support both built-in pthread and -lpthread.
v2 (azat): get back CMAKE_REQUIRED_LIBRARIES
[1] https://cmake.org/cmake/help/v3.25/manual/cmake-packages.7.html#creating-relocatable-packages
|
|
81c6b882
|
2023-05-16T05:07:36
|
|
cmake: Only use relative paths for install DESTINATION option (#1405)
As described in #1404, the explicit use of CMAKE_INSTALL_PREFIX conflicts with using command-line --prefix.
This simply removes all explicit use of CMAKE_INSTALL_PREFIX.
Otherwise this path will be duplicated:
$ cmake -DCMAKE_BUILD_TYPE=debug -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_INSTALL_PREFIX=inst ..
$ DESTDIR=inst ninja install
...
-- Installing: inst/src/le/libevent/.cmake-debug/inst/include/event2/util.h
-- Installing: inst/src/le/libevent/.cmake-debug/inst/include/event2/ws.h
...
Fixes: #1404
Co-authored-by: Jeremy Murphy <jeremymu@blackmagicdesign.com>
|
|
41a7393f
|
2022-07-10T13:48:53
|
|
Fix Configure_RPATH()
|
|
be03bf38
|
2021-11-08T06:47:25
|
|
Install LibeventConfig.cmake similar to other cmake files
- Don't destroy cmake file between test case invocations
|
|
1f1593ff
|
2021-10-27T16:40:10
|
|
Use GNUInstallDirs for mapping installation directories
|
|
f04d90b1
|
2023-04-04T22:15:35
|
|
Fix building with -Wstack-protector due to VLA and fobid them
It is not a thankless task to fix such issues on and on, let's just
prohibit this cases, and our build with -Werror on CI will show new
issues from now on.
Fixes: #1434
|
|
1878232b
|
2023-02-13T15:57:55
|
|
build: split kqueue warning message into cross-compile and apple
This is output when compiling (natively) on macOS systems, which is
confusing, because no cross-compilation is involved.
Split the message into separate cases.
|
|
185e2f00
|
2023-03-05T23:58:22
|
|
build: improve mbedtls searching on macOS with brew for cmake (#1419)
This just copies the same logic used to find OpenSSL on macOS using homebrew, for finding mbedtls via brew. Without it, the build will fail out the box with a brew installed mbedtls.
|
|
38cd76f0
|
2023-02-13T16:05:58
|
|
build: use FORTIFY_SOURCE=3 in CMake build
|
|
4d85d28a
|
2023-01-28T13:28:52
|
|
Fix pthread detection for regress tests on Android
Fixes: #1403
|
|
0b79a002
|
2023-01-02T17:06:48
|
|
buffer: use pread() for evbuffer_file_segment_materialize()
If pread(2) is available, prefer it over double lseek(2)
and read(2) in evbuffer_file_segment_materialize().
Signed-off-by: Dmitry Antipov <dantipov@cloudlinux.com>
|
|
1fe626c4
|
2022-12-16T00:34:25
|
|
Allow CLI override of CMAKE_DEBUG_POSTFIX (#1391)
Allows cmake -DCMAKE_BUILD_TYPE=DEBUG -DCMAKE_DEBUG_POSTFIX= for a debug build with the regular library names.
|
|
82af0ea4
|
2022-11-20T22:18:37
|
|
cmake: remove redundant _GNU_SOURCE definition
As reported by @francoisk:
`_GNU_SOURCE` is defined in the private config header but also on the
compiler command-line for every object.
Fixes: #1333
|
|
650d8619
|
2022-11-20T14:51:36
|
|
cmake: do influence CMAKE_DEBUG_POSTFIX of the outer project (if any)
Consider the following example:
$ touch lib.c
$ cat > CMakeLists.txt <<EOL
add_subdirectory(/src/le/libevent libevent EXCLUDE_FROM_ALL)
add_library(lib lib.c)
EOL
$ mkdir .cmake
$ cmake -DCMAKE_BUILD_TYPE=debug -G Ninja ..
$ ninja
$ ls *.a
liblibd.a
So now outer project also has "d" prefix for libraries.
Let's avoid this by setting non-cached variable.
Fixes: #1371
|
|
1af745d0
|
2022-10-25T11:30:34
|
|
signal: new signal handling backend based on signalfd
Linux-specific signal handling backend based on signalfd(2)
system call, and public function event_base_get_signal_method()
to obtain an underlying kernel signal handling mechanism.
Signed-off-by: Dmitry Antipov <dantipov@cloudlinux.com>
|
|
9e346936
|
2022-11-12T18:56:25
|
|
Ignore unknown pragmas
Since new compilers has new checks (like -Wdangling-pointer), and so to
avoid extra checks in cmake/autotools, simply suppress if the pragma is
unknown.
|
|
c8c730c8
|
2022-11-12T18:56:03
|
|
cmake: tiny cleanup
|
|
8f47d8de
|
2022-10-03T09:31:10
|
|
cmake: Fix Android build.
Android/Bionic C library needs no special flags to have threading support.
Found when trying to build with vcpkg.
|
|
117ee9a0
|
2022-09-15T14:06:50
|
|
epoll: use epoll_pwait2() if available
On GNU/Linux with epoll backend, prefer epoll_pwait2() if available,
which is useful to support the timeout with microsecond precision.
|
|
211c6653
|
2022-09-26T11:54:14
|
|
Add manual CMAKE_C_BYTE_ORDER set for old CMake
|
|
e8313084
|
2022-09-12T22:16:56
|
|
Add minimal WebSocket server implementation for evhttp (#1322)
This adds few functions to use evhttp-based webserver to handle incoming
WebSockets connections. We've tried to use both libevent and libwebsockets in
our application, but found that we need to have different ports at the same
time to handle standard HTTP and WebSockets traffic. This change can help to
stick only with libevent library.
Implementation was inspired by modified Libevent source code in ipush project
[1].
[1]: https://github.com/sqfasd/ipush/tree/master/deps/libevent-2.0.21-stable
Also, WebSocket-based chat server was added as a sample.
|
|
039e8d96
|
2022-09-11T22:08:32
|
|
Add openssl-compat.h into HDR_PRIVATE
Fixes: #1334
|
|
86b5d2e9
|
2022-08-13T19:10:10
|
|
Fixed CMake configuration failure (libevent#1321)
Deleted usage of CMake feature 'file(REAL_PATH'
which is available from version 3.19
with an old 'get_filename_component' so that
older version of CMake can still be used
to configure the project.
|
|
99fd68ab
|
2022-08-07T13:51:48
|
|
Add check of mmap64 function and use it when available rather that mmap
There can be issues on 32-bit architectures to mmap 2+GiB file, and to
make this portable between different version of glibc, mmap64 was
prefered over _FILE_OFFSET_BITS
|
|
dd610b77
|
2022-07-29T20:49:35
|
|
Add postfix for Debug configuration.
|
|
39604493
|
2022-07-09T17:08:21
|
|
Detech -Wno-unused-functions for GCC too
Otherwise build fails [1]:
/home/runner/work/libevent/libevent/dist/libevent-2.2.0-alpha-dev/minheap-internal.h:64:6: error: ‘min_heap_ctor_’ defined but not used [-Werror=unused-function]
void min_heap_ctor_(min_heap_t* s) { s->p = 0; s->n = 0; s->a = 0; }
^~~~~~~~~~~~~~
In file included from /home/runner/work/libevent/libevent/dist/libevent-2.2.0-alpha-dev/buffer.c:91:0:
/home/runner/work/libevent/libevent/dist/libevent-2.2.0-alpha-dev/bufferevent-internal.h:414:1: error: ‘bufferevent_trigger_nolock_’ defined but not used [-Werror=unused-function]
bufferevent_trigger_nolock_(struct bufferevent *bufev, short iotype, int options)
^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/runner/work/libevent/libevent/dist/libevent-2.2.0-alpha-dev/buffer.c:89:0:
/home/runner/work/libevent/libevent/dist/libevent-2.2.0-alpha-dev/evthread-internal.h:140:1: error: ‘EVLOCK_TRY_LOCK_’ defined but not used [-Werror=unused-function]
EVLOCK_TRY_LOCK_(void *lock)
[1]: https://github.com/libevent/libevent/runs/7263518180?check_suite_focus=true
|
|
92b73c7d
|
2022-07-09T15:45:34
|
|
cmake: add compiler version to the status message
|
|
f5ad737d
|
2022-07-09T14:22:38
|
|
Add -Wundef for cmake and fix EVENT__SIZEOF_TIME_T usage
Note, autotools already supports it.
|
|
bf3ce77f
|
2022-06-23T13:38:14
|
|
build: only try silence options if they exist
Otherwise GCC will warn. i.e:
```bash
CCLD libevent_openssl.la
cc1: note: unrecognized command-line option ‘-Wno-void-pointer-to-enum-cast’
may have been intended to silence earlier diagnostics
CCLD libevent_mbedtls.la
```
|
|
6349e94a
|
2022-03-10T23:11:14
|
|
Do not install RPATH for install tree by default
In ce8be2385b5fee16859a630fca0c98ad290c8e21 ("cmake: set rpath for
libraries on linux") RPATH was first instroduced.
Later in 6d09efe8686de824adf3d8810bbe0d5c386643e4 ("Set RPATH only if
installation is done into non system directory") it was set only if it
was installed to non system directory.
But absolute RPATH not a good default, let's change this.
Fixes: #920
|
|
6d09efe8
|
2022-01-15T22:06:58
|
|
Set RPATH only if installation is done into non system directory
v2: use CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES
Fixes: #1245
|
|
7179cedd
|
2021-09-19T13:36:15
|
|
Add -Wno-void-pointer-to-enum-cast (we use this hack in tests)
Refs: https://reviews.llvm.org/D75758
|
|
087bbc57
|
2021-05-13T17:32:11
|
|
cmake: don't override CMAKE_CONFIGURATION_TYPES.
Surprisingly this overrides configuration types for projects which embed libevent using cmake's add_subdirectory.
|
|
78e8541a
|
2021-03-28T10:35:22
|
|
build: remove no-longer used checks for vasprintf
From what I can tell the last usage was removed in
8d1317d71c46e27c5073d3429a64af69de0351a6.
|
|
4c29b01c
|
2021-03-28T10:57:11
|
|
build: remove splice implementation fragments
Looks like a `splice` implementation was planned, but has clearly never
eventuated (the TODO comment is from ~12 years ago, in
8b5bd77415fb6634fadf08357676926fecf5f032). For now, it's probably better
to remove the unused code/correct the docs.
|
|
1a242e1c
|
2020-11-01T01:39:02
|
|
cmake: find openssl prefix via brew
|
|
b45a02ef
|
2020-09-16T11:31:33
|
|
sample: add https-client-mbedtls
|
|
02428d9a
|
2020-09-01T01:08:16
|
|
build: fix building under windows with thread support
Fixes: 972289f3 ("Detect existence of pthread_mutexattr_setprotocol()")
|
|
972289f3
|
2020-08-29T01:15:20
|
|
Detect existence of pthread_mutexattr_setprotocol()
Fixes: #1084
|
|
eb7bed03
|
2020-08-01T16:10:48
|
|
Convert from WinCrypt to Windows BCrypt
Fixes: #1069
|
|
d095b834
|
2020-07-07T17:26:46
|
|
Merge ssl implementations (openssl and mbedtls)
This patch splits common part out to avoid copy-paste from the
- bufferevent_openssl.c
- bufferevent_mbedtls.c
It uses VFS/bufferevent-like approach, i.e. structure of callbacks.
|
|
028385f6
|
2020-05-28T17:14:46
|
|
fix build system and add test and cleanup code
|
|
8218777d
|
2020-01-14T12:18:27
|
|
mbed TLS cmake support
FindMbedTLS.cmake is come from https://github.com/AVSystem/avs_commons/blob/master/cmake/FindMbedTLS.cmake, which is licensed under Apache 2.0
alternatives:
https://github.com/curl/curl/blob/master/CMake/FindMbedTLS.cmake without variable MBEDTLS_ROOT_DIR
https://github.com/libgit2/libgit2/blob/master/cmake/Modules/FindmbedTLS.cmake GPLv2 with a special Linking Exception
|
|
b6497fa1
|
2020-07-04T15:55:22
|
|
build: do not disable deprecation warnings on macOS
this was for using openssl-0.9.8 included in macOS 10.7 - 10.12,
but it is long since time you really should not use that openssl
|
|
26d5ff45
|
2020-06-18T15:47:14
|
|
cmake: avoid problems from use of CMAKE_USE_PTHREADS_INIT
In some CMake integrations, portions of the toolchain may end up
defining CMAKE_USE_PTHREADS_INIT even when EVENT__DISABLE_THREAD_SUPPORT
is set for libevent. Modify the build to not rely on this side effect
of find_package(Threads, ...) [which could be done elsewhere] but instead
to use EVENT__HAVE_PTHREADS which is defined only on the desired codepath.
Without this change, affected builds fail as a result of event_pthreads source
files being built but with build defines which cause the build to fail.
Signed-off-by: Paul Osborne <paul.osborne@smartthings.com>
|
|
83ef3216
|
2020-04-22T19:44:45
|
|
Add wepoll support to light up the epoll backend on Windows
libevent is lacking a scalable backend on Windows. Let's leverage the wepoll
library until Windows comes up with an epoll/kqueue compete user mode API.
- All regress tests pass for standard wepoll
- These 2 tests fail intermittently for changelist wepoll, so disabling
changelist wepoll for now
http/cancel_inactive_server
http/stream_in
- verify target on Windows runs tests for both wepoll and win32 backends
- wepoll backend preferred over win32 backend
- wepoll version 1.5.6
v2: cleaner backend abstraction. Disallow wepoll on MinGW/Cygwin.
v3: Add wepoll.h to dist
v4: Make sure wepoll source files are excluded from cygwin/mingw builds
v5: Keep win32 as default backend on windows.
v6: Include wepoll in mingw builds. Verified that regress tests pass w/ WEPOLL backend.
v7: Enable wepoll on mingw when building with cmake
v8: Add wepoll testrunner for autotools test target
|
|
7a465268
|
2020-05-05T14:20:09
|
|
Pass --quiet to the event_rcpgen.py (autotools already does this)
|
|
57862901
|
2020-04-08T00:29:40
|
|
cmake: missing test-closed binary
|
|
41d1d75a
|
2020-03-20T17:49:37
|
|
cmake: replace CheckFunctionExists with CheckSymbolExists
Checking functions with `CheckFunctionExists` may
get wrong results, we should replace it with
`CheckSymbolExists`, which is recommended by the cmake
official documentation.
Before using `CheckSymbolExists`, we use
`CheckIncludeFiles` to check header files and save the
available header files in a variable that guarantees
`CheckSymbolExists` and `CheckTypeSize` to work correctly.
This approach is modeled after the cmake scripts of `curl`.
The following functions or files were not found before
modification, they can now be found:
- msys2 + mingw-8.1.0 on Windows10 or mingw-7.3.0 on Ubuntu-18.04
timerclear
timercmp
timerisset
- windows10
getaddrinfo
getnameinfo
getprotobynumber
getservbyname
putenv
strtoll
timerclear
timercmp
timerisset
- ubuntu-18.04
sys/sysctl.h
timeradd
timerclear
timercmp
timerisset
- MacOS 10.13
sys/random.h
timeradd
timerclear
timercmp
timerisset
|
|
503ba1d3
|
2020-03-16T20:11:06
|
|
cmake: fix getaddrinfo checking error
Using `CheckFunctionExists` on Windows to check `getaddrinfo`
will get `not found`, but it actually exists. Using `CheckSymbolExists`
with headers will get correct results. Other functions such as
`getnameinfo`,`inet_ntop`,etc. have the same issue.
|
|
61c5c19b
|
2020-03-16T18:57:54
|
|
cmake: remove CheckFunctionExistsEx
`CheckFunctionExistsEx` is copied from the cmake modules before
3.1.2, which is the minimum required version of libevent.
The internal module `CheckFunctionExists`of cmake can completely
replace it.
|
|
b1e46c32
|
2020-01-13T00:33:39
|
|
test: put thread into real time scheduling class on osx for better latencies
|
|
f8a6f127
|
2020-01-13T22:24:54
|
|
cmake: do not print used method (EVENT_SHOW_METHOD) while running tests
autotools don't, plus this will make CI logs cleaner
|
|
fa33819e
|
2020-01-13T22:24:54
|
|
cmake: run regress test quietly like autotools (makes CI logs cleaner)
|
|
f0e79baf
|
2020-01-08T20:37:16
|
|
Added uninstall target check to cmakelists
|
|
8f13c170
|
2019-11-30T15:48:36
|
|
cmake: set CMAKE_{RUNTIME,LIBRARY,ARCHIVE}_OUTPUT_DIRECTORY they are not defined
This will allow overriding them in parent cmake rules, i.e. if libevent
is used via add_subdirectory().
Closes: #931
|
|
dc4be869
|
2019-11-07T18:26:47
|
|
cmake: improve package config file
|
|
9fecb59a
|
2019-10-29T15:48:53
|
|
Parse IPv6 scope IDs.
|
|
5fe83d74
|
2019-10-25T21:54:13
|
|
cmake: eliminate duplicate installation of public headers
|
|
84affc18
|
2019-10-21T10:36:49
|
|
append to CMAKE_MODULE_PATH
Don't override any -DCMAKE_MODULE_PATH= passed from CLI
to eg. test custom Platform/ support.
|
|
b9b9f190
|
2019-10-16T01:11:51
|
|
Do not use sysctl.h on linux (it had been deprecated)
It had been deprecated for a long time (AFAIK), but since
glibc-2.29.9000-309-g744e829637 it produces a #warning
|
|
af4b07a5
|
2019-10-03T11:40:52
|
|
Avoid transforming base C_FLAGS set deliberately
The CMAKE_C_FLAGS_DEBUG, CMAKE_C_FLAGS_RELEASE, CMAKE_C_FLAGS_MINSIZEREL
and CMAKE_C_FLAGS_RELWITHDEBINFO options are correctly and deliberately
toggled to use the libcmt (/MT) flag options in place of the usual
msvcrt (/MD) options, but this isn't necessarily desired by the user.
The default choice can be overriden with the EVENT__MSVC_STATIC_RUNTIME
cmake option.
However, the /MD flag that is the choice of CMake only enters into
play for the four types of builds above. If the user introduces another
CMAKE_BUILD_TYPE, the base CMAKE_C_FLAGS must not be manipulated, as
that value (and the CMAKE_C_FLAGS_{custom} value) have been explicitly
chosen by the user/developer deploying this library, and the mismatch
between these flags in different dependencies results in link errors.
The CMake build schema itself doesn't place an /MD flag in CMAKE_BUILD_TYPE
so any /M compile option in that variable needs to be retained.
Signed-off-by: William Rowe <wrowe@pivotal.io>
Signed-off-by: Yechiel Kalmenson <ykalmenson@pivotal.io>
|
|
148d12ad
|
2019-09-19T15:24:51
|
|
evutil_time: detect and use _gmtime64_s()/_gmtime64()
|
|
572a5651
|
2019-09-15T21:45:26
|
|
https-client: load certificates from the system cert store on Windows
|
|
86f55b04
|
2019-09-03T00:34:35
|
|
arc4random: replace sysctl() with getrandom (on linux)
Since sysctl() is deprecated for a long-long time, according to
sysctl(2):
Since Linux 2.6.24, uses of this system call result in warnings in the kernel log.
Fixes: #890
Suggested-by: Pierce Lopez
|
|
b5e1d911
|
2019-09-02T11:11:58
|
|
Fixes spelling
|
|
1d1c1909
|
2019-08-23T21:48:05
|
|
cmake: attach doxygen target into all target
v2: Disable non-html generator for doxygen by default
v3: convert cmake option to doxygen config
|
|
669a53f3
|
2019-07-10T00:30:12
|
|
cmake: set library names to be the same as with autotools
libtool has VERSION_INFO [1], cmake has SOVERSION/VERSION instead
(although it has different format). Also libtool has RELEASE [2] while
cmake do not have analog yet [3], hence manual symlinks should be
created.
[1]: https://www.gnu.org/software/libtool/manual/html_node/Libtool-versioning.html
[2]: https://www.gnu.org/software/libtool/manual/html_node/Release-numbers.html
[3]: https://gitlab.kitware.com/cmake/cmake/issues/17652
Plus osx has compatibility_version/current_version dylib properties and
cmake do not have separate properties for them [4], hence manual LINK_FLAGS.
And also there INSTALL_NAME_DIR property which should be adjusted too.
[4]: https://public.kitware.com/Bug/view.php?id=4383
So after all changes, here is an example before/after for osx and linux:
# osx
# autotools
.libs/libevent_pthreads-2.2.1.dylib
.libs/libevent_pthreads.dylib -> libevent_pthreads-2.2.1.dylib
/usr/local/lib/libevent_pthreads-2.2.1.dylib (compatibility version 2.0.0, current version 2.0.0)
# cmake
# before patch
lib/libevent_pthreads.2.2.0.dylib
lib/libevent_pthreads.dylib -> libevent_pthreads.2.2.0.dylib
@rpath/libevent_pthreads.2.2.0.dylib (compatibility version 2.2.0, current version 0.0.0)
# after patch
lib/libevent_pthreads-2.2.1.dylib
lib/libevent_pthreads.dylib -> libevent_pthreads-2.2.1.dylib
/vagrant/.cmake/inst/lib/libevent_pthreads-2.2.1.dylib (compatibility version 2.0.0, current version 2.0.0)
# linux
# autotools
.libs/libevent_pthreads-2.2.so.1 -> libevent_pthreads-2.2.so.1.0.0
.libs/libevent_pthreads-2.2.so.1.0.0
.libs/libevent_pthreads.so -> libevent_pthreads-2.2.so.1.0.0
# cmake
# before patch
lib/libevent_pthreads.so -> libevent_pthreads.so.2.2.0
lib/libevent_pthreads.so.2.2.0
# after patch
lib/libevent_pthreads-2.2.so -> libevent_pthreads-2.2.so.1
lib/libevent_pthreads-2.2.so.1 -> libevent_pthreads-2.2.so.1.0.0
lib/libevent_pthreads-2.2.so.1.0.0
lib/libevent_pthreads.so -> libevent_pthreads-2.2.so.1.0.0
Closes: #838 (cherry-picked)
Closes: #760
|
|
41c95abb
|
2019-07-08T14:06:55
|
|
Enable _GNU_SOURCE for Android
When targeting the Android NDK _GNU_SOURCE is not enabled by default:
```
/*
* With bionic, you always get all C and POSIX API.
*
* If you want BSD and/or GNU extensions, _BSD_SOURCE and/or _GNU_SOURCE are
* expected to be defined by callers before *any* standard header file is
* included.
*
* In our header files we test against __USE_BSD and __USE_GNU.
*/
#if defined(_GNU_SOURCE)
# define __USE_BSD 1
# define __USE_GNU 1
#endif
```
Because of this `pipe2` is not available:
```
#if defined(__USE_GNU)
int pipe2(int __fds[2], int __flags) __INTRODUCED_IN(9);
#endif
```
The function used to check if it does exist:
```
CHECK_FUNCTION_EXISTS_EX(pipe2 EVENT__HAVE_PIPE2)
```
Just check that the _linking_ succeeds, which it does, it's just not
visible in the import, leading to a warning (or error):
```
evutil.c:2637:6: error: implicit declaration of function 'pipe2' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
if (pipe2(fd, O_NONBLOCK|O_CLOEXEC) == 0)
^
```
When targeting the NDK it should be safe to always opt into this. Clang
would pass the right flag for us automatically _if_ the source was C++
instead of C.
|
|
0d7d85c2
|
2019-07-02T10:47:47
|
|
Enable kqueue for APPLE targets
The CMAKE_CROSSCOMPILING variable is not set for Apple targets seemingly
because of cmake implementation details (more info
https://cmake.org/cmake/help/latest/variable/CMAKE_CROSSCOMPILING.html).
Since Apple targets have working kqueue implementations this check makes
sure we enable it always when those are the targets, without users
having to explicitly set EVENT__HAVE_WORKING_KQUEUE
|
|
69466cde
|
2019-06-26T01:27:20
|
|
cmake: link against shell32.lib/advapi32.lib
Fixes: #844
Refs: #760 (cmake-vs-autotools)
|
|
bd2de483
|
2019-06-26T00:59:41
|
|
Require cmake >= 3.1.2 (for correct openssl 1.0.2 detection)
@ygj6 reported:
"My platform is MacOS 10.13.5, This problem only happens on Mac.
As written in the file CMakeLists.txt, the minimum required version of cmake is 3.1:
cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
So I built this project with cmake-3.1.0, but I got the following errors:
CMake Error at /usr/local/cmake-3.1.0/share/cmake/Modules/FindOpenSSL.cmake:293 (list):
list GET given empty list
Call Stack (most recent call first):
CMakeLists.txt:824 (find_package)
CMake Error at /usr/local/cmake-3.1.0/share/cmake/Modules/FindOpenSSL.cmake:294 (list):
list GET given empty list
Call Stack (most recent call first):
CMakeLists.txt:824 (find_package)
CMake Error at /usr/local/cmake-3.1.0/share/cmake/Modules/FindOpenSSL.cmake:296 (list):
list GET given empty list
Call Stack (most recent call first):
CMakeLists.txt:824 (find_package)
CMake Error at /usr/local/cmake-3.1.0/share/cmake/Modules/FindOpenSSL.cmake:298 (list):
list GET given empty list
Call Stack (most recent call first):
CMakeLists.txt:824 (find_package)
I googled this error and got this answer:
https://bugs.archlinux.org/task/43688
It is a bug in FindOpenSSL.cmake on cmake-3.1.0 and fixed on cmake-3.1.2 .
Of course, It was successful when rebuilding with cmake-3.1.2 .
So I suggest setting the minimum version required for cmake to 3.1.2 or higher.
"
Closes: #845
Refs: https://github.com/Kitware/CMake/commit/de4ccee75a89519f95fcbcca75abc46577bfefea
|
|
7201062f
|
2019-06-09T20:15:37
|
|
cmake: add missing autotools targets (doxygen, uninstall, event_rpcgen.py)
Close: #832 (cherry-picked)
|