shishi-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CVS shishi/gl/m4


From: shishi-commit
Subject: CVS shishi/gl/m4
Date: Mon, 30 Jan 2006 11:48:18 +0100

Update of /home/cvs/shishi/gl/m4
In directory dopio:/tmp/cvs-serv1749/gl/m4

Modified Files:
        getaddrinfo.m4 getopt.m4 gnulib-tool.m4 socklen.m4 stdbool.m4 
Log Message:
Update.

--- /home/cvs/shishi/gl/m4/getaddrinfo.m4       2006/01/19 10:36:10     1.9
+++ /home/cvs/shishi/gl/m4/getaddrinfo.m4       2006/01/30 10:48:18     1.10
@@ -1,4 +1,4 @@
-# getaddrinfo.m4 serial 8
+# getaddrinfo.m4 serial 7
 dnl Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -9,31 +9,32 @@
   AC_MSG_NOTICE([checking how to do getaddrinfo])
 
   AC_SEARCH_LIBS(getaddrinfo, [nsl socket])
-  AC_SEARCH_LIBS(gethostbyname, [inet nsl])
-  AC_SEARCH_LIBS(getservbyname, [inet nsl socket xnet])
-
-  if test "$ac_cv_search_gethostbyname" = "no"; then
-    save_LIBS="$LIBS"
-    LIBS="$LIBS -lws2_32"
-    AC_MSG_CHECKING([whether we need -lws2_32 for gethostbyname])
-    AC_LINK_IFELSE([
-      AC_LANG_PROGRAM([[
-#include <winsock2.h>
-]], [gethostbyname (0);])],
-      need_ws2=yes, need_ws2=no)
-    AC_MSG_RESULT($need_ws2)
-    LIBS="$save_LIBS"
-    if test "$need_ws2" = "yes"; then
+  AC_CHECK_FUNCS(getaddrinfo,, [
+    AC_CACHE_CHECK(for getaddrinfo in ws2tcpip.h and -lws2_32,
+                   gl_cv_w32_getaddrinfo, [
+      gl_cv_w32_getaddrinfo=no
+      am_save_LIBS="$LIBS"
       LIBS="$LIBS -lws2_32"
-    fi
-  fi
+      AC_TRY_LINK([
+#define WINVER 0x0501
+#include <ws2tcpip.h>
+], [getaddrinfo(0, 0, 0, 0);], gl_cv_w32_getaddrinfo=yes)
+      LIBS="$am_save_LIBS"
+      if test "$gl_cv_w32_getaddrinfo" = "yes"; then
+        LIBS="$LIBS -lws2_32"
+      else
+        AC_LIBOBJ(getaddrinfo)
+      fi
+    ])])
 
-  AC_REPLACE_FUNCS(getaddrinfo gai_strerror)
+  AC_REPLACE_FUNCS(gai_strerror)
   gl_PREREQ_GETADDRINFO
 ])
 
 # Prerequisites of lib/getaddrinfo.h and lib/getaddrinfo.c.
 AC_DEFUN([gl_PREREQ_GETADDRINFO], [
+  AC_SEARCH_LIBS(gethostbyname, [inet nsl])
+  AC_SEARCH_LIBS(getservbyname, [inet nsl socket xnet])
   AC_REQUIRE([gl_C_RESTRICT])
   AC_REQUIRE([gl_SOCKET_FAMILIES])
   AC_REQUIRE([AC_C_INLINE])
@@ -44,26 +45,28 @@
      sys/socket.h in i386-unknown-freebsd4.10 and
      powerpc-apple-darwin5.5 required it. */
 #include <sys/types.h>
-#if HAVE_SYS_SOCKET_H
-# include <sys/socket.h>
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
 #endif
-#if HAVE_NETDB_H
-# include <netdb.h>
+#ifdef HAVE_NETDB_H
+#include <netdb.h>
 #endif
-#if HAVE_WS2TCPIP_H
-# include <ws2tcpip.h>
+#ifdef HAVE_WS2TCPIP_H
+#define WINVER 0x0501
+#include <ws2tcpip.h>
 #endif
 ])
   AC_CHECK_TYPES([struct addrinfo],,,[
 #include <sys/types.h>
-#if HAVE_SYS_SOCKET_H
-# include <sys/socket.h>
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
 #endif
-#if HAVE_NETDB_H
-# include <netdb.h>
+#ifdef HAVE_NETDB_H
+#include <netdb.h>
 #endif
-#if HAVE_WS2TCPIP_H
-# include <ws2tcpip.h>
+#ifdef HAVE_WS2TCPIP_H
+#define WINVER 0x0501
+#include <ws2tcpip.h>
 #endif
 ])
 ])
--- /home/cvs/shishi/gl/m4/getopt.m4    2005/09/19 16:04:42     1.12
+++ /home/cvs/shishi/gl/m4/getopt.m4    2006/01/30 10:48:18     1.13
@@ -1,5 +1,5 @@
-# getopt.m4 serial 11
-dnl Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+# getopt.m4 serial 12
+dnl Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -77,4 +77,7 @@
 AC_DEFUN([gl_GETOPT], [gl_GETOPT_IFELSE([gl_GETOPT_SUBSTITUTE])])
 
 # Prerequisites of lib/getopt*.
-AC_DEFUN([gl_PREREQ_GETOPT], [:])
+AC_DEFUN([gl_PREREQ_GETOPT],
+[
+  AC_CHECK_DECLS_ONCE([getenv])
+])
--- /home/cvs/shishi/gl/m4/gnulib-tool.m4       2006/01/12 17:17:53     1.2
+++ /home/cvs/shishi/gl/m4/gnulib-tool.m4       2006/01/30 10:48:18     1.3
@@ -1,5 +1,5 @@
-# gnulib-tool.m4 serial 2
-dnl Copyright (C) 2004-2006 Free Software Foundation, Inc.
+# gnulib-tool.m4 serial 1
+dnl Copyright (C) 2004-2005 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -20,9 +20,6 @@
 dnl Usage: gl_M4_BASE([DIR])
 AC_DEFUN([gl_M4_BASE], [])
 
-dnl Usage: gl_AUX_BASE([DIR])
-AC_DEFUN([gl_AUX_BASE], [])
-
 dnl Usage: gl_LIB([LIBNAME])
 AC_DEFUN([gl_LIB], [])
 
--- /home/cvs/shishi/gl/m4/socklen.m4   2006/01/12 17:17:53     1.5
+++ /home/cvs/shishi/gl/m4/socklen.m4   2006/01/30 10:48:18     1.6
@@ -10,6 +10,10 @@
 dnl POSIX 1g it is a type of its own, but some platforms use different
 dnl types for the argument to getsockopt, getpeername, etc.  So we
 dnl have to test to find something that will work.
+
+dnl On mingw32, socklen_t is in ws2tcpip.h ('int'), so we try to find
+dnl it there first.  That file is included by gnulib's socket_.h, which
+dnl all users of this module should include.
 AC_DEFUN([gl_TYPE_SOCKLEN_T],
   [AC_CHECK_HEADERS_ONCE([sys/socket.h ws2tcpip.h])
    AC_CHECK_TYPE([socklen_t], ,
@@ -22,12 +26,7 @@
           for t in int size_t "unsigned int" "long int" "unsigned long int"; do
             AC_TRY_COMPILE(
               [#include <sys/types.h>
-               #if HAVE_SYS_SOCKET_H
-                # include <sys/socket.h>
-                #endif
-               #if HAVE_WS2TCPIP_H
-                # include <ws2tcpip.h>
-                #endif
+                #include <sys/socket.h>
 
                int getpeername (int, $arg2 *, $t *);],
                [$t len;
--- /home/cvs/shishi/gl/m4/stdbool.m4   2005/10/22 15:54:49     1.5
+++ /home/cvs/shishi/gl/m4/stdbool.m4   2006/01/30 10:48:18     1.6
@@ -1,6 +1,6 @@
 # Check for stdbool.h that conforms to C99.
 
-dnl Copyright (C) 2002-2005 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
@@ -74,11 +74,38 @@
          _Bool n[m];
          char o[sizeof n == m * sizeof n[0] ? 1 : -1];
          char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
+         #if defined __xlc__ || defined __GNUC__
+          /* Catch a bug in IBM AIX xlc compiler version 6.0.0.0
+             reported by James Lemley on 2005-10-05; see
+             
http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html
+             This test is not quite right, since xlc is allowed to
+             reject this program, as the initializer for xlcbug is
+             not one of the forms that C requires support for.
+             However, doing the test right would require a run-time
+             test, and that would make cross-compilation harder.
+             Let us hope that IBM fixes the xlc bug, and also adds
+             support for this kind of constant expression.  In the
+             meantime, this test will reject xlc, which is OK, since
+             our stdbool.h substitute should suffice.  We also test
+             this with GCC, where it should work, to detect more
+             quickly whether someone messes up the test in the
+             future.  */
+          char digs[] = "0123456789";
+          int xlcbug = 1 / (&(digs + 5)[-2 + (bool) 1] == &digs[4] ? 1 : -1);
+         #endif
+         /* Catch a bug in an HP-UX C compiler.  See
+            http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
+            
http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
+          */
+         _Bool q = true;
+         _Bool *pq = &q;
        ],
        [
+         *pq |= q;
+         *pq |= ! q;
          /* Refer to every declared value, to avoid compiler optimizations.  */
          return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
-                 + !m + !n + !o + !p);
+                 + !m + !n + !o + !p + !q + !pq);
        ],
        [ac_cv_header_stdbool_h=yes],
        [ac_cv_header_stdbool_h=no])])





reply via email to

[Prev in Thread] Current Thread [Next in Thread]