summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2006-07-31 18:41:29 +0000
committerYang Tse <yangsita@gmail.com>2006-07-31 18:41:29 +0000
commit6ca041f8f10be78db898cd37231c2670d5cac851 (patch)
tree3768dd740d9333ff0f7a947b76cdcc322a8b7c15
parentc7aae2ef2e4ba8799e52d68f2f5e0fe6a8fc393f (diff)
downloadc-ares-6ca041f8f10be78db898cd37231c2670d5cac851.tar.gz
c-ares-6ca041f8f10be78db898cd37231c2670d5cac851.tar.bz2
c-ares-6ca041f8f10be78db898cd37231c2670d5cac851.zip
Avoid the risk of a false positive detection of MSG_NOSIGNAL when cross compiling a Windows target.
-rw-r--r--acinclude.m415
1 files changed, 15 insertions, 0 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index aa87cba..6745bc2 100644
--- a/acinclude.m4
+++ b/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;
])