From: Yang Tse Date: Mon, 31 Jul 2006 18:41:29 +0000 (+0000) Subject: Avoid the risk of a false positive detection of MSG_NOSIGNAL when cross compiling... X-Git-Tag: upstream/7.37.1~10148 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ae8a01ead6d8d036ceeb496822d1cc51b279b808;p=platform%2Fupstream%2Fcurl.git Avoid the risk of a false positive detection of MSG_NOSIGNAL when cross compiling a Windows target. --- diff --git a/acinclude.m4 b/acinclude.m4 index 4ec27d2ae..6369761de 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -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 +#ifdef HAVE_WINSOCK2_H +#include +#else +#ifdef HAVE_WINSOCK_H +#include +#endif +#endif +#else #ifdef HAVE_SYS_TYPES_H #include #endif #ifdef HAVE_SYS_SOCKET_H #include +#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,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 +#ifdef HAVE_WINSOCK2_H +#include +#else +#ifdef HAVE_WINSOCK_H +#include +#endif +#endif +#else #ifdef HAVE_SYS_TYPES_H #include #endif #ifdef HAVE_SYS_SOCKET_H #include +#endif #endif ],[ int flag=MSG_NOSIGNAL;