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 c0163e815fe32a10cad0d750bcdc763279fb8a54..147e944fa0124bfe27026edc7a27bd084e50eb16 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 d2a081fcdf7c13507367babc76eae1caf8403b1f..ea39a352a5a6878f4e56fb013c8282a927719be8 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 0e735a93c36c4ec02099e4d29a1f1534a78d696a..5526c06da0e14ae43e61c7278a8e54932d48a330 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