]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Update gnulib files.
authorSimon Josefsson <simon@josefsson.org>
Wed, 21 Jan 2009 21:21:49 +0000 (22:21 +0100)
committerSimon Josefsson <simon@josefsson.org>
Wed, 21 Jan 2009 21:21:49 +0000 (22:21 +0100)
92 files changed:
gl/Makefile.am
gl/arpa_inet.in.h
gl/fseeko.c
gl/m4/alloca.m4
gl/m4/errno_h.m4
gl/m4/getaddrinfo.m4
gl/m4/getline.m4
gl/m4/getpass.m4
gl/m4/gettimeofday.m4
gl/m4/gnulib-common.m4
gl/m4/inet_ntop.m4
gl/m4/inet_pton.m4
gl/m4/intmax_t.m4
gl/m4/inttypes_h.m4
gl/m4/lib-ld.m4
gl/m4/lib-link.m4
gl/m4/longlong.m4
gl/m4/malloc.m4
gl/m4/minmax.m4
gl/m4/printf.m4
gl/m4/readline.m4
gl/m4/realloc.m4
gl/m4/sockets.m4
gl/m4/sockpfaf.m4
gl/m4/stdbool.m4
gl/m4/stdint.m4
gl/m4/stdint_h.m4
gl/m4/stdio_h.m4
gl/m4/unistd_h.m4
gl/m4/vasnprintf.m4
gl/m4/wchar_t.m4
gl/m4/wint_t.m4
gl/progname.c
gl/stdint.in.h
gl/stdio.in.h
gl/strerror.c
gl/sys_stat.in.h
gl/tests/gettimeofday.c
gl/tests/ioctl.c
gl/tests/test-unistd.c
gl/unistd.in.h
gl/wchar.in.h
lib/gl/Makefile.am
lib/gl/fseeko.c
lib/gl/m4/alloca.m4
lib/gl/m4/byteswap.m4
lib/gl/m4/codeset.m4
lib/gl/m4/errno_h.m4
lib/gl/m4/gettext.m4
lib/gl/m4/gnulib-common.m4
lib/gl/m4/iconv.m4
lib/gl/m4/intldir.m4
lib/gl/m4/intlmacosx.m4
lib/gl/m4/intmax.m4
lib/gl/m4/intmax_t.m4
lib/gl/m4/inttypes-pri.m4
lib/gl/m4/inttypes_h.m4
lib/gl/m4/lcmessage.m4
lib/gl/m4/lib-ld.m4
lib/gl/m4/lib-link.m4
lib/gl/m4/lock.m4
lib/gl/m4/longlong.m4
lib/gl/m4/malloc.m4
lib/gl/m4/memmem.m4
lib/gl/m4/memmove.m4
lib/gl/m4/minmax.m4
lib/gl/m4/nls.m4
lib/gl/m4/po.m4
lib/gl/m4/printf-posix.m4
lib/gl/m4/printf.m4
lib/gl/m4/progtest.m4
lib/gl/m4/realloc.m4
lib/gl/m4/sockets.m4
lib/gl/m4/sockpfaf.m4
lib/gl/m4/stdbool.m4
lib/gl/m4/stdint.m4
lib/gl/m4/stdint_h.m4
lib/gl/m4/stdio_h.m4
lib/gl/m4/strcase.m4
lib/gl/m4/strverscmp.m4
lib/gl/m4/threadlib.m4
lib/gl/m4/uintmax_t.m4
lib/gl/m4/unistd_h.m4
lib/gl/m4/vasnprintf.m4
lib/gl/m4/wchar_t.m4
lib/gl/m4/wint_t.m4
lib/gl/stdint.in.h
lib/gl/stdio.in.h
lib/gl/sys_stat.in.h
lib/gl/tests/test-unistd.c
lib/gl/unistd.in.h
lib/gl/wchar.in.h

index 85ab1c2ed6c0c9766bf12703f41d04d45936bdeb..210b381e2a34a93c71d6ab989193f8d1716a4335 100644 (file)
@@ -623,6 +623,8 @@ stdio.h: stdio.in.h
              -e 's|@''GNULIB_VPRINTF_POSIX''@|$(GNULIB_VPRINTF_POSIX)|g' \
              -e 's|@''GNULIB_VSNPRINTF''@|$(GNULIB_VSNPRINTF)|g' \
              -e 's|@''GNULIB_VSPRINTF_POSIX''@|$(GNULIB_VSPRINTF_POSIX)|g' \
+             -e 's|@''GNULIB_DPRINTF''@|$(GNULIB_DPRINTF)|g' \
+             -e 's|@''GNULIB_VDPRINTF''@|$(GNULIB_VDPRINTF)|g' \
              -e 's|@''GNULIB_VASPRINTF''@|$(GNULIB_VASPRINTF)|g' \
              -e 's|@''GNULIB_OBSTACK_PRINTF''@|$(GNULIB_OBSTACK_PRINTF)|g' \
              -e 's|@''GNULIB_OBSTACK_PRINTF_POSIX''@|$(GNULIB_OBSTACK_PRINTF_POSIX)|g' \
@@ -655,6 +657,10 @@ stdio.h: stdio.in.h
              -e 's|@''HAVE_DECL_VSNPRINTF''@|$(HAVE_DECL_VSNPRINTF)|g' \
              -e 's|@''REPLACE_SPRINTF''@|$(REPLACE_SPRINTF)|g' \
              -e 's|@''REPLACE_VSPRINTF''@|$(REPLACE_VSPRINTF)|g' \
+             -e 's|@''HAVE_DPRINTF''@|$(HAVE_DPRINTF)|g' \
+             -e 's|@''REPLACE_DPRINTF''@|$(REPLACE_DPRINTF)|g' \
+             -e 's|@''HAVE_VDPRINTF''@|$(HAVE_VDPRINTF)|g' \
+             -e 's|@''REPLACE_VDPRINTF''@|$(REPLACE_VDPRINTF)|g' \
              -e 's|@''HAVE_VASPRINTF''@|$(HAVE_VASPRINTF)|g' \
              -e 's|@''REPLACE_VASPRINTF''@|$(REPLACE_VASPRINTF)|g' \
              -e 's|@''HAVE_DECL_OBSTACK_PRINTF''@|$(HAVE_DECL_OBSTACK_PRINTF)|g' \
@@ -980,6 +986,7 @@ unistd.h: unistd.in.h
              -e 's|@''GNULIB_GETPAGESIZE''@|$(GNULIB_GETPAGESIZE)|g' \
              -e 's|@''GNULIB_GETUSERSHELL''@|$(GNULIB_GETUSERSHELL)|g' \
              -e 's|@''GNULIB_LCHOWN''@|$(GNULIB_LCHOWN)|g' \
+             -e 's|@''GNULIB_LINK''@|$(GNULIB_LINK)|g' \
              -e 's|@''GNULIB_LSEEK''@|$(GNULIB_LSEEK)|g' \
              -e 's|@''GNULIB_READLINK''@|$(GNULIB_READLINK)|g' \
              -e 's|@''GNULIB_SLEEP''@|$(GNULIB_SLEEP)|g' \
@@ -994,6 +1001,7 @@ unistd.h: unistd.in.h
              -e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \
              -e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \
              -e 's|@''HAVE_GETUSERSHELL''@|$(HAVE_GETUSERSHELL)|g' \
+             -e 's|@''HAVE_LINK''@|$(HAVE_LINK)|g' \
              -e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \
              -e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \
              -e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \
index 4b95b944fc7a9b5daaacc51afe8e7e17327ae1e2..ac933991436c5b02226bd7e2363c3c007bee4f12 100644 (file)
 
 /* The definition of GL_LINK_WARNING is copied here.  */
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #if @GNULIB_INET_NTOP@
 # if !@HAVE_DECL_INET_NTOP@
 /* Converts an internet address from internal format to a printable,
@@ -78,5 +82,9 @@ extern int inet_pton (int af, const char *restrict src, void *restrict dst);
    inet_pton (af, src, dst))
 #endif
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _GL_ARPA_INET_H */
 #endif /* _GL_ARPA_INET_H */
index e0c5ae793dd70e5213e507750fe83cfb77eccc8a..e057508d4935f3e75acaecf002e8078fb1d80d23 100644 (file)
@@ -1,5 +1,5 @@
 /* An fseeko() function that, together with fflush(), is POSIX compliant.
-   Copyright (C) 2007-2008 Free Software Foundation, Inc.
+   Copyright (C) 2007-2009 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -86,7 +86,14 @@ rpl_fseeko (FILE *fp, off_t offset, int whence)
   #error "Please port gnulib fseeko.c to your platform! Look at the code in fpurge.c, then report this to bug-gnulib."
 #endif
     {
-      off_t pos = lseek (fileno (fp), offset, whence);
+      /* We get here when an fflush() call immediately preceded this one.  We
+        know there are no buffers.
+        POSIX requires us to modify the file descriptor's position.
+        But we cannot position beyond end of file here.  */
+      off_t pos =
+       lseek (fileno (fp),
+              whence == SEEK_END && offset > 0 ? 0 : offset,
+              whence);
       if (pos == -1)
        {
 #if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
@@ -94,20 +101,22 @@ rpl_fseeko (FILE *fp, off_t offset, int whence)
 #endif
          return -1;
        }
-      else
-       {
-#if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
-         fp_->_offset = pos;
-         fp_->_flags |= __SOFF;
-         fp_->_flags &= ~__SEOF;
+
+#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+      fp->_flags &= ~_IO_EOF_SEEN;
+#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
+      fp_->_offset = pos;
+      fp_->_flags |= __SOFF;
+      fp_->_flags &= ~__SEOF;
 #elif defined __EMX__               /* emx+gcc */
-          fp->_flags &= ~_IOEOF;
+      fp->_flags &= ~_IOEOF;
 #elif defined _IOERR                /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw */
-          fp->_flag &= ~_IOEOF;
+      fp->_flag &= ~_IOEOF;
 #endif
-         return 0;
-       }
+      /* If we were not requested to position beyond end of file, we're
+        done.  */
+      if (!(whence == SEEK_END && offset > 0))
+       return 0;
     }
-  else
-    return fseeko (fp, offset, whence);
+  return fseeko (fp, offset, whence);
 }
index 95f54a6d48c08452ba0f2eaef811c72ce2748825..4b978e137cbe7c2d9f76baa6546764f6e2f7a0a6 100644 (file)
@@ -1,5 +1,5 @@
-# alloca.m4 serial 8
-dnl Copyright (C) 2002-2004, 2006, 2007 Free Software Foundation, Inc.
+# alloca.m4 serial 9
+dnl Copyright (C) 2002-2004, 2006, 2007, 2009 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.
@@ -26,7 +26,7 @@ AC_DEFUN([gl_FUNC_ALLOCA],
     ])
     if test $gl_cv_rpl_alloca = yes; then
       dnl OK, alloca can be implemented through a compiler built-in.
-      AC_DEFINE([HAVE_ALLOCA], 1,
+      AC_DEFINE([HAVE_ALLOCA], [1],
         [Define to 1 if you have 'alloca' after including <alloca.h>,
          a header that may be supplied by this distribution.])
       ALLOCA_H=alloca.h
index 22c08f07fa06dcf88635d3972f7883e98d4e6809..0682d1ab63b8912ea1079605f159227de754927c 100644 (file)
@@ -1,5 +1,5 @@
-# errno_h.m4 serial 2
-dnl Copyright (C) 2004, 2006, 2008 Free Software Foundation, Inc.
+# errno_h.m4 serial 3
+dnl Copyright (C) 2004, 2006, 2008, 2009 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.
@@ -14,8 +14,8 @@ AC_DEFUN([gl_HEADER_ERRNO_H],
 AC_DEFUN([gl_HEADER_ERRNO_H_BODY],
 [
   AC_REQUIRE([AC_PROG_CC])
-  AC_CACHE_CHECK([for complete errno.h], gl_cv_header_errno_h_complete, [
-    AC_EGREP_CPP(booboo,[
+  AC_CACHE_CHECK([for complete errno.h], [gl_cv_header_errno_h_complete], [
+    AC_EGREP_CPP([booboo],[
 #include <errno.h>
 #if !defined ENOMSG
 booboo
@@ -70,7 +70,7 @@ AC_DEFUN([gl_REPLACE_ERRNO_VALUE],
 [
   if test -n "$ERRNO_H"; then
     AC_CACHE_CHECK([for ]$1[ value], [gl_cv_header_errno_h_]$1, [
-      AC_EGREP_CPP(yes,[
+      AC_EGREP_CPP([yes],[
 #include <errno.h>
 #ifdef ]$1[
 yes
@@ -79,7 +79,7 @@ yes
       [gl_cv_header_errno_h_]$1[=yes],
       [gl_cv_header_errno_h_]$1[=no])
       if test $gl_cv_header_errno_h_]$1[ = no; then
-        AC_EGREP_CPP(yes,[
+        AC_EGREP_CPP([yes],[
 #define _XOPEN_SOURCE_EXTENDED 1
 #include <errno.h>
 #ifdef ]$1[
index 9655a4289b4369bebda48b389b5750fdcd0b6b56..4088671987ade01fe1e50ca0e21dd269c6856306 100644 (file)
@@ -1,5 +1,5 @@
-# getaddrinfo.m4 serial 19
-dnl Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+# getaddrinfo.m4 serial 20
+dnl Copyright (C) 2004-2009 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.
@@ -18,7 +18,7 @@ AC_DEFUN([gl_GETADDRINFO],
   dnl - On BeOS, it is in libnet.
   dnl - On native Windows, it is in ws2_32.dll.
   dnl - Otherwise it is in libc.
-  AC_SEARCH_LIBS(getaddrinfo, [socket network net],
+  AC_SEARCH_LIBS([getaddrinfo], [socket network net],
     [if test "$ac_cv_search_getaddrinfo" != "none required"; then
        GETADDRINFO_LIB="$ac_cv_search_getaddrinfo"
      fi])
@@ -38,7 +38,7 @@ AC_DEFUN([gl_GETADDRINFO],
       [gl_cv_func_getaddrinfo=yes],
       [gl_cv_func_getaddrinfo=no])])
   if test $gl_cv_func_getaddrinfo = no; then
-    AC_CACHE_CHECK(for getaddrinfo in ws2tcpip.h and -lws2_32,
+    AC_CACHE_CHECK([for getaddrinfo in ws2tcpip.h and -lws2_32],
                   gl_cv_w32_getaddrinfo, [
       gl_cv_w32_getaddrinfo=no
       am_save_LIBS="$LIBS"
@@ -55,7 +55,7 @@ AC_DEFUN([gl_GETADDRINFO],
       GETADDRINFO_LIB="-lws2_32"
       LIBS="$gai_saved_LIBS $GETADDRINFO_LIB"
     else
-      AC_LIBOBJ(getaddrinfo)
+      AC_LIBOBJ([getaddrinfo])
     fi
   fi
 
@@ -80,7 +80,7 @@ AC_DEFUN([gl_GETADDRINFO],
         [gl_cv_func_gai_strerror=yes],
         [gl_cv_func_gai_strerror=no])])
   if test $gl_cv_func_gai_strerror = no; then
-    AC_LIBOBJ(gai_strerror)
+    AC_LIBOBJ([gai_strerror])
   fi
 
   LIBS="$gai_saved_LIBS"
@@ -106,7 +106,7 @@ AC_DEFUN([gl_PREREQ_GETADDRINFO], [
   dnl have sa_len so the result is correct anyway.
   AC_CHECK_MEMBERS([struct sockaddr.sa_len], , , [#include <sys/socket.h>])
 
-  AC_CHECK_HEADERS_ONCE(netinet/in.h)
+  AC_CHECK_HEADERS_ONCE([netinet/in.h])
 
   AC_CHECK_DECLS([getaddrinfo, freeaddrinfo, gai_strerror, getnameinfo],,,[
   /* sys/types.h is not needed according to POSIX, but the
index 57625da5c9d7f5d6279ef8d2826c3ece3f3aa4b7..99933455f094b07d37d675e109de3b6483537f91 100644 (file)
@@ -1,7 +1,6 @@
-# getline.m4 serial 18
+# getline.m4 serial 19
 
-dnl Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006, 2007 Free
-dnl Software Foundation, Inc.
+dnl Copyright (C) 1998-2003, 2005-2007, 2009 Free Software Foundation, Inc.
 dnl
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -10,7 +9,7 @@ dnl with or without modifications, as long as this notice is preserved.
 AC_PREREQ([2.59])
 
 dnl See if there's a working, system-supplied version of the getline function.
-dnl We can't just do AC_REPLACE_FUNCS(getline) because some systems
+dnl We can't just do AC_REPLACE_FUNCS([getline]) because some systems
 dnl have a function by that name in -linet that doesn't have anything
 dnl to do with the function we need.
 AC_DEFUN([gl_FUNC_GETLINE],
@@ -23,12 +22,12 @@ AC_DEFUN([gl_FUNC_GETLINE],
   AC_CHECK_DECLS_ONCE([getline])
 
   gl_getline_needs_run_time_check=no
-  AC_CHECK_FUNC(getline,
+  AC_CHECK_FUNC([getline],
                dnl Found it in some library.  Verify that it works.
                gl_getline_needs_run_time_check=yes,
                am_cv_func_working_getline=no)
   if test $gl_getline_needs_run_time_check = yes; then
-    AC_CACHE_CHECK([for working getline function], am_cv_func_working_getline,
+    AC_CACHE_CHECK([for working getline function], [am_cv_func_working_getline],
     [echo fooN |tr -d '\012'|tr N '\012' > conftest.data
     AC_TRY_RUN([
 #    include <stdio.h>
index 54348ce7c7c06f6a8a884ad6c99593292b9f8505..3b55ee48ec8d3c9b46ae3a6d3f841ff57d3822a3 100644 (file)
@@ -1,5 +1,5 @@
-# getpass.m4 serial 10
-dnl Copyright (C) 2002-2003, 2005-2006 Free Software Foundation, Inc.
+# getpass.m4 serial 11
+dnl Copyright (C) 2002-2003, 2005-2006, 2009 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.
@@ -7,8 +7,8 @@ dnl with or without modifications, as long as this notice is preserved.
 # Provide a getpass() function if the system doesn't have it.
 AC_DEFUN([gl_FUNC_GETPASS],
 [
-  AC_REPLACE_FUNCS(getpass)
-  AC_CHECK_DECLS_ONCE(getpass)
+  AC_REPLACE_FUNCS([getpass])
+  AC_CHECK_DECLS_ONCE([getpass])
   if test $ac_cv_func_getpass = no; then
     gl_PREREQ_GETPASS
   fi
@@ -18,9 +18,9 @@ AC_DEFUN([gl_FUNC_GETPASS],
 # arbitrary length (not just 8 bytes as on HP-UX).
 AC_DEFUN([gl_FUNC_GETPASS_GNU],
 [
-  AC_CHECK_DECLS_ONCE(getpass)
+  AC_CHECK_DECLS_ONCE([getpass])
   dnl TODO: Detect when GNU getpass() is already found in glibc.
-  AC_LIBOBJ(getpass)
+  AC_LIBOBJ([getpass])
   gl_PREREQ_GETPASS
   dnl We must choose a different name for our function, since on ELF systems
   dnl an unusable getpass() in libc.so would override our getpass() if it is
@@ -31,8 +31,8 @@ AC_DEFUN([gl_FUNC_GETPASS_GNU],
 
 # Prerequisites of lib/getpass.c.
 AC_DEFUN([gl_PREREQ_GETPASS], [
-  AC_CHECK_HEADERS_ONCE(stdio_ext.h termios.h)
-  AC_CHECK_FUNCS_ONCE(__fsetlocking tcgetattr tcsetattr)
+  AC_CHECK_HEADERS_ONCE([stdio_ext.h termios.h])
+  AC_CHECK_FUNCS_ONCE([__fsetlocking tcgetattr tcsetattr])
   AC_CHECK_DECLS([__fsetlocking],,,
     [#include <stdio.h>
      #if HAVE_STDIO_EXT_H
index b9bbb1081bcf18e1c322f4b1395f6c787f16a773..0fec7d42b7c7dfcca7f73e679b849b351d2b8315 100644 (file)
@@ -1,6 +1,6 @@
-#serial 11
+# serial 12
 
-# Copyright (C) 2001, 2002, 2003, 2005, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2001-2003, 2005, 2007, 2009 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -34,7 +34,7 @@ AC_DEFUN([gl_FUNC_GETTIMEOFDAY],
     REPLACE_GETTIMEOFDAY=1
     SYS_TIME_H=sys/time.h
     if test $gl_cv_func_gettimeofday_clobber != yes; then
-      AC_LIBOBJ(gettimeofday)
+      AC_LIBOBJ([gettimeofday])
       gl_PREREQ_GETTIMEOFDAY
     fi
   fi
@@ -80,13 +80,13 @@ AC_DEFUN([gl_FUNC_GETTIMEOFDAY_CLOBBER],
    REPLACE_GETTIMEOFDAY=1
    SYS_TIME_H=sys/time.h
    gl_GETTIMEOFDAY_REPLACE_LOCALTIME
-   AC_DEFINE([GETTIMEOFDAY_CLOBBERS_LOCALTIME], 1,
+   AC_DEFINE([GETTIMEOFDAY_CLOBBERS_LOCALTIME], [1],
      [Define if gettimeofday clobbers the localtime buffer.])
  fi
 ])
 
 AC_DEFUN([gl_GETTIMEOFDAY_REPLACE_LOCALTIME], [
-  AC_LIBOBJ(gettimeofday)
+  AC_LIBOBJ([gettimeofday])
   gl_PREREQ_GETTIMEOFDAY
   AC_DEFINE([gmtime], [rpl_gmtime],
     [Define to rpl_gmtime if the replacement function should be used.])
index c73db14cc561a07766d919a0916d1e8309636191..cfd1b99f82ed204e10cf865c4e3bb511a711c138 100644 (file)
@@ -1,5 +1,5 @@
-# gnulib-common.m4 serial 6
-dnl Copyright (C) 2007-2008 Free Software Foundation, Inc.
+# gnulib-common.m4 serial 8
+dnl Copyright (C) 2007-2009 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.
@@ -63,7 +63,7 @@ m4_ifdef([AC_PROG_MKDIR_P], [], [
 # works.
 # This definition can be removed once autoconf >= 2.62 can be assumed.
 AC_DEFUN([AC_C_RESTRICT],
-[AC_CACHE_CHECK([for C/C++ restrict keyword], ac_cv_c_restrict,
+[AC_CACHE_CHECK([for C/C++ restrict keyword], [ac_cv_c_restrict],
   [ac_cv_c_restrict=no
    # The order here caters to the fact that C++ does not require restrict.
    for ac_kw in __restrict __restrict__ _Restrict restrict; do
@@ -99,3 +99,12 @@ AC_DEFUN([AC_C_RESTRICT],
    *)  AC_DEFINE_UNQUOTED([restrict], [$ac_cv_c_restrict]) ;;
  esac
 ])
+
+# gl_BIGENDIAN
+# is like AC_C_BIGENDIAN, except that it can be AC_REQUIREd.
+# Note that AC_REQUIRE([AC_C_BIGENDIAN]) does not work reliably because some
+# macros invoke AC_C_BIGENDIAN with arguments.
+AC_DEFUN([gl_BIGENDIAN],
+[
+  AC_C_BIGENDIAN
+])
index 6f873063b95e0517e8f2fe13c0822b26a4152c9f..42bfc5e417796dc0da8c6d270b06a7165dde6a04 100644 (file)
@@ -1,5 +1,5 @@
-# inet_ntop.m4 serial 7
-dnl Copyright (C) 2005, 2006, 2008 Free Software Foundation, Inc.
+# inet_ntop.m4 serial 8
+dnl Copyright (C) 2005, 2006, 2008, 2009 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.
@@ -11,7 +11,7 @@ AC_DEFUN([gl_INET_NTOP],
 
   gl_REPLACE_ARPA_INET_H
 
-  AC_REPLACE_FUNCS(inet_ntop)
+  AC_REPLACE_FUNCS([inet_ntop])
   gl_PREREQ_INET_NTOP
 ])
 
index 06331e9dec4c89c89a0dccf3f0072a564c7d451c..e0ec432bc6e3e600608789f0d38162ee401e7004 100644 (file)
@@ -1,5 +1,5 @@
-# inet_pton.m4 serial 6
-dnl Copyright (C) 2006, 2008 Free Software Foundation, Inc.
+# inet_pton.m4 serial 7
+dnl Copyright (C) 2006, 2008, 2009 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.
@@ -11,7 +11,7 @@ AC_DEFUN([gl_INET_PTON],
 
   gl_REPLACE_ARPA_INET_H
 
-  AC_REPLACE_FUNCS(inet_pton)
+  AC_REPLACE_FUNCS([inet_pton])
   gl_PREREQ_INET_PTON
 ])
 
index 50ae35d223798bd24f5d664445dcec8719067ec4..264cb57184dc384c67591764196eecb59f859f4c 100644 (file)
@@ -1,12 +1,12 @@
-# intmax_t.m4 serial 6
-dnl Copyright (C) 1997-2004, 2006-2007 Free Software Foundation, Inc.
+# intmax_t.m4 serial 7
+dnl Copyright (C) 1997-2004, 2006-2007, 2009 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.
 
 dnl From Paul Eggert.
 
-AC_PREREQ(2.13)
+AC_PREREQ([2.13])
 
 # Define intmax_t to 'long' or 'long long'
 # if it is not already defined in <stdint.h> or <inttypes.h>.
@@ -22,10 +22,10 @@ AC_DEFUN([gl_AC_TYPE_INTMAX_T],
     test $ac_cv_type_long_long_int = yes \
       && ac_type='long long' \
       || ac_type='long'
-    AC_DEFINE_UNQUOTED(intmax_t, $ac_type,
+    AC_DEFINE_UNQUOTED([intmax_t], [$ac_type],
      [Define to long or long long if <inttypes.h> and <stdint.h> don't define.])
   else
-    AC_DEFINE(HAVE_INTMAX_T, 1,
+    AC_DEFINE([HAVE_INTMAX_T], [1],
       [Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.])
   fi
 ])
@@ -36,7 +36,7 @@ AC_DEFUN([gt_AC_TYPE_INTMAX_T],
 [
   AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
   AC_REQUIRE([gl_AC_HEADER_STDINT_H])
-  AC_CACHE_CHECK(for intmax_t, gt_cv_c_intmax_t,
+  AC_CACHE_CHECK([for intmax_t], [gt_cv_c_intmax_t],
     [AC_TRY_COMPILE([
 #include <stddef.h>
 #include <stdlib.h>
@@ -48,14 +48,14 @@ AC_DEFUN([gt_AC_TYPE_INTMAX_T],
 #endif
 ], [intmax_t x = -1; return !x;], gt_cv_c_intmax_t=yes, gt_cv_c_intmax_t=no)])
   if test $gt_cv_c_intmax_t = yes; then
-    AC_DEFINE(HAVE_INTMAX_T, 1,
+    AC_DEFINE([HAVE_INTMAX_T], [1],
       [Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.])
   else
     AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
     test $ac_cv_type_long_long_int = yes \
       && ac_type='long long' \
       || ac_type='long'
-    AC_DEFINE_UNQUOTED(intmax_t, $ac_type,
+    AC_DEFINE_UNQUOTED([intmax_t], [$ac_type],
      [Define to long or long long if <stdint.h> and <inttypes.h> don't define.])
   fi
 ])
index cf482d28750e9d41f2b8aef33538f2bf146ede6f..f4ca16021cf78da48bb7541c86d43ded2b4352c3 100644 (file)
@@ -1,5 +1,5 @@
-# inttypes_h.m4 serial 8
-dnl Copyright (C) 1997-2004, 2006, 2008 Free Software Foundation, Inc.
+# inttypes_h.m4 serial 9
+dnl Copyright (C) 1997-2004, 2006, 2008, 2009 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.
@@ -19,7 +19,7 @@ AC_DEFUN([gl_AC_HEADER_INTTYPES_H],
     [gl_cv_header_inttypes_h=yes],
     [gl_cv_header_inttypes_h=no])])
   if test $gl_cv_header_inttypes_h = yes; then
-    AC_DEFINE_UNQUOTED([HAVE_INTTYPES_H_WITH_UINTMAX], 1,
+    AC_DEFINE_UNQUOTED([HAVE_INTTYPES_H_WITH_UINTMAX], [1],
       [Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
        and declares uintmax_t. ])
   fi
index 96c4e2c3396c5d9193446f1893f1cdc4c4497344..e4863f2c9b76a6cc8a3979bb41244a615d194c84 100644 (file)
@@ -1,5 +1,5 @@
-# lib-ld.m4 serial 3 (gettext-0.13)
-dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
+# lib-ld.m4 serial 4 (gettext-0.18)
+dnl Copyright (C) 1996-2003, 2009 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.
@@ -10,7 +10,7 @@ dnl with libtool.m4.
 
 dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
 AC_DEFUN([AC_LIB_PROG_LD_GNU],
-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld],
 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
 case `$LD -v 2>&1 </dev/null` in
 *GNU* | *'with BFD'*)
@@ -23,7 +23,7 @@ with_gnu_ld=$acl_cv_prog_gnu_ld
 
 dnl From libtool-1.4. Sets the variable LD.
 AC_DEFUN([AC_LIB_PROG_LD],
-[AC_ARG_WITH(gnu-ld,
+[AC_ARG_WITH([gnu-ld],
 [  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
 AC_REQUIRE([AC_PROG_CC])dnl
@@ -77,7 +77,7 @@ elif test "$with_gnu_ld" = yes; then
 else
   AC_MSG_CHECKING([for non-GNU ld])
 fi
-AC_CACHE_VAL(acl_cv_path_LD,
+AC_CACHE_VAL([acl_cv_path_LD],
 [if test -z "$LD"; then
   IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
   for ac_dir in $PATH; do
@@ -101,9 +101,9 @@ else
 fi])
 LD="$acl_cv_path_LD"
 if test -n "$LD"; then
-  AC_MSG_RESULT($LD)
+  AC_MSG_RESULT([$LD])
 else
-  AC_MSG_RESULT(no)
+  AC_MSG_RESULT([no])
 fi
 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
 AC_LIB_PROG_LD_GNU
index e29eead27607533659b2b74323db66662d100d19..fcd3391bbcef44773f3fa8568a1aa2f87a8b0708 100644 (file)
@@ -1,12 +1,12 @@
-# lib-link.m4 serial 17 (gettext-0.18)
-dnl Copyright (C) 2001-2008 Free Software Foundation, Inc.
+# lib-link.m4 serial 18 (gettext-0.18)
+dnl Copyright (C) 2001-2009 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.
 
 dnl From Bruno Haible.
 
-AC_PREREQ(2.54)
+AC_PREREQ([2.54])
 
 dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
 dnl the libraries corresponding to explicit and implicit dependencies.
@@ -114,7 +114,7 @@ AC_DEFUN([AC_LIB_RPATH],
   AC_REQUIRE([AC_LIB_PROG_LD])            dnl we use $LD, $with_gnu_ld
   AC_REQUIRE([AC_CANONICAL_HOST])         dnl we use $host
   AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
-  AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
+  AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [
     CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
     ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
     . ./conftest.sh
@@ -131,7 +131,7 @@ AC_DEFUN([AC_LIB_RPATH],
   acl_hardcode_direct="$acl_cv_hardcode_direct"
   acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
   dnl Determine whether the user wants rpath handling at all.
-  AC_ARG_ENABLE(rpath,
+  AC_ARG_ENABLE([rpath],
     [  --disable-rpath         do not hardcode runtime library paths],
     :, enable_rpath=yes)
 ])
index 15bf9dacadb85b8802381eafddeb9fc6556c067d..eedc8d56826218e41849ce337e63964a968b7a1a 100644 (file)
@@ -1,5 +1,5 @@
-# longlong.m4 serial 13
-dnl Copyright (C) 1999-2007 Free Software Foundation, Inc.
+# longlong.m4 serial 14
+dnl Copyright (C) 1999-2007, 2009 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.
@@ -46,7 +46,7 @@ AC_DEFUN([AC_TYPE_LONG_LONG_INT],
          [ac_cv_type_long_long_int=yes])],
        [ac_cv_type_long_long_int=no])])
   if test $ac_cv_type_long_long_int = yes; then
-    AC_DEFINE([HAVE_LONG_LONG_INT], 1,
+    AC_DEFINE([HAVE_LONG_LONG_INT], [1],
       [Define to 1 if the system has the type `long long int'.])
   fi
 ])
@@ -69,7 +69,7 @@ AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT],
        [ac_cv_type_unsigned_long_long_int=yes],
        [ac_cv_type_unsigned_long_long_int=no])])
   if test $ac_cv_type_unsigned_long_long_int = yes; then
-    AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], 1,
+    AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], [1],
       [Define to 1 if the system has the type `unsigned long long int'.])
   fi
 ])
index 764f2a9fa199c24dd959ca2d0be0238825498a73..807017166ba35812585f8e41667b8181f4f20afa 100644 (file)
@@ -1,5 +1,5 @@
-# malloc.m4 serial 8
-dnl Copyright (C) 2007 Free Software Foundation, Inc.
+# malloc.m4 serial 9
+dnl Copyright (C) 2007, 2009 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.
@@ -13,7 +13,7 @@ AC_DEFUN([gl_FUNC_MALLOC_POSIX],
   AC_REQUIRE([gl_CHECK_MALLOC_POSIX])
   if test $gl_cv_func_malloc_posix = yes; then
     HAVE_MALLOC_POSIX=1
-    AC_DEFINE([HAVE_MALLOC_POSIX], 1,
+    AC_DEFINE([HAVE_MALLOC_POSIX], [1],
       [Define if the 'malloc' function is POSIX compliant.])
   else
     AC_LIBOBJ([malloc])
index bbd1ba0b84a8d42d2e7b4373f7ff9a715d1b156e..d2993fbaf78a91d458eb77e0352c981a1d0d5158 100644 (file)
@@ -1,10 +1,10 @@
-# minmax.m4 serial 2
-dnl Copyright (C) 2005 Free Software Foundation, Inc.
+# minmax.m4 serial 3
+dnl Copyright (C) 2005, 2009 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.
 
-AC_PREREQ(2.52)
+AC_PREREQ([2.52])
 
 AC_DEFUN([gl_MINMAX],
 [
index 474a635575f28cf0a4320789cb53e913cd30fc75..a1d4dadd7bb6819e7739162482fcc0b99cfc3567 100644 (file)
@@ -1,5 +1,5 @@
-# printf.m4 serial 25
-dnl Copyright (C) 2003, 2007-2008 Free Software Foundation, Inc.
+# printf.m4 serial 28
+dnl Copyright (C) 2003, 2007-2009 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.
@@ -225,12 +225,12 @@ AC_DEFUN([gl_PRINTF_INFINITE_LONG_DOUBLE],
 [
   AC_REQUIRE([gl_PRINTF_LONG_DOUBLE])
   AC_REQUIRE([AC_PROG_CC])
-  AC_REQUIRE([AC_C_BIGENDIAN])
+  AC_REQUIRE([gl_BIGENDIAN])
   AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
   dnl The user can set or unset the variable gl_printf_safe to indicate
   dnl that he wishes a safe handling of non-IEEE-754 'long double' values.
   if test -n "$gl_printf_safe"; then
-    AC_DEFINE([CHECK_PRINTF_SAFE], 1,
+    AC_DEFINE([CHECK_PRINTF_SAFE], [1],
       [Define if you wish *printf() functions that have a safe handling of
        non-IEEE-754 'long double' values.])
   fi
@@ -1142,7 +1142,7 @@ AC_DEFUN([gl_SNPRINTF_SIZE1],
 #include <stdio.h>
 int main()
 {
-  static char buf[8] = "DEADBEEF";
+  static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
   snprintf (buf, 1, "%d", 12345);
   return buf[1] != 'E';
 }],
@@ -1160,7 +1160,7 @@ dnl     ---------------------------------------------------------------------
 dnl     #include <stdio.h>
 dnl     int main()
 dnl     {
-dnl       static char buf[8] = "DEADBEEF";
+dnl       static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
 dnl       snprintf (buf, 0, "%d", 12345);
 dnl       return buf[0] != 'D';
 dnl     }
@@ -1181,7 +1181,7 @@ dnl       return ret;
 dnl     }
 dnl     int main()
 dnl     {
-dnl       static char buf[8] = "DEADBEEF";
+dnl       static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
 dnl       my_snprintf (buf, 0, "%d", 12345);
 dnl       return buf[0] != 'D';
 dnl     }
@@ -1209,7 +1209,7 @@ static int my_snprintf (char *buf, int size, const char *format, ...)
 }
 int main()
 {
-  static char buf[8] = "DEADBEEF";
+  static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
   my_snprintf (buf, 0, "%d", 12345);
   return buf[0] != 'D';
 }],
index 4c82a7fafef57329bfcb3a782602915eb5459cbf..60b0aa8fb0a5116af2233cf7535474eeb4436b8c 100644 (file)
@@ -1,5 +1,5 @@
-# readline.m4 serial 5
-dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+# readline.m4 serial 6
+dnl Copyright (C) 2005, 2006, 2009 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.
@@ -24,7 +24,7 @@ AC_DEFUN([gl_FUNC_READLINE],
   am_save_CPPFLAGS="$CPPFLAGS"
   AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCREADLINE])
 
-  AC_CACHE_CHECK(for readline, gl_cv_lib_readline, [
+  AC_CACHE_CHECK([for readline], [gl_cv_lib_readline], [
     gl_cv_lib_readline=no
     am_save_LIBS="$LIBS"
     dnl On some systems, -lreadline doesn't link without an additional
@@ -49,7 +49,7 @@ AC_DEFUN([gl_FUNC_READLINE],
   ])
 
   if test "$gl_cv_lib_readline" != no; then
-    AC_DEFINE(HAVE_READLINE, 1, [Define if you have the readline library.])
+    AC_DEFINE([HAVE_READLINE], [1], [Define if you have the readline library.])
     if test "$gl_cv_lib_readline" != " -l"; then
       LIBREADLINE="$LIBREADLINE$gl_cv_lib_readline"
       LTLIBREADLINE="$LTLIBREADLINE$gl_cv_lib_readline"
@@ -63,13 +63,13 @@ AC_DEFUN([gl_FUNC_READLINE],
     LIBREADLINE=
     LTLIBREADLINE=
   fi
-  AC_SUBST(LIBREADLINE)
-  AC_SUBST(LTLIBREADLINE)
+  AC_SUBST([LIBREADLINE])
+  AC_SUBST([LTLIBREADLINE])
 
-  AC_CHECK_HEADERS(readline/readline.h)
+  AC_CHECK_HEADERS([readline/readline.h])
 
   if test $gl_cv_lib_readline = no; then
-    AC_LIBOBJ(readline)
+    AC_LIBOBJ([readline])
     gl_PREREQ_READLINE
   fi
 ])
index f9fd935dbbde98f57212b8786a6cfbc3cc2cbe18..5925796864e033cb4e0794c9e751378f513b97c5 100644 (file)
@@ -1,5 +1,5 @@
-# realloc.m4 serial 8
-dnl Copyright (C) 2007 Free Software Foundation, Inc.
+# realloc.m4 serial 9
+dnl Copyright (C) 2007, 2009 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.
@@ -13,7 +13,7 @@ AC_DEFUN([gl_FUNC_REALLOC_POSIX],
   AC_REQUIRE([gl_CHECK_MALLOC_POSIX])
   if test $gl_cv_func_malloc_posix = yes; then
     HAVE_REALLOC_POSIX=1
-    AC_DEFINE([HAVE_REALLOC_POSIX], 1,
+    AC_DEFINE([HAVE_REALLOC_POSIX], [1],
       [Define if the 'realloc' function is POSIX compliant.])
   else
     AC_LIBOBJ([realloc])
index 124e777a5e0f5c4fb0a5a53e1c7e3fcdc8f8fad2..d5a7dbfb4b944cfe8604b33c0bcc67eefd7a363c 100644 (file)
@@ -1,5 +1,5 @@
-# sockets.m4 serial 3
-dnl Copyright (C) 2008 Free Software Foundation, Inc.
+# sockets.m4 serial 4
+dnl Copyright (C) 2008, 2009 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.
@@ -26,7 +26,7 @@ AC_DEFUN([gl_SOCKETS],
       LIBS="$gl_save_LIBS"
     ])
     if test "$gl_cv_func_wsastartup" = "yes"; then
-      AC_DEFINE([WINDOWS_SOCKETS], 1, [Define if WSAStartup is needed.])
+      AC_DEFINE([WINDOWS_SOCKETS], [1], [Define if WSAStartup is needed.])
       LIBSOCKET='-lws2_32'
     fi
   else
index 25d9755c5ea7b9a1f939fbfb22e5220fce6f24ed..99ea06f96f83fb77d40f5d1db4048d12dfb4ff37 100644 (file)
@@ -1,5 +1,5 @@
-# sockpfaf.m4 serial 5
-dnl Copyright (C) 2004, 2006 Free Software Foundation, Inc.
+# sockpfaf.m4 serial 6
+dnl Copyright (C) 2004, 2006, 2009 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.
@@ -16,8 +16,8 @@ AC_DEFUN([gl_SOCKET_FAMILIES],
   AC_REQUIRE([gl_HEADER_SYS_SOCKET])
   AC_CHECK_HEADERS_ONCE([netinet/in.h])
 
-  AC_MSG_CHECKING(for IPv4 sockets)
-  AC_CACHE_VAL(gl_cv_socket_ipv4,
+  AC_MSG_CHECKING([for IPv4 sockets])
+  AC_CACHE_VAL([gl_cv_socket_ipv4],
     [AC_TRY_COMPILE([#include <sys/types.h>
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
@@ -31,13 +31,13 @@ AC_DEFUN([gl_SOCKET_FAMILIES],
 [int x = AF_INET; struct in_addr y; struct sockaddr_in z;
  if (&x && &y && &z) return 0;],
        gl_cv_socket_ipv4=yes, gl_cv_socket_ipv4=no)])
-  AC_MSG_RESULT($gl_cv_socket_ipv4)
+  AC_MSG_RESULT([$gl_cv_socket_ipv4])
   if test $gl_cv_socket_ipv4 = yes; then
-    AC_DEFINE(HAVE_IPV4, 1, [Define to 1 if <sys/socket.h> defines AF_INET.])
+    AC_DEFINE([HAVE_IPV4], [1], [Define to 1 if <sys/socket.h> defines AF_INET.])
   fi
 
-  AC_MSG_CHECKING(for IPv6 sockets)
-  AC_CACHE_VAL(gl_cv_socket_ipv6,
+  AC_MSG_CHECKING([for IPv6 sockets])
+  AC_CACHE_VAL([gl_cv_socket_ipv6],
     [AC_TRY_COMPILE([#include <sys/types.h>
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
@@ -51,8 +51,8 @@ AC_DEFUN([gl_SOCKET_FAMILIES],
 [int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z;
  if (&x && &y && &z) return 0;],
        gl_cv_socket_ipv6=yes, gl_cv_socket_ipv6=no)])
-  AC_MSG_RESULT($gl_cv_socket_ipv6)
+  AC_MSG_RESULT([$gl_cv_socket_ipv6])
   if test $gl_cv_socket_ipv6 = yes; then
-    AC_DEFINE(HAVE_IPV6, 1, [Define to 1 if <sys/socket.h> defines AF_INET6.])
+    AC_DEFINE([HAVE_IPV6], [1], [Define to 1 if <sys/socket.h> defines AF_INET6.])
   fi
 ])
index 2204ecd98405be59e1a8ef52d6fbd464f61552f7..57c804a80ff7da006714ce54b11da37c58557faa 100644 (file)
@@ -1,6 +1,6 @@
 # Check for stdbool.h that conforms to C99.
 
-dnl Copyright (C) 2002-2006 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2009 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.
@@ -111,5 +111,5 @@ AC_DEFUN([AC_HEADER_STDBOOL],
        [ac_cv_header_stdbool_h=no])])
    AC_CHECK_TYPES([_Bool])
    if test $ac_cv_header_stdbool_h = yes; then
-     AC_DEFINE(HAVE_STDBOOL_H, 1, [Define to 1 if stdbool.h conforms to C99.])
+     AC_DEFINE([HAVE_STDBOOL_H], [1], [Define to 1 if stdbool.h conforms to C99.])
    fi])
index e507a02eb8a7f36e42830dd21e19af9f46776231..b4194c8adc129667a648e882d2381a8b971a9dd6 100644 (file)
@@ -1,5 +1,5 @@
-# stdint.m4 serial 32
-dnl Copyright (C) 2001-2008 Free Software Foundation, Inc.
+# stdint.m4 serial 33
+dnl Copyright (C) 2001-2009 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.
@@ -9,7 +9,7 @@ dnl Test whether <stdint.h> is supported or must be substituted.
 
 AC_DEFUN([gl_STDINT_H],
 [
-  AC_PREREQ(2.59)dnl
+  AC_PREREQ([2.59])dnl
 
   dnl Check for long long int and unsigned long long int.
   AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
@@ -229,7 +229,7 @@ struct s {
     gl_STDINT_TYPE_PROPERTIES
     STDINT_H=stdint.h
   fi
-  AC_SUBST(STDINT_H)
+  AC_SUBST([STDINT_H])
 ])
 
 dnl gl_STDINT_BITSIZEOF(TYPES, INCLUDES)
@@ -292,7 +292,7 @@ AC_DEFUN([gl_CHECK_TYPES_SIGNED],
     eval result=\$gl_cv_type_${gltype}_signed
     GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
     if test "$result" = yes; then
-      AC_DEFINE_UNQUOTED([HAVE_SIGNED_${GLTYPE}], 1)
+      AC_DEFINE_UNQUOTED([HAVE_SIGNED_${GLTYPE}], [1])
       eval HAVE_SIGNED_${GLTYPE}=1
     else
       eval HAVE_SIGNED_${GLTYPE}=0
@@ -348,7 +348,7 @@ AC_DEFUN([gl_INTEGER_TYPE_SUFFIX],
     eval result=\$gl_cv_type_${gltype}_suffix
     test "$result" = no && result=
     eval ${GLTYPE}_SUFFIX=\$result
-    AC_DEFINE_UNQUOTED([${GLTYPE}_SUFFIX], $result)
+    AC_DEFINE_UNQUOTED([${GLTYPE}_SUFFIX], [$result])
   done
   m4_foreach_w([gltype], [$1],
     [AC_SUBST(translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_])[_SUFFIX])])
index 2c8e6497993ebd4ef5b413aa07ee74f07a2b1454..82f0c244c8ee0c7a34de7b75fead88478e5bd08e 100644 (file)
@@ -1,5 +1,5 @@
-# stdint_h.m4 serial 7
-dnl Copyright (C) 1997-2004, 2006, 2008 Free Software Foundation, Inc.
+# stdint_h.m4 serial 8
+dnl Copyright (C) 1997-2004, 2006, 2008, 2009 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.
@@ -19,7 +19,7 @@ AC_DEFUN([gl_AC_HEADER_STDINT_H],
     [gl_cv_header_stdint_h=yes],
     [gl_cv_header_stdint_h=no])])
   if test $gl_cv_header_stdint_h = yes; then
-    AC_DEFINE_UNQUOTED([HAVE_STDINT_H_WITH_UINTMAX], 1,
+    AC_DEFINE_UNQUOTED([HAVE_STDINT_H_WITH_UINTMAX], [1],
       [Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
        and declares uintmax_t. ])
   fi
index 60b4bd791a2a36dba67e26864930d6cfa75a974c..846b65d302cbe5197c136ab96f019c88f6392d00 100644 (file)
@@ -1,5 +1,5 @@
-# stdio_h.m4 serial 14
-dnl Copyright (C) 2007-2008 Free Software Foundation, Inc.
+# stdio_h.m4 serial 15
+dnl Copyright (C) 2007-2009 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.
@@ -53,6 +53,8 @@ AC_DEFUN([gl_STDIO_H_DEFAULTS],
   GNULIB_VPRINTF_POSIX=0;        AC_SUBST([GNULIB_VPRINTF_POSIX])
   GNULIB_VSNPRINTF=0;            AC_SUBST([GNULIB_VSNPRINTF])
   GNULIB_VSPRINTF_POSIX=0;       AC_SUBST([GNULIB_VSPRINTF_POSIX])
+  GNULIB_DPRINTF=0;              AC_SUBST([GNULIB_DPRINTF])
+  GNULIB_VDPRINTF=0;             AC_SUBST([GNULIB_VDPRINTF])
   GNULIB_VASPRINTF=0;            AC_SUBST([GNULIB_VASPRINTF])
   GNULIB_OBSTACK_PRINTF=0;       AC_SUBST([GNULIB_OBSTACK_PRINTF])
   GNULIB_OBSTACK_PRINTF_POSIX=0; AC_SUBST([GNULIB_OBSTACK_PRINTF_POSIX])
@@ -86,6 +88,10 @@ AC_DEFUN([gl_STDIO_H_DEFAULTS],
   HAVE_DECL_VSNPRINTF=1;         AC_SUBST([HAVE_DECL_VSNPRINTF])
   REPLACE_SPRINTF=0;             AC_SUBST([REPLACE_SPRINTF])
   REPLACE_VSPRINTF=0;            AC_SUBST([REPLACE_VSPRINTF])
+  HAVE_DPRINTF=1;                AC_SUBST([HAVE_DPRINTF])
+  REPLACE_DPRINTF=0;             AC_SUBST([REPLACE_DPRINTF])
+  HAVE_VDPRINTF=1;               AC_SUBST([HAVE_VDPRINTF])
+  REPLACE_VDPRINTF=0;            AC_SUBST([REPLACE_VDPRINTF])
   HAVE_VASPRINTF=1;              AC_SUBST([HAVE_VASPRINTF])
   REPLACE_VASPRINTF=0;           AC_SUBST([REPLACE_VASPRINTF])
   HAVE_DECL_OBSTACK_PRINTF=1;    AC_SUBST([HAVE_DECL_OBSTACK_PRINTF])
index 56852736566ce565ac27a5a449a4d35d744fb743..ff9a4ea0a59f3c43d7c06bbc973fa5918c7bf11c 100644 (file)
@@ -1,5 +1,5 @@
-# unistd_h.m4 serial 16
-dnl Copyright (C) 2006-2008 Free Software Foundation, Inc.
+# unistd_h.m4 serial 17
+dnl Copyright (C) 2006-2009 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.
@@ -48,6 +48,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
   GNULIB_GETPAGESIZE=0;      AC_SUBST([GNULIB_GETPAGESIZE])
   GNULIB_GETUSERSHELL=0;     AC_SUBST([GNULIB_GETUSERSHELL])
   GNULIB_LCHOWN=0;           AC_SUBST([GNULIB_LCHOWN])
+  GNULIB_LINK=0;             AC_SUBST([GNULIB_LINK])
   GNULIB_LSEEK=0;            AC_SUBST([GNULIB_LSEEK])
   GNULIB_READLINK=0;         AC_SUBST([GNULIB_READLINK])
   GNULIB_SLEEP=0;            AC_SUBST([GNULIB_SLEEP])
@@ -63,6 +64,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
   HAVE_GETHOSTNAME=1;     AC_SUBST([HAVE_GETHOSTNAME])
   HAVE_GETPAGESIZE=1;     AC_SUBST([HAVE_GETPAGESIZE])
   HAVE_GETUSERSHELL=1;    AC_SUBST([HAVE_GETUSERSHELL])
+  HAVE_LINK=1;            AC_SUBST([HAVE_LINK])
   HAVE_READLINK=1;        AC_SUBST([HAVE_READLINK])
   HAVE_SLEEP=1;           AC_SUBST([HAVE_SLEEP])
   HAVE_DECL_ENVIRON=1;    AC_SUBST([HAVE_DECL_ENVIRON])
index 536258c06b3ccfca2192956674bfc2df9e867285..9e839d2bc8d096080b8e5f0c364a1ec70eb10869 100644 (file)
@@ -1,5 +1,5 @@
-# vasnprintf.m4 serial 25
-dnl Copyright (C) 2002-2004, 2006-2008 Free Software Foundation, Inc.
+# vasnprintf.m4 serial 26
+dnl Copyright (C) 2002-2004, 2006-2009 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,7 +20,7 @@ AC_DEFUN([gl_REPLACE_VASNPRINTF],
   AC_LIBOBJ([printf-parse])
   AC_LIBOBJ([asnprintf])
   if test $ac_cv_func_vasnprintf = yes; then
-    AC_DEFINE([REPLACE_VASNPRINTF], 1,
+    AC_DEFINE([REPLACE_VASNPRINTF], [1],
       [Define if vasnprintf exists but is overridden by gnulib.])
   fi
   gl_PREREQ_PRINTF_ARGS
@@ -58,7 +58,7 @@ AC_DEFUN([gl_PREREQ_VASNPRINTF],
   AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
   AC_REQUIRE([gt_TYPE_WCHAR_T])
   AC_REQUIRE([gt_TYPE_WINT_T])
-  AC_CHECK_FUNCS(snprintf wcslen)
+  AC_CHECK_FUNCS([snprintf wcslen])
   dnl Use the _snprintf function only if it is declared (because on NetBSD it
   dnl is defined as a weak alias of snprintf; we prefer to use the latter).
   AC_CHECK_DECLS([_snprintf], , , [#include <stdio.h>])
@@ -73,7 +73,7 @@ AC_DEFUN([gl_PREREQ_VASNPRINTF_LONG_DOUBLE],
     *yes)
       ;;
     *)
-      AC_DEFINE([NEED_PRINTF_LONG_DOUBLE], 1,
+      AC_DEFINE([NEED_PRINTF_LONG_DOUBLE], [1],
         [Define if the vasnprintf implementation needs special code for
          'long double' arguments.])
       ;;
@@ -89,7 +89,7 @@ AC_DEFUN([gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE],
     *yes)
       ;;
     *)
-      AC_DEFINE([NEED_PRINTF_INFINITE_DOUBLE], 1,
+      AC_DEFINE([NEED_PRINTF_INFINITE_DOUBLE], [1],
         [Define if the vasnprintf implementation needs special code for
          infinite 'double' arguments.])
       ;;
@@ -110,7 +110,7 @@ AC_DEFUN([gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE],
         *yes)
           ;;
         *)
-          AC_DEFINE([NEED_PRINTF_INFINITE_LONG_DOUBLE], 1,
+          AC_DEFINE([NEED_PRINTF_INFINITE_LONG_DOUBLE], [1],
             [Define if the vasnprintf implementation needs special code for
              infinite 'long double' arguments.])
           ;;
@@ -127,7 +127,7 @@ AC_DEFUN([gl_PREREQ_VASNPRINTF_DIRECTIVE_A],
     *yes)
       ;;
     *)
-      AC_DEFINE([NEED_PRINTF_DIRECTIVE_A], 1,
+      AC_DEFINE([NEED_PRINTF_DIRECTIVE_A], [1],
         [Define if the vasnprintf implementation needs special code for
          the 'a' and 'A' directives.])
       AC_CHECK_FUNCS([nl_langinfo])
@@ -143,7 +143,7 @@ AC_DEFUN([gl_PREREQ_VASNPRINTF_DIRECTIVE_F],
     *yes)
       ;;
     *)
-      AC_DEFINE([NEED_PRINTF_DIRECTIVE_F], 1,
+      AC_DEFINE([NEED_PRINTF_DIRECTIVE_F], [1],
         [Define if the vasnprintf implementation needs special code for
          the 'F' directive.])
       ;;
@@ -158,7 +158,7 @@ AC_DEFUN([gl_PREREQ_VASNPRINTF_FLAG_GROUPING],
     *yes)
       ;;
     *)
-      AC_DEFINE([NEED_PRINTF_FLAG_GROUPING], 1,
+      AC_DEFINE([NEED_PRINTF_FLAG_GROUPING], [1],
         [Define if the vasnprintf implementation needs special code for the
          ' flag.])
       ;;
@@ -173,7 +173,7 @@ AC_DEFUN([gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST],
     *yes)
       ;;
     *)
-      AC_DEFINE([NEED_PRINTF_FLAG_LEFTADJUST], 1,
+      AC_DEFINE([NEED_PRINTF_FLAG_LEFTADJUST], [1],
         [Define if the vasnprintf implementation needs special code for the
          '-' flag.])
       ;;
@@ -188,7 +188,7 @@ AC_DEFUN([gl_PREREQ_VASNPRINTF_FLAG_ZERO],
     *yes)
       ;;
     *)
-      AC_DEFINE([NEED_PRINTF_FLAG_ZERO], 1,
+      AC_DEFINE([NEED_PRINTF_FLAG_ZERO], [1],
         [Define if the vasnprintf implementation needs special code for the
          0 flag.])
       ;;
@@ -203,13 +203,13 @@ AC_DEFUN([gl_PREREQ_VASNPRINTF_PRECISION],
     *yes)
       ;;
     *)
-      AC_DEFINE([NEED_PRINTF_UNBOUNDED_PRECISION], 1,
+      AC_DEFINE([NEED_PRINTF_UNBOUNDED_PRECISION], [1],
         [Define if the vasnprintf implementation needs special code for
          supporting large precisions without arbitrary bounds.])
-      AC_DEFINE([NEED_PRINTF_DOUBLE], 1,
+      AC_DEFINE([NEED_PRINTF_DOUBLE], [1],
         [Define if the vasnprintf implementation needs special code for
          'double' arguments.])
-      AC_DEFINE([NEED_PRINTF_LONG_DOUBLE], 1,
+      AC_DEFINE([NEED_PRINTF_LONG_DOUBLE], [1],
         [Define if the vasnprintf implementation needs special code for
          'long double' arguments.])
       ;;
@@ -225,13 +225,13 @@ AC_DEFUN([gl_PREREQ_VASNPRINTF_ENOMEM],
     *yes)
       ;;
     *)
-      AC_DEFINE([NEED_PRINTF_ENOMEM], 1,
+      AC_DEFINE([NEED_PRINTF_ENOMEM], [1],
         [Define if the vasnprintf implementation needs special code for
          surviving out-of-memory conditions.])
-      AC_DEFINE([NEED_PRINTF_DOUBLE], 1,
+      AC_DEFINE([NEED_PRINTF_DOUBLE], [1],
         [Define if the vasnprintf implementation needs special code for
          'double' arguments.])
-      AC_DEFINE([NEED_PRINTF_LONG_DOUBLE], 1,
+      AC_DEFINE([NEED_PRINTF_LONG_DOUBLE], [1],
         [Define if the vasnprintf implementation needs special code for
          'long double' arguments.])
       ;;
index 3c81564adc60a207525772c6ef5feacbc41bee73..fb27a7f65f46e0f23b883d01e9e74f84e13595b5 100644 (file)
@@ -1,5 +1,5 @@
-# wchar_t.m4 serial 2 (gettext-0.18)
-dnl Copyright (C) 2002-2003, 2008 Free Software Foundation, Inc.
+# wchar_t.m4 serial 3 (gettext-0.18)
+dnl Copyright (C) 2002-2003, 2008, 2009 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.
@@ -15,6 +15,6 @@ AC_DEFUN([gt_TYPE_WCHAR_T],
        wchar_t foo = (wchar_t)'\0';], ,
        [gt_cv_c_wchar_t=yes], [gt_cv_c_wchar_t=no])])
   if test $gt_cv_c_wchar_t = yes; then
-    AC_DEFINE([HAVE_WCHAR_T], 1, [Define if you have the 'wchar_t' type.])
+    AC_DEFINE([HAVE_WCHAR_T], [1], [Define if you have the 'wchar_t' type.])
   fi
 ])
index 0026a13188f42ae85bf83978a6b67746e78ab9f3..47a4363d79041b6481ed781bcbe798dc1b171ec9 100644 (file)
@@ -1,5 +1,5 @@
-# wint_t.m4 serial 3 (gettext-0.18)
-dnl Copyright (C) 2003, 2007-2008 Free Software Foundation, Inc.
+# wint_t.m4 serial 4 (gettext-0.18)
+dnl Copyright (C) 2003, 2007-2009 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.
@@ -23,6 +23,6 @@ AC_DEFUN([gt_TYPE_WINT_T],
        wint_t foo = (wchar_t)'\0';], ,
        [gt_cv_c_wint_t=yes], [gt_cv_c_wint_t=no])])
   if test $gt_cv_c_wint_t = yes; then
-    AC_DEFINE([HAVE_WINT_T], 1, [Define if you have the 'wint_t' type.])
+    AC_DEFINE([HAVE_WINT_T], [1], [Define if you have the 'wint_t' type.])
   fi
 ])
index 2b77a5883c8e154bb7585fbd97080f1af1c756b6..9854b5e7ccbb73cbac054802940a55528b61fbac 100644 (file)
@@ -1,5 +1,5 @@
 /* Program name management.
-   Copyright (C) 2001-2003, 2005-2008 Free Software Foundation, Inc.
+   Copyright (C) 2001-2003, 2005-2009 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software: you can redistribute it and/or modify
@@ -35,6 +35,8 @@ set_program_name (const char *argv0)
 {
   /* libtool creates a temporary executable whose name is sometimes prefixed
      with "lt-" (depends on the platform).  It also makes argv[0] absolute.
+     But the name of the temporary executable is a detail that should not be
+     visible to the end user and to the test suite.
      Remove this "<dirname>/.libs/" or "<dirname>/.libs/lt-" prefix here.  */
   const char *slash;
   const char *base;
@@ -47,5 +49,15 @@ set_program_name (const char *argv0)
       if (strncmp (base, "lt-", 3) == 0)
        argv0 = base + 3;
     }
+
+  /* But don't strip off a leading <dirname>/ in general, because when the user
+     runs
+         /some/hidden/place/bin/cp foo foo
+     he should get the error message
+         /some/hidden/place/bin/cp: `foo' and `foo' are the same file
+     not
+         cp: `foo' and `foo' are the same file
+   */
+
   program_name = argv0;
 }
index f8218c8537555bc20284163fb815a48571e5d8a1..f141c8f606dfc0d8ca5b8c0b1418d2f8784fbcf4 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2002, 2004-2008 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2002, 2004-2009 Free Software Foundation, Inc.
    Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood.
    This file is part of gnulib.
 
@@ -478,7 +478,9 @@ typedef int _verify_intmax_size[2 * (sizeof (intmax_t) == sizeof (uintmax_t)) -
    includes <wchar.h> -> <stdio.h> -> <getopt.h> -> <stdlib.h>, and the latter includes
    <stdint.h> and assumes its types are already defined.  */
 #if ! (defined WCHAR_MIN && defined WCHAR_MAX)
+# define _GL_JUST_INCLUDE_SYSTEM_WCHAR_H
 # include <wchar.h>
+# undef _GL_JUST_INCLUDE_SYSTEM_WCHAR_H
 #endif
 #undef WCHAR_MIN
 #undef WCHAR_MAX
index 96cb25737ef8eb0360727cc9d7ef2c7e216129a4..cb273d76421db32e3e17c1bda0bcfa45494da496 100644 (file)
@@ -216,6 +216,38 @@ extern int vsprintf (char *str, const char *format, va_list args)
      vsprintf (b, f, a))
 #endif
 
+#if @GNULIB_DPRINTF@
+# if @REPLACE_DPRINTF@
+#  define dprintf rpl_dprintf
+# endif
+# if @REPLACE_DPRINTF@ || !@HAVE_DPRINTF@
+extern int dprintf (int fd, const char *format, ...)
+       __attribute__ ((__format__ (__printf__, 2, 3)));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef dprintf
+# define dprintf(d,f,a) \
+    (GL_LINK_WARNING ("dprintf is unportable - " \
+                      "use gnulib module dprintf for portability"), \
+     dprintf (d, f, a))
+#endif
+
+#if @GNULIB_VDPRINTF@
+# if @REPLACE_VDPRINTF@
+#  define vdprintf rpl_vdprintf
+# endif
+# if @REPLACE_VDPRINTF@ || !@HAVE_VDPRINTF@
+extern int vdprintf (int fd, const char *format, va_list args)
+       __attribute__ ((__format__ (__printf__, 2, 0)));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef vdprintf
+# define vdprintf(d,f,a) \
+    (GL_LINK_WARNING ("vdprintf is unportable - " \
+                      "use gnulib module vdprintf for portability"), \
+     vdprintf (d, f, a))
+#endif
+
 #if @GNULIB_VASPRINTF@
 # if @REPLACE_VASPRINTF@
 #  define asprintf rpl_asprintf
index 787575fda58fd380fa70d28b0e6a941dc151f013..798d854005e99f46b0b8800f0ee654f04d4ac37e 100644 (file)
@@ -1,6 +1,6 @@
 /* strerror.c --- POSIX compatible system error routine
 
-   Copyright (C) 2007-2008 Free Software Foundation, Inc.
+   Copyright (C) 2007-2009 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 char *
 rpl_strerror (int n)
 {
+  char const *msg = NULL;
   /* These error messages are taken from glibc/sysdeps/gnu/errlist.c.  */
   switch (n)
     {
 # if GNULIB_defined_ETXTBSY
     case ETXTBSY:
-      return "Text file busy";
+      msg = "Text file busy";
+      break;
 # endif
 
 # if GNULIB_defined_ESOCK /* native Windows platforms */
     /* EWOULDBLOCK is the same as EAGAIN.  */
     case EINPROGRESS:
-      return "Operation now in progress";
+      msg = "Operation now in progress";
+      break;
     case EALREADY:
-      return "Operation already in progress";
+      msg = "Operation already in progress";
+      break;
     case ENOTSOCK:
-      return "Socket operation on non-socket";
+      msg = "Socket operation on non-socket";
+      break;
     case EDESTADDRREQ:
-      return "Destination address required";
+      msg = "Destination address required";
+      break;
     case EMSGSIZE:
-      return "Message too long";
+      msg = "Message too long";
+      break;
     case EPROTOTYPE:
-      return "Protocol wrong type for socket";
+      msg = "Protocol wrong type for socket";
+      break;
     case ENOPROTOOPT:
-      return "Protocol not available";
+      msg = "Protocol not available";
+      break;
     case EPROTONOSUPPORT:
-      return "Protocol not supported";
+      msg = "Protocol not supported";
+      break;
     case ESOCKTNOSUPPORT:
-      return "Socket type not supported";
+      msg = "Socket type not supported";
+      break;
     case EOPNOTSUPP:
-      return "Operation not supported";
+      msg = "Operation not supported";
+      break;
     case EPFNOSUPPORT:
-      return "Protocol family not supported";
+      msg = "Protocol family not supported";
+      break;
     case EAFNOSUPPORT:
-      return "Address family not supported by protocol";
+      msg = "Address family not supported by protocol";
+      break;
     case EADDRINUSE:
-      return "Address already in use";
+      msg = "Address already in use";
+      break;
     case EADDRNOTAVAIL:
-      return "Cannot assign requested address";
+      msg = "Cannot assign requested address";
+      break;
     case ENETDOWN:
-      return "Network is down";
+      msg = "Network is down";
+      break;
     case ENETUNREACH:
-      return "Network is unreachable";
+      msg = "Network is unreachable";
+      break;
     case ENETRESET:
-      return "Network dropped connection on reset";
+      msg = "Network dropped connection on reset";
+      break;
     case ECONNABORTED:
-      return "Software caused connection abort";
+      msg = "Software caused connection abort";
+      break;
     case ECONNRESET:
-      return "Connection reset by peer";
+      msg = "Connection reset by peer";
+      break;
     case ENOBUFS:
-      return "No buffer space available";
+      msg = "No buffer space available";
+      break;
     case EISCONN:
-      return "Transport endpoint is already connected";
+      msg = "Transport endpoint is already connected";
+      break;
     case ENOTCONN:
-      return "Transport endpoint is not connected";
+      msg = "Transport endpoint is not connected";
+      break;
     case ESHUTDOWN:
-      return "Cannot send after transport endpoint shutdown";
+      msg = "Cannot send after transport endpoint shutdown";
+      break;
     case ETOOMANYREFS:
-      return "Too many references: cannot splice";
+      msg = "Too many references: cannot splice";
+      break;
     case ETIMEDOUT:
-      return "Connection timed out";
+      msg = "Connection timed out";
+      break;
     case ECONNREFUSED:
-      return "Connection refused";
+      msg = "Connection refused";
+      break;
     case ELOOP:
-      return "Too many levels of symbolic links";
+      msg = "Too many levels of symbolic links";
+      break;
     case EHOSTDOWN:
-      return "Host is down";
+      msg = "Host is down";
+      break;
     case EHOSTUNREACH:
-      return "No route to host";
+      msg = "No route to host";
+      break;
     case EPROCLIM:
-      return "Too many processes";
+      msg = "Too many processes";
+      break;
     case EUSERS:
-      return "Too many users";
+      msg = "Too many users";
+      break;
     case EDQUOT:
-      return "Disk quota exceeded";
+      msg = "Disk quota exceeded";
+      break;
     case ESTALE:
-      return "Stale NFS file handle";
+      msg = "Stale NFS file handle";
+      break;
     case EREMOTE:
-      return "Object is remote";
+      msg = "Object is remote";
+      break;
 #  if HAVE_WINSOCK2_H
     /* WSA_INVALID_HANDLE maps to EBADF */
     /* WSA_NOT_ENOUGH_MEMORY maps to ENOMEM */
     /* WSA_INVALID_PARAMETER maps to EINVAL */
     case WSA_OPERATION_ABORTED:
-      return "Overlapped operation aborted";
+      msg = "Overlapped operation aborted";
+      break;
     case WSA_IO_INCOMPLETE:
-      return "Overlapped I/O event object not in signaled state";
+      msg = "Overlapped I/O event object not in signaled state";
+      break;
     case WSA_IO_PENDING:
-      return "Overlapped operations will complete later";
+      msg = "Overlapped operations will complete later";
+      break;
     /* WSAEINTR maps to EINTR */
     /* WSAEBADF maps to EBADF */
     /* WSAEACCES maps to EACCES */
@@ -172,98 +211,127 @@ rpl_strerror (int n)
     /* WSAESTALE is ESTALE */
     /* WSAEREMOTE is EREMOTE */
     case WSASYSNOTREADY:
-      return "Network subsystem is unavailable";
+      msg = "Network subsystem is unavailable";
+      break;
     case WSAVERNOTSUPPORTED:
-      return "Winsock.dll version out of range";
+      msg = "Winsock.dll version out of range";
+      break;
     case WSANOTINITIALISED:
-      return "Successful WSAStartup not yet performed";
+      msg = "Successful WSAStartup not yet performed";
+      break;
     case WSAEDISCON:
-      return "Graceful shutdown in progress";
+      msg = "Graceful shutdown in progress";
+      break;
     case WSAENOMORE: case WSA_E_NO_MORE:
-      return "No more results";
+      msg = "No more results";
+      break;
     case WSAECANCELLED: case WSA_E_CANCELLED:
-      return "Call was canceled";
+      msg = "Call was canceled";
+      break;
     case WSAEINVALIDPROCTABLE:
-      return "Procedure call table is invalid";
+      msg = "Procedure call table is invalid";
+      break;
     case WSAEINVALIDPROVIDER:
-      return "Service provider is invalid";
+      msg = "Service provider is invalid";
+      break;
     case WSAEPROVIDERFAILEDINIT:
-      return "Service provider failed to initialize";
+      msg = "Service provider failed to initialize";
+      break;
     case WSASYSCALLFAILURE:
-      return "System call failure";
+      msg = "System call failure";
+      break;
     case WSASERVICE_NOT_FOUND:
-      return "Service not found";
+      msg = "Service not found";
+      break;
     case WSATYPE_NOT_FOUND:
-      return "Class type not found";
+      msg = "Class type not found";
+      break;
     case WSAEREFUSED:
-      return "Database query was refused";
+      msg = "Database query was refused";
+      break;
     case WSAHOST_NOT_FOUND:
-      return "Host not found";
+      msg = "Host not found";
+      break;
     case WSATRY_AGAIN:
-      return "Nonauthoritative host not found";
+      msg = "Nonauthoritative host not found";
+      break;
     case WSANO_RECOVERY:
-      return "Nonrecoverable error";
+      msg = "Nonrecoverable error";
+      break;
     case WSANO_DATA:
-      return "Valid name, no data record of requested type";
+      msg = "Valid name, no data record of requested type";
+      break;
     /* WSA_QOS_* omitted */
 #  endif
 # endif
 
 # if GNULIB_defined_ENOMSG
     case ENOMSG:
-      return "No message of desired type";
+      msg = "No message of desired type";
+      break;
 # endif
 
 # if GNULIB_defined_EIDRM
     case EIDRM:
-      return "Identifier removed";
+      msg = "Identifier removed";
+      break;
 # endif
 
 # if GNULIB_defined_ENOLINK
     case ENOLINK:
-      return "Link has been severed";
+      msg = "Link has been severed";
+      break;
 # endif
 
 # if GNULIB_defined_EPROTO
     case EPROTO:
-      return "Protocol error";
+      msg = "Protocol error";
+      break;
 # endif
 
 # if GNULIB_defined_EMULTIHOP
     case EMULTIHOP:
-      return "Multihop attempted";
+      msg = "Multihop attempted";
+      break;
 # endif
 
 # if GNULIB_defined_EBADMSG
     case EBADMSG:
-      return "Bad message";
+      msg = "Bad message";
+      break;
 # endif
 
 # if GNULIB_defined_EOVERFLOW
     case EOVERFLOW:
-      return "Value too large for defined data type";
+      msg = "Value too large for defined data type";
+      break;
 # endif
 
 # if GNULIB_defined_ENOTSUP
     case ENOTSUP:
-      return "Not supported";
+      msg = "Not supported";
+      break;
 # endif
 
 # if GNULIB_defined_
     case ECANCELED:
-      return "Operation canceled";
+      msg = "Operation canceled";
+      break;
 # endif
     }
 
+  if (msg)
+    return (char *) msg;
+
   {
     char *result = strerror (n);
 
     if (result == NULL || result[0] == '\0')
       {
        static char const fmt[] = "Unknown error (%d)";
-       static char mesg[sizeof fmt + INT_STRLEN_BOUND (n)];
-       sprintf (mesg, fmt, n);
-       return mesg;
+       static char msg_buf[sizeof fmt + INT_STRLEN_BOUND (n)];
+       sprintf (msg_buf, fmt, n);
+       return msg_buf;
       }
 
     return result;
index 3748c261c8a1b07f9dd916ee57f16ca1e5845c5d..1e6294da89138167309ad92a03c1870efe7b5c63 100644 (file)
@@ -1,5 +1,5 @@
 /* Provide a more complete sys/stat header file.
-   Copyright (C) 2005-2008 Free Software Foundation, Inc.
+   Copyright (C) 2005-2009 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -35,6 +35,9 @@
 
 #ifndef _GL_SYS_STAT_H
 
+/* Get nlink_t.  */
+#include <sys/types.h>
+
 /* The include_next requires a split double-inclusion guard.  */
 #@INCLUDE_NEXT@ @NEXT_SYS_STAT_H@
 
index 88295ce6a892f87c3b38f11f1b8307265f92418c..eb6bf9c126762b5aef8d99a624da1efacf888f93 100644 (file)
 static struct tm tm_zero_buffer;
 static struct tm *localtime_buffer_addr = &tm_zero_buffer;
 
+#undef localtime
+extern struct tm *localtime (time_t const *);
+
+#undef gmtime
+extern struct tm *gmtime (time_t const *);
+
 /* This is a wrapper for localtime.  It is used only on systems for which
    gettimeofday clobbers the static buffer used for localtime's result.
 
@@ -50,8 +56,6 @@ static struct tm *localtime_buffer_addr = &tm_zero_buffer;
 struct tm *
 rpl_localtime (time_t const *timep)
 {
-#undef localtime
-  extern struct tm *localtime (time_t const *);
   struct tm *tm = localtime (timep);
 
   if (localtime_buffer_addr == &tm_zero_buffer)
@@ -64,8 +68,6 @@ rpl_localtime (time_t const *timep)
 struct tm *
 rpl_gmtime (time_t const *timep)
 {
-#undef gmtime
-  extern struct tm *gmtime (time_t const *);
   struct tm *tm = gmtime (timep);
 
   if (localtime_buffer_addr == &tm_zero_buffer)
@@ -77,14 +79,15 @@ rpl_gmtime (time_t const *timep)
 #endif /* GETTIMEOFDAY_CLOBBERS_LOCALTIME || TZSET_CLOBBERS_LOCALTIME */
 
 #if TZSET_CLOBBERS_LOCALTIME
+
+#undef tzset
+extern void tzset (void);
+
 /* This is a wrapper for tzset, for systems on which tzset may clobber
    the static buffer used for localtime's result.  */
 void
 rpl_tzset (void)
 {
-#undef tzset
-  extern void tzset (void);
-
   /* Save and restore the contents of the buffer used for localtime's
      result around the call to tzset.  */
   struct tm save = *localtime_buffer_addr;
index a23d363bc508784c357c0f7548daba1229dbfabc..75ed5c06f48f93675fddf36e22245022e87f7506 100644 (file)
@@ -1,6 +1,6 @@
 /* ioctl.c --- wrappers for Windows ioctl function
 
-   Copyright (C) 2008 Free Software Foundation, Inc.
+   Copyright (C) 2008, 2009 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -19,6 +19,8 @@
 
 #include <config.h>
 
+#include <sys/ioctl.h>
+
 #include <stdarg.h>
 
 #define WIN32_LEAN_AND_MEAN
index dc15bda0df527e905b9456e98aa68f5e8e51ca86..5fed15cf9fd8fdcc50b4ad7bb63ceef4d9b94cac 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of <unistd.h> substitute.
-   Copyright (C) 2007 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 /* Check that the various SEEK_* macros are defined.  */
 int sk[] = { SEEK_CUR, SEEK_END, SEEK_SET };
 
+/* Check that the various *_FILENO macros are defined.  */
+#if ! (defined STDIN_FILENO                                     \
+       && (STDIN_FILENO + STDOUT_FILENO + STDERR_FILENO == 3))
+missing or broken *_FILENO macros
+#endif
+
 /* Check that the types are all defined.  */
 size_t t1;
 ssize_t t2;
index 1b2f80ee18c29fd6ee1c3faeda95e0f547398755..f0a674079da8951b31d113efd659c46cfb75f6cc 100644 (file)
@@ -1,5 +1,5 @@
 /* Substitute for and wrapper around <unistd.h>.
-   Copyright (C) 2003-2008 Free Software Foundation, Inc.
+   Copyright (C) 2003-2009 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -29,7 +29,7 @@
 #ifndef _GL_UNISTD_H
 #define _GL_UNISTD_H
 
-/* mingw doesn't define the SEEK_* macros in <unistd.h>.  */
+/* mingw doesn't define the SEEK_* or *_FILENO macros in <unistd.h>.  */
 #if !(defined SEEK_CUR && defined SEEK_END && defined SEEK_SET)
 # include <stdio.h>
 #endif
 /* The definition of GL_LINK_WARNING is copied here.  */
 
 
+/* OS/2 EMX lacks these macros.  */
+#ifndef STDIN_FILENO
+# define STDIN_FILENO 0
+#endif
+#ifndef STDOUT_FILENO
+# define STDOUT_FILENO 1
+#endif
+#ifndef STDERR_FILENO
+# define STDERR_FILENO 2
+#endif
+
 /* Declare overridden functions.  */
 
 #ifdef __cplusplus
@@ -475,6 +486,23 @@ extern int lchown (char const *file, uid_t owner, gid_t group);
 #endif
 
 
+#if @GNULIB_LINK@
+/* Create a new hard link for an existing file.
+   Return 0 if successful, otherwise -1 and errno set.
+   See POSIX:2001 specification
+   <http://www.opengroup.org/susv3xsh/link.html>.  */
+# if !@HAVE_LINK@
+extern int link (const char *path1, const char *path2);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef link
+# define link(path1,path2) \
+    (GL_LINK_WARNING ("link is unportable - " \
+                      "use gnulib module link for portability"), \
+     link (path1, path2))
+#endif
+
+
 #if @GNULIB_LSEEK@
 # if @REPLACE_LSEEK@
 /* Set the offset of FD relative to SEEK_SET, SEEK_CUR, or SEEK_END.
index f8b9948f7473fee17a358a57cad87a3dabc399b4..cc436b14b0386eda6a4d9efd8e34e905201132e8 100644 (file)
@@ -1,6 +1,6 @@
 /* A substitute for ISO C99 <wchar.h>, for platforms that have issues.
 
-   Copyright (C) 2007-2008 Free Software Foundation, Inc.
+   Copyright (C) 2007-2009 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 @PRAGMA_SYSTEM_HEADER@
 #endif
 
-#ifdef __need_mbstate_t
-/* Special invocation convention inside uClibc header files.  */
+#if defined __need_mbstate_t || (defined __hpux && ((defined _INTTYPES_INCLUDED && !defined strtoimax) || defined _GL_JUST_INCLUDE_SYSTEM_WCHAR_H)) || defined _GL_ALREADY_INCLUDING_WCHAR_H
+/* Special invocation convention:
+   - Inside uClibc header files.
+   - On HP-UX 11.00 we have a sequence of nested includes
+     <wchar.h> -> <stdlib.h> -> <stdint.h>, and the latter includes <wchar.h>,
+     once indirectly <stdint.h> -> <sys/types.h> -> <inttypes.h> -> <wchar.h>
+     and once directly.  In both situations 'wint_t' is not yet defined,
+     therefore we cannot provide the function overrides; instead include only
+     the system's <wchar.h>.
+   - On IRIX 6.5, similarly, we have an include <wchar.h> -> <wctype.h>, and
+     the latter includes <wchar.h>.  But here, we have no way to detect whether
+     <wctype.h> is completely included or is still being included.  */
 
 #@INCLUDE_NEXT@ @NEXT_WCHAR_H@
 
@@ -40,6 +50,8 @@
 
 #ifndef _GL_WCHAR_H
 
+#define _GL_ALREADY_INCLUDING_WCHAR_H
+
 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
    <wchar.h>.
    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
@@ -55,6 +67,8 @@
 # @INCLUDE_NEXT@ @NEXT_WCHAR_H@
 #endif
 
+#undef _GL_ALREADY_INCLUDING_WCHAR_H
+
 #ifndef _GL_WCHAR_H
 #define _GL_WCHAR_H
 
index a65da22f4e0e2721085f41d714de39980b7900dd..09ddad4f4a0a73b7d1327fcf012ec71fb996dca3 100644 (file)
@@ -356,6 +356,8 @@ stdio.h: stdio.in.h
              -e 's|@''GNULIB_VPRINTF_POSIX''@|$(GNULIB_VPRINTF_POSIX)|g' \
              -e 's|@''GNULIB_VSNPRINTF''@|$(GNULIB_VSNPRINTF)|g' \
              -e 's|@''GNULIB_VSPRINTF_POSIX''@|$(GNULIB_VSPRINTF_POSIX)|g' \
+             -e 's|@''GNULIB_DPRINTF''@|$(GNULIB_DPRINTF)|g' \
+             -e 's|@''GNULIB_VDPRINTF''@|$(GNULIB_VDPRINTF)|g' \
              -e 's|@''GNULIB_VASPRINTF''@|$(GNULIB_VASPRINTF)|g' \
              -e 's|@''GNULIB_OBSTACK_PRINTF''@|$(GNULIB_OBSTACK_PRINTF)|g' \
              -e 's|@''GNULIB_OBSTACK_PRINTF_POSIX''@|$(GNULIB_OBSTACK_PRINTF_POSIX)|g' \
@@ -388,6 +390,10 @@ stdio.h: stdio.in.h
              -e 's|@''HAVE_DECL_VSNPRINTF''@|$(HAVE_DECL_VSNPRINTF)|g' \
              -e 's|@''REPLACE_SPRINTF''@|$(REPLACE_SPRINTF)|g' \
              -e 's|@''REPLACE_VSPRINTF''@|$(REPLACE_VSPRINTF)|g' \
+             -e 's|@''HAVE_DPRINTF''@|$(HAVE_DPRINTF)|g' \
+             -e 's|@''REPLACE_DPRINTF''@|$(REPLACE_DPRINTF)|g' \
+             -e 's|@''HAVE_VDPRINTF''@|$(HAVE_VDPRINTF)|g' \
+             -e 's|@''REPLACE_VDPRINTF''@|$(REPLACE_VDPRINTF)|g' \
              -e 's|@''HAVE_VASPRINTF''@|$(HAVE_VASPRINTF)|g' \
              -e 's|@''REPLACE_VASPRINTF''@|$(REPLACE_VASPRINTF)|g' \
              -e 's|@''HAVE_DECL_OBSTACK_PRINTF''@|$(HAVE_DECL_OBSTACK_PRINTF)|g' \
@@ -730,6 +736,7 @@ unistd.h: unistd.in.h
              -e 's|@''GNULIB_GETPAGESIZE''@|$(GNULIB_GETPAGESIZE)|g' \
              -e 's|@''GNULIB_GETUSERSHELL''@|$(GNULIB_GETUSERSHELL)|g' \
              -e 's|@''GNULIB_LCHOWN''@|$(GNULIB_LCHOWN)|g' \
+             -e 's|@''GNULIB_LINK''@|$(GNULIB_LINK)|g' \
              -e 's|@''GNULIB_LSEEK''@|$(GNULIB_LSEEK)|g' \
              -e 's|@''GNULIB_READLINK''@|$(GNULIB_READLINK)|g' \
              -e 's|@''GNULIB_SLEEP''@|$(GNULIB_SLEEP)|g' \
@@ -744,6 +751,7 @@ unistd.h: unistd.in.h
              -e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \
              -e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \
              -e 's|@''HAVE_GETUSERSHELL''@|$(HAVE_GETUSERSHELL)|g' \
+             -e 's|@''HAVE_LINK''@|$(HAVE_LINK)|g' \
              -e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \
              -e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \
              -e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \
index e11e49ad1e13571789c1cc24ce2e0c35a3968665..7ba8e5843154c07328834844be921f793ae381db 100644 (file)
@@ -1,5 +1,5 @@
 /* An fseeko() function that, together with fflush(), is POSIX compliant.
-   Copyright (C) 2007-2008 Free Software Foundation, Inc.
+   Copyright (C) 2007-2009 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
@@ -86,7 +86,14 @@ rpl_fseeko (FILE *fp, off_t offset, int whence)
   #error "Please port gnulib fseeko.c to your platform! Look at the code in fpurge.c, then report this to bug-gnulib."
 #endif
     {
-      off_t pos = lseek (fileno (fp), offset, whence);
+      /* We get here when an fflush() call immediately preceded this one.  We
+        know there are no buffers.
+        POSIX requires us to modify the file descriptor's position.
+        But we cannot position beyond end of file here.  */
+      off_t pos =
+       lseek (fileno (fp),
+              whence == SEEK_END && offset > 0 ? 0 : offset,
+              whence);
       if (pos == -1)
        {
 #if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
@@ -94,20 +101,22 @@ rpl_fseeko (FILE *fp, off_t offset, int whence)
 #endif
          return -1;
        }
-      else
-       {
-#if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
-         fp_->_offset = pos;
-         fp_->_flags |= __SOFF;
-         fp_->_flags &= ~__SEOF;
+
+#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+      fp->_flags &= ~_IO_EOF_SEEN;
+#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
+      fp_->_offset = pos;
+      fp_->_flags |= __SOFF;
+      fp_->_flags &= ~__SEOF;
 #elif defined __EMX__               /* emx+gcc */
-          fp->_flags &= ~_IOEOF;
+      fp->_flags &= ~_IOEOF;
 #elif defined _IOERR                /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw */
-          fp->_flag &= ~_IOEOF;
+      fp->_flag &= ~_IOEOF;
 #endif
-         return 0;
-       }
+      /* If we were not requested to position beyond end of file, we're
+        done.  */
+      if (!(whence == SEEK_END && offset > 0))
+       return 0;
     }
-  else
-    return fseeko (fp, offset, whence);
+  return fseeko (fp, offset, whence);
 }
index 95f54a6d48c08452ba0f2eaef811c72ce2748825..4b978e137cbe7c2d9f76baa6546764f6e2f7a0a6 100644 (file)
@@ -1,5 +1,5 @@
-# alloca.m4 serial 8
-dnl Copyright (C) 2002-2004, 2006, 2007 Free Software Foundation, Inc.
+# alloca.m4 serial 9
+dnl Copyright (C) 2002-2004, 2006, 2007, 2009 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.
@@ -26,7 +26,7 @@ AC_DEFUN([gl_FUNC_ALLOCA],
     ])
     if test $gl_cv_rpl_alloca = yes; then
       dnl OK, alloca can be implemented through a compiler built-in.
-      AC_DEFINE([HAVE_ALLOCA], 1,
+      AC_DEFINE([HAVE_ALLOCA], [1],
         [Define to 1 if you have 'alloca' after including <alloca.h>,
          a header that may be supplied by this distribution.])
       ALLOCA_H=alloca.h
index 642c42cf83ab7f8db01f90b9da7976f294fe8053..ad13f228676331c3dfa3b1b2cf909245eed1d950 100644 (file)
@@ -1,5 +1,5 @@
-# byteswap.m4 serial 2
-dnl Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+# byteswap.m4 serial 3
+dnl Copyright (C) 2005, 2007, 2009 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.
@@ -14,5 +14,5 @@ AC_DEFUN([gl_BYTESWAP],
   ], [
     BYTESWAP_H='byteswap.h'
   ])
-  AC_SUBST(BYTESWAP_H)
+  AC_SUBST([BYTESWAP_H])
 ])
index de4181d7d2b6a868c03d6c0cf50f864e42212969..413217bd4a5f9ebb295528989c6e4e906c9438eb 100644 (file)
@@ -1,5 +1,5 @@
-# codeset.m4 serial 3 (gettext-0.18)
-dnl Copyright (C) 2000-2002, 2006, 2008 Free Software Foundation, Inc.
+# codeset.m4 serial 4 (gettext-0.18)
+dnl Copyright (C) 2000-2002, 2006, 2008, 2009 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.
@@ -15,7 +15,7 @@ AC_DEFUN([AM_LANGINFO_CODESET],
       [am_cv_langinfo_codeset=no])
     ])
   if test $am_cv_langinfo_codeset = yes; then
-    AC_DEFINE([HAVE_LANGINFO_CODESET], 1,
+    AC_DEFINE([HAVE_LANGINFO_CODESET], [1],
       [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
   fi
 ])
index 22c08f07fa06dcf88635d3972f7883e98d4e6809..0682d1ab63b8912ea1079605f159227de754927c 100644 (file)
@@ -1,5 +1,5 @@
-# errno_h.m4 serial 2
-dnl Copyright (C) 2004, 2006, 2008 Free Software Foundation, Inc.
+# errno_h.m4 serial 3
+dnl Copyright (C) 2004, 2006, 2008, 2009 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.
@@ -14,8 +14,8 @@ AC_DEFUN([gl_HEADER_ERRNO_H],
 AC_DEFUN([gl_HEADER_ERRNO_H_BODY],
 [
   AC_REQUIRE([AC_PROG_CC])
-  AC_CACHE_CHECK([for complete errno.h], gl_cv_header_errno_h_complete, [
-    AC_EGREP_CPP(booboo,[
+  AC_CACHE_CHECK([for complete errno.h], [gl_cv_header_errno_h_complete], [
+    AC_EGREP_CPP([booboo],[
 #include <errno.h>
 #if !defined ENOMSG
 booboo
@@ -70,7 +70,7 @@ AC_DEFUN([gl_REPLACE_ERRNO_VALUE],
 [
   if test -n "$ERRNO_H"; then
     AC_CACHE_CHECK([for ]$1[ value], [gl_cv_header_errno_h_]$1, [
-      AC_EGREP_CPP(yes,[
+      AC_EGREP_CPP([yes],[
 #include <errno.h>
 #ifdef ]$1[
 yes
@@ -79,7 +79,7 @@ yes
       [gl_cv_header_errno_h_]$1[=yes],
       [gl_cv_header_errno_h_]$1[=no])
       if test $gl_cv_header_errno_h_]$1[ = no; then
-        AC_EGREP_CPP(yes,[
+        AC_EGREP_CPP([yes],[
 #define _XOPEN_SOURCE_EXTENDED 1
 #include <errno.h>
 #ifdef ]$1[
index c48856397b44e28e578aa052f0f8865b35404cbd..d90c85008aabf427d0cd2847fffbfe10eb866926 100644 (file)
@@ -1,5 +1,5 @@
-# gettext.m4 serial 61 (gettext-0.18)
-dnl Copyright (C) 1995-2008 Free Software Foundation, Inc.
+# gettext.m4 serial 62 (gettext-0.18)
+dnl Copyright (C) 1995-2009 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.
@@ -123,7 +123,7 @@ AC_DEFUN([AM_GNU_GETTEXT],
     gt_use_preinstalled_gnugettext=no
     ifelse(gt_included_intl, yes, [
       AC_MSG_CHECKING([whether included gettext is requested])
-      AC_ARG_WITH(included-gettext,
+      AC_ARG_WITH([included-gettext],
         [  --with-included-gettext use the GNU gettext library included here],
         nls_cv_force_use_gnu_gettext=$withval,
         nls_cv_force_use_gnu_gettext=no)
@@ -267,7 +267,7 @@ return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_a
 
     if test "$gt_use_preinstalled_gnugettext" = "yes" \
        || test "$nls_cv_use_gnu_gettext" = "yes"; then
-      AC_DEFINE([ENABLE_NLS], 1,
+      AC_DEFINE([ENABLE_NLS], [1],
         [Define to 1 if translation of program messages to the user's native language
    is requested.])
     else
@@ -301,9 +301,9 @@ return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_a
       fi
 
       dnl For backward compatibility. Some packages may be using this.
-      AC_DEFINE([HAVE_GETTEXT], 1,
+      AC_DEFINE([HAVE_GETTEXT], [1],
        [Define if the GNU gettext() function is already present or preinstalled.])
-      AC_DEFINE([HAVE_DCGETTEXT], 1,
+      AC_DEFINE([HAVE_DCGETTEXT], [1],
        [Define if the GNU dcgettext() function is already present or preinstalled.])
     fi
 
index c73db14cc561a07766d919a0916d1e8309636191..cfd1b99f82ed204e10cf865c4e3bb511a711c138 100644 (file)
@@ -1,5 +1,5 @@
-# gnulib-common.m4 serial 6
-dnl Copyright (C) 2007-2008 Free Software Foundation, Inc.
+# gnulib-common.m4 serial 8
+dnl Copyright (C) 2007-2009 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.
@@ -63,7 +63,7 @@ m4_ifdef([AC_PROG_MKDIR_P], [], [
 # works.
 # This definition can be removed once autoconf >= 2.62 can be assumed.
 AC_DEFUN([AC_C_RESTRICT],
-[AC_CACHE_CHECK([for C/C++ restrict keyword], ac_cv_c_restrict,
+[AC_CACHE_CHECK([for C/C++ restrict keyword], [ac_cv_c_restrict],
   [ac_cv_c_restrict=no
    # The order here caters to the fact that C++ does not require restrict.
    for ac_kw in __restrict __restrict__ _Restrict restrict; do
@@ -99,3 +99,12 @@ AC_DEFUN([AC_C_RESTRICT],
    *)  AC_DEFINE_UNQUOTED([restrict], [$ac_cv_c_restrict]) ;;
  esac
 ])
+
+# gl_BIGENDIAN
+# is like AC_C_BIGENDIAN, except that it can be AC_REQUIREd.
+# Note that AC_REQUIRE([AC_C_BIGENDIAN]) does not work reliably because some
+# macros invoke AC_C_BIGENDIAN with arguments.
+AC_DEFUN([gl_BIGENDIAN],
+[
+  AC_C_BIGENDIAN
+])
index 848b2f85c33d2eaed5ed338b6467c0d0ac0599c8..3cc626829edffdf2c02bc5ad7517b7eb225c746a 100644 (file)
@@ -1,5 +1,5 @@
-# iconv.m4 serial AM6 (gettext-0.18)
-dnl Copyright (C) 2000-2002, 2007-2008 Free Software Foundation, Inc.
+# iconv.m4 serial AM7 (gettext-0.18)
+dnl Copyright (C) 2000-2002, 2007-2009 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.
@@ -134,7 +134,7 @@ int main ()
     am_func_iconv=no am_cv_lib_iconv=no
   fi
   if test "$am_func_iconv" = yes; then
-    AC_DEFINE([HAVE_ICONV], 1,
+    AC_DEFINE([HAVE_ICONV], [1],
       [Define if you have the iconv() function and it works.])
   fi
   if test "$am_cv_lib_iconv" = yes; then
index 7a28843f64c1f7e374cf77bc6463993e92e48074..0980e6f28615ddeb446a9959b67e933adbe51b71 100644 (file)
@@ -1,5 +1,5 @@
-# intldir.m4 serial 1 (gettext-0.16)
-dnl Copyright (C) 2006 Free Software Foundation, Inc.
+# intldir.m4 serial 2 (gettext-0.18)
+dnl Copyright (C) 2006, 2009 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.
@@ -13,7 +13,7 @@ dnl by the GNU Library General Public License, and the rest of the GNU
 dnl gettext package package is covered by the GNU General Public License.
 dnl They are *not* in the public domain.
 
-AC_PREREQ(2.52)
+AC_PREREQ([2.52])
 
 dnl Tells the AM_GNU_GETTEXT macro to consider an intl/ directory.
 AC_DEFUN([AM_GNU_GETTEXT_INTL_SUBDIR], [])
index b77527d17d6374bdf07b3eba8bdc6ef930fac642..c24837c4290ad25aa30bc9c9b91cf8dff973a63b 100644 (file)
@@ -1,5 +1,5 @@
-# intlmacosx.m4 serial 2 (gettext-0.18)
-dnl Copyright (C) 2004-2008 Free Software Foundation, Inc.
+# intlmacosx.m4 serial 3 (gettext-0.18)
+dnl Copyright (C) 2004-2009 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.
@@ -28,7 +28,7 @@ AC_DEFUN([gt_INTL_MACOSX],
        [gt_cv_func_CFPreferencesCopyAppValue=no])
      LIBS="$gt_save_LIBS"])
   if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
-    AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], 1,
+    AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1],
       [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
   fi
   dnl Check for API introduced in MacOS X 10.3.
@@ -40,7 +40,7 @@ AC_DEFUN([gt_INTL_MACOSX],
        [gt_cv_func_CFLocaleCopyCurrent=no])
      LIBS="$gt_save_LIBS"])
   if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
-    AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], 1,
+    AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1],
       [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
   fi
   INTL_MACOSX_LIBS=
index d713db2286f13f602a95089fd308019ac07239c1..a3785e9989cb17c8505767cad1bbee75c7830a6d 100644 (file)
@@ -1,5 +1,5 @@
-# intmax.m4 serial 4 (gettext-0.18)
-dnl Copyright (C) 2002-2005, 2008 Free Software Foundation, Inc.
+# intmax.m4 serial 5 (gettext-0.18)
+dnl Copyright (C) 2002-2005, 2008, 2009 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.
@@ -27,7 +27,7 @@ AC_DEFUN([gt_TYPE_INTMAX_T],
        [gt_cv_c_intmax_t=yes],
        [gt_cv_c_intmax_t=no])])
   if test $gt_cv_c_intmax_t = yes; then
-    AC_DEFINE([HAVE_INTMAX_T], 1,
+    AC_DEFINE([HAVE_INTMAX_T], [1],
       [Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.])
   fi
 ])
index 50ae35d223798bd24f5d664445dcec8719067ec4..264cb57184dc384c67591764196eecb59f859f4c 100644 (file)
@@ -1,12 +1,12 @@
-# intmax_t.m4 serial 6
-dnl Copyright (C) 1997-2004, 2006-2007 Free Software Foundation, Inc.
+# intmax_t.m4 serial 7
+dnl Copyright (C) 1997-2004, 2006-2007, 2009 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.
 
 dnl From Paul Eggert.
 
-AC_PREREQ(2.13)
+AC_PREREQ([2.13])
 
 # Define intmax_t to 'long' or 'long long'
 # if it is not already defined in <stdint.h> or <inttypes.h>.
@@ -22,10 +22,10 @@ AC_DEFUN([gl_AC_TYPE_INTMAX_T],
     test $ac_cv_type_long_long_int = yes \
       && ac_type='long long' \
       || ac_type='long'
-    AC_DEFINE_UNQUOTED(intmax_t, $ac_type,
+    AC_DEFINE_UNQUOTED([intmax_t], [$ac_type],
      [Define to long or long long if <inttypes.h> and <stdint.h> don't define.])
   else
-    AC_DEFINE(HAVE_INTMAX_T, 1,
+    AC_DEFINE([HAVE_INTMAX_T], [1],
       [Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.])
   fi
 ])
@@ -36,7 +36,7 @@ AC_DEFUN([gt_AC_TYPE_INTMAX_T],
 [
   AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
   AC_REQUIRE([gl_AC_HEADER_STDINT_H])
-  AC_CACHE_CHECK(for intmax_t, gt_cv_c_intmax_t,
+  AC_CACHE_CHECK([for intmax_t], [gt_cv_c_intmax_t],
     [AC_TRY_COMPILE([
 #include <stddef.h>
 #include <stdlib.h>
@@ -48,14 +48,14 @@ AC_DEFUN([gt_AC_TYPE_INTMAX_T],
 #endif
 ], [intmax_t x = -1; return !x;], gt_cv_c_intmax_t=yes, gt_cv_c_intmax_t=no)])
   if test $gt_cv_c_intmax_t = yes; then
-    AC_DEFINE(HAVE_INTMAX_T, 1,
+    AC_DEFINE([HAVE_INTMAX_T], [1],
       [Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.])
   else
     AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
     test $ac_cv_type_long_long_int = yes \
       && ac_type='long long' \
       || ac_type='long'
-    AC_DEFINE_UNQUOTED(intmax_t, $ac_type,
+    AC_DEFINE_UNQUOTED([intmax_t], [$ac_type],
      [Define to long or long long if <stdint.h> and <inttypes.h> don't define.])
   fi
 ])
index 66650ebdc8433383181591b2a172e72efda93869..98fec7bcf69d2f56fc0a000bb37aae5631c696af 100644 (file)
@@ -1,12 +1,12 @@
-# inttypes-pri.m4 serial 5 (gettext-0.18)
-dnl Copyright (C) 1997-2002, 2006, 2008 Free Software Foundation, Inc.
+# inttypes-pri.m4 serial 6 (gettext-0.18)
+dnl Copyright (C) 1997-2002, 2006, 2008, 2009 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.
 
 dnl From Bruno Haible.
 
-AC_PREREQ(2.52)
+AC_PREREQ([2.52])
 
 # Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI*
 # macros to non-string values.  This is the case on AIX 4.3.3.
@@ -26,7 +26,7 @@ char *p = PRId32;
       ])
   fi
   if test "$gt_cv_inttypes_pri_broken" = yes; then
-    AC_DEFINE_UNQUOTED([PRI_MACROS_BROKEN], 1,
+    AC_DEFINE_UNQUOTED([PRI_MACROS_BROKEN], [1],
       [Define if <inttypes.h> exists and defines unusable PRI* macros.])
     PRI_MACROS_BROKEN=1
   else
index cf482d28750e9d41f2b8aef33538f2bf146ede6f..f4ca16021cf78da48bb7541c86d43ded2b4352c3 100644 (file)
@@ -1,5 +1,5 @@
-# inttypes_h.m4 serial 8
-dnl Copyright (C) 1997-2004, 2006, 2008 Free Software Foundation, Inc.
+# inttypes_h.m4 serial 9
+dnl Copyright (C) 1997-2004, 2006, 2008, 2009 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.
@@ -19,7 +19,7 @@ AC_DEFUN([gl_AC_HEADER_INTTYPES_H],
     [gl_cv_header_inttypes_h=yes],
     [gl_cv_header_inttypes_h=no])])
   if test $gl_cv_header_inttypes_h = yes; then
-    AC_DEFINE_UNQUOTED([HAVE_INTTYPES_H_WITH_UINTMAX], 1,
+    AC_DEFINE_UNQUOTED([HAVE_INTTYPES_H_WITH_UINTMAX], [1],
       [Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
        and declares uintmax_t. ])
   fi
index b7c473027258c4f4d2f855b7379567b91d19023a..fa8e4167ac31e1f3005ec667323851ce42692f13 100644 (file)
@@ -1,5 +1,5 @@
-# lcmessage.m4 serial 5 (gettext-0.18)
-dnl Copyright (C) 1995-2002, 2004-2005, 2008 Free Software Foundation, Inc.
+# lcmessage.m4 serial 6 (gettext-0.18)
+dnl Copyright (C) 1995-2002, 2004-2005, 2008, 2009 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.
@@ -24,7 +24,7 @@ AC_DEFUN([gt_LC_MESSAGES],
     [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
        [gt_cv_val_LC_MESSAGES=yes], [gt_cv_val_LC_MESSAGES=no])])
   if test $gt_cv_val_LC_MESSAGES = yes; then
-    AC_DEFINE([HAVE_LC_MESSAGES], 1,
+    AC_DEFINE([HAVE_LC_MESSAGES], [1],
       [Define if your <locale.h> file defines LC_MESSAGES.])
   fi
 ])
index 96c4e2c3396c5d9193446f1893f1cdc4c4497344..e4863f2c9b76a6cc8a3979bb41244a615d194c84 100644 (file)
@@ -1,5 +1,5 @@
-# lib-ld.m4 serial 3 (gettext-0.13)
-dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
+# lib-ld.m4 serial 4 (gettext-0.18)
+dnl Copyright (C) 1996-2003, 2009 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.
@@ -10,7 +10,7 @@ dnl with libtool.m4.
 
 dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
 AC_DEFUN([AC_LIB_PROG_LD_GNU],
-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld],
 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
 case `$LD -v 2>&1 </dev/null` in
 *GNU* | *'with BFD'*)
@@ -23,7 +23,7 @@ with_gnu_ld=$acl_cv_prog_gnu_ld
 
 dnl From libtool-1.4. Sets the variable LD.
 AC_DEFUN([AC_LIB_PROG_LD],
-[AC_ARG_WITH(gnu-ld,
+[AC_ARG_WITH([gnu-ld],
 [  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
 AC_REQUIRE([AC_PROG_CC])dnl
@@ -77,7 +77,7 @@ elif test "$with_gnu_ld" = yes; then
 else
   AC_MSG_CHECKING([for non-GNU ld])
 fi
-AC_CACHE_VAL(acl_cv_path_LD,
+AC_CACHE_VAL([acl_cv_path_LD],
 [if test -z "$LD"; then
   IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
   for ac_dir in $PATH; do
@@ -101,9 +101,9 @@ else
 fi])
 LD="$acl_cv_path_LD"
 if test -n "$LD"; then
-  AC_MSG_RESULT($LD)
+  AC_MSG_RESULT([$LD])
 else
-  AC_MSG_RESULT(no)
+  AC_MSG_RESULT([no])
 fi
 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
 AC_LIB_PROG_LD_GNU
index e29eead27607533659b2b74323db66662d100d19..fcd3391bbcef44773f3fa8568a1aa2f87a8b0708 100644 (file)
@@ -1,12 +1,12 @@
-# lib-link.m4 serial 17 (gettext-0.18)
-dnl Copyright (C) 2001-2008 Free Software Foundation, Inc.
+# lib-link.m4 serial 18 (gettext-0.18)
+dnl Copyright (C) 2001-2009 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.
 
 dnl From Bruno Haible.
 
-AC_PREREQ(2.54)
+AC_PREREQ([2.54])
 
 dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
 dnl the libraries corresponding to explicit and implicit dependencies.
@@ -114,7 +114,7 @@ AC_DEFUN([AC_LIB_RPATH],
   AC_REQUIRE([AC_LIB_PROG_LD])            dnl we use $LD, $with_gnu_ld
   AC_REQUIRE([AC_CANONICAL_HOST])         dnl we use $host
   AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
-  AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
+  AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [
     CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
     ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
     . ./conftest.sh
@@ -131,7 +131,7 @@ AC_DEFUN([AC_LIB_RPATH],
   acl_hardcode_direct="$acl_cv_hardcode_direct"
   acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
   dnl Determine whether the user wants rpath handling at all.
-  AC_ARG_ENABLE(rpath,
+  AC_ARG_ENABLE([rpath],
     [  --disable-rpath         do not hardcode runtime library paths],
     :, enable_rpath=yes)
 ])
index 9fec570dcd603b4e9652e2551493d0a0330b1274..b416e31a35e02e1bc284200ff92c16fda3d09dd0 100644 (file)
@@ -1,5 +1,5 @@
-# lock.m4 serial 9 (gettext-0.18)
-dnl Copyright (C) 2005-2008 Free Software Foundation, Inc.
+# lock.m4 serial 10 (gettext-0.18)
+dnl Copyright (C) 2005-2009 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.
@@ -13,7 +13,7 @@ AC_DEFUN([gl_LOCK],
     # OSF/1 4.0 and MacOS X 10.1 lack the pthread_rwlock_t type and the
     # pthread_rwlock_* functions.
     AC_CHECK_TYPE([pthread_rwlock_t],
-      [AC_DEFINE([HAVE_PTHREAD_RWLOCK], 1,
+      [AC_DEFINE([HAVE_PTHREAD_RWLOCK], [1],
          [Define if the POSIX multithreading library has read/write locks.])],
       [],
       [#include <pthread.h>])
@@ -25,7 +25,7 @@ error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
 int x = (int)PTHREAD_MUTEX_RECURSIVE;
 return !x;
 #endif],
-      [AC_DEFINE([HAVE_PTHREAD_MUTEX_RECURSIVE], 1,
+      [AC_DEFINE([HAVE_PTHREAD_MUTEX_RECURSIVE], [1],
          [Define if the <pthread.h> defines PTHREAD_MUTEX_RECURSIVE.])])
   fi
   gl_PREREQ_LOCK
index 15bf9dacadb85b8802381eafddeb9fc6556c067d..eedc8d56826218e41849ce337e63964a968b7a1a 100644 (file)
@@ -1,5 +1,5 @@
-# longlong.m4 serial 13
-dnl Copyright (C) 1999-2007 Free Software Foundation, Inc.
+# longlong.m4 serial 14
+dnl Copyright (C) 1999-2007, 2009 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.
@@ -46,7 +46,7 @@ AC_DEFUN([AC_TYPE_LONG_LONG_INT],
          [ac_cv_type_long_long_int=yes])],
        [ac_cv_type_long_long_int=no])])
   if test $ac_cv_type_long_long_int = yes; then
-    AC_DEFINE([HAVE_LONG_LONG_INT], 1,
+    AC_DEFINE([HAVE_LONG_LONG_INT], [1],
       [Define to 1 if the system has the type `long long int'.])
   fi
 ])
@@ -69,7 +69,7 @@ AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT],
        [ac_cv_type_unsigned_long_long_int=yes],
        [ac_cv_type_unsigned_long_long_int=no])])
   if test $ac_cv_type_unsigned_long_long_int = yes; then
-    AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], 1,
+    AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], [1],
       [Define to 1 if the system has the type `unsigned long long int'.])
   fi
 ])
index 764f2a9fa199c24dd959ca2d0be0238825498a73..807017166ba35812585f8e41667b8181f4f20afa 100644 (file)
@@ -1,5 +1,5 @@
-# malloc.m4 serial 8
-dnl Copyright (C) 2007 Free Software Foundation, Inc.
+# malloc.m4 serial 9
+dnl Copyright (C) 2007, 2009 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.
@@ -13,7 +13,7 @@ AC_DEFUN([gl_FUNC_MALLOC_POSIX],
   AC_REQUIRE([gl_CHECK_MALLOC_POSIX])
   if test $gl_cv_func_malloc_posix = yes; then
     HAVE_MALLOC_POSIX=1
-    AC_DEFINE([HAVE_MALLOC_POSIX], 1,
+    AC_DEFINE([HAVE_MALLOC_POSIX], [1],
       [Define if the 'malloc' function is POSIX compliant.])
   else
     AC_LIBOBJ([malloc])
index 87ab66319fcc94d5615b0e7318b7545d11e796c6..9e3d3d956d4eb9914d4f6b24130ad86aa4f3a1c8 100644 (file)
@@ -1,5 +1,5 @@
-# memmem.m4 serial 13
-dnl Copyright (C) 2002, 2003, 2004, 2007, 2008 Free Software Foundation, Inc.
+# memmem.m4 serial 14
+dnl Copyright (C) 2002, 2003, 2004, 2007, 2008, 2009 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.
@@ -11,8 +11,8 @@ AC_DEFUN([gl_FUNC_MEMMEM_SIMPLE],
   AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
 
   AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
-  AC_REPLACE_FUNCS(memmem)
-  AC_CHECK_DECLS_ONCE(memmem)
+  AC_REPLACE_FUNCS([memmem])
+  AC_CHECK_DECLS_ONCE([memmem])
   if test $ac_cv_have_decl_memmem = no; then
     HAVE_DECL_MEMMEM=0
   fi
index 66054e4416a69c2603cc458a270ef8a4ed769f21..0b01cc6c0cb50d944048b0a62d29942ba05b0537 100644 (file)
@@ -1,12 +1,12 @@
-# memmove.m4 serial 2
-dnl Copyright (C) 2002 Free Software Foundation, Inc.
+# memmove.m4 serial 3
+dnl Copyright (C) 2002, 2009 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.
 
 AC_DEFUN([gl_FUNC_MEMMOVE],
 [
-  AC_REPLACE_FUNCS(memmove)
+  AC_REPLACE_FUNCS([memmove])
   if test $ac_cv_func_memmove = no; then
     gl_PREREQ_MEMMOVE
   fi
index bbd1ba0b84a8d42d2e7b4373f7ff9a715d1b156e..d2993fbaf78a91d458eb77e0352c981a1d0d5158 100644 (file)
@@ -1,10 +1,10 @@
-# minmax.m4 serial 2
-dnl Copyright (C) 2005 Free Software Foundation, Inc.
+# minmax.m4 serial 3
+dnl Copyright (C) 2005, 2009 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.
 
-AC_PREREQ(2.52)
+AC_PREREQ([2.52])
 
 AC_DEFUN([gl_MINMAX],
 [
index 5f155f01a28067d9e2a8fe6a287e5f7eae25265a..0b364342158dbc5ae0589d7a82b1cb5c3f0d0bd9 100644 (file)
@@ -1,5 +1,5 @@
-# nls.m4 serial 4 (gettext-0.18)
-dnl Copyright (C) 1995-2003, 2005-2006, 2008 Free Software Foundation, Inc.
+# nls.m4 serial 5 (gettext-0.18)
+dnl Copyright (C) 1995-2003, 2005-2006, 2008, 2009 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.
@@ -17,15 +17,15 @@ dnl Authors:
 dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
 dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
 
-AC_PREREQ(2.50)
+AC_PREREQ([2.50])
 
 AC_DEFUN([AM_NLS],
 [
   AC_MSG_CHECKING([whether NLS is requested])
   dnl Default is enabled NLS
-  AC_ARG_ENABLE(nls,
+  AC_ARG_ENABLE([nls],
     [  --disable-nls           do not use Native Language Support],
     USE_NLS=$enableval, USE_NLS=yes)
-  AC_MSG_RESULT($USE_NLS)
+  AC_MSG_RESULT([$USE_NLS])
   AC_SUBST([USE_NLS])
 ])
index 818143e713e0282a40ab975fee4e59d3b00afb79..2284fa5054f5b863c25365bb1bbe08d53a36d423 100644 (file)
@@ -1,5 +1,5 @@
-# po.m4 serial 16 (gettext-0.18)
-dnl Copyright (C) 1995-2008 Free Software Foundation, Inc.
+# po.m4 serial 17 (gettext-0.18)
+dnl Copyright (C) 1995-2009 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.
@@ -17,7 +17,7 @@ dnl Authors:
 dnl   Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
 dnl   Bruno Haible <haible@clisp.cons.org>, 2000-2003.
 
-AC_PREREQ(2.50)
+AC_PREREQ([2.50])
 
 dnl Checks for all prerequisites of the po subdirectory.
 AC_DEFUN([AM_PO_SUBDIRS],
index 8933ee399d0ed53b73a1cc42ca945edbd4f4afce..5922d27891a07d26f56d94ae173a9fdd87838e24 100644 (file)
@@ -1,5 +1,5 @@
-# printf-posix.m4 serial 4 (gettext-0.18)
-dnl Copyright (C) 2003, 2007 Free Software Foundation, Inc.
+# printf-posix.m4 serial 5 (gettext-0.18)
+dnl Copyright (C) 2003, 2007, 2009 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.
@@ -27,7 +27,7 @@ int main ()
   return (strcmp (buf, "55 33") != 0);
 }], gt_cv_func_printf_posix=yes, gt_cv_func_printf_posix=no,
       [
-        AC_EGREP_CPP(notposix, [
+        AC_EGREP_CPP([notposix], [
 #if defined __NetBSD__ || defined __BEOS__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__
   notposix
 #endif
@@ -38,7 +38,7 @@ int main ()
     ])
   case $gt_cv_func_printf_posix in
     *yes)
-      AC_DEFINE([HAVE_POSIX_PRINTF], 1,
+      AC_DEFINE([HAVE_POSIX_PRINTF], [1],
         [Define if your printf() function supports format strings with positions.])
       ;;
   esac
index 474a635575f28cf0a4320789cb53e913cd30fc75..a1d4dadd7bb6819e7739162482fcc0b99cfc3567 100644 (file)
@@ -1,5 +1,5 @@
-# printf.m4 serial 25
-dnl Copyright (C) 2003, 2007-2008 Free Software Foundation, Inc.
+# printf.m4 serial 28
+dnl Copyright (C) 2003, 2007-2009 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.
@@ -225,12 +225,12 @@ AC_DEFUN([gl_PRINTF_INFINITE_LONG_DOUBLE],
 [
   AC_REQUIRE([gl_PRINTF_LONG_DOUBLE])
   AC_REQUIRE([AC_PROG_CC])
-  AC_REQUIRE([AC_C_BIGENDIAN])
+  AC_REQUIRE([gl_BIGENDIAN])
   AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
   dnl The user can set or unset the variable gl_printf_safe to indicate
   dnl that he wishes a safe handling of non-IEEE-754 'long double' values.
   if test -n "$gl_printf_safe"; then
-    AC_DEFINE([CHECK_PRINTF_SAFE], 1,
+    AC_DEFINE([CHECK_PRINTF_SAFE], [1],
       [Define if you wish *printf() functions that have a safe handling of
        non-IEEE-754 'long double' values.])
   fi
@@ -1142,7 +1142,7 @@ AC_DEFUN([gl_SNPRINTF_SIZE1],
 #include <stdio.h>
 int main()
 {
-  static char buf[8] = "DEADBEEF";
+  static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
   snprintf (buf, 1, "%d", 12345);
   return buf[1] != 'E';
 }],
@@ -1160,7 +1160,7 @@ dnl     ---------------------------------------------------------------------
 dnl     #include <stdio.h>
 dnl     int main()
 dnl     {
-dnl       static char buf[8] = "DEADBEEF";
+dnl       static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
 dnl       snprintf (buf, 0, "%d", 12345);
 dnl       return buf[0] != 'D';
 dnl     }
@@ -1181,7 +1181,7 @@ dnl       return ret;
 dnl     }
 dnl     int main()
 dnl     {
-dnl       static char buf[8] = "DEADBEEF";
+dnl       static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
 dnl       my_snprintf (buf, 0, "%d", 12345);
 dnl       return buf[0] != 'D';
 dnl     }
@@ -1209,7 +1209,7 @@ static int my_snprintf (char *buf, int size, const char *format, ...)
 }
 int main()
 {
-  static char buf[8] = "DEADBEEF";
+  static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
   my_snprintf (buf, 0, "%d", 12345);
   return buf[0] != 'D';
 }],
index 9b55f75120dfb53441c9088cbd747c894f7a79fd..e1d445d26734ecfbf6c756776d006878470a3715 100644 (file)
@@ -1,5 +1,5 @@
-# progtest.m4 serial 5 (gettext-0.18)
-dnl Copyright (C) 1996-2003, 2005, 2008 Free Software Foundation, Inc.
+# progtest.m4 serial 6 (gettext-0.18)
+dnl Copyright (C) 1996-2003, 2005, 2008, 2009 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.
@@ -16,7 +16,7 @@ dnl They are *not* in the public domain.
 dnl Authors:
 dnl   Ulrich Drepper <drepper@cygnus.com>, 1996.
 
-AC_PREREQ(2.50)
+AC_PREREQ([2.50])
 
 # Search path for a program which passes the given test.
 
@@ -88,5 +88,5 @@ if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
 else
   AC_MSG_RESULT([no])
 fi
-AC_SUBST($1)dnl
+AC_SUBST([$1])dnl
 ])
index f9fd935dbbde98f57212b8786a6cfbc3cc2cbe18..5925796864e033cb4e0794c9e751378f513b97c5 100644 (file)
@@ -1,5 +1,5 @@
-# realloc.m4 serial 8
-dnl Copyright (C) 2007 Free Software Foundation, Inc.
+# realloc.m4 serial 9
+dnl Copyright (C) 2007, 2009 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.
@@ -13,7 +13,7 @@ AC_DEFUN([gl_FUNC_REALLOC_POSIX],
   AC_REQUIRE([gl_CHECK_MALLOC_POSIX])
   if test $gl_cv_func_malloc_posix = yes; then
     HAVE_REALLOC_POSIX=1
-    AC_DEFINE([HAVE_REALLOC_POSIX], 1,
+    AC_DEFINE([HAVE_REALLOC_POSIX], [1],
       [Define if the 'realloc' function is POSIX compliant.])
   else
     AC_LIBOBJ([realloc])
index 124e777a5e0f5c4fb0a5a53e1c7e3fcdc8f8fad2..d5a7dbfb4b944cfe8604b33c0bcc67eefd7a363c 100644 (file)
@@ -1,5 +1,5 @@
-# sockets.m4 serial 3
-dnl Copyright (C) 2008 Free Software Foundation, Inc.
+# sockets.m4 serial 4
+dnl Copyright (C) 2008, 2009 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.
@@ -26,7 +26,7 @@ AC_DEFUN([gl_SOCKETS],
       LIBS="$gl_save_LIBS"
     ])
     if test "$gl_cv_func_wsastartup" = "yes"; then
-      AC_DEFINE([WINDOWS_SOCKETS], 1, [Define if WSAStartup is needed.])
+      AC_DEFINE([WINDOWS_SOCKETS], [1], [Define if WSAStartup is needed.])
       LIBSOCKET='-lws2_32'
     fi
   else
index 25d9755c5ea7b9a1f939fbfb22e5220fce6f24ed..99ea06f96f83fb77d40f5d1db4048d12dfb4ff37 100644 (file)
@@ -1,5 +1,5 @@
-# sockpfaf.m4 serial 5
-dnl Copyright (C) 2004, 2006 Free Software Foundation, Inc.
+# sockpfaf.m4 serial 6
+dnl Copyright (C) 2004, 2006, 2009 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.
@@ -16,8 +16,8 @@ AC_DEFUN([gl_SOCKET_FAMILIES],
   AC_REQUIRE([gl_HEADER_SYS_SOCKET])
   AC_CHECK_HEADERS_ONCE([netinet/in.h])
 
-  AC_MSG_CHECKING(for IPv4 sockets)
-  AC_CACHE_VAL(gl_cv_socket_ipv4,
+  AC_MSG_CHECKING([for IPv4 sockets])
+  AC_CACHE_VAL([gl_cv_socket_ipv4],
     [AC_TRY_COMPILE([#include <sys/types.h>
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
@@ -31,13 +31,13 @@ AC_DEFUN([gl_SOCKET_FAMILIES],
 [int x = AF_INET; struct in_addr y; struct sockaddr_in z;
  if (&x && &y && &z) return 0;],
        gl_cv_socket_ipv4=yes, gl_cv_socket_ipv4=no)])
-  AC_MSG_RESULT($gl_cv_socket_ipv4)
+  AC_MSG_RESULT([$gl_cv_socket_ipv4])
   if test $gl_cv_socket_ipv4 = yes; then
-    AC_DEFINE(HAVE_IPV4, 1, [Define to 1 if <sys/socket.h> defines AF_INET.])
+    AC_DEFINE([HAVE_IPV4], [1], [Define to 1 if <sys/socket.h> defines AF_INET.])
   fi
 
-  AC_MSG_CHECKING(for IPv6 sockets)
-  AC_CACHE_VAL(gl_cv_socket_ipv6,
+  AC_MSG_CHECKING([for IPv6 sockets])
+  AC_CACHE_VAL([gl_cv_socket_ipv6],
     [AC_TRY_COMPILE([#include <sys/types.h>
 #ifdef HAVE_SYS_SOCKET_H
 #include <sys/socket.h>
@@ -51,8 +51,8 @@ AC_DEFUN([gl_SOCKET_FAMILIES],
 [int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z;
  if (&x && &y && &z) return 0;],
        gl_cv_socket_ipv6=yes, gl_cv_socket_ipv6=no)])
-  AC_MSG_RESULT($gl_cv_socket_ipv6)
+  AC_MSG_RESULT([$gl_cv_socket_ipv6])
   if test $gl_cv_socket_ipv6 = yes; then
-    AC_DEFINE(HAVE_IPV6, 1, [Define to 1 if <sys/socket.h> defines AF_INET6.])
+    AC_DEFINE([HAVE_IPV6], [1], [Define to 1 if <sys/socket.h> defines AF_INET6.])
   fi
 ])
index 2204ecd98405be59e1a8ef52d6fbd464f61552f7..57c804a80ff7da006714ce54b11da37c58557faa 100644 (file)
@@ -1,6 +1,6 @@
 # Check for stdbool.h that conforms to C99.
 
-dnl Copyright (C) 2002-2006 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2009 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.
@@ -111,5 +111,5 @@ AC_DEFUN([AC_HEADER_STDBOOL],
        [ac_cv_header_stdbool_h=no])])
    AC_CHECK_TYPES([_Bool])
    if test $ac_cv_header_stdbool_h = yes; then
-     AC_DEFINE(HAVE_STDBOOL_H, 1, [Define to 1 if stdbool.h conforms to C99.])
+     AC_DEFINE([HAVE_STDBOOL_H], [1], [Define to 1 if stdbool.h conforms to C99.])
    fi])
index e507a02eb8a7f36e42830dd21e19af9f46776231..b4194c8adc129667a648e882d2381a8b971a9dd6 100644 (file)
@@ -1,5 +1,5 @@
-# stdint.m4 serial 32
-dnl Copyright (C) 2001-2008 Free Software Foundation, Inc.
+# stdint.m4 serial 33
+dnl Copyright (C) 2001-2009 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.
@@ -9,7 +9,7 @@ dnl Test whether <stdint.h> is supported or must be substituted.
 
 AC_DEFUN([gl_STDINT_H],
 [
-  AC_PREREQ(2.59)dnl
+  AC_PREREQ([2.59])dnl
 
   dnl Check for long long int and unsigned long long int.
   AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
@@ -229,7 +229,7 @@ struct s {
     gl_STDINT_TYPE_PROPERTIES
     STDINT_H=stdint.h
   fi
-  AC_SUBST(STDINT_H)
+  AC_SUBST([STDINT_H])
 ])
 
 dnl gl_STDINT_BITSIZEOF(TYPES, INCLUDES)
@@ -292,7 +292,7 @@ AC_DEFUN([gl_CHECK_TYPES_SIGNED],
     eval result=\$gl_cv_type_${gltype}_signed
     GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
     if test "$result" = yes; then
-      AC_DEFINE_UNQUOTED([HAVE_SIGNED_${GLTYPE}], 1)
+      AC_DEFINE_UNQUOTED([HAVE_SIGNED_${GLTYPE}], [1])
       eval HAVE_SIGNED_${GLTYPE}=1
     else
       eval HAVE_SIGNED_${GLTYPE}=0
@@ -348,7 +348,7 @@ AC_DEFUN([gl_INTEGER_TYPE_SUFFIX],
     eval result=\$gl_cv_type_${gltype}_suffix
     test "$result" = no && result=
     eval ${GLTYPE}_SUFFIX=\$result
-    AC_DEFINE_UNQUOTED([${GLTYPE}_SUFFIX], $result)
+    AC_DEFINE_UNQUOTED([${GLTYPE}_SUFFIX], [$result])
   done
   m4_foreach_w([gltype], [$1],
     [AC_SUBST(translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_])[_SUFFIX])])
index 2c8e6497993ebd4ef5b413aa07ee74f07a2b1454..82f0c244c8ee0c7a34de7b75fead88478e5bd08e 100644 (file)
@@ -1,5 +1,5 @@
-# stdint_h.m4 serial 7
-dnl Copyright (C) 1997-2004, 2006, 2008 Free Software Foundation, Inc.
+# stdint_h.m4 serial 8
+dnl Copyright (C) 1997-2004, 2006, 2008, 2009 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.
@@ -19,7 +19,7 @@ AC_DEFUN([gl_AC_HEADER_STDINT_H],
     [gl_cv_header_stdint_h=yes],
     [gl_cv_header_stdint_h=no])])
   if test $gl_cv_header_stdint_h = yes; then
-    AC_DEFINE_UNQUOTED([HAVE_STDINT_H_WITH_UINTMAX], 1,
+    AC_DEFINE_UNQUOTED([HAVE_STDINT_H_WITH_UINTMAX], [1],
       [Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
        and declares uintmax_t. ])
   fi
index 60b4bd791a2a36dba67e26864930d6cfa75a974c..846b65d302cbe5197c136ab96f019c88f6392d00 100644 (file)
@@ -1,5 +1,5 @@
-# stdio_h.m4 serial 14
-dnl Copyright (C) 2007-2008 Free Software Foundation, Inc.
+# stdio_h.m4 serial 15
+dnl Copyright (C) 2007-2009 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.
@@ -53,6 +53,8 @@ AC_DEFUN([gl_STDIO_H_DEFAULTS],
   GNULIB_VPRINTF_POSIX=0;        AC_SUBST([GNULIB_VPRINTF_POSIX])
   GNULIB_VSNPRINTF=0;            AC_SUBST([GNULIB_VSNPRINTF])
   GNULIB_VSPRINTF_POSIX=0;       AC_SUBST([GNULIB_VSPRINTF_POSIX])
+  GNULIB_DPRINTF=0;              AC_SUBST([GNULIB_DPRINTF])
+  GNULIB_VDPRINTF=0;             AC_SUBST([GNULIB_VDPRINTF])
   GNULIB_VASPRINTF=0;            AC_SUBST([GNULIB_VASPRINTF])
   GNULIB_OBSTACK_PRINTF=0;       AC_SUBST([GNULIB_OBSTACK_PRINTF])
   GNULIB_OBSTACK_PRINTF_POSIX=0; AC_SUBST([GNULIB_OBSTACK_PRINTF_POSIX])
@@ -86,6 +88,10 @@ AC_DEFUN([gl_STDIO_H_DEFAULTS],
   HAVE_DECL_VSNPRINTF=1;         AC_SUBST([HAVE_DECL_VSNPRINTF])
   REPLACE_SPRINTF=0;             AC_SUBST([REPLACE_SPRINTF])
   REPLACE_VSPRINTF=0;            AC_SUBST([REPLACE_VSPRINTF])
+  HAVE_DPRINTF=1;                AC_SUBST([HAVE_DPRINTF])
+  REPLACE_DPRINTF=0;             AC_SUBST([REPLACE_DPRINTF])
+  HAVE_VDPRINTF=1;               AC_SUBST([HAVE_VDPRINTF])
+  REPLACE_VDPRINTF=0;            AC_SUBST([REPLACE_VDPRINTF])
   HAVE_VASPRINTF=1;              AC_SUBST([HAVE_VASPRINTF])
   REPLACE_VASPRINTF=0;           AC_SUBST([REPLACE_VASPRINTF])
   HAVE_DECL_OBSTACK_PRINTF=1;    AC_SUBST([HAVE_DECL_OBSTACK_PRINTF])
index 79c525c11040ce3063c2dfaef543448c388f6a51..0dfdb1a18148e7207f62d9be4593e3a8c3cc3e68 100644 (file)
@@ -1,5 +1,5 @@
-# strcase.m4 serial 9
-dnl Copyright (C) 2002, 2005-2008 Free Software Foundation, Inc.
+# strcase.m4 serial 10
+dnl Copyright (C) 2002, 2005-2009 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.
@@ -13,7 +13,7 @@ AC_DEFUN([gl_STRCASE],
 AC_DEFUN([gl_FUNC_STRCASECMP],
 [
   AC_REQUIRE([gl_HEADER_STRINGS_H_DEFAULTS])
-  AC_REPLACE_FUNCS(strcasecmp)
+  AC_REPLACE_FUNCS([strcasecmp])
   if test $ac_cv_func_strcasecmp = no; then
     HAVE_STRCASECMP=0
     gl_PREREQ_STRCASECMP
@@ -23,11 +23,11 @@ AC_DEFUN([gl_FUNC_STRCASECMP],
 AC_DEFUN([gl_FUNC_STRNCASECMP],
 [
   AC_REQUIRE([gl_HEADER_STRINGS_H_DEFAULTS])
-  AC_REPLACE_FUNCS(strncasecmp)
+  AC_REPLACE_FUNCS([strncasecmp])
   if test $ac_cv_func_strncasecmp = no; then
     gl_PREREQ_STRNCASECMP
   fi
-  AC_CHECK_DECLS(strncasecmp)
+  AC_CHECK_DECLS([strncasecmp])
   if test $ac_cv_have_decl_strncasecmp = no; then
     HAVE_DECL_STRNCASECMP=0
   fi
index a3f9aff4b6a92c4c9ac3228b0045be1375915623..becce2bb17d52ccb64c32282173bffc769472e79 100644 (file)
@@ -1,6 +1,5 @@
-# strverscmp.m4 serial 6
-dnl Copyright (C) 2002, 2005, 2006, 2007, 2008 Free Software
-dnl Foundation, Inc.
+# strverscmp.m4 serial 7
+dnl Copyright (C) 2002, 2005-2009 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.
@@ -11,7 +10,7 @@ AC_DEFUN([gl_FUNC_STRVERSCMP],
   AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
 
   AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
-  AC_REPLACE_FUNCS(strverscmp)
+  AC_REPLACE_FUNCS([strverscmp])
   if test $ac_cv_func_strverscmp = no; then
     gl_PREREQ_STRVERSCMP
     HAVE_STRVERSCMP=0
index 51caf576b331f07dd8fbc03cb6a3835157b5f0fb..3dd38aa8778bac1c0de189311b2ff4988542c3a1 100644 (file)
@@ -1,5 +1,5 @@
-# threadlib.m4 serial 2 (gettext-0.18)
-dnl Copyright (C) 2005-2008 Free Software Foundation, Inc.
+# threadlib.m4 serial 3 (gettext-0.18)
+dnl Copyright (C) 2005-2009 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.
@@ -45,7 +45,7 @@ AC_DEFUN([gl_THREADLIB_EARLY_BODY],
     [AC_REQUIRE([AC_GNU_SOURCE])])
   dnl Check for multithreading.
   m4_divert_text([DEFAULTS], [gl_use_threads_default=])
-  AC_ARG_ENABLE(threads,
+  AC_ARG_ENABLE([threads],
 AC_HELP_STRING([--enable-threads={posix|solaris|pth|win32}], [specify multithreading API])
 AC_HELP_STRING([--disable-threads], [build without multithread safety]),
     [gl_use_threads=$enableval],
@@ -131,7 +131,7 @@ AC_DEFUN([gl_THREADLIB_BODY],
              # pthread_create will actually create a thread.
              case "$host_os" in
                solaris* | hpux*)
-                 AC_DEFINE([PTHREAD_IN_USE_DETECTION_HARD], 1,
+                 AC_DEFINE([PTHREAD_IN_USE_DETECTION_HARD], [1],
                    [Define if the pthread_in_use() detection is hard.])
              esac
             ])
@@ -151,11 +151,11 @@ AC_DEFUN([gl_THREADLIB_BODY],
         fi
         if test -n "$gl_have_pthread"; then
           gl_threads_api=posix
-          AC_DEFINE([USE_POSIX_THREADS], 1,
+          AC_DEFINE([USE_POSIX_THREADS], [1],
             [Define if the POSIX multithreading library can be used.])
           if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
             if test $gl_have_weak = yes; then
-              AC_DEFINE([USE_POSIX_THREADS_WEAK], 1,
+              AC_DEFINE([USE_POSIX_THREADS_WEAK], [1],
                 [Define if references to the POSIX multithreading library should be made weak.])
               LIBTHREAD=
               LTLIBTHREAD=
@@ -180,10 +180,10 @@ AC_DEFUN([gl_THREADLIB_BODY],
           LTLIBTHREAD=-lthread
           LIBMULTITHREAD="$LIBTHREAD"
           LTLIBMULTITHREAD="$LTLIBTHREAD"
-          AC_DEFINE([USE_SOLARIS_THREADS], 1,
+          AC_DEFINE([USE_SOLARIS_THREADS], [1],
             [Define if the old Solaris multithreading library can be used.])
           if test $gl_have_weak = yes; then
-            AC_DEFINE([USE_SOLARIS_THREADS_WEAK], 1,
+            AC_DEFINE([USE_SOLARIS_THREADS_WEAK], [1],
               [Define if references to the old Solaris multithreading library should be made weak.])
             LIBTHREAD=
             LTLIBTHREAD=
@@ -205,11 +205,11 @@ AC_DEFUN([gl_THREADLIB_BODY],
         LTLIBTHREAD="$LTLIBPTH"
         LIBMULTITHREAD="$LIBTHREAD"
         LTLIBMULTITHREAD="$LTLIBTHREAD"
-        AC_DEFINE([USE_PTH_THREADS], 1,
+        AC_DEFINE([USE_PTH_THREADS], [1],
           [Define if the GNU Pth multithreading library can be used.])
         if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
           if test $gl_have_weak = yes; then
-            AC_DEFINE([USE_PTH_THREADS_WEAK], 1,
+            AC_DEFINE([USE_PTH_THREADS_WEAK], [1],
               [Define if references to the GNU Pth multithreading library should be made weak.])
             LIBTHREAD=
             LTLIBTHREAD=
@@ -227,7 +227,7 @@ AC_DEFUN([gl_THREADLIB_BODY],
              esac
            }; then
           gl_threads_api=win32
-          AC_DEFINE([USE_WIN32_THREADS], 1,
+          AC_DEFINE([USE_WIN32_THREADS], [1],
             [Define if the Win32 multithreading API can be used.])
         fi
       fi
index cde46d2e8f1a83398b2a2f6e04ad7e82a8d26900..734b6933e2fd383bff4af6fe847e9fc2c45b5227 100644 (file)
@@ -1,12 +1,12 @@
-# uintmax_t.m4 serial 11
-dnl Copyright (C) 1997-2004, 2007-2008 Free Software Foundation, Inc.
+# uintmax_t.m4 serial 12
+dnl Copyright (C) 1997-2004, 2007-2009 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.
 
 dnl From Paul Eggert.
 
-AC_PREREQ(2.13)
+AC_PREREQ([2.13])
 
 # Define uintmax_t to 'unsigned long' or 'unsigned long long'
 # if it is not already defined in <stdint.h> or <inttypes.h>.
@@ -24,7 +24,7 @@ AC_DEFUN([gl_AC_TYPE_UINTMAX_T],
       [Define to unsigned long or unsigned long long
        if <stdint.h> and <inttypes.h> don't define.])
   else
-    AC_DEFINE([HAVE_UINTMAX_T], 1,
+    AC_DEFINE([HAVE_UINTMAX_T], [1],
       [Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>.])
   fi
 ])
index 56852736566ce565ac27a5a449a4d35d744fb743..ff9a4ea0a59f3c43d7c06bbc973fa5918c7bf11c 100644 (file)
@@ -1,5 +1,5 @@
-# unistd_h.m4 serial 16
-dnl Copyright (C) 2006-2008 Free Software Foundation, Inc.
+# unistd_h.m4 serial 17
+dnl Copyright (C) 2006-2009 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.
@@ -48,6 +48,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
   GNULIB_GETPAGESIZE=0;      AC_SUBST([GNULIB_GETPAGESIZE])
   GNULIB_GETUSERSHELL=0;     AC_SUBST([GNULIB_GETUSERSHELL])
   GNULIB_LCHOWN=0;           AC_SUBST([GNULIB_LCHOWN])
+  GNULIB_LINK=0;             AC_SUBST([GNULIB_LINK])
   GNULIB_LSEEK=0;            AC_SUBST([GNULIB_LSEEK])
   GNULIB_READLINK=0;         AC_SUBST([GNULIB_READLINK])
   GNULIB_SLEEP=0;            AC_SUBST([GNULIB_SLEEP])
@@ -63,6 +64,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
   HAVE_GETHOSTNAME=1;     AC_SUBST([HAVE_GETHOSTNAME])
   HAVE_GETPAGESIZE=1;     AC_SUBST([HAVE_GETPAGESIZE])
   HAVE_GETUSERSHELL=1;    AC_SUBST([HAVE_GETUSERSHELL])
+  HAVE_LINK=1;            AC_SUBST([HAVE_LINK])
   HAVE_READLINK=1;        AC_SUBST([HAVE_READLINK])
   HAVE_SLEEP=1;           AC_SUBST([HAVE_SLEEP])
   HAVE_DECL_ENVIRON=1;    AC_SUBST([HAVE_DECL_ENVIRON])
index 536258c06b3ccfca2192956674bfc2df9e867285..9e839d2bc8d096080b8e5f0c364a1ec70eb10869 100644 (file)
@@ -1,5 +1,5 @@
-# vasnprintf.m4 serial 25
-dnl Copyright (C) 2002-2004, 2006-2008 Free Software Foundation, Inc.
+# vasnprintf.m4 serial 26
+dnl Copyright (C) 2002-2004, 2006-2009 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,7 +20,7 @@ AC_DEFUN([gl_REPLACE_VASNPRINTF],
   AC_LIBOBJ([printf-parse])
   AC_LIBOBJ([asnprintf])
   if test $ac_cv_func_vasnprintf = yes; then
-    AC_DEFINE([REPLACE_VASNPRINTF], 1,
+    AC_DEFINE([REPLACE_VASNPRINTF], [1],
       [Define if vasnprintf exists but is overridden by gnulib.])
   fi
   gl_PREREQ_PRINTF_ARGS
@@ -58,7 +58,7 @@ AC_DEFUN([gl_PREREQ_VASNPRINTF],
   AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
   AC_REQUIRE([gt_TYPE_WCHAR_T])
   AC_REQUIRE([gt_TYPE_WINT_T])
-  AC_CHECK_FUNCS(snprintf wcslen)
+  AC_CHECK_FUNCS([snprintf wcslen])
   dnl Use the _snprintf function only if it is declared (because on NetBSD it
   dnl is defined as a weak alias of snprintf; we prefer to use the latter).
   AC_CHECK_DECLS([_snprintf], , , [#include <stdio.h>])
@@ -73,7 +73,7 @@ AC_DEFUN([gl_PREREQ_VASNPRINTF_LONG_DOUBLE],
     *yes)
       ;;
     *)
-      AC_DEFINE([NEED_PRINTF_LONG_DOUBLE], 1,
+      AC_DEFINE([NEED_PRINTF_LONG_DOUBLE], [1],
         [Define if the vasnprintf implementation needs special code for
          'long double' arguments.])
       ;;
@@ -89,7 +89,7 @@ AC_DEFUN([gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE],
     *yes)
       ;;
     *)
-      AC_DEFINE([NEED_PRINTF_INFINITE_DOUBLE], 1,
+      AC_DEFINE([NEED_PRINTF_INFINITE_DOUBLE], [1],
         [Define if the vasnprintf implementation needs special code for
          infinite 'double' arguments.])
       ;;
@@ -110,7 +110,7 @@ AC_DEFUN([gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE],
         *yes)
           ;;
         *)
-          AC_DEFINE([NEED_PRINTF_INFINITE_LONG_DOUBLE], 1,
+          AC_DEFINE([NEED_PRINTF_INFINITE_LONG_DOUBLE], [1],
             [Define if the vasnprintf implementation needs special code for
              infinite 'long double' arguments.])
           ;;
@@ -127,7 +127,7 @@ AC_DEFUN([gl_PREREQ_VASNPRINTF_DIRECTIVE_A],
     *yes)
       ;;
     *)
-      AC_DEFINE([NEED_PRINTF_DIRECTIVE_A], 1,
+      AC_DEFINE([NEED_PRINTF_DIRECTIVE_A], [1],
         [Define if the vasnprintf implementation needs special code for
          the 'a' and 'A' directives.])
       AC_CHECK_FUNCS([nl_langinfo])
@@ -143,7 +143,7 @@ AC_DEFUN([gl_PREREQ_VASNPRINTF_DIRECTIVE_F],
     *yes)
       ;;
     *)
-      AC_DEFINE([NEED_PRINTF_DIRECTIVE_F], 1,
+      AC_DEFINE([NEED_PRINTF_DIRECTIVE_F], [1],
         [Define if the vasnprintf implementation needs special code for
          the 'F' directive.])
       ;;
@@ -158,7 +158,7 @@ AC_DEFUN([gl_PREREQ_VASNPRINTF_FLAG_GROUPING],
     *yes)
       ;;
     *)
-      AC_DEFINE([NEED_PRINTF_FLAG_GROUPING], 1,
+      AC_DEFINE([NEED_PRINTF_FLAG_GROUPING], [1],
         [Define if the vasnprintf implementation needs special code for the
          ' flag.])
       ;;
@@ -173,7 +173,7 @@ AC_DEFUN([gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST],
     *yes)
       ;;
     *)
-      AC_DEFINE([NEED_PRINTF_FLAG_LEFTADJUST], 1,
+      AC_DEFINE([NEED_PRINTF_FLAG_LEFTADJUST], [1],
         [Define if the vasnprintf implementation needs special code for the
          '-' flag.])
       ;;
@@ -188,7 +188,7 @@ AC_DEFUN([gl_PREREQ_VASNPRINTF_FLAG_ZERO],
     *yes)
       ;;
     *)
-      AC_DEFINE([NEED_PRINTF_FLAG_ZERO], 1,
+      AC_DEFINE([NEED_PRINTF_FLAG_ZERO], [1],
         [Define if the vasnprintf implementation needs special code for the
          0 flag.])
       ;;
@@ -203,13 +203,13 @@ AC_DEFUN([gl_PREREQ_VASNPRINTF_PRECISION],
     *yes)
       ;;
     *)
-      AC_DEFINE([NEED_PRINTF_UNBOUNDED_PRECISION], 1,
+      AC_DEFINE([NEED_PRINTF_UNBOUNDED_PRECISION], [1],
         [Define if the vasnprintf implementation needs special code for
          supporting large precisions without arbitrary bounds.])
-      AC_DEFINE([NEED_PRINTF_DOUBLE], 1,
+      AC_DEFINE([NEED_PRINTF_DOUBLE], [1],
         [Define if the vasnprintf implementation needs special code for
          'double' arguments.])
-      AC_DEFINE([NEED_PRINTF_LONG_DOUBLE], 1,
+      AC_DEFINE([NEED_PRINTF_LONG_DOUBLE], [1],
         [Define if the vasnprintf implementation needs special code for
          'long double' arguments.])
       ;;
@@ -225,13 +225,13 @@ AC_DEFUN([gl_PREREQ_VASNPRINTF_ENOMEM],
     *yes)
       ;;
     *)
-      AC_DEFINE([NEED_PRINTF_ENOMEM], 1,
+      AC_DEFINE([NEED_PRINTF_ENOMEM], [1],
         [Define if the vasnprintf implementation needs special code for
          surviving out-of-memory conditions.])
-      AC_DEFINE([NEED_PRINTF_DOUBLE], 1,
+      AC_DEFINE([NEED_PRINTF_DOUBLE], [1],
         [Define if the vasnprintf implementation needs special code for
          'double' arguments.])
-      AC_DEFINE([NEED_PRINTF_LONG_DOUBLE], 1,
+      AC_DEFINE([NEED_PRINTF_LONG_DOUBLE], [1],
         [Define if the vasnprintf implementation needs special code for
          'long double' arguments.])
       ;;
index 3c81564adc60a207525772c6ef5feacbc41bee73..fb27a7f65f46e0f23b883d01e9e74f84e13595b5 100644 (file)
@@ -1,5 +1,5 @@
-# wchar_t.m4 serial 2 (gettext-0.18)
-dnl Copyright (C) 2002-2003, 2008 Free Software Foundation, Inc.
+# wchar_t.m4 serial 3 (gettext-0.18)
+dnl Copyright (C) 2002-2003, 2008, 2009 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.
@@ -15,6 +15,6 @@ AC_DEFUN([gt_TYPE_WCHAR_T],
        wchar_t foo = (wchar_t)'\0';], ,
        [gt_cv_c_wchar_t=yes], [gt_cv_c_wchar_t=no])])
   if test $gt_cv_c_wchar_t = yes; then
-    AC_DEFINE([HAVE_WCHAR_T], 1, [Define if you have the 'wchar_t' type.])
+    AC_DEFINE([HAVE_WCHAR_T], [1], [Define if you have the 'wchar_t' type.])
   fi
 ])
index 0026a13188f42ae85bf83978a6b67746e78ab9f3..47a4363d79041b6481ed781bcbe798dc1b171ec9 100644 (file)
@@ -1,5 +1,5 @@
-# wint_t.m4 serial 3 (gettext-0.18)
-dnl Copyright (C) 2003, 2007-2008 Free Software Foundation, Inc.
+# wint_t.m4 serial 4 (gettext-0.18)
+dnl Copyright (C) 2003, 2007-2009 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.
@@ -23,6 +23,6 @@ AC_DEFUN([gt_TYPE_WINT_T],
        wint_t foo = (wchar_t)'\0';], ,
        [gt_cv_c_wint_t=yes], [gt_cv_c_wint_t=no])])
   if test $gt_cv_c_wint_t = yes; then
-    AC_DEFINE([HAVE_WINT_T], 1, [Define if you have the 'wint_t' type.])
+    AC_DEFINE([HAVE_WINT_T], [1], [Define if you have the 'wint_t' type.])
   fi
 ])
index 51ac462d95a395442dca18427acc6e8b15f452b2..7cbfc2cf7ea1f7b7e53b46ba27962133898a3eaa 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2002, 2004-2008 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2002, 2004-2009 Free Software Foundation, Inc.
    Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood.
    This file is part of gnulib.
 
@@ -478,7 +478,9 @@ typedef int _verify_intmax_size[2 * (sizeof (intmax_t) == sizeof (uintmax_t)) -
    includes <wchar.h> -> <stdio.h> -> <getopt.h> -> <stdlib.h>, and the latter includes
    <stdint.h> and assumes its types are already defined.  */
 #if ! (defined WCHAR_MIN && defined WCHAR_MAX)
+# define _GL_JUST_INCLUDE_SYSTEM_WCHAR_H
 # include <wchar.h>
+# undef _GL_JUST_INCLUDE_SYSTEM_WCHAR_H
 #endif
 #undef WCHAR_MIN
 #undef WCHAR_MAX
index 3b61879cdac68d07948527246990cc16711e563b..6610fed54b82ee96034dc35250a522689b4235be 100644 (file)
@@ -216,6 +216,38 @@ extern int vsprintf (char *str, const char *format, va_list args)
      vsprintf (b, f, a))
 #endif
 
+#if @GNULIB_DPRINTF@
+# if @REPLACE_DPRINTF@
+#  define dprintf rpl_dprintf
+# endif
+# if @REPLACE_DPRINTF@ || !@HAVE_DPRINTF@
+extern int dprintf (int fd, const char *format, ...)
+       __attribute__ ((__format__ (__printf__, 2, 3)));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef dprintf
+# define dprintf(d,f,a) \
+    (GL_LINK_WARNING ("dprintf is unportable - " \
+                      "use gnulib module dprintf for portability"), \
+     dprintf (d, f, a))
+#endif
+
+#if @GNULIB_VDPRINTF@
+# if @REPLACE_VDPRINTF@
+#  define vdprintf rpl_vdprintf
+# endif
+# if @REPLACE_VDPRINTF@ || !@HAVE_VDPRINTF@
+extern int vdprintf (int fd, const char *format, va_list args)
+       __attribute__ ((__format__ (__printf__, 2, 0)));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef vdprintf
+# define vdprintf(d,f,a) \
+    (GL_LINK_WARNING ("vdprintf is unportable - " \
+                      "use gnulib module vdprintf for portability"), \
+     vdprintf (d, f, a))
+#endif
+
 #if @GNULIB_VASPRINTF@
 # if @REPLACE_VASPRINTF@
 #  define asprintf rpl_asprintf
index f46b4d77e93b5c8427326e69d55c4fd24debccfc..c20df22bd174415ad8dd37ac00bbe17c32ede23e 100644 (file)
@@ -1,5 +1,5 @@
 /* Provide a more complete sys/stat header file.
-   Copyright (C) 2005-2008 Free Software Foundation, Inc.
+   Copyright (C) 2005-2009 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
@@ -35,6 +35,9 @@
 
 #ifndef _GL_SYS_STAT_H
 
+/* Get nlink_t.  */
+#include <sys/types.h>
+
 /* The include_next requires a split double-inclusion guard.  */
 #@INCLUDE_NEXT@ @NEXT_SYS_STAT_H@
 
index dc15bda0df527e905b9456e98aa68f5e8e51ca86..5fed15cf9fd8fdcc50b4ad7bb63ceef4d9b94cac 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of <unistd.h> substitute.
-   Copyright (C) 2007 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 /* Check that the various SEEK_* macros are defined.  */
 int sk[] = { SEEK_CUR, SEEK_END, SEEK_SET };
 
+/* Check that the various *_FILENO macros are defined.  */
+#if ! (defined STDIN_FILENO                                     \
+       && (STDIN_FILENO + STDOUT_FILENO + STDERR_FILENO == 3))
+missing or broken *_FILENO macros
+#endif
+
 /* Check that the types are all defined.  */
 size_t t1;
 ssize_t t2;
index 4b6c4b901e06a5ed85a5d68332e1427a795713ad..c1a2d2ba993db77037560865208ebe067543a223 100644 (file)
@@ -1,5 +1,5 @@
 /* Substitute for and wrapper around <unistd.h>.
-   Copyright (C) 2003-2008 Free Software Foundation, Inc.
+   Copyright (C) 2003-2009 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
@@ -29,7 +29,7 @@
 #ifndef _GL_UNISTD_H
 #define _GL_UNISTD_H
 
-/* mingw doesn't define the SEEK_* macros in <unistd.h>.  */
+/* mingw doesn't define the SEEK_* or *_FILENO macros in <unistd.h>.  */
 #if !(defined SEEK_CUR && defined SEEK_END && defined SEEK_SET)
 # include <stdio.h>
 #endif
 /* The definition of GL_LINK_WARNING is copied here.  */
 
 
+/* OS/2 EMX lacks these macros.  */
+#ifndef STDIN_FILENO
+# define STDIN_FILENO 0
+#endif
+#ifndef STDOUT_FILENO
+# define STDOUT_FILENO 1
+#endif
+#ifndef STDERR_FILENO
+# define STDERR_FILENO 2
+#endif
+
 /* Declare overridden functions.  */
 
 #ifdef __cplusplus
@@ -475,6 +486,23 @@ extern int lchown (char const *file, uid_t owner, gid_t group);
 #endif
 
 
+#if @GNULIB_LINK@
+/* Create a new hard link for an existing file.
+   Return 0 if successful, otherwise -1 and errno set.
+   See POSIX:2001 specification
+   <http://www.opengroup.org/susv3xsh/link.html>.  */
+# if !@HAVE_LINK@
+extern int link (const char *path1, const char *path2);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef link
+# define link(path1,path2) \
+    (GL_LINK_WARNING ("link is unportable - " \
+                      "use gnulib module link for portability"), \
+     link (path1, path2))
+#endif
+
+
 #if @GNULIB_LSEEK@
 # if @REPLACE_LSEEK@
 /* Set the offset of FD relative to SEEK_SET, SEEK_CUR, or SEEK_END.
index 09fc326905403bcc2617301eac1e938ee27be54c..89d6036c31962877f0bff3d35a953b7512725ae3 100644 (file)
@@ -1,6 +1,6 @@
 /* A substitute for ISO C99 <wchar.h>, for platforms that have issues.
 
-   Copyright (C) 2007-2008 Free Software Foundation, Inc.
+   Copyright (C) 2007-2009 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
 @PRAGMA_SYSTEM_HEADER@
 #endif
 
-#ifdef __need_mbstate_t
-/* Special invocation convention inside uClibc header files.  */
+#if defined __need_mbstate_t || (defined __hpux && ((defined _INTTYPES_INCLUDED && !defined strtoimax) || defined _GL_JUST_INCLUDE_SYSTEM_WCHAR_H)) || defined _GL_ALREADY_INCLUDING_WCHAR_H
+/* Special invocation convention:
+   - Inside uClibc header files.
+   - On HP-UX 11.00 we have a sequence of nested includes
+     <wchar.h> -> <stdlib.h> -> <stdint.h>, and the latter includes <wchar.h>,
+     once indirectly <stdint.h> -> <sys/types.h> -> <inttypes.h> -> <wchar.h>
+     and once directly.  In both situations 'wint_t' is not yet defined,
+     therefore we cannot provide the function overrides; instead include only
+     the system's <wchar.h>.
+   - On IRIX 6.5, similarly, we have an include <wchar.h> -> <wctype.h>, and
+     the latter includes <wchar.h>.  But here, we have no way to detect whether
+     <wctype.h> is completely included or is still being included.  */
 
 #@INCLUDE_NEXT@ @NEXT_WCHAR_H@
 
@@ -40,6 +50,8 @@
 
 #ifndef _GL_WCHAR_H
 
+#define _GL_ALREADY_INCLUDING_WCHAR_H
+
 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
    <wchar.h>.
    BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
@@ -55,6 +67,8 @@
 # @INCLUDE_NEXT@ @NEXT_WCHAR_H@
 #endif
 
+#undef _GL_ALREADY_INCLUDING_WCHAR_H
+
 #ifndef _GL_WCHAR_H
 #define _GL_WCHAR_H