[RFA/commit 1/2] update gnulib to 2012-11-05.
Joel Brobecker
brobecker@adacore.com
Mon Dec 17 15:08:00 GMT 2012
This is just a straight update to revision
daf7f8c02242c535d596231e2f655109b97fa2bc.
This version includes a fix in module errno which we will need
in order to build GDBserver on ppc-lynx178.
gdb/ChangeLog:
* gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
daf7f8c02242c535d596231e2f655109b97fa2bc.
* gnulib/import/alloca.in.h: Update.
* gnulib/import/localcharset.c: Update.
* gnulib/import/m4/fcntl-o.m4: Update.
* gnulib/import/m4/gnulib-cache.m4: Update.
* gnulib/import/m4/gnulib-comp.m4: Update.
* gnulib/import/stdbool.in.h: Update.
* gnulib/import/verify.h: Update.
* gnulib/configure: Regenerate.
Tested on x86_64-linux. Any objections?
---
gdb/gnulib/configure | 47 ++++++++------
gdb/gnulib/import/alloca.in.h | 7 ++
gdb/gnulib/import/localcharset.c | 7 ++
gdb/gnulib/import/m4/fcntl-o.m4 | 13 +++-
gdb/gnulib/import/m4/gnulib-cache.m4 | 2 +-
gdb/gnulib/import/m4/gnulib-comp.m4 | 116 +++++++++++++++++-----------------
gdb/gnulib/import/stdbool.in.h | 51 +++++++++------
gdb/gnulib/import/verify.h | 6 +-
gdb/gnulib/update-gnulib.sh | 2 +-
9 files changed, 151 insertions(+), 100 deletions(-)
diff --git a/gdb/gnulib/configure b/gdb/gnulib/configure
index 9de03a0..765b1aa 100644
--- a/gdb/gnulib/configure
+++ b/gdb/gnulib/configure
@@ -6586,7 +6586,18 @@ main ()
#if HAVE_SYMLINK
{
static char const sym[] = "conftest.sym";
- if (symlink (".", sym) != 0)
+ if (symlink ("/dev/null", sym) != 0)
+ result |= 2;
+ else
+ {
+ int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
+ if (fd >= 0)
+ {
+ close (fd);
+ result |= 4;
+ }
+ }
+ if (unlink (sym) != 0 || symlink (".", sym) != 0)
result |= 2;
else
{
@@ -8479,7 +8490,7 @@ else
fi
-if test -n "$FNMATCH_H"; then
+ if test -n "$FNMATCH_H"; then
@@ -8545,13 +8556,13 @@ _ACEOF
-fi
+ fi
-if test -n "$FNMATCH_H"; then
+ if test -n "$FNMATCH_H"; then
@@ -8617,7 +8628,7 @@ _ACEOF
-fi
+ fi
@@ -8885,7 +8896,7 @@ $as_echo "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
-LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\""
+ LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\""
@@ -9468,7 +9479,7 @@ $as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
fi
fi
-if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
+ if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
@@ -9482,7 +9493,7 @@ if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
:
-fi
+ fi
@@ -9709,7 +9720,7 @@ _ACEOF
fi
fi
-if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
+ if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
@@ -9723,7 +9734,7 @@ if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
:
-fi
+ fi
@@ -10063,7 +10074,7 @@ $as_echo "$gl_cv_func_mbsrtowcs_works" >&6; }
fi
fi
-if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then
+ if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then
@@ -10087,7 +10098,7 @@ if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then
:
-fi
+ fi
@@ -10104,7 +10115,7 @@ $as_echo "#define GNULIB_TEST_MBSRTOWCS 1" >>confdefs.h
-if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
+ if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
@@ -10129,7 +10140,7 @@ fi
done
-fi
+ fi
@@ -10240,7 +10251,7 @@ $as_echo "$gl_cv_func_memmem_works_fast" >&6; }
esac
fi
-if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
+ if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
@@ -10251,7 +10262,7 @@ if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
-fi
+ fi
@@ -10368,7 +10379,7 @@ $as_echo "$gl_cv_func_memmem_works_always" >&6; }
fi
:
-if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
+ if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
@@ -10379,7 +10390,7 @@ if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext"
-fi
+ fi
diff --git a/gdb/gnulib/import/alloca.in.h b/gdb/gnulib/import/alloca.in.h
index e94eb68..d20f4b8 100644
--- a/gdb/gnulib/import/alloca.in.h
+++ b/gdb/gnulib/import/alloca.in.h
@@ -44,6 +44,13 @@
# define alloca _alloca
# elif defined __DECC && defined __VMS
# define alloca __ALLOCA
+# elif defined __TANDEM && defined _TNS_E_TARGET
+# ifdef __cplusplus
+extern "C"
+# endif
+void *_alloca (unsigned short);
+# pragma intrinsic (_alloca)
+# define alloca _alloca
# else
# include <stddef.h>
# ifdef __cplusplus
diff --git a/gdb/gnulib/import/localcharset.c b/gdb/gnulib/import/localcharset.c
index b5ee2d6..8d16c87 100644
--- a/gdb/gnulib/import/localcharset.c
+++ b/gdb/gnulib/import/localcharset.c
@@ -542,5 +542,12 @@ locale_charset (void)
if (codeset[0] == '\0')
codeset = "ASCII";
+#ifdef DARWIN7
+ /* Mac OS X sets MB_CUR_MAX to 1 when LC_ALL=C, and "UTF-8"
+ (the default codeset) does not work when MB_CUR_MAX is 1. */
+ if (strcmp (codeset, "UTF-8") == 0 && MB_CUR_MAX <= 1)
+ codeset = "ASCII";
+#endif
+
return codeset;
}
diff --git a/gdb/gnulib/import/m4/fcntl-o.m4 b/gdb/gnulib/import/m4/fcntl-o.m4
index 9862741..740e78b 100644
--- a/gdb/gnulib/import/m4/fcntl-o.m4
+++ b/gdb/gnulib/import/m4/fcntl-o.m4
@@ -50,7 +50,18 @@ AC_DEFUN([gl_FCNTL_O_FLAGS],
#if HAVE_SYMLINK
{
static char const sym[] = "conftest.sym";
- if (symlink (".", sym) != 0)
+ if (symlink ("/dev/null", sym) != 0)
+ result |= 2;
+ else
+ {
+ int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
+ if (fd >= 0)
+ {
+ close (fd);
+ result |= 4;
+ }
+ }
+ if (unlink (sym) != 0 || symlink (".", sym) != 0)
result |= 2;
else
{
diff --git a/gdb/gnulib/import/m4/gnulib-cache.m4 b/gdb/gnulib/import/m4/gnulib-cache.m4
index 895c571..22e6796 100644
--- a/gdb/gnulib/import/m4/gnulib-cache.m4
+++ b/gdb/gnulib/import/m4/gnulib-cache.m4
@@ -47,5 +47,5 @@ gl_LIB([libgnu])
gl_MAKEFILE_NAME([])
gl_MACRO_PREFIX([gl])
gl_PO_DOMAIN([])
-gl_WITNESS_C_DOMAIN([])
+gl_WITNESS_C_MACRO([])
gl_VC_FILES([false])
diff --git a/gdb/gnulib/import/m4/gnulib-comp.m4 b/gdb/gnulib/import/m4/gnulib-comp.m4
index 954ea21..c63587d 100644
--- a/gdb/gnulib/import/m4/gnulib-comp.m4
+++ b/gdb/gnulib/import/m4/gnulib-comp.m4
@@ -87,64 +87,64 @@ AC_DEFUN([gl_INIT],
m4_pushdef([gl_LIBSOURCES_DIR], [])
gl_COMMON
gl_source_base='import'
-gl_FUNC_ALLOCA
-gl_CONFIGMAKE_PREP
-gl_FUNC_FNMATCH_POSIX
-if test -n "$FNMATCH_H"; then
- AC_LIBOBJ([fnmatch])
- gl_PREREQ_FNMATCH
-fi
-gl_FUNC_FNMATCH_GNU
-if test -n "$FNMATCH_H"; then
- AC_LIBOBJ([fnmatch])
- gl_PREREQ_FNMATCH
-fi
-gl_INTTYPES_H
-gl_INTTYPES_INCOMPLETE
-gl_LOCALCHARSET
-LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\""
-AC_SUBST([LOCALCHARSET_TESTS_ENVIRONMENT])
-gl_FUNC_MBRTOWC
-if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
- AC_LIBOBJ([mbrtowc])
- gl_PREREQ_MBRTOWC
-fi
-gl_WCHAR_MODULE_INDICATOR([mbrtowc])
-gl_FUNC_MBSINIT
-if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
- AC_LIBOBJ([mbsinit])
- gl_PREREQ_MBSINIT
-fi
-gl_WCHAR_MODULE_INDICATOR([mbsinit])
-gl_FUNC_MBSRTOWCS
-if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then
- AC_LIBOBJ([mbsrtowcs])
- AC_LIBOBJ([mbsrtowcs-state])
- gl_PREREQ_MBSRTOWCS
-fi
-gl_WCHAR_MODULE_INDICATOR([mbsrtowcs])
-gl_FUNC_MEMCHR
-if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
- AC_LIBOBJ([memchr])
- gl_PREREQ_MEMCHR
-fi
-gl_STRING_MODULE_INDICATOR([memchr])
-gl_FUNC_MEMMEM
-if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
- AC_LIBOBJ([memmem])
-fi
-gl_FUNC_MEMMEM_SIMPLE
-if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
- AC_LIBOBJ([memmem])
-fi
-gl_STRING_MODULE_INDICATOR([memmem])
-gl_MULTIARCH
-AM_STDBOOL_H
-gl_STDDEF_H
-gl_STDINT_H
-gl_HEADER_STRING_H
-gl_WCHAR_H
-gl_WCTYPE_H
+ gl_FUNC_ALLOCA
+ gl_CONFIGMAKE_PREP
+ gl_FUNC_FNMATCH_POSIX
+ if test -n "$FNMATCH_H"; then
+ AC_LIBOBJ([fnmatch])
+ gl_PREREQ_FNMATCH
+ fi
+ gl_FUNC_FNMATCH_GNU
+ if test -n "$FNMATCH_H"; then
+ AC_LIBOBJ([fnmatch])
+ gl_PREREQ_FNMATCH
+ fi
+ gl_INTTYPES_H
+ gl_INTTYPES_INCOMPLETE
+ gl_LOCALCHARSET
+ LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\""
+ AC_SUBST([LOCALCHARSET_TESTS_ENVIRONMENT])
+ gl_FUNC_MBRTOWC
+ if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
+ AC_LIBOBJ([mbrtowc])
+ gl_PREREQ_MBRTOWC
+ fi
+ gl_WCHAR_MODULE_INDICATOR([mbrtowc])
+ gl_FUNC_MBSINIT
+ if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
+ AC_LIBOBJ([mbsinit])
+ gl_PREREQ_MBSINIT
+ fi
+ gl_WCHAR_MODULE_INDICATOR([mbsinit])
+ gl_FUNC_MBSRTOWCS
+ if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then
+ AC_LIBOBJ([mbsrtowcs])
+ AC_LIBOBJ([mbsrtowcs-state])
+ gl_PREREQ_MBSRTOWCS
+ fi
+ gl_WCHAR_MODULE_INDICATOR([mbsrtowcs])
+ gl_FUNC_MEMCHR
+ if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
+ AC_LIBOBJ([memchr])
+ gl_PREREQ_MEMCHR
+ fi
+ gl_STRING_MODULE_INDICATOR([memchr])
+ gl_FUNC_MEMMEM
+ if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
+ AC_LIBOBJ([memmem])
+ fi
+ gl_FUNC_MEMMEM_SIMPLE
+ if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
+ AC_LIBOBJ([memmem])
+ fi
+ gl_STRING_MODULE_INDICATOR([memmem])
+ gl_MULTIARCH
+ AM_STDBOOL_H
+ gl_STDDEF_H
+ gl_STDINT_H
+ gl_HEADER_STRING_H
+ gl_WCHAR_H
+ gl_WCTYPE_H
# End of code from modules
m4_ifval(gl_LIBSOURCES_LIST, [
m4_syscmd([test ! -d ]m4_defn([gl_LIBSOURCES_DIR])[ ||
diff --git a/gdb/gnulib/import/stdbool.in.h b/gdb/gnulib/import/stdbool.in.h
index ed1f9aa..1f8caee 100644
--- a/gdb/gnulib/import/stdbool.in.h
+++ b/gdb/gnulib/import/stdbool.in.h
@@ -66,24 +66,19 @@
# undef true
#endif
-/* For the sake of symbolic names in gdb, we define true and false as
- enum constants, not only as macros.
- It is tempting to write
- typedef enum { false = 0, true = 1 } _Bool;
- so that gdb prints values of type 'bool' symbolically. But if we do
- this, values of type '_Bool' may promote to 'int' or 'unsigned int'
- (see ISO C 99 6.7.2.2.(4)); however, '_Bool' must promote to 'int'
- (see ISO C 99 6.3.1.1.(2)). So we add a negative value to the
- enum; this ensures that '_Bool' promotes to 'int'. */
-#if defined __cplusplus || (defined __BEOS__ && !defined __HAIKU__)
+#ifdef __cplusplus
+# define _Bool bool
+# define bool bool
+#else
+# if defined __BEOS__ && !defined __HAIKU__
/* A compiler known to have 'bool'. */
/* If the compiler already has both 'bool' and '_Bool', we can assume they
are the same types. */
-# if !@HAVE__BOOL@
+# if !@HAVE__BOOL@
typedef bool _Bool;
-# endif
-#else
-# if !defined __GNUC__
+# endif
+# else
+# if !defined __GNUC__
/* If @HAVE__BOOL@:
Some HP-UX cc and AIX IBM C compiler versions have compiler bugs when
the built-in _Bool type is used. See
@@ -103,19 +98,35 @@ typedef bool _Bool;
"Invalid enumerator. (badenum)" with HP-UX cc on Tru64.
The only benefit of the enum, debuggability, is not important
with these compilers. So use 'signed char' and no enum. */
-# define _Bool signed char
-# else
+# define _Bool signed char
+# else
/* With this compiler, trust the _Bool type if the compiler has it. */
-# if !@HAVE__BOOL@
+# if !@HAVE__BOOL@
+ /* For the sake of symbolic names in gdb, define true and false as
+ enum constants, not only as macros.
+ It is tempting to write
+ typedef enum { false = 0, true = 1 } _Bool;
+ so that gdb prints values of type 'bool' symbolically. But then
+ values of type '_Bool' might promote to 'int' or 'unsigned int'
+ (see ISO C 99 6.7.2.2.(4)); however, '_Bool' must promote to 'int'
+ (see ISO C 99 6.3.1.1.(2)). So add a negative value to the
+ enum; this ensures that '_Bool' promotes to 'int'. */
typedef enum { _Bool_must_promote_to_int = -1, false = 0, true = 1 } _Bool;
+# endif
# endif
# endif
+# define bool _Bool
#endif
-#define bool _Bool
/* The other macros must be usable in preprocessor directives. */
-#define false 0
-#define true 1
+#ifdef __cplusplus
+# define false false
+# define true true
+#else
+# define false 0
+# define true 1
+#endif
+
#define __bool_true_false_are_defined 1
#endif /* _GL_STDBOOL_H */
diff --git a/gdb/gnulib/import/verify.h b/gdb/gnulib/import/verify.h
index cef14ad..0c320b1 100644
--- a/gdb/gnulib/import/verify.h
+++ b/gdb/gnulib/import/verify.h
@@ -125,7 +125,7 @@
extern int (*dummy (void)) [sizeof (struct {...})];
* GCC warns about duplicate declarations of the dummy function if
- -Wredundant_decls is used. GCC 4.3 and later have a builtin
+ -Wredundant-decls is used. GCC 4.3 and later have a builtin
__COUNTER__ macro that can let us generate unique identifiers for
each dummy function, to suppress this warning.
@@ -133,6 +133,10 @@
which do not support _Static_assert, also do not warn about the
last declaration mentioned above.
+ * GCC warns if -Wnested-externs is enabled and verify() is used
+ within a function body; but inside a function, you can always
+ arrange to use verify_expr() instead.
+
* In C++, any struct definition inside sizeof is invalid.
Use a template type to work around the problem. */
diff --git a/gdb/gnulib/update-gnulib.sh b/gdb/gnulib/update-gnulib.sh
index 1bab512..2d9d0ac 100644
--- a/gdb/gnulib/update-gnulib.sh
+++ b/gdb/gnulib/update-gnulib.sh
@@ -32,7 +32,7 @@
IMPORTED_GNULIB_MODULES="fnmatch-gnu inttypes memmem update-copyright"
# The gnulib commit ID to use for the update.
-GNULIB_COMMIT_SHA1="a39f53ccb70a613e647e1019fb4c63645220267e"
+GNULIB_COMMIT_SHA1="daf7f8c02242c535d596231e2f655109b97fa2bc"
# The expected version number for the various auto tools we will
# use after the import.
--
1.7.10.4
More information about the Gdb-patches
mailing list