Merge branch 'devel/compile-on-windows' into release/v1.2.0

This commit is contained in:
Willem Toorop 2017-09-20 15:40:31 +02:00
commit fbc1526f47
3 changed files with 33 additions and 4 deletions

View File

@ -233,7 +233,7 @@ esac
DEFAULT_EVENTLOOP=select_eventloop
AC_CHECK_HEADERS([sys/poll.h poll.h sys/resource.h],,, [AC_INCLUDES_DEFAULT])
AC_CHECK_HEADERS([sys/poll.h poll.h sys/resource.h sys/types.h],,, [AC_INCLUDES_DEFAULT])
AC_ARG_ENABLE(poll-eventloop, AC_HELP_STRING([--disable-poll-eventloop], [Disable default eventloop based on poll (default=enabled if available)]))
case "$enable_poll_eventloop" in
no)
@ -596,6 +596,28 @@ if test "$USE_WINSOCK" = 1; then
LIBS="$LIBS -lgdi32 -liphlpapi"
fi
dnl Check if -D_POSIX is needed for sigset_t
AC_CHECK_TYPE([sigset_t], [
AC_MSG_NOTICE(-D_POSIX is NOT needed for the sigset_t type)
], [
BACKCFLAGS="$CFLAGS"
CFLAGS="-D_POSIX $CFLAGS"
AC_CHECK_TYPE([sigset_t], [
AC_MSG_NOTICE(-D_POSIX is needed for the sigset_t type)
], [
AC_MSG_NOTICE(Unclear whether -D_POSIX is needed for the sigset_t type)
BACKCFLAGS="$CFLAGS"
], [AC_INCLUDES_DEFAULT
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
])
], [AC_INCLUDES_DEFAULT
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
])
my_with_libidn=1
AC_ARG_WITH(libidn, AS_HELP_STRING([--with-libidn=pathname],
@ -1332,10 +1354,13 @@ const char *inet_ntop(int af, const void *src, char *dst, size_t size);
#endif
#ifdef USE_WINSOCK
# ifndef _CUSTOM_VSNPRINTF
# define _CUSTOM_VSNPRINTF
static inline int _gldns_custom_vsnprintf(char *str, size_t size, const char *format, va_list ap)
{ int r = vsnprintf(str, size, format, ap); return r == -1 ? _vscprintf(format, ap) : r; }
# define vsnprintf _gldns_custom_vsnprintf
# endif
#endif
#ifdef __cplusplus
}
@ -1361,6 +1386,10 @@ static inline int _gldns_custom_vsnprintf(char *str, size_t size, const char *fo
#include <sys/select.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif

View File

@ -27,9 +27,9 @@
#include "config.h"
#include "extension/select_eventloop.h"
#include "debug.h"
#include "types-internal.h"
#include "extension/select_eventloop.h"
static uint64_t get_now_plus(uint64_t amount)
{

2
stubby

@ -1 +1 @@
Subproject commit 6114230904d9413514d521358ca7956aac99e822
Subproject commit 6d97f4323f2706a2dfcffc7172bd3f71223974a8