|
b456e4bd
|
2024-10-26T20:46:41
|
|
Use arc4random_stir over deprecated arc4random_addrandom (#1631)
Co-authored-by: Azat Khuzhin <azat@libevent.org>
|
|
e5181b15
|
2024-06-24T03:37:49
|
|
Cleanup EVENT_HAVE_ macros (#1645)
|
|
eec47a67
|
2024-04-30T15:59:58
|
|
Fix typos (#1634)
|
|
15e643d0
|
2024-03-03T14:49:34
|
|
Fix pread detection for cmake builds
Otherwise it will use lseek()+read() - suboptimal
|
|
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.
|
|
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>
|
|
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.
|
|
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
|
|
f5ad737d
|
2022-07-09T14:22:38
|
|
Add -Wundef for cmake and fix EVENT__SIZEOF_TIME_T usage
Note, autotools already supports it.
|
|
67f808ec
|
2021-06-15T14:10:29
|
|
build: remove call to AC_HEADER_TIME
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.
|
|
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.
|
|
972289f3
|
2020-08-29T01:15:20
|
|
Detect existence of pthread_mutexattr_setprotocol()
Fixes: #1084
|
|
028385f6
|
2020-05-28T17:14:46
|
|
fix build system and add test and cleanup code
|
|
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
|
|
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
|
|
b1e46c32
|
2020-01-13T00:33:39
|
|
test: put thread into real time scheduling class on osx for better latencies
|
|
148d12ad
|
2019-09-19T15:24:51
|
|
evutil_time: detect and use _gmtime64_s()/_gmtime64()
|
|
194a5d82
|
2019-09-04T00:46:01
|
|
cmake: fix getrandom() detection
Fixes: 86f55b04 ("arc4random: replace sysctl() with getrandom (on linux)")
|
|
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
|
|
da112175
|
2019-05-12T16:12:06
|
|
build: struct sockaddr_un detection (sys/un.h, afunix.h)
- 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/
|
|
d5b24cc0
|
2019-03-05T21:34:31
|
|
sample/becat: bufferevent cat, ncat/nc/telnet analog
|
|
8e87de3c
|
2019-02-04T22:18:45
|
|
cmake: fix checking of devpoll backend (like in autotools, by devpoll.h existence)
|
|
e85818d2
|
2018-06-19T10:15:08
|
|
Cleanup __func__ detection
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
|
|
755896ef
|
2018-06-16T16:44:06
|
|
Get rid of macros which are never used
There are no expansions of these macros or tests for their existence.
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
|
|
266f43af
|
2017-03-27T15:50:23
|
|
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")
|
|
d5e10870
|
2017-03-13T21:54:33
|
|
cmake: clean not used #defines from event-config.h
- _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
|
|
7182c2f5
|
2017-03-12T23:31:59
|
|
cmake: build SHARED and STATIC libraries (like autoconf does)
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
|
|
66a4eb0c
|
2017-03-06T00:05:50
|
|
Check for WNOWAIT in waitpid() in runtime (not in cmake/configure)
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
|
|
7f945b2d
|
2017-03-05T21:58:20
|
|
cmake: fix values for #cmakedefine
|
|
85272602
|
2017-03-05T21:57:45
|
|
cmake: drop duplicates from event-config template
|
|
336ab816
|
2017-03-05T21:48:56
|
|
cmake: add value for the #cmakedefine macros (like autoconf)
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 */
|
|
fa135bdc
|
2017-01-30T03:17:41
|
|
cmake: Fix checking of enum values from sysctl.h
CheckSymbolExists do not do this, so add new CheckConstExists that will
use CheckCSourceCompiles() to check this.
v2: use set() instead of string(APPEND)
|
|
5d18d879
|
2017-03-02T21:09:32
|
|
Do not check for ERR_remove_thread_state() (do not link ssl into every library)
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
|
|
b24a78cc
|
2017-01-29T23:05:18
|
|
cmake: check for 'struct linger' existence
|
|
dc624adf
|
2016-08-24T16:19:01
|
|
cmake: cleanup
- 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)
|
|
43eb56c7
|
2016-08-11T16:15:45
|
|
tests: use waitpid(..., WNOWAIT) to fix failing of main/fork under solaris
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
|
|
30316177
|
2016-06-28T10:37:24
|
|
[#372] check for errno.h
|
|
49bd7904
|
2016-01-12T01:37:34
|
|
cmake: don't define EVENT__NEED_DLLIMPORT always (fixes VS2013 static build)
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")
|
|
49a53811
|
2015-12-20T21:44:04
|
|
More cmake updates, lot's of missing definitions
|
|
6aad23d8
|
2015-12-20T01:56:25
|
|
CMake syntax fixes fo .in files
|
|
8b228e27
|
2015-12-19T01:47:49
|
|
Lot's of cmake updates
This is still not done, cmake here was a horrid mess, but we're
getting our act together now.
|
|
c4e9d9bd
|
2015-11-23T18:44:03
|
|
sample/https-client: check for ERR_remove_thread_state() existence
Fixes: freebsd 9.2 build
|
|
8896a92b
|
2014-03-03T13:47:21
|
|
Merge remote-tracking branch 'origin/pr/110'
|
|
4545fa9b
|
2014-02-19T06:31:27
|
|
Add option to build shared library
|
|
f665d5cb
|
2014-02-24T10:32:00
|
|
Stop checking for inet_aton; we don't use it.
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.
|
|
e415196a
|
2013-12-09T18:05:32
|
|
Initial CMake commit.
|