mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-09 20:41:27 -04:00
Fix some autoconf issues on OpenBSD
Issue 1: autoconf gets accept when a header works properly with cpp but not with cc. This was true of the sys/sysctl.h header on openbsd. The fix: include sys/param.h (if present) when testing for sys/sysctl.h Issue 2: Somehow, autoconf's macro generation code is messed up on some versions of openbsd (including mine, and other people's too) so that instead of SIZEOF_VOID_P, it makes SIZEOF_VOID__. evutil/util.h now works around that.
This commit is contained in:
parent
c1cd32a156
commit
7c519dfd4f
@ -89,7 +89,12 @@ fi
|
|||||||
|
|
||||||
dnl Checks for header files.
|
dnl Checks for header files.
|
||||||
AC_HEADER_STDC
|
AC_HEADER_STDC
|
||||||
AC_CHECK_HEADERS(fcntl.h stdarg.h inttypes.h stdint.h stddef.h poll.h unistd.h sys/epoll.h sys/time.h sys/queue.h sys/event.h sys/param.h sys/ioctl.h sys/select.h sys/devpoll.h port.h netinet/in.h netinet/in6.h sys/socket.h sys/uio.h arpa/inet.h sys/eventfd.h sys/mman.h sys/sendfile.h netdb.h sys/sysctl.h)
|
AC_CHECK_HEADERS(fcntl.h stdarg.h inttypes.h stdint.h stddef.h poll.h unistd.h sys/epoll.h sys/time.h sys/queue.h sys/event.h sys/param.h sys/ioctl.h sys/select.h sys/devpoll.h port.h netinet/in.h netinet/in6.h sys/socket.h sys/uio.h arpa/inet.h sys/eventfd.h sys/mman.h sys/sendfile.h netdb.h)
|
||||||
|
AC_CHECK_HEADERS(sys/sysctl.h, [], [], [
|
||||||
|
#ifdef HAVE_SYS_PARAM_H
|
||||||
|
#include <sys/param.h>
|
||||||
|
#endif
|
||||||
|
])
|
||||||
if test "x$ac_cv_header_sys_queue_h" = "xyes"; then
|
if test "x$ac_cv_header_sys_queue_h" = "xyes"; then
|
||||||
AC_MSG_CHECKING(for TAILQ_FOREACH in sys/queue.h)
|
AC_MSG_CHECKING(for TAILQ_FOREACH in sys/queue.h)
|
||||||
AC_EGREP_CPP(yes,
|
AC_EGREP_CPP(yes,
|
||||||
|
@ -137,6 +137,11 @@ extern "C" {
|
|||||||
#define ev_int8_t signed char
|
#define ev_int8_t signed char
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Some openbsd autoconf versions get the name of this macro wrong. */
|
||||||
|
#if defined(_EVENT_SIZEOF_VOID__) && !defined(_EVENT_SIZEOF_VOID_P)
|
||||||
|
#define _EVENT_SIZEOF_VOID_P _EVENT_SIZEOF_VOID__
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef _EVENT_HAVE_UINTPTR_T
|
#ifdef _EVENT_HAVE_UINTPTR_T
|
||||||
#define ev_uintptr_t uintptr_t
|
#define ev_uintptr_t uintptr_t
|
||||||
#define ev_intptr_t intptr_t
|
#define ev_intptr_t intptr_t
|
||||||
|
Loading…
x
Reference in New Issue
Block a user