From c404b31376e0fc0373e063a95195d678f970212e Mon Sep 17 00:00:00 2001 From: Simon Josefsson Date: Mon, 28 Apr 2008 16:38:34 +0200 Subject: [PATCH] Fix proper win32 checks and use of inline for setsockopt. Reported by Bruno Haible . --- ChangeLog | 7 +++++++ lib/sys_socket.in.h | 2 +- m4/sys_socket_h.m4 | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index c0163e815..147e944fa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-04-28 Simon Josefsson + + * m4/sys_socket_h.m4: Require AC_C_INLINE when necessary. + * lib/sys_socket.in.h (setsockopt): Use proper win32 tests (don't + trigger for cygwin). + Reported by Bruno Haible . + 2008-04-28 Bruno Haible * doc/posix-functions/strdup.texi: Mention mingw problem. diff --git a/lib/sys_socket.in.h b/lib/sys_socket.in.h index d2a081fcd..ea39a352a 100644 --- a/lib/sys_socket.in.h +++ b/lib/sys_socket.in.h @@ -102,7 +102,7 @@ # define ESHUTDOWN WSAESHUTDOWN # endif -# if defined _WIN32 || defined __WIN32__ +# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ # define setsockopt(a,b,c,d,e) rpl_setsockopt(a,b,c,d,e) static inline int rpl_setsockopt(int socket, int level, int optname, const void *optval, diff --git a/m4/sys_socket_h.m4 b/m4/sys_socket_h.m4 index 0e735a93c..5526c06da 100644 --- a/m4/sys_socket_h.m4 +++ b/m4/sys_socket_h.m4 @@ -45,6 +45,7 @@ AC_DEFUN([gl_HEADER_SYS_SOCKET], HAVE_WINSOCK2_H=0 HAVE_WS2TCPIP_H=0 else + AC_REQUIRE([AC_C_INLINE]) HAVE_SYS_SOCKET_H=0 dnl We cannot use AC_CHECK_HEADERS_ONCE here, because that would make dnl the check for those headers unconditional; yet cygwin reports -- 2.11.0