diff options
author | Yang Tse <yangsita@gmail.com> | 2006-07-31 18:41:29 +0000 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2006-07-31 18:41:29 +0000 |
commit | ae8a01ead6d8d036ceeb496822d1cc51b279b808 (patch) | |
tree | f8d1b647297ffa71f9cb207e51f5e6b85f5ec6f7 | |
parent | 9dde0b54a3e834d2c33a00a8c3d15a716086ed9e (diff) |
Avoid the risk of a false positive detection of MSG_NOSIGNAL when cross compiling a Windows target.
-rw-r--r-- | acinclude.m4 | 15 | ||||
-rw-r--r-- | ares/acinclude.m4 | 15 |
2 files changed, 30 insertions, 0 deletions
diff --git a/acinclude.m4 b/acinclude.m4 index 4ec27d2ae..6369761de 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -935,12 +935,27 @@ AC_DEFUN([CURL_CHECK_MSG_NOSIGNAL], [ AC_CACHE_CHECK([for MSG_NOSIGNAL], [ac_cv_msg_nosignal], [ AC_COMPILE_IFELSE([ AC_LANG_PROGRAM([ +#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 +#endif ],[ int flag=MSG_NOSIGNAL; ]) diff --git a/ares/acinclude.m4 b/ares/acinclude.m4 index aa87cba60..6745bc2f4 100644 --- a/ares/acinclude.m4 +++ b/ares/acinclude.m4 @@ -913,12 +913,27 @@ AC_DEFUN([CURL_CHECK_MSG_NOSIGNAL], [ AC_CACHE_CHECK([for MSG_NOSIGNAL], [ac_cv_msg_nosignal], [ AC_COMPILE_IFELSE([ AC_LANG_PROGRAM([ +#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 +#endif ],[ int flag=MSG_NOSIGNAL; ]) |