summaryrefslogtreecommitdiff
path: root/event-config.h.cmake
Commit message (Collapse)AuthorAgeFilesLines
* signal: new signal handling backend based on signalfdDmitry Antipov2022-11-121-0/+3
| | | | | | | | 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>
* epoll: use epoll_pwait2() if availableDmitry Antipov2022-09-271-0/+3
| | | | | On GNU/Linux with epoll backend, prefer epoll_pwait2() if available, which is useful to support the timeout with microsecond precision.
* Add check of mmap64 function and use it when available rather that mmapDmitry Ilyin2022-08-091-0/+3
| | | | | | 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
* Add -Wundef for cmake and fix EVENT__SIZEOF_TIME_T usageAzat Khuzhin2022-07-091-0/+3
| | | | Note, autotools already supports it.
* build: remove call to AC_HEADER_TIMEfanquake2021-07-091-3/+0
| | | | | | | | | | | Besides the fact that the *_TIME_WITH_SYS_TIME define doesn't seem to be used anywhere in the libevent source, this macro is also obselescent. > This macro is obsolescent, as current systems can include both files when they exist. > New programs need not use this macro. See: https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.67/autoconf.html#index-AC_005fHEADER_005fTIME-640.
* build: remove no-longer used checks for vasprintffanquake2021-03-281-3/+0
| | | | | From what I can tell the last usage was removed in 8d1317d71c46e27c5073d3429a64af69de0351a6.
* build: remove splice implementation fragmentsfanquake2021-03-281-3/+0
| | | | | | | 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.
* Detect existence of pthread_mutexattr_setprotocol()Azat Khuzhin2020-08-291-0/+3
| | | | Fixes: #1084
* fix build system and add test and cleanup codeokhowang(王沛文)2020-07-221-0/+3
|
* Add wepoll support to light up the epoll backend on WindowsNick Grifka2020-05-081-0/+3
| | | | | | | | | | | | | | | | | | | | | | 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
* cmake: replace CheckFunctionExists with CheckSymbolExistsyuangongji2020-03-221-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* test: put thread into real time scheduling class on osx for better latenciesAzat Khuzhin2020-01-131-0/+3
|
* evutil_time: detect and use _gmtime64_s()/_gmtime64()yuangongji2019-09-191-0/+6
|
* cmake: fix getrandom() detectionAzat Khuzhin2019-09-041-1/+1
| | | | Fixes: 86f55b04 ("arc4random: replace sysctl() with getrandom (on linux)")
* arc4random: replace sysctl() with getrandom (on linux)Azat Khuzhin2019-09-031-5/+5
| | | | | | | | | | 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
* build: struct sockaddr_un detection (sys/un.h, afunix.h)Azat Khuzhin2019-05-121-0/+9
| | | | | | | | | | - On UNIX: sys/un.h - Since win10: afunix.h And windows has AF_UNIX but do not have sockaddr_un (before windows build 17061 [1]), hence the sockaddr_un detection. [1]: https://devblogs.microsoft.com/commandline/af_unix-comes-to-windows/
* sample/becat: bufferevent cat, ncat/nc/telnet analogAzat Khuzhin2019-03-161-0/+3
|
* cmake: fix checking of devpoll backend (like in autotools, by devpoll.h ↵Azat Khuzhin2019-02-041-3/+0
| | | | existence)
* Cleanup __func__ detectionAzat Khuzhin2018-08-021-10/+3
| | | | | | | | | | | | | | | | | | | First of all __func__ is not a macro, it is char[] array, so the code that we had before in cmake, was incorrect, i.e.: #if defined (__func__) #define EVENT____func__ __func__ #elif defined(__FUNCTION__) #define EVENT____func__ __FUNCTION__ #else #define EVENT____func__ __FILE__ #endif So just detect do we have __func__/__FUNCTION__ in configure/cmake before build and define EVENT__HAVE___func__/EVENT__HAVE___FUNCTION__ to use the later to choose which should be used as a __func__ (if it is not presented). Closes: #644
* Get rid of macros which are never usedPhilip Prindeville2018-06-161-6/+0
| | | | | | There are no expansions of these macros or tests for their existence. Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
* Fix arc4random_addrandom() detecting and fallback (regression)Azat Khuzhin2017-03-271-0/+3
| | | | | | | | But this is kind of hot-fix, we definitelly need more sane arc4random compat layer. Fixes: #488 Introduced-in: 6541168 ("Detect arch4random_addrandom() existence")
* cmake: clean not used #defines from event-config.hAzat Khuzhin2017-03-131-16/+0
| | | | | | - _LARGE_FILES: we have it in evconfig-private.h.in, drop from event-config.h - EVENT___FILE_OFFSET_BITS: remove it for now - EVENT__const
* cmake: build SHARED and STATIC libraries (like autoconf does)Azat Khuzhin2017-03-131-2/+0
| | | | | | | | | | | | Since they are useful for debugging, and if autotools build them then cmamke has to do this too, to make migration more simple. And now: - tests: uses shared libraries (since this is upstreams one) - other binaries: uses static libraries This removes next private config: - EVENT__NEED_DLLIMPORT
* Check for WNOWAIT in waitpid() in runtime (not in cmake/configure)Azat Khuzhin2017-03-081-4/+1
| | | | | | | | | | | | | Because checking in cmake breaks cross-compiling. Introduced-in: 43eb56c7c738e3642f0981e3dd6ab9e082eec798. Fixes: #482 Fixes: #462 Refs: #475 v2: use waitid() with WNOWAIT v3: use WNOWAIT only if it available in waitpid(), because not all netbsd supports it
* cmake: fix values for #cmakedefineAzat Khuzhin2017-03-081-1/+1
|
* cmake: drop duplicates from event-config templateAzat Khuzhin2017-03-081-3/+0
|
* cmake: add value for the #cmakedefine macros (like autoconf)Azat Khuzhin2017-03-081-131/+131
| | | | | | | | | | Before this patch for cmake we had: #define EVENT__HAVE_ACCEPT4 /* #undef EVENT__HAVE_ARC4RANDOM */ While autotools has: #define EVENT__HAVE_ACCEPT4 1 /* #undef EVENT__HAVE_ARC4RANDOM */
* cmake: Fix checking of enum values from sysctl.hAzat Khuzhin2017-03-081-3/+6
| | | | | | | CheckSymbolExists do not do this, so add new CheckConstExists that will use CheckCSourceCompiles() to check this. v2: use set() instead of string(APPEND)
* Do not check for ERR_remove_thread_state() (do not link ssl into every library)Pierce Lopez2017-03-061-3/+0
| | | | | | | | | | | | | | This reverts commit c4e9d9bd662de7f575f2172c160795d452ebe709 ("sample/https-client: check for ERR_remove_thread_state() existence"). Calling AC_SEARCH_LIBS() modifies LIBS - -lcrypto incorrectly ends up in LIBS, and thus linked to by libevent_core.so. Checking for ERR_remove_thread_state should no longer be needed because it was introduced in openssl 1.0.0, and the previous line 0.9.8 had support discontinued at the end of 2015. Fixes: #473
* cmake: check for 'struct linger' existenceAzat Khuzhin2017-01-291-0/+3
|
* cmake: cleanupZonr Chang2016-10-261-11/+2
| | | | | | | | | | | - Remove a redundant check on netdb.h (EVENT__HAVE_NETDB_H). - Properly setup EVENT__SIZEOF_SSIZE_T for the case where "ssize_t" is not "int". - Remove unused EVENT__HAVE_PTHREAD. - Set EVENT__HAVE_LIBZ instead of EVENT__HAVE_ZLIB (and remove the latter). Closes: #391 (cherry-picked from PR)
* tests: use waitpid(..., WNOWAIT) to fix failing of main/fork under solarisAzat Khuzhin2016-08-111-0/+3
| | | | | | | | | | | | | | | | | | According to solaris docs: "One instance of a SIGCHLD signal is queued for each child process whose status has changed. If waitpid() returns because the status of a child process is available, and WNOWAIT was not specified in options, any pending SIGCHLD signal associated with the process ID of that child process is discarded. Any other pending SIGCHLD signals remain pending." And interesting thing that it works if you add sleep(1) before waitpid(), and also if you run with --verbose (some race or what). But linux doesn't support WNOWAIT in waitpid() so add detection into cmake/autotools. Fixes: #387 Link: https://bugzilla.redhat.com/show_bug.cgi?id=840782
* [#372] check for errno.hMark Ellzey2016-06-281-0/+4
|
* cmake: don't define EVENT__NEED_DLLIMPORT always (fixes VS2013 static build)Azat Khuzhin2016-01-301-1/+1
| | | | | | | | | Otherwise that #ifdef in visibility.h is useless, and __declspec(dllimport) will be always on. Fixes: #314 Fixes: 4545fa9b6866df47ce2f908631a84477a94d5f49 ("Add option to build shared library")
* More cmake updates, lot's of missing definitionsMark Ellzey2015-12-201-13/+20
|
* CMake syntax fixes fo .in filesMark Ellzey2015-12-201-5/+5
|
* Lot's of cmake updatesMark Ellzey2015-12-191-159/+184
| | | | | This is still not done, cmake here was a horrid mess, but we're getting our act together now.
* sample/https-client: check for ERR_remove_thread_state() existenceAzat Khuzhin2015-11-241-0/+3
| | | | Fixes: freebsd 9.2 build
* Merge remote-tracking branch 'origin/pr/110'Nick Mathewson2014-03-031-0/+2
|\
| * Add option to build shared libraryTrond Norbye2014-02-251-0/+2
| |
* | Stop checking for inet_aton; we don't use it.Nick Mathewson2014-02-241-3/+0
|/ | | | | | | | | | We had cmake and autoconf tests for the inet_aton function... but we never actually use it any more. (The autoconf tests still use the callability of inet_aton to decide whether we need to link against -lresolv) Reported by Harlan Stenn.
* Initial CMake commit.Joakim Soderberg2013-12-091-0/+500