texinfo-commits
[Top][All Lists]
Advanced

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

[7285] update gnulib


From: gavinsmith0123
Subject: [7285] update gnulib
Date: Sat, 30 Jul 2016 20:17:20 +0000 (UTC)

Revision: 7285
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=7285
Author:   gavin
Date:     2016-07-30 20:17:19 +0000 (Sat, 30 Jul 2016)
Log Message:
-----------
update gnulib

Modified Paths:
--------------
    trunk/build-aux/config.rpath
    trunk/build-aux/snippet/arg-nonnull.h
    trunk/build-aux/snippet/c++defs.h
    trunk/build-aux/snippet/warn-on-use.h
    trunk/gnulib/lib/Makefile.am
    trunk/gnulib/lib/alloca.in.h
    trunk/gnulib/lib/argz.c
    trunk/gnulib/lib/argz.in.h
    trunk/gnulib/lib/asnprintf.c
    trunk/gnulib/lib/asprintf.c
    trunk/gnulib/lib/btowc.c
    trunk/gnulib/lib/config.charset
    trunk/gnulib/lib/errno.in.h
    trunk/gnulib/lib/error.c
    trunk/gnulib/lib/error.h
    trunk/gnulib/lib/exitfail.c
    trunk/gnulib/lib/exitfail.h
    trunk/gnulib/lib/float+.h
    trunk/gnulib/lib/float.c
    trunk/gnulib/lib/float.in.h
    trunk/gnulib/lib/getopt.c
    trunk/gnulib/lib/getopt.in.h
    trunk/gnulib/lib/getopt1.c
    trunk/gnulib/lib/getopt_int.h
    trunk/gnulib/lib/gettext.h
    trunk/gnulib/lib/glthread/lock.c
    trunk/gnulib/lib/glthread/lock.h
    trunk/gnulib/lib/glthread/threadlib.c
    trunk/gnulib/lib/intprops.h
    trunk/gnulib/lib/iswblank.c
    trunk/gnulib/lib/itold.c
    trunk/gnulib/lib/langinfo.in.h
    trunk/gnulib/lib/localcharset.c
    trunk/gnulib/lib/localcharset.h
    trunk/gnulib/lib/locale.in.h
    trunk/gnulib/lib/localeconv.c
    trunk/gnulib/lib/malloc.c
    trunk/gnulib/lib/malloca.c
    trunk/gnulib/lib/malloca.h
    trunk/gnulib/lib/mbchar.c
    trunk/gnulib/lib/mbchar.h
    trunk/gnulib/lib/mbiter.h
    trunk/gnulib/lib/mbrtowc.c
    trunk/gnulib/lib/mbscasecmp.c
    trunk/gnulib/lib/mbschr.c
    trunk/gnulib/lib/mbsinit.c
    trunk/gnulib/lib/mbslen.c
    trunk/gnulib/lib/mbsncasecmp.c
    trunk/gnulib/lib/mbsstr.c
    trunk/gnulib/lib/mbswidth.c
    trunk/gnulib/lib/mbswidth.h
    trunk/gnulib/lib/mbtowc-impl.h
    trunk/gnulib/lib/mbtowc.c
    trunk/gnulib/lib/mbuiter.h
    trunk/gnulib/lib/memchr.c
    trunk/gnulib/lib/mempcpy.c
    trunk/gnulib/lib/memrchr.c
    trunk/gnulib/lib/msvc-inval.c
    trunk/gnulib/lib/msvc-inval.h
    trunk/gnulib/lib/msvc-nothrow.c
    trunk/gnulib/lib/msvc-nothrow.h
    trunk/gnulib/lib/nl_langinfo.c
    trunk/gnulib/lib/printf-args.c
    trunk/gnulib/lib/printf-args.h
    trunk/gnulib/lib/printf-parse.c
    trunk/gnulib/lib/printf-parse.h
    trunk/gnulib/lib/ref-add.sin
    trunk/gnulib/lib/ref-del.sin
    trunk/gnulib/lib/regcomp.c
    trunk/gnulib/lib/regex.c
    trunk/gnulib/lib/regex.h
    trunk/gnulib/lib/regex_internal.c
    trunk/gnulib/lib/regex_internal.h
    trunk/gnulib/lib/regexec.c
    trunk/gnulib/lib/size_max.h
    trunk/gnulib/lib/stdarg.in.h
    trunk/gnulib/lib/stdbool.in.h
    trunk/gnulib/lib/stddef.in.h
    trunk/gnulib/lib/stdint.in.h
    trunk/gnulib/lib/stdio.in.h
    trunk/gnulib/lib/stdlib.in.h
    trunk/gnulib/lib/stpcpy.c
    trunk/gnulib/lib/str-kmp.h
    trunk/gnulib/lib/str-two-way.h
    trunk/gnulib/lib/strcasecmp.c
    trunk/gnulib/lib/strcasestr.c
    trunk/gnulib/lib/strdup.c
    trunk/gnulib/lib/streq.h
    trunk/gnulib/lib/strerror-override.c
    trunk/gnulib/lib/strerror-override.h
    trunk/gnulib/lib/strerror.c
    trunk/gnulib/lib/string.in.h
    trunk/gnulib/lib/strings.in.h
    trunk/gnulib/lib/strncasecmp.c
    trunk/gnulib/lib/strndup.c
    trunk/gnulib/lib/strnlen.c
    trunk/gnulib/lib/strnlen1.c
    trunk/gnulib/lib/strnlen1.h
    trunk/gnulib/lib/strstr.c
    trunk/gnulib/lib/sys_types.in.h
    trunk/gnulib/lib/unistd.in.h
    trunk/gnulib/lib/unitypes.in.h
    trunk/gnulib/lib/uniwidth/cjk.h
    trunk/gnulib/lib/uniwidth/width.c
    trunk/gnulib/lib/uniwidth.in.h
    trunk/gnulib/lib/vasnprintf.c
    trunk/gnulib/lib/vasnprintf.h
    trunk/gnulib/lib/vasprintf.c
    trunk/gnulib/lib/verify.h
    trunk/gnulib/lib/wchar.in.h
    trunk/gnulib/lib/wcrtomb.c
    trunk/gnulib/lib/wctype.in.h
    trunk/gnulib/lib/wcwidth.c
    trunk/gnulib/lib/xalloc-die.c
    trunk/gnulib/lib/xalloc-oversized.h
    trunk/gnulib/lib/xalloc.h
    trunk/gnulib/lib/xmalloc.c
    trunk/gnulib/lib/xsize.h
    trunk/gnulib/m4/00gnulib.m4
    trunk/gnulib/m4/absolute-header.m4
    trunk/gnulib/m4/alloca.m4
    trunk/gnulib/m4/argz.m4
    trunk/gnulib/m4/btowc.m4
    trunk/gnulib/m4/codeset.m4
    trunk/gnulib/m4/configmake.m4
    trunk/gnulib/m4/eealloc.m4
    trunk/gnulib/m4/errno_h.m4
    trunk/gnulib/m4/error.m4
    trunk/gnulib/m4/exponentd.m4
    trunk/gnulib/m4/extensions.m4
    trunk/gnulib/m4/extern-inline.m4
    trunk/gnulib/m4/fcntl-o.m4
    trunk/gnulib/m4/float_h.m4
    trunk/gnulib/m4/getopt.m4
    trunk/gnulib/m4/gettext.m4
    trunk/gnulib/m4/glibc2.m4
    trunk/gnulib/m4/glibc21.m4
    trunk/gnulib/m4/gnulib-cache.m4
    trunk/gnulib/m4/gnulib-common.m4
    trunk/gnulib/m4/gnulib-comp.m4
    trunk/gnulib/m4/gnulib-tool.m4
    trunk/gnulib/m4/iconv.m4
    trunk/gnulib/m4/include_next.m4
    trunk/gnulib/m4/intdiv0.m4
    trunk/gnulib/m4/intl.m4
    trunk/gnulib/m4/intldir.m4
    trunk/gnulib/m4/intlmacosx.m4
    trunk/gnulib/m4/intmax.m4
    trunk/gnulib/m4/intmax_t.m4
    trunk/gnulib/m4/inttypes-pri.m4
    trunk/gnulib/m4/inttypes_h.m4
    trunk/gnulib/m4/iswblank.m4
    trunk/gnulib/m4/langinfo_h.m4
    trunk/gnulib/m4/lcmessage.m4
    trunk/gnulib/m4/lib-ld.m4
    trunk/gnulib/m4/lib-link.m4
    trunk/gnulib/m4/lib-prefix.m4
    trunk/gnulib/m4/libunistring-base.m4
    trunk/gnulib/m4/localcharset.m4
    trunk/gnulib/m4/locale-fr.m4
    trunk/gnulib/m4/locale-ja.m4
    trunk/gnulib/m4/locale-zh.m4
    trunk/gnulib/m4/locale_h.m4
    trunk/gnulib/m4/localeconv.m4
    trunk/gnulib/m4/lock.m4
    trunk/gnulib/m4/longlong.m4
    trunk/gnulib/m4/malloc.m4
    trunk/gnulib/m4/malloca.m4
    trunk/gnulib/m4/math_h.m4
    trunk/gnulib/m4/mbchar.m4
    trunk/gnulib/m4/mbiter.m4
    trunk/gnulib/m4/mbrtowc.m4
    trunk/gnulib/m4/mbsinit.m4
    trunk/gnulib/m4/mbslen.m4
    trunk/gnulib/m4/mbstate_t.m4
    trunk/gnulib/m4/mbswidth.m4
    trunk/gnulib/m4/mbtowc.m4
    trunk/gnulib/m4/memchr.m4
    trunk/gnulib/m4/mempcpy.m4
    trunk/gnulib/m4/memrchr.m4
    trunk/gnulib/m4/mmap-anon.m4
    trunk/gnulib/m4/msvc-inval.m4
    trunk/gnulib/m4/msvc-nothrow.m4
    trunk/gnulib/m4/multiarch.m4
    trunk/gnulib/m4/nl_langinfo.m4
    trunk/gnulib/m4/nls.m4
    trunk/gnulib/m4/nocrash.m4
    trunk/gnulib/m4/off_t.m4
    trunk/gnulib/m4/onceonly.m4
    trunk/gnulib/m4/po.m4
    trunk/gnulib/m4/printf-posix.m4
    trunk/gnulib/m4/printf.m4
    trunk/gnulib/m4/progtest.m4
    trunk/gnulib/m4/regex.m4
    trunk/gnulib/m4/size_max.m4
    trunk/gnulib/m4/ssize_t.m4
    trunk/gnulib/m4/stdarg.m4
    trunk/gnulib/m4/stdbool.m4
    trunk/gnulib/m4/stddef_h.m4
    trunk/gnulib/m4/stdint.m4
    trunk/gnulib/m4/stdint_h.m4
    trunk/gnulib/m4/stdio_h.m4
    trunk/gnulib/m4/stdlib_h.m4
    trunk/gnulib/m4/stpcpy.m4
    trunk/gnulib/m4/strcase.m4
    trunk/gnulib/m4/strcasestr.m4
    trunk/gnulib/m4/strdup.m4
    trunk/gnulib/m4/strerror.m4
    trunk/gnulib/m4/string_h.m4
    trunk/gnulib/m4/strings_h.m4
    trunk/gnulib/m4/strndup.m4
    trunk/gnulib/m4/strnlen.m4
    trunk/gnulib/m4/strstr.m4
    trunk/gnulib/m4/sys_socket_h.m4
    trunk/gnulib/m4/sys_types_h.m4
    trunk/gnulib/m4/threadlib.m4
    trunk/gnulib/m4/uintmax_t.m4
    trunk/gnulib/m4/unistd_h.m4
    trunk/gnulib/m4/vasnprintf.m4
    trunk/gnulib/m4/vasprintf.m4
    trunk/gnulib/m4/visibility.m4
    trunk/gnulib/m4/warn-on-use.m4
    trunk/gnulib/m4/wchar_h.m4
    trunk/gnulib/m4/wchar_t.m4
    trunk/gnulib/m4/wcrtomb.m4
    trunk/gnulib/m4/wctype_h.m4
    trunk/gnulib/m4/wcwidth.m4
    trunk/gnulib/m4/wint_t.m4
    trunk/gnulib/m4/xalloc.m4
    trunk/gnulib/m4/xsize.m4

Added Paths:
-----------
    trunk/gnulib/lib/arg-nonnull.h
    trunk/gnulib/lib/c++defs.h
    trunk/gnulib/lib/hard-locale.c
    trunk/gnulib/lib/hard-locale.h
    trunk/gnulib/lib/warn-on-use.h
    trunk/gnulib/m4/hard-locale.m4

Property Changed:
----------------
    trunk/gnulib/lib/

Modified: trunk/build-aux/config.rpath
===================================================================
--- trunk/build-aux/config.rpath        2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/build-aux/config.rpath        2016-07-30 20:17:19 UTC (rev 7285)
@@ -2,7 +2,7 @@
 # Output a system dependent set of variables, describing how to set the
 # run time search path of shared libraries in an executable.
 #
-#   Copyright 1996-2015 Free Software Foundation, Inc.
+#   Copyright 1996-2016 Free Software Foundation, Inc.
 #   Taken from GNU libtool, 2001
 #   Originally by Gordon Matzigkeit <address@hidden>, 1996
 #

Modified: trunk/build-aux/snippet/arg-nonnull.h
===================================================================
--- trunk/build-aux/snippet/arg-nonnull.h       2016-07-30 19:16:48 UTC (rev 
7284)
+++ trunk/build-aux/snippet/arg-nonnull.h       2016-07-30 20:17:19 UTC (rev 
7285)
@@ -1,5 +1,5 @@
 /* A C macro for declaring that specific arguments must not be NULL.
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2016 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

Modified: trunk/build-aux/snippet/c++defs.h
===================================================================
--- trunk/build-aux/snippet/c++defs.h   2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/build-aux/snippet/c++defs.h   2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* C++ compatible function declaration macros.
-   Copyright (C) 2010-2015 Free Software Foundation, Inc.
+   Copyright (C) 2010-2016 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

Modified: trunk/build-aux/snippet/warn-on-use.h
===================================================================
--- trunk/build-aux/snippet/warn-on-use.h       2016-07-30 19:16:48 UTC (rev 
7284)
+++ trunk/build-aux/snippet/warn-on-use.h       2016-07-30 20:17:19 UTC (rev 
7285)
@@ -1,5 +1,5 @@
 /* A C macro for emitting warnings if a function is used.
-   Copyright (C) 2010-2015 Free Software Foundation, Inc.
+   Copyright (C) 2010-2016 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


Property changes on: trunk/gnulib/lib
___________________________________________________________________
Modified: svn:ignore
   - *.o
Makefile
Makefile.in
.deps
libgnu.a
alloca.h
argz.h
configmake.h
errno.h
fcntl.h
getopt.h
stdarg.h
stdbool.h
stdint.h
stdio.h
stdlib.h
string.h
sys_stat.h
sys_time.h
time.h
unistd.h
unitypes.h
uniwidth.h
wchar.h
wctype.h
math.h
stddef.h

   + *.o
Makefile
Makefile.in
.deps
libgnu.a
alloca.h
argz.h
configmake.h
errno.h
fcntl.h
getopt.h
stdarg.h
stdbool.h
stdint.h
stdio.h
stdlib.h
string.h
strings.h
sys_stat.h
sys_time.h
sys
time.h
unistd.h
unitypes.h
uniwidth.h
wchar.h
wctype.h
math.h
stddef.h


Modified: trunk/gnulib/lib/Makefile.am
===================================================================
--- trunk/gnulib/lib/Makefile.am        2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/Makefile.am        2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,6 +1,6 @@
 ## DO NOT EDIT! GENERATED AUTOMATICALLY!
 ## Process this file with automake to produce Makefile.in.
-# Copyright (C) 2002-2015 Free Software Foundation, Inc.
+# Copyright (C) 2002-2016 Free Software Foundation, Inc.
 #
 # This file is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -295,6 +295,16 @@
 
 ## end   gnulib module gettext-h
 
+## begin gnulib module hard-locale
+
+if gl_GNULIB_ENABLED_30838f5439487421042f2225bed3af76
+libgnu_a_SOURCES += hard-locale.c
+
+endif
+EXTRA_DIST += hard-locale.h
+
+## end   gnulib module hard-locale
+
 ## begin gnulib module havelib
 
 

Modified: trunk/gnulib/lib/alloca.in.h
===================================================================
--- trunk/gnulib/lib/alloca.in.h        2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/alloca.in.h        2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,6 +1,6 @@
 /* Memory allocation on the stack.
 
-   Copyright (C) 1995, 1999, 2001-2004, 2006-2015 Free Software Foundation,
+   Copyright (C) 1995, 1999, 2001-2004, 2006-2016 Free Software Foundation,
    Inc.
 
    This program is free software; you can redistribute it and/or modify it

Added: trunk/gnulib/lib/arg-nonnull.h
===================================================================
--- trunk/gnulib/lib/arg-nonnull.h                              (rev 0)
+++ trunk/gnulib/lib/arg-nonnull.h      2016-07-30 20:17:19 UTC (rev 7285)
@@ -0,0 +1,10 @@
+/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools
+   that the values passed as arguments n, ..., m must be non-NULL pointers.
+   n = 1 stands for the first argument, n = 2 for the second argument etc.  */
+#ifndef _GL_ARG_NONNULL
+# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3
+#  define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params))
+# else
+#  define _GL_ARG_NONNULL(params)
+# endif
+#endif

Modified: trunk/gnulib/lib/argz.c
===================================================================
--- trunk/gnulib/lib/argz.c     2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/argz.c     2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* Functions for dealing with '\0' separated arg vectors.
-   Copyright (C) 1995-1998, 2000-2002, 2006, 2008-2015 Free Software
+   Copyright (C) 1995-1998, 2000-2002, 2006, 2008-2016 Free Software
    Foundation, Inc.
    This file is part of the GNU C Library.
 

Modified: trunk/gnulib/lib/argz.in.h
===================================================================
--- trunk/gnulib/lib/argz.in.h  2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/argz.in.h  2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* Routines for dealing with '\0' separated arg vectors.
-   Copyright (C) 1995-2000, 2004, 2007, 2009-2015 Free Software Foundation,
+   Copyright (C) 1995-2000, 2004, 2007, 2009-2016 Free Software Foundation,
    Inc.
    This file is part of the GNU C Library.
 

Modified: trunk/gnulib/lib/asnprintf.c
===================================================================
--- trunk/gnulib/lib/asnprintf.c        2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/asnprintf.c        2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* Formatted output to strings.
-   Copyright (C) 1999, 2002, 2006, 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2002, 2006, 2009-2016 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

Modified: trunk/gnulib/lib/asprintf.c
===================================================================
--- trunk/gnulib/lib/asprintf.c 2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/asprintf.c 2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* Formatted output to strings.
-   Copyright (C) 1999, 2002, 2006-2007, 2009-2015 Free Software Foundation,
+   Copyright (C) 1999, 2002, 2006-2007, 2009-2016 Free Software Foundation,
    Inc.
 
    This program is free software; you can redistribute it and/or modify

Modified: trunk/gnulib/lib/btowc.c
===================================================================
--- trunk/gnulib/lib/btowc.c    2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/btowc.c    2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* Convert unibyte character to wide character.
-   Copyright (C) 2008, 2010-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008, 2010-2016 Free Software Foundation, Inc.
    Written by Bruno Haible <address@hidden>, 2008.
 
    This program is free software: you can redistribute it and/or modify

Added: trunk/gnulib/lib/c++defs.h
===================================================================
--- trunk/gnulib/lib/c++defs.h                          (rev 0)
+++ trunk/gnulib/lib/c++defs.h  2016-07-30 20:17:19 UTC (rev 7285)
@@ -0,0 +1,255 @@
+#ifndef _GL_CXXDEFS_H
+#define _GL_CXXDEFS_H
+
+/* The three most frequent use cases of these macros are:
+
+   * For providing a substitute for a function that is missing on some
+     platforms, but is declared and works fine on the platforms on which
+     it exists:
+
+       #if @GNULIB_FOO@
+       # if address@hidden@
+       _GL_FUNCDECL_SYS (foo, ...);
+       # endif
+       _GL_CXXALIAS_SYS (foo, ...);
+       _GL_CXXALIASWARN (foo);
+       #elif defined GNULIB_POSIXCHECK
+       ...
+       #endif
+
+   * For providing a replacement for a function that exists on all platforms,
+     but is broken/insufficient and needs to be replaced on some platforms:
+
+       #if @GNULIB_FOO@
+       # if @REPLACE_FOO@
+       #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+       #   undef foo
+       #   define foo rpl_foo
+       #  endif
+       _GL_FUNCDECL_RPL (foo, ...);
+       _GL_CXXALIAS_RPL (foo, ...);
+       # else
+       _GL_CXXALIAS_SYS (foo, ...);
+       # endif
+       _GL_CXXALIASWARN (foo);
+       #elif defined GNULIB_POSIXCHECK
+       ...
+       #endif
+
+   * For providing a replacement for a function that exists on some platforms
+     but is broken/insufficient and needs to be replaced on some of them and
+     is additionally either missing or undeclared on some other platforms:
+
+       #if @GNULIB_FOO@
+       # if @REPLACE_FOO@
+       #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+       #   undef foo
+       #   define foo rpl_foo
+       #  endif
+       _GL_FUNCDECL_RPL (foo, ...);
+       _GL_CXXALIAS_RPL (foo, ...);
+       # else
+       #  if address@hidden@   or   if address@hidden@
+       _GL_FUNCDECL_SYS (foo, ...);
+       #  endif
+       _GL_CXXALIAS_SYS (foo, ...);
+       # endif
+       _GL_CXXALIASWARN (foo);
+       #elif defined GNULIB_POSIXCHECK
+       ...
+       #endif
+*/
+
+/* _GL_EXTERN_C declaration;
+   performs the declaration with C linkage.  */
+#if defined __cplusplus
+# define _GL_EXTERN_C extern "C"
+#else
+# define _GL_EXTERN_C extern
+#endif
+
+/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes);
+   declares a replacement function, named rpl_func, with the given prototype,
+   consisting of return type, parameters, and attributes.
+   Example:
+     _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...)
+                                  _GL_ARG_NONNULL ((1)));
+ */
+#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \
+  _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes)
+#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \
+  _GL_EXTERN_C rettype rpl_func parameters_and_attributes
+
+/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes);
+   declares the system function, named func, with the given prototype,
+   consisting of return type, parameters, and attributes.
+   Example:
+     _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...)
+                                  _GL_ARG_NONNULL ((1)));
+ */
+#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \
+  _GL_EXTERN_C rettype func parameters_and_attributes
+
+/* _GL_CXXALIAS_RPL (func, rettype, parameters);
+   declares a C++ alias called GNULIB_NAMESPACE::func
+   that redirects to rpl_func, if GNULIB_NAMESPACE is defined.
+   Example:
+     _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...));
+ */
+#define _GL_CXXALIAS_RPL(func,rettype,parameters) \
+  _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters)
+#if defined __cplusplus && defined GNULIB_NAMESPACE
+# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
+    namespace GNULIB_NAMESPACE                                \
+    {                                                         \
+      rettype (*const func) parameters = ::rpl_func;          \
+    }                                                         \
+    _GL_EXTERN_C int _gl_cxxalias_dummy
+#else
+# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
+    _GL_EXTERN_C int _gl_cxxalias_dummy
+#endif
+
+/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters);
+   is like  _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters);
+   except that the C function rpl_func may have a slightly different
+   declaration.  A cast is used to silence the "invalid conversion" error
+   that would otherwise occur.  */
+#if defined __cplusplus && defined GNULIB_NAMESPACE
+# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
+    namespace GNULIB_NAMESPACE                                     \
+    {                                                              \
+      rettype (*const func) parameters =                           \
+        reinterpret_cast<rettype(*)parameters>(::rpl_func);        \
+    }                                                              \
+    _GL_EXTERN_C int _gl_cxxalias_dummy
+#else
+# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
+    _GL_EXTERN_C int _gl_cxxalias_dummy
+#endif
+
+/* _GL_CXXALIAS_SYS (func, rettype, parameters);
+   declares a C++ alias called GNULIB_NAMESPACE::func
+   that redirects to the system provided function func, if GNULIB_NAMESPACE
+   is defined.
+   Example:
+     _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...));
+ */
+#if defined __cplusplus && defined GNULIB_NAMESPACE
+  /* If we were to write
+       rettype (*const func) parameters = ::func;
+     like above in _GL_CXXALIAS_RPL_1, the compiler could optimize calls
+     better (remove an indirection through a 'static' pointer variable),
+     but then the _GL_CXXALIASWARN macro below would cause a warning not only
+     for uses of ::func but also for uses of GNULIB_NAMESPACE::func.  */
+# define _GL_CXXALIAS_SYS(func,rettype,parameters) \
+    namespace GNULIB_NAMESPACE                     \
+    {                                              \
+      static rettype (*func) parameters = ::func;  \
+    }                                              \
+    _GL_EXTERN_C int _gl_cxxalias_dummy
+#else
+# define _GL_CXXALIAS_SYS(func,rettype,parameters) \
+    _GL_EXTERN_C int _gl_cxxalias_dummy
+#endif
+
+/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters);
+   is like  _GL_CXXALIAS_SYS (func, rettype, parameters);
+   except that the C function func may have a slightly different declaration.
+   A cast is used to silence the "invalid conversion" error that would
+   otherwise occur.  */
+#if defined __cplusplus && defined GNULIB_NAMESPACE
+# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
+    namespace GNULIB_NAMESPACE                          \
+    {                                                   \
+      static rettype (*func) parameters =               \
+        reinterpret_cast<rettype(*)parameters>(::func); \
+    }                                                   \
+    _GL_EXTERN_C int _gl_cxxalias_dummy
+#else
+# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
+    _GL_EXTERN_C int _gl_cxxalias_dummy
+#endif
+
+/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2);
+   is like  _GL_CXXALIAS_SYS (func, rettype, parameters);
+   except that the C function is picked among a set of overloaded functions,
+   namely the one with rettype2 and parameters2.  Two consecutive casts
+   are used to silence the "cannot find a match" and "invalid conversion"
+   errors that would otherwise occur.  */
+#if defined __cplusplus && defined GNULIB_NAMESPACE
+  /* The outer cast must be a reinterpret_cast.
+     The inner cast: When the function is defined as a set of overloaded
+     functions, it works as a static_cast<>, choosing the designated variant.
+     When the function is defined as a single variant, it works as a
+     reinterpret_cast<>. The parenthesized cast syntax works both ways.  */
+# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
+    namespace GNULIB_NAMESPACE                                                \
+    {                                                                         \
+      static rettype (*func) parameters =                                     \
+        reinterpret_cast<rettype(*)parameters>(                               \
+          (rettype2(*)parameters2)(::func));                                  \
+    }                                                                         \
+    _GL_EXTERN_C int _gl_cxxalias_dummy
+#else
+# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
+    _GL_EXTERN_C int _gl_cxxalias_dummy
+#endif
+
+/* _GL_CXXALIASWARN (func);
+   causes a warning to be emitted when ::func is used but not when
+   GNULIB_NAMESPACE::func is used.  func must be defined without overloaded
+   variants.  */
+#if defined __cplusplus && defined GNULIB_NAMESPACE
+# define _GL_CXXALIASWARN(func) \
+   _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE)
+# define _GL_CXXALIASWARN_1(func,namespace) \
+   _GL_CXXALIASWARN_2 (func, namespace)
+/* To work around GCC bug <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
+   we enable the warning only when not optimizing.  */
+# if !__OPTIMIZE__
+#  define _GL_CXXALIASWARN_2(func,namespace) \
+    _GL_WARN_ON_USE (func, \
+                     "The symbol ::" #func " refers to the system function. " \
+                     "Use " #namespace "::" #func " instead.")
+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
+#  define _GL_CXXALIASWARN_2(func,namespace) \
+     extern __typeof__ (func) func
+# else
+#  define _GL_CXXALIASWARN_2(func,namespace) \
+     _GL_EXTERN_C int _gl_cxxalias_dummy
+# endif
+#else
+# define _GL_CXXALIASWARN(func) \
+    _GL_EXTERN_C int _gl_cxxalias_dummy
+#endif
+
+/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes);
+   causes a warning to be emitted when the given overloaded variant of ::func
+   is used but not when GNULIB_NAMESPACE::func is used.  */
+#if defined __cplusplus && defined GNULIB_NAMESPACE
+# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
+   _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \
+                        GNULIB_NAMESPACE)
+# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) 
\
+   _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace)
+/* To work around GCC bug <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
+   we enable the warning only when not optimizing.  */
+# if !__OPTIMIZE__
+#  define 
_GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
+    _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \
+                         "The symbol ::" #func " refers to the system 
function. " \
+                         "Use " #namespace "::" #func " instead.")
+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
+#  define 
_GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
+     extern __typeof__ (func) func
+# else
+#  define 
_GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
+     _GL_EXTERN_C int _gl_cxxalias_dummy
+# endif
+#else
+# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
+    _GL_EXTERN_C int _gl_cxxalias_dummy
+#endif
+
+#endif /* _GL_CXXDEFS_H */

Modified: trunk/gnulib/lib/config.charset
===================================================================
--- trunk/gnulib/lib/config.charset     2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/config.charset     2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Output a system dependent table of character encoding aliases.
 #
-#   Copyright (C) 2000-2004, 2006-2015 Free Software Foundation, Inc.
+#   Copyright (C) 2000-2004, 2006-2016 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

Modified: trunk/gnulib/lib/errno.in.h
===================================================================
--- trunk/gnulib/lib/errno.in.h 2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/errno.in.h 2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,6 +1,6 @@
 /* A POSIX-like <errno.h>.
 
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008-2016 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

Modified: trunk/gnulib/lib/error.c
===================================================================
--- trunk/gnulib/lib/error.c    2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/error.c    2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* Error handler for noninteractive utilities
-   Copyright (C) 1990-1998, 2000-2007, 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-1998, 2000-2007, 2009-2016 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    This program is free software: you can redistribute it and/or modify

Modified: trunk/gnulib/lib/error.h
===================================================================
--- trunk/gnulib/lib/error.h    2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/error.h    2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* Declaration for error-reporting function
-   Copyright (C) 1995-1997, 2003, 2006, 2008-2015 Free Software Foundation,
+   Copyright (C) 1995-1997, 2003, 2006, 2008-2016 Free Software Foundation,
    Inc.
    This file is part of the GNU C Library.
 

Modified: trunk/gnulib/lib/exitfail.c
===================================================================
--- trunk/gnulib/lib/exitfail.c 2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/exitfail.c 2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,6 +1,6 @@
 /* Failure exit status
 
-   Copyright (C) 2002-2003, 2005-2007, 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2003, 2005-2007, 2009-2016 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

Modified: trunk/gnulib/lib/exitfail.h
===================================================================
--- trunk/gnulib/lib/exitfail.h 2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/exitfail.h 2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,6 +1,6 @@
 /* Failure exit status
 
-   Copyright (C) 2002, 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2009-2016 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

Modified: trunk/gnulib/lib/float+.h
===================================================================
--- trunk/gnulib/lib/float+.h   2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/float+.h   2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* Supplemental information about the floating-point formats.
-   Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
    Written by Bruno Haible <address@hidden>, 2007.
 
    This program is free software; you can redistribute it and/or modify

Modified: trunk/gnulib/lib/float.c
===================================================================
--- trunk/gnulib/lib/float.c    2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/float.c    2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* Auxiliary definitions for <float.h>.
-   Copyright (C) 2011-2015 Free Software Foundation, Inc.
+   Copyright (C) 2011-2016 Free Software Foundation, Inc.
    Written by Bruno Haible <address@hidden>, 2011.
 
    This program is free software: you can redistribute it and/or modify

Modified: trunk/gnulib/lib/float.in.h
===================================================================
--- trunk/gnulib/lib/float.in.h 2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/float.in.h 2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,6 +1,6 @@
 /* A correct <float.h>.
 
-   Copyright (C) 2007-2015 Free Software Foundation, Inc.
+   Copyright (C) 2007-2016 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

Modified: trunk/gnulib/lib/getopt.c
===================================================================
--- trunk/gnulib/lib/getopt.c   2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/getopt.c   2016-07-30 20:17:19 UTC (rev 7285)
@@ -2,7 +2,7 @@
    NOTE: getopt is part of the C library, so if you don't know what
    "Keep this file name-space clean" means, talk to address@hidden
    before changing it!
-   Copyright (C) 1987-1996, 1998-2004, 2006, 2008-2015 Free Software
+   Copyright (C) 1987-1996, 1998-2004, 2006, 2008-2016 Free Software
    Foundation, Inc.
    This file is part of the GNU C Library.
 

Modified: trunk/gnulib/lib/getopt.in.h
===================================================================
--- trunk/gnulib/lib/getopt.in.h        2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/getopt.in.h        2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* Declarations for getopt.
-   Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2007, 2009-2015 Free Software
+   Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2007, 2009-2016 Free Software
    Foundation, Inc.
    This file is part of the GNU C Library.
 

Modified: trunk/gnulib/lib/getopt1.c
===================================================================
--- trunk/gnulib/lib/getopt1.c  2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/getopt1.c  2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* getopt_long and getopt_long_only entry points for GNU getopt.
-   Copyright (C) 1987-1994, 1996-1998, 2004, 2006, 2009-2015 Free Software
+   Copyright (C) 1987-1994, 1996-1998, 2004, 2006, 2009-2016 Free Software
    Foundation, Inc.
    This file is part of the GNU C Library.
 

Modified: trunk/gnulib/lib/getopt_int.h
===================================================================
--- trunk/gnulib/lib/getopt_int.h       2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/getopt_int.h       2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* Internal declarations for getopt.
-   Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2004, 2009-2015 Free Software
+   Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2004, 2009-2016 Free Software
    Foundation, Inc.
    This file is part of the GNU C Library.
 

Modified: trunk/gnulib/lib/gettext.h
===================================================================
--- trunk/gnulib/lib/gettext.h  2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/gettext.h  2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* Convenience header for conditional use of GNU <libintl.h>.
-   Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2015 Free Software
+   Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2016 Free Software
    Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
@@ -225,15 +225,17 @@
   if (msg_ctxt_id != NULL)
 #endif
     {
+      int found_translation;
       memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1);
       msg_ctxt_id[msgctxt_len - 1] = '\004';
       memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
       translation = dcgettext (domain, msg_ctxt_id, category);
+      found_translation = (translation != msg_ctxt_id);
 #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
       if (msg_ctxt_id != buf)
         free (msg_ctxt_id);
 #endif
-      if (translation != msg_ctxt_id)
+      if (found_translation)
         return translation;
     }
   return msgid;
@@ -271,15 +273,17 @@
   if (msg_ctxt_id != NULL)
 #endif
     {
+      int found_translation;
       memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1);
       msg_ctxt_id[msgctxt_len - 1] = '\004';
       memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
       translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, 
category);
+      found_translation = !(translation == msg_ctxt_id || translation == 
msgid_plural);
 #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
       if (msg_ctxt_id != buf)
         free (msg_ctxt_id);
 #endif
-      if (!(translation == msg_ctxt_id || translation == msgid_plural))
+      if (found_translation)
         return translation;
     }
   return (n == 1 ? msgid : msgid_plural);

Modified: trunk/gnulib/lib/glthread/lock.c
===================================================================
--- trunk/gnulib/lib/glthread/lock.c    2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/glthread/lock.c    2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* Locking in multithreaded situations.
-   Copyright (C) 2005-2015 Free Software Foundation, Inc.
+   Copyright (C) 2005-2016 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

Modified: trunk/gnulib/lib/glthread/lock.h
===================================================================
--- trunk/gnulib/lib/glthread/lock.h    2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/glthread/lock.h    2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* Locking in multithreaded situations.
-   Copyright (C) 2005-2015 Free Software Foundation, Inc.
+   Copyright (C) 2005-2016 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

Modified: trunk/gnulib/lib/glthread/threadlib.c
===================================================================
--- trunk/gnulib/lib/glthread/threadlib.c       2016-07-30 19:16:48 UTC (rev 
7284)
+++ trunk/gnulib/lib/glthread/threadlib.c       2016-07-30 20:17:19 UTC (rev 
7285)
@@ -1,5 +1,5 @@
 /* Multithreading primitives.
-   Copyright (C) 2005-2015 Free Software Foundation, Inc.
+   Copyright (C) 2005-2016 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

Added: trunk/gnulib/lib/hard-locale.c
===================================================================
--- trunk/gnulib/lib/hard-locale.c                              (rev 0)
+++ trunk/gnulib/lib/hard-locale.c      2016-07-30 20:17:19 UTC (rev 7285)
@@ -0,0 +1,72 @@
+/* hard-locale.c -- Determine whether a locale is hard.
+
+   Copyright (C) 1997-1999, 2002-2004, 2006-2007, 2009-2016 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
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include <config.h>
+
+#include "hard-locale.h"
+
+#include <locale.h>
+#include <stdlib.h>
+#include <string.h>
+
+#ifdef __GLIBC__
+# define GLIBC_VERSION __GLIBC__
+#elif defined __UCLIBC__
+# define GLIBC_VERSION 2
+#else
+# define GLIBC_VERSION 0
+#endif
+
+/* Return true if the current CATEGORY locale is hard, i.e. if you
+   can't get away with assuming traditional C or POSIX behavior.  */
+bool
+hard_locale (int category)
+{
+  bool hard = true;
+  char const *p = setlocale (category, NULL);
+
+  if (p)
+    {
+      if (2 <= GLIBC_VERSION)
+        {
+          if (strcmp (p, "C") == 0 || strcmp (p, "POSIX") == 0)
+            hard = false;
+        }
+      else
+        {
+          char *locale = strdup (p);
+          if (locale)
+            {
+              /* Temporarily set the locale to the "C" and "POSIX" locales
+                 to find their names, so that we can determine whether one
+                 or the other is the caller's locale.  */
+              if (((p = setlocale (category, "C"))
+                   && strcmp (p, locale) == 0)
+                  || ((p = setlocale (category, "POSIX"))
+                      && strcmp (p, locale) == 0))
+                hard = false;
+
+              /* Restore the caller's locale.  */
+              setlocale (category, locale);
+              free (locale);
+            }
+        }
+    }
+
+  return hard;
+}

Added: trunk/gnulib/lib/hard-locale.h
===================================================================
--- trunk/gnulib/lib/hard-locale.h                              (rev 0)
+++ trunk/gnulib/lib/hard-locale.h      2016-07-30 20:17:19 UTC (rev 7285)
@@ -0,0 +1,25 @@
+/* Determine whether a locale is hard.
+
+   Copyright (C) 1999, 2003-2004, 2009-2016 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
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef HARD_LOCALE_H_
+# define HARD_LOCALE_H_ 1
+
+# include <stdbool.h>
+
+bool hard_locale (int);
+
+#endif /* HARD_LOCALE_H_ */

Modified: trunk/gnulib/lib/intprops.h
===================================================================
--- trunk/gnulib/lib/intprops.h 2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/intprops.h 2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,10 +1,10 @@
 /* intprops.h -- properties of integer types
 
-   Copyright (C) 2001-2005, 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2016 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
-   the Free Software Foundation; either version 3 of the License, or
+   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 the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
@@ -21,6 +21,7 @@
 #define _GL_INTPROPS_H
 
 #include <limits.h>
+#include <verify.h>
 
 /* Return a value with the common real type of E and V and the value of V.  */
 #define _GL_INT_CONVERT(e, v) (0 * (e) + (v))
@@ -36,17 +37,6 @@
    an integer.  */
 #define TYPE_IS_INTEGER(t) ((t) 1.5 == 1)
 
-/* True if negative values of the signed integer type T use two's
-   complement, ones' complement, or signed magnitude representation,
-   respectively.  Much GNU code assumes two's complement, but some
-   people like to be portable to all possible C hosts.  */
-#define TYPE_TWOS_COMPLEMENT(t) ((t) ~ (t) 0 == (t) -1)
-#define TYPE_ONES_COMPLEMENT(t) ((t) ~ (t) 0 == 0)
-#define TYPE_SIGNED_MAGNITUDE(t) ((t) ~ (t) 0 < (t) -1)
-
-/* True if the signed integer expression E uses two's complement.  */
-#define _GL_INT_TWOS_COMPLEMENT(e) (~ _GL_INT_CONVERT (e, 0) == -1)
-
 /* True if the real type T is signed.  */
 #define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
 
@@ -55,18 +45,10 @@
 #define EXPR_SIGNED(e) (_GL_INT_NEGATE_CONVERT (e, 1) < 0)
 
 
-/* Minimum and maximum values for integer types and expressions.  These
-   macros have undefined behavior if T is signed and has padding bits.
-   If this is a problem for you, please let us know how to fix it for
-   your host.  */
+/* Minimum and maximum values for integer types and expressions.  */
 
 /* The maximum and minimum values for the integer type T.  */
-#define TYPE_MINIMUM(t)                                                 \
-  ((t) (! TYPE_SIGNED (t)                                               \
-        ? (t) 0                                                         \
-        : TYPE_SIGNED_MAGNITUDE (t)                                     \
-        ? ~ (t) 0                                                       \
-        : ~ TYPE_MAXIMUM (t)))
+#define TYPE_MINIMUM(t) ((t) ~ TYPE_MAXIMUM (t))
 #define TYPE_MAXIMUM(t)                                                 \
   ((t) (! TYPE_SIGNED (t)                                               \
         ? (t) -1                                                        \
@@ -76,7 +58,7 @@
    after integer promotion.  E should not have side effects.  */
 #define _GL_INT_MINIMUM(e)                                              \
   (EXPR_SIGNED (e)                                                      \
-   ? - _GL_INT_TWOS_COMPLEMENT (e) - _GL_SIGNED_INT_MAXIMUM (e)         \
+   ? ~ _GL_SIGNED_INT_MAXIMUM (e)                                       \
    : _GL_INT_CONVERT (e, 0))
 #define _GL_INT_MAXIMUM(e)                                              \
   (EXPR_SIGNED (e)                                                      \
@@ -85,8 +67,25 @@
 #define _GL_SIGNED_INT_MAXIMUM(e)                                       \
   (((_GL_INT_CONVERT (e, 1) << (sizeof ((e) + 0) * CHAR_BIT - 2)) - 1) * 2 + 1)
 
+/* This include file assumes that signed types are two's complement without
+   padding bits; the above macros have undefined behavior otherwise.
+   If this is a problem for you, please let us know how to fix it for your 
host.
+   As a sanity check, test the assumption for some signed types that
+   <limits.h> bounds.  */
+verify (TYPE_MINIMUM (signed char) == SCHAR_MIN);
+verify (TYPE_MAXIMUM (signed char) == SCHAR_MAX);
+verify (TYPE_MINIMUM (short int) == SHRT_MIN);
+verify (TYPE_MAXIMUM (short int) == SHRT_MAX);
+verify (TYPE_MINIMUM (int) == INT_MIN);
+verify (TYPE_MAXIMUM (int) == INT_MAX);
+verify (TYPE_MINIMUM (long int) == LONG_MIN);
+verify (TYPE_MAXIMUM (long int) == LONG_MAX);
+#ifdef LLONG_MAX
+verify (TYPE_MINIMUM (long long int) == LLONG_MIN);
+verify (TYPE_MAXIMUM (long long int) == LLONG_MAX);
+#endif
 
-/* Return 1 if the __typeof__ keyword works.  This could be done by
+/* Does the __typeof__ keyword work?  This could be done by
    'configure', but for now it's easier to do it by hand.  */
 #if (2 <= __GNUC__ || defined __IBM__TYPEOF__ \
      || (0x5110 <= __SUNPRO_C && !__STDC__))
@@ -223,24 +222,35 @@
    ? (a) < (min) >> (b)                                 \
    : (max) >> (b) < (a))
 
+/* True if __builtin_add_overflow (A, B, P) works when P is null.  */
+#define _GL_HAS_BUILTIN_OVERFLOW_WITH_NULL (7 <= __GNUC__)
 
 /* The _GL*_OVERFLOW macros have the same restrictions as the
    *_RANGE_OVERFLOW macros, except that they do not assume that operands
    (e.g., A and B) have the same type as MIN and MAX.  Instead, they assume
    that the result (e.g., A + B) has that type.  */
-#define _GL_ADD_OVERFLOW(a, b, min, max)                                \
-  ((min) < 0 ? INT_ADD_RANGE_OVERFLOW (a, b, min, max)                  \
-   : (a) < 0 ? (b) <= (a) + (b)                                         \
-   : (b) < 0 ? (a) <= (a) + (b)                                         \
-   : (a) + (b) < (b))
-#define _GL_SUBTRACT_OVERFLOW(a, b, min, max)                           \
-  ((min) < 0 ? INT_SUBTRACT_RANGE_OVERFLOW (a, b, min, max)             \
-   : (a) < 0 ? 1                                                        \
-   : (b) < 0 ? (a) - (b) <= (a)                                         \
-   : (a) < (b))
-#define _GL_MULTIPLY_OVERFLOW(a, b, min, max)                           \
-  (((min) == 0 && (((a) < 0 && 0 < (b)) || ((b) < 0 && 0 < (a))))       \
-   || INT_MULTIPLY_RANGE_OVERFLOW (a, b, min, max))
+#if _GL_HAS_BUILTIN_OVERFLOW_WITH_NULL
+# define _GL_ADD_OVERFLOW(a, b, min, max)
+   __builtin_add_overflow (a, b, (__typeof__ ((a) + (b)) *) 0)
+# define _GL_SUBTRACT_OVERFLOW(a, b, min, max)
+   __builtin_sub_overflow (a, b, (__typeof__ ((a) - (b)) *) 0)
+# define _GL_MULTIPLY_OVERFLOW(a, b, min, max)
+   __builtin_mul_overflow (a, b, (__typeof__ ((a) * (b)) *) 0)
+#else
+# define _GL_ADD_OVERFLOW(a, b, min, max)                                \
+   ((min) < 0 ? INT_ADD_RANGE_OVERFLOW (a, b, min, max)                  \
+    : (a) < 0 ? (b) <= (a) + (b)                                         \
+    : (b) < 0 ? (a) <= (a) + (b)                                         \
+    : (a) + (b) < (b))
+# define _GL_SUBTRACT_OVERFLOW(a, b, min, max)                           \
+   ((min) < 0 ? INT_SUBTRACT_RANGE_OVERFLOW (a, b, min, max)             \
+    : (a) < 0 ? 1                                                        \
+    : (b) < 0 ? (a) - (b) <= (a)                                         \
+    : (a) < (b))
+# define _GL_MULTIPLY_OVERFLOW(a, b, min, max)                           \
+   (((min) == 0 && (((a) < 0 && 0 < (b)) || ((b) < 0 && 0 < (a))))       \
+    || INT_MULTIPLY_RANGE_OVERFLOW (a, b, min, max))
+#endif
 #define _GL_DIVIDE_OVERFLOW(a, b, min, max)                             \
   ((min) < 0 ? (b) == _GL_INT_NEGATE_CONVERT (min, 1) && (a) < - (max)  \
    : (a) < 0 ? (b) <= (a) + (b) - 1                                     \
@@ -305,8 +315,12 @@
   _GL_BINARY_OP_OVERFLOW (a, b, _GL_ADD_OVERFLOW)
 #define INT_SUBTRACT_OVERFLOW(a, b) \
   _GL_BINARY_OP_OVERFLOW (a, b, _GL_SUBTRACT_OVERFLOW)
-#define INT_NEGATE_OVERFLOW(a) \
-  INT_NEGATE_RANGE_OVERFLOW (a, _GL_INT_MINIMUM (a), _GL_INT_MAXIMUM (a))
+#if _GL_HAS_BUILTIN_OVERFLOW_WITH_NULL
+# define INT_NEGATE_OVERFLOW(a) INT_SUBTRACT_OVERFLOW (0, a)
+#else
+# define INT_NEGATE_OVERFLOW(a) \
+   INT_NEGATE_RANGE_OVERFLOW (a, _GL_INT_MINIMUM (a), _GL_INT_MAXIMUM (a))
+#endif
 #define INT_MULTIPLY_OVERFLOW(a, b) \
   _GL_BINARY_OP_OVERFLOW (a, b, _GL_MULTIPLY_OVERFLOW)
 #define INT_DIVIDE_OVERFLOW(a, b) \
@@ -326,7 +340,7 @@
                       _GL_INT_MINIMUM (0 * (b) + (a)),          \
                       _GL_INT_MAXIMUM (0 * (b) + (a)))
 
-/* Compute A + B, A - B, A * B, respectively, storing the result into *R.
+/* Store the low-order bits of A + B, A - B, A * B, respectively, into *R.
    Return 1 if the result overflows.  See above for restrictions.  */
 #define INT_ADD_WRAPV(a, b, r) \
   _GL_INT_OP_WRAPV (a, b, r, +, __builtin_add_overflow, INT_ADD_OVERFLOW)
@@ -351,9 +365,10 @@
 # define _GL__GENERIC_BOGUS 0
 #endif
 
-/* Store A <op> B into *R, where OP specifies the operation.
-   BUILTIN is the builtin operation, and OVERFLOW the overflow predicate.
-   See above for restrictions.  */
+/* Store the low-order bits of A <op> B into *R, where OP specifies
+   the operation.  BUILTIN is the builtin operation, and OVERFLOW the
+   overflow predicate.  Return 1 if the result overflows.  See above
+   for restrictions.  */
 #if 5 <= __GNUC__ || __has_builtin (__builtin_add_overflow)
 # define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) builtin (a, b, r)
 #elif 201112 <= __STDC_VERSION__ && !_GL__GENERIC_BOGUS
@@ -404,7 +419,8 @@
 /* Store the low-order bits of A <op> B into *R, where the operation
    is given by OP.  Use the unsigned type UT for calculation to avoid
    overflow problems.  *R's type is T, with extremal values TMIN and
-   TMAX.  T must be a signed integer type.  */
+   TMAX.  T must be a signed integer type.  Return 1 if the result
+   overflows.  */
 #define _GL_INT_OP_CALC(a, b, r, op, overflow, ut, t, tmin, tmax) \
   (sizeof ((a) op (b)) < sizeof (t) \
    ? _GL_INT_OP_CALC1 ((t) (a), (t) (b), r, op, overflow, ut, t, tmin, tmax) \

Modified: trunk/gnulib/lib/iswblank.c
===================================================================
--- trunk/gnulib/lib/iswblank.c 2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/iswblank.c 2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* Test wide character for being blank.
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008-2016 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

Modified: trunk/gnulib/lib/itold.c
===================================================================
--- trunk/gnulib/lib/itold.c    2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/itold.c    2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* Replacement for 'int' to 'long double' conversion routine.
-   Copyright (C) 2011-2015 Free Software Foundation, Inc.
+   Copyright (C) 2011-2016 Free Software Foundation, Inc.
    Written by Bruno Haible <address@hidden>, 2011.
 
    This program is free software: you can redistribute it and/or modify

Modified: trunk/gnulib/lib/langinfo.in.h
===================================================================
--- trunk/gnulib/lib/langinfo.in.h      2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/langinfo.in.h      2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* Substitute for and wrapper around <langinfo.h>.
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2016 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

Modified: trunk/gnulib/lib/localcharset.c
===================================================================
--- trunk/gnulib/lib/localcharset.c     2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/localcharset.c     2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,6 +1,6 @@
 /* Determine a canonical name for the current locale's character encoding.
 
-   Copyright (C) 2000-2006, 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2006, 2008-2016 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

Modified: trunk/gnulib/lib/localcharset.h
===================================================================
--- trunk/gnulib/lib/localcharset.h     2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/localcharset.h     2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* Determine a canonical name for the current locale's character encoding.
-   Copyright (C) 2000-2003, 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2003, 2009-2016 Free Software Foundation, Inc.
    This file is part of the GNU CHARSET Library.
 
    This program is free software; you can redistribute it and/or modify

Modified: trunk/gnulib/lib/locale.in.h
===================================================================
--- trunk/gnulib/lib/locale.in.h        2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/locale.in.h        2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* A POSIX <locale.h>.
-   Copyright (C) 2007-2015 Free Software Foundation, Inc.
+   Copyright (C) 2007-2016 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

Modified: trunk/gnulib/lib/localeconv.c
===================================================================
--- trunk/gnulib/lib/localeconv.c       2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/localeconv.c       2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* Query locale dependent information for formatting numbers.
-   Copyright (C) 2012-2015 Free Software Foundation, Inc.
+   Copyright (C) 2012-2016 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

Modified: trunk/gnulib/lib/malloc.c
===================================================================
--- trunk/gnulib/lib/malloc.c   2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/malloc.c   2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,6 +1,6 @@
 /* malloc() function that is glibc compatible.
 
-   Copyright (C) 1997-1998, 2006-2007, 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 1997-1998, 2006-2007, 2009-2016 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

Modified: trunk/gnulib/lib/malloca.c
===================================================================
--- trunk/gnulib/lib/malloca.c  2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/malloca.c  2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* Safe automatic memory allocation.
-   Copyright (C) 2003, 2006-2007, 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2006-2007, 2009-2016 Free Software Foundation, Inc.
    Written by Bruno Haible <address@hidden>, 2003.
 
    This program is free software; you can redistribute it and/or modify

Modified: trunk/gnulib/lib/malloca.h
===================================================================
--- trunk/gnulib/lib/malloca.h  2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/malloca.h  2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* Safe automatic memory allocation.
-   Copyright (C) 2003-2007, 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2007, 2009-2016 Free Software Foundation, Inc.
    Written by Bruno Haible <address@hidden>, 2003.
 
    This program is free software; you can redistribute it and/or modify

Modified: trunk/gnulib/lib/mbchar.c
===================================================================
--- trunk/gnulib/lib/mbchar.c   2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/mbchar.c   2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001, 2006, 2009-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2001, 2006, 2009-2016 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

Modified: trunk/gnulib/lib/mbchar.h
===================================================================
--- trunk/gnulib/lib/mbchar.h   2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/mbchar.h   2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* Multibyte character data type.
-   Copyright (C) 2001, 2005-2007, 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2005-2007, 2009-2016 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

Modified: trunk/gnulib/lib/mbiter.h
===================================================================
--- trunk/gnulib/lib/mbiter.h   2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/mbiter.h   2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* Iterating through multibyte strings: macros for multi-byte encodings.
-   Copyright (C) 2001, 2005, 2007, 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2005, 2007, 2009-2016 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

Modified: trunk/gnulib/lib/mbrtowc.c
===================================================================
--- trunk/gnulib/lib/mbrtowc.c  2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/mbrtowc.c  2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* Convert multibyte character to wide character.
-   Copyright (C) 1999-2002, 2005-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2002, 2005-2016 Free Software Foundation, Inc.
    Written by Bruno Haible <address@hidden>, 2008.
 
    This program is free software: you can redistribute it and/or modify
@@ -20,6 +20,11 @@
 /* Specification.  */
 #include <wchar.h>
 
+#if C_LOCALE_MAYBE_EILSEQ
+# include "hard-locale.h"
+# include <locale.h>
+#endif
+
 #if GNULIB_defined_mbstate_t
 /* Implement mbrtowc() on top of mbtowc().  */
 
@@ -328,6 +333,9 @@
 size_t
 rpl_mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
 {
+  size_t ret;
+  wchar_t wc;
+
 # if MBRTOWC_NULL_ARG2_BUG || MBRTOWC_RETVAL_BUG || MBRTOWC_EMPTY_INPUT_BUG
   if (s == NULL)
     {
@@ -342,6 +350,9 @@
     return (size_t) -2;
 # endif
 
+  if (! pwc)
+    pwc = &wc;
+
 # if MBRTOWC_RETVAL_BUG
   {
     static mbstate_t internal_state;
@@ -357,8 +368,7 @@
         size_t count = 0;
         for (; n > 0; s++, n--)
           {
-            wchar_t wc;
-            size_t ret = mbrtowc (&wc, s, 1, ps);
+            ret = mbrtowc (&wc, s, 1, ps);
 
             if (ret == (size_t)(-1))
               return (size_t)(-1);
@@ -366,8 +376,7 @@
             if (ret != (size_t)(-2))
               {
                 /* The multibyte character has been completed.  */
-                if (pwc != NULL)
-                  *pwc = wc;
+                *pwc = wc;
                 return (wc == 0 ? 0 : count);
               }
           }
@@ -376,32 +385,23 @@
   }
 # endif
 
+  ret = mbrtowc (pwc, s, n, ps);
+
 # if MBRTOWC_NUL_RETVAL_BUG
-  {
-    wchar_t wc;
-    size_t ret = mbrtowc (&wc, s, n, ps);
+  if (ret < (size_t) -2 && !*pwc)
+    return 0;
+# endif
 
-    if (ret != (size_t)(-1) && ret != (size_t)(-2))
-      {
-        if (pwc != NULL)
-          *pwc = wc;
-        if (wc == 0)
-          ret = 0;
-      }
-    return ret;
-  }
-# else
-  {
-#   if MBRTOWC_NULL_ARG1_BUG
-    wchar_t dummy;
+# if C_LOCALE_MAYBE_EILSEQ
+  if ((size_t) -2 <= ret && n != 0 && ! hard_locale (LC_CTYPE))
+    {
+      unsigned char uc = *s;
+      *pwc = uc;
+      return 1;
+    }
+# endif
 
-    if (pwc == NULL)
-      pwc = &dummy;
-#   endif
-
-    return mbrtowc (pwc, s, n, ps);
-  }
-# endif
+  return ret;
 }
 
 #endif

Modified: trunk/gnulib/lib/mbscasecmp.c
===================================================================
--- trunk/gnulib/lib/mbscasecmp.c       2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/mbscasecmp.c       2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* Case-insensitive string comparison function.
-   Copyright (C) 1998-1999, 2005-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-1999, 2005-2016 Free Software Foundation, Inc.
    Written by Bruno Haible <address@hidden>, 2005,
    based on earlier glibc code.
 

Modified: trunk/gnulib/lib/mbschr.c
===================================================================
--- trunk/gnulib/lib/mbschr.c   2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/mbschr.c   2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* Searching a string for a character.
-   Copyright (C) 2007-2015 Free Software Foundation, Inc.
+   Copyright (C) 2007-2016 Free Software Foundation, Inc.
    Written by Bruno Haible <address@hidden>, 2007.
 
    This program is free software: you can redistribute it and/or modify

Modified: trunk/gnulib/lib/mbsinit.c
===================================================================
--- trunk/gnulib/lib/mbsinit.c  2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/mbsinit.c  2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* Test for initial conversion state.
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008-2016 Free Software Foundation, Inc.
    Written by Bruno Haible <address@hidden>, 2008.
 
    This program is free software: you can redistribute it and/or modify

Modified: trunk/gnulib/lib/mbslen.c
===================================================================
--- trunk/gnulib/lib/mbslen.c   2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/mbslen.c   2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* Counting the multibyte characters in a string.
-   Copyright (C) 2007-2015 Free Software Foundation, Inc.
+   Copyright (C) 2007-2016 Free Software Foundation, Inc.
    Written by Bruno Haible <address@hidden>, 2007.
 
    This program is free software: you can redistribute it and/or modify

Modified: trunk/gnulib/lib/mbsncasecmp.c
===================================================================
--- trunk/gnulib/lib/mbsncasecmp.c      2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/mbsncasecmp.c      2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* Case-insensitive string comparison function.
-   Copyright (C) 1998-1999, 2005-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-1999, 2005-2016 Free Software Foundation, Inc.
    Written by Bruno Haible <address@hidden>, 2005,
    based on earlier glibc code.
 

Modified: trunk/gnulib/lib/mbsstr.c
===================================================================
--- trunk/gnulib/lib/mbsstr.c   2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/mbsstr.c   2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* Searching in a string.  -*- coding: utf-8 -*-
-   Copyright (C) 2005-2015 Free Software Foundation, Inc.
+   Copyright (C) 2005-2016 Free Software Foundation, Inc.
    Written by Bruno Haible <address@hidden>, 2005.
 
    This program is free software: you can redistribute it and/or modify

Modified: trunk/gnulib/lib/mbswidth.c
===================================================================
--- trunk/gnulib/lib/mbswidth.c 2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/mbswidth.c 2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* Determine the number of screen columns needed for a string.
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2016 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

Modified: trunk/gnulib/lib/mbswidth.h
===================================================================
--- trunk/gnulib/lib/mbswidth.h 2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/mbswidth.h 2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* Determine the number of screen columns needed for a string.
-   Copyright (C) 2000-2004, 2007, 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2004, 2007, 2009-2016 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

Modified: trunk/gnulib/lib/mbtowc-impl.h
===================================================================
--- trunk/gnulib/lib/mbtowc-impl.h      2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/mbtowc-impl.h      2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* Convert multibyte character to wide character.
-   Copyright (C) 2011-2015 Free Software Foundation, Inc.
+   Copyright (C) 2011-2016 Free Software Foundation, Inc.
    Written by Bruno Haible <address@hidden>, 2011.
 
    This program is free software: you can redistribute it and/or modify

Modified: trunk/gnulib/lib/mbtowc.c
===================================================================
--- trunk/gnulib/lib/mbtowc.c   2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/mbtowc.c   2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* Convert multibyte character to wide character.
-   Copyright (C) 2011-2015 Free Software Foundation, Inc.
+   Copyright (C) 2011-2016 Free Software Foundation, Inc.
    Written by Bruno Haible <address@hidden>, 2011.
 
    This program is free software: you can redistribute it and/or modify

Modified: trunk/gnulib/lib/mbuiter.h
===================================================================
--- trunk/gnulib/lib/mbuiter.h  2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/mbuiter.h  2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* Iterating through multibyte strings: macros for multi-byte encodings.
-   Copyright (C) 2001, 2005, 2007, 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2005, 2007, 2009-2016 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

Modified: trunk/gnulib/lib/memchr.c
===================================================================
--- trunk/gnulib/lib/memchr.c   2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/memchr.c   2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2015
+/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2016
    Free Software Foundation, Inc.
 
    Based on strlen implementation by Torbjorn Granlund (address@hidden),

Modified: trunk/gnulib/lib/mempcpy.c
===================================================================
--- trunk/gnulib/lib/mempcpy.c  2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/mempcpy.c  2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* Copy memory area and return pointer after last written byte.
-   Copyright (C) 2003, 2007, 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2007, 2009-2016 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

Modified: trunk/gnulib/lib/memrchr.c
===================================================================
--- trunk/gnulib/lib/memrchr.c  2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/memrchr.c  2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,6 +1,6 @@
 /* memrchr -- find the last occurrence of a byte in a memory block
 
-   Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2015 Free Software
+   Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2016 Free Software
    Foundation, Inc.
 
    Based on strlen implementation by Torbjorn Granlund (address@hidden),

Modified: trunk/gnulib/lib/msvc-inval.c
===================================================================
--- trunk/gnulib/lib/msvc-inval.c       2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/msvc-inval.c       2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* Invalid parameter handler for MSVC runtime libraries.
-   Copyright (C) 2011-2015 Free Software Foundation, Inc.
+   Copyright (C) 2011-2016 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

Modified: trunk/gnulib/lib/msvc-inval.h
===================================================================
--- trunk/gnulib/lib/msvc-inval.h       2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/msvc-inval.h       2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* Invalid parameter handler for MSVC runtime libraries.
-   Copyright (C) 2011-2015 Free Software Foundation, Inc.
+   Copyright (C) 2011-2016 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

Modified: trunk/gnulib/lib/msvc-nothrow.c
===================================================================
--- trunk/gnulib/lib/msvc-nothrow.c     2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/msvc-nothrow.c     2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,6 +1,6 @@
 /* Wrappers that don't throw invalid parameter notifications
    with MSVC runtime libraries.
-   Copyright (C) 2011-2015 Free Software Foundation, Inc.
+   Copyright (C) 2011-2016 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

Modified: trunk/gnulib/lib/msvc-nothrow.h
===================================================================
--- trunk/gnulib/lib/msvc-nothrow.h     2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/msvc-nothrow.h     2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,6 +1,6 @@
 /* Wrappers that don't throw invalid parameter notifications
    with MSVC runtime libraries.
-   Copyright (C) 2011-2015 Free Software Foundation, Inc.
+   Copyright (C) 2011-2016 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

Modified: trunk/gnulib/lib/nl_langinfo.c
===================================================================
--- trunk/gnulib/lib/nl_langinfo.c      2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/nl_langinfo.c      2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,6 +1,6 @@
 /* nl_langinfo() replacement: query locale dependent information.
 
-   Copyright (C) 2007-2015 Free Software Foundation, Inc.
+   Copyright (C) 2007-2016 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

Modified: trunk/gnulib/lib/printf-args.c
===================================================================
--- trunk/gnulib/lib/printf-args.c      2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/printf-args.c      2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* Decomposed printf argument list.
-   Copyright (C) 1999, 2002-2003, 2005-2007, 2009-2015 Free Software
+   Copyright (C) 1999, 2002-2003, 2005-2007, 2009-2016 Free Software
    Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify

Modified: trunk/gnulib/lib/printf-args.h
===================================================================
--- trunk/gnulib/lib/printf-args.h      2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/printf-args.h      2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* Decomposed printf argument list.
-   Copyright (C) 1999, 2002-2003, 2006-2007, 2011-2015 Free Software
+   Copyright (C) 1999, 2002-2003, 2006-2007, 2011-2016 Free Software
    Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify

Modified: trunk/gnulib/lib/printf-parse.c
===================================================================
--- trunk/gnulib/lib/printf-parse.c     2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/printf-parse.c     2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* Formatted output to strings.
-   Copyright (C) 1999-2000, 2002-2003, 2006-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999-2000, 2002-2003, 2006-2016 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

Modified: trunk/gnulib/lib/printf-parse.h
===================================================================
--- trunk/gnulib/lib/printf-parse.h     2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/printf-parse.h     2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* Parse printf format string.
-   Copyright (C) 1999, 2002-2003, 2005, 2007, 2010-2015 Free Software
+   Copyright (C) 1999, 2002-2003, 2005, 2007, 2010-2016 Free Software
    Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify

Modified: trunk/gnulib/lib/ref-add.sin
===================================================================
--- trunk/gnulib/lib/ref-add.sin        2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/ref-add.sin        2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,6 +1,6 @@
 # Add this package to a list of references stored in a text file.
 #
-#   Copyright (C) 2000, 2009-2015 Free Software Foundation, Inc.
+#   Copyright (C) 2000, 2009-2016 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

Modified: trunk/gnulib/lib/ref-del.sin
===================================================================
--- trunk/gnulib/lib/ref-del.sin        2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/ref-del.sin        2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,6 +1,6 @@
 # Remove this package from a list of references stored in a text file.
 #
-#   Copyright (C) 2000, 2009-2015 Free Software Foundation, Inc.
+#   Copyright (C) 2000, 2009-2016 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

Modified: trunk/gnulib/lib/regcomp.c
===================================================================
--- trunk/gnulib/lib/regcomp.c  2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/regcomp.c  2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* Extended regular expression matching and search library.
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2016 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Isamu Hasegawa <address@hidden>.
 
@@ -153,9 +153,9 @@
     gettext_noop ("Invalid back reference") /* REG_ESUBREG */
     "\0"
 #define REG_EBRACK_IDX (REG_ESUBREG_IDX + sizeof "Invalid back reference")
-    gettext_noop ("Unmatched [ or [^") /* REG_EBRACK */
+    gettext_noop ("Unmatched [, [^, [:, [., or [=")    /* REG_EBRACK */
     "\0"
-#define REG_EPAREN_IDX (REG_EBRACK_IDX + sizeof "Unmatched [ or [^")
+#define REG_EPAREN_IDX (REG_EBRACK_IDX + sizeof "Unmatched [, [^, [:, [., or 
[=")
     gettext_noop ("Unmatched ( or \\(") /* REG_EPAREN */
     "\0"
 #define REG_EBRACE_IDX (REG_EPAREN_IDX + sizeof "Unmatched ( or \\(")
@@ -213,17 +213,9 @@
    Assumes the 'allocated' (and perhaps 'buffer') and 'translate' fields
    are set in BUFP on entry.  */
 
-#ifdef _LIBC
 const char *
-re_compile_pattern (pattern, length, bufp)
-    const char *pattern;
-    size_t length;
-    struct re_pattern_buffer *bufp;
-#else /* size_t might promote */
-const char *
 re_compile_pattern (const char *pattern, size_t length,
                    struct re_pattern_buffer *bufp)
-#endif
 {
   reg_errcode_t ret;
 
@@ -261,8 +253,7 @@
    defined in regex.h.  We return the old syntax.  */
 
 reg_syntax_t
-re_set_syntax (syntax)
-    reg_syntax_t syntax;
+re_set_syntax (reg_syntax_t syntax)
 {
   reg_syntax_t ret = re_syntax_options;
 
@@ -274,8 +265,7 @@
 #endif
 
 int
-re_compile_fastmap (bufp)
-    struct re_pattern_buffer *bufp;
+re_compile_fastmap (struct re_pattern_buffer *bufp)
 {
   re_dfa_t *dfa = bufp->buffer;
   char *fastmap = bufp->fastmap;
@@ -474,10 +464,7 @@
    the return codes and their meanings.)  */
 
 int
-regcomp (preg, pattern, cflags)
-    regex_t *_Restrict_ preg;
-    const char *_Restrict_ pattern;
-    int cflags;
+regcomp (regex_t *_Restrict_ preg, const char *_Restrict_ pattern, int cflags)
 {
   reg_errcode_t ret;
   reg_syntax_t syntax = ((cflags & REG_EXTENDED) ? RE_SYNTAX_POSIX_EXTENDED
@@ -535,18 +522,9 @@
 /* Returns a message corresponding to an error code, ERRCODE, returned
    from either regcomp or regexec.   We don't use PREG here.  */
 
-#ifdef _LIBC
 size_t
-regerror (errcode, preg, errbuf, errbuf_size)
-    int errcode;
-    const regex_t *_Restrict_ preg;
-    char *_Restrict_ errbuf;
-    size_t errbuf_size;
-#else /* size_t might promote */
-size_t
-regerror (int errcode, const regex_t *_Restrict_ preg,
-         char *_Restrict_ errbuf, size_t errbuf_size)
-#endif
+regerror (int errcode, const regex_t *_Restrict_ preg, char *_Restrict_ errbuf,
+         size_t errbuf_size)
 {
   const char *msg;
   size_t msg_size;
@@ -662,8 +640,7 @@
 /* Free dynamically allocated space used by PREG.  */
 
 void
-regfree (preg)
-    regex_t *preg;
+regfree (regex_t *preg)
 {
   re_dfa_t *dfa = preg->buffer;
   if (BE (dfa != NULL, 1))
@@ -699,8 +676,7 @@
    regcomp/regexec above without link errors.  */
 weak_function
 # endif
-re_comp (s)
-     const char *s;
+re_comp (const char *s)
 {
   reg_errcode_t ret;
   char *fastmap;
@@ -1421,7 +1397,7 @@
     {
       node->first = node;
       node->node_idx = re_dfa_add_node (dfa, node->token);
-      if (BE (node->node_idx == REG_MISSING, 0))
+      if (BE (node->node_idx == -1, 0))
        return REG_ESPACE;
       if (node->token.type == ANCHOR)
        dfa->nodes[node->node_idx].constraint = node->token.opr.ctx_type;
@@ -1482,8 +1458,8 @@
          right = node->right->first->node_idx;
        else
          right = node->next->node_idx;
-       assert (REG_VALID_INDEX (left));
-       assert (REG_VALID_INDEX (right));
+       assert (left > -1);
+       assert (right > -1);
        err = re_node_set_init_2 (dfa->edests + idx, left, right);
       }
       break;
@@ -1533,7 +1509,7 @@
          org_dest = dfa->nexts[org_node];
          re_node_set_empty (dfa->edests + clone_node);
          clone_dest = duplicate_node (dfa, org_dest, constraint);
-         if (BE (clone_dest == REG_MISSING, 0))
+         if (BE (clone_dest == -1, 0))
            return REG_ESPACE;
          dfa->nexts[clone_node] = dfa->nexts[org_node];
          ok = re_node_set_insert (dfa->edests + clone_node, clone_dest);
@@ -1566,7 +1542,7 @@
          /* In case the node has another constraint, append it.  */
          constraint |= dfa->nodes[org_node].constraint;
          clone_dest = duplicate_node (dfa, org_dest, constraint);
-         if (BE (clone_dest == REG_MISSING, 0))
+         if (BE (clone_dest == -1, 0))
            return REG_ESPACE;
          ok = re_node_set_insert (dfa->edests + clone_node, clone_dest);
          if (BE (! ok, 0))
@@ -1580,12 +1556,12 @@
          re_node_set_empty (dfa->edests + clone_node);
          /* Search for a duplicated node which satisfies the constraint.  */
          clone_dest = search_duplicated_node (dfa, org_dest, constraint);
-         if (clone_dest == REG_MISSING)
+         if (clone_dest == -1)
            {
              /* There is no such duplicated node, create a new one.  */
              reg_errcode_t err;
              clone_dest = duplicate_node (dfa, org_dest, constraint);
-             if (BE (clone_dest == REG_MISSING, 0))
+             if (BE (clone_dest == -1, 0))
                return REG_ESPACE;
              ok = re_node_set_insert (dfa->edests + clone_node, clone_dest);
              if (BE (! ok, 0))
@@ -1606,7 +1582,7 @@
 
          org_dest = dfa->edests[org_node].elems[1];
          clone_dest = duplicate_node (dfa, org_dest, constraint);
-         if (BE (clone_dest == REG_MISSING, 0))
+         if (BE (clone_dest == -1, 0))
            return REG_ESPACE;
          ok = re_node_set_insert (dfa->edests + clone_node, clone_dest);
          if (BE (! ok, 0))
@@ -1632,18 +1608,18 @@
          && constraint == dfa->nodes[idx].constraint)
        return idx; /* Found.  */
     }
-  return REG_MISSING; /* Not found.  */
+  return -1; /* Not found.  */
 }
 
 /* Duplicate the node whose index is ORG_IDX and set the constraint CONSTRAINT.
-   Return the index of the new node, or REG_MISSING if insufficient storage is
+   Return the index of the new node, or -1 if insufficient storage is
    available.  */
 
 static Idx
 duplicate_node (re_dfa_t *dfa, Idx org_idx, unsigned int constraint)
 {
   Idx dup_idx = re_dfa_add_node (dfa, dfa->nodes[org_idx]);
-  if (BE (dup_idx != REG_MISSING, 1))
+  if (BE (dup_idx != -1, 1))
     {
       dfa->nodes[dup_idx].constraint = constraint;
       dfa->nodes[dup_idx].constraint |= dfa->nodes[org_idx].constraint;
@@ -1702,7 +1678,7 @@
        }
 
 #ifdef DEBUG
-      assert (dfa->eclosures[node_idx].nelem != REG_MISSING);
+      assert (dfa->eclosures[node_idx].nelem != -1);
 #endif
 
       /* If we have already calculated, skip it.  */
@@ -1738,7 +1714,7 @@
 
   /* This indicates that we are calculating this node now.
      We reference this value to avoid infinite loop.  */
-  dfa->eclosures[node].nelem = REG_MISSING;
+  dfa->eclosures[node].nelem = -1;
 
   /* If the current node has constraints, duplicate all nodes
      since they must inherit the constraints.  */
@@ -1760,7 +1736,7 @@
        Idx edest = dfa->edests[node].elems[i];
        /* If calculating the epsilon closure of 'edest' is in progress,
           return intermediate result.  */
-       if (dfa->eclosures[edest].nelem == REG_MISSING)
+       if (dfa->eclosures[edest].nelem == -1)
          {
            incomplete = true;
            continue;
@@ -2557,7 +2533,7 @@
     {
       end = 0;
       start = fetch_number (regexp, token, syntax);
-      if (start == REG_MISSING)
+      if (start == -1)
        {
          if (token->type == CHARACTER && token->opr.c == ',')
            start = 0; /* We treat "{,m}" as "{0,m}".  */
@@ -2567,14 +2543,14 @@
              return NULL;
            }
        }
-      if (BE (start != REG_ERROR, 1))
+      if (BE (start != -2, 1))
        {
          /* We treat "{n}" as "{n,n}".  */
          end = ((token->type == OP_CLOSE_DUP_NUM) ? start
                 : ((token->type == CHARACTER && token->opr.c == ',')
-                   ? fetch_number (regexp, token, syntax) : REG_ERROR));
+                   ? fetch_number (regexp, token, syntax) : -2));
        }
-      if (BE (start == REG_ERROR || end == REG_ERROR, 0))
+      if (BE (start == -2 || end == -2, 0))
        {
          /* Invalid sequence.  */
          if (BE (!(syntax & RE_INVALID_INTERVAL_ORD), 0))
@@ -2596,7 +2572,7 @@
          return elem;
        }
 
-      if (BE ((end != REG_MISSING && start > end)
+      if (BE ((end != -1 && start > end)
              || token->type != OP_CLOSE_DUP_NUM, 0))
        {
          /* First number greater than second.  */
@@ -2604,7 +2580,7 @@
          return NULL;
        }
 
-      if (BE (RE_DUP_MAX < (end == REG_MISSING ? start : end), 0))
+      if (BE (RE_DUP_MAX < (end == -1 ? start : end), 0))
        {
          *err = REG_ESIZE;
          return NULL;
@@ -2613,7 +2589,7 @@
   else
     {
       start = (token->type == OP_DUP_PLUS) ? 1 : 0;
-      end = (token->type == OP_DUP_QUESTION) ? 1 : REG_MISSING;
+      end = (token->type == OP_DUP_QUESTION) ? 1 : -1;
     }
 
   fetch_token (token, regexp, syntax);
@@ -2657,7 +2633,7 @@
     }
 
   tree = create_tree (dfa, elem, NULL,
-                     (end == REG_MISSING ? OP_DUP_ASTERISK : OP_ALT));
+                     (end == -1 ? OP_DUP_ASTERISK : OP_ALT));
   if (BE (tree == NULL, 0))
     goto parse_dup_op_espace;
 
@@ -2665,10 +2641,10 @@
    True if the arithmetic type T is signed.  */
 #define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
 
-  /* This loop is actually executed only when end != REG_MISSING,
+  /* This loop is actually executed only when end != -1,
      to rewrite <re>{0,n} as (<re>(<re>...<re>?)?)?...  We have
      already created the start+1-th copy.  */
-  if (TYPE_SIGNED (Idx) || end != REG_MISSING)
+  if (TYPE_SIGNED (Idx) || end != -1)
     for (i = start + 2; i <= end; ++i)
       {
        elem = duplicate_tree (elem, dfa);
@@ -2696,6 +2672,19 @@
 #define BRACKET_NAME_BUF_SIZE 32
 
 #ifndef _LIBC
+
+# ifdef RE_ENABLE_I18N
+/* Convert the byte B to the corresponding wide character.  In a
+   unibyte locale, treat B as itself if it is an encoding error.
+   In a multibyte locale, return WEOF if B is an encoding error.  */
+static wint_t
+parse_byte (unsigned char b, re_charset_t *mbcset)
+{
+  wint_t wc = __btowc (b);
+  return wc == WEOF && !mbcset ? b : wc;
+}
+#endif
+
   /* Local function for parse_bracket_exp only used in case of NOT _LIBC.
      Build the range expression which starts from START_ELEM, and ends
      at END_ELEM.  The result are written to MBCSET and SBCSET.
@@ -2747,9 +2736,9 @@
              : ((end_elem->type == COLL_SYM) ? end_elem->opr.name[0]
                 : 0));
     start_wc = ((start_elem->type == SB_CHAR || start_elem->type == COLL_SYM)
-               ? __btowc (start_ch) : start_elem->opr.wch);
+               ? parse_byte (start_ch, mbcset) : start_elem->opr.wch);
     end_wc = ((end_elem->type == SB_CHAR || end_elem->type == COLL_SYM)
-             ? __btowc (end_ch) : end_elem->opr.wch);
+             ? parse_byte (end_ch, mbcset) : end_elem->opr.wch);
     if (start_wc == WEOF || end_wc == WEOF)
       return REG_ECOLLATE;
     else if (BE ((syntax & RE_NO_EMPTY_RANGES) && start_wc > end_wc, 0))
@@ -2779,7 +2768,11 @@
                                        new_nranges);
 
            if (BE (new_array_start == NULL || new_array_end == NULL, 0))
-             return REG_ESPACE;
+             {
+               re_free (new_array_start);
+               re_free (new_array_end);
+               return REG_ESPACE;
+             }
 
            mbcset->range_starts = new_array_start;
            mbcset->range_ends = new_array_end;
@@ -3676,26 +3669,21 @@
   bin_tree_t *tree;
 
   sbcset = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1);
-#ifdef RE_ENABLE_I18N
-  mbcset = (re_charset_t *) calloc (sizeof (re_charset_t), 1);
-#endif /* RE_ENABLE_I18N */
-
-#ifdef RE_ENABLE_I18N
-  if (BE (sbcset == NULL || mbcset == NULL, 0))
-#else /* not RE_ENABLE_I18N */
   if (BE (sbcset == NULL, 0))
-#endif /* not RE_ENABLE_I18N */
     {
       *err = REG_ESPACE;
       return NULL;
     }
-
-  if (non_match)
-    {
 #ifdef RE_ENABLE_I18N
-      mbcset->non_match = 1;
-#endif /* not RE_ENABLE_I18N */
+  mbcset = (re_charset_t *) calloc (sizeof (re_charset_t), 1);
+  if (BE (mbcset == NULL, 0))
+    {
+      re_free (sbcset);
+      *err = REG_ESPACE;
+      return NULL;
     }
+  mbcset->non_match = non_match;
+#endif /* RE_ENABLE_I18N */
 
   /* We don't care the syntax in this case.  */
   ret = build_charclass (trans, sbcset,
@@ -3728,6 +3716,9 @@
 #endif
 
   /* Build a tree for simple bracket.  */
+#if defined GCC_LINT || defined lint
+  memset (&br_token, 0, sizeof br_token);
+#endif
   br_token.type = SIMPLE_BRACKET;
   br_token.opr.sbcset = sbcset;
   tree = create_token_tree (dfa, NULL, NULL, &br_token);
@@ -3770,27 +3761,26 @@
 
 /* This is intended for the expressions like "a{1,3}".
    Fetch a number from 'input', and return the number.
-   Return REG_MISSING if the number field is empty like "{,1}".
+   Return -1 if the number field is empty like "{,1}".
    Return RE_DUP_MAX + 1 if the number field is too large.
-   Return REG_ERROR if an error occurred.  */
+   Return -2 if an error occurred.  */
 
 static Idx
 fetch_number (re_string_t *input, re_token_t *token, reg_syntax_t syntax)
 {
-  Idx num = REG_MISSING;
+  Idx num = -1;
   unsigned char c;
   while (1)
     {
       fetch_token (token, input, syntax);
       c = token->opr.c;
       if (BE (token->type == END_OF_RE, 0))
-       return REG_ERROR;
+       return -2;
       if (token->type == OP_CLOSE_DUP_NUM || c == ',')
        break;
-      num = ((token->type != CHARACTER || c < '0' || '9' < c
-             || num == REG_ERROR)
-            ? REG_ERROR
-            : num == REG_MISSING
+      num = ((token->type != CHARACTER || c < '0' || '9' < c || num == -2)
+            ? -2
+            : num == -1
             ? c - '0'
             : MIN (RE_DUP_MAX + 1, num * 10 + c - '0'));
     }
@@ -3822,6 +3812,9 @@
             re_token_type_t type)
 {
   re_token_t t;
+#if defined GCC_LINT || defined lint
+  memset (&t, 0, sizeof t);
+#endif
   t.type = type;
   return create_token_tree (dfa, left, right, &t);
 }
@@ -3851,7 +3844,7 @@
   tree->token.opt_subexp = 0;
   tree->first = NULL;
   tree->next = NULL;
-  tree->node_idx = REG_MISSING;
+  tree->node_idx = -1;
 
   if (left != NULL)
     left->parent = tree;

Modified: trunk/gnulib/lib/regex.c
===================================================================
--- trunk/gnulib/lib/regex.c    2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/regex.c    2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* Extended regular expression matching and search library.
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2016 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Isamu Hasegawa <address@hidden>.
 

Modified: trunk/gnulib/lib/regex.h
===================================================================
--- trunk/gnulib/lib/regex.h    2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/regex.h    2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,6 +1,6 @@
 /* Definitions for data structures and routines for the regular
    expression library.
-   Copyright (C) 1985, 1989-1993, 1995-1998, 2000-2003, 2005-2015 Free Software
+   Copyright (C) 1985, 1989-1993, 1995-1998, 2000-2003, 2005-2016 Free Software
    Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -42,11 +42,6 @@
    supported within glibc itself, and glibc users should not define
    _REGEX_LARGE_OFFSETS.  */
 
-/* The type of nonnegative object indexes.  Traditionally, GNU regex
-   uses 'int' for these.  Code that uses __re_idx_t should work
-   regardless of whether the type is signed.  */
-typedef size_t __re_idx_t;
-
 /* The type of object sizes.  */
 typedef size_t __re_size_t;
 
@@ -58,7 +53,6 @@
 
 /* The traditional GNU regex implementation mishandles strings longer
    than INT_MAX.  */
-typedef int __re_idx_t;
 typedef unsigned int __re_size_t;
 typedef unsigned long int __re_long_size_t;
 
@@ -488,7 +482,8 @@
 #ifdef _REGEX_LARGE_OFFSETS
 /* POSIX 1003.1-2008 requires that regoff_t be at least as wide as
    ptrdiff_t and ssize_t.  We don't know of any hosts where ptrdiff_t
-   is wider than ssize_t, so ssize_t is safe.  */
+   is wider than ssize_t, so ssize_t is safe.  ptrdiff_t is not
+   visible here, so use ssize_t.  */
 typedef ssize_t regoff_t;
 #else
 /* The traditional GNU regex implementation mishandles strings longer
@@ -538,7 +533,7 @@
    BUFFER.  Return NULL if successful, and an error string if not.
 
    To free the allocated storage, you must call 'regfree' on BUFFER.
-   Note that the translate table must either have been initialised by
+   Note that the translate table must either have been initialized by
    'regcomp', with a malloc'ed value, or set to NULL before calling
    'regfree'.  */
 extern const char *re_compile_pattern (const char *__pattern, size_t __length,
@@ -557,34 +552,34 @@
    match, or -2 for an internal error.  Also return register
    information in REGS (if REGS and BUFFER->no_sub are nonzero).  */
 extern regoff_t re_search (struct re_pattern_buffer *__buffer,
-                          const char *__string, __re_idx_t __length,
-                          __re_idx_t __start, regoff_t __range,
+                          const char *__string, regoff_t __length,
+                          regoff_t __start, regoff_t __range,
                           struct re_registers *__regs);
 
 
 /* Like 're_search', but search in the concatenation of STRING1 and
    STRING2.  Also, stop searching at index START + STOP.  */
 extern regoff_t re_search_2 (struct re_pattern_buffer *__buffer,
-                            const char *__string1, __re_idx_t __length1,
-                            const char *__string2, __re_idx_t __length2,
-                            __re_idx_t __start, regoff_t __range,
+                            const char *__string1, regoff_t __length1,
+                            const char *__string2, regoff_t __length2,
+                            regoff_t __start, regoff_t __range,
                             struct re_registers *__regs,
-                            __re_idx_t __stop);
+                            regoff_t __stop);
 
 
 /* Like 're_search', but return how many characters in STRING the regexp
    in BUFFER matched, starting at position START.  */
 extern regoff_t re_match (struct re_pattern_buffer *__buffer,
-                         const char *__string, __re_idx_t __length,
-                         __re_idx_t __start, struct re_registers *__regs);
+                         const char *__string, regoff_t __length,
+                         regoff_t __start, struct re_registers *__regs);
 
 
 /* Relates to 're_match' as 're_search_2' relates to 're_search'.  */
 extern regoff_t re_match_2 (struct re_pattern_buffer *__buffer,
-                           const char *__string1, __re_idx_t __length1,
-                           const char *__string2, __re_idx_t __length2,
-                           __re_idx_t __start, struct re_registers *__regs,
-                           __re_idx_t __stop);
+                           const char *__string1, regoff_t __length1,
+                           const char *__string2, regoff_t __length2,
+                           regoff_t __start, struct re_registers *__regs,
+                           regoff_t __stop);
 
 
 /* Set REGS to hold NUM_REGS registers, storing them in STARTS and

Modified: trunk/gnulib/lib/regex_internal.c
===================================================================
--- trunk/gnulib/lib/regex_internal.c   2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/regex_internal.c   2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* Extended regular expression matching and search library.
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2016 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Isamu Hasegawa <address@hidden>.
 
@@ -922,7 +922,7 @@
 re_string_context_at (const re_string_t *input, Idx idx, int eflags)
 {
   int c;
-  if (BE (! REG_VALID_INDEX (idx), 0))
+  if (BE (idx < 0, 0))
     /* In this case, we use the value stored in input->tip_context,
        since we can't know the character in input->mbs[-1] here.  */
     return input->tip_context;
@@ -938,10 +938,10 @@
        {
 #if defined DEBUG && DEBUG
          /* It must not happen.  */
-         assert (REG_VALID_INDEX (wc_idx));
+         assert (wc_idx >= 0);
 #endif
          --wc_idx;
-         if (! REG_VALID_INDEX (wc_idx))
+         if (wc_idx < 0)
            return input->tip_context;
        }
       wc = input->wcs[wc_idx];
@@ -1077,25 +1077,25 @@
       if (src1->elems[i1] == src2->elems[i2])
        {
          /* Try to find the item in DEST.  Maybe we could binary search?  */
-         while (REG_VALID_INDEX (id) && dest->elems[id] > src1->elems[i1])
+         while (id >= 0 && dest->elems[id] > src1->elems[i1])
            --id;
 
-          if (! REG_VALID_INDEX (id) || dest->elems[id] != src1->elems[i1])
+         if (id < 0 || dest->elems[id] != src1->elems[i1])
             dest->elems[--sbase] = src1->elems[i1];
 
-         if (! REG_VALID_INDEX (--i1) || ! REG_VALID_INDEX (--i2))
+         if (--i1 < 0 || --i2 < 0)
            break;
        }
 
       /* Lower the highest of the two items.  */
       else if (src1->elems[i1] < src2->elems[i2])
        {
-         if (! REG_VALID_INDEX (--i2))
+         if (--i2 < 0)
            break;
        }
       else
        {
-         if (! REG_VALID_INDEX (--i1))
+         if (--i1 < 0)
            break;
        }
     }
@@ -1108,7 +1108,7 @@
      DEST elements are already in place; this is more or
      less the same loop that is in re_node_set_merge.  */
   dest->nelem += delta;
-  if (delta > 0 && REG_VALID_INDEX (id))
+  if (delta > 0 && id >= 0)
     for (;;)
       {
        if (dest->elems[is] > dest->elems[id])
@@ -1122,7 +1122,7 @@
          {
            /* Slide from the bottom.  */
            dest->elems[id + delta] = dest->elems[id];
-           if (! REG_VALID_INDEX (--id))
+           if (--id < 0)
              break;
          }
       }
@@ -1216,8 +1216,7 @@
   /* Copy into the top of DEST the items of SRC that are not
      found in DEST.  Maybe we could binary search in DEST?  */
   for (sbase = dest->nelem + 2 * src->nelem,
-       is = src->nelem - 1, id = dest->nelem - 1;
-       REG_VALID_INDEX (is) && REG_VALID_INDEX (id); )
+       is = src->nelem - 1, id = dest->nelem - 1; is >= 0 && id >= 0; )
     {
       if (dest->elems[id] == src->elems[is])
        is--, id--;
@@ -1227,7 +1226,7 @@
        --id;
     }
 
-  if (REG_VALID_INDEX (is))
+  if (is >= 0)
     {
       /* If DEST is exhausted, the remaining items of SRC must be unique.  */
       sbase -= is + 1;
@@ -1256,7 +1255,7 @@
        {
          /* Slide from the bottom.  */
          dest->elems[id + delta] = dest->elems[id];
-         if (! REG_VALID_INDEX (--id))
+         if (--id < 0)
            {
              /* Copy remaining SRC elements.  */
              memcpy (dest->elems, dest->elems + sbase,
@@ -1355,7 +1354,7 @@
   Idx i;
   if (set1 == NULL || set2 == NULL || set1->nelem != set2->nelem)
     return false;
-  for (i = set1->nelem ; REG_VALID_INDEX (--i) ; )
+  for (i = set1->nelem ; --i >= 0 ; )
     if (set1->elems[i] != set2->elems[i])
       return false;
   return true;
@@ -1368,7 +1367,7 @@
 re_node_set_contains (const re_node_set *set, Idx elem)
 {
   __re_size_t idx, right, mid;
-  if (! REG_VALID_NONZERO_INDEX (set->nelem))
+  if (set->nelem <= 0)
     return 0;
 
   /* Binary search the element.  */
@@ -1398,7 +1397,7 @@
 
 
 /* Add the token TOKEN to dfa->nodes, and return the index of the token.
-   Or return REG_MISSING if an error occurred.  */
+   Or return -1 if an error occurred.  */
 
 static Idx
 internal_function
@@ -1416,11 +1415,11 @@
                                          MAX (sizeof (re_node_set),
                                               sizeof (Idx)));
       if (BE (MIN (IDX_MAX, SIZE_MAX / max_object_size) < new_nodes_alloc, 0))
-       return REG_MISSING;
+       return -1;
 
       new_nodes = re_realloc (dfa->nodes, re_token_t, new_nodes_alloc);
       if (BE (new_nodes == NULL, 0))
-       return REG_MISSING;
+       return -1;
       dfa->nodes = new_nodes;
       new_nexts = re_realloc (dfa->nexts, Idx, new_nodes_alloc);
       new_indices = re_realloc (dfa->org_indices, Idx, new_nodes_alloc);
@@ -1428,7 +1427,13 @@
       new_eclosures = re_realloc (dfa->eclosures, re_node_set, 
new_nodes_alloc);
       if (BE (new_nexts == NULL || new_indices == NULL
              || new_edests == NULL || new_eclosures == NULL, 0))
-       return REG_MISSING;
+       {
+          re_free (new_nexts);
+          re_free (new_indices);
+          re_free (new_edests);
+          re_free (new_eclosures);
+          return -1;
+       }
       dfa->nexts = new_nexts;
       dfa->org_indices = new_indices;
       dfa->edests = new_edests;
@@ -1442,7 +1447,7 @@
     ((token.type == OP_PERIOD && dfa->mb_cur_max > 1)
      || token.type == COMPLEX_BRACKET);
 #endif
-  dfa->nexts[dfa->nodes_len] = REG_MISSING;
+  dfa->nexts[dfa->nodes_len] = -1;
   re_node_set_init_empty (dfa->edests + dfa->nodes_len);
   re_node_set_init_empty (dfa->eclosures + dfa->nodes_len);
   return dfa->nodes_len++;
@@ -1477,7 +1482,7 @@
   re_dfastate_t *new_state;
   struct re_state_table_entry *spot;
   Idx i;
-#ifdef lint
+#if defined GCC_LINT || defined lint
   /* Suppress bogus uninitialized-variable warnings.  */
   *err = REG_NOERROR;
 #endif
@@ -1525,7 +1530,7 @@
   re_dfastate_t *new_state;
   struct re_state_table_entry *spot;
   Idx i;
-#ifdef lint
+#if defined GCC_LINT || defined lint
   /* Suppress bogus uninitialized-variable warnings.  */
   *err = REG_NOERROR;
 #endif

Modified: trunk/gnulib/lib/regex_internal.h
===================================================================
--- trunk/gnulib/lib/regex_internal.h   2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/regex_internal.h   2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* Extended regular expression matching and search library.
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2016 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Isamu Hasegawa <address@hidden>.
 
@@ -151,33 +151,24 @@
 # define __attribute__(arg)
 #endif
 
-typedef __re_idx_t Idx;
-#ifdef _REGEX_LARGE_OFFSETS
-# define IDX_MAX (SIZE_MAX - 2)
-#else
-# define IDX_MAX INT_MAX
+#ifndef SSIZE_MAX
+# define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2))
 #endif
 
-/* Special return value for failure to match.  */
-#define REG_MISSING ((Idx) -1)
-
-/* Special return value for internal error.  */
-#define REG_ERROR ((Idx) -2)
-
-/* Test whether N is a valid index, and is not one of the above.  */
+/* The type of indexes into strings.  This is signed, not size_t,
+   since the API requires indexes to fit in regoff_t anyway, and using
+   signed integers makes the code a bit smaller and presumably faster.
+   The traditional GNU regex implementation uses int for indexes.
+   The POSIX-compatible implementation uses a possibly-wider type.
+   The name 'Idx' is three letters to minimize the hassle of
+   reindenting a lot of regex code that formerly used 'int'.  */
+typedef regoff_t Idx;
 #ifdef _REGEX_LARGE_OFFSETS
-# define REG_VALID_INDEX(n) ((Idx) (n) < REG_ERROR)
+# define IDX_MAX SSIZE_MAX
 #else
-# define REG_VALID_INDEX(n) (0 <= (n))
+# define IDX_MAX INT_MAX
 #endif
 
-/* Test whether N is a valid nonzero index.  */
-#ifdef _REGEX_LARGE_OFFSETS
-# define REG_VALID_NONZERO_INDEX(n) ((Idx) ((n) - 1) < (Idx) (REG_ERROR - 1))
-#else
-# define REG_VALID_NONZERO_INDEX(n) (0 < (n))
-#endif
-
 /* A hash value, suitable for computing hash tables.  */
 typedef __re_size_t re_hashval_t;
 

Modified: trunk/gnulib/lib/regexec.c
===================================================================
--- trunk/gnulib/lib/regexec.c  2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/regexec.c  2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* Extended regular expression matching and search library.
-   Copyright (C) 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2016 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Isamu Hasegawa <address@hidden>.
 
@@ -219,12 +219,8 @@
    We return 0 if we find a match and REG_NOMATCH if not.  */
 
 int
-regexec (preg, string, nmatch, pmatch, eflags)
-    const regex_t *_Restrict_ preg;
-    const char *_Restrict_ string;
-    size_t nmatch;
-    regmatch_t pmatch[_Restrict_arr_];
-    int eflags;
+regexec (const regex_t *_Restrict_ preg, const char *_Restrict_ string,
+        size_t nmatch, regmatch_t pmatch[], int eflags)
 {
   reg_errcode_t err;
   Idx start, length;
@@ -305,11 +301,8 @@
    match was found and -2 indicates an internal error.  */
 
 regoff_t
-re_match (bufp, string, length, start, regs)
-    struct re_pattern_buffer *bufp;
-    const char *string;
-    Idx length, start;
-    struct re_registers *regs;
+re_match (struct re_pattern_buffer *bufp, const char *string, Idx length,
+         Idx start, struct re_registers *regs)
 {
   return re_search_stub (bufp, string, length, start, 0, length, regs, true);
 }
@@ -318,12 +311,8 @@
 #endif
 
 regoff_t
-re_search (bufp, string, length, start, range, regs)
-    struct re_pattern_buffer *bufp;
-    const char *string;
-    Idx length, start;
-    regoff_t range;
-    struct re_registers *regs;
+re_search (struct re_pattern_buffer *bufp, const char *string, Idx length,
+          Idx start, regoff_t range, struct re_registers *regs)
 {
   return re_search_stub (bufp, string, length, start, range, length, regs,
                         false);
@@ -333,11 +322,9 @@
 #endif
 
 regoff_t
-re_match_2 (bufp, string1, length1, string2, length2, start, regs, stop)
-    struct re_pattern_buffer *bufp;
-    const char *string1, *string2;
-    Idx length1, length2, start, stop;
-    struct re_registers *regs;
+re_match_2 (struct re_pattern_buffer *bufp, const char *string1, Idx length1,
+           const char *string2, Idx length2, Idx start,
+           struct re_registers *regs, Idx stop)
 {
   return re_search_2_stub (bufp, string1, length1, string2, length2,
                           start, 0, regs, stop, true);
@@ -347,12 +334,9 @@
 #endif
 
 regoff_t
-re_search_2 (bufp, string1, length1, string2, length2, start, range, regs, 
stop)
-    struct re_pattern_buffer *bufp;
-    const char *string1, *string2;
-    Idx length1, length2, start, stop;
-    regoff_t range;
-    struct re_registers *regs;
+re_search_2 (struct re_pattern_buffer *bufp, const char *string1, Idx length1,
+            const char *string2, Idx length2, Idx start, regoff_t range,
+            struct re_registers *regs, Idx stop)
 {
   return re_search_2_stub (bufp, string1, length1, string2, length2,
                           start, range, regs, stop, false);
@@ -362,10 +346,10 @@
 #endif
 
 static regoff_t
-re_search_2_stub (struct re_pattern_buffer *bufp,
-                 const char *string1, Idx length1,
-                 const char *string2, Idx length2,
-                 Idx start, regoff_t range, struct re_registers *regs,
+internal_function
+re_search_2_stub (struct re_pattern_buffer *bufp, const char *string1,
+                 Idx length1, const char *string2, Idx length2, Idx start,
+                 regoff_t range, struct re_registers *regs,
                  Idx stop, bool ret_len)
 {
   const char *str;
@@ -409,8 +393,8 @@
    otherwise the position of the match is returned.  */
 
 static regoff_t
-re_search_stub (struct re_pattern_buffer *bufp,
-               const char *string, Idx length,
+internal_function
+re_search_stub (struct re_pattern_buffer *bufp, const char *string, Idx length,
                Idx start, regoff_t range, Idx stop, struct re_registers *regs,
                bool ret_len)
 {
@@ -499,6 +483,7 @@
 }
 
 static unsigned
+internal_function
 re_copy_regs (struct re_registers *regs, regmatch_t *pmatch, Idx nregs,
              int regs_allocated)
 {
@@ -577,11 +562,8 @@
    freeing the old data.  */
 
 void
-re_set_registers (bufp, regs, num_regs, starts, ends)
-    struct re_pattern_buffer *bufp;
-    struct re_registers *regs;
-    __re_size_t num_regs;
-    regoff_t *starts, *ends;
+re_set_registers (struct re_pattern_buffer *bufp, struct re_registers *regs,
+                 __re_size_t num_regs, regoff_t *starts, regoff_t *ends)
 {
   if (num_regs)
     {
@@ -609,8 +591,7 @@
 # ifdef _LIBC
 weak_function
 # endif
-re_exec (s)
-     const char *s;
+re_exec (const char *s)
 {
   return 0 == regexec (&re_comp_buf, s, 0, NULL, 0);
 }
@@ -628,12 +609,10 @@
    (0 <= LAST_START && LAST_START <= LENGTH)  */
 
 static reg_errcode_t
-__attribute_warn_unused_result__
-re_search_internal (const regex_t *preg,
-                   const char *string, Idx length,
-                   Idx start, Idx last_start, Idx stop,
-                   size_t nmatch, regmatch_t pmatch[],
-                   int eflags)
+__attribute_warn_unused_result__ internal_function
+re_search_internal (const regex_t *preg, const char *string, Idx length,
+                   Idx start, Idx last_start, Idx stop, size_t nmatch,
+                   regmatch_t pmatch[], int eflags)
 {
   reg_errcode_t err;
   const re_dfa_t *dfa = preg->buffer;
@@ -642,7 +621,7 @@
   bool fl_longest_match;
   int match_kind;
   Idx match_first;
-  Idx match_last = REG_MISSING;
+  Idx match_last = -1;
   Idx extra_nmatch;
   bool sb;
   int ch;
@@ -851,9 +830,9 @@
       mctx.state_log_top = mctx.nbkref_ents = mctx.max_mb_elem_len = 0;
       match_last = check_matching (&mctx, fl_longest_match,
                                   start <= last_start ? &match_first : NULL);
-      if (match_last != REG_MISSING)
+      if (match_last != -1)
        {
-         if (BE (match_last == REG_ERROR, 0))
+         if (BE (match_last == -2, 0))
            {
              err = REG_ESPACE;
              goto free_return;
@@ -875,7 +854,7 @@
                    break;
                  if (BE (err != REG_NOMATCH, 0))
                    goto free_return;
-                 match_last = REG_MISSING;
+                 match_last = -1;
                }
              else
                break; /* We found a match.  */
@@ -886,7 +865,7 @@
     }
 
 #ifdef DEBUG
-  assert (match_last != REG_MISSING);
+  assert (match_last != -1);
   assert (err == REG_NOERROR);
 #endif
 
@@ -964,7 +943,7 @@
 }
 
 static reg_errcode_t
-__attribute_warn_unused_result__
+internal_function __attribute_warn_unused_result__
 prune_impossible_nodes (re_match_context_t *mctx)
 {
   const re_dfa_t *const dfa = mctx->dfa;
@@ -1012,7 +991,7 @@
          do
            {
              --match_last;
-             if (! REG_VALID_INDEX (match_last))
+             if (match_last < 0)
                {
                  ret = REG_NOMATCH;
                  goto free_return;
@@ -1093,8 +1072,8 @@
 }
 
 /* Check whether the regular expression match input string INPUT or not,
-   and return the index where the matching end.  Return REG_MISSING if
-   there is no match, and return REG_ERROR in case of an error.
+   and return the index where the matching end.  Return -1 if
+   there is no match, and return -2 in case of an error.
    FL_LONGEST_MATCH means we want the POSIX longest matching.
    If P_MATCH_FIRST is not NULL, and the match fails, it is set to the
    next place where we may want to try matching.
@@ -1109,7 +1088,7 @@
   const re_dfa_t *const dfa = mctx->dfa;
   reg_errcode_t err;
   Idx match = 0;
-  Idx match_last = REG_MISSING;
+  Idx match_last = -1;
   Idx cur_str_idx = re_string_cur_idx (&mctx->input);
   re_dfastate_t *cur_state;
   bool at_init_state = p_match_first != NULL;
@@ -1121,7 +1100,7 @@
   if (BE (cur_state == NULL, 0))
     {
       assert (err == REG_ESPACE);
-      return REG_ERROR;
+      return -2;
     }
 
   if (mctx->state_log != NULL)
@@ -1176,7 +1155,7 @@
          if (BE (err != REG_NOERROR, 0))
            {
              assert (err == REG_ESPACE);
-             return REG_ERROR;
+             return -2;
            }
        }
 
@@ -1190,7 +1169,7 @@
             state using the state log, if available and if we have not
             already found a valid (even if not the longest) match.  */
          if (BE (err != REG_NOERROR, 0))
-           return REG_ERROR;
+           return -2;
 
          if (mctx->state_log == NULL
              || (match && !fl_longest_match)
@@ -1273,7 +1252,7 @@
 /* Compute the next node to which "NFA" transit from NODE("NFA" is a NFA
    corresponding to the DFA).
    Return the destination node, and update EPS_VIA_NODES;
-   return REG_MISSING in case of errors.  */
+   return -1 in case of errors.  */
 
 static Idx
 internal_function
@@ -1291,15 +1270,15 @@
       Idx dest_node;
       ok = re_node_set_insert (eps_via_nodes, node);
       if (BE (! ok, 0))
-       return REG_ERROR;
-      /* Pick up a valid destination, or return REG_MISSING if none
+       return -2;
+      /* Pick up a valid destination, or return -1 if none
         is found.  */
-      for (dest_node = REG_MISSING, i = 0; i < edests->nelem; ++i)
+      for (dest_node = -1, i = 0; i < edests->nelem; ++i)
        {
          Idx candidate = edests->elems[i];
          if (!re_node_set_contains (cur_nodes, candidate))
            continue;
-          if (dest_node == REG_MISSING)
+          if (dest_node == -1)
            dest_node = candidate;
 
          else
@@ -1313,7 +1292,7 @@
              else if (fs != NULL
                       && push_fail_stack (fs, *pidx, candidate, nregs, regs,
                                           eps_via_nodes))
-               return REG_ERROR;
+               return -2;
 
              /* We know we are going to exit.  */
              break;
@@ -1338,13 +1317,13 @@
          if (fs != NULL)
            {
              if (regs[subexp_idx].rm_so == -1 || regs[subexp_idx].rm_eo == -1)
-               return REG_MISSING;
+               return -1;
              else if (naccepted)
                {
                  char *buf = (char *) re_string_get_buffer (&mctx->input);
                  if (memcmp (buf + regs[subexp_idx].rm_so, buf + *pidx,
                              naccepted) != 0)
-                   return REG_MISSING;
+                   return -1;
                }
            }
 
@@ -1353,7 +1332,7 @@
              Idx dest_node;
              ok = re_node_set_insert (eps_via_nodes, node);
              if (BE (! ok, 0))
-               return REG_ERROR;
+               return -2;
              dest_node = dfa->edests[node].elems[0];
              if (re_node_set_contains (&mctx->state_log[*pidx]->nodes,
                                        dest_node))
@@ -1369,12 +1348,12 @@
          if (fs && (*pidx > mctx->match_last || mctx->state_log[*pidx] == NULL
                     || !re_node_set_contains (&mctx->state_log[*pidx]->nodes,
                                               dest_node)))
-           return REG_MISSING;
+           return -1;
          re_node_set_empty (eps_via_nodes);
          return dest_node;
        }
     }
-  return REG_MISSING;
+  return -1;
 }
 
 static reg_errcode_t
@@ -1410,7 +1389,7 @@
                regmatch_t *regs, re_node_set *eps_via_nodes)
 {
   Idx num = --fs->num;
-  assert (REG_VALID_INDEX (num));
+  assert (num >= 0);
   *pidx = fs->stack[num].idx;
   memcpy (regs, fs->stack[num].regs, sizeof (regmatch_t) * nregs);
   re_node_set_free (eps_via_nodes);
@@ -1503,9 +1482,9 @@
       cur_node = proceed_next_node (mctx, nmatch, pmatch, &idx, cur_node,
                                    &eps_via_nodes, fs);
 
-      if (BE (! REG_VALID_INDEX (cur_node), 0))
+      if (BE (cur_node < 0, 0))
        {
-         if (BE (cur_node == REG_ERROR, 0))
+         if (BE (cur_node == -2, 0))
            {
              re_node_set_free (&eps_via_nodes);
              if (prev_idx_match_malloced)
@@ -1889,10 +1868,10 @@
          {
            Idx edst1 = dfa->edests[cur_node].elems[0];
            Idx edst2 = ((dfa->edests[cur_node].nelem > 1)
-                        ? dfa->edests[cur_node].elems[1] : REG_MISSING);
+                        ? dfa->edests[cur_node].elems[1] : -1);
            if ((!re_node_set_contains (inv_eclosure, edst1)
                 && re_node_set_contains (dest_nodes, edst1))
-               || (REG_VALID_NONZERO_INDEX (edst2)
+               || (edst2 > 0
                    && !re_node_set_contains (inv_eclosure, edst2)
                    && re_node_set_contains (dest_nodes, edst2)))
              {
@@ -1972,7 +1951,7 @@
       switch (dfa->nodes[node].type)
        {
        case OP_BACK_REF:
-         if (bkref_idx != REG_MISSING)
+         if (bkref_idx != -1)
            {
              struct re_backref_cache_entry *ent = mctx->bkref_ents + bkref_idx;
              do
@@ -2088,8 +2067,8 @@
       subexp_idx = dfa->nodes[ent->node].opr.idx;
       if (ent->subexp_to == str_idx)
        {
-         Idx ops_node = REG_MISSING;
-         Idx cls_node = REG_MISSING;
+         Idx ops_node = -1;
+         Idx cls_node = -1;
          for (node_idx = 0; node_idx < dest_nodes->nelem; ++node_idx)
            {
              Idx node = dest_nodes->elems[node_idx];
@@ -2104,7 +2083,7 @@
 
          /* Check the limitation of the open subexpression.  */
          /* Note that (ent->subexp_to = str_idx != ent->subexp_from).  */
-         if (REG_VALID_INDEX (ops_node))
+         if (ops_node >= 0)
            {
              err = sub_epsilon_src_nodes (dfa, ops_node, dest_nodes,
                                           candidates);
@@ -2113,7 +2092,7 @@
            }
 
          /* Check the limitation of the close subexpression.  */
-         if (REG_VALID_INDEX (cls_node))
+         if (cls_node >= 0)
            for (node_idx = 0; node_idx < dest_nodes->nelem; ++node_idx)
              {
                Idx node = dest_nodes->elems[node_idx];
@@ -2166,7 +2145,7 @@
   re_sift_context_t local_sctx;
   Idx first_idx = search_cur_bkref_entry (mctx, str_idx);
 
-  if (first_idx == REG_MISSING)
+  if (first_idx == -1)
     return REG_NOERROR;
 
   local_sctx.sifted_states = NULL; /* Mark that it hasn't been initialized.  */
@@ -2570,7 +2549,7 @@
       if (BE (err != REG_NOERROR, 0))
        return err;
 #ifdef DEBUG
-      assert (dfa->nexts[cur_node_idx] != REG_MISSING);
+      assert (dfa->nexts[cur_node_idx] != -1);
 #endif
       new_nodes = dfa->eclosures + dfa->nexts[cur_node_idx];
 
@@ -2636,7 +2615,7 @@
       /* And add the epsilon closures (which is 'new_dest_nodes') of
         the backreference to appropriate state_log.  */
 #ifdef DEBUG
-      assert (dfa->nexts[node_idx] != REG_MISSING);
+      assert (dfa->nexts[node_idx] != -1);
 #endif
       for (; bkc_idx < mctx->nbkref_ents; ++bkc_idx)
        {
@@ -2720,7 +2699,7 @@
   const char *buf = (const char *) re_string_get_buffer (&mctx->input);
   /* Return if we have already checked BKREF_NODE at BKREF_STR_IDX.  */
   Idx cache_idx = search_cur_bkref_entry (mctx, bkref_str_idx);
-  if (cache_idx != REG_MISSING)
+  if (cache_idx != -1)
     {
       const struct re_backref_cache_entry *entry
        = mctx->bkref_ents + cache_idx;
@@ -2825,7 +2804,7 @@
          nodes = &mctx->state_log[sl_str]->nodes;
          cls_node = find_subexp_node (dfa, nodes, subexp_num,
                                       OP_CLOSE_SUBEXP);
-         if (cls_node == REG_MISSING)
+         if (cls_node == -1)
            continue; /* No.  */
          if (sub_top->path == NULL)
            {
@@ -2904,7 +2883,7 @@
          && node->opr.idx == subexp_idx)
        return cls_node;
     }
-  return REG_MISSING;
+  return -1;
 }
 
 /* Check whether the node TOP_NODE at TOP_STR can arrive to the node
@@ -3180,7 +3159,7 @@
       Idx cur_node = cur_nodes->elems[idx];
       const re_node_set *eclosure = dfa->eclosures + cur_node;
       outside_node = find_subexp_node (dfa, eclosure, ex_subexp, type);
-      if (outside_node == REG_MISSING)
+      if (outside_node == -1)
        {
          /* There are no problematic nodes, just merge them.  */
          err = re_node_set_merge (&new_nodes, eclosure);
@@ -3266,7 +3245,7 @@
   Idx cache_idx_start = search_cur_bkref_entry (mctx, cur_str);
   struct re_backref_cache_entry *ent;
 
-  if (cache_idx_start == REG_MISSING)
+  if (cache_idx_start == -1)
     return REG_NOERROR;
 
  restart:
@@ -3391,7 +3370,7 @@
   /* At first, group all nodes belonging to 'state' into several
      destinations.  */
   ndests = group_nodes_into_DFAstates (dfa, state, dests_node, dests_ch);
-  if (BE (! REG_VALID_NONZERO_INDEX (ndests), 0))
+  if (BE (ndests <= 0, 0))
     {
       if (dests_node_malloced)
        free (dests_alloc);
@@ -3453,7 +3432,7 @@
       for (j = 0; j < dests_node[i].nelem; ++j)
        {
          next_node = dfa->nexts[dests_node[i].elems[j]];
-         if (next_node != REG_MISSING)
+         if (next_node != -1)
            {
              err = re_node_set_merge (&follows, dfa->eclosures + next_node);
              if (BE (err != REG_NOERROR, 0))
@@ -3764,7 +3743,7 @@
  error_return:
   for (j = 0; j < ndests; ++j)
     re_node_set_free (dests_node + j);
-  return REG_MISSING;
+  return -1;
 }
 
 #ifdef RE_ENABLE_I18N
@@ -4195,7 +4174,7 @@
 match_ctx_init (re_match_context_t *mctx, int eflags, Idx n)
 {
   mctx->eflags = eflags;
-  mctx->match_last = REG_MISSING;
+  mctx->match_last = -1;
   if (n > 0)
     {
       /* Avoid overflow.  */
@@ -4316,7 +4295,7 @@
   return REG_NOERROR;
 }
 
-/* Return the first entry with the same str_idx, or REG_MISSING if none is
+/* Return the first entry with the same str_idx, or -1 if none is
    found.  Note that MCTX->BKREF_ENTS is already sorted by MCTX->STR_IDX.  */
 
 static Idx
@@ -4336,7 +4315,7 @@
   if (left < last && mctx->bkref_ents[left].str_idx == str_idx)
     return left;
   else
-    return REG_MISSING;
+    return -1;
 }
 
 /* Register the node NODE, whose type is OP_OPEN_SUBEXP, and which matches

Modified: trunk/gnulib/lib/size_max.h
===================================================================
--- trunk/gnulib/lib/size_max.h 2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/size_max.h 2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* size_max.h -- declare SIZE_MAX through system headers
-   Copyright (C) 2005-2006, 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2005-2006, 2009-2016 Free Software Foundation, Inc.
    Written by Simon Josefsson.
 
    This program is free software; you can redistribute it and/or modify

Modified: trunk/gnulib/lib/stdarg.in.h
===================================================================
--- trunk/gnulib/lib/stdarg.in.h        2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/stdarg.in.h        2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* Substitute for and wrapper around <stdarg.h>.
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008-2016 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

Modified: trunk/gnulib/lib/stdbool.in.h
===================================================================
--- trunk/gnulib/lib/stdbool.in.h       2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/stdbool.in.h       2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2003, 2006-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2003, 2006-2016 Free Software Foundation, Inc.
    Written by Bruno Haible <address@hidden>, 2001.
 
    This program is free software; you can redistribute it and/or modify

Modified: trunk/gnulib/lib/stddef.in.h
===================================================================
--- trunk/gnulib/lib/stddef.in.h        2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/stddef.in.h        2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,6 +1,6 @@
 /* A substitute for POSIX 2008 <stddef.h>, for platforms that have issues.
 
-   Copyright (C) 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2009-2016 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
@@ -81,8 +81,10 @@
 # define wchar_t int
 #endif
 
-/* Some platforms lack max_align_t.  */
-#if address@hidden@
+/* Some platforms lack max_align_t.  The check for _GCC_MAX_ALIGN_T is
+   a hack in case the configure-time test was done with g++ even though
+   we are currently compiling with gcc.  */
+#if ! (@HAVE_MAX_ALIGN_T@ || defined _GCC_MAX_ALIGN_T)
 /* On the x86, the maximum storage alignment of double, long, etc. is 4,
    but GCC's C11 ABI for x86 says that max_align_t has an alignment of 8,
    and the C11 standard allows this.  Work around this problem by

Modified: trunk/gnulib/lib/stdint.in.h
===================================================================
--- trunk/gnulib/lib/stdint.in.h        2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/stdint.in.h        2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2002, 2004-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2002, 2004-2016 Free Software Foundation, Inc.
    Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood.
    This file is part of gnulib.
 
@@ -118,15 +118,10 @@
    picky compilers.  */
 
 #define _STDINT_MIN(signed, bits, zero) \
-  ((signed) ? (- ((zero) + 1) << ((bits) ? (bits) - 1 : 0)) : (zero))
+  ((signed) ? ~ _STDINT_MAX (signed, bits, zero) : (zero))
 
 #define _STDINT_MAX(signed, bits, zero) \
-  ((signed) \
-   ? ~ _STDINT_MIN (signed, bits, zero) \
-   : /* The expression for the unsigned case.  The subtraction of (signed) \
-        is a nop in the unsigned case and avoids "signed integer overflow" \
-        warnings in the signed case.  */ \
-     ((((zero) + 1) << ((bits) ? (bits) - 1 - (signed) : 0)) - 1) * 2 + 1)
+  (((((zero) + 1) << ((bits) ? (bits) - 1 - (signed) : 0)) - 1) * 2 + 1)
 
 #if !GNULIB_defined_stdint_types
 
@@ -288,12 +283,17 @@
 
 /* 7.18.1.4. Integer types capable of holding object pointers */
 
+/* kLIBC's stdint.h defines _INTPTR_T_DECLARED and needs its own
+   definitions of intptr_t and uintptr_t (which use int and unsigned)
+   to avoid clashes with declarations of system functions like sbrk.  */
+#ifndef _INTPTR_T_DECLARED
 #undef intptr_t
 #undef uintptr_t
 typedef long int gl_intptr_t;
 typedef unsigned long int gl_uintptr_t;
 #define intptr_t gl_intptr_t
 #define uintptr_t gl_uintptr_t
+#endif
 
 /* 7.18.1.5. Greatest-width integer types */
 

Modified: trunk/gnulib/lib/stdio.in.h
===================================================================
--- trunk/gnulib/lib/stdio.in.h 2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/stdio.in.h 2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,6 +1,6 @@
 /* A GNU-like <stdio.h>.
 
-   Copyright (C) 2004, 2007-2015 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2007-2016 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

Modified: trunk/gnulib/lib/stdlib.in.h
===================================================================
--- trunk/gnulib/lib/stdlib.in.h        2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/stdlib.in.h        2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,6 +1,6 @@
 /* A GNU-like <stdlib.h>.
 
-   Copyright (C) 1995, 2001-2004, 2006-2015 Free Software Foundation, Inc.
+   Copyright (C) 1995, 2001-2004, 2006-2016 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

Modified: trunk/gnulib/lib/stpcpy.c
===================================================================
--- trunk/gnulib/lib/stpcpy.c   2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/stpcpy.c   2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* stpcpy.c -- copy a string and return pointer to end of new string
-   Copyright (C) 1992, 1995, 1997-1998, 2006, 2009-2015 Free Software
+   Copyright (C) 1992, 1995, 1997-1998, 2006, 2009-2016 Free Software
    Foundation, Inc.
 
    NOTE: The canonical source of this file is maintained with the GNU C 
Library.

Modified: trunk/gnulib/lib/str-kmp.h
===================================================================
--- trunk/gnulib/lib/str-kmp.h  2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/str-kmp.h  2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,6 +1,6 @@
 /* Substring search in a NUL terminated string of UNIT elements,
    using the Knuth-Morris-Pratt algorithm.
-   Copyright (C) 2005-2015 Free Software Foundation, Inc.
+   Copyright (C) 2005-2016 Free Software Foundation, Inc.
    Written by Bruno Haible <address@hidden>, 2005.
 
    This program is free software; you can redistribute it and/or modify

Modified: trunk/gnulib/lib/str-two-way.h
===================================================================
--- trunk/gnulib/lib/str-two-way.h      2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/str-two-way.h      2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* Byte-wise substring search, using the Two-Way algorithm.
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008-2016 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Written by Eric Blake <address@hidden>, 2008.
 

Modified: trunk/gnulib/lib/strcasecmp.c
===================================================================
--- trunk/gnulib/lib/strcasecmp.c       2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/strcasecmp.c       2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* Case-insensitive string comparison function.
-   Copyright (C) 1998-1999, 2005-2007, 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-1999, 2005-2007, 2009-2016 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

Modified: trunk/gnulib/lib/strcasestr.c
===================================================================
--- trunk/gnulib/lib/strcasestr.c       2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/strcasestr.c       2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* Case-insensitive searching in a string.
-   Copyright (C) 2005-2015 Free Software Foundation, Inc.
+   Copyright (C) 2005-2016 Free Software Foundation, Inc.
    Written by Bruno Haible <address@hidden>, 2005.
 
    This program is free software; you can redistribute it and/or modify

Modified: trunk/gnulib/lib/strdup.c
===================================================================
--- trunk/gnulib/lib/strdup.c   2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/strdup.c   2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1996-1998, 2002-2004, 2006-2007, 2009-2015 Free Software
+/* Copyright (C) 1991, 1996-1998, 2002-2004, 2006-2007, 2009-2016 Free Software
    Foundation, Inc.
 
    This file is part of the GNU C Library.

Modified: trunk/gnulib/lib/streq.h
===================================================================
--- trunk/gnulib/lib/streq.h    2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/streq.h    2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* Optimized string comparison.
-   Copyright (C) 2001-2002, 2007, 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002, 2007, 2009-2016 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

Modified: trunk/gnulib/lib/strerror-override.c
===================================================================
--- trunk/gnulib/lib/strerror-override.c        2016-07-30 19:16:48 UTC (rev 
7284)
+++ trunk/gnulib/lib/strerror-override.c        2016-07-30 20:17:19 UTC (rev 
7285)
@@ -1,6 +1,6 @@
 /* strerror-override.c --- POSIX compatible system error routine
 
-   Copyright (C) 2010-2015 Free Software Foundation, Inc.
+   Copyright (C) 2010-2016 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

Modified: trunk/gnulib/lib/strerror-override.h
===================================================================
--- trunk/gnulib/lib/strerror-override.h        2016-07-30 19:16:48 UTC (rev 
7284)
+++ trunk/gnulib/lib/strerror-override.h        2016-07-30 20:17:19 UTC (rev 
7285)
@@ -1,6 +1,6 @@
 /* strerror-override.h --- POSIX compatible system error routine
 
-   Copyright (C) 2010-2015 Free Software Foundation, Inc.
+   Copyright (C) 2010-2016 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

Modified: trunk/gnulib/lib/strerror.c
===================================================================
--- trunk/gnulib/lib/strerror.c 2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/strerror.c 2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,6 +1,6 @@
 /* strerror.c --- POSIX compatible system error routine
 
-   Copyright (C) 2007-2015 Free Software Foundation, Inc.
+   Copyright (C) 2007-2016 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

Modified: trunk/gnulib/lib/string.in.h
===================================================================
--- trunk/gnulib/lib/string.in.h        2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/string.in.h        2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,6 +1,6 @@
 /* A GNU-like <string.h>.
 
-   Copyright (C) 1995-1996, 2001-2015 Free Software Foundation, Inc.
+   Copyright (C) 1995-1996, 2001-2016 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

Modified: trunk/gnulib/lib/strings.in.h
===================================================================
--- trunk/gnulib/lib/strings.in.h       2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/strings.in.h       2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,6 +1,6 @@
 /* A substitute <strings.h>.
 
-   Copyright (C) 2007-2015 Free Software Foundation, Inc.
+   Copyright (C) 2007-2016 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

Modified: trunk/gnulib/lib/strncasecmp.c
===================================================================
--- trunk/gnulib/lib/strncasecmp.c      2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/strncasecmp.c      2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* strncasecmp.c -- case insensitive string comparator
-   Copyright (C) 1998-1999, 2005-2007, 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-1999, 2005-2007, 2009-2016 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

Modified: trunk/gnulib/lib/strndup.c
===================================================================
--- trunk/gnulib/lib/strndup.c  2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/strndup.c  2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,6 +1,6 @@
 /* A replacement function, for systems that lack strndup.
 
-   Copyright (C) 1996-1998, 2001-2003, 2005-2007, 2009-2015 Free Software
+   Copyright (C) 1996-1998, 2001-2003, 2005-2007, 2009-2016 Free Software
    Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify it

Modified: trunk/gnulib/lib/strnlen.c
===================================================================
--- trunk/gnulib/lib/strnlen.c  2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/strnlen.c  2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* Find the length of STRING, but scan at most MAXLEN characters.
-   Copyright (C) 2005-2007, 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2005-2007, 2009-2016 Free Software Foundation, Inc.
    Written by Simon Josefsson.
 
    This program is free software; you can redistribute it and/or modify

Modified: trunk/gnulib/lib/strnlen1.c
===================================================================
--- trunk/gnulib/lib/strnlen1.c 2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/strnlen1.c 2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* Find the length of STRING + 1, but scan at most MAXLEN bytes.
-   Copyright (C) 2005-2006, 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2005-2006, 2009-2016 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

Modified: trunk/gnulib/lib/strnlen1.h
===================================================================
--- trunk/gnulib/lib/strnlen1.h 2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/strnlen1.h 2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* Find the length of STRING + 1, but scan at most MAXLEN bytes.
-   Copyright (C) 2005, 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2009-2016 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

Modified: trunk/gnulib/lib/strstr.c
===================================================================
--- trunk/gnulib/lib/strstr.c   2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/strstr.c   2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-1994, 1996-1998, 2000, 2004, 2007-2015 Free Software
+/* Copyright (C) 1991-1994, 1996-1998, 2000, 2004, 2007-2016 Free Software
    Foundation, Inc.
    This file is part of the GNU C Library.
 

Modified: trunk/gnulib/lib/sys_types.in.h
===================================================================
--- trunk/gnulib/lib/sys_types.in.h     2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/sys_types.in.h     2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,6 +1,6 @@
 /* Provide a more complete sys/types.h.
 
-   Copyright (C) 2011-2015 Free Software Foundation, Inc.
+   Copyright (C) 2011-2016 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

Modified: trunk/gnulib/lib/unistd.in.h
===================================================================
--- trunk/gnulib/lib/unistd.in.h        2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/unistd.in.h        2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* Substitute for and wrapper around <unistd.h>.
-   Copyright (C) 2003-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003-2016 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

Modified: trunk/gnulib/lib/unitypes.in.h
===================================================================
--- trunk/gnulib/lib/unitypes.in.h      2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/unitypes.in.h      2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* Elementary types and macros for the GNU UniString library.
-   Copyright (C) 2002, 2005-2006, 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2005-2006, 2009-2016 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

Modified: trunk/gnulib/lib/uniwidth/cjk.h
===================================================================
--- trunk/gnulib/lib/uniwidth/cjk.h     2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/uniwidth/cjk.h     2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* Test for CJK encoding.
-   Copyright (C) 2001-2002, 2005-2007, 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002, 2005-2007, 2009-2016 Free Software Foundation, Inc.
    Written by Bruno Haible <address@hidden>, 2002.
 
    This program is free software: you can redistribute it and/or modify it

Modified: trunk/gnulib/lib/uniwidth/width.c
===================================================================
--- trunk/gnulib/lib/uniwidth/width.c   2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/uniwidth/width.c   2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* Determine display width of Unicode character.
-   Copyright (C) 2001-2002, 2006-2015 Free Software Foundation, Inc.
+   Copyright (C) 2001-2002, 2006-2016 Free Software Foundation, Inc.
    Written by Bruno Haible <address@hidden>, 2002.
 
    This program is free software: you can redistribute it and/or modify it

Modified: trunk/gnulib/lib/uniwidth.in.h
===================================================================
--- trunk/gnulib/lib/uniwidth.in.h      2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/uniwidth.in.h      2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* Display width functions.
-   Copyright (C) 2001-2002, 2005, 2007, 2009-2015 Free Software Foundation,
+   Copyright (C) 2001-2002, 2005, 2007, 2009-2016 Free Software Foundation,
    Inc.
 
    This program is free software: you can redistribute it and/or modify it

Modified: trunk/gnulib/lib/vasnprintf.c
===================================================================
--- trunk/gnulib/lib/vasnprintf.c       2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/vasnprintf.c       2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* vsprintf with automatic memory allocation.
-   Copyright (C) 1999, 2002-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2002-2016 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
@@ -195,7 +195,7 @@
 
 /* GCC >= 4.0 with -Wall emits unjustified "... may be used uninitialized"
    warnings in this file.  Use -Dlint to suppress them.  */
-#ifdef lint
+#if defined GCC_LINT || defined lint
 # define IF_LINT(Code) Code
 #else
 # define IF_LINT(Code) /* empty */

Modified: trunk/gnulib/lib/vasnprintf.h
===================================================================
--- trunk/gnulib/lib/vasnprintf.h       2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/vasnprintf.h       2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* vsprintf with automatic memory allocation.
-   Copyright (C) 2002-2004, 2007-2015 Free Software Foundation, Inc.
+   Copyright (C) 2002-2004, 2007-2016 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

Modified: trunk/gnulib/lib/vasprintf.c
===================================================================
--- trunk/gnulib/lib/vasprintf.c        2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/vasprintf.c        2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* Formatted output to strings.
-   Copyright (C) 1999, 2002, 2006-2015 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2002, 2006-2016 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

Modified: trunk/gnulib/lib/verify.h
===================================================================
--- trunk/gnulib/lib/verify.h   2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/verify.h   2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,6 +1,6 @@
 /* Compile-time assert-like macros.
 
-   Copyright (C) 2005-2006, 2009-2015 Free Software Foundation, Inc.
+   Copyright (C) 2005-2006, 2009-2016 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
@@ -263,7 +263,7 @@
 # define assume(R) ((R) ? (void) 0 : __builtin_unreachable ())
 #elif 1200 <= _MSC_VER
 # define assume(R) __assume (R)
-#elif (defined lint \
+#elif ((defined GCC_LINT || defined lint) \
        && (__has_builtin (__builtin_trap) \
            || 3 < __GNUC__ + (3 < __GNUC_MINOR__ + (4 <= 
__GNUC_PATCHLEVEL__))))
   /* Doing it this way helps various packages when configured with

Added: trunk/gnulib/lib/warn-on-use.h
===================================================================
--- trunk/gnulib/lib/warn-on-use.h                              (rev 0)
+++ trunk/gnulib/lib/warn-on-use.h      2016-07-30 20:17:19 UTC (rev 7285)
@@ -0,0 +1,46 @@
+#ifndef _GL_WARN_ON_USE
+
+# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
+/* A compiler attribute is available in gcc versions 4.3.0 and later.  */
+#  define _GL_WARN_ON_USE(function, message) \
+extern __typeof__ (function) function __attribute__ ((__warning__ (message)))
+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
+/* Verify the existence of the function.  */
+#  define _GL_WARN_ON_USE(function, message) \
+extern __typeof__ (function) function
+# else /* Unsupported.  */
+#  define _GL_WARN_ON_USE(function, message) \
+_GL_WARN_EXTERN_C int _gl_warn_on_use
+# endif
+#endif
+
+/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string")
+   is like _GL_WARN_ON_USE (function, "string"), except that the function is
+   declared with the given prototype, consisting of return type, parameters,
+   and attributes.
+   This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does
+   not work in this case.  */
+#ifndef _GL_WARN_ON_USE_CXX
+# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
+#  define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
+extern rettype function parameters_and_attributes \
+     __attribute__ ((__warning__ (msg)))
+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
+/* Verify the existence of the function.  */
+#  define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
+extern rettype function parameters_and_attributes
+# else /* Unsupported.  */
+#  define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
+_GL_WARN_EXTERN_C int _gl_warn_on_use
+# endif
+#endif
+
+/* _GL_WARN_EXTERN_C declaration;
+   performs the declaration with C linkage.  */
+#ifndef _GL_WARN_EXTERN_C
+# if defined __cplusplus
+#  define _GL_WARN_EXTERN_C extern "C"
+# else
+#  define _GL_WARN_EXTERN_C extern
+# endif
+#endif

Modified: trunk/gnulib/lib/wchar.in.h
===================================================================
--- trunk/gnulib/lib/wchar.in.h 2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/wchar.in.h 2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,6 +1,6 @@
 /* A substitute for ISO C99 <wchar.h>, for platforms that have issues.
 
-   Copyright (C) 2007-2015 Free Software Foundation, Inc.
+   Copyright (C) 2007-2016 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
@@ -31,7 +31,7 @@
 @PRAGMA_COLUMNS@
 
 #if (((defined __need_mbstate_t || defined __need_wint_t)               \
-      && !defined __MINGW32__)                                          \
+      && !defined __MINGW32__ && !defined __KLIBC__)                    \
      || (defined __hpux                                                 \
          && ((defined _INTTYPES_INCLUDED && !defined strtoimax)         \
              || defined _GL_JUST_INCLUDE_SYSTEM_WCHAR_H))               \
@@ -445,6 +445,11 @@
 #  if address@hidden@
 /* wcwidth exists but is not declared.  */
 _GL_FUNCDECL_SYS (wcwidth, int, (wchar_t) _GL_ATTRIBUTE_PURE);
+#  elif defined __KLIBC__
+/* On OS/2 kLIBC, wcwidth is a macro that expands to the name of a
+   static inline function.  The implementation of wcwidth in wcwidth.c
+   causes a "conflicting types" error. */
+#   undef wcwidth
 #  endif
 _GL_CXXALIAS_SYS (wcwidth, int, (wchar_t));
 # endif

Modified: trunk/gnulib/lib/wcrtomb.c
===================================================================
--- trunk/gnulib/lib/wcrtomb.c  2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/wcrtomb.c  2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* Convert wide character to multibyte character.
-   Copyright (C) 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2008-2016 Free Software Foundation, Inc.
    Written by Bruno Haible <address@hidden>, 2008.
 
    This program is free software: you can redistribute it and/or modify

Modified: trunk/gnulib/lib/wctype.in.h
===================================================================
--- trunk/gnulib/lib/wctype.in.h        2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/wctype.in.h        2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,6 +1,6 @@
 /* A substitute for ISO C99 <wctype.h>, for platforms that lack it.
 
-   Copyright (C) 2006-2015 Free Software Foundation, Inc.
+   Copyright (C) 2006-2016 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

Modified: trunk/gnulib/lib/wcwidth.c
===================================================================
--- trunk/gnulib/lib/wcwidth.c  2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/wcwidth.c  2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 /* Determine the number of screen columns needed for a character.
-   Copyright (C) 2006-2007, 2010-2015 Free Software Foundation, Inc.
+   Copyright (C) 2006-2007, 2010-2016 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

Modified: trunk/gnulib/lib/xalloc-die.c
===================================================================
--- trunk/gnulib/lib/xalloc-die.c       2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/xalloc-die.c       2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,6 +1,6 @@
 /* Report a memory allocation failure and exit.
 
-   Copyright (C) 1997-2000, 2002-2004, 2006, 2009-2015 Free Software
+   Copyright (C) 1997-2000, 2002-2004, 2006, 2009-2016 Free Software
    Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify

Modified: trunk/gnulib/lib/xalloc-oversized.h
===================================================================
--- trunk/gnulib/lib/xalloc-oversized.h 2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/xalloc-oversized.h 2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,6 +1,6 @@
 /* xalloc-oversized.h -- memory allocation size checking
 
-   Copyright (C) 1990-2000, 2003-2004, 2006-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2000, 2003-2004, 2006-2016 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
@@ -20,15 +20,13 @@
 
 #include <stddef.h>
 
+/* Default for (non-Clang) compilers that lack __has_builtin.  */
 #ifndef __has_builtin
 # define __has_builtin(x) 0
 #endif
 
-/* Return 1 if an array of N objects, each of size S, cannot exist due
-   to size arithmetic overflow.  S must be positive and N must be
-   nonnegative.  This is a macro, not a function, so that it
-   works correctly even when SIZE_MAX < N.
-
+/* True if N * S would overflow in a size calculation.
+   This expands to a constant expression if N and S are both constants.
    By gnulib convention, SIZE_MAX represents overflow in size
    calculations, so the conservative dividend to use here is
    SIZE_MAX - 1, since SIZE_MAX might represent an overflowed value.
@@ -36,12 +34,38 @@
    sizeof (ptrdiff_t) <= sizeof (size_t), so do not bother to test for
    exactly-SIZE_MAX allocations on such hosts; this avoids a test and
    branch when S is known to be 1.  */
-#if 5 <= __GNUC__ || __has_builtin (__builtin_mul_overflow)
+#define __xalloc_oversized(n, s) \
+    ((size_t) (sizeof (ptrdiff_t) <= sizeof (size_t) ? -1 : -2) / (s) < (n))
+
+
+/* Return 1 if an array of N objects, each of size S, cannot exist due
+   to size arithmetic overflow.  S must be positive and N must be
+   nonnegative.  This is a macro, not a function, so that it
+   works correctly even when SIZE_MAX < N.  */
+
+/* GCC 7 __builtin_mul_overflow should easily compute this.  See:
+   https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68120  */
+#if 7 <= __GNUC__
+# define xalloc_oversized(n, s) __builtin_mul_overflow (n, s, (size_t *) NULL)
+
+/* GCC 5 and Clang __builtin_mul_overflow needs a temporary, and
+   should be used only for non-constant operands, so that
+   xalloc_oversized is a constant expression if both arguments are.
+   Do not use this if pedantic, since pedantic GCC issues a diagnostic
+   for ({ ... }).  */
+#elif ((5 <= __GNUC__ \
+        || (__has_builtin (__builtin_mul_overflow) \
+            && __has_builtin (__builtin_constant_p))) \
+       && !__STRICT_ANSI__)
 # define xalloc_oversized(n, s) \
-    ({ size_t __xalloc_size; __builtin_mul_overflow (n, s, &__xalloc_size); })
+   (__builtin_constant_p (n) && __builtin_constant_p (s) \
+    ? __xalloc_oversized (n, s) \
+    : ({ size_t __xalloc_size; __builtin_mul_overflow (n, s, &__xalloc_size); 
}))
+
+/* Other compilers use integer division; this may be slower but is
+   more portable.  */
 #else
-# define xalloc_oversized(n, s) \
-    ((size_t) (sizeof (ptrdiff_t) <= sizeof (size_t) ? -1 : -2) / (s) < (n))
+# define xalloc_oversized(n, s) __xalloc_oversized (n, s)
 #endif
 
 #endif /* !XALLOC_OVERSIZED_H_ */

Modified: trunk/gnulib/lib/xalloc.h
===================================================================
--- trunk/gnulib/lib/xalloc.h   2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/xalloc.h   2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,6 +1,6 @@
 /* xalloc.h -- malloc with out-of-memory checking
 
-   Copyright (C) 1990-2000, 2003-2004, 2006-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2000, 2003-2004, 2006-2016 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

Modified: trunk/gnulib/lib/xmalloc.c
===================================================================
--- trunk/gnulib/lib/xmalloc.c  2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/xmalloc.c  2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,6 +1,6 @@
 /* xmalloc.c -- malloc with out of memory checking
 
-   Copyright (C) 1990-2000, 2002-2006, 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 1990-2000, 2002-2006, 2008-2016 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

Modified: trunk/gnulib/lib/xsize.h
===================================================================
--- trunk/gnulib/lib/xsize.h    2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/lib/xsize.h    2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,6 +1,6 @@
 /* xsize.h -- Checked size_t computations.
 
-   Copyright (C) 2003, 2008-2015 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2008-2016 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

Modified: trunk/gnulib/m4/00gnulib.m4
===================================================================
--- trunk/gnulib/m4/00gnulib.m4 2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/00gnulib.m4 2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # 00gnulib.m4 serial 3
-dnl Copyright (C) 2009-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2016 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.

Modified: trunk/gnulib/m4/absolute-header.m4
===================================================================
--- trunk/gnulib/m4/absolute-header.m4  2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/absolute-header.m4  2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # absolute-header.m4 serial 16
-dnl Copyright (C) 2006-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2016 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.

Modified: trunk/gnulib/m4/alloca.m4
===================================================================
--- trunk/gnulib/m4/alloca.m4   2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/alloca.m4   2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # alloca.m4 serial 14
-dnl Copyright (C) 2002-2004, 2006-2007, 2009-2015 Free Software Foundation,
+dnl Copyright (C) 2002-2004, 2006-2007, 2009-2016 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,

Modified: trunk/gnulib/m4/argz.m4
===================================================================
--- trunk/gnulib/m4/argz.m4     2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/argz.m4     2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,6 +1,6 @@
 # Portability macros for glibc argz.                    -*- Autoconf -*-
 #
-#   Copyright (C) 2004-2015 Free Software Foundation, Inc.
+#   Copyright (C) 2004-2016 Free Software Foundation, Inc.
 #   Written by Gary V. Vaughan <address@hidden>
 #
 # This file is free software; the Free Software Foundation gives

Modified: trunk/gnulib/m4/btowc.m4
===================================================================
--- trunk/gnulib/m4/btowc.m4    2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/btowc.m4    2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # btowc.m4 serial 10
-dnl Copyright (C) 2008-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2016 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.

Modified: trunk/gnulib/m4/codeset.m4
===================================================================
--- trunk/gnulib/m4/codeset.m4  2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/codeset.m4  2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,6 @@
 # codeset.m4 serial 5 (gettext-0.18.2)
-dnl Copyright (C) 2000-2002, 2006, 2008-2014 Free Software Foundation, Inc.
+dnl Copyright (C) 2000-2002, 2006, 2008-2014, 2016 Free Software Foundation,
+dnl 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.

Modified: trunk/gnulib/m4/configmake.m4
===================================================================
--- trunk/gnulib/m4/configmake.m4       2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/configmake.m4       2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # configmake.m4 serial 2
-dnl Copyright (C) 2010-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2010-2016 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.

Modified: trunk/gnulib/m4/eealloc.m4
===================================================================
--- trunk/gnulib/m4/eealloc.m4  2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/eealloc.m4  2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # eealloc.m4 serial 3
-dnl Copyright (C) 2003, 2009-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2009-2016 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.

Modified: trunk/gnulib/m4/errno_h.m4
===================================================================
--- trunk/gnulib/m4/errno_h.m4  2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/errno_h.m4  2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # errno_h.m4 serial 12
-dnl Copyright (C) 2004, 2006, 2008-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2004, 2006, 2008-2016 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.

Modified: trunk/gnulib/m4/error.m4
===================================================================
--- trunk/gnulib/m4/error.m4    2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/error.m4    2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,6 +1,6 @@
 #serial 14
 
-# Copyright (C) 1996-1998, 2001-2004, 2009-2015 Free Software Foundation, Inc.
+# Copyright (C) 1996-1998, 2001-2004, 2009-2016 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,

Modified: trunk/gnulib/m4/exponentd.m4
===================================================================
--- trunk/gnulib/m4/exponentd.m4        2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/exponentd.m4        2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # exponentd.m4 serial 3
-dnl Copyright (C) 2007-2008, 2010-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2008, 2010-2016 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.

Modified: trunk/gnulib/m4/extensions.m4
===================================================================
--- trunk/gnulib/m4/extensions.m4       2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/extensions.m4       2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,7 +1,7 @@
 # serial 13  -*- Autoconf -*-
 # Enable extensions on systems that normally disable them.
 
-# Copyright (C) 2003, 2006-2015 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006-2016 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.

Modified: trunk/gnulib/m4/extern-inline.m4
===================================================================
--- trunk/gnulib/m4/extern-inline.m4    2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/extern-inline.m4    2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,6 +1,6 @@
 dnl 'extern inline' a la ISO C99.
 
-dnl Copyright 2012-2015 Free Software Foundation, Inc.
+dnl Copyright 2012-2016 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.
@@ -54,6 +54,7 @@
       ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \
       : (199901L <= __STDC_VERSION__ \
          && !defined __HP_cc \
+         && !defined __PGI \
          && !(defined __SUNPRO_C && __STDC__))) \
      && !defined _GL_EXTERN_INLINE_STDHEADER_BUG)
 # define _GL_INLINE inline

Modified: trunk/gnulib/m4/fcntl-o.m4
===================================================================
--- trunk/gnulib/m4/fcntl-o.m4  2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/fcntl-o.m4  2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # fcntl-o.m4 serial 4
-dnl Copyright (C) 2006, 2009-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2009-2016 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.

Modified: trunk/gnulib/m4/float_h.m4
===================================================================
--- trunk/gnulib/m4/float_h.m4  2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/float_h.m4  2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # float_h.m4 serial 9
-dnl Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009-2016 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.

Modified: trunk/gnulib/m4/getopt.m4
===================================================================
--- trunk/gnulib/m4/getopt.m4   2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/getopt.m4   2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # getopt.m4 serial 44
-dnl Copyright (C) 2002-2006, 2008-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2008-2016 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.

Modified: trunk/gnulib/m4/gettext.m4
===================================================================
--- trunk/gnulib/m4/gettext.m4  2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/gettext.m4  2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,16 +1,16 @@
-# gettext.m4 serial 67 (gettext-0.19.6)
-dnl Copyright (C) 1995-2014 Free Software Foundation, Inc.
+# gettext.m4 serial 68 (gettext-0.19.8)
+dnl Copyright (C) 1995-2014, 2016 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
-dnl This file can can be used in projects which are not available under
+dnl This file can be used in projects which are not available under
 dnl the GNU General Public License or the GNU Library General Public
 dnl License but which still want to provide support for the GNU gettext
 dnl functionality.
 dnl Please note that the actual code of the GNU gettext library is covered
 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 gettext package is covered by the GNU General Public License.
 dnl They are *not* in the public domain.
 
 dnl Authors:
@@ -161,13 +161,18 @@
             [AC_LANG_PROGRAM(
                [[
 #include <libintl.h>
-$gt_revision_test_code
+#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
 extern int _nl_msg_cat_cntr;
 extern int *_nl_domain_bindings;
+#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + 
*_nl_domain_bindings)
+#else
+#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
+#endif
+$gt_revision_test_code
                ]],
                [[
 bindtextdomain ("", "");
-return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + 
*_nl_domain_bindings
+return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
                ]])],
             [eval "$gt_func_gnugettext_libc=yes"],
             [eval "$gt_func_gnugettext_libc=no"])])
@@ -193,17 +198,22 @@
               [AC_LANG_PROGRAM(
                  [[
 #include <libintl.h>
-$gt_revision_test_code
+#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
 extern int _nl_msg_cat_cntr;
 extern
 #ifdef __cplusplus
 "C"
 #endif
 const char *_nl_expand_alias (const char *);
+#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias 
(""))
+#else
+#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
+#endif
+$gt_revision_test_code
                  ]],
                  [[
 bindtextdomain ("", "");
-return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + 
*_nl_expand_alias ("")
+return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
                  ]])],
               [eval "$gt_func_gnugettext_libintl=yes"],
               [eval "$gt_func_gnugettext_libintl=no"])
@@ -214,17 +224,22 @@
                 [AC_LANG_PROGRAM(
                    [[
 #include <libintl.h>
-$gt_revision_test_code
+#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
 extern int _nl_msg_cat_cntr;
 extern
 #ifdef __cplusplus
 "C"
 #endif
 const char *_nl_expand_alias (const char *);
+#define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias 
(""))
+#else
+#define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
+#endif
+$gt_revision_test_code
                    ]],
                    [[
 bindtextdomain ("", "");
-return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + 
*_nl_expand_alias ("")
+return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
                    ]])],
                 [LIBINTL="$LIBINTL $LIBICONV"
                  LTLIBINTL="$LTLIBINTL $LTLIBICONV"

Modified: trunk/gnulib/m4/glibc2.m4
===================================================================
--- trunk/gnulib/m4/glibc2.m4   2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/glibc2.m4   2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # glibc2.m4 serial 3
-dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2015 Free Software Foundation,
+dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2016 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,

Modified: trunk/gnulib/m4/glibc21.m4
===================================================================
--- trunk/gnulib/m4/glibc21.m4  2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/glibc21.m4  2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # glibc21.m4 serial 5
-dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2015 Free Software Foundation,
+dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2016 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,

Modified: trunk/gnulib/m4/gnulib-cache.m4
===================================================================
--- trunk/gnulib/m4/gnulib-cache.m4     2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/gnulib-cache.m4     2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2015 Free Software Foundation, Inc.
+# Copyright (C) 2002-2016 Free Software Foundation, Inc.
 #
 # This file is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by

Modified: trunk/gnulib/m4/gnulib-common.m4
===================================================================
--- trunk/gnulib/m4/gnulib-common.m4    2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/gnulib-common.m4    2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # gnulib-common.m4 serial 36
-dnl Copyright (C) 2007-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2016 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.

Modified: trunk/gnulib/m4/gnulib-comp.m4
===================================================================
--- trunk/gnulib/m4/gnulib-comp.m4      2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/gnulib-comp.m4      2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # DO NOT EDIT! GENERATED AUTOMATICALLY!
-# Copyright (C) 2002-2015 Free Software Foundation, Inc.
+# Copyright (C) 2002-2016 Free Software Foundation, Inc.
 #
 # This file is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -58,6 +58,7 @@
   # Code from module getopt-posix:
   # Code from module gettext:
   # Code from module gettext-h:
+  # Code from module hard-locale:
   # Code from module havelib:
   # Code from module iconv:
   # Code from module include_next:
@@ -325,6 +326,7 @@
   gl_XALLOC
   gl_gnulib_enabled_btowc=false
   gl_gnulib_enabled_configmake=false
+  gl_gnulib_enabled_30838f5439487421042f2225bed3af76=false
   gl_gnulib_enabled_intprops=false
   gl_gnulib_enabled_langinfo=false
   gl_gnulib_enabled_localcharset=false
@@ -369,6 +371,13 @@
       gl_gnulib_enabled_configmake=true
     fi
   }
+  func_gl_gnulib_m4code_30838f5439487421042f2225bed3af76 ()
+  {
+    if ! $gl_gnulib_enabled_30838f5439487421042f2225bed3af76; then
+      gl_HARD_LOCALE
+      gl_gnulib_enabled_30838f5439487421042f2225bed3af76=true
+    fi
+  }
   func_gl_gnulib_m4code_intprops ()
   {
     if ! $gl_gnulib_enabled_intprops; then
@@ -459,7 +468,7 @@
   func_gl_gnulib_m4code_f691f076f650964c9f5598c3ee487616 ()
   {
     if ! $gl_gnulib_enabled_f691f076f650964c9f5598c3ee487616; then
-      gl_MSVC_INVAL
+      AC_REQUIRE([gl_MSVC_INVAL])
       if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
         AC_LIBOBJ([msvc-inval])
       fi
@@ -469,7 +478,7 @@
   func_gl_gnulib_m4code_676220fa4366efa9bdbfccf11a857c07 ()
   {
     if ! $gl_gnulib_enabled_676220fa4366efa9bdbfccf11a857c07; then
-      gl_MSVC_NOTHROW
+      AC_REQUIRE([gl_MSVC_NOTHROW])
       if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
         AC_LIBOBJ([msvc-nothrow])
       fi
@@ -607,6 +616,9 @@
     func_gl_gnulib_m4code_676220fa4366efa9bdbfccf11a857c07
   fi
   if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
+    func_gl_gnulib_m4code_30838f5439487421042f2225bed3af76
+  fi
+  if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
     func_gl_gnulib_m4code_localcharset
   fi
   if test $ac_use_included_regex = yes; then
@@ -639,6 +651,7 @@
   m4_pattern_allow([^gl_GNULIB_ENABLED_])
   AM_CONDITIONAL([gl_GNULIB_ENABLED_btowc], [$gl_gnulib_enabled_btowc])
   AM_CONDITIONAL([gl_GNULIB_ENABLED_configmake], 
[$gl_gnulib_enabled_configmake])
+  AM_CONDITIONAL([gl_GNULIB_ENABLED_30838f5439487421042f2225bed3af76], 
[$gl_gnulib_enabled_30838f5439487421042f2225bed3af76])
   AM_CONDITIONAL([gl_GNULIB_ENABLED_intprops], [$gl_gnulib_enabled_intprops])
   AM_CONDITIONAL([gl_GNULIB_ENABLED_langinfo], [$gl_gnulib_enabled_langinfo])
   AM_CONDITIONAL([gl_GNULIB_ENABLED_localcharset], 
[$gl_gnulib_enabled_localcharset])
@@ -830,6 +843,8 @@
   lib/glthread/lock.c
   lib/glthread/lock.h
   lib/glthread/threadlib.c
+  lib/hard-locale.c
+  lib/hard-locale.h
   lib/intprops.h
   lib/iswblank.c
   lib/itold.c
@@ -947,6 +962,7 @@
   m4/glibc2.m4
   m4/glibc21.m4
   m4/gnulib-common.m4
+  m4/hard-locale.m4
   m4/iconv.m4
   m4/include_next.m4
   m4/intdiv0.m4

Modified: trunk/gnulib/m4/gnulib-tool.m4
===================================================================
--- trunk/gnulib/m4/gnulib-tool.m4      2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/gnulib-tool.m4      2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # gnulib-tool.m4 serial 2
-dnl Copyright (C) 2004-2005, 2009-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2004-2005, 2009-2016 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.

Added: trunk/gnulib/m4/hard-locale.m4
===================================================================
--- trunk/gnulib/m4/hard-locale.m4                              (rev 0)
+++ trunk/gnulib/m4/hard-locale.m4      2016-07-30 20:17:19 UTC (rev 7285)
@@ -0,0 +1,11 @@
+# hard-locale.m4 serial 8
+dnl Copyright (C) 2002-2006, 2009-2016 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 No prerequisites of lib/hard-locale.c.
+AC_DEFUN([gl_HARD_LOCALE],
+[
+  :
+])

Modified: trunk/gnulib/m4/iconv.m4
===================================================================
--- trunk/gnulib/m4/iconv.m4    2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/iconv.m4    2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # iconv.m4 serial 19 (gettext-0.18.2)
-dnl Copyright (C) 2000-2002, 2007-2014 Free Software Foundation, Inc.
+dnl Copyright (C) 2000-2002, 2007-2014, 2016 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.

Modified: trunk/gnulib/m4/include_next.m4
===================================================================
--- trunk/gnulib/m4/include_next.m4     2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/include_next.m4     2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # include_next.m4 serial 23
-dnl Copyright (C) 2006-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2016 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.

Modified: trunk/gnulib/m4/intdiv0.m4
===================================================================
--- trunk/gnulib/m4/intdiv0.m4  2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/intdiv0.m4  2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # intdiv0.m4 serial 6 (gettext-0.18.2)
-dnl Copyright (C) 2002, 2007-2008, 2010-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2007-2008, 2010-2016 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.
@@ -38,7 +38,7 @@
 sigfpe_handler (int sig)
 {
   /* Exit with code 0 if SIGFPE, with code 1 if any other signal.  */
-  exit (sig != SIGFPE);
+  _exit (sig != SIGFPE);
 }
 
 int x = 1;

Modified: trunk/gnulib/m4/intl.m4
===================================================================
--- trunk/gnulib/m4/intl.m4     2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/intl.m4     2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,16 +1,16 @@
 # intl.m4 serial 29 (gettext-0.19)
-dnl Copyright (C) 1995-2014 Free Software Foundation, Inc.
+dnl Copyright (C) 1995-2014, 2016 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
-dnl This file can can be used in projects which are not available under
+dnl This file can be used in projects which are not available under
 dnl the GNU General Public License or the GNU Library General Public
 dnl License but which still want to provide support for the GNU gettext
 dnl functionality.
 dnl Please note that the actual code of the GNU gettext library is covered
 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 gettext package is covered by the GNU General Public License.
 dnl They are *not* in the public domain.
 
 dnl Authors:

Modified: trunk/gnulib/m4/intldir.m4
===================================================================
--- trunk/gnulib/m4/intldir.m4  2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/intldir.m4  2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,16 +1,16 @@
 # intldir.m4 serial 2 (gettext-0.18)
-dnl Copyright (C) 2006, 2009-2014 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2009-2014, 2016 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
-dnl This file can can be used in projects which are not available under
+dnl This file can be used in projects which are not available under
 dnl the GNU General Public License or the GNU Library General Public
 dnl License but which still want to provide support for the GNU gettext
 dnl functionality.
 dnl Please note that the actual code of the GNU gettext library is covered
 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 gettext package is covered by the GNU General Public License.
 dnl They are *not* in the public domain.
 
 AC_PREREQ([2.52])

Modified: trunk/gnulib/m4/intlmacosx.m4
===================================================================
--- trunk/gnulib/m4/intlmacosx.m4       2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/intlmacosx.m4       2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,16 +1,16 @@
 # intlmacosx.m4 serial 5 (gettext-0.18.2)
-dnl Copyright (C) 2004-2014 Free Software Foundation, Inc.
+dnl Copyright (C) 2004-2014, 2016 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
-dnl This file can can be used in projects which are not available under
+dnl This file can be used in projects which are not available under
 dnl the GNU General Public License or the GNU Library General Public
 dnl License but which still want to provide support for the GNU gettext
 dnl functionality.
 dnl Please note that the actual code of the GNU gettext library is covered
 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 gettext package is covered by the GNU General Public License.
 dnl They are *not* in the public domain.
 
 dnl Checks for special options needed on Mac OS X.

Modified: trunk/gnulib/m4/intmax.m4
===================================================================
--- trunk/gnulib/m4/intmax.m4   2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/intmax.m4   2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # intmax.m4 serial 6 (gettext-0.18.2)
-dnl Copyright (C) 2002-2005, 2008-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2005, 2008-2016 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.

Modified: trunk/gnulib/m4/intmax_t.m4
===================================================================
--- trunk/gnulib/m4/intmax_t.m4 2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/intmax_t.m4 2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # intmax_t.m4 serial 8
-dnl Copyright (C) 1997-2004, 2006-2007, 2009-2015 Free Software Foundation,
+dnl Copyright (C) 1997-2004, 2006-2007, 2009-2016 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,

Modified: trunk/gnulib/m4/inttypes-pri.m4
===================================================================
--- trunk/gnulib/m4/inttypes-pri.m4     2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/inttypes-pri.m4     2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # inttypes-pri.m4 serial 7 (gettext-0.18.2)
-dnl Copyright (C) 1997-2002, 2006, 2008-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 1997-2002, 2006, 2008-2016 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.

Modified: trunk/gnulib/m4/inttypes_h.m4
===================================================================
--- trunk/gnulib/m4/inttypes_h.m4       2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/inttypes_h.m4       2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # inttypes_h.m4 serial 10
-dnl Copyright (C) 1997-2004, 2006, 2008-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 1997-2004, 2006, 2008-2016 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.

Modified: trunk/gnulib/m4/iswblank.m4
===================================================================
--- trunk/gnulib/m4/iswblank.m4 2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/iswblank.m4 2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # iswblank.m4 serial 4
-dnl Copyright (C) 2011-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2016 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.

Modified: trunk/gnulib/m4/langinfo_h.m4
===================================================================
--- trunk/gnulib/m4/langinfo_h.m4       2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/langinfo_h.m4       2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # langinfo_h.m4 serial 7
-dnl Copyright (C) 2009-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2016 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.

Modified: trunk/gnulib/m4/lcmessage.m4
===================================================================
--- trunk/gnulib/m4/lcmessage.m4        2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/lcmessage.m4        2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,17 +1,17 @@
 # lcmessage.m4 serial 7 (gettext-0.18.2)
-dnl Copyright (C) 1995-2002, 2004-2005, 2008-2014 Free Software Foundation,
-dnl Inc.
+dnl Copyright (C) 1995-2002, 2004-2005, 2008-2014, 2016 Free Software
+dnl 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
-dnl This file can can be used in projects which are not available under
+dnl This file can be used in projects which are not available under
 dnl the GNU General Public License or the GNU Library General Public
 dnl License but which still want to provide support for the GNU gettext
 dnl functionality.
 dnl Please note that the actual code of the GNU gettext library is covered
 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 gettext package is covered by the GNU General Public License.
 dnl They are *not* in the public domain.
 
 dnl Authors:

Modified: trunk/gnulib/m4/lib-ld.m4
===================================================================
--- trunk/gnulib/m4/lib-ld.m4   2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/lib-ld.m4   2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # lib-ld.m4 serial 6
-dnl Copyright (C) 1996-2003, 2009-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 1996-2003, 2009-2016 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.

Modified: trunk/gnulib/m4/lib-link.m4
===================================================================
--- trunk/gnulib/m4/lib-link.m4 2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/lib-link.m4 2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # lib-link.m4 serial 26 (gettext-0.18.2)
-dnl Copyright (C) 2001-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2016 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.

Modified: trunk/gnulib/m4/lib-prefix.m4
===================================================================
--- trunk/gnulib/m4/lib-prefix.m4       2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/lib-prefix.m4       2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # lib-prefix.m4 serial 7 (gettext-0.18)
-dnl Copyright (C) 2001-2005, 2008-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2005, 2008-2016 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.

Modified: trunk/gnulib/m4/libunistring-base.m4
===================================================================
--- trunk/gnulib/m4/libunistring-base.m4        2016-07-30 19:16:48 UTC (rev 
7284)
+++ trunk/gnulib/m4/libunistring-base.m4        2016-07-30 20:17:19 UTC (rev 
7285)
@@ -1,5 +1,5 @@
 # libunistring-base.m4 serial 5
-dnl Copyright (C) 2010-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2010-2016 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.

Modified: trunk/gnulib/m4/localcharset.m4
===================================================================
--- trunk/gnulib/m4/localcharset.m4     2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/localcharset.m4     2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # localcharset.m4 serial 7
-dnl Copyright (C) 2002, 2004, 2006, 2009-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2004, 2006, 2009-2016 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.

Modified: trunk/gnulib/m4/locale-fr.m4
===================================================================
--- trunk/gnulib/m4/locale-fr.m4        2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/locale-fr.m4        2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # locale-fr.m4 serial 17
-dnl Copyright (C) 2003, 2005-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2005-2016 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.

Modified: trunk/gnulib/m4/locale-ja.m4
===================================================================
--- trunk/gnulib/m4/locale-ja.m4        2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/locale-ja.m4        2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # locale-ja.m4 serial 12
-dnl Copyright (C) 2003, 2005-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2005-2016 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.

Modified: trunk/gnulib/m4/locale-zh.m4
===================================================================
--- trunk/gnulib/m4/locale-zh.m4        2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/locale-zh.m4        2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # locale-zh.m4 serial 12
-dnl Copyright (C) 2003, 2005-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2005-2016 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.

Modified: trunk/gnulib/m4/locale_h.m4
===================================================================
--- trunk/gnulib/m4/locale_h.m4 2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/locale_h.m4 2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # locale_h.m4 serial 19
-dnl Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009-2016 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.

Modified: trunk/gnulib/m4/localeconv.m4
===================================================================
--- trunk/gnulib/m4/localeconv.m4       2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/localeconv.m4       2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # localeconv.m4 serial 1
-dnl Copyright (C) 2012-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2012-2016 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.

Modified: trunk/gnulib/m4/lock.m4
===================================================================
--- trunk/gnulib/m4/lock.m4     2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/lock.m4     2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # lock.m4 serial 13 (gettext-0.18.2)
-dnl Copyright (C) 2005-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2016 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.

Modified: trunk/gnulib/m4/longlong.m4
===================================================================
--- trunk/gnulib/m4/longlong.m4 2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/longlong.m4 2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # longlong.m4 serial 17
-dnl Copyright (C) 1999-2007, 2009-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 1999-2007, 2009-2016 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.

Modified: trunk/gnulib/m4/malloc.m4
===================================================================
--- trunk/gnulib/m4/malloc.m4   2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/malloc.m4   2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,13 +1,13 @@
-# malloc.m4 serial 14
-dnl Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc.
+# malloc.m4 serial 15
+dnl Copyright (C) 2007, 2009-2016 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.
 
 m4_version_prereq([2.70], [] ,[
 
-# This is taken from the following Autoconf patch:
-# 
http://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=7fbb553727ed7e0e689a17594b58559ecf3ea6e9
+# This is adapted with modifications from upstream Autoconf here:
+# 
http://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=04be2b7a29d65d9a08e64e8e56e594c91749598c
 AC_DEFUN([_AC_FUNC_MALLOC_IF],
 [
   AC_REQUIRE([AC_HEADER_STDC])dnl
@@ -23,7 +23,10 @@
             char *malloc ();
             #endif
           ]],
-          [[return ! malloc (0);]])
+          [[char *p = malloc (0);
+            int result = !p;
+            free (p);
+            return result;]])
        ],
        [ac_cv_func_malloc_0_nonnull=yes],
        [ac_cv_func_malloc_0_nonnull=no],

Modified: trunk/gnulib/m4/malloca.m4
===================================================================
--- trunk/gnulib/m4/malloca.m4  2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/malloca.m4  2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # malloca.m4 serial 1
-dnl Copyright (C) 2003-2004, 2006-2007, 2009-2015 Free Software Foundation,
+dnl Copyright (C) 2003-2004, 2006-2007, 2009-2016 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,

Modified: trunk/gnulib/m4/math_h.m4
===================================================================
--- trunk/gnulib/m4/math_h.m4   2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/math_h.m4   2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # math_h.m4 serial 114
-dnl Copyright (C) 2007-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2016 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.

Modified: trunk/gnulib/m4/mbchar.m4
===================================================================
--- trunk/gnulib/m4/mbchar.m4   2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/mbchar.m4   2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # mbchar.m4 serial 9
-dnl Copyright (C) 2005-2007, 2009-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2007, 2009-2016 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.

Modified: trunk/gnulib/m4/mbiter.m4
===================================================================
--- trunk/gnulib/m4/mbiter.m4   2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/mbiter.m4   2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # mbiter.m4 serial 7
-dnl Copyright (C) 2005, 2008-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2008-2016 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.

Modified: trunk/gnulib/m4/mbrtowc.m4
===================================================================
--- trunk/gnulib/m4/mbrtowc.m4  2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/mbrtowc.m4  2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
-# mbrtowc.m4 serial 26  -*- coding: utf-8 -*-
-dnl Copyright (C) 2001-2002, 2004-2005, 2008-2015 Free Software Foundation,
+# mbrtowc.m4 serial 27  -*- coding: utf-8 -*-
+dnl Copyright (C) 2001-2002, 2004-2005, 2008-2016 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -40,6 +40,7 @@
       gl_MBRTOWC_RETVAL
       gl_MBRTOWC_NUL_RETVAL
       gl_MBRTOWC_EMPTY_INPUT
+      gl_MBRTOWC_C_LOCALE
       case "$gl_cv_func_mbrtowc_null_arg1" in
         *yes) ;;
         *) AC_DEFINE([MBRTOWC_NULL_ARG1_BUG], [1],
@@ -76,6 +77,13 @@
            REPLACE_MBRTOWC=1
            ;;
       esac
+      case $gl_cv_C_locale_sans_EILSEQ in
+        *yes) ;;
+        *) AC_DEFINE([C_LOCALE_MAYBE_EILSEQ], [1],
+             [Define to 1 if the C locale may have encoding errors.])
+           REPLACE_MBRTOWC=1
+           ;;
+      esac
     fi
   fi
 ])
@@ -569,7 +577,7 @@
            int
            main (void)
            {
-             return ! mbrtowc (&wc, "", 0, &mbs) == (size_t) -2;
+             return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2;
            }]])],
         [gl_cv_func_mbrtowc_empty_input=yes],
         [gl_cv_func_mbrtowc_empty_input=no],
@@ -577,6 +585,46 @@
     ])
 ])
 
+dnl Test whether mbrtowc reports encoding errors in the C locale.
+dnl Although POSIX was never intended to allow this, the GNU C Library
+dnl and other implementations do it.  See:
+dnl https://sourceware.org/bugzilla/show_bug.cgi?id=19932
+
+AC_DEFUN([gl_MBRTOWC_C_LOCALE],
+[
+  AC_CACHE_CHECK([whether the C locale is free of encoding errors],
+    [gl_cv_C_locale_sans_EILSEQ],
+    [
+     dnl Initial guess, used when cross-compiling or when no suitable locale
+     dnl is present.
+     gl_cv_C_locale_sans_EILSEQ="guessing no"
+
+     AC_RUN_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#include <limits.h>
+            #include <locale.h>
+            #include <wchar.h>
+          ]], [[
+            int i;
+            char *locale = setlocale (LC_ALL, "C");
+            if (! locale)
+              return 1;
+            for (i = CHAR_MIN; i <= CHAR_MAX; i++)
+              {
+                char c = i;
+                wchar_t wc;
+                mbstate_t mbs = { 0, };
+                size_t ss = mbrtowc (&wc, &c, 1, &mbs);
+                if (1 < ss)
+                  return 1;
+              }
+            return 0;
+          ]])],
+      [gl_cv_C_locale_sans_EILSEQ=yes],
+      [gl_cv_C_locale_sans_EILSEQ=no],
+      [:])])
+])
+
 # Prerequisites of lib/mbrtowc.c.
 AC_DEFUN([gl_PREREQ_MBRTOWC], [
   :

Modified: trunk/gnulib/m4/mbsinit.m4
===================================================================
--- trunk/gnulib/m4/mbsinit.m4  2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/mbsinit.m4  2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # mbsinit.m4 serial 8
-dnl Copyright (C) 2008, 2010-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2008, 2010-2016 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.

Modified: trunk/gnulib/m4/mbslen.m4
===================================================================
--- trunk/gnulib/m4/mbslen.m4   2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/mbslen.m4   2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # mbslen.m4 serial 2
-dnl Copyright (C) 2010-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2010-2016 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.

Modified: trunk/gnulib/m4/mbstate_t.m4
===================================================================
--- trunk/gnulib/m4/mbstate_t.m4        2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/mbstate_t.m4        2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # mbstate_t.m4 serial 13
-dnl Copyright (C) 2000-2002, 2008-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2000-2002, 2008-2016 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.

Modified: trunk/gnulib/m4/mbswidth.m4
===================================================================
--- trunk/gnulib/m4/mbswidth.m4 2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/mbswidth.m4 2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # mbswidth.m4 serial 18
-dnl Copyright (C) 2000-2002, 2004, 2006-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2000-2002, 2004, 2006-2016 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.

Modified: trunk/gnulib/m4/mbtowc.m4
===================================================================
--- trunk/gnulib/m4/mbtowc.m4   2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/mbtowc.m4   2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # mbtowc.m4 serial 2
-dnl Copyright (C) 2011-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2016 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.

Modified: trunk/gnulib/m4/memchr.m4
===================================================================
--- trunk/gnulib/m4/memchr.m4   2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/memchr.m4   2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # memchr.m4 serial 12
-dnl Copyright (C) 2002-2004, 2009-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2004, 2009-2016 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.

Modified: trunk/gnulib/m4/mempcpy.m4
===================================================================
--- trunk/gnulib/m4/mempcpy.m4  2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/mempcpy.m4  2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # mempcpy.m4 serial 11
-dnl Copyright (C) 2003-2004, 2006-2007, 2009-2015 Free Software Foundation,
+dnl Copyright (C) 2003-2004, 2006-2007, 2009-2016 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,

Modified: trunk/gnulib/m4/memrchr.m4
===================================================================
--- trunk/gnulib/m4/memrchr.m4  2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/memrchr.m4  2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # memrchr.m4 serial 10
-dnl Copyright (C) 2002-2003, 2005-2007, 2009-2015 Free Software Foundation,
+dnl Copyright (C) 2002-2003, 2005-2007, 2009-2016 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,

Modified: trunk/gnulib/m4/mmap-anon.m4
===================================================================
--- trunk/gnulib/m4/mmap-anon.m4        2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/mmap-anon.m4        2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # mmap-anon.m4 serial 10
-dnl Copyright (C) 2005, 2007, 2009-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2007, 2009-2016 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.

Modified: trunk/gnulib/m4/msvc-inval.m4
===================================================================
--- trunk/gnulib/m4/msvc-inval.m4       2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/msvc-inval.m4       2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # msvc-inval.m4 serial 1
-dnl Copyright (C) 2011-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2016 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.

Modified: trunk/gnulib/m4/msvc-nothrow.m4
===================================================================
--- trunk/gnulib/m4/msvc-nothrow.m4     2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/msvc-nothrow.m4     2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # msvc-nothrow.m4 serial 1
-dnl Copyright (C) 2011-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2016 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.

Modified: trunk/gnulib/m4/multiarch.m4
===================================================================
--- trunk/gnulib/m4/multiarch.m4        2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/multiarch.m4        2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # multiarch.m4 serial 7
-dnl Copyright (C) 2008-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2016 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.

Modified: trunk/gnulib/m4/nl_langinfo.m4
===================================================================
--- trunk/gnulib/m4/nl_langinfo.m4      2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/nl_langinfo.m4      2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # nl_langinfo.m4 serial 5
-dnl Copyright (C) 2009-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2016 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.

Modified: trunk/gnulib/m4/nls.m4
===================================================================
--- trunk/gnulib/m4/nls.m4      2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/nls.m4      2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,17 +1,17 @@
 # nls.m4 serial 5 (gettext-0.18)
-dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014 Free Software Foundation,
-dnl Inc.
+dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014, 2016 Free Software
+dnl 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
-dnl This file can can be used in projects which are not available under
+dnl This file can be used in projects which are not available under
 dnl the GNU General Public License or the GNU Library General Public
 dnl License but which still want to provide support for the GNU gettext
 dnl functionality.
 dnl Please note that the actual code of the GNU gettext library is covered
 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 gettext package is covered by the GNU General Public License.
 dnl They are *not* in the public domain.
 
 dnl Authors:

Modified: trunk/gnulib/m4/nocrash.m4
===================================================================
--- trunk/gnulib/m4/nocrash.m4  2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/nocrash.m4  2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # nocrash.m4 serial 4
-dnl Copyright (C) 2005, 2009-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2009-2016 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.
@@ -110,11 +110,12 @@
 #else
 /* Avoid a crash on POSIX systems.  */
 #include <signal.h>
+#include <unistd.h>
 /* A POSIX signal handler.  */
 static void
 exception_handler (int sig)
 {
-  exit (1);
+  _exit (1);
 }
 static void
 nocrash_init (void)

Modified: trunk/gnulib/m4/off_t.m4
===================================================================
--- trunk/gnulib/m4/off_t.m4    2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/off_t.m4    2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # off_t.m4 serial 1
-dnl Copyright (C) 2012-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2012-2016 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.

Modified: trunk/gnulib/m4/onceonly.m4
===================================================================
--- trunk/gnulib/m4/onceonly.m4 2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/onceonly.m4 2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # onceonly.m4 serial 9
-dnl Copyright (C) 2002-2003, 2005-2006, 2008-2015 Free Software Foundation,
+dnl Copyright (C) 2002-2003, 2005-2006, 2008-2016 Free Software Foundation,
 dnl Inc.
 dnl
 dnl This file is free software; you can redistribute it and/or modify

Modified: trunk/gnulib/m4/po.m4
===================================================================
--- trunk/gnulib/m4/po.m4       2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/po.m4       2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,16 +1,16 @@
 # po.m4 serial 24 (gettext-0.19)
-dnl Copyright (C) 1995-2014 Free Software Foundation, Inc.
+dnl Copyright (C) 1995-2014, 2016 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
-dnl This file can can be used in projects which are not available under
+dnl This file can be used in projects which are not available under
 dnl the GNU General Public License or the GNU Library General Public
 dnl License but which still want to provide support for the GNU gettext
 dnl functionality.
 dnl Please note that the actual code of the GNU gettext library is covered
 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 gettext package is covered by the GNU General Public License.
 dnl They are *not* in the public domain.
 
 dnl Authors:

Modified: trunk/gnulib/m4/printf-posix.m4
===================================================================
--- trunk/gnulib/m4/printf-posix.m4     2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/printf-posix.m4     2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # printf-posix.m4 serial 6 (gettext-0.18.2)
-dnl Copyright (C) 2003, 2007, 2009-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2007, 2009-2016 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.

Modified: trunk/gnulib/m4/printf.m4
===================================================================
--- trunk/gnulib/m4/printf.m4   2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/printf.m4   2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # printf.m4 serial 52
-dnl Copyright (C) 2003, 2007-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2007-2016 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.

Modified: trunk/gnulib/m4/progtest.m4
===================================================================
--- trunk/gnulib/m4/progtest.m4 2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/progtest.m4 2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # progtest.m4 serial 7 (gettext-0.18.2)
-dnl Copyright (C) 1996-2003, 2005, 2008-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 1996-2003, 2005, 2008-2016 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.

Modified: trunk/gnulib/m4/regex.m4
===================================================================
--- trunk/gnulib/m4/regex.m4    2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/regex.m4    2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,6 +1,6 @@
-# serial 65
+# serial 66
 
-# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc.
+# Copyright (C) 1996-2001, 2003-2016 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -93,6 +93,7 @@
                                       0, sizeof data - 1, &regs)
                            != -1)
                     result |= 1;
+                  regfree (&regex);
                 }
 
                 {
@@ -124,6 +125,7 @@
                       if (i != 0 && i != 21)
                         result |= 1;
                     }
+                  regfree (&regex);
                 }
 
                 if (! setlocale (LC_ALL, "C"))

Modified: trunk/gnulib/m4/size_max.m4
===================================================================
--- trunk/gnulib/m4/size_max.m4 2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/size_max.m4 2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # size_max.m4 serial 10
-dnl Copyright (C) 2003, 2005-2006, 2008-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2005-2006, 2008-2016 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.

Modified: trunk/gnulib/m4/ssize_t.m4
===================================================================
--- trunk/gnulib/m4/ssize_t.m4  2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/ssize_t.m4  2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # ssize_t.m4 serial 5 (gettext-0.18.2)
-dnl Copyright (C) 2001-2003, 2006, 2010-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2003, 2006, 2010-2016 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.

Modified: trunk/gnulib/m4/stdarg.m4
===================================================================
--- trunk/gnulib/m4/stdarg.m4   2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/stdarg.m4   2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # stdarg.m4 serial 6
-dnl Copyright (C) 2006, 2008-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2008-2016 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.

Modified: trunk/gnulib/m4/stdbool.m4
===================================================================
--- trunk/gnulib/m4/stdbool.m4  2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/stdbool.m4  2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,11 +1,11 @@
 # Check for stdbool.h that conforms to C99.
 
-dnl Copyright (C) 2002-2006, 2009-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2009-2016 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.
 
-#serial 5
+#serial 6
 
 # Prepare for substituting <stdbool.h> if it is not supported.
 
@@ -43,21 +43,25 @@
         [AC_LANG_PROGRAM(
            [[
              #include <stdbool.h>
-             #ifndef bool
-              "error: bool is not defined"
+
+             #if __cplusplus < 201103
+              #ifndef bool
+               "error: bool is not defined"
+              #endif
+              #ifndef false
+               "error: false is not defined"
+              #endif
+              #if false
+               "error: false is not 0"
+              #endif
+              #ifndef true
+               "error: true is not defined"
+              #endif
+              #if true != 1
+               "error: true is not 1"
+              #endif
              #endif
-             #ifndef false
-              "error: false is not defined"
-             #endif
-             #if false
-              "error: false is not 0"
-             #endif
-             #ifndef true
-              "error: true is not defined"
-             #endif
-             #if true != 1
-              "error: true is not 1"
-             #endif
+
              #ifndef __bool_true_false_are_defined
               "error: __bool_true_false_are_defined is not defined"
              #endif

Modified: trunk/gnulib/m4/stddef_h.m4
===================================================================
--- trunk/gnulib/m4/stddef_h.m4 2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/stddef_h.m4 2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,6 +1,6 @@
 dnl A placeholder for <stddef.h>, for platforms that have issues.
 # stddef_h.m4 serial 5
-dnl Copyright (C) 2009-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2016 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.

Modified: trunk/gnulib/m4/stdint.m4
===================================================================
--- trunk/gnulib/m4/stdint.m4   2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/stdint.m4   2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
-# stdint.m4 serial 43
-dnl Copyright (C) 2001-2015 Free Software Foundation, Inc.
+# stdint.m4 serial 44
+dnl Copyright (C) 2001-2016 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.
@@ -70,6 +70,8 @@
        AC_COMPILE_IFELSE([
          AC_LANG_PROGRAM([[
 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
+#define __STDC_CONSTANT_MACROS 1
+#define __STDC_LIMIT_MACROS 1
 #include <stdint.h>
 /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>.  */
 #if !(defined WCHAR_MIN && defined WCHAR_MAX)
@@ -218,6 +220,8 @@
           AC_RUN_IFELSE([
             AC_LANG_PROGRAM([[
 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
+#define __STDC_CONSTANT_MACROS 1
+#define __STDC_LIMIT_MACROS 1
 #include <stdint.h>
 ]
 gl_STDINT_INCLUDES
@@ -279,6 +283,29 @@
       ])
   fi
   if test "$gl_cv_header_working_stdint_h" = yes; then
+    dnl Now see whether the system <stdint.h> works without
+    dnl __STDC_CONSTANT_MACROS/__STDC_LIMIT_MACROS defined.
+    AC_CACHE_CHECK([whether stdint.h predates C++11],
+      [gl_cv_header_stdint_predates_cxx11_h],
+      [gl_cv_header_stdint_predates_cxx11_h=yes
+       AC_COMPILE_IFELSE([
+        AC_LANG_PROGRAM([[
+#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
+#include <stdint.h>
+]
+gl_STDINT_INCLUDES
+[
+intmax_t im = INTMAX_MAX;
+int32_t i32 = INT32_C (0x7fffffff);
+         ]])],
+         [gl_cv_header_stdint_predates_cxx11_h=no])])
+
+    if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then
+      AC_DEFINE([__STDC_CONSTANT_MACROS], [1],
+                [Define to 1 if the system <stdint.h> predates C++11.])
+      AC_DEFINE([__STDC_LIMIT_MACROS], [1],
+                [Define to 1 if the system <stdint.h> predates C++11.])
+    fi
     STDINT_H=
   else
     dnl Check for <sys/inttypes.h>, and for

Modified: trunk/gnulib/m4/stdint_h.m4
===================================================================
--- trunk/gnulib/m4/stdint_h.m4 2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/stdint_h.m4 2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # stdint_h.m4 serial 9
-dnl Copyright (C) 1997-2004, 2006, 2008-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 1997-2004, 2006, 2008-2016 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.

Modified: trunk/gnulib/m4/stdio_h.m4
===================================================================
--- trunk/gnulib/m4/stdio_h.m4  2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/stdio_h.m4  2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # stdio_h.m4 serial 46
-dnl Copyright (C) 2007-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2016 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.

Modified: trunk/gnulib/m4/stdlib_h.m4
===================================================================
--- trunk/gnulib/m4/stdlib_h.m4 2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/stdlib_h.m4 2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # stdlib_h.m4 serial 42
-dnl Copyright (C) 2007-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2016 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.

Modified: trunk/gnulib/m4/stpcpy.m4
===================================================================
--- trunk/gnulib/m4/stpcpy.m4   2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/stpcpy.m4   2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # stpcpy.m4 serial 8
-dnl Copyright (C) 2002, 2007, 2009-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2007, 2009-2016 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.

Modified: trunk/gnulib/m4/strcase.m4
===================================================================
--- trunk/gnulib/m4/strcase.m4  2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/strcase.m4  2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # strcase.m4 serial 11
-dnl Copyright (C) 2002, 2005-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2005-2016 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.

Modified: trunk/gnulib/m4/strcasestr.m4
===================================================================
--- trunk/gnulib/m4/strcasestr.m4       2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/strcasestr.m4       2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # strcasestr.m4 serial 21
-dnl Copyright (C) 2005, 2007-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2007-2016 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.
@@ -80,7 +80,7 @@
 #include <string.h> /* for strcasestr */
 #include <stdlib.h> /* for malloc */
 #include <unistd.h> /* for alarm */
-static void quit (int sig) { exit (sig + 128); }
+static void quit (int sig) { _exit (sig + 128); }
 ]], [[
     int result = 0;
     size_t m = 1000000;

Modified: trunk/gnulib/m4/strdup.m4
===================================================================
--- trunk/gnulib/m4/strdup.m4   2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/strdup.m4   2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,6 +1,6 @@
 # strdup.m4 serial 13
 
-dnl Copyright (C) 2002-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2016 Free Software Foundation, Inc.
 
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,

Modified: trunk/gnulib/m4/strerror.m4
===================================================================
--- trunk/gnulib/m4/strerror.m4 2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/strerror.m4 2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # strerror.m4 serial 17
-dnl Copyright (C) 2002, 2007-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2007-2016 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.

Modified: trunk/gnulib/m4/string_h.m4
===================================================================
--- trunk/gnulib/m4/string_h.m4 2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/string_h.m4 2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,6 +1,6 @@
 # Configure a GNU-like replacement for <string.h>.
 
-# Copyright (C) 2007-2015 Free Software Foundation, Inc.
+# Copyright (C) 2007-2016 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.

Modified: trunk/gnulib/m4/strings_h.m4
===================================================================
--- trunk/gnulib/m4/strings_h.m4        2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/strings_h.m4        2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,7 +1,7 @@
 # Configure a replacement for <strings.h>.
 # serial 6
 
-# Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2009-2016 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.

Modified: trunk/gnulib/m4/strndup.m4
===================================================================
--- trunk/gnulib/m4/strndup.m4  2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/strndup.m4  2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
-# strndup.m4 serial 21
-dnl Copyright (C) 2002-2003, 2005-2015 Free Software Foundation, Inc.
+# strndup.m4 serial 22
+dnl Copyright (C) 2002-2003, 2005-2016 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.
@@ -31,11 +31,14 @@
   #endif
   char *strndup (const char *, size_t);
 #endif
+  int result;
   char *s;
   s = strndup ("some longer string", 15);
   free (s);
   s = strndup ("shorter string", 13);
-  return s[13] != '\0';]])],
+  result = s[13] != '\0';
+  free (s);
+  return result;]])],
          [gl_cv_func_strndup_works=yes],
          [gl_cv_func_strndup_works=no],
          [

Modified: trunk/gnulib/m4/strnlen.m4
===================================================================
--- trunk/gnulib/m4/strnlen.m4  2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/strnlen.m4  2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # strnlen.m4 serial 13
-dnl Copyright (C) 2002-2003, 2005-2007, 2009-2015 Free Software Foundation,
+dnl Copyright (C) 2002-2003, 2005-2007, 2009-2016 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,

Modified: trunk/gnulib/m4/strstr.m4
===================================================================
--- trunk/gnulib/m4/strstr.m4   2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/strstr.m4   2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # strstr.m4 serial 16
-dnl Copyright (C) 2008-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2016 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.
@@ -71,7 +71,7 @@
 #include <string.h> /* for strstr */
 #include <stdlib.h> /* for malloc */
 #include <unistd.h> /* for alarm */
-static void quit (int sig) { exit (sig + 128); }
+static void quit (int sig) { _exit (sig + 128); }
 ]], [[
     int result = 0;
     size_t m = 1000000;

Modified: trunk/gnulib/m4/sys_socket_h.m4
===================================================================
--- trunk/gnulib/m4/sys_socket_h.m4     2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/sys_socket_h.m4     2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # sys_socket_h.m4 serial 23
-dnl Copyright (C) 2005-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2016 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.

Modified: trunk/gnulib/m4/sys_types_h.m4
===================================================================
--- trunk/gnulib/m4/sys_types_h.m4      2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/sys_types_h.m4      2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # sys_types_h.m4 serial 5
-dnl Copyright (C) 2011-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2016 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.

Modified: trunk/gnulib/m4/threadlib.m4
===================================================================
--- trunk/gnulib/m4/threadlib.m4        2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/threadlib.m4        2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # threadlib.m4 serial 11 (gettext-0.18.2)
-dnl Copyright (C) 2005-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2016 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.

Modified: trunk/gnulib/m4/uintmax_t.m4
===================================================================
--- trunk/gnulib/m4/uintmax_t.m4        2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/uintmax_t.m4        2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # uintmax_t.m4 serial 12
-dnl Copyright (C) 1997-2004, 2007-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 1997-2004, 2007-2016 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.

Modified: trunk/gnulib/m4/unistd_h.m4
===================================================================
--- trunk/gnulib/m4/unistd_h.m4 2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/unistd_h.m4 2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # unistd_h.m4 serial 68
-dnl Copyright (C) 2006-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2016 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.

Modified: trunk/gnulib/m4/vasnprintf.m4
===================================================================
--- trunk/gnulib/m4/vasnprintf.m4       2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/vasnprintf.m4       2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # vasnprintf.m4 serial 36
-dnl Copyright (C) 2002-2004, 2006-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2004, 2006-2016 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.

Modified: trunk/gnulib/m4/vasprintf.m4
===================================================================
--- trunk/gnulib/m4/vasprintf.m4        2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/vasprintf.m4        2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # vasprintf.m4 serial 6
-dnl Copyright (C) 2002-2003, 2006-2007, 2009-2015 Free Software Foundation,
+dnl Copyright (C) 2002-2003, 2006-2007, 2009-2016 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,

Modified: trunk/gnulib/m4/visibility.m4
===================================================================
--- trunk/gnulib/m4/visibility.m4       2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/visibility.m4       2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # visibility.m4 serial 5 (gettext-0.18.2)
-dnl Copyright (C) 2005, 2008, 2010-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2008, 2010-2016 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.

Modified: trunk/gnulib/m4/warn-on-use.m4
===================================================================
--- trunk/gnulib/m4/warn-on-use.m4      2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/warn-on-use.m4      2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # warn-on-use.m4 serial 5
-dnl Copyright (C) 2010-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2010-2016 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.

Modified: trunk/gnulib/m4/wchar_h.m4
===================================================================
--- trunk/gnulib/m4/wchar_h.m4  2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/wchar_h.m4  2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,6 +1,6 @@
 dnl A placeholder for ISO C99 <wchar.h>, for platforms that have issues.
 
-dnl Copyright (C) 2007-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2016 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.

Modified: trunk/gnulib/m4/wchar_t.m4
===================================================================
--- trunk/gnulib/m4/wchar_t.m4  2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/wchar_t.m4  2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # wchar_t.m4 serial 4 (gettext-0.18.2)
-dnl Copyright (C) 2002-2003, 2008-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2003, 2008-2016 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.

Modified: trunk/gnulib/m4/wcrtomb.m4
===================================================================
--- trunk/gnulib/m4/wcrtomb.m4  2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/wcrtomb.m4  2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # wcrtomb.m4 serial 11
-dnl Copyright (C) 2008-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2016 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.

Modified: trunk/gnulib/m4/wctype_h.m4
===================================================================
--- trunk/gnulib/m4/wctype_h.m4 2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/wctype_h.m4 2016-07-30 20:17:19 UTC (rev 7285)
@@ -2,7 +2,7 @@
 
 dnl A placeholder for ISO C99 <wctype.h>, for platforms that lack it.
 
-dnl Copyright (C) 2006-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2016 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.

Modified: trunk/gnulib/m4/wcwidth.m4
===================================================================
--- trunk/gnulib/m4/wcwidth.m4  2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/wcwidth.m4  2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # wcwidth.m4 serial 23
-dnl Copyright (C) 2006-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2016 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.
@@ -39,6 +39,7 @@
     dnl On Mac OS X 10.3, wcwidth(0x0301) (COMBINING ACUTE ACCENT) returns 1.
     dnl On OpenBSD 5.0, wcwidth(0x05B0) (HEBREW POINT SHEVA) returns 1.
     dnl On OSF/1 5.1, wcwidth(0x200B) (ZERO WIDTH SPACE) returns 1.
+    dnl On OpenBSD 5.8, wcwidth(0xFF1A) (FULLWIDTH COLON) returns 0.
     dnl This leads to bugs in 'ls' (coreutils).
     AC_CACHE_CHECK([whether wcwidth works reasonably in UTF-8 locales],
       [gl_cv_func_wcwidth_works],
@@ -74,6 +75,8 @@
         result |= 2;
       if (wcwidth (0x200B) > 0)
         result |= 4;
+      if (wcwidth (0xFF1A) == 0)
+        result |= 8;
     }
   return result;
 }]])],

Modified: trunk/gnulib/m4/wint_t.m4
===================================================================
--- trunk/gnulib/m4/wint_t.m4   2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/wint_t.m4   2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # wint_t.m4 serial 5 (gettext-0.18.2)
-dnl Copyright (C) 2003, 2007-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2007-2016 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.

Modified: trunk/gnulib/m4/xalloc.m4
===================================================================
--- trunk/gnulib/m4/xalloc.m4   2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/xalloc.m4   2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # xalloc.m4 serial 18
-dnl Copyright (C) 2002-2006, 2009-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2009-2016 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.

Modified: trunk/gnulib/m4/xsize.m4
===================================================================
--- trunk/gnulib/m4/xsize.m4    2016-07-30 19:16:48 UTC (rev 7284)
+++ trunk/gnulib/m4/xsize.m4    2016-07-30 20:17:19 UTC (rev 7285)
@@ -1,5 +1,5 @@
 # xsize.m4 serial 5
-dnl Copyright (C) 2003-2004, 2008-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2003-2004, 2008-2016 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.




reply via email to

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