summaryrefslogtreecommitdiff
path: root/gnulib
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2010-07-20 08:29:16 +0100
committerColin Watson <cjwatson@debian.org>2010-07-20 08:29:16 +0100
commitf6cbccfb41238dee099354c6a5edd394395aa3e9 (patch)
tree8c6d76596e2f7d1068050e0ef96627a0cd41c701 /gnulib
parentaceda53bbeb1830f9ecab5e099f9d1b6748da39b (diff)
Upgrade to Gnulib 20100704.
* configure.ac (AM_GNU_GETTEXT_VERSION): Upgrade to gettext 0.18.1.
Diffstat (limited to 'gnulib')
-rw-r--r--gnulib/lib/Makefile.am7
-rw-r--r--gnulib/lib/Makefile.in17
-rw-r--r--gnulib/lib/canonicalize-lgpl.c4
-rwxr-xr-xgnulib/lib/config.charset42
-rw-r--r--gnulib/lib/error.c32
-rw-r--r--gnulib/lib/getopt.c2
-rw-r--r--gnulib/lib/getopt_int.h69
-rw-r--r--gnulib/lib/localcharset.c7
-rw-r--r--gnulib/lib/malloca.c3
-rw-r--r--gnulib/lib/regex_internal.c4
-rw-r--r--gnulib/lib/regex_internal.h2
-rw-r--r--gnulib/lib/setenv.c13
-rw-r--r--gnulib/lib/stdbool.in.h3
-rw-r--r--gnulib/lib/stdio-write.c2
-rw-r--r--gnulib/lib/stdio.in.h22
-rw-r--r--gnulib/lib/strerror.c3
-rw-r--r--gnulib/lib/string.in.h51
-rw-r--r--gnulib/lib/time.in.h12
-rw-r--r--gnulib/lib/unistd.in.h51
-rw-r--r--gnulib/lib/vasnprintf.c4
-rw-r--r--gnulib/lib/verify.h41
-rw-r--r--gnulib/lib/wchar.in.h2
-rw-r--r--gnulib/m4/asm-underscore.m448
-rw-r--r--gnulib/m4/environ.m44
-rw-r--r--gnulib/m4/fcntl-o.m48
-rw-r--r--gnulib/m4/getlogin_r.m44
-rw-r--r--gnulib/m4/gettext.m46
-rw-r--r--gnulib/m4/gnulib-common.m410
-rw-r--r--gnulib/m4/gnulib-comp.m43
-rw-r--r--gnulib/m4/iconv.m419
-rw-r--r--gnulib/m4/intl.m493
-rw-r--r--gnulib/m4/lib-link.m434
-rw-r--r--gnulib/m4/onceonly.m410
-rw-r--r--gnulib/m4/openat.m410
-rw-r--r--gnulib/m4/po.m42
-rw-r--r--gnulib/m4/printf.m44
-rw-r--r--gnulib/m4/sockpfaf.m43
-rw-r--r--gnulib/m4/stdint.m414
-rw-r--r--gnulib/m4/stdio_h.m43
-rw-r--r--gnulib/m4/string_h.m43
-rw-r--r--gnulib/m4/strnlen.m422
-rw-r--r--gnulib/m4/time_h.m419
-rw-r--r--gnulib/m4/unistd_h.m411
-rw-r--r--gnulib/m4/visibility.m426
44 files changed, 537 insertions, 212 deletions
diff --git a/gnulib/lib/Makefile.am b/gnulib/lib/Makefile.am
index dda226ff..b96792c4 100644
--- a/gnulib/lib/Makefile.am
+++ b/gnulib/lib/Makefile.am
@@ -1325,6 +1325,7 @@ stdio.h: stdio.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
-e 's|@''REPLACE_VPRINTF''@|$(REPLACE_VPRINTF)|g' \
-e 's|@''REPLACE_VSNPRINTF''@|$(REPLACE_VSNPRINTF)|g' \
-e 's|@''REPLACE_VSPRINTF''@|$(REPLACE_VSPRINTF)|g' \
+ -e 's|@''ASM_SYMBOL_PREFIX''@|$(ASM_SYMBOL_PREFIX)|g' \
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
@@ -1545,6 +1546,7 @@ string.h: string.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
-e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \
-e 's|@''REPLACE_STRNCAT''@|$(REPLACE_STRNCAT)|g' \
-e 's|@''REPLACE_STRNDUP''@|$(REPLACE_STRNDUP)|g' \
+ -e 's|@''REPLACE_STRNLEN''@|$(REPLACE_STRNLEN)|g' \
-e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \
-e 's|@''REPLACE_STRTOK_R''@|$(REPLACE_STRTOK_R)|g' \
-e 's|@''UNDEFINE_STRTOK_R''@|$(UNDEFINE_STRTOK_R)|g' \
@@ -1856,6 +1858,7 @@ time.h: time.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
-e 's|@''REPLACE_MKTIME''@|$(REPLACE_MKTIME)|g' \
-e 's|@''REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \
-e 's|@''REPLACE_TIMEGM''@|$(REPLACE_TIMEGM)|g' \
+ -e 's|@''PTHREAD_H_DEFINES_STRUCT_TIMESPEC''@|$(PTHREAD_H_DEFINES_STRUCT_TIMESPEC)|g' \
-e 's|@''SYS_TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(SYS_TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \
-e 's|@''TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
@@ -1915,6 +1918,7 @@ unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
-e 's|@''GNULIB_LSEEK''@|$(GNULIB_LSEEK)|g' \
-e 's|@''GNULIB_PIPE2''@|$(GNULIB_PIPE2)|g' \
-e 's|@''GNULIB_PREAD''@|$(GNULIB_PREAD)|g' \
+ -e 's|@''GNULIB_PWRITE''@|$(GNULIB_PWRITE)|g' \
-e 's|@''GNULIB_READLINK''@|$(GNULIB_READLINK)|g' \
-e 's|@''GNULIB_READLINKAT''@|$(GNULIB_READLINKAT)|g' \
-e 's|@''GNULIB_RMDIR''@|$(GNULIB_RMDIR)|g' \
@@ -1949,6 +1953,7 @@ unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
-e 's|@''HAVE_LINKAT''@|$(HAVE_LINKAT)|g' \
-e 's|@''HAVE_PIPE2''@|$(HAVE_PIPE2)|g' \
-e 's|@''HAVE_PREAD''@|$(HAVE_PREAD)|g' \
+ -e 's|@''HAVE_PWRITE''@|$(HAVE_PWRITE)|g' \
-e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \
-e 's|@''HAVE_READLINKAT''@|$(HAVE_READLINKAT)|g' \
-e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \
@@ -1976,10 +1981,12 @@ unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
-e 's|@''REPLACE_LINKAT''@|$(REPLACE_LINKAT)|g' \
-e 's|@''REPLACE_LSEEK''@|$(REPLACE_LSEEK)|g' \
-e 's|@''REPLACE_PREAD''@|$(REPLACE_PREAD)|g' \
+ -e 's|@''REPLACE_PWRITE''@|$(REPLACE_PWRITE)|g' \
-e 's|@''REPLACE_READLINK''@|$(REPLACE_READLINK)|g' \
-e 's|@''REPLACE_RMDIR''@|$(REPLACE_RMDIR)|g' \
-e 's|@''REPLACE_SLEEP''@|$(REPLACE_SLEEP)|g' \
-e 's|@''REPLACE_SYMLINK''@|$(REPLACE_SYMLINK)|g' \
+ -e 's|@''REPLACE_TTYNAME_R''@|$(REPLACE_TTYNAME_R)|g' \
-e 's|@''REPLACE_UNLINK''@|$(REPLACE_UNLINK)|g' \
-e 's|@''REPLACE_UNLINKAT''@|$(REPLACE_UNLINKAT)|g' \
-e 's|@''REPLACE_USLEEP''@|$(REPLACE_USLEEP)|g' \
diff --git a/gnulib/lib/Makefile.in b/gnulib/lib/Makefile.in
index 55ce141c..01fd1fdf 100644
--- a/gnulib/lib/Makefile.in
+++ b/gnulib/lib/Makefile.in
@@ -62,6 +62,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/man-bdb.m4 \
$(top_srcdir)/gnulib/m4/00gnulib.m4 \
$(top_srcdir)/gnulib/m4/alloca.m4 \
$(top_srcdir)/gnulib/m4/argp.m4 \
+ $(top_srcdir)/gnulib/m4/asm-underscore.m4 \
$(top_srcdir)/gnulib/m4/atexit.m4 \
$(top_srcdir)/gnulib/m4/btowc.m4 \
$(top_srcdir)/gnulib/m4/canonicalize.m4 \
@@ -318,6 +319,7 @@ ALLOCA_H = @ALLOCA_H@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@
+ASM_SYMBOL_PREFIX = @ASM_SYMBOL_PREFIX@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
@@ -481,6 +483,7 @@ GNULIB_PUTC = @GNULIB_PUTC@
GNULIB_PUTCHAR = @GNULIB_PUTCHAR@
GNULIB_PUTENV = @GNULIB_PUTENV@
GNULIB_PUTS = @GNULIB_PUTS@
+GNULIB_PWRITE = @GNULIB_PWRITE@
GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
GNULIB_READLINK = @GNULIB_READLINK@
@@ -648,6 +651,7 @@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@
HAVE_MKSTEMP = @HAVE_MKSTEMP@
HAVE_MKSTEMPS = @HAVE_MKSTEMPS@
HAVE_NANOSLEEP = @HAVE_NANOSLEEP@
+HAVE_NEWLOCALE = @HAVE_NEWLOCALE@
HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@
HAVE_OPENAT = @HAVE_OPENAT@
HAVE_OS_H = @HAVE_OS_H@
@@ -656,6 +660,7 @@ HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@
HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@
HAVE_PREAD = @HAVE_PREAD@
HAVE_PTSNAME = @HAVE_PTSNAME@
+HAVE_PWRITE = @HAVE_PWRITE@
HAVE_RANDOM_H = @HAVE_RANDOM_H@
HAVE_RANDOM_R = @HAVE_RANDOM_R@
HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@
@@ -741,6 +746,7 @@ INSTOBJEXT = @INSTOBJEXT@
INTLBISON = @INTLBISON@
INTLLIBS = @INTLLIBS@
INTLOBJS = @INTLOBJS@
+INTL_DEFAULT_VERBOSITY = @INTL_DEFAULT_VERBOSITY@
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
LDFLAGS = @LDFLAGS@
@@ -838,6 +844,7 @@ PO4A = @PO4A@
POSUB = @POSUB@
PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@
+PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@
PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
RANLIB = @RANLIB@
REPLACE_BTOWC = @REPLACE_BTOWC@
@@ -902,6 +909,7 @@ REPLACE_POPEN = @REPLACE_POPEN@
REPLACE_PREAD = @REPLACE_PREAD@
REPLACE_PRINTF = @REPLACE_PRINTF@
REPLACE_PUTENV = @REPLACE_PUTENV@
+REPLACE_PWRITE = @REPLACE_PWRITE@
REPLACE_READLINK = @REPLACE_READLINK@
REPLACE_REALPATH = @REPLACE_REALPATH@
REPLACE_REMOVE = @REPLACE_REMOVE@
@@ -921,6 +929,7 @@ REPLACE_STRDUP = @REPLACE_STRDUP@
REPLACE_STRERROR = @REPLACE_STRERROR@
REPLACE_STRNCAT = @REPLACE_STRNCAT@
REPLACE_STRNDUP = @REPLACE_STRNDUP@
+REPLACE_STRNLEN = @REPLACE_STRNLEN@
REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@
REPLACE_STRSTR = @REPLACE_STRSTR@
REPLACE_STRTOD = @REPLACE_STRTOD@
@@ -928,6 +937,7 @@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@
REPLACE_SYMLINK = @REPLACE_SYMLINK@
REPLACE_TIMEGM = @REPLACE_TIMEGM@
REPLACE_TMPFILE = @REPLACE_TMPFILE@
+REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@
REPLACE_UNLINK = @REPLACE_UNLINK@
REPLACE_UNLINKAT = @REPLACE_UNLINKAT@
REPLACE_UNSETENV = @REPLACE_UNSETENV@
@@ -2210,6 +2220,7 @@ stdio.h: stdio.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
-e 's|@''REPLACE_VPRINTF''@|$(REPLACE_VPRINTF)|g' \
-e 's|@''REPLACE_VSNPRINTF''@|$(REPLACE_VSNPRINTF)|g' \
-e 's|@''REPLACE_VSPRINTF''@|$(REPLACE_VSPRINTF)|g' \
+ -e 's|@''ASM_SYMBOL_PREFIX''@|$(ASM_SYMBOL_PREFIX)|g' \
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
@@ -2358,6 +2369,7 @@ string.h: string.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
-e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \
-e 's|@''REPLACE_STRNCAT''@|$(REPLACE_STRNCAT)|g' \
-e 's|@''REPLACE_STRNDUP''@|$(REPLACE_STRNDUP)|g' \
+ -e 's|@''REPLACE_STRNLEN''@|$(REPLACE_STRNLEN)|g' \
-e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \
-e 's|@''REPLACE_STRTOK_R''@|$(REPLACE_STRTOK_R)|g' \
-e 's|@''UNDEFINE_STRTOK_R''@|$(UNDEFINE_STRTOK_R)|g' \
@@ -2544,6 +2556,7 @@ time.h: time.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
-e 's|@''REPLACE_MKTIME''@|$(REPLACE_MKTIME)|g' \
-e 's|@''REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \
-e 's|@''REPLACE_TIMEGM''@|$(REPLACE_TIMEGM)|g' \
+ -e 's|@''PTHREAD_H_DEFINES_STRUCT_TIMESPEC''@|$(PTHREAD_H_DEFINES_STRUCT_TIMESPEC)|g' \
-e 's|@''SYS_TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(SYS_TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \
-e 's|@''TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
@@ -2588,6 +2601,7 @@ unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
-e 's|@''GNULIB_LSEEK''@|$(GNULIB_LSEEK)|g' \
-e 's|@''GNULIB_PIPE2''@|$(GNULIB_PIPE2)|g' \
-e 's|@''GNULIB_PREAD''@|$(GNULIB_PREAD)|g' \
+ -e 's|@''GNULIB_PWRITE''@|$(GNULIB_PWRITE)|g' \
-e 's|@''GNULIB_READLINK''@|$(GNULIB_READLINK)|g' \
-e 's|@''GNULIB_READLINKAT''@|$(GNULIB_READLINKAT)|g' \
-e 's|@''GNULIB_RMDIR''@|$(GNULIB_RMDIR)|g' \
@@ -2622,6 +2636,7 @@ unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
-e 's|@''HAVE_LINKAT''@|$(HAVE_LINKAT)|g' \
-e 's|@''HAVE_PIPE2''@|$(HAVE_PIPE2)|g' \
-e 's|@''HAVE_PREAD''@|$(HAVE_PREAD)|g' \
+ -e 's|@''HAVE_PWRITE''@|$(HAVE_PWRITE)|g' \
-e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \
-e 's|@''HAVE_READLINKAT''@|$(HAVE_READLINKAT)|g' \
-e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \
@@ -2649,10 +2664,12 @@ unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
-e 's|@''REPLACE_LINKAT''@|$(REPLACE_LINKAT)|g' \
-e 's|@''REPLACE_LSEEK''@|$(REPLACE_LSEEK)|g' \
-e 's|@''REPLACE_PREAD''@|$(REPLACE_PREAD)|g' \
+ -e 's|@''REPLACE_PWRITE''@|$(REPLACE_PWRITE)|g' \
-e 's|@''REPLACE_READLINK''@|$(REPLACE_READLINK)|g' \
-e 's|@''REPLACE_RMDIR''@|$(REPLACE_RMDIR)|g' \
-e 's|@''REPLACE_SLEEP''@|$(REPLACE_SLEEP)|g' \
-e 's|@''REPLACE_SYMLINK''@|$(REPLACE_SYMLINK)|g' \
+ -e 's|@''REPLACE_TTYNAME_R''@|$(REPLACE_TTYNAME_R)|g' \
-e 's|@''REPLACE_UNLINK''@|$(REPLACE_UNLINK)|g' \
-e 's|@''REPLACE_UNLINKAT''@|$(REPLACE_UNLINKAT)|g' \
-e 's|@''REPLACE_USLEEP''@|$(REPLACE_USLEEP)|g' \
diff --git a/gnulib/lib/canonicalize-lgpl.c b/gnulib/lib/canonicalize-lgpl.c
index 480a1325..c2164e07 100644
--- a/gnulib/lib/canonicalize-lgpl.c
+++ b/gnulib/lib/canonicalize-lgpl.c
@@ -43,7 +43,7 @@
# include <shlib-compat.h>
#else
# define SHLIB_COMPAT(lib, introduced, obsoleted) 0
-# define versioned_symbol(lib, local, symbol, version)
+# define versioned_symbol(lib, local, symbol, version) extern int dummy
# define compat_symbol(lib, local, symbol, version)
# define weak_alias(local, symbol)
# define __canonicalize_file_name canonicalize_file_name
@@ -62,6 +62,8 @@
# endif
# define __readlink readlink
# define __set_errno(e) errno = (e)
+/* Use the system functions, not the gnulib overrides in this file. */
+# undef malloc
# ifndef MAXSYMLINKS
# ifdef SYMLOOP_MAX
# define MAXSYMLINKS SYMLOOP_MAX
diff --git a/gnulib/lib/config.charset b/gnulib/lib/config.charset
index 2959df89..aa7d00db 100755
--- a/gnulib/lib/config.charset
+++ b/gnulib/lib/config.charset
@@ -30,21 +30,21 @@
# The current list of GNU canonical charset names is as follows.
#
# name MIME? used by which systems
-# ASCII, ANSI_X3.4-1968 glibc solaris freebsd netbsd darwin
-# ISO-8859-1 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin
-# ISO-8859-2 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin
-# ISO-8859-3 Y glibc solaris
+# ASCII, ANSI_X3.4-1968 glibc solaris freebsd netbsd darwin cygwin
+# ISO-8859-1 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin
+# ISO-8859-2 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin
+# ISO-8859-3 Y glibc solaris cygwin
# ISO-8859-4 Y osf solaris freebsd netbsd openbsd darwin
-# ISO-8859-5 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin
-# ISO-8859-6 Y glibc aix hpux solaris
-# ISO-8859-7 Y glibc aix hpux irix osf solaris netbsd openbsd darwin
-# ISO-8859-8 Y glibc aix hpux osf solaris
-# ISO-8859-9 Y glibc aix hpux irix osf solaris darwin
-# ISO-8859-13 glibc netbsd openbsd darwin
-# ISO-8859-14 glibc
-# ISO-8859-15 glibc aix osf solaris freebsd netbsd openbsd darwin
+# ISO-8859-5 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin
+# ISO-8859-6 Y glibc aix hpux solaris cygwin
+# ISO-8859-7 Y glibc aix hpux irix osf solaris netbsd openbsd darwin cygwin
+# ISO-8859-8 Y glibc aix hpux osf solaris cygwin
+# ISO-8859-9 Y glibc aix hpux irix osf solaris darwin cygwin
+# ISO-8859-13 glibc netbsd openbsd darwin cygwin
+# ISO-8859-14 glibc cygwin
+# ISO-8859-15 glibc aix osf solaris freebsd netbsd openbsd darwin cygwin
# KOI8-R Y glibc solaris freebsd netbsd openbsd darwin
-# KOI8-U Y glibc freebsd netbsd openbsd darwin
+# KOI8-U Y glibc freebsd netbsd openbsd darwin cygwin
# KOI8-T glibc
# CP437 dos
# CP775 dos
@@ -61,7 +61,7 @@
# CP869 dos
# CP874 woe32 dos
# CP922 aix
-# CP932 aix woe32 dos
+# CP932 aix cygwin woe32 dos
# CP943 aix
# CP949 osf darwin woe32 dos
# CP950 woe32 dos
@@ -71,7 +71,7 @@
# CP1129 aix
# CP1131 darwin
# CP1250 woe32
-# CP1251 glibc solaris netbsd openbsd darwin woe32
+# CP1251 glibc solaris netbsd openbsd darwin cygwin woe32
# CP1252 aix woe32
# CP1253 woe32
# CP1254 woe32
@@ -80,19 +80,19 @@
# CP1257 woe32
# GB2312 Y glibc aix hpux irix solaris freebsd netbsd darwin
# EUC-JP Y glibc aix hpux irix osf solaris freebsd netbsd darwin
-# EUC-KR Y glibc aix hpux irix osf solaris freebsd netbsd darwin
+# EUC-KR Y glibc aix hpux irix osf solaris freebsd netbsd darwin cygwin
# EUC-TW glibc aix hpux irix osf solaris netbsd
-# BIG5 Y glibc aix hpux osf solaris freebsd netbsd darwin
+# BIG5 Y glibc aix hpux osf solaris freebsd netbsd darwin cygwin
# BIG5-HKSCS glibc solaris darwin
-# GBK glibc aix osf solaris darwin woe32 dos
+# GBK glibc aix osf solaris darwin cygwin woe32 dos
# GB18030 glibc solaris netbsd darwin
# SHIFT_JIS Y hpux osf solaris freebsd netbsd darwin
# JOHAB glibc solaris woe32
-# TIS-620 glibc aix hpux osf solaris
+# TIS-620 glibc aix hpux osf solaris cygwin
# VISCII Y glibc
# TCVN5712-1 glibc
# ARMSCII-8 glibc darwin
-# GEORGIAN-PS glibc
+# GEORGIAN-PS glibc cygwin
# PT154 glibc
# HP-ROMAN8 hpux
# HP-ARABIC8 hpux
@@ -102,7 +102,7 @@
# HP-KANA8 hpux
# DEC-KANJI osf
# DEC-HANYU osf
-# UTF-8 Y glibc aix hpux osf solaris netbsd darwin
+# UTF-8 Y glibc aix hpux osf solaris netbsd darwin cygwin
#
# Note: Names which are not marked as being a MIME name should not be used in
# Internet protocols for information interchange (mail, news, etc.).
diff --git a/gnulib/lib/error.c b/gnulib/lib/error.c
index c79e8d42..ed9dba0d 100644
--- a/gnulib/lib/error.c
+++ b/gnulib/lib/error.c
@@ -88,6 +88,15 @@ extern void __error_at_line (int status, int errnum, const char *file_name,
# include <fcntl.h>
# include <unistd.h>
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+/* Get declarations of the Win32 API functions. */
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+# endif
+
+/* The gnulib override of fcntl is not needed in this file. */
+# undef fcntl
+
# if !HAVE_DECL_STRERROR_R && STRERROR_R_CHAR_P
# ifndef HAVE_DECL_STRERROR_R
"this configure-time declaration test was not run"
@@ -104,10 +113,29 @@ extern char *program_name;
# endif /* HAVE_STRERROR_R || defined strerror_r */
#endif /* not _LIBC */
+#if !_LIBC
+/* Return non-zero if FD is open. */
+static inline int
+is_open (int fd)
+{
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ /* On Win32: The initial state of unassigned standard file descriptors is
+ that they are open but point to an INVALID_HANDLE_VALUE. There is no
+ fcntl, and the gnulib replacement fcntl does not support F_GETFL. */
+ return (HANDLE) _get_osfhandle (fd) != INVALID_HANDLE_VALUE;
+# else
+# ifndef F_GETFL
+# error Please port fcntl to your platform
+# endif
+ return 0 <= fcntl (fd, F_GETFL);
+# endif
+}
+#endif
+
static inline void
flush_stdout (void)
{
-#if !_LIBC && defined F_GETFL
+#if !_LIBC
int stdout_fd;
# if GNULIB_FREOPEN_SAFER
@@ -124,7 +152,7 @@ flush_stdout (void)
/* POSIX states that fflush (stdout) after fclose is unspecified; it
is safe in glibc, but not on all other platforms. fflush (NULL)
is always defined, but too draconian. */
- if (0 <= stdout_fd && 0 <= fcntl (stdout_fd, F_GETFL))
+ if (0 <= stdout_fd && is_open (stdout_fd))
#endif
fflush (stdout);
}
diff --git a/gnulib/lib/getopt.c b/gnulib/lib/getopt.c
index 738d998b..3791f129 100644
--- a/gnulib/lib/getopt.c
+++ b/gnulib/lib/getopt.c
@@ -738,7 +738,7 @@ _getopt_internal_r (int argc, char **argv, const char *optstring,
{
char c = *d->__nextchar++;
- char *temp = strchr (optstring, c);
+ const char *temp = strchr (optstring, c);
/* Increment `optind' when we start to process its last character. */
if (*d->__nextchar == '\0')
diff --git a/gnulib/lib/getopt_int.h b/gnulib/lib/getopt_int.h
index 169def5b..980b7507 100644
--- a/gnulib/lib/getopt_int.h
+++ b/gnulib/lib/getopt_int.h
@@ -30,6 +30,40 @@ extern int _getopt_internal (int ___argc, char **___argv,
/* Reentrant versions which can handle parsing multiple argument
vectors at the same time. */
+/* Describe how to deal with options that follow non-option ARGV-elements.
+
+ If the caller did not specify anything,
+ the default is REQUIRE_ORDER if the environment variable
+ POSIXLY_CORRECT is defined, PERMUTE otherwise.
+
+ REQUIRE_ORDER means don't recognize them as options;
+ stop option processing when the first non-option is seen.
+ This is what Unix does.
+ This mode of operation is selected by either setting the environment
+ variable POSIXLY_CORRECT, or using `+' as the first character
+ of the list of option characters, or by calling getopt.
+
+ PERMUTE is the default. We permute the contents of ARGV as we
+ scan, so that eventually all the non-options are at the end.
+ This allows options to be given in any order, even with programs
+ that were not written to expect this.
+
+ RETURN_IN_ORDER is an option available to programs that were
+ written to expect options and other ARGV-elements in any order
+ and that care about the ordering of the two. We describe each
+ non-option ARGV-element as if it were the argument of an option
+ with character code 1. Using `-' as the first character of the
+ list of option characters selects this mode of operation.
+
+ The special argument `--' forces an end of option-scanning regardless
+ of the value of `ordering'. In the case of RETURN_IN_ORDER, only
+ `--' can cause `getopt' to return -1 with `optind' != ARGC. */
+
+enum __ord
+ {
+ REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER
+ };
+
/* Data type for reentrant functions. */
struct _getopt_data
{
@@ -54,39 +88,8 @@ struct _getopt_data
by advancing to the next ARGV-element. */
char *__nextchar;
- /* Describe how to deal with options that follow non-option ARGV-elements.
-
- If the caller did not specify anything,
- the default is REQUIRE_ORDER if the environment variable
- POSIXLY_CORRECT is defined, PERMUTE otherwise.
-
- REQUIRE_ORDER means don't recognize them as options;
- stop option processing when the first non-option is seen.
- This is what Unix does.
- This mode of operation is selected by either setting the environment
- variable POSIXLY_CORRECT, or using `+' as the first character
- of the list of option characters, or by calling getopt.
-
- PERMUTE is the default. We permute the contents of ARGV as we
- scan, so that eventually all the non-options are at the end.
- This allows options to be given in any order, even with programs
- that were not written to expect this.
-
- RETURN_IN_ORDER is an option available to programs that were
- written to expect options and other ARGV-elements in any order
- and that care about the ordering of the two. We describe each
- non-option ARGV-element as if it were the argument of an option
- with character code 1. Using `-' as the first character of the
- list of option characters selects this mode of operation.
-
- The special argument `--' forces an end of option-scanning regardless
- of the value of `ordering'. In the case of RETURN_IN_ORDER, only
- `--' can cause `getopt' to return -1 with `optind' != ARGC. */
-
- enum
- {
- REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER
- } __ordering;
+ /* See __ord above. */
+ enum __ord __ordering;
/* If the POSIXLY_CORRECT environment variable is set
or getopt was called. */
diff --git a/gnulib/lib/localcharset.c b/gnulib/lib/localcharset.c
index a04dc446..fa2207fe 100644
--- a/gnulib/lib/localcharset.c
+++ b/gnulib/lib/localcharset.c
@@ -369,10 +369,9 @@ locale_charset (void)
codeset = nl_langinfo (CODESET);
# ifdef __CYGWIN__
- /* Cygwin 1.5.x does not have locales. nl_langinfo (CODESET) always
- returns "US-ASCII". As long as this is not fixed, return the suffix
- of the locale name from the environment variables (if present) or
- the codepage as a number. */
+ /* Cygwin < 1.7 does not have locales. nl_langinfo (CODESET) always
+ returns "US-ASCII". Return the suffix of the locale name from the
+ environment variables (if present) or the codepage as a number. */
if (codeset != NULL && strcmp (codeset, "US-ASCII") == 0)
{
const char *locale;
diff --git a/gnulib/lib/malloca.c b/gnulib/lib/malloca.c
index 623131bf..21bbc1f5 100644
--- a/gnulib/lib/malloca.c
+++ b/gnulib/lib/malloca.c
@@ -21,6 +21,9 @@
/* Specification. */
#include "malloca.h"
+/* Use the system functions, not the gnulib overrides in this file. */
+#undef malloc
+
/* The speed critical point in this file is freea() applied to an alloca()
result: it must be fast, to match the speed of alloca(). The speed of
mmalloca() and freea() in the other case are not critical, because they
diff --git a/gnulib/lib/regex_internal.c b/gnulib/lib/regex_internal.c
index 17eafaa9..98b8d5d2 100644
--- a/gnulib/lib/regex_internal.c
+++ b/gnulib/lib/regex_internal.c
@@ -733,15 +733,17 @@ re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags)
mbstate_t cur_state;
wchar_t wc2;
Idx mlen = raw + pstr->len - p;
- unsigned char buf[6];
size_t mbclen;
+#if 0 /* dead code: buf is set but never used */
+ unsigned char buf[6];
if (BE (pstr->trans != NULL, 0))
{
int i = mlen < 6 ? mlen : 6;
while (--i >= 0)
buf[i] = pstr->trans[p[i]];
}
+#endif
/* XXX Don't use mbrtowc, we know which conversion
to use (UTF-8 -> UCS4). */
memset (&cur_state, 0, sizeof (cur_state));
diff --git a/gnulib/lib/regex_internal.h b/gnulib/lib/regex_internal.h
index 2cb8c4d0..5aa5aa28 100644
--- a/gnulib/lib/regex_internal.h
+++ b/gnulib/lib/regex_internal.h
@@ -467,6 +467,8 @@ static unsigned int re_string_context_at (const re_string_t *input, Idx idx,
# else
/* alloca is implemented with malloc, so just use malloc. */
# define __libc_use_alloca(n) 0
+# undef alloca
+# define alloca(n) malloc (n)
# endif
#endif
diff --git a/gnulib/lib/setenv.c b/gnulib/lib/setenv.c
index b4c55322..ba760d6f 100644
--- a/gnulib/lib/setenv.c
+++ b/gnulib/lib/setenv.c
@@ -64,6 +64,10 @@ __libc_lock_define_initialized (static, envlock)
# define clearenv __clearenv
# define tfind __tfind
# define tsearch __tsearch
+#else
+/* Use the system functions, not the gnulib overrides in this file. */
+# undef malloc
+# undef realloc
#endif
/* In the GNU C library implementation we try to be more clever and
@@ -112,8 +116,8 @@ int
__add_to_environ (const char *name, const char *value, const char *combined,
int replace)
{
- register char **ep;
- register size_t size;
+ char **ep;
+ size_t size;
const size_t namelen = strlen (name);
const size_t vallen = value != NULL ? strlen (value) + 1 : 0;
@@ -147,6 +151,9 @@ __add_to_environ (const char *name, const char *value, const char *combined,
: realloc (last_environ, (size + 2) * sizeof (char *)));
if (new_environ == NULL)
{
+ /* It's easier to set errno to ENOMEM than to rely on the
+ 'malloc-posix' and 'realloc-posix' gnulib modules. */
+ __set_errno (ENOMEM);
UNLOCK;
return -1;
}
@@ -249,7 +256,7 @@ __add_to_environ (const char *name, const char *value, const char *combined,
if (np == NULL)
#endif
{
- np = malloc (namelen + 1 + vallen);
+ np = (char *) malloc (namelen + 1 + vallen);
if (np == NULL)
{
#if defined USE_TSEARCH && !defined _LIBC
diff --git a/gnulib/lib/stdbool.in.h b/gnulib/lib/stdbool.in.h
index e2312ecb..574c281a 100644
--- a/gnulib/lib/stdbool.in.h
+++ b/gnulib/lib/stdbool.in.h
@@ -50,6 +50,9 @@
with this substitute. With this substitute, only the values 0 and 1
give the expected result when converted to _Bool' or 'bool'.
+ - C99 allows the use of (_Bool)0.0 in constant expressions, but
+ this substitute cannot always provide this property.
+
Also, it is suggested that programs use 'bool' rather than '_Bool';
this isn't required, but 'bool' is more common. */
diff --git a/gnulib/lib/stdio-write.c b/gnulib/lib/stdio-write.c
index f7da9e42..a6a0eb14 100644
--- a/gnulib/lib/stdio-write.c
+++ b/gnulib/lib/stdio-write.c
@@ -63,7 +63,6 @@
}
# if !REPLACE_PRINTF_POSIX /* avoid collision with printf.c */
-# if !DEPENDS_ON_LIBINTL /* avoid collision with intl/printf.c */
int
printf (const char *format, ...)
{
@@ -76,7 +75,6 @@ printf (const char *format, ...)
return retval;
}
-# endif
# endif
# if !REPLACE_FPRINTF_POSIX /* avoid collision with fprintf.c */
diff --git a/gnulib/lib/stdio.in.h b/gnulib/lib/stdio.in.h
index dcb8ee57..80b9dbfd 100644
--- a/gnulib/lib/stdio.in.h
+++ b/gnulib/lib/stdio.in.h
@@ -63,6 +63,10 @@
/* The definition of _GL_WARN_ON_USE is copied here. */
+/* Macros for stringification. */
+#define _GL_STDIO_STRINGIZE(token) #token
+#define _GL_STDIO_MACROEXPAND_AND_STRINGIZE(token) _GL_STDIO_STRINGIZE(token)
+
#if @GNULIB_DPRINTF@
# if @REPLACE_DPRINTF@
@@ -640,16 +644,26 @@ _GL_WARN_ON_USE (popen, "popen is buggy on some platforms - "
#if @GNULIB_PRINTF_POSIX@ || @GNULIB_PRINTF@
# if (@GNULIB_PRINTF_POSIX@ && @REPLACE_PRINTF@) \
|| (@GNULIB_PRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@)
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# if defined __GNUC__
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
/* Don't break __attribute__((format(printf,M,N))). */
-# define printf __printf__
-# endif
-# define GNULIB_overrides_printf 1
+# define printf __printf__
+# endif
_GL_FUNCDECL_RPL_1 (__printf__, int,
(const char *format, ...)
+ __asm__ (@ASM_SYMBOL_PREFIX@
+ _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf))
__attribute__ ((__format__ (__printf__, 1, 2)))
_GL_ARG_NONNULL ((1)));
_GL_CXXALIAS_RPL_1 (printf, __printf__, int, (const char *format, ...));
+# else
+_GL_FUNCDECL_RPL (printf, int,
+ (const char *format, ...)
+ __attribute__ ((__format__ (__printf__, 1, 2)))
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (printf, int, (const char *format, ...));
+# endif
+# define GNULIB_overrides_printf 1
# else
_GL_CXXALIAS_SYS (printf, int, (const char *format, ...));
# endif
diff --git a/gnulib/lib/strerror.c b/gnulib/lib/strerror.c
index b0df7784..46153abf 100644
--- a/gnulib/lib/strerror.c
+++ b/gnulib/lib/strerror.c
@@ -32,6 +32,9 @@
# include "intprops.h"
+/* Use the system functions, not the gnulib overrides in this file. */
+# undef sprintf
+
# undef strerror
# if ! HAVE_DECL_STRERROR
# define strerror(n) NULL
diff --git a/gnulib/lib/string.in.h b/gnulib/lib/string.in.h
index eb8d7588..f64fce30 100644
--- a/gnulib/lib/string.in.h
+++ b/gnulib/lib/string.in.h
@@ -41,10 +41,12 @@
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)
# define __attribute__(Spec) /* empty */
# endif
+#endif
/* The attribute __pure__ was added in gcc 2.96. */
-# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 96)
-# define __pure__ /* empty */
-# endif
+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
+# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
+#else
+# define _GL_ATTRIBUTE_PURE /* empty */
#endif
@@ -62,13 +64,13 @@
# define memchr rpl_memchr
# endif
_GL_FUNCDECL_RPL (memchr, void *, (void const *__s, int __c, size_t __n)
- __attribute__ ((__pure__))
+ _GL_ATTRIBUTE_PURE
_GL_ARG_NONNULL ((1)));
_GL_CXXALIAS_RPL (memchr, void *, (void const *__s, int __c, size_t __n));
# else
# if ! @HAVE_MEMCHR@
_GL_FUNCDECL_SYS (memchr, void *, (void const *__s, int __c, size_t __n)
- __attribute__ ((__pure__))
+ _GL_ATTRIBUTE_PURE
_GL_ARG_NONNULL ((1)));
# endif
/* On some systems, this function is defined as an overloaded function:
@@ -102,7 +104,8 @@ _GL_WARN_ON_USE (memchr, "memchr has platform-specific bugs - "
_GL_FUNCDECL_RPL (memmem, void *,
(void const *__haystack, size_t __haystack_len,
void const *__needle, size_t __needle_len)
- __attribute__ ((__pure__)) _GL_ARG_NONNULL ((1, 3)));
+ _GL_ATTRIBUTE_PURE
+ _GL_ARG_NONNULL ((1, 3)));
_GL_CXXALIAS_RPL (memmem, void *,
(void const *__haystack, size_t __haystack_len,
void const *__needle, size_t __needle_len));
@@ -111,7 +114,8 @@ _GL_CXXALIAS_RPL (memmem, void *,
_GL_FUNCDECL_SYS (memmem, void *,
(void const *__haystack, size_t __haystack_len,
void const *__needle, size_t __needle_len)
- __attribute__ ((__pure__)) _GL_ARG_NONNULL ((1, 3)));
+ _GL_ATTRIBUTE_PURE
+ _GL_ARG_NONNULL ((1, 3)));
# endif
_GL_CXXALIAS_SYS (memmem, void *,
(void const *__haystack, size_t __haystack_len,
@@ -152,7 +156,7 @@ _GL_WARN_ON_USE (mempcpy, "mempcpy is unportable - "
#if @GNULIB_MEMRCHR@
# if ! @HAVE_DECL_MEMRCHR@
_GL_FUNCDECL_SYS (memrchr, void *, (void const *, int, size_t)
- __attribute__ ((__pure__))
+ _GL_ATTRIBUTE_PURE
_GL_ARG_NONNULL ((1)));
# endif
/* On some systems, this function is defined as an overloaded function:
@@ -182,7 +186,7 @@ _GL_WARN_ON_USE (memrchr, "memrchr is unportable - "
#if @GNULIB_RAWMEMCHR@
# if ! @HAVE_RAWMEMCHR@
_GL_FUNCDECL_SYS (rawmemchr, void *, (void const *__s, int __c_in)
- __attribute__ ((__pure__))
+ _GL_ATTRIBUTE_PURE
_GL_ARG_NONNULL ((1)));
# endif
/* On some systems, this function is defined as an overloaded function:
@@ -272,7 +276,7 @@ _GL_WARN_ON_USE (strchr, "strchr cannot work correctly on character strings "
#if @GNULIB_STRCHRNUL@
# if ! @HAVE_STRCHRNUL@
_GL_FUNCDECL_SYS (strchrnul, char *, (char const *__s, int __c_in)
- __attribute__ ((__pure__))
+ _GL_ATTRIBUTE_PURE
_GL_ARG_NONNULL ((1)));
# endif
/* On some systems, this function is defined as an overloaded function:
@@ -372,12 +376,23 @@ _GL_WARN_ON_USE (strndup, "strndup is unportable - "
MAXLEN bytes. If no '\0' terminator is found in that many bytes,
return MAXLEN. */
#if @GNULIB_STRNLEN@
-# if ! @HAVE_DECL_STRNLEN@
+# if @REPLACE_STRNLEN@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef strnlen
+# define strnlen rpl_strnlen
+# endif
+_GL_FUNCDECL_RPL (strnlen, size_t, (char const *__string, size_t __maxlen)
+ _GL_ATTRIBUTE_PURE
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (strnlen, size_t, (char const *__string, size_t __maxlen));
+# else
+# if ! @HAVE_DECL_STRNLEN@
_GL_FUNCDECL_SYS (strnlen, size_t, (char const *__string, size_t __maxlen)
- __attribute__ ((__pure__))
+ _GL_ATTRIBUTE_PURE
_GL_ARG_NONNULL ((1)));
-# endif
+# endif
_GL_CXXALIAS_SYS (strnlen, size_t, (char const *__string, size_t __maxlen));
+# endif
_GL_CXXALIASWARN (strnlen);
#elif defined GNULIB_POSIXCHECK
# undef strnlen
@@ -403,7 +418,7 @@ _GL_WARN_ON_USE (strcspn, "strcspn cannot work correctly on character strings "
#if @GNULIB_STRPBRK@
# if ! @HAVE_STRPBRK@
_GL_FUNCDECL_SYS (strpbrk, char *, (char const *__s, char const *__accept)
- __attribute__ ((__pure__))
+ _GL_ATTRIBUTE_PURE
_GL_ARG_NONNULL ((1, 2)));
# endif
/* On some systems, this function is defined as an overloaded function:
@@ -503,7 +518,7 @@ _GL_WARN_ON_USE (strsep, "strsep is unportable - "
# define strstr rpl_strstr
# endif
_GL_FUNCDECL_RPL (strstr, char *, (const char *haystack, const char *needle)
- __attribute__ ((__pure__))
+ _GL_ATTRIBUTE_PURE
_GL_ARG_NONNULL ((1, 2)));
_GL_CXXALIAS_RPL (strstr, char *, (const char *haystack, const char *needle));
# else
@@ -545,14 +560,16 @@ _GL_WARN_ON_USE (strstr, "strstr is quadratic on many systems, and cannot "
# endif
_GL_FUNCDECL_RPL (strcasestr, char *,
(const char *haystack, const char *needle)
- __attribute__ ((__pure__)) _GL_ARG_NONNULL ((1, 2)));
+ _GL_ATTRIBUTE_PURE
+ _GL_ARG_NONNULL ((1, 2)));
_GL_CXXALIAS_RPL (strcasestr, char *,
(const char *haystack, const char *needle));
# else
# if ! @HAVE_STRCASESTR@
_GL_FUNCDECL_SYS (strcasestr, char *,
(const char *haystack, const char *needle)
- __attribute__ ((__pure__)) _GL_ARG_NONNULL ((1, 2)));
+ _GL_ATTRIBUTE_PURE
+ _GL_ARG_NONNULL ((1, 2)));
# endif
/* On some systems, this function is defined as an overloaded function:
extern "C++" { const char * strcasestr (const char *, const char *); }
diff --git a/gnulib/lib/time.in.h b/gnulib/lib/time.in.h
index 8e364feb..6fb4fd71 100644
--- a/gnulib/lib/time.in.h
+++ b/gnulib/lib/time.in.h
@@ -48,10 +48,20 @@
/* Some systems don't define struct timespec (e.g., AIX 4.1, Ultrix 4.3).
Or they define it with the wrong member names or define it in <sys/time.h>
- (e.g., FreeBSD circa 1997). */
+ (e.g., FreeBSD circa 1997). Stock Mingw does not define it, but the
+ pthreads-win32 library defines it in <pthread.h>. */
# if ! @TIME_H_DEFINES_STRUCT_TIMESPEC@
# if @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
# include <sys/time.h>
+# elif @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@
+# include <pthread.h>
+/* The pthreads-win32 <pthread.h> also defines a couple of broken macros. */
+# undef asctime_r
+# undef ctime_r
+# undef gmtime_r
+# undef localtime_r
+# undef rand_r
+# undef strtok_r
# else
# ifdef __cplusplus
diff --git a/gnulib/lib/unistd.in.h b/gnulib/lib/unistd.in.h
index 04d3a68f..7914f228 100644
--- a/gnulib/lib/unistd.in.h
+++ b/gnulib/lib/unistd.in.h
@@ -86,7 +86,7 @@
#endif
#if (@GNULIB_WRITE@ || @GNULIB_READLINK@ || @GNULIB_READLINKAT@ \
- || @GNULIB_PREAD@ || defined GNULIB_POSIXCHECK)
+ || @GNULIB_PREAD@ || @GNULIB_PWRITE@ || defined GNULIB_POSIXCHECK)
/* Get ssize_t. */
# include <sys/types.h>
#endif
@@ -1016,6 +1016,40 @@ _GL_WARN_ON_USE (pread, "pread is unportable - "
#endif
+#if @GNULIB_PWRITE@
+/* Write at most BUFSIZE bytes from BUF into FD, starting at OFFSET.
+ Return the number of bytes written if successful, otherwise
+ set errno and return -1. 0 indicates nothing written. See the
+ POSIX:2001 specification
+ <http://www.opengroup.org/susv3xsh/pwrite.html>. */
+# if @REPLACE_PWRITE@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define pwrite rpl_pwrite
+# endif
+_GL_FUNCDECL_RPL (pwrite, ssize_t,
+ (int fd, const void *buf, size_t bufsize, off_t offset)
+ _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (pwrite, ssize_t,
+ (int fd, const void *buf, size_t bufsize, off_t offset));
+# else
+# if !@HAVE_PWRITE@
+_GL_FUNCDECL_SYS (pwrite, ssize_t,
+ (int fd, const void *buf, size_t bufsize, off_t offset)
+ _GL_ARG_NONNULL ((2)));
+# endif
+_GL_CXXALIAS_SYS (pwrite, ssize_t,
+ (int fd, const void *buf, size_t bufsize, off_t offset));
+# endif
+_GL_CXXALIASWARN (pwrite);
+#elif defined GNULIB_POSIXCHECK
+# undef pwrite
+# if HAVE_RAW_DECL_PWRITE
+_GL_WARN_ON_USE (pwrite, "pwrite is unportable - "
+ "use gnulib module pwrite for portability");
+# endif
+#endif
+
+
#if @GNULIB_READLINK@
/* Read the contents of the symbolic link FILE and place the first BUFSIZE
bytes of it into BUF. Return the number of bytes placed into BUF if
@@ -1164,12 +1198,23 @@ _GL_WARN_ON_USE (symlinkat, "symlinkat is not portable - "
#if @GNULIB_TTYNAME_R@
/* Store at most BUFLEN characters of the pathname of the terminal FD is
open on in BUF. Return 0 on success, otherwise an error number. */
-# if !@HAVE_TTYNAME_R@
+# if @REPLACE_TTYNAME_R@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef ttyname_r
+# define ttyname_r rpl_ttyname_r
+# endif
+_GL_FUNCDECL_RPL (ttyname_r, int,
+ (int fd, char *buf, size_t buflen) _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (ttyname_r, int,
+ (int fd, char *buf, size_t buflen));
+# else
+# if !@HAVE_TTYNAME_R@
_GL_FUNCDECL_SYS (ttyname_r, int,
(int fd, char *buf, size_t buflen) _GL_ARG_NONNULL ((2)));
-# endif
+# endif
_GL_CXXALIAS_SYS (ttyname_r, int,
(int fd, char *buf, size_t buflen));
+# endif
_GL_CXXALIASWARN (ttyname_r);
#elif defined GNULIB_POSIXCHECK
# undef ttyname_r
diff --git a/gnulib/lib/vasnprintf.c b/gnulib/lib/vasnprintf.c
index 723e05d0..e618901b 100644
--- a/gnulib/lib/vasnprintf.c
+++ b/gnulib/lib/vasnprintf.c
@@ -2889,8 +2889,8 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
length += n;
}
}
- }
# endif
+ }
#endif
#if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_DOUBLE) && !defined IN_LIBINTL
else if ((dp->conversion == 'a' || dp->conversion == 'A')
@@ -5498,6 +5498,8 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
length += count;
break;
}
+#undef pad_ourselves
+#undef prec_ourselves
}
}
}
diff --git a/gnulib/lib/verify.h b/gnulib/lib/verify.h
index bcd3f5a0..4ad780c8 100644
--- a/gnulib/lib/verify.h
+++ b/gnulib/lib/verify.h
@@ -69,13 +69,14 @@
if the entity names are not disambiguated. A workaround is to
attach the current line number to the entity name:
- #define GL_CONCAT0(x, y) x##y
- #define GL_CONCAT(x, y) GL_CONCAT0 (x, y)
- extern struct {...} * GL_CONCAT(dummy,__LINE__);
+ #define _GL_CONCAT0(x, y) x##y
+ #define _GL_CONCAT(x, y) _GL_CONCAT0 (x, y)
+ extern struct {...} * _GL_CONCAT (dummy, __LINE__);
But this has the problem that two invocations of verify from
within the same macro would collide, since the __LINE__ value
- would be the same for both invocations.
+ would be the same for both invocations. (The GCC __COUNTER__
+ macro solves this problem, but is not portable.)
A solution is to use the sizeof operator. It yields a number,
getting rid of the identity of the type. Declarations like
@@ -103,20 +104,41 @@
extern int (*dummy (void)) [sizeof (struct {...})];
+ * GCC warns about duplicate declarations of the dummy function if
+ -Wredundant_decls is used. GCC 4.3 and later have a builtin
+ __COUNTER__ macro that can let us generate unique identifiers for
+ each dummy function, to suppress this warning.
+
* This implementation exploits the fact that GCC does not warn about
the last declaration mentioned above. If a future version of GCC
introduces a warning for this, the problem could be worked around
- by using code specialized to GCC, e.g.,:
+ by using code specialized to GCC, just as __COUNTER__ is already
+ being used if available.
#if 4 <= __GNUC__
- # define verify(R) \
- extern int (* verify_function__ (void)) \
- [__builtin_constant_p (R) && (R) ? 1 : -1]
+ # define verify(R) [another version to keep GCC happy]
#endif
* In C++, any struct definition inside sizeof is invalid.
Use a template type to work around the problem. */
+/* Concatenate two preprocessor tokens. */
+# define _GL_CONCAT(x, y) _GL_CONCAT0 (x, y)
+# define _GL_CONCAT0(x, y) x##y
+
+/* _GL_COUNTER is an integer, preferably one that changes each time we
+ use it. Use __COUNTER__ if it works, falling back on __LINE__
+ otherwise. __LINE__ isn't perfect, but it's better than a
+ constant. */
+# if defined __COUNTER__ && __COUNTER__ != __COUNTER__
+# define _GL_COUNTER __COUNTER__
+# else
+# define _GL_COUNTER __LINE__
+# endif
+
+/* Generate a symbol with the given prefix, making it unique if
+ possible. */
+# define _GL_GENSYM(prefix) _GL_CONCAT (prefix, _GL_COUNTER)
/* Verify requirement R at compile-time, as an integer constant expression.
Return 1. */
@@ -135,6 +157,7 @@ template <int w>
/* Verify requirement R at compile-time, as a declaration without a
trailing ';'. */
-# define verify(R) extern int (* verify_function__ (void)) [verify_true (R)]
+# define verify(R) \
+ extern int (* _GL_GENSYM (verify_function) (void)) [verify_true (R)]
#endif
diff --git a/gnulib/lib/wchar.in.h b/gnulib/lib/wchar.in.h
index dd41d353..88d47dbc 100644
--- a/gnulib/lib/wchar.in.h
+++ b/gnulib/lib/wchar.in.h
@@ -407,7 +407,7 @@ _GL_WARN_ON_USE (wcsnrtombs, "wcsnrtombs is unportable - "
_GL_FUNCDECL_RPL (wcwidth, int, (wchar_t));
_GL_CXXALIAS_RPL (wcwidth, int, (wchar_t));
# else
-# if !defined wcwidth && !@HAVE_DECL_WCWIDTH@
+# if !@HAVE_DECL_WCWIDTH@
/* wcwidth exists but is not declared. */
_GL_FUNCDECL_SYS (wcwidth, int, (wchar_t));
# endif
diff --git a/gnulib/m4/asm-underscore.m4 b/gnulib/m4/asm-underscore.m4
new file mode 100644
index 00000000..1736cc43
--- /dev/null
+++ b/gnulib/m4/asm-underscore.m4
@@ -0,0 +1,48 @@
+# asm-underscore.m4 serial 1
+dnl Copyright (C) 2010 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. Based on as-underscore.m4 in GNU clisp.
+
+# gl_ASM_SYMBOL_PREFIX
+# Tests for the prefix of C symbols at the assembly language level and the
+# linker level. This prefix is either an underscore or empty. Defines the
+# C macro USER_LABEL_PREFIX to this prefix, and sets ASM_SYMBOL_PREFIX to
+# a stringified variant of this prefix.
+
+AC_DEFUN([gl_ASM_SYMBOL_PREFIX],
+[
+ dnl We don't use GCC's __USER_LABEL_PREFIX__ here, because
+ dnl 1. It works only for GCC.
+ dnl 2. It is incorrectly defined on some platforms, in some GCC versions.
+ AC_CACHE_CHECK(
+ [whether C symbols are prefixed with underscore at the linker level],
+ [gl_cv_prog_as_underscore],
+ [cat > conftest.c <<EOF
+#ifdef __cplusplus
+extern "C" int foo (void);
+#endif
+int foo(void) { return 0; }
+EOF
+ # Look for the assembly language name in the .s file.
+ AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS -S conftest.c) >/dev/null 2>&1
+ if grep _foo conftest.s >/dev/null ; then
+ gl_cv_prog_as_underscore=yes
+ else
+ gl_cv_prog_as_underscore=no
+ fi
+ rm -f conftest*
+ ])
+ if test $gl_cv_prog_as_underscore = yes; then
+ USER_LABEL_PREFIX=_
+ else
+ USER_LABEL_PREFIX=
+ fi
+ AC_DEFINE_UNQUOTED([USER_LABEL_PREFIX], [$USER_LABEL_PREFIX],
+ [Define to the prefix of C symbols at the assembler and linker level,
+ either an underscore or empty.])
+ ASM_SYMBOL_PREFIX='"'${USER_LABEL_PREFIX}'"'
+ AC_SUBST([ASM_SYMBOL_PREFIX])
+])
diff --git a/gnulib/m4/environ.m4 b/gnulib/m4/environ.m4
index 5f50d6e3..4c6849a3 100644
--- a/gnulib/m4/environ.m4
+++ b/gnulib/m4/environ.m4
@@ -1,4 +1,4 @@
-# environ.m4 serial 3
+# environ.m4 serial 4
dnl Copyright (C) 2001-2004, 2006-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -29,7 +29,7 @@ AC_DEFUN([gt_CHECK_VAR_DECL],
gt_cv_var=yes)])
AC_MSG_RESULT([$gt_cv_var])
if test $gt_cv_var = yes; then
- AC_DEFINE([HAVE_]translit($2, [a-z], [A-Z])[_DECL], 1,
+ AC_DEFINE([HAVE_]m4_translit($2, [a-z], [A-Z])[_DECL], 1,
[Define if you have the declaration of $2.])
fi
undefine([gt_cv_var])
diff --git a/gnulib/m4/fcntl-o.m4 b/gnulib/m4/fcntl-o.m4
index d416a61c..1adacc8a 100644
--- a/gnulib/m4/fcntl-o.m4
+++ b/gnulib/m4/fcntl-o.m4
@@ -1,4 +1,4 @@
-# fcntl-o.m4 serial 1
+# fcntl-o.m4 serial 2
dnl Copyright (C) 2006, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -12,7 +12,11 @@ dnl Written by Paul Eggert.
AC_DEFUN([gl_FCNTL_O_FLAGS],
[
dnl Persuade glibc <fcntl.h> to define O_NOATIME and O_NOFOLLOW.
- AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+ dnl AC_USE_SYSTEM_EXTENSIONS was introduced in autoconf 2.60 and obsoletes
+ dnl AC_GNU_SOURCE.
+ m4_ifdef([AC_USE_SYSTEM_EXTENSIONS],
+ [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])],
+ [AC_REQUIRE([AC_GNU_SOURCE])])
AC_CACHE_CHECK([for working fcntl.h], [gl_cv_header_working_fcntl_h],
[AC_RUN_IFELSE(
[AC_LANG_PROGRAM(
diff --git a/gnulib/m4/getlogin_r.m4 b/gnulib/m4/getlogin_r.m4
index 236872c9..5d6f1b2e 100644
--- a/gnulib/m4/getlogin_r.m4
+++ b/gnulib/m4/getlogin_r.m4
@@ -1,4 +1,4 @@
-#serial 6
+#serial 7
# Copyright (C) 2005-2007, 2009-2010 Free Software Foundation, Inc.
#
@@ -16,6 +16,8 @@ AC_DEFUN([gl_FUNC_GETLOGIN_R],
AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
dnl Persuade glibc <unistd.h> to declare getlogin_r().
+ dnl Persuade Solaris <unistd.h> to provide the POSIX compliant declaration of
+ dnl getlogin_r().
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
AC_CHECK_FUNCS_ONCE([getlogin_r])
diff --git a/gnulib/m4/gettext.m4 b/gnulib/m4/gettext.m4
index d6dc3fe2..f84e6a5d 100644
--- a/gnulib/m4/gettext.m4
+++ b/gnulib/m4/gettext.m4
@@ -1,4 +1,4 @@
-# gettext.m4 serial 62 (gettext-0.18)
+# gettext.m4 serial 63 (gettext-0.18)
dnl Copyright (C) 1995-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -15,7 +15,7 @@ dnl They are *not* in the public domain.
dnl Authors:
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
-dnl Bruno Haible <haible@clisp.cons.org>, 2000-2006.
+dnl Bruno Haible <haible@clisp.cons.org>, 2000-2006, 2008-2010.
dnl Macro to add for using GNU gettext.
@@ -60,6 +60,8 @@ AC_DEFUN([AM_GNU_GETTEXT],
ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
[errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
])])])])])
+ ifelse(ifelse([$1], [], [old])[]ifelse([$1], [no-libtool], [old]), [old],
+ [AC_DIAGNOSE([obsolete], [Use of AM_GNU_GETTEXT without [external] argument is deprecated.])])
ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
[errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
])])])])
diff --git a/gnulib/m4/gnulib-common.m4 b/gnulib/m4/gnulib-common.m4
index 9cc519e7..4c7ac30d 100644
--- a/gnulib/m4/gnulib-common.m4
+++ b/gnulib/m4/gnulib-common.m4
@@ -1,4 +1,4 @@
-# gnulib-common.m4 serial 18
+# gnulib-common.m4 serial 20
dnl Copyright (C) 2007-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -35,6 +35,12 @@ AC_DEFUN([gl_COMMON_BODY], [
is a misnomer outside of parameter lists. */
#define _UNUSED_PARAMETER_ _GL_UNUSED
])
+ dnl Preparation for running test programs:
+ dnl Tell glibc to write diagnostics from -D_FORTIFY_SOURCE=2 to stderr, not
+ dnl to /dev/tty, so they can be redirected to log files. Such diagnostics
+ dnl arise e.g., in the macros gl_PRINTF_DIRECTIVE_N, gl_SNPRINTF_DIRECTIVE_N.
+ LIBC_FATAL_STDERR_=1
+ export LIBC_FATAL_STDERR_
])
# gl_MODULE_INDICATOR_CONDITION
@@ -132,6 +138,7 @@ m4_ifdef([AC_PROG_MKDIR_P], [
# so that mixed use of GNU C and GNU C++ and mixed use of Sun C and Sun C++
# works.
# This definition can be removed once autoconf >= 2.62 can be assumed.
+m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.62]),[-1],[
AC_DEFUN([AC_C_RESTRICT],
[AC_CACHE_CHECK([for C/C++ restrict keyword], [ac_cv_c_restrict],
[ac_cv_c_restrict=no
@@ -169,6 +176,7 @@ 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.
diff --git a/gnulib/m4/gnulib-comp.m4 b/gnulib/m4/gnulib-comp.m4
index 561e574b..75edfcde 100644
--- a/gnulib/m4/gnulib-comp.m4
+++ b/gnulib/m4/gnulib-comp.m4
@@ -308,7 +308,7 @@ AC_DEFUN([gl_INIT],
gl_FUNC_GETOPT_POSIX
# Code from module gettext:
dnl you must add AM_GNU_GETTEXT([external]) or similar to configure.ac.
- AM_GNU_GETTEXT_VERSION([0.17])
+ AM_GNU_GETTEXT_VERSION([0.18.1])
# Code from module gettext-h:
AC_SUBST([LIBINTL])
AC_SUBST([LTLIBINTL])
@@ -907,6 +907,7 @@ AC_DEFUN([gl_FILE_LIST], [
m4/00gnulib.m4
m4/alloca.m4
m4/argp.m4
+ m4/asm-underscore.m4
m4/atexit.m4
m4/btowc.m4
m4/canonicalize.m4
diff --git a/gnulib/m4/iconv.m4 b/gnulib/m4/iconv.m4
index f46ff142..e2041b9b 100644
--- a/gnulib/m4/iconv.m4
+++ b/gnulib/m4/iconv.m4
@@ -1,4 +1,4 @@
-# iconv.m4 serial 9 (gettext-0.18)
+# iconv.m4 serial 11 (gettext-0.18.1)
dnl Copyright (C) 2000-2002, 2007-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -170,7 +170,22 @@ int main ()
AC_SUBST([LTLIBICONV])
])
-AC_DEFUN([AM_ICONV],
+dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to
+dnl avoid warnings like
+dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required".
+dnl This is tricky because of the way 'aclocal' is implemented:
+dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN.
+dnl Otherwise aclocal's initial scan pass would miss the macro definition.
+dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions.
+dnl Otherwise aclocal would emit many "Use of uninitialized value $1"
+dnl warnings.
+m4_define([gl_iconv_AC_DEFUN],
+ m4_version_prereq([2.64],
+ [[AC_DEFUN_ONCE(
+ [$1], [$2])]],
+ [[AC_DEFUN(
+ [$1], [$2])]]))
+gl_iconv_AC_DEFUN([AM_ICONV],
[
AM_ICONV_LINK
if test "$am_cv_func_iconv" = yes; then
diff --git a/gnulib/m4/intl.m4 b/gnulib/m4/intl.m4
index 5e17fea9..335b23c2 100644
--- a/gnulib/m4/intl.m4
+++ b/gnulib/m4/intl.m4
@@ -1,5 +1,5 @@
-# intl.m4 serial 8 (gettext-0.17)
-dnl Copyright (C) 1995-2007, 2009-2010 Free Software Foundation, Inc.
+# intl.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.
@@ -15,9 +15,9 @@ dnl They are *not* in the public domain.
dnl Authors:
dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
-dnl Bruno Haible <haible@clisp.cons.org>, 2000-2006.
+dnl Bruno Haible <haible@clisp.cons.org>, 2000-2009.
-AC_PREREQ(2.52)
+AC_PREREQ([2.52])
dnl Checks for all prerequisites of the intl subdirectory,
dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
@@ -40,14 +40,24 @@ AC_DEFUN([AM_INTL_SUBDIR],
AC_REQUIRE([gt_PRINTF_POSIX])
AC_REQUIRE([gl_GLIBC21])dnl
AC_REQUIRE([gl_XSIZE])dnl
+ AC_REQUIRE([gl_FCNTL_O_FLAGS])dnl
AC_REQUIRE([gt_INTL_MACOSX])dnl
+ dnl Support for automake's --enable-silent-rules.
+ case "$enable_silent_rules" in
+ yes) INTL_DEFAULT_VERBOSITY=0;;
+ no) INTL_DEFAULT_VERBOSITY=1;;
+ *) INTL_DEFAULT_VERBOSITY=1;;
+ esac
+ AC_SUBST([INTL_DEFAULT_VERBOSITY])
+
AC_CHECK_TYPE([ptrdiff_t], ,
[AC_DEFINE([ptrdiff_t], [long],
[Define as the type of the result of subtracting two pointers, if the system doesn't define it.])
])
AC_CHECK_HEADERS([stddef.h stdlib.h string.h])
- AC_CHECK_FUNCS([asprintf fwprintf putenv setenv setlocale snprintf wcslen])
+ AC_CHECK_FUNCS([asprintf fwprintf newlocale putenv setenv setlocale \
+ snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb])
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).
@@ -78,6 +88,12 @@ AC_DEFUN([AM_INTL_SUBDIR],
HAVE_SNPRINTF=0
fi
AC_SUBST([HAVE_SNPRINTF])
+ if test "$ac_cv_func_newlocale" = yes; then
+ HAVE_NEWLOCALE=1
+ else
+ HAVE_NEWLOCALE=0
+ fi
+ AC_SUBST([HAVE_NEWLOCALE])
if test "$ac_cv_func_wprintf" = yes; then
HAVE_WPRINTF=1
else
@@ -146,22 +162,31 @@ AC_DEFUN([AM_INTL_SUBDIR],
#define __libc_lock_lock_recursive gl_recursive_lock_lock
#define __libc_lock_unlock_recursive gl_recursive_lock_unlock
#define glthread_in_use libintl_thread_in_use
-#define glthread_lock_init libintl_lock_init
-#define glthread_lock_lock libintl_lock_lock
-#define glthread_lock_unlock libintl_lock_unlock
-#define glthread_lock_destroy libintl_lock_destroy
-#define glthread_rwlock_init libintl_rwlock_init
-#define glthread_rwlock_rdlock libintl_rwlock_rdlock
-#define glthread_rwlock_wrlock libintl_rwlock_wrlock
-#define glthread_rwlock_unlock libintl_rwlock_unlock
-#define glthread_rwlock_destroy libintl_rwlock_destroy
-#define glthread_recursive_lock_init libintl_recursive_lock_init
-#define glthread_recursive_lock_lock libintl_recursive_lock_lock
-#define glthread_recursive_lock_unlock libintl_recursive_lock_unlock
-#define glthread_recursive_lock_destroy libintl_recursive_lock_destroy
-#define glthread_once libintl_once
-#define glthread_once_call libintl_once_call
+#define glthread_lock_init_func libintl_lock_init_func
+#define glthread_lock_lock_func libintl_lock_lock_func
+#define glthread_lock_unlock_func libintl_lock_unlock_func
+#define glthread_lock_destroy_func libintl_lock_destroy_func
+#define glthread_rwlock_init_multithreaded libintl_rwlock_init_multithreaded
+#define glthread_rwlock_init_func libintl_rwlock_init_func
+#define glthread_rwlock_rdlock_multithreaded libintl_rwlock_rdlock_multithreaded
+#define glthread_rwlock_rdlock_func libintl_rwlock_rdlock_func
+#define glthread_rwlock_wrlock_multithreaded libintl_rwlock_wrlock_multithreaded
+#define glthread_rwlock_wrlock_func libintl_rwlock_wrlock_func
+#define glthread_rwlock_unlock_multithreaded libintl_rwlock_unlock_multithreaded
+#define glthread_rwlock_unlock_func libintl_rwlock_unlock_func
+#define glthread_rwlock_destroy_multithreaded libintl_rwlock_destroy_multithreaded
+#define glthread_rwlock_destroy_func libintl_rwlock_destroy_func
+#define glthread_recursive_lock_init_multithreaded libintl_recursive_lock_init_multithreaded
+#define glthread_recursive_lock_init_func libintl_recursive_lock_init_func
+#define glthread_recursive_lock_lock_multithreaded libintl_recursive_lock_lock_multithreaded
+#define glthread_recursive_lock_lock_func libintl_recursive_lock_lock_func
+#define glthread_recursive_lock_unlock_multithreaded libintl_recursive_lock_unlock_multithreaded
+#define glthread_recursive_lock_unlock_func libintl_recursive_lock_unlock_func
+#define glthread_recursive_lock_destroy_multithreaded libintl_recursive_lock_destroy_multithreaded
+#define glthread_recursive_lock_destroy_func libintl_recursive_lock_destroy_func
+#define glthread_once_func libintl_once_func
#define glthread_once_singlethreaded libintl_once_singlethreaded
+#define glthread_once_multithreaded libintl_once_multithreaded
])
])
@@ -198,40 +223,24 @@ AC_DEFUN([gt_INTL_SUBDIR_CORE],
AC_TRY_LINK(
[int foo (int a) { a = __builtin_expect (a, 10); return a == 10 ? 0 : 1; }],
[],
- [AC_DEFINE([HAVE_BUILTIN_EXPECT], 1,
+ [AC_DEFINE([HAVE_BUILTIN_EXPECT], [1],
[Define to 1 if the compiler understands __builtin_expect.])])
AC_CHECK_HEADERS([argz.h inttypes.h limits.h unistd.h sys/param.h])
AC_CHECK_FUNCS([getcwd getegid geteuid getgid getuid mempcpy munmap \
- stpcpy strcasecmp strdup strtoul tsearch argz_count argz_stringify \
- argz_next __fsetlocking])
+ stpcpy strcasecmp strdup strtoul tsearch uselocale argz_count \
+ argz_stringify argz_next __fsetlocking])
dnl Use the *_unlocked functions only if they are declared.
dnl (because some of them were defined without being declared in Solaris
dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built
dnl on Solaris 2.5.1 to run on Solaris 2.6).
dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13.
- gt_CHECK_DECL(feof_unlocked, [#include <stdio.h>])
- gt_CHECK_DECL(fgets_unlocked, [#include <stdio.h>])
+ gt_CHECK_DECL([feof_unlocked], [#include <stdio.h>])
+ gt_CHECK_DECL([fgets_unlocked], [#include <stdio.h>])
AM_ICONV
- dnl glibc >= 2.4 has a NL_LOCALE_NAME macro when _GNU_SOURCE is defined,
- dnl and a _NL_LOCALE_NAME macro always.
- AC_CACHE_CHECK([for NL_LOCALE_NAME macro], gt_cv_nl_locale_name,
- [AC_TRY_LINK([#include <langinfo.h>
-#include <locale.h>],
- [char* cs = nl_langinfo(_NL_LOCALE_NAME(LC_MESSAGES));
- return !cs;
- ],
- gt_cv_nl_locale_name=yes,
- gt_cv_nl_locale_name=no)
- ])
- if test $gt_cv_nl_locale_name = yes; then
- AC_DEFINE(HAVE_NL_LOCALE_NAME, 1,
- [Define if you have <langinfo.h> and it defines the NL_LOCALE_NAME macro if _GNU_SOURCE is defined.])
- fi
-
dnl intl/plural.c is generated from intl/plural.y. It requires bison,
dnl because plural.y uses bison specific features. It requires at least
dnl bison-1.26 because earlier versions generate a plural.c that doesn't
@@ -269,7 +278,7 @@ dnl gt_CHECK_DECL(FUNC, INCLUDES)
dnl Check whether a function is declared.
AC_DEFUN([gt_CHECK_DECL],
[
- AC_CACHE_CHECK([whether $1 is declared], ac_cv_have_decl_$1,
+ AC_CACHE_CHECK([whether $1 is declared], [ac_cv_have_decl_$1],
[AC_TRY_COMPILE([$2], [
#ifndef $1
char *p = (char *) $1;
diff --git a/gnulib/m4/lib-link.m4 b/gnulib/m4/lib-link.m4
index c73bd8e3..59b367df 100644
--- a/gnulib/m4/lib-link.m4
+++ b/gnulib/m4/lib-link.m4
@@ -1,4 +1,4 @@
-# lib-link.m4 serial 21 (gettext-0.18)
+# lib-link.m4 serial 23 (gettext-0.18.2)
dnl Copyright (C) 2001-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -18,9 +18,9 @@ AC_DEFUN([AC_LIB_LINKFLAGS],
[
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
AC_REQUIRE([AC_LIB_RPATH])
- pushdef([Name],[translit([$1],[./-], [___])])
- pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
- [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ pushdef([Name],[m4_translit([$1],[./+-], [____])])
+ pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
AC_LIB_LINKFLAGS_BODY([$1], [$2])
ac_cv_lib[]Name[]_libs="$LIB[]NAME"
@@ -58,9 +58,9 @@ AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
[
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
AC_REQUIRE([AC_LIB_RPATH])
- pushdef([Name],[translit([$1],[./-], [___])])
- pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
- [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ pushdef([Name],[m4_translit([$1],[./+-], [____])])
+ pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
dnl accordingly.
@@ -157,13 +157,13 @@ dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar
dnl macro call that searches for libname.
AC_DEFUN([AC_LIB_FROMPACKAGE],
[
- pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
- [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
define([acl_frompackage_]NAME, [$2])
popdef([NAME])
pushdef([PACK],[$2])
- pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-],
- [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
define([acl_libsinpackage_]PACKUP,
m4_ifdef([acl_libsinpackage_]PACKUP, [acl_libsinpackage_]PACKUP[[, ]],)[lib$1])
popdef([PACKUP])
@@ -178,14 +178,14 @@ dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
[
AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
- pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
- [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])])
- pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-],
- [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])])
dnl Autoconf >= 2.61 supports dots in --with options.
- pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit(PACK,[.],[_])],PACK)])
+ pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[m4_translit(PACK,[.],[_])],PACK)])
dnl By default, look in $includedir and $libdir.
use_additional=yes
AC_LIB_WITH_FINAL_PREFIX([
@@ -242,7 +242,7 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
names_already_handled="$names_already_handled $name"
dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
dnl or AC_LIB_HAVE_LINKFLAGS call.
- uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
+ uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
eval value=\"\$HAVE_LIB$uppername\"
if test -n "$value"; then
if test "$value" = yes; then
diff --git a/gnulib/m4/onceonly.m4 b/gnulib/m4/onceonly.m4
index 4a3cd84d..6a9c87b7 100644
--- a/gnulib/m4/onceonly.m4
+++ b/gnulib/m4/onceonly.m4
@@ -1,4 +1,4 @@
-# onceonly.m4 serial 6
+# onceonly.m4 serial 7
dnl Copyright (C) 2002-2003, 2005-2006, 2008-2010 Free Software Foundation,
dnl Inc.
dnl This file is free software, distributed under the terms of the GNU
@@ -39,16 +39,16 @@ AC_PREREQ([2.59])
AC_DEFUN([AC_CHECK_HEADERS_ONCE], [
:
m4_foreach_w([gl_HEADER_NAME], [$1], [
- AC_DEFUN([gl_CHECK_HEADER_]m4_quote(translit(gl_HEADER_NAME,
- [./-], [___])), [
+ AC_DEFUN([gl_CHECK_HEADER_]m4_quote(m4_translit(gl_HEADER_NAME,
+ [./-], [___])), [
m4_divert_text([INIT_PREPARE],
[gl_header_list="$gl_header_list gl_HEADER_NAME"])
gl_HEADERS_EXPANSION
AH_TEMPLATE(AS_TR_CPP([HAVE_]m4_defn([gl_HEADER_NAME])),
[Define to 1 if you have the <]m4_defn([gl_HEADER_NAME])[> header file.])
])
- AC_REQUIRE([gl_CHECK_HEADER_]m4_quote(translit(gl_HEADER_NAME,
- [./-], [___])))
+ AC_REQUIRE([gl_CHECK_HEADER_]m4_quote(m4_translit(gl_HEADER_NAME,
+ [./-], [___])))
])
])
m4_define([gl_HEADERS_EXPANSION], [
diff --git a/gnulib/m4/openat.m4 b/gnulib/m4/openat.m4
index cfde8f9a..80df7042 100644
--- a/gnulib/m4/openat.m4
+++ b/gnulib/m4/openat.m4
@@ -1,4 +1,4 @@
-# serial 28
+# serial 29
# See if we need to use our replacement for Solaris' openat et al functions.
dnl Copyright (C) 2004-2010 Free Software Foundation, Inc.
@@ -104,9 +104,11 @@ AC_DEFUN([gl_FUNC_FCHOWNAT],
[
AC_REQUIRE([gl_FUNC_CHOWN])
AC_CHECK_FUNC([fchownat],
- [gl_FUNC_FCHOWNAT_DEREF_BUG([REPLACE_FCHOWNAT=1
- AC_DEFINE([FCHOWNAT_NOFOLLOW_BUG], [1], [Define to 1 if your
- platform has fchownat, but it cannot perform lchown tasks.])
+ [gl_FUNC_FCHOWNAT_DEREF_BUG([
+ REPLACE_FCHOWNAT=1
+ AC_DEFINE([FCHOWNAT_NOFOLLOW_BUG], [1],
+ [Define to 1 if your platform has fchownat, but it cannot
+ perform lchown tasks.])
if test $REPLACE_CHOWN = 1; then
REPLACE_FCHOWNAT=1
fi])],
diff --git a/gnulib/m4/po.m4 b/gnulib/m4/po.m4
index 960efe15..47f36a41 100644
--- a/gnulib/m4/po.m4
+++ b/gnulib/m4/po.m4
@@ -29,7 +29,7 @@ AC_DEFUN([AM_PO_SUBDIRS],
dnl Release version of the gettext macros. This is used to ensure that
dnl the gettext macros and po/Makefile.in.in are in sync.
- AC_SUBST([GETTEXT_MACRO_VERSION], [0.17])
+ AC_SUBST([GETTEXT_MACRO_VERSION], [0.18])
dnl Perform the following tests also if --disable-nls has been given,
dnl because they are needed for "make dist" to work.
diff --git a/gnulib/m4/printf.m4 b/gnulib/m4/printf.m4
index ebca5364..b31efe3e 100644
--- a/gnulib/m4/printf.m4
+++ b/gnulib/m4/printf.m4
@@ -1,4 +1,4 @@
-# printf.m4 serial 33
+# printf.m4 serial 34
dnl Copyright (C) 2003, 2007-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -1101,7 +1101,7 @@ dnl }
dnl ---------------------------------------------------------------------
dnl Result is gl_cv_func_snprintf_retval_c99.
-AC_DEFUN([gl_SNPRINTF_RETVAL_C99],
+AC_DEFUN_ONCE([gl_SNPRINTF_RETVAL_C99],
[
AC_REQUIRE([AC_PROG_CC])
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
diff --git a/gnulib/m4/sockpfaf.m4 b/gnulib/m4/sockpfaf.m4
index 8a0c2360..8806705a 100644
--- a/gnulib/m4/sockpfaf.m4
+++ b/gnulib/m4/sockpfaf.m4
@@ -47,6 +47,9 @@ AC_DEFUN([gl_SOCKET_FAMILIES],
#endif
#ifdef HAVE_WINSOCK2_H
#include <winsock2.h>
+#endif
+#ifdef HAVE_WS2TCPIP_H
+#include <ws2tcpip.h>
#endif]],
[[int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z;
if (&x && &y && &z) return 0;]])],
diff --git a/gnulib/m4/stdint.m4 b/gnulib/m4/stdint.m4
index 1cc57e6e..c5e813a9 100644
--- a/gnulib/m4/stdint.m4
+++ b/gnulib/m4/stdint.m4
@@ -1,4 +1,4 @@
-# stdint.m4 serial 34
+# stdint.m4 serial 35
dnl Copyright (C) 2001-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -309,7 +309,7 @@ AC_DEFUN([gl_STDINT_BITSIZEOF],
dnl config.h.in,
dnl - extra AC_SUBST calls, so that the right substitutions are made.
m4_foreach_w([gltype], [$1],
- [AH_TEMPLATE([BITSIZEOF_]translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]),
+ [AH_TEMPLATE([BITSIZEOF_]m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]),
[Define to the number of bits in type ']gltype['.])])
for gltype in $1 ; do
AC_CACHE_CHECK([for bit size of $gltype], [gl_cv_bitsizeof_${gltype}],
@@ -334,7 +334,7 @@ AC_DEFUN([gl_STDINT_BITSIZEOF],
eval BITSIZEOF_${GLTYPE}=\$result
done
m4_foreach_w([gltype], [$1],
- [AC_SUBST([BITSIZEOF_]translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]))])
+ [AC_SUBST([BITSIZEOF_]m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]))])
])
dnl gl_CHECK_TYPES_SIGNED(TYPES, INCLUDES)
@@ -347,7 +347,7 @@ AC_DEFUN([gl_CHECK_TYPES_SIGNED],
dnl config.h.in,
dnl - extra AC_SUBST calls, so that the right substitutions are made.
m4_foreach_w([gltype], [$1],
- [AH_TEMPLATE([HAVE_SIGNED_]translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]),
+ [AH_TEMPLATE([HAVE_SIGNED_]m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]),
[Define to 1 if ']gltype[' is a signed integer type.])])
for gltype in $1 ; do
AC_CACHE_CHECK([whether $gltype is signed], [gl_cv_type_${gltype}_signed],
@@ -367,7 +367,7 @@ AC_DEFUN([gl_CHECK_TYPES_SIGNED],
fi
done
m4_foreach_w([gltype], [$1],
- [AC_SUBST([HAVE_SIGNED_]translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]))])
+ [AC_SUBST([HAVE_SIGNED_]m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]))])
])
dnl gl_INTEGER_TYPE_SUFFIX(TYPES, INCLUDES)
@@ -380,7 +380,7 @@ AC_DEFUN([gl_INTEGER_TYPE_SUFFIX],
dnl config.h.in,
dnl - extra AC_SUBST calls, so that the right substitutions are made.
m4_foreach_w([gltype], [$1],
- [AH_TEMPLATE(translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_])[_SUFFIX],
+ [AH_TEMPLATE(m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_])[_SUFFIX],
[Define to l, ll, u, ul, ull, etc., as suitable for
constants of type ']gltype['.])])
for gltype in $1 ; do
@@ -419,7 +419,7 @@ AC_DEFUN([gl_INTEGER_TYPE_SUFFIX],
AC_DEFINE_UNQUOTED([${GLTYPE}_SUFFIX], [$result])
done
m4_foreach_w([gltype], [$1],
- [AC_SUBST(translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_])[_SUFFIX])])
+ [AC_SUBST(m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_])[_SUFFIX])])
])
dnl gl_STDINT_INCLUDES
diff --git a/gnulib/m4/stdio_h.m4 b/gnulib/m4/stdio_h.m4
index 1d1d95e5..f5650cde 100644
--- a/gnulib/m4/stdio_h.m4
+++ b/gnulib/m4/stdio_h.m4
@@ -1,4 +1,4 @@
-# stdio_h.m4 serial 30
+# stdio_h.m4 serial 31
dnl Copyright (C) 2007-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -8,6 +8,7 @@ AC_DEFUN([gl_STDIO_H],
[
AC_REQUIRE([gl_STDIO_H_DEFAULTS])
AC_REQUIRE([AC_C_INLINE])
+ AC_REQUIRE([gl_ASM_SYMBOL_PREFIX])
gl_CHECK_NEXT_HEADERS([stdio.h])
dnl No need to create extra modules for these functions. Everyone who uses
dnl <stdio.h> likely needs them.
diff --git a/gnulib/m4/string_h.m4 b/gnulib/m4/string_h.m4
index cf26123e..1977aecf 100644
--- a/gnulib/m4/string_h.m4
+++ b/gnulib/m4/string_h.m4
@@ -5,7 +5,7 @@
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 16
+# serial 17
# Written by Paul Eggert.
@@ -105,6 +105,7 @@ AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
REPLACE_STRERROR=0; AC_SUBST([REPLACE_STRERROR])
REPLACE_STRNCAT=0; AC_SUBST([REPLACE_STRNCAT])
REPLACE_STRNDUP=0; AC_SUBST([REPLACE_STRNDUP])
+ REPLACE_STRNLEN=0; AC_SUBST([REPLACE_STRNLEN])
REPLACE_STRSIGNAL=0; AC_SUBST([REPLACE_STRSIGNAL])
REPLACE_STRTOK_R=0; AC_SUBST([REPLACE_STRTOK_R])
UNDEFINE_STRTOK_R=0; AC_SUBST([UNDEFINE_STRTOK_R])
diff --git a/gnulib/m4/strnlen.m4 b/gnulib/m4/strnlen.m4
index cd48948f..52bb838f 100644
--- a/gnulib/m4/strnlen.m4
+++ b/gnulib/m4/strnlen.m4
@@ -1,4 +1,4 @@
-# strnlen.m4 serial 10
+# strnlen.m4 serial 12
dnl Copyright (C) 2002-2003, 2005-2007, 2009-2010 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
@@ -7,23 +7,23 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_STRNLEN],
[
+ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+
dnl Persuade glibc <string.h> to declare strnlen().
AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
- AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
AC_CHECK_DECLS_ONCE([strnlen])
if test $ac_cv_have_decl_strnlen = no; then
HAVE_DECL_STRNLEN=0
+ else
+ AC_FUNC_STRNLEN
+ dnl Note: AC_FUNC_STRNLEN does AC_LIBOBJ([strnlen]).
+ if test $ac_cv_func_strnlen_working = no; then
+ REPLACE_STRNLEN=1
+ fi
fi
-
- AC_FUNC_STRNLEN
- if test $ac_cv_func_strnlen_working = no; then
- # This is necessary because automake-1.6.1 doesn't understand
- # that the above use of AC_FUNC_STRNLEN means we may have to use
- # lib/strnlen.c.
- #AC_LIBOBJ([strnlen])
- AC_DEFINE([strnlen], [rpl_strnlen],
- [Define to rpl_strnlen if the replacement function should be used.])
+ if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then
+ AC_LIBOBJ([strnlen])
gl_PREREQ_STRNLEN
fi
])
diff --git a/gnulib/m4/time_h.m4 b/gnulib/m4/time_h.m4
index b88ba94d..a45a10a9 100644
--- a/gnulib/m4/time_h.m4
+++ b/gnulib/m4/time_h.m4
@@ -2,6 +2,8 @@
# Copyright (C) 2000-2001, 2003-2007, 2009-2010 Free Software Foundation, Inc.
+# serial 2
+
# 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.
@@ -24,7 +26,7 @@ AC_DEFUN([gl_HEADER_TIME_H_BODY],
])
dnl Define HAVE_STRUCT_TIMESPEC if `struct timespec' is declared
-dnl in time.h or sys/time.h.
+dnl in time.h, sys/time.h, or pthread.h.
AC_DEFUN([gl_CHECK_TYPE_STRUCT_TIMESPEC],
[
@@ -41,6 +43,7 @@ AC_DEFUN([gl_CHECK_TYPE_STRUCT_TIMESPEC],
TIME_H_DEFINES_STRUCT_TIMESPEC=0
SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
+ PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
TIME_H_DEFINES_STRUCT_TIMESPEC=1
else
@@ -55,10 +58,24 @@ AC_DEFUN([gl_CHECK_TYPE_STRUCT_TIMESPEC],
[gl_cv_sys_struct_timespec_in_sys_time_h=no])])
if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
+ else
+ AC_CACHE_CHECK([for struct timespec in <pthread.h>],
+ [gl_cv_sys_struct_timespec_in_pthread_h],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <pthread.h>
+ ]],
+ [[static struct timespec x; x.tv_sec = x.tv_nsec;]])],
+ [gl_cv_sys_struct_timespec_in_pthread_h=yes],
+ [gl_cv_sys_struct_timespec_in_pthread_h=no])])
+ if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
+ PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
+ fi
fi
fi
AC_SUBST([TIME_H_DEFINES_STRUCT_TIMESPEC])
AC_SUBST([SYS_TIME_H_DEFINES_STRUCT_TIMESPEC])
+ AC_SUBST([PTHREAD_H_DEFINES_STRUCT_TIMESPEC])
])
AC_DEFUN([gl_TIME_MODULE_INDICATOR],
diff --git a/gnulib/m4/unistd_h.m4 b/gnulib/m4/unistd_h.m4
index 8c2eec64..48d06c74 100644
--- a/gnulib/m4/unistd_h.m4
+++ b/gnulib/m4/unistd_h.m4
@@ -1,4 +1,4 @@
-# unistd_h.m4 serial 45
+# unistd_h.m4 serial 46
dnl Copyright (C) 2006-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -38,8 +38,9 @@ AC_DEFUN([gl_UNISTD_H],
]], [chown dup2 dup3 environ euidaccess faccessat fchdir fchownat
fsync ftruncate getcwd getdomainname getdtablesize getgroups
gethostname getlogin getlogin_r getpagesize getusershell setusershell
- endusershell lchown link linkat lseek pipe2 pread readlink readlinkat
- rmdir sleep symlink symlinkat ttyname_r unlink unlinkat usleep])
+ endusershell lchown link linkat lseek pipe2 pread pwrite readlink
+ readlinkat rmdir sleep symlink symlinkat ttyname_r unlink unlinkat
+ usleep])
])
AC_DEFUN([gl_UNISTD_MODULE_INDICATOR],
@@ -79,6 +80,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
GNULIB_LSEEK=0; AC_SUBST([GNULIB_LSEEK])
GNULIB_PIPE2=0; AC_SUBST([GNULIB_PIPE2])
GNULIB_PREAD=0; AC_SUBST([GNULIB_PREAD])
+ GNULIB_PWRITE=0; AC_SUBST([GNULIB_PWRITE])
GNULIB_READLINK=0; AC_SUBST([GNULIB_READLINK])
GNULIB_READLINKAT=0; AC_SUBST([GNULIB_READLINKAT])
GNULIB_RMDIR=0; AC_SUBST([GNULIB_RMDIR])
@@ -113,6 +115,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
HAVE_LINKAT=1; AC_SUBST([HAVE_LINKAT])
HAVE_PIPE2=1; AC_SUBST([HAVE_PIPE2])
HAVE_PREAD=1; AC_SUBST([HAVE_PREAD])
+ HAVE_PWRITE=1; AC_SUBST([HAVE_PWRITE])
HAVE_READLINK=1; AC_SUBST([HAVE_READLINK])
HAVE_READLINKAT=1; AC_SUBST([HAVE_READLINKAT])
HAVE_SLEEP=1; AC_SUBST([HAVE_SLEEP])
@@ -140,10 +143,12 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
REPLACE_LINKAT=0; AC_SUBST([REPLACE_LINKAT])
REPLACE_LSEEK=0; AC_SUBST([REPLACE_LSEEK])
REPLACE_PREAD=0; AC_SUBST([REPLACE_PREAD])
+ REPLACE_PWRITE=0; AC_SUBST([REPLACE_PWRITE])
REPLACE_READLINK=0; AC_SUBST([REPLACE_READLINK])
REPLACE_RMDIR=0; AC_SUBST([REPLACE_RMDIR])
REPLACE_SLEEP=0; AC_SUBST([REPLACE_SLEEP])
REPLACE_SYMLINK=0; AC_SUBST([REPLACE_SYMLINK])
+ REPLACE_TTYNAME_R=0; AC_SUBST([REPLACE_TTYNAME_R])
REPLACE_UNLINK=0; AC_SUBST([REPLACE_UNLINK])
REPLACE_UNLINKAT=0; AC_SUBST([REPLACE_UNLINKAT])
REPLACE_USLEEP=0; AC_SUBST([REPLACE_USLEEP])
diff --git a/gnulib/m4/visibility.m4 b/gnulib/m4/visibility.m4
index 6d3f9c9d..077c4765 100644
--- a/gnulib/m4/visibility.m4
+++ b/gnulib/m4/visibility.m4
@@ -1,4 +1,4 @@
-# visibility.m4 serial 2 (gettext-0.18)
+# visibility.m4 serial 3 (gettext-0.18)
dnl Copyright (C) 2005, 2008-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -26,15 +26,37 @@ AC_DEFUN([gl_VISIBILITY],
CFLAG_VISIBILITY=
HAVE_VISIBILITY=0
if test -n "$GCC"; then
+ dnl First, check whether -Werror can be added to the command line, or
+ dnl whether it leads to an error because of some other option that the
+ dnl user has put into $CC $CFLAGS $CPPFLAGS.
+ AC_MSG_CHECKING([whether the -Werror option is usable])
+ AC_CACHE_VAL([gl_cv_cc_vis_werror], [
+ gl_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Werror"
+ AC_TRY_COMPILE([], [],
+ [gl_cv_cc_vis_werror=yes],
+ [gl_cv_cc_vis_werror=no])
+ CFLAGS="$gl_save_CFLAGS"])
+ AC_MSG_RESULT([$gl_cv_cc_vis_werror])
+ dnl Now check whether visibility declarations are supported.
AC_MSG_CHECKING([for simple visibility declarations])
AC_CACHE_VAL([gl_cv_cc_visibility], [
gl_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -fvisibility=hidden"
+ dnl We use the option -Werror and a function dummyfunc, because on some
+ dnl platforms (Cygwin 1.7) the use of -fvisibility triggers a warning
+ dnl "visibility attribute not supported in this configuration; ignored"
+ dnl at the first function definition in every compilation unit, and we
+ dnl don't want to use the option in this case.
+ if test $gl_cv_cc_vis_werror = yes; then
+ CFLAGS="$CFLAGS -Werror"
+ fi
AC_TRY_COMPILE(
[extern __attribute__((__visibility__("hidden"))) int hiddenvar;
extern __attribute__((__visibility__("default"))) int exportedvar;
extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
- extern __attribute__((__visibility__("default"))) int exportedfunc (void);],
+ extern __attribute__((__visibility__("default"))) int exportedfunc (void);
+ void dummyfunc (void) {}],
[],
[gl_cv_cc_visibility=yes],
[gl_cv_cc_visibility=no])