Yes we still have flacky tests, but anyway two main configuration can
fail too (and they do fail from time to time) so let's not allow any
failures and see how this will go.
(Credits to @ygj6 via #910)
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>
if evbuffer_add_file_segment() fails it returns -1, so we should call
evbuffer_file_segment_free() only on error, and this -1 not 0.
Fixes: 6a81b1f5 ("Avoid double-free on error in evbuffer_add_file. Found by coverity.")
Backport-to: 2.1
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
- AC_PROG_SED
- AC_USE_SYSTEM_EXTENSIONS
- AC_TRY_COMPILE -> AC_COMPILE_IFELSE
- AC_TRY_RUN -> AC_RUN_IFELSE
...
Also use:
- AC_CONFIG_AUX_DIR
Refs: #870
Fixes: 3f09e923 ("Change the minimum version of automake to 1.13 and autoconf to 2.67")
- Documentation for `bufferevent_compat.h` and `rpc.h` is not generated
since the `@file` command is missing. It can be fixed by adding
`@file` in file comment block.
- The briefs of buffer.h,bufferevent.h and some other files are missing.
Adding `@brief` command can fix it.
- The parameters in the function declaration are different from the
parameters following the `@param` command.We should change them to the
same.
- Documentation of `watch.h` is not generated since `watch.h` has not
been added to the Doxyfile `INPUT` tag.
- Add link to the watch.h in event.h
argv[1] is currently unconditionally passed as the docroot to
send_document_cb(). This is broken if any optional parameters are
provided, such as -p <port>.
Signed-off-by: David Disseldorp <ddiss@samba.org>
It hasn't been part of the C standard until C11, although it is very
useful GCC extension it is better to avoid using this in cross platform
projects like libevent.
When I run make check via automake with a version of 1.12.6 or lower, I got this error:
/bin/sh: line 9: ./test_runner_epoll: No such file or directory
FAIL: test_runner_epoll
/bin/sh: line 9: ./test_runner_select: No such file or directory
FAIL: test_runner_select
/bin/sh: line 9: ./test_runner_kqueue: No such file or directory
FAIL: test_runner_kqueue
/bin/sh: line 9: ./test_runner_evport: No such file or directory
FAIL: test_runner_evport
/bin/sh: line 9: ./test_runner_devpoll: No such file or directory
FAIL: test_runner_devpoll
/bin/sh: line 9: ./test_runner_poll: No such file or directory
FAIL: test_runner_poll
/bin/sh: line 9: ./test_runner_win32: No such file or directory
FAIL: test_runner_win32
/bin/sh: line 9: ./test_runner_timerfd: No such file or directory
FAIL: test_runner_timerfd
/bin/sh: line 9: ./test_runner_changelist: No such file or directory
FAIL: test_runner_changelist
/bin/sh: line 9: ./test_runner_timerfd_changelist: No such file or directory
FAIL: test_runner_timerfd_changelist
Open the Makefile generated by command ./autogen.sh && ./configure
I can see the errors are caused by this line:
if $(TESTS_ENVIRONMENT) $${dir}$$tst $(AM_TESTS_FD_REDIRECT); then
$${dir}$$tst will expand to ./test_runner_epoll, but test_runner_epoll is only a target in test/include.am,
not a file, so it print:
/bin/sh: line 9: ./test_runner_epoll: No such file or directory.
It seems like a bug in automake 1.12.6.
The errors will disappear if I simply upgrade automake to 1.13, and upgrade autoconf to 2.65
(2.65 is the lowest version dependent by automake-1.13).
When I build with automake-1.13 and autoconf-2.66, I got another error:
configure.ac:667: error: AC_CHECK_SIZEOF: requires literal arguments
The code in configure.ac line 667 is :
AC_CHECK_SIZEOF(void *)
It is a bug in autoconf-2.66 :
http://gnu-autoconf.7623.n7.nabble.com/AC-CHECK-SIZEOF-int-is-error-in-autoconf-2-66-td13537.html
Finally, everything works fine when using automake-1.13 and autoconf-2.67.
Refs: #858