]> granicus.if.org Git - curl/commitdiff
Avoid the risk of a false positive detection of MSG_NOSIGNAL when cross compiling...
authorYang Tse <yangsita@gmail.com>
Mon, 31 Jul 2006 18:41:29 +0000 (18:41 +0000)
committerYang Tse <yangsita@gmail.com>
Mon, 31 Jul 2006 18:41:29 +0000 (18:41 +0000)
acinclude.m4
ares/acinclude.m4

index 4ec27d2ae84627a341949cb8cc4987c4d12e2cfb..6369761dec47cdd391550010927008f4c0979403 100644 (file)
@@ -935,11 +935,26 @@ 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;
index aa87cba60ed1fa118ebfee362f4bdcb1c9774d16..6745bc2f4ca2e2f3fe0105fff693b444ac0a16a5 100644 (file)
@@ -913,11 +913,26 @@ 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;