mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
Adjust more windows header includes
This commit is contained in:
parent
178afd81a9
commit
74ed5b5ebd
118
acinclude.m4
118
acinclude.m4
@ -9,7 +9,9 @@ AC_DEFUN([CURL_CHECK_HEADER_WINDOWS], [
|
|||||||
AC_COMPILE_IFELSE([
|
AC_COMPILE_IFELSE([
|
||||||
AC_LANG_PROGRAM([
|
AC_LANG_PROGRAM([
|
||||||
#undef inline
|
#undef inline
|
||||||
|
#ifndef WIN32_LEAN_AND_MEAN
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
#endif
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
],[
|
],[
|
||||||
int dummy=2*WINVER;
|
int dummy=2*WINVER;
|
||||||
@ -39,7 +41,9 @@ AC_DEFUN([CURL_CHECK_HEADER_WINSOCK], [
|
|||||||
AC_COMPILE_IFELSE([
|
AC_COMPILE_IFELSE([
|
||||||
AC_LANG_PROGRAM([
|
AC_LANG_PROGRAM([
|
||||||
#undef inline
|
#undef inline
|
||||||
|
#ifndef WIN32_LEAN_AND_MEAN
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
#endif
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <winsock.h>
|
#include <winsock.h>
|
||||||
],[
|
],[
|
||||||
@ -68,7 +72,9 @@ AC_DEFUN([CURL_CHECK_HEADER_WINSOCK2], [
|
|||||||
AC_COMPILE_IFELSE([
|
AC_COMPILE_IFELSE([
|
||||||
AC_LANG_PROGRAM([
|
AC_LANG_PROGRAM([
|
||||||
#undef inline
|
#undef inline
|
||||||
|
#ifndef WIN32_LEAN_AND_MEAN
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
#endif
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <winsock2.h>
|
#include <winsock2.h>
|
||||||
],[
|
],[
|
||||||
@ -97,7 +103,9 @@ AC_DEFUN([CURL_CHECK_HEADER_WS2TCPIP], [
|
|||||||
AC_COMPILE_IFELSE([
|
AC_COMPILE_IFELSE([
|
||||||
AC_LANG_PROGRAM([
|
AC_LANG_PROGRAM([
|
||||||
#undef inline
|
#undef inline
|
||||||
|
#ifndef WIN32_LEAN_AND_MEAN
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
#endif
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <winsock2.h>
|
#include <winsock2.h>
|
||||||
#include <ws2tcpip.h>
|
#include <ws2tcpip.h>
|
||||||
@ -134,7 +142,9 @@ AC_DEFUN([CURL_CHECK_TYPE_SOCKLEN_T], [
|
|||||||
AC_LANG_PROGRAM([
|
AC_LANG_PROGRAM([
|
||||||
#undef inline
|
#undef inline
|
||||||
#ifdef HAVE_WINDOWS_H
|
#ifdef HAVE_WINDOWS_H
|
||||||
|
#ifndef WIN32_LEAN_AND_MEAN
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
#endif
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#ifdef HAVE_WINSOCK2_H
|
#ifdef HAVE_WINSOCK2_H
|
||||||
#include <winsock2.h>
|
#include <winsock2.h>
|
||||||
@ -170,10 +180,18 @@ AC_DEFUN([CURL_CHECK_TYPE_SOCKLEN_T], [
|
|||||||
[type to use in place of socklen_t if not defined])
|
[type to use in place of socklen_t if not defined])
|
||||||
fi
|
fi
|
||||||
],[
|
],[
|
||||||
|
#undef inline
|
||||||
#ifdef HAVE_WINDOWS_H
|
#ifdef HAVE_WINDOWS_H
|
||||||
|
#ifndef WIN32_LEAN_AND_MEAN
|
||||||
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
#endif
|
||||||
|
#include <windows.h>
|
||||||
|
#ifdef HAVE_WINSOCK2_H
|
||||||
|
#include <winsock2.h>
|
||||||
#ifdef HAVE_WS2TCPIP_H
|
#ifdef HAVE_WS2TCPIP_H
|
||||||
#include <ws2tcpip.h>
|
#include <ws2tcpip.h>
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
#ifdef HAVE_SYS_TYPES_H
|
#ifdef HAVE_SYS_TYPES_H
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
@ -210,18 +228,16 @@ AC_DEFUN([CURL_FUNC_GETNAMEINFO_ARGTYPES], [
|
|||||||
AC_LANG_PROGRAM([
|
AC_LANG_PROGRAM([
|
||||||
#undef inline
|
#undef inline
|
||||||
#ifdef HAVE_WINDOWS_H
|
#ifdef HAVE_WINDOWS_H
|
||||||
|
#ifndef WIN32_LEAN_AND_MEAN
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#if defined(__MINGW32__) && ( (!defined(_WIN32_WINNT)) || (_WIN32_WINNT < 0x0501) )
|
|
||||||
#undef _WIN32_WINNT
|
|
||||||
#define _WIN32_WINNT 0x0501
|
|
||||||
#endif
|
#endif
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#ifdef HAVE_WINSOCK2_H
|
#ifdef HAVE_WINSOCK2_H
|
||||||
#include <winsock2.h>
|
#include <winsock2.h>
|
||||||
#endif
|
|
||||||
#ifdef HAVE_WS2TCPIP_H
|
#ifdef HAVE_WS2TCPIP_H
|
||||||
#include <ws2tcpip.h>
|
#include <ws2tcpip.h>
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
#ifdef HAVE_SYS_TYPES_H
|
#ifdef HAVE_SYS_TYPES_H
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
@ -272,6 +288,8 @@ AC_DEFUN([CURL_FUNC_GETNAMEINFO_ARGTYPES], [
|
|||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
dnl CURL_CHECK_NONBLOCKING_SOCKET
|
||||||
|
dnl -------------------------------------------------
|
||||||
dnl Check for how to set a socket to non-blocking state. There seems to exist
|
dnl Check for how to set a socket to non-blocking state. There seems to exist
|
||||||
dnl four known different ways, with the one used almost everywhere being POSIX
|
dnl four known different ways, with the one used almost everywhere being POSIX
|
||||||
dnl and XPG3, while the other different ways for different systems (old BSD,
|
dnl and XPG3, while the other different ways for different systems (old BSD,
|
||||||
@ -333,8 +351,21 @@ dnl FIONBIO test was also bad
|
|||||||
dnl the code was bad, try a different program now, test 3
|
dnl the code was bad, try a different program now, test 3
|
||||||
|
|
||||||
AC_TRY_COMPILE([
|
AC_TRY_COMPILE([
|
||||||
/* headers for ioctlsocket test (cygwin?) */
|
/* headers for ioctlsocket test (Windows) */
|
||||||
|
#undef inline
|
||||||
|
#ifdef HAVE_WINDOWS_H
|
||||||
|
#ifndef WIN32_LEAN_AND_MEAN
|
||||||
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
#endif
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
#ifdef HAVE_WINSOCK2_H
|
||||||
|
#include <winsock2.h>
|
||||||
|
#else
|
||||||
|
#ifdef HAVE_WINSOCK_H
|
||||||
|
#include <winsock.h>
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
],[
|
],[
|
||||||
/* ioctlsocket source code */
|
/* ioctlsocket source code */
|
||||||
int socket;
|
int socket;
|
||||||
@ -396,6 +427,9 @@ dnl end of non-blocking try-compile test
|
|||||||
fi
|
fi
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
dnl TYPE_SOCKADDR_STORAGE
|
||||||
|
dnl -------------------------------------------------
|
||||||
dnl Check for struct sockaddr_storage. Most IPv6-enabled hosts have it, but
|
dnl Check for struct sockaddr_storage. Most IPv6-enabled hosts have it, but
|
||||||
dnl AIX 4.3 is one known exception.
|
dnl AIX 4.3 is one known exception.
|
||||||
AC_DEFUN([TYPE_SOCKADDR_STORAGE],
|
AC_DEFUN([TYPE_SOCKADDR_STORAGE],
|
||||||
@ -404,6 +438,16 @@ AC_DEFUN([TYPE_SOCKADDR_STORAGE],
|
|||||||
AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE, 1,
|
AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE, 1,
|
||||||
[if struct sockaddr_storage is defined]), ,
|
[if struct sockaddr_storage is defined]), ,
|
||||||
[
|
[
|
||||||
|
#undef inline
|
||||||
|
#ifdef HAVE_WINDOWS_H
|
||||||
|
#ifndef WIN32_LEAN_AND_MEAN
|
||||||
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
#endif
|
||||||
|
#include <windows.h>
|
||||||
|
#ifdef HAVE_WINSOCK2_H
|
||||||
|
#include <winsock2.h>
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
#ifdef HAVE_SYS_TYPES_H
|
#ifdef HAVE_SYS_TYPES_H
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#endif
|
#endif
|
||||||
@ -416,14 +460,13 @@ AC_DEFUN([TYPE_SOCKADDR_STORAGE],
|
|||||||
#ifdef HAVE_ARPA_INET_H
|
#ifdef HAVE_ARPA_INET_H
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_WINSOCK2_H
|
|
||||||
#include <winsock2.h>
|
|
||||||
#endif
|
#endif
|
||||||
])
|
])
|
||||||
|
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
dnl TYPE_IN_ADDR_T
|
||||||
|
dnl -------------------------------------------------
|
||||||
dnl Check for in_addr_t: it is used to receive the return code of inet_addr()
|
dnl Check for in_addr_t: it is used to receive the return code of inet_addr()
|
||||||
dnl and a few other things.
|
dnl and a few other things.
|
||||||
AC_DEFUN([TYPE_IN_ADDR_T],
|
AC_DEFUN([TYPE_IN_ADDR_T],
|
||||||
@ -435,15 +478,30 @@ AC_DEFUN([TYPE_IN_ADDR_T],
|
|||||||
curl_cv_in_addr_t_equiv=
|
curl_cv_in_addr_t_equiv=
|
||||||
for t in "unsigned long" int size_t unsigned long; do
|
for t in "unsigned long" int size_t unsigned long; do
|
||||||
AC_TRY_COMPILE([
|
AC_TRY_COMPILE([
|
||||||
#ifdef HAVE_SYS_TYPES_H
|
#undef inline
|
||||||
#include <sys/types.h>
|
#ifdef HAVE_WINDOWS_H
|
||||||
#endif
|
#ifndef WIN32_LEAN_AND_MEAN
|
||||||
#ifdef HAVE_SYS_SOCKET_H
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#include <sys/socket.h>
|
#endif
|
||||||
#endif
|
#include <windows.h>
|
||||||
#ifdef HAVE_ARPA_INET_H
|
#ifdef HAVE_WINSOCK2_H
|
||||||
#include <arpa/inet.h>
|
#include <winsock2.h>
|
||||||
#endif
|
#else
|
||||||
|
#ifdef HAVE_WINSOCK_H
|
||||||
|
#include <winsock.h>
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
#ifdef HAVE_SYS_TYPES_H
|
||||||
|
#include <sys/types.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_SYS_SOCKET_H
|
||||||
|
#include <sys/socket.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_NETINET_IN_H
|
||||||
|
#include <netinet/in.h>
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
],[
|
],[
|
||||||
$t data = inet_addr ("1.2.3.4");
|
$t data = inet_addr ("1.2.3.4");
|
||||||
],[
|
],[
|
||||||
@ -459,9 +517,31 @@ AC_DEFUN([TYPE_IN_ADDR_T],
|
|||||||
AC_MSG_RESULT($curl_cv_in_addr_t_equiv)
|
AC_MSG_RESULT($curl_cv_in_addr_t_equiv)
|
||||||
AC_DEFINE_UNQUOTED(in_addr_t, $curl_cv_in_addr_t_equiv,
|
AC_DEFINE_UNQUOTED(in_addr_t, $curl_cv_in_addr_t_equiv,
|
||||||
[type to use in place of in_addr_t if not defined])],
|
[type to use in place of in_addr_t if not defined])],
|
||||||
[#include <sys/types.h>
|
[
|
||||||
|
#undef inline
|
||||||
|
#ifdef HAVE_WINDOWS_H
|
||||||
|
#ifndef WIN32_LEAN_AND_MEAN
|
||||||
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
#endif
|
||||||
|
#include <windows.h>
|
||||||
|
#ifdef HAVE_WINSOCK2_H
|
||||||
|
#include <winsock2.h>
|
||||||
|
#else
|
||||||
|
#ifdef HAVE_WINSOCK_H
|
||||||
|
#include <winsock.h>
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
#ifdef HAVE_SYS_TYPES_H
|
||||||
|
#include <sys/types.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_SYS_SOCKET_H
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <arpa/inet.h>])
|
#endif
|
||||||
|
#ifdef HAVE_NETINET_IN_H
|
||||||
|
#include <netinet/in.h>
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
])
|
])
|
||||||
|
|
||||||
dnl ************************************************************
|
dnl ************************************************************
|
||||||
|
@ -9,7 +9,9 @@ AC_DEFUN([CURL_CHECK_HEADER_WINDOWS], [
|
|||||||
AC_COMPILE_IFELSE([
|
AC_COMPILE_IFELSE([
|
||||||
AC_LANG_PROGRAM([
|
AC_LANG_PROGRAM([
|
||||||
#undef inline
|
#undef inline
|
||||||
|
#ifndef WIN32_LEAN_AND_MEAN
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
#endif
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
],[
|
],[
|
||||||
int dummy=2*WINVER;
|
int dummy=2*WINVER;
|
||||||
@ -39,7 +41,9 @@ AC_DEFUN([CURL_CHECK_HEADER_WINSOCK], [
|
|||||||
AC_COMPILE_IFELSE([
|
AC_COMPILE_IFELSE([
|
||||||
AC_LANG_PROGRAM([
|
AC_LANG_PROGRAM([
|
||||||
#undef inline
|
#undef inline
|
||||||
|
#ifndef WIN32_LEAN_AND_MEAN
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
#endif
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <winsock.h>
|
#include <winsock.h>
|
||||||
],[
|
],[
|
||||||
@ -68,7 +72,9 @@ AC_DEFUN([CURL_CHECK_HEADER_WINSOCK2], [
|
|||||||
AC_COMPILE_IFELSE([
|
AC_COMPILE_IFELSE([
|
||||||
AC_LANG_PROGRAM([
|
AC_LANG_PROGRAM([
|
||||||
#undef inline
|
#undef inline
|
||||||
|
#ifndef WIN32_LEAN_AND_MEAN
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
#endif
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <winsock2.h>
|
#include <winsock2.h>
|
||||||
],[
|
],[
|
||||||
@ -97,7 +103,9 @@ AC_DEFUN([CURL_CHECK_HEADER_WS2TCPIP], [
|
|||||||
AC_COMPILE_IFELSE([
|
AC_COMPILE_IFELSE([
|
||||||
AC_LANG_PROGRAM([
|
AC_LANG_PROGRAM([
|
||||||
#undef inline
|
#undef inline
|
||||||
|
#ifndef WIN32_LEAN_AND_MEAN
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
#endif
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <winsock2.h>
|
#include <winsock2.h>
|
||||||
#include <ws2tcpip.h>
|
#include <ws2tcpip.h>
|
||||||
@ -134,7 +142,9 @@ AC_DEFUN([CURL_CHECK_TYPE_SOCKLEN_T], [
|
|||||||
AC_LANG_PROGRAM([
|
AC_LANG_PROGRAM([
|
||||||
#undef inline
|
#undef inline
|
||||||
#ifdef HAVE_WINDOWS_H
|
#ifdef HAVE_WINDOWS_H
|
||||||
|
#ifndef WIN32_LEAN_AND_MEAN
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
#endif
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#ifdef HAVE_WINSOCK2_H
|
#ifdef HAVE_WINSOCK2_H
|
||||||
#include <winsock2.h>
|
#include <winsock2.h>
|
||||||
@ -170,10 +180,18 @@ AC_DEFUN([CURL_CHECK_TYPE_SOCKLEN_T], [
|
|||||||
[type to use in place of socklen_t if not defined])
|
[type to use in place of socklen_t if not defined])
|
||||||
fi
|
fi
|
||||||
],[
|
],[
|
||||||
|
#undef inline
|
||||||
#ifdef HAVE_WINDOWS_H
|
#ifdef HAVE_WINDOWS_H
|
||||||
|
#ifndef WIN32_LEAN_AND_MEAN
|
||||||
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
#endif
|
||||||
|
#include <windows.h>
|
||||||
|
#ifdef HAVE_WINSOCK2_H
|
||||||
|
#include <winsock2.h>
|
||||||
#ifdef HAVE_WS2TCPIP_H
|
#ifdef HAVE_WS2TCPIP_H
|
||||||
#include <ws2tcpip.h>
|
#include <ws2tcpip.h>
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
#ifdef HAVE_SYS_TYPES_H
|
#ifdef HAVE_SYS_TYPES_H
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
@ -210,18 +228,16 @@ AC_DEFUN([CURL_FUNC_GETNAMEINFO_ARGTYPES], [
|
|||||||
AC_LANG_PROGRAM([
|
AC_LANG_PROGRAM([
|
||||||
#undef inline
|
#undef inline
|
||||||
#ifdef HAVE_WINDOWS_H
|
#ifdef HAVE_WINDOWS_H
|
||||||
|
#ifndef WIN32_LEAN_AND_MEAN
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#if defined(__MINGW32__) && ( (!defined(_WIN32_WINNT)) || (_WIN32_WINNT < 0x0501) )
|
|
||||||
#undef _WIN32_WINNT
|
|
||||||
#define _WIN32_WINNT 0x0501
|
|
||||||
#endif
|
#endif
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#ifdef HAVE_WINSOCK2_H
|
#ifdef HAVE_WINSOCK2_H
|
||||||
#include <winsock2.h>
|
#include <winsock2.h>
|
||||||
#endif
|
|
||||||
#ifdef HAVE_WS2TCPIP_H
|
#ifdef HAVE_WS2TCPIP_H
|
||||||
#include <ws2tcpip.h>
|
#include <ws2tcpip.h>
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
#ifdef HAVE_SYS_TYPES_H
|
#ifdef HAVE_SYS_TYPES_H
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
@ -272,6 +288,8 @@ AC_DEFUN([CURL_FUNC_GETNAMEINFO_ARGTYPES], [
|
|||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
dnl CURL_CHECK_NONBLOCKING_SOCKET
|
||||||
|
dnl -------------------------------------------------
|
||||||
dnl Check for how to set a socket to non-blocking state. There seems to exist
|
dnl Check for how to set a socket to non-blocking state. There seems to exist
|
||||||
dnl four known different ways, with the one used almost everywhere being POSIX
|
dnl four known different ways, with the one used almost everywhere being POSIX
|
||||||
dnl and XPG3, while the other different ways for different systems (old BSD,
|
dnl and XPG3, while the other different ways for different systems (old BSD,
|
||||||
@ -333,8 +351,21 @@ dnl FIONBIO test was also bad
|
|||||||
dnl the code was bad, try a different program now, test 3
|
dnl the code was bad, try a different program now, test 3
|
||||||
|
|
||||||
AC_TRY_COMPILE([
|
AC_TRY_COMPILE([
|
||||||
/* headers for ioctlsocket test (cygwin?) */
|
/* headers for ioctlsocket test (Windows) */
|
||||||
|
#undef inline
|
||||||
|
#ifdef HAVE_WINDOWS_H
|
||||||
|
#ifndef WIN32_LEAN_AND_MEAN
|
||||||
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
#endif
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
#ifdef HAVE_WINSOCK2_H
|
||||||
|
#include <winsock2.h>
|
||||||
|
#else
|
||||||
|
#ifdef HAVE_WINSOCK_H
|
||||||
|
#include <winsock.h>
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
],[
|
],[
|
||||||
/* ioctlsocket source code */
|
/* ioctlsocket source code */
|
||||||
int socket;
|
int socket;
|
||||||
@ -396,6 +427,124 @@ dnl end of non-blocking try-compile test
|
|||||||
fi
|
fi
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
dnl TYPE_SOCKADDR_STORAGE
|
||||||
|
dnl -------------------------------------------------
|
||||||
|
dnl Check for struct sockaddr_storage. Most IPv6-enabled hosts have it, but
|
||||||
|
dnl AIX 4.3 is one known exception.
|
||||||
|
AC_DEFUN([TYPE_SOCKADDR_STORAGE],
|
||||||
|
[
|
||||||
|
AC_CHECK_TYPE([struct sockaddr_storage],
|
||||||
|
AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE, 1,
|
||||||
|
[if struct sockaddr_storage is defined]), ,
|
||||||
|
[
|
||||||
|
#undef inline
|
||||||
|
#ifdef HAVE_WINDOWS_H
|
||||||
|
#ifndef WIN32_LEAN_AND_MEAN
|
||||||
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
#endif
|
||||||
|
#include <windows.h>
|
||||||
|
#ifdef HAVE_WINSOCK2_H
|
||||||
|
#include <winsock2.h>
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
#ifdef HAVE_SYS_TYPES_H
|
||||||
|
#include <sys/types.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_SYS_SOCKET_H
|
||||||
|
#include <sys/socket.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_NETINET_IN_H
|
||||||
|
#include <netinet/in.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_ARPA_INET_H
|
||||||
|
#include <arpa/inet.h>
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
])
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
|
dnl TYPE_IN_ADDR_T
|
||||||
|
dnl -------------------------------------------------
|
||||||
|
dnl Check for in_addr_t: it is used to receive the return code of inet_addr()
|
||||||
|
dnl and a few other things.
|
||||||
|
AC_DEFUN([TYPE_IN_ADDR_T],
|
||||||
|
[
|
||||||
|
AC_CHECK_TYPE([in_addr_t], ,[
|
||||||
|
AC_MSG_CHECKING([for in_addr_t equivalent])
|
||||||
|
AC_CACHE_VAL([curl_cv_in_addr_t_equiv],
|
||||||
|
[
|
||||||
|
curl_cv_in_addr_t_equiv=
|
||||||
|
for t in "unsigned long" int size_t unsigned long; do
|
||||||
|
AC_TRY_COMPILE([
|
||||||
|
#undef inline
|
||||||
|
#ifdef HAVE_WINDOWS_H
|
||||||
|
#ifndef WIN32_LEAN_AND_MEAN
|
||||||
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
#endif
|
||||||
|
#include <windows.h>
|
||||||
|
#ifdef HAVE_WINSOCK2_H
|
||||||
|
#include <winsock2.h>
|
||||||
|
#else
|
||||||
|
#ifdef HAVE_WINSOCK_H
|
||||||
|
#include <winsock.h>
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
#ifdef HAVE_SYS_TYPES_H
|
||||||
|
#include <sys/types.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_SYS_SOCKET_H
|
||||||
|
#include <sys/socket.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_NETINET_IN_H
|
||||||
|
#include <netinet/in.h>
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
],[
|
||||||
|
$t data = inet_addr ("1.2.3.4");
|
||||||
|
],[
|
||||||
|
curl_cv_in_addr_t_equiv="$t"
|
||||||
|
break
|
||||||
|
])
|
||||||
|
done
|
||||||
|
|
||||||
|
if test "x$curl_cv_in_addr_t_equiv" = x; then
|
||||||
|
AC_MSG_ERROR([Cannot find a type to use in place of in_addr_t])
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
AC_MSG_RESULT($curl_cv_in_addr_t_equiv)
|
||||||
|
AC_DEFINE_UNQUOTED(in_addr_t, $curl_cv_in_addr_t_equiv,
|
||||||
|
[type to use in place of in_addr_t if not defined])],
|
||||||
|
[
|
||||||
|
#undef inline
|
||||||
|
#ifdef HAVE_WINDOWS_H
|
||||||
|
#ifndef WIN32_LEAN_AND_MEAN
|
||||||
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
#endif
|
||||||
|
#include <windows.h>
|
||||||
|
#ifdef HAVE_WINSOCK2_H
|
||||||
|
#include <winsock2.h>
|
||||||
|
#else
|
||||||
|
#ifdef HAVE_WINSOCK_H
|
||||||
|
#include <winsock.h>
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
#ifdef HAVE_SYS_TYPES_H
|
||||||
|
#include <sys/types.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_SYS_SOCKET_H
|
||||||
|
#include <sys/socket.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_NETINET_IN_H
|
||||||
|
#include <netinet/in.h>
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
dnl We create a function for detecting which compiler we use and then set as
|
dnl We create a function for detecting which compiler we use and then set as
|
||||||
dnl pendantic compiler options as possible for that particular compiler. The
|
dnl pendantic compiler options as possible for that particular compiler. The
|
||||||
dnl options are only used for debug-builds.
|
dnl options are only used for debug-builds.
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
dnl Process this file with autoconf to produce a configure script.
|
dnl Process this file with autoconf to produce a configure script.
|
||||||
AC_INIT(ares_init.c)
|
AC_INIT(ares_init.c)
|
||||||
AM_CONFIG_HEADER(config.h)
|
AM_CONFIG_HEADER(config.h)
|
||||||
@ -13,13 +14,15 @@ solaris*)
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# check for ssize_t
|
|
||||||
AC_CHECK_TYPE(ssize_t, ,
|
|
||||||
AC_DEFINE(ssize_t, int, [the signed version of size_t]))
|
|
||||||
|
|
||||||
AC_SEARCH_LIBS(gethostbyname, nsl)
|
AC_SEARCH_LIBS(gethostbyname, nsl)
|
||||||
AC_SEARCH_LIBS(socket, socket)
|
AC_SEARCH_LIBS(socket, socket)
|
||||||
|
|
||||||
|
dnl check for cygwin stuff
|
||||||
|
AC_LIBTOOL_WIN32_DLL
|
||||||
|
|
||||||
|
dnl libtool setup
|
||||||
|
AC_PROG_LIBTOOL
|
||||||
|
|
||||||
dnl ************************************************************
|
dnl ************************************************************
|
||||||
dnl Option to switch on debug options. This makes an assumption that
|
dnl Option to switch on debug options. This makes an assumption that
|
||||||
dnl this is built as an 'ares' subdir in the curl source tree. Subject for
|
dnl this is built as an 'ares' subdir in the curl source tree. Subject for
|
||||||
@ -38,9 +41,6 @@ AC_HELP_STRING([--disable-debug],[Disable debug options]),
|
|||||||
dnl when doing the debug stuff, use static library only
|
dnl when doing the debug stuff, use static library only
|
||||||
AC_DISABLE_SHARED
|
AC_DISABLE_SHARED
|
||||||
|
|
||||||
dnl Checks for standard header files, to make memdebug.h inclusions bettter
|
|
||||||
AC_HEADER_STDC
|
|
||||||
|
|
||||||
dnl the entire --enable-debug is a hack that lives and runs on top of
|
dnl the entire --enable-debug is a hack that lives and runs on top of
|
||||||
dnl libcurl stuff so this BUILDING_LIBCURL is not THAT much uglier
|
dnl libcurl stuff so this BUILDING_LIBCURL is not THAT much uglier
|
||||||
AC_DEFINE(BUILDING_LIBCURL, 1, [when building as static part of libcurl])
|
AC_DEFINE(BUILDING_LIBCURL, 1, [when building as static part of libcurl])
|
||||||
@ -57,7 +57,8 @@ AC_HELP_STRING([--disable-debug],[Disable debug options]),
|
|||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
)
|
)
|
||||||
|
|
||||||
AC_PROG_LIBTOOL
|
dnl Checks for header files.
|
||||||
|
AC_HEADER_STDC
|
||||||
|
|
||||||
dnl **********************************************************************
|
dnl **********************************************************************
|
||||||
dnl Make sure that our checks for headers windows.h winsock.h winsock2.h
|
dnl Make sure that our checks for headers windows.h winsock.h winsock2.h
|
||||||
@ -83,11 +84,19 @@ AC_CHECK_HEADERS(
|
|||||||
net/if.h \
|
net/if.h \
|
||||||
arpa/nameser.h \
|
arpa/nameser.h \
|
||||||
arpa/nameser_compat.h \
|
arpa/nameser_compat.h \
|
||||||
arpa/inet.h, , ,
|
arpa/inet.h,
|
||||||
|
dnl to do if not found
|
||||||
|
[],
|
||||||
|
dnl to do if found
|
||||||
|
[],
|
||||||
|
dnl default includes
|
||||||
[
|
[
|
||||||
#ifdef HAVE_SYS_TYPES_H
|
#ifdef HAVE_SYS_TYPES_H
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef HAVE_SYS_TIME_H
|
||||||
|
#include <sys/time.h>
|
||||||
|
#endif
|
||||||
dnl We do this default-include simply to make sure that the nameser_compat.h
|
dnl We do this default-include simply to make sure that the nameser_compat.h
|
||||||
dnl header *REALLY* can be include after the new nameser.h. It seems AIX 5.1
|
dnl header *REALLY* can be include after the new nameser.h. It seems AIX 5.1
|
||||||
dnl (and others?) is not designed to allow this.
|
dnl (and others?) is not designed to allow this.
|
||||||
@ -99,28 +108,72 @@ dnl *Sigh* these are needed in order for net/if.h to get properly detected.
|
|||||||
#ifdef HAVE_SYS_SOCKET_H
|
#ifdef HAVE_SYS_SOCKET_H
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_WINSOCK2_H
|
#ifdef HAVE_NETINET_IN_H
|
||||||
#include <winsock2.h>
|
#include <netinet/in.h>
|
||||||
#endif
|
#endif
|
||||||
]
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||||
|
AC_C_CONST
|
||||||
|
AC_TYPE_SIZE_T
|
||||||
|
AC_HEADER_TIME
|
||||||
|
|
||||||
|
AC_CHECK_SIZEOF(curl_off_t, ,[
|
||||||
|
#include <stdio.h>
|
||||||
|
#include "$srcdir/include/curl/curl.h"
|
||||||
|
])
|
||||||
|
AC_CHECK_SIZEOF(size_t)
|
||||||
|
AC_CHECK_SIZEOF(long)
|
||||||
|
AC_CHECK_SIZEOF(time_t)
|
||||||
|
|
||||||
|
AC_CHECK_TYPE(long long,
|
||||||
|
[AC_DEFINE(HAVE_LONGLONG, 1, [if your compiler supports long long])]
|
||||||
|
longlong="yes"
|
||||||
|
)
|
||||||
|
|
||||||
|
if test "xyes" = "x$longlong"; then
|
||||||
|
AC_MSG_CHECKING([if numberLL works])
|
||||||
|
AC_COMPILE_IFELSE([long long val = 1000LL;],
|
||||||
|
[AC_DEFINE(HAVE_LL, 1, [if your compiler supports LL])]
|
||||||
|
AC_MSG_RESULT(yes),
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
)
|
)
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# check for ssize_t
|
||||||
|
AC_CHECK_TYPE(ssize_t, ,
|
||||||
|
AC_DEFINE(ssize_t, int, [the signed version of size_t]))
|
||||||
|
|
||||||
# Check for socklen_t or equivalent
|
# Check for socklen_t or equivalent
|
||||||
CURL_CHECK_TYPE_SOCKLEN_T
|
CURL_CHECK_TYPE_SOCKLEN_T
|
||||||
|
|
||||||
|
TYPE_IN_ADDR_T
|
||||||
|
|
||||||
|
TYPE_SOCKADDR_STORAGE
|
||||||
|
|
||||||
|
|
||||||
dnl check for AF_INET6
|
dnl check for AF_INET6
|
||||||
CARES_CHECK_CONSTANT(
|
CARES_CHECK_CONSTANT(
|
||||||
[
|
[
|
||||||
|
#undef inline
|
||||||
|
#ifdef HAVE_WINDOWS_H
|
||||||
|
#ifndef WIN32_LEAN_AND_MEAN
|
||||||
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
#endif
|
||||||
|
#include <windows.h>
|
||||||
|
#ifdef HAVE_WINSOCK2_H
|
||||||
|
#include <winsock2.h>
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
#ifdef HAVE_SYS_TYPES_H
|
#ifdef HAVE_SYS_TYPES_H
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_SYS_SOCKET_H
|
#ifdef HAVE_SYS_SOCKET_H
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_WINSOCK2_H
|
|
||||||
#include <winsock2.h>
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
], [PF_INET6],
|
], [PF_INET6],
|
||||||
AC_DEFINE_UNQUOTED(HAVE_PF_INET6,1,[Define to 1 if you have PF_INET6.])
|
AC_DEFINE_UNQUOTED(HAVE_PF_INET6,1,[Define to 1 if you have PF_INET6.])
|
||||||
)
|
)
|
||||||
@ -128,16 +181,23 @@ CARES_CHECK_CONSTANT(
|
|||||||
dnl check for PF_INET6
|
dnl check for PF_INET6
|
||||||
CARES_CHECK_CONSTANT(
|
CARES_CHECK_CONSTANT(
|
||||||
[
|
[
|
||||||
|
#undef inline
|
||||||
|
#ifdef HAVE_WINDOWS_H
|
||||||
|
#ifndef WIN32_LEAN_AND_MEAN
|
||||||
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
#endif
|
||||||
|
#include <windows.h>
|
||||||
|
#ifdef HAVE_WINSOCK2_H
|
||||||
|
#include <winsock2.h>
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
#ifdef HAVE_SYS_TYPES_H
|
#ifdef HAVE_SYS_TYPES_H
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_SYS_SOCKET_H
|
#ifdef HAVE_SYS_SOCKET_H
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_WINSOCK2_H
|
|
||||||
#include <winsock2.h>
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
], [AF_INET6],
|
], [AF_INET6],
|
||||||
AC_DEFINE_UNQUOTED(HAVE_AF_INET6,1,[Define to 1 if you have AF_INET6.])
|
AC_DEFINE_UNQUOTED(HAVE_AF_INET6,1,[Define to 1 if you have AF_INET6.])
|
||||||
)
|
)
|
||||||
@ -146,17 +206,25 @@ CARES_CHECK_CONSTANT(
|
|||||||
dnl check for the in6_addr structure
|
dnl check for the in6_addr structure
|
||||||
CARES_CHECK_STRUCT(
|
CARES_CHECK_STRUCT(
|
||||||
[
|
[
|
||||||
#ifdef HAVE_SYS_TYPES_H
|
#undef inline
|
||||||
#include <sys/types.h>
|
#ifdef HAVE_WINDOWS_H
|
||||||
|
#ifndef WIN32_LEAN_AND_MEAN
|
||||||
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#endif
|
#endif
|
||||||
|
#include <windows.h>
|
||||||
#ifdef HAVE_WINSOCK2_H
|
#ifdef HAVE_WINSOCK2_H
|
||||||
#include <winsock2.h>
|
#include <winsock2.h>
|
||||||
#endif
|
|
||||||
#ifdef HAVE_WS2TCPIP_H
|
#ifdef HAVE_WS2TCPIP_H
|
||||||
#include <ws2tcpip.h>
|
#include <ws2tcpip.h>
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
#ifdef HAVE_SYS_TYPES_H
|
||||||
|
#include <sys/types.h>
|
||||||
|
#endif
|
||||||
#ifdef HAVE_NETINET_IN_H
|
#ifdef HAVE_NETINET_IN_H
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
], [in6_addr],
|
], [in6_addr],
|
||||||
AC_DEFINE_UNQUOTED(HAVE_STRUCT_IN6_ADDR,1,[Define to 1 if you have struct in6_addr.])
|
AC_DEFINE_UNQUOTED(HAVE_STRUCT_IN6_ADDR,1,[Define to 1 if you have struct in6_addr.])
|
||||||
@ -165,17 +233,25 @@ CARES_CHECK_STRUCT(
|
|||||||
dnl check for the sockaddr_in6 structure
|
dnl check for the sockaddr_in6 structure
|
||||||
CARES_CHECK_STRUCT(
|
CARES_CHECK_STRUCT(
|
||||||
[
|
[
|
||||||
#ifdef HAVE_SYS_TYPES_H
|
#undef inline
|
||||||
#include <sys/types.h>
|
#ifdef HAVE_WINDOWS_H
|
||||||
|
#ifndef WIN32_LEAN_AND_MEAN
|
||||||
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#endif
|
#endif
|
||||||
|
#include <windows.h>
|
||||||
#ifdef HAVE_WINSOCK2_H
|
#ifdef HAVE_WINSOCK2_H
|
||||||
#include <winsock2.h>
|
#include <winsock2.h>
|
||||||
#endif
|
|
||||||
#ifdef HAVE_WS2TCPIP_H
|
#ifdef HAVE_WS2TCPIP_H
|
||||||
#include <ws2tcpip.h>
|
#include <ws2tcpip.h>
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
#ifdef HAVE_SYS_TYPES_H
|
||||||
|
#include <sys/types.h>
|
||||||
|
#endif
|
||||||
#ifdef HAVE_NETINET_IN_H
|
#ifdef HAVE_NETINET_IN_H
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
], [sockaddr_in6],
|
], [sockaddr_in6],
|
||||||
AC_DEFINE_UNQUOTED(HAVE_STRUCT_SOCKADDR_IN6,1,
|
AC_DEFINE_UNQUOTED(HAVE_STRUCT_SOCKADDR_IN6,1,
|
||||||
@ -187,17 +263,25 @@ AC_CHECK_MEMBER(struct sockaddr_in6.sin6_scope_id,
|
|||||||
[Define to 1 if your struct sockaddr_in6 has sin6_scope_id.])
|
[Define to 1 if your struct sockaddr_in6 has sin6_scope_id.])
|
||||||
, ,
|
, ,
|
||||||
[
|
[
|
||||||
#ifdef HAVE_SYS_TYPES_H
|
#undef inline
|
||||||
#include <sys/types.h>
|
#ifdef HAVE_WINDOWS_H
|
||||||
|
#ifndef WIN32_LEAN_AND_MEAN
|
||||||
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#endif
|
#endif
|
||||||
|
#include <windows.h>
|
||||||
#ifdef HAVE_WINSOCK2_H
|
#ifdef HAVE_WINSOCK2_H
|
||||||
#include <winsock2.h>
|
#include <winsock2.h>
|
||||||
#endif
|
|
||||||
#ifdef HAVE_WS2TCPIP_H
|
#ifdef HAVE_WS2TCPIP_H
|
||||||
#include <ws2tcpip.h>
|
#include <ws2tcpip.h>
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
#ifdef HAVE_SYS_TYPES_H
|
||||||
|
#include <sys/types.h>
|
||||||
|
#endif
|
||||||
#ifdef HAVE_NETINET_IN_H
|
#ifdef HAVE_NETINET_IN_H
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
])
|
])
|
||||||
|
|
||||||
@ -206,15 +290,22 @@ AC_CHECK_MEMBER(struct addrinfo.ai_flags,
|
|||||||
AC_DEFINE_UNQUOTED(HAVE_STRUCT_ADDRINFO,1,
|
AC_DEFINE_UNQUOTED(HAVE_STRUCT_ADDRINFO,1,
|
||||||
[Define to 1 if you have struct addrinfo.]),,
|
[Define to 1 if you have struct addrinfo.]),,
|
||||||
[
|
[
|
||||||
#ifdef HAVE_SYS_TYPES_H
|
#undef inline
|
||||||
#include <sys/types.h>
|
#ifdef HAVE_WINDOWS_H
|
||||||
|
#ifndef WIN32_LEAN_AND_MEAN
|
||||||
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_WINSOCaK2_H
|
#include <windows.h>
|
||||||
|
#ifdef HAVE_WINSOCK2_H
|
||||||
#include <winsock2.h>
|
#include <winsock2.h>
|
||||||
#endif
|
|
||||||
#ifdef HAVE_WS2TCPIP_H
|
#ifdef HAVE_WS2TCPIP_H
|
||||||
#include <ws2tcpip.h>
|
#include <ws2tcpip.h>
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
#ifdef HAVE_SYS_TYPES_H
|
||||||
|
#include <sys/types.h>
|
||||||
|
#endif
|
||||||
#ifdef HAVE_NETINET_IN_H
|
#ifdef HAVE_NETINET_IN_H
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#endif
|
#endif
|
||||||
@ -223,6 +314,7 @@ AC_CHECK_MEMBER(struct addrinfo.ai_flags,
|
|||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_NETDB_H
|
#ifdef HAVE_NETDB_H
|
||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
@ -254,14 +346,26 @@ if test "$ac_cv_func_getnameinfo" = "no"; then
|
|||||||
AC_TRY_LINK([
|
AC_TRY_LINK([
|
||||||
#undef inline
|
#undef inline
|
||||||
#ifdef HAVE_WINDOWS_H
|
#ifdef HAVE_WINDOWS_H
|
||||||
|
#ifndef WIN32_LEAN_AND_MEAN
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
#endif
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
#ifdef HAVE_WINSOCK2_H
|
||||||
#include <winsock2.h>
|
#include <winsock2.h>
|
||||||
|
#ifdef HAVE_WS2TCPIP_H
|
||||||
#include <ws2tcpip.h>
|
#include <ws2tcpip.h>
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
|
#ifdef HAVE_SYS_TYPES_H
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_SYS_SOCKET_H
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_NETDB_H
|
||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
],[
|
],[
|
||||||
getnameinfo(0, 0, 0, 0, 0, 0, 0);
|
getnameinfo(0, 0, 0, 0, 0, 0, 0);
|
||||||
@ -289,9 +393,6 @@ AC_TRY_RUN(
|
|||||||
#ifdef HAVE_SYS_SOCKET_H
|
#ifdef HAVE_SYS_SOCKET_H
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_WINSOCK_H
|
|
||||||
#include <winsock.h>
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_NETINET_IN_H
|
#ifdef HAVE_NETINET_IN_H
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#endif
|
#endif
|
||||||
@ -321,9 +422,6 @@ AC_TRY_RUN(
|
|||||||
#ifdef HAVE_SYS_SOCKET_H
|
#ifdef HAVE_SYS_SOCKET_H
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_WINSOCK_H
|
|
||||||
#include <winsock.h>
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_NETINET_IN_H
|
#ifdef HAVE_NETINET_IN_H
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#endif
|
#endif
|
||||||
@ -355,9 +453,6 @@ AC_TRY_RUN(
|
|||||||
#ifdef HAVE_SYS_SOCKET_H
|
#ifdef HAVE_SYS_SOCKET_H
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_WINSOCK_H
|
|
||||||
#include <winsock.h>
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_NETINET_IN_H
|
#ifdef HAVE_NETINET_IN_H
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#endif
|
#endif
|
||||||
@ -379,34 +474,57 @@ fi
|
|||||||
|
|
||||||
AC_CHECK_SIZEOF(struct in6_addr, ,
|
AC_CHECK_SIZEOF(struct in6_addr, ,
|
||||||
[
|
[
|
||||||
|
#undef inline
|
||||||
|
#ifdef HAVE_WINDOWS_H
|
||||||
|
#ifndef WIN32_LEAN_AND_MEAN
|
||||||
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
#endif
|
||||||
|
#include <windows.h>
|
||||||
|
#ifdef HAVE_WINSOCK2_H
|
||||||
|
#include <winsock2.h>
|
||||||
|
#ifdef HAVE_WS2TCPIP_H
|
||||||
|
#include <ws2tcpip.h>
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
#ifdef HAVE_SYS_TYPES_H
|
#ifdef HAVE_SYS_TYPES_H
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_SYS_SOCKET_H
|
#ifdef HAVE_SYS_SOCKET_H
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_WINSOCK_H
|
|
||||||
#include <winsock.h>
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_NETINET_IN_H
|
#ifdef HAVE_NETINET_IN_H
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
AC_CHECK_SIZEOF(struct in_addr, ,
|
AC_CHECK_SIZEOF(struct in_addr, ,
|
||||||
[
|
[
|
||||||
|
#undef inline
|
||||||
|
#ifdef HAVE_WINDOWS_H
|
||||||
|
#ifndef WIN32_LEAN_AND_MEAN
|
||||||
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
#endif
|
||||||
|
#include <windows.h>
|
||||||
|
#ifdef HAVE_WINSOCK2_H
|
||||||
|
#include <winsock2.h>
|
||||||
|
#ifdef HAVE_WS2TCPIP_H
|
||||||
|
#include <ws2tcpip.h>
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
#ifdef HAVE_SYS_TYPES_H
|
#ifdef HAVE_SYS_TYPES_H
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_SYS_SOCKET_H
|
#ifdef HAVE_SYS_SOCKET_H
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_WINSOCK_H
|
|
||||||
#include <winsock.h>
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_NETINET_IN_H
|
#ifdef HAVE_NETINET_IN_H
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
29
configure.ac
29
configure.ac
@ -1579,7 +1579,22 @@ dnl For some reason, the check above doesn't properly detect select() with
|
|||||||
dnl Msys/Mingw
|
dnl Msys/Mingw
|
||||||
if test "$ac_cv_func_select" != "yes"; then
|
if test "$ac_cv_func_select" != "yes"; then
|
||||||
AC_MSG_CHECKING([for select in ws2_32])
|
AC_MSG_CHECKING([for select in ws2_32])
|
||||||
AC_TRY_LINK([#include <winsock2.h>],
|
AC_TRY_LINK([
|
||||||
|
#undef inline
|
||||||
|
#ifdef HAVE_WINDOWS_H
|
||||||
|
#ifndef WIN32_LEAN_AND_MEAN
|
||||||
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
#endif
|
||||||
|
#include <windows.h>
|
||||||
|
#ifdef HAVE_WINSOCK2_H
|
||||||
|
#include <winsock2.h>
|
||||||
|
#else
|
||||||
|
#ifdef HAVE_WINSOCK_H
|
||||||
|
#include <winsock.h>
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
],
|
||||||
[select(0,(fd_set *)NULL,(fd_set *)NULL,(fd_set *)NULL,(struct timeval *)NULL);],
|
[select(0,(fd_set *)NULL,(fd_set *)NULL,(fd_set *)NULL,(struct timeval *)NULL);],
|
||||||
[ dnl worked!
|
[ dnl worked!
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
@ -1596,14 +1611,26 @@ if test "$ac_cv_func_getnameinfo" = "no"; then
|
|||||||
AC_TRY_LINK([
|
AC_TRY_LINK([
|
||||||
#undef inline
|
#undef inline
|
||||||
#ifdef HAVE_WINDOWS_H
|
#ifdef HAVE_WINDOWS_H
|
||||||
|
#ifndef WIN32_LEAN_AND_MEAN
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
#endif
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
#ifdef HAVE_WINSOCK2_H
|
||||||
#include <winsock2.h>
|
#include <winsock2.h>
|
||||||
|
#ifdef HAVE_WS2TCPIP_H
|
||||||
#include <ws2tcpip.h>
|
#include <ws2tcpip.h>
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
|
#ifdef HAVE_SYS_TYPES_H
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_SYS_SOCKET_H
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_NETDB_H
|
||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
],[
|
],[
|
||||||
getnameinfo(0, 0, 0, 0, 0, 0, 0);
|
getnameinfo(0, 0, 0, 0, 0, 0, 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user