public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH v3 02/13] change how list of modules is computed
  2013-11-18 20:27 [PATCH v3 00/13] use gnulib more heavily Tom Tromey
  2013-11-18 20:26 ` [PATCH v3 01/13] link gdbreplay against gnulib Tom Tromey
@ 2013-11-18 20:26 ` Tom Tromey
  2013-11-18 20:27 ` [PATCH v3 07/13] remove gdb_dirent.h Tom Tromey
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 24+ messages in thread
From: Tom Tromey @ 2013-11-18 20:26 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

While adding modules I found that the current approach of listing all
the modules on one line made it harder to experiment -- any conflicts
from git were a pain to resolve.

This patch splits the list of modules so that there is one module per
line.

2013-11-18  Tom Tromey  <tromey@redhat.com>

	* gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Split into
	multiple lines.
---
 gdb/ChangeLog               |  5 +++++
 gdb/gnulib/update-gnulib.sh | 10 +++++++++-
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/gdb/gnulib/update-gnulib.sh b/gdb/gnulib/update-gnulib.sh
index 0b292ba..2ad3231 100644
--- a/gdb/gnulib/update-gnulib.sh
+++ b/gdb/gnulib/update-gnulib.sh
@@ -29,7 +29,15 @@
 #     regenerate the various scripts and Makefiles are on the PATH.
 
 # The list of gnulib modules we are importing in GDB.
-IMPORTED_GNULIB_MODULES="fnmatch-gnu frexpl inttypes memmem update-copyright unistd pathmax"
+IMPORTED_GNULIB_MODULES="\
+    fnmatch-gnu \
+    frexpl \
+    inttypes \
+    memmem \
+    update-copyright \
+    unistd \
+    pathmax \
+"
 
 # The gnulib commit ID to use for the update.
 GNULIB_COMMIT_SHA1="8d5bd1402003bd0153984b138735adf537d960b0"
-- 
1.8.1.4

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH v3 01/13] link gdbreplay against gnulib
  2013-11-18 20:27 [PATCH v3 00/13] use gnulib more heavily Tom Tromey
@ 2013-11-18 20:26 ` Tom Tromey
  2013-11-18 20:26 ` [PATCH v3 02/13] change how list of modules is computed Tom Tromey
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 24+ messages in thread
From: Tom Tromey @ 2013-11-18 20:26 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

Later patches in this series will make changes to gdb and gdbserver
configury, necessitating the use of gnulib in gdbreplay.  This patch
introduces the dependency early, so that subsequent patches don't
break the build.

2013-11-18  Tom Tromey  <tromey@redhat.com>

	* Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
	LIBGNU.
---
 gdb/gdbserver/ChangeLog   | 5 +++++
 gdb/gdbserver/Makefile.in | 4 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in
index e42c67f..539a66f 100644
--- a/gdb/gdbserver/Makefile.in
+++ b/gdb/gdbserver/Makefile.in
@@ -286,10 +286,10 @@ all-lib: $(GNULIB_BUILDDIR)/Makefile
 	@$(MAKE) $(FLAGS_TO_PASS) DO=all DODIRS=$(GNULIB_BUILDDIR) subdir_do
 .PHONY: all-lib
 
-gdbreplay$(EXEEXT): $(GDBREPLAY_OBS)
+gdbreplay$(EXEEXT): $(GDBREPLAY_OBS) $(LIBGNU)
 	rm -f gdbreplay$(EXEEXT)
 	${CC-LD} $(INTERNAL_CFLAGS) $(INTERNAL_LDFLAGS) -o gdbreplay$(EXEEXT) $(GDBREPLAY_OBS) \
-	  $(XM_CLIBS)
+	  $(XM_CLIBS) $(LIBGNU)
 
 IPA_OBJS=ax-ipa.o tracepoint-ipa.o format-ipa.o utils-ipa.o regcache-ipa.o remote-utils-ipa.o common-utils-ipa.o tdesc-ipa.o ${IPA_DEPFILES}
 
-- 
1.8.1.4

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH v3 07/13] remove gdb_dirent.h
  2013-11-18 20:27 [PATCH v3 00/13] use gnulib more heavily Tom Tromey
  2013-11-18 20:26 ` [PATCH v3 01/13] link gdbreplay against gnulib Tom Tromey
  2013-11-18 20:26 ` [PATCH v3 02/13] change how list of modules is computed Tom Tromey
@ 2013-11-18 20:27 ` Tom Tromey
  2013-11-18 20:27 ` [PATCH v3 03/13] import strstr and strerror modules Tom Tromey
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 24+ messages in thread
From: Tom Tromey @ 2013-11-18 20:27 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This removes gdb_dirent.h and updates the code to use dirent.h
instead.  It also removes the now-useless configure checks.

2013-11-18  Tom Tromey  <tromey@redhat.com>

	* common/common.m4 (GDB_AC_COMMON): Don't use AC_HEADER_DIRENT.
	* common/gdb_dirent.h: Remove.
	* common/filestuff.c: Use dirent.h.
	* common/linux-osdata.c: Use dirent.h.
	(NAMELEN): Define.
	* config.in: Rebuild.
	* configure: Rebuild.
	* configure.ac: Don't use AC_HEADER_DIRENT.
	* linux-fork.c: Use dirent.h
	* linux-nat.c: Use dirent.h.
	* nto-procfs.c: Use dirent.h.
	* procfs.c: Use dirent.h.

2013-11-18  Tom Tromey  <tromey@redhat.com>

	* config.in: Rebuild.
	* configure: Rebuild.
	* configure.ac: Don't use AC_HEADER_DIRENT.
---
 gdb/ChangeLog              |  15 +++
 gdb/common/common.m4       |   1 -
 gdb/common/filestuff.c     |   2 +-
 gdb/common/gdb_dirent.h    |  40 ------
 gdb/common/linux-osdata.c  |   4 +-
 gdb/config.in              |  15 ---
 gdb/configure              | 318 ---------------------------------------------
 gdb/configure.ac           |   1 -
 gdb/gdbserver/ChangeLog    |   6 +
 gdb/gdbserver/config.in    |  15 ---
 gdb/gdbserver/configure    | 318 ---------------------------------------------
 gdb/gdbserver/configure.ac |   1 -
 gdb/linux-fork.c           |   2 +-
 gdb/linux-nat.c            |   2 +-
 gdb/nto-procfs.c           |   2 +-
 gdb/procfs.c               |   2 +-
 16 files changed, 29 insertions(+), 715 deletions(-)
 delete mode 100644 gdb/common/gdb_dirent.h

diff --git a/gdb/common/common.m4 b/gdb/common/common.m4
index b1abc4d..29debd1 100644
--- a/gdb/common/common.m4
+++ b/gdb/common/common.m4
@@ -19,7 +19,6 @@ dnl along with this program.  If not, see <http://www.gnu.org/licenses/>.
 dnl Invoke configury needed by the files in 'common'.
 AC_DEFUN([GDB_AC_COMMON], [
   AC_HEADER_STDC
-  AC_HEADER_DIRENT
   AC_FUNC_ALLOCA
 
   dnl Note that this requires codeset.m4, which is included
diff --git a/gdb/common/filestuff.c b/gdb/common/filestuff.c
index ff6d54f..bbb60a7 100644
--- a/gdb/common/filestuff.c
+++ b/gdb/common/filestuff.c
@@ -58,7 +58,7 @@
 
 #ifndef HAVE_FDWALK
 
-#include "gdb_dirent.h"
+#include <dirent.h>
 
 /* Replacement for fdwalk, if the system doesn't define it.  Walks all
    open file descriptors (though this implementation may walk closed
diff --git a/gdb/common/gdb_dirent.h b/gdb/common/gdb_dirent.h
deleted file mode 100644
index f86f128..0000000
--- a/gdb/common/gdb_dirent.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/* Portable <dirent.h>.
-   Copyright (C) 2000-2013 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#ifndef GDB_DIRENT_H
-#define GDB_DIRENT_H 1
-
-/* See description of `AC_HEADER_DIRENT' in the Autoconf manual.  */
-#ifdef HAVE_DIRENT_H
-# include <dirent.h>		/* ARI: dirent.h */
-# define NAMELEN(dirent) strlen ((dirent)->d_name)    /* ARI: strlen d_name */
-#else
-# define dirent direct
-# define NAMELEN(dirent) (dirent)->d_namelen	/* ARI: d_namelen */
-# ifdef HAVE_SYS_NDIR_H
-#  include <sys/ndir.h>
-# endif
-# ifdef HAVE_SYS_DIR_H
-#  include <sys/dir.h>
-# endif
-# ifdef HAVE_NDIR_H
-#  include <ndir.h>
-# endif
-#endif
-
-#endif /* not GDB_DIRENT_H */
diff --git a/gdb/common/linux-osdata.c b/gdb/common/linux-osdata.c
index 37a31f2..0ff10c6 100644
--- a/gdb/common/linux-osdata.c
+++ b/gdb/common/linux-osdata.c
@@ -42,10 +42,12 @@
 #include "xml-utils.h"
 #include "buffer.h"
 #include "gdb_assert.h"
-#include "gdb_dirent.h"
+#include <dirent.h>
 #include "gdb_stat.h"
 #include "filestuff.h"
 
+#define NAMELEN(dirent) strlen ((dirent)->d_name)
+
 /* Define PID_T to be a fixed size that is at least as large as pid_t,
    so that reading pid values embedded in /proc works
    consistently.  */
diff --git a/gdb/config.in b/gdb/config.in
index 7dfb5c7..4e3f6de 100644
--- a/gdb/config.in
+++ b/gdb/config.in
@@ -120,10 +120,6 @@
    */
 #undef HAVE_DECL_STRSTR
 
-/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
-   */
-#undef HAVE_DIRENT_H
-
 /* Define to 1 if you have the <dlfcn.h> header file. */
 #undef HAVE_DLFCN_H
 
@@ -253,9 +249,6 @@
 /* Define to 1 if you have the <ncurses/term.h> header file. */
 #undef HAVE_NCURSES_TERM_H
 
-/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
-#undef HAVE_NDIR_H
-
 /* Define to 1 if you have the <nlist.h> header file. */
 #undef HAVE_NLIST_H
 
@@ -430,10 +423,6 @@
 /* Define to 1 if you have the <sys/debugreg.h> header file. */
 #undef HAVE_SYS_DEBUGREG_H
 
-/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
-   */
-#undef HAVE_SYS_DIR_H
-
 /* Define to 1 if you have the <sys/fault.h> header file. */
 #undef HAVE_SYS_FAULT_H
 
@@ -446,10 +435,6 @@
 /* Define to 1 if you have the <sys/ioctl.h> header file. */
 #undef HAVE_SYS_IOCTL_H
 
-/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
-   */
-#undef HAVE_SYS_NDIR_H
-
 /* Define to 1 if you have the <sys/param.h> header file. */
 #undef HAVE_SYS_PARAM_H
 
diff --git a/gdb/configure b/gdb/configure
index ae24ca5..b1a4d48 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -8642,165 +8642,6 @@ fi
 # Checks for header files.  #
 # ------------------------- #
 
-ac_header_dirent=no
-for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
-  as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
-$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/types.h>
-#include <$ac_hdr>
-
-int
-main ()
-{
-if ((DIR *) 0)
-return 0;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  eval "$as_ac_Header=yes"
-else
-  eval "$as_ac_Header=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-eval ac_res=\$$as_ac_Header
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Header
-   if test "x$as_val" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
-_ACEOF
-
-ac_header_dirent=$ac_hdr; break
-fi
-
-done
-# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
-if test $ac_header_dirent = dirent.h; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
-$as_echo_n "checking for library containing opendir... " >&6; }
-if test "${ac_cv_search_opendir+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char opendir ();
-int
-main ()
-{
-return opendir ();
-  ;
-  return 0;
-}
-_ACEOF
-for ac_lib in '' dir; do
-  if test -z "$ac_lib"; then
-    ac_res="none required"
-  else
-    ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-  fi
-  if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_search_opendir=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext
-  if test "${ac_cv_search_opendir+set}" = set; then :
-  break
-fi
-done
-if test "${ac_cv_search_opendir+set}" = set; then :
-
-else
-  ac_cv_search_opendir=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
-$as_echo "$ac_cv_search_opendir" >&6; }
-ac_res=$ac_cv_search_opendir
-if test "$ac_res" != no; then :
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-
-fi
-
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
-$as_echo_n "checking for library containing opendir... " >&6; }
-if test "${ac_cv_search_opendir+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char opendir ();
-int
-main ()
-{
-return opendir ();
-  ;
-  return 0;
-}
-_ACEOF
-for ac_lib in '' x; do
-  if test -z "$ac_lib"; then
-    ac_res="none required"
-  else
-    ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-  fi
-  if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_search_opendir=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext
-  if test "${ac_cv_search_opendir+set}" = set; then :
-  break
-fi
-done
-if test "${ac_cv_search_opendir+set}" = set; then :
-
-else
-  ac_cv_search_opendir=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
-$as_echo "$ac_cv_search_opendir" >&6; }
-ac_res=$ac_cv_search_opendir
-if test "$ac_res" != no; then :
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-
-fi
-
-fi
-
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
 $as_echo_n "checking for ANSI C header files... " >&6; }
 if test "${ac_cv_header_stdc+set}" = set; then :
@@ -10282,165 +10123,6 @@ $as_echo "#define STDC_HEADERS 1" >>confdefs.h
 
 fi
 
-  ac_header_dirent=no
-for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
-  as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
-$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/types.h>
-#include <$ac_hdr>
-
-int
-main ()
-{
-if ((DIR *) 0)
-return 0;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  eval "$as_ac_Header=yes"
-else
-  eval "$as_ac_Header=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-eval ac_res=\$$as_ac_Header
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Header
-   if test "x$as_val" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
-_ACEOF
-
-ac_header_dirent=$ac_hdr; break
-fi
-
-done
-# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
-if test $ac_header_dirent = dirent.h; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
-$as_echo_n "checking for library containing opendir... " >&6; }
-if test "${ac_cv_search_opendir+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char opendir ();
-int
-main ()
-{
-return opendir ();
-  ;
-  return 0;
-}
-_ACEOF
-for ac_lib in '' dir; do
-  if test -z "$ac_lib"; then
-    ac_res="none required"
-  else
-    ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-  fi
-  if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_search_opendir=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext
-  if test "${ac_cv_search_opendir+set}" = set; then :
-  break
-fi
-done
-if test "${ac_cv_search_opendir+set}" = set; then :
-
-else
-  ac_cv_search_opendir=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
-$as_echo "$ac_cv_search_opendir" >&6; }
-ac_res=$ac_cv_search_opendir
-if test "$ac_res" != no; then :
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-
-fi
-
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
-$as_echo_n "checking for library containing opendir... " >&6; }
-if test "${ac_cv_search_opendir+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char opendir ();
-int
-main ()
-{
-return opendir ();
-  ;
-  return 0;
-}
-_ACEOF
-for ac_lib in '' x; do
-  if test -z "$ac_lib"; then
-    ac_res="none required"
-  else
-    ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-  fi
-  if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_search_opendir=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext
-  if test "${ac_cv_search_opendir+set}" = set; then :
-  break
-fi
-done
-if test "${ac_cv_search_opendir+set}" = set; then :
-
-else
-  ac_cv_search_opendir=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
-$as_echo "$ac_cv_search_opendir" >&6; }
-ac_res=$ac_cv_search_opendir
-if test "$ac_res" != no; then :
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-
-fi
-
-fi
-
   # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
 # for constant arguments.  Useless!
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
diff --git a/gdb/configure.ac b/gdb/configure.ac
index 88db73a..6025e89 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -1072,7 +1072,6 @@ fi
 # Checks for header files.  #
 # ------------------------- #
 
-AC_HEADER_DIRENT
 AC_HEADER_STDC
 # elf_hp.h is for HP/UX 64-bit shared library support.
 AC_CHECK_HEADERS([nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
diff --git a/gdb/gdbserver/config.in b/gdb/gdbserver/config.in
index d0976c1..e33cdea 100644
--- a/gdb/gdbserver/config.in
+++ b/gdb/gdbserver/config.in
@@ -42,10 +42,6 @@
    don't. */
 #undef HAVE_DECL_VSNPRINTF
 
-/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
-   */
-#undef HAVE_DIRENT_H
-
 /* Define to 1 if you have the `dladdr' function. */
 #undef HAVE_DLADDR
 
@@ -109,9 +105,6 @@
 /* Define to 1 if you have the <memory.h> header file. */
 #undef HAVE_MEMORY_H
 
-/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
-#undef HAVE_NDIR_H
-
 /* Define to 1 if you have the <netdb.h> header file. */
 #undef HAVE_NETDB_H
 
@@ -185,20 +178,12 @@
 /* Define to 1 if the target supports __sync_*_compare_and_swap */
 #undef HAVE_SYNC_BUILTINS
 
-/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
-   */
-#undef HAVE_SYS_DIR_H
-
 /* Define to 1 if you have the <sys/file.h> header file. */
 #undef HAVE_SYS_FILE_H
 
 /* Define to 1 if you have the <sys/ioctl.h> header file. */
 #undef HAVE_SYS_IOCTL_H
 
-/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
-   */
-#undef HAVE_SYS_NDIR_H
-
 /* Define to 1 if you have the <sys/procfs.h> header file. */
 #undef HAVE_SYS_PROCFS_H
 
diff --git a/gdb/gdbserver/configure b/gdb/gdbserver/configure
index 096c7b3..d75ec1f 100755
--- a/gdb/gdbserver/configure
+++ b/gdb/gdbserver/configure
@@ -4131,165 +4131,6 @@ $as_echo "#define STDC_HEADERS 1" >>confdefs.h
 
 fi
 
-ac_header_dirent=no
-for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
-  as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
-$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/types.h>
-#include <$ac_hdr>
-
-int
-main ()
-{
-if ((DIR *) 0)
-return 0;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  eval "$as_ac_Header=yes"
-else
-  eval "$as_ac_Header=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-eval ac_res=\$$as_ac_Header
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Header
-   if test "x$as_val" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
-_ACEOF
-
-ac_header_dirent=$ac_hdr; break
-fi
-
-done
-# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
-if test $ac_header_dirent = dirent.h; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
-$as_echo_n "checking for library containing opendir... " >&6; }
-if test "${ac_cv_search_opendir+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char opendir ();
-int
-main ()
-{
-return opendir ();
-  ;
-  return 0;
-}
-_ACEOF
-for ac_lib in '' dir; do
-  if test -z "$ac_lib"; then
-    ac_res="none required"
-  else
-    ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-  fi
-  if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_search_opendir=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext
-  if test "${ac_cv_search_opendir+set}" = set; then :
-  break
-fi
-done
-if test "${ac_cv_search_opendir+set}" = set; then :
-
-else
-  ac_cv_search_opendir=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
-$as_echo "$ac_cv_search_opendir" >&6; }
-ac_res=$ac_cv_search_opendir
-if test "$ac_res" != no; then :
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-
-fi
-
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
-$as_echo_n "checking for library containing opendir... " >&6; }
-if test "${ac_cv_search_opendir+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char opendir ();
-int
-main ()
-{
-return opendir ();
-  ;
-  return 0;
-}
-_ACEOF
-for ac_lib in '' x; do
-  if test -z "$ac_lib"; then
-    ac_res="none required"
-  else
-    ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-  fi
-  if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_search_opendir=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext
-  if test "${ac_cv_search_opendir+set}" = set; then :
-  break
-fi
-done
-if test "${ac_cv_search_opendir+set}" = set; then :
-
-else
-  ac_cv_search_opendir=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
-$as_echo "$ac_cv_search_opendir" >&6; }
-ac_res=$ac_cv_search_opendir
-if test "$ac_res" != no; then :
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-
-fi
-
-fi
-
 
 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
 # for constant arguments.  Useless!
@@ -5035,165 +4876,6 @@ $as_echo "#define STDC_HEADERS 1" >>confdefs.h
 
 fi
 
-  ac_header_dirent=no
-for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
-  as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
-$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/types.h>
-#include <$ac_hdr>
-
-int
-main ()
-{
-if ((DIR *) 0)
-return 0;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  eval "$as_ac_Header=yes"
-else
-  eval "$as_ac_Header=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-eval ac_res=\$$as_ac_Header
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Header
-   if test "x$as_val" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
-_ACEOF
-
-ac_header_dirent=$ac_hdr; break
-fi
-
-done
-# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
-if test $ac_header_dirent = dirent.h; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
-$as_echo_n "checking for library containing opendir... " >&6; }
-if test "${ac_cv_search_opendir+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char opendir ();
-int
-main ()
-{
-return opendir ();
-  ;
-  return 0;
-}
-_ACEOF
-for ac_lib in '' dir; do
-  if test -z "$ac_lib"; then
-    ac_res="none required"
-  else
-    ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-  fi
-  if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_search_opendir=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext
-  if test "${ac_cv_search_opendir+set}" = set; then :
-  break
-fi
-done
-if test "${ac_cv_search_opendir+set}" = set; then :
-
-else
-  ac_cv_search_opendir=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
-$as_echo "$ac_cv_search_opendir" >&6; }
-ac_res=$ac_cv_search_opendir
-if test "$ac_res" != no; then :
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-
-fi
-
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
-$as_echo_n "checking for library containing opendir... " >&6; }
-if test "${ac_cv_search_opendir+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char opendir ();
-int
-main ()
-{
-return opendir ();
-  ;
-  return 0;
-}
-_ACEOF
-for ac_lib in '' x; do
-  if test -z "$ac_lib"; then
-    ac_res="none required"
-  else
-    ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-  fi
-  if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_search_opendir=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext
-  if test "${ac_cv_search_opendir+set}" = set; then :
-  break
-fi
-done
-if test "${ac_cv_search_opendir+set}" = set; then :
-
-else
-  ac_cv_search_opendir=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
-$as_echo "$ac_cv_search_opendir" >&6; }
-ac_res=$ac_cv_search_opendir
-if test "$ac_res" != no; then :
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-
-fi
-
-fi
-
   # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
 # for constant arguments.  Useless!
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
diff --git a/gdb/gdbserver/configure.ac b/gdb/gdbserver/configure.ac
index 3bed876..87146c1 100644
--- a/gdb/gdbserver/configure.ac
+++ b/gdb/gdbserver/configure.ac
@@ -37,7 +37,6 @@ AC_PROG_RANLIB
 AC_ARG_PROGRAM
 
 AC_HEADER_STDC
-AC_HEADER_DIRENT
 
 AC_FUNC_ALLOCA
 
diff --git a/gdb/linux-fork.c b/gdb/linux-fork.c
index 0f27d68..1c325ef 100644
--- a/gdb/linux-fork.c
+++ b/gdb/linux-fork.c
@@ -33,7 +33,7 @@
 
 #include <sys/ptrace.h>
 #include "gdb_wait.h"
-#include "gdb_dirent.h"
+#include <dirent.h>
 #include <ctype.h>
 
 struct fork_info *fork_list;
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
index bccd583..e9613ac 100644
--- a/gdb/linux-nat.c
+++ b/gdb/linux-nat.c
@@ -54,7 +54,7 @@
 #include "event-top.h"
 #include <pwd.h>
 #include <sys/types.h>
-#include "gdb_dirent.h"
+#include <dirent.h>
 #include "xml-support.h"
 #include "terminal.h"
 #include <sys/vfs.h>
diff --git a/gdb/nto-procfs.c b/gdb/nto-procfs.c
index 424a91b..1c2f298 100644
--- a/gdb/nto-procfs.c
+++ b/gdb/nto-procfs.c
@@ -28,7 +28,7 @@
 #include <sys/procfs.h>
 #include <sys/neutrino.h>
 #include <sys/syspage.h>
-#include "gdb_dirent.h"
+#include <dirent.h>
 #include <sys/netmgr.h>
 
 #include "exceptions.h"
diff --git a/gdb/procfs.c b/gdb/procfs.c
index c0004f2..7a2aeb8 100644
--- a/gdb/procfs.c
+++ b/gdb/procfs.c
@@ -89,7 +89,7 @@
 
 #ifdef NEW_PROC_API
 #include <sys/types.h>
-#include "gdb_dirent.h"	/* opendir/readdir, for listing the LWP's */
+#include <dirent.h>	/* opendir/readdir, for listing the LWP's */
 #endif
 
 #include <fcntl.h>	/* for O_RDONLY */
-- 
1.8.1.4

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH v3 03/13] import strstr and strerror modules
  2013-11-18 20:27 [PATCH v3 00/13] use gnulib more heavily Tom Tromey
                   ` (2 preceding siblings ...)
  2013-11-18 20:27 ` [PATCH v3 07/13] remove gdb_dirent.h Tom Tromey
@ 2013-11-18 20:27 ` Tom Tromey
  2013-11-18 20:37 ` [PATCH v3 11/13] sys/types.h cleanup Tom Tromey
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 24+ messages in thread
From: Tom Tromey @ 2013-11-18 20:27 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This imports the gnulib strstr and strerror modules.  It doesn't make
any other changes to gdb; I found it simpler to work with the branch
if I made the changes more indepdendent than I had previously.

2013-11-18  Tom Tromey  <tromey@redhat.com>

	* gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add strerror
	and strstr.
	* gnulib/aclocal.m4: Update.
	* gnulib/config.in: Update.
	* gnulib/configure: Update.
	* gnulib/import/Makefile.am: Update.
	* gnulib/import/Makefile.in: Update.
	* gnulib/import/errno.in.h: New.
	* gnulib/import/intprops.h: New.
	* gnulib/import/m4/errno_h.m4: New.
	* gnulib/import/m4/gnulib-cache.m4: Update.
	* gnulib/import/m4/gnulib-comp.m4: Update.
	* gnulib/import/m4/strerror.m4: New.
	* gnulib/import/m4/strstr.m4: New.
	* gnulib/import/m4/sys_socket_h.m4: New.
	* gnulib/import/strerror-override.c: New.
	* gnulib/import/strerror-override.h: New.
	* gnulib/import/strerror.c: New.
	* gnulib/import/strstr.c: New.
---
 gdb/ChangeLog                         |   22 +
 gdb/gnulib/aclocal.m4                 |    4 +
 gdb/gnulib/config.in                  |   19 +
 gdb/gnulib/configure                  | 1942 ++++++++++++++++++++++++---------
 gdb/gnulib/import/Makefile.am         |   70 +-
 gdb/gnulib/import/Makefile.in         |   90 +-
 gdb/gnulib/import/errno.in.h          |  279 +++++
 gdb/gnulib/import/intprops.h          |  319 ++++++
 gdb/gnulib/import/m4/errno_h.m4       |  137 +++
 gdb/gnulib/import/m4/gnulib-cache.m4  |    4 +-
 gdb/gnulib/import/m4/gnulib-comp.m4   |   38 +
 gdb/gnulib/import/m4/strerror.m4      |   96 ++
 gdb/gnulib/import/m4/strstr.m4        |  130 +++
 gdb/gnulib/import/m4/sys_socket_h.m4  |  176 +++
 gdb/gnulib/import/strerror-override.c |  302 +++++
 gdb/gnulib/import/strerror-override.h |   56 +
 gdb/gnulib/import/strerror.c          |   70 ++
 gdb/gnulib/import/strstr.c            |   82 ++
 gdb/gnulib/update-gnulib.sh           |    2 +
 19 files changed, 3283 insertions(+), 555 deletions(-)
 create mode 100644 gdb/gnulib/import/errno.in.h
 create mode 100644 gdb/gnulib/import/intprops.h
 create mode 100644 gdb/gnulib/import/m4/errno_h.m4
 create mode 100644 gdb/gnulib/import/m4/strerror.m4
 create mode 100644 gdb/gnulib/import/m4/strstr.m4
 create mode 100644 gdb/gnulib/import/m4/sys_socket_h.m4
 create mode 100644 gdb/gnulib/import/strerror-override.c
 create mode 100644 gdb/gnulib/import/strerror-override.h
 create mode 100644 gdb/gnulib/import/strerror.c
 create mode 100644 gdb/gnulib/import/strstr.c

diff --git a/gdb/gnulib/aclocal.m4 b/gdb/gnulib/aclocal.m4
index 40fc440..c541001 100644
--- a/gdb/gnulib/aclocal.m4
+++ b/gdb/gnulib/aclocal.m4
@@ -1016,6 +1016,7 @@ m4_include([import/m4/00gnulib.m4])
 m4_include([import/m4/alloca.m4])
 m4_include([import/m4/codeset.m4])
 m4_include([import/m4/configmake.m4])
+m4_include([import/m4/errno_h.m4])
 m4_include([import/m4/exponentd.m4])
 m4_include([import/m4/exponentl.m4])
 m4_include([import/m4/extensions.m4])
@@ -1054,7 +1055,10 @@ m4_include([import/m4/ssize_t.m4])
 m4_include([import/m4/stdbool.m4])
 m4_include([import/m4/stddef_h.m4])
 m4_include([import/m4/stdint.m4])
+m4_include([import/m4/strerror.m4])
 m4_include([import/m4/string_h.m4])
+m4_include([import/m4/strstr.m4])
+m4_include([import/m4/sys_socket_h.m4])
 m4_include([import/m4/sys_types_h.m4])
 m4_include([import/m4/unistd_h.m4])
 m4_include([import/m4/warn-on-use.m4])
diff --git a/gdb/gnulib/config.in b/gdb/gnulib/config.in
index 66b2e3b..f006181 100644
--- a/gdb/gnulib/config.in
+++ b/gdb/gnulib/config.in
@@ -33,6 +33,10 @@
 /* Define as the word index where to find the exponent of 'double'. */
 #undef DBL_EXPBIT0_WORD
 
+/* 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 frexp should be tested. */
 #undef GNULIB_TEST_FREXP
 
@@ -54,6 +58,12 @@
 /* Define to 1 when the gnulib module memmem should be tested. */
 #undef GNULIB_TEST_MEMMEM
 
+/* 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
+
 /* Define to 1 if you have the `alarm' function. */
 #undef HAVE_ALARM
 
@@ -787,6 +797,9 @@
 /* Define to 1 if you have the <sys/param.h> header file. */
 #undef HAVE_SYS_PARAM_H
 
+/* Define to 1 if you have the <sys/socket.h> header file. */
+#undef HAVE_SYS_SOCKET_H
+
 /* Define to 1 if you have the <sys/stat.h> header file. */
 #undef HAVE_SYS_STAT_H
 
@@ -811,6 +824,9 @@
 /* Define to 1 if you have the <wctype.h> header file. */
 #undef HAVE_WCTYPE_H
 
+/* Define to 1 if you have the <winsock2.h> header file. */
+#undef HAVE_WINSOCK2_H
+
 /* Define if you have the 'wint_t' type. */
 #undef HAVE_WINT_T
 
@@ -879,6 +895,9 @@
    'ptrdiff_t'. */
 #undef PTRDIFF_T_SUFFIX
 
+/* 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
diff --git a/gdb/gnulib/configure b/gdb/gnulib/configure
index fc8a090..a694e24 100644
--- a/gdb/gnulib/configure
+++ b/gdb/gnulib/configure
@@ -656,6 +656,13 @@ NEXT_WCHAR_H
 HAVE_UNISTD_H
 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
 NEXT_UNISTD_H
+MKDIR_P
+WINDOWS_64_BIT_OFF_T
+NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
+NEXT_SYS_TYPES_H
+NEXT_AS_FIRST_DIRECTIVE_STRING_H
+NEXT_STRING_H
+HAVE_WINSOCK2_H
 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
 UNISTD_H_HAVE_WINSOCK2_H
 REPLACE_WRITE
@@ -776,12 +783,6 @@ GNULIB_DUP
 GNULIB_CLOSE
 GNULIB_CHOWN
 GNULIB_CHDIR
-MKDIR_P
-WINDOWS_64_BIT_OFF_T
-NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
-NEXT_SYS_TYPES_H
-NEXT_AS_FIRST_DIRECTIVE_STRING_H
-NEXT_STRING_H
 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
 NEXT_STDDEF_H
 GL_GENERATE_STDDEF_H_FALSE
@@ -1275,6 +1276,17 @@ GL_GENERATE_FLOAT_H_TRUE
 FLOAT_H
 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
 NEXT_FLOAT_H
+EOVERFLOW_VALUE
+EOVERFLOW_HIDDEN
+ENOLINK_VALUE
+ENOLINK_HIDDEN
+EMULTIHOP_VALUE
+EMULTIHOP_HIDDEN
+GL_GENERATE_ERRNO_H_FALSE
+GL_GENERATE_ERRNO_H_TRUE
+ERRNO_H
+NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
+NEXT_ERRNO_H
 PRAGMA_COLUMNS
 PRAGMA_SYSTEM_HEADER
 INCLUDE_NEXT_AS_FIRST_DIRECTIVE
@@ -2429,45 +2441,6 @@ $as_echo "$ac_res" >&6; }
 
 } # ac_fn_c_check_func
 
-# ac_fn_c_check_decl LINENO SYMBOL VAR
-# ------------------------------------
-# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
-ac_fn_c_check_decl ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
-$as_echo_n "checking whether $2 is declared... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-int
-main ()
-{
-#ifndef $2
-  (void) $2;
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  eval "$3=yes"
-else
-  eval "$3=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-eval ac_res=\$$3
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-
-} # ac_fn_c_check_decl
-
 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
 # --------------------------------------------
 # Tries to find the compile-time value of EXPR in a program that includes
@@ -2646,6 +2619,45 @@ rm -f conftest.val
 
 } # ac_fn_c_compute_int
 
+# ac_fn_c_check_decl LINENO SYMBOL VAR
+# ------------------------------------
+# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
+ac_fn_c_check_decl ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
+$as_echo_n "checking whether $2 is declared... " >&6; }
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+#ifndef $2
+  (void) $2;
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$3=yes"
+else
+  eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} # ac_fn_c_check_decl
+
 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
 # -------------------------------------------
 # Tests whether TYPE exists after having included INCLUDES, setting cache
@@ -3004,6 +3016,7 @@ 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_header_list " sys/param.h"
+as_fn_append ac_header_list " sys/socket.h"
 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
@@ -4711,6 +4724,7 @@ fi
   # Code from module alloca:
   # Code from module alloca-opt:
   # Code from module configmake:
+  # Code from module errno:
   # Code from module extensions:
 
   # Code from module extern-inline:
@@ -4723,6 +4737,7 @@ fi
   # Code from module frexp:
   # Code from module frexpl:
   # Code from module include_next:
+  # Code from module intprops:
   # Code from module inttypes:
   # Code from module inttypes-incomplete:
   # Code from module isnand-nolibm:
@@ -4745,8 +4760,12 @@ fi
   # Code from module stddef:
   # Code from module stdint:
   # 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:
+  # Code from module strstr-simple:
   # Code from module sys_types:
   # Code from module unistd:
   # Code from module update-copyright:
@@ -5563,9 +5582,6 @@ fi
 
 
 
-
-
-
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
 $as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
 if test "${gl_cv_have_include_next+set}" = set; then :
@@ -5680,117 +5696,492 @@ $as_echo "$gl_cv_pragma_columns" >&6; }
 
 
 
-   { $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 for complete errno.h" >&5
+$as_echo_n "checking for complete errno.h... " >&6; }
+if test "${gl_cv_header_errno_h_complete+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+    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;
-}
+
+#include <errno.h>
+#if !defined ETXTBSY
+booboo
+#endif
+#if !defined ENOMSG
+booboo
+#endif
+#if !defined EIDRM
+booboo
+#endif
+#if !defined ENOLINK
+booboo
+#endif
+#if !defined EPROTO
+booboo
+#endif
+#if !defined EMULTIHOP
+booboo
+#endif
+#if !defined EBADMSG
+booboo
+#endif
+#if !defined EOVERFLOW
+booboo
+#endif
+#if !defined ENOTSUP
+booboo
+#endif
+#if !defined ENETRESET
+booboo
+#endif
+#if !defined ECONNABORTED
+booboo
+#endif
+#if !defined ESTALE
+booboo
+#endif
+#if !defined EDQUOT
+booboo
+#endif
+#if !defined ECANCELED
+booboo
+#endif
+#if !defined EOWNERDEAD
+booboo
+#endif
+#if !defined ENOTRECOVERABLE
+booboo
+#endif
+#if !defined EILSEQ
+booboo
+#endif
+
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_type_mbstate_t=yes
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "booboo" >/dev/null 2>&1; then :
+  gl_cv_header_errno_h_complete=no
 else
-  ac_cv_type_mbstate_t=no
+  gl_cv_header_errno_h_complete=yes
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f conftest*
+
+
 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 "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
+$as_echo "$gl_cv_header_errno_h_complete" >&6; }
+  if test $gl_cv_header_errno_h_complete = yes; then
+    ERRNO_H=''
+  else
 
-$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
 
-   else
 
-$as_echo "#define mbstate_t int" >>confdefs.h
 
-   fi
 
 
 
 
-  for ac_func in $ac_func_list
-do :
-  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-eval as_val=\$$as_ac_var
-   if test "x$as_val" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_errno_h='<'errno.h'>'
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
+$as_echo_n "checking absolute name of <errno.h>... " >&6; }
+if test "${gl_cv_next_errno_h+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <errno.h>
+
 _ACEOF
+                                                                                                                        case "$host_os" in
+                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
+                 *)    gl_absname_cpp="$ac_cpp" ;;
+               esac
 
-fi
-done
+               case "$host_os" in
+                 mingw*)
+                                                                                                                                     gl_dirsep_regex='[/\\]'
+                   ;;
+                 *)
+                   gl_dirsep_regex='\/'
+                   ;;
+               esac
+                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
 
+               gl_header_literal_regex=`echo 'errno.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/
+                   s|^/[^/]|//&|
+                   p
+                   q
+                 }'
+                                                            gl_cv_next_errno_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+                      sed -n "$gl_absolute_header_sed"`'"'
 
 
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
+$as_echo "$gl_cv_next_errno_h" >&6; }
+     fi
+     NEXT_ERRNO_H=$gl_cv_next_errno_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='<'errno.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_errno_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
 
 
 
 
+    ERRNO_H='errno.h'
+  fi
 
+   if test -n "$ERRNO_H"; then
+  GL_GENERATE_ERRNO_H_TRUE=
+  GL_GENERATE_ERRNO_H_FALSE='#'
+else
+  GL_GENERATE_ERRNO_H_TRUE='#'
+  GL_GENERATE_ERRNO_H_FALSE=
+fi
 
 
+  if test -n "$ERRNO_H"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
+$as_echo_n "checking for EMULTIHOP value... " >&6; }
+if test "${gl_cv_header_errno_h_EMULTIHOP+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
 
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+#include <errno.h>
+#ifdef EMULTIHOP
+yes
+#endif
 
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "yes" >/dev/null 2>&1; then :
+  gl_cv_header_errno_h_EMULTIHOP=yes
+else
+  gl_cv_header_errno_h_EMULTIHOP=no
+fi
+rm -f conftest*
 
+      if test $gl_cv_header_errno_h_EMULTIHOP = no; then
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+#ifdef EMULTIHOP
+yes
+#endif
 
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "yes" >/dev/null 2>&1; then :
+  gl_cv_header_errno_h_EMULTIHOP=hidden
+fi
+rm -f conftest*
 
+        if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
+                              if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP"        "
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+/* The following two lines are a workaround against an autoconf-2.52 bug.  */
+#include <stdio.h>
+#include <stdlib.h>
+"; then :
 
+fi
 
-  for ac_header in $ac_header_list
-do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
-"
-eval as_val=\$$as_ac_Header
-   if test "x$as_val" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+        fi
+      fi
 
 fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
+$as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
+    case $gl_cv_header_errno_h_EMULTIHOP in
+      yes | no)
+        EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
+        ;;
+      *)
+        EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
+        ;;
+    esac
 
-done
 
+  fi
 
 
+  if test -n "$ERRNO_H"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
+$as_echo_n "checking for ENOLINK value... " >&6; }
+if test "${gl_cv_header_errno_h_ENOLINK+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
 
-  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;
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <errno.h>
+#ifdef ENOLINK
+yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "yes" >/dev/null 2>&1; then :
+  gl_cv_header_errno_h_ENOLINK=yes
+else
+  gl_cv_header_errno_h_ENOLINK=no
+fi
+rm -f conftest*
+
+      if test $gl_cv_header_errno_h_ENOLINK = no; then
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+#ifdef ENOLINK
+yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "yes" >/dev/null 2>&1; then :
+  gl_cv_header_errno_h_ENOLINK=hidden
+fi
+rm -f conftest*
+
+        if test $gl_cv_header_errno_h_ENOLINK = hidden; then
+                              if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK"        "
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+/* The following two lines are a workaround against an autoconf-2.52 bug.  */
+#include <stdio.h>
+#include <stdlib.h>
+"; then :
+
+fi
+
+        fi
+      fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
+$as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
+    case $gl_cv_header_errno_h_ENOLINK in
+      yes | no)
+        ENOLINK_HIDDEN=0; ENOLINK_VALUE=
+        ;;
+      *)
+        ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
+        ;;
+    esac
+
+
+  fi
+
+
+  if test -n "$ERRNO_H"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
+$as_echo_n "checking for EOVERFLOW value... " >&6; }
+if test "${gl_cv_header_errno_h_EOVERFLOW+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <errno.h>
+#ifdef EOVERFLOW
+yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "yes" >/dev/null 2>&1; then :
+  gl_cv_header_errno_h_EOVERFLOW=yes
+else
+  gl_cv_header_errno_h_EOVERFLOW=no
+fi
+rm -f conftest*
+
+      if test $gl_cv_header_errno_h_EOVERFLOW = no; then
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+#ifdef EOVERFLOW
+yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "yes" >/dev/null 2>&1; then :
+  gl_cv_header_errno_h_EOVERFLOW=hidden
+fi
+rm -f conftest*
+
+        if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
+                              if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW"        "
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+/* The following two lines are a workaround against an autoconf-2.52 bug.  */
+#include <stdio.h>
+#include <stdlib.h>
+"; then :
+
+fi
+
+        fi
+      fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
+$as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
+    case $gl_cv_header_errno_h_EOVERFLOW in
+      yes | no)
+        EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
+        ;;
+      *)
+        EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
+        ;;
+    esac
+
+
+  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
+
+
+
+
+  for ac_func in $ac_func_list
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+eval as_val=\$$as_ac_var
+   if test "x$as_val" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  for ac_header in $ac_header_list
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+eval as_val=\$$as_ac_Header
+   if test "x$as_val" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+  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;
@@ -9118,56 +9509,241 @@ $as_echo "#define HAVE_WCHAR_T 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 :
+
+     REPLACE_STRERROR_0=0
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
+$as_echo_n "checking whether strerror(0) succeeds... " >&6; }
+if test "${gl_cv_func_strerror_0_works+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
+  if test "$cross_compiling" = yes; then :
+  case "$host_os" in
+                 # Guess yes on glibc systems.
+         *-gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
+                 # If we don't know, assume the worst.
+         *)      gl_cv_func_strerror_0_works="guessing no" ;;
+       esac
+
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-typedef int * int_ptr;
-	int foo (int_ptr $ac_kw ip) {
-	return ip[0];
-       }
+#include <string.h>
+           #include <errno.h>
+
 int
 main ()
 {
-int s[1];
-	int * $ac_kw t = s;
-	t[0] = 0;
-	return foo(t)
+int result = 0;
+           char *str;
+           errno = 0;
+           str = strerror (0);
+           if (!*str) result |= 1;
+           if (errno) result |= 2;
+           if (strstr (str, "nknown") || strstr (str, "ndefined"))
+             result |= 4;
+           return result;
   ;
   return 0;
 }
 _ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_c_restrict=$ac_kw
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_strerror_0_works=yes
+else
+  gl_cv_func_strerror_0_works=no
 fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-     test "$ac_cv_c_restrict" != no && break
-   done
-
+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_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
-
-
-
-
-
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
+$as_echo "$gl_cv_func_strerror_0_works" >&6; }
+  case "$gl_cv_func_strerror_0_works" in
+    *yes) ;;
+    *)
+      REPLACE_STRERROR_0=1
+
+$as_echo "#define REPLACE_STRERROR_0 1" >>confdefs.h
+
+      ;;
+  esac
+
+
+  GNULIB_CHDIR=0;
+  GNULIB_CHOWN=0;
+  GNULIB_CLOSE=0;
+  GNULIB_DUP=0;
+  GNULIB_DUP2=0;
+  GNULIB_DUP3=0;
+  GNULIB_ENVIRON=0;
+  GNULIB_EUIDACCESS=0;
+  GNULIB_FACCESSAT=0;
+  GNULIB_FCHDIR=0;
+  GNULIB_FCHOWNAT=0;
+  GNULIB_FDATASYNC=0;
+  GNULIB_FSYNC=0;
+  GNULIB_FTRUNCATE=0;
+  GNULIB_GETCWD=0;
+  GNULIB_GETDOMAINNAME=0;
+  GNULIB_GETDTABLESIZE=0;
+  GNULIB_GETGROUPS=0;
+  GNULIB_GETHOSTNAME=0;
+  GNULIB_GETLOGIN=0;
+  GNULIB_GETLOGIN_R=0;
+  GNULIB_GETPAGESIZE=0;
+  GNULIB_GETUSERSHELL=0;
+  GNULIB_GROUP_MEMBER=0;
+  GNULIB_ISATTY=0;
+  GNULIB_LCHOWN=0;
+  GNULIB_LINK=0;
+  GNULIB_LINKAT=0;
+  GNULIB_LSEEK=0;
+  GNULIB_PIPE=0;
+  GNULIB_PIPE2=0;
+  GNULIB_PREAD=0;
+  GNULIB_PWRITE=0;
+  GNULIB_READ=0;
+  GNULIB_READLINK=0;
+  GNULIB_READLINKAT=0;
+  GNULIB_RMDIR=0;
+  GNULIB_SETHOSTNAME=0;
+  GNULIB_SLEEP=0;
+  GNULIB_SYMLINK=0;
+  GNULIB_SYMLINKAT=0;
+  GNULIB_TTYNAME_R=0;
+  GNULIB_UNISTD_H_NONBLOCKING=0;
+  GNULIB_UNISTD_H_SIGPIPE=0;
+  GNULIB_UNLINK=0;
+  GNULIB_UNLINKAT=0;
+  GNULIB_USLEEP=0;
+  GNULIB_WRITE=0;
+    HAVE_CHOWN=1;
+  HAVE_DUP2=1;
+  HAVE_DUP3=1;
+  HAVE_EUIDACCESS=1;
+  HAVE_FACCESSAT=1;
+  HAVE_FCHDIR=1;
+  HAVE_FCHOWNAT=1;
+  HAVE_FDATASYNC=1;
+  HAVE_FSYNC=1;
+  HAVE_FTRUNCATE=1;
+  HAVE_GETDTABLESIZE=1;
+  HAVE_GETGROUPS=1;
+  HAVE_GETHOSTNAME=1;
+  HAVE_GETLOGIN=1;
+  HAVE_GETPAGESIZE=1;
+  HAVE_GROUP_MEMBER=1;
+  HAVE_LCHOWN=1;
+  HAVE_LINK=1;
+  HAVE_LINKAT=1;
+  HAVE_PIPE=1;
+  HAVE_PIPE2=1;
+  HAVE_PREAD=1;
+  HAVE_PWRITE=1;
+  HAVE_READLINK=1;
+  HAVE_READLINKAT=1;
+  HAVE_SETHOSTNAME=1;
+  HAVE_SLEEP=1;
+  HAVE_SYMLINK=1;
+  HAVE_SYMLINKAT=1;
+  HAVE_UNLINKAT=1;
+  HAVE_USLEEP=1;
+  HAVE_DECL_ENVIRON=1;
+  HAVE_DECL_FCHDIR=1;
+  HAVE_DECL_FDATASYNC=1;
+  HAVE_DECL_GETDOMAINNAME=1;
+  HAVE_DECL_GETLOGIN_R=1;
+  HAVE_DECL_GETPAGESIZE=1;
+  HAVE_DECL_GETUSERSHELL=1;
+  HAVE_DECL_SETHOSTNAME=1;
+  HAVE_DECL_TTYNAME_R=1;
+  HAVE_OS_H=0;
+  HAVE_SYS_PARAM_H=0;
+  REPLACE_CHOWN=0;
+  REPLACE_CLOSE=0;
+  REPLACE_DUP=0;
+  REPLACE_DUP2=0;
+  REPLACE_FCHOWNAT=0;
+  REPLACE_FTRUNCATE=0;
+  REPLACE_GETCWD=0;
+  REPLACE_GETDOMAINNAME=0;
+  REPLACE_GETLOGIN_R=0;
+  REPLACE_GETGROUPS=0;
+  REPLACE_GETPAGESIZE=0;
+  REPLACE_ISATTY=0;
+  REPLACE_LCHOWN=0;
+  REPLACE_LINK=0;
+  REPLACE_LINKAT=0;
+  REPLACE_LSEEK=0;
+  REPLACE_PREAD=0;
+  REPLACE_PWRITE=0;
+  REPLACE_READ=0;
+  REPLACE_READLINK=0;
+  REPLACE_RMDIR=0;
+  REPLACE_SLEEP=0;
+  REPLACE_SYMLINK=0;
+  REPLACE_TTYNAME_R=0;
+  REPLACE_UNLINK=0;
+  REPLACE_UNLINKAT=0;
+  REPLACE_USLEEP=0;
+  REPLACE_WRITE=0;
+  UNISTD_H_HAVE_WINSOCK2_H=0;
+  UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
+
+
+
+
+{ $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
+main ()
+{
+int s[1];
+	int * $ac_kw t = s;
+	t[0] = 0;
+	return foo(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
+
+
+
+
+
 
 
 
@@ -9279,6 +9855,85 @@ fi
 
 
 
+
+  if test "$gl_cv_func_memchr_works" != yes; then
+    REPLACE_STRSTR=1
+  else
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
+$as_echo_n "checking whether strstr works... " >&6; }
+if test "${gl_cv_func_strstr_works_always+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+                                               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef __GNU_LIBRARY__
+ #include <features.h>
+ #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
+     || defined __UCLIBC__
+  Lucky user
+ #endif
+#elif defined __CYGWIN__
+ #include <cygwin/version.h>
+ #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
+  Lucky user
+ #endif
+#else
+  Lucky user
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "Lucky user" >/dev/null 2>&1; then :
+  gl_cv_func_strstr_works_always="guessing yes"
+else
+  gl_cv_func_strstr_works_always="guessing no"
+fi
+rm -f conftest*
+
+
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <string.h> /* for strstr */
+#define P "_EF_BF_BD"
+#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
+#define NEEDLE P P P P P
+
+int
+main ()
+{
+return !!strstr (HAYSTACK, NEEDLE);
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_strstr_works_always=yes
+else
+  gl_cv_func_strstr_works_always=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_strstr_works_always" >&5
+$as_echo "$gl_cv_func_strstr_works_always" >&6; }
+    case "$gl_cv_func_strstr_works_always" in
+      *yes) ;;
+      *)
+        REPLACE_STRSTR=1
+        ;;
+    esac
+  fi
+
+
+
 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 :
 
@@ -9350,129 +10005,6 @@ fi
 $as_echo "$MKDIR_P" >&6; }
 
 
-  GNULIB_CHDIR=0;
-  GNULIB_CHOWN=0;
-  GNULIB_CLOSE=0;
-  GNULIB_DUP=0;
-  GNULIB_DUP2=0;
-  GNULIB_DUP3=0;
-  GNULIB_ENVIRON=0;
-  GNULIB_EUIDACCESS=0;
-  GNULIB_FACCESSAT=0;
-  GNULIB_FCHDIR=0;
-  GNULIB_FCHOWNAT=0;
-  GNULIB_FDATASYNC=0;
-  GNULIB_FSYNC=0;
-  GNULIB_FTRUNCATE=0;
-  GNULIB_GETCWD=0;
-  GNULIB_GETDOMAINNAME=0;
-  GNULIB_GETDTABLESIZE=0;
-  GNULIB_GETGROUPS=0;
-  GNULIB_GETHOSTNAME=0;
-  GNULIB_GETLOGIN=0;
-  GNULIB_GETLOGIN_R=0;
-  GNULIB_GETPAGESIZE=0;
-  GNULIB_GETUSERSHELL=0;
-  GNULIB_GROUP_MEMBER=0;
-  GNULIB_ISATTY=0;
-  GNULIB_LCHOWN=0;
-  GNULIB_LINK=0;
-  GNULIB_LINKAT=0;
-  GNULIB_LSEEK=0;
-  GNULIB_PIPE=0;
-  GNULIB_PIPE2=0;
-  GNULIB_PREAD=0;
-  GNULIB_PWRITE=0;
-  GNULIB_READ=0;
-  GNULIB_READLINK=0;
-  GNULIB_READLINKAT=0;
-  GNULIB_RMDIR=0;
-  GNULIB_SETHOSTNAME=0;
-  GNULIB_SLEEP=0;
-  GNULIB_SYMLINK=0;
-  GNULIB_SYMLINKAT=0;
-  GNULIB_TTYNAME_R=0;
-  GNULIB_UNISTD_H_NONBLOCKING=0;
-  GNULIB_UNISTD_H_SIGPIPE=0;
-  GNULIB_UNLINK=0;
-  GNULIB_UNLINKAT=0;
-  GNULIB_USLEEP=0;
-  GNULIB_WRITE=0;
-    HAVE_CHOWN=1;
-  HAVE_DUP2=1;
-  HAVE_DUP3=1;
-  HAVE_EUIDACCESS=1;
-  HAVE_FACCESSAT=1;
-  HAVE_FCHDIR=1;
-  HAVE_FCHOWNAT=1;
-  HAVE_FDATASYNC=1;
-  HAVE_FSYNC=1;
-  HAVE_FTRUNCATE=1;
-  HAVE_GETDTABLESIZE=1;
-  HAVE_GETGROUPS=1;
-  HAVE_GETHOSTNAME=1;
-  HAVE_GETLOGIN=1;
-  HAVE_GETPAGESIZE=1;
-  HAVE_GROUP_MEMBER=1;
-  HAVE_LCHOWN=1;
-  HAVE_LINK=1;
-  HAVE_LINKAT=1;
-  HAVE_PIPE=1;
-  HAVE_PIPE2=1;
-  HAVE_PREAD=1;
-  HAVE_PWRITE=1;
-  HAVE_READLINK=1;
-  HAVE_READLINKAT=1;
-  HAVE_SETHOSTNAME=1;
-  HAVE_SLEEP=1;
-  HAVE_SYMLINK=1;
-  HAVE_SYMLINKAT=1;
-  HAVE_UNLINKAT=1;
-  HAVE_USLEEP=1;
-  HAVE_DECL_ENVIRON=1;
-  HAVE_DECL_FCHDIR=1;
-  HAVE_DECL_FDATASYNC=1;
-  HAVE_DECL_GETDOMAINNAME=1;
-  HAVE_DECL_GETLOGIN_R=1;
-  HAVE_DECL_GETPAGESIZE=1;
-  HAVE_DECL_GETUSERSHELL=1;
-  HAVE_DECL_SETHOSTNAME=1;
-  HAVE_DECL_TTYNAME_R=1;
-  HAVE_OS_H=0;
-  HAVE_SYS_PARAM_H=0;
-  REPLACE_CHOWN=0;
-  REPLACE_CLOSE=0;
-  REPLACE_DUP=0;
-  REPLACE_DUP2=0;
-  REPLACE_FCHOWNAT=0;
-  REPLACE_FTRUNCATE=0;
-  REPLACE_GETCWD=0;
-  REPLACE_GETDOMAINNAME=0;
-  REPLACE_GETLOGIN_R=0;
-  REPLACE_GETGROUPS=0;
-  REPLACE_GETPAGESIZE=0;
-  REPLACE_ISATTY=0;
-  REPLACE_LCHOWN=0;
-  REPLACE_LINK=0;
-  REPLACE_LINKAT=0;
-  REPLACE_LSEEK=0;
-  REPLACE_PREAD=0;
-  REPLACE_PWRITE=0;
-  REPLACE_READ=0;
-  REPLACE_READLINK=0;
-  REPLACE_RMDIR=0;
-  REPLACE_SLEEP=0;
-  REPLACE_SYMLINK=0;
-  REPLACE_TTYNAME_R=0;
-  REPLACE_UNLINK=0;
-  REPLACE_UNLINKAT=0;
-  REPLACE_USLEEP=0;
-  REPLACE_WRITE=0;
-  UNISTD_H_HAVE_WINSOCK2_H=0;
-  UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
-
-
-
             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
 $as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
 if test "${gl_cv_header_wchar_h_correct_inline+set}" = set; then :
@@ -9730,6 +10262,7 @@ fi
 
 
 
+
   FLOAT_H=
   REPLACE_FLOAT_LDBL=0
   case "$host_os" in
@@ -12683,9 +13216,571 @@ else
 _ACEOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
   $EGREP "Lucky user" >/dev/null 2>&1; then :
-  gl_cv_func_memmem_works_fast="guessing yes"
+  gl_cv_func_memmem_works_fast="guessing yes"
+else
+  gl_cv_func_memmem_works_fast="guessing no"
+fi
+rm -f conftest*
+
+
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <signal.h> /* for signal */
+#include <string.h> /* for memmem */
+#include <stdlib.h> /* for malloc */
+#include <unistd.h> /* for alarm */
+static void quit (int sig) { exit (sig + 128); }
+
+int
+main ()
+{
+
+    int result = 0;
+    size_t m = 1000000;
+    char *haystack = (char *) malloc (2 * m + 1);
+    char *needle = (char *) malloc (m + 1);
+    /* Failure to compile this test due to missing alarm is okay,
+       since all such platforms (mingw) also lack memmem.  */
+    signal (SIGALRM, quit);
+    alarm (5);
+    /* Check for quadratic performance.  */
+    if (haystack && needle)
+      {
+        memset (haystack, 'A', 2 * m);
+        haystack[2 * m] = 'B';
+        memset (needle, 'A', m);
+        needle[m] = 'B';
+        if (!memmem (haystack, 2 * m + 1, needle, m + 1))
+          result |= 1;
+      }
+    return result;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_memmem_works_fast=yes
+else
+  gl_cv_func_memmem_works_fast=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_memmem_works_fast" >&5
+$as_echo "$gl_cv_func_memmem_works_fast" >&6; }
+    case "$gl_cv_func_memmem_works_fast" in
+      *yes) ;;
+      *)
+        REPLACE_MEMMEM=1
+        ;;
+    esac
+  fi
+
+  if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
+
+  fi
+
+
+
+
+  for ac_func in memmem
+do :
+  ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
+if test "x$ac_cv_func_memmem" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_MEMMEM 1
+_ACEOF
+
+fi
+done
+
+  if test $ac_cv_func_memmem = yes; then
+    HAVE_MEMMEM=1
+  else
+    HAVE_MEMMEM=0
+  fi
+
+  if test $ac_cv_have_decl_memmem = no; then
+    HAVE_DECL_MEMMEM=0
+  else
+            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5
+$as_echo_n "checking whether memmem works... " >&6; }
+if test "${gl_cv_func_memmem_works_always+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+                                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#ifdef __GNU_LIBRARY__
+ #include <features.h>
+ #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \
+                          || __GLIBC_MINOR__ > 12)) \
+      || (__GLIBC__ > 2)) \
+     || defined __UCLIBC__
+  Lucky user
+ #endif
+#elif defined __CYGWIN__
+ #include <cygwin/version.h>
+ #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
+  Lucky user
+ #endif
+#else
+  Lucky user
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "Lucky user" >/dev/null 2>&1; then :
+  gl_cv_func_memmem_works_always="guessing yes"
+else
+  gl_cv_func_memmem_works_always="guessing no"
+fi
+rm -f conftest*
+
+
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <string.h> /* for memmem */
+#define P "_EF_BF_BD"
+#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
+#define NEEDLE P P P P P
+
+int
+main ()
+{
+
+    int result = 0;
+    if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE)))
+      result |= 1;
+    /* Check for empty needle behavior.  */
+    {
+      const char *haystack = "AAA";
+      if (memmem (haystack, 3, NULL, 0) != haystack)
+        result |= 2;
+    }
+    return result;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_memmem_works_always=yes
+else
+  gl_cv_func_memmem_works_always=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_memmem_works_always" >&5
+$as_echo "$gl_cv_func_memmem_works_always" >&6; }
+    case "$gl_cv_func_memmem_works_always" in
+      *yes) ;;
+      *)
+        REPLACE_MEMMEM=1
+        ;;
+    esac
+  fi
+  :
+
+  if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
+
+  fi
+
+
+
+
+
+          GNULIB_MEMMEM=1
+
+
+
+
+
+$as_echo "#define GNULIB_TEST_MEMMEM 1" >>confdefs.h
+
+
+
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
+$as_echo_n "checking for ssize_t... " >&6; }
+if test "${gt_cv_ssize_t+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+int
+main ()
+{
+int x = sizeof (ssize_t *) + sizeof (ssize_t);
+            return !x;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gt_cv_ssize_t=yes
+else
+  gt_cv_ssize_t=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
+$as_echo "$gt_cv_ssize_t" >&6; }
+  if test $gt_cv_ssize_t = no; then
+
+$as_echo "#define ssize_t int" >>confdefs.h
+
+  fi
+
+
+
+
+  # Define two additional variables used in the Makefile substitution.
+
+  if test "$ac_cv_header_stdbool_h" = yes; then
+    STDBOOL_H=''
+  else
+    STDBOOL_H='stdbool.h'
+  fi
+
+   if test -n "$STDBOOL_H"; then
+  GL_GENERATE_STDBOOL_H_TRUE=
+  GL_GENERATE_STDBOOL_H_FALSE='#'
+else
+  GL_GENERATE_STDBOOL_H_TRUE='#'
+  GL_GENERATE_STDBOOL_H_FALSE=
+fi
+
+
+  if test "$ac_cv_type__Bool" = yes; then
+    HAVE__BOOL=1
+  else
+    HAVE__BOOL=0
+  fi
+
+
+
+
+
+  STDDEF_H=
+  if test $gt_cv_c_wchar_t = no; then
+    HAVE_WCHAR_T=0
+    STDDEF_H=stddef.h
+  fi
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
+$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
+if test "${gl_cv_decl_null_works+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stddef.h>
+      int test[2 * (sizeof NULL == sizeof (void *)) -1];
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_decl_null_works=yes
+else
+  gl_cv_decl_null_works=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
+$as_echo "$gl_cv_decl_null_works" >&6; }
+  if test $gl_cv_decl_null_works = no; then
+    REPLACE_NULL=1
+    STDDEF_H=stddef.h
+  fi
+
+   if test -n "$STDDEF_H"; then
+  GL_GENERATE_STDDEF_H_TRUE=
+  GL_GENERATE_STDDEF_H_FALSE='#'
+else
+  GL_GENERATE_STDDEF_H_TRUE='#'
+  GL_GENERATE_STDDEF_H_FALSE=
+fi
+
+  if test -n "$STDDEF_H"; then
+
+
+
+
+
+
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_stddef_h='<'stddef.h'>'
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
+$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
+if test "${gl_cv_next_stddef_h+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stddef.h>
+
+_ACEOF
+                                                                                                                        case "$host_os" in
+                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
+                 *)    gl_absname_cpp="$ac_cpp" ;;
+               esac
+
+               case "$host_os" in
+                 mingw*)
+                                                                                                                                     gl_dirsep_regex='[/\\]'
+                   ;;
+                 *)
+                   gl_dirsep_regex='\/'
+                   ;;
+               esac
+                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+
+               gl_header_literal_regex=`echo 'stddef.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/
+                   s|^/[^/]|//&|
+                   p
+                   q
+                 }'
+                                                            gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+                      sed -n "$gl_absolute_header_sed"`'"'
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
+$as_echo "$gl_cv_next_stddef_h" >&6; }
+     fi
+     NEXT_STDDEF_H=$gl_cv_next_stddef_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='<'stddef.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_stddef_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
+
+
+
+
+  fi
+
+
+
+
+
+
+
+  if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
+$as_echo_n "checking for working strerror function... " >&6; }
+if test "${gl_cv_func_working_strerror+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_working_strerror="guessing yes" ;;
+                   # If we don't know, assume the worst.
+           *)      gl_cv_func_working_strerror="guessing no" ;;
+         esac
+
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <string.h>
+
+int
+main ()
+{
+if (!*strerror (-2)) return 1;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  gl_cv_func_working_strerror=yes
+else
+  gl_cv_func_working_strerror=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_working_strerror" >&5
+$as_echo "$gl_cv_func_working_strerror" >&6; }
+    case "$gl_cv_func_working_strerror" in
+      *yes) ;;
+      *)
+                        REPLACE_STRERROR=1
+        ;;
+    esac
+
+  else
+            REPLACE_STRERROR=1
+  fi
+
+  if test $REPLACE_STRERROR = 1; then
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext"
+
+  fi
+
+
+cat >>confdefs.h <<_ACEOF
+#define GNULIB_STRERROR 1
+_ACEOF
+
+
+
+
+
+
+
+          GNULIB_STRERROR=1
+
+
+
+
+
+$as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
+
+
+
+
+
+  if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
+
+
+
+
+
+
+
+
+  gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext"
+
+
+
+
+
+  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
+
+
+  fi
+
+
+
+
+
+  if test $REPLACE_STRSTR = 0; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works in linear time" >&5
+$as_echo_n "checking whether strstr works in linear time... " >&6; }
+if test "${gl_cv_func_strstr_linear+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+                             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
+     && !(defined __i386__ || defined __x86_64__) \
+     && !defined __UCLIBC__
+  Lucky user
+ #endif
+#endif
+#ifdef __CYGWIN__
+ #include <cygwin/version.h>
+ #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
+  Lucky user
+ #endif
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "Lucky user" >/dev/null 2>&1; then :
+  gl_cv_func_strstr_linear="guessing yes"
 else
-  gl_cv_func_memmem_works_fast="guessing no"
+  gl_cv_func_strstr_linear="guessing no"
 fi
 rm -f conftest*
 
@@ -12695,7 +13790,7 @@ else
 /* end confdefs.h.  */
 
 #include <signal.h> /* for signal */
-#include <string.h> /* for memmem */
+#include <string.h> /* for strstr */
 #include <stdlib.h> /* for malloc */
 #include <unistd.h> /* for alarm */
 static void quit (int sig) { exit (sig + 128); }
@@ -12706,10 +13801,10 @@ main ()
 
     int result = 0;
     size_t m = 1000000;
-    char *haystack = (char *) malloc (2 * m + 1);
-    char *needle = (char *) malloc (m + 1);
+    char *haystack = (char *) malloc (2 * m + 2);
+    char *needle = (char *) malloc (m + 2);
     /* Failure to compile this test due to missing alarm is okay,
-       since all such platforms (mingw) also lack memmem.  */
+       since all such platforms (mingw) also have quadratic strstr.  */
     signal (SIGALRM, quit);
     alarm (5);
     /* Check for quadratic performance.  */
@@ -12717,9 +13812,11 @@ main ()
       {
         memset (haystack, 'A', 2 * m);
         haystack[2 * m] = 'B';
+        haystack[2 * m + 1] = 0;
         memset (needle, 'A', m);
         needle[m] = 'B';
-        if (!memmem (haystack, 2 * m + 1, needle, m + 1))
+        needle[m + 1] = 0;
+        if (!strstr (haystack, needle))
           result |= 1;
       }
     return result;
@@ -12729,9 +13826,9 @@ main ()
 }
 _ACEOF
 if ac_fn_c_try_run "$LINENO"; then :
-  gl_cv_func_memmem_works_fast=yes
+  gl_cv_func_strstr_linear=yes
 else
-  gl_cv_func_memmem_works_fast=no
+  gl_cv_func_strstr_linear=no
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
@@ -12739,17 +13836,17 @@ fi
 
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_fast" >&5
-$as_echo "$gl_cv_func_memmem_works_fast" >&6; }
-    case "$gl_cv_func_memmem_works_fast" in
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_linear" >&5
+$as_echo "$gl_cv_func_strstr_linear" >&6; }
+    case "$gl_cv_func_strstr_linear" in
       *yes) ;;
       *)
-        REPLACE_MEMMEM=1
+        REPLACE_STRSTR=1
         ;;
     esac
   fi
 
-  if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
+  if test $REPLACE_STRSTR = 1; then
 
 
 
@@ -12758,47 +13855,27 @@ $as_echo "$gl_cv_func_memmem_works_fast" >&6; }
 
 
 
-  gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
+  gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
 
   fi
 
 
 
-
-  for ac_func in memmem
-do :
-  ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
-if test "x$ac_cv_func_memmem" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_MEMMEM 1
-_ACEOF
-
-fi
-done
-
-  if test $ac_cv_func_memmem = yes; then
-    HAVE_MEMMEM=1
-  else
-    HAVE_MEMMEM=0
-  fi
-
-  if test $ac_cv_have_decl_memmem = no; then
-    HAVE_DECL_MEMMEM=0
+  if test "$gl_cv_func_memchr_works" != yes; then
+    REPLACE_STRSTR=1
   else
-            { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5
-$as_echo_n "checking whether memmem works... " >&6; }
-if test "${gl_cv_func_memmem_works_always+set}" = set; then :
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
+$as_echo_n "checking whether strstr works... " >&6; }
+if test "${gl_cv_func_strstr_works_always+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
   if test "$cross_compiling" = yes; then :
-                                      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+                                               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
 #ifdef __GNU_LIBRARY__
  #include <features.h>
- #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \
-                          || __GLIBC_MINOR__ > 12)) \
-      || (__GLIBC__ > 2)) \
+ #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
      || defined __UCLIBC__
   Lucky user
  #endif
@@ -12814,9 +13891,9 @@ else
 _ACEOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
   $EGREP "Lucky user" >/dev/null 2>&1; then :
-  gl_cv_func_memmem_works_always="guessing yes"
+  gl_cv_func_strstr_works_always="guessing yes"
 else
-  gl_cv_func_memmem_works_always="guessing no"
+  gl_cv_func_strstr_works_always="guessing no"
 fi
 rm -f conftest*
 
@@ -12825,7 +13902,7 @@ else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-#include <string.h> /* for memmem */
+#include <string.h> /* for strstr */
 #define P "_EF_BF_BD"
 #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
 #define NEEDLE P P P P P
@@ -12833,26 +13910,16 @@ else
 int
 main ()
 {
-
-    int result = 0;
-    if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE)))
-      result |= 1;
-    /* Check for empty needle behavior.  */
-    {
-      const char *haystack = "AAA";
-      if (memmem (haystack, 3, NULL, 0) != haystack)
-        result |= 2;
-    }
-    return result;
+return !!strstr (HAYSTACK, NEEDLE);
 
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_c_try_run "$LINENO"; then :
-  gl_cv_func_memmem_works_always=yes
+  gl_cv_func_strstr_works_always=yes
 else
-  gl_cv_func_memmem_works_always=no
+  gl_cv_func_strstr_works_always=no
 fi
 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
   conftest.$ac_objext conftest.beam conftest.$ac_ext
@@ -12860,227 +13927,40 @@ fi
 
 
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5
-$as_echo "$gl_cv_func_memmem_works_always" >&6; }
-    case "$gl_cv_func_memmem_works_always" in
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
+$as_echo "$gl_cv_func_strstr_works_always" >&6; }
+    case "$gl_cv_func_strstr_works_always" in
       *yes) ;;
       *)
-        REPLACE_MEMMEM=1
+        REPLACE_STRSTR=1
         ;;
     esac
   fi
-  :
-
-  if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
-
-
-
-
-
-
-
-
-  gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
-
-  fi
-
-
-
-
-
-          GNULIB_MEMMEM=1
-
-
-
-
-
-$as_echo "#define GNULIB_TEST_MEMMEM 1" >>confdefs.h
-
-
-
-
-
-
-
-
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
-$as_echo_n "checking for ssize_t... " >&6; }
-if test "${gt_cv_ssize_t+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/types.h>
-int
-main ()
-{
-int x = sizeof (ssize_t *) + sizeof (ssize_t);
-            return !x;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  gt_cv_ssize_t=yes
-else
-  gt_cv_ssize_t=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
-$as_echo "$gt_cv_ssize_t" >&6; }
-  if test $gt_cv_ssize_t = no; then
-
-$as_echo "#define ssize_t int" >>confdefs.h
-
-  fi
 
+  if test $REPLACE_STRSTR = 1; then
 
 
 
-  # Define two additional variables used in the Makefile substitution.
-
-  if test "$ac_cv_header_stdbool_h" = yes; then
-    STDBOOL_H=''
-  else
-    STDBOOL_H='stdbool.h'
-  fi
-
-   if test -n "$STDBOOL_H"; then
-  GL_GENERATE_STDBOOL_H_TRUE=
-  GL_GENERATE_STDBOOL_H_FALSE='#'
-else
-  GL_GENERATE_STDBOOL_H_TRUE='#'
-  GL_GENERATE_STDBOOL_H_FALSE=
-fi
-
-
-  if test "$ac_cv_type__Bool" = yes; then
-    HAVE__BOOL=1
-  else
-    HAVE__BOOL=0
-  fi
 
 
 
 
 
-  STDDEF_H=
-  if test $gt_cv_c_wchar_t = no; then
-    HAVE_WCHAR_T=0
-    STDDEF_H=stddef.h
-  fi
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
-$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
-if test "${gl_cv_decl_null_works+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stddef.h>
-      int test[2 * (sizeof NULL == sizeof (void *)) -1];
-
-int
-main ()
-{
+  gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext"
 
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  gl_cv_decl_null_works=yes
-else
-  gl_cv_decl_null_works=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
-$as_echo "$gl_cv_decl_null_works" >&6; }
-  if test $gl_cv_decl_null_works = no; then
-    REPLACE_NULL=1
-    STDDEF_H=stddef.h
   fi
 
-   if test -n "$STDDEF_H"; then
-  GL_GENERATE_STDDEF_H_TRUE=
-  GL_GENERATE_STDDEF_H_FALSE='#'
-else
-  GL_GENERATE_STDDEF_H_TRUE='#'
-  GL_GENERATE_STDDEF_H_FALSE=
-fi
-
-  if test -n "$STDDEF_H"; then
-
-
-
-
-
-
-
-
-     if test $gl_cv_have_include_next = yes; then
-       gl_cv_next_stddef_h='<'stddef.h'>'
-     else
-       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
-$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
-if test "${gl_cv_next_stddef_h+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-
-               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stddef.h>
-
-_ACEOF
-                                                                                                                        case "$host_os" in
-                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
-                 *)    gl_absname_cpp="$ac_cpp" ;;
-               esac
-
-               case "$host_os" in
-                 mingw*)
-                                                                                                                                     gl_dirsep_regex='[/\\]'
-                   ;;
-                 *)
-                   gl_dirsep_regex='\/'
-                   ;;
-               esac
-                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
-
-               gl_header_literal_regex=`echo 'stddef.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/
-                   s|^/[^/]|//&|
-                   p
-                   q
-                 }'
-                                                            gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
-                      sed -n "$gl_absolute_header_sed"`'"'
 
 
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
-$as_echo "$gl_cv_next_stddef_h" >&6; }
-     fi
-     NEXT_STDDEF_H=$gl_cv_next_stddef_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='<'stddef.h'>'
-     else
-       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
-       gl_next_as_first_directive=$gl_cv_next_stddef_h
-     fi
-     NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
 
+          GNULIB_STRSTR=1
 
 
 
-  fi
 
 
+$as_echo "#define GNULIB_TEST_STRSTR 1" >>confdefs.h
 
 
 
@@ -14786,6 +15666,10 @@ if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FAL
   as_fn_error "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
+  as_fn_error "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
   as_fn_error "conditional \"GL_GENERATE_FLOAT_H\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
diff --git a/gdb/gnulib/import/Makefile.am b/gdb/gnulib/import/Makefile.am
index 0c2f424..cfc18a3 100644
--- a/gdb/gnulib/import/Makefile.am
+++ b/gdb/gnulib/import/Makefile.am
@@ -21,7 +21,7 @@
 # the same distribution terms as the rest of that program.
 #
 # Generated by gnulib-tool.
-# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=import --m4-base=import/m4 --doc-base=doc --tests-base=tests --aux-dir=import/extra --no-conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files fnmatch-gnu frexpl inttypes memmem pathmax unistd update-copyright
+# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=import --m4-base=import/m4 --doc-base=doc --tests-base=tests --aux-dir=import/extra --no-conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files fnmatch-gnu frexpl inttypes memmem pathmax strerror strstr unistd update-copyright
 
 AUTOMAKE_OPTIONS = 1.5 gnits
 
@@ -127,6 +127,40 @@ CLEANFILES += configmake.h configmake.h-t
 
 ## end   gnulib module configmake
 
+## begin gnulib module errno
+
+BUILT_SOURCES += $(ERRNO_H)
+
+# We need the following in order to create <errno.h> when the system
+# doesn't have one that is POSIX compliant.
+if GL_GENERATE_ERRNO_H
+errno.h: errno.in.h $(top_builddir)/config.status
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+	  sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+	      -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+	      -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+	      -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+	      -e 's|@''NEXT_ERRNO_H''@|$(NEXT_ERRNO_H)|g' \
+	      -e 's|@''EMULTIHOP_HIDDEN''@|$(EMULTIHOP_HIDDEN)|g' \
+	      -e 's|@''EMULTIHOP_VALUE''@|$(EMULTIHOP_VALUE)|g' \
+	      -e 's|@''ENOLINK_HIDDEN''@|$(ENOLINK_HIDDEN)|g' \
+	      -e 's|@''ENOLINK_VALUE''@|$(ENOLINK_VALUE)|g' \
+	      -e 's|@''EOVERFLOW_HIDDEN''@|$(EOVERFLOW_HIDDEN)|g' \
+	      -e 's|@''EOVERFLOW_VALUE''@|$(EOVERFLOW_VALUE)|g' \
+	      < $(srcdir)/errno.in.h; \
+	} > $@-t && \
+	mv $@-t $@
+else
+errno.h: $(top_builddir)/config.status
+	rm -f $@
+endif
+MOSTLYCLEANFILES += errno.h errno.h-t
+
+EXTRA_DIST += errno.in.h
+
+## end   gnulib module errno
+
 ## begin gnulib module float
 
 BUILT_SOURCES += $(FLOAT_H)
@@ -209,6 +243,13 @@ EXTRA_libgnu_a_SOURCES += frexp.c frexpl.c
 
 ## end   gnulib module frexpl
 
+## begin gnulib module intprops
+
+
+EXTRA_DIST += intprops.h
+
+## end   gnulib module intprops
+
 ## begin gnulib module inttypes-incomplete
 
 BUILT_SOURCES += inttypes.h
@@ -860,6 +901,24 @@ EXTRA_DIST += streq.h
 
 ## end   gnulib module streq
 
+## begin gnulib module strerror
+
+
+EXTRA_DIST += strerror.c
+
+EXTRA_libgnu_a_SOURCES += strerror.c
+
+## end   gnulib module strerror
+
+## begin gnulib module strerror-override
+
+
+EXTRA_DIST += strerror-override.c strerror-override.h
+
+EXTRA_libgnu_a_SOURCES += strerror-override.c
+
+## end   gnulib module strerror-override
+
 ## begin gnulib module string
 
 BUILT_SOURCES += string.h
@@ -966,6 +1025,15 @@ libgnu_a_SOURCES += strnlen1.h strnlen1.c
 
 ## end   gnulib module strnlen1
 
+## begin gnulib module strstr-simple
+
+
+EXTRA_DIST += str-two-way.h strstr.c
+
+EXTRA_libgnu_a_SOURCES += strstr.c
+
+## end   gnulib module strstr-simple
+
 ## begin gnulib module sys_types
 
 BUILT_SOURCES += sys/types.h
diff --git a/gdb/gnulib/import/Makefile.in b/gdb/gnulib/import/Makefile.in
index 59c1c66..16e9b82 100644
--- a/gdb/gnulib/import/Makefile.in
+++ b/gdb/gnulib/import/Makefile.in
@@ -36,7 +36,7 @@
 # the same distribution terms as the rest of that program.
 #
 # Generated by gnulib-tool.
-# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=import --m4-base=import/m4 --doc-base=doc --tests-base=tests --aux-dir=import/extra --no-conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files fnmatch-gnu frexpl inttypes memmem pathmax unistd update-copyright
+# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=import --m4-base=import/m4 --doc-base=doc --tests-base=tests --aux-dir=import/extra --no-conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files fnmatch-gnu frexpl inttypes memmem pathmax strerror strstr unistd update-copyright
 
 
 
@@ -67,6 +67,7 @@ am__aclocal_m4_deps = $(top_srcdir)/import/m4/00gnulib.m4 \
 	$(top_srcdir)/import/m4/alloca.m4 \
 	$(top_srcdir)/import/m4/codeset.m4 \
 	$(top_srcdir)/import/m4/configmake.m4 \
+	$(top_srcdir)/import/m4/errno_h.m4 \
 	$(top_srcdir)/import/m4/exponentd.m4 \
 	$(top_srcdir)/import/m4/exponentl.m4 \
 	$(top_srcdir)/import/m4/extensions.m4 \
@@ -105,7 +106,10 @@ am__aclocal_m4_deps = $(top_srcdir)/import/m4/00gnulib.m4 \
 	$(top_srcdir)/import/m4/stdbool.m4 \
 	$(top_srcdir)/import/m4/stddef_h.m4 \
 	$(top_srcdir)/import/m4/stdint.m4 \
+	$(top_srcdir)/import/m4/strerror.m4 \
 	$(top_srcdir)/import/m4/string_h.m4 \
+	$(top_srcdir)/import/m4/strstr.m4 \
+	$(top_srcdir)/import/m4/sys_socket_h.m4 \
 	$(top_srcdir)/import/m4/sys_types_h.m4 \
 	$(top_srcdir)/import/m4/unistd_h.m4 \
 	$(top_srcdir)/import/m4/warn-on-use.m4 \
@@ -207,6 +211,13 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@
+EMULTIHOP_VALUE = @EMULTIHOP_VALUE@
+ENOLINK_HIDDEN = @ENOLINK_HIDDEN@
+ENOLINK_VALUE = @ENOLINK_VALUE@
+EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@
+EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
+ERRNO_H = @ERRNO_H@
 EXEEXT = @EXEEXT@
 FLOAT_H = @FLOAT_H@
 FNMATCH_H = @FNMATCH_H@
@@ -659,6 +670,7 @@ HAVE_WCSXFRM = @HAVE_WCSXFRM@
 HAVE_WCTRANS_T = @HAVE_WCTRANS_T@
 HAVE_WCTYPE_H = @HAVE_WCTYPE_H@
 HAVE_WCTYPE_T = @HAVE_WCTYPE_T@
+HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@
 HAVE_WINT_T = @HAVE_WINT_T@
 HAVE_WMEMCHR = @HAVE_WMEMCHR@
 HAVE_WMEMCMP = @HAVE_WMEMCMP@
@@ -690,6 +702,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
+NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@
 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@
 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@
 NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@
@@ -700,6 +713,7 @@ NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H@
 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@
 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@
 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@
+NEXT_ERRNO_H = @NEXT_ERRNO_H@
 NEXT_FLOAT_H = @NEXT_FLOAT_H@
 NEXT_INTTYPES_H = @NEXT_INTTYPES_H@
 NEXT_MATH_H = @NEXT_MATH_H@
@@ -931,20 +945,22 @@ SUBDIRS =
 noinst_HEADERS = 
 noinst_LIBRARIES = libgnu.a
 noinst_LTLIBRARIES = 
-EXTRA_DIST = m4/gnulib-cache.m4 alloca.c alloca.in.h float.c \
-	float.in.h itold.c fnmatch.c fnmatch.in.h fnmatch_loop.c \
-	fpucw.h frexp.c frexp.c frexpl.c inttypes.in.h float+.h \
-	isnan.c isnand-nolibm.h isnand.c float+.h isnan.c \
-	isnanl-nolibm.h isnanl.c config.charset ref-add.sin \
-	ref-del.sin math.in.h mbrtowc.c mbsinit.c mbsrtowcs-impl.h \
-	mbsrtowcs-state.c mbsrtowcs.c memchr.c memchr.valgrind \
-	memmem.c str-two-way.h pathmax.h \
+EXTRA_DIST = m4/gnulib-cache.m4 alloca.c alloca.in.h errno.in.h \
+	float.c float.in.h itold.c fnmatch.c fnmatch.in.h \
+	fnmatch_loop.c fpucw.h frexp.c frexp.c frexpl.c intprops.h \
+	inttypes.in.h float+.h isnan.c isnand-nolibm.h isnand.c \
+	float+.h isnan.c isnanl-nolibm.h isnanl.c config.charset \
+	ref-add.sin ref-del.sin math.in.h mbrtowc.c mbsinit.c \
+	mbsrtowcs-impl.h mbsrtowcs-state.c mbsrtowcs.c memchr.c \
+	memchr.valgrind memmem.c str-two-way.h pathmax.h \
 	$(top_srcdir)/import/extra/snippet/arg-nonnull.h \
 	$(top_srcdir)/import/extra/snippet/c++defs.h \
 	$(top_srcdir)/import/extra/snippet/warn-on-use.h stdbool.in.h \
-	stddef.in.h stdint.in.h streq.h string.in.h sys_types.in.h \
-	unistd.in.h $(top_srcdir)/import/extra/update-copyright \
-	verify.h wchar.in.h wctype.in.h
+	stddef.in.h stdint.in.h streq.h strerror.c strerror-override.c \
+	strerror-override.h string.in.h str-two-way.h strstr.c \
+	sys_types.in.h unistd.in.h \
+	$(top_srcdir)/import/extra/update-copyright verify.h \
+	wchar.in.h wctype.in.h
 
 # The BUILT_SOURCES created by this Makefile snippet are not used via #include
 # statements but through direct file reference. Therefore this snippet must be
@@ -955,18 +971,18 @@ EXTRA_DIST = m4/gnulib-cache.m4 alloca.c alloca.in.h float.c \
 # statements but through direct file reference. Therefore this snippet must be
 # present in all Makefile.am that need it. This is ensured by the applicability
 # 'all' defined above.
-BUILT_SOURCES = $(ALLOCA_H) configmake.h $(FLOAT_H) $(FNMATCH_H) \
-	inttypes.h math.h arg-nonnull.h c++defs.h warn-on-use.h \
-	$(STDBOOL_H) $(STDDEF_H) $(STDINT_H) string.h sys/types.h \
-	unistd.h wchar.h wctype.h
+BUILT_SOURCES = $(ALLOCA_H) configmake.h $(ERRNO_H) $(FLOAT_H) \
+	$(FNMATCH_H) inttypes.h math.h arg-nonnull.h c++defs.h \
+	warn-on-use.h $(STDBOOL_H) $(STDDEF_H) $(STDINT_H) string.h \
+	sys/types.h unistd.h wchar.h wctype.h
 SUFFIXES = .sed .sin
-MOSTLYCLEANFILES = core *.stackdump alloca.h alloca.h-t float.h \
-	float.h-t fnmatch.h fnmatch.h-t inttypes.h inttypes.h-t math.h \
-	math.h-t arg-nonnull.h arg-nonnull.h-t c++defs.h c++defs.h-t \
-	warn-on-use.h warn-on-use.h-t stdbool.h stdbool.h-t stddef.h \
-	stddef.h-t stdint.h stdint.h-t string.h string.h-t sys/types.h \
-	sys/types.h-t unistd.h unistd.h-t wchar.h wchar.h-t wctype.h \
-	wctype.h-t
+MOSTLYCLEANFILES = core *.stackdump alloca.h alloca.h-t errno.h \
+	errno.h-t float.h float.h-t fnmatch.h fnmatch.h-t inttypes.h \
+	inttypes.h-t math.h math.h-t arg-nonnull.h arg-nonnull.h-t \
+	c++defs.h c++defs.h-t warn-on-use.h warn-on-use.h-t stdbool.h \
+	stdbool.h-t stddef.h stddef.h-t stdint.h stdint.h-t string.h \
+	string.h-t sys/types.h sys/types.h-t unistd.h unistd.h-t \
+	wchar.h wchar.h-t wctype.h wctype.h-t
 MOSTLYCLEANDIRS = 
 CLEANFILES = configmake.h configmake.h-t charset.alias ref-add.sed \
 	ref-del.sed
@@ -981,7 +997,8 @@ libgnu_a_DEPENDENCIES = $(gl_LIBOBJS) @ALLOCA@
 EXTRA_libgnu_a_SOURCES = alloca.c float.c itold.c fnmatch.c \
 	fnmatch_loop.c frexp.c frexp.c frexpl.c isnan.c isnand.c \
 	isnan.c isnanl.c mbrtowc.c mbsinit.c mbsrtowcs-state.c \
-	mbsrtowcs.c memchr.c memmem.c
+	mbsrtowcs.c memchr.c memmem.c strerror.c strerror-override.c \
+	strstr.c
 charset_alias = $(DESTDIR)$(libdir)/charset.alias
 charset_tmp = $(DESTDIR)$(libdir)/charset.tmp
 ARG_NONNULL_H = arg-nonnull.h
@@ -1064,7 +1081,10 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbsrtowcs.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memchr.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memmem.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strerror-override.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strerror.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strnlen1.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strstr.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unistd.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wctype-h.Po@am__quote@
 
@@ -1451,6 +1471,28 @@ configmake.h: Makefile
 	} | sed '/""/d' > $@-t && \
 	mv -f $@-t $@
 
+# We need the following in order to create <errno.h> when the system
+# doesn't have one that is POSIX compliant.
+@GL_GENERATE_ERRNO_H_TRUE@errno.h: errno.in.h $(top_builddir)/config.status
+@GL_GENERATE_ERRNO_H_TRUE@	$(AM_V_GEN)rm -f $@-t $@ && \
+@GL_GENERATE_ERRNO_H_TRUE@	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+@GL_GENERATE_ERRNO_H_TRUE@	  sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+@GL_GENERATE_ERRNO_H_TRUE@	      -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+@GL_GENERATE_ERRNO_H_TRUE@	      -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+@GL_GENERATE_ERRNO_H_TRUE@	      -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+@GL_GENERATE_ERRNO_H_TRUE@	      -e 's|@''NEXT_ERRNO_H''@|$(NEXT_ERRNO_H)|g' \
+@GL_GENERATE_ERRNO_H_TRUE@	      -e 's|@''EMULTIHOP_HIDDEN''@|$(EMULTIHOP_HIDDEN)|g' \
+@GL_GENERATE_ERRNO_H_TRUE@	      -e 's|@''EMULTIHOP_VALUE''@|$(EMULTIHOP_VALUE)|g' \
+@GL_GENERATE_ERRNO_H_TRUE@	      -e 's|@''ENOLINK_HIDDEN''@|$(ENOLINK_HIDDEN)|g' \
+@GL_GENERATE_ERRNO_H_TRUE@	      -e 's|@''ENOLINK_VALUE''@|$(ENOLINK_VALUE)|g' \
+@GL_GENERATE_ERRNO_H_TRUE@	      -e 's|@''EOVERFLOW_HIDDEN''@|$(EOVERFLOW_HIDDEN)|g' \
+@GL_GENERATE_ERRNO_H_TRUE@	      -e 's|@''EOVERFLOW_VALUE''@|$(EOVERFLOW_VALUE)|g' \
+@GL_GENERATE_ERRNO_H_TRUE@	      < $(srcdir)/errno.in.h; \
+@GL_GENERATE_ERRNO_H_TRUE@	} > $@-t && \
+@GL_GENERATE_ERRNO_H_TRUE@	mv $@-t $@
+@GL_GENERATE_ERRNO_H_FALSE@errno.h: $(top_builddir)/config.status
+@GL_GENERATE_ERRNO_H_FALSE@	rm -f $@
+
 # We need the following in order to create <float.h> when the system
 # doesn't have one that works with the given compiler.
 @GL_GENERATE_FLOAT_H_TRUE@float.h: float.in.h $(top_builddir)/config.status
diff --git a/gdb/gnulib/import/errno.in.h b/gdb/gnulib/import/errno.in.h
new file mode 100644
index 0000000..f9612c3
--- /dev/null
+++ b/gdb/gnulib/import/errno.in.h
@@ -0,0 +1,279 @@
+/* A POSIX-like <errno.h>.
+
+   Copyright (C) 2008-2012 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef _@GUARD_PREFIX@_ERRNO_H
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+@PRAGMA_COLUMNS@
+
+/* The include_next requires a split double-inclusion guard.  */
+#@INCLUDE_NEXT@ @NEXT_ERRNO_H@
+
+#ifndef _@GUARD_PREFIX@_ERRNO_H
+#define _@GUARD_PREFIX@_ERRNO_H
+
+
+/* On native Windows platforms, many macros are not defined.  */
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+
+/* These are the same values as defined by MSVC 10, for interoperability.  */
+
+#  ifndef ENOMSG
+#   define ENOMSG    122
+#   define GNULIB_defined_ENOMSG 1
+#  endif
+
+#  ifndef EIDRM
+#   define EIDRM     111
+#   define GNULIB_defined_EIDRM 1
+#  endif
+
+#  ifndef ENOLINK
+#   define ENOLINK   121
+#   define GNULIB_defined_ENOLINK 1
+#  endif
+
+#  ifndef EPROTO
+#   define EPROTO    134
+#   define GNULIB_defined_EPROTO 1
+#  endif
+
+#  ifndef EBADMSG
+#   define EBADMSG   104
+#   define GNULIB_defined_EBADMSG 1
+#  endif
+
+#  ifndef EOVERFLOW
+#   define EOVERFLOW 132
+#   define GNULIB_defined_EOVERFLOW 1
+#  endif
+
+#  ifndef ENOTSUP
+#   define ENOTSUP   129
+#   define GNULIB_defined_ENOTSUP 1
+#  endif
+
+#  ifndef ENETRESET
+#   define ENETRESET 117
+#   define GNULIB_defined_ENETRESET 1
+#  endif
+
+#  ifndef ECONNABORTED
+#   define ECONNABORTED 106
+#   define GNULIB_defined_ECONNABORTED 1
+#  endif
+
+#  ifndef ECANCELED
+#   define ECANCELED 105
+#   define GNULIB_defined_ECANCELED 1
+#  endif
+
+#  ifndef EOWNERDEAD
+#   define EOWNERDEAD 133
+#   define GNULIB_defined_EOWNERDEAD 1
+#  endif
+
+#  ifndef ENOTRECOVERABLE
+#   define ENOTRECOVERABLE 127
+#   define GNULIB_defined_ENOTRECOVERABLE 1
+#  endif
+
+#  ifndef EINPROGRESS
+#   define EINPROGRESS     112
+#   define EALREADY        103
+#   define ENOTSOCK        128
+#   define EDESTADDRREQ    109
+#   define EMSGSIZE        115
+#   define EPROTOTYPE      136
+#   define ENOPROTOOPT     123
+#   define EPROTONOSUPPORT 135
+#   define EOPNOTSUPP      130
+#   define EAFNOSUPPORT    102
+#   define EADDRINUSE      100
+#   define EADDRNOTAVAIL   101
+#   define ENETDOWN        116
+#   define ENETUNREACH     118
+#   define ECONNRESET      108
+#   define ENOBUFS         119
+#   define EISCONN         113
+#   define ENOTCONN        126
+#   define ETIMEDOUT       138
+#   define ECONNREFUSED    107
+#   define ELOOP           114
+#   define EHOSTUNREACH    110
+#   define EWOULDBLOCK     140
+#   define GNULIB_defined_ESOCK 1
+#  endif
+
+#  ifndef ETXTBSY
+#   define ETXTBSY         139
+#   define ENODATA         120  /* not required by POSIX */
+#   define ENOSR           124  /* not required by POSIX */
+#   define ENOSTR          125  /* not required by POSIX */
+#   define ETIME           137  /* not required by POSIX */
+#   define EOTHER          131  /* not required by POSIX */
+#   define GNULIB_defined_ESTREAMS 1
+#  endif
+
+/* These are intentionally the same values as the WSA* error numbers, defined
+   in <winsock2.h>.  */
+#  define ESOCKTNOSUPPORT 10044  /* not required by POSIX */
+#  define EPFNOSUPPORT    10046  /* not required by POSIX */
+#  define ESHUTDOWN       10058  /* not required by POSIX */
+#  define ETOOMANYREFS    10059  /* not required by POSIX */
+#  define EHOSTDOWN       10064  /* not required by POSIX */
+#  define EPROCLIM        10067  /* not required by POSIX */
+#  define EUSERS          10068  /* not required by POSIX */
+#  define EDQUOT          10069
+#  define ESTALE          10070
+#  define EREMOTE         10071  /* not required by POSIX */
+#  define GNULIB_defined_EWINSOCK 1
+
+# endif
+
+
+/* On OSF/1 5.1, when _XOPEN_SOURCE_EXTENDED is not defined, the macros
+   EMULTIHOP, ENOLINK, EOVERFLOW are not defined.  */
+# if @EMULTIHOP_HIDDEN@
+#  define EMULTIHOP @EMULTIHOP_VALUE@
+#  define GNULIB_defined_EMULTIHOP 1
+# endif
+# if @ENOLINK_HIDDEN@
+#  define ENOLINK   @ENOLINK_VALUE@
+#  define GNULIB_defined_ENOLINK 1
+# endif
+# if @EOVERFLOW_HIDDEN@
+#  define EOVERFLOW @EOVERFLOW_VALUE@
+#  define GNULIB_defined_EOVERFLOW 1
+# endif
+
+
+/* On OpenBSD 4.0 and on native Windows, the macros ENOMSG, EIDRM, ENOLINK,
+   EPROTO, EMULTIHOP, EBADMSG, EOVERFLOW, ENOTSUP, ECANCELED are not defined.
+   Likewise, on NonStop Kernel, EDQUOT is not defined.
+   Define them here.  Values >= 2000 seem safe to use: Solaris ESTALE = 151,
+   HP-UX EWOULDBLOCK = 246, IRIX EDQUOT = 1133.
+
+   Note: When one of these systems defines some of these macros some day,
+   binaries will have to be recompiled so that they recognizes the new
+   errno values from the system.  */
+
+# ifndef ENOMSG
+#  define ENOMSG    2000
+#  define GNULIB_defined_ENOMSG 1
+# endif
+
+# ifndef EIDRM
+#  define EIDRM     2001
+#  define GNULIB_defined_EIDRM 1
+# endif
+
+# ifndef ENOLINK
+#  define ENOLINK   2002
+#  define GNULIB_defined_ENOLINK 1
+# endif
+
+# ifndef EPROTO
+#  define EPROTO    2003
+#  define GNULIB_defined_EPROTO 1
+# endif
+
+# ifndef EMULTIHOP
+#  define EMULTIHOP 2004
+#  define GNULIB_defined_EMULTIHOP 1
+# endif
+
+# ifndef EBADMSG
+#  define EBADMSG   2005
+#  define GNULIB_defined_EBADMSG 1
+# endif
+
+# ifndef EOVERFLOW
+#  define EOVERFLOW 2006
+#  define GNULIB_defined_EOVERFLOW 1
+# endif
+
+# ifndef ENOTSUP
+#  define ENOTSUP   2007
+#  define GNULIB_defined_ENOTSUP 1
+# endif
+
+# ifndef ENETRESET
+#  define ENETRESET 2011
+#  define GNULIB_defined_ENETRESET 1
+# endif
+
+# ifndef ECONNABORTED
+#  define ECONNABORTED 2012
+#  define GNULIB_defined_ECONNABORTED 1
+# endif
+
+# ifndef ESTALE
+#  define ESTALE    2009
+#  define GNULIB_defined_ESTALE 1
+# endif
+
+# ifndef EDQUOT
+#  define EDQUOT 2010
+#  define GNULIB_defined_EDQUOT 1
+# endif
+
+# ifndef ECANCELED
+#  define ECANCELED 2008
+#  define GNULIB_defined_ECANCELED 1
+# endif
+
+/* On many platforms, the macros EOWNERDEAD and ENOTRECOVERABLE are not
+   defined.  */
+
+# ifndef EOWNERDEAD
+#  if defined __sun
+    /* Use the same values as defined for Solaris >= 8, for
+       interoperability.  */
+#   define EOWNERDEAD      58
+#   define ENOTRECOVERABLE 59
+#  elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+    /* We have a conflict here: pthreads-win32 defines these values
+       differently than MSVC 10.  It's hairy to decide which one to use.  */
+#   if defined __MINGW32__ && !defined USE_WINDOWS_THREADS
+     /* Use the same values as defined by pthreads-win32, for
+        interoperability.  */
+#    define EOWNERDEAD      43
+#    define ENOTRECOVERABLE 44
+#   else
+     /* Use the same values as defined by MSVC 10, for
+        interoperability.  */
+#    define EOWNERDEAD      133
+#    define ENOTRECOVERABLE 127
+#   endif
+#  else
+#   define EOWNERDEAD      2013
+#   define ENOTRECOVERABLE 2014
+#  endif
+#  define GNULIB_defined_EOWNERDEAD 1
+#  define GNULIB_defined_ENOTRECOVERABLE 1
+# endif
+
+# ifndef EILSEQ
+#  define EILSEQ 2015
+#  define GNULIB_defined_EILSEQ 1
+# endif
+
+#endif /* _@GUARD_PREFIX@_ERRNO_H */
+#endif /* _@GUARD_PREFIX@_ERRNO_H */
diff --git a/gdb/gnulib/import/intprops.h b/gdb/gnulib/import/intprops.h
new file mode 100644
index 0000000..2485c78
--- /dev/null
+++ b/gdb/gnulib/import/intprops.h
@@ -0,0 +1,319 @@
+/* intprops.h -- properties of integer types
+
+   Copyright (C) 2001-2005, 2009-2012 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+/* Written by Paul Eggert.  */
+
+#ifndef _GL_INTPROPS_H
+#define _GL_INTPROPS_H
+
+#include <limits.h>
+
+/* Return an integer value, converted to the same type as the integer
+   expression E after integer type promotion.  V is the unconverted value.  */
+#define _GL_INT_CONVERT(e, v) (0 * (e) + (v))
+
+/* Act like _GL_INT_CONVERT (E, -V) but work around a bug in IRIX 6.5 cc; see
+   <http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00406.html>.  */
+#define _GL_INT_NEGATE_CONVERT(e, v) (0 * (e) - (v))
+
+/* The extra casts in the following macros work around compiler bugs,
+   e.g., in Cray C 5.0.3.0.  */
+
+/* True if the arithmetic type T is an integer type.  bool counts as
+   an integer.  */
+#define TYPE_IS_INTEGER(t) ((t) 1.5 == 1)
+
+/* True if negative values of the signed integer type T use two's
+   complement, ones' complement, or signed magnitude representation,
+   respectively.  Much GNU code assumes two's complement, but some
+   people like to be portable to all possible C hosts.  */
+#define TYPE_TWOS_COMPLEMENT(t) ((t) ~ (t) 0 == (t) -1)
+#define TYPE_ONES_COMPLEMENT(t) ((t) ~ (t) 0 == 0)
+#define TYPE_SIGNED_MAGNITUDE(t) ((t) ~ (t) 0 < (t) -1)
+
+/* True if the signed integer expression E uses two's complement.  */
+#define _GL_INT_TWOS_COMPLEMENT(e) (~ _GL_INT_CONVERT (e, 0) == -1)
+
+/* True if the arithmetic type T is signed.  */
+#define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
+
+/* Return 1 if the integer expression E, after integer promotion, has
+   a signed type.  */
+#define _GL_INT_SIGNED(e) (_GL_INT_NEGATE_CONVERT (e, 1) < 0)
+
+
+/* Minimum and maximum values for integer types and expressions.  These
+   macros have undefined behavior if T is signed and has padding bits.
+   If this is a problem for you, please let us know how to fix it for
+   your host.  */
+
+/* The maximum and minimum values for the integer type T.  */
+#define TYPE_MINIMUM(t)                                                 \
+  ((t) (! TYPE_SIGNED (t)                                               \
+        ? (t) 0                                                         \
+        : TYPE_SIGNED_MAGNITUDE (t)                                     \
+        ? ~ (t) 0                                                       \
+        : ~ TYPE_MAXIMUM (t)))
+#define TYPE_MAXIMUM(t)                                                 \
+  ((t) (! TYPE_SIGNED (t)                                               \
+        ? (t) -1                                                        \
+        : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
+
+/* The maximum and minimum values for the type of the expression E,
+   after integer promotion.  E should not have side effects.  */
+#define _GL_INT_MINIMUM(e)                                              \
+  (_GL_INT_SIGNED (e)                                                   \
+   ? - _GL_INT_TWOS_COMPLEMENT (e) - _GL_SIGNED_INT_MAXIMUM (e)         \
+   : _GL_INT_CONVERT (e, 0))
+#define _GL_INT_MAXIMUM(e)                                              \
+  (_GL_INT_SIGNED (e)                                                   \
+   ? _GL_SIGNED_INT_MAXIMUM (e)                                         \
+   : _GL_INT_NEGATE_CONVERT (e, 1))
+#define _GL_SIGNED_INT_MAXIMUM(e)                                       \
+  (((_GL_INT_CONVERT (e, 1) << (sizeof ((e) + 0) * CHAR_BIT - 2)) - 1) * 2 + 1)
+
+
+/* Return 1 if the __typeof__ keyword works.  This could be done by
+   'configure', but for now it's easier to do it by hand.  */
+#if 2 <= __GNUC__ || 0x5110 <= __SUNPRO_C
+# define _GL_HAVE___TYPEOF__ 1
+#else
+# define _GL_HAVE___TYPEOF__ 0
+#endif
+
+/* Return 1 if the integer type or expression T might be signed.  Return 0
+   if it is definitely unsigned.  This macro does not evaluate its argument,
+   and expands to an integer constant expression.  */
+#if _GL_HAVE___TYPEOF__
+# define _GL_SIGNED_TYPE_OR_EXPR(t) TYPE_SIGNED (__typeof__ (t))
+#else
+# define _GL_SIGNED_TYPE_OR_EXPR(t) 1
+#endif
+
+/* Bound on length of the string representing an unsigned integer
+   value representable in B bits.  log10 (2.0) < 146/485.  The
+   smallest value of B where this bound is not tight is 2621.  */
+#define INT_BITS_STRLEN_BOUND(b) (((b) * 146 + 484) / 485)
+
+/* Bound on length of the string representing an integer type or expression T.
+   Subtract 1 for the sign bit if T is signed, and then add 1 more for
+   a minus sign if needed.
+
+   Because _GL_SIGNED_TYPE_OR_EXPR sometimes returns 0 when its argument is
+   signed, this macro may overestimate the true bound by one byte when
+   applied to unsigned types of size 2, 4, 16, ... bytes.  */
+#define INT_STRLEN_BOUND(t)                                     \
+  (INT_BITS_STRLEN_BOUND (sizeof (t) * CHAR_BIT                 \
+                          - _GL_SIGNED_TYPE_OR_EXPR (t))        \
+   + _GL_SIGNED_TYPE_OR_EXPR (t))
+
+/* Bound on buffer size needed to represent an integer type or expression T,
+   including the terminating null.  */
+#define INT_BUFSIZE_BOUND(t) (INT_STRLEN_BOUND (t) + 1)
+
+
+/* Range overflow checks.
+
+   The INT_<op>_RANGE_OVERFLOW macros return 1 if the corresponding C
+   operators might not yield numerically correct answers due to
+   arithmetic overflow.  They do not rely on undefined or
+   implementation-defined behavior.  Their implementations are simple
+   and straightforward, but they are a bit harder to use than the
+   INT_<op>_OVERFLOW macros described below.
+
+   Example usage:
+
+     long int i = ...;
+     long int j = ...;
+     if (INT_MULTIPLY_RANGE_OVERFLOW (i, j, LONG_MIN, LONG_MAX))
+       printf ("multiply would overflow");
+     else
+       printf ("product is %ld", i * j);
+
+   Restrictions on *_RANGE_OVERFLOW macros:
+
+   These macros do not check for all possible numerical problems or
+   undefined or unspecified behavior: they do not check for division
+   by zero, for bad shift counts, or for shifting negative numbers.
+
+   These macros may evaluate their arguments zero or multiple times,
+   so the arguments should not have side effects.  The arithmetic
+   arguments (including the MIN and MAX arguments) must be of the same
+   integer type after the usual arithmetic conversions, and the type
+   must have minimum value MIN and maximum MAX.  Unsigned types should
+   use a zero MIN of the proper type.
+
+   These macros are tuned for constant MIN and MAX.  For commutative
+   operations such as A + B, they are also tuned for constant B.  */
+
+/* Return 1 if A + B would overflow in [MIN,MAX] arithmetic.
+   See above for restrictions.  */
+#define INT_ADD_RANGE_OVERFLOW(a, b, min, max)          \
+  ((b) < 0                                              \
+   ? (a) < (min) - (b)                                  \
+   : (max) - (b) < (a))
+
+/* Return 1 if A - B would overflow in [MIN,MAX] arithmetic.
+   See above for restrictions.  */
+#define INT_SUBTRACT_RANGE_OVERFLOW(a, b, min, max)     \
+  ((b) < 0                                              \
+   ? (max) + (b) < (a)                                  \
+   : (a) < (min) + (b))
+
+/* Return 1 if - A would overflow in [MIN,MAX] arithmetic.
+   See above for restrictions.  */
+#define INT_NEGATE_RANGE_OVERFLOW(a, min, max)          \
+  ((min) < 0                                            \
+   ? (a) < - (max)                                      \
+   : 0 < (a))
+
+/* Return 1 if A * B would overflow in [MIN,MAX] arithmetic.
+   See above for restrictions.  Avoid && and || as they tickle
+   bugs in Sun C 5.11 2010/08/13 and other compilers; see
+   <http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00401.html>.  */
+#define INT_MULTIPLY_RANGE_OVERFLOW(a, b, min, max)     \
+  ((b) < 0                                              \
+   ? ((a) < 0                                           \
+      ? (a) < (max) / (b)                               \
+      : (b) == -1                                       \
+      ? 0                                               \
+      : (min) / (b) < (a))                              \
+   : (b) == 0                                           \
+   ? 0                                                  \
+   : ((a) < 0                                           \
+      ? (a) < (min) / (b)                               \
+      : (max) / (b) < (a)))
+
+/* Return 1 if A / B would overflow in [MIN,MAX] arithmetic.
+   See above for restrictions.  Do not check for division by zero.  */
+#define INT_DIVIDE_RANGE_OVERFLOW(a, b, min, max)       \
+  ((min) < 0 && (b) == -1 && (a) < - (max))
+
+/* Return 1 if A % B would overflow in [MIN,MAX] arithmetic.
+   See above for restrictions.  Do not check for division by zero.
+   Mathematically, % should never overflow, but on x86-like hosts
+   INT_MIN % -1 traps, and the C standard permits this, so treat this
+   as an overflow too.  */
+#define INT_REMAINDER_RANGE_OVERFLOW(a, b, min, max)    \
+  INT_DIVIDE_RANGE_OVERFLOW (a, b, min, max)
+
+/* Return 1 if A << B would overflow in [MIN,MAX] arithmetic.
+   See above for restrictions.  Here, MIN and MAX are for A only, and B need
+   not be of the same type as the other arguments.  The C standard says that
+   behavior is undefined for shifts unless 0 <= B < wordwidth, and that when
+   A is negative then A << B has undefined behavior and A >> B has
+   implementation-defined behavior, but do not check these other
+   restrictions.  */
+#define INT_LEFT_SHIFT_RANGE_OVERFLOW(a, b, min, max)   \
+  ((a) < 0                                              \
+   ? (a) < (min) >> (b)                                 \
+   : (max) >> (b) < (a))
+
+
+/* The _GL*_OVERFLOW macros have the same restrictions as the
+   *_RANGE_OVERFLOW macros, except that they do not assume that operands
+   (e.g., A and B) have the same type as MIN and MAX.  Instead, they assume
+   that the result (e.g., A + B) has that type.  */
+#define _GL_ADD_OVERFLOW(a, b, min, max)                                \
+  ((min) < 0 ? INT_ADD_RANGE_OVERFLOW (a, b, min, max)                  \
+   : (a) < 0 ? (b) <= (a) + (b)                                         \
+   : (b) < 0 ? (a) <= (a) + (b)                                         \
+   : (a) + (b) < (b))
+#define _GL_SUBTRACT_OVERFLOW(a, b, min, max)                           \
+  ((min) < 0 ? INT_SUBTRACT_RANGE_OVERFLOW (a, b, min, max)             \
+   : (a) < 0 ? 1                                                        \
+   : (b) < 0 ? (a) - (b) <= (a)                                         \
+   : (a) < (b))
+#define _GL_MULTIPLY_OVERFLOW(a, b, min, max)                           \
+  (((min) == 0 && (((a) < 0 && 0 < (b)) || ((b) < 0 && 0 < (a))))       \
+   || INT_MULTIPLY_RANGE_OVERFLOW (a, b, min, max))
+#define _GL_DIVIDE_OVERFLOW(a, b, min, max)                             \
+  ((min) < 0 ? (b) == _GL_INT_NEGATE_CONVERT (min, 1) && (a) < - (max)  \
+   : (a) < 0 ? (b) <= (a) + (b) - 1                                     \
+   : (b) < 0 && (a) + (b) <= (a))
+#define _GL_REMAINDER_OVERFLOW(a, b, min, max)                          \
+  ((min) < 0 ? (b) == _GL_INT_NEGATE_CONVERT (min, 1) && (a) < - (max)  \
+   : (a) < 0 ? (a) % (b) != ((max) - (b) + 1) % (b)                     \
+   : (b) < 0 && ! _GL_UNSIGNED_NEG_MULTIPLE (a, b, max))
+
+/* Return a nonzero value if A is a mathematical multiple of B, where
+   A is unsigned, B is negative, and MAX is the maximum value of A's
+   type.  A's type must be the same as (A % B)'s type.  Normally (A %
+   -B == 0) suffices, but things get tricky if -B would overflow.  */
+#define _GL_UNSIGNED_NEG_MULTIPLE(a, b, max)                            \
+  (((b) < -_GL_SIGNED_INT_MAXIMUM (b)                                   \
+    ? (_GL_SIGNED_INT_MAXIMUM (b) == (max)                              \
+       ? (a)                                                            \
+       : (a) % (_GL_INT_CONVERT (a, _GL_SIGNED_INT_MAXIMUM (b)) + 1))   \
+    : (a) % - (b))                                                      \
+   == 0)
+
+
+/* Integer overflow checks.
+
+   The INT_<op>_OVERFLOW macros return 1 if the corresponding C operators
+   might not yield numerically correct answers due to arithmetic overflow.
+   They work correctly on all known practical hosts, and do not rely
+   on undefined behavior due to signed arithmetic overflow.
+
+   Example usage:
+
+     long int i = ...;
+     long int j = ...;
+     if (INT_MULTIPLY_OVERFLOW (i, j))
+       printf ("multiply would overflow");
+     else
+       printf ("product is %ld", i * j);
+
+   These macros do not check for all possible numerical problems or
+   undefined or unspecified behavior: they do not check for division
+   by zero, for bad shift counts, or for shifting negative numbers.
+
+   These macros may evaluate their arguments zero or multiple times, so the
+   arguments should not have side effects.
+
+   These macros are tuned for their last argument being a constant.
+
+   Return 1 if the integer expressions A * B, A - B, -A, A * B, A / B,
+   A % B, and A << B would overflow, respectively.  */
+
+#define INT_ADD_OVERFLOW(a, b) \
+  _GL_BINARY_OP_OVERFLOW (a, b, _GL_ADD_OVERFLOW)
+#define INT_SUBTRACT_OVERFLOW(a, b) \
+  _GL_BINARY_OP_OVERFLOW (a, b, _GL_SUBTRACT_OVERFLOW)
+#define INT_NEGATE_OVERFLOW(a) \
+  INT_NEGATE_RANGE_OVERFLOW (a, _GL_INT_MINIMUM (a), _GL_INT_MAXIMUM (a))
+#define INT_MULTIPLY_OVERFLOW(a, b) \
+  _GL_BINARY_OP_OVERFLOW (a, b, _GL_MULTIPLY_OVERFLOW)
+#define INT_DIVIDE_OVERFLOW(a, b) \
+  _GL_BINARY_OP_OVERFLOW (a, b, _GL_DIVIDE_OVERFLOW)
+#define INT_REMAINDER_OVERFLOW(a, b) \
+  _GL_BINARY_OP_OVERFLOW (a, b, _GL_REMAINDER_OVERFLOW)
+#define INT_LEFT_SHIFT_OVERFLOW(a, b) \
+  INT_LEFT_SHIFT_RANGE_OVERFLOW (a, b, \
+                                 _GL_INT_MINIMUM (a), _GL_INT_MAXIMUM (a))
+
+/* Return 1 if the expression A <op> B would overflow,
+   where OP_RESULT_OVERFLOW (A, B, MIN, MAX) does the actual test,
+   assuming MIN and MAX are the minimum and maximum for the result type.
+   Arguments should be free of side effects.  */
+#define _GL_BINARY_OP_OVERFLOW(a, b, op_result_overflow)        \
+  op_result_overflow (a, b,                                     \
+                      _GL_INT_MINIMUM (0 * (b) + (a)),          \
+                      _GL_INT_MAXIMUM (0 * (b) + (a)))
+
+#endif /* _GL_INTPROPS_H */
diff --git a/gdb/gnulib/import/m4/errno_h.m4 b/gdb/gnulib/import/m4/errno_h.m4
new file mode 100644
index 0000000..4e33ba8
--- /dev/null
+++ b/gdb/gnulib/import/m4/errno_h.m4
@@ -0,0 +1,137 @@
+# errno_h.m4 serial 12
+dnl Copyright (C) 2004, 2006, 2008-2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN_ONCE([gl_HEADER_ERRNO_H],
+[
+  AC_REQUIRE([AC_PROG_CC])
+  AC_CACHE_CHECK([for complete errno.h], [gl_cv_header_errno_h_complete], [
+    AC_EGREP_CPP([booboo],[
+#include <errno.h>
+#if !defined ETXTBSY
+booboo
+#endif
+#if !defined ENOMSG
+booboo
+#endif
+#if !defined EIDRM
+booboo
+#endif
+#if !defined ENOLINK
+booboo
+#endif
+#if !defined EPROTO
+booboo
+#endif
+#if !defined EMULTIHOP
+booboo
+#endif
+#if !defined EBADMSG
+booboo
+#endif
+#if !defined EOVERFLOW
+booboo
+#endif
+#if !defined ENOTSUP
+booboo
+#endif
+#if !defined ENETRESET
+booboo
+#endif
+#if !defined ECONNABORTED
+booboo
+#endif
+#if !defined ESTALE
+booboo
+#endif
+#if !defined EDQUOT
+booboo
+#endif
+#if !defined ECANCELED
+booboo
+#endif
+#if !defined EOWNERDEAD
+booboo
+#endif
+#if !defined ENOTRECOVERABLE
+booboo
+#endif
+#if !defined EILSEQ
+booboo
+#endif
+      ],
+      [gl_cv_header_errno_h_complete=no],
+      [gl_cv_header_errno_h_complete=yes])
+  ])
+  if test $gl_cv_header_errno_h_complete = yes; then
+    ERRNO_H=''
+  else
+    gl_NEXT_HEADERS([errno.h])
+    ERRNO_H='errno.h'
+  fi
+  AC_SUBST([ERRNO_H])
+  AM_CONDITIONAL([GL_GENERATE_ERRNO_H], [test -n "$ERRNO_H"])
+  gl_REPLACE_ERRNO_VALUE([EMULTIHOP])
+  gl_REPLACE_ERRNO_VALUE([ENOLINK])
+  gl_REPLACE_ERRNO_VALUE([EOVERFLOW])
+])
+
+# Assuming $1 = EOVERFLOW.
+# The EOVERFLOW errno value ought to be defined in <errno.h>, according to
+# POSIX.  But some systems (like OpenBSD 4.0 or AIX 3) don't define it, and
+# some systems (like OSF/1) define it when _XOPEN_SOURCE_EXTENDED is defined.
+# Check for the value of EOVERFLOW.
+# Set the variables EOVERFLOW_HIDDEN and EOVERFLOW_VALUE.
+AC_DEFUN([gl_REPLACE_ERRNO_VALUE],
+[
+  if test -n "$ERRNO_H"; then
+    AC_CACHE_CHECK([for ]$1[ value], [gl_cv_header_errno_h_]$1, [
+      AC_EGREP_CPP([yes],[
+#include <errno.h>
+#ifdef ]$1[
+yes
+#endif
+      ],
+      [gl_cv_header_errno_h_]$1[=yes],
+      [gl_cv_header_errno_h_]$1[=no])
+      if test $gl_cv_header_errno_h_]$1[ = no; then
+        AC_EGREP_CPP([yes],[
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+#ifdef ]$1[
+yes
+#endif
+          ], [gl_cv_header_errno_h_]$1[=hidden])
+        if test $gl_cv_header_errno_h_]$1[ = hidden; then
+          dnl The macro exists but is hidden.
+          dnl Define it to the same value.
+          AC_COMPUTE_INT([gl_cv_header_errno_h_]$1, $1, [
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+/* The following two lines are a workaround against an autoconf-2.52 bug.  */
+#include <stdio.h>
+#include <stdlib.h>
+])
+        fi
+      fi
+    ])
+    case $gl_cv_header_errno_h_]$1[ in
+      yes | no)
+        ]$1[_HIDDEN=0; ]$1[_VALUE=
+        ;;
+      *)
+        ]$1[_HIDDEN=1; ]$1[_VALUE="$gl_cv_header_errno_h_]$1["
+        ;;
+    esac
+    AC_SUBST($1[_HIDDEN])
+    AC_SUBST($1[_VALUE])
+  fi
+])
+
+dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in.
+dnl Remove this when we can assume autoconf >= 2.61.
+m4_ifdef([AC_COMPUTE_INT], [], [
+  AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])])
+])
diff --git a/gdb/gnulib/import/m4/gnulib-cache.m4 b/gdb/gnulib/import/m4/gnulib-cache.m4
index 511df9c..d1be377 100644
--- a/gdb/gnulib/import/m4/gnulib-cache.m4
+++ b/gdb/gnulib/import/m4/gnulib-cache.m4
@@ -27,7 +27,7 @@
 
 
 # Specification in the form of a command-line invocation:
-#   gnulib-tool --import --dir=. --lib=libgnu --source-base=import --m4-base=import/m4 --doc-base=doc --tests-base=tests --aux-dir=import/extra --no-conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files fnmatch-gnu frexpl inttypes memmem pathmax unistd update-copyright
+#   gnulib-tool --import --dir=. --lib=libgnu --source-base=import --m4-base=import/m4 --doc-base=doc --tests-base=tests --aux-dir=import/extra --no-conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files fnmatch-gnu frexpl inttypes memmem pathmax strerror strstr unistd update-copyright
 
 # Specification in the form of a few gnulib-tool.m4 macro invocations:
 gl_LOCAL_DIR([])
@@ -37,6 +37,8 @@ gl_MODULES([
   inttypes
   memmem
   pathmax
+  strerror
+  strstr
   unistd
   update-copyright
 ])
diff --git a/gdb/gnulib/import/m4/gnulib-comp.m4 b/gdb/gnulib/import/m4/gnulib-comp.m4
index 77c1b24..40ea88f 100644
--- a/gdb/gnulib/import/m4/gnulib-comp.m4
+++ b/gdb/gnulib/import/m4/gnulib-comp.m4
@@ -41,6 +41,7 @@ AC_DEFUN([gl_EARLY],
   # Code from module alloca:
   # Code from module alloca-opt:
   # Code from module configmake:
+  # Code from module errno:
   # Code from module extensions:
   AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
   # Code from module extern-inline:
@@ -53,6 +54,7 @@ AC_DEFUN([gl_EARLY],
   # Code from module frexp:
   # Code from module frexpl:
   # Code from module include_next:
+  # Code from module intprops:
   # Code from module inttypes:
   # Code from module inttypes-incomplete:
   # Code from module isnand-nolibm:
@@ -75,8 +77,12 @@ AC_DEFUN([gl_EARLY],
   # Code from module stddef:
   # Code from module stdint:
   # 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:
+  # Code from module strstr-simple:
   # Code from module sys_types:
   # Code from module unistd:
   # Code from module update-copyright:
@@ -103,6 +109,7 @@ AC_DEFUN([gl_INIT],
   gl_source_base='import'
   gl_FUNC_ALLOCA
   gl_CONFIGMAKE_PREP
+  gl_HEADER_ERRNO_H
   AC_REQUIRE([gl_EXTERN_INLINE])
   gl_FLOAT_H
   if test $REPLACE_FLOAT_LDBL = 1; then
@@ -187,7 +194,28 @@ AC_DEFUN([gl_INIT],
   AM_STDBOOL_H
   gl_STDDEF_H
   gl_STDINT_H
+  gl_FUNC_STRERROR
+  if test $REPLACE_STRERROR = 1; then
+    AC_LIBOBJ([strerror])
+  fi
+  gl_MODULE_INDICATOR([strerror])
+  gl_STRING_MODULE_INDICATOR([strerror])
+  AC_REQUIRE([gl_HEADER_ERRNO_H])
+  AC_REQUIRE([gl_FUNC_STRERROR_0])
+  if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
+    AC_LIBOBJ([strerror-override])
+    gl_PREREQ_SYS_H_WINSOCK2
+  fi
   gl_HEADER_STRING_H
+  gl_FUNC_STRSTR
+  if test $REPLACE_STRSTR = 1; then
+    AC_LIBOBJ([strstr])
+  fi
+  gl_FUNC_STRSTR_SIMPLE
+  if test $REPLACE_STRSTR = 1; then
+    AC_LIBOBJ([strstr])
+  fi
+  gl_STRING_MODULE_INDICATOR([strstr])
   gl_SYS_TYPES_H
   AC_PROG_MKDIR_P
   gl_UNISTD_H
@@ -340,6 +368,7 @@ AC_DEFUN([gl_FILE_LIST], [
   lib/alloca.c
   lib/alloca.in.h
   lib/config.charset
+  lib/errno.in.h
   lib/float+.h
   lib/float.c
   lib/float.in.h
@@ -349,6 +378,7 @@ AC_DEFUN([gl_FILE_LIST], [
   lib/fpucw.h
   lib/frexp.c
   lib/frexpl.c
+  lib/intprops.h
   lib/inttypes.in.h
   lib/isnan.c
   lib/isnand-nolibm.h
@@ -376,9 +406,13 @@ AC_DEFUN([gl_FILE_LIST], [
   lib/stdint.in.h
   lib/str-two-way.h
   lib/streq.h
+  lib/strerror-override.c
+  lib/strerror-override.h
+  lib/strerror.c
   lib/string.in.h
   lib/strnlen1.c
   lib/strnlen1.h
+  lib/strstr.c
   lib/sys_types.in.h
   lib/unistd.c
   lib/unistd.in.h
@@ -390,6 +424,7 @@ AC_DEFUN([gl_FILE_LIST], [
   m4/alloca.m4
   m4/codeset.m4
   m4/configmake.m4
+  m4/errno_h.m4
   m4/exponentd.m4
   m4/exponentl.m4
   m4/extensions.m4
@@ -427,7 +462,10 @@ AC_DEFUN([gl_FILE_LIST], [
   m4/stdbool.m4
   m4/stddef_h.m4
   m4/stdint.m4
+  m4/strerror.m4
   m4/string_h.m4
+  m4/strstr.m4
+  m4/sys_socket_h.m4
   m4/sys_types_h.m4
   m4/unistd_h.m4
   m4/warn-on-use.m4
diff --git a/gdb/gnulib/import/m4/strerror.m4 b/gdb/gnulib/import/m4/strerror.m4
new file mode 100644
index 0000000..1c96e52
--- /dev/null
+++ b/gdb/gnulib/import/m4/strerror.m4
@@ -0,0 +1,96 @@
+# strerror.m4 serial 17
+dnl Copyright (C) 2002, 2007-2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_STRERROR],
+[
+  AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+  AC_REQUIRE([gl_HEADER_ERRNO_H])
+  AC_REQUIRE([gl_FUNC_STRERROR_0])
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  m4_ifdef([gl_FUNC_STRERROR_R_WORKS], [
+    AC_REQUIRE([gl_FUNC_STRERROR_R_WORKS])
+  ])
+  if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
+    AC_CACHE_CHECK([for working strerror function],
+     [gl_cv_func_working_strerror],
+     [AC_RUN_IFELSE(
+        [AC_LANG_PROGRAM(
+           [[#include <string.h>
+           ]],
+           [[if (!*strerror (-2)) return 1;]])],
+        [gl_cv_func_working_strerror=yes],
+        [gl_cv_func_working_strerror=no],
+        [case "$host_os" in
+                   # Guess yes on glibc systems.
+           *-gnu*) gl_cv_func_working_strerror="guessing yes" ;;
+                   # If we don't know, assume the worst.
+           *)      gl_cv_func_working_strerror="guessing no" ;;
+         esac
+        ])
+    ])
+    case "$gl_cv_func_working_strerror" in
+      *yes) ;;
+      *)
+        dnl The system's strerror() fails to return a string for out-of-range
+        dnl integers. Replace it.
+        REPLACE_STRERROR=1
+        ;;
+    esac
+    m4_ifdef([gl_FUNC_STRERROR_R_WORKS], [
+      dnl If the system's strerror_r or __xpg_strerror_r clobbers strerror's
+      dnl buffer, we must replace strerror.
+      case "$gl_cv_func_strerror_r_works" in
+        *no) REPLACE_STRERROR=1 ;;
+      esac
+    ])
+  else
+    dnl The system's strerror() cannot know about the new errno values we add
+    dnl to <errno.h>, or any fix for strerror(0). Replace it.
+    REPLACE_STRERROR=1
+  fi
+])
+
+dnl Detect if strerror(0) passes (that is, does not set errno, and does not
+dnl return a string that matches strerror(-1)).
+AC_DEFUN([gl_FUNC_STRERROR_0],
+[
+  AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+  REPLACE_STRERROR_0=0
+  AC_CACHE_CHECK([whether strerror(0) succeeds],
+   [gl_cv_func_strerror_0_works],
+   [AC_RUN_IFELSE(
+      [AC_LANG_PROGRAM(
+         [[#include <string.h>
+           #include <errno.h>
+         ]],
+         [[int result = 0;
+           char *str;
+           errno = 0;
+           str = strerror (0);
+           if (!*str) result |= 1;
+           if (errno) result |= 2;
+           if (strstr (str, "nknown") || strstr (str, "ndefined"))
+             result |= 4;
+           return result;]])],
+      [gl_cv_func_strerror_0_works=yes],
+      [gl_cv_func_strerror_0_works=no],
+      [case "$host_os" in
+                 # Guess yes on glibc systems.
+         *-gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
+                 # If we don't know, assume the worst.
+         *)      gl_cv_func_strerror_0_works="guessing no" ;;
+       esac
+      ])
+  ])
+  case "$gl_cv_func_strerror_0_works" in
+    *yes) ;;
+    *)
+      REPLACE_STRERROR_0=1
+      AC_DEFINE([REPLACE_STRERROR_0], [1], [Define to 1 if strerror(0)
+        does not return a message implying success.])
+      ;;
+  esac
+])
diff --git a/gdb/gnulib/import/m4/strstr.m4 b/gdb/gnulib/import/m4/strstr.m4
new file mode 100644
index 0000000..b8f94bf
--- /dev/null
+++ b/gdb/gnulib/import/m4/strstr.m4
@@ -0,0 +1,130 @@
+# strstr.m4 serial 16
+dnl Copyright (C) 2008-2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Check that strstr works.
+AC_DEFUN([gl_FUNC_STRSTR_SIMPLE],
+[
+  AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+  AC_REQUIRE([gl_FUNC_MEMCHR])
+  if test "$gl_cv_func_memchr_works" != yes; then
+    REPLACE_STRSTR=1
+  else
+    dnl Detect http://sourceware.org/bugzilla/show_bug.cgi?id=12092.
+    AC_CACHE_CHECK([whether strstr works],
+      [gl_cv_func_strstr_works_always],
+      [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+#include <string.h> /* for strstr */
+#define P "_EF_BF_BD"
+#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
+#define NEEDLE P P P P P
+]], [[return !!strstr (HAYSTACK, NEEDLE);
+    ]])],
+        [gl_cv_func_strstr_works_always=yes],
+        [gl_cv_func_strstr_works_always=no],
+        [dnl glibc 2.12 and cygwin 1.7.7 have a known bug.  uClibc is not
+         dnl affected, since it uses different source code for strstr than
+         dnl glibc.
+         dnl Assume that it works on all other platforms, even if it is not
+         dnl linear.
+         AC_EGREP_CPP([Lucky user],
+           [
+#ifdef __GNU_LIBRARY__
+ #include <features.h>
+ #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
+     || defined __UCLIBC__
+  Lucky user
+ #endif
+#elif defined __CYGWIN__
+ #include <cygwin/version.h>
+ #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
+  Lucky user
+ #endif
+#else
+  Lucky user
+#endif
+           ],
+           [gl_cv_func_strstr_works_always="guessing yes"],
+           [gl_cv_func_strstr_works_always="guessing no"])
+        ])
+      ])
+    case "$gl_cv_func_strstr_works_always" in
+      *yes) ;;
+      *)
+        REPLACE_STRSTR=1
+        ;;
+    esac
+  fi
+]) # gl_FUNC_STRSTR_SIMPLE
+
+dnl Additionally, check that strstr is efficient.
+AC_DEFUN([gl_FUNC_STRSTR],
+[
+  AC_REQUIRE([gl_FUNC_STRSTR_SIMPLE])
+  if test $REPLACE_STRSTR = 0; then
+    AC_CACHE_CHECK([whether strstr works in linear time],
+      [gl_cv_func_strstr_linear],
+      [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+#include <signal.h> /* for signal */
+#include <string.h> /* for strstr */
+#include <stdlib.h> /* for malloc */
+#include <unistd.h> /* for alarm */
+static void quit (int sig) { exit (sig + 128); }
+]], [[
+    int result = 0;
+    size_t m = 1000000;
+    char *haystack = (char *) malloc (2 * m + 2);
+    char *needle = (char *) malloc (m + 2);
+    /* Failure to compile this test due to missing alarm is okay,
+       since all such platforms (mingw) also have quadratic strstr.  */
+    signal (SIGALRM, quit);
+    alarm (5);
+    /* Check for quadratic performance.  */
+    if (haystack && needle)
+      {
+        memset (haystack, 'A', 2 * m);
+        haystack[2 * m] = 'B';
+        haystack[2 * m + 1] = 0;
+        memset (needle, 'A', m);
+        needle[m] = 'B';
+        needle[m + 1] = 0;
+        if (!strstr (haystack, needle))
+          result |= 1;
+      }
+    return result;
+    ]])],
+        [gl_cv_func_strstr_linear=yes], [gl_cv_func_strstr_linear=no],
+        [dnl Only glibc > 2.12 on processors without SSE 4.2 instructions and
+         dnl cygwin > 1.7.7 are known to have a bug-free strstr that works in
+         dnl linear time.
+         AC_EGREP_CPP([Lucky user],
+           [
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
+     && !(defined __i386__ || defined __x86_64__) \
+     && !defined __UCLIBC__
+  Lucky user
+ #endif
+#endif
+#ifdef __CYGWIN__
+ #include <cygwin/version.h>
+ #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
+  Lucky user
+ #endif
+#endif
+           ],
+           [gl_cv_func_strstr_linear="guessing yes"],
+           [gl_cv_func_strstr_linear="guessing no"])
+        ])
+      ])
+    case "$gl_cv_func_strstr_linear" in
+      *yes) ;;
+      *)
+        REPLACE_STRSTR=1
+        ;;
+    esac
+  fi
+]) # gl_FUNC_STRSTR
diff --git a/gdb/gnulib/import/m4/sys_socket_h.m4 b/gdb/gnulib/import/m4/sys_socket_h.m4
new file mode 100644
index 0000000..acfae41
--- /dev/null
+++ b/gdb/gnulib/import/m4/sys_socket_h.m4
@@ -0,0 +1,176 @@
+# sys_socket_h.m4 serial 23
+dnl Copyright (C) 2005-2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Simon Josefsson.
+
+AC_DEFUN([gl_HEADER_SYS_SOCKET],
+[
+  AC_REQUIRE([gl_SYS_SOCKET_H_DEFAULTS])
+  AC_REQUIRE([AC_CANONICAL_HOST])
+
+  dnl On OSF/1, the functions recv(), send(), recvfrom(), sendto() have
+  dnl old-style declarations (with return type 'int' instead of 'ssize_t')
+  dnl unless _POSIX_PII_SOCKET is defined.
+  case "$host_os" in
+    osf*)
+      AC_DEFINE([_POSIX_PII_SOCKET], [1],
+        [Define to 1 in order to get the POSIX compatible declarations
+         of socket functions.])
+      ;;
+  esac
+
+  AC_CACHE_CHECK([whether <sys/socket.h> is self-contained],
+    [gl_cv_header_sys_socket_h_selfcontained],
+    [
+      AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/socket.h>]], [[]])],
+        [gl_cv_header_sys_socket_h_selfcontained=yes],
+        [gl_cv_header_sys_socket_h_selfcontained=no])
+    ])
+  if test $gl_cv_header_sys_socket_h_selfcontained = yes; then
+    dnl If the shutdown function exists, <sys/socket.h> should define
+    dnl SHUT_RD, SHUT_WR, SHUT_RDWR.
+    AC_CHECK_FUNCS([shutdown])
+    if test $ac_cv_func_shutdown = yes; then
+      AC_CACHE_CHECK([whether <sys/socket.h> defines the SHUT_* macros],
+        [gl_cv_header_sys_socket_h_shut],
+        [
+          AC_COMPILE_IFELSE(
+            [AC_LANG_PROGRAM([[#include <sys/socket.h>]],
+               [[int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR };]])],
+            [gl_cv_header_sys_socket_h_shut=yes],
+            [gl_cv_header_sys_socket_h_shut=no])
+        ])
+      if test $gl_cv_header_sys_socket_h_shut = no; then
+        SYS_SOCKET_H='sys/socket.h'
+      fi
+    fi
+  fi
+  # We need to check for ws2tcpip.h now.
+  gl_PREREQ_SYS_H_SOCKET
+  AC_CHECK_TYPES([struct sockaddr_storage, sa_family_t],,,[
+  /* sys/types.h is not needed according to POSIX, but the
+     sys/socket.h in i386-unknown-freebsd4.10 and
+     powerpc-apple-darwin5.5 required it. */
+#include <sys/types.h>
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_WS2TCPIP_H
+#include <ws2tcpip.h>
+#endif
+])
+  if test $ac_cv_type_struct_sockaddr_storage = no; then
+    HAVE_STRUCT_SOCKADDR_STORAGE=0
+  fi
+  if test $ac_cv_type_sa_family_t = no; then
+    HAVE_SA_FAMILY_T=0
+  fi
+  if test $ac_cv_type_struct_sockaddr_storage != no; then
+    AC_CHECK_MEMBERS([struct sockaddr_storage.ss_family],
+      [],
+      [HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=0],
+      [#include <sys/types.h>
+       #ifdef HAVE_SYS_SOCKET_H
+       #include <sys/socket.h>
+       #endif
+       #ifdef HAVE_WS2TCPIP_H
+       #include <ws2tcpip.h>
+       #endif
+      ])
+  fi
+  if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \
+     || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then
+    SYS_SOCKET_H='sys/socket.h'
+  fi
+  gl_PREREQ_SYS_H_WINSOCK2
+
+  dnl Check for declarations of anything we want to poison if the
+  dnl corresponding gnulib module is not in use.
+  gl_WARN_ON_USE_PREPARE([[
+/* Some systems require prerequisite headers.  */
+#include <sys/types.h>
+#include <sys/socket.h>
+    ]], [socket connect accept bind getpeername getsockname getsockopt
+    listen recv send recvfrom sendto setsockopt shutdown accept4])
+])
+
+AC_DEFUN([gl_PREREQ_SYS_H_SOCKET],
+[
+  dnl Check prerequisites of the <sys/socket.h> replacement.
+  AC_REQUIRE([gl_CHECK_SOCKET_HEADERS])
+  gl_CHECK_NEXT_HEADERS([sys/socket.h])
+  if test $ac_cv_header_sys_socket_h = yes; then
+    HAVE_SYS_SOCKET_H=1
+    HAVE_WS2TCPIP_H=0
+  else
+    HAVE_SYS_SOCKET_H=0
+    if test $ac_cv_header_ws2tcpip_h = yes; then
+      HAVE_WS2TCPIP_H=1
+    else
+      HAVE_WS2TCPIP_H=0
+    fi
+  fi
+  AC_SUBST([HAVE_SYS_SOCKET_H])
+  AC_SUBST([HAVE_WS2TCPIP_H])
+])
+
+# Common prerequisites of the <sys/socket.h> replacement and of the
+# <sys/select.h> replacement.
+# Sets and substitutes HAVE_WINSOCK2_H.
+AC_DEFUN([gl_PREREQ_SYS_H_WINSOCK2],
+[
+  m4_ifdef([gl_UNISTD_H_DEFAULTS], [AC_REQUIRE([gl_UNISTD_H_DEFAULTS])])
+  m4_ifdef([gl_SYS_IOCTL_H_DEFAULTS], [AC_REQUIRE([gl_SYS_IOCTL_H_DEFAULTS])])
+  AC_CHECK_HEADERS_ONCE([sys/socket.h])
+  if test $ac_cv_header_sys_socket_h != yes; then
+    dnl We cannot use AC_CHECK_HEADERS_ONCE here, because that would make
+    dnl the check for those headers unconditional; yet cygwin reports
+    dnl that the headers are present but cannot be compiled (since on
+    dnl cygwin, all socket information should come from sys/socket.h).
+    AC_CHECK_HEADERS([winsock2.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_SUBST([HAVE_WINSOCK2_H])
+])
+
+AC_DEFUN([gl_SYS_SOCKET_MODULE_INDICATOR],
+[
+  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+  AC_REQUIRE([gl_SYS_SOCKET_H_DEFAULTS])
+  gl_MODULE_INDICATOR_SET_VARIABLE([$1])
+  dnl Define it also as a C macro, for the benefit of the unit tests.
+  gl_MODULE_INDICATOR_FOR_TESTS([$1])
+])
+
+AC_DEFUN([gl_SYS_SOCKET_H_DEFAULTS],
+[
+  GNULIB_SOCKET=0;      AC_SUBST([GNULIB_SOCKET])
+  GNULIB_CONNECT=0;     AC_SUBST([GNULIB_CONNECT])
+  GNULIB_ACCEPT=0;      AC_SUBST([GNULIB_ACCEPT])
+  GNULIB_BIND=0;        AC_SUBST([GNULIB_BIND])
+  GNULIB_GETPEERNAME=0; AC_SUBST([GNULIB_GETPEERNAME])
+  GNULIB_GETSOCKNAME=0; AC_SUBST([GNULIB_GETSOCKNAME])
+  GNULIB_GETSOCKOPT=0;  AC_SUBST([GNULIB_GETSOCKOPT])
+  GNULIB_LISTEN=0;      AC_SUBST([GNULIB_LISTEN])
+  GNULIB_RECV=0;        AC_SUBST([GNULIB_RECV])
+  GNULIB_SEND=0;        AC_SUBST([GNULIB_SEND])
+  GNULIB_RECVFROM=0;    AC_SUBST([GNULIB_RECVFROM])
+  GNULIB_SENDTO=0;      AC_SUBST([GNULIB_SENDTO])
+  GNULIB_SETSOCKOPT=0;  AC_SUBST([GNULIB_SETSOCKOPT])
+  GNULIB_SHUTDOWN=0;    AC_SUBST([GNULIB_SHUTDOWN])
+  GNULIB_ACCEPT4=0;     AC_SUBST([GNULIB_ACCEPT4])
+  HAVE_STRUCT_SOCKADDR_STORAGE=1; AC_SUBST([HAVE_STRUCT_SOCKADDR_STORAGE])
+  HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=1;
+                        AC_SUBST([HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY])
+  HAVE_SA_FAMILY_T=1;   AC_SUBST([HAVE_SA_FAMILY_T])
+  HAVE_ACCEPT4=1;       AC_SUBST([HAVE_ACCEPT4])
+])
diff --git a/gdb/gnulib/import/strerror-override.c b/gdb/gnulib/import/strerror-override.c
new file mode 100644
index 0000000..f7cac65
--- /dev/null
+++ b/gdb/gnulib/import/strerror-override.c
@@ -0,0 +1,302 @@
+/* strerror-override.c --- POSIX compatible system error routine
+
+   Copyright (C) 2010-2012 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2010.  */
+
+#include <config.h>
+
+#include "strerror-override.h"
+
+#include <errno.h>
+
+#if GNULIB_defined_EWINSOCK /* native Windows platforms */
+# if HAVE_WINSOCK2_H
+#  include <winsock2.h>
+# endif
+#endif
+
+/* If ERRNUM maps to an errno value defined by gnulib, return a string
+   describing the error.  Otherwise return NULL.  */
+const char *
+strerror_override (int errnum)
+{
+  /* These error messages are taken from glibc/sysdeps/gnu/errlist.c.  */
+  switch (errnum)
+    {
+#if REPLACE_STRERROR_0
+    case 0:
+      return "Success";
+#endif
+
+#if GNULIB_defined_ESOCK /* native Windows platforms with older <errno.h> */
+    case EINPROGRESS:
+      return "Operation now in progress";
+    case EALREADY:
+      return "Operation already in progress";
+    case ENOTSOCK:
+      return "Socket operation on non-socket";
+    case EDESTADDRREQ:
+      return "Destination address required";
+    case EMSGSIZE:
+      return "Message too long";
+    case EPROTOTYPE:
+      return "Protocol wrong type for socket";
+    case ENOPROTOOPT:
+      return "Protocol not available";
+    case EPROTONOSUPPORT:
+      return "Protocol not supported";
+    case EOPNOTSUPP:
+      return "Operation not supported";
+    case EAFNOSUPPORT:
+      return "Address family not supported by protocol";
+    case EADDRINUSE:
+      return "Address already in use";
+    case EADDRNOTAVAIL:
+      return "Cannot assign requested address";
+    case ENETDOWN:
+      return "Network is down";
+    case ENETUNREACH:
+      return "Network is unreachable";
+    case ECONNRESET:
+      return "Connection reset by peer";
+    case ENOBUFS:
+      return "No buffer space available";
+    case EISCONN:
+      return "Transport endpoint is already connected";
+    case ENOTCONN:
+      return "Transport endpoint is not connected";
+    case ETIMEDOUT:
+      return "Connection timed out";
+    case ECONNREFUSED:
+      return "Connection refused";
+    case ELOOP:
+      return "Too many levels of symbolic links";
+    case EHOSTUNREACH:
+      return "No route to host";
+    case EWOULDBLOCK:
+      return "Operation would block";
+#endif
+#if GNULIB_defined_ESTREAMS /* native Windows platforms with older <errno.h> */
+    case ETXTBSY:
+      return "Text file busy";
+    case ENODATA:
+      return "No data available";
+    case ENOSR:
+      return "Out of streams resources";
+    case ENOSTR:
+      return "Device not a stream";
+    case ETIME:
+      return "Timer expired";
+    case EOTHER:
+      return "Other error";
+#endif
+#if GNULIB_defined_EWINSOCK /* native Windows platforms */
+    case ESOCKTNOSUPPORT:
+      return "Socket type not supported";
+    case EPFNOSUPPORT:
+      return "Protocol family not supported";
+    case ESHUTDOWN:
+      return "Cannot send after transport endpoint shutdown";
+    case ETOOMANYREFS:
+      return "Too many references: cannot splice";
+    case EHOSTDOWN:
+      return "Host is down";
+    case EPROCLIM:
+      return "Too many processes";
+    case EUSERS:
+      return "Too many users";
+    case EDQUOT:
+      return "Disk quota exceeded";
+    case ESTALE:
+      return "Stale NFS file handle";
+    case EREMOTE:
+      return "Object is remote";
+# if HAVE_WINSOCK2_H
+      /* WSA_INVALID_HANDLE maps to EBADF */
+      /* WSA_NOT_ENOUGH_MEMORY maps to ENOMEM */
+      /* WSA_INVALID_PARAMETER maps to EINVAL */
+    case WSA_OPERATION_ABORTED:
+      return "Overlapped operation aborted";
+    case WSA_IO_INCOMPLETE:
+      return "Overlapped I/O event object not in signaled state";
+    case WSA_IO_PENDING:
+      return "Overlapped operations will complete later";
+      /* WSAEINTR maps to EINTR */
+      /* WSAEBADF maps to EBADF */
+      /* WSAEACCES maps to EACCES */
+      /* WSAEFAULT maps to EFAULT */
+      /* WSAEINVAL maps to EINVAL */
+      /* WSAEMFILE maps to EMFILE */
+      /* WSAEWOULDBLOCK maps to EWOULDBLOCK */
+      /* WSAEINPROGRESS maps to EINPROGRESS */
+      /* WSAEALREADY maps to EALREADY */
+      /* WSAENOTSOCK maps to ENOTSOCK */
+      /* WSAEDESTADDRREQ maps to EDESTADDRREQ */
+      /* WSAEMSGSIZE maps to EMSGSIZE */
+      /* WSAEPROTOTYPE maps to EPROTOTYPE */
+      /* WSAENOPROTOOPT maps to ENOPROTOOPT */
+      /* WSAEPROTONOSUPPORT maps to EPROTONOSUPPORT */
+      /* WSAESOCKTNOSUPPORT is ESOCKTNOSUPPORT */
+      /* WSAEOPNOTSUPP maps to EOPNOTSUPP */
+      /* WSAEPFNOSUPPORT is EPFNOSUPPORT */
+      /* WSAEAFNOSUPPORT maps to EAFNOSUPPORT */
+      /* WSAEADDRINUSE maps to EADDRINUSE */
+      /* WSAEADDRNOTAVAIL maps to EADDRNOTAVAIL */
+      /* WSAENETDOWN maps to ENETDOWN */
+      /* WSAENETUNREACH maps to ENETUNREACH */
+      /* WSAENETRESET maps to ENETRESET */
+      /* WSAECONNABORTED maps to ECONNABORTED */
+      /* WSAECONNRESET maps to ECONNRESET */
+      /* WSAENOBUFS maps to ENOBUFS */
+      /* WSAEISCONN maps to EISCONN */
+      /* WSAENOTCONN maps to ENOTCONN */
+      /* WSAESHUTDOWN is ESHUTDOWN */
+      /* WSAETOOMANYREFS is ETOOMANYREFS */
+      /* WSAETIMEDOUT maps to ETIMEDOUT */
+      /* WSAECONNREFUSED maps to ECONNREFUSED */
+      /* WSAELOOP maps to ELOOP */
+      /* WSAENAMETOOLONG maps to ENAMETOOLONG */
+      /* WSAEHOSTDOWN is EHOSTDOWN */
+      /* WSAEHOSTUNREACH maps to EHOSTUNREACH */
+      /* WSAENOTEMPTY maps to ENOTEMPTY */
+      /* WSAEPROCLIM is EPROCLIM */
+      /* WSAEUSERS is EUSERS */
+      /* WSAEDQUOT is EDQUOT */
+      /* WSAESTALE is ESTALE */
+      /* WSAEREMOTE is EREMOTE */
+    case WSASYSNOTREADY:
+      return "Network subsystem is unavailable";
+    case WSAVERNOTSUPPORTED:
+      return "Winsock.dll version out of range";
+    case WSANOTINITIALISED:
+      return "Successful WSAStartup not yet performed";
+    case WSAEDISCON:
+      return "Graceful shutdown in progress";
+    case WSAENOMORE: case WSA_E_NO_MORE:
+      return "No more results";
+    case WSAECANCELLED: case WSA_E_CANCELLED:
+      return "Call was canceled";
+    case WSAEINVALIDPROCTABLE:
+      return "Procedure call table is invalid";
+    case WSAEINVALIDPROVIDER:
+      return "Service provider is invalid";
+    case WSAEPROVIDERFAILEDINIT:
+      return "Service provider failed to initialize";
+    case WSASYSCALLFAILURE:
+      return "System call failure";
+    case WSASERVICE_NOT_FOUND:
+      return "Service not found";
+    case WSATYPE_NOT_FOUND:
+      return "Class type not found";
+    case WSAEREFUSED:
+      return "Database query was refused";
+    case WSAHOST_NOT_FOUND:
+      return "Host not found";
+    case WSATRY_AGAIN:
+      return "Nonauthoritative host not found";
+    case WSANO_RECOVERY:
+      return "Nonrecoverable error";
+    case WSANO_DATA:
+      return "Valid name, no data record of requested type";
+      /* WSA_QOS_* omitted */
+# endif
+#endif
+
+#if GNULIB_defined_ENOMSG
+    case ENOMSG:
+      return "No message of desired type";
+#endif
+
+#if GNULIB_defined_EIDRM
+    case EIDRM:
+      return "Identifier removed";
+#endif
+
+#if GNULIB_defined_ENOLINK
+    case ENOLINK:
+      return "Link has been severed";
+#endif
+
+#if GNULIB_defined_EPROTO
+    case EPROTO:
+      return "Protocol error";
+#endif
+
+#if GNULIB_defined_EMULTIHOP
+    case EMULTIHOP:
+      return "Multihop attempted";
+#endif
+
+#if GNULIB_defined_EBADMSG
+    case EBADMSG:
+      return "Bad message";
+#endif
+
+#if GNULIB_defined_EOVERFLOW
+    case EOVERFLOW:
+      return "Value too large for defined data type";
+#endif
+
+#if GNULIB_defined_ENOTSUP
+    case ENOTSUP:
+      return "Not supported";
+#endif
+
+#if GNULIB_defined_ENETRESET
+    case ENETRESET:
+      return "Network dropped connection on reset";
+#endif
+
+#if GNULIB_defined_ECONNABORTED
+    case ECONNABORTED:
+      return "Software caused connection abort";
+#endif
+
+#if GNULIB_defined_ESTALE
+    case ESTALE:
+      return "Stale NFS file handle";
+#endif
+
+#if GNULIB_defined_EDQUOT
+    case EDQUOT:
+      return "Disk quota exceeded";
+#endif
+
+#if GNULIB_defined_ECANCELED
+    case ECANCELED:
+      return "Operation canceled";
+#endif
+
+#if GNULIB_defined_EOWNERDEAD
+    case EOWNERDEAD:
+      return "Owner died";
+#endif
+
+#if GNULIB_defined_ENOTRECOVERABLE
+    case ENOTRECOVERABLE:
+      return "State not recoverable";
+#endif
+
+#if GNULIB_defined_EILSEQ
+    case EILSEQ:
+      return "Invalid or incomplete multibyte or wide character";
+#endif
+
+    default:
+      return NULL;
+    }
+}
diff --git a/gdb/gnulib/import/strerror-override.h b/gdb/gnulib/import/strerror-override.h
new file mode 100644
index 0000000..6468681
--- /dev/null
+++ b/gdb/gnulib/import/strerror-override.h
@@ -0,0 +1,56 @@
+/* strerror-override.h --- POSIX compatible system error routine
+
+   Copyright (C) 2010-2012 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef _GL_STRERROR_OVERRIDE_H
+# define _GL_STRERROR_OVERRIDE_H
+
+# include <errno.h>
+# include <stddef.h>
+
+/* Reasonable buffer size that should never trigger ERANGE; if this
+   proves too small, we intentionally abort(), to remind us to fix
+   this value.  */
+# define STACKBUF_LEN 256
+
+/* If ERRNUM maps to an errno value defined by gnulib, return a string
+   describing the error.  Otherwise return NULL.  */
+# if REPLACE_STRERROR_0 \
+     || GNULIB_defined_ESOCK \
+     || GNULIB_defined_ESTREAMS \
+     || GNULIB_defined_EWINSOCK \
+     || GNULIB_defined_ENOMSG \
+     || GNULIB_defined_EIDRM \
+     || GNULIB_defined_ENOLINK \
+     || GNULIB_defined_EPROTO \
+     || GNULIB_defined_EMULTIHOP \
+     || GNULIB_defined_EBADMSG \
+     || GNULIB_defined_EOVERFLOW \
+     || GNULIB_defined_ENOTSUP \
+     || GNULIB_defined_ENETRESET \
+     || GNULIB_defined_ECONNABORTED \
+     || GNULIB_defined_ESTALE \
+     || GNULIB_defined_EDQUOT \
+     || GNULIB_defined_ECANCELED \
+     || GNULIB_defined_EOWNERDEAD \
+     || GNULIB_defined_ENOTRECOVERABLE \
+     || GNULIB_defined_EILSEQ
+extern const char *strerror_override (int errnum);
+# else
+#  define strerror_override(ignored) NULL
+# endif
+
+#endif /* _GL_STRERROR_OVERRIDE_H */
diff --git a/gdb/gnulib/import/strerror.c b/gdb/gnulib/import/strerror.c
new file mode 100644
index 0000000..587bd21
--- /dev/null
+++ b/gdb/gnulib/import/strerror.c
@@ -0,0 +1,70 @@
+/* strerror.c --- POSIX compatible system error routine
+
+   Copyright (C) 2007-2012 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include <string.h>
+
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "intprops.h"
+#include "strerror-override.h"
+#include "verify.h"
+
+/* Use the system functions, not the gnulib overrides in this file.  */
+#undef sprintf
+
+char *
+strerror (int n)
+#undef strerror
+{
+  static char buf[STACKBUF_LEN];
+  size_t len;
+
+  /* Cast away const, due to the historical signature of strerror;
+     callers should not be modifying the string.  */
+  const char *msg = strerror_override (n);
+  if (msg)
+    return (char *) msg;
+
+  msg = strerror (n);
+
+  /* Our strerror_r implementation might use the system's strerror
+     buffer, so all other clients of strerror have to see the error
+     copied into a buffer that we manage.  This is not thread-safe,
+     even if the system strerror is, but portable programs shouldn't
+     be using strerror if they care about thread-safety.  */
+  if (!msg || !*msg)
+    {
+      static char const fmt[] = "Unknown error %d";
+      verify (sizeof buf >= sizeof (fmt) + INT_STRLEN_BOUND (n));
+      sprintf (buf, fmt, n);
+      errno = EINVAL;
+      return buf;
+    }
+
+  /* Fix STACKBUF_LEN if this ever aborts.  */
+  len = strlen (msg);
+  if (sizeof buf <= len)
+    abort ();
+
+  return memcpy (buf, msg, len + 1);
+}
diff --git a/gdb/gnulib/import/strstr.c b/gdb/gnulib/import/strstr.c
new file mode 100644
index 0000000..94d6252
--- /dev/null
+++ b/gdb/gnulib/import/strstr.c
@@ -0,0 +1,82 @@
+/* Copyright (C) 1991-1994, 1996-1998, 2000, 2004, 2007-2012 Free Software
+   Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License along
+   with this program; if not, see <http://www.gnu.org/licenses/>.  */
+
+/* This particular implementation was written by Eric Blake, 2008.  */
+
+#ifndef _LIBC
+# include <config.h>
+#endif
+
+/* Specification of strstr.  */
+#include <string.h>
+
+#include <stdbool.h>
+
+#ifndef _LIBC
+# define __builtin_expect(expr, val)   (expr)
+#endif
+
+#define RETURN_TYPE char *
+#define AVAILABLE(h, h_l, j, n_l)                       \
+  (!memchr ((h) + (h_l), '\0', (j) + (n_l) - (h_l))     \
+   && ((h_l) = (j) + (n_l)))
+#include "str-two-way.h"
+
+/* Return the first occurrence of NEEDLE in HAYSTACK.  Return HAYSTACK
+   if NEEDLE is empty, otherwise NULL if NEEDLE is not found in
+   HAYSTACK.  */
+char *
+strstr (const char *haystack_start, const char *needle_start)
+{
+  const char *haystack = haystack_start;
+  const char *needle = needle_start;
+  size_t needle_len; /* Length of NEEDLE.  */
+  size_t haystack_len; /* Known minimum length of HAYSTACK.  */
+  bool ok = true; /* True if NEEDLE is prefix of HAYSTACK.  */
+
+  /* Determine length of NEEDLE, and in the process, make sure
+     HAYSTACK is at least as long (no point processing all of a long
+     NEEDLE if HAYSTACK is too short).  */
+  while (*haystack && *needle)
+    ok &= *haystack++ == *needle++;
+  if (*needle)
+    return NULL;
+  if (ok)
+    return (char *) haystack_start;
+
+  /* Reduce the size of haystack using strchr, since it has a smaller
+     linear coefficient than the Two-Way algorithm.  */
+  needle_len = needle - needle_start;
+  haystack = strchr (haystack_start + 1, *needle_start);
+  if (!haystack || __builtin_expect (needle_len == 1, 0))
+    return (char *) haystack;
+  needle -= needle_len;
+  haystack_len = (haystack > haystack_start + needle_len ? 1
+                  : needle_len + haystack_start - haystack);
+
+  /* Perform the search.  Abstract memory is considered to be an array
+     of 'unsigned char' values, not an array of 'char' values.  See
+     ISO C 99 section 6.2.6.1.  */
+  if (needle_len < LONG_NEEDLE_THRESHOLD)
+    return two_way_short_needle ((const unsigned char *) haystack,
+                                 haystack_len,
+                                 (const unsigned char *) needle, needle_len);
+  return two_way_long_needle ((const unsigned char *) haystack, haystack_len,
+                              (const unsigned char *) needle, needle_len);
+}
+
+#undef LONG_NEEDLE_THRESHOLD
diff --git a/gdb/gnulib/update-gnulib.sh b/gdb/gnulib/update-gnulib.sh
index 2ad3231..dc5015f 100644
--- a/gdb/gnulib/update-gnulib.sh
+++ b/gdb/gnulib/update-gnulib.sh
@@ -37,6 +37,8 @@ IMPORTED_GNULIB_MODULES="\
     update-copyright \
     unistd \
     pathmax \
+    strerror \
+    strstr \
 "
 
 # The gnulib commit ID to use for the update.
-- 
1.8.1.4

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH v3 00/13] use gnulib more heavily
@ 2013-11-18 20:27 Tom Tromey
  2013-11-18 20:26 ` [PATCH v3 01/13] link gdbreplay against gnulib Tom Tromey
                   ` (12 more replies)
  0 siblings, 13 replies; 24+ messages in thread
From: Tom Tromey @ 2013-11-18 20:27 UTC (permalink / raw)
  To: gdb-patches

Here is version 3 of the gnulib series.

Version 2 is here:

    https://sourceware.org/ml/gdb-patches/2013-11/msg00123.html

I'm checking this version in.
Built and regtested on x86-64 Fedora 18.
I also built it with the mingw cross tools.

Let me know if there are any issues.

Tom

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH v3 12/13] import gnulib sys/stat.h module
  2013-11-18 20:27 [PATCH v3 00/13] use gnulib more heavily Tom Tromey
                   ` (4 preceding siblings ...)
  2013-11-18 20:37 ` [PATCH v3 11/13] sys/types.h cleanup Tom Tromey
@ 2013-11-18 20:37 ` Tom Tromey
  2013-11-18 20:39 ` [PATCH v3 08/13] don't check for stddef.h Tom Tromey
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 24+ messages in thread
From: Tom Tromey @ 2013-11-18 20:37 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This imports the gnulib sys/stat.h module.
It doesn't make any other changes to gdb.

2013-11-18  Tom Tromey  <tromey@redhat.com>

	* gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
	sys_stat.
	* gnulib/aclocal.m4: Update.
	* gnulib/config.in: Update.
	* gnulib/configure: Update.
	* gnulib/import/Makefile.am: Update.
	* gnulib/import/Makefile.in: Update.
	* gnulib/import/m4/gnulib-cache.m4: Update.
	* gnulib/import/m4/gnulib-comp.m4: Update.
	* gnulib/import/m4/sys_stat_h.m4: New.
	* gnulib/import/m4/time_h.m4: New.
	* gnulib/import/sys_stat.in.h: New.
	* gnulib/import/time.in.h: New.
---
 gdb/ChangeLog                        |  16 +
 gdb/gnulib/aclocal.m4                |   2 +
 gdb/gnulib/config.in                 |  52 +++
 gdb/gnulib/configure                 | 499 +++++++++++++++++++++++-
 gdb/gnulib/import/Makefile.am        | 106 ++++-
 gdb/gnulib/import/Makefile.in        | 156 +++++++-
 gdb/gnulib/import/m4/gnulib-cache.m4 |   3 +-
 gdb/gnulib/import/m4/gnulib-comp.m4  |   9 +
 gdb/gnulib/import/m4/sys_stat_h.m4   |  96 +++++
 gdb/gnulib/import/m4/time_h.m4       | 109 ++++++
 gdb/gnulib/import/sys_stat.in.h      | 728 +++++++++++++++++++++++++++++++++++
 gdb/gnulib/import/time.in.h          | 248 ++++++++++++
 gdb/gnulib/update-gnulib.sh          |   1 +
 13 files changed, 2004 insertions(+), 21 deletions(-)
 create mode 100644 gdb/gnulib/import/m4/sys_stat_h.m4
 create mode 100644 gdb/gnulib/import/m4/time_h.m4
 create mode 100644 gdb/gnulib/import/sys_stat.in.h
 create mode 100644 gdb/gnulib/import/time.in.h

diff --git a/gdb/gnulib/aclocal.m4 b/gdb/gnulib/aclocal.m4
index ba89b44..f89f6d0 100644
--- a/gdb/gnulib/aclocal.m4
+++ b/gdb/gnulib/aclocal.m4
@@ -1060,7 +1060,9 @@ m4_include([import/m4/strerror.m4])
 m4_include([import/m4/string_h.m4])
 m4_include([import/m4/strstr.m4])
 m4_include([import/m4/sys_socket_h.m4])
+m4_include([import/m4/sys_stat_h.m4])
 m4_include([import/m4/sys_types_h.m4])
+m4_include([import/m4/time_h.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 d109990..fb524f4 100644
--- a/gdb/gnulib/config.in
+++ b/gdb/gnulib/config.in
@@ -299,6 +299,9 @@
 /* Define to 1 if fchdir is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_FCHDIR
 
+/* Define to 1 if fchmodat is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_FCHMODAT
+
 /* Define to 1 if fchownat is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_FCHOWNAT
 
@@ -344,12 +347,21 @@
 /* Define to 1 if frexpl is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_FREXPL
 
+/* Define to 1 if fstat is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_FSTAT
+
+/* Define to 1 if fstatat is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_FSTATAT
+
 /* Define to 1 if fsync is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_FSYNC
 
 /* Define to 1 if ftruncate is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_FTRUNCATE
 
+/* Define to 1 if futimens is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_FUTIMENS
+
 /* Define to 1 if getcwd is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_GETCWD
 
@@ -407,6 +419,9 @@
 /* Define to 1 if iswctype is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_ISWCTYPE
 
+/* Define to 1 if lchmod is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_LCHMOD
+
 /* Define to 1 if lchown is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_LCHOWN
 
@@ -470,6 +485,9 @@
 /* Define to 1 if lseek is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_LSEEK
 
+/* Define to 1 if lstat is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_LSTAT
+
 /* Define to 1 if mbrlen is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_MBRLEN
 
@@ -494,6 +512,21 @@
 /* Define to 1 if memrchr is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_MEMRCHR
 
+/* Define to 1 if mkdirat is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_MKDIRAT
+
+/* Define to 1 if mkfifo is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_MKFIFO
+
+/* Define to 1 if mkfifoat is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_MKFIFOAT
+
+/* Define to 1 if mknod is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_MKNOD
+
+/* Define to 1 if mknodat is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_MKNODAT
+
 /* Define to 1 if modf is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_MODF
 
@@ -593,6 +626,9 @@
 /* Define to 1 if sqrtl is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_SQRTL
 
+/* Define to 1 if stat is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_STAT
+
 /* Define to 1 if stpcpy is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_STPCPY
 
@@ -680,6 +716,9 @@
 /* Define to 1 if usleep is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_USLEEP
 
+/* Define to 1 if utimensat is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_UTIMENSAT
+
 /* Define to 1 if wcpcpy is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_WCPCPY
 
@@ -830,6 +869,9 @@
 /* Define to 1 if you have the <sys/stat.h> header file. */
 #undef HAVE_SYS_STAT_H
 
+/* Define to 1 if you have the <sys/time.h> header file. */
+#undef HAVE_SYS_TIME_H
+
 /* Define to 1 if you have the <sys/types.h> header file. */
 #undef HAVE_SYS_TYPES_H
 
@@ -941,6 +983,9 @@
         STACK_DIRECTION = 0 => direction of growth unknown */
 #undef STACK_DIRECTION
 
+/* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */
+#undef STAT_MACROS_BROKEN
+
 /* Define to 1 if you have the ANSI C header files. */
 #undef STDC_HEADERS
 
@@ -964,6 +1009,10 @@
 # endif
 #endif
 
+/* Define to 1 if Gnulib overrides 'struct stat' on Windows so that struct
+   stat.st_size becomes 64-bit. */
+#undef _GL_WINDOWS_64_BIT_ST_SIZE
+
 /* Define to 1 if on MINIX. */
 #undef _MINIX
 
@@ -1088,6 +1137,9 @@
 /* Define to `int' if <sys/types.h> does not define. */
 #undef mode_t
 
+/* Define to the type of st_nlink in struct stat, or a supertype. */
+#undef nlink_t
+
 /* Define to `int' if <sys/types.h> does not define. */
 #undef pid_t
 
diff --git a/gdb/gnulib/configure b/gdb/gnulib/configure
index 6c2a236..80d19a2 100644
--- a/gdb/gnulib/configure
+++ b/gdb/gnulib/configure
@@ -656,10 +656,64 @@ NEXT_WCHAR_H
 HAVE_UNISTD_H
 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
 NEXT_UNISTD_H
-MKDIR_P
+PTHREAD_H_DEFINES_STRUCT_TIMESPEC
+SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
+TIME_H_DEFINES_STRUCT_TIMESPEC
+NEXT_AS_FIRST_DIRECTIVE_TIME_H
+NEXT_TIME_H
+REPLACE_TIMEGM
+REPLACE_NANOSLEEP
+REPLACE_MKTIME
+REPLACE_LOCALTIME_R
+HAVE_TIMEGM
+HAVE_STRPTIME
+HAVE_NANOSLEEP
+HAVE_DECL_LOCALTIME_R
+GNULIB_TIME_R
+GNULIB_TIMEGM
+GNULIB_STRPTIME
+GNULIB_NANOSLEEP
+GNULIB_MKTIME
 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
+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
 NEXT_AS_FIRST_DIRECTIVE_STRING_H
 NEXT_STRING_H
 HAVE_WINSOCK2_H
@@ -3042,6 +3096,8 @@ as_fn_append ac_header_list " sys/mman.h"
 as_fn_append ac_func_list " mprotect"
 as_fn_append ac_header_list " sys/param.h"
 as_fn_append ac_header_list " sys/socket.h"
+as_fn_append ac_header_list " sys/stat.h"
+as_fn_append ac_header_list " sys/time.h"
 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
@@ -4792,7 +4848,9 @@ fi
   # Code from module strnlen1:
   # Code from module strstr:
   # Code from module strstr-simple:
+  # Code from module sys_stat:
   # Code from module sys_types:
+  # Code from module time:
   # Code from module unistd:
   # Code from module update-copyright:
   # Code from module verify:
@@ -9984,18 +10042,84 @@ $as_echo "$gl_cv_func_strstr_works_always" >&6; }
   fi
 
 
+     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>
 
-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 :
+#if defined S_ISBLK && defined S_IFDIR
+extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
+#endif
 
-else
+#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
 
-cat >>confdefs.h <<_ACEOF
-#define pid_t int
 _ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  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
+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
 
+
+
 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 :
 
@@ -10007,12 +10131,6 @@ _ACEOF
 
 fi
 
-
-
-    WINDOWS_64_BIT_OFF_T=0
-
-
-
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
 if test -z "$MKDIR_P"; then
@@ -10056,6 +10174,213 @@ fi
 $as_echo "$MKDIR_P" >&6; }
 
 
+
+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
+
+
+
+    WINDOWS_64_BIT_OFF_T=0
+
+
+
+
+  GNULIB_MKTIME=0;
+  GNULIB_NANOSLEEP=0;
+  GNULIB_STRPTIME=0;
+  GNULIB_TIMEGM=0;
+  GNULIB_TIME_R=0;
+    HAVE_DECL_LOCALTIME_R=1;
+  HAVE_NANOSLEEP=1;
+  HAVE_STRPTIME=1;
+  HAVE_TIMEGM=1;
+        REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
+  REPLACE_MKTIME=GNULIB_PORTCHECK;
+  REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
+  REPLACE_TIMEGM=GNULIB_PORTCHECK;
+
+
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
+$as_echo_n "checking for struct timespec in <time.h>... " >&6; }
+if test "${gl_cv_sys_struct_timespec_in_time_h+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <time.h>
+
+int
+main ()
+{
+static struct timespec x; x.tv_sec = x.tv_nsec;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_sys_struct_timespec_in_time_h=yes
+else
+  gl_cv_sys_struct_timespec_in_time_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
+$as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
+
+  TIME_H_DEFINES_STRUCT_TIMESPEC=0
+  SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
+  PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
+  if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
+    TIME_H_DEFINES_STRUCT_TIMESPEC=1
+  else
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
+$as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
+if test "${gl_cv_sys_struct_timespec_in_sys_time_h+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/time.h>
+
+int
+main ()
+{
+static struct timespec x; x.tv_sec = x.tv_nsec;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_sys_struct_timespec_in_sys_time_h=yes
+else
+  gl_cv_sys_struct_timespec_in_sys_time_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
+$as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
+    if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
+      SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
+    else
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
+$as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
+if test "${gl_cv_sys_struct_timespec_in_pthread_h+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <pthread.h>
+
+int
+main ()
+{
+static struct timespec x; x.tv_sec = x.tv_nsec;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  gl_cv_sys_struct_timespec_in_pthread_h=yes
+else
+  gl_cv_sys_struct_timespec_in_pthread_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
+$as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
+      if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
+        PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
+      fi
+    fi
+  fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_time_h='<'time.h'>'
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
+$as_echo_n "checking absolute name of <time.h>... " >&6; }
+if test "${gl_cv_next_time_h+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <time.h>
+
+_ACEOF
+                                                                                                                        case "$host_os" in
+                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
+                 *)    gl_absname_cpp="$ac_cpp" ;;
+               esac
+
+               case "$host_os" in
+                 mingw*)
+                                                                                                                                     gl_dirsep_regex='[/\\]'
+                   ;;
+                 *)
+                   gl_dirsep_regex='\/'
+                   ;;
+               esac
+                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+
+               gl_header_literal_regex=`echo '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/
+                   s|^/[^/]|//&|
+                   p
+                   q
+                 }'
+                                                            gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+                      sed -n "$gl_absolute_header_sed"`'"'
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
+$as_echo "$gl_cv_next_time_h" >&6; }
+     fi
+     NEXT_TIME_H=$gl_cv_next_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='<'time.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_time_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
+
+
+
+
+
+
+
             { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
 $as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
 if test "${gl_cv_header_wchar_h_correct_inline+set}" = set; then :
@@ -14151,6 +14476,154 @@ $as_echo "#define GNULIB_TEST_STRSTR 1" >>confdefs.h
 
 
 
+
+
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_sys_stat_h='<'sys/stat.h'>'
+     else
+       { $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_stat_h = yes; then
+
+
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/stat.h>
+
+_ACEOF
+                                                                                                                        case "$host_os" in
+                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
+                 *)    gl_absname_cpp="$ac_cpp" ;;
+               esac
+
+               case "$host_os" in
+                 mingw*)
+                                                                                                                                     gl_dirsep_regex='[/\\]'
+                   ;;
+                 *)
+                   gl_dirsep_regex='\/'
+                   ;;
+               esac
+                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+
+               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/
+                   s|^/[^/]|//&|
+                   p
+                   q
+                 }'
+                                                            gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+                      sed -n "$gl_absolute_header_sed"`'"'
+          else
+               gl_cv_next_sys_stat_h='<'sys/stat.h'>'
+             fi
+
+
+fi
+{ $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_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/stat.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_sys_stat_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
+
+
+
+
+
+
+
+
+    WINDOWS_64_BIT_ST_SIZE=0
+
+
+  if test $WINDOWS_64_BIT_ST_SIZE = 1; then
+
+$as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
+
+  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 "#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.  */
+#include <sys/stat.h>
+
+int
+main ()
+{
+#undef $gl_func
+  (void) $gl_func;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$as_gl_Symbol=yes"
+else
+  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
+      done
+
+
+
+
+
+
+
+
+
+
+
+
+
+
      if test $gl_cv_have_include_next = yes; then
        gl_cv_next_sys_types_h='<'sys/types.h'>'
      else
@@ -14231,6 +14704,8 @@ $as_echo "$gl_cv_next_sys_types_h" >&6; }
 
 
 
+
+
      if test $gl_cv_have_include_next = yes; then
        gl_cv_next_unistd_h='<'unistd.h'>'
      else
diff --git a/gdb/gnulib/import/Makefile.am b/gdb/gnulib/import/Makefile.am
index 0fd64e5..8eeb8c1 100644
--- a/gdb/gnulib/import/Makefile.am
+++ b/gdb/gnulib/import/Makefile.am
@@ -21,7 +21,7 @@
 # the same distribution terms as the rest of that program.
 #
 # Generated by gnulib-tool.
-# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=import --m4-base=import/m4 --doc-base=doc --tests-base=tests --aux-dir=import/extra --no-conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files dirent fnmatch-gnu frexpl inttypes memmem pathmax strerror strstr unistd update-copyright
+# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=import --m4-base=import/m4 --doc-base=doc --tests-base=tests --aux-dir=import/extra --no-conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files dirent fnmatch-gnu frexpl inttypes memmem pathmax strerror strstr sys_stat unistd update-copyright
 
 AUTOMAKE_OPTIONS = 1.5 gnits
 
@@ -1082,6 +1082,68 @@ EXTRA_libgnu_a_SOURCES += strstr.c
 
 ## end   gnulib module strstr-simple
 
+## begin gnulib module sys_stat
+
+BUILT_SOURCES += sys/stat.h
+
+# We need the following in order to create <sys/stat.h> when the system
+# has one that is incomplete.
+sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+	$(AM_V_at)$(MKDIR_P) sys
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+	  sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+	      -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+	      -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+	      -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+	      -e 's|@''NEXT_SYS_STAT_H''@|$(NEXT_SYS_STAT_H)|g' \
+	      -e 's|@''WINDOWS_64_BIT_ST_SIZE''@|$(WINDOWS_64_BIT_ST_SIZE)|g' \
+	      -e 's/@''GNULIB_FCHMODAT''@/$(GNULIB_FCHMODAT)/g' \
+	      -e 's/@''GNULIB_FSTAT''@/$(GNULIB_FSTAT)/g' \
+	      -e 's/@''GNULIB_FSTATAT''@/$(GNULIB_FSTATAT)/g' \
+	      -e 's/@''GNULIB_FUTIMENS''@/$(GNULIB_FUTIMENS)/g' \
+	      -e 's/@''GNULIB_LCHMOD''@/$(GNULIB_LCHMOD)/g' \
+	      -e 's/@''GNULIB_LSTAT''@/$(GNULIB_LSTAT)/g' \
+	      -e 's/@''GNULIB_MKDIRAT''@/$(GNULIB_MKDIRAT)/g' \
+	      -e 's/@''GNULIB_MKFIFO''@/$(GNULIB_MKFIFO)/g' \
+	      -e 's/@''GNULIB_MKFIFOAT''@/$(GNULIB_MKFIFOAT)/g' \
+	      -e 's/@''GNULIB_MKNOD''@/$(GNULIB_MKNOD)/g' \
+	      -e 's/@''GNULIB_MKNODAT''@/$(GNULIB_MKNODAT)/g' \
+	      -e 's/@''GNULIB_STAT''@/$(GNULIB_STAT)/g' \
+	      -e 's/@''GNULIB_UTIMENSAT''@/$(GNULIB_UTIMENSAT)/g' \
+	      -e 's|@''HAVE_FCHMODAT''@|$(HAVE_FCHMODAT)|g' \
+	      -e 's|@''HAVE_FSTATAT''@|$(HAVE_FSTATAT)|g' \
+	      -e 's|@''HAVE_FUTIMENS''@|$(HAVE_FUTIMENS)|g' \
+	      -e 's|@''HAVE_LCHMOD''@|$(HAVE_LCHMOD)|g' \
+	      -e 's|@''HAVE_LSTAT''@|$(HAVE_LSTAT)|g' \
+	      -e 's|@''HAVE_MKDIRAT''@|$(HAVE_MKDIRAT)|g' \
+	      -e 's|@''HAVE_MKFIFO''@|$(HAVE_MKFIFO)|g' \
+	      -e 's|@''HAVE_MKFIFOAT''@|$(HAVE_MKFIFOAT)|g' \
+	      -e 's|@''HAVE_MKNOD''@|$(HAVE_MKNOD)|g' \
+	      -e 's|@''HAVE_MKNODAT''@|$(HAVE_MKNODAT)|g' \
+	      -e 's|@''HAVE_UTIMENSAT''@|$(HAVE_UTIMENSAT)|g' \
+	      -e 's|@''REPLACE_FSTAT''@|$(REPLACE_FSTAT)|g' \
+	      -e 's|@''REPLACE_FSTATAT''@|$(REPLACE_FSTATAT)|g' \
+	      -e 's|@''REPLACE_FUTIMENS''@|$(REPLACE_FUTIMENS)|g' \
+	      -e 's|@''REPLACE_LSTAT''@|$(REPLACE_LSTAT)|g' \
+	      -e 's|@''REPLACE_MKDIR''@|$(REPLACE_MKDIR)|g' \
+	      -e 's|@''REPLACE_MKFIFO''@|$(REPLACE_MKFIFO)|g' \
+	      -e 's|@''REPLACE_MKNOD''@|$(REPLACE_MKNOD)|g' \
+	      -e 's|@''REPLACE_STAT''@|$(REPLACE_STAT)|g' \
+	      -e 's|@''REPLACE_UTIMENSAT''@|$(REPLACE_UTIMENSAT)|g' \
+	      -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+	      -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+	      -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+	      < $(srcdir)/sys_stat.in.h; \
+	} > $@-t && \
+	mv $@-t $@
+MOSTLYCLEANFILES += sys/stat.h sys/stat.h-t
+MOSTLYCLEANDIRS += sys
+
+EXTRA_DIST += sys_stat.in.h
+
+## end   gnulib module sys_stat
+
 ## begin gnulib module sys_types
 
 BUILT_SOURCES += sys/types.h
@@ -1107,6 +1169,48 @@ EXTRA_DIST += sys_types.in.h
 
 ## end   gnulib module sys_types
 
+## begin gnulib module time
+
+BUILT_SOURCES += time.h
+
+# We need the following in order to create <time.h> when the system
+# doesn't have one that works with the given compiler.
+time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+	  sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+	      -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+	      -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+	      -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+	      -e 's|@''NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \
+	      -e 's/@''GNULIB_MKTIME''@/$(GNULIB_MKTIME)/g' \
+	      -e 's/@''GNULIB_NANOSLEEP''@/$(GNULIB_NANOSLEEP)/g' \
+	      -e 's/@''GNULIB_STRPTIME''@/$(GNULIB_STRPTIME)/g' \
+	      -e 's/@''GNULIB_TIMEGM''@/$(GNULIB_TIMEGM)/g' \
+	      -e 's/@''GNULIB_TIME_R''@/$(GNULIB_TIME_R)/g' \
+	      -e 's|@''HAVE_DECL_LOCALTIME_R''@|$(HAVE_DECL_LOCALTIME_R)|g' \
+	      -e 's|@''HAVE_NANOSLEEP''@|$(HAVE_NANOSLEEP)|g' \
+	      -e 's|@''HAVE_STRPTIME''@|$(HAVE_STRPTIME)|g' \
+	      -e 's|@''HAVE_TIMEGM''@|$(HAVE_TIMEGM)|g' \
+	      -e 's|@''REPLACE_LOCALTIME_R''@|$(REPLACE_LOCALTIME_R)|g' \
+	      -e 's|@''REPLACE_MKTIME''@|$(REPLACE_MKTIME)|g' \
+	      -e 's|@''REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \
+	      -e 's|@''REPLACE_TIMEGM''@|$(REPLACE_TIMEGM)|g' \
+	      -e 's|@''PTHREAD_H_DEFINES_STRUCT_TIMESPEC''@|$(PTHREAD_H_DEFINES_STRUCT_TIMESPEC)|g' \
+	      -e 's|@''SYS_TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(SYS_TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \
+	      -e 's|@''TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \
+	      -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+	      -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+	      -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+	      < $(srcdir)/time.in.h; \
+	} > $@-t && \
+	mv $@-t $@
+MOSTLYCLEANFILES += time.h time.h-t
+
+EXTRA_DIST += time.in.h
+
+## end   gnulib module time
+
 ## begin gnulib module unistd
 
 BUILT_SOURCES += unistd.h
diff --git a/gdb/gnulib/import/Makefile.in b/gdb/gnulib/import/Makefile.in
index bbafbfb..2f8e534 100644
--- a/gdb/gnulib/import/Makefile.in
+++ b/gdb/gnulib/import/Makefile.in
@@ -36,7 +36,7 @@
 # the same distribution terms as the rest of that program.
 #
 # Generated by gnulib-tool.
-# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=import --m4-base=import/m4 --doc-base=doc --tests-base=tests --aux-dir=import/extra --no-conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files dirent fnmatch-gnu frexpl inttypes memmem pathmax strerror strstr unistd update-copyright
+# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=import --m4-base=import/m4 --doc-base=doc --tests-base=tests --aux-dir=import/extra --no-conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files dirent fnmatch-gnu frexpl inttypes memmem pathmax strerror strstr sys_stat unistd update-copyright
 
 
 
@@ -111,7 +111,9 @@ am__aclocal_m4_deps = $(top_srcdir)/import/m4/00gnulib.m4 \
 	$(top_srcdir)/import/m4/string_h.m4 \
 	$(top_srcdir)/import/m4/strstr.m4 \
 	$(top_srcdir)/import/m4/sys_socket_h.m4 \
+	$(top_srcdir)/import/m4/sys_stat_h.m4 \
 	$(top_srcdir)/import/m4/sys_types_h.m4 \
+	$(top_srcdir)/import/m4/time_h.m4 \
 	$(top_srcdir)/import/m4/unistd_h.m4 \
 	$(top_srcdir)/import/m4/warn-on-use.m4 \
 	$(top_srcdir)/import/m4/wchar_h.m4 \
@@ -268,6 +270,7 @@ GNULIB_FABSF = @GNULIB_FABSF@
 GNULIB_FABSL = @GNULIB_FABSL@
 GNULIB_FACCESSAT = @GNULIB_FACCESSAT@
 GNULIB_FCHDIR = @GNULIB_FCHDIR@
+GNULIB_FCHMODAT = @GNULIB_FCHMODAT@
 GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@
 GNULIB_FDATASYNC = @GNULIB_FDATASYNC@
 GNULIB_FDOPENDIR = @GNULIB_FDOPENDIR@
@@ -285,8 +288,11 @@ GNULIB_FMODL = @GNULIB_FMODL@
 GNULIB_FREXP = @GNULIB_FREXP@
 GNULIB_FREXPF = @GNULIB_FREXPF@
 GNULIB_FREXPL = @GNULIB_FREXPL@
+GNULIB_FSTAT = @GNULIB_FSTAT@
+GNULIB_FSTATAT = @GNULIB_FSTATAT@
 GNULIB_FSYNC = @GNULIB_FSYNC@
 GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
+GNULIB_FUTIMENS = @GNULIB_FUTIMENS@
 GNULIB_GETCWD = @GNULIB_GETCWD@
 GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@
 GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@
@@ -314,6 +320,7 @@ GNULIB_ISNANF = @GNULIB_ISNANF@
 GNULIB_ISNANL = @GNULIB_ISNANL@
 GNULIB_ISWBLANK = @GNULIB_ISWBLANK@
 GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@
+GNULIB_LCHMOD = @GNULIB_LCHMOD@
 GNULIB_LCHOWN = @GNULIB_LCHOWN@
 GNULIB_LDEXPF = @GNULIB_LDEXPF@
 GNULIB_LDEXPL = @GNULIB_LDEXPL@
@@ -335,6 +342,7 @@ GNULIB_LOGBL = @GNULIB_LOGBL@
 GNULIB_LOGF = @GNULIB_LOGF@
 GNULIB_LOGL = @GNULIB_LOGL@
 GNULIB_LSEEK = @GNULIB_LSEEK@
+GNULIB_LSTAT = @GNULIB_LSTAT@
 GNULIB_MBRLEN = @GNULIB_MBRLEN@
 GNULIB_MBRTOWC = @GNULIB_MBRTOWC@
 GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@
@@ -358,9 +366,16 @@ GNULIB_MEMCHR = @GNULIB_MEMCHR@
 GNULIB_MEMMEM = @GNULIB_MEMMEM@
 GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
 GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
+GNULIB_MKDIRAT = @GNULIB_MKDIRAT@
+GNULIB_MKFIFO = @GNULIB_MKFIFO@
+GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@
+GNULIB_MKNOD = @GNULIB_MKNOD@
+GNULIB_MKNODAT = @GNULIB_MKNODAT@
+GNULIB_MKTIME = @GNULIB_MKTIME@
 GNULIB_MODF = @GNULIB_MODF@
 GNULIB_MODFF = @GNULIB_MODFF@
 GNULIB_MODFL = @GNULIB_MODFL@
+GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@
 GNULIB_OPENDIR = @GNULIB_OPENDIR@
 GNULIB_PIPE = @GNULIB_PIPE@
 GNULIB_PIPE2 = @GNULIB_PIPE2@
@@ -392,6 +407,7 @@ GNULIB_SINL = @GNULIB_SINL@
 GNULIB_SLEEP = @GNULIB_SLEEP@
 GNULIB_SQRTF = @GNULIB_SQRTF@
 GNULIB_SQRTL = @GNULIB_SQRTL@
+GNULIB_STAT = @GNULIB_STAT@
 GNULIB_STPCPY = @GNULIB_STPCPY@
 GNULIB_STPNCPY = @GNULIB_STPNCPY@
 GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
@@ -403,6 +419,7 @@ GNULIB_STRNCAT = @GNULIB_STRNCAT@
 GNULIB_STRNDUP = @GNULIB_STRNDUP@
 GNULIB_STRNLEN = @GNULIB_STRNLEN@
 GNULIB_STRPBRK = @GNULIB_STRPBRK@
+GNULIB_STRPTIME = @GNULIB_STRPTIME@
 GNULIB_STRSEP = @GNULIB_STRSEP@
 GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@
 GNULIB_STRSTR = @GNULIB_STRSTR@
@@ -415,6 +432,8 @@ GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@
 GNULIB_TANF = @GNULIB_TANF@
 GNULIB_TANHF = @GNULIB_TANHF@
 GNULIB_TANL = @GNULIB_TANL@
+GNULIB_TIMEGM = @GNULIB_TIMEGM@
+GNULIB_TIME_R = @GNULIB_TIME_R@
 GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@
 GNULIB_TRUNC = @GNULIB_TRUNC@
 GNULIB_TRUNCF = @GNULIB_TRUNCF@
@@ -425,6 +444,7 @@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@
 GNULIB_UNLINK = @GNULIB_UNLINK@
 GNULIB_UNLINKAT = @GNULIB_UNLINKAT@
 GNULIB_USLEEP = @GNULIB_USLEEP@
+GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@
 GNULIB_WCPCPY = @GNULIB_WCPCPY@
 GNULIB_WCPNCPY = @GNULIB_WCPNCPY@
 GNULIB_WCRTOMB = @GNULIB_WCRTOMB@
@@ -510,6 +530,7 @@ HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@
 HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@
 HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@
 HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@
+HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@
 HAVE_DECL_LOG10L = @HAVE_DECL_LOG10L@
 HAVE_DECL_LOG2 = @HAVE_DECL_LOG2@
 HAVE_DECL_LOG2F = @HAVE_DECL_LOG2F@
@@ -554,6 +575,7 @@ HAVE_FABSF = @HAVE_FABSF@
 HAVE_FABSL = @HAVE_FABSL@
 HAVE_FACCESSAT = @HAVE_FACCESSAT@
 HAVE_FCHDIR = @HAVE_FCHDIR@
+HAVE_FCHMODAT = @HAVE_FCHMODAT@
 HAVE_FCHOWNAT = @HAVE_FCHOWNAT@
 HAVE_FDATASYNC = @HAVE_FDATASYNC@
 HAVE_FDOPENDIR = @HAVE_FDOPENDIR@
@@ -566,8 +588,10 @@ HAVE_FMAL = @HAVE_FMAL@
 HAVE_FMODF = @HAVE_FMODF@
 HAVE_FMODL = @HAVE_FMODL@
 HAVE_FREXPF = @HAVE_FREXPF@
+HAVE_FSTATAT = @HAVE_FSTATAT@
 HAVE_FSYNC = @HAVE_FSYNC@
 HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
+HAVE_FUTIMENS = @HAVE_FUTIMENS@
 HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@
 HAVE_GETGROUPS = @HAVE_GETGROUPS@
 HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@
@@ -585,6 +609,7 @@ HAVE_ISNANF = @HAVE_ISNANF@
 HAVE_ISNANL = @HAVE_ISNANL@
 HAVE_ISWBLANK = @HAVE_ISWBLANK@
 HAVE_ISWCNTRL = @HAVE_ISWCNTRL@
+HAVE_LCHMOD = @HAVE_LCHMOD@
 HAVE_LCHOWN = @HAVE_LCHOWN@
 HAVE_LDEXPF = @HAVE_LDEXPF@
 HAVE_LINK = @HAVE_LINK@
@@ -599,6 +624,7 @@ HAVE_LOGBL = @HAVE_LOGBL@
 HAVE_LOGF = @HAVE_LOGF@
 HAVE_LOGL = @HAVE_LOGL@
 HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
+HAVE_LSTAT = @HAVE_LSTAT@
 HAVE_MBRLEN = @HAVE_MBRLEN@
 HAVE_MBRTOWC = @HAVE_MBRTOWC@
 HAVE_MBSINIT = @HAVE_MBSINIT@
@@ -607,8 +633,14 @@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@
 HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@
 HAVE_MEMCHR = @HAVE_MEMCHR@
 HAVE_MEMPCPY = @HAVE_MEMPCPY@
+HAVE_MKDIRAT = @HAVE_MKDIRAT@
+HAVE_MKFIFO = @HAVE_MKFIFO@
+HAVE_MKFIFOAT = @HAVE_MKFIFOAT@
+HAVE_MKNOD = @HAVE_MKNOD@
+HAVE_MKNODAT = @HAVE_MKNODAT@
 HAVE_MODFF = @HAVE_MODFF@
 HAVE_MODFL = @HAVE_MODFL@
+HAVE_NANOSLEEP = @HAVE_NANOSLEEP@
 HAVE_OPENDIR = @HAVE_OPENDIR@
 HAVE_OS_H = @HAVE_OS_H@
 HAVE_PIPE = @HAVE_PIPE@
@@ -643,6 +675,7 @@ HAVE_STPNCPY = @HAVE_STPNCPY@
 HAVE_STRCASESTR = @HAVE_STRCASESTR@
 HAVE_STRCHRNUL = @HAVE_STRCHRNUL@
 HAVE_STRPBRK = @HAVE_STRPBRK@
+HAVE_STRPTIME = @HAVE_STRPTIME@
 HAVE_STRSEP = @HAVE_STRSEP@
 HAVE_STRVERSCMP = @HAVE_STRVERSCMP@
 HAVE_SYMLINK = @HAVE_SYMLINK@
@@ -654,10 +687,12 @@ HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
 HAVE_TANF = @HAVE_TANF@
 HAVE_TANHF = @HAVE_TANHF@
 HAVE_TANL = @HAVE_TANL@
+HAVE_TIMEGM = @HAVE_TIMEGM@
 HAVE_UNISTD_H = @HAVE_UNISTD_H@
 HAVE_UNLINKAT = @HAVE_UNLINKAT@
 HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@
 HAVE_USLEEP = @HAVE_USLEEP@
+HAVE_UTIMENSAT = @HAVE_UTIMENSAT@
 HAVE_WCHAR_H = @HAVE_WCHAR_H@
 HAVE_WCHAR_T = @HAVE_WCHAR_T@
 HAVE_WCPCPY = @HAVE_WCPCPY@
@@ -729,7 +764,9 @@ NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@
 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@
 NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@
 NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@
+NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@
 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H@
+NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@
 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@
 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@
 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@
@@ -741,7 +778,9 @@ NEXT_MATH_H = @NEXT_MATH_H@
 NEXT_STDDEF_H = @NEXT_STDDEF_H@
 NEXT_STDINT_H = @NEXT_STDINT_H@
 NEXT_STRING_H = @NEXT_STRING_H@
+NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@
 NEXT_SYS_TYPES_H = @NEXT_SYS_TYPES_H@
+NEXT_TIME_H = @NEXT_TIME_H@
 NEXT_UNISTD_H = @NEXT_UNISTD_H@
 NEXT_WCHAR_H = @NEXT_WCHAR_H@
 NEXT_WCTYPE_H = @NEXT_WCTYPE_H@
@@ -758,6 +797,7 @@ PRAGMA_COLUMNS = @PRAGMA_COLUMNS@
 PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
 PRIPTR_PREFIX = @PRIPTR_PREFIX@
 PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@
+PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@
 PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
 RANLIB = @RANLIB@
 REPLACE_BTOWC = @REPLACE_BTOWC@
@@ -791,7 +831,10 @@ REPLACE_FMODL = @REPLACE_FMODL@
 REPLACE_FREXP = @REPLACE_FREXP@
 REPLACE_FREXPF = @REPLACE_FREXPF@
 REPLACE_FREXPL = @REPLACE_FREXPL@
+REPLACE_FSTAT = @REPLACE_FSTAT@
+REPLACE_FSTATAT = @REPLACE_FSTATAT@
 REPLACE_FTRUNCATE = @REPLACE_FTRUNCATE@
+REPLACE_FUTIMENS = @REPLACE_FUTIMENS@
 REPLACE_GETCWD = @REPLACE_GETCWD@
 REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@
 REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
@@ -814,6 +857,7 @@ REPLACE_LCHOWN = @REPLACE_LCHOWN@
 REPLACE_LDEXPL = @REPLACE_LDEXPL@
 REPLACE_LINK = @REPLACE_LINK@
 REPLACE_LINKAT = @REPLACE_LINKAT@
+REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@
 REPLACE_LOG = @REPLACE_LOG@
 REPLACE_LOG10 = @REPLACE_LOG10@
 REPLACE_LOG10F = @REPLACE_LOG10F@
@@ -830,6 +874,7 @@ REPLACE_LOGBL = @REPLACE_LOGBL@
 REPLACE_LOGF = @REPLACE_LOGF@
 REPLACE_LOGL = @REPLACE_LOGL@
 REPLACE_LSEEK = @REPLACE_LSEEK@
+REPLACE_LSTAT = @REPLACE_LSTAT@
 REPLACE_MBRLEN = @REPLACE_MBRLEN@
 REPLACE_MBRTOWC = @REPLACE_MBRTOWC@
 REPLACE_MBSINIT = @REPLACE_MBSINIT@
@@ -838,10 +883,15 @@ REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@
 REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@
 REPLACE_MEMCHR = @REPLACE_MEMCHR@
 REPLACE_MEMMEM = @REPLACE_MEMMEM@
+REPLACE_MKDIR = @REPLACE_MKDIR@
+REPLACE_MKFIFO = @REPLACE_MKFIFO@
+REPLACE_MKNOD = @REPLACE_MKNOD@
+REPLACE_MKTIME = @REPLACE_MKTIME@
 REPLACE_MODF = @REPLACE_MODF@
 REPLACE_MODFF = @REPLACE_MODFF@
 REPLACE_MODFL = @REPLACE_MODFL@
 REPLACE_NAN = @REPLACE_NAN@
+REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@
 REPLACE_NULL = @REPLACE_NULL@
 REPLACE_OPENDIR = @REPLACE_OPENDIR@
 REPLACE_PREAD = @REPLACE_PREAD@
@@ -859,6 +909,7 @@ REPLACE_SIGNBIT = @REPLACE_SIGNBIT@
 REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@
 REPLACE_SLEEP = @REPLACE_SLEEP@
 REPLACE_SQRTL = @REPLACE_SQRTL@
+REPLACE_STAT = @REPLACE_STAT@
 REPLACE_STPNCPY = @REPLACE_STPNCPY@
 REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
 REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@
@@ -873,6 +924,7 @@ REPLACE_STRSTR = @REPLACE_STRSTR@
 REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@
 REPLACE_STRTOK_R = @REPLACE_STRTOK_R@
 REPLACE_SYMLINK = @REPLACE_SYMLINK@
+REPLACE_TIMEGM = @REPLACE_TIMEGM@
 REPLACE_TOWLOWER = @REPLACE_TOWLOWER@
 REPLACE_TRUNC = @REPLACE_TRUNC@
 REPLACE_TRUNCF = @REPLACE_TRUNCF@
@@ -881,6 +933,7 @@ REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@
 REPLACE_UNLINK = @REPLACE_UNLINK@
 REPLACE_UNLINKAT = @REPLACE_UNLINKAT@
 REPLACE_USLEEP = @REPLACE_USLEEP@
+REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@
 REPLACE_WCRTOMB = @REPLACE_WCRTOMB@
 REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@
 REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@
@@ -896,6 +949,8 @@ STDBOOL_H = @STDBOOL_H@
 STDDEF_H = @STDDEF_H@
 STDINT_H = @STDINT_H@
 STRIP = @STRIP@
+SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
+TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@
 UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@
 UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@
 UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@
@@ -904,6 +959,7 @@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOC
 VERSION = @VERSION@
 WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
 WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@
+WINDOWS_64_BIT_ST_SIZE = @WINDOWS_64_BIT_ST_SIZE@
 WINT_T_SUFFIX = @WINT_T_SUFFIX@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
@@ -983,7 +1039,7 @@ EXTRA_DIST = m4/gnulib-cache.m4 alloca.c alloca.in.h dirent.in.h \
 	$(top_srcdir)/import/extra/snippet/warn-on-use.h stdbool.in.h \
 	stddef.in.h stdint.in.h streq.h strerror.c strerror-override.c \
 	strerror-override.h string.in.h str-two-way.h strstr.c \
-	sys_types.in.h unistd.in.h \
+	sys_stat.in.h sys_types.in.h time.in.h unistd.in.h \
 	$(top_srcdir)/import/extra/update-copyright verify.h \
 	wchar.in.h wctype.in.h
 
@@ -999,17 +1055,18 @@ EXTRA_DIST = m4/gnulib-cache.m4 alloca.c alloca.in.h dirent.in.h \
 BUILT_SOURCES = $(ALLOCA_H) configmake.h dirent.h $(ERRNO_H) \
 	$(FLOAT_H) $(FNMATCH_H) inttypes.h math.h arg-nonnull.h \
 	c++defs.h warn-on-use.h $(STDBOOL_H) $(STDDEF_H) $(STDINT_H) \
-	string.h sys/types.h unistd.h wchar.h wctype.h
+	string.h sys/stat.h sys/types.h time.h unistd.h wchar.h \
+	wctype.h
 SUFFIXES = .sed .sin
 MOSTLYCLEANFILES = core *.stackdump alloca.h alloca.h-t dirent.h \
 	dirent.h-t errno.h errno.h-t float.h float.h-t fnmatch.h \
 	fnmatch.h-t inttypes.h inttypes.h-t math.h math.h-t \
 	arg-nonnull.h arg-nonnull.h-t c++defs.h c++defs.h-t \
 	warn-on-use.h warn-on-use.h-t stdbool.h stdbool.h-t stddef.h \
-	stddef.h-t stdint.h stdint.h-t string.h string.h-t sys/types.h \
-	sys/types.h-t unistd.h unistd.h-t wchar.h wchar.h-t wctype.h \
-	wctype.h-t
-MOSTLYCLEANDIRS = 
+	stddef.h-t stdint.h stdint.h-t string.h string.h-t sys/stat.h \
+	sys/stat.h-t sys/types.h sys/types.h-t time.h time.h-t \
+	unistd.h unistd.h-t wchar.h wchar.h-t wctype.h wctype.h-t
+MOSTLYCLEANDIRS = sys
 CLEANFILES = configmake.h configmake.h-t charset.alias ref-add.sed \
 	ref-del.sed
 DISTCLEANFILES = 
@@ -2139,6 +2196,58 @@ string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
 	} > $@-t && \
 	mv $@-t $@
 
+# We need the following in order to create <sys/stat.h> when the system
+# has one that is incomplete.
+sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+	$(AM_V_at)$(MKDIR_P) sys
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+	  sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+	      -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+	      -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+	      -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+	      -e 's|@''NEXT_SYS_STAT_H''@|$(NEXT_SYS_STAT_H)|g' \
+	      -e 's|@''WINDOWS_64_BIT_ST_SIZE''@|$(WINDOWS_64_BIT_ST_SIZE)|g' \
+	      -e 's/@''GNULIB_FCHMODAT''@/$(GNULIB_FCHMODAT)/g' \
+	      -e 's/@''GNULIB_FSTAT''@/$(GNULIB_FSTAT)/g' \
+	      -e 's/@''GNULIB_FSTATAT''@/$(GNULIB_FSTATAT)/g' \
+	      -e 's/@''GNULIB_FUTIMENS''@/$(GNULIB_FUTIMENS)/g' \
+	      -e 's/@''GNULIB_LCHMOD''@/$(GNULIB_LCHMOD)/g' \
+	      -e 's/@''GNULIB_LSTAT''@/$(GNULIB_LSTAT)/g' \
+	      -e 's/@''GNULIB_MKDIRAT''@/$(GNULIB_MKDIRAT)/g' \
+	      -e 's/@''GNULIB_MKFIFO''@/$(GNULIB_MKFIFO)/g' \
+	      -e 's/@''GNULIB_MKFIFOAT''@/$(GNULIB_MKFIFOAT)/g' \
+	      -e 's/@''GNULIB_MKNOD''@/$(GNULIB_MKNOD)/g' \
+	      -e 's/@''GNULIB_MKNODAT''@/$(GNULIB_MKNODAT)/g' \
+	      -e 's/@''GNULIB_STAT''@/$(GNULIB_STAT)/g' \
+	      -e 's/@''GNULIB_UTIMENSAT''@/$(GNULIB_UTIMENSAT)/g' \
+	      -e 's|@''HAVE_FCHMODAT''@|$(HAVE_FCHMODAT)|g' \
+	      -e 's|@''HAVE_FSTATAT''@|$(HAVE_FSTATAT)|g' \
+	      -e 's|@''HAVE_FUTIMENS''@|$(HAVE_FUTIMENS)|g' \
+	      -e 's|@''HAVE_LCHMOD''@|$(HAVE_LCHMOD)|g' \
+	      -e 's|@''HAVE_LSTAT''@|$(HAVE_LSTAT)|g' \
+	      -e 's|@''HAVE_MKDIRAT''@|$(HAVE_MKDIRAT)|g' \
+	      -e 's|@''HAVE_MKFIFO''@|$(HAVE_MKFIFO)|g' \
+	      -e 's|@''HAVE_MKFIFOAT''@|$(HAVE_MKFIFOAT)|g' \
+	      -e 's|@''HAVE_MKNOD''@|$(HAVE_MKNOD)|g' \
+	      -e 's|@''HAVE_MKNODAT''@|$(HAVE_MKNODAT)|g' \
+	      -e 's|@''HAVE_UTIMENSAT''@|$(HAVE_UTIMENSAT)|g' \
+	      -e 's|@''REPLACE_FSTAT''@|$(REPLACE_FSTAT)|g' \
+	      -e 's|@''REPLACE_FSTATAT''@|$(REPLACE_FSTATAT)|g' \
+	      -e 's|@''REPLACE_FUTIMENS''@|$(REPLACE_FUTIMENS)|g' \
+	      -e 's|@''REPLACE_LSTAT''@|$(REPLACE_LSTAT)|g' \
+	      -e 's|@''REPLACE_MKDIR''@|$(REPLACE_MKDIR)|g' \
+	      -e 's|@''REPLACE_MKFIFO''@|$(REPLACE_MKFIFO)|g' \
+	      -e 's|@''REPLACE_MKNOD''@|$(REPLACE_MKNOD)|g' \
+	      -e 's|@''REPLACE_STAT''@|$(REPLACE_STAT)|g' \
+	      -e 's|@''REPLACE_UTIMENSAT''@|$(REPLACE_UTIMENSAT)|g' \
+	      -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+	      -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+	      -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+	      < $(srcdir)/sys_stat.in.h; \
+	} > $@-t && \
+	mv $@-t $@
+
 # We need the following in order to create <sys/types.h> when the system
 # doesn't have one that works with the given compiler.
 sys/types.h: sys_types.in.h $(top_builddir)/config.status
@@ -2155,6 +2264,39 @@ sys/types.h: sys_types.in.h $(top_builddir)/config.status
 	} > $@-t && \
 	mv $@-t $@
 
+# We need the following in order to create <time.h> when the system
+# doesn't have one that works with the given compiler.
+time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+	  sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+	      -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+	      -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+	      -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+	      -e 's|@''NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \
+	      -e 's/@''GNULIB_MKTIME''@/$(GNULIB_MKTIME)/g' \
+	      -e 's/@''GNULIB_NANOSLEEP''@/$(GNULIB_NANOSLEEP)/g' \
+	      -e 's/@''GNULIB_STRPTIME''@/$(GNULIB_STRPTIME)/g' \
+	      -e 's/@''GNULIB_TIMEGM''@/$(GNULIB_TIMEGM)/g' \
+	      -e 's/@''GNULIB_TIME_R''@/$(GNULIB_TIME_R)/g' \
+	      -e 's|@''HAVE_DECL_LOCALTIME_R''@|$(HAVE_DECL_LOCALTIME_R)|g' \
+	      -e 's|@''HAVE_NANOSLEEP''@|$(HAVE_NANOSLEEP)|g' \
+	      -e 's|@''HAVE_STRPTIME''@|$(HAVE_STRPTIME)|g' \
+	      -e 's|@''HAVE_TIMEGM''@|$(HAVE_TIMEGM)|g' \
+	      -e 's|@''REPLACE_LOCALTIME_R''@|$(REPLACE_LOCALTIME_R)|g' \
+	      -e 's|@''REPLACE_MKTIME''@|$(REPLACE_MKTIME)|g' \
+	      -e 's|@''REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \
+	      -e 's|@''REPLACE_TIMEGM''@|$(REPLACE_TIMEGM)|g' \
+	      -e 's|@''PTHREAD_H_DEFINES_STRUCT_TIMESPEC''@|$(PTHREAD_H_DEFINES_STRUCT_TIMESPEC)|g' \
+	      -e 's|@''SYS_TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(SYS_TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \
+	      -e 's|@''TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \
+	      -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+	      -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+	      -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+	      < $(srcdir)/time.in.h; \
+	} > $@-t && \
+	mv $@-t $@
+
 # We need the following in order to create an empty placeholder for
 # <unistd.h> when the system doesn't have one.
 unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
diff --git a/gdb/gnulib/import/m4/gnulib-cache.m4 b/gdb/gnulib/import/m4/gnulib-cache.m4
index 76f3d3c..7c8f2cd 100644
--- a/gdb/gnulib/import/m4/gnulib-cache.m4
+++ b/gdb/gnulib/import/m4/gnulib-cache.m4
@@ -27,7 +27,7 @@
 
 
 # Specification in the form of a command-line invocation:
-#   gnulib-tool --import --dir=. --lib=libgnu --source-base=import --m4-base=import/m4 --doc-base=doc --tests-base=tests --aux-dir=import/extra --no-conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files dirent fnmatch-gnu frexpl inttypes memmem pathmax strerror strstr unistd update-copyright
+#   gnulib-tool --import --dir=. --lib=libgnu --source-base=import --m4-base=import/m4 --doc-base=doc --tests-base=tests --aux-dir=import/extra --no-conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files dirent fnmatch-gnu frexpl inttypes memmem pathmax strerror strstr sys_stat unistd update-copyright
 
 # Specification in the form of a few gnulib-tool.m4 macro invocations:
 gl_LOCAL_DIR([])
@@ -40,6 +40,7 @@ gl_MODULES([
   pathmax
   strerror
   strstr
+  sys_stat
   unistd
   update-copyright
 ])
diff --git a/gdb/gnulib/import/m4/gnulib-comp.m4 b/gdb/gnulib/import/m4/gnulib-comp.m4
index 31199c7..828b625 100644
--- a/gdb/gnulib/import/m4/gnulib-comp.m4
+++ b/gdb/gnulib/import/m4/gnulib-comp.m4
@@ -84,7 +84,9 @@ AC_DEFUN([gl_EARLY],
   # Code from module strnlen1:
   # Code from module strstr:
   # Code from module strstr-simple:
+  # Code from module sys_stat:
   # Code from module sys_types:
+  # Code from module time:
   # Code from module unistd:
   # Code from module update-copyright:
   # Code from module verify:
@@ -218,8 +220,11 @@ AC_DEFUN([gl_INIT],
     AC_LIBOBJ([strstr])
   fi
   gl_STRING_MODULE_INDICATOR([strstr])
+  gl_HEADER_SYS_STAT_H
+  AC_PROG_MKDIR_P
   gl_SYS_TYPES_H
   AC_PROG_MKDIR_P
+  gl_HEADER_TIME_H
   gl_UNISTD_H
   gl_WCHAR_H
   gl_WCTYPE_H
@@ -416,7 +421,9 @@ AC_DEFUN([gl_FILE_LIST], [
   lib/strnlen1.c
   lib/strnlen1.h
   lib/strstr.c
+  lib/sys_stat.in.h
   lib/sys_types.in.h
+  lib/time.in.h
   lib/unistd.c
   lib/unistd.in.h
   lib/verify.h
@@ -470,7 +477,9 @@ AC_DEFUN([gl_FILE_LIST], [
   m4/string_h.m4
   m4/strstr.m4
   m4/sys_socket_h.m4
+  m4/sys_stat_h.m4
   m4/sys_types_h.m4
+  m4/time_h.m4
   m4/unistd_h.m4
   m4/warn-on-use.m4
   m4/wchar_h.m4
diff --git a/gdb/gnulib/import/m4/sys_stat_h.m4 b/gdb/gnulib/import/m4/sys_stat_h.m4
new file mode 100644
index 0000000..8af3353
--- /dev/null
+++ b/gdb/gnulib/import/m4/sys_stat_h.m4
@@ -0,0 +1,96 @@
+# sys_stat_h.m4 serial 28   -*- Autoconf -*-
+dnl Copyright (C) 2006-2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Eric Blake.
+dnl Provide a GNU-like <sys/stat.h>.
+
+AC_DEFUN([gl_HEADER_SYS_STAT_H],
+[
+  AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
+
+  dnl Check for broken stat macros.
+  AC_REQUIRE([AC_HEADER_STAT])
+
+  gl_CHECK_NEXT_HEADERS([sys/stat.h])
+
+  dnl Ensure the type mode_t gets defined.
+  AC_REQUIRE([AC_TYPE_MODE_T])
+
+  dnl Whether to override 'struct stat'.
+  m4_ifdef([gl_LARGEFILE], [
+    AC_REQUIRE([gl_LARGEFILE])
+  ], [
+    WINDOWS_64_BIT_ST_SIZE=0
+  ])
+  AC_SUBST([WINDOWS_64_BIT_ST_SIZE])
+  if test $WINDOWS_64_BIT_ST_SIZE = 1; then
+    AC_DEFINE([_GL_WINDOWS_64_BIT_ST_SIZE], [1],
+      [Define to 1 if Gnulib overrides 'struct stat' on Windows so that
+       struct stat.st_size becomes 64-bit.])
+  fi
+
+  dnl Define types that are supposed to be defined in <sys/types.h> or
+  dnl <sys/stat.h>.
+  AC_CHECK_TYPE([nlink_t], [],
+    [AC_DEFINE([nlink_t], [int],
+       [Define to the type of st_nlink in struct stat, or a supertype.])],
+    [#include <sys/types.h>
+     #include <sys/stat.h>])
+
+  dnl Check for declarations of anything we want to poison if the
+  dnl corresponding gnulib module is not in use.
+  gl_WARN_ON_USE_PREPARE([[#include <sys/stat.h>
+    ]], [fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat
+    mknod mknodat stat utimensat])
+]) # gl_HEADER_SYS_STAT_H
+
+AC_DEFUN([gl_SYS_STAT_MODULE_INDICATOR],
+[
+  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+  AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
+  gl_MODULE_INDICATOR_SET_VARIABLE([$1])
+  dnl Define it also as a C macro, for the benefit of the unit tests.
+  gl_MODULE_INDICATOR_FOR_TESTS([$1])
+])
+
+AC_DEFUN([gl_SYS_STAT_H_DEFAULTS],
+[
+  AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) dnl for REPLACE_FCHDIR
+  GNULIB_FCHMODAT=0;    AC_SUBST([GNULIB_FCHMODAT])
+  GNULIB_FSTAT=0;       AC_SUBST([GNULIB_FSTAT])
+  GNULIB_FSTATAT=0;     AC_SUBST([GNULIB_FSTATAT])
+  GNULIB_FUTIMENS=0;    AC_SUBST([GNULIB_FUTIMENS])
+  GNULIB_LCHMOD=0;      AC_SUBST([GNULIB_LCHMOD])
+  GNULIB_LSTAT=0;       AC_SUBST([GNULIB_LSTAT])
+  GNULIB_MKDIRAT=0;     AC_SUBST([GNULIB_MKDIRAT])
+  GNULIB_MKFIFO=0;      AC_SUBST([GNULIB_MKFIFO])
+  GNULIB_MKFIFOAT=0;    AC_SUBST([GNULIB_MKFIFOAT])
+  GNULIB_MKNOD=0;       AC_SUBST([GNULIB_MKNOD])
+  GNULIB_MKNODAT=0;     AC_SUBST([GNULIB_MKNODAT])
+  GNULIB_STAT=0;        AC_SUBST([GNULIB_STAT])
+  GNULIB_UTIMENSAT=0;   AC_SUBST([GNULIB_UTIMENSAT])
+  dnl Assume proper GNU behavior unless another module says otherwise.
+  HAVE_FCHMODAT=1;      AC_SUBST([HAVE_FCHMODAT])
+  HAVE_FSTATAT=1;       AC_SUBST([HAVE_FSTATAT])
+  HAVE_FUTIMENS=1;      AC_SUBST([HAVE_FUTIMENS])
+  HAVE_LCHMOD=1;        AC_SUBST([HAVE_LCHMOD])
+  HAVE_LSTAT=1;         AC_SUBST([HAVE_LSTAT])
+  HAVE_MKDIRAT=1;       AC_SUBST([HAVE_MKDIRAT])
+  HAVE_MKFIFO=1;        AC_SUBST([HAVE_MKFIFO])
+  HAVE_MKFIFOAT=1;      AC_SUBST([HAVE_MKFIFOAT])
+  HAVE_MKNOD=1;         AC_SUBST([HAVE_MKNOD])
+  HAVE_MKNODAT=1;       AC_SUBST([HAVE_MKNODAT])
+  HAVE_UTIMENSAT=1;     AC_SUBST([HAVE_UTIMENSAT])
+  REPLACE_FSTAT=0;      AC_SUBST([REPLACE_FSTAT])
+  REPLACE_FSTATAT=0;    AC_SUBST([REPLACE_FSTATAT])
+  REPLACE_FUTIMENS=0;   AC_SUBST([REPLACE_FUTIMENS])
+  REPLACE_LSTAT=0;      AC_SUBST([REPLACE_LSTAT])
+  REPLACE_MKDIR=0;      AC_SUBST([REPLACE_MKDIR])
+  REPLACE_MKFIFO=0;     AC_SUBST([REPLACE_MKFIFO])
+  REPLACE_MKNOD=0;      AC_SUBST([REPLACE_MKNOD])
+  REPLACE_STAT=0;       AC_SUBST([REPLACE_STAT])
+  REPLACE_UTIMENSAT=0;  AC_SUBST([REPLACE_UTIMENSAT])
+])
diff --git a/gdb/gnulib/import/m4/time_h.m4 b/gdb/gnulib/import/m4/time_h.m4
new file mode 100644
index 0000000..6415bfb
--- /dev/null
+++ b/gdb/gnulib/import/m4/time_h.m4
@@ -0,0 +1,109 @@
+# Configure a more-standard replacement for <time.h>.
+
+# Copyright (C) 2000-2001, 2003-2007, 2009-2012 Free Software Foundation, Inc.
+
+# serial 7
+
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# Written by Paul Eggert and Jim Meyering.
+
+AC_DEFUN([gl_HEADER_TIME_H],
+[
+  dnl Use AC_REQUIRE here, so that the default behavior below is expanded
+  dnl once only, before all statements that occur in other macros.
+  AC_REQUIRE([gl_HEADER_TIME_H_BODY])
+])
+
+AC_DEFUN([gl_HEADER_TIME_H_BODY],
+[
+  AC_REQUIRE([AC_C_RESTRICT])
+  AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS])
+  gl_NEXT_HEADERS([time.h])
+  AC_REQUIRE([gl_CHECK_TYPE_STRUCT_TIMESPEC])
+])
+
+dnl Check whether 'struct timespec' is declared
+dnl in time.h, sys/time.h, or pthread.h.
+
+AC_DEFUN([gl_CHECK_TYPE_STRUCT_TIMESPEC],
+[
+  AC_CHECK_HEADERS_ONCE([sys/time.h])
+  AC_CACHE_CHECK([for struct timespec in <time.h>],
+    [gl_cv_sys_struct_timespec_in_time_h],
+    [AC_COMPILE_IFELSE(
+       [AC_LANG_PROGRAM(
+          [[#include <time.h>
+          ]],
+          [[static struct timespec x; x.tv_sec = x.tv_nsec;]])],
+       [gl_cv_sys_struct_timespec_in_time_h=yes],
+       [gl_cv_sys_struct_timespec_in_time_h=no])])
+
+  TIME_H_DEFINES_STRUCT_TIMESPEC=0
+  SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
+  PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
+  if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
+    TIME_H_DEFINES_STRUCT_TIMESPEC=1
+  else
+    AC_CACHE_CHECK([for struct timespec in <sys/time.h>],
+      [gl_cv_sys_struct_timespec_in_sys_time_h],
+      [AC_COMPILE_IFELSE(
+         [AC_LANG_PROGRAM(
+            [[#include <sys/time.h>
+            ]],
+            [[static struct timespec x; x.tv_sec = x.tv_nsec;]])],
+         [gl_cv_sys_struct_timespec_in_sys_time_h=yes],
+         [gl_cv_sys_struct_timespec_in_sys_time_h=no])])
+    if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
+      SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
+    else
+      AC_CACHE_CHECK([for struct timespec in <pthread.h>],
+        [gl_cv_sys_struct_timespec_in_pthread_h],
+        [AC_COMPILE_IFELSE(
+           [AC_LANG_PROGRAM(
+              [[#include <pthread.h>
+              ]],
+              [[static struct timespec x; x.tv_sec = x.tv_nsec;]])],
+           [gl_cv_sys_struct_timespec_in_pthread_h=yes],
+           [gl_cv_sys_struct_timespec_in_pthread_h=no])])
+      if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
+        PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
+      fi
+    fi
+  fi
+  AC_SUBST([TIME_H_DEFINES_STRUCT_TIMESPEC])
+  AC_SUBST([SYS_TIME_H_DEFINES_STRUCT_TIMESPEC])
+  AC_SUBST([PTHREAD_H_DEFINES_STRUCT_TIMESPEC])
+])
+
+AC_DEFUN([gl_TIME_MODULE_INDICATOR],
+[
+  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+  AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS])
+  gl_MODULE_INDICATOR_SET_VARIABLE([$1])
+  dnl Define it also as a C macro, for the benefit of the unit tests.
+  gl_MODULE_INDICATOR_FOR_TESTS([$1])
+])
+
+AC_DEFUN([gl_HEADER_TIME_H_DEFAULTS],
+[
+  GNULIB_MKTIME=0;                       AC_SUBST([GNULIB_MKTIME])
+  GNULIB_NANOSLEEP=0;                    AC_SUBST([GNULIB_NANOSLEEP])
+  GNULIB_STRPTIME=0;                     AC_SUBST([GNULIB_STRPTIME])
+  GNULIB_TIMEGM=0;                       AC_SUBST([GNULIB_TIMEGM])
+  GNULIB_TIME_R=0;                       AC_SUBST([GNULIB_TIME_R])
+  dnl Assume proper GNU behavior unless another module says otherwise.
+  HAVE_DECL_LOCALTIME_R=1;               AC_SUBST([HAVE_DECL_LOCALTIME_R])
+  HAVE_NANOSLEEP=1;                      AC_SUBST([HAVE_NANOSLEEP])
+  HAVE_STRPTIME=1;                       AC_SUBST([HAVE_STRPTIME])
+  HAVE_TIMEGM=1;                         AC_SUBST([HAVE_TIMEGM])
+  dnl If another module says to replace or to not replace, do that.
+  dnl Otherwise, replace only if someone compiles with -DGNULIB_PORTCHECK;
+  dnl this lets maintainers check for portability.
+  REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;  AC_SUBST([REPLACE_LOCALTIME_R])
+  REPLACE_MKTIME=GNULIB_PORTCHECK;       AC_SUBST([REPLACE_MKTIME])
+  REPLACE_NANOSLEEP=GNULIB_PORTCHECK;    AC_SUBST([REPLACE_NANOSLEEP])
+  REPLACE_TIMEGM=GNULIB_PORTCHECK;       AC_SUBST([REPLACE_TIMEGM])
+])
diff --git a/gdb/gnulib/import/sys_stat.in.h b/gdb/gnulib/import/sys_stat.in.h
new file mode 100644
index 0000000..ac05ddb
--- /dev/null
+++ b/gdb/gnulib/import/sys_stat.in.h
@@ -0,0 +1,728 @@
+/* Provide a more complete sys/stat header file.
+   Copyright (C) 2005-2012 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
+
+/* Written by Eric Blake, Paul Eggert, and Jim Meyering.  */
+
+/* This file is supposed to be used on platforms where <sys/stat.h> is
+   incomplete.  It is intended to provide definitions and prototypes
+   needed by an application.  Start with what the system provides.  */
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+@PRAGMA_COLUMNS@
+
+#if defined __need_system_sys_stat_h
+/* Special invocation convention.  */
+
+#@INCLUDE_NEXT@ @NEXT_SYS_STAT_H@
+
+#else
+/* Normal invocation convention.  */
+
+#ifndef _@GUARD_PREFIX@_SYS_STAT_H
+
+/* Get nlink_t.
+   May also define off_t to a 64-bit type on native Windows.  */
+#include <sys/types.h>
+
+/* Get struct timespec.  */
+#include <time.h>
+
+/* The include_next requires a split double-inclusion guard.  */
+#@INCLUDE_NEXT@ @NEXT_SYS_STAT_H@
+
+#ifndef _@GUARD_PREFIX@_SYS_STAT_H
+#define _@GUARD_PREFIX@_SYS_STAT_H
+
+/* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
+
+/* The definition of _GL_ARG_NONNULL is copied here.  */
+
+/* The definition of _GL_WARN_ON_USE is copied here.  */
+
+/* Before doing "#define mkdir rpl_mkdir" below, we need to include all
+   headers that may declare mkdir().  Native Windows platforms declare mkdir
+   in <io.h> and/or <direct.h>, not in <unistd.h>.  */
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# include <io.h>     /* mingw32, mingw64 */
+# include <direct.h> /* mingw64, MSVC 9 */
+#endif
+
+/* Native Windows platforms declare umask() in <io.h>.  */
+#if 0 && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
+# include <io.h>
+#endif
+
+/* Large File Support on native Windows.  */
+#if @WINDOWS_64_BIT_ST_SIZE@
+# define stat _stati64
+#endif
+
+#ifndef S_IFIFO
+# ifdef _S_IFIFO
+#  define S_IFIFO _S_IFIFO
+# endif
+#endif
+
+#ifndef S_IFMT
+# define S_IFMT 0170000
+#endif
+
+#if STAT_MACROS_BROKEN
+# undef S_ISBLK
+# undef S_ISCHR
+# undef S_ISDIR
+# undef S_ISFIFO
+# undef S_ISLNK
+# undef S_ISNAM
+# undef S_ISMPB
+# undef S_ISMPC
+# undef S_ISNWK
+# undef S_ISREG
+# undef S_ISSOCK
+#endif
+
+#ifndef S_ISBLK
+# ifdef S_IFBLK
+#  define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
+# else
+#  define S_ISBLK(m) 0
+# endif
+#endif
+
+#ifndef S_ISCHR
+# ifdef S_IFCHR
+#  define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
+# else
+#  define S_ISCHR(m) 0
+# endif
+#endif
+
+#ifndef S_ISDIR
+# ifdef S_IFDIR
+#  define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
+# else
+#  define S_ISDIR(m) 0
+# endif
+#endif
+
+#ifndef S_ISDOOR /* Solaris 2.5 and up */
+# define S_ISDOOR(m) 0
+#endif
+
+#ifndef S_ISFIFO
+# ifdef S_IFIFO
+#  define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
+# else
+#  define S_ISFIFO(m) 0
+# endif
+#endif
+
+#ifndef S_ISLNK
+# ifdef S_IFLNK
+#  define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
+# else
+#  define S_ISLNK(m) 0
+# endif
+#endif
+
+#ifndef S_ISMPB /* V7 */
+# ifdef S_IFMPB
+#  define S_ISMPB(m) (((m) & S_IFMT) == S_IFMPB)
+#  define S_ISMPC(m) (((m) & S_IFMT) == S_IFMPC)
+# else
+#  define S_ISMPB(m) 0
+#  define S_ISMPC(m) 0
+# endif
+#endif
+
+#ifndef S_ISNAM /* Xenix */
+# ifdef S_IFNAM
+#  define S_ISNAM(m) (((m) & S_IFMT) == S_IFNAM)
+# else
+#  define S_ISNAM(m) 0
+# endif
+#endif
+
+#ifndef S_ISNWK /* HP/UX */
+# ifdef S_IFNWK
+#  define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK)
+# else
+#  define S_ISNWK(m) 0
+# endif
+#endif
+
+#ifndef S_ISPORT /* Solaris 10 and up */
+# define S_ISPORT(m) 0
+#endif
+
+#ifndef S_ISREG
+# ifdef S_IFREG
+#  define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
+# else
+#  define S_ISREG(m) 0
+# endif
+#endif
+
+#ifndef S_ISSOCK
+# ifdef S_IFSOCK
+#  define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
+# else
+#  define S_ISSOCK(m) 0
+# endif
+#endif
+
+
+#ifndef S_TYPEISMQ
+# define S_TYPEISMQ(p) 0
+#endif
+
+#ifndef S_TYPEISTMO
+# define S_TYPEISTMO(p) 0
+#endif
+
+
+#ifndef S_TYPEISSEM
+# ifdef S_INSEM
+#  define S_TYPEISSEM(p) (S_ISNAM ((p)->st_mode) && (p)->st_rdev == S_INSEM)
+# else
+#  define S_TYPEISSEM(p) 0
+# endif
+#endif
+
+#ifndef S_TYPEISSHM
+# ifdef S_INSHD
+#  define S_TYPEISSHM(p) (S_ISNAM ((p)->st_mode) && (p)->st_rdev == S_INSHD)
+# else
+#  define S_TYPEISSHM(p) 0
+# endif
+#endif
+
+/* high performance ("contiguous data") */
+#ifndef S_ISCTG
+# define S_ISCTG(p) 0
+#endif
+
+/* Cray DMF (data migration facility): off line, with data  */
+#ifndef S_ISOFD
+# define S_ISOFD(p) 0
+#endif
+
+/* Cray DMF (data migration facility): off line, with no data  */
+#ifndef S_ISOFL
+# define S_ISOFL(p) 0
+#endif
+
+/* 4.4BSD whiteout */
+#ifndef S_ISWHT
+# define S_ISWHT(m) 0
+#endif
+
+/* If any of the following are undefined,
+   define them to their de facto standard values.  */
+#if !S_ISUID
+# define S_ISUID 04000
+#endif
+#if !S_ISGID
+# define S_ISGID 02000
+#endif
+
+/* S_ISVTX is a common extension to POSIX.  */
+#ifndef S_ISVTX
+# define S_ISVTX 01000
+#endif
+
+#if !S_IRUSR && S_IREAD
+# define S_IRUSR S_IREAD
+#endif
+#if !S_IRUSR
+# define S_IRUSR 00400
+#endif
+#if !S_IRGRP
+# define S_IRGRP (S_IRUSR >> 3)
+#endif
+#if !S_IROTH
+# define S_IROTH (S_IRUSR >> 6)
+#endif
+
+#if !S_IWUSR && S_IWRITE
+# define S_IWUSR S_IWRITE
+#endif
+#if !S_IWUSR
+# define S_IWUSR 00200
+#endif
+#if !S_IWGRP
+# define S_IWGRP (S_IWUSR >> 3)
+#endif
+#if !S_IWOTH
+# define S_IWOTH (S_IWUSR >> 6)
+#endif
+
+#if !S_IXUSR && S_IEXEC
+# define S_IXUSR S_IEXEC
+#endif
+#if !S_IXUSR
+# define S_IXUSR 00100
+#endif
+#if !S_IXGRP
+# define S_IXGRP (S_IXUSR >> 3)
+#endif
+#if !S_IXOTH
+# define S_IXOTH (S_IXUSR >> 6)
+#endif
+
+#if !S_IRWXU
+# define S_IRWXU (S_IRUSR | S_IWUSR | S_IXUSR)
+#endif
+#if !S_IRWXG
+# define S_IRWXG (S_IRGRP | S_IWGRP | S_IXGRP)
+#endif
+#if !S_IRWXO
+# define S_IRWXO (S_IROTH | S_IWOTH | S_IXOTH)
+#endif
+
+/* S_IXUGO is a common extension to POSIX.  */
+#if !S_IXUGO
+# define S_IXUGO (S_IXUSR | S_IXGRP | S_IXOTH)
+#endif
+
+#ifndef S_IRWXUGO
+# define S_IRWXUGO (S_IRWXU | S_IRWXG | S_IRWXO)
+#endif
+
+/* Macros for futimens and utimensat.  */
+#ifndef UTIME_NOW
+# define UTIME_NOW (-1)
+# define UTIME_OMIT (-2)
+#endif
+
+
+#if @GNULIB_FCHMODAT@
+# if !@HAVE_FCHMODAT@
+_GL_FUNCDECL_SYS (fchmodat, int,
+                  (int fd, char const *file, mode_t mode, int flag)
+                  _GL_ARG_NONNULL ((2)));
+# endif
+_GL_CXXALIAS_SYS (fchmodat, int,
+                  (int fd, char const *file, mode_t mode, int flag));
+_GL_CXXALIASWARN (fchmodat);
+#elif defined GNULIB_POSIXCHECK
+# undef fchmodat
+# if HAVE_RAW_DECL_FCHMODAT
+_GL_WARN_ON_USE (fchmodat, "fchmodat is not portable - "
+                 "use gnulib module openat for portability");
+# endif
+#endif
+
+
+#if @GNULIB_FSTAT@
+# if @REPLACE_FSTAT@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef fstat
+#   define fstat rpl_fstat
+#  endif
+_GL_FUNCDECL_RPL (fstat, int, (int fd, struct stat *buf) _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (fstat, int, (int fd, struct stat *buf));
+# else
+_GL_CXXALIAS_SYS (fstat, int, (int fd, struct stat *buf));
+# endif
+_GL_CXXALIASWARN (fstat);
+#elif @WINDOWS_64_BIT_ST_SIZE@
+/* Above, we define stat to _stati64.  */
+# define fstat _fstati64
+#elif defined GNULIB_POSIXCHECK
+# undef fstat
+# if HAVE_RAW_DECL_FSTAT
+_GL_WARN_ON_USE (fstat, "fstat has portability problems - "
+                 "use gnulib module fstat for portability");
+# endif
+#endif
+
+
+#if @GNULIB_FSTATAT@
+# if @REPLACE_FSTATAT@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef fstatat
+#   define fstatat rpl_fstatat
+#  endif
+_GL_FUNCDECL_RPL (fstatat, int,
+                  (int fd, char const *name, struct stat *st, int flags)
+                  _GL_ARG_NONNULL ((2, 3)));
+_GL_CXXALIAS_RPL (fstatat, int,
+                  (int fd, char const *name, struct stat *st, int flags));
+# else
+#  if !@HAVE_FSTATAT@
+_GL_FUNCDECL_SYS (fstatat, int,
+                  (int fd, char const *name, struct stat *st, int flags)
+                  _GL_ARG_NONNULL ((2, 3)));
+#  endif
+_GL_CXXALIAS_SYS (fstatat, int,
+                  (int fd, char const *name, struct stat *st, int flags));
+# endif
+_GL_CXXALIASWARN (fstatat);
+#elif defined GNULIB_POSIXCHECK
+# undef fstatat
+# if HAVE_RAW_DECL_FSTATAT
+_GL_WARN_ON_USE (fstatat, "fstatat is not portable - "
+                 "use gnulib module openat for portability");
+# endif
+#endif
+
+
+#if @GNULIB_FUTIMENS@
+/* Use the rpl_ prefix also on Solaris <= 9, because on Solaris 9 our futimens
+   implementation relies on futimesat, which on Solaris 10 makes an invocation
+   to futimens that is meant to invoke the libc's futimens(), not gnulib's
+   futimens().  */
+# if @REPLACE_FUTIMENS@ || (!@HAVE_FUTIMENS@ && defined __sun)
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef futimens
+#   define futimens rpl_futimens
+#  endif
+_GL_FUNCDECL_RPL (futimens, int, (int fd, struct timespec const times[2]));
+_GL_CXXALIAS_RPL (futimens, int, (int fd, struct timespec const times[2]));
+# else
+#  if !@HAVE_FUTIMENS@
+_GL_FUNCDECL_SYS (futimens, int, (int fd, struct timespec const times[2]));
+#  endif
+_GL_CXXALIAS_SYS (futimens, int, (int fd, struct timespec const times[2]));
+# endif
+# if @HAVE_FUTIMENS@
+_GL_CXXALIASWARN (futimens);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef futimens
+# if HAVE_RAW_DECL_FUTIMENS
+_GL_WARN_ON_USE (futimens, "futimens is not portable - "
+                 "use gnulib module futimens for portability");
+# endif
+#endif
+
+
+#if @GNULIB_LCHMOD@
+/* Change the mode of FILENAME to MODE, without dereferencing it if FILENAME
+   denotes a symbolic link.  */
+# if !@HAVE_LCHMOD@
+/* The lchmod replacement follows symbolic links.  Callers should take
+   this into account; lchmod should be applied only to arguments that
+   are known to not be symbolic links.  On hosts that lack lchmod,
+   this can lead to race conditions between the check and the
+   invocation of lchmod, but we know of no workarounds that are
+   reliable in general.  You might try requesting support for lchmod
+   from your operating system supplier.  */
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define lchmod chmod
+#  endif
+/* Need to cast, because on mingw, the second parameter of chmod is
+                                                int mode.  */
+_GL_CXXALIAS_RPL_CAST_1 (lchmod, chmod, int,
+                         (const char *filename, mode_t mode));
+# else
+#  if 0 /* assume already declared */
+_GL_FUNCDECL_SYS (lchmod, int, (const char *filename, mode_t mode)
+                               _GL_ARG_NONNULL ((1)));
+#  endif
+_GL_CXXALIAS_SYS (lchmod, int, (const char *filename, mode_t mode));
+# endif
+# if @HAVE_LCHMOD@
+_GL_CXXALIASWARN (lchmod);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef lchmod
+# if HAVE_RAW_DECL_LCHMOD
+_GL_WARN_ON_USE (lchmod, "lchmod is unportable - "
+                 "use gnulib module lchmod for portability");
+# endif
+#endif
+
+
+#if @GNULIB_LSTAT@
+# if ! @HAVE_LSTAT@
+/* mingw does not support symlinks, therefore it does not have lstat.  But
+   without links, stat does just fine.  */
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define lstat stat
+#  endif
+_GL_CXXALIAS_RPL_1 (lstat, stat, int, (const char *name, struct stat *buf));
+# elif @REPLACE_LSTAT@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef lstat
+#   define lstat rpl_lstat
+#  endif
+_GL_FUNCDECL_RPL (lstat, int, (const char *name, struct stat *buf)
+                              _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (lstat, int, (const char *name, struct stat *buf));
+# else
+_GL_CXXALIAS_SYS (lstat, int, (const char *name, struct stat *buf));
+# endif
+# if @HAVE_LSTAT@
+_GL_CXXALIASWARN (lstat);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef lstat
+# if HAVE_RAW_DECL_LSTAT
+_GL_WARN_ON_USE (lstat, "lstat is unportable - "
+                 "use gnulib module lstat for portability");
+# endif
+#endif
+
+
+#if @REPLACE_MKDIR@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#  undef mkdir
+#  define mkdir rpl_mkdir
+# endif
+_GL_FUNCDECL_RPL (mkdir, int, (char const *name, mode_t mode)
+                              _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode));
+#else
+/* mingw's _mkdir() function has 1 argument, but we pass 2 arguments.
+   Additionally, it declares _mkdir (and depending on compile flags, an
+   alias mkdir), only in the nonstandard includes <direct.h> and <io.h>,
+   which are included above.  */
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+
+#  if !GNULIB_defined_rpl_mkdir
+static int
+rpl_mkdir (char const *name, mode_t mode)
+{
+  return _mkdir (name);
+}
+#   define GNULIB_defined_rpl_mkdir 1
+#  endif
+
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   define mkdir rpl_mkdir
+#  endif
+_GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode));
+# else
+_GL_CXXALIAS_SYS (mkdir, int, (char const *name, mode_t mode));
+# endif
+#endif
+_GL_CXXALIASWARN (mkdir);
+
+
+#if @GNULIB_MKDIRAT@
+# if !@HAVE_MKDIRAT@
+_GL_FUNCDECL_SYS (mkdirat, int, (int fd, char const *file, mode_t mode)
+                                _GL_ARG_NONNULL ((2)));
+# endif
+_GL_CXXALIAS_SYS (mkdirat, int, (int fd, char const *file, mode_t mode));
+_GL_CXXALIASWARN (mkdirat);
+#elif defined GNULIB_POSIXCHECK
+# undef mkdirat
+# if HAVE_RAW_DECL_MKDIRAT
+_GL_WARN_ON_USE (mkdirat, "mkdirat is not portable - "
+                 "use gnulib module openat for portability");
+# endif
+#endif
+
+
+#if @GNULIB_MKFIFO@
+# if @REPLACE_MKFIFO@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef mkfifo
+#   define mkfifo rpl_mkfifo
+#  endif
+_GL_FUNCDECL_RPL (mkfifo, int, (char const *file, mode_t mode)
+                               _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (mkfifo, int, (char const *file, mode_t mode));
+# else
+#  if !@HAVE_MKFIFO@
+_GL_FUNCDECL_SYS (mkfifo, int, (char const *file, mode_t mode)
+                               _GL_ARG_NONNULL ((1)));
+#  endif
+_GL_CXXALIAS_SYS (mkfifo, int, (char const *file, mode_t mode));
+# endif
+_GL_CXXALIASWARN (mkfifo);
+#elif defined GNULIB_POSIXCHECK
+# undef mkfifo
+# if HAVE_RAW_DECL_MKFIFO
+_GL_WARN_ON_USE (mkfifo, "mkfifo is not portable - "
+                 "use gnulib module mkfifo for portability");
+# endif
+#endif
+
+
+#if @GNULIB_MKFIFOAT@
+# if !@HAVE_MKFIFOAT@
+_GL_FUNCDECL_SYS (mkfifoat, int, (int fd, char const *file, mode_t mode)
+                                 _GL_ARG_NONNULL ((2)));
+# endif
+_GL_CXXALIAS_SYS (mkfifoat, int, (int fd, char const *file, mode_t mode));
+_GL_CXXALIASWARN (mkfifoat);
+#elif defined GNULIB_POSIXCHECK
+# undef mkfifoat
+# if HAVE_RAW_DECL_MKFIFOAT
+_GL_WARN_ON_USE (mkfifoat, "mkfifoat is not portable - "
+                 "use gnulib module mkfifoat for portability");
+# endif
+#endif
+
+
+#if @GNULIB_MKNOD@
+# if @REPLACE_MKNOD@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef mknod
+#   define mknod rpl_mknod
+#  endif
+_GL_FUNCDECL_RPL (mknod, int, (char const *file, mode_t mode, dev_t dev)
+                              _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (mknod, int, (char const *file, mode_t mode, dev_t dev));
+# else
+#  if !@HAVE_MKNOD@
+_GL_FUNCDECL_SYS (mknod, int, (char const *file, mode_t mode, dev_t dev)
+                              _GL_ARG_NONNULL ((1)));
+#  endif
+/* Need to cast, because on OSF/1 5.1, the third parameter is '...'.  */
+_GL_CXXALIAS_SYS_CAST (mknod, int, (char const *file, mode_t mode, dev_t dev));
+# endif
+_GL_CXXALIASWARN (mknod);
+#elif defined GNULIB_POSIXCHECK
+# undef mknod
+# if HAVE_RAW_DECL_MKNOD
+_GL_WARN_ON_USE (mknod, "mknod is not portable - "
+                 "use gnulib module mknod for portability");
+# endif
+#endif
+
+
+#if @GNULIB_MKNODAT@
+# if !@HAVE_MKNODAT@
+_GL_FUNCDECL_SYS (mknodat, int,
+                  (int fd, char const *file, mode_t mode, dev_t dev)
+                  _GL_ARG_NONNULL ((2)));
+# endif
+_GL_CXXALIAS_SYS (mknodat, int,
+                  (int fd, char const *file, mode_t mode, dev_t dev));
+_GL_CXXALIASWARN (mknodat);
+#elif defined GNULIB_POSIXCHECK
+# undef mknodat
+# if HAVE_RAW_DECL_MKNODAT
+_GL_WARN_ON_USE (mknodat, "mknodat is not portable - "
+                 "use gnulib module mkfifoat for portability");
+# endif
+#endif
+
+
+#if @GNULIB_STAT@
+# if @REPLACE_STAT@
+/* We can't use the object-like #define stat rpl_stat, because of
+   struct stat.  This means that rpl_stat will not be used if the user
+   does (stat)(a,b).  Oh well.  */
+#  if defined _AIX && defined stat && defined _LARGE_FILES
+    /* With _LARGE_FILES defined, AIX (only) defines stat to stat64,
+       so we have to replace stat64() instead of stat(). */
+#   undef stat64
+#   define stat64(name, st) rpl_stat (name, st)
+#  elif @WINDOWS_64_BIT_ST_SIZE@
+    /* Above, we define stat to _stati64.  */
+#   if defined __MINGW32__ && defined _stati64
+#    ifndef _USE_32BIT_TIME_T
+      /* The system headers define _stati64 to _stat64.  */
+#     undef _stat64
+#     define _stat64(name, st) rpl_stat (name, st)
+#    endif
+#   elif defined _MSC_VER && defined _stati64
+#    ifdef _USE_32BIT_TIME_T
+      /* The system headers define _stati64 to _stat32i64.  */
+#     undef _stat32i64
+#     define _stat32i64(name, st) rpl_stat (name, st)
+#    else
+      /* The system headers define _stati64 to _stat64.  */
+#     undef _stat64
+#     define _stat64(name, st) rpl_stat (name, st)
+#    endif
+#   else
+#    undef _stati64
+#    define _stati64(name, st) rpl_stat (name, st)
+#   endif
+#  elif defined __MINGW32__ && defined stat
+#   ifdef _USE_32BIT_TIME_T
+     /* The system headers define stat to _stat32i64.  */
+#    undef _stat32i64
+#    define _stat32i64(name, st) rpl_stat (name, st)
+#   else
+     /* The system headers define stat to _stat64.  */
+#    undef _stat64
+#    define _stat64(name, st) rpl_stat (name, st)
+#   endif
+#  elif defined _MSC_VER && defined stat
+#   ifdef _USE_32BIT_TIME_T
+     /* The system headers define stat to _stat32.  */
+#    undef _stat32
+#    define _stat32(name, st) rpl_stat (name, st)
+#   else
+     /* The system headers define stat to _stat64i32.  */
+#    undef _stat64i32
+#    define _stat64i32(name, st) rpl_stat (name, st)
+#   endif
+#  else /* !(_AIX ||__MINGW32__ ||  _MSC_VER) */
+#   undef stat
+#   define stat(name, st) rpl_stat (name, st)
+#  endif /* !_LARGE_FILES */
+_GL_EXTERN_C int stat (const char *name, struct stat *buf)
+                      _GL_ARG_NONNULL ((1, 2));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef stat
+# if HAVE_RAW_DECL_STAT
+_GL_WARN_ON_USE (stat, "stat is unportable - "
+                 "use gnulib module stat for portability");
+# endif
+#endif
+
+
+#if @GNULIB_UTIMENSAT@
+/* Use the rpl_ prefix also on Solaris <= 9, because on Solaris 9 our utimensat
+   implementation relies on futimesat, which on Solaris 10 makes an invocation
+   to utimensat that is meant to invoke the libc's utimensat(), not gnulib's
+   utimensat().  */
+# if @REPLACE_UTIMENSAT@ || (!@HAVE_UTIMENSAT@ && defined __sun)
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef utimensat
+#   define utimensat rpl_utimensat
+#  endif
+_GL_FUNCDECL_RPL (utimensat, int, (int fd, char const *name,
+                                   struct timespec const times[2], int flag)
+                                  _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (utimensat, int, (int fd, char const *name,
+                                   struct timespec const times[2], int flag));
+# else
+#  if !@HAVE_UTIMENSAT@
+_GL_FUNCDECL_SYS (utimensat, int, (int fd, char const *name,
+                                   struct timespec const times[2], int flag)
+                                  _GL_ARG_NONNULL ((2)));
+#  endif
+_GL_CXXALIAS_SYS (utimensat, int, (int fd, char const *name,
+                                   struct timespec const times[2], int flag));
+# endif
+# if @HAVE_UTIMENSAT@
+_GL_CXXALIASWARN (utimensat);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef utimensat
+# if HAVE_RAW_DECL_UTIMENSAT
+_GL_WARN_ON_USE (utimensat, "utimensat is not portable - "
+                 "use gnulib module utimensat for portability");
+# endif
+#endif
+
+
+#endif /* _@GUARD_PREFIX@_SYS_STAT_H */
+#endif /* _@GUARD_PREFIX@_SYS_STAT_H */
+#endif
diff --git a/gdb/gnulib/import/time.in.h b/gdb/gnulib/import/time.in.h
new file mode 100644
index 0000000..04cde05
--- /dev/null
+++ b/gdb/gnulib/import/time.in.h
@@ -0,0 +1,248 @@
+/* A more-standard <time.h>.
+
+   Copyright (C) 2007-2012 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, see <http://www.gnu.org/licenses/>.  */
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+@PRAGMA_COLUMNS@
+
+/* Don't get in the way of glibc when it includes time.h merely to
+   declare a few standard symbols, rather than to declare all the
+   symbols.  Also, Solaris 8 <time.h> eventually includes itself
+   recursively; if that is happening, just include the system <time.h>
+   without adding our own declarations.  */
+#if (defined __need_time_t || defined __need_clock_t \
+     || defined __need_timespec \
+     || defined _@GUARD_PREFIX@_TIME_H)
+
+# @INCLUDE_NEXT@ @NEXT_TIME_H@
+
+#else
+
+# define _@GUARD_PREFIX@_TIME_H
+
+# @INCLUDE_NEXT@ @NEXT_TIME_H@
+
+/* NetBSD 5.0 mis-defines NULL.  */
+# include <stddef.h>
+
+/* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
+
+/* The definition of _GL_ARG_NONNULL is copied here.  */
+
+/* The definition of _GL_WARN_ON_USE is copied here.  */
+
+/* Some systems don't define struct timespec (e.g., AIX 4.1, Ultrix 4.3).
+   Or they define it with the wrong member names or define it in <sys/time.h>
+   (e.g., FreeBSD circa 1997).  Stock Mingw does not define it, but the
+   pthreads-win32 library defines it in <pthread.h>.  */
+# if ! @TIME_H_DEFINES_STRUCT_TIMESPEC@
+#  if @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
+#   include <sys/time.h>
+#  elif @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@
+#   include <pthread.h>
+/* The pthreads-win32 <pthread.h> also defines a couple of broken macros.  */
+#   undef asctime_r
+#   undef ctime_r
+#   undef gmtime_r
+#   undef localtime_r
+#   undef rand_r
+#   undef strtok_r
+#  else
+
+#   ifdef __cplusplus
+extern "C" {
+#   endif
+
+#   if !GNULIB_defined_struct_timespec
+#    undef timespec
+#    define timespec rpl_timespec
+struct timespec
+{
+  time_t tv_sec;
+  long int tv_nsec;
+};
+#    define GNULIB_defined_struct_timespec 1
+#   endif
+
+#   ifdef __cplusplus
+}
+#   endif
+
+#  endif
+# endif
+
+# if !GNULIB_defined_struct_time_t_must_be_integral
+/* Per http://austingroupbugs.net/view.php?id=327, POSIX requires
+   time_t to be an integer type, even though C99 permits floating
+   point.  We don't know of any implementation that uses floating
+   point, and it is much easier to write code that doesn't have to
+   worry about that corner case, so we force the issue.  */
+struct __time_t_must_be_integral {
+  unsigned int __floating_time_t_unsupported : (time_t) 1;
+};
+#  define GNULIB_defined_struct_time_t_must_be_integral 1
+# endif
+
+/* Sleep for at least RQTP seconds unless interrupted,  If interrupted,
+   return -1 and store the remaining time into RMTP.  See
+   <http://www.opengroup.org/susv3xsh/nanosleep.html>.  */
+# if @GNULIB_NANOSLEEP@
+#  if @REPLACE_NANOSLEEP@
+#   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#    define nanosleep rpl_nanosleep
+#   endif
+_GL_FUNCDECL_RPL (nanosleep, int,
+                  (struct timespec const *__rqtp, struct timespec *__rmtp)
+                  _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (nanosleep, int,
+                  (struct timespec const *__rqtp, struct timespec *__rmtp));
+#  else
+#   if ! @HAVE_NANOSLEEP@
+_GL_FUNCDECL_SYS (nanosleep, int,
+                  (struct timespec const *__rqtp, struct timespec *__rmtp)
+                  _GL_ARG_NONNULL ((1)));
+#   endif
+_GL_CXXALIAS_SYS (nanosleep, int,
+                  (struct timespec const *__rqtp, struct timespec *__rmtp));
+#  endif
+_GL_CXXALIASWARN (nanosleep);
+# endif
+
+/* Return the 'time_t' representation of TP and normalize TP.  */
+# if @GNULIB_MKTIME@
+#  if @REPLACE_MKTIME@
+#   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#    define mktime rpl_mktime
+#   endif
+_GL_FUNCDECL_RPL (mktime, time_t, (struct tm *__tp) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (mktime, time_t, (struct tm *__tp));
+#  else
+_GL_CXXALIAS_SYS (mktime, time_t, (struct tm *__tp));
+#  endif
+_GL_CXXALIASWARN (mktime);
+# endif
+
+/* Convert TIMER to RESULT, assuming local time and UTC respectively.  See
+   <http://www.opengroup.org/susv3xsh/localtime_r.html> and
+   <http://www.opengroup.org/susv3xsh/gmtime_r.html>.  */
+# if @GNULIB_TIME_R@
+#  if @REPLACE_LOCALTIME_R@
+#   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#    undef localtime_r
+#    define localtime_r rpl_localtime_r
+#   endif
+_GL_FUNCDECL_RPL (localtime_r, struct tm *, (time_t const *restrict __timer,
+                                             struct tm *restrict __result)
+                                            _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (localtime_r, struct tm *, (time_t const *restrict __timer,
+                                             struct tm *restrict __result));
+#  else
+#   if ! @HAVE_DECL_LOCALTIME_R@
+_GL_FUNCDECL_SYS (localtime_r, struct tm *, (time_t const *restrict __timer,
+                                             struct tm *restrict __result)
+                                            _GL_ARG_NONNULL ((1, 2)));
+#   endif
+_GL_CXXALIAS_SYS (localtime_r, struct tm *, (time_t const *restrict __timer,
+                                             struct tm *restrict __result));
+#  endif
+#  if @HAVE_DECL_LOCALTIME_R@
+_GL_CXXALIASWARN (localtime_r);
+#  endif
+#  if @REPLACE_LOCALTIME_R@
+#   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#    undef gmtime_r
+#    define gmtime_r rpl_gmtime_r
+#   endif
+_GL_FUNCDECL_RPL (gmtime_r, struct tm *, (time_t const *restrict __timer,
+                                          struct tm *restrict __result)
+                                         _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (gmtime_r, struct tm *, (time_t const *restrict __timer,
+                                          struct tm *restrict __result));
+#  else
+#   if ! @HAVE_DECL_LOCALTIME_R@
+_GL_FUNCDECL_SYS (gmtime_r, struct tm *, (time_t const *restrict __timer,
+                                          struct tm *restrict __result)
+                                         _GL_ARG_NONNULL ((1, 2)));
+#   endif
+_GL_CXXALIAS_SYS (gmtime_r, struct tm *, (time_t const *restrict __timer,
+                                          struct tm *restrict __result));
+#  endif
+#  if @HAVE_DECL_LOCALTIME_R@
+_GL_CXXALIASWARN (gmtime_r);
+#  endif
+# endif
+
+/* Parse BUF as a time stamp, assuming FORMAT specifies its layout, and store
+   the resulting broken-down time into TM.  See
+   <http://www.opengroup.org/susv3xsh/strptime.html>.  */
+# if @GNULIB_STRPTIME@
+#  if ! @HAVE_STRPTIME@
+_GL_FUNCDECL_SYS (strptime, char *, (char const *restrict __buf,
+                                     char const *restrict __format,
+                                     struct tm *restrict __tm)
+                                    _GL_ARG_NONNULL ((1, 2, 3)));
+#  endif
+_GL_CXXALIAS_SYS (strptime, char *, (char const *restrict __buf,
+                                     char const *restrict __format,
+                                     struct tm *restrict __tm));
+_GL_CXXALIASWARN (strptime);
+# endif
+
+/* Convert TM to a time_t value, assuming UTC.  */
+# if @GNULIB_TIMEGM@
+#  if @REPLACE_TIMEGM@
+#   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#    undef timegm
+#    define timegm rpl_timegm
+#   endif
+_GL_FUNCDECL_RPL (timegm, time_t, (struct tm *__tm) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (timegm, time_t, (struct tm *__tm));
+#  else
+#   if ! @HAVE_TIMEGM@
+_GL_FUNCDECL_SYS (timegm, time_t, (struct tm *__tm) _GL_ARG_NONNULL ((1)));
+#   endif
+_GL_CXXALIAS_SYS (timegm, time_t, (struct tm *__tm));
+#  endif
+_GL_CXXALIASWARN (timegm);
+# endif
+
+/* Encourage applications to avoid unsafe functions that can overrun
+   buffers when given outlandish struct tm values.  Portable
+   applications should use strftime (or even sprintf) instead.  */
+# if defined GNULIB_POSIXCHECK
+#  undef asctime
+_GL_WARN_ON_USE (asctime, "asctime can overrun buffers in some cases - "
+                 "better use strftime (or even sprintf) instead");
+# endif
+# if defined GNULIB_POSIXCHECK
+#  undef asctime_r
+_GL_WARN_ON_USE (asctime, "asctime_r can overrun buffers in some cases - "
+                 "better use strftime (or even sprintf) instead");
+# endif
+# if defined GNULIB_POSIXCHECK
+#  undef ctime
+_GL_WARN_ON_USE (asctime, "ctime can overrun buffers in some cases - "
+                 "better use strftime (or even sprintf) instead");
+# endif
+# if defined GNULIB_POSIXCHECK
+#  undef ctime_r
+_GL_WARN_ON_USE (asctime, "ctime_r can overrun buffers in some cases - "
+                 "better use strftime (or even sprintf) instead");
+# endif
+
+#endif
diff --git a/gdb/gnulib/update-gnulib.sh b/gdb/gnulib/update-gnulib.sh
index cb2affc..5bbe65e 100644
--- a/gdb/gnulib/update-gnulib.sh
+++ b/gdb/gnulib/update-gnulib.sh
@@ -40,6 +40,7 @@ IMPORTED_GNULIB_MODULES="\
     strerror \
     strstr \
     dirent \
+    sys_stat \
 "
 
 # The gnulib commit ID to use for the update.
-- 
1.8.1.4

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH v3 11/13] sys/types.h cleanup
  2013-11-18 20:27 [PATCH v3 00/13] use gnulib more heavily Tom Tromey
                   ` (3 preceding siblings ...)
  2013-11-18 20:27 ` [PATCH v3 03/13] import strstr and strerror modules Tom Tromey
@ 2013-11-18 20:37 ` Tom Tromey
  2013-11-18 20:37 ` [PATCH v3 12/13] import gnulib sys/stat.h module Tom Tromey
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 24+ messages in thread
From: Tom Tromey @ 2013-11-18 20:37 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

configure doesn't check for sys/types.h any more, but it still tries
to use the result of the check.  This removes that use as well.

2013-11-18  Tom Tromey  <tromey@redhat.com>

	* configure: Rebuild.
	* configure.ac: Remove check of HAVE_SYS_TYPES_H.
---
 gdb/ChangeLog    | 5 +++++
 gdb/configure    | 4 +---
 gdb/configure.ac | 4 +---
 3 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/gdb/configure b/gdb/configure
index 23e533d..5514b2f 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -10404,9 +10404,7 @@ _ACEOF
 # Check the return and argument types of ptrace.  No canned test for
 # this, so roll our own.
 gdb_ptrace_headers='
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
+#include <sys/types.h>
 #if HAVE_SYS_PTRACE_H
 # include <sys/ptrace.h>
 #endif
diff --git a/gdb/configure.ac b/gdb/configure.ac
index d2b5d29..9b73887 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -1163,9 +1163,7 @@ GDB_AC_COMMON
 # Check the return and argument types of ptrace.  No canned test for
 # this, so roll our own.
 gdb_ptrace_headers='
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
+#include <sys/types.h>
 #if HAVE_SYS_PTRACE_H
 # include <sys/ptrace.h>
 #endif
-- 
1.8.1.4

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH v3 08/13] don't check for stddef.h
  2013-11-18 20:27 [PATCH v3 00/13] use gnulib more heavily Tom Tromey
                   ` (5 preceding siblings ...)
  2013-11-18 20:37 ` [PATCH v3 12/13] import gnulib sys/stat.h module Tom Tromey
@ 2013-11-18 20:39 ` Tom Tromey
  2013-11-18 20:46 ` [PATCH v3 04/13] remove gdb_string.h Tom Tromey
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 24+ messages in thread
From: Tom Tromey @ 2013-11-18 20:39 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

gdb already unconditionally includes stddef.h in many places.
I think there is no reason to check for its existence.

Also, Zack Weinberg's header file survey agrees:

    http://hacks.owlfolio.org/header-survey/

This patch removes the configure check and the inclusion guards.
It also removes a redundant inclusion that I noticed in defs.h.

2013-11-18  Tom Tromey  <tromey@redhat.com>

	* config.in: Rebuild.
	* configure: Rebuild.
	* configure.ac: Don't check for stddef.h.
	* defs.h: Unconditionally include stddef.h.  Remove duplicate
	inclusion.
---
 gdb/ChangeLog    | 8 ++++++++
 gdb/config.in    | 3 ---
 gdb/configure    | 2 +-
 gdb/configure.ac | 2 +-
 gdb/defs.h       | 6 ------
 5 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/gdb/config.in b/gdb/config.in
index 4e3f6de..802127f 100644
--- a/gdb/config.in
+++ b/gdb/config.in
@@ -378,9 +378,6 @@
 /* Define to 1 if the system has the type `socklen_t'. */
 #undef HAVE_SOCKLEN_T
 
-/* Define to 1 if you have the <stddef.h> header file. */
-#undef HAVE_STDDEF_H
-
 /* Define to 1 if you have the <stdint.h> header file. */
 #undef HAVE_STDINT_H
 
diff --git a/gdb/configure b/gdb/configure
index b1a4d48..1d1a486 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -8756,7 +8756,7 @@ fi
 
 # elf_hp.h is for HP/UX 64-bit shared library support.
 for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
-                  thread_db.h stddef.h \
+                  thread_db.h \
 		  stdlib.h sys/fault.h \
 		  sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
 		  sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
diff --git a/gdb/configure.ac b/gdb/configure.ac
index 6025e89..d6b75d6 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -1075,7 +1075,7 @@ fi
 AC_HEADER_STDC
 # elf_hp.h is for HP/UX 64-bit shared library support.
 AC_CHECK_HEADERS([nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
-                  thread_db.h stddef.h \
+                  thread_db.h \
 		  stdlib.h sys/fault.h \
 		  sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
 		  sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
diff --git a/gdb/defs.h b/gdb/defs.h
index b1caaad..bb93742 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -48,9 +48,7 @@
    included, so it's ok to blank out gstdint.h.  */
 #define GCC_GENERATED_STDINT_H 1
 
-#ifdef HAVE_STDDEF_H
 #include <stddef.h>
-#endif
 
 #include <unistd.h>
 
@@ -606,10 +604,6 @@ enum gdb_osabi
 
 /* From other system libraries */
 
-#ifdef HAVE_STDDEF_H
-#include <stddef.h>
-#endif
-
 #ifdef HAVE_STDLIB_H
 #include <stdlib.h>
 #endif
-- 
1.8.1.4

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH v3 09/13] stdlib.h is universal too
  2013-11-18 20:27 [PATCH v3 00/13] use gnulib more heavily Tom Tromey
                   ` (8 preceding siblings ...)
  2013-11-18 20:46 ` [PATCH v3 10/13] don't check for unistd.h Tom Tromey
@ 2013-11-18 20:46 ` Tom Tromey
  2013-11-18 21:12 ` [PATCH v3 06/13] import gnulib dirent module Tom Tromey
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 24+ messages in thread
From: Tom Tromey @ 2013-11-18 20:46 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

stdlib.h is universal as well, so there is no need to check for it.

2013-11-18  Tom Tromey  <tromey@redhat.com>

	* configure: Rebuild.
	* configure.ac: Don't check for stdlib.h
	* defs.h: Include stdlib.h unconditionally.

2013-11-18  Tom Tromey  <tromey@redhat.com>

	* configure: Rebuild.
	* configure.ac: Don't check for stdlib.h.
	* gdbreplay.c: Unconditionally include stdlib.h.
---
 gdb/ChangeLog              | 6 ++++++
 gdb/configure              | 2 +-
 gdb/configure.ac           | 2 +-
 gdb/defs.h                 | 2 --
 gdb/gdbserver/ChangeLog    | 6 ++++++
 gdb/gdbserver/configure    | 2 +-
 gdb/gdbserver/configure.ac | 1 -
 gdb/gdbserver/gdbreplay.c  | 2 --
 8 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/gdb/configure b/gdb/configure
index 1d1a486..9739195 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -8757,7 +8757,7 @@ fi
 # elf_hp.h is for HP/UX 64-bit shared library support.
 for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
                   thread_db.h \
-		  stdlib.h sys/fault.h \
+		  sys/fault.h \
 		  sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
 		  sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
 		  sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
diff --git a/gdb/configure.ac b/gdb/configure.ac
index d6b75d6..74d56e4 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -1076,7 +1076,7 @@ AC_HEADER_STDC
 # elf_hp.h is for HP/UX 64-bit shared library support.
 AC_CHECK_HEADERS([nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
                   thread_db.h \
-		  stdlib.h sys/fault.h \
+		  sys/fault.h \
 		  sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
 		  sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
 		  sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
diff --git a/gdb/defs.h b/gdb/defs.h
index bb93742..1469299 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -604,9 +604,7 @@ enum gdb_osabi
 
 /* From other system libraries */
 
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
 
 
 #ifndef atof
diff --git a/gdb/gdbserver/configure b/gdb/gdbserver/configure
index d75ec1f..fac7fb3 100755
--- a/gdb/gdbserver/configure
+++ b/gdb/gdbserver/configure
@@ -4714,7 +4714,7 @@ $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cach
   cd "$ac_popdir"
 
 
-for ac_header in sgtty.h termio.h termios.h sys/reg.h string.h 		 proc_service.h sys/procfs.h linux/elf.h 		 stdlib.h 		 errno.h fcntl.h signal.h sys/file.h malloc.h 		 sys/ioctl.h netinet/in.h sys/socket.h netdb.h 		 netinet/tcp.h arpa/inet.h
+for ac_header in sgtty.h termio.h termios.h sys/reg.h string.h 		 proc_service.h sys/procfs.h linux/elf.h 		 errno.h fcntl.h signal.h sys/file.h malloc.h 		 sys/ioctl.h netinet/in.h sys/socket.h netdb.h 		 netinet/tcp.h arpa/inet.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
diff --git a/gdb/gdbserver/configure.ac b/gdb/gdbserver/configure.ac
index 87146c1..1c61843 100644
--- a/gdb/gdbserver/configure.ac
+++ b/gdb/gdbserver/configure.ac
@@ -79,7 +79,6 @@ ACX_CONFIGURE_DIR(["../gnulib"], ["build-gnulib-gdbserver"])
 
 AC_CHECK_HEADERS(sgtty.h termio.h termios.h sys/reg.h string.h dnl
 		 proc_service.h sys/procfs.h linux/elf.h dnl
-		 stdlib.h dnl
 		 errno.h fcntl.h signal.h sys/file.h malloc.h dnl
 		 sys/ioctl.h netinet/in.h sys/socket.h netdb.h dnl
 		 netinet/tcp.h arpa/inet.h)
diff --git a/gdb/gdbserver/gdbreplay.c b/gdb/gdbserver/gdbreplay.c
index 1f823e0..c076323 100644
--- a/gdb/gdbserver/gdbreplay.c
+++ b/gdb/gdbserver/gdbreplay.c
@@ -35,9 +35,7 @@
 #if HAVE_ERRNO_H
 #include <errno.h>
 #endif
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
 #include <string.h>
 #include <unistd.h>
 #ifdef HAVE_NETINET_IN_H
-- 
1.8.1.4

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH v3 04/13] remove gdb_string.h
  2013-11-18 20:27 [PATCH v3 00/13] use gnulib more heavily Tom Tromey
                   ` (6 preceding siblings ...)
  2013-11-18 20:39 ` [PATCH v3 08/13] don't check for stddef.h Tom Tromey
@ 2013-11-18 20:46 ` Tom Tromey
  2013-11-18 20:46 ` [PATCH v3 10/13] don't check for unistd.h Tom Tromey
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 24+ messages in thread
From: Tom Tromey @ 2013-11-18 20:46 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This removes gdb_string.h.  This patch is purely mechanical.  I
created it by running the two commands:

    git rm common/gdb_string.h
    perl -pi -e's/"gdb_string.h"/<string.h>/;'  *.[chyl] */*.[chyl]

2013-11-18  Tom Tromey  <tromey@redhat.com>

	* common/gdb_string.h: Remove.
	* aarch64-tdep.c: Use string.h, not gdb_string.h.
	* ada-exp.y: Use string.h, not gdb_string.h.
	* ada-lang.c: Use string.h, not gdb_string.h.
	* ada-lex.l: Use string.h, not gdb_string.h.
	* ada-typeprint.c: Use string.h, not gdb_string.h.
	* ada-valprint.c: Use string.h, not gdb_string.h.
	* aix-thread.c: Use string.h, not gdb_string.h.
	* alpha-linux-tdep.c: Use string.h, not gdb_string.h.
	* alpha-mdebug-tdep.c: Use string.h, not gdb_string.h.
	* alpha-nat.c: Use string.h, not gdb_string.h.
	* alpha-osf1-tdep.c: Use string.h, not gdb_string.h.
	* alpha-tdep.c: Use string.h, not gdb_string.h.
	* alphanbsd-tdep.c: Use string.h, not gdb_string.h.
	* amd64-dicos-tdep.c: Use string.h, not gdb_string.h.
	* amd64-linux-nat.c: Use string.h, not gdb_string.h.
	* amd64-linux-tdep.c: Use string.h, not gdb_string.h.
	* amd64-nat.c: Use string.h, not gdb_string.h.
	* amd64-sol2-tdep.c: Use string.h, not gdb_string.h.
	* amd64fbsd-tdep.c: Use string.h, not gdb_string.h.
	* amd64obsd-tdep.c: Use string.h, not gdb_string.h.
	* arch-utils.c: Use string.h, not gdb_string.h.
	* arm-linux-nat.c: Use string.h, not gdb_string.h.
	* arm-linux-tdep.c: Use string.h, not gdb_string.h.
	* arm-tdep.c: Use string.h, not gdb_string.h.
	* arm-wince-tdep.c: Use string.h, not gdb_string.h.
	* armbsd-tdep.c: Use string.h, not gdb_string.h.
	* armnbsd-nat.c: Use string.h, not gdb_string.h.
	* armnbsd-tdep.c: Use string.h, not gdb_string.h.
	* armobsd-tdep.c: Use string.h, not gdb_string.h.
	* avr-tdep.c: Use string.h, not gdb_string.h.
	* ax-gdb.c: Use string.h, not gdb_string.h.
	* ax-general.c: Use string.h, not gdb_string.h.
	* bcache.c: Use string.h, not gdb_string.h.
	* bfin-tdep.c: Use string.h, not gdb_string.h.
	* breakpoint.c: Use string.h, not gdb_string.h.
	* build-id.c: Use string.h, not gdb_string.h.
	* buildsym.c: Use string.h, not gdb_string.h.
	* c-exp.y: Use string.h, not gdb_string.h.
	* c-lang.c: Use string.h, not gdb_string.h.
	* c-typeprint.c: Use string.h, not gdb_string.h.
	* c-valprint.c: Use string.h, not gdb_string.h.
	* charset.c: Use string.h, not gdb_string.h.
	* cli-out.c: Use string.h, not gdb_string.h.
	* cli/cli-cmds.c: Use string.h, not gdb_string.h.
	* cli/cli-decode.c: Use string.h, not gdb_string.h.
	* cli/cli-dump.c: Use string.h, not gdb_string.h.
	* cli/cli-interp.c: Use string.h, not gdb_string.h.
	* cli/cli-logging.c: Use string.h, not gdb_string.h.
	* cli/cli-script.c: Use string.h, not gdb_string.h.
	* cli/cli-setshow.c: Use string.h, not gdb_string.h.
	* cli/cli-utils.c: Use string.h, not gdb_string.h.
	* coffread.c: Use string.h, not gdb_string.h.
	* common/common-utils.c: Use string.h, not gdb_string.h.
	* common/filestuff.c: Use string.h, not gdb_string.h.
	* common/linux-procfs.c: Use string.h, not gdb_string.h.
	* common/linux-ptrace.c: Use string.h, not gdb_string.h.
	* common/signals.c: Use string.h, not gdb_string.h.
	* common/vec.h: Use string.h, not gdb_string.h.
	* core-regset.c: Use string.h, not gdb_string.h.
	* corefile.c: Use string.h, not gdb_string.h.
	* corelow.c: Use string.h, not gdb_string.h.
	* cp-abi.c: Use string.h, not gdb_string.h.
	* cp-support.c: Use string.h, not gdb_string.h.
	* cp-valprint.c: Use string.h, not gdb_string.h.
	* cris-tdep.c: Use string.h, not gdb_string.h.
	* d-lang.c: Use string.h, not gdb_string.h.
	* dbxread.c: Use string.h, not gdb_string.h.
	* dcache.c: Use string.h, not gdb_string.h.
	* demangle.c: Use string.h, not gdb_string.h.
	* dicos-tdep.c: Use string.h, not gdb_string.h.
	* disasm.c: Use string.h, not gdb_string.h.
	* doublest.c: Use string.h, not gdb_string.h.
	* dsrec.c: Use string.h, not gdb_string.h.
	* dummy-frame.c: Use string.h, not gdb_string.h.
	* dwarf2-frame.c: Use string.h, not gdb_string.h.
	* dwarf2loc.c: Use string.h, not gdb_string.h.
	* dwarf2read.c: Use string.h, not gdb_string.h.
	* elfread.c: Use string.h, not gdb_string.h.
	* environ.c: Use string.h, not gdb_string.h.
	* eval.c: Use string.h, not gdb_string.h.
	* event-loop.c: Use string.h, not gdb_string.h.
	* exceptions.c: Use string.h, not gdb_string.h.
	* exec.c: Use string.h, not gdb_string.h.
	* expprint.c: Use string.h, not gdb_string.h.
	* f-exp.y: Use string.h, not gdb_string.h.
	* f-lang.c: Use string.h, not gdb_string.h.
	* f-typeprint.c: Use string.h, not gdb_string.h.
	* f-valprint.c: Use string.h, not gdb_string.h.
	* fbsd-nat.c: Use string.h, not gdb_string.h.
	* findcmd.c: Use string.h, not gdb_string.h.
	* findvar.c: Use string.h, not gdb_string.h.
	* fork-child.c: Use string.h, not gdb_string.h.
	* frame.c: Use string.h, not gdb_string.h.
	* frv-linux-tdep.c: Use string.h, not gdb_string.h.
	* frv-tdep.c: Use string.h, not gdb_string.h.
	* gdb.c: Use string.h, not gdb_string.h.
	* gdb_bfd.c: Use string.h, not gdb_string.h.
	* gdbarch.c: Use string.h, not gdb_string.h.
	* gdbtypes.c: Use string.h, not gdb_string.h.
	* gnu-nat.c: Use string.h, not gdb_string.h.
	* gnu-v2-abi.c: Use string.h, not gdb_string.h.
	* gnu-v3-abi.c: Use string.h, not gdb_string.h.
	* go-exp.y: Use string.h, not gdb_string.h.
	* go-lang.c: Use string.h, not gdb_string.h.
	* go32-nat.c: Use string.h, not gdb_string.h.
	* hppa-hpux-tdep.c: Use string.h, not gdb_string.h.
	* hppa-linux-nat.c: Use string.h, not gdb_string.h.
	* hppanbsd-tdep.c: Use string.h, not gdb_string.h.
	* hppaobsd-tdep.c: Use string.h, not gdb_string.h.
	* i386-cygwin-tdep.c: Use string.h, not gdb_string.h.
	* i386-dicos-tdep.c: Use string.h, not gdb_string.h.
	* i386-linux-nat.c: Use string.h, not gdb_string.h.
	* i386-linux-tdep.c: Use string.h, not gdb_string.h.
	* i386-nto-tdep.c: Use string.h, not gdb_string.h.
	* i386-sol2-tdep.c: Use string.h, not gdb_string.h.
	* i386-tdep.c: Use string.h, not gdb_string.h.
	* i386bsd-tdep.c: Use string.h, not gdb_string.h.
	* i386gnu-nat.c: Use string.h, not gdb_string.h.
	* i386nbsd-tdep.c: Use string.h, not gdb_string.h.
	* i386obsd-tdep.c: Use string.h, not gdb_string.h.
	* i387-tdep.c: Use string.h, not gdb_string.h.
	* ia64-libunwind-tdep.c: Use string.h, not gdb_string.h.
	* ia64-linux-nat.c: Use string.h, not gdb_string.h.
	* inf-child.c: Use string.h, not gdb_string.h.
	* inf-ptrace.c: Use string.h, not gdb_string.h.
	* inf-ttrace.c: Use string.h, not gdb_string.h.
	* infcall.c: Use string.h, not gdb_string.h.
	* infcmd.c: Use string.h, not gdb_string.h.
	* inflow.c: Use string.h, not gdb_string.h.
	* infrun.c: Use string.h, not gdb_string.h.
	* interps.c: Use string.h, not gdb_string.h.
	* iq2000-tdep.c: Use string.h, not gdb_string.h.
	* irix5-nat.c: Use string.h, not gdb_string.h.
	* jv-exp.y: Use string.h, not gdb_string.h.
	* jv-lang.c: Use string.h, not gdb_string.h.
	* jv-typeprint.c: Use string.h, not gdb_string.h.
	* jv-valprint.c: Use string.h, not gdb_string.h.
	* language.c: Use string.h, not gdb_string.h.
	* linux-fork.c: Use string.h, not gdb_string.h.
	* linux-nat.c: Use string.h, not gdb_string.h.
	* lm32-tdep.c: Use string.h, not gdb_string.h.
	* m2-exp.y: Use string.h, not gdb_string.h.
	* m2-typeprint.c: Use string.h, not gdb_string.h.
	* m32c-tdep.c: Use string.h, not gdb_string.h.
	* m32r-linux-nat.c: Use string.h, not gdb_string.h.
	* m32r-linux-tdep.c: Use string.h, not gdb_string.h.
	* m32r-rom.c: Use string.h, not gdb_string.h.
	* m32r-tdep.c: Use string.h, not gdb_string.h.
	* m68hc11-tdep.c: Use string.h, not gdb_string.h.
	* m68k-tdep.c: Use string.h, not gdb_string.h.
	* m68kbsd-tdep.c: Use string.h, not gdb_string.h.
	* m68klinux-nat.c: Use string.h, not gdb_string.h.
	* m68klinux-tdep.c: Use string.h, not gdb_string.h.
	* m88k-tdep.c: Use string.h, not gdb_string.h.
	* macrocmd.c: Use string.h, not gdb_string.h.
	* main.c: Use string.h, not gdb_string.h.
	* mdebugread.c: Use string.h, not gdb_string.h.
	* mem-break.c: Use string.h, not gdb_string.h.
	* memattr.c: Use string.h, not gdb_string.h.
	* memory-map.c: Use string.h, not gdb_string.h.
	* mep-tdep.c: Use string.h, not gdb_string.h.
	* mi/mi-cmd-break.c: Use string.h, not gdb_string.h.
	* mi/mi-cmd-disas.c: Use string.h, not gdb_string.h.
	* mi/mi-cmd-env.c: Use string.h, not gdb_string.h.
	* mi/mi-cmd-stack.c: Use string.h, not gdb_string.h.
	* mi/mi-cmd-var.c: Use string.h, not gdb_string.h.
	* mi/mi-cmds.c: Use string.h, not gdb_string.h.
	* mi/mi-console.c: Use string.h, not gdb_string.h.
	* mi/mi-getopt.c: Use string.h, not gdb_string.h.
	* mi/mi-interp.c: Use string.h, not gdb_string.h.
	* mi/mi-main.c: Use string.h, not gdb_string.h.
	* mi/mi-parse.c: Use string.h, not gdb_string.h.
	* microblaze-rom.c: Use string.h, not gdb_string.h.
	* microblaze-tdep.c: Use string.h, not gdb_string.h.
	* mingw-hdep.c: Use string.h, not gdb_string.h.
	* minidebug.c: Use string.h, not gdb_string.h.
	* minsyms.c: Use string.h, not gdb_string.h.
	* mips-irix-tdep.c: Use string.h, not gdb_string.h.
	* mips-linux-tdep.c: Use string.h, not gdb_string.h.
	* mips-tdep.c: Use string.h, not gdb_string.h.
	* mips64obsd-tdep.c: Use string.h, not gdb_string.h.
	* mipsnbsd-tdep.c: Use string.h, not gdb_string.h.
	* mipsread.c: Use string.h, not gdb_string.h.
	* mn10300-linux-tdep.c: Use string.h, not gdb_string.h.
	* mn10300-tdep.c: Use string.h, not gdb_string.h.
	* monitor.c: Use string.h, not gdb_string.h.
	* moxie-tdep.c: Use string.h, not gdb_string.h.
	* mt-tdep.c: Use string.h, not gdb_string.h.
	* nbsd-tdep.c: Use string.h, not gdb_string.h.
	* nios2-linux-tdep.c: Use string.h, not gdb_string.h.
	* nto-procfs.c: Use string.h, not gdb_string.h.
	* nto-tdep.c: Use string.h, not gdb_string.h.
	* objc-lang.c: Use string.h, not gdb_string.h.
	* objfiles.c: Use string.h, not gdb_string.h.
	* opencl-lang.c: Use string.h, not gdb_string.h.
	* osabi.c: Use string.h, not gdb_string.h.
	* osdata.c: Use string.h, not gdb_string.h.
	* p-exp.y: Use string.h, not gdb_string.h.
	* p-lang.c: Use string.h, not gdb_string.h.
	* p-typeprint.c: Use string.h, not gdb_string.h.
	* parse.c: Use string.h, not gdb_string.h.
	* posix-hdep.c: Use string.h, not gdb_string.h.
	* ppc-linux-nat.c: Use string.h, not gdb_string.h.
	* ppc-sysv-tdep.c: Use string.h, not gdb_string.h.
	* ppcfbsd-tdep.c: Use string.h, not gdb_string.h.
	* ppcnbsd-tdep.c: Use string.h, not gdb_string.h.
	* ppcobsd-tdep.c: Use string.h, not gdb_string.h.
	* printcmd.c: Use string.h, not gdb_string.h.
	* procfs.c: Use string.h, not gdb_string.h.
	* prologue-value.c: Use string.h, not gdb_string.h.
	* python/py-auto-load.c: Use string.h, not gdb_string.h.
	* python/py-gdb-readline.c: Use string.h, not gdb_string.h.
	* ravenscar-thread.c: Use string.h, not gdb_string.h.
	* regcache.c: Use string.h, not gdb_string.h.
	* registry.c: Use string.h, not gdb_string.h.
	* remote-fileio.c: Use string.h, not gdb_string.h.
	* remote-m32r-sdi.c: Use string.h, not gdb_string.h.
	* remote-mips.c: Use string.h, not gdb_string.h.
	* remote-sim.c: Use string.h, not gdb_string.h.
	* remote.c: Use string.h, not gdb_string.h.
	* reverse.c: Use string.h, not gdb_string.h.
	* rs6000-aix-tdep.c: Use string.h, not gdb_string.h.
	* ser-base.c: Use string.h, not gdb_string.h.
	* ser-go32.c: Use string.h, not gdb_string.h.
	* ser-mingw.c: Use string.h, not gdb_string.h.
	* ser-pipe.c: Use string.h, not gdb_string.h.
	* ser-tcp.c: Use string.h, not gdb_string.h.
	* ser-unix.c: Use string.h, not gdb_string.h.
	* serial.c: Use string.h, not gdb_string.h.
	* sh-tdep.c: Use string.h, not gdb_string.h.
	* sh64-tdep.c: Use string.h, not gdb_string.h.
	* shnbsd-tdep.c: Use string.h, not gdb_string.h.
	* skip.c: Use string.h, not gdb_string.h.
	* sol-thread.c: Use string.h, not gdb_string.h.
	* solib-dsbt.c: Use string.h, not gdb_string.h.
	* solib-frv.c: Use string.h, not gdb_string.h.
	* solib-osf.c: Use string.h, not gdb_string.h.
	* solib-spu.c: Use string.h, not gdb_string.h.
	* solib-target.c: Use string.h, not gdb_string.h.
	* solib.c: Use string.h, not gdb_string.h.
	* somread.c: Use string.h, not gdb_string.h.
	* source.c: Use string.h, not gdb_string.h.
	* sparc-nat.c: Use string.h, not gdb_string.h.
	* sparc-sol2-tdep.c: Use string.h, not gdb_string.h.
	* sparc-tdep.c: Use string.h, not gdb_string.h.
	* sparc64-tdep.c: Use string.h, not gdb_string.h.
	* sparc64fbsd-tdep.c: Use string.h, not gdb_string.h.
	* sparc64nbsd-tdep.c: Use string.h, not gdb_string.h.
	* sparcnbsd-tdep.c: Use string.h, not gdb_string.h.
	* spu-linux-nat.c: Use string.h, not gdb_string.h.
	* spu-multiarch.c: Use string.h, not gdb_string.h.
	* spu-tdep.c: Use string.h, not gdb_string.h.
	* stabsread.c: Use string.h, not gdb_string.h.
	* stack.c: Use string.h, not gdb_string.h.
	* std-regs.c: Use string.h, not gdb_string.h.
	* symfile.c: Use string.h, not gdb_string.h.
	* symmisc.c: Use string.h, not gdb_string.h.
	* symtab.c: Use string.h, not gdb_string.h.
	* target.c: Use string.h, not gdb_string.h.
	* thread.c: Use string.h, not gdb_string.h.
	* tilegx-linux-nat.c: Use string.h, not gdb_string.h.
	* tilegx-tdep.c: Use string.h, not gdb_string.h.
	* top.c: Use string.h, not gdb_string.h.
	* tracepoint.c: Use string.h, not gdb_string.h.
	* tui/tui-command.c: Use string.h, not gdb_string.h.
	* tui/tui-data.c: Use string.h, not gdb_string.h.
	* tui/tui-disasm.c: Use string.h, not gdb_string.h.
	* tui/tui-file.c: Use string.h, not gdb_string.h.
	* tui/tui-layout.c: Use string.h, not gdb_string.h.
	* tui/tui-out.c: Use string.h, not gdb_string.h.
	* tui/tui-regs.c: Use string.h, not gdb_string.h.
	* tui/tui-source.c: Use string.h, not gdb_string.h.
	* tui/tui-stack.c: Use string.h, not gdb_string.h.
	* tui/tui-win.c: Use string.h, not gdb_string.h.
	* tui/tui-windata.c: Use string.h, not gdb_string.h.
	* tui/tui-winsource.c: Use string.h, not gdb_string.h.
	* typeprint.c: Use string.h, not gdb_string.h.
	* ui-file.c: Use string.h, not gdb_string.h.
	* ui-out.c: Use string.h, not gdb_string.h.
	* user-regs.c: Use string.h, not gdb_string.h.
	* utils.c: Use string.h, not gdb_string.h.
	* v850-tdep.c: Use string.h, not gdb_string.h.
	* valarith.c: Use string.h, not gdb_string.h.
	* valops.c: Use string.h, not gdb_string.h.
	* valprint.c: Use string.h, not gdb_string.h.
	* value.c: Use string.h, not gdb_string.h.
	* varobj.c: Use string.h, not gdb_string.h.
	* vax-tdep.c: Use string.h, not gdb_string.h.
	* vaxnbsd-tdep.c: Use string.h, not gdb_string.h.
	* vaxobsd-tdep.c: Use string.h, not gdb_string.h.
	* windows-nat.c: Use string.h, not gdb_string.h.
	* xcoffread.c: Use string.h, not gdb_string.h.
	* xml-support.c: Use string.h, not gdb_string.h.
	* xstormy16-tdep.c: Use string.h, not gdb_string.h.
	* xtensa-linux-nat.c: Use string.h, not gdb_string.h.
---
 gdb/ChangeLog                | 299 +++++++++++++++++++++++++++++++++++++++++++
 gdb/aarch64-tdep.c           |   2 +-
 gdb/ada-exp.y                |   2 +-
 gdb/ada-lang.c               |   2 +-
 gdb/ada-lex.l                |   2 +-
 gdb/ada-typeprint.c          |   2 +-
 gdb/ada-valprint.c           |   2 +-
 gdb/aix-thread.c             |   2 +-
 gdb/alpha-linux-tdep.c       |   2 +-
 gdb/alpha-mdebug-tdep.c      |   2 +-
 gdb/alpha-nat.c              |   2 +-
 gdb/alpha-osf1-tdep.c        |   2 +-
 gdb/alpha-tdep.c             |   2 +-
 gdb/alphanbsd-tdep.c         |   2 +-
 gdb/amd64-dicos-tdep.c       |   2 +-
 gdb/amd64-linux-nat.c        |   2 +-
 gdb/amd64-linux-tdep.c       |   2 +-
 gdb/amd64-nat.c              |   2 +-
 gdb/amd64-sol2-tdep.c        |   2 +-
 gdb/amd64fbsd-tdep.c         |   2 +-
 gdb/amd64obsd-tdep.c         |   2 +-
 gdb/arch-utils.c             |   2 +-
 gdb/arm-linux-nat.c          |   2 +-
 gdb/arm-linux-tdep.c         |   2 +-
 gdb/arm-tdep.c               |   2 +-
 gdb/arm-wince-tdep.c         |   2 +-
 gdb/armbsd-tdep.c            |   2 +-
 gdb/armnbsd-nat.c            |   2 +-
 gdb/armnbsd-tdep.c           |   2 +-
 gdb/armobsd-tdep.c           |   2 +-
 gdb/avr-tdep.c               |   2 +-
 gdb/ax-gdb.c                 |   2 +-
 gdb/ax-general.c             |   2 +-
 gdb/bcache.c                 |   2 +-
 gdb/bfin-tdep.c              |   2 +-
 gdb/breakpoint.c             |   2 +-
 gdb/build-id.c               |   2 +-
 gdb/buildsym.c               |   2 +-
 gdb/c-exp.y                  |   2 +-
 gdb/c-lang.c                 |   2 +-
 gdb/c-typeprint.c            |   2 +-
 gdb/c-valprint.c             |   2 +-
 gdb/charset.c                |   2 +-
 gdb/cli-out.c                |   2 +-
 gdb/cli/cli-cmds.c           |   2 +-
 gdb/cli/cli-decode.c         |   2 +-
 gdb/cli/cli-dump.c           |   2 +-
 gdb/cli/cli-interp.c         |   2 +-
 gdb/cli/cli-logging.c        |   2 +-
 gdb/cli/cli-script.c         |   2 +-
 gdb/cli/cli-setshow.c        |   2 +-
 gdb/cli/cli-utils.c          |   2 +-
 gdb/coffread.c               |   2 +-
 gdb/common/common-utils.c    |   2 +-
 gdb/common/filestuff.c       |   2 +-
 gdb/common/gdb_string.h      |  69 ----------
 gdb/common/linux-procfs.c    |   2 +-
 gdb/common/linux-ptrace.c    |   2 +-
 gdb/common/signals.c         |   2 +-
 gdb/common/vec.h             |   2 +-
 gdb/core-regset.c            |   2 +-
 gdb/corefile.c               |   2 +-
 gdb/corelow.c                |   2 +-
 gdb/cp-abi.c                 |   2 +-
 gdb/cp-support.c             |   2 +-
 gdb/cp-valprint.c            |   2 +-
 gdb/cris-tdep.c              |   2 +-
 gdb/d-lang.c                 |   2 +-
 gdb/dbxread.c                |   4 +-
 gdb/dcache.c                 |   2 +-
 gdb/demangle.c               |   2 +-
 gdb/dicos-tdep.c             |   2 +-
 gdb/disasm.c                 |   2 +-
 gdb/doublest.c               |   2 +-
 gdb/dsrec.c                  |   2 +-
 gdb/dummy-frame.c            |   2 +-
 gdb/dwarf2-frame.c           |   2 +-
 gdb/dwarf2loc.c              |   2 +-
 gdb/dwarf2read.c             |   2 +-
 gdb/elfread.c                |   2 +-
 gdb/environ.c                |   2 +-
 gdb/eval.c                   |   2 +-
 gdb/event-loop.c             |   2 +-
 gdb/exceptions.c             |   2 +-
 gdb/exec.c                   |   2 +-
 gdb/expprint.c               |   2 +-
 gdb/f-exp.y                  |   2 +-
 gdb/f-lang.c                 |   2 +-
 gdb/f-typeprint.c            |   2 +-
 gdb/f-valprint.c             |   2 +-
 gdb/fbsd-nat.c               |   2 +-
 gdb/findcmd.c                |   2 +-
 gdb/findvar.c                |   2 +-
 gdb/fork-child.c             |   2 +-
 gdb/frame.c                  |   2 +-
 gdb/frv-linux-tdep.c         |   2 +-
 gdb/frv-tdep.c               |   2 +-
 gdb/gdb.c                    |   2 +-
 gdb/gdb_bfd.c                |   2 +-
 gdb/gdbarch.c                |   2 +-
 gdb/gdbtypes.c               |   2 +-
 gdb/gnu-nat.c                |   2 +-
 gdb/gnu-v2-abi.c             |   2 +-
 gdb/gnu-v3-abi.c             |   2 +-
 gdb/go-exp.y                 |   2 +-
 gdb/go-lang.c                |   2 +-
 gdb/go32-nat.c               |   2 +-
 gdb/hppa-hpux-tdep.c         |   2 +-
 gdb/hppa-linux-nat.c         |   2 +-
 gdb/hppanbsd-tdep.c          |   2 +-
 gdb/hppaobsd-tdep.c          |   2 +-
 gdb/i386-cygwin-tdep.c       |   2 +-
 gdb/i386-dicos-tdep.c        |   2 +-
 gdb/i386-linux-nat.c         |   2 +-
 gdb/i386-linux-tdep.c        |   2 +-
 gdb/i386-nto-tdep.c          |   2 +-
 gdb/i386-sol2-tdep.c         |   2 +-
 gdb/i386-tdep.c              |   2 +-
 gdb/i386bsd-tdep.c           |   2 +-
 gdb/i386gnu-nat.c            |   2 +-
 gdb/i386nbsd-tdep.c          |   2 +-
 gdb/i386obsd-tdep.c          |   2 +-
 gdb/i387-tdep.c              |   2 +-
 gdb/ia64-libunwind-tdep.c    |   2 +-
 gdb/ia64-linux-nat.c         |   2 +-
 gdb/inf-child.c              |   2 +-
 gdb/inf-ptrace.c             |   2 +-
 gdb/inf-ttrace.c             |   2 +-
 gdb/infcall.c                |   2 +-
 gdb/infcmd.c                 |   2 +-
 gdb/inflow.c                 |   2 +-
 gdb/infrun.c                 |   2 +-
 gdb/interps.c                |   2 +-
 gdb/iq2000-tdep.c            |   2 +-
 gdb/irix5-nat.c              |   2 +-
 gdb/jv-exp.y                 |   2 +-
 gdb/jv-lang.c                |   2 +-
 gdb/jv-typeprint.c           |   2 +-
 gdb/jv-valprint.c            |   2 +-
 gdb/language.c               |   2 +-
 gdb/linux-fork.c             |   2 +-
 gdb/linux-nat.c              |   2 +-
 gdb/lm32-tdep.c              |   2 +-
 gdb/m2-exp.y                 |   2 +-
 gdb/m2-typeprint.c           |   2 +-
 gdb/m32c-tdep.c              |   2 +-
 gdb/m32r-linux-nat.c         |   2 +-
 gdb/m32r-linux-tdep.c        |   2 +-
 gdb/m32r-rom.c               |   2 +-
 gdb/m32r-tdep.c              |   2 +-
 gdb/m68hc11-tdep.c           |   2 +-
 gdb/m68k-tdep.c              |   2 +-
 gdb/m68kbsd-tdep.c           |   2 +-
 gdb/m68klinux-nat.c          |   2 +-
 gdb/m68klinux-tdep.c         |   2 +-
 gdb/m88k-tdep.c              |   2 +-
 gdb/macrocmd.c               |   2 +-
 gdb/main.c                   |   2 +-
 gdb/mdebugread.c             |   2 +-
 gdb/mem-break.c              |   2 +-
 gdb/memattr.c                |   2 +-
 gdb/memory-map.c             |   2 +-
 gdb/mep-tdep.c               |   2 +-
 gdb/mi/mi-cmd-break.c        |   2 +-
 gdb/mi/mi-cmd-disas.c        |   2 +-
 gdb/mi/mi-cmd-env.c          |   2 +-
 gdb/mi/mi-cmd-stack.c        |   2 +-
 gdb/mi/mi-cmd-var.c          |   2 +-
 gdb/mi/mi-cmds.c             |   2 +-
 gdb/mi/mi-console.c          |   2 +-
 gdb/mi/mi-getopt.c           |   2 +-
 gdb/mi/mi-interp.c           |   2 +-
 gdb/mi/mi-main.c             |   2 +-
 gdb/mi/mi-parse.c            |   2 +-
 gdb/microblaze-rom.c         |   2 +-
 gdb/microblaze-tdep.c        |   2 +-
 gdb/mingw-hdep.c             |   2 +-
 gdb/minidebug.c              |   2 +-
 gdb/minsyms.c                |   2 +-
 gdb/mips-irix-tdep.c         |   2 +-
 gdb/mips-linux-tdep.c        |   2 +-
 gdb/mips-tdep.c              |   2 +-
 gdb/mips64obsd-tdep.c        |   2 +-
 gdb/mipsnbsd-tdep.c          |   2 +-
 gdb/mipsread.c               |   2 +-
 gdb/mn10300-linux-tdep.c     |   2 +-
 gdb/mn10300-tdep.c           |   2 +-
 gdb/monitor.c                |   2 +-
 gdb/moxie-tdep.c             |   2 +-
 gdb/mt-tdep.c                |   2 +-
 gdb/nbsd-tdep.c              |   2 +-
 gdb/nios2-linux-tdep.c       |   2 +-
 gdb/nto-procfs.c             |   2 +-
 gdb/nto-tdep.c               |   2 +-
 gdb/objc-lang.c              |   2 +-
 gdb/objfiles.c               |   2 +-
 gdb/opencl-lang.c            |   2 +-
 gdb/osabi.c                  |   2 +-
 gdb/osdata.c                 |   2 +-
 gdb/p-exp.y                  |   2 +-
 gdb/p-lang.c                 |   2 +-
 gdb/p-typeprint.c            |   2 +-
 gdb/parse.c                  |   2 +-
 gdb/posix-hdep.c             |   2 +-
 gdb/ppc-linux-nat.c          |   2 +-
 gdb/ppc-sysv-tdep.c          |   2 +-
 gdb/ppcfbsd-tdep.c           |   2 +-
 gdb/ppcnbsd-tdep.c           |   2 +-
 gdb/ppcobsd-tdep.c           |   2 +-
 gdb/printcmd.c               |   2 +-
 gdb/procfs.c                 |   2 +-
 gdb/prologue-value.c         |   2 +-
 gdb/python/py-auto-load.c    |   2 +-
 gdb/python/py-gdb-readline.c |   2 +-
 gdb/ravenscar-thread.c       |   2 +-
 gdb/regcache.c               |   2 +-
 gdb/registry.c               |   2 +-
 gdb/remote-fileio.c          |   2 +-
 gdb/remote-m32r-sdi.c        |   2 +-
 gdb/remote-mips.c            |   2 +-
 gdb/remote-sim.c             |   2 +-
 gdb/remote.c                 |   2 +-
 gdb/reverse.c                |   2 +-
 gdb/rs6000-aix-tdep.c        |   2 +-
 gdb/ser-base.c               |   2 +-
 gdb/ser-go32.c               |   2 +-
 gdb/ser-mingw.c              |   2 +-
 gdb/ser-pipe.c               |   2 +-
 gdb/ser-tcp.c                |   2 +-
 gdb/ser-unix.c               |   2 +-
 gdb/serial.c                 |   2 +-
 gdb/sh-tdep.c                |   2 +-
 gdb/sh64-tdep.c              |   2 +-
 gdb/shnbsd-tdep.c            |   2 +-
 gdb/skip.c                   |   2 +-
 gdb/sol-thread.c             |   2 +-
 gdb/solib-dsbt.c             |   2 +-
 gdb/solib-frv.c              |   2 +-
 gdb/solib-osf.c              |   2 +-
 gdb/solib-spu.c              |   2 +-
 gdb/solib-target.c           |   2 +-
 gdb/solib.c                  |   2 +-
 gdb/somread.c                |   2 +-
 gdb/source.c                 |   2 +-
 gdb/sparc-nat.c              |   2 +-
 gdb/sparc-sol2-tdep.c        |   2 +-
 gdb/sparc-tdep.c             |   2 +-
 gdb/sparc64-tdep.c           |   2 +-
 gdb/sparc64fbsd-tdep.c       |   2 +-
 gdb/sparc64nbsd-tdep.c       |   2 +-
 gdb/sparcnbsd-tdep.c         |   2 +-
 gdb/spu-linux-nat.c          |   2 +-
 gdb/spu-multiarch.c          |   2 +-
 gdb/spu-tdep.c               |   2 +-
 gdb/stabsread.c              |   2 +-
 gdb/stack.c                  |   2 +-
 gdb/std-regs.c               |   2 +-
 gdb/symfile.c                |   2 +-
 gdb/symmisc.c                |   2 +-
 gdb/symtab.c                 |   2 +-
 gdb/target.c                 |   2 +-
 gdb/thread.c                 |   2 +-
 gdb/tilegx-linux-nat.c       |   2 +-
 gdb/tilegx-tdep.c            |   2 +-
 gdb/top.c                    |   2 +-
 gdb/tracepoint.c             |   2 +-
 gdb/tui/tui-command.c        |   2 +-
 gdb/tui/tui-data.c           |   2 +-
 gdb/tui/tui-disasm.c         |   2 +-
 gdb/tui/tui-file.c           |   2 +-
 gdb/tui/tui-layout.c         |   2 +-
 gdb/tui/tui-out.c            |   2 +-
 gdb/tui/tui-regs.c           |   2 +-
 gdb/tui/tui-source.c         |   2 +-
 gdb/tui/tui-stack.c          |   2 +-
 gdb/tui/tui-win.c            |   2 +-
 gdb/tui/tui-windata.c        |   2 +-
 gdb/tui/tui-winsource.c      |   2 +-
 gdb/typeprint.c              |   2 +-
 gdb/ui-file.c                |   2 +-
 gdb/ui-out.c                 |   2 +-
 gdb/user-regs.c              |   2 +-
 gdb/utils.c                  |   2 +-
 gdb/v850-tdep.c              |   2 +-
 gdb/valarith.c               |   2 +-
 gdb/valops.c                 |   2 +-
 gdb/valprint.c               |   2 +-
 gdb/value.c                  |   2 +-
 gdb/varobj.c                 |   2 +-
 gdb/vax-tdep.c               |   2 +-
 gdb/vaxnbsd-tdep.c           |   2 +-
 gdb/vaxobsd-tdep.c           |   2 +-
 gdb/windows-nat.c            |   2 +-
 gdb/xcoffread.c              |   2 +-
 gdb/xml-support.c            |   2 +-
 gdb/xstormy16-tdep.c         |   2 +-
 gdb/xtensa-linux-nat.c       |   2 +-
 297 files changed, 595 insertions(+), 365 deletions(-)
 delete mode 100644 gdb/common/gdb_string.h

diff --git a/gdb/aarch64-tdep.c b/gdb/aarch64-tdep.c
index ea25cf6..04ff1c5 100644
--- a/gdb/aarch64-tdep.c
+++ b/gdb/aarch64-tdep.c
@@ -24,7 +24,7 @@
 #include "inferior.h"
 #include "gdbcmd.h"
 #include "gdbcore.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "dis-asm.h"
 #include "regcache.h"
 #include "reggroups.h"
diff --git a/gdb/ada-exp.y b/gdb/ada-exp.y
index 5270461..0a0c1e7 100644
--- a/gdb/ada-exp.y
+++ b/gdb/ada-exp.y
@@ -36,7 +36,7 @@
 %{
 
 #include "defs.h"
-#include "gdb_string.h"
+#include <string.h>
 #include <ctype.h>
 #include "expression.h"
 #include "value.h"
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index 4adda1c..28daa24 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -20,7 +20,7 @@
 
 #include "defs.h"
 #include <stdio.h>
-#include "gdb_string.h"
+#include <string.h>
 #include <ctype.h>
 #include <stdarg.h>
 #include "demangle.h"
diff --git a/gdb/ada-lex.l b/gdb/ada-lex.l
index 2f9e1b3..3c30043 100644
--- a/gdb/ada-lex.l
+++ b/gdb/ada-lex.l
@@ -288,7 +288,7 @@ false		{ return FALSEKEYWORD; }
 %%
 
 #include <ctype.h>
-#include "gdb_string.h"
+#include <string.h>
 
 /* Initialize the lexer for processing new expression. */
 
diff --git a/gdb/ada-typeprint.c b/gdb/ada-typeprint.c
index 2f70555..0c3d314 100644
--- a/gdb/ada-typeprint.c
+++ b/gdb/ada-typeprint.c
@@ -34,7 +34,7 @@
 #include "ada-lang.h"
 
 #include <ctype.h>
-#include "gdb_string.h"
+#include <string.h>
 #include <errno.h>
 
 static int print_selected_record_field_types (struct type *, struct type *,
diff --git a/gdb/ada-valprint.c b/gdb/ada-valprint.c
index 4a04d28..9f64e56 100644
--- a/gdb/ada-valprint.c
+++ b/gdb/ada-valprint.c
@@ -19,7 +19,7 @@
 
 #include "defs.h"
 #include <ctype.h>
-#include "gdb_string.h"
+#include <string.h>
 #include "symtab.h"
 #include "gdbtypes.h"
 #include "expression.h"
diff --git a/gdb/aix-thread.c b/gdb/aix-thread.c
index 373a09a..df21a99 100644
--- a/gdb/aix-thread.c
+++ b/gdb/aix-thread.c
@@ -47,7 +47,7 @@
 #include "regcache.h"
 #include "gdbcmd.h"
 #include "ppc-tdep.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "observer.h"
 
 #include <procinfo.h>
diff --git a/gdb/alpha-linux-tdep.c b/gdb/alpha-linux-tdep.c
index 8cb087e..c270747 100644
--- a/gdb/alpha-linux-tdep.c
+++ b/gdb/alpha-linux-tdep.c
@@ -19,7 +19,7 @@
 #include "defs.h"
 #include "frame.h"
 #include "gdb_assert.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "osabi.h"
 #include "solib-svr4.h"
 #include "symtab.h"
diff --git a/gdb/alpha-mdebug-tdep.c b/gdb/alpha-mdebug-tdep.c
index 785aec0..78d20e6 100644
--- a/gdb/alpha-mdebug-tdep.c
+++ b/gdb/alpha-mdebug-tdep.c
@@ -24,7 +24,7 @@
 #include "gdbcore.h"
 #include "block.h"
 #include "gdb_assert.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "trad-frame.h"
 
 #include "alpha-tdep.h"
diff --git a/gdb/alpha-nat.c b/gdb/alpha-nat.c
index 2aa6bda..98da17e 100644
--- a/gdb/alpha-nat.c
+++ b/gdb/alpha-nat.c
@@ -17,7 +17,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "inferior.h"
 #include "gdbcore.h"
 #include "target.h"
diff --git a/gdb/alpha-osf1-tdep.c b/gdb/alpha-osf1-tdep.c
index a4b084c..8d7c9ab 100644
--- a/gdb/alpha-osf1-tdep.c
+++ b/gdb/alpha-osf1-tdep.c
@@ -21,7 +21,7 @@
 #include "gdbcore.h"
 #include "value.h"
 #include "osabi.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "objfiles.h"
 
 #include "alpha-tdep.h"
diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c
index a8b90b9..ebaa1dd 100644
--- a/gdb/alpha-tdep.c
+++ b/gdb/alpha-tdep.c
@@ -31,7 +31,7 @@
 #include "dis-asm.h"
 #include "symfile.h"
 #include "objfiles.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "linespec.h"
 #include "regcache.h"
 #include "reggroups.h"
diff --git a/gdb/alphanbsd-tdep.c b/gdb/alphanbsd-tdep.c
index 757bc46..b19c72c 100644
--- a/gdb/alphanbsd-tdep.c
+++ b/gdb/alphanbsd-tdep.c
@@ -28,7 +28,7 @@
 #include "value.h"
 
 #include "gdb_assert.h"
-#include "gdb_string.h"
+#include <string.h>
 
 #include "alpha-tdep.h"
 #include "alphabsd-tdep.h"
diff --git a/gdb/amd64-dicos-tdep.c b/gdb/amd64-dicos-tdep.c
index 6bc7403..df97152 100644
--- a/gdb/amd64-dicos-tdep.c
+++ b/gdb/amd64-dicos-tdep.c
@@ -19,7 +19,7 @@
 
 #include "defs.h"
 #include "osabi.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "amd64-tdep.h"
 #include "dicos-tdep.h"
 
diff --git a/gdb/amd64-linux-nat.c b/gdb/amd64-linux-nat.c
index a61d218..dca3d0a 100644
--- a/gdb/amd64-linux-nat.c
+++ b/gdb/amd64-linux-nat.c
@@ -29,7 +29,7 @@
 #include "btrace.h"
 
 #include "gdb_assert.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "elf/common.h"
 #include <sys/uio.h>
 #include <sys/ptrace.h>
diff --git a/gdb/amd64-linux-tdep.c b/gdb/amd64-linux-tdep.c
index 4f67762..73864ec 100644
--- a/gdb/amd64-linux-tdep.c
+++ b/gdb/amd64-linux-tdep.c
@@ -33,7 +33,7 @@
 #include "linux-tdep.h"
 #include "i386-xstate.h"
 
-#include "gdb_string.h"
+#include <string.h>
 
 #include "amd64-tdep.h"
 #include "solib-svr4.h"
diff --git a/gdb/amd64-nat.c b/gdb/amd64-nat.c
index 2a9239a..4f70d0d 100644
--- a/gdb/amd64-nat.c
+++ b/gdb/amd64-nat.c
@@ -22,7 +22,7 @@
 #include "regcache.h"
 
 #include "gdb_assert.h"
-#include "gdb_string.h"
+#include <string.h>
 
 #include "i386-tdep.h"
 #include "amd64-tdep.h"
diff --git a/gdb/amd64-sol2-tdep.c b/gdb/amd64-sol2-tdep.c
index a880334..786119c 100644
--- a/gdb/amd64-sol2-tdep.c
+++ b/gdb/amd64-sol2-tdep.c
@@ -26,7 +26,7 @@
 #include "osabi.h"
 #include "symtab.h"
 
-#include "gdb_string.h"
+#include <string.h>
 
 #include "sol2-tdep.h"
 #include "amd64-tdep.h"
diff --git a/gdb/amd64fbsd-tdep.c b/gdb/amd64fbsd-tdep.c
index 1b94fe1..9846d7f 100644
--- a/gdb/amd64fbsd-tdep.c
+++ b/gdb/amd64fbsd-tdep.c
@@ -25,7 +25,7 @@
 #include "osabi.h"
 
 #include "gdb_assert.h"
-#include "gdb_string.h"
+#include <string.h>
 
 #include "amd64-tdep.h"
 #include "bsd-uthread.h"
diff --git a/gdb/amd64obsd-tdep.c b/gdb/amd64obsd-tdep.c
index ae0ead1..c8e712d 100644
--- a/gdb/amd64obsd-tdep.c
+++ b/gdb/amd64obsd-tdep.c
@@ -30,7 +30,7 @@
 #include "trad-frame.h"
 
 #include "gdb_assert.h"
-#include "gdb_string.h"
+#include <string.h>
 
 #include "amd64-tdep.h"
 #include "i387-tdep.h"
diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c
index 459fd88..cb566ad 100644
--- a/gdb/arch-utils.c
+++ b/gdb/arch-utils.c
@@ -23,7 +23,7 @@
 #include "buildsym.h"
 #include "gdbcmd.h"
 #include "inferior.h"		/* enum CALL_DUMMY_LOCATION et al.  */
-#include "gdb_string.h"
+#include <string.h>
 #include "regcache.h"
 #include "gdb_assert.h"
 #include "sim-regno.h"
diff --git a/gdb/arm-linux-nat.c b/gdb/arm-linux-nat.c
index 96573d9..c43a7e4 100644
--- a/gdb/arm-linux-nat.c
+++ b/gdb/arm-linux-nat.c
@@ -19,7 +19,7 @@
 #include "defs.h"
 #include "inferior.h"
 #include "gdbcore.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "regcache.h"
 #include "target.h"
 #include "linux-nat.h"
diff --git a/gdb/arm-linux-tdep.c b/gdb/arm-linux-tdep.c
index 7546d34..9deed10 100644
--- a/gdb/arm-linux-tdep.c
+++ b/gdb/arm-linux-tdep.c
@@ -50,7 +50,7 @@
 #include "user-regs.h"
 #include <ctype.h>
 #include "elf/common.h"
-#include "gdb_string.h"
+#include <string.h>
 
 extern int arm_apcs_32;
 
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index 1ed21ea..74e2f48 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -25,7 +25,7 @@
 #include "inferior.h"
 #include "gdbcmd.h"
 #include "gdbcore.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "dis-asm.h"		/* For register styles.  */
 #include "regcache.h"
 #include "reggroups.h"
diff --git a/gdb/arm-wince-tdep.c b/gdb/arm-wince-tdep.c
index 0e888e0..e63dc89 100644
--- a/gdb/arm-wince-tdep.c
+++ b/gdb/arm-wince-tdep.c
@@ -24,7 +24,7 @@
 #include "target.h"
 #include "frame.h"
 
-#include "gdb_string.h"
+#include <string.h>
 
 #include "arm-tdep.h"
 #include "windows-tdep.h"
diff --git a/gdb/armbsd-tdep.c b/gdb/armbsd-tdep.c
index a893a67..efac0dc 100644
--- a/gdb/armbsd-tdep.c
+++ b/gdb/armbsd-tdep.c
@@ -23,7 +23,7 @@
 #include "regset.h"
 
 #include "gdb_assert.h"
-#include "gdb_string.h"
+#include <string.h>
 
 #include "arm-tdep.h"
 
diff --git a/gdb/armnbsd-nat.c b/gdb/armnbsd-nat.c
index 20d8378..0779c14 100644
--- a/gdb/armnbsd-nat.c
+++ b/gdb/armnbsd-nat.c
@@ -23,7 +23,7 @@
 #include "regcache.h"
 #include "target.h"
 
-#include "gdb_string.h"
+#include <string.h>
 #include <sys/types.h>
 #include <sys/ptrace.h>
 #include <machine/reg.h>
diff --git a/gdb/armnbsd-tdep.c b/gdb/armnbsd-tdep.c
index abb7637..4b03b1b 100644
--- a/gdb/armnbsd-tdep.c
+++ b/gdb/armnbsd-tdep.c
@@ -20,7 +20,7 @@
 #include "defs.h"
 #include "osabi.h"
 
-#include "gdb_string.h"
+#include <string.h>
 
 #include "arm-tdep.h"
 #include "solib-svr4.h"
diff --git a/gdb/armobsd-tdep.c b/gdb/armobsd-tdep.c
index 384ef87..37f69ca 100644
--- a/gdb/armobsd-tdep.c
+++ b/gdb/armobsd-tdep.c
@@ -22,7 +22,7 @@
 #include "trad-frame.h"
 #include "tramp-frame.h"
 
-#include "gdb_string.h"
+#include <string.h>
 
 #include "obsd-tdep.h"
 #include "arm-tdep.h"
diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c
index fc4e0f0..6d243c4 100644
--- a/gdb/avr-tdep.c
+++ b/gdb/avr-tdep.c
@@ -34,7 +34,7 @@
 #include "symfile.h"
 #include "arch-utils.h"
 #include "regcache.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "dis-asm.h"
 
 /* AVR Background:
diff --git a/gdb/ax-gdb.c b/gdb/ax-gdb.c
index 4196655..4f68128 100644
--- a/gdb/ax-gdb.c
+++ b/gdb/ax-gdb.c
@@ -30,7 +30,7 @@
 #include "target.h"
 #include "ax.h"
 #include "ax-gdb.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "block.h"
 #include "regcache.h"
 #include "user-regs.h"
diff --git a/gdb/ax-general.c b/gdb/ax-general.c
index 78d7f7e..4489c20 100644
--- a/gdb/ax-general.c
+++ b/gdb/ax-general.c
@@ -25,7 +25,7 @@
 #include "ax.h"
 
 #include "value.h"
-#include "gdb_string.h"
+#include <string.h>
 
 #include "user-regs.h"
 
diff --git a/gdb/bcache.c b/gdb/bcache.c
index 712142d..6efccc7 100644
--- a/gdb/bcache.c
+++ b/gdb/bcache.c
@@ -22,7 +22,7 @@
 #include "defs.h"
 #include "gdb_obstack.h"
 #include "bcache.h"
-#include "gdb_string.h"		/* For memcpy declaration */
+#include <string.h>		/* For memcpy declaration */
 #include "gdb_assert.h"
 
 #include <stddef.h>
diff --git a/gdb/bfin-tdep.c b/gdb/bfin-tdep.c
index 22dad1b..5e77a7f 100644
--- a/gdb/bfin-tdep.c
+++ b/gdb/bfin-tdep.c
@@ -20,7 +20,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "inferior.h"
 #include "gdbcore.h"
 #include "arch-utils.h"
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 260021e..897b664 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -35,7 +35,7 @@
 #include "gdbthread.h"
 #include "target.h"
 #include "language.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "gdb-demangle.h"
 #include "filenames.h"
 #include "annotate.h"
diff --git a/gdb/build-id.c b/gdb/build-id.c
index 330ed18..30f5179 100644
--- a/gdb/build-id.c
+++ b/gdb/build-id.c
@@ -22,7 +22,7 @@
 #include "elf-bfd.h"
 #include "gdb_bfd.h"
 #include "build-id.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "gdb_vecs.h"
 #include "symfile.h"
 #include "objfiles.h"
diff --git a/gdb/buildsym.c b/gdb/buildsym.c
index 68a667a..0326e26 100644
--- a/gdb/buildsym.c
+++ b/gdb/buildsym.c
@@ -32,7 +32,7 @@
 #include "gdbtypes.h"
 #include "gdb_assert.h"
 #include "complaints.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "expression.h"		/* For "enum exp_opcode" used by...  */
 #include "bcache.h"
 #include "filenames.h"		/* For DOSish file names.  */
diff --git a/gdb/c-exp.y b/gdb/c-exp.y
index fecfd15..5d4cd81 100644
--- a/gdb/c-exp.y
+++ b/gdb/c-exp.y
@@ -36,7 +36,7 @@
 %{
 
 #include "defs.h"
-#include "gdb_string.h"
+#include <string.h>
 #include <ctype.h>
 #include "expression.h"
 #include "value.h"
diff --git a/gdb/c-lang.c b/gdb/c-lang.c
index 37b423a..eecc76d 100644
--- a/gdb/c-lang.c
+++ b/gdb/c-lang.c
@@ -29,7 +29,7 @@
 #include "macroscope.h"
 #include "gdb_assert.h"
 #include "charset.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "demangle.h"
 #include "cp-abi.h"
 #include "cp-support.h"
diff --git a/gdb/c-typeprint.c b/gdb/c-typeprint.c
index bf4564f..2757337 100644
--- a/gdb/c-typeprint.c
+++ b/gdb/c-typeprint.c
@@ -31,7 +31,7 @@
 #include "typeprint.h"
 #include "cp-abi.h"
 #include "jv-lang.h"
-#include "gdb_string.h"
+#include <string.h>
 #include <errno.h>
 #include "cp-support.h"
 
diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c
index 3466df0..5a21f55 100644
--- a/gdb/c-valprint.c
+++ b/gdb/c-valprint.c
@@ -18,7 +18,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "symtab.h"
 #include "gdbtypes.h"
 #include "expression.h"
diff --git a/gdb/charset.c b/gdb/charset.c
index 5835fd4..1f44e8f 100644
--- a/gdb/charset.c
+++ b/gdb/charset.c
@@ -30,7 +30,7 @@
 #include "gdb_vecs.h"
 
 #include <stddef.h>
-#include "gdb_string.h"
+#include <string.h>
 #include <ctype.h>
 
 #ifdef USE_WIN32API
diff --git a/gdb/cli-out.c b/gdb/cli-out.c
index 380352b..380b662 100644
--- a/gdb/cli-out.c
+++ b/gdb/cli-out.c
@@ -23,7 +23,7 @@
 #include "defs.h"
 #include "ui-out.h"
 #include "cli-out.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "gdb_assert.h"
 #include "vec.h"
 
diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c
index 0ef325d..85f1713 100644
--- a/gdb/cli/cli-cmds.c
+++ b/gdb/cli/cli-cmds.c
@@ -27,7 +27,7 @@
 #include "target.h"	/* For baud_rate, remote_debug and remote_timeout.  */
 #include "gdb_wait.h"	/* For shell escape implementation.  */
 #include "gdb_regex.h"	/* Used by apropos_command.  */
-#include "gdb_string.h"
+#include <string.h>
 #include "gdb_vfork.h"
 #include "linespec.h"
 #include "expression.h"
diff --git a/gdb/cli/cli-decode.c b/gdb/cli/cli-decode.c
index 7e315c1..fd40614 100644
--- a/gdb/cli/cli-decode.c
+++ b/gdb/cli/cli-decode.c
@@ -19,7 +19,7 @@
 #include "symtab.h"
 #include <ctype.h>
 #include "gdb_regex.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "completer.h"
 #include "ui-out.h"
 #include "cli/cli-cmds.h"
diff --git a/gdb/cli/cli-dump.c b/gdb/cli/cli-dump.c
index 774aa7e..440c730 100644
--- a/gdb/cli/cli-dump.c
+++ b/gdb/cli/cli-dump.c
@@ -20,7 +20,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "cli/cli-decode.h"
 #include "cli/cli-cmds.h"
 #include "value.h"
diff --git a/gdb/cli/cli-interp.c b/gdb/cli/cli-interp.c
index ac3d9a8..41de005 100644
--- a/gdb/cli/cli-interp.c
+++ b/gdb/cli/cli-interp.c
@@ -23,7 +23,7 @@
 #include "ui-out.h"
 #include "cli-out.h"
 #include "top.h"		/* for "execute_command" */
-#include "gdb_string.h"
+#include <string.h>
 #include "exceptions.h"
 
 struct ui_out *cli_uiout;
diff --git a/gdb/cli/cli-logging.c b/gdb/cli/cli-logging.c
index 5704179..544af00 100644
--- a/gdb/cli/cli-logging.c
+++ b/gdb/cli/cli-logging.c
@@ -23,7 +23,7 @@
 #include "interps.h"
 #include "gdb_assert.h"
 
-#include "gdb_string.h"
+#include <string.h>
 
 /* These hold the pushed copies of the gdb output files.
    If NULL then nothing has yet been pushed.  */
diff --git a/gdb/cli/cli-script.c b/gdb/cli/cli-script.c
index 6ea3243..3e8ed7f 100644
--- a/gdb/cli/cli-script.c
+++ b/gdb/cli/cli-script.c
@@ -23,7 +23,7 @@
 #include <ctype.h>
 
 #include "ui-out.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "exceptions.h"
 #include "top.h"
 #include "breakpoint.h"
diff --git a/gdb/cli/cli-setshow.c b/gdb/cli/cli-setshow.c
index 45df6f6..9222091 100644
--- a/gdb/cli/cli-setshow.c
+++ b/gdb/cli/cli-setshow.c
@@ -19,7 +19,7 @@
 #include "readline/tilde.h"
 #include "value.h"
 #include <ctype.h>
-#include "gdb_string.h"
+#include <string.h>
 #include "arch-utils.h"
 #include "observer.h"
 
diff --git a/gdb/cli/cli-utils.c b/gdb/cli/cli-utils.c
index 316cf4f..80df4ab 100644
--- a/gdb/cli/cli-utils.c
+++ b/gdb/cli/cli-utils.c
@@ -19,7 +19,7 @@
 
 #include "defs.h"
 #include "cli/cli-utils.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "value.h"
 #include "gdb_assert.h"
 
diff --git a/gdb/coffread.c b/gdb/coffread.c
index 959e96a..b49e30c 100644
--- a/gdb/coffread.c
+++ b/gdb/coffread.c
@@ -26,7 +26,7 @@
 #include "bfd.h"
 #include "gdb_obstack.h"
 
-#include "gdb_string.h"
+#include <string.h>
 #include <ctype.h>
 
 #include "coff/internal.h"	/* Internal format of COFF symbols in BFD */
diff --git a/gdb/common/common-utils.c b/gdb/common/common-utils.c
index 4204abf..4f2b78a 100644
--- a/gdb/common/common-utils.c
+++ b/gdb/common/common-utils.c
@@ -24,7 +24,7 @@
 #endif
 
 #include "gdb_assert.h"
-#include "gdb_string.h"
+#include <string.h>
 
 #include <stdlib.h>
 #include <stdio.h>
diff --git a/gdb/common/filestuff.c b/gdb/common/filestuff.c
index 4032f36..ff6d54f 100644
--- a/gdb/common/filestuff.c
+++ b/gdb/common/filestuff.c
@@ -20,7 +20,7 @@
 #include "server.h"
 #else
 #include "defs.h"
-#include "gdb_string.h"
+#include <string.h>
 #endif
 #include "filestuff.h"
 #include "gdb_vecs.h"
diff --git a/gdb/common/gdb_string.h b/gdb/common/gdb_string.h
deleted file mode 100644
index b7c52cf..0000000
--- a/gdb/common/gdb_string.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/* Portable <string.h>
-
-   Copyright (C) 1995-2013 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#if !defined(GDB_STRING_H)
-#define GDB_STRING_H
-
-#ifdef STDC_HEADERS
-#include <string.h>
-#ifdef HAVE_STRINGS_H
-#include <strings.h> /* strcasecmp etc..  */
-#endif
-#else
-#ifdef HAVE_STRING_H
-#include <string.h>
-#else
-#include <strings.h>
-#endif
-
-#ifndef strchr
-extern char *strchr (const char *, int);	/* X3.159-1989  4.11.5.2 */
-#endif
-
-#ifndef strrchr
-extern char *strrchr (const char *, int);	/* X3.159-1989  4.11.5.5 */
-#endif
-
-#ifndef strtok
-extern char *strtok (char *, const char *);	/* X3.159-1989  4.11.5.8 */
-#endif
-
-#ifdef HAVE_MEMORY_H
-#include <memory.h>
-#else
-extern void *memset ();
-extern void *memcpy ();
-extern void *memmove ();
-extern int memcmp ();
-#endif
-#endif /* STDC_HEADERS */
-
-#if !HAVE_DECL_STRERROR
-#ifndef strerror
-extern char *strerror (int);	/* X3.159-1989  4.11.6.2 */
-#endif
-#endif
-
-#if !HAVE_DECL_STRSTR
-#ifndef strstr
-extern char *strstr (const char *, const char *); /* X3.159-1989  4.11.5.7 */
-#endif
-#endif
-
-#endif /* !defined(GDB_STRING_H) */
diff --git a/gdb/common/linux-procfs.c b/gdb/common/linux-procfs.c
index 583ec98..ec0f6c7 100644
--- a/gdb/common/linux-procfs.c
+++ b/gdb/common/linux-procfs.c
@@ -20,7 +20,7 @@
 #include "server.h"
 #else
 #include "defs.h"
-#include "gdb_string.h"
+#include <string.h>
 #endif
 
 #include "linux-procfs.h"
diff --git a/gdb/common/linux-ptrace.c b/gdb/common/linux-ptrace.c
index 9f11f2f..2b12a68 100644
--- a/gdb/common/linux-ptrace.c
+++ b/gdb/common/linux-ptrace.c
@@ -20,7 +20,7 @@
 #include "server.h"
 #else
 #include "defs.h"
-#include "gdb_string.h"
+#include <string.h>
 #endif
 
 #include "linux-ptrace.h"
diff --git a/gdb/common/signals.c b/gdb/common/signals.c
index 1f3e3a4..2995195 100644
--- a/gdb/common/signals.c
+++ b/gdb/common/signals.c
@@ -21,7 +21,7 @@
 #include "server.h"
 #else
 #include "defs.h"
-#include "gdb_string.h"
+#include <string.h>
 #endif
 
 #ifdef HAVE_SIGNAL_H
diff --git a/gdb/common/vec.h b/gdb/common/vec.h
index 86564e7..b4988a7 100644
--- a/gdb/common/vec.h
+++ b/gdb/common/vec.h
@@ -22,7 +22,7 @@
 
 #include <stddef.h>
 
-#include "gdb_string.h"
+#include <string.h>
 #include "gdb_assert.h"
 
 /* The macros here implement a set of templated vector types and
diff --git a/gdb/core-regset.c b/gdb/core-regset.c
index 20a3379..15a5f1f 100644
--- a/gdb/core-regset.c
+++ b/gdb/core-regset.c
@@ -35,7 +35,7 @@
 
 #include <fcntl.h>
 #include <errno.h>
-#include "gdb_string.h"
+#include <string.h>
 #include <time.h>
 #ifdef HAVE_SYS_PROCFS_H
 #include <sys/procfs.h>
diff --git a/gdb/corefile.c b/gdb/corefile.c
index 345df90..e82f978 100644
--- a/gdb/corefile.c
+++ b/gdb/corefile.c
@@ -18,7 +18,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
-#include "gdb_string.h"
+#include <string.h>
 #include <errno.h>
 #include <signal.h>
 #include <fcntl.h>
diff --git a/gdb/corelow.c b/gdb/corelow.c
index 78f8120..2869eea 100644
--- a/gdb/corelow.c
+++ b/gdb/corelow.c
@@ -19,7 +19,7 @@
 
 #include "defs.h"
 #include "arch-utils.h"
-#include "gdb_string.h"
+#include <string.h>
 #include <errno.h>
 #include <signal.h>
 #include <fcntl.h>
diff --git a/gdb/cp-abi.c b/gdb/cp-abi.c
index 2540eca..f185889 100644
--- a/gdb/cp-abi.c
+++ b/gdb/cp-abi.c
@@ -25,7 +25,7 @@
 #include "gdbcmd.h"
 #include "ui-out.h"
 #include "gdb_assert.h"
-#include "gdb_string.h"
+#include <string.h>
 
 static struct cp_abi_ops *find_cp_abi (const char *short_name);
 
diff --git a/gdb/cp-support.c b/gdb/cp-support.c
index b91bcdc..6b85ecb 100644
--- a/gdb/cp-support.c
+++ b/gdb/cp-support.c
@@ -20,7 +20,7 @@
 
 #include "defs.h"
 #include "cp-support.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "demangle.h"
 #include "gdb_assert.h"
 #include "gdbcmd.h"
diff --git a/gdb/cp-valprint.c b/gdb/cp-valprint.c
index 4b625d1..bcf54ff 100644
--- a/gdb/cp-valprint.c
+++ b/gdb/cp-valprint.c
@@ -27,7 +27,7 @@
 #include "gdbcmd.h"
 #include "demangle.h"
 #include "annotate.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "c-lang.h"
 #include "target.h"
 #include "cp-abi.h"
diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c
index 8ba1677..b320c51 100644
--- a/gdb/cris-tdep.c
+++ b/gdb/cris-tdep.c
@@ -43,7 +43,7 @@
 
 #include "solib.h"              /* Support for shared libraries.  */
 #include "solib-svr4.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "dis-asm.h"
 
 #include "cris-tdep.h"
diff --git a/gdb/d-lang.c b/gdb/d-lang.c
index 3dad91f..35d92ea 100644
--- a/gdb/d-lang.c
+++ b/gdb/d-lang.c
@@ -23,7 +23,7 @@
 #include "varobj.h"
 #include "d-lang.h"
 #include "c-lang.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "parser-defs.h"
 #include "gdb_obstack.h"
 
diff --git a/gdb/dbxread.c b/gdb/dbxread.c
index 00949ac..67deeec 100644
--- a/gdb/dbxread.c
+++ b/gdb/dbxread.c
@@ -31,7 +31,7 @@
    for real.  dbx_psymtab_to_symtab() is the function that does this */
 
 #include "defs.h"
-#include "gdb_string.h"
+#include <string.h>
 
 #if defined(__CYGNUSCLIB__)
 #include <sys/types.h>
@@ -58,7 +58,7 @@
 #include "block.h"
 
 #include "gdb_assert.h"
-#include "gdb_string.h"
+#include <string.h>
 
 #include "aout/aout64.h"
 #include "aout/stab_gnu.h"	/* We always use GNU stabs, not
diff --git a/gdb/dcache.c b/gdb/dcache.c
index acb9de4..bacd629 100644
--- a/gdb/dcache.c
+++ b/gdb/dcache.c
@@ -20,7 +20,7 @@
 #include "defs.h"
 #include "dcache.h"
 #include "gdbcmd.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "gdbcore.h"
 #include "target.h"
 #include "inferior.h"
diff --git a/gdb/demangle.c b/gdb/demangle.c
index 415d891..2d4b0c5 100644
--- a/gdb/demangle.c
+++ b/gdb/demangle.c
@@ -28,7 +28,7 @@
 #include "gdbcmd.h"
 #include "demangle.h"
 #include "gdb-demangle.h"
-#include "gdb_string.h"
+#include <string.h>
 
 /* Select the default C++ demangling style to use.  The default is "auto",
    which allows gdb to attempt to pick an appropriate demangling style for
diff --git a/gdb/dicos-tdep.c b/gdb/dicos-tdep.c
index 6b3e071..27469a5 100644
--- a/gdb/dicos-tdep.c
+++ b/gdb/dicos-tdep.c
@@ -19,7 +19,7 @@
 
 #include "defs.h"
 #include "osabi.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "solib.h"
 #include "solib-target.h"
 #include "inferior.h"
diff --git a/gdb/disasm.c b/gdb/disasm.c
index e643c2d..1690395 100644
--- a/gdb/disasm.c
+++ b/gdb/disasm.c
@@ -21,7 +21,7 @@
 #include "target.h"
 #include "value.h"
 #include "ui-out.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "disasm.h"
 #include "gdbcore.h"
 #include "dis-asm.h"
diff --git a/gdb/doublest.c b/gdb/doublest.c
index 85890b1..a4889c9 100644
--- a/gdb/doublest.c
+++ b/gdb/doublest.c
@@ -27,7 +27,7 @@
 #include "doublest.h"
 #include "floatformat.h"
 #include "gdb_assert.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "gdbtypes.h"
 #include <math.h>		/* ldexp */
 
diff --git a/gdb/dsrec.c b/gdb/dsrec.c
index bc47f84..162fc64 100644
--- a/gdb/dsrec.c
+++ b/gdb/dsrec.c
@@ -22,7 +22,7 @@
 #include <sys/time.h>
 #include <time.h>
 #include "gdb_assert.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "gdb_bfd.h"
 
 extern int remote_debug;
diff --git a/gdb/dummy-frame.c b/gdb/dummy-frame.c
index 390a6d8..d24fcda 100644
--- a/gdb/dummy-frame.c
+++ b/gdb/dummy-frame.c
@@ -27,7 +27,7 @@
 #include "frame-unwind.h"
 #include "command.h"
 #include "gdbcmd.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "observer.h"
 #include "gdbthread.h"
 
diff --git a/gdb/dwarf2-frame.c b/gdb/dwarf2-frame.c
index cd4f47c..91d8802 100644
--- a/gdb/dwarf2-frame.c
+++ b/gdb/dwarf2-frame.c
@@ -33,7 +33,7 @@
 #include "value.h"
 
 #include "gdb_assert.h"
-#include "gdb_string.h"
+#include <string.h>
 
 #include "complaints.h"
 #include "dwarf2-frame.h"
diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c
index 1664f6a..2d15546 100644
--- a/gdb/dwarf2loc.c
+++ b/gdb/dwarf2loc.c
@@ -39,7 +39,7 @@
 #include "dwarf2loc.h"
 #include "dwarf2-frame.h"
 
-#include "gdb_string.h"
+#include <string.h>
 #include "gdb_assert.h"
 
 extern int dwarf2_always_disassemble;
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index ee6c4c7..5e8f94e 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -72,7 +72,7 @@
 #include "build-id.h"
 
 #include <fcntl.h>
-#include "gdb_string.h"
+#include <string.h>
 #include "gdb_assert.h"
 #include <sys/types.h>
 
diff --git a/gdb/elfread.c b/gdb/elfread.c
index 47602ef..42ab18f 100644
--- a/gdb/elfread.c
+++ b/gdb/elfread.c
@@ -21,7 +21,7 @@
 
 #include "defs.h"
 #include "bfd.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "elf-bfd.h"
 #include "elf/common.h"
 #include "elf/internal.h"
diff --git a/gdb/environ.c b/gdb/environ.c
index 50653da..fb5d90c 100644
--- a/gdb/environ.c
+++ b/gdb/environ.c
@@ -20,7 +20,7 @@
 
 #include "defs.h"
 #include "environ.h"
-#include "gdb_string.h"
+#include <string.h>
 \f
 
 /* Return a new environment object.  */
diff --git a/gdb/eval.c b/gdb/eval.c
index e83bfdf..9d81a92 100644
--- a/gdb/eval.c
+++ b/gdb/eval.c
@@ -18,7 +18,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "symtab.h"
 #include "gdbtypes.h"
 #include "value.h"
diff --git a/gdb/event-loop.c b/gdb/event-loop.c
index f34f153..a3c2875 100644
--- a/gdb/event-loop.c
+++ b/gdb/event-loop.c
@@ -31,7 +31,7 @@
 #endif
 
 #include <sys/types.h>
-#include "gdb_string.h"
+#include <string.h>
 #include <errno.h>
 #include <sys/time.h>
 #include "exceptions.h"
diff --git a/gdb/exceptions.c b/gdb/exceptions.c
index c4c1e57..2495fa5 100644
--- a/gdb/exceptions.c
+++ b/gdb/exceptions.c
@@ -25,7 +25,7 @@
 #include "annotate.h"
 #include "ui-out.h"
 #include "gdb_assert.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "serial.h"
 #include "gdbthread.h"
 
diff --git a/gdb/exec.c b/gdb/exec.c
index 187c412..afd3224 100644
--- a/gdb/exec.c
+++ b/gdb/exec.c
@@ -37,7 +37,7 @@
 
 #include <fcntl.h>
 #include "readline/readline.h"
-#include "gdb_string.h"
+#include <string.h>
 
 #include "gdbcore.h"
 
diff --git a/gdb/expprint.c b/gdb/expprint.c
index 6eb6f13..c385bf0 100644
--- a/gdb/expprint.c
+++ b/gdb/expprint.c
@@ -26,7 +26,7 @@
 #include "parser-defs.h"
 #include "user-regs.h"		/* For user_reg_map_regnum_to_name.  */
 #include "target.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "block.h"
 #include "objfiles.h"
 #include "gdb_assert.h"
diff --git a/gdb/f-exp.y b/gdb/f-exp.y
index 59c5e6c..567cd00 100644
--- a/gdb/f-exp.y
+++ b/gdb/f-exp.y
@@ -42,7 +42,7 @@
 %{
 
 #include "defs.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "expression.h"
 #include "value.h"
 #include "parser-defs.h"
diff --git a/gdb/f-lang.c b/gdb/f-lang.c
index 36560ce..a9f6bff 100644
--- a/gdb/f-lang.c
+++ b/gdb/f-lang.c
@@ -21,7 +21,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "symtab.h"
 #include "gdbtypes.h"
 #include "expression.h"
diff --git a/gdb/f-typeprint.c b/gdb/f-typeprint.c
index aa33231..f80d016 100644
--- a/gdb/f-typeprint.c
+++ b/gdb/f-typeprint.c
@@ -31,7 +31,7 @@
 #include "target.h"
 #include "f-lang.h"
 
-#include "gdb_string.h"
+#include <string.h>
 #include <errno.h>
 
 #if 0				/* Currently unused.  */
diff --git a/gdb/f-valprint.c b/gdb/f-valprint.c
index d01d6ec..751f7fa 100644
--- a/gdb/f-valprint.c
+++ b/gdb/f-valprint.c
@@ -21,7 +21,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "symtab.h"
 #include "gdbtypes.h"
 #include "expression.h"
diff --git a/gdb/fbsd-nat.c b/gdb/fbsd-nat.c
index 6a362da..6b37a17 100644
--- a/gdb/fbsd-nat.c
+++ b/gdb/fbsd-nat.c
@@ -25,7 +25,7 @@
 #include "gdbthread.h"
 
 #include "gdb_assert.h"
-#include "gdb_string.h"
+#include <string.h>
 #include <sys/types.h>
 #include <sys/procfs.h>
 #include <sys/sysctl.h>
diff --git a/gdb/findcmd.c b/gdb/findcmd.c
index a8cda9b..10c246b 100644
--- a/gdb/findcmd.c
+++ b/gdb/findcmd.c
@@ -20,7 +20,7 @@
 #include "defs.h"
 #include "arch-utils.h"
 #include <ctype.h>
-#include "gdb_string.h"
+#include <string.h>
 #include "gdbcmd.h"
 #include "value.h"
 #include "target.h"
diff --git a/gdb/findvar.c b/gdb/findvar.c
index c3550b4..ec6afd6 100644
--- a/gdb/findvar.c
+++ b/gdb/findvar.c
@@ -25,7 +25,7 @@
 #include "gdbcore.h"
 #include "inferior.h"
 #include "target.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "gdb_assert.h"
 #include "floatformat.h"
 #include "symfile.h"		/* for overlay functions */
diff --git a/gdb/fork-child.c b/gdb/fork-child.c
index a1e4902..61785fe 100644
--- a/gdb/fork-child.c
+++ b/gdb/fork-child.c
@@ -20,7 +20,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "inferior.h"
 #include "terminal.h"
 #include "target.h"
diff --git a/gdb/frame.c b/gdb/frame.c
index 59e31db..63f20d5 100644
--- a/gdb/frame.c
+++ b/gdb/frame.c
@@ -24,7 +24,7 @@
 #include "inferior.h"	/* for inferior_ptid */
 #include "regcache.h"
 #include "gdb_assert.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "user-regs.h"
 #include "gdb_obstack.h"
 #include "dummy-frame.h"
diff --git a/gdb/frv-linux-tdep.c b/gdb/frv-linux-tdep.c
index eb6fcf9..366eb02 100644
--- a/gdb/frv-linux-tdep.c
+++ b/gdb/frv-linux-tdep.c
@@ -30,7 +30,7 @@
 #include "trad-frame.h"
 #include "frame-unwind.h"
 #include "regset.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "linux-tdep.h"
 
 /* Define the size (in bytes) of an FR-V instruction.  */
diff --git a/gdb/frv-tdep.c b/gdb/frv-tdep.c
index 4b725c3..9819d42 100644
--- a/gdb/frv-tdep.c
+++ b/gdb/frv-tdep.c
@@ -18,7 +18,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "inferior.h"
 #include "gdbcore.h"
 #include "arch-utils.h"
diff --git a/gdb/gdb.c b/gdb/gdb.c
index 9ca7579..d01dc46 100644
--- a/gdb/gdb.c
+++ b/gdb/gdb.c
@@ -18,7 +18,7 @@
 
 #include "defs.h"
 #include "main.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "interps.h"
 
 int
diff --git a/gdb/gdb_bfd.c b/gdb/gdb_bfd.c
index 25cee5c..2beeb5d 100644
--- a/gdb/gdb_bfd.c
+++ b/gdb/gdb_bfd.c
@@ -20,7 +20,7 @@
 #include "defs.h"
 #include "gdb_bfd.h"
 #include "gdb_assert.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "ui-out.h"
 #include "gdbcmd.h"
 #include "hashtab.h"
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index 1f3380e..fb3595f 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -43,7 +43,7 @@
 #include "floatformat.h"
 
 #include "gdb_assert.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "reggroups.h"
 #include "osabi.h"
 #include "gdb_obstack.h"
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index 9069a11..e18a0d2 100644
--- a/gdb/gdbtypes.c
+++ b/gdb/gdbtypes.c
@@ -20,7 +20,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "bfd.h"
 #include "symtab.h"
 #include "symfile.h"
diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c
index 659aa67..329d090 100644
--- a/gdb/gnu-nat.c
+++ b/gdb/gnu-nat.c
@@ -28,7 +28,7 @@
 #include <setjmp.h>
 #include <signal.h>
 #include <stdio.h>
-#include "gdb_string.h"
+#include <string.h>
 #include <sys/ptrace.h>
 
 #include <mach.h>
diff --git a/gdb/gnu-v2-abi.c b/gdb/gnu-v2-abi.c
index e7f0166..1babe46 100644
--- a/gdb/gnu-v2-abi.c
+++ b/gdb/gnu-v2-abi.c
@@ -20,7 +20,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "symtab.h"
 #include "gdbtypes.h"
 #include "value.h"
diff --git a/gdb/gnu-v3-abi.c b/gdb/gnu-v3-abi.c
index 1821f18..e5b4fc8 100644
--- a/gdb/gnu-v3-abi.c
+++ b/gdb/gnu-v3-abi.c
@@ -30,7 +30,7 @@
 #include "typeprint.h"
 
 #include "gdb_assert.h"
-#include "gdb_string.h"
+#include <string.h>
 
 static struct cp_abi_ops gnu_v3_abi_ops;
 
diff --git a/gdb/go-exp.y b/gdb/go-exp.y
index 01c382a..50b9cc2 100644
--- a/gdb/go-exp.y
+++ b/gdb/go-exp.y
@@ -52,7 +52,7 @@
 %{
 
 #include "defs.h"
-#include "gdb_string.h"
+#include <string.h>
 #include <ctype.h>
 #include "expression.h"
 #include "value.h"
diff --git a/gdb/go-lang.c b/gdb/go-lang.c
index 4da1af4..4355e59 100644
--- a/gdb/go-lang.c
+++ b/gdb/go-lang.c
@@ -34,7 +34,7 @@
 #include "defs.h"
 #include "gdb_assert.h"
 #include "gdb_obstack.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "block.h"
 #include "symtab.h"
 #include "language.h"
diff --git a/gdb/go32-nat.c b/gdb/go32-nat.c
index a92a34f..c1172f6 100644
--- a/gdb/go32-nat.c
+++ b/gdb/go32-nat.c
@@ -99,7 +99,7 @@
 #include "i386-cpuid.h"
 #include "value.h"
 #include "regcache.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "top.h"
 #include "cli/cli-utils.h"
 
diff --git a/gdb/hppa-hpux-tdep.c b/gdb/hppa-hpux-tdep.c
index 88e59ba..c2ba1ee 100644
--- a/gdb/hppa-hpux-tdep.c
+++ b/gdb/hppa-hpux-tdep.c
@@ -36,7 +36,7 @@
 #include "regcache.h"
 #include "exceptions.h"
 
-#include "gdb_string.h"
+#include <string.h>
 
 #define IS_32BIT_TARGET(_gdbarch) \
 	((gdbarch_tdep (_gdbarch))->bytes_per_address == 4)
diff --git a/gdb/hppa-linux-nat.c b/gdb/hppa-linux-nat.c
index 4f5ca69..f38df6e 100644
--- a/gdb/hppa-linux-nat.c
+++ b/gdb/hppa-linux-nat.c
@@ -20,7 +20,7 @@
 #include "defs.h"
 #include "gdbcore.h"
 #include "regcache.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "inferior.h"
 #include "target.h"
 #include "linux-nat.h"
diff --git a/gdb/hppanbsd-tdep.c b/gdb/hppanbsd-tdep.c
index a8ac404..d1c84d7 100644
--- a/gdb/hppanbsd-tdep.c
+++ b/gdb/hppanbsd-tdep.c
@@ -26,7 +26,7 @@
 #include "tramp-frame.h"
 
 #include "gdb_assert.h"
-#include "gdb_string.h"
+#include <string.h>
 
 #include "hppa-tdep.h"
 #include "hppabsd-tdep.h"
diff --git a/gdb/hppaobsd-tdep.c b/gdb/hppaobsd-tdep.c
index 5b895c4..398e503 100644
--- a/gdb/hppaobsd-tdep.c
+++ b/gdb/hppaobsd-tdep.c
@@ -23,7 +23,7 @@
 #include "regset.h"
 
 #include "gdb_assert.h"
-#include "gdb_string.h"
+#include <string.h>
 
 #include "hppa-tdep.h"
 #include "hppabsd-tdep.h"
diff --git a/gdb/i386-cygwin-tdep.c b/gdb/i386-cygwin-tdep.c
index 6533d1c..7c39b7f 100644
--- a/gdb/i386-cygwin-tdep.c
+++ b/gdb/i386-cygwin-tdep.c
@@ -19,7 +19,7 @@
 
 #include "defs.h"
 #include "osabi.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "i386-tdep.h"
 #include "windows-tdep.h"
 #include "regset.h"
diff --git a/gdb/i386-dicos-tdep.c b/gdb/i386-dicos-tdep.c
index ff3a515..0f1dfc1 100644
--- a/gdb/i386-dicos-tdep.c
+++ b/gdb/i386-dicos-tdep.c
@@ -19,7 +19,7 @@
 
 #include "defs.h"
 #include "osabi.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "dicos-tdep.h"
 
 static void
diff --git a/gdb/i386-linux-nat.c b/gdb/i386-linux-nat.c
index 52ecc38..ba51d4c 100644
--- a/gdb/i386-linux-nat.c
+++ b/gdb/i386-linux-nat.c
@@ -29,7 +29,7 @@
 #include "btrace.h"
 
 #include "gdb_assert.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "elf/common.h"
 #include <sys/uio.h>
 #include <sys/ptrace.h>
diff --git a/gdb/i386-linux-tdep.c b/gdb/i386-linux-tdep.c
index 7b69aab..21aee96 100644
--- a/gdb/i386-linux-tdep.c
+++ b/gdb/i386-linux-tdep.c
@@ -27,7 +27,7 @@
 #include "osabi.h"
 #include "reggroups.h"
 #include "dwarf2-frame.h"
-#include "gdb_string.h"
+#include <string.h>
 
 #include "i386-tdep.h"
 #include "i386-linux-tdep.h"
diff --git a/gdb/i386-nto-tdep.c b/gdb/i386-nto-tdep.c
index e39e805..b314a49 100644
--- a/gdb/i386-nto-tdep.c
+++ b/gdb/i386-nto-tdep.c
@@ -26,7 +26,7 @@
 #include "target.h"
 
 #include "gdb_assert.h"
-#include "gdb_string.h"
+#include <string.h>
 
 #include "i386-tdep.h"
 #include "i387-tdep.h"
diff --git a/gdb/i386-sol2-tdep.c b/gdb/i386-sol2-tdep.c
index 3772138..134dca6 100644
--- a/gdb/i386-sol2-tdep.c
+++ b/gdb/i386-sol2-tdep.c
@@ -21,7 +21,7 @@
 #include "value.h"
 #include "osabi.h"
 
-#include "gdb_string.h"
+#include <string.h>
 
 #include "sol2-tdep.h"
 #include "i386-tdep.h"
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
index b159b49..9529dcc 100644
--- a/gdb/i386-tdep.c
+++ b/gdb/i386-tdep.c
@@ -45,7 +45,7 @@
 #include "remote.h"
 #include "exceptions.h"
 #include "gdb_assert.h"
-#include "gdb_string.h"
+#include <string.h>
 
 #include "i386-tdep.h"
 #include "i387-tdep.h"
diff --git a/gdb/i386bsd-tdep.c b/gdb/i386bsd-tdep.c
index aa10393..18e6401 100644
--- a/gdb/i386bsd-tdep.c
+++ b/gdb/i386bsd-tdep.c
@@ -24,7 +24,7 @@
 #include "regcache.h"
 #include "osabi.h"
 
-#include "gdb_string.h"
+#include <string.h>
 
 #include "i386-tdep.h"
 
diff --git a/gdb/i386gnu-nat.c b/gdb/i386gnu-nat.c
index 2b93fee..50d892f 100644
--- a/gdb/i386gnu-nat.c
+++ b/gdb/i386gnu-nat.c
@@ -25,7 +25,7 @@
 #include "gdb_assert.h"
 #include <errno.h>
 #include <stdio.h>
-#include "gdb_string.h"
+#include <string.h>
 
 #include <mach.h>
 #include <mach_error.h>
diff --git a/gdb/i386nbsd-tdep.c b/gdb/i386nbsd-tdep.c
index 79a3809..5acc521 100644
--- a/gdb/i386nbsd-tdep.c
+++ b/gdb/i386nbsd-tdep.c
@@ -29,7 +29,7 @@
 #include "tramp-frame.h"
 
 #include "gdb_assert.h"
-#include "gdb_string.h"
+#include <string.h>
 
 #include "i386-tdep.h"
 #include "i387-tdep.h"
diff --git a/gdb/i386obsd-tdep.c b/gdb/i386obsd-tdep.c
index 17007e8..d4f7f76 100644
--- a/gdb/i386obsd-tdep.c
+++ b/gdb/i386obsd-tdep.c
@@ -31,7 +31,7 @@
 #include "trad-frame.h"
 
 #include "gdb_assert.h"
-#include "gdb_string.h"
+#include <string.h>
 
 #include "i386-tdep.h"
 #include "i387-tdep.h"
diff --git a/gdb/i387-tdep.c b/gdb/i387-tdep.c
index 48a00c3..fd44386 100644
--- a/gdb/i387-tdep.c
+++ b/gdb/i387-tdep.c
@@ -28,7 +28,7 @@
 #include "value.h"
 
 #include "gdb_assert.h"
-#include "gdb_string.h"
+#include <string.h>
 
 #include "i386-tdep.h"
 #include "i387-tdep.h"
diff --git a/gdb/ia64-libunwind-tdep.c b/gdb/ia64-libunwind-tdep.c
index 3693879..97116b4 100644
--- a/gdb/ia64-libunwind-tdep.c
+++ b/gdb/ia64-libunwind-tdep.c
@@ -34,7 +34,7 @@
 #include <dlfcn.h>
 
 #include "gdb_assert.h"
-#include "gdb_string.h"
+#include <string.h>
 
 #include "ia64-libunwind-tdep.h"
 
diff --git a/gdb/ia64-linux-nat.c b/gdb/ia64-linux-nat.c
index 9d2f75c..edc1e23 100644
--- a/gdb/ia64-linux-nat.c
+++ b/gdb/ia64-linux-nat.c
@@ -19,7 +19,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "inferior.h"
 #include "target.h"
 #include "gdbcore.h"
diff --git a/gdb/inf-child.c b/gdb/inf-child.c
index 1878272..36fa81d 100644
--- a/gdb/inf-child.c
+++ b/gdb/inf-child.c
@@ -24,7 +24,7 @@
 #include "symtab.h"
 #include "target.h"
 #include "inferior.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "gdb_stat.h"
 #include "inf-child.h"
 #include "gdb/fileio.h"
diff --git a/gdb/inf-ptrace.c b/gdb/inf-ptrace.c
index 5e5e248..34e206b 100644
--- a/gdb/inf-ptrace.c
+++ b/gdb/inf-ptrace.c
@@ -26,7 +26,7 @@
 #include "regcache.h"
 
 #include "gdb_assert.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "gdb_ptrace.h"
 #include "gdb_wait.h"
 #include <signal.h>
diff --git a/gdb/inf-ttrace.c b/gdb/inf-ttrace.c
index c715c71..eb0adcb 100644
--- a/gdb/inf-ttrace.c
+++ b/gdb/inf-ttrace.c
@@ -31,7 +31,7 @@
 #include "target.h"
 
 #include "gdb_assert.h"
-#include "gdb_string.h"
+#include <string.h>
 #include <sys/mman.h>
 #include <sys/ttrace.h>
 #include <signal.h>
diff --git a/gdb/infcall.c b/gdb/infcall.c
index 19af044..212997f 100644
--- a/gdb/infcall.c
+++ b/gdb/infcall.c
@@ -30,7 +30,7 @@
 #include "objfiles.h"
 #include "gdbcmd.h"
 #include "command.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "infcall.h"
 #include "dummy-frame.h"
 #include "ada-lang.h"
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index d678e9f..19f720b 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -20,7 +20,7 @@
 #include "defs.h"
 #include "arch-utils.h"
 #include <signal.h>
-#include "gdb_string.h"
+#include <string.h>
 #include "symtab.h"
 #include "gdbtypes.h"
 #include "frame.h"
diff --git a/gdb/inflow.c b/gdb/inflow.c
index ad73efe..062bf68 100644
--- a/gdb/inflow.c
+++ b/gdb/inflow.c
@@ -26,7 +26,7 @@
 #include "gdbthread.h"
 #include "observer.h"
 
-#include "gdb_string.h"
+#include <string.h>
 #include <signal.h>
 #include <fcntl.h>
 #include "gdb_select.h"
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 0b8dffe..3b55583 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -19,7 +19,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
-#include "gdb_string.h"
+#include <string.h>
 #include <ctype.h>
 #include "symtab.h"
 #include "frame.h"
diff --git a/gdb/interps.c b/gdb/interps.c
index 7f19385..5a0fde3 100644
--- a/gdb/interps.c
+++ b/gdb/interps.c
@@ -36,7 +36,7 @@
 #include "event-top.h"
 #include "interps.h"
 #include "completer.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "gdb_assert.h"
 #include "top.h"		/* For command_loop.  */
 #include "exceptions.h"
diff --git a/gdb/iq2000-tdep.c b/gdb/iq2000-tdep.c
index d2619ff..60d7a30 100644
--- a/gdb/iq2000-tdep.c
+++ b/gdb/iq2000-tdep.c
@@ -28,7 +28,7 @@
 #include "gdbtypes.h"
 #include "value.h"
 #include "dis-asm.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "arch-utils.h"
 #include "regcache.h"
 #include "osabi.h"
diff --git a/gdb/irix5-nat.c b/gdb/irix5-nat.c
index 27da00d..0d0fbf9 100644
--- a/gdb/irix5-nat.c
+++ b/gdb/irix5-nat.c
@@ -29,7 +29,7 @@
 #include "regcache.h"
 #include "procfs.h"
 
-#include "gdb_string.h"
+#include <string.h>
 #include <sys/time.h>
 #include <sys/procfs.h>
 #include <setjmp.h>		/* For JB_XXX.  */
diff --git a/gdb/jv-exp.y b/gdb/jv-exp.y
index 2c5154e..2d93a3e 100644
--- a/gdb/jv-exp.y
+++ b/gdb/jv-exp.y
@@ -36,7 +36,7 @@
 %{
 
 #include "defs.h"
-#include "gdb_string.h"
+#include <string.h>
 #include <ctype.h>
 #include "expression.h"
 #include "value.h"
diff --git a/gdb/jv-lang.c b/gdb/jv-lang.c
index b154d4a..c9b6119 100644
--- a/gdb/jv-lang.c
+++ b/gdb/jv-lang.c
@@ -27,7 +27,7 @@
 #include "symtab.h"
 #include "symfile.h"
 #include "objfiles.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "value.h"
 #include "c-lang.h"
 #include "jv-lang.h"
diff --git a/gdb/jv-typeprint.c b/gdb/jv-typeprint.c
index 23b3f4e..3f6d9da 100644
--- a/gdb/jv-typeprint.c
+++ b/gdb/jv-typeprint.c
@@ -24,7 +24,7 @@
 #include "demangle.h"
 #include "gdb-demangle.h"
 #include "jv-lang.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "typeprint.h"
 #include "c-lang.h"
 #include "cp-abi.h"
diff --git a/gdb/jv-valprint.c b/gdb/jv-valprint.c
index 2c60cc0..f465ca0 100644
--- a/gdb/jv-valprint.c
+++ b/gdb/jv-valprint.c
@@ -29,7 +29,7 @@
 #include "jv-lang.h"
 #include "c-lang.h"
 #include "annotate.h"
-#include "gdb_string.h"
+#include <string.h>
 
 /* Local functions */
 
diff --git a/gdb/language.c b/gdb/language.c
index f1232a1..f1ea779 100644
--- a/gdb/language.c
+++ b/gdb/language.c
@@ -30,7 +30,7 @@
 
 #include "defs.h"
 #include <ctype.h>
-#include "gdb_string.h"
+#include <string.h>
 
 #include "symtab.h"
 #include "gdbtypes.h"
diff --git a/gdb/linux-fork.c b/gdb/linux-fork.c
index 754500f..0f27d68 100644
--- a/gdb/linux-fork.c
+++ b/gdb/linux-fork.c
@@ -25,7 +25,7 @@
 #include "infcall.h"
 #include "objfiles.h"
 #include "gdb_assert.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "linux-fork.h"
 #include "linux-nat.h"
 #include "gdbthread.h"
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
index 95064f7..bccd583 100644
--- a/gdb/linux-nat.c
+++ b/gdb/linux-nat.c
@@ -22,7 +22,7 @@
 #include "target.h"
 #include "nat/linux-nat.h"
 #include "nat/linux-waitpid.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "gdb_wait.h"
 #include "gdb_assert.h"
 #ifdef HAVE_TKILL_SYSCALL
diff --git a/gdb/lm32-tdep.c b/gdb/lm32-tdep.c
index 11cf897..54d80b9 100644
--- a/gdb/lm32-tdep.c
+++ b/gdb/lm32-tdep.c
@@ -37,7 +37,7 @@
 #include "reggroups.h"
 #include "opcodes/lm32-desc.h"
 
-#include "gdb_string.h"
+#include <string.h>
 
 /* Macros to extract fields from an instruction.  */
 #define LM32_OPCODE(insn)       ((insn >> 26) & 0x3f)
diff --git a/gdb/m2-exp.y b/gdb/m2-exp.y
index 0002e45..9bdd8b7 100644
--- a/gdb/m2-exp.y
+++ b/gdb/m2-exp.y
@@ -38,7 +38,7 @@
 %{
 
 #include "defs.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "expression.h"
 #include "language.h"
 #include "value.h"
diff --git a/gdb/m2-typeprint.c b/gdb/m2-typeprint.c
index 653cb77..bbdcebe 100644
--- a/gdb/m2-typeprint.c
+++ b/gdb/m2-typeprint.c
@@ -32,7 +32,7 @@
 #include "typeprint.h"
 #include "cp-abi.h"
 
-#include "gdb_string.h"
+#include <string.h>
 #include <errno.h>
 
 static void m2_print_bounds (struct type *type,
diff --git a/gdb/m32c-tdep.c b/gdb/m32c-tdep.c
index 1b0eba5..a84bf83 100644
--- a/gdb/m32c-tdep.c
+++ b/gdb/m32c-tdep.c
@@ -21,7 +21,7 @@
 
 #include <stdarg.h>
 
-#include "gdb_string.h"
+#include <string.h>
 #include "gdb_assert.h"
 #include "elf-bfd.h"
 #include "elf/m32c.h"
diff --git a/gdb/m32r-linux-nat.c b/gdb/m32r-linux-nat.c
index 70bd528..4a9246a 100644
--- a/gdb/m32r-linux-nat.c
+++ b/gdb/m32r-linux-nat.c
@@ -25,7 +25,7 @@
 #include "target.h"
 
 #include "gdb_assert.h"
-#include "gdb_string.h"
+#include <string.h>
 #include <sys/ptrace.h>
 #include <sys/user.h>
 #include <sys/procfs.h>
diff --git a/gdb/m32r-linux-tdep.c b/gdb/m32r-linux-tdep.c
index 1994e92..b19d3f3 100644
--- a/gdb/m32r-linux-tdep.c
+++ b/gdb/m32r-linux-tdep.c
@@ -27,7 +27,7 @@
 #include "reggroups.h"
 #include "regset.h"
 
-#include "gdb_string.h"
+#include <string.h>
 
 #include "glibc-tdep.h"
 #include "solib-svr4.h"
diff --git a/gdb/m32r-rom.c b/gdb/m32r-rom.c
index 5b27b60..4423d26 100644
--- a/gdb/m32r-rom.c
+++ b/gdb/m32r-rom.c
@@ -34,7 +34,7 @@
 #include "symfile.h"		/* for generic load */
 #include <sys/time.h>
 #include <time.h>		/* for time_t */
-#include "gdb_string.h"
+#include <string.h>
 #include "objfiles.h"		/* for ALL_OBJFILES etc.  */
 #include "inferior.h"
 #include <ctype.h>
diff --git a/gdb/m32r-tdep.c b/gdb/m32r-tdep.c
index d96ebed..04ae733 100644
--- a/gdb/m32r-tdep.c
+++ b/gdb/m32r-tdep.c
@@ -25,7 +25,7 @@
 #include "gdbtypes.h"
 #include "gdbcmd.h"
 #include "gdbcore.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "value.h"
 #include "inferior.h"
 #include "symfile.h"
diff --git a/gdb/m68hc11-tdep.c b/gdb/m68hc11-tdep.c
index b3023ad..6cb4e3a 100644
--- a/gdb/m68hc11-tdep.c
+++ b/gdb/m68hc11-tdep.c
@@ -30,7 +30,7 @@
 #include "gdbtypes.h"
 #include "gdbcmd.h"
 #include "gdbcore.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "value.h"
 #include "inferior.h"
 #include "dis-asm.h"  
diff --git a/gdb/m68k-tdep.c b/gdb/m68k-tdep.c
index c0662e4..fb17fb9 100644
--- a/gdb/m68k-tdep.c
+++ b/gdb/m68k-tdep.c
@@ -26,7 +26,7 @@
 #include "symtab.h"
 #include "gdbcore.h"
 #include "value.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "gdb_assert.h"
 #include "inferior.h"
 #include "regcache.h"
diff --git a/gdb/m68kbsd-tdep.c b/gdb/m68kbsd-tdep.c
index 178acee..bb1699d 100644
--- a/gdb/m68kbsd-tdep.c
+++ b/gdb/m68kbsd-tdep.c
@@ -28,7 +28,7 @@
 #include "gdbtypes.h"
 
 #include "gdb_assert.h"
-#include "gdb_string.h"
+#include <string.h>
 
 #include "m68k-tdep.h"
 #include "solib-svr4.h"
diff --git a/gdb/m68klinux-nat.c b/gdb/m68klinux-nat.c
index 5e928e6..59511e4 100644
--- a/gdb/m68klinux-nat.c
+++ b/gdb/m68klinux-nat.c
@@ -22,7 +22,7 @@
 #include "inferior.h"
 #include "language.h"
 #include "gdbcore.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "regcache.h"
 #include "target.h"
 #include "linux-nat.h"
diff --git a/gdb/m68klinux-tdep.c b/gdb/m68klinux-tdep.c
index 0382f68..e647fe7 100644
--- a/gdb/m68klinux-tdep.c
+++ b/gdb/m68klinux-tdep.c
@@ -23,7 +23,7 @@
 #include "floatformat.h"
 #include "frame.h"
 #include "target.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "gdbtypes.h"
 #include "osabi.h"
 #include "regcache.h"
diff --git a/gdb/m88k-tdep.c b/gdb/m88k-tdep.c
index 7d9e08b..d4ebf7a 100644
--- a/gdb/m88k-tdep.c
+++ b/gdb/m88k-tdep.c
@@ -32,7 +32,7 @@
 #include "value.h"
 
 #include "gdb_assert.h"
-#include "gdb_string.h"
+#include <string.h>
 
 #include "m88k-tdep.h"
 
diff --git a/gdb/macrocmd.c b/gdb/macrocmd.c
index b48c3c9..2a9c06e 100644
--- a/gdb/macrocmd.c
+++ b/gdb/macrocmd.c
@@ -25,7 +25,7 @@
 #include "cli/cli-utils.h"
 #include "command.h"
 #include "gdbcmd.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "linespec.h"
 
 \f
diff --git a/gdb/main.c b/gdb/main.c
index 7ff9183..d5c9e39 100644
--- a/gdb/main.c
+++ b/gdb/main.c
@@ -31,7 +31,7 @@
 #include "gdb_stat.h"
 #include <ctype.h>
 
-#include "gdb_string.h"
+#include <string.h>
 #include "event-loop.h"
 #include "ui-out.h"
 
diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c
index 0e6109a..99a029e 100644
--- a/gdb/mdebugread.c
+++ b/gdb/mdebugread.c
@@ -56,7 +56,7 @@
 #include "dictionary.h"
 #include "mdebugread.h"
 #include "gdb_stat.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "psympriv.h"
 #include "source.h"
 
diff --git a/gdb/mem-break.c b/gdb/mem-break.c
index 74fd8db..f06c4ae 100644
--- a/gdb/mem-break.c
+++ b/gdb/mem-break.c
@@ -24,7 +24,7 @@
 #include "breakpoint.h"
 #include "inferior.h"
 #include "target.h"
-#include "gdb_string.h"
+#include <string.h>
 
 
 /* Insert a breakpoint on targets that don't have any better
diff --git a/gdb/memattr.c b/gdb/memattr.c
index 5c2adaa..58b800f 100644
--- a/gdb/memattr.c
+++ b/gdb/memattr.c
@@ -25,7 +25,7 @@
 #include "value.h"
 #include "language.h"
 #include "vec.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "breakpoint.h"
 #include "cli/cli-utils.h"
 
diff --git a/gdb/memory-map.c b/gdb/memory-map.c
index b4e0322..5e83c0a 100644
--- a/gdb/memory-map.c
+++ b/gdb/memory-map.c
@@ -22,7 +22,7 @@
 #include "gdb_assert.h"
 #include "exceptions.h"
 
-#include "gdb_string.h"
+#include <string.h>
 
 #if !defined(HAVE_LIBEXPAT)
 
diff --git a/gdb/mep-tdep.c b/gdb/mep-tdep.c
index fa58108..e266062 100644
--- a/gdb/mep-tdep.c
+++ b/gdb/mep-tdep.c
@@ -27,7 +27,7 @@
 #include "gdbtypes.h"
 #include "gdbcmd.h"
 #include "gdbcore.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "value.h"
 #include "inferior.h"
 #include "dis-asm.h"
diff --git a/gdb/mi/mi-cmd-break.c b/gdb/mi/mi-cmd-break.c
index ab39989..07902bb 100644
--- a/gdb/mi/mi-cmd-break.c
+++ b/gdb/mi/mi-cmd-break.c
@@ -23,7 +23,7 @@
 #include "ui-out.h"
 #include "mi-out.h"
 #include "breakpoint.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "mi-getopt.h"
 #include "gdb.h"
 #include "exceptions.h"
diff --git a/gdb/mi/mi-cmd-disas.c b/gdb/mi/mi-cmd-disas.c
index 1519f08..9747ac6 100644
--- a/gdb/mi/mi-cmd-disas.c
+++ b/gdb/mi/mi-cmd-disas.c
@@ -23,7 +23,7 @@
 #include "value.h"
 #include "mi-cmds.h"
 #include "mi-getopt.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "ui-out.h"
 #include "disasm.h"
 
diff --git a/gdb/mi/mi-cmd-env.c b/gdb/mi/mi-cmd-env.c
index e69062b..f1589e5 100644
--- a/gdb/mi/mi-cmd-env.c
+++ b/gdb/mi/mi-cmd-env.c
@@ -31,7 +31,7 @@
 #include "ui-out.h"
 #include "top.h"
 
-#include "gdb_string.h"
+#include <string.h>
 #include "gdb_stat.h"
 
 static void env_mod_path (char *dirname, char **which_path);
diff --git a/gdb/mi/mi-cmd-stack.c b/gdb/mi/mi-cmd-stack.c
index 6101341..eb71366 100644
--- a/gdb/mi/mi-cmd-stack.c
+++ b/gdb/mi/mi-cmd-stack.c
@@ -27,7 +27,7 @@
 #include "block.h"
 #include "stack.h"
 #include "dictionary.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "language.h"
 #include "valprint.h"
 #include "exceptions.h"
diff --git a/gdb/mi/mi-cmd-var.c b/gdb/mi/mi-cmd-var.c
index 0a2ef5c..84cdc15 100644
--- a/gdb/mi/mi-cmd-var.c
+++ b/gdb/mi/mi-cmd-var.c
@@ -27,7 +27,7 @@
 #include "language.h"
 #include "value.h"
 #include <ctype.h>
-#include "gdb_string.h"
+#include <string.h>
 #include "mi-getopt.h"
 #include "gdbthread.h"
 #include "mi-parse.h"
diff --git a/gdb/mi/mi-cmds.c b/gdb/mi/mi-cmds.c
index 496a8aa..c536d8a 100644
--- a/gdb/mi/mi-cmds.c
+++ b/gdb/mi/mi-cmds.c
@@ -21,7 +21,7 @@
 #include "defs.h"
 #include "top.h"
 #include "mi-cmds.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "mi-main.h"
 
 extern void _initialize_mi_cmds (void);
diff --git a/gdb/mi/mi-console.c b/gdb/mi/mi-console.c
index 2c34ced..cd47fb3 100644
--- a/gdb/mi/mi-console.c
+++ b/gdb/mi/mi-console.c
@@ -26,7 +26,7 @@
 
 #include "defs.h"
 #include "mi-console.h"
-#include "gdb_string.h"
+#include <string.h>
 
 static ui_file_fputs_ftype mi_console_file_fputs;
 static ui_file_flush_ftype mi_console_file_flush;
diff --git a/gdb/mi/mi-getopt.c b/gdb/mi/mi-getopt.c
index f207249..3ecc73d 100644
--- a/gdb/mi/mi-getopt.c
+++ b/gdb/mi/mi-getopt.c
@@ -19,7 +19,7 @@
 
 #include "defs.h"
 #include "mi-getopt.h"
-#include "gdb_string.h"
+#include <string.h>
 
 /* See comments about mi_getopt and mi_getopt_silent in mi-getopt.h.
    When there is an unknown option, if ERROR_ON_UNKNOWN is true,
diff --git a/gdb/mi/mi-interp.c b/gdb/mi/mi-interp.c
index 44ebd21..b0073c3 100644
--- a/gdb/mi/mi-interp.c
+++ b/gdb/mi/mi-interp.c
@@ -18,7 +18,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "interps.h"
 #include "event-top.h"
 #include "event-loop.h"
diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c
index 83d524a..793204d 100644
--- a/gdb/mi/mi-main.c
+++ b/gdb/mi/mi-main.c
@@ -23,7 +23,7 @@
 #include "arch-utils.h"
 #include "target.h"
 #include "inferior.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "exceptions.h"
 #include "top.h"
 #include "gdbthread.h"
diff --git a/gdb/mi/mi-parse.c b/gdb/mi/mi-parse.c
index 9994307..a2634f1 100644
--- a/gdb/mi/mi-parse.c
+++ b/gdb/mi/mi-parse.c
@@ -25,7 +25,7 @@
 #include "charset.h"
 
 #include <ctype.h>
-#include "gdb_string.h"
+#include <string.h>
 #include "cli/cli-utils.h"
 #include "language.h"
 
diff --git a/gdb/microblaze-rom.c b/gdb/microblaze-rom.c
index 2ff4343..8fe78a0 100644
--- a/gdb/microblaze-rom.c
+++ b/gdb/microblaze-rom.c
@@ -21,7 +21,7 @@
 #include "gdbcore.h"
 #include "target.h"
 #include "monitor.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "serial.h"
 #include "regcache.h"
 
diff --git a/gdb/microblaze-tdep.c b/gdb/microblaze-tdep.c
index dcf556f..46f3468 100644
--- a/gdb/microblaze-tdep.c
+++ b/gdb/microblaze-tdep.c
@@ -36,7 +36,7 @@
 #include "osabi.h"
 
 #include "gdb_assert.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "target-descriptions.h"
 #include "opcodes/microblaze-opcm.h"
 #include "opcodes/microblaze-dis.h"
diff --git a/gdb/mingw-hdep.c b/gdb/mingw-hdep.c
index efc9848..66ada41 100644
--- a/gdb/mingw-hdep.c
+++ b/gdb/mingw-hdep.c
@@ -24,7 +24,7 @@
 
 #include "gdb_assert.h"
 #include "gdb_select.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "readline/readline.h"
 
 #include <windows.h>
diff --git a/gdb/minidebug.c b/gdb/minidebug.c
index 385566a..2961234 100644
--- a/gdb/minidebug.c
+++ b/gdb/minidebug.c
@@ -19,7 +19,7 @@
 
 #include "defs.h"
 #include "gdb_bfd.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "symfile.h"
 #include "objfiles.h"
 #include "gdbcore.h"
diff --git a/gdb/minsyms.c b/gdb/minsyms.c
index 95dd6cf..9044803 100644
--- a/gdb/minsyms.c
+++ b/gdb/minsyms.c
@@ -38,7 +38,7 @@
 
 #include "defs.h"
 #include <ctype.h>
-#include "gdb_string.h"
+#include <string.h>
 #include "symtab.h"
 #include "bfd.h"
 #include "filenames.h"
diff --git a/gdb/mips-irix-tdep.c b/gdb/mips-irix-tdep.c
index 8624eac..ad1c8d3 100644
--- a/gdb/mips-irix-tdep.c
+++ b/gdb/mips-irix-tdep.c
@@ -20,7 +20,7 @@
 
 #include "defs.h"
 #include "osabi.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "solib.h"
 #include "solib-irix.h"
 #include "elf-bfd.h"
diff --git a/gdb/mips-linux-tdep.c b/gdb/mips-linux-tdep.c
index 8d17839..37a37c1 100644
--- a/gdb/mips-linux-tdep.c
+++ b/gdb/mips-linux-tdep.c
@@ -23,7 +23,7 @@
 #include "solib-svr4.h"
 #include "osabi.h"
 #include "mips-tdep.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "gdb_assert.h"
 #include "frame.h"
 #include "regcache.h"
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index bcbdcc5..e3bb078 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -21,7 +21,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "gdb_assert.h"
 #include "frame.h"
 #include "inferior.h"
diff --git a/gdb/mips64obsd-tdep.c b/gdb/mips64obsd-tdep.c
index 75dc466..1373065 100644
--- a/gdb/mips64obsd-tdep.c
+++ b/gdb/mips64obsd-tdep.c
@@ -26,7 +26,7 @@
 #include "tramp-frame.h"
 
 #include "gdb_assert.h"
-#include "gdb_string.h"
+#include <string.h>
 
 #include "mips-tdep.h"
 #include "solib-svr4.h"
diff --git a/gdb/mipsnbsd-tdep.c b/gdb/mipsnbsd-tdep.c
index e9f36fd..bd92eb2 100644
--- a/gdb/mipsnbsd-tdep.c
+++ b/gdb/mipsnbsd-tdep.c
@@ -28,7 +28,7 @@
 #include "osabi.h"
 
 #include "gdb_assert.h"
-#include "gdb_string.h"
+#include <string.h>
 
 #include "nbsd-tdep.h"
 #include "mipsnbsd-tdep.h"
diff --git a/gdb/mipsread.c b/gdb/mipsread.c
index fc4a268..d06d2f7 100644
--- a/gdb/mipsread.c
+++ b/gdb/mipsread.c
@@ -24,7 +24,7 @@
    mdebugread.c.  */
 
 #include "defs.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "bfd.h"
 #include "symtab.h"
 #include "objfiles.h"
diff --git a/gdb/mn10300-linux-tdep.c b/gdb/mn10300-linux-tdep.c
index 881af2b..aff85a8 100644
--- a/gdb/mn10300-linux-tdep.c
+++ b/gdb/mn10300-linux-tdep.c
@@ -19,7 +19,7 @@
 
 #include "defs.h"
 #include "gdbcore.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "regcache.h"
 #include "mn10300-tdep.h"
 #include "gdb_assert.h"
diff --git a/gdb/mn10300-tdep.c b/gdb/mn10300-tdep.c
index 32aa5f5..ffc9123 100644
--- a/gdb/mn10300-tdep.c
+++ b/gdb/mn10300-tdep.c
@@ -22,7 +22,7 @@
 #include "dis-asm.h"
 #include "gdbtypes.h"
 #include "regcache.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "gdb_assert.h"
 #include "gdbcore.h"	/* For write_memory_unsigned_integer.  */
 #include "value.h"
diff --git a/gdb/monitor.c b/gdb/monitor.c
index 0f5d8ca..2d94d42 100644
--- a/gdb/monitor.c
+++ b/gdb/monitor.c
@@ -43,7 +43,7 @@
 #include "exceptions.h"
 #include <signal.h>
 #include <ctype.h>
-#include "gdb_string.h"
+#include <string.h>
 #include <sys/types.h>
 #include "command.h"
 #include "serial.h"
diff --git a/gdb/moxie-tdep.c b/gdb/moxie-tdep.c
index cb04786..201b50f 100644
--- a/gdb/moxie-tdep.c
+++ b/gdb/moxie-tdep.c
@@ -25,7 +25,7 @@
 #include "gdbtypes.h"
 #include "gdbcmd.h"
 #include "gdbcore.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "value.h"
 #include "inferior.h"
 #include "symfile.h"
diff --git a/gdb/mt-tdep.c b/gdb/mt-tdep.c
index 22e1cbc..c45d0ed 100644
--- a/gdb/mt-tdep.c
+++ b/gdb/mt-tdep.c
@@ -27,7 +27,7 @@
 #include "dis-asm.h"
 #include "arch-utils.h"
 #include "gdbtypes.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "regcache.h"
 #include "reggroups.h"
 #include "gdbcore.h"
diff --git a/gdb/nbsd-tdep.c b/gdb/nbsd-tdep.c
index 54cdda0..2f400fb 100644
--- a/gdb/nbsd-tdep.c
+++ b/gdb/nbsd-tdep.c
@@ -20,7 +20,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "solib-svr4.h"
 #include "nbsd-tdep.h"
 
diff --git a/gdb/nios2-linux-tdep.c b/gdb/nios2-linux-tdep.c
index 47b98cc..fe29e7a 100644
--- a/gdb/nios2-linux-tdep.c
+++ b/gdb/nios2-linux-tdep.c
@@ -20,7 +20,7 @@
 #include "defs.h"
 #include "frame.h"
 #include "gdb_assert.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "osabi.h"
 #include "solib-svr4.h"
 #include "trad-frame.h"
diff --git a/gdb/nto-procfs.c b/gdb/nto-procfs.c
index a9b4276..424a91b 100644
--- a/gdb/nto-procfs.c
+++ b/gdb/nto-procfs.c
@@ -32,7 +32,7 @@
 #include <sys/netmgr.h>
 
 #include "exceptions.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "gdbcore.h"
 #include "inferior.h"
 #include "target.h"
diff --git a/gdb/nto-tdep.c b/gdb/nto-tdep.c
index 5ec746d..91f3928 100644
--- a/gdb/nto-tdep.c
+++ b/gdb/nto-tdep.c
@@ -21,7 +21,7 @@
 
 #include "defs.h"
 #include "gdb_stat.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "nto-tdep.h"
 #include "top.h"
 #include "inferior.h"
diff --git a/gdb/objc-lang.c b/gdb/objc-lang.c
index 5c72340..90c589d 100644
--- a/gdb/objc-lang.c
+++ b/gdb/objc-lang.c
@@ -34,7 +34,7 @@
 #include "value.h"
 #include "symfile.h"
 #include "objfiles.h"
-#include "gdb_string.h"		/* for strchr */
+#include <string.h>		/* for strchr */
 #include "target.h"		/* for target_has_execution */
 #include "gdbcore.h"
 #include "gdbcmd.h"
diff --git a/gdb/objfiles.c b/gdb/objfiles.c
index 70a927a..f669e30 100644
--- a/gdb/objfiles.c
+++ b/gdb/objfiles.c
@@ -38,7 +38,7 @@
 #include "gdb_stat.h"
 #include <fcntl.h>
 #include "gdb_obstack.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "hashtab.h"
 
 #include "breakpoint.h"
diff --git a/gdb/opencl-lang.c b/gdb/opencl-lang.c
index 28a2929..3785254 100644
--- a/gdb/opencl-lang.c
+++ b/gdb/opencl-lang.c
@@ -19,7 +19,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "gdbtypes.h"
 #include "symtab.h"
 #include "expression.h"
diff --git a/gdb/osabi.c b/gdb/osabi.c
index 249dac8..a170974 100644
--- a/gdb/osabi.c
+++ b/gdb/osabi.c
@@ -20,7 +20,7 @@
 #include "defs.h"
 
 #include "gdb_assert.h"
-#include "gdb_string.h"
+#include <string.h>
 
 #include "osabi.h"
 #include "arch-utils.h"
diff --git a/gdb/osdata.c b/gdb/osdata.c
index a19b21d..9871fc3 100644
--- a/gdb/osdata.c
+++ b/gdb/osdata.c
@@ -22,7 +22,7 @@
 #include "vec.h"
 #include "xml-support.h"
 #include "osdata.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "ui-out.h"
 #include "gdbcmd.h"
 
diff --git a/gdb/p-exp.y b/gdb/p-exp.y
index bb21e53..0120e22 100644
--- a/gdb/p-exp.y
+++ b/gdb/p-exp.y
@@ -44,7 +44,7 @@
 %{
 
 #include "defs.h"
-#include "gdb_string.h"
+#include <string.h>
 #include <ctype.h>
 #include "expression.h"
 #include "value.h"
diff --git a/gdb/p-lang.c b/gdb/p-lang.c
index bc59030..e83320f 100644
--- a/gdb/p-lang.c
+++ b/gdb/p-lang.c
@@ -20,7 +20,7 @@
 /* This file is derived from c-lang.c */
 
 #include "defs.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "symtab.h"
 #include "gdbtypes.h"
 #include "expression.h"
diff --git a/gdb/p-typeprint.c b/gdb/p-typeprint.c
index 30d40d7..f26b990 100644
--- a/gdb/p-typeprint.c
+++ b/gdb/p-typeprint.c
@@ -31,7 +31,7 @@
 #include "p-lang.h"
 #include "typeprint.h"
 #include "gdb-demangle.h"
-#include "gdb_string.h"
+#include <string.h>
 #include <errno.h>
 #include <ctype.h>
 
diff --git a/gdb/parse.c b/gdb/parse.c
index 07c1765..4b9ca5d 100644
--- a/gdb/parse.c
+++ b/gdb/parse.c
@@ -32,7 +32,7 @@
 #include "defs.h"
 #include <ctype.h>
 #include "arch-utils.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "symtab.h"
 #include "gdbtypes.h"
 #include "frame.h"
diff --git a/gdb/posix-hdep.c b/gdb/posix-hdep.c
index 3280f1c..b07148b 100644
--- a/gdb/posix-hdep.c
+++ b/gdb/posix-hdep.c
@@ -20,7 +20,7 @@
 #include "defs.h"
 #include "event-loop.h"
 
-#include "gdb_string.h"
+#include <string.h>
 
 #include "gdb_select.h"
 
diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c
index 66e8062..d6820be 100644
--- a/gdb/ppc-linux-nat.c
+++ b/gdb/ppc-linux-nat.c
@@ -18,7 +18,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "observer.h"
 #include "frame.h"
 #include "inferior.h"
diff --git a/gdb/ppc-sysv-tdep.c b/gdb/ppc-sysv-tdep.c
index 0cddf64..665128b 100644
--- a/gdb/ppc-sysv-tdep.c
+++ b/gdb/ppc-sysv-tdep.c
@@ -23,7 +23,7 @@
 #include "inferior.h"
 #include "regcache.h"
 #include "value.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "gdb_assert.h"
 #include "ppc-tdep.h"
 #include "target.h"
diff --git a/gdb/ppcfbsd-tdep.c b/gdb/ppcfbsd-tdep.c
index f9e0434..4804d9a 100644
--- a/gdb/ppcfbsd-tdep.c
+++ b/gdb/ppcfbsd-tdep.c
@@ -31,7 +31,7 @@
 #include "trad-frame.h"
 
 #include "gdb_assert.h"
-#include "gdb_string.h"
+#include <string.h>
 
 #include "ppc-tdep.h"
 #include "ppc64-tdep.h"
diff --git a/gdb/ppcnbsd-tdep.c b/gdb/ppcnbsd-tdep.c
index 64de0d5..1f3b06a 100644
--- a/gdb/ppcnbsd-tdep.c
+++ b/gdb/ppcnbsd-tdep.c
@@ -28,7 +28,7 @@
 #include "tramp-frame.h"
 
 #include "gdb_assert.h"
-#include "gdb_string.h"
+#include <string.h>
 
 #include "ppc-tdep.h"
 #include "ppcnbsd-tdep.h"
diff --git a/gdb/ppcobsd-tdep.c b/gdb/ppcobsd-tdep.c
index a625a04..8653222 100644
--- a/gdb/ppcobsd-tdep.c
+++ b/gdb/ppcobsd-tdep.c
@@ -29,7 +29,7 @@
 #include "trad-frame.h"
 
 #include "gdb_assert.h"
-#include "gdb_string.h"
+#include <string.h>
 
 #include "ppc-tdep.h"
 #include "ppcobsd-tdep.h"
diff --git a/gdb/printcmd.c b/gdb/printcmd.c
index 7354474..001c077 100644
--- a/gdb/printcmd.c
+++ b/gdb/printcmd.c
@@ -18,7 +18,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "frame.h"
 #include "symtab.h"
 #include "gdbtypes.h"
diff --git a/gdb/procfs.c b/gdb/procfs.c
index 018a0d8..c0004f2 100644
--- a/gdb/procfs.c
+++ b/gdb/procfs.c
@@ -46,7 +46,7 @@
 #include <signal.h>
 #include <ctype.h>
 #include "gdb_bfd.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "gdb_assert.h"
 #include "inflow.h"
 #include "auxv.h"
diff --git a/gdb/prologue-value.c b/gdb/prologue-value.c
index 6c68618..31e05d2 100644
--- a/gdb/prologue-value.c
+++ b/gdb/prologue-value.c
@@ -17,7 +17,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "gdb_assert.h"
 #include "prologue-value.h"
 #include "regcache.h"
diff --git a/gdb/python/py-auto-load.c b/gdb/python/py-auto-load.c
index 2802acf..c54e436 100644
--- a/gdb/python/py-auto-load.c
+++ b/gdb/python/py-auto-load.c
@@ -18,7 +18,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "top.h"
 #include "exceptions.h"
 #include "gdbcmd.h"
diff --git a/gdb/python/py-gdb-readline.c b/gdb/python/py-gdb-readline.c
index d6576a3..aeb5489 100644
--- a/gdb/python/py-gdb-readline.c
+++ b/gdb/python/py-gdb-readline.c
@@ -22,7 +22,7 @@
 #include "exceptions.h"
 #include "top.h"
 #include "cli/cli-utils.h"
-#include "gdb_string.h"
+#include <string.h>
 
 #include <stddef.h>
 
diff --git a/gdb/ravenscar-thread.c b/gdb/ravenscar-thread.c
index 26b8171..9ef265d 100644
--- a/gdb/ravenscar-thread.c
+++ b/gdb/ravenscar-thread.c
@@ -26,7 +26,7 @@
 #include "command.h"
 #include "ravenscar-thread.h"
 #include "observer.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "gdbcmd.h"
 #include "top.h"
 #include "regcache.h"
diff --git a/gdb/regcache.c b/gdb/regcache.c
index 7ec75c8..e847455 100644
--- a/gdb/regcache.c
+++ b/gdb/regcache.c
@@ -25,7 +25,7 @@
 #include "regcache.h"
 #include "reggroups.h"
 #include "gdb_assert.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "gdbcmd.h"		/* For maintenanceprintlist.  */
 #include "observer.h"
 #include "exceptions.h"
diff --git a/gdb/registry.c b/gdb/registry.c
index 8055300..b116568 100644
--- a/gdb/registry.c
+++ b/gdb/registry.c
@@ -20,7 +20,7 @@
 #include "defs.h"
 #include "registry.h"
 #include "gdb_assert.h"
-#include "gdb_string.h"
+#include <string.h>
 
 const struct registry_data *
 register_data_with_cleanup (struct registry_data_registry *registry,
diff --git a/gdb/remote-fileio.c b/gdb/remote-fileio.c
index 5b7ef1d..bf79068 100644
--- a/gdb/remote-fileio.c
+++ b/gdb/remote-fileio.c
@@ -20,7 +20,7 @@
 /* See the GDB User Guide for details of the GDB remote protocol.  */
 
 #include "defs.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "gdbcmd.h"
 #include "remote.h"
 #include "gdb/fileio.h"
diff --git a/gdb/remote-m32r-sdi.c b/gdb/remote-m32r-sdi.c
index 4ffb72d..e81b2de 100644
--- a/gdb/remote-m32r-sdi.c
+++ b/gdb/remote-m32r-sdi.c
@@ -26,7 +26,7 @@
 #include "inferior.h"
 #include "target.h"
 #include "regcache.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "gdbthread.h"
 #include <ctype.h>
 #include <signal.h>
diff --git a/gdb/remote-mips.c b/gdb/remote-mips.c
index f8e6cac..14c494f 100644
--- a/gdb/remote-mips.c
+++ b/gdb/remote-mips.c
@@ -29,7 +29,7 @@
 #include "serial.h"
 #include "target.h"
 #include "exceptions.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "gdb_stat.h"
 #include "gdb_usleep.h"
 #include "regcache.h"
diff --git a/gdb/remote-sim.c b/gdb/remote-sim.c
index 6bf18ab..c0596b3 100644
--- a/gdb/remote-sim.c
+++ b/gdb/remote-sim.c
@@ -23,7 +23,7 @@
 #include "defs.h"
 #include "inferior.h"
 #include "value.h"
-#include "gdb_string.h"
+#include <string.h>
 #include <ctype.h>
 #include <fcntl.h>
 #include <signal.h>
diff --git a/gdb/remote.c b/gdb/remote.c
index f4667e3..bbd9061 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -20,7 +20,7 @@
 /* See the GDB User Guide for details of the GDB remote protocol.  */
 
 #include "defs.h"
-#include "gdb_string.h"
+#include <string.h>
 #include <ctype.h>
 #include <fcntl.h>
 #include "inferior.h"
diff --git a/gdb/reverse.c b/gdb/reverse.c
index c0d7058..ca51d89 100644
--- a/gdb/reverse.c
+++ b/gdb/reverse.c
@@ -18,7 +18,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "target.h"
 #include "top.h"
 #include "cli/cli-cmds.h"
diff --git a/gdb/rs6000-aix-tdep.c b/gdb/rs6000-aix-tdep.c
index 62bc6ee..3282007 100644
--- a/gdb/rs6000-aix-tdep.c
+++ b/gdb/rs6000-aix-tdep.c
@@ -20,7 +20,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "gdb_assert.h"
 #include "osabi.h"
 #include "regcache.h"
diff --git a/gdb/ser-base.c b/gdb/ser-base.c
index 52c5726..d07dcf3 100644
--- a/gdb/ser-base.c
+++ b/gdb/ser-base.c
@@ -23,7 +23,7 @@
 #include "event-loop.h"
 
 #include "gdb_select.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "gdb_assert.h"
 #include <sys/time.h>
 #ifdef USE_WIN32API
diff --git a/gdb/ser-go32.c b/gdb/ser-go32.c
index 9b321df..4268e2c 100644
--- a/gdb/ser-go32.c
+++ b/gdb/ser-go32.c
@@ -24,7 +24,7 @@
 #include "defs.h"
 #include "gdbcmd.h"
 #include "serial.h"
-#include "gdb_string.h"
+#include <string.h>
 
 
 /*
diff --git a/gdb/ser-mingw.c b/gdb/ser-mingw.c
index dc91b0c..0431ea9 100644
--- a/gdb/ser-mingw.c
+++ b/gdb/ser-mingw.c
@@ -30,7 +30,7 @@
 #include <sys/types.h>
 
 #include "gdb_assert.h"
-#include "gdb_string.h"
+#include <string.h>
 
 #include "command.h"
 
diff --git a/gdb/ser-pipe.c b/gdb/ser-pipe.c
index 1b30f78..b4ab672 100644
--- a/gdb/ser-pipe.c
+++ b/gdb/ser-pipe.c
@@ -29,7 +29,7 @@
 #include <sys/socket.h>
 #include <sys/time.h>
 #include <fcntl.h>
-#include "gdb_string.h"
+#include <string.h>
 #include "filestuff.h"
 
 #include <signal.h>
diff --git a/gdb/ser-tcp.c b/gdb/ser-tcp.c
index f40bfce..d8c1ed6 100644
--- a/gdb/ser-tcp.c
+++ b/gdb/ser-tcp.c
@@ -53,7 +53,7 @@
 #endif
 
 #include <signal.h>
-#include "gdb_string.h"
+#include <string.h>
 #include "gdb_select.h"
 
 #ifndef HAVE_SOCKLEN_T
diff --git a/gdb/ser-unix.c b/gdb/ser-unix.c
index cd1d9a9..1f1372b 100644
--- a/gdb/ser-unix.c
+++ b/gdb/ser-unix.c
@@ -29,7 +29,7 @@
 #include <sys/time.h>
 
 #include "gdb_select.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "gdbcmd.h"
 #include "filestuff.h"
 
diff --git a/gdb/serial.c b/gdb/serial.c
index f2a9648..78e9085 100644
--- a/gdb/serial.c
+++ b/gdb/serial.c
@@ -20,7 +20,7 @@
 #include "defs.h"
 #include <ctype.h>
 #include "serial.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "gdbcmd.h"
 #include "cli/cli-utils.h"
 
diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c
index e8f1917..ce096b7 100644
--- a/gdb/sh-tdep.c
+++ b/gdb/sh-tdep.c
@@ -32,7 +32,7 @@
 #include "value.h"
 #include "dis-asm.h"
 #include "inferior.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "gdb_assert.h"
 #include "arch-utils.h"
 #include "floatformat.h"
diff --git a/gdb/sh64-tdep.c b/gdb/sh64-tdep.c
index 9425e9f..79dde80 100644
--- a/gdb/sh64-tdep.c
+++ b/gdb/sh64-tdep.c
@@ -32,7 +32,7 @@
 #include "value.h"
 #include "dis-asm.h"
 #include "inferior.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "gdb_assert.h"
 #include "arch-utils.h"
 #include "regcache.h"
diff --git a/gdb/shnbsd-tdep.c b/gdb/shnbsd-tdep.c
index a5f8099..742798b 100644
--- a/gdb/shnbsd-tdep.c
+++ b/gdb/shnbsd-tdep.c
@@ -25,7 +25,7 @@
 #include "value.h"
 #include "osabi.h"
 
-#include "gdb_string.h"
+#include <string.h>
 
 #include "sh-tdep.h"
 #include "solib-svr4.h"
diff --git a/gdb/skip.c b/gdb/skip.c
index 0c002ff..73c5d35 100644
--- a/gdb/skip.c
+++ b/gdb/skip.c
@@ -20,7 +20,7 @@
 #include "value.h"
 #include "valprint.h"
 #include "ui-out.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "symtab.h"
 #include "gdbcmd.h"
 #include "command.h"
diff --git a/gdb/sol-thread.c b/gdb/sol-thread.c
index b20134c..ec1245b 100644
--- a/gdb/sol-thread.c
+++ b/gdb/sol-thread.c
@@ -64,7 +64,7 @@
 #include "solib.h"
 #include "symfile.h"
 #include "observer.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "procfs.h"
 
 struct target_ops sol_thread_ops;
diff --git a/gdb/solib-dsbt.c b/gdb/solib-dsbt.c
index 4e2091b..897a457 100644
--- a/gdb/solib-dsbt.c
+++ b/gdb/solib-dsbt.c
@@ -18,7 +18,7 @@
 
 
 #include "defs.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "inferior.h"
 #include "gdbcore.h"
 #include "solib.h"
diff --git a/gdb/solib-frv.c b/gdb/solib-frv.c
index 65c7e01..6d5222a 100644
--- a/gdb/solib-frv.c
+++ b/gdb/solib-frv.c
@@ -18,7 +18,7 @@
 
 
 #include "defs.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "inferior.h"
 #include "gdbcore.h"
 #include "solib.h"
diff --git a/gdb/solib-osf.c b/gdb/solib-osf.c
index d05c5c1..df0bf1b 100644
--- a/gdb/solib-osf.c
+++ b/gdb/solib-osf.c
@@ -44,7 +44,7 @@
 
 #include <sys/types.h>
 #include <signal.h>
-#include "gdb_string.h"
+#include <string.h>
 
 #include "bfd.h"
 #include "symtab.h"
diff --git a/gdb/solib-spu.c b/gdb/solib-spu.c
index 626cc8f..590baba 100644
--- a/gdb/solib-spu.c
+++ b/gdb/solib-spu.c
@@ -21,7 +21,7 @@
 #include "defs.h"
 #include "solib-spu.h"
 #include "gdbcore.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "gdb_assert.h"
 #include "gdb_stat.h"
 #include "arch-utils.h"
diff --git a/gdb/solib-target.c b/gdb/solib-target.c
index 0b6b2d2..de4ad7e 100644
--- a/gdb/solib-target.c
+++ b/gdb/solib-target.c
@@ -26,7 +26,7 @@
 #include "vec.h"
 #include "solib-target.h"
 
-#include "gdb_string.h"
+#include <string.h>
 
 /* Private data for each loaded library.  */
 struct lm_info
diff --git a/gdb/solib.c b/gdb/solib.c
index 06e0b16..1a9215a 100644
--- a/gdb/solib.c
+++ b/gdb/solib.c
@@ -21,7 +21,7 @@
 
 #include <sys/types.h>
 #include <fcntl.h>
-#include "gdb_string.h"
+#include <string.h>
 #include "symtab.h"
 #include "bfd.h"
 #include "symfile.h"
diff --git a/gdb/somread.c b/gdb/somread.c
index c262196..51a9479 100644
--- a/gdb/somread.c
+++ b/gdb/somread.c
@@ -27,7 +27,7 @@
 #include "stabsread.h"
 #include "gdb-stabs.h"
 #include "complaints.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "demangle.h"
 #include "som.h"
 #include "libhppa.h"
diff --git a/gdb/source.c b/gdb/source.c
index 9fa99b4..f89f534 100644
--- a/gdb/source.c
+++ b/gdb/source.c
@@ -30,7 +30,7 @@
 #include "filestuff.h"
 
 #include <sys/types.h>
-#include "gdb_string.h"
+#include <string.h>
 #include "gdb_stat.h"
 #include <fcntl.h>
 #include "gdbcore.h"
diff --git a/gdb/sparc-nat.c b/gdb/sparc-nat.c
index bb2b8a3..d90ef96 100644
--- a/gdb/sparc-nat.c
+++ b/gdb/sparc-nat.c
@@ -24,7 +24,7 @@
 
 #include "gdb_assert.h"
 #include <signal.h>
-#include "gdb_string.h"
+#include <string.h>
 #include <sys/ptrace.h>
 #include "gdb_wait.h"
 #ifdef HAVE_MACHINE_REG_H
diff --git a/gdb/sparc-sol2-tdep.c b/gdb/sparc-sol2-tdep.c
index 75af51e..ab0c0ac 100644
--- a/gdb/sparc-sol2-tdep.c
+++ b/gdb/sparc-sol2-tdep.c
@@ -29,7 +29,7 @@
 #include "trad-frame.h"
 
 #include "gdb_assert.h"
-#include "gdb_string.h"
+#include <string.h>
 
 #include "sol2-tdep.h"
 #include "sparc-tdep.h"
diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c
index 1a200e0..950ca8c 100644
--- a/gdb/sparc-tdep.c
+++ b/gdb/sparc-tdep.c
@@ -36,7 +36,7 @@
 #include "value.h"
 
 #include "gdb_assert.h"
-#include "gdb_string.h"
+#include <string.h>
 
 #include "sparc-tdep.h"
 #include "sparc-ravenscar-thread.h"
diff --git a/gdb/sparc64-tdep.c b/gdb/sparc64-tdep.c
index f01848e..8bcf418 100644
--- a/gdb/sparc64-tdep.c
+++ b/gdb/sparc64-tdep.c
@@ -35,7 +35,7 @@
 #include "value.h"
 
 #include "gdb_assert.h"
-#include "gdb_string.h"
+#include <string.h>
 
 #include "sparc64-tdep.h"
 
diff --git a/gdb/sparc64fbsd-tdep.c b/gdb/sparc64fbsd-tdep.c
index b642bfc..4e169b5 100644
--- a/gdb/sparc64fbsd-tdep.c
+++ b/gdb/sparc64fbsd-tdep.c
@@ -28,7 +28,7 @@
 #include "trad-frame.h"
 
 #include "gdb_assert.h"
-#include "gdb_string.h"
+#include <string.h>
 
 #include "sparc64-tdep.h"
 #include "solib-svr4.h"
diff --git a/gdb/sparc64nbsd-tdep.c b/gdb/sparc64nbsd-tdep.c
index e9f0457..7a3bd1a 100644
--- a/gdb/sparc64nbsd-tdep.c
+++ b/gdb/sparc64nbsd-tdep.c
@@ -31,7 +31,7 @@
 #include "trad-frame.h"
 
 #include "gdb_assert.h"
-#include "gdb_string.h"
+#include <string.h>
 
 #include "sparc64-tdep.h"
 #include "nbsd-tdep.h"
diff --git a/gdb/sparcnbsd-tdep.c b/gdb/sparcnbsd-tdep.c
index 7fff210..eb1dff9 100644
--- a/gdb/sparcnbsd-tdep.c
+++ b/gdb/sparcnbsd-tdep.c
@@ -31,7 +31,7 @@
 #include "trad-frame.h"
 
 #include "gdb_assert.h"
-#include "gdb_string.h"
+#include <string.h>
 
 #include "sparc-tdep.h"
 #include "nbsd-tdep.h"
diff --git a/gdb/spu-linux-nat.c b/gdb/spu-linux-nat.c
index a456117..22ed483 100644
--- a/gdb/spu-linux-nat.c
+++ b/gdb/spu-linux-nat.c
@@ -20,7 +20,7 @@
 
 #include "defs.h"
 #include "gdbcore.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "target.h"
 #include "inferior.h"
 #include "inf-child.h"
diff --git a/gdb/spu-multiarch.c b/gdb/spu-multiarch.c
index e93f142..f584a9a 100644
--- a/gdb/spu-multiarch.c
+++ b/gdb/spu-multiarch.c
@@ -21,7 +21,7 @@
 #include "defs.h"
 #include "gdbcore.h"
 #include "gdbcmd.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "gdb_assert.h"
 #include "arch-utils.h"
 #include "observer.h"
diff --git a/gdb/spu-tdep.c b/gdb/spu-tdep.c
index 46f3e2c..fd54b1e 100644
--- a/gdb/spu-tdep.c
+++ b/gdb/spu-tdep.c
@@ -24,7 +24,7 @@
 #include "gdbtypes.h"
 #include "gdbcmd.h"
 #include "gdbcore.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "gdb_assert.h"
 #include "frame.h"
 #include "frame-unwind.h"
diff --git a/gdb/stabsread.c b/gdb/stabsread.c
index da95a7e..0046772 100644
--- a/gdb/stabsread.c
+++ b/gdb/stabsread.c
@@ -24,7 +24,7 @@
    Avoid placing any object file format specific code in this file.  */
 
 #include "defs.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "bfd.h"
 #include "gdb_obstack.h"
 #include "symtab.h"
diff --git a/gdb/stack.c b/gdb/stack.c
index cd4ac7a..9a12eb3 100644
--- a/gdb/stack.c
+++ b/gdb/stack.c
@@ -50,7 +50,7 @@
 
 #include "gdb_assert.h"
 #include <ctype.h>
-#include "gdb_string.h"
+#include <string.h>
 
 #include "symfile.h"
 #include "python/python.h"
diff --git a/gdb/std-regs.c b/gdb/std-regs.c
index c67e50e..8a31af9 100644
--- a/gdb/std-regs.c
+++ b/gdb/std-regs.c
@@ -24,7 +24,7 @@
 #include "frame.h"
 #include "gdbtypes.h"
 #include "value.h"
-#include "gdb_string.h"
+#include <string.h>
 
 
 static struct value *
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 61e3e44..0c8713a 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -61,7 +61,7 @@
 
 #include <sys/types.h>
 #include <fcntl.h>
-#include "gdb_string.h"
+#include <string.h>
 #include "gdb_stat.h"
 #include <ctype.h>
 #include <time.h>
diff --git a/gdb/symmisc.c b/gdb/symmisc.c
index b192184..f4c3fc5 100644
--- a/gdb/symmisc.c
+++ b/gdb/symmisc.c
@@ -38,7 +38,7 @@
 #include "gdbcmd.h"
 #include "source.h"
 
-#include "gdb_string.h"
+#include <string.h>
 #include "readline/readline.h"
 
 #include "psymtab.h"
diff --git a/gdb/symtab.c b/gdb/symtab.c
index 8eb4eb4..6bb0bbc 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -50,7 +50,7 @@
 
 #include <sys/types.h>
 #include <fcntl.h>
-#include "gdb_string.h"
+#include <string.h>
 #include "gdb_stat.h"
 #include <ctype.h>
 #include "cp-abi.h"
diff --git a/gdb/target.c b/gdb/target.c
index 86a5572..52d1081 100644
--- a/gdb/target.c
+++ b/gdb/target.c
@@ -21,7 +21,7 @@
 
 #include "defs.h"
 #include <errno.h>
-#include "gdb_string.h"
+#include <string.h>
 #include "target.h"
 #include "gdbcmd.h"
 #include "symtab.h"
diff --git a/gdb/thread.c b/gdb/thread.c
index 64a57c5..7d889af 100644
--- a/gdb/thread.c
+++ b/gdb/thread.c
@@ -32,7 +32,7 @@
 #include "gdbcmd.h"
 #include "regcache.h"
 #include "gdb.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "btrace.h"
 
 #include <ctype.h>
diff --git a/gdb/tilegx-linux-nat.c b/gdb/tilegx-linux-nat.c
index 39c62ac..fb2a314 100644
--- a/gdb/tilegx-linux-nat.c
+++ b/gdb/tilegx-linux-nat.c
@@ -26,7 +26,7 @@
 #include <sys/ptrace.h>
 
 #include "gdb_assert.h"
-#include "gdb_string.h"
+#include <string.h>
 
 #include <sys/procfs.h>
 
diff --git a/gdb/tilegx-tdep.c b/gdb/tilegx-tdep.c
index a476053..c115f49 100644
--- a/gdb/tilegx-tdep.c
+++ b/gdb/tilegx-tdep.c
@@ -30,7 +30,7 @@
 #include "value.h"
 #include "dis-asm.h"
 #include "inferior.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "gdb_assert.h"
 #include "arch-utils.h"
 #include "floatformat.h"
diff --git a/gdb/top.c b/gdb/top.c
index 7d928e1..8b389c5 100644
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -60,7 +60,7 @@
 #include <sys/types.h>
 
 #include "event-top.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "gdb_stat.h"
 #include <ctype.h>
 #include "ui-out.h"
diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c
index a7ccb50..c5bc76d 100644
--- a/gdb/tracepoint.c
+++ b/gdb/tracepoint.c
@@ -27,7 +27,7 @@
 #include "value.h"
 #include "target.h"
 #include "language.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "inferior.h"
 #include "breakpoint.h"
 #include "tracepoint.h"
diff --git a/gdb/tui/tui-command.c b/gdb/tui/tui-command.c
index 2f81816..4e9ecb4 100644
--- a/gdb/tui/tui-command.c
+++ b/gdb/tui/tui-command.c
@@ -28,7 +28,7 @@
 #include "tui/tui-command.h"
 
 #include "gdb_curses.h"
-#include "gdb_string.h"
+#include <string.h>
 
 
 /*****************************************
diff --git a/gdb/tui/tui-data.c b/gdb/tui/tui-data.c
index f85676f..9c1cbc4 100644
--- a/gdb/tui/tui-data.c
+++ b/gdb/tui/tui-data.c
@@ -25,7 +25,7 @@
 #include "tui/tui-data.h"
 #include "tui/tui-wingeneral.h"
 
-#include "gdb_string.h"
+#include <string.h>
 #include "gdb_curses.h"
 
 /****************************
diff --git a/gdb/tui/tui-disasm.c b/gdb/tui/tui-disasm.c
index 7f00395..2577574 100644
--- a/gdb/tui/tui-disasm.c
+++ b/gdb/tui/tui-disasm.c
@@ -27,7 +27,7 @@
 #include "value.h"
 #include "source.h"
 #include "disasm.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "tui/tui.h"
 #include "tui/tui-data.h"
 #include "tui/tui-win.h"
diff --git a/gdb/tui/tui-file.c b/gdb/tui/tui-file.c
index 328f927..6a0c6e2 100644
--- a/gdb/tui/tui-file.c
+++ b/gdb/tui/tui-file.c
@@ -23,7 +23,7 @@
 
 #include "tui.h"
 
-#include "gdb_string.h"
+#include <string.h>
 
 /* A ``struct ui_file'' that is compatible with all the legacy
    code.  */
diff --git a/gdb/tui/tui-layout.c b/gdb/tui/tui-layout.c
index ad99a25..022678e 100644
--- a/gdb/tui/tui-layout.c
+++ b/gdb/tui/tui-layout.c
@@ -38,7 +38,7 @@
 #include "tui/tui-disasm.h"
 #include "tui/tui-layout.h"
 
-#include "gdb_string.h"
+#include <string.h>
 #include "gdb_curses.h"
 
 /*******************************
diff --git a/gdb/tui/tui-out.c b/gdb/tui/tui-out.c
index 14dc1de..32cf6cb 100644
--- a/gdb/tui/tui-out.c
+++ b/gdb/tui/tui-out.c
@@ -24,7 +24,7 @@
 #include "ui-out.h"
 #include "cli-out.h"
 #include "tui.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "gdb_assert.h"
 
 struct tui_ui_out_data
diff --git a/gdb/tui/tui-regs.c b/gdb/tui/tui-regs.c
index 5ebf4c8..4c13140 100644
--- a/gdb/tui/tui-regs.c
+++ b/gdb/tui/tui-regs.c
@@ -30,7 +30,7 @@
 #include "regcache.h"
 #include "inferior.h"
 #include "target.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "tui/tui-layout.h"
 #include "tui/tui-win.h"
 #include "tui/tui-windata.h"
diff --git a/gdb/tui/tui-source.c b/gdb/tui/tui-source.c
index e599382..a1b533e 100644
--- a/gdb/tui/tui-source.c
+++ b/gdb/tui/tui-source.c
@@ -35,7 +35,7 @@
 #include "tui/tui-winsource.h"
 #include "tui/tui-source.h"
 
-#include "gdb_string.h"
+#include <string.h>
 #include "gdb_curses.h"
 
 /* Function to display source in the source window.  */
diff --git a/gdb/tui/tui-stack.c b/gdb/tui/tui-stack.c
index 7adf896..c1ea7ad 100644
--- a/gdb/tui/tui-stack.c
+++ b/gdb/tui/tui-stack.c
@@ -28,7 +28,7 @@
 #include "target.h"
 #include "top.h"
 #include "gdb-demangle.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "source.h"
 #include "tui/tui.h"
 #include "tui/tui-data.h"
diff --git a/gdb/tui/tui-win.c b/gdb/tui/tui-win.c
index edabe83..7834512 100644
--- a/gdb/tui/tui-win.c
+++ b/gdb/tui/tui-win.c
@@ -46,7 +46,7 @@
 
 #include "gdb_curses.h"
 
-#include "gdb_string.h"
+#include <string.h>
 #include <ctype.h>
 #include "readline/readline.h"
 
diff --git a/gdb/tui/tui-windata.c b/gdb/tui/tui-windata.c
index 04ea2a8..871b857 100644
--- a/gdb/tui/tui-windata.c
+++ b/gdb/tui/tui-windata.c
@@ -26,7 +26,7 @@
 #include "tui/tui-regs.h"
 #include "tui/tui-windata.h"
 
-#include "gdb_string.h"
+#include <string.h>
 #include "gdb_curses.h"
 
 
diff --git a/gdb/tui/tui-winsource.c b/gdb/tui/tui-winsource.c
index ee6827e..ffa1ee6 100644
--- a/gdb/tui/tui-winsource.c
+++ b/gdb/tui/tui-winsource.c
@@ -38,7 +38,7 @@
 #include "tui/tui-source.h"
 #include "tui/tui-disasm.h"
 
-#include "gdb_string.h"
+#include <string.h>
 #include "gdb_curses.h"
 #include "gdb_assert.h"
 
diff --git a/gdb/typeprint.c b/gdb/typeprint.c
index 4e70593..c5e45be 100644
--- a/gdb/typeprint.c
+++ b/gdb/typeprint.c
@@ -31,7 +31,7 @@
 #include "language.h"
 #include "cp-abi.h"
 #include "typeprint.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "exceptions.h"
 #include "valprint.h"
 #include <errno.h>
diff --git a/gdb/ui-file.c b/gdb/ui-file.c
index b9d3e53..af6c22e 100644
--- a/gdb/ui-file.c
+++ b/gdb/ui-file.c
@@ -22,7 +22,7 @@
 #include "defs.h"
 #include "ui-file.h"
 #include "gdb_obstack.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "gdb_select.h"
 #include "filestuff.h"
 
diff --git a/gdb/ui-out.c b/gdb/ui-out.c
index 03b1240..5c6b9d9 100644
--- a/gdb/ui-out.c
+++ b/gdb/ui-out.c
@@ -21,7 +21,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "expression.h"		/* For language.h */
 #include "language.h"
 #include "ui-out.h"
diff --git a/gdb/user-regs.c b/gdb/user-regs.c
index 4336429..c4ea3da 100644
--- a/gdb/user-regs.c
+++ b/gdb/user-regs.c
@@ -22,7 +22,7 @@
 #include "defs.h"
 #include "user-regs.h"
 #include "gdbtypes.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "gdb_assert.h"
 #include "frame.h"
 
diff --git a/gdb/utils.c b/gdb/utils.c
index 1986758..10c73d3 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -21,7 +21,7 @@
 #include "dyn-string.h"
 #include "gdb_assert.h"
 #include <ctype.h>
-#include "gdb_string.h"
+#include <string.h>
 #include "gdb_wait.h"
 #include "event-top.h"
 #include "exceptions.h"
diff --git a/gdb/v850-tdep.c b/gdb/v850-tdep.c
index becb051..a07ab0f 100644
--- a/gdb/v850-tdep.c
+++ b/gdb/v850-tdep.c
@@ -25,7 +25,7 @@
 #include "dwarf2-frame.h"
 #include "gdbtypes.h"
 #include "inferior.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "gdb_assert.h"
 #include "gdbcore.h"
 #include "arch-utils.h"
diff --git a/gdb/valarith.c b/gdb/valarith.c
index 18c14fc..49c8bdc 100644
--- a/gdb/valarith.c
+++ b/gdb/valarith.c
@@ -24,7 +24,7 @@
 #include "expression.h"
 #include "target.h"
 #include "language.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "doublest.h"
 #include "dfp.h"
 #include <math.h>
diff --git a/gdb/valops.c b/gdb/valops.c
index 8bff686..4fc57ec 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -37,7 +37,7 @@
 #include "dfp.h"
 #include "tracepoint.h"
 #include <errno.h>
-#include "gdb_string.h"
+#include <string.h>
 #include "gdb_assert.h"
 #include "cp-support.h"
 #include "observer.h"
diff --git a/gdb/valprint.c b/gdb/valprint.c
index 0ecea0c..ea877f3 100644
--- a/gdb/valprint.c
+++ b/gdb/valprint.c
@@ -18,7 +18,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "symtab.h"
 #include "gdbtypes.h"
 #include "value.h"
diff --git a/gdb/value.c b/gdb/value.c
index 1f562f5..8c263ea 100644
--- a/gdb/value.c
+++ b/gdb/value.c
@@ -19,7 +19,7 @@
 
 #include "defs.h"
 #include "arch-utils.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "symtab.h"
 #include "gdbtypes.h"
 #include "value.h"
diff --git a/gdb/varobj.c b/gdb/varobj.c
index f15c9de..e2d5a86 100644
--- a/gdb/varobj.c
+++ b/gdb/varobj.c
@@ -26,7 +26,7 @@
 #include "valprint.h"
 
 #include "gdb_assert.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "gdb_regex.h"
 
 #include "varobj.h"
diff --git a/gdb/vax-tdep.c b/gdb/vax-tdep.c
index 10c3382..e766f00 100644
--- a/gdb/vax-tdep.c
+++ b/gdb/vax-tdep.c
@@ -32,7 +32,7 @@
 #include "trad-frame.h"
 #include "value.h"
 
-#include "gdb_string.h"
+#include <string.h>
 
 #include "vax-tdep.h"
 
diff --git a/gdb/vaxnbsd-tdep.c b/gdb/vaxnbsd-tdep.c
index 6c4947c..dba1808 100644
--- a/gdb/vaxnbsd-tdep.c
+++ b/gdb/vaxnbsd-tdep.c
@@ -24,7 +24,7 @@
 #include "vax-tdep.h"
 #include "solib-svr4.h"
 
-#include "gdb_string.h"
+#include <string.h>
 
 /* NetBSD ELF.  */
 
diff --git a/gdb/vaxobsd-tdep.c b/gdb/vaxobsd-tdep.c
index 244c105..51f3b32 100644
--- a/gdb/vaxobsd-tdep.c
+++ b/gdb/vaxobsd-tdep.c
@@ -27,7 +27,7 @@
 
 #include "vax-tdep.h"
 
-#include "gdb_string.h"
+#include <string.h>
 
 /* Signal trampolines.  */
 
diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c
index 193a6d7..e32c701 100644
--- a/gdb/windows-nat.c
+++ b/gdb/windows-nat.c
@@ -51,7 +51,7 @@
 #include "objfiles.h"
 #include "gdb_bfd.h"
 #include "gdb_obstack.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "gdbthread.h"
 #include "gdbcmd.h"
 #include <unistd.h>
diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c
index 7f34ac9..c741fb4 100644
--- a/gdb/xcoffread.c
+++ b/gdb/xcoffread.c
@@ -24,7 +24,7 @@
 #include <sys/types.h>
 #include <fcntl.h>
 #include <ctype.h>
-#include "gdb_string.h"
+#include <string.h>
 
 #ifdef HAVE_SYS_FILE_H
 #include <sys/file.h>
diff --git a/gdb/xml-support.c b/gdb/xml-support.c
index 1682d8e..f6748e5 100644
--- a/gdb/xml-support.c
+++ b/gdb/xml-support.c
@@ -23,7 +23,7 @@
 #include "xml-support.h"
 #include "filestuff.h"
 
-#include "gdb_string.h"
+#include <string.h>
 #include "safe-ctype.h"
 
 /* Debugging flag.  */
diff --git a/gdb/xstormy16-tdep.c b/gdb/xstormy16-tdep.c
index 99b0c5e..cb7d31e 100644
--- a/gdb/xstormy16-tdep.c
+++ b/gdb/xstormy16-tdep.c
@@ -29,7 +29,7 @@
 #include "value.h"
 #include "dis-asm.h"
 #include "inferior.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "gdb_assert.h"
 #include "arch-utils.h"
 #include "floatformat.h"
diff --git a/gdb/xtensa-linux-nat.c b/gdb/xtensa-linux-nat.c
index 3934165..ed60429 100644
--- a/gdb/xtensa-linux-nat.c
+++ b/gdb/xtensa-linux-nat.c
@@ -18,7 +18,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "frame.h"
 #include "inferior.h"
 #include "gdbcore.h"
-- 
1.8.1.4

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH v3 10/13] don't check for unistd.h
  2013-11-18 20:27 [PATCH v3 00/13] use gnulib more heavily Tom Tromey
                   ` (7 preceding siblings ...)
  2013-11-18 20:46 ` [PATCH v3 04/13] remove gdb_string.h Tom Tromey
@ 2013-11-18 20:46 ` Tom Tromey
  2013-11-19 20:59   ` Pierre Muller
                     ` (2 more replies)
  2013-11-18 20:46 ` [PATCH v3 09/13] stdlib.h is universal too Tom Tromey
                   ` (3 subsequent siblings)
  12 siblings, 3 replies; 24+ messages in thread
From: Tom Tromey @ 2013-11-18 20:46 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

We don't use the result of checking for unistd.h, so this removes the
check.

2013-11-18  Tom Tromey  <tromey@redhat.com>

	* configure: Rebuild.
	* configure.ac: Don't check for unistd.h.
---
 gdb/ChangeLog    | 5 +++++
 gdb/configure    | 2 +-
 gdb/configure.ac | 2 +-
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/gdb/configure b/gdb/configure
index 9739195..23e533d 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -8762,7 +8762,7 @@ for ac_header in nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
 		  sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
 		  sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
 		  termios.h termio.h \
-		  sgtty.h unistd.h elf_hp.h \
+		  sgtty.h elf_hp.h \
 		  dlfcn.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
diff --git a/gdb/configure.ac b/gdb/configure.ac
index 74d56e4..d2b5d29 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -1081,7 +1081,7 @@ AC_CHECK_HEADERS([nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
 		  sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
 		  sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
 		  termios.h termio.h \
-		  sgtty.h unistd.h elf_hp.h \
+		  sgtty.h elf_hp.h \
 		  dlfcn.h])
 AC_CHECK_HEADERS(sys/proc.h, [], [],
 [#if HAVE_SYS_PARAM_H
-- 
1.8.1.4

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH v3 06/13] import gnulib dirent module
  2013-11-18 20:27 [PATCH v3 00/13] use gnulib more heavily Tom Tromey
                   ` (9 preceding siblings ...)
  2013-11-18 20:46 ` [PATCH v3 09/13] stdlib.h is universal too Tom Tromey
@ 2013-11-18 21:12 ` Tom Tromey
  2013-11-18 21:28 ` [PATCH v3 05/13] don't check for string.h or strings.h Tom Tromey
  2013-11-18 23:03 ` [PATCH v3 13/13] remove gdb_stat.h Tom Tromey
  12 siblings, 0 replies; 24+ messages in thread
From: Tom Tromey @ 2013-11-18 21:12 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This imports the gnulib dirent module.  It doesn't make any other
changes to gdb.

2013-11-18  Tom Tromey  <tromey@redhat.com>

	* gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add dirent.
	* gnulib/aclocal.m4: Update.
	* gnulib/config.in: Update.
	* gnulib/configure: Update.
	* gnulib/import/Makefile.am: Update.
	* gnulib/import/Makefile.in: Update.
	* gnulib/import/dirent.in.h: New.
	* gnulib/import/m4/dirent_h.m4: New.
	* gnulib/import/m4/gnulib-cache.m4: Update.
	* gnulib/import/m4/gnulib-comp.m4: Update.
---
 gdb/ChangeLog                        |  13 +
 gdb/gnulib/aclocal.m4                |   1 +
 gdb/gnulib/config.in                 |  27 ++
 gdb/gnulib/configure                 | 729 ++++++++++++++++++++++-------------
 gdb/gnulib/import/Makefile.am        |  50 ++-
 gdb/gnulib/import/Makefile.in        |  93 ++++-
 gdb/gnulib/import/dirent.in.h        | 258 +++++++++++++
 gdb/gnulib/import/m4/dirent_h.m4     |  64 +++
 gdb/gnulib/import/m4/gnulib-cache.m4 |   3 +-
 gdb/gnulib/import/m4/gnulib-comp.m4  |   4 +
 gdb/gnulib/update-gnulib.sh          |   1 +
 11 files changed, 951 insertions(+), 292 deletions(-)
 create mode 100644 gdb/gnulib/import/dirent.in.h
 create mode 100644 gdb/gnulib/import/m4/dirent_h.m4

diff --git a/gdb/gnulib/aclocal.m4 b/gdb/gnulib/aclocal.m4
index c541001..ba89b44 100644
--- a/gdb/gnulib/aclocal.m4
+++ b/gdb/gnulib/aclocal.m4
@@ -1016,6 +1016,7 @@ m4_include([import/m4/00gnulib.m4])
 m4_include([import/m4/alloca.m4])
 m4_include([import/m4/codeset.m4])
 m4_include([import/m4/configmake.m4])
+m4_include([import/m4/dirent_h.m4])
 m4_include([import/m4/errno_h.m4])
 m4_include([import/m4/exponentd.m4])
 m4_include([import/m4/exponentl.m4])
diff --git a/gdb/gnulib/config.in b/gdb/gnulib/config.in
index f006181..d109990 100644
--- a/gdb/gnulib/config.in
+++ b/gdb/gnulib/config.in
@@ -109,6 +109,9 @@
    don't. */
 #undef HAVE_DECL_TOWLOWER
 
+/* Define to 1 if you have the <dirent.h> header file. */
+#undef HAVE_DIRENT_H
+
 /* Define to 1 if you have the <features.h> header file. */
 #undef HAVE_FEATURES_H
 
@@ -179,6 +182,9 @@
 /* Define to 1 if acosl is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_ACOSL
 
+/* Define to 1 if alphasort is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_ALPHASORT
+
 /* Define to 1 if asinf is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_ASINF
 
@@ -215,6 +221,9 @@
 /* Define to 1 if chown is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_CHOWN
 
+/* Define to 1 if closedir is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_CLOSEDIR
+
 /* Define to 1 if copysign is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_COPYSIGN
 
@@ -233,6 +242,9 @@
 /* Define to 1 if cosl is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_COSL
 
+/* Define to 1 if dirfd is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_DIRFD
+
 /* Define to 1 if dup is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_DUP
 
@@ -293,6 +305,9 @@
 /* Define to 1 if fdatasync is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_FDATASYNC
 
+/* Define to 1 if fdopendir is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_FDOPENDIR
+
 /* Define to 1 if ffsl is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_FFSL
 
@@ -488,6 +503,9 @@
 /* Define to 1 if modfl is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_MODFL
 
+/* Define to 1 if opendir is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_OPENDIR
+
 /* Define to 1 if pipe is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_PIPE
 
@@ -506,6 +524,9 @@
 /* Define to 1 if rawmemchr is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_RAWMEMCHR
 
+/* Define to 1 if readdir is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_READDIR
+
 /* Define to 1 if readlink is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_READLINK
 
@@ -521,6 +542,9 @@
 /* Define to 1 if remainderl is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_REMAINDERL
 
+/* Define to 1 if rewinddir is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_REWINDDIR
+
 /* Define to 1 if rint is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_RINT
 
@@ -542,6 +566,9 @@
 /* Define to 1 if roundl is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_ROUNDL
 
+/* Define to 1 if scandir is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_SCANDIR
+
 /* Define to 1 if sethostname is declared even after undefining macros. */
 #undef HAVE_RAW_DECL_SETHOSTNAME
 
diff --git a/gdb/gnulib/configure b/gdb/gnulib/configure
index a694e24..6c2a236 100644
--- a/gdb/gnulib/configure
+++ b/gdb/gnulib/configure
@@ -588,9 +588,9 @@ ac_includes_default="\
 # include <unistd.h>
 #endif"
 
+ac_header_list=
 gl_fnmatch_required=POSIX
 ac_func_list=
-ac_header_list=
 ac_subst_vars='am__EXEEXT_FALSE
 am__EXEEXT_TRUE
 gltests_LTLIBOBJS
@@ -663,126 +663,6 @@ NEXT_SYS_TYPES_H
 NEXT_AS_FIRST_DIRECTIVE_STRING_H
 NEXT_STRING_H
 HAVE_WINSOCK2_H
-UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
-UNISTD_H_HAVE_WINSOCK2_H
-REPLACE_WRITE
-REPLACE_USLEEP
-REPLACE_UNLINKAT
-REPLACE_UNLINK
-REPLACE_TTYNAME_R
-REPLACE_SYMLINK
-REPLACE_SLEEP
-REPLACE_RMDIR
-REPLACE_READLINK
-REPLACE_READ
-REPLACE_PWRITE
-REPLACE_PREAD
-REPLACE_LSEEK
-REPLACE_LINKAT
-REPLACE_LINK
-REPLACE_LCHOWN
-REPLACE_ISATTY
-REPLACE_GETPAGESIZE
-REPLACE_GETGROUPS
-REPLACE_GETLOGIN_R
-REPLACE_GETDOMAINNAME
-REPLACE_GETCWD
-REPLACE_FTRUNCATE
-REPLACE_FCHOWNAT
-REPLACE_DUP2
-REPLACE_DUP
-REPLACE_CLOSE
-REPLACE_CHOWN
-HAVE_SYS_PARAM_H
-HAVE_OS_H
-HAVE_DECL_TTYNAME_R
-HAVE_DECL_SETHOSTNAME
-HAVE_DECL_GETUSERSHELL
-HAVE_DECL_GETPAGESIZE
-HAVE_DECL_GETLOGIN_R
-HAVE_DECL_GETDOMAINNAME
-HAVE_DECL_FDATASYNC
-HAVE_DECL_FCHDIR
-HAVE_DECL_ENVIRON
-HAVE_USLEEP
-HAVE_UNLINKAT
-HAVE_SYMLINKAT
-HAVE_SYMLINK
-HAVE_SLEEP
-HAVE_SETHOSTNAME
-HAVE_READLINKAT
-HAVE_READLINK
-HAVE_PWRITE
-HAVE_PREAD
-HAVE_PIPE2
-HAVE_PIPE
-HAVE_LINKAT
-HAVE_LINK
-HAVE_LCHOWN
-HAVE_GROUP_MEMBER
-HAVE_GETPAGESIZE
-HAVE_GETLOGIN
-HAVE_GETHOSTNAME
-HAVE_GETGROUPS
-HAVE_GETDTABLESIZE
-HAVE_FTRUNCATE
-HAVE_FSYNC
-HAVE_FDATASYNC
-HAVE_FCHOWNAT
-HAVE_FCHDIR
-HAVE_FACCESSAT
-HAVE_EUIDACCESS
-HAVE_DUP3
-HAVE_DUP2
-HAVE_CHOWN
-GNULIB_WRITE
-GNULIB_USLEEP
-GNULIB_UNLINKAT
-GNULIB_UNLINK
-GNULIB_UNISTD_H_SIGPIPE
-GNULIB_UNISTD_H_NONBLOCKING
-GNULIB_TTYNAME_R
-GNULIB_SYMLINKAT
-GNULIB_SYMLINK
-GNULIB_SLEEP
-GNULIB_SETHOSTNAME
-GNULIB_RMDIR
-GNULIB_READLINKAT
-GNULIB_READLINK
-GNULIB_READ
-GNULIB_PWRITE
-GNULIB_PREAD
-GNULIB_PIPE2
-GNULIB_PIPE
-GNULIB_LSEEK
-GNULIB_LINKAT
-GNULIB_LINK
-GNULIB_LCHOWN
-GNULIB_ISATTY
-GNULIB_GROUP_MEMBER
-GNULIB_GETUSERSHELL
-GNULIB_GETPAGESIZE
-GNULIB_GETLOGIN_R
-GNULIB_GETLOGIN
-GNULIB_GETHOSTNAME
-GNULIB_GETGROUPS
-GNULIB_GETDTABLESIZE
-GNULIB_GETDOMAINNAME
-GNULIB_GETCWD
-GNULIB_FTRUNCATE
-GNULIB_FSYNC
-GNULIB_FDATASYNC
-GNULIB_FCHOWNAT
-GNULIB_FCHDIR
-GNULIB_FACCESSAT
-GNULIB_EUIDACCESS
-GNULIB_ENVIRON
-GNULIB_DUP3
-GNULIB_DUP2
-GNULIB_DUP
-GNULIB_CLOSE
-GNULIB_CHOWN
-GNULIB_CHDIR
 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
 NEXT_STDDEF_H
 GL_GENERATE_STDDEF_H_FALSE
@@ -1287,10 +1167,154 @@ GL_GENERATE_ERRNO_H_TRUE
 ERRNO_H
 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
 NEXT_ERRNO_H
+HAVE_DIRENT_H
+NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
+NEXT_DIRENT_H
 PRAGMA_COLUMNS
 PRAGMA_SYSTEM_HEADER
 INCLUDE_NEXT_AS_FIRST_DIRECTIVE
 INCLUDE_NEXT
+REPLACE_FDOPENDIR
+REPLACE_DIRFD
+REPLACE_CLOSEDIR
+REPLACE_OPENDIR
+HAVE_ALPHASORT
+HAVE_SCANDIR
+HAVE_FDOPENDIR
+HAVE_DECL_FDOPENDIR
+HAVE_DECL_DIRFD
+HAVE_CLOSEDIR
+HAVE_REWINDDIR
+HAVE_READDIR
+HAVE_OPENDIR
+GNULIB_ALPHASORT
+GNULIB_SCANDIR
+GNULIB_FDOPENDIR
+GNULIB_DIRFD
+GNULIB_CLOSEDIR
+GNULIB_REWINDDIR
+GNULIB_READDIR
+GNULIB_OPENDIR
+UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
+UNISTD_H_HAVE_WINSOCK2_H
+REPLACE_WRITE
+REPLACE_USLEEP
+REPLACE_UNLINKAT
+REPLACE_UNLINK
+REPLACE_TTYNAME_R
+REPLACE_SYMLINK
+REPLACE_SLEEP
+REPLACE_RMDIR
+REPLACE_READLINK
+REPLACE_READ
+REPLACE_PWRITE
+REPLACE_PREAD
+REPLACE_LSEEK
+REPLACE_LINKAT
+REPLACE_LINK
+REPLACE_LCHOWN
+REPLACE_ISATTY
+REPLACE_GETPAGESIZE
+REPLACE_GETGROUPS
+REPLACE_GETLOGIN_R
+REPLACE_GETDOMAINNAME
+REPLACE_GETCWD
+REPLACE_FTRUNCATE
+REPLACE_FCHOWNAT
+REPLACE_DUP2
+REPLACE_DUP
+REPLACE_CLOSE
+REPLACE_CHOWN
+HAVE_SYS_PARAM_H
+HAVE_OS_H
+HAVE_DECL_TTYNAME_R
+HAVE_DECL_SETHOSTNAME
+HAVE_DECL_GETUSERSHELL
+HAVE_DECL_GETPAGESIZE
+HAVE_DECL_GETLOGIN_R
+HAVE_DECL_GETDOMAINNAME
+HAVE_DECL_FDATASYNC
+HAVE_DECL_FCHDIR
+HAVE_DECL_ENVIRON
+HAVE_USLEEP
+HAVE_UNLINKAT
+HAVE_SYMLINKAT
+HAVE_SYMLINK
+HAVE_SLEEP
+HAVE_SETHOSTNAME
+HAVE_READLINKAT
+HAVE_READLINK
+HAVE_PWRITE
+HAVE_PREAD
+HAVE_PIPE2
+HAVE_PIPE
+HAVE_LINKAT
+HAVE_LINK
+HAVE_LCHOWN
+HAVE_GROUP_MEMBER
+HAVE_GETPAGESIZE
+HAVE_GETLOGIN
+HAVE_GETHOSTNAME
+HAVE_GETGROUPS
+HAVE_GETDTABLESIZE
+HAVE_FTRUNCATE
+HAVE_FSYNC
+HAVE_FDATASYNC
+HAVE_FCHOWNAT
+HAVE_FCHDIR
+HAVE_FACCESSAT
+HAVE_EUIDACCESS
+HAVE_DUP3
+HAVE_DUP2
+HAVE_CHOWN
+GNULIB_WRITE
+GNULIB_USLEEP
+GNULIB_UNLINKAT
+GNULIB_UNLINK
+GNULIB_UNISTD_H_SIGPIPE
+GNULIB_UNISTD_H_NONBLOCKING
+GNULIB_TTYNAME_R
+GNULIB_SYMLINKAT
+GNULIB_SYMLINK
+GNULIB_SLEEP
+GNULIB_SETHOSTNAME
+GNULIB_RMDIR
+GNULIB_READLINKAT
+GNULIB_READLINK
+GNULIB_READ
+GNULIB_PWRITE
+GNULIB_PREAD
+GNULIB_PIPE2
+GNULIB_PIPE
+GNULIB_LSEEK
+GNULIB_LINKAT
+GNULIB_LINK
+GNULIB_LCHOWN
+GNULIB_ISATTY
+GNULIB_GROUP_MEMBER
+GNULIB_GETUSERSHELL
+GNULIB_GETPAGESIZE
+GNULIB_GETLOGIN_R
+GNULIB_GETLOGIN
+GNULIB_GETHOSTNAME
+GNULIB_GETGROUPS
+GNULIB_GETDTABLESIZE
+GNULIB_GETDOMAINNAME
+GNULIB_GETCWD
+GNULIB_FTRUNCATE
+GNULIB_FSYNC
+GNULIB_FDATASYNC
+GNULIB_FCHOWNAT
+GNULIB_FCHDIR
+GNULIB_FACCESSAT
+GNULIB_EUIDACCESS
+GNULIB_ENVIRON
+GNULIB_DUP3
+GNULIB_DUP2
+GNULIB_DUP
+GNULIB_CLOSE
+GNULIB_CHOWN
+GNULIB_CHDIR
 pkglibexecdir
 lispdir
 GL_GENERATE_ALLOCA_H_FALSE
@@ -2994,6 +3018,7 @@ $as_echo "$as_me: creating cache $cache_file" >&6;}
   >$cache_file
 fi
 
+as_fn_append ac_header_list " dirent.h"
 as_fn_append ac_func_list " btowc"
 as_fn_append ac_func_list " isblank"
 as_fn_append ac_func_list " iswctype"
@@ -4724,6 +4749,7 @@ fi
   # Code from module alloca:
   # Code from module alloca-opt:
   # Code from module configmake:
+  # Code from module dirent:
   # Code from module errno:
   # Code from module extensions:
 
@@ -5581,20 +5607,166 @@ _ACEOF
 fi
 
 
-
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
-$as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
-if test "${gl_cv_have_include_next+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  rm -rf conftestd1a conftestd1b conftestd2
-     mkdir conftestd1a conftestd1b conftestd2
-                                                  cat <<EOF > conftestd1a/conftest.h
-#define DEFINED_IN_CONFTESTD1
-#include_next <conftest.h>
-#ifdef DEFINED_IN_CONFTESTD2
-int foo;
-#else
+  GNULIB_CHDIR=0;
+  GNULIB_CHOWN=0;
+  GNULIB_CLOSE=0;
+  GNULIB_DUP=0;
+  GNULIB_DUP2=0;
+  GNULIB_DUP3=0;
+  GNULIB_ENVIRON=0;
+  GNULIB_EUIDACCESS=0;
+  GNULIB_FACCESSAT=0;
+  GNULIB_FCHDIR=0;
+  GNULIB_FCHOWNAT=0;
+  GNULIB_FDATASYNC=0;
+  GNULIB_FSYNC=0;
+  GNULIB_FTRUNCATE=0;
+  GNULIB_GETCWD=0;
+  GNULIB_GETDOMAINNAME=0;
+  GNULIB_GETDTABLESIZE=0;
+  GNULIB_GETGROUPS=0;
+  GNULIB_GETHOSTNAME=0;
+  GNULIB_GETLOGIN=0;
+  GNULIB_GETLOGIN_R=0;
+  GNULIB_GETPAGESIZE=0;
+  GNULIB_GETUSERSHELL=0;
+  GNULIB_GROUP_MEMBER=0;
+  GNULIB_ISATTY=0;
+  GNULIB_LCHOWN=0;
+  GNULIB_LINK=0;
+  GNULIB_LINKAT=0;
+  GNULIB_LSEEK=0;
+  GNULIB_PIPE=0;
+  GNULIB_PIPE2=0;
+  GNULIB_PREAD=0;
+  GNULIB_PWRITE=0;
+  GNULIB_READ=0;
+  GNULIB_READLINK=0;
+  GNULIB_READLINKAT=0;
+  GNULIB_RMDIR=0;
+  GNULIB_SETHOSTNAME=0;
+  GNULIB_SLEEP=0;
+  GNULIB_SYMLINK=0;
+  GNULIB_SYMLINKAT=0;
+  GNULIB_TTYNAME_R=0;
+  GNULIB_UNISTD_H_NONBLOCKING=0;
+  GNULIB_UNISTD_H_SIGPIPE=0;
+  GNULIB_UNLINK=0;
+  GNULIB_UNLINKAT=0;
+  GNULIB_USLEEP=0;
+  GNULIB_WRITE=0;
+    HAVE_CHOWN=1;
+  HAVE_DUP2=1;
+  HAVE_DUP3=1;
+  HAVE_EUIDACCESS=1;
+  HAVE_FACCESSAT=1;
+  HAVE_FCHDIR=1;
+  HAVE_FCHOWNAT=1;
+  HAVE_FDATASYNC=1;
+  HAVE_FSYNC=1;
+  HAVE_FTRUNCATE=1;
+  HAVE_GETDTABLESIZE=1;
+  HAVE_GETGROUPS=1;
+  HAVE_GETHOSTNAME=1;
+  HAVE_GETLOGIN=1;
+  HAVE_GETPAGESIZE=1;
+  HAVE_GROUP_MEMBER=1;
+  HAVE_LCHOWN=1;
+  HAVE_LINK=1;
+  HAVE_LINKAT=1;
+  HAVE_PIPE=1;
+  HAVE_PIPE2=1;
+  HAVE_PREAD=1;
+  HAVE_PWRITE=1;
+  HAVE_READLINK=1;
+  HAVE_READLINKAT=1;
+  HAVE_SETHOSTNAME=1;
+  HAVE_SLEEP=1;
+  HAVE_SYMLINK=1;
+  HAVE_SYMLINKAT=1;
+  HAVE_UNLINKAT=1;
+  HAVE_USLEEP=1;
+  HAVE_DECL_ENVIRON=1;
+  HAVE_DECL_FCHDIR=1;
+  HAVE_DECL_FDATASYNC=1;
+  HAVE_DECL_GETDOMAINNAME=1;
+  HAVE_DECL_GETLOGIN_R=1;
+  HAVE_DECL_GETPAGESIZE=1;
+  HAVE_DECL_GETUSERSHELL=1;
+  HAVE_DECL_SETHOSTNAME=1;
+  HAVE_DECL_TTYNAME_R=1;
+  HAVE_OS_H=0;
+  HAVE_SYS_PARAM_H=0;
+  REPLACE_CHOWN=0;
+  REPLACE_CLOSE=0;
+  REPLACE_DUP=0;
+  REPLACE_DUP2=0;
+  REPLACE_FCHOWNAT=0;
+  REPLACE_FTRUNCATE=0;
+  REPLACE_GETCWD=0;
+  REPLACE_GETDOMAINNAME=0;
+  REPLACE_GETLOGIN_R=0;
+  REPLACE_GETGROUPS=0;
+  REPLACE_GETPAGESIZE=0;
+  REPLACE_ISATTY=0;
+  REPLACE_LCHOWN=0;
+  REPLACE_LINK=0;
+  REPLACE_LINKAT=0;
+  REPLACE_LSEEK=0;
+  REPLACE_PREAD=0;
+  REPLACE_PWRITE=0;
+  REPLACE_READ=0;
+  REPLACE_READLINK=0;
+  REPLACE_RMDIR=0;
+  REPLACE_SLEEP=0;
+  REPLACE_SYMLINK=0;
+  REPLACE_TTYNAME_R=0;
+  REPLACE_UNLINK=0;
+  REPLACE_UNLINKAT=0;
+  REPLACE_USLEEP=0;
+  REPLACE_WRITE=0;
+  UNISTD_H_HAVE_WINSOCK2_H=0;
+  UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
+
+
+
+     GNULIB_OPENDIR=0;
+  GNULIB_READDIR=0;
+  GNULIB_REWINDDIR=0;
+  GNULIB_CLOSEDIR=0;
+  GNULIB_DIRFD=0;
+  GNULIB_FDOPENDIR=0;
+  GNULIB_SCANDIR=0;
+  GNULIB_ALPHASORT=0;
+    HAVE_OPENDIR=1;
+  HAVE_READDIR=1;
+  HAVE_REWINDDIR=1;
+  HAVE_CLOSEDIR=1;
+  HAVE_DECL_DIRFD=1;
+  HAVE_DECL_FDOPENDIR=1;
+  HAVE_FDOPENDIR=1;
+  HAVE_SCANDIR=1;
+  HAVE_ALPHASORT=1;
+  REPLACE_OPENDIR=0;
+  REPLACE_CLOSEDIR=0;
+  REPLACE_DIRFD=0;
+  REPLACE_FDOPENDIR=0;
+
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
+$as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
+if test "${gl_cv_have_include_next+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  rm -rf conftestd1a conftestd1b conftestd2
+     mkdir conftestd1a conftestd1b conftestd2
+                                                  cat <<EOF > conftestd1a/conftest.h
+#define DEFINED_IN_CONFTESTD1
+#include_next <conftest.h>
+#ifdef DEFINED_IN_CONFTESTD2
+int foo;
+#else
 #error "include_next doesn't work"
 #endif
 EOF
@@ -5696,6 +5868,26 @@ $as_echo "$gl_cv_pragma_columns" >&6; }
 
 
 
+
+  for ac_header in $ac_header_list
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+eval as_val=\$$as_ac_Header
+   if test "x$as_val" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
 $as_echo_n "checking for complete errno.h... " >&6; }
 if test "${gl_cv_header_errno_h_complete+set}" = set; then :
@@ -6149,24 +6341,6 @@ done
 
 
 
-  for ac_header in $ac_header_list
-do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
-"
-eval as_val=\$$as_ac_Header
-   if test "x$as_val" = x""yes; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
-
   GNULIB_ACOSF=0;
   GNULIB_ACOSL=0;
   GNULIB_ASINF=0;
@@ -9570,129 +9744,6 @@ $as_echo "#define REPLACE_STRERROR_0 1" >>confdefs.h
   esac
 
 
-  GNULIB_CHDIR=0;
-  GNULIB_CHOWN=0;
-  GNULIB_CLOSE=0;
-  GNULIB_DUP=0;
-  GNULIB_DUP2=0;
-  GNULIB_DUP3=0;
-  GNULIB_ENVIRON=0;
-  GNULIB_EUIDACCESS=0;
-  GNULIB_FACCESSAT=0;
-  GNULIB_FCHDIR=0;
-  GNULIB_FCHOWNAT=0;
-  GNULIB_FDATASYNC=0;
-  GNULIB_FSYNC=0;
-  GNULIB_FTRUNCATE=0;
-  GNULIB_GETCWD=0;
-  GNULIB_GETDOMAINNAME=0;
-  GNULIB_GETDTABLESIZE=0;
-  GNULIB_GETGROUPS=0;
-  GNULIB_GETHOSTNAME=0;
-  GNULIB_GETLOGIN=0;
-  GNULIB_GETLOGIN_R=0;
-  GNULIB_GETPAGESIZE=0;
-  GNULIB_GETUSERSHELL=0;
-  GNULIB_GROUP_MEMBER=0;
-  GNULIB_ISATTY=0;
-  GNULIB_LCHOWN=0;
-  GNULIB_LINK=0;
-  GNULIB_LINKAT=0;
-  GNULIB_LSEEK=0;
-  GNULIB_PIPE=0;
-  GNULIB_PIPE2=0;
-  GNULIB_PREAD=0;
-  GNULIB_PWRITE=0;
-  GNULIB_READ=0;
-  GNULIB_READLINK=0;
-  GNULIB_READLINKAT=0;
-  GNULIB_RMDIR=0;
-  GNULIB_SETHOSTNAME=0;
-  GNULIB_SLEEP=0;
-  GNULIB_SYMLINK=0;
-  GNULIB_SYMLINKAT=0;
-  GNULIB_TTYNAME_R=0;
-  GNULIB_UNISTD_H_NONBLOCKING=0;
-  GNULIB_UNISTD_H_SIGPIPE=0;
-  GNULIB_UNLINK=0;
-  GNULIB_UNLINKAT=0;
-  GNULIB_USLEEP=0;
-  GNULIB_WRITE=0;
-    HAVE_CHOWN=1;
-  HAVE_DUP2=1;
-  HAVE_DUP3=1;
-  HAVE_EUIDACCESS=1;
-  HAVE_FACCESSAT=1;
-  HAVE_FCHDIR=1;
-  HAVE_FCHOWNAT=1;
-  HAVE_FDATASYNC=1;
-  HAVE_FSYNC=1;
-  HAVE_FTRUNCATE=1;
-  HAVE_GETDTABLESIZE=1;
-  HAVE_GETGROUPS=1;
-  HAVE_GETHOSTNAME=1;
-  HAVE_GETLOGIN=1;
-  HAVE_GETPAGESIZE=1;
-  HAVE_GROUP_MEMBER=1;
-  HAVE_LCHOWN=1;
-  HAVE_LINK=1;
-  HAVE_LINKAT=1;
-  HAVE_PIPE=1;
-  HAVE_PIPE2=1;
-  HAVE_PREAD=1;
-  HAVE_PWRITE=1;
-  HAVE_READLINK=1;
-  HAVE_READLINKAT=1;
-  HAVE_SETHOSTNAME=1;
-  HAVE_SLEEP=1;
-  HAVE_SYMLINK=1;
-  HAVE_SYMLINKAT=1;
-  HAVE_UNLINKAT=1;
-  HAVE_USLEEP=1;
-  HAVE_DECL_ENVIRON=1;
-  HAVE_DECL_FCHDIR=1;
-  HAVE_DECL_FDATASYNC=1;
-  HAVE_DECL_GETDOMAINNAME=1;
-  HAVE_DECL_GETLOGIN_R=1;
-  HAVE_DECL_GETPAGESIZE=1;
-  HAVE_DECL_GETUSERSHELL=1;
-  HAVE_DECL_SETHOSTNAME=1;
-  HAVE_DECL_TTYNAME_R=1;
-  HAVE_OS_H=0;
-  HAVE_SYS_PARAM_H=0;
-  REPLACE_CHOWN=0;
-  REPLACE_CLOSE=0;
-  REPLACE_DUP=0;
-  REPLACE_DUP2=0;
-  REPLACE_FCHOWNAT=0;
-  REPLACE_FTRUNCATE=0;
-  REPLACE_GETCWD=0;
-  REPLACE_GETDOMAINNAME=0;
-  REPLACE_GETLOGIN_R=0;
-  REPLACE_GETGROUPS=0;
-  REPLACE_GETPAGESIZE=0;
-  REPLACE_ISATTY=0;
-  REPLACE_LCHOWN=0;
-  REPLACE_LINK=0;
-  REPLACE_LINKAT=0;
-  REPLACE_LSEEK=0;
-  REPLACE_PREAD=0;
-  REPLACE_PWRITE=0;
-  REPLACE_READ=0;
-  REPLACE_READLINK=0;
-  REPLACE_RMDIR=0;
-  REPLACE_SLEEP=0;
-  REPLACE_SYMLINK=0;
-  REPLACE_TTYNAME_R=0;
-  REPLACE_UNLINK=0;
-  REPLACE_UNLINKAT=0;
-  REPLACE_USLEEP=0;
-  REPLACE_WRITE=0;
-  UNISTD_H_HAVE_WINSOCK2_H=0;
-  UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
-
-
-
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
@@ -10263,6 +10314,132 @@ fi
 
 
 
+
+
+
+
+
+
+
+     if test $gl_cv_have_include_next = yes; then
+       gl_cv_next_dirent_h='<'dirent.h'>'
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
+$as_echo_n "checking absolute name of <dirent.h>... " >&6; }
+if test "${gl_cv_next_dirent_h+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+
+             if test $ac_cv_header_dirent_h = yes; then
+
+
+               cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <dirent.h>
+
+_ACEOF
+                                                                                                                        case "$host_os" in
+                 aix*) gl_absname_cpp="$ac_cpp -C" ;;
+                 *)    gl_absname_cpp="$ac_cpp" ;;
+               esac
+
+               case "$host_os" in
+                 mingw*)
+                                                                                                                                     gl_dirsep_regex='[/\\]'
+                   ;;
+                 *)
+                   gl_dirsep_regex='\/'
+                   ;;
+               esac
+                                             gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
+
+               gl_header_literal_regex=`echo 'dirent.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/
+                   s|^/[^/]|//&|
+                   p
+                   q
+                 }'
+                                                            gl_cv_next_dirent_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+                      sed -n "$gl_absolute_header_sed"`'"'
+          else
+               gl_cv_next_dirent_h='<'dirent.h'>'
+             fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
+$as_echo "$gl_cv_next_dirent_h" >&6; }
+     fi
+     NEXT_DIRENT_H=$gl_cv_next_dirent_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='<'dirent.h'>'
+     else
+       # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+       gl_next_as_first_directive=$gl_cv_next_dirent_h
+     fi
+     NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
+
+
+
+
+  if test $ac_cv_header_dirent_h = yes; then
+    HAVE_DIRENT_H=1
+  else
+    HAVE_DIRENT_H=0
+  fi
+
+
+
+    for gl_func in alphasort closedir dirfd fdopendir opendir readdir rewinddir scandir; 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.  */
+#include <dirent.h>
+
+int
+main ()
+{
+#undef $gl_func
+  (void) $gl_func;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$as_gl_Symbol=yes"
+else
+  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
+      done
+
+
+
+
+
+
+
   FLOAT_H=
   REPLACE_FLOAT_LDBL=0
   case "$host_os" in
diff --git a/gdb/gnulib/import/Makefile.am b/gdb/gnulib/import/Makefile.am
index cfc18a3..0fd64e5 100644
--- a/gdb/gnulib/import/Makefile.am
+++ b/gdb/gnulib/import/Makefile.am
@@ -21,7 +21,7 @@
 # the same distribution terms as the rest of that program.
 #
 # Generated by gnulib-tool.
-# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=import --m4-base=import/m4 --doc-base=doc --tests-base=tests --aux-dir=import/extra --no-conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files fnmatch-gnu frexpl inttypes memmem pathmax strerror strstr unistd update-copyright
+# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=import --m4-base=import/m4 --doc-base=doc --tests-base=tests --aux-dir=import/extra --no-conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files dirent fnmatch-gnu frexpl inttypes memmem pathmax strerror strstr unistd update-copyright
 
 AUTOMAKE_OPTIONS = 1.5 gnits
 
@@ -127,6 +127,54 @@ CLEANFILES += configmake.h configmake.h-t
 
 ## end   gnulib module configmake
 
+## begin gnulib module dirent
+
+BUILT_SOURCES += dirent.h
+
+# We need the following in order to create <dirent.h> when the system
+# doesn't have one that works with the given compiler.
+dirent.h: dirent.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+	  sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+	      -e 's|@''HAVE_DIRENT_H''@|$(HAVE_DIRENT_H)|g' \
+	      -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+	      -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+	      -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+	      -e 's|@''NEXT_DIRENT_H''@|$(NEXT_DIRENT_H)|g' \
+	      -e 's/@''GNULIB_OPENDIR''@/$(GNULIB_OPENDIR)/g' \
+	      -e 's/@''GNULIB_READDIR''@/$(GNULIB_READDIR)/g' \
+	      -e 's/@''GNULIB_REWINDDIR''@/$(GNULIB_REWINDDIR)/g' \
+	      -e 's/@''GNULIB_CLOSEDIR''@/$(GNULIB_CLOSEDIR)/g' \
+	      -e 's/@''GNULIB_DIRFD''@/$(GNULIB_DIRFD)/g' \
+	      -e 's/@''GNULIB_FDOPENDIR''@/$(GNULIB_FDOPENDIR)/g' \
+	      -e 's/@''GNULIB_SCANDIR''@/$(GNULIB_SCANDIR)/g' \
+	      -e 's/@''GNULIB_ALPHASORT''@/$(GNULIB_ALPHASORT)/g' \
+	      -e 's/@''HAVE_OPENDIR''@/$(HAVE_OPENDIR)/g' \
+	      -e 's/@''HAVE_READDIR''@/$(HAVE_READDIR)/g' \
+	      -e 's/@''HAVE_REWINDDIR''@/$(HAVE_REWINDDIR)/g' \
+	      -e 's/@''HAVE_CLOSEDIR''@/$(HAVE_CLOSEDIR)/g' \
+	      -e 's|@''HAVE_DECL_DIRFD''@|$(HAVE_DECL_DIRFD)|g' \
+	      -e 's|@''HAVE_DECL_FDOPENDIR''@|$(HAVE_DECL_FDOPENDIR)|g' \
+	      -e 's|@''HAVE_FDOPENDIR''@|$(HAVE_FDOPENDIR)|g' \
+	      -e 's|@''HAVE_SCANDIR''@|$(HAVE_SCANDIR)|g' \
+	      -e 's|@''HAVE_ALPHASORT''@|$(HAVE_ALPHASORT)|g' \
+	      -e 's|@''REPLACE_OPENDIR''@|$(REPLACE_OPENDIR)|g' \
+	      -e 's|@''REPLACE_CLOSEDIR''@|$(REPLACE_CLOSEDIR)|g' \
+	      -e 's|@''REPLACE_DIRFD''@|$(REPLACE_DIRFD)|g' \
+	      -e 's|@''REPLACE_FDOPENDIR''@|$(REPLACE_FDOPENDIR)|g' \
+	      -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+	      -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+	      -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+	      < $(srcdir)/dirent.in.h; \
+	} > $@-t && \
+	mv $@-t $@
+MOSTLYCLEANFILES += dirent.h dirent.h-t
+
+EXTRA_DIST += dirent.in.h
+
+## end   gnulib module dirent
+
 ## begin gnulib module errno
 
 BUILT_SOURCES += $(ERRNO_H)
diff --git a/gdb/gnulib/import/Makefile.in b/gdb/gnulib/import/Makefile.in
index 16e9b82..bbafbfb 100644
--- a/gdb/gnulib/import/Makefile.in
+++ b/gdb/gnulib/import/Makefile.in
@@ -36,7 +36,7 @@
 # the same distribution terms as the rest of that program.
 #
 # Generated by gnulib-tool.
-# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=import --m4-base=import/m4 --doc-base=doc --tests-base=tests --aux-dir=import/extra --no-conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files fnmatch-gnu frexpl inttypes memmem pathmax strerror strstr unistd update-copyright
+# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=import --m4-base=import/m4 --doc-base=doc --tests-base=tests --aux-dir=import/extra --no-conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files dirent fnmatch-gnu frexpl inttypes memmem pathmax strerror strstr unistd update-copyright
 
 
 
@@ -67,6 +67,7 @@ am__aclocal_m4_deps = $(top_srcdir)/import/m4/00gnulib.m4 \
 	$(top_srcdir)/import/m4/alloca.m4 \
 	$(top_srcdir)/import/m4/codeset.m4 \
 	$(top_srcdir)/import/m4/configmake.m4 \
+	$(top_srcdir)/import/m4/dirent_h.m4 \
 	$(top_srcdir)/import/m4/errno_h.m4 \
 	$(top_srcdir)/import/m4/exponentd.m4 \
 	$(top_srcdir)/import/m4/exponentl.m4 \
@@ -226,6 +227,7 @@ FREXP_LIBM = @FREXP_LIBM@
 GLIBC21 = @GLIBC21@
 GNULIB_ACOSF = @GNULIB_ACOSF@
 GNULIB_ACOSL = @GNULIB_ACOSL@
+GNULIB_ALPHASORT = @GNULIB_ALPHASORT@
 GNULIB_ASINF = @GNULIB_ASINF@
 GNULIB_ASINL = @GNULIB_ASINL@
 GNULIB_ATAN2F = @GNULIB_ATAN2F@
@@ -241,12 +243,14 @@ GNULIB_CEILL = @GNULIB_CEILL@
 GNULIB_CHDIR = @GNULIB_CHDIR@
 GNULIB_CHOWN = @GNULIB_CHOWN@
 GNULIB_CLOSE = @GNULIB_CLOSE@
+GNULIB_CLOSEDIR = @GNULIB_CLOSEDIR@
 GNULIB_COPYSIGN = @GNULIB_COPYSIGN@
 GNULIB_COPYSIGNF = @GNULIB_COPYSIGNF@
 GNULIB_COPYSIGNL = @GNULIB_COPYSIGNL@
 GNULIB_COSF = @GNULIB_COSF@
 GNULIB_COSHF = @GNULIB_COSHF@
 GNULIB_COSL = @GNULIB_COSL@
+GNULIB_DIRFD = @GNULIB_DIRFD@
 GNULIB_DUP = @GNULIB_DUP@
 GNULIB_DUP2 = @GNULIB_DUP2@
 GNULIB_DUP3 = @GNULIB_DUP3@
@@ -266,6 +270,7 @@ GNULIB_FACCESSAT = @GNULIB_FACCESSAT@
 GNULIB_FCHDIR = @GNULIB_FCHDIR@
 GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@
 GNULIB_FDATASYNC = @GNULIB_FDATASYNC@
+GNULIB_FDOPENDIR = @GNULIB_FDOPENDIR@
 GNULIB_FFSL = @GNULIB_FFSL@
 GNULIB_FFSLL = @GNULIB_FFSLL@
 GNULIB_FLOOR = @GNULIB_FLOOR@
@@ -356,6 +361,7 @@ GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
 GNULIB_MODF = @GNULIB_MODF@
 GNULIB_MODFF = @GNULIB_MODFF@
 GNULIB_MODFL = @GNULIB_MODFL@
+GNULIB_OPENDIR = @GNULIB_OPENDIR@
 GNULIB_PIPE = @GNULIB_PIPE@
 GNULIB_PIPE2 = @GNULIB_PIPE2@
 GNULIB_POWF = @GNULIB_POWF@
@@ -363,11 +369,13 @@ GNULIB_PREAD = @GNULIB_PREAD@
 GNULIB_PWRITE = @GNULIB_PWRITE@
 GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
 GNULIB_READ = @GNULIB_READ@
+GNULIB_READDIR = @GNULIB_READDIR@
 GNULIB_READLINK = @GNULIB_READLINK@
 GNULIB_READLINKAT = @GNULIB_READLINKAT@
 GNULIB_REMAINDER = @GNULIB_REMAINDER@
 GNULIB_REMAINDERF = @GNULIB_REMAINDERF@
 GNULIB_REMAINDERL = @GNULIB_REMAINDERL@
+GNULIB_REWINDDIR = @GNULIB_REWINDDIR@
 GNULIB_RINT = @GNULIB_RINT@
 GNULIB_RINTF = @GNULIB_RINTF@
 GNULIB_RINTL = @GNULIB_RINTL@
@@ -375,6 +383,7 @@ GNULIB_RMDIR = @GNULIB_RMDIR@
 GNULIB_ROUND = @GNULIB_ROUND@
 GNULIB_ROUNDF = @GNULIB_ROUNDF@
 GNULIB_ROUNDL = @GNULIB_ROUNDL@
+GNULIB_SCANDIR = @GNULIB_SCANDIR@
 GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@
 GNULIB_SIGNBIT = @GNULIB_SIGNBIT@
 GNULIB_SINF = @GNULIB_SINF@
@@ -455,6 +464,7 @@ GNULIB_WRITE = @GNULIB_WRITE@
 GREP = @GREP@
 HAVE_ACOSF = @HAVE_ACOSF@
 HAVE_ACOSL = @HAVE_ACOSL@
+HAVE_ALPHASORT = @HAVE_ALPHASORT@
 HAVE_ASINF = @HAVE_ASINF@
 HAVE_ASINL = @HAVE_ASINL@
 HAVE_ATAN2F = @HAVE_ATAN2F@
@@ -465,6 +475,7 @@ HAVE_CBRT = @HAVE_CBRT@
 HAVE_CBRTF = @HAVE_CBRTF@
 HAVE_CBRTL = @HAVE_CBRTL@
 HAVE_CHOWN = @HAVE_CHOWN@
+HAVE_CLOSEDIR = @HAVE_CLOSEDIR@
 HAVE_COPYSIGN = @HAVE_COPYSIGN@
 HAVE_COPYSIGNL = @HAVE_COPYSIGNL@
 HAVE_COSF = @HAVE_COSF@
@@ -479,6 +490,7 @@ HAVE_DECL_CEILF = @HAVE_DECL_CEILF@
 HAVE_DECL_CEILL = @HAVE_DECL_CEILL@
 HAVE_DECL_COPYSIGNF = @HAVE_DECL_COPYSIGNF@
 HAVE_DECL_COSL = @HAVE_DECL_COSL@
+HAVE_DECL_DIRFD = @HAVE_DECL_DIRFD@
 HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
 HAVE_DECL_EXP2 = @HAVE_DECL_EXP2@
 HAVE_DECL_EXP2F = @HAVE_DECL_EXP2F@
@@ -487,6 +499,7 @@ HAVE_DECL_EXPL = @HAVE_DECL_EXPL@
 HAVE_DECL_EXPM1L = @HAVE_DECL_EXPM1L@
 HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@
 HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@
+HAVE_DECL_FDOPENDIR = @HAVE_DECL_FDOPENDIR@
 HAVE_DECL_FLOORF = @HAVE_DECL_FLOORF@
 HAVE_DECL_FLOORL = @HAVE_DECL_FLOORL@
 HAVE_DECL_FREXPL = @HAVE_DECL_FREXPL@
@@ -529,6 +542,7 @@ HAVE_DECL_TRUNCL = @HAVE_DECL_TRUNCL@
 HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@
 HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@
 HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@
+HAVE_DIRENT_H = @HAVE_DIRENT_H@
 HAVE_DUP2 = @HAVE_DUP2@
 HAVE_DUP3 = @HAVE_DUP3@
 HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
@@ -542,6 +556,7 @@ HAVE_FACCESSAT = @HAVE_FACCESSAT@
 HAVE_FCHDIR = @HAVE_FCHDIR@
 HAVE_FCHOWNAT = @HAVE_FCHOWNAT@
 HAVE_FDATASYNC = @HAVE_FDATASYNC@
+HAVE_FDOPENDIR = @HAVE_FDOPENDIR@
 HAVE_FEATURES_H = @HAVE_FEATURES_H@
 HAVE_FFSL = @HAVE_FFSL@
 HAVE_FFSLL = @HAVE_FFSLL@
@@ -594,6 +609,7 @@ HAVE_MEMCHR = @HAVE_MEMCHR@
 HAVE_MEMPCPY = @HAVE_MEMPCPY@
 HAVE_MODFF = @HAVE_MODFF@
 HAVE_MODFL = @HAVE_MODFL@
+HAVE_OPENDIR = @HAVE_OPENDIR@
 HAVE_OS_H = @HAVE_OS_H@
 HAVE_PIPE = @HAVE_PIPE@
 HAVE_PIPE2 = @HAVE_PIPE2@
@@ -601,13 +617,16 @@ HAVE_POWF = @HAVE_POWF@
 HAVE_PREAD = @HAVE_PREAD@
 HAVE_PWRITE = @HAVE_PWRITE@
 HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@
+HAVE_READDIR = @HAVE_READDIR@
 HAVE_READLINK = @HAVE_READLINK@
 HAVE_READLINKAT = @HAVE_READLINKAT@
 HAVE_REMAINDER = @HAVE_REMAINDER@
 HAVE_REMAINDERF = @HAVE_REMAINDERF@
+HAVE_REWINDDIR = @HAVE_REWINDDIR@
 HAVE_RINT = @HAVE_RINT@
 HAVE_RINTL = @HAVE_RINTL@
 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = @HAVE_SAME_LONG_DOUBLE_AS_DOUBLE@
+HAVE_SCANDIR = @HAVE_SCANDIR@
 HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@
 HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
 HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@
@@ -702,6 +721,7 @@ LTLIBOBJS = @LTLIBOBJS@
 MAINT = @MAINT@
 MAKEINFO = @MAKEINFO@
 MKDIR_P = @MKDIR_P@
+NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@
 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@
 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@
 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@
@@ -713,6 +733,7 @@ NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H@
 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@
 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@
 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@
+NEXT_DIRENT_H = @NEXT_DIRENT_H@
 NEXT_ERRNO_H = @NEXT_ERRNO_H@
 NEXT_FLOAT_H = @NEXT_FLOAT_H@
 NEXT_INTTYPES_H = @NEXT_INTTYPES_H@
@@ -747,6 +768,8 @@ REPLACE_CEILF = @REPLACE_CEILF@
 REPLACE_CEILL = @REPLACE_CEILL@
 REPLACE_CHOWN = @REPLACE_CHOWN@
 REPLACE_CLOSE = @REPLACE_CLOSE@
+REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@
+REPLACE_DIRFD = @REPLACE_DIRFD@
 REPLACE_DUP = @REPLACE_DUP@
 REPLACE_DUP2 = @REPLACE_DUP2@
 REPLACE_EXP2 = @REPLACE_EXP2@
@@ -755,6 +778,7 @@ REPLACE_EXPM1 = @REPLACE_EXPM1@
 REPLACE_EXPM1F = @REPLACE_EXPM1F@
 REPLACE_FABSL = @REPLACE_FABSL@
 REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@
+REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@
 REPLACE_FLOOR = @REPLACE_FLOOR@
 REPLACE_FLOORF = @REPLACE_FLOORF@
 REPLACE_FLOORL = @REPLACE_FLOORL@
@@ -819,6 +843,7 @@ REPLACE_MODFF = @REPLACE_MODFF@
 REPLACE_MODFL = @REPLACE_MODFL@
 REPLACE_NAN = @REPLACE_NAN@
 REPLACE_NULL = @REPLACE_NULL@
+REPLACE_OPENDIR = @REPLACE_OPENDIR@
 REPLACE_PREAD = @REPLACE_PREAD@
 REPLACE_PWRITE = @REPLACE_PWRITE@
 REPLACE_READ = @REPLACE_READ@
@@ -945,8 +970,8 @@ SUBDIRS =
 noinst_HEADERS = 
 noinst_LIBRARIES = libgnu.a
 noinst_LTLIBRARIES = 
-EXTRA_DIST = m4/gnulib-cache.m4 alloca.c alloca.in.h errno.in.h \
-	float.c float.in.h itold.c fnmatch.c fnmatch.in.h \
+EXTRA_DIST = m4/gnulib-cache.m4 alloca.c alloca.in.h dirent.in.h \
+	errno.in.h float.c float.in.h itold.c fnmatch.c fnmatch.in.h \
 	fnmatch_loop.c fpucw.h frexp.c frexp.c frexpl.c intprops.h \
 	inttypes.in.h float+.h isnan.c isnand-nolibm.h isnand.c \
 	float+.h isnan.c isnanl-nolibm.h isnanl.c config.charset \
@@ -971,18 +996,19 @@ EXTRA_DIST = m4/gnulib-cache.m4 alloca.c alloca.in.h errno.in.h \
 # statements but through direct file reference. Therefore this snippet must be
 # present in all Makefile.am that need it. This is ensured by the applicability
 # 'all' defined above.
-BUILT_SOURCES = $(ALLOCA_H) configmake.h $(ERRNO_H) $(FLOAT_H) \
-	$(FNMATCH_H) inttypes.h math.h arg-nonnull.h c++defs.h \
-	warn-on-use.h $(STDBOOL_H) $(STDDEF_H) $(STDINT_H) string.h \
-	sys/types.h unistd.h wchar.h wctype.h
+BUILT_SOURCES = $(ALLOCA_H) configmake.h dirent.h $(ERRNO_H) \
+	$(FLOAT_H) $(FNMATCH_H) inttypes.h math.h arg-nonnull.h \
+	c++defs.h warn-on-use.h $(STDBOOL_H) $(STDDEF_H) $(STDINT_H) \
+	string.h sys/types.h unistd.h wchar.h wctype.h
 SUFFIXES = .sed .sin
-MOSTLYCLEANFILES = core *.stackdump alloca.h alloca.h-t errno.h \
-	errno.h-t float.h float.h-t fnmatch.h fnmatch.h-t inttypes.h \
-	inttypes.h-t math.h math.h-t arg-nonnull.h arg-nonnull.h-t \
-	c++defs.h c++defs.h-t warn-on-use.h warn-on-use.h-t stdbool.h \
-	stdbool.h-t stddef.h stddef.h-t stdint.h stdint.h-t string.h \
-	string.h-t sys/types.h sys/types.h-t unistd.h unistd.h-t \
-	wchar.h wchar.h-t wctype.h wctype.h-t
+MOSTLYCLEANFILES = core *.stackdump alloca.h alloca.h-t dirent.h \
+	dirent.h-t errno.h errno.h-t float.h float.h-t fnmatch.h \
+	fnmatch.h-t inttypes.h inttypes.h-t math.h math.h-t \
+	arg-nonnull.h arg-nonnull.h-t c++defs.h c++defs.h-t \
+	warn-on-use.h warn-on-use.h-t stdbool.h stdbool.h-t stddef.h \
+	stddef.h-t stdint.h stdint.h-t string.h string.h-t sys/types.h \
+	sys/types.h-t unistd.h unistd.h-t wchar.h wchar.h-t wctype.h \
+	wctype.h-t
 MOSTLYCLEANDIRS = 
 CLEANFILES = configmake.h configmake.h-t charset.alias ref-add.sed \
 	ref-del.sed
@@ -1471,6 +1497,45 @@ configmake.h: Makefile
 	} | sed '/""/d' > $@-t && \
 	mv -f $@-t $@
 
+# We need the following in order to create <dirent.h> when the system
+# doesn't have one that works with the given compiler.
+dirent.h: dirent.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+	$(AM_V_GEN)rm -f $@-t $@ && \
+	{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+	  sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+	      -e 's|@''HAVE_DIRENT_H''@|$(HAVE_DIRENT_H)|g' \
+	      -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+	      -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+	      -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+	      -e 's|@''NEXT_DIRENT_H''@|$(NEXT_DIRENT_H)|g' \
+	      -e 's/@''GNULIB_OPENDIR''@/$(GNULIB_OPENDIR)/g' \
+	      -e 's/@''GNULIB_READDIR''@/$(GNULIB_READDIR)/g' \
+	      -e 's/@''GNULIB_REWINDDIR''@/$(GNULIB_REWINDDIR)/g' \
+	      -e 's/@''GNULIB_CLOSEDIR''@/$(GNULIB_CLOSEDIR)/g' \
+	      -e 's/@''GNULIB_DIRFD''@/$(GNULIB_DIRFD)/g' \
+	      -e 's/@''GNULIB_FDOPENDIR''@/$(GNULIB_FDOPENDIR)/g' \
+	      -e 's/@''GNULIB_SCANDIR''@/$(GNULIB_SCANDIR)/g' \
+	      -e 's/@''GNULIB_ALPHASORT''@/$(GNULIB_ALPHASORT)/g' \
+	      -e 's/@''HAVE_OPENDIR''@/$(HAVE_OPENDIR)/g' \
+	      -e 's/@''HAVE_READDIR''@/$(HAVE_READDIR)/g' \
+	      -e 's/@''HAVE_REWINDDIR''@/$(HAVE_REWINDDIR)/g' \
+	      -e 's/@''HAVE_CLOSEDIR''@/$(HAVE_CLOSEDIR)/g' \
+	      -e 's|@''HAVE_DECL_DIRFD''@|$(HAVE_DECL_DIRFD)|g' \
+	      -e 's|@''HAVE_DECL_FDOPENDIR''@|$(HAVE_DECL_FDOPENDIR)|g' \
+	      -e 's|@''HAVE_FDOPENDIR''@|$(HAVE_FDOPENDIR)|g' \
+	      -e 's|@''HAVE_SCANDIR''@|$(HAVE_SCANDIR)|g' \
+	      -e 's|@''HAVE_ALPHASORT''@|$(HAVE_ALPHASORT)|g' \
+	      -e 's|@''REPLACE_OPENDIR''@|$(REPLACE_OPENDIR)|g' \
+	      -e 's|@''REPLACE_CLOSEDIR''@|$(REPLACE_CLOSEDIR)|g' \
+	      -e 's|@''REPLACE_DIRFD''@|$(REPLACE_DIRFD)|g' \
+	      -e 's|@''REPLACE_FDOPENDIR''@|$(REPLACE_FDOPENDIR)|g' \
+	      -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+	      -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+	      -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+	      < $(srcdir)/dirent.in.h; \
+	} > $@-t && \
+	mv $@-t $@
+
 # We need the following in order to create <errno.h> when the system
 # doesn't have one that is POSIX compliant.
 @GL_GENERATE_ERRNO_H_TRUE@errno.h: errno.in.h $(top_builddir)/config.status
diff --git a/gdb/gnulib/import/dirent.in.h b/gdb/gnulib/import/dirent.in.h
new file mode 100644
index 0000000..cdbc5fd
--- /dev/null
+++ b/gdb/gnulib/import/dirent.in.h
@@ -0,0 +1,258 @@
+/* A GNU-like <dirent.h>.
+   Copyright (C) 2006-2012 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#ifndef _@GUARD_PREFIX@_DIRENT_H
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+@PRAGMA_COLUMNS@
+
+/* The include_next requires a split double-inclusion guard.  */
+#if @HAVE_DIRENT_H@
+# @INCLUDE_NEXT@ @NEXT_DIRENT_H@
+#endif
+
+#ifndef _@GUARD_PREFIX@_DIRENT_H
+#define _@GUARD_PREFIX@_DIRENT_H
+
+/* Get ino_t.  Needed on some systems, including glibc 2.8.  */
+#include <sys/types.h>
+
+#if !@HAVE_DIRENT_H@
+/* Define types DIR and 'struct dirent'.  */
+# if !GNULIB_defined_struct_dirent
+struct dirent
+{
+  char d_type;
+  char d_name[1];
+};
+/* Possible values for 'd_type'.  */
+#  define DT_UNKNOWN 0
+#  define DT_FIFO    1          /* FIFO */
+#  define DT_CHR     2          /* character device */
+#  define DT_DIR     4          /* directory */
+#  define DT_BLK     6          /* block device */
+#  define DT_REG     8          /* regular file */
+#  define DT_LNK    10          /* symbolic link */
+#  define DT_SOCK   12          /* socket */
+#  define DT_WHT    14          /* whiteout */
+typedef struct gl_directory DIR;
+#  define GNULIB_defined_struct_dirent 1
+# endif
+#endif
+
+/* The __attribute__ feature is available in gcc versions 2.5 and later.
+   The attribute __pure__ was added in gcc 2.96.  */
+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
+# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
+#else
+# define _GL_ATTRIBUTE_PURE /* empty */
+#endif
+
+/* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
+
+/* The definition of _GL_ARG_NONNULL is copied here.  */
+
+/* The definition of _GL_WARN_ON_USE is copied here.  */
+
+
+/* Declare overridden functions.  */
+
+#if @GNULIB_OPENDIR@
+# if @REPLACE_OPENDIR@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef opendir
+#   define opendir rpl_opendir
+#  endif
+_GL_FUNCDECL_RPL (opendir, DIR *, (const char *dir_name) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (opendir, DIR *, (const char *dir_name));
+# else
+#  if !@HAVE_OPENDIR@
+_GL_FUNCDECL_SYS (opendir, DIR *, (const char *dir_name) _GL_ARG_NONNULL ((1)));
+#  endif
+_GL_CXXALIAS_SYS (opendir, DIR *, (const char *dir_name));
+# endif
+_GL_CXXALIASWARN (opendir);
+#elif defined GNULIB_POSIXCHECK
+# undef opendir
+# if HAVE_RAW_DECL_OPENDIR
+_GL_WARN_ON_USE (opendir, "opendir is not portable - "
+                 "use gnulib module opendir for portability");
+# endif
+#endif
+
+#if @GNULIB_READDIR@
+# if !@HAVE_READDIR@
+_GL_FUNCDECL_SYS (readdir, struct dirent *, (DIR *dirp) _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (readdir, struct dirent *, (DIR *dirp));
+_GL_CXXALIASWARN (readdir);
+#elif defined GNULIB_POSIXCHECK
+# undef readdir
+# if HAVE_RAW_DECL_READDIR
+_GL_WARN_ON_USE (readdir, "readdir is not portable - "
+                 "use gnulib module readdir for portability");
+# endif
+#endif
+
+#if @GNULIB_REWINDDIR@
+# if !@HAVE_REWINDDIR@
+_GL_FUNCDECL_SYS (rewinddir, void, (DIR *dirp) _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (rewinddir, void, (DIR *dirp));
+_GL_CXXALIASWARN (rewinddir);
+#elif defined GNULIB_POSIXCHECK
+# undef rewinddir
+# if HAVE_RAW_DECL_REWINDDIR
+_GL_WARN_ON_USE (rewinddir, "rewinddir is not portable - "
+                 "use gnulib module rewinddir for portability");
+# endif
+#endif
+
+#if @GNULIB_CLOSEDIR@
+# if @REPLACE_CLOSEDIR@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef closedir
+#   define closedir rpl_closedir
+#  endif
+_GL_FUNCDECL_RPL (closedir, int, (DIR *dirp) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (closedir, int, (DIR *dirp));
+# else
+#  if !@HAVE_CLOSEDIR@
+_GL_FUNCDECL_SYS (closedir, int, (DIR *dirp) _GL_ARG_NONNULL ((1)));
+#  endif
+_GL_CXXALIAS_SYS (closedir, int, (DIR *dirp));
+# endif
+_GL_CXXALIASWARN (closedir);
+#elif defined GNULIB_POSIXCHECK
+# undef closedir
+# if HAVE_RAW_DECL_CLOSEDIR
+_GL_WARN_ON_USE (closedir, "closedir is not portable - "
+                 "use gnulib module closedir for portability");
+# endif
+#endif
+
+#if @GNULIB_DIRFD@
+/* Return the file descriptor associated with the given directory stream,
+   or -1 if none exists.  */
+# if @REPLACE_DIRFD@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef dirfd
+#   define dirfd rpl_dirfd
+#  endif
+_GL_FUNCDECL_RPL (dirfd, int, (DIR *) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (dirfd, int, (DIR *));
+# else
+#  if defined __cplusplus && defined GNULIB_NAMESPACE && defined dirfd
+    /* dirfd is defined as a macro and not as a function.
+       Turn it into a function and get rid of the macro.  */
+static inline int (dirfd) (DIR *dp) { return dirfd (dp); }
+#   undef dirfd
+#  endif
+#  if !(@HAVE_DECL_DIRFD@ || defined dirfd)
+_GL_FUNCDECL_SYS (dirfd, int, (DIR *) _GL_ARG_NONNULL ((1)));
+#  endif
+_GL_CXXALIAS_SYS (dirfd, int, (DIR *));
+# endif
+_GL_CXXALIASWARN (dirfd);
+#elif defined GNULIB_POSIXCHECK
+# undef dirfd
+# if HAVE_RAW_DECL_DIRFD
+_GL_WARN_ON_USE (dirfd, "dirfd is unportable - "
+                 "use gnulib module dirfd for portability");
+# endif
+#endif
+
+#if @GNULIB_FDOPENDIR@
+/* Open a directory stream visiting the given directory file
+   descriptor.  Return NULL and set errno if fd is not visiting a
+   directory.  On success, this function consumes fd (it will be
+   implicitly closed either by this function or by a subsequent
+   closedir).  */
+# if @REPLACE_FDOPENDIR@
+#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+#   undef fdopendir
+#   define fdopendir rpl_fdopendir
+#  endif
+_GL_FUNCDECL_RPL (fdopendir, DIR *, (int fd));
+_GL_CXXALIAS_RPL (fdopendir, DIR *, (int fd));
+# else
+#  if !@HAVE_FDOPENDIR@ || !@HAVE_DECL_FDOPENDIR@
+_GL_FUNCDECL_SYS (fdopendir, DIR *, (int fd));
+#  endif
+_GL_CXXALIAS_SYS (fdopendir, DIR *, (int fd));
+# endif
+_GL_CXXALIASWARN (fdopendir);
+#elif defined GNULIB_POSIXCHECK
+# undef fdopendir
+# if HAVE_RAW_DECL_FDOPENDIR
+_GL_WARN_ON_USE (fdopendir, "fdopendir is unportable - "
+                 "use gnulib module fdopendir for portability");
+# endif
+#endif
+
+#if @GNULIB_SCANDIR@
+/* Scan the directory DIR, calling FILTER on each directory entry.
+   Entries for which FILTER returns nonzero are individually malloc'd,
+   sorted using qsort with CMP, and collected in a malloc'd array in
+   *NAMELIST.  Returns the number of entries selected, or -1 on error.  */
+# if !@HAVE_SCANDIR@
+_GL_FUNCDECL_SYS (scandir, int,
+                  (const char *dir, struct dirent ***namelist,
+                   int (*filter) (const struct dirent *),
+                   int (*cmp) (const struct dirent **, const struct dirent **))
+                  _GL_ARG_NONNULL ((1, 2, 4)));
+# endif
+/* Need to cast, because on glibc systems, the fourth parameter is
+                        int (*cmp) (const void *, const void *).  */
+_GL_CXXALIAS_SYS_CAST (scandir, int,
+                       (const char *dir, struct dirent ***namelist,
+                        int (*filter) (const struct dirent *),
+                        int (*cmp) (const struct dirent **, const struct dirent **)));
+_GL_CXXALIASWARN (scandir);
+#elif defined GNULIB_POSIXCHECK
+# undef scandir
+# if HAVE_RAW_DECL_SCANDIR
+_GL_WARN_ON_USE (scandir, "scandir is unportable - "
+                 "use gnulib module scandir for portability");
+# endif
+#endif
+
+#if @GNULIB_ALPHASORT@
+/* Compare two 'struct dirent' entries alphabetically.  */
+# if !@HAVE_ALPHASORT@
+_GL_FUNCDECL_SYS (alphasort, int,
+                  (const struct dirent **, const struct dirent **)
+                  _GL_ATTRIBUTE_PURE
+                  _GL_ARG_NONNULL ((1, 2)));
+# endif
+/* Need to cast, because on glibc systems, the parameters are
+                       (const void *, const void *).  */
+_GL_CXXALIAS_SYS_CAST (alphasort, int,
+                       (const struct dirent **, const struct dirent **));
+_GL_CXXALIASWARN (alphasort);
+#elif defined GNULIB_POSIXCHECK
+# undef alphasort
+# if HAVE_RAW_DECL_ALPHASORT
+_GL_WARN_ON_USE (alphasort, "alphasort is unportable - "
+                 "use gnulib module alphasort for portability");
+# endif
+#endif
+
+
+#endif /* _@GUARD_PREFIX@_DIRENT_H */
+#endif /* _@GUARD_PREFIX@_DIRENT_H */
diff --git a/gdb/gnulib/import/m4/dirent_h.m4 b/gdb/gnulib/import/m4/dirent_h.m4
new file mode 100644
index 0000000..f6c0fa7
--- /dev/null
+++ b/gdb/gnulib/import/m4/dirent_h.m4
@@ -0,0 +1,64 @@
+# dirent_h.m4 serial 16
+dnl Copyright (C) 2008-2012 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Written by Bruno Haible.
+
+AC_DEFUN([gl_DIRENT_H],
+[
+  dnl Use AC_REQUIRE here, so that the default behavior below is expanded
+  dnl once only, before all statements that occur in other macros.
+  AC_REQUIRE([gl_DIRENT_H_DEFAULTS])
+
+  dnl <dirent.h> is always overridden, because of GNULIB_POSIXCHECK.
+  gl_CHECK_NEXT_HEADERS([dirent.h])
+  if test $ac_cv_header_dirent_h = yes; then
+    HAVE_DIRENT_H=1
+  else
+    HAVE_DIRENT_H=0
+  fi
+  AC_SUBST([HAVE_DIRENT_H])
+
+  dnl Check for declarations of anything we want to poison if the
+  dnl corresponding gnulib module is not in use.
+  gl_WARN_ON_USE_PREPARE([[#include <dirent.h>
+    ]], [alphasort closedir dirfd fdopendir opendir readdir rewinddir scandir])
+])
+
+AC_DEFUN([gl_DIRENT_MODULE_INDICATOR],
+[
+  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+  AC_REQUIRE([gl_DIRENT_H_DEFAULTS])
+  gl_MODULE_INDICATOR_SET_VARIABLE([$1])
+  dnl Define it also as a C macro, for the benefit of the unit tests.
+  gl_MODULE_INDICATOR_FOR_TESTS([$1])
+])
+
+AC_DEFUN([gl_DIRENT_H_DEFAULTS],
+[
+  AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) dnl for REPLACE_FCHDIR
+  GNULIB_OPENDIR=0;     AC_SUBST([GNULIB_OPENDIR])
+  GNULIB_READDIR=0;     AC_SUBST([GNULIB_READDIR])
+  GNULIB_REWINDDIR=0;   AC_SUBST([GNULIB_REWINDDIR])
+  GNULIB_CLOSEDIR=0;    AC_SUBST([GNULIB_CLOSEDIR])
+  GNULIB_DIRFD=0;       AC_SUBST([GNULIB_DIRFD])
+  GNULIB_FDOPENDIR=0;   AC_SUBST([GNULIB_FDOPENDIR])
+  GNULIB_SCANDIR=0;     AC_SUBST([GNULIB_SCANDIR])
+  GNULIB_ALPHASORT=0;   AC_SUBST([GNULIB_ALPHASORT])
+  dnl Assume proper GNU behavior unless another module says otherwise.
+  HAVE_OPENDIR=1;       AC_SUBST([HAVE_OPENDIR])
+  HAVE_READDIR=1;       AC_SUBST([HAVE_READDIR])
+  HAVE_REWINDDIR=1;     AC_SUBST([HAVE_REWINDDIR])
+  HAVE_CLOSEDIR=1;      AC_SUBST([HAVE_CLOSEDIR])
+  HAVE_DECL_DIRFD=1;    AC_SUBST([HAVE_DECL_DIRFD])
+  HAVE_DECL_FDOPENDIR=1;AC_SUBST([HAVE_DECL_FDOPENDIR])
+  HAVE_FDOPENDIR=1;     AC_SUBST([HAVE_FDOPENDIR])
+  HAVE_SCANDIR=1;       AC_SUBST([HAVE_SCANDIR])
+  HAVE_ALPHASORT=1;     AC_SUBST([HAVE_ALPHASORT])
+  REPLACE_OPENDIR=0;    AC_SUBST([REPLACE_OPENDIR])
+  REPLACE_CLOSEDIR=0;   AC_SUBST([REPLACE_CLOSEDIR])
+  REPLACE_DIRFD=0;      AC_SUBST([REPLACE_DIRFD])
+  REPLACE_FDOPENDIR=0;  AC_SUBST([REPLACE_FDOPENDIR])
+])
diff --git a/gdb/gnulib/import/m4/gnulib-cache.m4 b/gdb/gnulib/import/m4/gnulib-cache.m4
index d1be377..76f3d3c 100644
--- a/gdb/gnulib/import/m4/gnulib-cache.m4
+++ b/gdb/gnulib/import/m4/gnulib-cache.m4
@@ -27,11 +27,12 @@
 
 
 # Specification in the form of a command-line invocation:
-#   gnulib-tool --import --dir=. --lib=libgnu --source-base=import --m4-base=import/m4 --doc-base=doc --tests-base=tests --aux-dir=import/extra --no-conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files fnmatch-gnu frexpl inttypes memmem pathmax strerror strstr unistd update-copyright
+#   gnulib-tool --import --dir=. --lib=libgnu --source-base=import --m4-base=import/m4 --doc-base=doc --tests-base=tests --aux-dir=import/extra --no-conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files dirent fnmatch-gnu frexpl inttypes memmem pathmax strerror strstr unistd update-copyright
 
 # Specification in the form of a few gnulib-tool.m4 macro invocations:
 gl_LOCAL_DIR([])
 gl_MODULES([
+  dirent
   fnmatch-gnu
   frexpl
   inttypes
diff --git a/gdb/gnulib/import/m4/gnulib-comp.m4 b/gdb/gnulib/import/m4/gnulib-comp.m4
index 40ea88f..31199c7 100644
--- a/gdb/gnulib/import/m4/gnulib-comp.m4
+++ b/gdb/gnulib/import/m4/gnulib-comp.m4
@@ -41,6 +41,7 @@ AC_DEFUN([gl_EARLY],
   # Code from module alloca:
   # Code from module alloca-opt:
   # Code from module configmake:
+  # Code from module dirent:
   # Code from module errno:
   # Code from module extensions:
   AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
@@ -109,6 +110,7 @@ AC_DEFUN([gl_INIT],
   gl_source_base='import'
   gl_FUNC_ALLOCA
   gl_CONFIGMAKE_PREP
+  gl_DIRENT_H
   gl_HEADER_ERRNO_H
   AC_REQUIRE([gl_EXTERN_INLINE])
   gl_FLOAT_H
@@ -368,6 +370,7 @@ AC_DEFUN([gl_FILE_LIST], [
   lib/alloca.c
   lib/alloca.in.h
   lib/config.charset
+  lib/dirent.in.h
   lib/errno.in.h
   lib/float+.h
   lib/float.c
@@ -424,6 +427,7 @@ AC_DEFUN([gl_FILE_LIST], [
   m4/alloca.m4
   m4/codeset.m4
   m4/configmake.m4
+  m4/dirent_h.m4
   m4/errno_h.m4
   m4/exponentd.m4
   m4/exponentl.m4
diff --git a/gdb/gnulib/update-gnulib.sh b/gdb/gnulib/update-gnulib.sh
index dc5015f..cb2affc 100644
--- a/gdb/gnulib/update-gnulib.sh
+++ b/gdb/gnulib/update-gnulib.sh
@@ -39,6 +39,7 @@ IMPORTED_GNULIB_MODULES="\
     pathmax \
     strerror \
     strstr \
+    dirent \
 "
 
 # The gnulib commit ID to use for the update.
-- 
1.8.1.4

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH v3 05/13] don't check for string.h or strings.h
  2013-11-18 20:27 [PATCH v3 00/13] use gnulib more heavily Tom Tromey
                   ` (10 preceding siblings ...)
  2013-11-18 21:12 ` [PATCH v3 06/13] import gnulib dirent module Tom Tromey
@ 2013-11-18 21:28 ` Tom Tromey
  2013-11-18 23:03 ` [PATCH v3 13/13] remove gdb_stat.h Tom Tromey
  12 siblings, 0 replies; 24+ messages in thread
From: Tom Tromey @ 2013-11-18 21:28 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

Now that we are using the gnulib string.h module, we don't need to
check for string.h or strings.h.  This removes the last few checks
from the source and from the configure scripts.

2013-11-18  Tom Tromey  <tromey@redhat.com>

	* configure: Rebuild.
	* common/common.m4 (GDB_AC_COMMON): Don't check for string.h or
	strings.h.

2013-11-18  Tom Tromey  <tromey@redhat.com>

	* server.h: Don't check HAVE_STRING_H.
	* gdbreplay.c: Don't check HAVE_STRING_H.
	* configure: Rebuild.
---
 gdb/ChangeLog             | 6 ++++++
 gdb/common/common.m4      | 1 -
 gdb/configure             | 2 +-
 gdb/gdbserver/ChangeLog   | 6 ++++++
 gdb/gdbserver/configure   | 2 +-
 gdb/gdbserver/gdbreplay.c | 2 --
 gdb/gdbserver/server.h    | 2 --
 7 files changed, 14 insertions(+), 7 deletions(-)

diff --git a/gdb/common/common.m4 b/gdb/common/common.m4
index 20fbb44..b1abc4d 100644
--- a/gdb/common/common.m4
+++ b/gdb/common/common.m4
@@ -27,7 +27,6 @@ AC_DEFUN([GDB_AC_COMMON], [
   AM_LANGINFO_CODESET
 
   AC_CHECK_HEADERS(linux/perf_event.h locale.h memory.h signal.h dnl
-                   string.h strings.h dnl
 		   sys/resource.h sys/socket.h sys/syscall.h dnl
 		   sys/un.h sys/wait.h dnl
 		   thread_db.h wait.h)
diff --git a/gdb/configure b/gdb/configure
index 8b20a13..ae24ca5 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -10667,7 +10667,7 @@ $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
   fi
 
 
-  for ac_header in linux/perf_event.h locale.h memory.h signal.h                    string.h strings.h 		   sys/resource.h sys/socket.h sys/syscall.h 		   sys/un.h sys/wait.h 		   thread_db.h wait.h
+  for ac_header in linux/perf_event.h locale.h memory.h signal.h 		   sys/resource.h sys/socket.h sys/syscall.h 		   sys/un.h sys/wait.h 		   thread_db.h wait.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
diff --git a/gdb/gdbserver/configure b/gdb/gdbserver/configure
index 6bef97c..096c7b3 100755
--- a/gdb/gdbserver/configure
+++ b/gdb/gdbserver/configure
@@ -5420,7 +5420,7 @@ $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
   fi
 
 
-  for ac_header in linux/perf_event.h locale.h memory.h signal.h                    string.h strings.h 		   sys/resource.h sys/socket.h sys/syscall.h 		   sys/un.h sys/wait.h 		   thread_db.h wait.h
+  for ac_header in linux/perf_event.h locale.h memory.h signal.h 		   sys/resource.h sys/socket.h sys/syscall.h 		   sys/un.h sys/wait.h 		   thread_db.h wait.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
diff --git a/gdb/gdbserver/gdbreplay.c b/gdb/gdbserver/gdbreplay.c
index 5e64f6d..1f823e0 100644
--- a/gdb/gdbserver/gdbreplay.c
+++ b/gdb/gdbserver/gdbreplay.c
@@ -38,9 +38,7 @@
 #ifdef HAVE_STDLIB_H
 #include <stdlib.h>
 #endif
-#ifdef HAVE_STRING_H
 #include <string.h>
-#endif
 #include <unistd.h>
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
diff --git a/gdb/gdbserver/server.h b/gdb/gdbserver/server.h
index 05724e0..32cf416 100644
--- a/gdb/gdbserver/server.h
+++ b/gdb/gdbserver/server.h
@@ -41,9 +41,7 @@
 /* For gnulib's PATH_MAX.  */
 #include "pathmax.h"
 
-#ifdef HAVE_STRING_H
 #include <string.h>
-#endif
 
 #ifdef HAVE_ALLOCA_H
 #include <alloca.h>
-- 
1.8.1.4

^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH v3 13/13] remove gdb_stat.h
  2013-11-18 20:27 [PATCH v3 00/13] use gnulib more heavily Tom Tromey
                   ` (11 preceding siblings ...)
  2013-11-18 21:28 ` [PATCH v3 05/13] don't check for string.h or strings.h Tom Tromey
@ 2013-11-18 23:03 ` Tom Tromey
  12 siblings, 0 replies; 24+ messages in thread
From: Tom Tromey @ 2013-11-18 23:03 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This patch is purely mechanical.  It removes gdb_stat.h and changes
the code to use sys/stat.h.

2013-11-18  Tom Tromey  <tromey@redhat.com>

	* common/gdb_stat.h: Remove.
	* ada-lang.c: Use sys/stat.h, not gdb_stat.h.
	* common/filestuff.c: Use sys/stat.h, not gdb_stat.h.
	* common/linux-osdata.c: Use sys/stat.h, not gdb_stat.h.
	* corefile.c: Use sys/stat.h, not gdb_stat.h.
	* ctf.c: Use sys/stat.h, not gdb_stat.h.
	* darwin-nat.c: Use sys/stat.h, not gdb_stat.h.
	* dbxread.c: Use sys/stat.h, not gdb_stat.h.
	* dwarf2read.c: Use sys/stat.h, not gdb_stat.h.
	* exec.c: Use sys/stat.h, not gdb_stat.h.
	* gdbserver/linux-low.c: Use sys/stat.h, not gdb_stat.h.
	* gdbserver/remote-utils.c: Use sys/stat.h, not gdb_stat.h.
	* inf-child.c: Use sys/stat.h, not gdb_stat.h.
	* jit.c: Use sys/stat.h, not gdb_stat.h.
	* linux-nat.c: Use sys/stat.h, not gdb_stat.h.
	* m68klinux-nat.c: Use sys/stat.h, not gdb_stat.h.
	* main.c: Use sys/stat.h, not gdb_stat.h.
	* mdebugread.c: Use sys/stat.h, not gdb_stat.h.
	* mi/mi-cmd-env.c: Use sys/stat.h, not gdb_stat.h.
	* nto-tdep.c: Use sys/stat.h, not gdb_stat.h.
	* objfiles.c: Use sys/stat.h, not gdb_stat.h.
	* procfs.c: Use sys/stat.h, not gdb_stat.h.
	* remote-fileio.c: Use sys/stat.h, not gdb_stat.h.
	* remote-mips.c: Use sys/stat.h, not gdb_stat.h.
	* remote.c: Use sys/stat.h, not gdb_stat.h.
	* rs6000-nat.c: Use sys/stat.h, not gdb_stat.h.
	* sol-thread.c: Use sys/stat.h, not gdb_stat.h.
	* solib-spu.c: Use sys/stat.h, not gdb_stat.h.
	* source.c: Use sys/stat.h, not gdb_stat.h.
	* symfile.c: Use sys/stat.h, not gdb_stat.h.
	* symmisc.c: Use sys/stat.h, not gdb_stat.h.
	* symtab.c: Use sys/stat.h, not gdb_stat.h.
	* top.c: Use sys/stat.h, not gdb_stat.h.
	* xcoffread.c: Use sys/stat.h, not gdb_stat.h.
---
 gdb/ChangeLog                | 37 +++++++++++++++++++++++++++
 gdb/ada-lang.c               |  2 +-
 gdb/common/filestuff.c       |  2 +-
 gdb/common/gdb_stat.h        | 59 --------------------------------------------
 gdb/common/linux-osdata.c    |  2 +-
 gdb/corefile.c               |  2 +-
 gdb/ctf.c                    |  2 +-
 gdb/darwin-nat.c             |  2 +-
 gdb/dbxread.c                |  2 +-
 gdb/dwarf2read.c             |  2 +-
 gdb/exec.c                   |  2 +-
 gdb/gdbserver/linux-low.c    |  2 +-
 gdb/gdbserver/remote-utils.c |  2 +-
 gdb/inf-child.c              |  2 +-
 gdb/jit.c                    |  2 +-
 gdb/linux-nat.c              |  2 +-
 gdb/m68klinux-nat.c          |  2 +-
 gdb/main.c                   |  2 +-
 gdb/mdebugread.c             |  2 +-
 gdb/mi/mi-cmd-env.c          |  2 +-
 gdb/nto-tdep.c               |  2 +-
 gdb/objfiles.c               |  2 +-
 gdb/procfs.c                 |  2 +-
 gdb/remote-fileio.c          |  2 +-
 gdb/remote-mips.c            |  2 +-
 gdb/remote.c                 |  2 +-
 gdb/rs6000-nat.c             |  2 +-
 gdb/sol-thread.c             |  2 +-
 gdb/solib-spu.c              |  2 +-
 gdb/source.c                 |  2 +-
 gdb/symfile.c                |  2 +-
 gdb/symmisc.c                |  2 +-
 gdb/symtab.c                 |  2 +-
 gdb/top.c                    |  2 +-
 gdb/xcoffread.c              |  2 +-
 35 files changed, 70 insertions(+), 92 deletions(-)
 delete mode 100644 gdb/common/gdb_stat.h

diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index 28daa24..417232c 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -43,7 +43,7 @@
 #include "gdb_obstack.h"
 #include "ada-lang.h"
 #include "completer.h"
-#include "gdb_stat.h"
+#include <sys/stat.h>
 #ifdef UI_OUT
 #include "ui-out.h"
 #endif
diff --git a/gdb/common/filestuff.c b/gdb/common/filestuff.c
index bbb60a7..2792d59 100644
--- a/gdb/common/filestuff.c
+++ b/gdb/common/filestuff.c
@@ -29,7 +29,7 @@
 #include <fcntl.h>
 #include <unistd.h>
 #include <sys/types.h>
-#include "gdb_stat.h"
+#include <sys/stat.h>
 
 #ifdef USE_WIN32API
 #include <winsock2.h>
diff --git a/gdb/common/gdb_stat.h b/gdb/common/gdb_stat.h
deleted file mode 100644
index 3e3c981..0000000
--- a/gdb/common/gdb_stat.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/* Portable <sys/stat.h>
-   Copyright (C) 1995-2013 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-#if !defined(GDB_STAT_H)
-#define GDB_STAT_H
-
-#include <sys/types.h>
-#include <sys/stat.h>
-
-#if !defined(S_ISBLK) && defined(S_IFBLK)
-#define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
-#endif
-#if !defined(S_ISCHR) && defined(S_IFCHR)
-#define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
-#endif
-#if !defined(S_ISDIR) && defined(S_IFDIR)
-#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
-#endif
-#if !defined(S_ISREG) && defined(S_IFREG)
-#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
-#endif
-#if !defined(S_ISFIFO) && defined(S_IFIFO)
-#define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
-#endif
-#if !defined(S_ISLNK) && defined(S_IFLNK)
-#define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
-#endif
-#if !defined(S_ISSOCK) && defined(S_IFSOCK)
-#define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
-#endif
-#if !defined(S_ISMPB) && defined(S_IFMPB)	/* V7 */
-#define S_ISMPB(m) (((m) & S_IFMT) == S_IFMPB)
-#define S_ISMPC(m) (((m) & S_IFMT) == S_IFMPC)
-#endif
-#if !defined(S_ISNWK) && defined(S_IFNWK)	/* HP/UX */
-#define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK)
-#endif
-
-/* Microsoft C's stat.h doesn't define all the POSIX file modes.  */
-#ifndef S_IROTH
-#define S_IROTH	S_IREAD
-#endif
-
-#endif /* !defined(GDB_STAT_H) */
diff --git a/gdb/common/linux-osdata.c b/gdb/common/linux-osdata.c
index 0ff10c6..90da899 100644
--- a/gdb/common/linux-osdata.c
+++ b/gdb/common/linux-osdata.c
@@ -43,7 +43,7 @@
 #include "buffer.h"
 #include "gdb_assert.h"
 #include <dirent.h>
-#include "gdb_stat.h"
+#include <sys/stat.h>
 #include "filestuff.h"
 
 #define NAMELEN(dirent) strlen ((dirent)->d_name)
diff --git a/gdb/corefile.c b/gdb/corefile.c
index e82f978..878ab3b 100644
--- a/gdb/corefile.c
+++ b/gdb/corefile.c
@@ -30,7 +30,7 @@
 #include "target.h"
 #include "gdbcore.h"
 #include "dis-asm.h"
-#include "gdb_stat.h"
+#include <sys/stat.h>
 #include "completer.h"
 #include "exceptions.h"
 #include "observer.h"
diff --git a/gdb/ctf.c b/gdb/ctf.c
index 23ee36d..ba8190e 100644
--- a/gdb/ctf.c
+++ b/gdb/ctf.c
@@ -23,7 +23,7 @@
 #include "ctf.h"
 #include "tracepoint.h"
 #include "regcache.h"
-#include "gdb_stat.h"
+#include <sys/stat.h>
 #include "exec.h"
 #include "completer.h"
 
diff --git a/gdb/darwin-nat.c b/gdb/darwin-nat.c
index a9157db..f0f938d 100644
--- a/gdb/darwin-nat.c
+++ b/gdb/darwin-nat.c
@@ -32,7 +32,7 @@
 #include "regcache.h"
 #include "event-top.h"
 #include "inf-loop.h"
-#include "gdb_stat.h"
+#include <sys/stat.h>
 #include "exceptions.h"
 #include "inf-child.h"
 #include "value.h"
diff --git a/gdb/dbxread.c b/gdb/dbxread.c
index 67deeec..a810f42 100644
--- a/gdb/dbxread.c
+++ b/gdb/dbxread.c
@@ -39,7 +39,7 @@
 #endif
 
 #include "gdb_obstack.h"
-#include "gdb_stat.h"
+#include <sys/stat.h>
 #include "symtab.h"
 #include "breakpoint.h"
 #include "target.h"
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 5e8f94e..1c7dfc5 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -56,7 +56,7 @@
 #include "jv-lang.h"
 #include "psympriv.h"
 #include "exceptions.h"
-#include "gdb_stat.h"
+#include <sys/stat.h>
 #include "completer.h"
 #include "vec.h"
 #include "c-lang.h"
diff --git a/gdb/exec.c b/gdb/exec.c
index afd3224..38d2edb 100644
--- a/gdb/exec.c
+++ b/gdb/exec.c
@@ -42,7 +42,7 @@
 #include "gdbcore.h"
 
 #include <ctype.h>
-#include "gdb_stat.h"
+#include <sys/stat.h>
 
 void (*deprecated_file_changed_hook) (char *);
 
diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
index 799fcc9..6355fa8 100644
--- a/gdb/gdbserver/linux-low.c
+++ b/gdb/gdbserver/linux-low.c
@@ -41,7 +41,7 @@
 #include <pwd.h>
 #include <sys/types.h>
 #include <dirent.h>
-#include "gdb_stat.h"
+#include <sys/stat.h>
 #include <sys/vfs.h>
 #include <sys/uio.h>
 #include "filestuff.h"
diff --git a/gdb/gdbserver/remote-utils.c b/gdb/gdbserver/remote-utils.c
index 8e8a4d6..a48ca35 100644
--- a/gdb/gdbserver/remote-utils.c
+++ b/gdb/gdbserver/remote-utils.c
@@ -57,7 +57,7 @@
 #if HAVE_ARPA_INET_H
 #include <arpa/inet.h>
 #endif
-#include "gdb_stat.h"
+#include <sys/stat.h>
 #if HAVE_ERRNO_H
 #include <errno.h>
 #endif
diff --git a/gdb/inf-child.c b/gdb/inf-child.c
index 36fa81d..3db09c9 100644
--- a/gdb/inf-child.c
+++ b/gdb/inf-child.c
@@ -25,7 +25,7 @@
 #include "target.h"
 #include "inferior.h"
 #include <string.h>
-#include "gdb_stat.h"
+#include <sys/stat.h>
 #include "inf-child.h"
 #include "gdb/fileio.h"
 #include "agent.h"
diff --git a/gdb/jit.c b/gdb/jit.c
index 3daa9fa..fde79e5 100644
--- a/gdb/jit.c
+++ b/gdb/jit.c
@@ -37,7 +37,7 @@
 #include "symtab.h"
 #include "target.h"
 #include "gdb-dlfcn.h"
-#include "gdb_stat.h"
+#include <sys/stat.h>
 #include "exceptions.h"
 #include "gdb_bfd.h"
 
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
index e9613ac..d2091ca 100644
--- a/gdb/linux-nat.c
+++ b/gdb/linux-nat.c
@@ -47,7 +47,7 @@
 #include "gdbcore.h"		/* for get_exec_file */
 #include <ctype.h>		/* for isdigit */
 #include "gdbthread.h"		/* for struct thread_info etc.  */
-#include "gdb_stat.h"		/* for struct stat */
+#include <sys/stat.h>		/* for struct stat */
 #include <fcntl.h>		/* for O_RDONLY */
 #include "inf-loop.h"
 #include "event-loop.h"
diff --git a/gdb/m68klinux-nat.c b/gdb/m68klinux-nat.c
index 59511e4..f43d475 100644
--- a/gdb/m68klinux-nat.c
+++ b/gdb/m68klinux-nat.c
@@ -42,7 +42,7 @@
 #endif
 
 #include <sys/file.h>
-#include "gdb_stat.h"
+#include <sys/stat.h>
 
 #include "floatformat.h"
 
diff --git a/gdb/main.c b/gdb/main.c
index d5c9e39..08f46f0 100644
--- a/gdb/main.c
+++ b/gdb/main.c
@@ -28,7 +28,7 @@
 #include "getopt.h"
 
 #include <sys/types.h>
-#include "gdb_stat.h"
+#include <sys/stat.h>
 #include <ctype.h>
 
 #include <string.h>
diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c
index 99a029e..bbeea12 100644
--- a/gdb/mdebugread.c
+++ b/gdb/mdebugread.c
@@ -55,7 +55,7 @@
 #include "block.h"
 #include "dictionary.h"
 #include "mdebugread.h"
-#include "gdb_stat.h"
+#include <sys/stat.h>
 #include <string.h>
 #include "psympriv.h"
 #include "source.h"
diff --git a/gdb/mi/mi-cmd-env.c b/gdb/mi/mi-cmd-env.c
index f1589e5..ca196f6 100644
--- a/gdb/mi/mi-cmd-env.c
+++ b/gdb/mi/mi-cmd-env.c
@@ -32,7 +32,7 @@
 #include "top.h"
 
 #include <string.h>
-#include "gdb_stat.h"
+#include <sys/stat.h>
 
 static void env_mod_path (char *dirname, char **which_path);
 
diff --git a/gdb/nto-tdep.c b/gdb/nto-tdep.c
index 91f3928..674d572 100644
--- a/gdb/nto-tdep.c
+++ b/gdb/nto-tdep.c
@@ -20,7 +20,7 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
-#include "gdb_stat.h"
+#include <sys/stat.h>
 #include <string.h>
 #include "nto-tdep.h"
 #include "top.h"
diff --git a/gdb/objfiles.c b/gdb/objfiles.c
index f669e30..ba930fa 100644
--- a/gdb/objfiles.c
+++ b/gdb/objfiles.c
@@ -35,7 +35,7 @@
 
 #include "gdb_assert.h"
 #include <sys/types.h>
-#include "gdb_stat.h"
+#include <sys/stat.h>
 #include <fcntl.h>
 #include "gdb_obstack.h"
 #include <string.h>
diff --git a/gdb/procfs.c b/gdb/procfs.c
index 7a2aeb8..ef9bb3d 100644
--- a/gdb/procfs.c
+++ b/gdb/procfs.c
@@ -94,7 +94,7 @@
 
 #include <fcntl.h>	/* for O_RDONLY */
 #include <unistd.h>	/* for "X_OK" */
-#include "gdb_stat.h"	/* for struct stat */
+#include <sys/stat.h>	/* for struct stat */
 
 /* Note: procfs-utils.h must be included after the above system header
    files, because it redefines various system calls using macros.
diff --git a/gdb/remote-fileio.c b/gdb/remote-fileio.c
index bf79068..c6e7ece 100644
--- a/gdb/remote-fileio.c
+++ b/gdb/remote-fileio.c
@@ -25,7 +25,7 @@
 #include "remote.h"
 #include "gdb/fileio.h"
 #include "gdb_wait.h"
-#include "gdb_stat.h"
+#include <sys/stat.h>
 #include "exceptions.h"
 #include "remote-fileio.h"
 #include "event-loop.h"
diff --git a/gdb/remote-mips.c b/gdb/remote-mips.c
index 14c494f..e4e5083 100644
--- a/gdb/remote-mips.c
+++ b/gdb/remote-mips.c
@@ -30,7 +30,7 @@
 #include "target.h"
 #include "exceptions.h"
 #include <string.h>
-#include "gdb_stat.h"
+#include <sys/stat.h>
 #include "gdb_usleep.h"
 #include "regcache.h"
 #include <ctype.h>
diff --git a/gdb/remote.c b/gdb/remote.c
index bbd9061..186c058 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -60,7 +60,7 @@
 
 #include "remote-fileio.h"
 #include "gdb/fileio.h"
-#include "gdb_stat.h"
+#include <sys/stat.h>
 #include "xml-support.h"
 
 #include "memory-map.h"
diff --git a/gdb/rs6000-nat.c b/gdb/rs6000-nat.c
index fc9889c..d0ec0c7 100644
--- a/gdb/rs6000-nat.c
+++ b/gdb/rs6000-nat.c
@@ -50,7 +50,7 @@
 
 #include <a.out.h>
 #include <sys/file.h>
-#include "gdb_stat.h"
+#include <sys/stat.h>
 #include "gdb_bfd.h"
 #include <sys/core.h>
 #define __LDINFO_PTRACE32__	/* for __ld_info32 */
diff --git a/gdb/sol-thread.c b/gdb/sol-thread.c
index ec1245b..b480b58 100644
--- a/gdb/sol-thread.c
+++ b/gdb/sol-thread.c
@@ -56,7 +56,7 @@
 #include "target.h"
 #include "inferior.h"
 #include <fcntl.h>
-#include "gdb_stat.h"
+#include <sys/stat.h>
 #include <dlfcn.h>
 #include "gdbcmd.h"
 #include "gdbcore.h"
diff --git a/gdb/solib-spu.c b/gdb/solib-spu.c
index 590baba..c12324c 100644
--- a/gdb/solib-spu.c
+++ b/gdb/solib-spu.c
@@ -23,7 +23,7 @@
 #include "gdbcore.h"
 #include <string.h>
 #include "gdb_assert.h"
-#include "gdb_stat.h"
+#include <sys/stat.h>
 #include "arch-utils.h"
 #include "bfd.h"
 #include "symtab.h"
diff --git a/gdb/source.c b/gdb/source.c
index f89f534..0959585 100644
--- a/gdb/source.c
+++ b/gdb/source.c
@@ -31,7 +31,7 @@
 
 #include <sys/types.h>
 #include <string.h>
-#include "gdb_stat.h"
+#include <sys/stat.h>
 #include <fcntl.h>
 #include "gdbcore.h"
 #include "gdb_regex.h"
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 0c8713a..59d0583 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -62,7 +62,7 @@
 #include <sys/types.h>
 #include <fcntl.h>
 #include <string.h>
-#include "gdb_stat.h"
+#include <sys/stat.h>
 #include <ctype.h>
 #include <time.h>
 #include <sys/time.h>
diff --git a/gdb/symmisc.c b/gdb/symmisc.c
index f4c3fc5..ec21c6c 100644
--- a/gdb/symmisc.c
+++ b/gdb/symmisc.c
@@ -32,7 +32,7 @@
 #include "bcache.h"
 #include "block.h"
 #include "gdb_regex.h"
-#include "gdb_stat.h"
+#include <sys/stat.h>
 #include "dictionary.h"
 #include "typeprint.h"
 #include "gdbcmd.h"
diff --git a/gdb/symtab.c b/gdb/symtab.c
index 6bb0bbc..8fac0be 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -51,7 +51,7 @@
 #include <sys/types.h>
 #include <fcntl.h>
 #include <string.h>
-#include "gdb_stat.h"
+#include <sys/stat.h>
 #include <ctype.h>
 #include "cp-abi.h"
 #include "cp-support.h"
diff --git a/gdb/top.c b/gdb/top.c
index 8b389c5..72a286b 100644
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -61,7 +61,7 @@
 
 #include "event-top.h"
 #include <string.h>
-#include "gdb_stat.h"
+#include <sys/stat.h>
 #include <ctype.h>
 #include "ui-out.h"
 #include "cli-out.h"
diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c
index c741fb4..2fba510 100644
--- a/gdb/xcoffread.c
+++ b/gdb/xcoffread.c
@@ -29,7 +29,7 @@
 #ifdef HAVE_SYS_FILE_H
 #include <sys/file.h>
 #endif
-#include "gdb_stat.h"
+#include <sys/stat.h>
 
 #include "coff/internal.h"
 #include "libcoff.h"		/* FIXME, internal data from BFD */
-- 
1.8.1.4

^ permalink raw reply	[flat|nested] 24+ messages in thread

* RE: [PATCH v3 10/13] don't check for unistd.h
  2013-11-18 20:46 ` [PATCH v3 10/13] don't check for unistd.h Tom Tromey
@ 2013-11-19 20:59   ` Pierre Muller
       [not found]   ` <"00ee01cee569$bcb52d00$361f8700$@muller"@ics-cnrs.unistra.fr>
       [not found]   ` <13494.0459196971$1384894582@news.gmane.org>
  2 siblings, 0 replies; 24+ messages in thread
From: Pierre Muller @ 2013-11-19 20:59 UTC (permalink / raw)
  To: 'Tom Tromey', gdb-patches

  Hi,

  I am not totally sure this is related,
but I got a new error when trying to cross compile
for i686-w64-mingw32 using cygwin.
m32r-rom.o: dans la fonction « m32r_upload_command »:
/home/Pierre/git/build/binu-gdb-mingw32/gdb/../../../binutils-gdb/gdb/m32r-r
om.c:472: référence indéfinie vers «
_imp__gethostname_used_without_requesting_gnulib_module_gethostname@8 »
collect2: erreur: ld a retourné 1 code d'état d'exécution

I tried to run ./config.status --recheck; make
but that did not solve the problem...

To double check, I completely erased the build directory
and reran the "../build/XXX/configure" with required options
and  "make all-gdb": Same error...

Could someone double-check if this is a general problem
with mingw target?

How could this problem be solved?

Pierre Muller





i686-w64-mingw32-gcc -gstabs+ -O0 -D__USE_MINGW_ACCESS   -static-libstdc++
-static-libgcc -static -Wl,--stack,12582912   \
        -o gdb.exe gdb.o armbsd-tdep.o arm-linux-tdep.o arm-symbian-tdep.o
armnbsd-tdep.o armobsd-tdep.o arm-tdep.o arm-wince-tdep.o avr-tdep.o
bfin-linux-tdep.o bfin-tdep.o cris-linux-tdep.o cris-tdep.o dicos-tdep.o
frv-linux-tdep.o frv-tdep.o h8300-tdep.o hppabsd-tdep.o hppanbsd-tdep.o
hppaobsd-tdep.o hppa-hpux-tdep.o hppa-linux-tdep.o hppa-tdep.o
i386bsd-tdep.o i386-cygwin-tdep.o i386fbsd-tdep.o i386gnu-tdep.o
i386-linux-tdep.o i386nbsd-tdep.o i386-nto-tdep.o i386obsd-tdep.o
i386-sol2-tdep.o i386-tdep.o i387-tdep.o i386-dicos-tdep.o
i386-darwin-tdep.o iq2000-tdep.o linux-tdep.o lm32-tdep.o m32c-tdep.o
m32r-linux-tdep.o m32r-tdep.o m68hc11-tdep.o m68kbsd-tdep.o m68klinux-tdep.o
m68k-tdep.o m88k-tdep.o mep-tdep.o microblaze-tdep.o microblaze-linux-tdep.o
mips-irix-tdep.o mips-linux-tdep.o mipsnbsd-tdep.o mips-tdep.o
mn10300-linux-tdep.o mn10300-tdep.o moxie-tdep.o msp430-tdep.o mt-tdep.o
nios2-tdep.o nios2-linux-tdep.o nto-tdep.o ppc-linux-tdep.o ppcfbsd-tdep.o
ppcnbsd-tdep.o ppcobsd-tdep.o ppc-sysv-tdep.o ppc64-tdep.o rl78-tdep.o
rs6000-aix-tdep.o rs6000-tdep.o solib-aix.o ppc-ravenscar-thread.o
rs6000-lynx178-tdep.o rx-tdep.o s390-linux-tdep.o score-tdep.o sh64-tdep.o
sh-linux-tdep.o shnbsd-tdep.o sh-tdep.o sparc-linux-tdep.o sparcnbsd-tdep.o
sparcobsd-tdep.o sparc-sol2-tdep.o sparc-tdep.o sparc-ravenscar-thread.o
spu-tdep.o spu-multiarch.o solib-spu.o tic6x-tdep.o tic6x-linux-tdep.o
tilegx-tdep.o tilegx-linux-tdep.o v850-tdep.o vaxnbsd-tdep.o vaxobsd-tdep.o
vax-tdep.o xstormy16-tdep.o xtensa-config.o xtensa-tdep.o
xtensa-linux-tdep.o glibc-tdep.o bsd-uthread.o nbsd-tdep.o obsd-tdep.o
sol2-tdep.o solib-frv.o solib-irix.o solib-svr4.o solib-som.o solib-pa64.o
solib-darwin.o solib-dsbt.o dbug-rom.o dink32-rom.o ppcbug-rom.o m32r-rom.o
dsrec.o monitor.o remote-m32r-sdi.o remote-mips.o xcoffread.o symfile-mem.o
windows-tdep.o linux-record.o ravenscar-thread.o aarch64-tdep.o
aarch64-linux-tdep.o aarch64-newlib-tdep.o alphabsd-tdep.o alphafbsd-tdep.o
alpha-linux-tdep.o alpha-mdebug-tdep.o alphanbsd-tdep.o alphaobsd-tdep.o
alpha-osf1-tdep.o alpha-tdep.o amd64fbsd-tdep.o amd64-darwin-tdep.o
amd64-dicos-tdep.o amd64-linux-tdep.o amd64nbsd-tdep.o amd64obsd-tdep.o
amd64-sol2-tdep.o amd64-tdep.o amd64-windows-tdep.o ia64-hpux-tdep.o
ia64-linux-tdep.o ia64-vms-tdep.o ia64-tdep.o mips64obsd-tdep.o
sparc64fbsd-tdep.o sparc64-linux-tdep.o sparc64nbsd-tdep.o
sparc64obsd-tdep.o sparc64-sol2-tdep.o sparc64-tdep.o ser-base.o ser-tcp.o
ser-mingw.o i386-nat.o windows-nat.o i386-windows-nat.o remote.o dcache.o
tracepoint.o ax-general.o ax-gdb.o remote-fileio.o remote-notif.o ctf.o
cli-dump.o cli-decode.o cli-script.o cli-cmds.o cli-setshow.o cli-logging.o
cli-interp.o cli-utils.o mi-out.o mi-console.o mi-cmds.o mi-cmd-catch.o
mi-cmd-env.o mi-cmd-var.o mi-cmd-break.o mi-cmd-stack.o mi-cmd-file.o
mi-cmd-disas.o mi-symbol-cmds.o mi-cmd-target.o mi-cmd-info.o mi-interp.o
mi-main.o mi-parse.o mi-getopt.o windows-termcap.o python.o py-value.o
py-prettyprint.o py-auto-load.o elfread.o stap-probe.o machoread.o somread.o
mingw-hdep.o c-exp.o cp-name-parser.o ada-exp.o jv-exp.o f-exp.o go-exp.o
m2-exp.o p-exp.o version.o annotate.o addrmap.o auto-load.o auxv.o agent.o
bfd-target.o blockframe.o breakpoint.o break-catch-sig.o break-catch-throw.o
findvar.o regcache.o cleanups.o charset.o continuations.o corelow.o disasm.o
dummy-frame.o dfp.o source.o value.o eval.o valops.o valarith.o valprint.o
printcmd.o block.o symtab.o psymtab.o symfile.o symfile-debug.o symmisc.o
linespec.o dictionary.o infcall.o infcmd.o infrun.o expprint.o environ.o
stack.o thread.o exceptions.o filesystem.o filestuff.o inf-child.o interps.o
minidebug.o main.o macrotab.o macrocmd.o macroexp.o macroscope.o mi-common.o
event-loop.o event-top.o inf-loop.o completer.o gdbarch.o arch-utils.o
gdbtypes.o gdb_bfd.o gdb_obstack.o osabi.o copying.o memattr.o mem-break.o
target.o parse.o language.o build-id.o buildsym.o findcmd.o std-regs.o
signals.o exec.o reverse.o bcache.o objfiles.o observer.o minsyms.o maint.o
demangle.o dbxread.o coffread.o coff-pe-read.o dwarf2read.o mipsread.o
stabsread.o corefile.o dwarf2expr.o dwarf2loc.o dwarf2-frame.o
dwarf2-frame-tailcall.o ada-lang.o c-lang.o d-lang.o f-lang.o objc-lang.o
ada-tasks.o ada-varobj.o c-varobj.o ui-out.o cli-out.o varobj.o vec.o
go-lang.o go-valprint.o go-typeprint.o jv-lang.o jv-valprint.o
jv-typeprint.o jv-varobj.o m2-lang.o opencl-lang.o p-lang.o p-typeprint.o
p-valprint.o sentinel-frame.o complaints.o typeprint.o ada-typeprint.o
c-typeprint.o f-typeprint.o m2-typeprint.o ada-valprint.o c-valprint.o
cp-valprint.o d-valprint.o f-valprint.o m2-valprint.o serial.o mdebugread.o
top.o utils.o ui-file.o user-regs.o frame.o frame-unwind.o doublest.o
frame-base.o inline-frame.o gnu-v2-abi.o gnu-v3-abi.o cp-abi.o cp-support.o
cp-namespace.o reggroups.o regset.o trad-frame.o tramp-frame.o solib.o
solib-target.o prologue-value.o memory-map.o memrange.o xml-support.o
xml-syscall.o xml-utils.o target-descriptions.o target-memory.o xml-tdesc.o
xml-builtin.o inferior.o osdata.o gdb_usleep.o record.o record-full.o
gcore.o gdb_vecs.o jit.o progspace.o skip.o probe.o common-utils.o buffer.o
ptid.o gdb-dlfcn.o common-agent.o format.o registry.o btrace.o
record-btrace.o waitstatus.o inflow.o    init.o \
           ../readline/libreadline.a ../opcodes/libopcodes.a ../bfd/libbfd.a
./../intl/libintl.a -liconv ../libiberty/libiberty.a
../libdecnumber/libdecnumber.a    -ldl -lm   -liconv -lexpat
../libiberty/libiberty.a -lws2_32 build-gnulib/import/libgnu.a
m32r-rom.o: dans la fonction « m32r_upload_command »:
/home/Pierre/git/build/binu-gdb-mingw32/gdb/../../../binutils-gdb/gdb/m32r-r
om.c:472: référence indéfinie vers «
_imp__gethostname_used_without_requesting_gnulib_module_gethostname@8 »
collect2: erreur: ld a retourné 1 code d'état d'exécution
Makefile:1227: recipe for target 'gdb.exe' failed
make: *** [gdb.exe] Error 1

> -----Message d'origine-----
> De : gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] De la part de Tom Tromey
> Envoyé : lundi 18 novembre 2013 18:25
> À : gdb-patches@sourceware.org
> Cc : Tom Tromey
> Objet : [PATCH v3 10/13] don't check for unistd.h
> 
> We don't use the result of checking for unistd.h, so this removes the
> check.
> 
> 2013-11-18  Tom Tromey  <tromey@redhat.com>
> 
> 	* configure: Rebuild.
> 	* configure.ac: Don't check for unistd.h.
> ---
>  gdb/ChangeLog    | 5 +++++
>  gdb/configure    | 2 +-
>  gdb/configure.ac | 2 +-
>  3 files changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/gdb/configure b/gdb/configure
> index 9739195..23e533d 100755
> --- a/gdb/configure
> +++ b/gdb/configure
> @@ -8762,7 +8762,7 @@ for ac_header in nlist.h machine/reg.h poll.h
> sys/poll.h proc_service.h \
>  		  sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
>  		  sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
>  		  termios.h termio.h \
> -		  sgtty.h unistd.h elf_hp.h \
> +		  sgtty.h elf_hp.h \
>  		  dlfcn.h
>  do :
>    as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
> diff --git a/gdb/configure.ac b/gdb/configure.ac
> index 74d56e4..d2b5d29 100644
> --- a/gdb/configure.ac
> +++ b/gdb/configure.ac
> @@ -1081,7 +1081,7 @@ AC_CHECK_HEADERS([nlist.h machine/reg.h poll.h
> sys/poll.h proc_service.h \
>  		  sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
>  		  sys/reg.h sys/debugreg.h sys/select.h sys/syscall.h \
>  		  termios.h termio.h \
> -		  sgtty.h unistd.h elf_hp.h \
> +		  sgtty.h elf_hp.h \
>  		  dlfcn.h])
>  AC_CHECK_HEADERS(sys/proc.h, [], [],
>  [#if HAVE_SYS_PARAM_H
> --
> 1.8.1.4

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v3 10/13] don't check for unistd.h
       [not found]   ` <"00ee01cee569$bcb52d00$361f8700$@muller"@ics-cnrs.unistra.fr>
@ 2013-11-19 21:27     ` Eli Zaretskii
  0 siblings, 0 replies; 24+ messages in thread
From: Eli Zaretskii @ 2013-11-19 21:27 UTC (permalink / raw)
  To: Pierre Muller; +Cc: tromey, gdb-patches

> From: "Pierre Muller" <pierre.muller@ics-cnrs.unistra.fr>
> Date: Tue, 19 Nov 2013 18:55:47 -0200
> 
>   I am not totally sure this is related,
> but I got a new error when trying to cross compile
> for i686-w64-mingw32 using cygwin.
> m32r-rom.o: dans la fonction « m32r_upload_command »:
> /home/Pierre/git/build/binu-gdb-mingw32/gdb/../../../binutils-gdb/gdb/m32r-r
> om.c:472: référence indéfinie vers «
> _imp__gethostname_used_without_requesting_gnulib_module_gethostname@8 »
> collect2: erreur: ld a retourné 1 code d'état d'exécution
> 
> I tried to run ./config.status --recheck; make
> but that did not solve the problem...
> 
> To double check, I completely erased the build directory
> and reran the "../build/XXX/configure" with required options
> and  "make all-gdb": Same error...
> 
> Could someone double-check if this is a general problem
> with mingw target?

It's a real problem, and comes with gnulib, see
gdb/gnulib/import/unistd.in.h.  (Isn't the error message
self-explanatory enough?)

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v3 10/13] don't check for unistd.h
       [not found]   ` <13494.0459196971$1384894582@news.gmane.org>
@ 2013-11-19 21:58     ` Tom Tromey
  2013-11-19 23:43       ` Tom Tromey
  0 siblings, 1 reply; 24+ messages in thread
From: Tom Tromey @ 2013-11-19 21:58 UTC (permalink / raw)
  To: Pierre Muller; +Cc: gdb-patches

>>>>> "Pierre" == Pierre Muller <pierre.muller@ics-cnrs.unistra.fr> writes:

Pierre> How could this problem be solved?

I'll send you a patch to try shortly.

Tom

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v3 10/13] don't check for unistd.h
  2013-11-19 21:58     ` Tom Tromey
@ 2013-11-19 23:43       ` Tom Tromey
  2013-11-20  2:42         ` Joel Brobecker
                           ` (2 more replies)
  0 siblings, 3 replies; 24+ messages in thread
From: Tom Tromey @ 2013-11-19 23:43 UTC (permalink / raw)
  To: Pierre Muller; +Cc: gdb-patches

Pierre> How could this problem be solved?

Tom> I'll send you a patch to try shortly.

Well, so I thought.  It turned into an insane nightmare.  The unistd
module pulls <winnt.h> into everything, which stomps all over our
namespace.

I'm probably going to revert the whole series tomorrow morning.

I'll send a bug report to gnulib.

Tom

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v3 10/13] don't check for unistd.h
  2013-11-19 23:43       ` Tom Tromey
@ 2013-11-20  2:42         ` Joel Brobecker
  2013-11-20  3:47         ` Eli Zaretskii
  2013-11-20 15:54         ` Tom Tromey
  2 siblings, 0 replies; 24+ messages in thread
From: Joel Brobecker @ 2013-11-20  2:42 UTC (permalink / raw)
  To: Tom Tromey; +Cc: Pierre Muller, gdb-patches

> Well, so I thought.  It turned into an insane nightmare.  The unistd
> module pulls <winnt.h> into everything, which stomps all over our
> namespace.
> 
> I'm probably going to revert the whole series tomorrow morning.
> 
> I'll send a bug report to gnulib.

That is too bad... FWIW, I just got the results from building on
all of AdaCore's platforms, and everything was in the green.
I was definitely expecting some breakage, particularly in platforms
such as LynxOS, for instance.

-- 
Joel

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v3 10/13] don't check for unistd.h
  2013-11-19 23:43       ` Tom Tromey
  2013-11-20  2:42         ` Joel Brobecker
@ 2013-11-20  3:47         ` Eli Zaretskii
  2013-11-20 12:16           ` Pierre Muller
  2013-11-20 15:54         ` Tom Tromey
  2 siblings, 1 reply; 24+ messages in thread
From: Eli Zaretskii @ 2013-11-20  3:47 UTC (permalink / raw)
  To: Tom Tromey; +Cc: pierre.muller, gdb-patches

> From: Tom Tromey <tromey@redhat.com>
> Cc: <gdb-patches@sourceware.org>
> Date: Tue, 19 Nov 2013 14:57:53 -0700
> 
> Pierre> How could this problem be solved?
> 
> Tom> I'll send you a patch to try shortly.
> 
> Well, so I thought.  It turned into an insane nightmare.  The unistd
> module pulls <winnt.h> into everything, which stomps all over our
> namespace.
> 
> I'm probably going to revert the whole series tomorrow morning.

Perhaps we could still leave it, and overcome the gethostname problem
on our own.

Pierre, can you see if 'configure' detects the presence of gethostname
when it probes the system?  If not, that might be the problem, and I
might have a trick to overcome it.

^ permalink raw reply	[flat|nested] 24+ messages in thread

* RE: [PATCH v3 10/13] don't check for unistd.h
  2013-11-20  3:47         ` Eli Zaretskii
@ 2013-11-20 12:16           ` Pierre Muller
  0 siblings, 0 replies; 24+ messages in thread
From: Pierre Muller @ 2013-11-20 12:16 UTC (permalink / raw)
  To: 'Eli Zaretskii', 'Tom Tromey'; +Cc: gdb-patches

Hi all,

> -----Message d'origine-----
> De : gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] De la part de Eli Zaretskii
> Envoyé : mercredi 20 novembre 2013 01:46
> À : Tom Tromey
> Cc : pierre.muller@ics-cnrs.unistra.fr; gdb-patches@sourceware.org
> Objet : Re: [PATCH v3 10/13] don't check for unistd.h
> 
> > From: Tom Tromey <tromey@redhat.com>
> > Cc: <gdb-patches@sourceware.org>
> > Date: Tue, 19 Nov 2013 14:57:53 -0700
> >
> > Pierre> How could this problem be solved?
> >
> > Tom> I'll send you a patch to try shortly.
> >
> > Well, so I thought.  It turned into an insane nightmare.  The unistd
> > module pulls <winnt.h> into everything, which stomps all over our
> > namespace.
> >
> > I'm probably going to revert the whole series tomorrow morning.
> 
> Perhaps we could still leave it, and overcome the gethostname problem
> on our own.
> 
> Pierre, can you see if 'configure' detects the presence of gethostname
> when it probes the system?  If not, that might be the problem, and I
> might have a trick to overcome it.

  I checked the config files in the gdb build directory.
Indeed, there is a check for gethostbyname, but not for gethostname.
But there is no line associated with this in 
the generated build dir gdb/config.h.

  When I looked into source gdb/configure.ac,
I only found AC_SEARCH_LIBS(gethostbyname, nsl)
with a comment talking about Solaris system.
  But there is nothing about gethostname.

  Like Eli suggests,
maybe adding a check for existence of this function
and disabling the call if it is not found would be enough indeed.
  I also suppose that

  I am too weak on autoconf and the like to
try this myself, but could easily test a patch...
  Adding #ifdef HAVE_GETHOSTNAME
around the call to gethostname function in m32r-rom.c source of course
solves the linking problem. 
  

Pierre
 
PS: I tried to compile a simple source with a call to gethostname,
the problem is that the functions are both defined
but in winsock.h or winsock2.h and the seem to link to
ws2_32.dll
  Thus, without adding this DLL to the test, the check will not work.
This is already done in configure.ac around line 1907,
so that the checks for gethostname and gethostbyname
need to be done after this, no?
  I have no clue about how to add the winsock or winsock2 header in the
test...

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v3 10/13] don't check for unistd.h
  2013-11-19 23:43       ` Tom Tromey
  2013-11-20  2:42         ` Joel Brobecker
  2013-11-20  3:47         ` Eli Zaretskii
@ 2013-11-20 15:54         ` Tom Tromey
  2013-11-20 18:03           ` Eli Zaretskii
  2013-11-20 18:57           ` Joel Brobecker
  2 siblings, 2 replies; 24+ messages in thread
From: Tom Tromey @ 2013-11-20 15:54 UTC (permalink / raw)
  To: Pierre Muller; +Cc: gdb-patches

Tom> I'm probably going to revert the whole series tomorrow morning.

Tom> I'll send a bug report to gnulib.

Ok, I dug some more, and I discovered that the gnulib "strerror" module
is the root of our trouble.  Dropping it fixes the problem.

Therefore I'm checking in the appended patch.  (I omitted all the
auto-generated crud from it for clarity.)

I send a second note to bug-gnulib with my findings.

I am somewhat more skeptical of gnulib after this experience.

Tom


From 079a28f2235d6c294f643351d2bee248e311b025 Mon Sep 17 00:00:00 2001
From: Tom Tromey <tromey@redhat.com>
Date: Wed, 20 Nov 2013 08:19:05 -0700
Subject: [PATCH] remove strerror module

This fixes the mingw build breakage reported by Pierre.

I found that the gnulib strerror module somehow requires us to pull in
the gethostname module.  However, pulling in the gethostname module
makes many things break.

I've sent a bug report to gnulib.

Meanwhile, removing the strerror module should not harm gdb and fixes
the build.

I'm checking this in.

2013-11-20  Tom Tromey  <tromey@redhat.com>

	* gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Remove
	strerror module.
	* gnulib/aclocal.m4: Update.
	* gnulib/config.in: Update.
	* gnulib/configure: Update.
	* gnulib/import/Makefile.am: Update.
	* gnulib/import/Makefile.in: Update.
	* gnulib/import/errno.in.h: Remove.
	* gnulib/import/intprops.h: Remove.
	* gnulib/import/m4/errno_h.m4: Remove.
	* gnulib/import/m4/gnulib-cache.m4: Update.
	* gnulib/import/m4/gnulib-comp.m4: Update.
	* gnulib/import/m4/strerror.m4: Remove.
	* gnulib/import/m4/sys_socket_h.m4: Remove.
	* gnulib/import/strerror-override.c: Remove.
	* gnulib/import/strerror-override.h: Remove.
	* gnulib/import/strerror.c: Remove.
	* gnulib/update-gnulib.sh: Update.
---
 gdb/ChangeLog                         |  21 ++
 gdb/gnulib/aclocal.m4                 |   3 -
 gdb/gnulib/config.in                  |  16 -
 gdb/gnulib/configure                  | 665 ++--------------------------------
 gdb/gnulib/import/Makefile.am         |  61 +---
 gdb/gnulib/import/Makefile.in         |  84 ++---
 gdb/gnulib/import/errno.in.h          | 279 --------------
 gdb/gnulib/import/intprops.h          | 319 ----------------
 gdb/gnulib/import/m4/errno_h.m4       | 137 -------
 gdb/gnulib/import/m4/gnulib-cache.m4  |   3 +-
 gdb/gnulib/import/m4/gnulib-comp.m4   |  25 --
 gdb/gnulib/import/m4/strerror.m4      |  96 -----
 gdb/gnulib/import/m4/sys_socket_h.m4  | 176 ---------
 gdb/gnulib/import/strerror-override.c | 302 ---------------
 gdb/gnulib/import/strerror-override.h |  56 ---
 gdb/gnulib/import/strerror.c          |  70 ----
 gdb/gnulib/update-gnulib.sh           |   1 -
 17 files changed, 84 insertions(+), 2230 deletions(-)
 delete mode 100644 gdb/gnulib/import/errno.in.h
 delete mode 100644 gdb/gnulib/import/intprops.h
 delete mode 100644 gdb/gnulib/import/m4/errno_h.m4
 delete mode 100644 gdb/gnulib/import/m4/strerror.m4
 delete mode 100644 gdb/gnulib/import/m4/sys_socket_h.m4
 delete mode 100644 gdb/gnulib/import/strerror-override.c
 delete mode 100644 gdb/gnulib/import/strerror-override.h
 delete mode 100644 gdb/gnulib/import/strerror.c

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 3afa68e..4488a9f 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,24 @@
+2013-11-20  Tom Tromey  <tromey@redhat.com>
+
+	* gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Remove
+	strerror module.
+	* gnulib/aclocal.m4: Update.
+	* gnulib/config.in: Update.
+	* gnulib/configure: Update.
+	* gnulib/import/Makefile.am: Update.
+	* gnulib/import/Makefile.in: Update.
+	* gnulib/import/errno.in.h: Remove.
+	* gnulib/import/intprops.h: Remove.
+	* gnulib/import/m4/errno_h.m4: Remove.
+	* gnulib/import/m4/gnulib-cache.m4: Update.
+	* gnulib/import/m4/gnulib-comp.m4: Update.
+	* gnulib/import/m4/strerror.m4: Remove.
+	* gnulib/import/m4/sys_socket_h.m4: Remove.
+	* gnulib/import/strerror-override.c: Remove.
+	* gnulib/import/strerror-override.h: Remove.
+	* gnulib/import/strerror.c: Remove.
+	* gnulib/update-gnulib.sh: Update.
+
 2013-11-19  Yao Qi  <yao@codesourcery.com>
 
 	* lib/mi-support.exp (mi_child_regexp): Remove 'whatever'.
diff --git a/gdb/gnulib/update-gnulib.sh b/gdb/gnulib/update-gnulib.sh
index 5bbe65e..21f0b59 100644
--- a/gdb/gnulib/update-gnulib.sh
+++ b/gdb/gnulib/update-gnulib.sh
@@ -37,7 +37,6 @@ IMPORTED_GNULIB_MODULES="\
     update-copyright \
     unistd \
     pathmax \
-    strerror \
     strstr \
     dirent \
     sys_stat \
-- 
1.8.1.4

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v3 10/13] don't check for unistd.h
  2013-11-20 15:54         ` Tom Tromey
@ 2013-11-20 18:03           ` Eli Zaretskii
  2013-11-20 18:57           ` Joel Brobecker
  1 sibling, 0 replies; 24+ messages in thread
From: Eli Zaretskii @ 2013-11-20 18:03 UTC (permalink / raw)
  To: Tom Tromey; +Cc: pierre.muller, gdb-patches

> From: Tom Tromey <tromey@redhat.com>
> Cc: <gdb-patches@sourceware.org>
> Date: Wed, 20 Nov 2013 08:49:17 -0700
> 
> Ok, I dug some more, and I discovered that the gnulib "strerror" module
> is the root of our trouble.  Dropping it fixes the problem.
> 
> Therefore I'm checking in the appended patch.  (I omitted all the
> auto-generated crud from it for clarity.)

Thanks.

Should we perhaps document these incidents somewhere, so that the
reasons for these decisions are clearly visible to whoever would like
to do this in the future?

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH v3 10/13] don't check for unistd.h
  2013-11-20 15:54         ` Tom Tromey
  2013-11-20 18:03           ` Eli Zaretskii
@ 2013-11-20 18:57           ` Joel Brobecker
  1 sibling, 0 replies; 24+ messages in thread
From: Joel Brobecker @ 2013-11-20 18:57 UTC (permalink / raw)
  To: Tom Tromey; +Cc: Pierre Muller, gdb-patches

> Ok, I dug some more, and I discovered that the gnulib "strerror" module
> is the root of our trouble.  Dropping it fixes the problem.
> 
> Therefore I'm checking in the appended patch.  (I omitted all the
> auto-generated crud from it for clarity.)
> 
> I send a second note to bug-gnulib with my findings.

Thanks, Tom! As it turns out, I just received a build failure
notification when trying to cross-build GDBserver for WindRiver
Linux, precisely because of a problem inside strerror. Strange
that everything worked for all kinds of exotic platforms, and
then had to fail on a target that is supposed to be Linux...
Oh well.

-- 
Joel

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2013-11-20 18:27 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-18 20:27 [PATCH v3 00/13] use gnulib more heavily Tom Tromey
2013-11-18 20:26 ` [PATCH v3 01/13] link gdbreplay against gnulib Tom Tromey
2013-11-18 20:26 ` [PATCH v3 02/13] change how list of modules is computed Tom Tromey
2013-11-18 20:27 ` [PATCH v3 07/13] remove gdb_dirent.h Tom Tromey
2013-11-18 20:27 ` [PATCH v3 03/13] import strstr and strerror modules Tom Tromey
2013-11-18 20:37 ` [PATCH v3 11/13] sys/types.h cleanup Tom Tromey
2013-11-18 20:37 ` [PATCH v3 12/13] import gnulib sys/stat.h module Tom Tromey
2013-11-18 20:39 ` [PATCH v3 08/13] don't check for stddef.h Tom Tromey
2013-11-18 20:46 ` [PATCH v3 04/13] remove gdb_string.h Tom Tromey
2013-11-18 20:46 ` [PATCH v3 10/13] don't check for unistd.h Tom Tromey
2013-11-19 20:59   ` Pierre Muller
     [not found]   ` <"00ee01cee569$bcb52d00$361f8700$@muller"@ics-cnrs.unistra.fr>
2013-11-19 21:27     ` Eli Zaretskii
     [not found]   ` <13494.0459196971$1384894582@news.gmane.org>
2013-11-19 21:58     ` Tom Tromey
2013-11-19 23:43       ` Tom Tromey
2013-11-20  2:42         ` Joel Brobecker
2013-11-20  3:47         ` Eli Zaretskii
2013-11-20 12:16           ` Pierre Muller
2013-11-20 15:54         ` Tom Tromey
2013-11-20 18:03           ` Eli Zaretskii
2013-11-20 18:57           ` Joel Brobecker
2013-11-18 20:46 ` [PATCH v3 09/13] stdlib.h is universal too Tom Tromey
2013-11-18 21:12 ` [PATCH v3 06/13] import gnulib dirent module Tom Tromey
2013-11-18 21:28 ` [PATCH v3 05/13] don't check for string.h or strings.h Tom Tromey
2013-11-18 23:03 ` [PATCH v3 13/13] remove gdb_stat.h Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).