summaryrefslogtreecommitdiff
path: root/gl
diff options
context:
space:
mode:
Diffstat (limited to 'gl')
-rw-r--r--gl/Makefile.am35
-rw-r--r--gl/errno.in.h2
-rw-r--r--gl/fstat.c2
-rw-r--r--gl/ftell.c2
-rw-r--r--gl/ftello.c2
-rw-r--r--gl/getopt.c2
-rw-r--r--gl/getopt.in.h24
-rw-r--r--gl/getopt1.c2
-rw-r--r--gl/getopt_int.h2
-rw-r--r--gl/gettext.h2
-rw-r--r--gl/gettime.c2
-rw-r--r--gl/gettimeofday.c2
-rw-r--r--gl/limits.in.h63
-rw-r--r--gl/lseek.c2
-rw-r--r--gl/m4/00gnulib.m42
-rw-r--r--gl/m4/absolute-header.m42
-rw-r--r--gl/m4/autobuild.m42
-rw-r--r--gl/m4/clock_time.m42
-rw-r--r--gl/m4/errno_h.m42
-rw-r--r--gl/m4/extensions.m446
-rw-r--r--gl/m4/extern-inline.m42
-rw-r--r--gl/m4/fseeko.m42
-rw-r--r--gl/m4/fstat.m42
-rw-r--r--gl/m4/ftell.m42
-rw-r--r--gl/m4/ftello.m42
-rw-r--r--gl/m4/getopt.m42
-rw-r--r--gl/m4/gettime.m42
-rw-r--r--gl/m4/gettimeofday.m42
-rw-r--r--gl/m4/gnulib-cache.m42
-rw-r--r--gl/m4/gnulib-common.m42
-rw-r--r--gl/m4/gnulib-comp.m48
-rw-r--r--gl/m4/gnulib-tool.m42
-rw-r--r--gl/m4/include_next.m42
-rw-r--r--gl/m4/largefile.m42
-rw-r--r--gl/m4/limits-h.m431
-rw-r--r--gl/m4/longlong.m42
-rw-r--r--gl/m4/lseek.m42
-rw-r--r--gl/m4/malloc.m42
-rw-r--r--gl/m4/manywarnings.m46
-rw-r--r--gl/m4/msvc-inval.m42
-rw-r--r--gl/m4/msvc-nothrow.m42
-rw-r--r--gl/m4/multiarch.m42
-rw-r--r--gl/m4/nocrash.m42
-rw-r--r--gl/m4/off_t.m42
-rw-r--r--gl/m4/read-file.m42
-rw-r--r--gl/m4/realloc.m42
-rw-r--r--gl/m4/ssize_t.m42
-rw-r--r--gl/m4/stdarg.m42
-rw-r--r--gl/m4/stddef_h.m42
-rw-r--r--gl/m4/stdint.m466
-rw-r--r--gl/m4/stdio_h.m414
-rw-r--r--gl/m4/stdlib_h.m47
-rw-r--r--gl/m4/sys_socket_h.m42
-rw-r--r--gl/m4/sys_stat_h.m42
-rw-r--r--gl/m4/sys_time_h.m42
-rw-r--r--gl/m4/sys_types_h.m429
-rw-r--r--gl/m4/time_h.m42
-rw-r--r--gl/m4/timespec.m42
-rw-r--r--gl/m4/unistd_h.m45
-rw-r--r--gl/m4/valgrind-tests.m44
-rw-r--r--gl/m4/version-etc.m42
-rw-r--r--gl/m4/warn-on-use.m42
-rw-r--r--gl/m4/warnings.m42
-rw-r--r--gl/m4/wchar_t.m42
-rw-r--r--gl/m4/wint_t.m462
-rw-r--r--gl/malloc.c2
-rw-r--r--gl/msvc-inval.c2
-rw-r--r--gl/msvc-inval.h2
-rw-r--r--gl/msvc-nothrow.c2
-rw-r--r--gl/msvc-nothrow.h2
-rw-r--r--gl/progname.c2
-rw-r--r--gl/progname.h2
-rw-r--r--gl/read-file.c2
-rw-r--r--gl/read-file.h2
-rw-r--r--gl/realloc.c2
-rw-r--r--gl/stdarg.in.h2
-rw-r--r--gl/stddef.in.h2
-rw-r--r--gl/stdint.in.h758
-rw-r--r--gl/stdio-impl.h33
-rw-r--r--gl/stdio.in.h22
-rw-r--r--gl/stdlib.in.h17
-rw-r--r--gl/sys_stat.in.h2
-rw-r--r--gl/sys_time.in.h9
-rw-r--r--gl/sys_types.in.h2
-rw-r--r--gl/time.in.h4
-rw-r--r--gl/timespec.h8
-rw-r--r--gl/unistd.in.h8
-rw-r--r--gl/version-etc-fsf.c2
-rw-r--r--gl/version-etc.c4
-rw-r--r--gl/version-etc.h2
90 files changed, 916 insertions, 481 deletions
diff --git a/gl/Makefile.am b/gl/Makefile.am
index 518470b..b72df89 100644
--- a/gl/Makefile.am
+++ b/gl/Makefile.am
@@ -1,6 +1,6 @@
## DO NOT EDIT! GENERATED AUTOMATICALLY!
## Process this file with automake to produce Makefile.in.
-# Copyright (C) 2002-2016 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -195,6 +195,34 @@ EXTRA_DIST += $(top_srcdir)/build-aux/gnupload
## end gnulib module gnupload
+## begin gnulib module limits-h
+
+BUILT_SOURCES += $(LIMITS_H)
+
+# We need the following in order to create <limits.h> when the system
+# doesn't have one that is compatible with GNU.
+if GL_GENERATE_LIMITS_H
+limits.h: limits.in.h $(top_builddir)/config.status
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+ sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+ -e 's|@''NEXT_LIMITS_H''@|$(NEXT_LIMITS_H)|g' \
+ < $(srcdir)/limits.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+else
+limits.h: $(top_builddir)/config.status
+ rm -f $@
+endif
+MOSTLYCLEANFILES += limits.h limits.h-t
+
+EXTRA_DIST += limits.in.h
+
+## end gnulib module limits-h
+
## begin gnulib module lseek
@@ -423,6 +451,7 @@ stdint.h: stdint.in.h $(top_builddir)/config.status
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_STDINT_H''@|$(NEXT_STDINT_H)|g' \
+ -e 's/@''HAVE_C99_STDINT_H''@/$(HAVE_C99_STDINT_H)/g' \
-e 's/@''HAVE_SYS_TYPES_H''@/$(HAVE_SYS_TYPES_H)/g' \
-e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \
-e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \
@@ -444,6 +473,7 @@ stdint.h: stdint.in.h $(top_builddir)/config.status
-e 's/@''BITSIZEOF_WINT_T''@/$(BITSIZEOF_WINT_T)/g' \
-e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \
-e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \
+ -e 's/@''GNULIB_OVERRIDES_WINT_T''@/$(GNULIB_OVERRIDES_WINT_T)/g' \
< $(srcdir)/stdint.in.h; \
} > $@-t && \
mv $@-t $@
@@ -648,6 +678,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
-e 's|@''HAVE_POSIX_OPENPT''@|$(HAVE_POSIX_OPENPT)|g' \
-e 's|@''HAVE_PTSNAME''@|$(HAVE_PTSNAME)|g' \
-e 's|@''HAVE_PTSNAME_R''@|$(HAVE_PTSNAME_R)|g' \
+ -e 's|@''HAVE_QSORT_R''@|$(HAVE_QSORT_R)|g' \
-e 's|@''HAVE_RANDOM''@|$(HAVE_RANDOM)|g' \
-e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \
-e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \
@@ -947,7 +978,6 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e 's|@''HAVE_GETDTABLESIZE''@|$(HAVE_GETDTABLESIZE)|g' \
-e 's|@''HAVE_GETGROUPS''@|$(HAVE_GETGROUPS)|g' \
-e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \
- -e 's|@''HAVE_GETLOGIN''@|$(HAVE_GETLOGIN)|g' \
-e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \
-e 's|@''HAVE_GROUP_MEMBER''@|$(HAVE_GROUP_MEMBER)|g' \
-e 's|@''HAVE_LCHOWN''@|$(HAVE_LCHOWN)|g' \
@@ -969,6 +999,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e 's|@''HAVE_DECL_FCHDIR''@|$(HAVE_DECL_FCHDIR)|g' \
-e 's|@''HAVE_DECL_FDATASYNC''@|$(HAVE_DECL_FDATASYNC)|g' \
-e 's|@''HAVE_DECL_GETDOMAINNAME''@|$(HAVE_DECL_GETDOMAINNAME)|g' \
+ -e 's|@''HAVE_DECL_GETLOGIN''@|$(HAVE_DECL_GETLOGIN)|g' \
-e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \
-e 's|@''HAVE_DECL_GETPAGESIZE''@|$(HAVE_DECL_GETPAGESIZE)|g' \
-e 's|@''HAVE_DECL_GETUSERSHELL''@|$(HAVE_DECL_GETUSERSHELL)|g' \
diff --git a/gl/errno.in.h b/gl/errno.in.h
index b8397ee..13194f9 100644
--- a/gl/errno.in.h
+++ b/gl/errno.in.h
@@ -1,6 +1,6 @@
/* A POSIX-like <errno.h>.
- Copyright (C) 2008-2016 Free Software Foundation, Inc.
+ Copyright (C) 2008-2017 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
diff --git a/gl/fstat.c b/gl/fstat.c
index 435c429..a5aabc5 100644
--- a/gl/fstat.c
+++ b/gl/fstat.c
@@ -1,5 +1,5 @@
/* fstat() replacement.
- Copyright (C) 2011-2016 Free Software Foundation, Inc.
+ Copyright (C) 2011-2017 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
diff --git a/gl/ftell.c b/gl/ftell.c
index 75ed1b2..a5c9489 100644
--- a/gl/ftell.c
+++ b/gl/ftell.c
@@ -1,5 +1,5 @@
/* An ftell() function that works around platform bugs.
- Copyright (C) 2007-2016 Free Software Foundation, Inc.
+ Copyright (C) 2007-2017 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
diff --git a/gl/ftello.c b/gl/ftello.c
index 4c18ed1..298255a 100644
--- a/gl/ftello.c
+++ b/gl/ftello.c
@@ -1,5 +1,5 @@
/* An ftello() function that works around platform bugs.
- Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2017 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
diff --git a/gl/getopt.c b/gl/getopt.c
index 8ccb901..e40ea8d 100644
--- a/gl/getopt.c
+++ b/gl/getopt.c
@@ -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 drepper@gnu.org
before changing it!
- Copyright (C) 1987-1996, 1998-2004, 2006, 2008-2016 Free Software
+ Copyright (C) 1987-1996, 1998-2004, 2006, 2008-2017 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/gl/getopt.in.h b/gl/getopt.in.h
index 0f72182..6cbad8e 100644
--- a/gl/getopt.in.h
+++ b/gl/getopt.in.h
@@ -1,5 +1,5 @@
/* Declarations for getopt.
- Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2007, 2009-2016 Free Software
+ Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2007, 2009-2017 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
@@ -47,15 +47,20 @@
identifiers so that they do not collide with the system functions
and variables. Renaming avoids problems with some compilers and
linkers. */
-#if defined __GETOPT_PREFIX && !defined __need_getopt
-# if !@HAVE_GETOPT_H@
-# define __need_system_stdlib_h
-# include <stdlib.h>
-# undef __need_system_stdlib_h
-# include <stdio.h>
-# include <unistd.h>
+#if defined __GETOPT_PREFIX
+# if !defined __need_getopt
+# if !@HAVE_GETOPT_H@
+# define __need_system_stdlib_h
+# include <stdlib.h>
+# undef __need_system_stdlib_h
+# include <stdio.h>
+# include <unistd.h>
+# endif
+# undef __need_getopt
# endif
-# undef __need_getopt
+# undef __GETOPT_CONCAT
+# undef __GETOPT_XCONCAT
+# undef __GETOPT_ID
# undef getopt
# undef getopt_long
# undef getopt_long_only
@@ -64,6 +69,7 @@
# undef optind
# undef optopt
# undef option
+# undef _getopt_internal
# define __GETOPT_CONCAT(x, y) x ## y
# define __GETOPT_XCONCAT(x, y) __GETOPT_CONCAT (x, y)
# define __GETOPT_ID(y) __GETOPT_XCONCAT (__GETOPT_PREFIX, y)
diff --git a/gl/getopt1.c b/gl/getopt1.c
index 63db74f..4d2e8cb 100644
--- a/gl/getopt1.c
+++ b/gl/getopt1.c
@@ -1,5 +1,5 @@
/* getopt_long and getopt_long_only entry points for GNU getopt.
- Copyright (C) 1987-1994, 1996-1998, 2004, 2006, 2009-2016 Free Software
+ Copyright (C) 1987-1994, 1996-1998, 2004, 2006, 2009-2017 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/gl/getopt_int.h b/gl/getopt_int.h
index be4c22e..a7ce0e9 100644
--- a/gl/getopt_int.h
+++ b/gl/getopt_int.h
@@ -1,5 +1,5 @@
/* Internal declarations for getopt.
- Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2004, 2009-2016 Free Software
+ Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2004, 2009-2017 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/gl/gettext.h b/gl/gettext.h
index 9a232cc..0465d7a 100644
--- a/gl/gettext.h
+++ b/gl/gettext.h
@@ -1,5 +1,5 @@
/* Convenience header for conditional use of GNU <libintl.h>.
- Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2016 Free Software
+ Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2017 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
diff --git a/gl/gettime.c b/gl/gettime.c
index ea58eb0..4ae313e 100644
--- a/gl/gettime.c
+++ b/gl/gettime.c
@@ -1,6 +1,6 @@
/* gettime -- get the system clock
- Copyright (C) 2002, 2004-2007, 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004-2007, 2009-2017 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
diff --git a/gl/gettimeofday.c b/gl/gettimeofday.c
index 224ca6a..18dcbda 100644
--- a/gl/gettimeofday.c
+++ b/gl/gettimeofday.c
@@ -1,6 +1,6 @@
/* Provide gettimeofday for systems that don't have it or for which it's broken.
- Copyright (C) 2001-2003, 2005-2007, 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2005-2007, 2009-2017 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
diff --git a/gl/limits.in.h b/gl/limits.in.h
new file mode 100644
index 0000000..a7e307f
--- /dev/null
+++ b/gl/limits.in.h
@@ -0,0 +1,63 @@
+/* A GNU-like <limits.h>.
+
+ Copyright 2016-2017 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, 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 _@GUARD_PREFIX@_LIMITS_H
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+@PRAGMA_COLUMNS@
+
+/* The include_next requires a split double-inclusion guard. */
+#@INCLUDE_NEXT@ @NEXT_LIMITS_H@
+
+#ifndef _@GUARD_PREFIX@_LIMITS_H
+#define _@GUARD_PREFIX@_LIMITS_H
+
+/* The number of usable bits in an unsigned or signed integer type
+ with minimum value MIN and maximum value MAX, as an int expression
+ suitable in #if. Cover all known practical hosts. This
+ implementation exploits the fact that MAX is 1 less than a power of
+ 2, and merely counts the number of 1 bits in MAX; "COBn" means
+ "count the number of 1 bits in the low-order n bits"). */
+#define _GL_INTEGER_WIDTH(min, max) (((min) < 0) + _GL_COB128 (max))
+#define _GL_COB128(n) (_GL_COB64 ((n) >> 31 >> 31 >> 2) + _GL_COB64 (n))
+#define _GL_COB64(n) (_GL_COB32 ((n) >> 31 >> 1) + _GL_COB32 (n))
+#define _GL_COB32(n) (_GL_COB16 ((n) >> 16) + _GL_COB16 (n))
+#define _GL_COB16(n) (_GL_COB8 ((n) >> 8) + _GL_COB8 (n))
+#define _GL_COB8(n) (_GL_COB4 ((n) >> 4) + _GL_COB4 (n))
+#define _GL_COB4(n) (!!((n) & 8) + !!((n) & 4) + !!((n) & 2) + !!((n) & 1))
+
+/* Macros specified by ISO/IEC TS 18661-1:2014. */
+
+#if (! defined ULLONG_WIDTH \
+ && (defined _GNU_SOURCE || defined __STDC_WANT_IEC_60559_BFP_EXT__))
+# define CHAR_WIDTH _GL_INTEGER_WIDTH (CHAR_MIN, CHAR_MAX)
+# define SCHAR_WIDTH _GL_INTEGER_WIDTH (SCHAR_MIN, SCHAR_MAX)
+# define UCHAR_WIDTH _GL_INTEGER_WIDTH (0, UCHAR_MAX)
+# define SHRT_WIDTH _GL_INTEGER_WIDTH (SHRT_MIN, SHRT_MAX)
+# define USHRT_WIDTH _GL_INTEGER_WIDTH (0, USHRT_MAX)
+# define INT_WIDTH _GL_INTEGER_WIDTH (INT_MIN, INT_MAX)
+# define UINT_WIDTH _GL_INTEGER_WIDTH (0, UINT_MAX)
+# define LONG_WIDTH _GL_INTEGER_WIDTH (LONG_MIN, LONG_MAX)
+# define ULONG_WIDTH _GL_INTEGER_WIDTH (0, ULONG_MAX)
+# define LLONG_WIDTH _GL_INTEGER_WIDTH (LLONG_MIN, LLONG_MAX)
+# define ULLONG_WIDTH _GL_INTEGER_WIDTH (0, ULLONG_MAX)
+#endif /* !ULLONG_WIDTH && (_GNU_SOURCE || __STDC_WANT_IEC_60559_BFP_EXT__) */
+
+#endif /* _@GUARD_PREFIX@_LIMITS_H */
+#endif /* _@GUARD_PREFIX@_LIMITS_H */
diff --git a/gl/lseek.c b/gl/lseek.c
index 2a95a07..3b2fdf2 100644
--- a/gl/lseek.c
+++ b/gl/lseek.c
@@ -1,5 +1,5 @@
/* An lseek() function that detects pipes.
- Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2017 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
diff --git a/gl/m4/00gnulib.m4 b/gl/m4/00gnulib.m4
index bb37e32..bb3512f 100644
--- a/gl/m4/00gnulib.m4
+++ b/gl/m4/00gnulib.m4
@@ -1,5 +1,5 @@
# 00gnulib.m4 serial 3
-dnl Copyright (C) 2009-2016 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2017 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.
diff --git a/gl/m4/absolute-header.m4 b/gl/m4/absolute-header.m4
index 7ffc38d..c73adc8 100644
--- a/gl/m4/absolute-header.m4
+++ b/gl/m4/absolute-header.m4
@@ -1,5 +1,5 @@
# absolute-header.m4 serial 16
-dnl Copyright (C) 2006-2016 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2017 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.
diff --git a/gl/m4/autobuild.m4 b/gl/m4/autobuild.m4
index 66b183b..f5f2a18 100644
--- a/gl/m4/autobuild.m4
+++ b/gl/m4/autobuild.m4
@@ -1,5 +1,5 @@
# autobuild.m4 serial 7
-dnl Copyright (C) 2004, 2006-2016 Free Software Foundation, Inc.
+dnl Copyright (C) 2004, 2006-2017 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.
diff --git a/gl/m4/clock_time.m4 b/gl/m4/clock_time.m4
index bb20344..21b6f25 100644
--- a/gl/m4/clock_time.m4
+++ b/gl/m4/clock_time.m4
@@ -1,5 +1,5 @@
# clock_time.m4 serial 10
-dnl Copyright (C) 2002-2006, 2009-2016 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2009-2017 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.
diff --git a/gl/m4/errno_h.m4 b/gl/m4/errno_h.m4
index b111fce..9f0f2f2 100644
--- a/gl/m4/errno_h.m4
+++ b/gl/m4/errno_h.m4
@@ -1,5 +1,5 @@
# errno_h.m4 serial 12
-dnl Copyright (C) 2004, 2006, 2008-2016 Free Software Foundation, Inc.
+dnl Copyright (C) 2004, 2006, 2008-2017 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.
diff --git a/gl/m4/extensions.m4 b/gl/m4/extensions.m4
index 6d378ec..c60f537 100644
--- a/gl/m4/extensions.m4
+++ b/gl/m4/extensions.m4
@@ -1,7 +1,7 @@
-# serial 13 -*- Autoconf -*-
+# serial 15 -*- Autoconf -*-
# Enable extensions on systems that normally disable them.
-# Copyright (C) 2003, 2006-2016 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006-2017 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.
@@ -60,7 +60,7 @@ dnl configure.ac when using autoheader 2.62.
#ifndef _ALL_SOURCE
# undef _ALL_SOURCE
#endif
-/* Enable general extensions on OS X. */
+/* Enable general extensions on macOS. */
#ifndef _DARWIN_C_SOURCE
# undef _DARWIN_C_SOURCE
#endif
@@ -68,14 +68,38 @@ dnl configure.ac when using autoheader 2.62.
#ifndef _GNU_SOURCE
# undef _GNU_SOURCE
#endif
-/* Use GNU style printf and scanf. */
-#ifndef __USE_MINGW_ANSI_STDIO
-# undef __USE_MINGW_ANSI_STDIO
-#endif
/* Enable threading extensions on Solaris. */
#ifndef _POSIX_PTHREAD_SEMANTICS
# undef _POSIX_PTHREAD_SEMANTICS
#endif
+/* Enable extensions specified by ISO/IEC TS 18661-5:2014. */
+#ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
+# undef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-1:2014. */
+#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
+# undef __STDC_WANT_IEC_60559_BFP_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-2:2015. */
+#ifndef __STDC_WANT_IEC_60559_DFP_EXT__
+# undef __STDC_WANT_IEC_60559_DFP_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */
+#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__
+# undef __STDC_WANT_IEC_60559_FUNCS_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */
+#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__
+# undef __STDC_WANT_IEC_60559_TYPES_EXT__
+#endif
+/* Enable extensions specified by ISO/IEC TR 24731-2:2010. */
+#ifndef __STDC_WANT_LIB_EXT2__
+# undef __STDC_WANT_LIB_EXT2__
+#endif
+/* Enable extensions specified by ISO/IEC 24747:2009. */
+#ifndef __STDC_WANT_MATH_SPEC_FUNCS__
+# undef __STDC_WANT_MATH_SPEC_FUNCS__
+#endif
/* Enable extensions on HP NonStop. */
#ifndef _TANDEM_SOURCE
# undef _TANDEM_SOURCE
@@ -104,8 +128,14 @@ dnl configure.ac when using autoheader 2.62.
AC_DEFINE([_ALL_SOURCE])
AC_DEFINE([_DARWIN_C_SOURCE])
AC_DEFINE([_GNU_SOURCE])
- AC_DEFINE([__USE_MINGW_ANSI_STDIO])
AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
+ AC_DEFINE([__STDC_WANT_IEC_60559_ATTRIBS_EXT__])
+ AC_DEFINE([__STDC_WANT_IEC_60559_BFP_EXT__])
+ AC_DEFINE([__STDC_WANT_IEC_60559_DFP_EXT__])
+ AC_DEFINE([__STDC_WANT_IEC_60559_FUNCS_EXT__])
+ AC_DEFINE([__STDC_WANT_IEC_60559_TYPES_EXT__])
+ AC_DEFINE([__STDC_WANT_LIB_EXT2__])
+ AC_DEFINE([__STDC_WANT_MATH_SPEC_FUNCS__])
AC_DEFINE([_TANDEM_SOURCE])
AC_CACHE_CHECK([whether _XOPEN_SOURCE should be defined],
[ac_cv_should_define__xopen_source],
diff --git a/gl/m4/extern-inline.m4 b/gl/m4/extern-inline.m4
index 1e578f3..00f9609 100644
--- a/gl/m4/extern-inline.m4
+++ b/gl/m4/extern-inline.m4
@@ -1,6 +1,6 @@
dnl 'extern inline' a la ISO C99.
-dnl Copyright 2012-2016 Free Software Foundation, Inc.
+dnl Copyright 2012-2017 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.
diff --git a/gl/m4/fseeko.m4 b/gl/m4/fseeko.m4
index 6c7f551..fdb565b 100644
--- a/gl/m4/fseeko.m4
+++ b/gl/m4/fseeko.m4
@@ -1,5 +1,5 @@
# fseeko.m4 serial 17
-dnl Copyright (C) 2007-2016 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2017 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.
diff --git a/gl/m4/fstat.m4 b/gl/m4/fstat.m4
index 29f9b81..14c871a 100644
--- a/gl/m4/fstat.m4
+++ b/gl/m4/fstat.m4
@@ -1,5 +1,5 @@
# fstat.m4 serial 4
-dnl Copyright (C) 2011-2016 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2017 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.
diff --git a/gl/m4/ftell.m4 b/gl/m4/ftell.m4
index 6701f0a..b8336ce 100644
--- a/gl/m4/ftell.m4
+++ b/gl/m4/ftell.m4
@@ -1,5 +1,5 @@
# ftell.m4 serial 3
-dnl Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009-2017 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.
diff --git a/gl/m4/ftello.m4 b/gl/m4/ftello.m4
index 3f4808b..0867c2a 100644
--- a/gl/m4/ftello.m4
+++ b/gl/m4/ftello.m4
@@ -1,5 +1,5 @@
# ftello.m4 serial 11
-dnl Copyright (C) 2007-2016 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2017 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.
diff --git a/gl/m4/getopt.m4 b/gl/m4/getopt.m4
index ce6ec67..7a94626 100644
--- a/gl/m4/getopt.m4
+++ b/gl/m4/getopt.m4
@@ -1,5 +1,5 @@
# getopt.m4 serial 44
-dnl Copyright (C) 2002-2006, 2008-2016 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2008-2017 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.
diff --git a/gl/m4/gettime.m4 b/gl/m4/gettime.m4
index 9843ed4..1cdab27 100644
--- a/gl/m4/gettime.m4
+++ b/gl/m4/gettime.m4
@@ -1,5 +1,5 @@
# gettime.m4 serial 8
-dnl Copyright (C) 2002, 2004-2006, 2009-2016 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2004-2006, 2009-2017 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.
diff --git a/gl/m4/gettimeofday.m4 b/gl/m4/gettimeofday.m4
index 4ae5d63..4f501e5 100644
--- a/gl/m4/gettimeofday.m4
+++ b/gl/m4/gettimeofday.m4
@@ -1,6 +1,6 @@
# serial 21
-# Copyright (C) 2001-2003, 2005, 2007, 2009-2016 Free Software Foundation, Inc.
+# Copyright (C) 2001-2003, 2005, 2007, 2009-2017 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.
diff --git a/gl/m4/gnulib-cache.m4 b/gl/m4/gnulib-cache.m4
index 93a6d9c..e5dbb55 100644
--- a/gl/m4/gnulib-cache.m4
+++ b/gl/m4/gnulib-cache.m4
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2016 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
diff --git a/gl/m4/gnulib-common.m4 b/gl/m4/gnulib-common.m4
index f8454c8..7d9b40b 100644
--- a/gl/m4/gnulib-common.m4
+++ b/gl/m4/gnulib-common.m4
@@ -1,5 +1,5 @@
# gnulib-common.m4 serial 36
-dnl Copyright (C) 2007-2016 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2017 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.
diff --git a/gl/m4/gnulib-comp.m4 b/gl/m4/gnulib-comp.m4
index 199b962..20a1e48 100644
--- a/gl/m4/gnulib-comp.m4
+++ b/gl/m4/gnulib-comp.m4
@@ -1,5 +1,5 @@
# DO NOT EDIT! GENERATED AUTOMATICALLY!
-# Copyright (C) 2002-2016 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 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
@@ -65,6 +65,7 @@ AC_DEFUN([gl_EARLY],
# Code from module include_next:
# Code from module largefile:
AC_REQUIRE([AC_SYS_LARGEFILE])
+ # Code from module limits-h:
# Code from module lseek:
# Code from module maintainer-makefile:
# Code from module malloc-posix:
@@ -150,7 +151,6 @@ AC_DEFUN([gl_INIT],
GNULIB_GL_UNISTD_H_GETOPT=1
fi
AC_SUBST([GNULIB_GL_UNISTD_H_GETOPT])
- gl_MODULE_INDICATOR_FOR_TESTS([getopt-gnu])
gl_FUNC_GETOPT_POSIX
if test $REPLACE_GETOPT = 1; then
AC_LIBOBJ([getopt])
@@ -180,6 +180,7 @@ AC_DEFUN([gl_INIT],
[AC_CONFIG_LINKS([$GNUmakefile:$GNUmakefile], [],
[GNUmakefile=$GNUmakefile])])
AC_REQUIRE([gl_LARGEFILE])
+ gl_LIMITS_H
gl_FUNC_LSEEK
if test $REPLACE_LSEEK = 1; then
AC_LIBOBJ([lseek])
@@ -390,6 +391,7 @@ AC_DEFUN([gl_FILE_LIST], [
lib/gettext.h
lib/gettime.c
lib/gettimeofday.c
+ lib/limits.in.h
lib/lseek.c
lib/malloc.c
lib/msvc-inval.c
@@ -435,6 +437,7 @@ AC_DEFUN([gl_FILE_LIST], [
m4/gnulib-common.m4
m4/include_next.m4
m4/largefile.m4
+ m4/limits-h.m4
m4/longlong.m4
m4/lseek.m4
m4/malloc.m4
@@ -464,6 +467,7 @@ AC_DEFUN([gl_FILE_LIST], [
m4/warn-on-use.m4
m4/warnings.m4
m4/wchar_t.m4
+ m4/wint_t.m4
top/GNUmakefile
top/maint.mk
])
diff --git a/gl/m4/gnulib-tool.m4 b/gl/m4/gnulib-tool.m4
index 0d2ee44..2e2d8f6 100644
--- a/gl/m4/gnulib-tool.m4
+++ b/gl/m4/gnulib-tool.m4
@@ -1,5 +1,5 @@
# gnulib-tool.m4 serial 2
-dnl Copyright (C) 2004-2005, 2009-2016 Free Software Foundation, Inc.
+dnl Copyright (C) 2004-2005, 2009-2017 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.
diff --git a/gl/m4/include_next.m4 b/gl/m4/include_next.m4
index db0f2c0..e687e23 100644
--- a/gl/m4/include_next.m4
+++ b/gl/m4/include_next.m4
@@ -1,5 +1,5 @@
# include_next.m4 serial 23
-dnl Copyright (C) 2006-2016 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2017 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.
diff --git a/gl/m4/largefile.m4 b/gl/m4/largefile.m4
index 8bbdfaa..790f7c0 100644
--- a/gl/m4/largefile.m4
+++ b/gl/m4/largefile.m4
@@ -1,6 +1,6 @@
# Enable large files on systems where this is not the default.
-# Copyright 1992-1996, 1998-2016 Free Software Foundation, Inc.
+# Copyright 1992-1996, 1998-2017 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.
diff --git a/gl/m4/limits-h.m4 b/gl/m4/limits-h.m4
new file mode 100644
index 0000000..443f91b
--- /dev/null
+++ b/gl/m4/limits-h.m4
@@ -0,0 +1,31 @@
+dnl Check whether limits.h has needed features.
+
+dnl Copyright 2016-2017 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Paul Eggert.
+
+AC_DEFUN_ONCE([gl_LIMITS_H],
+[
+ gl_CHECK_NEXT_HEADERS([limits.h])
+
+ AC_CACHE_CHECK([whether limits.h has ULLONG_WIDTH etc.],
+ [gl_cv_header_limits_width],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
+ #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
+ #endif
+ #include <limits.h>
+ int ullw = ULLONG_WIDTH;]])],
+ [gl_cv_header_limits_width=yes],
+ [gl_cv_header_limits_width=no])])
+ if test "$gl_cv_header_limits_width" = yes; then
+ LIMITS_H=
+ else
+ LIMITS_H=limits.h
+ fi
+ AC_SUBST([LIMITS_H])
+ AM_CONDITIONAL([GL_GENERATE_LIMITS_H], [test -n "$LIMITS_H"])
+])
diff --git a/gl/m4/longlong.m4 b/gl/m4/longlong.m4
index 36d8b12..9a3294b 100644
--- a/gl/m4/longlong.m4
+++ b/gl/m4/longlong.m4
@@ -1,5 +1,5 @@
# longlong.m4 serial 17
-dnl Copyright (C) 1999-2007, 2009-2016 Free Software Foundation, Inc.
+dnl Copyright (C) 1999-2007, 2009-2017 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.
diff --git a/gl/m4/lseek.m4 b/gl/m4/lseek.m4
index 4a95440..627e772 100644
--- a/gl/m4/lseek.m4
+++ b/gl/m4/lseek.m4
@@ -1,5 +1,5 @@
# lseek.m4 serial 10
-dnl Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009-2017 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.
diff --git a/gl/m4/malloc.m4 b/gl/m4/malloc.m4
index c393690..e1d2ec6 100644
--- a/gl/m4/malloc.m4
+++ b/gl/m4/malloc.m4
@@ -1,5 +1,5 @@
# malloc.m4 serial 15
-dnl Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009-2017 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.
diff --git a/gl/m4/manywarnings.m4 b/gl/m4/manywarnings.m4
index 90823b0..0f06ade 100644
--- a/gl/m4/manywarnings.m4
+++ b/gl/m4/manywarnings.m4
@@ -1,5 +1,5 @@
# manywarnings.m4 serial 8
-dnl Copyright (C) 2008-2016 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2017 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.
@@ -62,10 +62,11 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC],
CFLAGS="$CFLAGS -W -Werror"
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
- [[void f (void)
+ [[int f (void)
{
typedef struct { int a; int b; } s_t;
s_t s1 = { 0, };
+ return s1.b;
}
]],
[[]])],
@@ -103,6 +104,7 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC],
gl_manywarn_set=
for gl_manywarn_item in \
+ -fno-common \
-W \
-Wabi \
-Waddress \
diff --git a/gl/m4/msvc-inval.m4 b/gl/m4/msvc-inval.m4
index f5e4c89..3324375 100644
--- a/gl/m4/msvc-inval.m4
+++ b/gl/m4/msvc-inval.m4
@@ -1,5 +1,5 @@
# msvc-inval.m4 serial 1
-dnl Copyright (C) 2011-2016 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2017 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.
diff --git a/gl/m4/msvc-nothrow.m4 b/gl/m4/msvc-nothrow.m4
index 58f5c0b..3014661 100644
--- a/gl/m4/msvc-nothrow.m4
+++ b/gl/m4/msvc-nothrow.m4
@@ -1,5 +1,5 @@
# msvc-nothrow.m4 serial 1
-dnl Copyright (C) 2011-2016 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2017 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.
diff --git a/gl/m4/multiarch.m4 b/gl/m4/multiarch.m4
index 43b5d05..30006cb 100644
--- a/gl/m4/multiarch.m4
+++ b/gl/m4/multiarch.m4
@@ -1,5 +1,5 @@
# multiarch.m4 serial 7
-dnl Copyright (C) 2008-2016 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2017 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.
diff --git a/gl/m4/nocrash.m4 b/gl/m4/nocrash.m4
index d8dd8f1..2c2c5fb 100644
--- a/gl/m4/nocrash.m4
+++ b/gl/m4/nocrash.m4
@@ -1,5 +1,5 @@
# nocrash.m4 serial 4
-dnl Copyright (C) 2005, 2009-2016 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2009-2017 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.
diff --git a/gl/m4/off_t.m4 b/gl/m4/off_t.m4
index 282751b..92c45ef 100644
--- a/gl/m4/off_t.m4
+++ b/gl/m4/off_t.m4
@@ -1,5 +1,5 @@
# off_t.m4 serial 1
-dnl Copyright (C) 2012-2016 Free Software Foundation, Inc.
+dnl Copyright (C) 2012-2017 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.
diff --git a/gl/m4/read-file.m4 b/gl/m4/read-file.m4
index aa23b58..5540000 100644
--- a/gl/m4/read-file.m4
+++ b/gl/m4/read-file.m4
@@ -1,5 +1,5 @@
# read-file.m4 serial 3
-dnl Copyright (C) 2002-2006, 2009-2016 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2009-2017 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.
diff --git a/gl/m4/realloc.m4 b/gl/m4/realloc.m4
index fc22825..3d05b44 100644
--- a/gl/m4/realloc.m4
+++ b/gl/m4/realloc.m4
@@ -1,5 +1,5 @@
# realloc.m4 serial 14
-dnl Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009-2017 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.
diff --git a/gl/m4/ssize_t.m4 b/gl/m4/ssize_t.m4
index 3e7b9e6..66ba9d4 100644
--- a/gl/m4/ssize_t.m4
+++ b/gl/m4/ssize_t.m4
@@ -1,5 +1,5 @@
# ssize_t.m4 serial 5 (gettext-0.18.2)
-dnl Copyright (C) 2001-2003, 2006, 2010-2016 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2003, 2006, 2010-2017 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.
diff --git a/gl/m4/stdarg.m4 b/gl/m4/stdarg.m4
index ab3e7f5..40db5e4 100644
--- a/gl/m4/stdarg.m4
+++ b/gl/m4/stdarg.m4
@@ -1,5 +1,5 @@
# stdarg.m4 serial 6
-dnl Copyright (C) 2006, 2008-2016 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2008-2017 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.
diff --git a/gl/m4/stddef_h.m4 b/gl/m4/stddef_h.m4
index c045c65..f45def1 100644
--- a/gl/m4/stddef_h.m4
+++ b/gl/m4/stddef_h.m4
@@ -1,6 +1,6 @@
dnl A placeholder for <stddef.h>, for platforms that have issues.
# stddef_h.m4 serial 5
-dnl Copyright (C) 2009-2016 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2017 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.
diff --git a/gl/m4/stdint.m4 b/gl/m4/stdint.m4
index 0b4b906..4ac854d 100644
--- a/gl/m4/stdint.m4
+++ b/gl/m4/stdint.m4
@@ -1,5 +1,5 @@
-# stdint.m4 serial 44
-dnl Copyright (C) 2001-2016 Free Software Foundation, Inc.
+# stdint.m4 serial 50
+dnl Copyright (C) 2001-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -11,6 +11,9 @@ AC_DEFUN_ONCE([gl_STDINT_H],
[
AC_PREREQ([2.59])dnl
+ AC_REQUIRE([gl_LIMITS_H])
+ AC_REQUIRE([gt_TYPE_WINT_T])
+
dnl Check for long long int and unsigned long long int.
AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
if test $ac_cv_type_long_long_int = yes; then
@@ -152,6 +155,15 @@ uintptr_t h = UINTPTR_MAX;
intmax_t i = INTMAX_MAX;
uintmax_t j = UINTMAX_MAX;
+/* Check that SIZE_MAX has the correct type, if possible. */
+#if 201112 <= __STDC_VERSION__
+int k = _Generic (SIZE_MAX, size_t: 0);
+#elif (2 <= __GNUC__ || defined __IBM__TYPEOF__ \
+ || (0x5110 <= __SUNPRO_C && !__STDC__))
+extern size_t k;
+extern __typeof__ (SIZE_MAX) k;
+#endif
+
#include <limits.h> /* for CHAR_BIT */
#define TYPE_MINIMUM(t) \
((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
@@ -282,14 +294,20 @@ static const char *macro_values[] =
])
])
fi
+
+ HAVE_C99_STDINT_H=0
+ HAVE_SYS_BITYPES_H=0
+ HAVE_SYS_INTTYPES_H=0
+ STDINT_H=stdint.h
if test "$gl_cv_header_working_stdint_h" = yes; then
+ HAVE_C99_STDINT_H=1
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([[
+ AC_LANG_PROGRAM([[
#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
#include <stdint.h>
]
@@ -306,27 +324,44 @@ int32_t i32 = INT32_C (0x7fffffff);
AC_DEFINE([__STDC_LIMIT_MACROS], [1],
[Define to 1 if the system <stdint.h> predates C++11.])
fi
- STDINT_H=
+ AC_CACHE_CHECK([whether stdint.h has UINTMAX_WIDTH etc.],
+ [gl_cv_header_stdint_width],
+ [gl_cv_header_stdint_width=no
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[
+ /* Work if build is not clean. */
+ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
+ #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
+ #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
+ #endif
+ #include <stdint.h>
+ ]gl_STDINT_INCLUDES[
+ int iw = UINTMAX_WIDTH;
+ ]])],
+ [gl_cv_header_stdint_width=yes])])
+ if test "$gl_cv_header_stdint_width" = yes; then
+ STDINT_H=
+ fi
else
dnl Check for <sys/inttypes.h>, and for
dnl <sys/bitypes.h> (used in Linux libc4 >= 4.6.7 and libc5).
AC_CHECK_HEADERS([sys/inttypes.h sys/bitypes.h])
if test $ac_cv_header_sys_inttypes_h = yes; then
HAVE_SYS_INTTYPES_H=1
- else
- HAVE_SYS_INTTYPES_H=0
fi
- AC_SUBST([HAVE_SYS_INTTYPES_H])
if test $ac_cv_header_sys_bitypes_h = yes; then
HAVE_SYS_BITYPES_H=1
- else
- HAVE_SYS_BITYPES_H=0
fi
- AC_SUBST([HAVE_SYS_BITYPES_H])
-
gl_STDINT_TYPE_PROPERTIES
- STDINT_H=stdint.h
fi
+
+ dnl The substitute stdint.h needs the substitute limit.h's _GL_INTEGER_WIDTH.
+ LIMITS_H=limits.h
+ AM_CONDITIONAL([GL_GENERATE_LIMITS_H], [test -n "$LIMITS_H"])
+
+ AC_SUBST([HAVE_C99_STDINT_H])
+ AC_SUBST([HAVE_SYS_BITYPES_H])
+ AC_SUBST([HAVE_SYS_INTTYPES_H])
AC_SUBST([STDINT_H])
AM_CONDITIONAL([GL_GENERATE_STDINT_H], [test -n "$STDINT_H"])
])
@@ -494,7 +529,7 @@ AC_DEFUN([gl_STDINT_TYPE_PROPERTIES],
dnl requirement that wint_t is "unchanged by default argument promotions".
dnl In this case gnulib's <wchar.h> and <wctype.h> override wint_t.
dnl Set the variable BITSIZEOF_WINT_T accordingly.
- if test $BITSIZEOF_WINT_T -lt 32; then
+ if test $GNULIB_OVERRIDES_WINT_T = 1; then
BITSIZEOF_WINT_T=32
fi
])
@@ -504,8 +539,3 @@ dnl Remove this when we can assume autoconf >= 2.61.
m4_ifdef([AC_COMPUTE_INT], [], [
AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])])
])
-
-# Hey Emacs!
-# Local Variables:
-# indent-tabs-mode: nil
-# End:
diff --git a/gl/m4/stdio_h.m4 b/gl/m4/stdio_h.m4
index 0e38758..9ffbb85 100644
--- a/gl/m4/stdio_h.m4
+++ b/gl/m4/stdio_h.m4
@@ -1,14 +1,18 @@
-# stdio_h.m4 serial 46
-dnl Copyright (C) 2007-2016 Free Software Foundation, Inc.
+# stdio_h.m4 serial 48
+dnl Copyright (C) 2007-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_STDIO_H],
[
- dnl For __USE_MINGW_ANSI_STDIO
- AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
-
+ AH_VERBATIM([MINGW_ANSI_STDIO],
+[/* Use GNU style printf and scanf. */
+#ifndef __USE_MINGW_ANSI_STDIO
+# undef __USE_MINGW_ANSI_STDIO
+#endif
+])
+ AC_DEFINE([__USE_MINGW_ANSI_STDIO])
AC_REQUIRE([gl_STDIO_H_DEFAULTS])
gl_NEXT_HEADERS([stdio.h])
diff --git a/gl/m4/stdlib_h.m4 b/gl/m4/stdlib_h.m4
index 19107c4..110fe2d 100644
--- a/gl/m4/stdlib_h.m4
+++ b/gl/m4/stdlib_h.m4
@@ -1,5 +1,5 @@
-# stdlib_h.m4 serial 42
-dnl Copyright (C) 2007-2016 Free Software Foundation, Inc.
+# stdlib_h.m4 serial 43
+dnl Copyright (C) 2007-2017 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.
@@ -21,7 +21,7 @@ AC_DEFUN([gl_STDLIB_H],
#endif
]], [_Exit atoll canonicalize_file_name getloadavg getsubopt grantpt
initstate initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps
- posix_openpt ptsname ptsname_r random random_r realpath rpmatch
+ posix_openpt ptsname ptsname_r qsort_r random random_r realpath rpmatch
secure_getenv setenv setstate setstate_r srandom srandom_r
strtod strtoll strtoull unlockpt unsetenv])
])
@@ -85,6 +85,7 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
HAVE_POSIX_OPENPT=1; AC_SUBST([HAVE_POSIX_OPENPT])
HAVE_PTSNAME=1; AC_SUBST([HAVE_PTSNAME])
HAVE_PTSNAME_R=1; AC_SUBST([HAVE_PTSNAME_R])
+ HAVE_QSORT_R=1; AC_SUBST([HAVE_QSORT_R])
HAVE_RANDOM=1; AC_SUBST([HAVE_RANDOM])
HAVE_RANDOM_H=1; AC_SUBST([HAVE_RANDOM_H])
HAVE_RANDOM_R=1; AC_SUBST([HAVE_RANDOM_R])
diff --git a/gl/m4/sys_socket_h.m4 b/gl/m4/sys_socket_h.m4
index ae500c7..3ecbe7c 100644
--- a/gl/m4/sys_socket_h.m4
+++ b/gl/m4/sys_socket_h.m4
@@ -1,5 +1,5 @@
# sys_socket_h.m4 serial 23
-dnl Copyright (C) 2005-2016 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2017 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.
diff --git a/gl/m4/sys_stat_h.m4 b/gl/m4/sys_stat_h.m4
index 3d43b6f..1e34ac4 100644
--- a/gl/m4/sys_stat_h.m4
+++ b/gl/m4/sys_stat_h.m4
@@ -1,5 +1,5 @@
# sys_stat_h.m4 serial 28 -*- Autoconf -*-
-dnl Copyright (C) 2006-2016 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2017 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.
diff --git a/gl/m4/sys_time_h.m4 b/gl/m4/sys_time_h.m4
index 3061a9c..e622dbe 100644
--- a/gl/m4/sys_time_h.m4
+++ b/gl/m4/sys_time_h.m4
@@ -1,7 +1,7 @@
# Configure a replacement for <sys/time.h>.
# serial 8
-# Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2009-2017 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.
diff --git a/gl/m4/sys_types_h.m4 b/gl/m4/sys_types_h.m4
index b0aabb4..2eb4e9e 100644
--- a/gl/m4/sys_types_h.m4
+++ b/gl/m4/sys_types_h.m4
@@ -1,5 +1,5 @@
-# sys_types_h.m4 serial 5
-dnl Copyright (C) 2011-2016 Free Software Foundation, Inc.
+# sys_types_h.m4 serial 6
+dnl Copyright (C) 2011-2017 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.
@@ -22,3 +22,28 @@ AC_DEFUN_ONCE([gl_SYS_TYPES_H],
AC_DEFUN([gl_SYS_TYPES_H_DEFAULTS],
[
])
+
+# This works around a buggy version in autoconf <= 2.69.
+# See <https://lists.gnu.org/archive/html/autoconf/2016-08/msg00014.html>
+
+m4_version_prereq([2.70], [], [
+
+# This is taken from the following Autoconf patch:
+# http://git.sv.gnu.org/cgit/autoconf.git/commit/?id=e17a30e98
+
+m4_undefine([AC_HEADER_MAJOR])
+AC_DEFUN([AC_HEADER_MAJOR],
+[AC_CHECK_HEADERS_ONCE([sys/types.h])
+AC_CHECK_HEADER([sys/mkdev.h],
+ [AC_DEFINE([MAJOR_IN_MKDEV], [1],
+ [Define to 1 if `major', `minor', and `makedev' are declared in
+ <mkdev.h>.])])
+if test $ac_cv_header_sys_mkdev_h = no; then
+ AC_CHECK_HEADER([sys/sysmacros.h],
+ [AC_DEFINE([MAJOR_IN_SYSMACROS], [1],
+ [Define to 1 if `major', `minor', and `makedev' are declared in
+ <sysmacros.h>.])])
+fi
+])
+
+])
diff --git a/gl/m4/time_h.m4 b/gl/m4/time_h.m4
index eb2a631..b925678 100644
--- a/gl/m4/time_h.m4
+++ b/gl/m4/time_h.m4
@@ -1,6 +1,6 @@
# Configure a more-standard replacement for <time.h>.
-# Copyright (C) 2000-2001, 2003-2007, 2009-2016 Free Software Foundation, Inc.
+# Copyright (C) 2000-2001, 2003-2007, 2009-2017 Free Software Foundation, Inc.
# serial 9
diff --git a/gl/m4/timespec.m4 b/gl/m4/timespec.m4
index 2482518..c901468 100644
--- a/gl/m4/timespec.m4
+++ b/gl/m4/timespec.m4
@@ -1,6 +1,6 @@
#serial 15
-# Copyright (C) 2000-2001, 2003-2007, 2009-2016 Free Software Foundation, Inc.
+# Copyright (C) 2000-2001, 2003-2007, 2009-2017 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
diff --git a/gl/m4/unistd_h.m4 b/gl/m4/unistd_h.m4
index 544dadb..25aef19 100644
--- a/gl/m4/unistd_h.m4
+++ b/gl/m4/unistd_h.m4
@@ -1,5 +1,5 @@
-# unistd_h.m4 serial 68
-dnl Copyright (C) 2006-2016 Free Software Foundation, Inc.
+# unistd_h.m4 serial 69
+dnl Copyright (C) 2006-2017 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.
@@ -145,6 +145,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
HAVE_DECL_FCHDIR=1; AC_SUBST([HAVE_DECL_FCHDIR])
HAVE_DECL_FDATASYNC=1; AC_SUBST([HAVE_DECL_FDATASYNC])
HAVE_DECL_GETDOMAINNAME=1; AC_SUBST([HAVE_DECL_GETDOMAINNAME])
+ HAVE_DECL_GETLOGIN=1; AC_SUBST([HAVE_DECL_GETLOGIN])
HAVE_DECL_GETLOGIN_R=1; AC_SUBST([HAVE_DECL_GETLOGIN_R])
HAVE_DECL_GETPAGESIZE=1; AC_SUBST([HAVE_DECL_GETPAGESIZE])
HAVE_DECL_GETUSERSHELL=1; AC_SUBST([HAVE_DECL_GETUSERSHELL])
diff --git a/gl/m4/valgrind-tests.m4 b/gl/m4/valgrind-tests.m4
index fec742d..8a6650b 100644
--- a/gl/m4/valgrind-tests.m4
+++ b/gl/m4/valgrind-tests.m4
@@ -1,5 +1,5 @@
# valgrind-tests.m4 serial 3
-dnl Copyright (C) 2008-2016 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2017 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.
@@ -21,7 +21,7 @@ AC_DEFUN([gl_VALGRIND_TESTS],
AC_CHECK_PROGS(VALGRIND, valgrind)
fi
- OPTS="-q --error-exitcode=1 --leak-check=no"
+ OPTS="-q --error-exitcode=6 --leak-check=no"
if test -n "$VALGRIND" \
&& $VALGRIND $OPTS $SHELL -c 'exit 0' > /dev/null 2>&1; then
diff --git a/gl/m4/version-etc.m4 b/gl/m4/version-etc.m4
index a719182..c099101 100644
--- a/gl/m4/version-etc.m4
+++ b/gl/m4/version-etc.m4
@@ -1,5 +1,5 @@
# version-etc.m4 serial 1
-# Copyright (C) 2009-2016 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 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.
diff --git a/gl/m4/warn-on-use.m4 b/gl/m4/warn-on-use.m4
index 08440ec..25ce737 100644
--- a/gl/m4/warn-on-use.m4
+++ b/gl/m4/warn-on-use.m4
@@ -1,5 +1,5 @@
# warn-on-use.m4 serial 5
-dnl Copyright (C) 2010-2016 Free Software Foundation, Inc.
+dnl Copyright (C) 2010-2017 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.
diff --git a/gl/m4/warnings.m4 b/gl/m4/warnings.m4
index 924e21d..e697174 100644
--- a/gl/m4/warnings.m4
+++ b/gl/m4/warnings.m4
@@ -1,5 +1,5 @@
# warnings.m4 serial 11
-dnl Copyright (C) 2008-2016 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2017 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.
diff --git a/gl/m4/wchar_t.m4 b/gl/m4/wchar_t.m4
index 2db8c3f..11783d2 100644
--- a/gl/m4/wchar_t.m4
+++ b/gl/m4/wchar_t.m4
@@ -1,5 +1,5 @@
# wchar_t.m4 serial 4 (gettext-0.18.2)
-dnl Copyright (C) 2002-2003, 2008-2016 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2003, 2008-2017 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.
diff --git a/gl/m4/wint_t.m4 b/gl/m4/wint_t.m4
new file mode 100644
index 0000000..65e25a4
--- /dev/null
+++ b/gl/m4/wint_t.m4
@@ -0,0 +1,62 @@
+# wint_t.m4 serial 6
+dnl Copyright (C) 2003, 2007-2017 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+dnl Test whether <wchar.h> has the 'wint_t' type and whether gnulib's
+dnl <wchar.h> or <wctype.h> would, if present, override 'wint_t'.
+dnl Prerequisite: AC_PROG_CC
+
+AC_DEFUN([gt_TYPE_WINT_T],
+[
+ AC_CACHE_CHECK([for wint_t], [gt_cv_c_wint_t],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+ <wchar.h>.
+ BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
+ before <wchar.h>. */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+ wint_t foo = (wchar_t)'\0';]],
+ [[]])],
+ [gt_cv_c_wint_t=yes],
+ [gt_cv_c_wint_t=no])])
+ if test $gt_cv_c_wint_t = yes; then
+ AC_DEFINE([HAVE_WINT_T], [1], [Define if you have the 'wint_t' type.])
+
+ dnl Determine whether gnulib's <wchar.h> or <wctype.h> would, if present,
+ dnl override 'wint_t'.
+ AC_CACHE_CHECK([whether wint_t is too small],
+ [gl_cv_type_wint_t_too_small],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+ <wchar.h>.
+ BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+#if !(defined __GLIBC__ && !defined __UCLIBC__)
+# include <stddef.h>
+# include <stdio.h>
+# include <time.h>
+#endif
+#include <wchar.h>
+ int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1];
+ ]])],
+ [gl_cv_type_wint_t_too_small=no],
+ [gl_cv_type_wint_t_too_small=yes])])
+ if test $gl_cv_type_wint_t_too_small = yes; then
+ GNULIB_OVERRIDES_WINT_T=1
+ else
+ GNULIB_OVERRIDES_WINT_T=0
+ fi
+ else
+ GNULIB_OVERRIDES_WINT_T=0
+ fi
+ AC_SUBST([GNULIB_OVERRIDES_WINT_T])
+])
diff --git a/gl/malloc.c b/gl/malloc.c
index e9b01d2..eeaf12b 100644
--- a/gl/malloc.c
+++ b/gl/malloc.c
@@ -1,6 +1,6 @@
/* malloc() function that is glibc compatible.
- Copyright (C) 1997-1998, 2006-2007, 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 1997-1998, 2006-2007, 2009-2017 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
diff --git a/gl/msvc-inval.c b/gl/msvc-inval.c
index baaf39e..7139e93 100644
--- a/gl/msvc-inval.c
+++ b/gl/msvc-inval.c
@@ -1,5 +1,5 @@
/* Invalid parameter handler for MSVC runtime libraries.
- Copyright (C) 2011-2016 Free Software Foundation, Inc.
+ Copyright (C) 2011-2017 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
diff --git a/gl/msvc-inval.h b/gl/msvc-inval.h
index 027c949..6e216d6 100644
--- a/gl/msvc-inval.h
+++ b/gl/msvc-inval.h
@@ -1,5 +1,5 @@
/* Invalid parameter handler for MSVC runtime libraries.
- Copyright (C) 2011-2016 Free Software Foundation, Inc.
+ Copyright (C) 2011-2017 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
diff --git a/gl/msvc-nothrow.c b/gl/msvc-nothrow.c
index ba75bbf..d127eb4 100644
--- a/gl/msvc-nothrow.c
+++ b/gl/msvc-nothrow.c
@@ -1,6 +1,6 @@
/* Wrappers that don't throw invalid parameter notifications
with MSVC runtime libraries.
- Copyright (C) 2011-2016 Free Software Foundation, Inc.
+ Copyright (C) 2011-2017 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
diff --git a/gl/msvc-nothrow.h b/gl/msvc-nothrow.h
index 3493b84..c70efc7 100644
--- a/gl/msvc-nothrow.h
+++ b/gl/msvc-nothrow.h
@@ -1,6 +1,6 @@
/* Wrappers that don't throw invalid parameter notifications
with MSVC runtime libraries.
- Copyright (C) 2011-2016 Free Software Foundation, Inc.
+ Copyright (C) 2011-2017 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
diff --git a/gl/progname.c b/gl/progname.c
index debb760..05b2a7f 100644
--- a/gl/progname.c
+++ b/gl/progname.c
@@ -1,5 +1,5 @@
/* Program name management.
- Copyright (C) 2001-2003, 2005-2016 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2005-2017 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2001.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/progname.h b/gl/progname.h
index 0a57407..f33881c 100644
--- a/gl/progname.h
+++ b/gl/progname.h
@@ -1,5 +1,5 @@
/* Program name management.
- Copyright (C) 2001-2004, 2006, 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2001-2004, 2006, 2009-2017 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2001.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/read-file.c b/gl/read-file.c
index f7b1199..2418053 100644
--- a/gl/read-file.c
+++ b/gl/read-file.c
@@ -1,5 +1,5 @@
/* read-file.c -- read file contents into a string
- Copyright (C) 2006, 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2017 Free Software Foundation, Inc.
Written by Simon Josefsson and Bruno Haible.
This program is free software; you can redistribute it and/or modify
diff --git a/gl/read-file.h b/gl/read-file.h
index 6248065..23e0920 100644
--- a/gl/read-file.h
+++ b/gl/read-file.h
@@ -1,5 +1,5 @@
/* read-file.h -- read file contents into a string
- Copyright (C) 2006, 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2017 Free Software Foundation, Inc.
Written by Simon Josefsson.
This program is free software; you can redistribute it and/or modify
diff --git a/gl/realloc.c b/gl/realloc.c
index 83cb44e..526b487 100644
--- a/gl/realloc.c
+++ b/gl/realloc.c
@@ -1,6 +1,6 @@
/* realloc() function that is glibc compatible.
- Copyright (C) 1997, 2003-2004, 2006-2007, 2009-2016 Free Software
+ Copyright (C) 1997, 2003-2004, 2006-2007, 2009-2017 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/stdarg.in.h b/gl/stdarg.in.h
index 63371e2..3785cd1 100644
--- a/gl/stdarg.in.h
+++ b/gl/stdarg.in.h
@@ -1,5 +1,5 @@
/* Substitute for and wrapper around <stdarg.h>.
- Copyright (C) 2008-2016 Free Software Foundation, Inc.
+ Copyright (C) 2008-2017 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
diff --git a/gl/stddef.in.h b/gl/stddef.in.h
index f4c4a10..5b496a6 100644
--- a/gl/stddef.in.h
+++ b/gl/stddef.in.h
@@ -1,6 +1,6 @@
/* A substitute for POSIX 2008 <stddef.h>, for platforms that have issues.
- Copyright (C) 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2009-2017 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
diff --git a/gl/stdint.in.h b/gl/stdint.in.h
index cf65ec6..d899c1e 100644
--- a/gl/stdint.in.h
+++ b/gl/stdint.in.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2002, 2004-2016 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2002, 2004-2017 Free Software Foundation, Inc.
Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood.
This file is part of gnulib.
@@ -79,49 +79,60 @@
#if ! defined _@GUARD_PREFIX@_STDINT_H && ! defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H
#define _@GUARD_PREFIX@_STDINT_H
+/* Get SCHAR_MIN, SCHAR_MAX, UCHAR_MAX, INT_MIN, INT_MAX,
+ LONG_MIN, LONG_MAX, ULONG_MAX, _GL_INTEGER_WIDTH. */
+#include <limits.h>
+
+/* Override WINT_MIN and WINT_MAX if gnulib's <wchar.h> or <wctype.h> overrides
+ wint_t. */
+#if @GNULIB_OVERRIDES_WINT_T@
+# undef WINT_MIN
+# undef WINT_MAX
+# define WINT_MIN 0x0U
+# define WINT_MAX 0xffffffffU
+#endif
+
+#if ! @HAVE_C99_STDINT_H@
+
/* <sys/types.h> defines some of the stdint.h types as well, on glibc,
IRIX 6.5, and OpenBSD 3.8 (via <machine/types.h>).
AIX 5.2 <sys/types.h> isn't needed and causes troubles.
Mac OS X 10.4.6 <sys/types.h> includes <stdint.h> (which is us), but
relies on the system <stdint.h> definitions, so include
<sys/types.h> after @NEXT_STDINT_H@. */
-#if @HAVE_SYS_TYPES_H@ && ! defined _AIX
-# include <sys/types.h>
-#endif
-
-/* Get SCHAR_MIN, SCHAR_MAX, UCHAR_MAX, INT_MIN, INT_MAX,
- LONG_MIN, LONG_MAX, ULONG_MAX. */
-#include <limits.h>
+# if @HAVE_SYS_TYPES_H@ && ! defined _AIX
+# include <sys/types.h>
+# endif
-#if @HAVE_INTTYPES_H@
+# if @HAVE_INTTYPES_H@
/* In OpenBSD 3.8, <inttypes.h> includes <machine/types.h>, which defines
int{8,16,32,64}_t, uint{8,16,32,64}_t and __BIT_TYPES_DEFINED__.
<inttypes.h> also defines intptr_t and uintptr_t. */
-# include <inttypes.h>
-#elif @HAVE_SYS_INTTYPES_H@
+# include <inttypes.h>
+# elif @HAVE_SYS_INTTYPES_H@
/* Solaris 7 <sys/inttypes.h> has the types except the *_fast*_t types, and
the macros except for *_FAST*_*, INTPTR_MIN, PTRDIFF_MIN, PTRDIFF_MAX. */
-# include <sys/inttypes.h>
-#endif
+# include <sys/inttypes.h>
+# endif
-#if @HAVE_SYS_BITYPES_H@ && ! defined __BIT_TYPES_DEFINED__
+# if @HAVE_SYS_BITYPES_H@ && ! defined __BIT_TYPES_DEFINED__
/* Linux libc4 >= 4.6.7 and libc5 have a <sys/bitypes.h> that defines
int{8,16,32,64}_t and __BIT_TYPES_DEFINED__. In libc5 >= 5.2.2 it is
included by <sys/types.h>. */
-# include <sys/bitypes.h>
-#endif
+# include <sys/bitypes.h>
+# endif
-#undef _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
+# undef _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
/* Minimum and maximum values for an integer type under the usual assumption.
Return an unspecified value if BITS == 0, adding a check to pacify
picky compilers. */
-#define _STDINT_MIN(signed, bits, zero) \
- ((signed) ? ~ _STDINT_MAX (signed, bits, zero) : (zero))
+# define _STDINT_MIN(signed, bits, zero) \
+ ((signed) ? ~ _STDINT_MAX (signed, bits, zero) : (zero))
-#define _STDINT_MAX(signed, bits, zero) \
- (((((zero) + 1) << ((bits) ? (bits) - 1 - (signed) : 0)) - 1) * 2 + 1)
+# define _STDINT_MAX(signed, bits, zero) \
+ (((((zero) + 1) << ((bits) ? (bits) - 1 - (signed) : 0)) - 1) * 2 + 1)
#if !GNULIB_defined_stdint_types
@@ -130,26 +141,26 @@
/* Here we assume a standard architecture where the hardware integer
types have 8, 16, 32, optionally 64 bits. */
-#undef int8_t
-#undef uint8_t
+# undef int8_t
+# undef uint8_t
typedef signed char gl_int8_t;
typedef unsigned char gl_uint8_t;
-#define int8_t gl_int8_t
-#define uint8_t gl_uint8_t
+# define int8_t gl_int8_t
+# define uint8_t gl_uint8_t
-#undef int16_t
-#undef uint16_t
+# undef int16_t
+# undef uint16_t
typedef short int gl_int16_t;
typedef unsigned short int gl_uint16_t;
-#define int16_t gl_int16_t
-#define uint16_t gl_uint16_t
+# define int16_t gl_int16_t
+# define uint16_t gl_uint16_t
-#undef int32_t
-#undef uint32_t
+# undef int32_t
+# undef uint32_t
typedef int gl_int32_t;
typedef unsigned int gl_uint32_t;
-#define int32_t gl_int32_t
-#define uint32_t gl_uint32_t
+# define int32_t gl_int32_t
+# define uint32_t gl_uint32_t
/* If the system defines INT64_MAX, assume int64_t works. That way,
if the underlying platform defines int64_t to be a 64-bit long long
@@ -157,54 +168,54 @@ typedef unsigned int gl_uint32_t;
int, which would mess up C++ name mangling. We must use #ifdef
rather than #if, to avoid an error with HP-UX 10.20 cc. */
-#ifdef INT64_MAX
-# define GL_INT64_T
-#else
+# ifdef INT64_MAX
+# define GL_INT64_T
+# else
/* Do not undefine int64_t if gnulib is not being used with 64-bit
types, since otherwise it breaks platforms like Tandem/NSK. */
-# if LONG_MAX >> 31 >> 31 == 1
-# undef int64_t
+# if LONG_MAX >> 31 >> 31 == 1
+# undef int64_t
typedef long int gl_int64_t;
-# define int64_t gl_int64_t
-# define GL_INT64_T
-# elif defined _MSC_VER
-# undef int64_t
+# define int64_t gl_int64_t
+# define GL_INT64_T
+# elif defined _MSC_VER
+# undef int64_t
typedef __int64 gl_int64_t;
-# define int64_t gl_int64_t
-# define GL_INT64_T
-# elif @HAVE_LONG_LONG_INT@
-# undef int64_t
+# define int64_t gl_int64_t
+# define GL_INT64_T
+# elif @HAVE_LONG_LONG_INT@
+# undef int64_t
typedef long long int gl_int64_t;
-# define int64_t gl_int64_t
-# define GL_INT64_T
+# define int64_t gl_int64_t
+# define GL_INT64_T
+# endif
# endif
-#endif
-#ifdef UINT64_MAX
-# define GL_UINT64_T
-#else
-# if ULONG_MAX >> 31 >> 31 >> 1 == 1
-# undef uint64_t
-typedef unsigned long int gl_uint64_t;
-# define uint64_t gl_uint64_t
+# ifdef UINT64_MAX
# define GL_UINT64_T
-# elif defined _MSC_VER
-# undef uint64_t
+# else
+# if ULONG_MAX >> 31 >> 31 >> 1 == 1
+# undef uint64_t
+typedef unsigned long int gl_uint64_t;
+# define uint64_t gl_uint64_t
+# define GL_UINT64_T
+# elif defined _MSC_VER
+# undef uint64_t
typedef unsigned __int64 gl_uint64_t;
-# define uint64_t gl_uint64_t
-# define GL_UINT64_T
-# elif @HAVE_UNSIGNED_LONG_LONG_INT@
-# undef uint64_t
+# define uint64_t gl_uint64_t
+# define GL_UINT64_T
+# elif @HAVE_UNSIGNED_LONG_LONG_INT@
+# undef uint64_t
typedef unsigned long long int gl_uint64_t;
-# define uint64_t gl_uint64_t
-# define GL_UINT64_T
+# define uint64_t gl_uint64_t
+# define GL_UINT64_T
+# endif
# endif
-#endif
/* Avoid collision with Solaris 2.5.1 <pthread.h> etc. */
-#define _UINT8_T
-#define _UINT32_T
-#define _UINT64_T
+# define _UINT8_T
+# define _UINT32_T
+# define _UINT64_T
/* 7.18.1.2. Minimum-width integer types */
@@ -213,26 +224,26 @@ typedef unsigned long long int gl_uint64_t;
types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types
are the same as the corresponding N_t types. */
-#undef int_least8_t
-#undef uint_least8_t
-#undef int_least16_t
-#undef uint_least16_t
-#undef int_least32_t
-#undef uint_least32_t
-#undef int_least64_t
-#undef uint_least64_t
-#define int_least8_t int8_t
-#define uint_least8_t uint8_t
-#define int_least16_t int16_t
-#define uint_least16_t uint16_t
-#define int_least32_t int32_t
-#define uint_least32_t uint32_t
-#ifdef GL_INT64_T
-# define int_least64_t int64_t
-#endif
-#ifdef GL_UINT64_T
-# define uint_least64_t uint64_t
-#endif
+# undef int_least8_t
+# undef uint_least8_t
+# undef int_least16_t
+# undef uint_least16_t
+# undef int_least32_t
+# undef uint_least32_t
+# undef int_least64_t
+# undef uint_least64_t
+# define int_least8_t int8_t
+# define uint_least8_t uint8_t
+# define int_least16_t int16_t
+# define uint_least16_t uint16_t
+# define int_least32_t int32_t
+# define uint_least32_t uint32_t
+# ifdef GL_INT64_T
+# define int_least64_t int64_t
+# endif
+# ifdef GL_UINT64_T
+# define uint_least64_t uint64_t
+# endif
/* 7.18.1.3. Fastest minimum-width integer types */
@@ -245,55 +256,55 @@ typedef unsigned long long int gl_uint64_t;
uses types consistent with glibc, as that lessens the chance of
incompatibility with older GNU hosts. */
-#undef int_fast8_t
-#undef uint_fast8_t
-#undef int_fast16_t
-#undef uint_fast16_t
-#undef int_fast32_t
-#undef uint_fast32_t
-#undef int_fast64_t
-#undef uint_fast64_t
+# undef int_fast8_t
+# undef uint_fast8_t
+# undef int_fast16_t
+# undef uint_fast16_t
+# undef int_fast32_t
+# undef uint_fast32_t
+# undef int_fast64_t
+# undef uint_fast64_t
typedef signed char gl_int_fast8_t;
typedef unsigned char gl_uint_fast8_t;
-#ifdef __sun
+# ifdef __sun
/* Define types compatible with SunOS 5.10, so that code compiled under
earlier SunOS versions works with code compiled under SunOS 5.10. */
typedef int gl_int_fast32_t;
typedef unsigned int gl_uint_fast32_t;
-#else
+# else
typedef long int gl_int_fast32_t;
typedef unsigned long int gl_uint_fast32_t;
-#endif
+# endif
typedef gl_int_fast32_t gl_int_fast16_t;
typedef gl_uint_fast32_t gl_uint_fast16_t;
-#define int_fast8_t gl_int_fast8_t
-#define uint_fast8_t gl_uint_fast8_t
-#define int_fast16_t gl_int_fast16_t
-#define uint_fast16_t gl_uint_fast16_t
-#define int_fast32_t gl_int_fast32_t
-#define uint_fast32_t gl_uint_fast32_t
-#ifdef GL_INT64_T
-# define int_fast64_t int64_t
-#endif
-#ifdef GL_UINT64_T
-# define uint_fast64_t uint64_t
-#endif
+# define int_fast8_t gl_int_fast8_t
+# define uint_fast8_t gl_uint_fast8_t
+# define int_fast16_t gl_int_fast16_t
+# define uint_fast16_t gl_uint_fast16_t
+# define int_fast32_t gl_int_fast32_t
+# define uint_fast32_t gl_uint_fast32_t
+# ifdef GL_INT64_T
+# define int_fast64_t int64_t
+# endif
+# ifdef GL_UINT64_T
+# define uint_fast64_t uint64_t
+# endif
/* 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
+# 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
+# define intptr_t gl_intptr_t
+# define uintptr_t gl_uintptr_t
+# endif
/* 7.18.1.5. Greatest-width integer types */
@@ -304,33 +315,33 @@ typedef unsigned long int gl_uintptr_t;
similarly for UINTMAX_MAX and uintmax_t. This avoids problems with
assuming one type where another is used by the system. */
-#ifndef INTMAX_MAX
-# undef INTMAX_C
-# undef intmax_t
-# if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
+# ifndef INTMAX_MAX
+# undef INTMAX_C
+# undef intmax_t
+# if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
typedef long long int gl_intmax_t;
-# define intmax_t gl_intmax_t
-# elif defined GL_INT64_T
-# define intmax_t int64_t
-# else
+# define intmax_t gl_intmax_t
+# elif defined GL_INT64_T
+# define intmax_t int64_t
+# else
typedef long int gl_intmax_t;
-# define intmax_t gl_intmax_t
+# define intmax_t gl_intmax_t
+# endif
# endif
-#endif
-#ifndef UINTMAX_MAX
-# undef UINTMAX_C
-# undef uintmax_t
-# if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
+# ifndef UINTMAX_MAX
+# undef UINTMAX_C
+# undef uintmax_t
+# if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
typedef unsigned long long int gl_uintmax_t;
-# define uintmax_t gl_uintmax_t
-# elif defined GL_UINT64_T
-# define uintmax_t uint64_t
-# else
+# define uintmax_t gl_uintmax_t
+# elif defined GL_UINT64_T
+# define uintmax_t uint64_t
+# else
typedef unsigned long int gl_uintmax_t;
-# define uintmax_t gl_uintmax_t
+# define uintmax_t gl_uintmax_t
+# endif
# endif
-#endif
/* Verify that intmax_t and uintmax_t have the same size. Too much code
breaks if this is not the case. If this check fails, the reason is likely
@@ -338,8 +349,8 @@ typedef unsigned long int gl_uintmax_t;
typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t)
? 1 : -1];
-#define GNULIB_defined_stdint_types 1
-#endif /* !GNULIB_defined_stdint_types */
+# define GNULIB_defined_stdint_types 1
+# endif /* !GNULIB_defined_stdint_types */
/* 7.18.2. Limits of specified-width integer types */
@@ -348,37 +359,37 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t)
/* Here we assume a standard architecture where the hardware integer
types have 8, 16, 32, optionally 64 bits. */
-#undef INT8_MIN
-#undef INT8_MAX
-#undef UINT8_MAX
-#define INT8_MIN (~ INT8_MAX)
-#define INT8_MAX 127
-#define UINT8_MAX 255
-
-#undef INT16_MIN
-#undef INT16_MAX
-#undef UINT16_MAX
-#define INT16_MIN (~ INT16_MAX)
-#define INT16_MAX 32767
-#define UINT16_MAX 65535
-
-#undef INT32_MIN
-#undef INT32_MAX
-#undef UINT32_MAX
-#define INT32_MIN (~ INT32_MAX)
-#define INT32_MAX 2147483647
-#define UINT32_MAX 4294967295U
-
-#if defined GL_INT64_T && ! defined INT64_MAX
+# undef INT8_MIN
+# undef INT8_MAX
+# undef UINT8_MAX
+# define INT8_MIN (~ INT8_MAX)
+# define INT8_MAX 127
+# define UINT8_MAX 255
+
+# undef INT16_MIN
+# undef INT16_MAX
+# undef UINT16_MAX
+# define INT16_MIN (~ INT16_MAX)
+# define INT16_MAX 32767
+# define UINT16_MAX 65535
+
+# undef INT32_MIN
+# undef INT32_MAX
+# undef UINT32_MAX
+# define INT32_MIN (~ INT32_MAX)
+# define INT32_MAX 2147483647
+# define UINT32_MAX 4294967295U
+
+# if defined GL_INT64_T && ! defined INT64_MAX
/* Prefer (- INTMAX_C (1) << 63) over (~ INT64_MAX) because SunPRO C 5.0
evaluates the latter incorrectly in preprocessor expressions. */
-# define INT64_MIN (- INTMAX_C (1) << 63)
-# define INT64_MAX INTMAX_C (9223372036854775807)
-#endif
+# define INT64_MIN (- INTMAX_C (1) << 63)
+# define INT64_MAX INTMAX_C (9223372036854775807)
+# endif
-#if defined GL_UINT64_T && ! defined UINT64_MAX
-# define UINT64_MAX UINTMAX_C (18446744073709551615)
-#endif
+# if defined GL_UINT64_T && ! defined UINT64_MAX
+# define UINT64_MAX UINTMAX_C (18446744073709551615)
+# endif
/* 7.18.2.2. Limits of minimum-width integer types */
@@ -386,38 +397,38 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t)
types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types
are the same as the corresponding N_t types. */
-#undef INT_LEAST8_MIN
-#undef INT_LEAST8_MAX
-#undef UINT_LEAST8_MAX
-#define INT_LEAST8_MIN INT8_MIN
-#define INT_LEAST8_MAX INT8_MAX
-#define UINT_LEAST8_MAX UINT8_MAX
-
-#undef INT_LEAST16_MIN
-#undef INT_LEAST16_MAX
-#undef UINT_LEAST16_MAX
-#define INT_LEAST16_MIN INT16_MIN
-#define INT_LEAST16_MAX INT16_MAX
-#define UINT_LEAST16_MAX UINT16_MAX
-
-#undef INT_LEAST32_MIN
-#undef INT_LEAST32_MAX
-#undef UINT_LEAST32_MAX
-#define INT_LEAST32_MIN INT32_MIN
-#define INT_LEAST32_MAX INT32_MAX
-#define UINT_LEAST32_MAX UINT32_MAX
-
-#undef INT_LEAST64_MIN
-#undef INT_LEAST64_MAX
-#ifdef GL_INT64_T
-# define INT_LEAST64_MIN INT64_MIN
-# define INT_LEAST64_MAX INT64_MAX
-#endif
+# undef INT_LEAST8_MIN
+# undef INT_LEAST8_MAX
+# undef UINT_LEAST8_MAX
+# define INT_LEAST8_MIN INT8_MIN
+# define INT_LEAST8_MAX INT8_MAX
+# define UINT_LEAST8_MAX UINT8_MAX
+
+# undef INT_LEAST16_MIN
+# undef INT_LEAST16_MAX
+# undef UINT_LEAST16_MAX
+# define INT_LEAST16_MIN INT16_MIN
+# define INT_LEAST16_MAX INT16_MAX
+# define UINT_LEAST16_MAX UINT16_MAX
+
+# undef INT_LEAST32_MIN
+# undef INT_LEAST32_MAX
+# undef UINT_LEAST32_MAX
+# define INT_LEAST32_MIN INT32_MIN
+# define INT_LEAST32_MAX INT32_MAX
+# define UINT_LEAST32_MAX UINT32_MAX
+
+# undef INT_LEAST64_MIN
+# undef INT_LEAST64_MAX
+# ifdef GL_INT64_T
+# define INT_LEAST64_MIN INT64_MIN
+# define INT_LEAST64_MAX INT64_MAX
+# endif
-#undef UINT_LEAST64_MAX
-#ifdef GL_UINT64_T
-# define UINT_LEAST64_MAX UINT64_MAX
-#endif
+# undef UINT_LEAST64_MAX
+# ifdef GL_UINT64_T
+# define UINT_LEAST64_MAX UINT64_MAX
+# endif
/* 7.18.2.3. Limits of fastest minimum-width integer types */
@@ -425,117 +436,117 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t)
types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types
are taken from the same list of types. */
-#undef INT_FAST8_MIN
-#undef INT_FAST8_MAX
-#undef UINT_FAST8_MAX
-#define INT_FAST8_MIN SCHAR_MIN
-#define INT_FAST8_MAX SCHAR_MAX
-#define UINT_FAST8_MAX UCHAR_MAX
-
-#undef INT_FAST16_MIN
-#undef INT_FAST16_MAX
-#undef UINT_FAST16_MAX
-#define INT_FAST16_MIN INT_FAST32_MIN
-#define INT_FAST16_MAX INT_FAST32_MAX
-#define UINT_FAST16_MAX UINT_FAST32_MAX
-
-#undef INT_FAST32_MIN
-#undef INT_FAST32_MAX
-#undef UINT_FAST32_MAX
-#ifdef __sun
-# define INT_FAST32_MIN INT_MIN
-# define INT_FAST32_MAX INT_MAX
-# define UINT_FAST32_MAX UINT_MAX
-#else
-# define INT_FAST32_MIN LONG_MIN
-# define INT_FAST32_MAX LONG_MAX
-# define UINT_FAST32_MAX ULONG_MAX
-#endif
+# undef INT_FAST8_MIN
+# undef INT_FAST8_MAX
+# undef UINT_FAST8_MAX
+# define INT_FAST8_MIN SCHAR_MIN
+# define INT_FAST8_MAX SCHAR_MAX
+# define UINT_FAST8_MAX UCHAR_MAX
+
+# undef INT_FAST16_MIN
+# undef INT_FAST16_MAX
+# undef UINT_FAST16_MAX
+# define INT_FAST16_MIN INT_FAST32_MIN
+# define INT_FAST16_MAX INT_FAST32_MAX
+# define UINT_FAST16_MAX UINT_FAST32_MAX
+
+# undef INT_FAST32_MIN
+# undef INT_FAST32_MAX
+# undef UINT_FAST32_MAX
+# ifdef __sun
+# define INT_FAST32_MIN INT_MIN
+# define INT_FAST32_MAX INT_MAX
+# define UINT_FAST32_MAX UINT_MAX
+# else
+# define INT_FAST32_MIN LONG_MIN
+# define INT_FAST32_MAX LONG_MAX
+# define UINT_FAST32_MAX ULONG_MAX
+# endif
-#undef INT_FAST64_MIN
-#undef INT_FAST64_MAX
-#ifdef GL_INT64_T
-# define INT_FAST64_MIN INT64_MIN
-# define INT_FAST64_MAX INT64_MAX
-#endif
+# undef INT_FAST64_MIN
+# undef INT_FAST64_MAX
+# ifdef GL_INT64_T
+# define INT_FAST64_MIN INT64_MIN
+# define INT_FAST64_MAX INT64_MAX
+# endif
-#undef UINT_FAST64_MAX
-#ifdef GL_UINT64_T
-# define UINT_FAST64_MAX UINT64_MAX
-#endif
+# undef UINT_FAST64_MAX
+# ifdef GL_UINT64_T
+# define UINT_FAST64_MAX UINT64_MAX
+# endif
/* 7.18.2.4. Limits of integer types capable of holding object pointers */
-#undef INTPTR_MIN
-#undef INTPTR_MAX
-#undef UINTPTR_MAX
-#define INTPTR_MIN LONG_MIN
-#define INTPTR_MAX LONG_MAX
-#define UINTPTR_MAX ULONG_MAX
+# undef INTPTR_MIN
+# undef INTPTR_MAX
+# undef UINTPTR_MAX
+# define INTPTR_MIN LONG_MIN
+# define INTPTR_MAX LONG_MAX
+# define UINTPTR_MAX ULONG_MAX
/* 7.18.2.5. Limits of greatest-width integer types */
-#ifndef INTMAX_MAX
-# undef INTMAX_MIN
-# ifdef INT64_MAX
-# define INTMAX_MIN INT64_MIN
-# define INTMAX_MAX INT64_MAX
-# else
-# define INTMAX_MIN INT32_MIN
-# define INTMAX_MAX INT32_MAX
+# ifndef INTMAX_MAX
+# undef INTMAX_MIN
+# ifdef INT64_MAX
+# define INTMAX_MIN INT64_MIN
+# define INTMAX_MAX INT64_MAX
+# else
+# define INTMAX_MIN INT32_MIN
+# define INTMAX_MAX INT32_MAX
+# endif
# endif
-#endif
-#ifndef UINTMAX_MAX
-# ifdef UINT64_MAX
-# define UINTMAX_MAX UINT64_MAX
-# else
-# define UINTMAX_MAX UINT32_MAX
+# ifndef UINTMAX_MAX
+# ifdef UINT64_MAX
+# define UINTMAX_MAX UINT64_MAX
+# else
+# define UINTMAX_MAX UINT32_MAX
+# endif
# endif
-#endif
/* 7.18.3. Limits of other integer types */
/* ptrdiff_t limits */
-#undef PTRDIFF_MIN
-#undef PTRDIFF_MAX
-#if @APPLE_UNIVERSAL_BUILD@
-# ifdef _LP64
-# define PTRDIFF_MIN _STDINT_MIN (1, 64, 0l)
-# define PTRDIFF_MAX _STDINT_MAX (1, 64, 0l)
+# undef PTRDIFF_MIN
+# undef PTRDIFF_MAX
+# if @APPLE_UNIVERSAL_BUILD@
+# ifdef _LP64
+# define PTRDIFF_MIN _STDINT_MIN (1, 64, 0l)
+# define PTRDIFF_MAX _STDINT_MAX (1, 64, 0l)
+# else
+# define PTRDIFF_MIN _STDINT_MIN (1, 32, 0)
+# define PTRDIFF_MAX _STDINT_MAX (1, 32, 0)
+# endif
# else
-# define PTRDIFF_MIN _STDINT_MIN (1, 32, 0)
-# define PTRDIFF_MAX _STDINT_MAX (1, 32, 0)
-# endif
-#else
-# define PTRDIFF_MIN \
+# define PTRDIFF_MIN \
_STDINT_MIN (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@)
-# define PTRDIFF_MAX \
+# define PTRDIFF_MAX \
_STDINT_MAX (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@)
-#endif
+# endif
/* sig_atomic_t limits */
-#undef SIG_ATOMIC_MIN
-#undef SIG_ATOMIC_MAX
-#define SIG_ATOMIC_MIN \
+# undef SIG_ATOMIC_MIN
+# undef SIG_ATOMIC_MAX
+# define SIG_ATOMIC_MIN \
_STDINT_MIN (@HAVE_SIGNED_SIG_ATOMIC_T@, @BITSIZEOF_SIG_ATOMIC_T@, \
0@SIG_ATOMIC_T_SUFFIX@)
-#define SIG_ATOMIC_MAX \
+# define SIG_ATOMIC_MAX \
_STDINT_MAX (@HAVE_SIGNED_SIG_ATOMIC_T@, @BITSIZEOF_SIG_ATOMIC_T@, \
0@SIG_ATOMIC_T_SUFFIX@)
/* size_t limit */
-#undef SIZE_MAX
-#if @APPLE_UNIVERSAL_BUILD@
-# ifdef _LP64
-# define SIZE_MAX _STDINT_MAX (0, 64, 0ul)
+# undef SIZE_MAX
+# if @APPLE_UNIVERSAL_BUILD@
+# ifdef _LP64
+# define SIZE_MAX _STDINT_MAX (0, 64, 0ul)
+# else
+# define SIZE_MAX _STDINT_MAX (0, 32, 0ul)
+# endif
# else
-# define SIZE_MAX _STDINT_MAX (0, 32, 0ul)
+# define SIZE_MAX _STDINT_MAX (0, @BITSIZEOF_SIZE_T@, 0@SIZE_T_SUFFIX@)
# endif
-#else
-# define SIZE_MAX _STDINT_MAX (0, @BITSIZEOF_SIZE_T@, 0@SIZE_T_SUFFIX@)
-#endif
/* wchar_t limits */
/* Get WCHAR_MIN, WCHAR_MAX.
@@ -543,29 +554,29 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t)
sequence of nested includes
<wchar.h> -> <stdio.h> -> <getopt.h> -> <stdlib.h>, and the latter includes
<stdint.h> and assumes its types are already defined. */
-#if @HAVE_WCHAR_H@ && ! (defined WCHAR_MIN && defined WCHAR_MAX)
+# if @HAVE_WCHAR_H@ && ! (defined WCHAR_MIN && defined WCHAR_MAX)
/* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
included before <wchar.h>. */
-# include <stddef.h>
-# include <stdio.h>
-# include <time.h>
-# define _GL_JUST_INCLUDE_SYSTEM_WCHAR_H
-# include <wchar.h>
-# undef _GL_JUST_INCLUDE_SYSTEM_WCHAR_H
-#endif
-#undef WCHAR_MIN
-#undef WCHAR_MAX
-#define WCHAR_MIN \
+# include <stddef.h>
+# include <stdio.h>
+# include <time.h>
+# define _GL_JUST_INCLUDE_SYSTEM_WCHAR_H
+# include <wchar.h>
+# undef _GL_JUST_INCLUDE_SYSTEM_WCHAR_H
+# endif
+# undef WCHAR_MIN
+# undef WCHAR_MAX
+# define WCHAR_MIN \
_STDINT_MIN (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@)
-#define WCHAR_MAX \
+# define WCHAR_MAX \
_STDINT_MAX (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@)
/* wint_t limits */
-#undef WINT_MIN
-#undef WINT_MAX
-#define WINT_MIN \
+# undef WINT_MIN
+# undef WINT_MAX
+# define WINT_MIN \
_STDINT_MIN (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@)
-#define WINT_MAX \
+# define WINT_MAX \
_STDINT_MAX (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@)
/* 7.18.4. Macros for integer constants */
@@ -576,59 +587,120 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t)
/* Here we assume a standard architecture where the hardware integer
types have 8, 16, 32, optionally 64 bits, and int is 32 bits. */
-#undef INT8_C
-#undef UINT8_C
-#define INT8_C(x) x
-#define UINT8_C(x) x
-
-#undef INT16_C
-#undef UINT16_C
-#define INT16_C(x) x
-#define UINT16_C(x) x
-
-#undef INT32_C
-#undef UINT32_C
-#define INT32_C(x) x
-#define UINT32_C(x) x ## U
-
-#undef INT64_C
-#undef UINT64_C
-#if LONG_MAX >> 31 >> 31 == 1
-# define INT64_C(x) x##L
-#elif defined _MSC_VER
-# define INT64_C(x) x##i64
-#elif @HAVE_LONG_LONG_INT@
-# define INT64_C(x) x##LL
-#endif
-#if ULONG_MAX >> 31 >> 31 >> 1 == 1
-# define UINT64_C(x) x##UL
-#elif defined _MSC_VER
-# define UINT64_C(x) x##ui64
-#elif @HAVE_UNSIGNED_LONG_LONG_INT@
-# define UINT64_C(x) x##ULL
-#endif
+# undef INT8_C
+# undef UINT8_C
+# define INT8_C(x) x
+# define UINT8_C(x) x
+
+# undef INT16_C
+# undef UINT16_C
+# define INT16_C(x) x
+# define UINT16_C(x) x
+
+# undef INT32_C
+# undef UINT32_C
+# define INT32_C(x) x
+# define UINT32_C(x) x ## U
+
+# undef INT64_C
+# undef UINT64_C
+# if LONG_MAX >> 31 >> 31 == 1
+# define INT64_C(x) x##L
+# elif defined _MSC_VER
+# define INT64_C(x) x##i64
+# elif @HAVE_LONG_LONG_INT@
+# define INT64_C(x) x##LL
+# endif
+# if ULONG_MAX >> 31 >> 31 >> 1 == 1
+# define UINT64_C(x) x##UL
+# elif defined _MSC_VER
+# define UINT64_C(x) x##ui64
+# elif @HAVE_UNSIGNED_LONG_LONG_INT@
+# define UINT64_C(x) x##ULL
+# endif
/* 7.18.4.2. Macros for greatest-width integer constants */
-#ifndef INTMAX_C
-# if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
-# define INTMAX_C(x) x##LL
-# elif defined GL_INT64_T
-# define INTMAX_C(x) INT64_C(x)
-# else
-# define INTMAX_C(x) x##L
+# ifndef INTMAX_C
+# if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
+# define INTMAX_C(x) x##LL
+# elif defined GL_INT64_T
+# define INTMAX_C(x) INT64_C(x)
+# else
+# define INTMAX_C(x) x##L
+# endif
# endif
-#endif
-#ifndef UINTMAX_C
-# if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
-# define UINTMAX_C(x) x##ULL
-# elif defined GL_UINT64_T
-# define UINTMAX_C(x) UINT64_C(x)
-# else
-# define UINTMAX_C(x) x##UL
+# ifndef UINTMAX_C
+# if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
+# define UINTMAX_C(x) x##ULL
+# elif defined GL_UINT64_T
+# define UINTMAX_C(x) UINT64_C(x)
+# else
+# define UINTMAX_C(x) x##UL
+# endif
# endif
-#endif
+
+#endif /* !@HAVE_C99_STDINT_H@ */
+
+/* Macros specified by ISO/IEC TS 18661-1:2014. */
+
+#if (!defined UINTMAX_WIDTH \
+ && (defined _GNU_SOURCE || defined __STDC_WANT_IEC_60559_BFP_EXT__))
+# ifdef INT8_MAX
+# define INT8_WIDTH _GL_INTEGER_WIDTH (INT8_MIN, INT8_MAX)
+# endif
+# ifdef UINT8_MAX
+# define UINT8_WIDTH _GL_INTEGER_WIDTH (0, UINT8_MAX)
+# endif
+# ifdef INT16_MAX
+# define INT16_WIDTH _GL_INTEGER_WIDTH (INT16_MIN, INT16_MAX)
+# endif
+# ifdef UINT16_MAX
+# define UINT16_WIDTH _GL_INTEGER_WIDTH (0, UINT16_MAX)
+# endif
+# ifdef INT32_MAX
+# define INT32_WIDTH _GL_INTEGER_WIDTH (INT32_MIN, INT32_MAX)
+# endif
+# ifdef UINT32_MAX
+# define UINT32_WIDTH _GL_INTEGER_WIDTH (0, UINT32_MAX)
+# endif
+# ifdef INT64_MAX
+# define INT64_WIDTH _GL_INTEGER_WIDTH (INT64_MIN, INT64_MAX)
+# endif
+# ifdef UINT64_MAX
+# define UINT64_WIDTH _GL_INTEGER_WIDTH (0, UINT64_MAX)
+# endif
+# define INT_LEAST8_WIDTH _GL_INTEGER_WIDTH (INT_LEAST8_MIN, INT_LEAST8_MAX)
+# define UINT_LEAST8_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST8_MAX)
+# define INT_LEAST16_WIDTH _GL_INTEGER_WIDTH (INT_LEAST16_MIN, INT_LEAST16_MAX)
+# define UINT_LEAST16_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST16_MAX)
+# define INT_LEAST32_WIDTH _GL_INTEGER_WIDTH (INT_LEAST32_MIN, INT_LEAST32_MAX)
+# define UINT_LEAST32_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST32_MAX)
+# define INT_LEAST64_WIDTH _GL_INTEGER_WIDTH (INT_LEAST64_MIN, INT_LEAST64_MAX)
+# define UINT_LEAST64_WIDTH _GL_INTEGER_WIDTH (0, UINT_LEAST64_MAX)
+# define INT_FAST8_WIDTH _GL_INTEGER_WIDTH (INT_FAST8_MIN, INT_FAST8_MAX)
+# define UINT_FAST8_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST8_MAX)
+# define INT_FAST16_WIDTH _GL_INTEGER_WIDTH (INT_FAST16_MIN, INT_FAST16_MAX)
+# define UINT_FAST16_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST16_MAX)
+# define INT_FAST32_WIDTH _GL_INTEGER_WIDTH (INT_FAST32_MIN, INT_FAST32_MAX)
+# define UINT_FAST32_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST32_MAX)
+# define INT_FAST64_WIDTH _GL_INTEGER_WIDTH (INT_FAST64_MIN, INT_FAST64_MAX)
+# define UINT_FAST64_WIDTH _GL_INTEGER_WIDTH (0, UINT_FAST64_MAX)
+# define INTPTR_WIDTH _GL_INTEGER_WIDTH (INTPTR_MIN, INTPTR_MAX)
+# define UINTPTR_WIDTH _GL_INTEGER_WIDTH (0, UINTPTR_MAX)
+# define INTMAX_WIDTH _GL_INTEGER_WIDTH (INTMAX_MIN, INTMAX_MAX)
+# define UINTMAX_WIDTH _GL_INTEGER_WIDTH (0, UINTMAX_MAX)
+# define PTRDIFF_WIDTH _GL_INTEGER_WIDTH (PTRDIFF_MIN, PTRDIFF_MAX)
+# define SIZE_WIDTH _GL_INTEGER_WIDTH (0, SIZE_MAX)
+# define WCHAR_WIDTH _GL_INTEGER_WIDTH (WCHAR_MIN, WCHAR_MAX)
+# ifdef WINT_MAX
+# define WINT_WIDTH _GL_INTEGER_WIDTH (WINT_MIN, WINT_MAX)
+# endif
+# ifdef SIG_ATOMIC_MAX
+# define SIG_ATOMIC_WIDTH _GL_INTEGER_WIDTH (SIG_ATOMIC_MIN, SIG_ATOMIC_MAX)
+# endif
+#endif /* !WINT_WIDTH && (_GNU_SOURCE || __STDC_WANT_IEC_60559_BFP_EXT__) */
#endif /* _@GUARD_PREFIX@_STDINT_H */
#endif /* !(defined __ANDROID__ && ...) */
diff --git a/gl/stdio-impl.h b/gl/stdio-impl.h
index 987897a..75a945e 100644
--- a/gl/stdio-impl.h
+++ b/gl/stdio-impl.h
@@ -1,5 +1,5 @@
/* Implementation details of FILE streams.
- Copyright (C) 2007-2008, 2010-2016 Free Software Foundation, Inc.
+ Copyright (C) 2007-2008, 2010-2017 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -29,7 +29,7 @@
#include <errno.h> /* For detecting Plan9. */
#if defined __sferror || defined __DragonFly__ || defined __ANDROID__
- /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
+ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */
# if defined __DragonFly__ /* DragonFly */
/* See <http://www.dragonflybsd.org/cvsweb/src/lib/libc/stdio/priv_stdio.h?rev=HEAD&content-type=text/x-cvsweb-markup>. */
@@ -58,7 +58,7 @@
# define fp_ fp
# endif
-# if (defined __NetBSD__ && __NetBSD_Version__ >= 105270000) || defined __OpenBSD__ || defined __ANDROID__ /* NetBSD >= 1.5ZA, OpenBSD, Android */
+# if (defined __NetBSD__ && __NetBSD_Version__ >= 105270000) || defined __OpenBSD__ || defined __minix || defined __ANDROID__ /* NetBSD >= 1.5ZA, OpenBSD, Minix 3, Android */
/* See <http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/stdio/fileext.h?rev=HEAD&content-type=text/x-cvsweb-markup>
and <http://www.openbsd.org/cgi-bin/cvsweb/src/lib/libc/stdio/fileext.h?rev=HEAD&content-type=text/x-cvsweb-markup> */
struct __sfileext
@@ -110,4 +110,31 @@
# define _flag __flag
# endif
+#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* newer Windows with MSVC */
+
+/* <stdio.h> does not define the innards of FILE any more. */
+# define WINDOWS_OPAQUE_FILE
+
+struct _gl_real_FILE
+{
+ /* Note: Compared to older Windows and to mingw, it has the fields
+ _base and _cnt swapped. */
+ unsigned char *_ptr;
+ unsigned char *_base;
+ int _cnt;
+ int _flag;
+ int _file;
+ int _charbuf;
+ int _bufsiz;
+};
+# define fp_ ((struct _gl_real_FILE *) fp)
+
+/* These values were determined by a program similar to the one at
+ <http://lists.gnu.org/archive/html/bug-gnulib/2010-12/msg00165.html>. */
+# define _IOREAD 0x1
+# define _IOWRT 0x2
+# define _IORW 0x4
+# define _IOEOF 0x8
+# define _IOERR 0x10
+
#endif
diff --git a/gl/stdio.in.h b/gl/stdio.in.h
index 9b31365..d706377 100644
--- a/gl/stdio.in.h
+++ b/gl/stdio.in.h
@@ -1,6 +1,6 @@
/* A GNU-like <stdio.h>.
- Copyright (C) 2004, 2007-2016 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2007-2017 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
@@ -118,6 +118,26 @@
# include <unistd.h>
#endif
+/* MSVC declares 'perror' in <stdlib.h>, not in <stdio.h>. We must include
+ it before we #define perror rpl_perror. */
+/* But in any case avoid namespace pollution on glibc systems. */
+#if (@GNULIB_PERROR@ || defined GNULIB_POSIXCHECK) \
+ && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) \
+ && ! defined __GLIBC__
+# include <stdlib.h>
+#endif
+
+/* MSVC declares 'remove' in <io.h>, not in <stdio.h>. We must include
+ it before we #define remove rpl_remove. */
+/* MSVC declares 'rename' in <io.h>, not in <stdio.h>. We must include
+ it before we #define rename rpl_rename. */
+/* But in any case avoid namespace pollution on glibc systems. */
+#if (@GNULIB_REMOVE@ || @GNULIB_RENAME@ || defined GNULIB_POSIXCHECK) \
+ && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) \
+ && ! defined __GLIBC__
+# include <io.h>
+#endif
+
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
diff --git a/gl/stdlib.in.h b/gl/stdlib.in.h
index 70dc88d..b5cf9d3 100644
--- a/gl/stdlib.in.h
+++ b/gl/stdlib.in.h
@@ -1,6 +1,6 @@
/* A GNU-like <stdlib.h>.
- Copyright (C) 1995, 2001-2004, 2006-2016 Free Software Foundation, Inc.
+ Copyright (C) 1995, 2001-2004, 2006-2017 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
@@ -521,6 +521,9 @@ _GL_CXXALIASWARN (putenv);
#endif
#if @GNULIB_QSORT_R@
+/* Sort an array of NMEMB elements, starting at address BASE, each element
+ occupying SIZE bytes, in ascending order according to the comparison
+ function COMPARE. */
# if @REPLACE_QSORT_R@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef qsort_r
@@ -535,12 +538,24 @@ _GL_CXXALIAS_RPL (qsort_r, void, (void *base, size_t nmemb, size_t size,
void *),
void *arg));
# else
+# if !@HAVE_QSORT_R@
+_GL_FUNCDECL_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size,
+ int (*compare) (void const *, void const *,
+ void *),
+ void *arg) _GL_ARG_NONNULL ((1, 4)));
+# endif
_GL_CXXALIAS_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size,
int (*compare) (void const *, void const *,
void *),
void *arg));
# endif
_GL_CXXALIASWARN (qsort_r);
+#elif defined GNULIB_POSIXCHECK
+# undef qsort_r
+# if HAVE_RAW_DECL_QSORT_R
+_GL_WARN_ON_USE (qsort_r, "qsort_r is not portable - "
+ "use gnulib module qsort_r for portability");
+# endif
#endif
diff --git a/gl/sys_stat.in.h b/gl/sys_stat.in.h
index 72d9537..d5ca343 100644
--- a/gl/sys_stat.in.h
+++ b/gl/sys_stat.in.h
@@ -1,5 +1,5 @@
/* Provide a more complete sys/stat header file.
- Copyright (C) 2005-2016 Free Software Foundation, Inc.
+ Copyright (C) 2005-2017 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
diff --git a/gl/sys_time.in.h b/gl/sys_time.in.h
index 1623a1d..57739bc 100644
--- a/gl/sys_time.in.h
+++ b/gl/sys_time.in.h
@@ -1,6 +1,6 @@
/* Provide a more complete sys/time.h.
- Copyright (C) 2007-2016 Free Software Foundation, Inc.
+ Copyright (C) 2007-2017 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
@@ -109,6 +109,13 @@ _GL_CXXALIAS_SYS_CAST (gettimeofday, int,
(struct timeval *restrict, void *restrict));
# endif
_GL_CXXALIASWARN (gettimeofday);
+# if defined __cplusplus && defined GNULIB_NAMESPACE
+namespace GNULIB_NAMESPACE {
+ typedef ::timeval
+#undef timeval
+ timeval;
+}
+# endif
#elif defined GNULIB_POSIXCHECK
# undef gettimeofday
# if HAVE_RAW_DECL_GETTIMEOFDAY
diff --git a/gl/sys_types.in.h b/gl/sys_types.in.h
index 8ab0545..30ebfbd 100644
--- a/gl/sys_types.in.h
+++ b/gl/sys_types.in.h
@@ -1,6 +1,6 @@
/* Provide a more complete sys/types.h.
- Copyright (C) 2011-2016 Free Software Foundation, Inc.
+ Copyright (C) 2011-2017 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
diff --git a/gl/time.in.h b/gl/time.in.h
index 865c114..fef8980 100644
--- a/gl/time.in.h
+++ b/gl/time.in.h
@@ -1,6 +1,6 @@
/* A more-standard <time.h>.
- Copyright (C) 2007-2016 Free Software Foundation, Inc.
+ Copyright (C) 2007-2017 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
@@ -217,7 +217,7 @@ _GL_CXXALIAS_SYS (gmtime, struct tm *, (time_t const *__timer));
_GL_CXXALIASWARN (gmtime);
# endif
-/* Parse BUF as a time stamp, assuming FORMAT specifies its layout, and store
+/* Parse BUF as a timestamp, assuming FORMAT specifies its layout, and store
the resulting broken-down time into TM. See
<http://www.opengroup.org/susv3xsh/strptime.html>. */
# if @GNULIB_STRPTIME@
diff --git a/gl/timespec.h b/gl/timespec.h
index 601394b..a5eca79 100644
--- a/gl/timespec.h
+++ b/gl/timespec.h
@@ -1,6 +1,6 @@
/* timespec -- System time interface
- Copyright (C) 2000, 2002, 2004-2005, 2007, 2009-2016 Free Software
+ Copyright (C) 2000, 2002, 2004-2005, 2007, 2009-2017 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
@@ -29,7 +29,7 @@ _GL_INLINE_HEADER_BEGIN
# define _GL_TIMESPEC_INLINE _GL_INLINE
#endif
-/* Resolution of timespec time stamps (in units per second), and log
+/* Resolution of timespec timestamps (in units per second), and log
base 10 of the resolution. */
enum { TIMESPEC_RESOLUTION = 1000000000 };
@@ -48,7 +48,7 @@ make_timespec (time_t s, long int ns)
/* Return negative, zero, positive if A < B, A == B, A > B, respectively.
- For each time stamp T, this code assumes that either:
+ For each timestamp T, this code assumes that either:
* T.tv_nsec is in the range 0..999999999; or
* T.tv_sec corresponds to a valid leap second on a host that supports
@@ -56,7 +56,7 @@ make_timespec (time_t s, long int ns)
* T.tv_sec is the minimum time_t value and T.tv_nsec is -1; or
T.tv_sec is the maximum time_t value and T.tv_nsec is 2000000000.
This allows for special struct timespec values that are less or
- greater than all possible valid time stamps.
+ greater than all possible valid timestamps.
In all these cases, it is safe to subtract two tv_nsec values and
convert the result to integer without worrying about overflow on
diff --git a/gl/unistd.in.h b/gl/unistd.in.h
index c3af07a..d5fa34d 100644
--- a/gl/unistd.in.h
+++ b/gl/unistd.in.h
@@ -1,5 +1,5 @@
/* Substitute for and wrapper around <unistd.h>.
- Copyright (C) 2003-2016 Free Software Foundation, Inc.
+ Copyright (C) 2003-2017 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
@@ -55,9 +55,13 @@
#include <stddef.h>
/* mingw doesn't define the SEEK_* or *_FILENO macros in <unistd.h>. */
+/* MSVC declares 'unlink' in <stdio.h>, not in <unistd.h>. We must include
+ it before we #define unlink rpl_unlink. */
/* Cygwin 1.7.1 declares symlinkat in <stdio.h>, not in <unistd.h>. */
/* But avoid namespace pollution on glibc systems. */
#if (!(defined SEEK_CUR && defined SEEK_END && defined SEEK_SET) \
+ || ((@GNULIB_UNLINK@ || defined GNULIB_POSIXCHECK) \
+ && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)) \
|| ((@GNULIB_SYMLINKAT@ || defined GNULIB_POSIXCHECK) \
&& defined __CYGWIN__)) \
&& ! defined __GLIBC__
@@ -776,7 +780,7 @@ _GL_WARN_ON_USE (gethostname, "gethostname is unportable - "
${LOGNAME-$USER} on Unix platforms,
$USERNAME on native Windows platforms.
*/
-# if !@HAVE_GETLOGIN@
+# if !@HAVE_DECL_GETLOGIN@
_GL_FUNCDECL_SYS (getlogin, char *, (void));
# endif
_GL_CXXALIAS_SYS (getlogin, char *, (void));
diff --git a/gl/version-etc-fsf.c b/gl/version-etc-fsf.c
index baaebb6..6b6f582 100644
--- a/gl/version-etc-fsf.c
+++ b/gl/version-etc-fsf.c
@@ -1,5 +1,5 @@
/* Variable with FSF copyright information, for version-etc.
- Copyright (C) 1999-2006, 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 1999-2006, 2009-2017 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
diff --git a/gl/version-etc.c b/gl/version-etc.c
index a9a0fdb..ce84af3 100644
--- a/gl/version-etc.c
+++ b/gl/version-etc.c
@@ -1,5 +1,5 @@
/* Print --version and bug-reporting information in a consistent format.
- Copyright (C) 1999-2016 Free Software Foundation, Inc.
+ Copyright (C) 1999-2017 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
@@ -38,7 +38,7 @@
# define PACKAGE PACKAGE_TARNAME
#endif
-enum { COPYRIGHT_YEAR = 2016 };
+enum { COPYRIGHT_YEAR = 2017 };
/* The three functions below display the --version information the
standard way.
diff --git a/gl/version-etc.h b/gl/version-etc.h
index 1a5f603..b931de8 100644
--- a/gl/version-etc.h
+++ b/gl/version-etc.h
@@ -1,5 +1,5 @@
/* Print --version and bug-reporting information in a consistent format.
- Copyright (C) 1999, 2003, 2005, 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2003, 2005, 2009-2017 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