This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Import "glob" and "getcwd" modules from gnulib


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=6ec2e0f5bddc69d55e09fe56792edf7a109ff8ae

commit 6ec2e0f5bddc69d55e09fe56792edf7a109ff8ae
Author: Sergio Durigan Junior <sergiodj@redhat.com>
Date:   Fri Sep 8 20:09:12 2017 -0400

    Import "glob" and "getcwd" modules from gnulib
    
    These two modules are necessary because of the rework that will be
    done in the "change directory" logic on GDB/gdbserver in the next
    commits.
    
    First, we will get rid of the "gdb_dirbuf" global variable and instead
    rely on the fact that "getcwd (NULL, 0)", which is a GNU extension,
    returns a heap-allocated string with the necessary bytes to hold the
    full path.  This is a good practice not only because globals are not
    ideal but also because there is no good way to know beforehand the
    size of the full pathname allowed in the filesystem ("PATH_MAX" is not
    portable and does not reflect all the possible filesystems out there).
    
    We will also have a way to "cd" to a directory also on gdbserver, but
    in order to do that uniformly, there must be a way to do tilde
    expansion on directories provided by the user.  Currently, GDB uses
    "tilde_expand" from readline to do that, but gdbserver doesn't link
    against readline and therefore cannot use this function.  The solution
    is to use "glob" instead, which can perform tilde expansion as a GNU
    extension.  Therefore, we need gnulib's version of "glob".
    
    A special note is necessary for gdb/ser-tcp.c.  It defines "close" as
    "closesocket" on Win32 targets.  If we leave the code as is, this
    would conflict with gnulib's definition of "close".  Therefore, in
    order to keep the same code path from before this import, I decided to
    "#undef close" first, and then let the original (re)definition of it
    take place.
    
    gdb/ChangeLog:
    2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
    
    	* gnulib/aclocal.m4: Regenerate.
    	* gnulib/config.in: Regenerate.
    	* gnulib/configure: Regenerate.
    	* gnulib/import/Makefile.am: Regenerate.
    	* gnulib/import/Makefile.in: Regenerate.
    	* gnulib/import/assure.h: New file.
    	* gnulib/import/at-func.c: Likewise
    	* gnulib/import/chdir-long.c: New file.
    	* gnulib/import/chdir-long.h: New file.
    	* gnulib/import/cloexec.c: New file.
    	* gnulib/import/cloexec.h: New file.
    	* gnulib/import/close.c: New file.
    	* gnulib/import/closedir.c: New file.
    	* gnulib/import/dirent-private.h: New file.
    	* gnulib/import/dup-safer.c: New file.
    	* gnulib/import/dup.c: New file.
    	* gnulib/import/dup2.c: New file.
    	* gnulib/import/error.c: New file.
    	* gnulib/import/error.h: New file.
    	* gnulib/import/exitfail.c: New file.
    	* gnulib/import/exitfail.h: New file.
    	* gnulib/import/fchdir.c: New file.
    	* gnulib/import/fcntl.c: New file.
    	* gnulib/import/fcntl.in.h: New file.
    	* gnulib/import/fd-hook.c: New file.
    	* gnulib/import/fd-hook.h: New file.
    	* gnulib/import/fd-safer.c: New file.
    	* gnulib/import/fdopendir.c: New file.
    	* gnulib/import/filename.h: New file.
    	* gnulib/import/filenamecat-lgpl.c: New file.
    	* gnulib/import/filenamecat.h: New file.
    	* gnulib/import/fstat.c: New file.
    	* gnulib/import/fstatat.c: New file.
    	* gnulib/import/getcwd-lgpl.c: New file.
    	* gnulib/import/getcwd.c: New file.
    	* gnulib/import/getdtablesize.c: New file.
    	* gnulib/import/getlogin_r.c: New file.
    	* gnulib/import/getprogname.c: New file.
    	* gnulib/import/getprogname.h: New file.
    	* gnulib/import/gettext.h: New file.
    	* gnulib/import/glob-libc.h: New file.
    	* gnulib/import/glob.c: New file.
    	* gnulib/import/glob.in.h: New file.
    	* gnulib/import/intprops.h: New file.
    	* gnulib/import/m4/chdir-long.m4: New file.
    	* gnulib/import/m4/close.m4: New file.
    	* gnulib/import/m4/closedir.m4: New file.
    	* gnulib/import/m4/d-ino.m4: New file.
    	* gnulib/import/m4/d-type.m4: New file.
    	* gnulib/import/m4/dup.m4: New file.
    	* gnulib/import/m4/dup2.m4: New file.
    	* gnulib/import/m4/error.m4: New file.
    	* gnulib/import/m4/fchdir.m4: New file.
    	* gnulib/import/m4/fcntl.m4: New file.
    	* gnulib/import/m4/fcntl_h.m4: New file.
    	* gnulib/import/m4/fdopendir.m4: New file.
    	* gnulib/import/m4/filenamecat.m4: New file.
    	* gnulib/import/m4/fstat.m4: New file.
    	* gnulib/import/m4/fstatat.m4: New file.
    	* gnulib/import/m4/getcwd-abort-bug.m4: New file.
    	* gnulib/import/m4/getcwd-path-max.m4: New file.
    	* gnulib/import/m4/getcwd.m4: New file.
    	* gnulib/import/m4/getdtablesize.m4: New file.
    	* gnulib/import/m4/getlogin_r.m4: New file.
    	* gnulib/import/m4/getprogname.m4: New file.
    	* gnulib/import/m4/glob.m4: New file.
    	* gnulib/import/m4/gnulib-cache.m4: Regenerate.
    	* gnulib/import/m4/gnulib-comp.m4: Regenerate.
    	* gnulib/import/m4/mempcpy.m4: New file.
    	* gnulib/import/m4/memrchr.m4: New file.
    	* gnulib/import/m4/mode_t.m4: New file.
    	* gnulib/import/m4/msvc-inval.m4: New file.
    	* gnulib/import/m4/msvc-nothrow.m4: New file.
    	* gnulib/import/m4/open.m4: New file.
    	* gnulib/import/m4/openat.m4: New file.
    	* gnulib/import/m4/opendir.m4: New file.
    	* gnulib/import/m4/readdir.m4: New file.
    	* gnulib/import/m4/realloc.m4: New file.
    	* gnulib/import/m4/rewinddir.m4: New file.
    	* gnulib/import/m4/save-cwd.m4: New file.
    	* gnulib/import/m4/strdup.m4: New file.
    	* gnulib/import/m4/strerror.m4: New file.
    	* gnulib/import/m4/unistd-safer.m4: New file.
    	* gnulib/import/mempcpy.c: New file.
    	* gnulib/import/memrchr.c: New file.
    	* gnulib/import/msvc-inval.c: New file.
    	* gnulib/import/msvc-inval.h: New file.
    	* gnulib/import/msvc-nothrow.c: New file.
    	* gnulib/import/msvc-nothrow.h: New file.
    	* gnulib/import/open.c: New file.
    	* gnulib/import/openat-die.c: New file.
    	* gnulib/import/openat-priv.h: New file.
    	* gnulib/import/openat-proc.c: New file.
    	* gnulib/import/openat.c: New file.
    	* gnulib/import/openat.h: New file.
    	* gnulib/import/opendir.c: New file.
    	* gnulib/import/pipe-safer.c: New file.
    	* gnulib/import/readdir.c: New file.
    	* gnulib/import/realloc.c: New file.
    	* gnulib/import/rewinddir.c: New file.
    	* gnulib/import/save-cwd.c: New file.
    	* gnulib/import/save-cwd.h: New file.
    	* gnulib/import/strdup.c: New file.
    	* gnulib/import/strerror-override.c: New file.
    	* gnulib/import/strerror-override.h: New file.
    	* gnulib/import/strerror.c: New file.
    	* gnulib/import/unistd--.h: New file.
    	* gnulib/import/unistd-safer.h: New file.
    	* gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
    	"getcwd" and "glob".
    	* ser-tcp.c: Undefine "close" before redefining it.

Diff:
---
 gdb/ChangeLog                            |   114 +
 gdb/gnulib/aclocal.m4                    |    37 +
 gdb/gnulib/config.in                     |   267 +
 gdb/gnulib/configure                     | 12423 +++++++++++++++++++----------
 gdb/gnulib/import/Makefile.am            |   421 +-
 gdb/gnulib/import/Makefile.in            |   236 +-
 gdb/gnulib/import/assure.h               |    37 +
 gdb/gnulib/import/at-func.c              |   146 +
 gdb/gnulib/import/chdir-long.c           |   264 +
 gdb/gnulib/import/chdir-long.h           |    30 +
 gdb/gnulib/import/cloexec.c              |    83 +
 gdb/gnulib/import/cloexec.h              |    38 +
 gdb/gnulib/import/close.c                |    69 +
 gdb/gnulib/import/closedir.c             |    71 +
 gdb/gnulib/import/dirent-private.h       |    40 +
 gdb/gnulib/import/dup-safer.c            |    34 +
 gdb/gnulib/import/dup.c                  |    86 +
 gdb/gnulib/import/dup2.c                 |   215 +
 gdb/gnulib/import/error.c                |   406 +
 gdb/gnulib/import/error.h                |    75 +
 gdb/gnulib/import/exitfail.c             |    24 +
 gdb/gnulib/import/exitfail.h             |    18 +
 gdb/gnulib/import/fchdir.c               |   208 +
 gdb/gnulib/import/fcntl.c                |   414 +
 gdb/gnulib/import/fcntl.in.h             |   363 +
 gdb/gnulib/import/fd-hook.c              |   116 +
 gdb/gnulib/import/fd-hook.h              |   119 +
 gdb/gnulib/import/fd-safer.c             |    49 +
 gdb/gnulib/import/fdopendir.c            |   249 +
 gdb/gnulib/import/filename.h             |    54 +
 gdb/gnulib/import/filenamecat-lgpl.c     |    88 +
 gdb/gnulib/import/filenamecat.h          |    27 +
 gdb/gnulib/import/fstat.c                |    88 +
 gdb/gnulib/import/fstatat.c              |   135 +
 gdb/gnulib/import/getcwd-lgpl.c          |   126 +
 gdb/gnulib/import/getcwd.c               |   446 ++
 gdb/gnulib/import/getdtablesize.c        |   121 +
 gdb/gnulib/import/getlogin_r.c           |    87 +
 gdb/gnulib/import/getprogname.c          |   151 +
 gdb/gnulib/import/getprogname.h          |    40 +
 gdb/gnulib/import/gettext.h              |   292 +
 gdb/gnulib/import/glob-libc.h            |   212 +
 gdb/gnulib/import/glob.c                 |  1808 +++++
 gdb/gnulib/import/glob.in.h              |    93 +
 gdb/gnulib/import/intprops.h             |   464 ++
 gdb/gnulib/import/m4/chdir-long.m4       |    30 +
 gdb/gnulib/import/m4/close.m4            |    33 +
 gdb/gnulib/import/m4/closedir.m4         |    30 +
 gdb/gnulib/import/m4/d-ino.m4            |    56 +
 gdb/gnulib/import/m4/d-type.m4           |    32 +
 gdb/gnulib/import/m4/dup.m4              |    45 +
 gdb/gnulib/import/m4/dup2.m4             |   117 +
 gdb/gnulib/import/m4/error.m4            |    27 +
 gdb/gnulib/import/m4/fchdir.m4           |    61 +
 gdb/gnulib/import/m4/fcntl.m4            |   126 +
 gdb/gnulib/import/m4/fcntl_h.m4          |    50 +
 gdb/gnulib/import/m4/fdopendir.m4        |    61 +
 gdb/gnulib/import/m4/filenamecat.m4      |    16 +
 gdb/gnulib/import/m4/fstat.m4            |    36 +
 gdb/gnulib/import/m4/fstatat.m4          |    60 +
 gdb/gnulib/import/m4/getcwd-abort-bug.m4 |   140 +
 gdb/gnulib/import/m4/getcwd-path-max.m4  |   217 +
 gdb/gnulib/import/m4/getcwd.m4           |   162 +
 gdb/gnulib/import/m4/getdtablesize.m4    |    46 +
 gdb/gnulib/import/m4/getlogin_r.m4       |    88 +
 gdb/gnulib/import/m4/getprogname.m4      |    43 +
 gdb/gnulib/import/m4/glob.m4             |    76 +
 gdb/gnulib/import/m4/gnulib-cache.m4     |     4 +-
 gdb/gnulib/import/m4/gnulib-comp.m4      |   317 +
 gdb/gnulib/import/m4/mempcpy.m4          |    26 +
 gdb/gnulib/import/m4/memrchr.m4          |    23 +
 gdb/gnulib/import/m4/mode_t.m4           |    26 +
 gdb/gnulib/import/m4/msvc-inval.m4       |    19 +
 gdb/gnulib/import/m4/msvc-nothrow.m4     |    10 +
 gdb/gnulib/import/m4/open.m4             |    91 +
 gdb/gnulib/import/m4/openat.m4           |    36 +
 gdb/gnulib/import/m4/opendir.m4          |    31 +
 gdb/gnulib/import/m4/readdir.m4          |    15 +
 gdb/gnulib/import/m4/realloc.m4          |    79 +
 gdb/gnulib/import/m4/rewinddir.m4        |    15 +
 gdb/gnulib/import/m4/save-cwd.m4         |    11 +
 gdb/gnulib/import/m4/strdup.m4           |    36 +
 gdb/gnulib/import/m4/strerror.m4         |    96 +
 gdb/gnulib/import/m4/unistd-safer.m4     |    10 +
 gdb/gnulib/import/mempcpy.c              |    28 +
 gdb/gnulib/import/memrchr.c              |   161 +
 gdb/gnulib/import/msvc-inval.c           |   129 +
 gdb/gnulib/import/msvc-inval.h           |   222 +
 gdb/gnulib/import/msvc-nothrow.c         |    49 +
 gdb/gnulib/import/msvc-nothrow.h         |    43 +
 gdb/gnulib/import/open.c                 |   181 +
 gdb/gnulib/import/openat-die.c           |    62 +
 gdb/gnulib/import/openat-priv.h          |    64 +
 gdb/gnulib/import/openat-proc.c          |   134 +
 gdb/gnulib/import/openat.c               |   286 +
 gdb/gnulib/import/openat.h               |   123 +
 gdb/gnulib/import/opendir.c              |   169 +
 gdb/gnulib/import/pipe-safer.c           |    56 +
 gdb/gnulib/import/readdir.c              |    98 +
 gdb/gnulib/import/realloc.c              |    79 +
 gdb/gnulib/import/rewinddir.c            |    49 +
 gdb/gnulib/import/save-cwd.c             |    99 +
 gdb/gnulib/import/save-cwd.h             |    34 +
 gdb/gnulib/import/strdup.c               |    54 +
 gdb/gnulib/import/strerror-override.c    |   302 +
 gdb/gnulib/import/strerror-override.h    |    56 +
 gdb/gnulib/import/strerror.c             |    70 +
 gdb/gnulib/import/unistd--.h             |    32 +
 gdb/gnulib/import/unistd-safer.h         |    31 +
 gdb/gnulib/update-gnulib.sh              |     2 +
 gdb/ser-tcp.c                            |     4 +
 111 files changed, 21441 insertions(+), 4457 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 3edc4fc..1bbf2b8 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,117 @@
+2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
+
+	* gnulib/aclocal.m4: Regenerate.
+	* gnulib/config.in: Regenerate.
+	* gnulib/configure: Regenerate.
+	* gnulib/import/Makefile.am: Regenerate.
+	* gnulib/import/Makefile.in: Regenerate.
+	* gnulib/import/assure.h: New file.
+	* gnulib/import/at-func.c: Likewise
+	* gnulib/import/chdir-long.c: New file.
+	* gnulib/import/chdir-long.h: New file.
+	* gnulib/import/cloexec.c: New file.
+	* gnulib/import/cloexec.h: New file.
+	* gnulib/import/close.c: New file.
+	* gnulib/import/closedir.c: New file.
+	* gnulib/import/dirent-private.h: New file.
+	* gnulib/import/dup-safer.c: New file.
+	* gnulib/import/dup.c: New file.
+	* gnulib/import/dup2.c: New file.
+	* gnulib/import/error.c: New file.
+	* gnulib/import/error.h: New file.
+	* gnulib/import/exitfail.c: New file.
+	* gnulib/import/exitfail.h: New file.
+	* gnulib/import/fchdir.c: New file.
+	* gnulib/import/fcntl.c: New file.
+	* gnulib/import/fcntl.in.h: New file.
+	* gnulib/import/fd-hook.c: New file.
+	* gnulib/import/fd-hook.h: New file.
+	* gnulib/import/fd-safer.c: New file.
+	* gnulib/import/fdopendir.c: New file.
+	* gnulib/import/filename.h: New file.
+	* gnulib/import/filenamecat-lgpl.c: New file.
+	* gnulib/import/filenamecat.h: New file.
+	* gnulib/import/fstat.c: New file.
+	* gnulib/import/fstatat.c: New file.
+	* gnulib/import/getcwd-lgpl.c: New file.
+	* gnulib/import/getcwd.c: New file.
+	* gnulib/import/getdtablesize.c: New file.
+	* gnulib/import/getlogin_r.c: New file.
+	* gnulib/import/getprogname.c: New file.
+	* gnulib/import/getprogname.h: New file.
+	* gnulib/import/gettext.h: New file.
+	* gnulib/import/glob-libc.h: New file.
+	* gnulib/import/glob.c: New file.
+	* gnulib/import/glob.in.h: New file.
+	* gnulib/import/intprops.h: New file.
+	* gnulib/import/m4/chdir-long.m4: New file.
+	* gnulib/import/m4/close.m4: New file.
+	* gnulib/import/m4/closedir.m4: New file.
+	* gnulib/import/m4/d-ino.m4: New file.
+	* gnulib/import/m4/d-type.m4: New file.
+	* gnulib/import/m4/dup.m4: New file.
+	* gnulib/import/m4/dup2.m4: New file.
+	* gnulib/import/m4/error.m4: New file.
+	* gnulib/import/m4/fchdir.m4: New file.
+	* gnulib/import/m4/fcntl.m4: New file.
+	* gnulib/import/m4/fcntl_h.m4: New file.
+	* gnulib/import/m4/fdopendir.m4: New file.
+	* gnulib/import/m4/filenamecat.m4: New file.
+	* gnulib/import/m4/fstat.m4: New file.
+	* gnulib/import/m4/fstatat.m4: New file.
+	* gnulib/import/m4/getcwd-abort-bug.m4: New file.
+	* gnulib/import/m4/getcwd-path-max.m4: New file.
+	* gnulib/import/m4/getcwd.m4: New file.
+	* gnulib/import/m4/getdtablesize.m4: New file.
+	* gnulib/import/m4/getlogin_r.m4: New file.
+	* gnulib/import/m4/getprogname.m4: New file.
+	* gnulib/import/m4/glob.m4: New file.
+	* gnulib/import/m4/gnulib-cache.m4: Regenerate.
+	* gnulib/import/m4/gnulib-comp.m4: Regenerate.
+	* gnulib/import/m4/mempcpy.m4: New file.
+	* gnulib/import/m4/memrchr.m4: New file.
+	* gnulib/import/m4/mode_t.m4: New file.
+	* gnulib/import/m4/msvc-inval.m4: New file.
+	* gnulib/import/m4/msvc-nothrow.m4: New file.
+	* gnulib/import/m4/open.m4: New file.
+	* gnulib/import/m4/openat.m4: New file.
+	* gnulib/import/m4/opendir.m4: New file.
+	* gnulib/import/m4/readdir.m4: New file.
+	* gnulib/import/m4/realloc.m4: New file.
+	* gnulib/import/m4/rewinddir.m4: New file.
+	* gnulib/import/m4/save-cwd.m4: New file.
+	* gnulib/import/m4/strdup.m4: New file.
+	* gnulib/import/m4/strerror.m4: New file.
+	* gnulib/import/m4/unistd-safer.m4: New file.
+	* gnulib/import/mempcpy.c: New file.
+	* gnulib/import/memrchr.c: New file.
+	* gnulib/import/msvc-inval.c: New file.
+	* gnulib/import/msvc-inval.h: New file.
+	* gnulib/import/msvc-nothrow.c: New file.
+	* gnulib/import/msvc-nothrow.h: New file.
+	* gnulib/import/open.c: New file.
+	* gnulib/import/openat-die.c: New file.
+	* gnulib/import/openat-priv.h: New file.
+	* gnulib/import/openat-proc.c: New file.
+	* gnulib/import/openat.c: New file.
+	* gnulib/import/openat.h: New file.
+	* gnulib/import/opendir.c: New file.
+	* gnulib/import/pipe-safer.c: New file.
+	* gnulib/import/readdir.c: New file.
+	* gnulib/import/realloc.c: New file.
+	* gnulib/import/rewinddir.c: New file.
+	* gnulib/import/save-cwd.c: New file.
+	* gnulib/import/save-cwd.h: New file.
+	* gnulib/import/strdup.c: New file.
+	* gnulib/import/strerror-override.c: New file.
+	* gnulib/import/strerror-override.h: New file.
+	* gnulib/import/strerror.c: New file.
+	* gnulib/import/unistd--.h: New file.
+	* gnulib/import/unistd-safer.h: New file.
+	* gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
+	"getcwd" and "glob".
+	* ser-tcp.c: Undefine "close" before redefining it.
+
 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
 
 	* guile/scm-value.c (gdbscm_value_address): Initialize address,
diff --git a/gdb/gnulib/aclocal.m4 b/gdb/gnulib/aclocal.m4
index a4ce6a6..e725bf4 100644
--- a/gdb/gnulib/aclocal.m4
+++ b/gdb/gnulib/aclocal.m4
@@ -1016,28 +1016,50 @@ m4_include([import/m4/00gnulib.m4])
 m4_include([import/m4/absolute-header.m4])
 m4_include([import/m4/alloca.m4])
 m4_include([import/m4/canonicalize.m4])
+m4_include([import/m4/chdir-long.m4])
+m4_include([import/m4/close.m4])
+m4_include([import/m4/closedir.m4])
 m4_include([import/m4/codeset.m4])
 m4_include([import/m4/configmake.m4])
+m4_include([import/m4/d-ino.m4])
+m4_include([import/m4/d-type.m4])
 m4_include([import/m4/dirent_h.m4])
 m4_include([import/m4/dirfd.m4])
 m4_include([import/m4/dirname.m4])
 m4_include([import/m4/double-slash-root.m4])
+m4_include([import/m4/dup.m4])
+m4_include([import/m4/dup2.m4])
 m4_include([import/m4/eealloc.m4])
 m4_include([import/m4/environ.m4])
 m4_include([import/m4/errno_h.m4])
+m4_include([import/m4/error.m4])
 m4_include([import/m4/exponentd.m4])
 m4_include([import/m4/exponentl.m4])
 m4_include([import/m4/extensions.m4])
 m4_include([import/m4/extern-inline.m4])
+m4_include([import/m4/fchdir.m4])
 m4_include([import/m4/fcntl-o.m4])
+m4_include([import/m4/fcntl.m4])
+m4_include([import/m4/fcntl_h.m4])
+m4_include([import/m4/fdopendir.m4])
+m4_include([import/m4/filenamecat.m4])
 m4_include([import/m4/flexmember.m4])
 m4_include([import/m4/float_h.m4])
 m4_include([import/m4/fnmatch.m4])
 m4_include([import/m4/fpieee.m4])
 m4_include([import/m4/frexp.m4])
 m4_include([import/m4/frexpl.m4])
+m4_include([import/m4/fstat.m4])
+m4_include([import/m4/fstatat.m4])
+m4_include([import/m4/getcwd-abort-bug.m4])
+m4_include([import/m4/getcwd-path-max.m4])
+m4_include([import/m4/getcwd.m4])
+m4_include([import/m4/getdtablesize.m4])
+m4_include([import/m4/getlogin_r.m4])
+m4_include([import/m4/getprogname.m4])
 m4_include([import/m4/gettimeofday.m4])
 m4_include([import/m4/glibc21.m4])
+m4_include([import/m4/glob.m4])
 m4_include([import/m4/gnulib-common.m4])
 m4_include([import/m4/gnulib-comp.m4])
 m4_include([import/m4/hard-locale.m4])
@@ -1063,15 +1085,27 @@ m4_include([import/m4/mbsrtowcs.m4])
 m4_include([import/m4/mbstate_t.m4])
 m4_include([import/m4/memchr.m4])
 m4_include([import/m4/memmem.m4])
+m4_include([import/m4/mempcpy.m4])
+m4_include([import/m4/memrchr.m4])
 m4_include([import/m4/mmap-anon.m4])
+m4_include([import/m4/mode_t.m4])
+m4_include([import/m4/msvc-inval.m4])
+m4_include([import/m4/msvc-nothrow.m4])
 m4_include([import/m4/multiarch.m4])
 m4_include([import/m4/nocrash.m4])
 m4_include([import/m4/off_t.m4])
+m4_include([import/m4/open.m4])
+m4_include([import/m4/openat.m4])
+m4_include([import/m4/opendir.m4])
 m4_include([import/m4/pathmax.m4])
 m4_include([import/m4/rawmemchr.m4])
+m4_include([import/m4/readdir.m4])
 m4_include([import/m4/readlink.m4])
+m4_include([import/m4/realloc.m4])
 m4_include([import/m4/rename.m4])
+m4_include([import/m4/rewinddir.m4])
 m4_include([import/m4/rmdir.m4])
+m4_include([import/m4/save-cwd.m4])
 m4_include([import/m4/setenv.m4])
 m4_include([import/m4/signal_h.m4])
 m4_include([import/m4/ssize_t.m4])
@@ -1082,6 +1116,8 @@ m4_include([import/m4/stdint.m4])
 m4_include([import/m4/stdio_h.m4])
 m4_include([import/m4/stdlib_h.m4])
 m4_include([import/m4/strchrnul.m4])
+m4_include([import/m4/strdup.m4])
+m4_include([import/m4/strerror.m4])
 m4_include([import/m4/string_h.m4])
 m4_include([import/m4/strstr.m4])
 m4_include([import/m4/strtok_r.m4])
@@ -1090,6 +1126,7 @@ m4_include([import/m4/sys_stat_h.m4])
 m4_include([import/m4/sys_time_h.m4])
 m4_include([import/m4/sys_types_h.m4])
 m4_include([import/m4/time_h.m4])
+m4_include([import/m4/unistd-safer.m4])
 m4_include([import/m4/unistd_h.m4])
 m4_include([import/m4/warn-on-use.m4])
 m4_include([import/m4/wchar_h.m4])
diff --git a/gdb/gnulib/config.in b/gdb/gnulib/config.in
index 6061520..e000f76 100644
--- a/gdb/gnulib/config.in
+++ b/gdb/gnulib/config.in
@@ -49,6 +49,12 @@
 /* Define to 1 if // is a file system root distinct from /. */
 #undef DOUBLE_SLASH_IS_DISTINCT_ROOT
 
+/* Define if struct dirent has a member d_ino that actually works. */
+#undef D_INO_IN_DIRENT
+
+/* Define this to 1 if F_DUPFD behavior does not match POSIX */
+#undef FCNTL_DUPFD_BUGGY
+
 /* Define to nothing if C supports flexible array members, and to 1 if it does
    not. That way, with a declaration like 'struct s { int n; double
    d[FLEXIBLE_ARRAY_MEMBER]; };', the struct hack can be used with pre-C99
@@ -74,9 +80,21 @@
 #undef GNULIB_CANONICALIZE_LGPL
 
 /* Define to a C preprocessor expression that evaluates to 1 or 0, depending
+   whether the gnulib module fdopendir shall be considered present. */
+#undef GNULIB_FDOPENDIR
+
+/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
    whether the gnulib module fscanf shall be considered present. */
 #undef GNULIB_FSCANF
 
+/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
+   whether the gnulib module getcwd shall be considered present. */
+#undef GNULIB_GETCWD
+
+/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
+   whether the gnulib module openat shall be considered present. */
+#undef GNULIB_OPENAT
+
 /* Define to 1 if printf and friends should be labeled with attribute
    "__gnu_printf__" instead of "__printf__" */
 #undef GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU
@@ -85,6 +103,10 @@
    whether the gnulib module scanf shall be considered present. */
 #undef GNULIB_SCANF
 
+/* Define to a C preprocessor expression that evaluates to 1 or 0, depending
+   whether the gnulib module strerror shall be considered present. */
+#undef GNULIB_STRERROR
+
 /* Define to 1 when the gnulib module canonicalize_file_name should be tested.
    */
 #undef GNULIB_TEST_CANONICALIZE_FILE_NAME
@@ -92,18 +114,57 @@
 /* Define to 1 when the gnulib module chdir should be tested. */
 #undef GNULIB_TEST_CHDIR
 
+/* Define to 1 when the gnulib module cloexec should be tested. */
+#undef GNULIB_TEST_CLOEXEC
+
+/* Define to 1 when the gnulib module close should be tested. */
+#undef GNULIB_TEST_CLOSE
+
+/* Define to 1 when the gnulib module closedir should be tested. */
+#undef GNULIB_TEST_CLOSEDIR
+
 /* Define to 1 when the gnulib module dirfd should be tested. */
 #undef GNULIB_TEST_DIRFD
 
+/* Define to 1 when the gnulib module dup should be tested. */
+#undef GNULIB_TEST_DUP
+
+/* Define to 1 when the gnulib module dup2 should be tested. */
+#undef GNULIB_TEST_DUP2
+
 /* Define to 1 when the gnulib module environ should be tested. */
 #undef GNULIB_TEST_ENVIRON
 
+/* Define to 1 when the gnulib module fchdir should be tested. */
+#undef GNULIB_TEST_FCHDIR
+
+/* Define to 1 when the gnulib module fcntl should be tested. */
+#undef GNULIB_TEST_FCNTL
+
+/* Define to 1 when the gnulib module fdopendir should be tested. */
+#undef GNULIB_TEST_FDOPENDIR
+
 /* Define to 1 when the gnulib module frexp should be tested. */
 #undef GNULIB_TEST_FREXP
 
 /* Define to 1 when the gnulib module frexpl should be tested. */
 #undef GNULIB_TEST_FREXPL
 
+/* Define to 1 when the gnulib module fstat should be tested. */
+#undef GNULIB_TEST_FSTAT
+
+/* Define to 1 when the gnulib module fstatat should be tested. */
+#undef GNULIB_TEST_FSTATAT
+
+/* Define to 1 when the gnulib module getcwd should be tested. */
+#undef GNULIB_TEST_GETCWD
+
+/* Define to 1 when the gnulib module getdtablesize should be tested. */
+#undef GNULIB_TEST_GETDTABLESIZE
+
+/* Define to 1 when the gnulib module getlogin_r should be tested. */
+#undef GNULIB_TEST_GETLOGIN_R
+
 /* Define to 1 when the gnulib module gettimeofday should be tested. */
 #undef GNULIB_TEST_GETTIMEOFDAY
 
@@ -128,18 +189,42 @@
 /* Define to 1 when the gnulib module memmem should be tested. */
 #undef GNULIB_TEST_MEMMEM
 
+/* Define to 1 when the gnulib module mempcpy should be tested. */
+#undef GNULIB_TEST_MEMPCPY
+
+/* Define to 1 when the gnulib module memrchr should be tested. */
+#undef GNULIB_TEST_MEMRCHR
+
+/* Define to 1 when the gnulib module open should be tested. */
+#undef GNULIB_TEST_OPEN
+
+/* Define to 1 when the gnulib module openat should be tested. */
+#undef GNULIB_TEST_OPENAT
+
+/* Define to 1 when the gnulib module opendir should be tested. */
+#undef GNULIB_TEST_OPENDIR
+
 /* Define to 1 when the gnulib module rawmemchr should be tested. */
 #undef GNULIB_TEST_RAWMEMCHR
 
+/* Define to 1 when the gnulib module readdir should be tested. */
+#undef GNULIB_TEST_READDIR
+
 /* Define to 1 when the gnulib module readlink should be tested. */
 #undef GNULIB_TEST_READLINK
 
+/* Define to 1 when the gnulib module realloc-posix should be tested. */
+#undef GNULIB_TEST_REALLOC_POSIX
+
 /* Define to 1 when the gnulib module realpath should be tested. */
 #undef GNULIB_TEST_REALPATH
 
 /* Define to 1 when the gnulib module rename should be tested. */
 #undef GNULIB_TEST_RENAME
 
+/* Define to 1 when the gnulib module rewinddir should be tested. */
+#undef GNULIB_TEST_REWINDDIR
+
 /* Define to 1 when the gnulib module rmdir should be tested. */
 #undef GNULIB_TEST_RMDIR
 
@@ -152,6 +237,12 @@
 /* Define to 1 when the gnulib module strchrnul should be tested. */
 #undef GNULIB_TEST_STRCHRNUL
 
+/* Define to 1 when the gnulib module strdup should be tested. */
+#undef GNULIB_TEST_STRDUP
+
+/* Define to 1 when the gnulib module strerror should be tested. */
+#undef GNULIB_TEST_STRERROR
+
 /* Define to 1 when the gnulib module strstr should be tested. */
 #undef GNULIB_TEST_STRSTR
 
@@ -178,6 +269,9 @@
 /* Define to 1 if you have the `canonicalize_file_name' function. */
 #undef HAVE_CANONICALIZE_FILE_NAME
 
+/* Define to 1 if you have the `closedir' function. */
+#undef HAVE_CLOSEDIR
+
 /* Define to 1 if you have the declaration of `alarm', and to 0 if you don't.
    */
 #undef HAVE_DECL_ALARM
@@ -186,10 +280,34 @@
    */
 #undef HAVE_DECL_DIRFD
 
+/* Define to 1 if you have the declaration of `fchdir', and to 0 if you don't.
+   */
+#undef HAVE_DECL_FCHDIR
+
+/* Define to 1 if you have the declaration of `fdopendir', and to 0 if you
+   don't. */
+#undef HAVE_DECL_FDOPENDIR
+
+/* Define to 1 if you have the declaration of `getcwd', and to 0 if you don't.
+   */
+#undef HAVE_DECL_GETCWD
+
 /* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you
    don't. */
 #undef HAVE_DECL_GETC_UNLOCKED
 
+/* Define to 1 if you have the declaration of `getdtablesize', and to 0 if you
+   don't. */
+#undef HAVE_DECL_GETDTABLESIZE
+
+/* Define to 1 if you have the declaration of `getlogin', and to 0 if you
+   don't. */
+#undef HAVE_DECL_GETLOGIN
+
+/* Define to 1 if you have the declaration of `getlogin_r', and to 0 if you
+   don't. */
+#undef HAVE_DECL_GETLOGIN_R
+
 /* Define to 1 if you have the declaration of `isblank', and to 0 if you
    don't. */
 #undef HAVE_DECL_ISBLANK
@@ -210,10 +328,30 @@
    */
 #undef HAVE_DECL_MEMMEM
 
+/* Define to 1 if you have the declaration of `memrchr', and to 0 if you
+   don't. */
+#undef HAVE_DECL_MEMRCHR
+
+/* Define to 1 if you have the declaration of `program_invocation_name', and
+   to 0 if you don't. */
+#undef HAVE_DECL_PROGRAM_INVOCATION_NAME
+
+/* Define to 1 if you have the declaration of `program_invocation_short_name',
+   and to 0 if you don't. */
+#undef HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
+
 /* Define to 1 if you have the declaration of `setenv', and to 0 if you don't.
    */
 #undef HAVE_DECL_SETENV
 
+/* Define to 1 if you have the declaration of `strdup', and to 0 if you don't.
+   */
+#undef HAVE_DECL_STRDUP
+
+/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you
+   don't. */
+#undef HAVE_DECL_STRERROR_R
+
 /* Define to 1 if you have the declaration of `strtok_r', and to 0 if you
    don't. */
 #undef HAVE_DECL_STRTOK_R
@@ -226,15 +364,31 @@
    don't. */
 #undef HAVE_DECL_UNSETENV
 
+/* Define to 1 if you have the declaration of `__argv', and to 0 if you don't.
+   */
+#undef HAVE_DECL___ARGV
+
 /* Define to 1 if you have the <dirent.h> header file. */
 #undef HAVE_DIRENT_H
 
 /* Define to 1 if you have the `dirfd' function. */
 #undef HAVE_DIRFD
 
+/* Define to 1 if you have the 'dup2' function. */
+#undef HAVE_DUP2
+
 /* Define if you have the declaration of environ. */
 #undef HAVE_ENVIRON_DECL
 
+/* Define to 1 if you have the `fchdir' function. */
+#undef HAVE_FCHDIR
+
+/* Define to 1 if you have the `fcntl' function. */
+#undef HAVE_FCNTL
+
+/* Define to 1 if you have the `fdopendir' function. */
+#undef HAVE_FDOPENDIR
+
 /* Define to 1 if you have the <features.h> header file. */
 #undef HAVE_FEATURES_H
 
@@ -244,12 +398,40 @@
 /* Define if the frexpl() function is available. */
 #undef HAVE_FREXPL
 
+/* Define to 1 if you have the `fstatat' function. */
+#undef HAVE_FSTATAT
+
 /* Define to 1 if you have the `getcwd' function. */
 #undef HAVE_GETCWD
 
+/* Define to 1 if getcwd works, but with shorter paths than is generally
+   tested with the replacement. */
+#undef HAVE_GETCWD_SHORTER
+
+/* Define to 1 if you have the `getdtablesize' function. */
+#undef HAVE_GETDTABLESIZE
+
+/* Define to 1 if you have the `getexecname' function. */
+#undef HAVE_GETEXECNAME
+
+/* Define to 1 if you have the `getlogin_r' function. */
+#undef HAVE_GETLOGIN_R
+
+/* Define to 1 if you have the `getpagesize' function. */
+#undef HAVE_GETPAGESIZE
+
+/* Define to 1 if you have the `getprogname' function. */
+#undef HAVE_GETPROGNAME
+
+/* Define to 1 if you have the `getpwnam_r' function. */
+#undef HAVE_GETPWNAM_R
+
 /* Define to 1 if you have the `gettimeofday' function. */
 #undef HAVE_GETTIMEOFDAY
 
+/* Define to 1 if you have the <glob.h> header file. */
+#undef HAVE_GLOB_H
+
 /* Define to 1 if you have the <inttypes.h> header file. */
 #undef HAVE_INTTYPES_H
 
@@ -314,9 +496,33 @@
 /* Define to 1 if you have the `mempcpy' function. */
 #undef HAVE_MEMPCPY
 
+/* Define to 1 if you have the `memrchr' function. */
+#undef HAVE_MEMRCHR
+
+/* Define to 1 if getcwd minimally works, that is, its result can be trusted
+   when it succeeds. */
+#undef HAVE_MINIMALLY_WORKING_GETCWD
+
 /* Define to 1 if you have the `mprotect' function. */
 #undef HAVE_MPROTECT
 
+/* Define to 1 on MSVC platforms that have the "invalid parameter handler"
+   concept. */
+#undef HAVE_MSVC_INVALID_PARAMETER_HANDLER
+
+/* Define to 1 if you have the `openat' function. */
+#undef HAVE_OPENAT
+
+/* Define to 1 if you have the `opendir' function. */
+#undef HAVE_OPENDIR
+
+/* Define to 1 if getcwd works, except it sometimes fails when it shouldn't,
+   setting errno to ERANGE, ENAMETOOLONG, or ENOENT. */
+#undef HAVE_PARTLY_WORKING_GETCWD
+
+/* Define to 1 if you have the `pipe' function. */
+#undef HAVE_PIPE
+
 /* Define to 1 if you have the `rawmemchr' function. */
 #undef HAVE_RAWMEMCHR
 
@@ -459,6 +665,9 @@
 /* Define to 1 if fchownat is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_FCHOWNAT
 
+/* Define to 1 if fcntl is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_FCNTL
+
 /* Define to 1 if fdatasync is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_FDATASYNC
 
@@ -741,6 +950,9 @@
 /* Define to 1 if modfl is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_MODFL
 
+/* Define to 1 if openat is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_OPENAT
+
 /* Define to 1 if opendir is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_OPENDIR
 
@@ -1137,18 +1349,30 @@
 /* Define to 1 if _Exit is declared even after undefining macros. */
 #undef HAVE_RAW_DECL__EXIT
 
+/* Define to 1 if you have the `readdir' function. */
+#undef HAVE_READDIR
+
 /* Define to 1 if you have the `readlink' function. */
 #undef HAVE_READLINK
 
+/* Define if the 'realloc' function is POSIX compliant. */
+#undef HAVE_REALLOC_POSIX
+
 /* Define to 1 if you have the `realpath' function. */
 #undef HAVE_REALPATH
 
+/* Define to 1 if you have the `rewinddir' function. */
+#undef HAVE_REWINDDIR
+
 /* Define to 1 if 'long double' and 'double' have the same representation. */
 #undef HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
 
 /* Define to 1 if you have the <search.h> header file. */
 #undef HAVE_SEARCH_H
 
+/* Define to 1 if you have the `setdtablesize' function. */
+#undef HAVE_SETDTABLESIZE
+
 /* Define to 1 if you have the `setenv' function. */
 #undef HAVE_SETENV
 
@@ -1173,6 +1397,12 @@
 /* Define to 1 if you have the `strchrnul' function. */
 #undef HAVE_STRCHRNUL
 
+/* Define to 1 if you have the `strdup' function. */
+#undef HAVE_STRDUP
+
+/* Define to 1 if you have the `strerror_r' function. */
+#undef HAVE_STRERROR_R
+
 /* Define to 1 if you have the <strings.h> header file. */
 #undef HAVE_STRINGS_H
 
@@ -1182,12 +1412,19 @@
 /* Define to 1 if you have the `strtok_r' function. */
 #undef HAVE_STRTOK_R
 
+/* Define if there is a member named d_type in the struct describing directory
+   headers. */
+#undef HAVE_STRUCT_DIRENT_D_TYPE
+
 /* Define to 1 if you have the `symlink' function. */
 #undef HAVE_SYMLINK
 
 /* Define to 1 if you have the <sys/bitypes.h> header file. */
 #undef HAVE_SYS_BITYPES_H
 
+/* Define to 1 if you have the <sys/cdefs.h> header file. */
+#undef HAVE_SYS_CDEFS_H
+
 /* Define to 1 if you have the <sys/inttypes.h> header file. */
 #undef HAVE_SYS_INTTYPES_H
 
@@ -1227,6 +1464,9 @@
 /* Define to 1 if the system has the type 'unsigned long long int'. */
 #undef HAVE_UNSIGNED_LONG_LONG_INT
 
+/* Define if you have a global __progname variable */
+#undef HAVE_VAR___PROGNAME
+
 /* Define to 1 if you have the <wchar.h> header file. */
 #undef HAVE_WCHAR_H
 
@@ -1251,6 +1491,10 @@
 /* Define to 1 if you have the `wmempcpy' function. */
 #undef HAVE_WMEMPCPY
 
+/* Define to 1 if fstatat (..., 0) works. For example, it does not work in AIX
+   7.1. */
+#undef HAVE_WORKING_FSTATAT_ZERO_FLAG
+
 /* Define to 1 if O_NOATIME works. */
 #undef HAVE_WORKING_O_NOATIME
 
@@ -1263,6 +1507,9 @@
 /* Define to 1 if you have the `_ftime' function. */
 #undef HAVE__FTIME
 
+/* Define to 1 if you have the `_set_invalid_parameter_handler' function. */
+#undef HAVE__SET_INVALID_PARAMETER_HANDLER
+
 /* Define as the bit index in the word where to find bit 0 of the exponent of
    'long double'. */
 #undef LDBL_EXPBIT0_BIT
@@ -1302,6 +1549,9 @@
 #endif
 
 
+/* Define to 1 if open() fails to recognize a trailing slash. */
+#undef OPEN_TRAILING_SLASH_BUG
+
 /* Define to the address where bug reports for this package should be sent. */
 #undef PACKAGE_BUGREPORT
 
@@ -1323,6 +1573,10 @@
 /* Define if <inttypes.h> exists and defines unusable PRI* macros. */
 #undef PRI_MACROS_BROKEN
 
+/* Define to the type that is the result of default argument promotions of
+   type mode_t. */
+#undef PROMOTED_MODE_T
+
 /* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
    'ptrdiff_t'. */
 #undef PTRDIFF_T_SUFFIX
@@ -1349,6 +1603,9 @@
 /* Define to 1 if gnulib's dirfd() replacement is used. */
 #undef REPLACE_DIRFD
 
+/* Define to 1 if gnulib's fchdir() replacement is used. */
+#undef REPLACE_FCHDIR
+
 /* Define to 1 if stat needs help when passed a directory name with a trailing
    slash */
 #undef REPLACE_FUNC_STAT_DIR
@@ -1357,6 +1614,13 @@
    slash */
 #undef REPLACE_FUNC_STAT_FILE
 
+/* Define to 1 if open() should work around the inability to open a directory.
+   */
+#undef REPLACE_OPEN_DIRECTORY
+
+/* Define to 1 if strerror(0) does not return a message implying success. */
+#undef REPLACE_STRERROR_0
+
 /* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
    'sig_atomic_t'. */
 #undef SIG_ATOMIC_T_SUFFIX
@@ -1379,6 +1643,9 @@
 /* Define to 1 if you have the ANSI C header files. */
 #undef STDC_HEADERS
 
+/* Define to 1 if strerror_r returns char *. */
+#undef STRERROR_R_CHAR_P
+
 /* Enable extensions on AIX 3, Interix.  */
 #ifndef _ALL_SOURCE
 # undef _ALL_SOURCE
diff --git a/gdb/gnulib/configure b/gdb/gnulib/configure
index 2a0dfc2..37efd06 100644
--- a/gdb/gnulib/configure
+++ b/gdb/gnulib/configure
@@ -682,9 +682,6 @@ WINDOWS_64_BIT_OFF_T
 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
 NEXT_SYS_TYPES_H
 MKDIR_P
-WINDOWS_64_BIT_ST_SIZE
-NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
-NEXT_SYS_STAT_H
 NEXT_AS_FIRST_DIRECTIVE_STRING_H
 NEXT_STRING_H
 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
@@ -992,39 +989,6 @@ GNULIB_WCTOB
 GNULIB_BTOWC
 NEXT_AS_FIRST_DIRECTIVE_MATH_H
 NEXT_MATH_H
-REPLACE_UTIMENSAT
-REPLACE_STAT
-REPLACE_MKNOD
-REPLACE_MKFIFO
-REPLACE_MKDIR
-REPLACE_LSTAT
-REPLACE_FUTIMENS
-REPLACE_FSTATAT
-REPLACE_FSTAT
-HAVE_UTIMENSAT
-HAVE_MKNODAT
-HAVE_MKNOD
-HAVE_MKFIFOAT
-HAVE_MKFIFO
-HAVE_MKDIRAT
-HAVE_LSTAT
-HAVE_LCHMOD
-HAVE_FUTIMENS
-HAVE_FSTATAT
-HAVE_FCHMODAT
-GNULIB_UTIMENSAT
-GNULIB_STAT
-GNULIB_MKNODAT
-GNULIB_MKNOD
-GNULIB_MKFIFOAT
-GNULIB_MKFIFO
-GNULIB_MKDIRAT
-GNULIB_LSTAT
-GNULIB_LCHMOD
-GNULIB_FUTIMENS
-GNULIB_FSTATAT
-GNULIB_FSTAT
-GNULIB_FCHMODAT
 LOCALCHARSET_TESTS_ENVIRONMENT
 GLIBC21
 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
@@ -1078,7 +1042,10 @@ GL_GENERATE_LIMITS_H_TRUE
 LIMITS_H
 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H
 NEXT_LIMITS_H
-HAVE_WINSOCK2_H
+HAVE_SYS_CDEFS_H
+GL_GENERATE_GLOB_H_FALSE
+GL_GENERATE_GLOB_H_TRUE
+GLOB_H
 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
 NEXT_SYS_TIME_H
 REPLACE_STRUCT_TIMEVAL
@@ -1088,6 +1055,44 @@ HAVE_SYS_TIME_H
 HAVE_STRUCT_TIMEVAL
 HAVE_GETTIMEOFDAY
 GNULIB_GETTIMEOFDAY
+LTLIBINTL
+LIBINTL
+WINDOWS_64_BIT_ST_SIZE
+NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
+NEXT_SYS_STAT_H
+REPLACE_UTIMENSAT
+REPLACE_STAT
+REPLACE_MKNOD
+REPLACE_MKFIFO
+REPLACE_MKDIR
+REPLACE_LSTAT
+REPLACE_FUTIMENS
+REPLACE_FSTATAT
+REPLACE_FSTAT
+HAVE_UTIMENSAT
+HAVE_MKNODAT
+HAVE_MKNOD
+HAVE_MKFIFOAT
+HAVE_MKFIFO
+HAVE_MKDIRAT
+HAVE_LSTAT
+HAVE_LCHMOD
+HAVE_FUTIMENS
+HAVE_FSTATAT
+HAVE_FCHMODAT
+GNULIB_UTIMENSAT
+GNULIB_STAT
+GNULIB_MKNODAT
+GNULIB_MKNOD
+GNULIB_MKFIFOAT
+GNULIB_MKFIFO
+GNULIB_MKDIRAT
+GNULIB_LSTAT
+GNULIB_LCHMOD
+GNULIB_FUTIMENS
+GNULIB_FSTATAT
+GNULIB_FSTAT
+GNULIB_FCHMODAT
 FREXPL_LIBM
 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
 FREXP_LIBM
@@ -1354,6 +1359,17 @@ GL_GENERATE_FLOAT_H_TRUE
 FLOAT_H
 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
 NEXT_FLOAT_H
+NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
+NEXT_FCNTL_H
+REPLACE_OPENAT
+REPLACE_OPEN
+REPLACE_FCNTL
+HAVE_OPENAT
+HAVE_FCNTL
+GNULIB_OPENAT
+GNULIB_OPEN
+GNULIB_NONBLOCKING
+GNULIB_FCNTL
 EOVERFLOW_VALUE
 EOVERFLOW_HIDDEN
 ENOLINK_VALUE
@@ -1372,6 +1388,9 @@ PRAGMA_COLUMNS
 PRAGMA_SYSTEM_HEADER
 INCLUDE_NEXT_AS_FIRST_DIRECTIVE
 INCLUDE_NEXT
+pkglibexecdir
+runstatedir
+lispdir
 REPLACE_FDOPENDIR
 REPLACE_DIRFD
 REPLACE_CLOSEDIR
@@ -1393,9 +1412,8 @@ GNULIB_CLOSEDIR
 GNULIB_REWINDDIR
 GNULIB_READDIR
 GNULIB_OPENDIR
-pkglibexecdir
-runstatedir
-lispdir
+HAVE_WINSOCK2_H
+HAVE_MSVC_INVALID_PARAMETER_HANDLER
 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
 UNISTD_H_HAVE_WINSOCK2_H
 REPLACE_WRITE
@@ -3306,35 +3324,49 @@ as_fn_append ac_func_list " getcwd"
 as_fn_append ac_func_list " readlink"
 as_fn_append ac_func_list " realpath"
 as_fn_append ac_header_list " sys/param.h"
-as_fn_append ac_header_list " dirent.h"
 as_fn_append ac_header_list " unistd.h"
+as_fn_append ac_func_list " _set_invalid_parameter_handler"
+as_fn_append ac_header_list " sys/socket.h"
+as_fn_append ac_func_list " fchdir"
+as_fn_append ac_header_list " dirent.h"
+as_fn_append ac_func_list " fcntl"
+as_fn_append ac_func_list " symlink"
+as_fn_append ac_func_list " fdopendir"
+as_fn_append ac_func_list " mempcpy"
 as_fn_append ac_func_list " btowc"
 as_fn_append ac_func_list " isblank"
 as_fn_append ac_func_list " iswctype"
 as_fn_append ac_func_list " mbsrtowcs"
-as_fn_append ac_func_list " mempcpy"
 as_fn_append ac_func_list " wmemchr"
 as_fn_append ac_func_list " wmemcpy"
 as_fn_append ac_func_list " wmempcpy"
 as_fn_append ac_header_list " wctype.h"
 gl_fnmatch_required=GNU
+as_fn_append ac_header_list " sys/stat.h"
+as_fn_append ac_func_list " fstatat"
+as_fn_append ac_func_list " getdtablesize"
+as_fn_append ac_func_list " getlogin_r"
+as_fn_append ac_func_list " getprogname"
+as_fn_append ac_func_list " getexecname"
 as_fn_append ac_header_list " sys/time.h"
-as_fn_append ac_header_list " sys/socket.h"
 as_fn_append ac_func_list " gettimeofday"
+as_fn_append ac_header_list " sys/cdefs.h"
+as_fn_append ac_func_list " getpwnam_r"
 as_fn_append ac_header_list " limits.h"
 as_fn_append ac_header_list " wchar.h"
 as_fn_append ac_header_list " stdint.h"
 as_fn_append ac_header_list " inttypes.h"
-as_fn_append ac_func_list " symlink"
 as_fn_append ac_func_list " lstat"
 as_fn_append ac_header_list " math.h"
 as_fn_append ac_func_list " mbsinit"
 as_fn_append ac_func_list " mbrtowc"
 as_fn_append ac_header_list " sys/mman.h"
 as_fn_append ac_func_list " mprotect"
+as_fn_append ac_func_list " openat"
 as_fn_append ac_func_list " link"
 as_fn_append ac_func_list " setenv"
-as_fn_append ac_header_list " sys/stat.h"
+as_fn_append ac_func_list " strdup"
+as_fn_append ac_func_list " pipe"
 as_fn_append ac_header_list " features.h"
 as_fn_append ac_func_list " iswcntrl"
 # Check that the precious variables saved in the cache have kept the same
@@ -5304,18 +5336,37 @@ fi
   # Code from module absolute-header:
   # Code from module alloca:
   # Code from module alloca-opt:
+  # Code from module assure:
+  # Code from module at-internal:
   # Code from module canonicalize-lgpl:
   # Code from module chdir:
+  # Code from module chdir-long:
+  # Code from module cloexec:
+  # Code from module close:
+  # Code from module closedir:
   # Code from module configmake:
+  # Code from module d-ino:
+  # Code from module d-type:
   # Code from module dirent:
   # Code from module dirfd:
   # Code from module dirname-lgpl:
   # Code from module dosname:
   # Code from module double-slash-root:
+  # Code from module dup:
+  # Code from module dup2:
   # Code from module environ:
   # Code from module errno:
+  # Code from module error:
+  # Code from module exitfail:
   # Code from module extensions:
   # Code from module extern-inline:
+  # Code from module fchdir:
+  # Code from module fcntl:
+  # Code from module fcntl-h:
+  # Code from module fd-hook:
+  # Code from module fdopendir:
+  # Code from module filename:
+  # Code from module filenamecat-lgpl:
   # Code from module flexmember:
   # Code from module float:
   # Code from module fnmatch:
@@ -5325,9 +5376,19 @@ fi
   # Code from module fpucw:
   # Code from module frexp:
   # Code from module frexpl:
+  # Code from module fstat:
+  # Code from module fstatat:
+  # Code from module getcwd:
+  # Code from module getcwd-lgpl:
+  # Code from module getdtablesize:
+  # Code from module getlogin_r:
+  # Code from module getprogname:
+  # Code from module gettext-h:
   # Code from module gettimeofday:
+  # Code from module glob:
   # Code from module hard-locale:
   # Code from module include_next:
+  # Code from module intprops:
   # Code from module inttypes:
   # Code from module inttypes-incomplete:
   # Code from module isnand-nolibm:
@@ -5346,14 +5407,27 @@ fi
   # Code from module memchr:
   # Code from module memmem:
   # Code from module memmem-simple:
+  # Code from module mempcpy:
+  # Code from module memrchr:
+  # Code from module msvc-inval:
+  # Code from module msvc-nothrow:
   # Code from module multiarch:
   # Code from module nocrash:
+  # Code from module open:
+  # Code from module openat:
+  # Code from module openat-die:
+  # Code from module openat-h:
+  # Code from module opendir:
   # Code from module pathmax:
   # Code from module rawmemchr:
+  # Code from module readdir:
   # Code from module readlink:
+  # Code from module realloc-posix:
   # Code from module rename:
+  # Code from module rewinddir:
   # Code from module rmdir:
   # Code from module same-inode:
+  # Code from module save-cwd:
   # Code from module setenv:
   # Code from module signal-h:
   # Code from module snippet/_Noreturn:
@@ -5368,7 +5442,10 @@ fi
   # Code from module stdio:
   # Code from module stdlib:
   # Code from module strchrnul:
+  # Code from module strdup-posix:
   # Code from module streq:
+  # Code from module strerror:
+  # Code from module strerror-override:
   # Code from module string:
   # Code from module strnlen1:
   # Code from module strstr:
@@ -5379,6 +5456,7 @@ fi
   # Code from module sys_types:
   # Code from module time:
   # Code from module unistd:
+  # Code from module unistd-safer:
   # Code from module unsetenv:
   # Code from module update-copyright:
   # Code from module verify:
@@ -6690,6 +6768,29 @@ done
 
 
 
+
+
+
+
+
+
+
+
+  if test $ac_cv_func__set_invalid_parameter_handler = yes; then
+    HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
+
+$as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
+
+  else
+    HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
+  fi
+
+
+
+
+
+
+
      GNULIB_OPENDIR=0;
   GNULIB_READDIR=0;
   GNULIB_REWINDDIR=0;
@@ -6835,8 +6936,6 @@ $as_echo "$gl_cv_pragma_columns" >&6; }
 
 
 
-
-
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
 $as_echo_n "checking if environ is properly declared... " >&6; }
   if test "${gt_cv_var_environ_declaration+set}" = set; then :
@@ -7257,61 +7356,122 @@ $as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
   fi
 
 
+ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
+if test "x$ac_cv_have_decl_strerror_r" = x""yes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
 
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRERROR_R $ac_have_decl
+_ACEOF
 
+for ac_func in strerror_r
+do :
+  ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
+if test "x$ac_cv_func_strerror_r" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_STRERROR_R 1
+_ACEOF
 
+fi
+done
 
-
-   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
-$as_echo_n "checking for mbstate_t... " >&6; }
-if test "${ac_cv_type_mbstate_t+set}" = set; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
+$as_echo_n "checking whether strerror_r returns char *... " >&6; }
+if test "${ac_cv_func_strerror_r_char_p+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+    ac_cv_func_strerror_r_char_p=no
+    if test $ac_cv_have_decl_strerror_r = yes; then
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 $ac_includes_default
-/* 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>
 int
 main ()
 {
-mbstate_t x; return sizeof x;
+
+	  char buf[100];
+	  char x = *strerror_r (0, buf, sizeof buf);
+	  char *p = strerror_r (0, buf, sizeof buf);
+	  return !p || x;
+
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_type_mbstate_t=yes
-else
-  ac_cv_type_mbstate_t=no
+  ac_cv_func_strerror_r_char_p=yes
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    else
+      # strerror_r is not declared.  Choose between
+      # systems that have relatively inaccessible declarations for the
+      # function.  BeOS and DEC UNIX 4.0 fall in this category, but the
+      # former has a strerror_r that returns char*, while the latter
+      # has a strerror_r that returns `int'.
+      # This test should segfault on the DEC system.
+      if test "$cross_compiling" = yes; then :
+  :
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
+	extern char *strerror_r ();
+int
+main ()
+{
+char buf[100];
+	  char x = *strerror_r (0, buf, sizeof buf);
+	  return ! isalpha (x);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  ac_cv_func_strerror_r_char_p=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
-$as_echo "$ac_cv_type_mbstate_t" >&6; }
-   if test $ac_cv_type_mbstate_t = yes; then
-
-$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
 
-   else
+    fi
 
-$as_echo "#define mbstate_t int" >>confdefs.h
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
+$as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
+if test $ac_cv_func_strerror_r_char_p = yes; then
 
-   fi
+$as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
 
+fi
 
 
 
 
+ac_fn_c_check_decl "$LINENO" "fchdir" "ac_cv_have_decl_fchdir" "$ac_includes_default"
+if test "x$ac_cv_have_decl_fchdir" = x""yes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
 
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FCHDIR $ac_have_decl
+_ACEOF
 
 
+  GNULIB_FCNTL=0;
+  GNULIB_NONBLOCKING=0;
+  GNULIB_OPEN=0;
+  GNULIB_OPENAT=0;
+    HAVE_FCNTL=1;
+  HAVE_OPENAT=1;
+  REPLACE_FCNTL=0;
+  REPLACE_OPEN=0;
+  REPLACE_OPENAT=0;
 
 
 
@@ -7322,52 +7482,279 @@ $as_echo "#define mbstate_t int" >>confdefs.h
 
 
 
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
+$as_echo_n "checking for working fcntl.h... " >&6; }
+if test "${gl_cv_header_working_fcntl_h+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  gl_cv_header_working_fcntl_h=cross-compiling
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+           #include <sys/stat.h>
+           #if HAVE_UNISTD_H
+           # include <unistd.h>
+           #else /* on Windows with MSVC */
+           # include <io.h>
+           # include <stdlib.h>
+           # defined sleep(n) _sleep ((n) * 1000)
+           #endif
+           #include <fcntl.h>
+           #ifndef O_NOATIME
+            #define O_NOATIME 0
+           #endif
+           #ifndef O_NOFOLLOW
+            #define O_NOFOLLOW 0
+           #endif
+           static int const constants[] =
+            {
+              O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
+              O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
+            };
 
+int
+main ()
+{
 
-  GNULIB_ACOSF=0;
-  GNULIB_ACOSL=0;
-  GNULIB_ASINF=0;
-  GNULIB_ASINL=0;
-  GNULIB_ATANF=0;
-  GNULIB_ATANL=0;
-  GNULIB_ATAN2F=0;
-  GNULIB_CBRT=0;
-  GNULIB_CBRTF=0;
-  GNULIB_CBRTL=0;
-  GNULIB_CEIL=0;
-  GNULIB_CEILF=0;
-  GNULIB_CEILL=0;
-  GNULIB_COPYSIGN=0;
-  GNULIB_COPYSIGNF=0;
-  GNULIB_COPYSIGNL=0;
-  GNULIB_COSF=0;
-  GNULIB_COSL=0;
-  GNULIB_COSHF=0;
-  GNULIB_EXPF=0;
-  GNULIB_EXPL=0;
-  GNULIB_EXP2=0;
-  GNULIB_EXP2F=0;
-  GNULIB_EXP2L=0;
-  GNULIB_EXPM1=0;
-  GNULIB_EXPM1F=0;
-  GNULIB_EXPM1L=0;
-  GNULIB_FABSF=0;
-  GNULIB_FABSL=0;
-  GNULIB_FLOOR=0;
-  GNULIB_FLOORF=0;
-  GNULIB_FLOORL=0;
-  GNULIB_FMA=0;
-  GNULIB_FMAF=0;
-  GNULIB_FMAL=0;
-  GNULIB_FMOD=0;
-  GNULIB_FMODF=0;
-  GNULIB_FMODL=0;
-  GNULIB_FREXPF=0;
-  GNULIB_FREXP=0;
-  GNULIB_FREXPL=0;
-  GNULIB_HYPOT=0;
-  GNULIB_HYPOTF=0;
-  GNULIB_HYPOTL=0;
+            int result = !constants;
+            #if HAVE_SYMLINK
+            {
+              static char const sym[] = "conftest.sym";
+              if (symlink ("/dev/null", sym) != 0)
+                result |= 2;
+              else
+                {
+                  int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
+                  if (fd >= 0)
+                    {
+                      close (fd);
+                      result |= 4;
+                    }
+                }
+              if (unlink (sym) != 0 || symlink (".", sym) != 0)
+                result |= 2;
+              else
+                {
+                  int fd = open (sym, O_RDONLY | O_NOFOLLOW);
+                  if (fd >= 0)
+                    {
+                      close (fd);
+                      result |= 4;
+                    }
+                }
+              unlink (sym);
+            }
+            #endif
+            {
+              static char const file[] = "confdefs.h";
+              int fd = open (file, O_RDONLY | O_NOATIME);
+              if (fd < 0)
+                result |= 8;
+              else
+                {
+                  struct stat st0;
+                  if (fstat (fd, &st0) != 0)
+                    result |= 16;
+                  else
+                    {
+                      char c;
+                      sleep (1);
+                      if (read (fd, &c, 1) != 1)
+                        result |= 24;
+                      else
+                        {
+                          if (close (fd) != 0)
+                            result |= 32;
+                          else
+                            {
+                              struct stat st1;
+                              if (stat (file, &st1) != 0)
+                                result |= 40;
+                              else
+                                if (st0.st_atime != st1.st_atime)
+                                  result |= 64;
+                            }
+                        }
+                    }
+                }
+            }
+            return result;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_header_working_fcntl_h=yes
+else
+  case $? in #(
+        4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
+        64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
+        68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
+         *) gl_cv_header_working_fcntl_h='no';;
+        esac
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
+$as_echo "$gl_cv_header_working_fcntl_h" >&6; }
+
+  case $gl_cv_header_working_fcntl_h in #(
+  *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
+  *) ac_val=1;;
+  esac
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_WORKING_O_NOATIME $ac_val
+_ACEOF
+
+
+  case $gl_cv_header_working_fcntl_h in #(
+  *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
+  *) ac_val=1;;
+  esac
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_WORKING_O_NOFOLLOW $ac_val
+_ACEOF
+
+
+ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
+if test "x$ac_cv_type_pid_t" = x""yes; then :
+
+else
+
+cat >>confdefs.h <<_ACEOF
+#define pid_t int
+_ACEOF
+
+fi
+
+ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
+if test "x$ac_cv_type_mode_t" = x""yes; then :
+
+else
+
+cat >>confdefs.h <<_ACEOF
+#define mode_t int
+_ACEOF
+
+fi
+
+
+
+
+
+
+
+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
+$as_echo_n "checking for mbstate_t... " >&6; }
+if test "${ac_cv_type_mbstate_t+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
+/* 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>
+int
+main ()
+{
+mbstate_t x; return sizeof x;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_type_mbstate_t=yes
+else
+  ac_cv_type_mbstate_t=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
+$as_echo "$ac_cv_type_mbstate_t" >&6; }
+   if test $ac_cv_type_mbstate_t = yes; then
+
+$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
+
+   else
+
+$as_echo "#define mbstate_t int" >>confdefs.h
+
+   fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  GNULIB_ACOSF=0;
+  GNULIB_ACOSL=0;
+  GNULIB_ASINF=0;
+  GNULIB_ASINL=0;
+  GNULIB_ATANF=0;
+  GNULIB_ATANL=0;
+  GNULIB_ATAN2F=0;
+  GNULIB_CBRT=0;
+  GNULIB_CBRTF=0;
+  GNULIB_CBRTL=0;
+  GNULIB_CEIL=0;
+  GNULIB_CEILF=0;
+  GNULIB_CEILL=0;
+  GNULIB_COPYSIGN=0;
+  GNULIB_COPYSIGNF=0;
+  GNULIB_COPYSIGNL=0;
+  GNULIB_COSF=0;
+  GNULIB_COSL=0;
+  GNULIB_COSHF=0;
+  GNULIB_EXPF=0;
+  GNULIB_EXPL=0;
+  GNULIB_EXP2=0;
+  GNULIB_EXP2F=0;
+  GNULIB_EXP2L=0;
+  GNULIB_EXPM1=0;
+  GNULIB_EXPM1F=0;
+  GNULIB_EXPM1L=0;
+  GNULIB_FABSF=0;
+  GNULIB_FABSL=0;
+  GNULIB_FLOOR=0;
+  GNULIB_FLOORF=0;
+  GNULIB_FLOORL=0;
+  GNULIB_FMA=0;
+  GNULIB_FMAF=0;
+  GNULIB_FMAL=0;
+  GNULIB_FMOD=0;
+  GNULIB_FMODF=0;
+  GNULIB_FMODL=0;
+  GNULIB_FREXPF=0;
+  GNULIB_FREXP=0;
+  GNULIB_FREXPL=0;
+  GNULIB_HYPOT=0;
+  GNULIB_HYPOTF=0;
+  GNULIB_HYPOTL=0;
   GNULIB_ILOGB=0;
   GNULIB_ILOGBF=0;
   GNULIB_ILOGBL=0;
@@ -7663,65 +8050,129 @@ $as_echo "#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1" >>confdefs.h
   fi
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
-$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
-if test "${ac_cv_c_restrict+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_c_restrict=no
-   # The order here caters to the fact that C++ does not require restrict.
-   for ac_kw in __restrict __restrict__ _Restrict restrict; do
-     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-typedef int *int_ptr;
-	   int foo (int_ptr $ac_kw ip) { return ip[0]; }
-	   int bar (int [$ac_kw]); /* Catch GCC bug 14050.  */
-	   int bar (int ip[$ac_kw]) { return ip[0]; }
 
-int
-main ()
-{
-int s[1];
-	   int *$ac_kw t = s;
-	   t[0] = 0;
-	   return foo (t) + bar (t);
+     GNULIB_FCHMODAT=0;
+  GNULIB_FSTAT=0;
+  GNULIB_FSTATAT=0;
+  GNULIB_FUTIMENS=0;
+  GNULIB_LCHMOD=0;
+  GNULIB_LSTAT=0;
+  GNULIB_MKDIRAT=0;
+  GNULIB_MKFIFO=0;
+  GNULIB_MKFIFOAT=0;
+  GNULIB_MKNOD=0;
+  GNULIB_MKNODAT=0;
+  GNULIB_STAT=0;
+  GNULIB_UTIMENSAT=0;
+    HAVE_FCHMODAT=1;
+  HAVE_FSTATAT=1;
+  HAVE_FUTIMENS=1;
+  HAVE_LCHMOD=1;
+  HAVE_LSTAT=1;
+  HAVE_MKDIRAT=1;
+  HAVE_MKFIFO=1;
+  HAVE_MKFIFOAT=1;
+  HAVE_MKNOD=1;
+  HAVE_MKNODAT=1;
+  HAVE_UTIMENSAT=1;
+  REPLACE_FSTAT=0;
+  REPLACE_FSTATAT=0;
+  REPLACE_FUTIMENS=0;
+  REPLACE_LSTAT=0;
+  REPLACE_MKDIR=0;
+  REPLACE_MKFIFO=0;
+  REPLACE_MKNOD=0;
+  REPLACE_STAT=0;
+  REPLACE_UTIMENSAT=0;
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
+$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
+if test "${ac_cv_header_stat_broken+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#if defined S_ISBLK && defined S_IFDIR
+extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
+#endif
+
+#if defined S_ISBLK && defined S_IFCHR
+extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
+#endif
+
+#if defined S_ISLNK && defined S_IFREG
+extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
+#endif
+
+#if defined S_ISSOCK && defined S_IFREG
+extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
+#endif
 
-  ;
-  return 0;
-}
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_c_restrict=$ac_kw
+  ac_cv_header_stat_broken=no
+else
+  ac_cv_header_stat_broken=yes
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-     test "$ac_cv_c_restrict" != no && break
-   done
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
+$as_echo "$ac_cv_header_stat_broken" >&6; }
+if test $ac_cv_header_stat_broken = yes; then
+
+$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
-$as_echo "$ac_cv_c_restrict" >&6; }
 
- case $ac_cv_c_restrict in
-   restrict) ;;
-   no) $as_echo "#define restrict /**/" >>confdefs.h
- ;;
-   *)  cat >>confdefs.h <<_ACEOF
-#define restrict $ac_cv_c_restrict
-_ACEOF
- ;;
- esac
 
 
-  GNULIB_GETTIMEOFDAY=0;
-    HAVE_GETTIMEOFDAY=1;
-  HAVE_STRUCT_TIMEVAL=1;
-  HAVE_SYS_TIME_H=1;
-  HAVE_TIMEZONE_T=0;
-  REPLACE_GETTIMEOFDAY=0;
-  REPLACE_STRUCT_TIMEVAL=0;
 
 
+  case "$host_os" in
+    mingw*)
+                        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
+$as_echo_n "checking for 64-bit off_t... " >&6; }
+if test "${gl_cv_type_off_t_64+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+                int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_type_off_t_64=yes
+else
+  gl_cv_type_off_t_64=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
+$as_echo "$gl_cv_type_off_t_64" >&6; }
+      if test $gl_cv_type_off_t_64 = no; then
+        WINDOWS_64_BIT_OFF_T=1
+      else
+        WINDOWS_64_BIT_OFF_T=0
+      fi
+                  WINDOWS_64_BIT_ST_SIZE=1
+      ;;
+    *)
+                                                      WINDOWS_64_BIT_OFF_T=0
+      WINDOWS_64_BIT_ST_SIZE=0
+      ;;
+  esac
 
 
 
@@ -7738,22 +8189,22 @@ _ACEOF
 
 
      if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_sys_time_h='<'sys/time.h'>'
+       gl_cv_next_sys_stat_h='<'sys/stat.h'>'
      else
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
-$as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
-if test "${gl_cv_next_sys_time_h+set}" = set; then :
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
+$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
+if test "${gl_cv_next_sys_stat_h+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
 
-             if test $ac_cv_header_sys_time_h = yes; then
+             if test $ac_cv_header_sys_stat_h = yes; then
 
 
 
 
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <sys/time.h>
+#include <sys/stat.h>
 _ACEOF
                 case "$host_os" in
     aix*) gl_absname_cpp="$ac_cpp -C" ;;
@@ -7769,7 +8220,7 @@ _ACEOF
       ;;
   esac
       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-  gl_header_literal_regex=`echo 'sys/time.h' \
+  gl_header_literal_regex=`echo 'sys/stat.h' \
                            | sed -e "$gl_make_literal_regex_sed"`
   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
@@ -7778,191 +8229,378 @@ _ACEOF
       q
     }'
 
-        gl_cv_absolute_sys_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+        gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
   sed -n "$gl_absolute_header_sed"`
 
-           gl_header=$gl_cv_absolute_sys_time_h
-           gl_cv_next_sys_time_h='"'$gl_header'"'
+           gl_header=$gl_cv_absolute_sys_stat_h
+           gl_cv_next_sys_stat_h='"'$gl_header'"'
           else
-               gl_cv_next_sys_time_h='<'sys/time.h'>'
+               gl_cv_next_sys_stat_h='<'sys/stat.h'>'
              fi
 
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
-$as_echo "$gl_cv_next_sys_time_h" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
+$as_echo "$gl_cv_next_sys_stat_h" >&6; }
      fi
-     NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
+     NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
 
      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
-       gl_next_as_first_directive='<'sys/time.h'>'
+       gl_next_as_first_directive='<'sys/stat.h'>'
      else
        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_sys_time_h
+       gl_next_as_first_directive=$gl_cv_next_sys_stat_h
      fi
-     NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
+     NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
 
 
 
 
 
-  if test $ac_cv_header_sys_time_h != yes; then
-    HAVE_SYS_TIME_H=0
-  fi
 
 
 
 
 
-  if test $ac_cv_header_sys_socket_h != yes; then
-                    for ac_header in winsock2.h
-do :
-  ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
-if test "x$ac_cv_header_winsock2_h" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_WINSOCK2_H 1
-_ACEOF
 
-fi
+  if test $WINDOWS_64_BIT_ST_SIZE = 1; then
 
-done
+$as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
 
   fi
-  if test "$ac_cv_header_winsock2_h" = yes; then
-    HAVE_WINSOCK2_H=1
-    UNISTD_H_HAVE_WINSOCK2_H=1
-    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
-  else
-    HAVE_WINSOCK2_H=0
-  fi
 
+      ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
+     #include <sys/stat.h>
+"
+if test "x$ac_cv_type_nlink_t" = x""yes; then :
+
+else
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
-$as_echo_n "checking for struct timeval... " >&6; }
-if test "${gl_cv_sys_struct_timeval+set}" = set; then :
+$as_echo "#define nlink_t int" >>confdefs.h
+
+fi
+
+
+
+    for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat     mknod mknodat stat utimensat; do
+    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
+if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
   $as_echo_n "(cached) " >&6
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#if HAVE_SYS_TIME_H
-             #include <sys/time.h>
-            #endif
-            #include <time.h>
-            #if HAVE_WINSOCK2_H
-            # include <winsock2.h>
-            #endif
+#include <sys/stat.h>
 
 int
 main ()
 {
-static struct timeval x; x.tv_sec = x.tv_usec;
+#undef $gl_func
+  (void) $gl_func;
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  gl_cv_sys_struct_timeval=yes
+  eval "$as_gl_Symbol=yes"
 else
-  gl_cv_sys_struct_timeval=no
+  eval "$as_gl_Symbol=no"
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_gl_Symbol
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+    eval as_val=\$$as_gl_Symbol
+   if test "x$as_val" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+_ACEOF
 
+                     eval ac_cv_have_decl_$gl_func=yes
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
-$as_echo "$gl_cv_sys_struct_timeval" >&6; }
-  if test $gl_cv_sys_struct_timeval != yes; then
-    HAVE_STRUCT_TIMEVAL=0
-  else
-                            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
-$as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
-if test "${gl_cv_sys_struct_timeval_tv_sec+set}" = set; then :
+      done
+
+
+
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
+$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
+if test "${gl_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#if HAVE_SYS_TIME_H
-               #include <sys/time.h>
-              #endif
-              #include <time.h>
-              #if HAVE_WINSOCK2_H
-              # include <winsock2.h>
-              #endif
+  rm -f conftest.sym conftest.file
+     echo >conftest.file
+     if test "$cross_compiling" = yes; then :
+  case "$host_os" in
+          *-gnu*)
+            # Guess yes on glibc systems.
+            gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
+          *)
+            # If we don't know, assume the worst.
+            gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
+        esac
 
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
 int
 main ()
 {
-static struct timeval x;
-              typedef int verify_tv_sec_type[
-                sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
-              ];
+struct stat sbuf;
+            if (symlink ("conftest.file", "conftest.sym") != 0)
+              return 1;
+            /* Linux will dereference the symlink and fail, as required by
+               POSIX.  That is better in the sense that it means we will not
+               have to compile and use the lstat wrapper.  */
+            return lstat ("conftest.sym/", &sbuf) == 0;
 
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  gl_cv_sys_struct_timeval_tv_sec=yes
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_lstat_dereferences_slashed_symlink=yes
 else
-  gl_cv_sys_struct_timeval_tv_sec=no
+  gl_cv_func_lstat_dereferences_slashed_symlink=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+     rm -f conftest.sym conftest.file
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
-$as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
-    if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
-      REPLACE_STRUCT_TIMEVAL=1
-    fi
-  fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
+$as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
+  case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
+    *yes)
 
+cat >>confdefs.h <<_ACEOF
+#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
+_ACEOF
 
-    for gl_func in gettimeofday; do
-    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
-$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
-if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
+      ;;
+  esac
+
+
+
+
+
+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
+$as_echo_n "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
+if test "${gl_cv_func_getcwd_null+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
+  if test "$cross_compiling" = yes; then :
+  case "$host_os" in
+                     # Guess yes on glibc systems.
+            *-gnu*)  gl_cv_func_getcwd_null="guessing yes";;
+                     # Guess yes on Cygwin.
+            cygwin*) gl_cv_func_getcwd_null="guessing yes";;
+                     # If we don't know, assume the worst.
+            *)       gl_cv_func_getcwd_null="guessing no";;
+          esac
+
+else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-#if HAVE_SYS_TIME_H
-# include <sys/time.h>
+#	 include <stdlib.h>
+#        if HAVE_UNISTD_H
+#         include <unistd.h>
+#        else /* on Windows with MSVC */
+#         include <direct.h>
+#        endif
+#        ifndef getcwd
+         char *getcwd ();
+#        endif
+
+int
+main ()
+{
+
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+/* mingw cwd does not start with '/', but getcwd does allocate.
+   However, mingw fails to honor non-zero size.  */
+#else
+           if (chdir ("/") != 0)
+             return 1;
+           else
+             {
+               char *f = getcwd (NULL, 0);
+               if (! f)
+                 return 2;
+               if (f[0] != '/')
+                 return 3;
+               if (f[1] != '\0')
+                 return 4;
+               free (f);
+               return 0;
+             }
 #endif
-#include <time.h>
 
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_getcwd_null=yes
+else
+  gl_cv_func_getcwd_null=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
+$as_echo "$gl_cv_func_getcwd_null" >&6; }
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5
+$as_echo_n "checking for getcwd with POSIX signature... " >&6; }
+if test "${gl_cv_func_getcwd_posix_signature+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <unistd.h>
 int
 main ()
 {
-#undef $gl_func
-  (void) $gl_func;
+extern
+           #ifdef __cplusplus
+           "C"
+           #endif
+           char *getcwd (char *, size_t);
+
   ;
   return 0;
 }
+
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  eval "$as_gl_Symbol=yes"
+  gl_cv_func_getcwd_posix_signature=yes
 else
-  eval "$as_gl_Symbol=no"
+  gl_cv_func_getcwd_posix_signature=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
 fi
-eval ac_res=\$$as_gl_Symbol
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-    eval as_val=\$$as_gl_Symbol
-   if test "x$as_val" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5
+$as_echo "$gl_cv_func_getcwd_posix_signature" >&6; }
+
+ac_fn_c_check_decl "$LINENO" "getcwd" "ac_cv_have_decl_getcwd" "$ac_includes_default"
+if test "x$ac_cv_have_decl_getcwd" = x""yes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETCWD $ac_have_decl
 _ACEOF
 
-                     eval ac_cv_have_decl_$gl_func=yes
+
+
+ac_fn_c_check_decl "$LINENO" "getdtablesize" "ac_cv_have_decl_getdtablesize" "$ac_includes_default"
+if test "x$ac_cv_have_decl_getdtablesize" = x""yes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
 fi
-      done
 
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETDTABLESIZE $ac_have_decl
+_ACEOF
+
+ac_fn_c_check_decl "$LINENO" "getlogin_r" "ac_cv_have_decl_getlogin_r" "$ac_includes_default"
+if test "x$ac_cv_have_decl_getlogin_r" = x""yes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETLOGIN_R $ac_have_decl
+_ACEOF
+
+
+
+ac_fn_c_check_decl "$LINENO" "getlogin" "ac_cv_have_decl_getlogin" "$ac_includes_default"
+if test "x$ac_cv_have_decl_getlogin" = x""yes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETLOGIN $ac_have_decl
+_ACEOF
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
+$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
+if test "${ac_cv_c_restrict+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_c_restrict=no
+   # The order here caters to the fact that C++ does not require restrict.
+   for ac_kw in __restrict __restrict__ _Restrict restrict; do
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+typedef int *int_ptr;
+	   int foo (int_ptr $ac_kw ip) { return ip[0]; }
+	   int bar (int [$ac_kw]); /* Catch GCC bug 14050.  */
+	   int bar (int ip[$ac_kw]) { return ip[0]; }
+
+int
+main ()
+{
+int s[1];
+	   int *$ac_kw t = s;
+	   t[0] = 0;
+	   return foo (t) + bar (t);
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_c_restrict=$ac_kw
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+     test "$ac_cv_c_restrict" != no && break
+   done
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
+$as_echo "$ac_cv_c_restrict" >&6; }
+
+ case $ac_cv_c_restrict in
+   restrict) ;;
+   no) $as_echo "#define restrict /**/" >>confdefs.h
+ ;;
+   *)  cat >>confdefs.h <<_ACEOF
+#define restrict $ac_cv_c_restrict
+_ACEOF
+ ;;
+ esac
 
 
+  GNULIB_GETTIMEOFDAY=0;
+    HAVE_GETTIMEOFDAY=1;
+  HAVE_STRUCT_TIMEVAL=1;
+  HAVE_SYS_TIME_H=1;
+  HAVE_TIMEZONE_T=0;
+  REPLACE_GETTIMEOFDAY=0;
+  REPLACE_STRUCT_TIMEVAL=0;
 
 
 
@@ -7980,22 +8618,22 @@ fi
 
 
      if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_limits_h='<'limits.h'>'
+       gl_cv_next_sys_time_h='<'sys/time.h'>'
      else
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <limits.h>" >&5
-$as_echo_n "checking absolute name of <limits.h>... " >&6; }
-if test "${gl_cv_next_limits_h+set}" = set; then :
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
+$as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
+if test "${gl_cv_next_sys_time_h+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
 
-             if test $ac_cv_header_limits_h = yes; then
+             if test $ac_cv_header_sys_time_h = yes; then
 
 
 
 
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <limits.h>
+#include <sys/time.h>
 _ACEOF
                 case "$host_os" in
     aix*) gl_absname_cpp="$ac_cpp -C" ;;
@@ -8011,7 +8649,7 @@ _ACEOF
       ;;
   esac
       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-  gl_header_literal_regex=`echo 'limits.h' \
+  gl_header_literal_regex=`echo 'sys/time.h' \
                            | sed -e "$gl_make_literal_regex_sed"`
   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
@@ -8020,240 +8658,199 @@ _ACEOF
       q
     }'
 
-        gl_cv_absolute_limits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+        gl_cv_absolute_sys_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
   sed -n "$gl_absolute_header_sed"`
 
-           gl_header=$gl_cv_absolute_limits_h
-           gl_cv_next_limits_h='"'$gl_header'"'
+           gl_header=$gl_cv_absolute_sys_time_h
+           gl_cv_next_sys_time_h='"'$gl_header'"'
           else
-               gl_cv_next_limits_h='<'limits.h'>'
+               gl_cv_next_sys_time_h='<'sys/time.h'>'
              fi
 
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_limits_h" >&5
-$as_echo "$gl_cv_next_limits_h" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
+$as_echo "$gl_cv_next_sys_time_h" >&6; }
      fi
-     NEXT_LIMITS_H=$gl_cv_next_limits_h
+     NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
 
      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
-       gl_next_as_first_directive='<'limits.h'>'
+       gl_next_as_first_directive='<'sys/time.h'>'
      else
        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_limits_h
+       gl_next_as_first_directive=$gl_cv_next_sys_time_h
      fi
-     NEXT_AS_FIRST_DIRECTIVE_LIMITS_H=$gl_next_as_first_directive
+     NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
 
 
 
 
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether limits.h has ULLONG_WIDTH etc." >&5
-$as_echo_n "checking whether limits.h has ULLONG_WIDTH etc.... " >&6; }
-if test "${gl_cv_header_limits_width+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
-                           #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
-                          #endif
-                          #include <limits.h>
-                          int ullw = ULLONG_WIDTH;
+  if test $ac_cv_header_sys_time_h != yes; then
+    HAVE_SYS_TIME_H=0
+  fi
+
+
+
+
+
+  if test $ac_cv_header_sys_socket_h != yes; then
+                    for ac_header in winsock2.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
+if test "x$ac_cv_header_winsock2_h" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_WINSOCK2_H 1
+_ACEOF
+
+fi
+
+done
+
+  fi
+  if test "$ac_cv_header_winsock2_h" = yes; then
+    HAVE_WINSOCK2_H=1
+    UNISTD_H_HAVE_WINSOCK2_H=1
+    SYS_IOCTL_H_HAVE_WINSOCK2_H=1
+  else
+    HAVE_WINSOCK2_H=0
+  fi
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
+$as_echo_n "checking for struct timeval... " >&6; }
+if test "${gl_cv_sys_struct_timeval+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#if HAVE_SYS_TIME_H
+             #include <sys/time.h>
+            #endif
+            #include <time.h>
+            #if HAVE_WINSOCK2_H
+            # include <winsock2.h>
+            #endif
+
 int
 main ()
 {
-
+static struct timeval x; x.tv_sec = x.tv_usec;
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  gl_cv_header_limits_width=yes
+  gl_cv_sys_struct_timeval=yes
 else
-  gl_cv_header_limits_width=no
+  gl_cv_sys_struct_timeval=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_width" >&5
-$as_echo "$gl_cv_header_limits_width" >&6; }
-  if test "$gl_cv_header_limits_width" = yes; then
-    LIMITS_H=
-  else
-    LIMITS_H=limits.h
-  fi
 
-   if test -n "$LIMITS_H"; then
-  GL_GENERATE_LIMITS_H_TRUE=
-  GL_GENERATE_LIMITS_H_FALSE='#'
-else
-  GL_GENERATE_LIMITS_H_TRUE='#'
-  GL_GENERATE_LIMITS_H_FALSE=
 fi
-
-
-
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
-$as_echo_n "checking for unsigned long long int... " >&6; }
-if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
+$as_echo "$gl_cv_sys_struct_timeval" >&6; }
+  if test $gl_cv_sys_struct_timeval != yes; then
+    HAVE_STRUCT_TIMEVAL=0
+  else
+                            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
+$as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
+if test "${gl_cv_sys_struct_timeval_tv_sec+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
-  ac_cv_type_unsigned_long_long_int=yes
-     if test "x${ac_cv_prog_cc_c99-no}" = xno; then
-       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
+#if HAVE_SYS_TIME_H
+               #include <sys/time.h>
+              #endif
+              #include <time.h>
+              #if HAVE_WINSOCK2_H
+              # include <winsock2.h>
+              #endif
 
-  /* For now, do not test the preprocessor; as of 2007 there are too many
-         implementations with broken preprocessors.  Perhaps this can
-         be revisited in 2012.  In the meantime, code should not expect
-         #if to work with literals wider than 32 bits.  */
-      /* Test literals.  */
-      long long int ll = 9223372036854775807ll;
-      long long int nll = -9223372036854775807LL;
-      unsigned long long int ull = 18446744073709551615ULL;
-      /* Test constant expressions.   */
-      typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
-                     ? 1 : -1)];
-      typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
-                     ? 1 : -1)];
-      int i = 63;
 int
 main ()
 {
-/* Test availability of runtime routines for shift and division.  */
-      long long int llmax = 9223372036854775807ll;
-      unsigned long long int ullmax = 18446744073709551615ull;
-      return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
-              | (llmax / ll) | (llmax % ll)
-              | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
-              | (ullmax / ull) | (ullmax % ull));
+static struct timeval x;
+              typedef int verify_tv_sec_type[
+                sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
+              ];
+
   ;
   return 0;
 }
-
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_sys_struct_timeval_tv_sec=yes
 else
-  ac_cv_type_unsigned_long_long_int=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-     fi
+  gl_cv_sys_struct_timeval_tv_sec=no
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
-$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
-  if test $ac_cv_type_unsigned_long_long_int = yes; then
-
-$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
+$as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
+    if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
+      REPLACE_STRUCT_TIMEVAL=1
+    fi
   fi
 
 
-
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
-$as_echo_n "checking for long long int... " >&6; }
-if test "${ac_cv_type_long_long_int+set}" = set; then :
+    for gl_func in gettimeofday; do
+    as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
+if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then :
   $as_echo_n "(cached) " >&6
 else
-  ac_cv_type_long_long_int=yes
-      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
-        ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
-        if test $ac_cv_type_long_long_int = yes; then
-                                        if test "$cross_compiling" = yes; then :
-  :
-else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <limits.h>
-                 #ifndef LLONG_MAX
-                 # define HALF \
-                          (1LL << (sizeof (long long int) * CHAR_BIT - 2))
-                 # define LLONG_MAX (HALF - 1 + HALF)
-                 #endif
+
+#if HAVE_SYS_TIME_H
+# include <sys/time.h>
+#endif
+#include <time.h>
+
 int
 main ()
 {
-long long int n = 1;
-                 int i;
-                 for (i = 0; ; i++)
-                   {
-                     long long int m = n << i;
-                     if (m >> i != n)
-                       return 1;
-                     if (LLONG_MAX / 2 < m)
-                       break;
-                   }
-                 return 0;
+#undef $gl_func
+  (void) $gl_func;
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$as_gl_Symbol=yes"
 else
-  ac_cv_type_long_long_int=no
+  eval "$as_gl_Symbol=no"
 fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
+eval ac_res=\$$as_gl_Symbol
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+    eval as_val=\$$as_gl_Symbol
+   if test "x$as_val" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+_ACEOF
 
-        fi
-      fi
+                     eval ac_cv_have_decl_$gl_func=yes
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
-$as_echo "$ac_cv_type_long_long_int" >&6; }
-  if test $ac_cv_type_long_long_int = yes; then
+      done
 
-$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
 
-  fi
 
 
 
 
 
 
-    gl_cv_c_multiarch=no
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#ifndef __APPLE_CC__
-         not a universal capable compiler
-        #endif
-        typedef int dummy;
 
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
 
-               arch=
-     prev=
-     for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
-       if test -n "$prev"; then
-         case $word in
-           i?86 | x86_64 | ppc | ppc64)
-             if test -z "$arch" || test "$arch" = "$word"; then
-               arch="$word"
-             else
-               gl_cv_c_multiarch=yes
-             fi
-             ;;
-         esac
-         prev=
-       else
-         if test "x$word" = "x-arch"; then
-           prev=arch
-         fi
-       fi
-     done
 
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  if test $gl_cv_c_multiarch = yes; then
-    APPLE_UNIVERSAL_BUILD=1
-  else
-    APPLE_UNIVERSAL_BUILD=0
-  fi
 
 
 
@@ -8261,68 +8858,28 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 
 
-  if test $ac_cv_type_long_long_int = yes; then
-    HAVE_LONG_LONG_INT=1
-  else
-    HAVE_LONG_LONG_INT=0
-  fi
-
-
-  if test $ac_cv_type_unsigned_long_long_int = yes; then
-    HAVE_UNSIGNED_LONG_LONG_INT=1
-  else
-    HAVE_UNSIGNED_LONG_LONG_INT=0
-  fi
-
-
-
-  if test $ac_cv_header_wchar_h = yes; then
-    HAVE_WCHAR_H=1
-  else
-    HAVE_WCHAR_H=0
-  fi
-
-
-      if test $ac_cv_header_inttypes_h = yes; then
-    HAVE_INTTYPES_H=1
-  else
-    HAVE_INTTYPES_H=0
-  fi
-
-
-      if test $ac_cv_header_sys_types_h = yes; then
-    HAVE_SYS_TYPES_H=1
-  else
-    HAVE_SYS_TYPES_H=0
-  fi
-
-
-
-
-
-
 
 
 
 
 
      if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_stdint_h='<'stdint.h'>'
+       gl_cv_next_limits_h='<'limits.h'>'
      else
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
-$as_echo_n "checking absolute name of <stdint.h>... " >&6; }
-if test "${gl_cv_next_stdint_h+set}" = set; then :
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <limits.h>" >&5
+$as_echo_n "checking absolute name of <limits.h>... " >&6; }
+if test "${gl_cv_next_limits_h+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
 
-             if test $ac_cv_header_stdint_h = yes; then
+             if test $ac_cv_header_limits_h = yes; then
 
 
 
 
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <stdint.h>
+#include <limits.h>
 _ACEOF
                 case "$host_os" in
     aix*) gl_absname_cpp="$ac_cpp -C" ;;
@@ -8338,7 +8895,7 @@ _ACEOF
       ;;
   esac
       gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-  gl_header_literal_regex=`echo 'stdint.h' \
+  gl_header_literal_regex=`echo 'limits.h' \
                            | sed -e "$gl_make_literal_regex_sed"`
   gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
       s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
@@ -8347,548 +8904,389 @@ _ACEOF
       q
     }'
 
-        gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+        gl_cv_absolute_limits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
   sed -n "$gl_absolute_header_sed"`
 
-           gl_header=$gl_cv_absolute_stdint_h
-           gl_cv_next_stdint_h='"'$gl_header'"'
+           gl_header=$gl_cv_absolute_limits_h
+           gl_cv_next_limits_h='"'$gl_header'"'
           else
-               gl_cv_next_stdint_h='<'stdint.h'>'
+               gl_cv_next_limits_h='<'limits.h'>'
              fi
 
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
-$as_echo "$gl_cv_next_stdint_h" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_limits_h" >&5
+$as_echo "$gl_cv_next_limits_h" >&6; }
      fi
-     NEXT_STDINT_H=$gl_cv_next_stdint_h
+     NEXT_LIMITS_H=$gl_cv_next_limits_h
 
      if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
-       gl_next_as_first_directive='<'stdint.h'>'
+       gl_next_as_first_directive='<'limits.h'>'
      else
        # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_stdint_h
+       gl_next_as_first_directive=$gl_cv_next_limits_h
      fi
-     NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
+     NEXT_AS_FIRST_DIRECTIVE_LIMITS_H=$gl_next_as_first_directive
 
 
 
 
-  if test $ac_cv_header_stdint_h = yes; then
-    HAVE_STDINT_H=1
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether limits.h has ULLONG_WIDTH etc." >&5
+$as_echo_n "checking whether limits.h has ULLONG_WIDTH etc.... " >&6; }
+if test "${gl_cv_header_limits_width+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifndef __STDC_WANT_IEC_60559_BFP_EXT__
+                           #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
+                          #endif
+                          #include <limits.h>
+                          int ullw = ULLONG_WIDTH;
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_header_limits_width=yes
+else
+  gl_cv_header_limits_width=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_width" >&5
+$as_echo "$gl_cv_header_limits_width" >&6; }
+  if test "$gl_cv_header_limits_width" = yes; then
+    LIMITS_H=
   else
-    HAVE_STDINT_H=0
+    LIMITS_H=limits.h
   fi
 
+   if test -n "$LIMITS_H"; then
+  GL_GENERATE_LIMITS_H_TRUE=
+  GL_GENERATE_LIMITS_H_FALSE='#'
+else
+  GL_GENERATE_LIMITS_H_TRUE='#'
+  GL_GENERATE_LIMITS_H_FALSE=
+fi
+
 
-    if test $ac_cv_header_stdint_h = yes; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
-$as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
-if test "${gl_cv_header_working_stdint_h+set}" = set; then :
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
+$as_echo_n "checking for unsigned long long int... " >&6; }
+if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
-  gl_cv_header_working_stdint_h=no
+  ac_cv_type_unsigned_long_long_int=yes
+     if test "x${ac_cv_prog_cc_c99-no}" = xno; then
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
+  /* For now, do not test the preprocessor; as of 2007 there are too many
+         implementations with broken preprocessors.  Perhaps this can
+         be revisited in 2012.  In the meantime, code should not expect
+         #if to work with literals wider than 32 bits.  */
+      /* Test literals.  */
+      long long int ll = 9223372036854775807ll;
+      long long int nll = -9223372036854775807LL;
+      unsigned long long int ull = 18446744073709551615ULL;
+      /* Test constant expressions.   */
+      typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
+                     ? 1 : -1)];
+      typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
+                     ? 1 : -1)];
+      int i = 63;
+int
+main ()
+{
+/* Test availability of runtime routines for shift and division.  */
+      long long int llmax = 9223372036854775807ll;
+      unsigned long long int ullmax = 18446744073709551615ull;
+      return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
+              | (llmax / ll) | (llmax % ll)
+              | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
+              | (ullmax / ull) | (ullmax % ull));
+  ;
+  return 0;
+}
 
-#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
-#define __STDC_CONSTANT_MACROS 1
-#define __STDC_LIMIT_MACROS 1
-#include <stdint.h>
-/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>.  */
-#if !(defined WCHAR_MIN && defined WCHAR_MAX)
-#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
-#endif
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
 
+else
+  ac_cv_type_unsigned_long_long_int=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+     fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
+$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
+  if test $ac_cv_type_unsigned_long_long_int = yes; then
 
-  /* 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 <signal.h>
-  #if HAVE_WCHAR_H
-  # include <stdio.h>
-  # include <time.h>
-  # include <wchar.h>
-  #endif
+$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
 
+  fi
 
-#ifdef INT8_MAX
-int8_t a1 = INT8_MAX;
-int8_t a1min = INT8_MIN;
-#endif
-#ifdef INT16_MAX
-int16_t a2 = INT16_MAX;
-int16_t a2min = INT16_MIN;
-#endif
-#ifdef INT32_MAX
-int32_t a3 = INT32_MAX;
-int32_t a3min = INT32_MIN;
-#endif
-#ifdef INT64_MAX
-int64_t a4 = INT64_MAX;
-int64_t a4min = INT64_MIN;
-#endif
-#ifdef UINT8_MAX
-uint8_t b1 = UINT8_MAX;
-#else
-typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
-#endif
-#ifdef UINT16_MAX
-uint16_t b2 = UINT16_MAX;
-#endif
-#ifdef UINT32_MAX
-uint32_t b3 = UINT32_MAX;
-#endif
-#ifdef UINT64_MAX
-uint64_t b4 = UINT64_MAX;
-#endif
-int_least8_t c1 = INT8_C (0x7f);
-int_least8_t c1max = INT_LEAST8_MAX;
-int_least8_t c1min = INT_LEAST8_MIN;
-int_least16_t c2 = INT16_C (0x7fff);
-int_least16_t c2max = INT_LEAST16_MAX;
-int_least16_t c2min = INT_LEAST16_MIN;
-int_least32_t c3 = INT32_C (0x7fffffff);
-int_least32_t c3max = INT_LEAST32_MAX;
-int_least32_t c3min = INT_LEAST32_MIN;
-int_least64_t c4 = INT64_C (0x7fffffffffffffff);
-int_least64_t c4max = INT_LEAST64_MAX;
-int_least64_t c4min = INT_LEAST64_MIN;
-uint_least8_t d1 = UINT8_C (0xff);
-uint_least8_t d1max = UINT_LEAST8_MAX;
-uint_least16_t d2 = UINT16_C (0xffff);
-uint_least16_t d2max = UINT_LEAST16_MAX;
-uint_least32_t d3 = UINT32_C (0xffffffff);
-uint_least32_t d3max = UINT_LEAST32_MAX;
-uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
-uint_least64_t d4max = UINT_LEAST64_MAX;
-int_fast8_t e1 = INT_FAST8_MAX;
-int_fast8_t e1min = INT_FAST8_MIN;
-int_fast16_t e2 = INT_FAST16_MAX;
-int_fast16_t e2min = INT_FAST16_MIN;
-int_fast32_t e3 = INT_FAST32_MAX;
-int_fast32_t e3min = INT_FAST32_MIN;
-int_fast64_t e4 = INT_FAST64_MAX;
-int_fast64_t e4min = INT_FAST64_MIN;
-uint_fast8_t f1 = UINT_FAST8_MAX;
-uint_fast16_t f2 = UINT_FAST16_MAX;
-uint_fast32_t f3 = UINT_FAST32_MAX;
-uint_fast64_t f4 = UINT_FAST64_MAX;
-#ifdef INTPTR_MAX
-intptr_t g = INTPTR_MAX;
-intptr_t gmin = INTPTR_MIN;
-#endif
-#ifdef UINTPTR_MAX
-uintptr_t h = UINTPTR_MAX;
-#endif
-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)))
-#define TYPE_MAXIMUM(t) \
-  ((t) ((t) 0 < (t) -1 \
-        ? (t) -1 \
-        : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
-struct s {
-  int check_PTRDIFF:
-      PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
-      && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
-      ? 1 : -1;
-  /* Detect bug in FreeBSD 6.0 / ia64.  */
-  int check_SIG_ATOMIC:
-      SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
-      && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
-      ? 1 : -1;
-  int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
-  int check_WCHAR:
-      WCHAR_MIN == TYPE_MINIMUM (wchar_t)
-      && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
-      ? 1 : -1;
-  /* Detect bug in mingw.  */
-  int check_WINT:
-      WINT_MIN == TYPE_MINIMUM (wint_t)
-      && WINT_MAX == TYPE_MAXIMUM (wint_t)
-      ? 1 : -1;
-
-  /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others.  */
-  int check_UINT8_C:
-        (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
-  int check_UINT16_C:
-        (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
-
-  /* Detect bugs in OpenBSD 3.9 stdint.h.  */
-#ifdef UINT8_MAX
-  int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
-#endif
-#ifdef UINT16_MAX
-  int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
-#endif
-#ifdef UINT32_MAX
-  int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
-#endif
-#ifdef UINT64_MAX
-  int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
-#endif
-  int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
-  int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
-  int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
-  int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
-  int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
-  int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
-  int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
-  int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
-  int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
-  int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
-  int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
-};
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-                                                    if test "$cross_compiling" = yes; then :
-                 gl_cv_header_working_stdint_h=yes
 
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
+$as_echo_n "checking for long long int... " >&6; }
+if test "${ac_cv_type_long_long_int+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_type_long_long_int=yes
+      if test "x${ac_cv_prog_cc_c99-no}" = xno; then
+        ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
+        if test $ac_cv_type_long_long_int = yes; then
+                                        if test "$cross_compiling" = yes; then :
+  :
 else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
-
-#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
-#define __STDC_CONSTANT_MACROS 1
-#define __STDC_LIMIT_MACROS 1
-#include <stdint.h>
-
-
-  /* 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 <signal.h>
-  #if HAVE_WCHAR_H
-  # include <stdio.h>
-  # include <time.h>
-  # include <wchar.h>
-  #endif
-
-
-#include <stdio.h>
-#include <string.h>
-#define MVAL(macro) MVAL1(macro)
-#define MVAL1(expression) #expression
-static const char *macro_values[] =
-  {
-#ifdef INT8_MAX
-    MVAL (INT8_MAX),
-#endif
-#ifdef INT16_MAX
-    MVAL (INT16_MAX),
-#endif
-#ifdef INT32_MAX
-    MVAL (INT32_MAX),
-#endif
-#ifdef INT64_MAX
-    MVAL (INT64_MAX),
-#endif
-#ifdef UINT8_MAX
-    MVAL (UINT8_MAX),
-#endif
-#ifdef UINT16_MAX
-    MVAL (UINT16_MAX),
-#endif
-#ifdef UINT32_MAX
-    MVAL (UINT32_MAX),
-#endif
-#ifdef UINT64_MAX
-    MVAL (UINT64_MAX),
-#endif
-    NULL
-  };
-
+#include <limits.h>
+                 #ifndef LLONG_MAX
+                 # define HALF \
+                          (1LL << (sizeof (long long int) * CHAR_BIT - 2))
+                 # define LLONG_MAX (HALF - 1 + HALF)
+                 #endif
 int
 main ()
 {
-
-  const char **mv;
-  for (mv = macro_values; *mv != NULL; mv++)
-    {
-      const char *value = *mv;
-      /* Test whether it looks like a cast expression.  */
-      if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
-          || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
-          || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
-          || strncmp (value, "((int)"/*)*/, 6) == 0
-          || strncmp (value, "((signed short)"/*)*/, 15) == 0
-          || strncmp (value, "((signed char)"/*)*/, 14) == 0)
-        return mv - macro_values + 1;
-    }
-  return 0;
-
+long long int n = 1;
+                 int i;
+                 for (i = 0; ; i++)
+                   {
+                     long long int m = n << i;
+                     if (m >> i != n)
+                       return 1;
+                     if (LLONG_MAX / 2 < m)
+                       break;
+                   }
+                 return 0;
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_run "$LINENO"; then :
-  gl_cv_header_working_stdint_h=yes
+
+else
+  ac_cv_type_long_long_int=no
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
 fi
 
-
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
+        fi
+      fi
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
-$as_echo "$gl_cv_header_working_stdint_h" >&6; }
-  fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
+$as_echo "$ac_cv_type_long_long_int" >&6; }
+  if test $ac_cv_type_long_long_int = yes; then
 
-  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[...]

[diff truncated at 100000 bytes]


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]