Fix proper win32 checks and use of inline for setsockopt.
authorSimon Josefsson <simon@josefsson.org>
Mon, 28 Apr 2008 14:38:34 +0000 (16:38 +0200)
committerSimon Josefsson <simon@josefsson.org>
Mon, 28 Apr 2008 14:38:34 +0000 (16:38 +0200)
Reported by Bruno Haible  <bruno@clisp.org>.

ChangeLog
lib/sys_socket.in.h
m4/sys_socket_h.m4

index c0163e8..147e944 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-04-28  Simon Josefsson  <simon@josefsson.org>
+
+       * 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  <bruno@clisp.org>.
+
 2008-04-28  Bruno Haible  <bruno@clisp.org>
 
        * doc/posix-functions/strdup.texi: Mention mingw problem.
index d2a081f..ea39a35 100644 (file)
 #  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,
index 0e735a9..5526c06 100644 (file)
@@ -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