Avoid the risk of a false positive detection of MSG_NOSIGNAL when cross compiling a Windows target.

pull/1/head
Yang Tse 19 years ago
parent c7aae2ef2e
commit 6ca041f8f1
  1. 15
      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 <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;

Loading…
Cancel
Save