From 4a626d0a0f451c3288a461f64a9f8a49790d422b Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Mon, 24 Aug 2015 18:50:00 +0100 Subject: [PATCH] Update gnulib to current upstream master 2015-08-24 Pedro Alves * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to 1029a8112290f6eee9d7878a391c49db42c999bd. * gnulib/configure, gnulib/config.in, gnulib/aclocal.m4: Regenerate. * gnulib/import/Makefile.am: Update. * gnulib/import/Makefile.in: Update. * gnulib/import/alloca.in.h: Update. * gnulib/import/basename-lgpl.c: Update. * gnulib/import/canonicalize-lgpl.c: Update. * gnulib/import/config.charset: Update. * gnulib/import/dirent.in.h: Update. * gnulib/import/dirfd.c: Update. * gnulib/import/dirname-lgpl.c: Update. * gnulib/import/dirname.h: Update. * gnulib/import/dosname.h: Update. * gnulib/import/errno.in.h: Update. * gnulib/import/extra/snippet/arg-nonnull.h: Update. * gnulib/import/extra/snippet/c++defs.h: Update. * gnulib/import/extra/snippet/warn-on-use.h: Update. * gnulib/import/extra/update-copyright: Update. * gnulib/import/float+.h: Update. * gnulib/import/float.c: Update. * gnulib/import/float.in.h: Update. * gnulib/import/fnmatch.c: Update. * gnulib/import/fnmatch.in.h: Update. * gnulib/import/fnmatch_loop.c: Update. * gnulib/import/fpucw.h: Update. * gnulib/import/frexp.c: Update. * gnulib/import/frexpl.c: Update. * gnulib/import/gettimeofday.c: Update. * gnulib/import/inttypes.in.h: Update. * gnulib/import/isnan.c: Update. * gnulib/import/isnand-nolibm.h: Update. * gnulib/import/isnand.c: Update. * gnulib/import/isnanl-nolibm.h: Update. * gnulib/import/isnanl.c: Update. * gnulib/import/itold.c: Update. * gnulib/import/localcharset.c: Update. * gnulib/import/localcharset.h: Update. * gnulib/import/lstat.c: Update. * gnulib/import/m4/00gnulib.m4: Update. * gnulib/import/m4/absolute-header.m4: Update. * gnulib/import/m4/alloca.m4: Update. * gnulib/import/m4/canonicalize.m4: Update. * gnulib/import/m4/codeset.m4: Update. * gnulib/import/m4/configmake.m4: Update. * gnulib/import/m4/dirent_h.m4: Update. * gnulib/import/m4/dirfd.m4: Update. * gnulib/import/m4/dirname.m4: Update. * gnulib/import/m4/double-slash-root.m4: Update. * gnulib/import/m4/eealloc.m4: Update. * gnulib/import/m4/errno_h.m4: Update. * gnulib/import/m4/exponentd.m4: Update. * gnulib/import/m4/exponentl.m4: Update. * gnulib/import/m4/extensions.m4: Update. * gnulib/import/m4/extern-inline.m4: Update. * gnulib/import/m4/fcntl-o.m4: Update. * gnulib/import/m4/float_h.m4: Update. * gnulib/import/m4/fnmatch.m4: Update. * gnulib/import/m4/fpieee.m4: Update. * gnulib/import/m4/frexp.m4: Update. * gnulib/import/m4/frexpl.m4: Update. * gnulib/import/m4/gettimeofday.m4: Update. * gnulib/import/m4/glibc21.m4: Update. * gnulib/import/m4/gnulib-cache.m4: Update. * gnulib/import/m4/gnulib-common.m4: Update. * gnulib/import/m4/gnulib-comp.m4: Update. * gnulib/import/m4/gnulib-tool.m4: Update. * gnulib/import/m4/include_next.m4: Update. * gnulib/import/m4/inttypes-pri.m4: Update. * gnulib/import/m4/inttypes.m4: Update. * gnulib/import/m4/isnand.m4: Update. * gnulib/import/m4/isnanl.m4: Update. * gnulib/import/m4/largefile.m4: Update. * gnulib/import/m4/localcharset.m4: Update. * gnulib/import/m4/locale-fr.m4: Update. * gnulib/import/m4/locale-ja.m4: Update. * gnulib/import/m4/locale-zh.m4: Update. * gnulib/import/m4/longlong.m4: Update. * gnulib/import/m4/lstat.m4: Update. * gnulib/import/m4/malloc.m4: Update. * gnulib/import/m4/malloca.m4: Update. * gnulib/import/m4/math_h.m4: Update. * gnulib/import/m4/mbrtowc.m4: Update. * gnulib/import/m4/mbsinit.m4: Update. * gnulib/import/m4/mbsrtowcs.m4: Update. * gnulib/import/m4/mbstate_t.m4: Update. * gnulib/import/m4/memchr.m4: Update. * gnulib/import/m4/memmem.m4: Update. * gnulib/import/m4/mmap-anon.m4: Update. * gnulib/import/m4/multiarch.m4: Update. * gnulib/import/m4/nocrash.m4: Update. * gnulib/import/m4/off_t.m4: Update. * gnulib/import/m4/pathmax.m4: Update. * gnulib/import/m4/readlink.m4: Update. * gnulib/import/m4/rename.m4: Update. * gnulib/import/m4/rmdir.m4: Update. * gnulib/import/m4/ssize_t.m4: Update. * gnulib/import/m4/stat.m4: Update. * gnulib/import/m4/stdbool.m4: Update. * gnulib/import/m4/stddef_h.m4: Update. * gnulib/import/m4/stdint.m4: Update. * gnulib/import/m4/stdio_h.m4: Update. * gnulib/import/m4/stdlib_h.m4: Update. * gnulib/import/m4/string_h.m4: Update. * gnulib/import/m4/strstr.m4: Update. * gnulib/import/m4/strtok_r.m4: Update. * gnulib/import/m4/sys_socket_h.m4: Update. * gnulib/import/m4/sys_stat_h.m4: Update. * gnulib/import/m4/sys_time_h.m4: Update. * gnulib/import/m4/sys_types_h.m4: Update. * gnulib/import/m4/time_h.m4: Update. * gnulib/import/m4/unistd_h.m4: Update. * gnulib/import/m4/warn-on-use.m4: Update. * gnulib/import/m4/wchar_h.m4: Update. * gnulib/import/m4/wchar_t.m4: Update. * gnulib/import/m4/wctype_h.m4: Update. * gnulib/import/m4/wint_t.m4: Update. * gnulib/import/malloc.c: Update. * gnulib/import/malloca.c: Update. * gnulib/import/malloca.h: Update. * gnulib/import/math.in.h: Update. * gnulib/import/mbrtowc.c: Update. * gnulib/import/mbsinit.c: Update. * gnulib/import/mbsrtowcs-impl.h: Update. * gnulib/import/mbsrtowcs-state.c: Update. * gnulib/import/mbsrtowcs.c: Update. * gnulib/import/memchr.c: Update. * gnulib/import/memmem.c: Update. * gnulib/import/pathmax.h: Update. * gnulib/import/readlink.c: Update. * gnulib/import/ref-add.sin: Update. * gnulib/import/ref-del.sin: Update. * gnulib/import/rename.c: Update. * gnulib/import/rmdir.c: Update. * gnulib/import/same-inode.h: Update. * gnulib/import/stat.c: Update. * gnulib/import/stdbool.in.h: Update. * gnulib/import/stddef.in.h: Update. * gnulib/import/stdint.in.h: Update. * gnulib/import/stdio.c: Update. * gnulib/import/stdio.in.h: Update. * gnulib/import/stdlib.in.h: Update. * gnulib/import/str-two-way.h: Update. * gnulib/import/streq.h: Update. * gnulib/import/string.in.h: Update. * gnulib/import/stripslash.c: Update. * gnulib/import/strnlen1.c: Update. * gnulib/import/strnlen1.h: Update. * gnulib/import/strstr.c: Update. * gnulib/import/strtok_r.c: Update. * gnulib/import/sys_stat.in.h: Update. * gnulib/import/sys_time.in.h: Update. * gnulib/import/sys_types.in.h: Update. * gnulib/import/time.in.h: Update. * gnulib/import/unistd.in.h: Update. * gnulib/import/verify.h: Update. * gnulib/import/wchar.in.h: Update. * gnulib/import/wctype.in.h: Update. * gnulib/import/gettimeofday.c: New file. * gnulib/import/m4/absolute-header.m4: New file. * gnulib/import/m4/gettimeofday.m4: New file. * gnulib/import/m4/sys_socket_h.m4: New file. * gnulib/import/m4/sys_time_h.m4: New file. * gnulib/import/stdio.c: Delete file. * gnulib/import/sys_time.in.h: New file. --- gdb/ChangeLog | 169 ++ gdb/gnulib/aclocal.m4 | 4 + gdb/gnulib/config.in | 205 +- gdb/gnulib/configure | 2137 +++++++++++------ gdb/gnulib/import/Makefile.am | 75 +- gdb/gnulib/import/Makefile.in | 129 +- gdb/gnulib/import/alloca.in.h | 2 +- gdb/gnulib/import/basename-lgpl.c | 2 +- gdb/gnulib/import/canonicalize-lgpl.c | 10 +- gdb/gnulib/import/config.charset | 6 +- gdb/gnulib/import/dirent.in.h | 4 +- gdb/gnulib/import/dirfd.c | 2 +- gdb/gnulib/import/dirname-lgpl.c | 2 +- gdb/gnulib/import/dirname.h | 10 +- gdb/gnulib/import/dosname.h | 2 +- gdb/gnulib/import/errno.in.h | 2 +- gdb/gnulib/import/extra/snippet/arg-nonnull.h | 2 +- gdb/gnulib/import/extra/snippet/c++defs.h | 2 +- gdb/gnulib/import/extra/snippet/warn-on-use.h | 2 +- gdb/gnulib/import/extra/update-copyright | 8 +- gdb/gnulib/import/float+.h | 2 +- gdb/gnulib/import/float.c | 2 +- gdb/gnulib/import/float.in.h | 2 +- gdb/gnulib/import/fnmatch.c | 2 +- gdb/gnulib/import/fnmatch.in.h | 2 +- gdb/gnulib/import/fnmatch_loop.c | 6 +- gdb/gnulib/import/fpucw.h | 2 +- gdb/gnulib/import/frexp.c | 2 +- gdb/gnulib/import/frexpl.c | 2 +- gdb/gnulib/import/gettimeofday.c | 154 ++ gdb/gnulib/import/inttypes.in.h | 22 +- gdb/gnulib/import/isnan.c | 20 +- gdb/gnulib/import/isnand-nolibm.h | 2 +- gdb/gnulib/import/isnand.c | 2 +- gdb/gnulib/import/isnanl-nolibm.h | 2 +- gdb/gnulib/import/isnanl.c | 2 +- gdb/gnulib/import/itold.c | 2 +- gdb/gnulib/import/localcharset.c | 88 +- gdb/gnulib/import/localcharset.h | 2 +- gdb/gnulib/import/lstat.c | 2 +- gdb/gnulib/import/m4/00gnulib.m4 | 22 +- gdb/gnulib/import/m4/absolute-header.m4 | 102 + gdb/gnulib/import/m4/alloca.m4 | 2 +- gdb/gnulib/import/m4/canonicalize.m4 | 2 +- gdb/gnulib/import/m4/codeset.m4 | 2 +- gdb/gnulib/import/m4/configmake.m4 | 13 +- gdb/gnulib/import/m4/dirent_h.m4 | 2 +- gdb/gnulib/import/m4/dirfd.m4 | 2 +- gdb/gnulib/import/m4/dirname.m4 | 2 +- gdb/gnulib/import/m4/double-slash-root.m4 | 2 +- gdb/gnulib/import/m4/eealloc.m4 | 2 +- gdb/gnulib/import/m4/errno_h.m4 | 2 +- gdb/gnulib/import/m4/exponentd.m4 | 2 +- gdb/gnulib/import/m4/exponentl.m4 | 2 +- gdb/gnulib/import/m4/extensions.m4 | 56 +- gdb/gnulib/import/m4/extern-inline.m4 | 79 +- gdb/gnulib/import/m4/fcntl-o.m4 | 2 +- gdb/gnulib/import/m4/float_h.m4 | 2 +- gdb/gnulib/import/m4/fnmatch.m4 | 2 +- gdb/gnulib/import/m4/fpieee.m4 | 2 +- gdb/gnulib/import/m4/frexp.m4 | 12 +- gdb/gnulib/import/m4/frexpl.m4 | 2 +- gdb/gnulib/import/m4/gettimeofday.m4 | 138 ++ gdb/gnulib/import/m4/glibc21.m4 | 2 +- gdb/gnulib/import/m4/gnulib-cache.m4 | 2 +- gdb/gnulib/import/m4/gnulib-common.m4 | 126 +- gdb/gnulib/import/m4/gnulib-comp.m4 | 20 +- gdb/gnulib/import/m4/gnulib-tool.m4 | 2 +- gdb/gnulib/import/m4/include_next.m4 | 55 +- gdb/gnulib/import/m4/inttypes-pri.m4 | 2 +- gdb/gnulib/import/m4/inttypes.m4 | 3 +- gdb/gnulib/import/m4/isnand.m4 | 2 +- gdb/gnulib/import/m4/isnanl.m4 | 43 +- gdb/gnulib/import/m4/largefile.m4 | 25 +- gdb/gnulib/import/m4/localcharset.m4 | 2 +- gdb/gnulib/import/m4/locale-fr.m4 | 2 +- gdb/gnulib/import/m4/locale-ja.m4 | 2 +- gdb/gnulib/import/m4/locale-zh.m4 | 2 +- gdb/gnulib/import/m4/longlong.m4 | 2 +- gdb/gnulib/import/m4/lstat.m4 | 50 +- gdb/gnulib/import/m4/malloc.m4 | 2 +- gdb/gnulib/import/m4/malloca.m4 | 2 +- gdb/gnulib/import/m4/math_h.m4 | 2 +- gdb/gnulib/import/m4/mbrtowc.m4 | 48 +- gdb/gnulib/import/m4/mbsinit.m4 | 2 +- gdb/gnulib/import/m4/mbsrtowcs.m4 | 2 +- gdb/gnulib/import/m4/mbstate_t.m4 | 2 +- gdb/gnulib/import/m4/memchr.m4 | 2 +- gdb/gnulib/import/m4/memmem.m4 | 2 +- gdb/gnulib/import/m4/mmap-anon.m4 | 2 +- gdb/gnulib/import/m4/multiarch.m4 | 2 +- gdb/gnulib/import/m4/nocrash.m4 | 2 +- gdb/gnulib/import/m4/off_t.m4 | 2 +- gdb/gnulib/import/m4/pathmax.m4 | 2 +- gdb/gnulib/import/m4/readlink.m4 | 2 +- gdb/gnulib/import/m4/rename.m4 | 2 +- gdb/gnulib/import/m4/rmdir.m4 | 2 +- gdb/gnulib/import/m4/ssize_t.m4 | 2 +- gdb/gnulib/import/m4/stat.m4 | 2 +- gdb/gnulib/import/m4/stdbool.m4 | 2 +- gdb/gnulib/import/m4/stddef_h.m4 | 10 +- gdb/gnulib/import/m4/stdint.m4 | 2 +- gdb/gnulib/import/m4/stdio_h.m4 | 31 +- gdb/gnulib/import/m4/stdlib_h.m4 | 10 +- gdb/gnulib/import/m4/string_h.m4 | 2 +- gdb/gnulib/import/m4/strstr.m4 | 2 +- gdb/gnulib/import/m4/strtok_r.m4 | 2 +- gdb/gnulib/import/m4/sys_socket_h.m4 | 176 ++ gdb/gnulib/import/m4/sys_stat_h.m4 | 2 +- gdb/gnulib/import/m4/sys_time_h.m4 | 111 + gdb/gnulib/import/m4/sys_types_h.m4 | 6 +- gdb/gnulib/import/m4/time_h.m4 | 31 +- gdb/gnulib/import/m4/unistd_h.m4 | 7 +- gdb/gnulib/import/m4/warn-on-use.m4 | 2 +- gdb/gnulib/import/m4/wchar_h.m4 | 2 +- gdb/gnulib/import/m4/wchar_t.m4 | 2 +- gdb/gnulib/import/m4/wctype_h.m4 | 2 +- gdb/gnulib/import/m4/wint_t.m4 | 2 +- gdb/gnulib/import/malloc.c | 2 +- gdb/gnulib/import/malloca.c | 31 +- gdb/gnulib/import/malloca.h | 4 +- gdb/gnulib/import/math.in.h | 5 +- gdb/gnulib/import/mbrtowc.c | 9 +- gdb/gnulib/import/mbsinit.c | 2 +- gdb/gnulib/import/mbsrtowcs-impl.h | 2 +- gdb/gnulib/import/mbsrtowcs-state.c | 2 +- gdb/gnulib/import/mbsrtowcs.c | 2 +- gdb/gnulib/import/memchr.c | 2 +- gdb/gnulib/import/memmem.c | 2 +- gdb/gnulib/import/pathmax.h | 2 +- gdb/gnulib/import/readlink.c | 2 +- gdb/gnulib/import/ref-add.sin | 2 +- gdb/gnulib/import/ref-del.sin | 2 +- gdb/gnulib/import/rename.c | 8 +- gdb/gnulib/import/rmdir.c | 2 +- gdb/gnulib/import/same-inode.h | 2 +- gdb/gnulib/import/stat.c | 2 +- gdb/gnulib/import/stdbool.in.h | 2 +- gdb/gnulib/import/stddef.in.h | 54 +- gdb/gnulib/import/stdint.in.h | 5 +- gdb/gnulib/import/stdio.c | 3 - gdb/gnulib/import/stdio.in.h | 56 +- gdb/gnulib/import/stdlib.in.h | 46 +- gdb/gnulib/import/str-two-way.h | 2 +- gdb/gnulib/import/streq.h | 2 +- gdb/gnulib/import/string.in.h | 23 +- gdb/gnulib/import/stripslash.c | 2 +- gdb/gnulib/import/strnlen1.c | 2 +- gdb/gnulib/import/strnlen1.h | 2 +- gdb/gnulib/import/strstr.c | 2 +- gdb/gnulib/import/strtok_r.c | 2 +- gdb/gnulib/import/sys_stat.in.h | 6 +- gdb/gnulib/import/sys_time.in.h | 213 ++ gdb/gnulib/import/sys_types.in.h | 4 +- gdb/gnulib/import/time.in.h | 75 +- gdb/gnulib/import/unistd.in.h | 91 +- gdb/gnulib/import/verify.h | 136 +- gdb/gnulib/import/wchar.in.h | 11 +- gdb/gnulib/import/wctype.in.h | 12 +- gdb/gnulib/update-gnulib.sh | 2 +- 160 files changed, 3915 insertions(+), 1302 deletions(-) mode change 100644 => 100755 gdb/gnulib/import/extra/update-copyright create mode 100644 gdb/gnulib/import/gettimeofday.c create mode 100644 gdb/gnulib/import/m4/absolute-header.m4 create mode 100644 gdb/gnulib/import/m4/gettimeofday.m4 create mode 100644 gdb/gnulib/import/m4/sys_socket_h.m4 create mode 100644 gdb/gnulib/import/m4/sys_time_h.m4 delete mode 100644 gdb/gnulib/import/stdio.c create mode 100644 gdb/gnulib/import/sys_time.in.h diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 02d1b15355..ac65a2186a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,172 @@ +2015-08-24 Pedro Alves + + * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to + 1029a8112290f6eee9d7878a391c49db42c999bd. + * gnulib/configure, gnulib/config.in, gnulib/aclocal.m4: + Regenerate. + * gnulib/import/Makefile.am: Update. + * gnulib/import/Makefile.in: Update. + * gnulib/import/alloca.in.h: Update. + * gnulib/import/basename-lgpl.c: Update. + * gnulib/import/canonicalize-lgpl.c: Update. + * gnulib/import/config.charset: Update. + * gnulib/import/dirent.in.h: Update. + * gnulib/import/dirfd.c: Update. + * gnulib/import/dirname-lgpl.c: Update. + * gnulib/import/dirname.h: Update. + * gnulib/import/dosname.h: Update. + * gnulib/import/errno.in.h: Update. + * gnulib/import/extra/snippet/arg-nonnull.h: Update. + * gnulib/import/extra/snippet/c++defs.h: Update. + * gnulib/import/extra/snippet/warn-on-use.h: Update. + * gnulib/import/extra/update-copyright: Update. + * gnulib/import/float+.h: Update. + * gnulib/import/float.c: Update. + * gnulib/import/float.in.h: Update. + * gnulib/import/fnmatch.c: Update. + * gnulib/import/fnmatch.in.h: Update. + * gnulib/import/fnmatch_loop.c: Update. + * gnulib/import/fpucw.h: Update. + * gnulib/import/frexp.c: Update. + * gnulib/import/frexpl.c: Update. + * gnulib/import/gettimeofday.c: Update. + * gnulib/import/inttypes.in.h: Update. + * gnulib/import/isnan.c: Update. + * gnulib/import/isnand-nolibm.h: Update. + * gnulib/import/isnand.c: Update. + * gnulib/import/isnanl-nolibm.h: Update. + * gnulib/import/isnanl.c: Update. + * gnulib/import/itold.c: Update. + * gnulib/import/localcharset.c: Update. + * gnulib/import/localcharset.h: Update. + * gnulib/import/lstat.c: Update. + * gnulib/import/m4/00gnulib.m4: Update. + * gnulib/import/m4/absolute-header.m4: Update. + * gnulib/import/m4/alloca.m4: Update. + * gnulib/import/m4/canonicalize.m4: Update. + * gnulib/import/m4/codeset.m4: Update. + * gnulib/import/m4/configmake.m4: Update. + * gnulib/import/m4/dirent_h.m4: Update. + * gnulib/import/m4/dirfd.m4: Update. + * gnulib/import/m4/dirname.m4: Update. + * gnulib/import/m4/double-slash-root.m4: Update. + * gnulib/import/m4/eealloc.m4: Update. + * gnulib/import/m4/errno_h.m4: Update. + * gnulib/import/m4/exponentd.m4: Update. + * gnulib/import/m4/exponentl.m4: Update. + * gnulib/import/m4/extensions.m4: Update. + * gnulib/import/m4/extern-inline.m4: Update. + * gnulib/import/m4/fcntl-o.m4: Update. + * gnulib/import/m4/float_h.m4: Update. + * gnulib/import/m4/fnmatch.m4: Update. + * gnulib/import/m4/fpieee.m4: Update. + * gnulib/import/m4/frexp.m4: Update. + * gnulib/import/m4/frexpl.m4: Update. + * gnulib/import/m4/gettimeofday.m4: Update. + * gnulib/import/m4/glibc21.m4: Update. + * gnulib/import/m4/gnulib-cache.m4: Update. + * gnulib/import/m4/gnulib-common.m4: Update. + * gnulib/import/m4/gnulib-comp.m4: Update. + * gnulib/import/m4/gnulib-tool.m4: Update. + * gnulib/import/m4/include_next.m4: Update. + * gnulib/import/m4/inttypes-pri.m4: Update. + * gnulib/import/m4/inttypes.m4: Update. + * gnulib/import/m4/isnand.m4: Update. + * gnulib/import/m4/isnanl.m4: Update. + * gnulib/import/m4/largefile.m4: Update. + * gnulib/import/m4/localcharset.m4: Update. + * gnulib/import/m4/locale-fr.m4: Update. + * gnulib/import/m4/locale-ja.m4: Update. + * gnulib/import/m4/locale-zh.m4: Update. + * gnulib/import/m4/longlong.m4: Update. + * gnulib/import/m4/lstat.m4: Update. + * gnulib/import/m4/malloc.m4: Update. + * gnulib/import/m4/malloca.m4: Update. + * gnulib/import/m4/math_h.m4: Update. + * gnulib/import/m4/mbrtowc.m4: Update. + * gnulib/import/m4/mbsinit.m4: Update. + * gnulib/import/m4/mbsrtowcs.m4: Update. + * gnulib/import/m4/mbstate_t.m4: Update. + * gnulib/import/m4/memchr.m4: Update. + * gnulib/import/m4/memmem.m4: Update. + * gnulib/import/m4/mmap-anon.m4: Update. + * gnulib/import/m4/multiarch.m4: Update. + * gnulib/import/m4/nocrash.m4: Update. + * gnulib/import/m4/off_t.m4: Update. + * gnulib/import/m4/pathmax.m4: Update. + * gnulib/import/m4/readlink.m4: Update. + * gnulib/import/m4/rename.m4: Update. + * gnulib/import/m4/rmdir.m4: Update. + * gnulib/import/m4/ssize_t.m4: Update. + * gnulib/import/m4/stat.m4: Update. + * gnulib/import/m4/stdbool.m4: Update. + * gnulib/import/m4/stddef_h.m4: Update. + * gnulib/import/m4/stdint.m4: Update. + * gnulib/import/m4/stdio_h.m4: Update. + * gnulib/import/m4/stdlib_h.m4: Update. + * gnulib/import/m4/string_h.m4: Update. + * gnulib/import/m4/strstr.m4: Update. + * gnulib/import/m4/strtok_r.m4: Update. + * gnulib/import/m4/sys_socket_h.m4: Update. + * gnulib/import/m4/sys_stat_h.m4: Update. + * gnulib/import/m4/sys_time_h.m4: Update. + * gnulib/import/m4/sys_types_h.m4: Update. + * gnulib/import/m4/time_h.m4: Update. + * gnulib/import/m4/unistd_h.m4: Update. + * gnulib/import/m4/warn-on-use.m4: Update. + * gnulib/import/m4/wchar_h.m4: Update. + * gnulib/import/m4/wchar_t.m4: Update. + * gnulib/import/m4/wctype_h.m4: Update. + * gnulib/import/m4/wint_t.m4: Update. + * gnulib/import/malloc.c: Update. + * gnulib/import/malloca.c: Update. + * gnulib/import/malloca.h: Update. + * gnulib/import/math.in.h: Update. + * gnulib/import/mbrtowc.c: Update. + * gnulib/import/mbsinit.c: Update. + * gnulib/import/mbsrtowcs-impl.h: Update. + * gnulib/import/mbsrtowcs-state.c: Update. + * gnulib/import/mbsrtowcs.c: Update. + * gnulib/import/memchr.c: Update. + * gnulib/import/memmem.c: Update. + * gnulib/import/pathmax.h: Update. + * gnulib/import/readlink.c: Update. + * gnulib/import/ref-add.sin: Update. + * gnulib/import/ref-del.sin: Update. + * gnulib/import/rename.c: Update. + * gnulib/import/rmdir.c: Update. + * gnulib/import/same-inode.h: Update. + * gnulib/import/stat.c: Update. + * gnulib/import/stdbool.in.h: Update. + * gnulib/import/stddef.in.h: Update. + * gnulib/import/stdint.in.h: Update. + * gnulib/import/stdio.c: Update. + * gnulib/import/stdio.in.h: Update. + * gnulib/import/stdlib.in.h: Update. + * gnulib/import/str-two-way.h: Update. + * gnulib/import/streq.h: Update. + * gnulib/import/string.in.h: Update. + * gnulib/import/stripslash.c: Update. + * gnulib/import/strnlen1.c: Update. + * gnulib/import/strnlen1.h: Update. + * gnulib/import/strstr.c: Update. + * gnulib/import/strtok_r.c: Update. + * gnulib/import/sys_stat.in.h: Update. + * gnulib/import/sys_time.in.h: Update. + * gnulib/import/sys_types.in.h: Update. + * gnulib/import/time.in.h: Update. + * gnulib/import/unistd.in.h: Update. + * gnulib/import/verify.h: Update. + * gnulib/import/wchar.in.h: Update. + * gnulib/import/wctype.in.h: Update. + * gnulib/import/gettimeofday.c: New file. + * gnulib/import/m4/absolute-header.m4: New file. + * gnulib/import/m4/gettimeofday.m4: New file. + * gnulib/import/m4/sys_socket_h.m4: New file. + * gnulib/import/m4/sys_time_h.m4: New file. + * gnulib/import/stdio.c: Delete file. + * gnulib/import/sys_time.in.h: New file. + 2015-08-24 Pedro Alves * Makefile.in (HFILES_NO_SRCDIR): Add common/gdb_sys_time.h. diff --git a/gdb/gnulib/aclocal.m4 b/gdb/gnulib/aclocal.m4 index 8341de947f..47ced16823 100644 --- a/gdb/gnulib/aclocal.m4 +++ b/gdb/gnulib/aclocal.m4 @@ -1013,6 +1013,7 @@ AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([import/m4/00gnulib.m4]) +m4_include([import/m4/absolute-header.m4]) m4_include([import/m4/alloca.m4]) m4_include([import/m4/canonicalize.m4]) m4_include([import/m4/codeset.m4]) @@ -1033,6 +1034,7 @@ m4_include([import/m4/fnmatch.m4]) m4_include([import/m4/fpieee.m4]) m4_include([import/m4/frexp.m4]) m4_include([import/m4/frexpl.m4]) +m4_include([import/m4/gettimeofday.m4]) m4_include([import/m4/glibc21.m4]) m4_include([import/m4/gnulib-common.m4]) m4_include([import/m4/gnulib-comp.m4]) @@ -1075,7 +1077,9 @@ m4_include([import/m4/stdlib_h.m4]) m4_include([import/m4/string_h.m4]) m4_include([import/m4/strstr.m4]) m4_include([import/m4/strtok_r.m4]) +m4_include([import/m4/sys_socket_h.m4]) m4_include([import/m4/sys_stat_h.m4]) +m4_include([import/m4/sys_time_h.m4]) m4_include([import/m4/sys_types_h.m4]) m4_include([import/m4/time_h.m4]) m4_include([import/m4/unistd_h.m4]) diff --git a/gdb/gnulib/config.in b/gdb/gnulib/config.in index 8201b6d6e6..048b9a7ab7 100644 --- a/gdb/gnulib/config.in +++ b/gdb/gnulib/config.in @@ -50,6 +50,13 @@ and handles trailing slash correctly. */ #undef FUNC_REALPATH_WORKS +/* Define if gettimeofday clobbers the localtime buffer. */ +#undef GETTIMEOFDAY_CLOBBERS_LOCALTIME + +/* Define this to 'void' or 'struct timezone' to match the system's + declaration of the second argument to gettimeofday. */ +#undef GETTIMEOFDAY_TIMEZONE + /* Define to a C preprocessor expression that evaluates to 1 or 0, depending whether the gnulib module canonicalize-lgpl shall be considered present. */ #undef GNULIB_CANONICALIZE_LGPL @@ -58,6 +65,10 @@ whether the gnulib module fscanf shall be considered present. */ #undef GNULIB_FSCANF +/* Define to 1 if printf and friends should be labeled with attribute + "__gnu_printf__" instead of "__printf__" */ +#undef GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU + /* Define to a C preprocessor expression that evaluates to 1 or 0, depending whether the gnulib module scanf shall be considered present. */ #undef GNULIB_SCANF @@ -78,6 +89,9 @@ /* Define to 1 when the gnulib module frexpl should be tested. */ #undef GNULIB_TEST_FREXPL +/* Define to 1 when the gnulib module gettimeofday should be tested. */ +#undef GNULIB_TEST_GETTIMEOFDAY + /* Define to 1 when the gnulib module lstat should be tested. */ #undef GNULIB_TEST_LSTAT @@ -120,9 +134,6 @@ /* Define to 1 when the gnulib module strtok_r should be tested. */ #undef GNULIB_TEST_STRTOK_R -/* Define to 1 if you have the `alarm' function. */ -#undef HAVE_ALARM - /* Define to 1 if you have 'alloca' after including , a header that may be supplied by this distribution. */ #undef HAVE_ALLOCA @@ -140,6 +151,10 @@ /* Define to 1 if you have the `canonicalize_file_name' function. */ #undef HAVE_CANONICALIZE_FILE_NAME +/* Define to 1 if you have the declaration of `alarm', and to 0 if you don't. + */ +#undef HAVE_DECL_ALARM + /* Define to 1 if you have the declaration of `dirfd', and to 0 if you don't. */ #undef HAVE_DECL_DIRFD @@ -194,6 +209,9 @@ /* Define to 1 if you have the `getcwd' function. */ #undef HAVE_GETCWD +/* Define to 1 if you have the `gettimeofday' function. */ +#undef HAVE_GETTIMEOFDAY + /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H @@ -502,6 +520,9 @@ /* Define to 1 if getsubopt is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETSUBOPT +/* Define to 1 if gettimeofday is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_GETTIMEOFDAY + /* Define to 1 if getusershell is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETUSERSHELL @@ -772,6 +793,9 @@ /* Define to 1 if scandir is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SCANDIR +/* Define to 1 if secure_getenv is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_SECURE_GETENV + /* Define to 1 if setenv is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SETENV @@ -1087,9 +1111,15 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_PARAM_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SOCKET_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TIMEB_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H @@ -1114,6 +1144,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_WCTYPE_H +/* Define to 1 if you have the header file. */ +#undef HAVE_WINSOCK2_H + /* Define if you have the 'wint_t' type. */ #undef HAVE_WINT_T @@ -1135,6 +1168,9 @@ /* Define to 1 if the system has the type `_Bool'. */ #undef HAVE__BOOL +/* Define to 1 if you have the `_ftime' function. */ +#undef HAVE__FTIME + /* Define as the bit index in the word where to find bit 0 of the exponent of 'long double'. */ #undef LDBL_EXPBIT0_BIT @@ -1152,6 +1188,10 @@ /* Define to a substitute value for mmap()'s MAP_ANONYMOUS flag. */ #undef MAP_ANONYMOUS +/* Define if the mbrtowc function does not return (size_t) -2 for empty input. + */ +#undef MBRTOWC_EMPTY_INPUT_BUG + /* Define if the mbrtowc function has the NULL pwc argument bug. */ #undef MBRTOWC_NULL_ARG1_BUG @@ -1238,6 +1278,42 @@ /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# undef _ALL_SOURCE +#endif +/* Enable general extensions on OS X. */ +#ifndef _DARWIN_C_SOURCE +# undef _DARWIN_C_SOURCE +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# undef _GNU_SOURCE +#endif +/* Use GNU style printf and scanf. */ +#ifndef __USE_MINGW_ANSI_STDIO +# undef __USE_MINGW_ANSI_STDIO +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# undef _POSIX_PTHREAD_SEMANTICS +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# undef _TANDEM_SOURCE +#endif +/* Enable X/Open extensions if necessary. HP-UX 11.11 defines + mbstate_t only if _XOPEN_SOURCE is defined to 500, regardless of + whether compiling with -Ae or -D_HPUX_SOURCE=1. */ +#ifndef _XOPEN_SOURCE +# undef _XOPEN_SOURCE +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# undef __EXTENSIONS__ +#endif + + /* Define to l, ll, u, ul, ull, etc., as suitable for constants of type 'wchar_t'. */ #undef WCHAR_T_SUFFIX @@ -1258,10 +1334,8 @@ # endif #endif -/* Enable large inode numbers on Mac OS X. */ -#ifndef _DARWIN_USE_64_BIT_INODE -# define _DARWIN_USE_64_BIT_INODE 1 -#endif +/* Enable large inode numbers on Mac OS X 10.5. */ +#undef _DARWIN_USE_64_BIT_INODE /* Number of bits in a file offset, on hosts where this is settable. */ #undef _FILE_OFFSET_BITS @@ -1276,6 +1350,9 @@ /* Define to 1 if on MINIX. */ #undef _MINIX +/* Define to 1 to make NetBSD features available. MINIX 3 needs this. */ +#undef _NETBSD_SOURCE + /* The _Noreturn keyword of C11. */ #if ! (defined _Noreturn \ || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__)) @@ -1297,69 +1374,79 @@ /* Define to 1 if you need to in order for 'stat' and other things to work. */ #undef _POSIX_SOURCE -/* Define to 500 only on HP-UX. */ -#undef _XOPEN_SOURCE - -/* Enable extensions on AIX 3, Interix. */ -#ifndef _ALL_SOURCE -# undef _ALL_SOURCE -#endif -/* Enable general extensions on Mac OS X. */ -#ifndef _DARWIN_C_SOURCE -# undef _DARWIN_C_SOURCE -#endif -/* Enable GNU extensions on systems that have them. */ -#ifndef _GNU_SOURCE -# undef _GNU_SOURCE -#endif -/* Enable threading extensions on Solaris. */ -#ifndef _POSIX_PTHREAD_SEMANTICS -# undef _POSIX_PTHREAD_SEMANTICS -#endif -/* Enable extensions on HP NonStop. */ -#ifndef _TANDEM_SOURCE -# undef _TANDEM_SOURCE +/* Please see the Gnulib manual for how to use these macros. + + Suppress extern inline with HP-UX cc, as it appears to be broken; see + . + + Suppress extern inline with Sun C in standards-conformance mode, as it + mishandles inline functions that call each other. E.g., for 'inline void f + (void) { } inline void g (void) { f (); }', c99 incorrectly complains + 'reference to static identifier "f" in extern inline function'. + This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16. + + Suppress extern inline (with or without __attribute__ ((__gnu_inline__))) + on configurations that mistakenly use 'static inline' to implement + functions or macros in standard C headers like . For example, + if isdigit is mistakenly implemented via a static inline function, + a program containing an extern inline function that calls isdigit + may not work since the C standard prohibits extern inline functions + from calling static functions. This bug is known to occur on: + + OS X 10.8 and earlier; see: + http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00023.html + + DragonFly; see + http://muscles.dragonflybsd.org/bulk/bleeding-edge-potential/latest-per-pkg/ah-tty-0.3.12.log + + FreeBSD; see: + http://lists.gnu.org/archive/html/bug-gnulib/2014-07/msg00104.html + + OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and + for clang but remains for g++; see . + Assume DragonFly and FreeBSD will be similar. */ +#if (((defined __APPLE__ && defined __MACH__) \ + || defined __DragonFly__ || defined __FreeBSD__) \ + && (defined __header_inline \ + ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \ + && ! defined __clang__) \ + : ((! defined _DONT_USE_CTYPE_INLINE_ \ + && (defined __GNUC__ || defined __cplusplus)) \ + || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \ + && defined __GNUC__ && ! defined __cplusplus)))) +# define _GL_EXTERN_INLINE_STDHEADER_BUG #endif -/* Enable general extensions on Solaris. */ -#ifndef __EXTENSIONS__ -# undef __EXTENSIONS__ -#endif - - -/* _GL_INLINE is a portable alternative to ISO C99 plain 'inline'. - _GL_EXTERN_INLINE is a portable alternative to 'extern inline'. - _GL_INLINE_HEADER_BEGIN contains useful stuff to put - in an include file, before uses of _GL_INLINE. - It suppresses GCC's bogus "no previous prototype for 'FOO'" diagnostic, - when FOO is an inline function in the header; see - . - _GL_INLINE_HEADER_END contains useful stuff to put - in the same include file, after uses of _GL_INLINE. - - Suppress the use of extern inline on Apple's platforms, - as Libc-825.25 (2012-09-19) is incompatible with it; see - . - Perhaps Apple will fix this some day. */ #if ((__GNUC__ \ ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \ - : 199901L <= __STDC_VERSION__) \ - && !defined __APPLE__) + : (199901L <= __STDC_VERSION__ \ + && !defined __HP_cc \ + && !(defined __SUNPRO_C && __STDC__))) \ + && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) # define _GL_INLINE inline # define _GL_EXTERN_INLINE extern inline -#elif 2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __APPLE__ -# if __GNUC_GNU_INLINE__ +# define _GL_EXTERN_INLINE_IN_USE +#elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \ + && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) +# if defined __GNUC_GNU_INLINE__ && __GNUC_GNU_INLINE__ /* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */ # define _GL_INLINE extern inline __attribute__ ((__gnu_inline__)) # else # define _GL_INLINE extern inline # endif # define _GL_EXTERN_INLINE extern +# define _GL_EXTERN_INLINE_IN_USE #else # define _GL_INLINE static _GL_UNUSED # define _GL_EXTERN_INLINE static _GL_UNUSED #endif -#if 4 < __GNUC__ + (6 <= __GNUC_MINOR__) +/* In GCC 4.6 (inclusive) to 5.1 (exclusive), + suppress bogus "no previous prototype for 'FOO'" + and "no previous declaration for 'FOO'" diagnostics, + when FOO is an inline function in the header; see + and + . */ +#if __GNUC__ == 4 && 6 <= __GNUC_MINOR__ # if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ # define _GL_INLINE_HEADER_CONST_PRAGMA # else @@ -1432,6 +1519,16 @@ is a misnomer outside of parameter lists. */ #define _UNUSED_PARAMETER_ _GL_UNUSED +/* gcc supports the "unused" attribute on possibly unused labels, and + g++ has since version 4.5. Note to support C++ as well as C, + _GL_UNUSED_LABEL should be used with a trailing ; */ +#if !defined __cplusplus || __GNUC__ > 4 \ + || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5) +# define _GL_UNUSED_LABEL _GL_UNUSED +#else +# define _GL_UNUSED_LABEL +#endif + /* The __pure__ attribute was added in gcc 2.96. */ #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) # define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) diff --git a/gdb/gnulib/configure b/gdb/gnulib/configure index e88e7c70d1..f11317bb4d 100644 --- a/gdb/gnulib/configure +++ b/gdb/gnulib/configure @@ -656,11 +656,14 @@ NEXT_WCHAR_H HAVE_UNISTD_H NEXT_AS_FIRST_DIRECTIVE_UNISTD_H NEXT_UNISTD_H +UNISTD_H_DEFINES_STRUCT_TIMESPEC 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_LOCALTIME +REPLACE_GMTIME REPLACE_TIMEGM REPLACE_NANOSLEEP REPLACE_MKTIME @@ -669,6 +672,7 @@ HAVE_TIMEGM HAVE_STRPTIME HAVE_NANOSLEEP HAVE_DECL_LOCALTIME_R +GNULIB_TIME_RZ GNULIB_TIME_R GNULIB_TIMEGM GNULIB_STRPTIME @@ -693,6 +697,7 @@ GL_GENERATE_STDDEF_H_FALSE GL_GENERATE_STDDEF_H_TRUE STDDEF_H HAVE_WCHAR_T +HAVE_MAX_ALIGN_T REPLACE_NULL HAVE__BOOL GL_GENERATE_STDBOOL_H_FALSE @@ -1012,6 +1017,7 @@ PRIPTR_PREFIX PRI_MACROS_BROKEN INT64_MAX_EQ_LONG_MAX INT32_MAX_LT_INTMAX_MAX +REPLACE_STRTOUMAX REPLACE_STRTOIMAX HAVE_DECL_STRTOUMAX HAVE_DECL_STRTOIMAX @@ -1048,6 +1054,16 @@ HAVE_INTTYPES_H HAVE_WCHAR_H HAVE_UNSIGNED_LONG_LONG_INT HAVE_LONG_LONG_INT +HAVE_WINSOCK2_H +NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H +NEXT_SYS_TIME_H +REPLACE_STRUCT_TIMEVAL +REPLACE_GETTIMEOFDAY +HAVE_TIMEZONE_T +HAVE_SYS_TIME_H +HAVE_STRUCT_TIMEVAL +HAVE_GETTIMEOFDAY +GNULIB_GETTIMEOFDAY FREXPL_LIBM HAVE_SAME_LONG_DOUBLE_AS_DOUBLE FREXP_LIBM @@ -1354,6 +1370,7 @@ GNULIB_REWINDDIR GNULIB_READDIR GNULIB_OPENDIR pkglibexecdir +runstatedir lispdir UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS UNISTD_H_HAVE_WINSOCK2_H @@ -1362,9 +1379,11 @@ REPLACE_USLEEP REPLACE_UNLINKAT REPLACE_UNLINK REPLACE_TTYNAME_R +REPLACE_SYMLINKAT REPLACE_SYMLINK REPLACE_SLEEP REPLACE_RMDIR +REPLACE_READLINKAT REPLACE_READLINK REPLACE_READ REPLACE_PWRITE @@ -1377,6 +1396,7 @@ REPLACE_ISATTY REPLACE_GETPAGESIZE REPLACE_GETGROUPS REPLACE_GETLOGIN_R +REPLACE_GETDTABLESIZE REPLACE_GETDOMAINNAME REPLACE_GETCWD REPLACE_FTRUNCATE @@ -1482,6 +1502,7 @@ REPLACE_SETENV REPLACE_REALPATH REPLACE_REALLOC REPLACE_RANDOM_R +REPLACE_QSORT_R REPLACE_PUTENV REPLACE_PTSNAME_R REPLACE_PTSNAME @@ -1499,6 +1520,7 @@ HAVE_STRTOLL HAVE_STRTOD HAVE_DECL_SETENV HAVE_SETENV +HAVE_SECURE_GETENV HAVE_RPMATCH HAVE_REALPATH HAVE_RANDOM_R @@ -1526,11 +1548,13 @@ GNULIB_STRTOULL GNULIB_STRTOLL GNULIB_STRTOD GNULIB_SETENV +GNULIB_SECURE_GETENV GNULIB_RPMATCH GNULIB_REALPATH GNULIB_REALLOC_POSIX GNULIB_RANDOM_R GNULIB_RANDOM +GNULIB_QSORT_R GNULIB_PUTENV GNULIB_PTSNAME_R GNULIB_PTSNAME @@ -1559,12 +1583,6 @@ target_os target_vendor target_cpu target -RANLIB -ARFLAGS -AR -EGREP -GREP -CPP host_os host_vendor host_cpu @@ -1573,6 +1591,12 @@ build_os build_vendor build_cpu build +RANLIB +ARFLAGS +AR +EGREP +GREP +CPP OBJEXT EXEEXT ac_ct_CC @@ -3268,7 +3292,9 @@ as_fn_append ac_func_list " wmemcpy" as_fn_append ac_func_list " wmempcpy" as_fn_append ac_header_list " wctype.h" gl_fnmatch_required=GNU -as_fn_append ac_func_list " alarm" +as_fn_append ac_header_list " sys/time.h" +as_fn_append ac_header_list " sys/socket.h" +as_fn_append ac_func_list " gettimeofday" as_fn_append ac_header_list " wchar.h" as_fn_append ac_header_list " stdint.h" as_fn_append ac_header_list " inttypes.h" @@ -3282,7 +3308,6 @@ as_fn_append ac_header_list " sys/mman.h" as_fn_append ac_func_list " mprotect" as_fn_append ac_func_list " link" 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 @@ -4146,100 +4171,6 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -ac_aux_dir= -for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - for ac_t in install-sh install.sh shtool; do - if test -f "$ac_dir/$ac_t"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/$ac_t -c" - break 2 - fi - done -done -if test -z "$ac_aux_dir"; then - as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 -fi - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - - -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -$as_echo_n "checking build system type... " >&6; } -if test "${ac_cv_build+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_build_alias=$build_alias -test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` -test "x$ac_build_alias" = x && - as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -$as_echo "$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) as_fn_error "invalid value of canonical build" "$LINENO" 5;; -esac -build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift -build_cpu=$1 -build_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -build_os=$* -IFS=$ac_save_IFS -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -$as_echo_n "checking host system type... " >&6; } -if test "${ac_cv_host+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test "x$host_alias" = x; then - ac_cv_host=$ac_cv_build -else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -$as_echo "$ac_cv_host" >&6; } -case $ac_cv_host in -*-*-*) ;; -*) as_fn_error "invalid value of canonical host" "$LINENO" 5;; -esac -host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - - ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -4640,8 +4571,6 @@ done - - ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" if test "x$ac_cv_header_minix_config_h" = x""yes; then : MINIX=yes @@ -4660,15 +4589,10 @@ $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h $as_echo "#define _MINIX 1" >>confdefs.h - fi - - case "$host_os" in - hpux*) -$as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h +$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h - ;; - esac + fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 @@ -4707,10 +4631,60 @@ $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } $as_echo "#define _GNU_SOURCE 1" >>confdefs.h + $as_echo "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h + $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5 +$as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; } +if test "${ac_cv_should_define__xopen_source+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_should_define__xopen_source=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + mbstate_t x; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #define _XOPEN_SOURCE 500 + #include + mbstate_t x; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_should_define__xopen_source=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5 +$as_echo "$ac_cv_should_define__xopen_source" >&6; } + test $ac_cv_should_define__xopen_source = yes && + $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h + @@ -4840,12 +4814,12 @@ else fi if test -z "$ARFLAGS"; then - ARFLAGS='cru' + ARFLAGS='cr' fi fi else if test -z "$ARFLAGS"; then - ARFLAGS='cru' + ARFLAGS='cr' fi fi @@ -4956,6 +4930,100 @@ fi +ac_aux_dir= +for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do + for ac_t in install-sh install.sh shtool; do + if test -f "$ac_dir/$ac_t"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/$ac_t -c" + break 2 + fi + done +done +if test -z "$ac_aux_dir"; then + as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if test "${ac_cv_build+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) as_fn_error "invalid value of canonical build" "$LINENO" 5;; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if test "${ac_cv_host+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) as_fn_error "invalid value of canonical host" "$LINENO" 5;; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + @@ -5183,10 +5251,13 @@ rm -rf conftest* fi +$as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h + fi + # Code from module absolute-header: # Code from module alloca: # Code from module alloca-opt: # Code from module canonicalize-lgpl: @@ -5209,6 +5280,7 @@ fi # Code from module fpucw: # Code from module frexp: # Code from module frexpl: + # Code from module gettimeofday: # Code from module include_next: # Code from module inttypes: # Code from module inttypes-incomplete: @@ -5252,6 +5324,7 @@ fi # Code from module strstr-simple: # Code from module strtok_r: # Code from module sys_stat: + # Code from module sys_time: # Code from module sys_types: # Code from module time: # Code from module unistd: @@ -6086,11 +6159,13 @@ fi GNULIB_PTSNAME=0; GNULIB_PTSNAME_R=0; GNULIB_PUTENV=0; + GNULIB_QSORT_R=0; GNULIB_RANDOM=0; GNULIB_RANDOM_R=0; GNULIB_REALLOC_POSIX=0; GNULIB_REALPATH=0; GNULIB_RPMATCH=0; + GNULIB_SECURE_GETENV=0; GNULIB_SETENV=0; GNULIB_STRTOD=0; GNULIB_STRTOLL=0; @@ -6118,6 +6193,7 @@ fi HAVE_RANDOM_R=1; HAVE_REALPATH=1; HAVE_RPMATCH=1; + HAVE_SECURE_GETENV=1; HAVE_SETENV=1; HAVE_DECL_SETENV=1; HAVE_STRTOD=1; @@ -6135,6 +6211,7 @@ fi REPLACE_PTSNAME=0; REPLACE_PTSNAME_R=0; REPLACE_PUTENV=0; + REPLACE_QSORT_R=0; REPLACE_RANDOM_R=0; REPLACE_REALLOC=0; REPLACE_REALPATH=0; @@ -6526,6 +6603,7 @@ done REPLACE_FTRUNCATE=0; REPLACE_GETCWD=0; REPLACE_GETDOMAINNAME=0; + REPLACE_GETDTABLESIZE=0; REPLACE_GETLOGIN_R=0; REPLACE_GETGROUPS=0; REPLACE_GETPAGESIZE=0; @@ -6538,9 +6616,11 @@ done REPLACE_PWRITE=0; REPLACE_READ=0; REPLACE_READLINK=0; + REPLACE_READLINKAT=0; REPLACE_RMDIR=0; REPLACE_SLEEP=0; REPLACE_SYMLINK=0; + REPLACE_SYMLINKAT=0; REPLACE_TTYNAME_R=0; REPLACE_UNLINK=0; REPLACE_UNLINKAT=0; @@ -6786,39 +6866,43 @@ if test "${gl_cv_next_errno_h+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. */ #include - _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 '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"`'"' - + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac -fi + 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_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + + gl_header=$gl_cv_absolute_errno_h + gl_cv_next_errno_h='"'$gl_header'"' + + +fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5 $as_echo "$gl_cv_next_errno_h" >&6; } fi @@ -7414,7 +7498,16 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_no_libm" >&5 $as_echo "$gl_cv_func_frexp_no_libm" >&6; } +ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default" +if test "x$ac_cv_have_decl_alarm" = x""yes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_ALARM $ac_have_decl +_ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long double and double are the same" >&5 @@ -7458,6 +7551,310 @@ $as_echo "#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1" >>confdefs.h fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 +$as_echo_n "checking for C/C++ restrict keyword... " >&6; } +if test "${ac_cv_c_restrict+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_c_restrict=no + # The order here caters to the fact that C++ does not require restrict. + for ac_kw in __restrict __restrict__ _Restrict restrict; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +typedef int *int_ptr; + int foo (int_ptr $ac_kw ip) { return ip[0]; } + int bar (int [$ac_kw]); /* Catch GCC bug 14050. */ + int bar (int ip[$ac_kw]) { return ip[0]; } + +int +main () +{ +int s[1]; + int *$ac_kw t = s; + t[0] = 0; + return foo (t) + bar (t); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_c_restrict=$ac_kw +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test "$ac_cv_c_restrict" != no && break + done + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5 +$as_echo "$ac_cv_c_restrict" >&6; } + + case $ac_cv_c_restrict in + restrict) ;; + no) $as_echo "#define restrict /**/" >>confdefs.h + ;; + *) cat >>confdefs.h <<_ACEOF +#define restrict $ac_cv_c_restrict +_ACEOF + ;; + esac + + + GNULIB_GETTIMEOFDAY=0; + HAVE_GETTIMEOFDAY=1; + HAVE_STRUCT_TIMEVAL=1; + HAVE_SYS_TIME_H=1; + HAVE_TIMEZONE_T=0; + REPLACE_GETTIMEOFDAY=0; + REPLACE_STRUCT_TIMEVAL=0; + + + + + + + + + + + + + + + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_sys_time_h='<'sys/time.h'>' + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +$as_echo_n "checking absolute name of ... " >&6; } +if test "${gl_cv_next_sys_time_h+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + if test $ac_cv_header_sys_time_h = yes; then + + + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_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/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_absolute_sys_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + + gl_header=$gl_cv_absolute_sys_time_h + gl_cv_next_sys_time_h='"'$gl_header'"' + else + gl_cv_next_sys_time_h='<'sys/time.h'>' + fi + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5 +$as_echo "$gl_cv_next_sys_time_h" >&6; } + fi + NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h + + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'sys/time.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_sys_time_h + fi + NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive + + + + + + if test $ac_cv_header_sys_time_h != yes; then + HAVE_SYS_TIME_H=0 + fi + + + + + + if test $ac_cv_header_sys_socket_h != yes; then + for ac_header in winsock2.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" +if test "x$ac_cv_header_winsock2_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_WINSOCK2_H 1 +_ACEOF + +fi + +done + + fi + if test "$ac_cv_header_winsock2_h" = yes; then + HAVE_WINSOCK2_H=1 + UNISTD_H_HAVE_WINSOCK2_H=1 + SYS_IOCTL_H_HAVE_WINSOCK2_H=1 + else + HAVE_WINSOCK2_H=0 + fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5 +$as_echo_n "checking for struct timeval... " >&6; } +if test "${gl_cv_sys_struct_timeval+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if HAVE_SYS_TIME_H + #include + #endif + #include + #if HAVE_WINSOCK2_H + # include + #endif + +int +main () +{ +static struct timeval x; x.tv_sec = x.tv_usec; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_sys_struct_timeval=yes +else + gl_cv_sys_struct_timeval=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5 +$as_echo "$gl_cv_sys_struct_timeval" >&6; } + if test $gl_cv_sys_struct_timeval != yes; then + HAVE_STRUCT_TIMEVAL=0 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5 +$as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; } +if test "${gl_cv_sys_struct_timeval_tv_sec+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if HAVE_SYS_TIME_H + #include + #endif + #include + #if HAVE_WINSOCK2_H + # include + #endif + +int +main () +{ +static struct timeval x; + typedef int verify_tv_sec_type[ + sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1 + ]; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_sys_struct_timeval_tv_sec=yes +else + gl_cv_sys_struct_timeval_tv_sec=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_timeval_tv_sec" >&5 +$as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; } + if test $gl_cv_sys_struct_timeval_tv_sec != yes; then + REPLACE_STRUCT_TIMEVAL=1 + fi + fi + + + for gl_func in gettimeofday; do + as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 +$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } +if { as_var=$as_gl_Symbol; eval "test \"\${$as_var+set}\" = set"; }; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#if HAVE_SYS_TIME_H +# include +#endif +#include + +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 + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5 $as_echo_n "checking for unsigned long long int... " >&6; } @@ -7681,36 +8078,40 @@ else if test $ac_cv_header_stdint_h = yes; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include - _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 'stdint.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_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n "$gl_absolute_header_sed"`'"' + 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 'stdint.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_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + + gl_header=$gl_cv_absolute_stdint_h + gl_cv_next_stdint_h='"'$gl_header'"' else gl_cv_next_stdint_h='<'stdint.h'>' fi @@ -8359,6 +8760,7 @@ fi HAVE_DECL_STRTOIMAX=1; HAVE_DECL_STRTOUMAX=1; REPLACE_STRTOIMAX=0; + REPLACE_STRTOUMAX=0; INT32_MAX_LT_INTMAX_MAX=1; INT64_MAX_EQ_LONG_MAX='defined _LP64'; PRI_MACROS_BROKEN=0; @@ -8392,36 +8794,40 @@ else if test $ac_cv_header_inttypes_h = yes; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include - _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 'inttypes.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_inttypes_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n "$gl_absolute_header_sed"`'"' + 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 'inttypes.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_absolute_inttypes_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + + gl_header=$gl_cv_absolute_inttypes_h + gl_cv_next_inttypes_h='"'$gl_header'"' else gl_cv_next_inttypes_h='<'inttypes.h'>' fi @@ -9443,14 +9849,15 @@ if test "${gl_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then : else rm -f conftest.sym conftest.file echo >conftest.file - if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then - if test "$cross_compiling" = yes; then : + if test "$cross_compiling" = yes; then : case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;; - # If we don't know, assume the worst. - *) gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;; - esac + *-gnu*) + # Guess yes on glibc systems. + gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;; + *) + # If we don't know, assume the worst. + gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;; + esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -9460,10 +9867,12 @@ int main () { struct stat sbuf; - /* Linux will dereference the symlink and fail, as required by - POSIX. That is better in the sense that it means we will not - have to compile and use the lstat wrapper. */ - return lstat ("conftest.sym/", &sbuf) == 0; + if (symlink ("conftest.file", "conftest.sym") != 0) + return 1; + /* Linux will dereference the symlink and fail, as required by + POSIX. That is better in the sense that it means we will not + have to compile and use the lstat wrapper. */ + return lstat ("conftest.sym/", &sbuf) == 0; ; return 0; @@ -9478,11 +9887,6 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi - else - # If the 'ln -s' command failed, then we probably don't even - # have an lstat function. - gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" - fi rm -f conftest.sym conftest.file fi @@ -10787,6 +11191,7 @@ fi REPLACE_NULL=0; + HAVE_MAX_ALIGN_T=1; HAVE_WCHAR_T=1; @@ -10822,52 +11227,6 @@ $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 : - $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 - @@ -10888,36 +11247,40 @@ if test "${gl_cv_next_string_h+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. */ #include - _ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac + 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 'string.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 + }' - case "$host_os" in - mingw*) - gl_dirsep_regex='[/\\]' - ;; - *) - gl_dirsep_regex='\/' - ;; - esac - gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` - gl_header_literal_regex=`echo 'string.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_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n "$gl_absolute_header_sed"`'"' + gl_header=$gl_cv_absolute_string_h + gl_cv_next_string_h='"'$gl_header'"' fi @@ -11188,11 +11551,92 @@ fi + + + + + + + + + + if test $gl_cv_have_include_next = yes; then + gl_cv_next_sys_types_h='<'sys/types.h'>' + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +$as_echo_n "checking absolute name of ... " >&6; } +if test "${gl_cv_next_sys_types_h+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_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/types.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_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + + gl_header=$gl_cv_absolute_sys_types_h + gl_cv_next_sys_types_h='"'$gl_header'"' + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5 +$as_echo "$gl_cv_next_sys_types_h" >&6; } + fi + NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_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/types.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_sys_types_h + fi + NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive + + + + + + + + + + + + GNULIB_MKTIME=0; GNULIB_NANOSLEEP=0; GNULIB_STRPTIME=0; GNULIB_TIMEGM=0; GNULIB_TIME_R=0; + GNULIB_TIME_RZ=0; HAVE_DECL_LOCALTIME_R=1; HAVE_NANOSLEEP=1; HAVE_STRPTIME=1; @@ -11202,7 +11646,9 @@ fi REPLACE_NANOSLEEP=GNULIB_PORTCHECK; REPLACE_TIMEGM=GNULIB_PORTCHECK; - + : ${GNULIB_GETTIMEOFDAY=0}; + REPLACE_GMTIME=0; + REPLACE_LOCALTIME=0; @@ -11236,6 +11682,7 @@ $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 + UNISTD_H_DEFINES_STRUCT_TIMESPEC=0 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then TIME_H_DEFINES_STRUCT_TIMESPEC=1 else @@ -11296,6 +11743,36 @@ fi $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 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in " >&5 +$as_echo_n "checking for struct timespec in ... " >&6; } +if test "${gl_cv_sys_struct_timespec_in_unistd_h+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +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_unistd_h=yes +else + gl_cv_sys_struct_timespec_in_unistd_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_unistd_h" >&5 +$as_echo "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; } + if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then + UNISTD_H_DEFINES_STRUCT_TIMESPEC=1 + fi fi fi fi @@ -11314,6 +11791,7 @@ $as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; } + if test $gl_cv_have_include_next = yes; then gl_cv_next_time_h='<'time.h'>' else @@ -11323,36 +11801,40 @@ if test "${gl_cv_next_time_h+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. */ #include - _ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac + 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 + }' - case "$host_os" in - mingw*) - gl_dirsep_regex='[/\\]' - ;; - *) - gl_dirsep_regex='\/' - ;; - esac - gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` - 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"`'"' + gl_header=$gl_cv_absolute_time_h + gl_cv_next_time_h='"'$gl_header'"' fi @@ -11712,6 +12194,10 @@ $as_echo "#define GNULIB_TEST_CHDIR 1" >>confdefs.h if test "x$localedir" = x; then localedir='${datarootdir}/locale' + fi + if test "x$runstatedir" = x; then + runstatedir='${localstatedir}/run' + fi pkglibexecdir='${libexecdir}/${PACKAGE}' @@ -11741,36 +12227,40 @@ else if test $ac_cv_header_dirent_h = yes; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include - _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"`'"' + 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_absolute_dirent_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + + gl_header=$gl_cv_absolute_dirent_h + gl_cv_next_dirent_h='"'$gl_header'"' else gl_cv_next_dirent_h='<'dirent.h'>' fi @@ -12161,36 +12651,40 @@ if test "${gl_cv_next_float_h+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. */ #include - _ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac + 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 'float.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 + }' - case "$host_os" in - mingw*) - gl_dirsep_regex='[/\\]' - ;; - *) - gl_dirsep_regex='\/' - ;; - esac - gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + gl_cv_absolute_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` - gl_header_literal_regex=`echo 'float.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_float_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n "$gl_absolute_header_sed"`'"' + gl_header=$gl_cv_absolute_float_h + gl_cv_next_float_h='"'$gl_header'"' fi @@ -12528,7 +13022,8 @@ else #include #include #include -#if HAVE_ALARM +#if HAVE_DECL_ALARM +# include # include #endif /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0. @@ -12551,9 +13046,10 @@ int main() int i; volatile double x; double zero = 0.0; -#if HAVE_ALARM +#if HAVE_DECL_ALARM /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite number. Let the test fail in this case. */ + signal (SIGALRM, SIG_DFL); alarm (5); #endif /* Test on denormalized numbers. */ @@ -12855,44 +13351,245 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5 -$as_echo "$gl_cv_func_frexpl_works" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5 +$as_echo "$gl_cv_func_frexpl_works" >&6; } + + LIBS="$save_LIBS" + case "$gl_cv_func_frexpl_works" in + *yes) gl_func_frexpl=yes ;; + *) gl_func_frexpl=no; REPLACE_FREXPL=1 ;; + esac + else + gl_func_frexpl=no + fi + if test $gl_func_frexpl = yes; then + +$as_echo "#define HAVE_FREXPL 1" >>confdefs.h + + fi + fi + if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then + if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then + + FREXPL_LIBM="$FREXP_LIBM" + else + FREXPL_LIBM= + fi + fi + + + if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS frexpl.$ac_objext" + + fi + + + + + + GNULIB_FREXPL=1 + + + + + +$as_echo "#define GNULIB_TEST_FREXPL 1" >>confdefs.h + + + + + + + + + + gl_gettimeofday_timezone=void + if test $ac_cv_func_gettimeofday != yes; then + HAVE_GETTIMEOFDAY=0 + else + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5 +$as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; } +if test "${gl_cv_func_gettimeofday_clobber+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + # When cross-compiling: + case "$host_os" in + # Guess all is fine on glibc systems. + *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;; + # If we don't know, assume the worst. + *) gl_cv_func_gettimeofday_clobber="guessing yes" ;; + esac + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include + #include + #include + +int +main () +{ + + time_t t = 0; + struct tm *lt; + struct tm saved_lt; + struct timeval tv; + lt = localtime (&t); + saved_lt = *lt; + gettimeofday (&tv, NULL); + return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_gettimeofday_clobber=no +else + gl_cv_func_gettimeofday_clobber=yes +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_gettimeofday_clobber" >&5 +$as_echo "$gl_cv_func_gettimeofday_clobber" >&6; } + + case "$gl_cv_func_gettimeofday_clobber" in + *yes) + REPLACE_GETTIMEOFDAY=1 + + REPLACE_GMTIME=1 + REPLACE_LOCALTIME=1 + + +$as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h + + ;; + esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5 +$as_echo_n "checking for gettimeofday with POSIX signature... " >&6; } +if test "${gl_cv_func_gettimeofday_posix_signature+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + struct timeval c; + int gettimeofday (struct timeval *restrict, void *restrict); + +int +main () +{ +/* glibc uses struct timezone * rather than the POSIX void * + if _GNU_SOURCE is defined. However, since the only portable + use of gettimeofday uses NULL as the second parameter, and + since the glibc definition is actually more typesafe, it is + not worth wrapping this to get a compliant signature. */ + int (*f) (struct timeval *restrict, void *restrict) + = gettimeofday; + int x = f (&c, 0); + return !(x | c.tv_sec | c.tv_usec); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_func_gettimeofday_posix_signature=yes +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int gettimeofday (struct timeval *restrict, struct timezone *restrict); + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_func_gettimeofday_posix_signature=almost +else + gl_cv_func_gettimeofday_posix_signature=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5 +$as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; } + if test $gl_cv_func_gettimeofday_posix_signature = almost; then + gl_gettimeofday_timezone='struct timezone' + elif test $gl_cv_func_gettimeofday_posix_signature != yes; then + REPLACE_GETTIMEOFDAY=1 + fi + if test $REPLACE_STRUCT_TIMEVAL = 1; then + REPLACE_GETTIMEOFDAY=1 + fi + + fi + +cat >>confdefs.h <<_ACEOF +#define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone +_ACEOF + - LIBS="$save_LIBS" - case "$gl_cv_func_frexpl_works" in - *yes) gl_func_frexpl=yes ;; - *) gl_func_frexpl=no; REPLACE_FREXPL=1 ;; - esac - else - gl_func_frexpl=no - fi - if test $gl_func_frexpl = yes; then + if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then -$as_echo "#define HAVE_FREXPL 1" >>confdefs.h - fi - fi - if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then - if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then - FREXPL_LIBM="$FREXP_LIBM" - else - FREXPL_LIBM= - fi - fi - if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then + gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext" + for ac_header in sys/timeb.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_timeb_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SYS_TIMEB_H 1 +_ACEOF +fi +done + + for ac_func in _ftime +do : + ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime" +if test "x$ac_cv_func__ftime" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE__FTIME 1 +_ACEOF + +fi +done - gl_LIBOBJS="$gl_LIBOBJS frexpl.$ac_objext" fi @@ -12900,13 +13597,13 @@ $as_echo "#define HAVE_FREXPL 1" >>confdefs.h - GNULIB_FREXPL=1 + GNULIB_GETTIMEOFDAY=1 -$as_echo "#define GNULIB_TEST_FREXPL 1" >>confdefs.h +$as_echo "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h @@ -13276,17 +13973,7 @@ if test "${gl_cv_func_isnanl_works+set}" = set; then : else if test "$cross_compiling" = yes; then : - case "$host_cpu" in - # Guess no on ia64, x86_64, i386. - ia64 | x86_64 | i*86) gl_cv_func_isnanl_works="guessing no";; - *) - case "$host_os" in - netbsd*) gl_cv_func_isnanl_works="guessing no";; - *) gl_cv_func_isnanl_works="guessing yes";; - esac - ;; - esac - + gl_cv_func_isnanl_works="guessing yes" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -13345,7 +14032,7 @@ int main () # ifdef WORDS_BIGENDIAN # define LDBL80_WORDS(exponent,manthi,mantlo) \ { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \ - ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \ + ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16), \ (unsigned int) (mantlo) << 16 \ } # else @@ -13365,41 +14052,35 @@ int main () if (!isnanl (x.value)) result |= 2; } - /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities, - Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in - Intel IA-64 Architecture Software Developer's Manual, Volume 1: - Application Architecture. - Table 5-2 "Floating-Point Register Encodings" - Figure 5-6 "Memory to Floating-Point Register Data Translation" - */ + /* isnanl should return something even for noncanonical values. */ { /* Pseudo-NaN. */ static memory_long_double x = { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) }; - if (!isnanl (x.value)) + if (isnanl (x.value) && !isnanl (x.value)) result |= 4; } { /* Pseudo-Infinity. */ static memory_long_double x = { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) }; - if (!isnanl (x.value)) + if (isnanl (x.value) && !isnanl (x.value)) result |= 8; } { /* Pseudo-Zero. */ static memory_long_double x = { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) }; - if (!isnanl (x.value)) + if (isnanl (x.value) && !isnanl (x.value)) result |= 16; } { /* Unnormalized number. */ static memory_long_double x = { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) }; - if (!isnanl (x.value)) + if (isnanl (x.value) && !isnanl (x.value)) result |= 32; } { /* Pseudo-Denormal. */ static memory_long_double x = { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) }; - if (!isnanl (x.value)) + if (isnanl (x.value) && !isnanl (x.value)) result |= 64; } #endif @@ -13678,36 +14359,40 @@ else if test $ac_cv_header_math_h = yes; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include - _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 'math.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_math_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n "$gl_absolute_header_sed"`'"' + 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 'math.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_absolute_math_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + + gl_header=$gl_cv_absolute_math_h + gl_cv_next_math_h='"'$gl_header'"' else gl_cv_next_math_h='<'math.h'>' fi @@ -14367,6 +15052,49 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5 $as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; } + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works on empty input" >&5 +$as_echo_n "checking whether mbrtowc works on empty input... " >&6; } +if test "${gl_cv_func_mbrtowc_empty_input+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + case "$host_os" in + # Guess no on AIX and glibc systems. + aix* | *-gnu*) + gl_cv_func_mbrtowc_empty_input="guessing no" ;; + *) gl_cv_func_mbrtowc_empty_input="guessing yes" ;; + esac + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #include + static wchar_t wc; + static mbstate_t mbs; + int + main (void) + { + return mbrtowc (&wc, "", 0, &mbs) == (size_t) -2; + } +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_mbrtowc_empty_input=no +else + gl_cv_func_mbrtowc_empty_input=yes +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_mbrtowc_empty_input" >&5 +$as_echo "$gl_cv_func_mbrtowc_empty_input" >&6; } + case "$gl_cv_func_mbrtowc_null_arg1" in *yes) ;; *) @@ -14396,6 +15124,14 @@ $as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h *) $as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h + REPLACE_MBRTOWC=1 + ;; + esac + case "$gl_cv_func_mbrtowc_empty_input" in + *yes) ;; + *) +$as_echo "#define MBRTOWC_EMPTY_INPUT_BUG 1" >>confdefs.h + REPLACE_MBRTOWC=1 ;; esac @@ -16005,6 +16741,15 @@ fi STDDEF_H= + ac_fn_c_check_type "$LINENO" "max_align_t" "ac_cv_type_max_align_t" "#include + +" +if test "x$ac_cv_type_max_align_t" = x""yes; then : + +else + HAVE_MAX_ALIGN_T=0; STDDEF_H=stddef.h +fi + if test $gt_cv_c_wchar_t = no; then HAVE_WCHAR_T=0 STDDEF_H=stddef.h @@ -16067,36 +16812,40 @@ if test "${gl_cv_next_stddef_h+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. */ #include - _ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac + 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' + 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_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"`'"' + gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + + gl_header=$gl_cv_absolute_stddef_h + gl_cv_next_stddef_h='"'$gl_header'"' fi @@ -16130,6 +16879,8 @@ $as_echo "$gl_cv_next_stddef_h" >&6; } + + if test $gl_cv_have_include_next = yes; then gl_cv_next_stdio_h='<'stdio.h'>' else @@ -16139,36 +16890,40 @@ if test "${gl_cv_next_stdio_h+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. */ #include - _ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac + 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 'stdio.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 + }' - case "$host_os" in - mingw*) - gl_dirsep_regex='[/\\]' - ;; - *) - gl_dirsep_regex='\/' - ;; - esac - gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` - gl_header_literal_regex=`echo 'stdio.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_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n "$gl_absolute_header_sed"`'"' + gl_header=$gl_cv_absolute_stdio_h + gl_cv_next_stdio_h='"'$gl_header'"' fi @@ -16190,6 +16945,48 @@ $as_echo "$gl_cv_next_stdio_h" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5 +$as_echo_n "checking which flavor of printf attribute matches inttypes macros... " >&6; } +if test "${gl_cv_func_printf_attribute_flavor+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + #define __STDC_FORMAT_MACROS 1 + #include + #include + /* For non-mingw systems, compilation will trivially succeed. + For mingw, compilation will succeed for older mingw (system + printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */ + #if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) && \ + (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) + extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1]; + #endif + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_func_printf_attribute_flavor=system +else + gl_cv_func_printf_attribute_flavor=gnu +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5 +$as_echo "$gl_cv_func_printf_attribute_flavor" >&6; } + if test "$gl_cv_func_printf_attribute_flavor" = gnu; then + +$as_echo "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h + + fi + GNULIB_FSCANF=1 @@ -16287,36 +17084,40 @@ if test "${gl_cv_next_stdlib_h+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. */ #include - _ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac + 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 'stdlib.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 + }' - case "$host_os" in - mingw*) - gl_dirsep_regex='[/\\]' - ;; - *) - gl_dirsep_regex='\/' - ;; - esac - gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` - gl_header_literal_regex=`echo 'stdlib.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_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n "$gl_absolute_header_sed"`'"' + gl_header=$gl_cv_absolute_stdlib_h + gl_cv_next_stdlib_h='"'$gl_header'"' fi @@ -16339,7 +17140,7 @@ $as_echo "$gl_cv_next_stdlib_h" >&6; } - for gl_func in _Exit atoll canonicalize_file_name getloadavg getsubopt grantpt initstate initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps posix_openpt ptsname ptsname_r random random_r realpath rpmatch setenv setstate setstate_r srandom srandom_r strtod strtoll strtoull unlockpt unsetenv; do + for gl_func in _Exit atoll canonicalize_file_name getloadavg getsubopt grantpt initstate initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps posix_openpt ptsname ptsname_r random random_r realpath rpmatch secure_getenv setenv setstate setstate_r srandom srandom_r strtod strtoll strtoull unlockpt unsetenv; 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; } @@ -16744,36 +17545,40 @@ else if test $ac_cv_header_sys_stat_h = yes; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include - _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"`'"' + 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_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + + gl_header=$gl_cv_absolute_sys_stat_h + gl_cv_next_sys_stat_h='"'$gl_header'"' else gl_cv_next_sys_stat_h='<'sys/stat.h'>' fi @@ -16876,78 +17681,6 @@ fi - if test $gl_cv_have_include_next = yes; then - gl_cv_next_sys_types_h='<'sys/types.h'>' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if test "${gl_cv_next_sys_types_h+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_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/types.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_types_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_sys_types_h" >&5 -$as_echo "$gl_cv_next_sys_types_h" >&6; } - fi - NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_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/types.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_sys_types_h - fi - NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive - - - - - - - - - - - - - - - - - @@ -16970,36 +17703,40 @@ else if test $ac_cv_header_unistd_h = yes; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include - _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 'unistd.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_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n "$gl_absolute_header_sed"`'"' + 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 'unistd.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_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + + gl_header=$gl_cv_absolute_unistd_h + gl_cv_next_unistd_h='"'$gl_header'"' else gl_cv_next_unistd_h='<'unistd.h'>' fi @@ -17112,36 +17849,40 @@ else if test $ac_cv_header_wchar_h = yes; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include - _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 'wchar.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_wchar_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n "$gl_absolute_header_sed"`'"' + 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 'wchar.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_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + + gl_header=$gl_cv_absolute_wchar_h + gl_cv_next_wchar_h='"'$gl_header'"' else gl_cv_next_wchar_h='<'wchar.h'>' fi @@ -17275,36 +18016,40 @@ else if test $ac_cv_header_wctype_h = yes; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include - _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 'wctype.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_wctype_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n "$gl_absolute_header_sed"`'"' + 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 'wctype.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_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"` + + gl_header=$gl_cv_absolute_wctype_h + gl_cv_next_wctype_h='"'$gl_header'"' else gl_cv_next_wctype_h='<'wctype.h'>' fi diff --git a/gdb/gnulib/import/Makefile.am b/gdb/gnulib/import/Makefile.am index d25231a9d4..5a12596510 100644 --- a/gdb/gnulib/import/Makefile.am +++ b/gdb/gnulib/import/Makefile.am @@ -1,6 +1,6 @@ ## DO NOT EDIT! GENERATED AUTOMATICALLY! ## Process this file with automake to produce Makefile.in. -# Copyright (C) 2002-2012 Free Software Foundation, Inc. +# Copyright (C) 2002-2015 Free Software Foundation, Inc. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -23,7 +23,7 @@ # 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 alloca canonicalize-lgpl dirent dirfd errno fnmatch-gnu frexpl inttypes lstat memchr memmem pathmax readlink rename strstr strtok_r sys_stat unistd update-copyright wchar wctype-h -AUTOMAKE_OPTIONS = 1.5 gnits +AUTOMAKE_OPTIONS = 1.9.6 gnits SUBDIRS = noinst_HEADERS = @@ -49,6 +49,15 @@ libgnu_a_LIBADD = $(gl_LIBOBJS) libgnu_a_DEPENDENCIES = $(gl_LIBOBJS) EXTRA_libgnu_a_SOURCES = +## begin gnulib module absolute-header + +# Use this preprocessor expression to decide whether #include_next works. +# Do not rely on a 'configure'-time test for this, since the expression +# might appear in an installed header, which is used by some other compiler. +HAVE_INCLUDE_NEXT = (__GNUC__ || 60000000 <= __DECC_VER) + +## end gnulib module absolute-header + ## begin gnulib module alloca @@ -95,7 +104,7 @@ EXTRA_libgnu_a_SOURCES += canonicalize-lgpl.c ## begin gnulib module configmake # Listed in the same order as the GNU makefile conventions, and -# provided by autoconf 2.59c+. +# provided by autoconf 2.59c+ or 2.70. # The Automake-defined pkg* macros are appended, in the order # listed in the Automake 1.10a+ documentation. configmake.h: Makefile @@ -111,6 +120,7 @@ configmake.h: Makefile echo '#define SYSCONFDIR "$(sysconfdir)"'; \ echo '#define SHAREDSTATEDIR "$(sharedstatedir)"'; \ echo '#define LOCALSTATEDIR "$(localstatedir)"'; \ + echo '#define RUNSTATEDIR "$(runstatedir)"'; \ echo '#define INCLUDEDIR "$(includedir)"'; \ echo '#define OLDINCLUDEDIR "$(oldincludedir)"'; \ echo '#define DOCDIR "$(docdir)"'; \ @@ -324,6 +334,15 @@ EXTRA_libgnu_a_SOURCES += frexp.c frexpl.c ## end gnulib module frexpl +## begin gnulib module gettimeofday + + +EXTRA_DIST += gettimeofday.c + +EXTRA_libgnu_a_SOURCES += gettimeofday.c + +## end gnulib module gettimeofday + ## begin gnulib module inttypes-incomplete BUILT_SOURCES += inttypes.h @@ -352,6 +371,7 @@ inttypes.h: inttypes.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_U -e 's/@''HAVE_DECL_STRTOIMAX''@/$(HAVE_DECL_STRTOIMAX)/g' \ -e 's/@''HAVE_DECL_STRTOUMAX''@/$(HAVE_DECL_STRTOUMAX)/g' \ -e 's/@''REPLACE_STRTOIMAX''@/$(REPLACE_STRTOIMAX)/g' \ + -e 's/@''REPLACE_STRTOUMAX''@/$(REPLACE_STRTOUMAX)/g' \ -e 's/@''INT32_MAX_LT_INTMAX_MAX''@/$(INT32_MAX_LT_INTMAX_MAX)/g' \ -e 's/@''INT64_MAX_EQ_LONG_MAX''@/$(INT64_MAX_EQ_LONG_MAX)/g' \ -e 's/@''UINT32_MAX_LT_UINTMAX_MAX''@/$(UINT32_MAX_LT_UINTMAX_MAX)/g' \ @@ -984,6 +1004,7 @@ stddef.h: stddef.in.h $(top_builddir)/config.status -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_STDDEF_H''@|$(NEXT_STDDEF_H)|g' \ + -e 's|@''HAVE_MAX_ALIGN_T''@|$(HAVE_MAX_ALIGN_T)|g' \ -e 's|@''HAVE_WCHAR_T''@|$(HAVE_WCHAR_T)|g' \ -e 's|@''REPLACE_NULL''@|$(REPLACE_NULL)|g' \ < $(srcdir)/stddef.in.h; \ @@ -1052,7 +1073,6 @@ EXTRA_DIST += stdint.in.h ## begin gnulib module stdio BUILT_SOURCES += stdio.h -libgnu_a_SOURCES += stdio.c # We need the following in order to create when the system # doesn't have one that works with the given compiler. @@ -1211,11 +1231,13 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \ -e 's/@''GNULIB_PTSNAME''@/$(GNULIB_PTSNAME)/g' \ -e 's/@''GNULIB_PTSNAME_R''@/$(GNULIB_PTSNAME_R)/g' \ -e 's/@''GNULIB_PUTENV''@/$(GNULIB_PUTENV)/g' \ + -e 's/@''GNULIB_QSORT_R''@/$(GNULIB_QSORT_R)/g' \ -e 's/@''GNULIB_RANDOM''@/$(GNULIB_RANDOM)/g' \ -e 's/@''GNULIB_RANDOM_R''@/$(GNULIB_RANDOM_R)/g' \ -e 's/@''GNULIB_REALLOC_POSIX''@/$(GNULIB_REALLOC_POSIX)/g' \ -e 's/@''GNULIB_REALPATH''@/$(GNULIB_REALPATH)/g' \ -e 's/@''GNULIB_RPMATCH''@/$(GNULIB_RPMATCH)/g' \ + -e 's/@''GNULIB_SECURE_GETENV''@/$(GNULIB_SECURE_GETENV)/g' \ -e 's/@''GNULIB_SETENV''@/$(GNULIB_SETENV)/g' \ -e 's/@''GNULIB_STRTOD''@/$(GNULIB_STRTOD)/g' \ -e 's/@''GNULIB_STRTOLL''@/$(GNULIB_STRTOLL)/g' \ @@ -1244,6 +1266,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \ -e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \ -e 's|@''HAVE_REALPATH''@|$(HAVE_REALPATH)|g' \ -e 's|@''HAVE_RPMATCH''@|$(HAVE_RPMATCH)|g' \ + -e 's|@''HAVE_SECURE_GETENV''@|$(HAVE_SECURE_GETENV)|g' \ -e 's|@''HAVE_DECL_SETENV''@|$(HAVE_DECL_SETENV)|g' \ -e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \ -e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \ @@ -1260,6 +1283,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \ -e 's|@''REPLACE_PTSNAME''@|$(REPLACE_PTSNAME)|g' \ -e 's|@''REPLACE_PTSNAME_R''@|$(REPLACE_PTSNAME_R)|g' \ -e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \ + -e 's|@''REPLACE_QSORT_R''@|$(REPLACE_QSORT_R)|g' \ -e 's|@''REPLACE_RANDOM_R''@|$(REPLACE_RANDOM_R)|g' \ -e 's|@''REPLACE_REALLOC''@|$(REPLACE_REALLOC)|g' \ -e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \ @@ -1472,6 +1496,40 @@ EXTRA_DIST += sys_stat.in.h ## end gnulib module sys_stat +## begin gnulib module sys_time + +BUILT_SOURCES += sys/time.h + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +sys/time.h: sys_time.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/@''HAVE_SYS_TIME_H''@/$(HAVE_SYS_TIME_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_SYS_TIME_H''@|$(NEXT_SYS_TIME_H)|g' \ + -e 's/@''GNULIB_GETTIMEOFDAY''@/$(GNULIB_GETTIMEOFDAY)/g' \ + -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \ + -e 's/@''HAVE_GETTIMEOFDAY''@/$(HAVE_GETTIMEOFDAY)/g' \ + -e 's/@''HAVE_STRUCT_TIMEVAL''@/$(HAVE_STRUCT_TIMEVAL)/g' \ + -e 's/@''REPLACE_GETTIMEOFDAY''@/$(REPLACE_GETTIMEOFDAY)/g' \ + -e 's/@''REPLACE_STRUCT_TIMEVAL''@/$(REPLACE_STRUCT_TIMEVAL)/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_time.in.h; \ + } > $@-t && \ + mv $@-t $@ +MOSTLYCLEANFILES += sys/time.h sys/time.h-t + +EXTRA_DIST += sys_time.in.h + +## end gnulib module sys_time + ## begin gnulib module sys_types BUILT_SOURCES += sys/types.h @@ -1511,15 +1569,20 @@ time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $( -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_GETTIMEOFDAY''@/$(GNULIB_GETTIMEOFDAY)/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/@''GNULIB_TIME_RZ''@/$(GNULIB_TIME_RZ)/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|@''HAVE_TIMEZONE_T''@|$(HAVE_TIMEZONE_T)|g' \ + -e 's|@''REPLACE_GMTIME''@|$(REPLACE_GMTIME)|g' \ + -e 's|@''REPLACE_LOCALTIME''@|$(REPLACE_LOCALTIME)|g' \ -e 's|@''REPLACE_LOCALTIME_R''@|$(REPLACE_LOCALTIME_R)|g' \ -e 's|@''REPLACE_MKTIME''@|$(REPLACE_MKTIME)|g' \ -e 's|@''REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \ @@ -1527,6 +1590,7 @@ time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $( -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 's|@''UNISTD_H_DEFINES_STRUCT_TIMESPEC''@|$(UNISTD_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)' \ @@ -1657,6 +1721,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H -e 's|@''REPLACE_FTRUNCATE''@|$(REPLACE_FTRUNCATE)|g' \ -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \ -e 's|@''REPLACE_GETDOMAINNAME''@|$(REPLACE_GETDOMAINNAME)|g' \ + -e 's|@''REPLACE_GETDTABLESIZE''@|$(REPLACE_GETDTABLESIZE)|g' \ -e 's|@''REPLACE_GETLOGIN_R''@|$(REPLACE_GETLOGIN_R)|g' \ -e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \ -e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \ @@ -1669,9 +1734,11 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H -e 's|@''REPLACE_PWRITE''@|$(REPLACE_PWRITE)|g' \ -e 's|@''REPLACE_READ''@|$(REPLACE_READ)|g' \ -e 's|@''REPLACE_READLINK''@|$(REPLACE_READLINK)|g' \ + -e 's|@''REPLACE_READLINKAT''@|$(REPLACE_READLINKAT)|g' \ -e 's|@''REPLACE_RMDIR''@|$(REPLACE_RMDIR)|g' \ -e 's|@''REPLACE_SLEEP''@|$(REPLACE_SLEEP)|g' \ -e 's|@''REPLACE_SYMLINK''@|$(REPLACE_SYMLINK)|g' \ + -e 's|@''REPLACE_SYMLINKAT''@|$(REPLACE_SYMLINKAT)|g' \ -e 's|@''REPLACE_TTYNAME_R''@|$(REPLACE_TTYNAME_R)|g' \ -e 's|@''REPLACE_UNLINK''@|$(REPLACE_UNLINK)|g' \ -e 's|@''REPLACE_UNLINKAT''@|$(REPLACE_UNLINKAT)|g' \ diff --git a/gdb/gnulib/import/Makefile.in b/gdb/gnulib/import/Makefile.in index 97c696354d..00e7c719c0 100644 --- a/gdb/gnulib/import/Makefile.in +++ b/gdb/gnulib/import/Makefile.in @@ -15,7 +15,7 @@ @SET_MAKE@ -# Copyright (C) 2002-2012 Free Software Foundation, Inc. +# Copyright (C) 2002-2015 Free Software Foundation, Inc. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -64,6 +64,7 @@ DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in alloca.c ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/import/m4/00gnulib.m4 \ + $(top_srcdir)/import/m4/absolute-header.m4 \ $(top_srcdir)/import/m4/alloca.m4 \ $(top_srcdir)/import/m4/canonicalize.m4 \ $(top_srcdir)/import/m4/codeset.m4 \ @@ -84,6 +85,7 @@ am__aclocal_m4_deps = $(top_srcdir)/import/m4/00gnulib.m4 \ $(top_srcdir)/import/m4/fpieee.m4 \ $(top_srcdir)/import/m4/frexp.m4 \ $(top_srcdir)/import/m4/frexpl.m4 \ + $(top_srcdir)/import/m4/gettimeofday.m4 \ $(top_srcdir)/import/m4/glibc21.m4 \ $(top_srcdir)/import/m4/gnulib-common.m4 \ $(top_srcdir)/import/m4/gnulib-comp.m4 \ @@ -126,7 +128,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/strtok_r.m4 \ + $(top_srcdir)/import/m4/sys_socket_h.m4 \ $(top_srcdir)/import/m4/sys_stat_h.m4 \ + $(top_srcdir)/import/m4/sys_time_h.m4 \ $(top_srcdir)/import/m4/sys_types_h.m4 \ $(top_srcdir)/import/m4/time_h.m4 \ $(top_srcdir)/import/m4/unistd_h.m4 \ @@ -146,8 +150,8 @@ libgnu_a_AR = $(AR) $(ARFLAGS) am__DEPENDENCIES_1 = am_libgnu_a_OBJECTS = dirname-lgpl.$(OBJEXT) basename-lgpl.$(OBJEXT) \ stripslash.$(OBJEXT) localcharset.$(OBJEXT) malloca.$(OBJEXT) \ - math.$(OBJEXT) stdio.$(OBJEXT) strnlen1.$(OBJEXT) \ - unistd.$(OBJEXT) wctype-h.$(OBJEXT) + math.$(OBJEXT) strnlen1.$(OBJEXT) unistd.$(OBJEXT) \ + wctype-h.$(OBJEXT) libgnu_a_OBJECTS = $(am_libgnu_a_OBJECTS) LTLIBRARIES = $(noinst_LTLIBRARIES) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) @@ -347,6 +351,7 @@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ +GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ GNULIB_GRANTPT = @GNULIB_GRANTPT@ GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@ @@ -450,6 +455,7 @@ GNULIB_PUTCHAR = @GNULIB_PUTCHAR@ GNULIB_PUTENV = @GNULIB_PUTENV@ GNULIB_PUTS = @GNULIB_PUTS@ GNULIB_PWRITE = @GNULIB_PWRITE@ +GNULIB_QSORT_R = @GNULIB_QSORT_R@ GNULIB_RANDOM = @GNULIB_RANDOM@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ @@ -476,6 +482,7 @@ GNULIB_ROUNDL = @GNULIB_ROUNDL@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ GNULIB_SCANDIR = @GNULIB_SCANDIR@ GNULIB_SCANF = @GNULIB_SCANF@ +GNULIB_SECURE_GETENV = @GNULIB_SECURE_GETENV@ GNULIB_SETENV = @GNULIB_SETENV@ GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@ GNULIB_SIGNBIT = @GNULIB_SIGNBIT@ @@ -520,6 +527,7 @@ GNULIB_TANHF = @GNULIB_TANHF@ GNULIB_TANL = @GNULIB_TANL@ GNULIB_TIMEGM = @GNULIB_TIMEGM@ GNULIB_TIME_R = @GNULIB_TIME_R@ +GNULIB_TIME_RZ = @GNULIB_TIME_RZ@ GNULIB_TMPFILE = @GNULIB_TMPFILE@ GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@ GNULIB_TRUNC = @GNULIB_TRUNC@ @@ -715,6 +723,7 @@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ HAVE_GETLOGIN = @HAVE_GETLOGIN@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ +HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@ HAVE_GRANTPT = @HAVE_GRANTPT@ HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ HAVE_HYPOTF = @HAVE_HYPOTF@ @@ -744,6 +753,7 @@ HAVE_LOGF = @HAVE_LOGF@ HAVE_LOGL = @HAVE_LOGL@ HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ HAVE_LSTAT = @HAVE_LSTAT@ +HAVE_MAX_ALIGN_T = @HAVE_MAX_ALIGN_T@ HAVE_MBRLEN = @HAVE_MBRLEN@ HAVE_MBRTOWC = @HAVE_MBRTOWC@ HAVE_MBSINIT = @HAVE_MBSINIT@ @@ -794,6 +804,7 @@ HAVE_RINTL = @HAVE_RINTL@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = @HAVE_SAME_LONG_DOUBLE_AS_DOUBLE@ HAVE_SCANDIR = @HAVE_SCANDIR@ +HAVE_SECURE_GETENV = @HAVE_SECURE_GETENV@ HAVE_SETENV = @HAVE_SETENV@ HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@ HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@ @@ -817,6 +828,7 @@ HAVE_STRTOD = @HAVE_STRTOD@ HAVE_STRTOLL = @HAVE_STRTOLL@ HAVE_STRTOULL = @HAVE_STRTOULL@ HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ +HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ @@ -824,11 +836,13 @@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ +HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ 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_TIMEZONE_T = @HAVE_TIMEZONE_T@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ @@ -868,6 +882,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@ @@ -911,6 +926,7 @@ NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_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_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_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@ @@ -927,6 +943,7 @@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_H@ NEXT_STRING_H = @NEXT_STRING_H@ NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@ +NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@ NEXT_SYS_TYPES_H = @NEXT_SYS_TYPES_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ @@ -1000,10 +1017,13 @@ REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ REPLACE_GETCWD = @REPLACE_GETCWD@ REPLACE_GETDELIM = @REPLACE_GETDELIM@ REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ +REPLACE_GETDTABLESIZE = @REPLACE_GETDTABLESIZE@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ +REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ +REPLACE_GMTIME = @REPLACE_GMTIME@ REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@ REPLACE_HYPOT = @REPLACE_HYPOT@ REPLACE_HYPOTF = @REPLACE_HYPOTF@ @@ -1021,6 +1041,7 @@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LDEXPL = @REPLACE_LDEXPL@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ +REPLACE_LOCALTIME = @REPLACE_LOCALTIME@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LOG = @REPLACE_LOG@ REPLACE_LOG10 = @REPLACE_LOG10@ @@ -1070,9 +1091,11 @@ REPLACE_PTSNAME = @REPLACE_PTSNAME@ REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ +REPLACE_QSORT_R = @REPLACE_QSORT_R@ REPLACE_RANDOM_R = @REPLACE_RANDOM_R@ REPLACE_READ = @REPLACE_READ@ REPLACE_READLINK = @REPLACE_READLINK@ +REPLACE_READLINKAT = @REPLACE_READLINKAT@ REPLACE_REALLOC = @REPLACE_REALLOC@ REPLACE_REALPATH = @REPLACE_REALPATH@ REPLACE_REMAINDER = @REPLACE_REMAINDER@ @@ -1109,7 +1132,10 @@ REPLACE_STRSTR = @REPLACE_STRSTR@ REPLACE_STRTOD = @REPLACE_STRTOD@ REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@ REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ +REPLACE_STRTOUMAX = @REPLACE_STRTOUMAX@ +REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ +REPLACE_SYMLINKAT = @REPLACE_SYMLINKAT@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TMPFILE = @REPLACE_TMPFILE@ REPLACE_TOWLOWER = @REPLACE_TOWLOWER@ @@ -1149,6 +1175,7 @@ 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@ +UNISTD_H_DEFINES_STRUCT_TIMESPEC = @UNISTD_H_DEFINES_STRUCT_TIMESPEC@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ VERSION = @VERSION@ @@ -1204,6 +1231,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -1216,7 +1244,7 @@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -AUTOMAKE_OPTIONS = 1.5 gnits +AUTOMAKE_OPTIONS = 1.9.6 gnits SUBDIRS = noinst_HEADERS = noinst_LIBRARIES = libgnu.a @@ -1224,22 +1252,23 @@ noinst_LTLIBRARIES = EXTRA_DIST = m4/gnulib-cache.m4 alloca.c alloca.in.h \ canonicalize-lgpl.c dirent.in.h dirfd.c dirname.h dosname.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 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 lstat.c malloc.c malloca.h malloca.valgrind \ - 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 readlink.c rename.c rmdir.c \ - same-inode.h $(top_srcdir)/import/extra/snippet/_Noreturn.h \ + fnmatch_loop.c fpucw.h frexp.c frexp.c frexpl.c gettimeofday.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 lstat.c malloc.c malloca.h \ + malloca.valgrind 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 readlink.c \ + rename.c rmdir.c same-inode.h \ + $(top_srcdir)/import/extra/snippet/_Noreturn.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 stat.c \ stdbool.in.h stddef.in.h stdint.in.h stdio.in.h stdlib.in.h \ streq.h string.in.h str-two-way.h strstr.c strtok_r.c \ - 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 + sys_stat.in.h sys_time.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 # The BUILT_SOURCES created by this Makefile snippet are not used via #include # statements but through direct file reference. Therefore this snippet must be @@ -1253,8 +1282,8 @@ EXTRA_DIST = m4/gnulib-cache.m4 alloca.c alloca.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) \ - stdio.h stdlib.h string.h sys/stat.h sys/types.h time.h \ - unistd.h wchar.h wctype.h + stdio.h stdlib.h string.h sys/stat.h sys/time.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 \ @@ -1263,8 +1292,9 @@ MOSTLYCLEANFILES = core *.stackdump alloca.h alloca.h-t dirent.h \ warn-on-use.h warn-on-use.h-t stdbool.h stdbool.h-t stddef.h \ stddef.h-t stdint.h stdint.h-t stdio.h stdio.h-t stdlib.h \ stdlib.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 + sys/time.h sys/time.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 @@ -1273,15 +1303,21 @@ MAINTAINERCLEANFILES = AM_CPPFLAGS = AM_CFLAGS = libgnu_a_SOURCES = dirname-lgpl.c basename-lgpl.c stripslash.c \ - localcharset.h localcharset.c malloca.c math.c stdio.c \ - strnlen1.h strnlen1.c unistd.c wctype-h.c + localcharset.h localcharset.c malloca.c math.c strnlen1.h \ + strnlen1.c unistd.c wctype-h.c libgnu_a_LIBADD = $(gl_LIBOBJS) @ALLOCA@ libgnu_a_DEPENDENCIES = $(gl_LIBOBJS) @ALLOCA@ EXTRA_libgnu_a_SOURCES = alloca.c canonicalize-lgpl.c dirfd.c float.c \ itold.c fnmatch.c fnmatch_loop.c frexp.c frexp.c frexpl.c \ - isnan.c isnand.c isnan.c isnanl.c lstat.c malloc.c mbrtowc.c \ - mbsinit.c mbsrtowcs-state.c mbsrtowcs.c memchr.c memmem.c \ - readlink.c rename.c rmdir.c stat.c strstr.c strtok_r.c + gettimeofday.c isnan.c isnand.c isnan.c isnanl.c lstat.c \ + malloc.c mbrtowc.c mbsinit.c mbsrtowcs-state.c mbsrtowcs.c \ + memchr.c memmem.c readlink.c rename.c rmdir.c stat.c strstr.c \ + strtok_r.c + +# Use this preprocessor expression to decide whether #include_next works. +# Do not rely on a 'configure'-time test for this, since the expression +# might appear in an installed header, which is used by some other compiler. +HAVE_INCLUDE_NEXT = (__GNUC__ || 60000000 <= __DECC_VER) charset_alias = $(DESTDIR)$(libdir)/charset.alias charset_tmp = $(DESTDIR)$(libdir)/charset.tmp @@ -1361,6 +1397,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fnmatch_loop.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/frexp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/frexpl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gettimeofday.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isnan.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isnand.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isnanl.Po@am__quote@ @@ -1380,7 +1417,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rename.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rmdir.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stat.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stdio.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stripslash.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@ @@ -1735,7 +1771,7 @@ uninstall-am: uninstall-local @GL_GENERATE_ALLOCA_H_FALSE@ rm -f $@ # Listed in the same order as the GNU makefile conventions, and -# provided by autoconf 2.59c+. +# provided by autoconf 2.59c+ or 2.70. # The Automake-defined pkg* macros are appended, in the order # listed in the Automake 1.10a+ documentation. configmake.h: Makefile @@ -1751,6 +1787,7 @@ configmake.h: Makefile echo '#define SYSCONFDIR "$(sysconfdir)"'; \ echo '#define SHAREDSTATEDIR "$(sharedstatedir)"'; \ echo '#define LOCALSTATEDIR "$(localstatedir)"'; \ + echo '#define RUNSTATEDIR "$(runstatedir)"'; \ echo '#define INCLUDEDIR "$(includedir)"'; \ echo '#define OLDINCLUDEDIR "$(oldincludedir)"'; \ echo '#define DOCDIR "$(docdir)"'; \ @@ -1885,6 +1922,7 @@ inttypes.h: inttypes.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_U -e 's/@''HAVE_DECL_STRTOIMAX''@/$(HAVE_DECL_STRTOIMAX)/g' \ -e 's/@''HAVE_DECL_STRTOUMAX''@/$(HAVE_DECL_STRTOUMAX)/g' \ -e 's/@''REPLACE_STRTOIMAX''@/$(REPLACE_STRTOIMAX)/g' \ + -e 's/@''REPLACE_STRTOUMAX''@/$(REPLACE_STRTOUMAX)/g' \ -e 's/@''INT32_MAX_LT_INTMAX_MAX''@/$(INT32_MAX_LT_INTMAX_MAX)/g' \ -e 's/@''INT64_MAX_EQ_LONG_MAX''@/$(INT64_MAX_EQ_LONG_MAX)/g' \ -e 's/@''UINT32_MAX_LT_UINTMAX_MAX''@/$(UINT32_MAX_LT_UINTMAX_MAX)/g' \ @@ -2276,6 +2314,7 @@ warn-on-use.h: $(top_srcdir)/import/extra/snippet/warn-on-use.h @GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ @GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ @GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''NEXT_STDDEF_H''@|$(NEXT_STDDEF_H)|g' \ +@GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''HAVE_MAX_ALIGN_T''@|$(HAVE_MAX_ALIGN_T)|g' \ @GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''HAVE_WCHAR_T''@|$(HAVE_WCHAR_T)|g' \ @GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''REPLACE_NULL''@|$(REPLACE_NULL)|g' \ @GL_GENERATE_STDDEF_H_TRUE@ < $(srcdir)/stddef.in.h; \ @@ -2470,11 +2509,13 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \ -e 's/@''GNULIB_PTSNAME''@/$(GNULIB_PTSNAME)/g' \ -e 's/@''GNULIB_PTSNAME_R''@/$(GNULIB_PTSNAME_R)/g' \ -e 's/@''GNULIB_PUTENV''@/$(GNULIB_PUTENV)/g' \ + -e 's/@''GNULIB_QSORT_R''@/$(GNULIB_QSORT_R)/g' \ -e 's/@''GNULIB_RANDOM''@/$(GNULIB_RANDOM)/g' \ -e 's/@''GNULIB_RANDOM_R''@/$(GNULIB_RANDOM_R)/g' \ -e 's/@''GNULIB_REALLOC_POSIX''@/$(GNULIB_REALLOC_POSIX)/g' \ -e 's/@''GNULIB_REALPATH''@/$(GNULIB_REALPATH)/g' \ -e 's/@''GNULIB_RPMATCH''@/$(GNULIB_RPMATCH)/g' \ + -e 's/@''GNULIB_SECURE_GETENV''@/$(GNULIB_SECURE_GETENV)/g' \ -e 's/@''GNULIB_SETENV''@/$(GNULIB_SETENV)/g' \ -e 's/@''GNULIB_STRTOD''@/$(GNULIB_STRTOD)/g' \ -e 's/@''GNULIB_STRTOLL''@/$(GNULIB_STRTOLL)/g' \ @@ -2503,6 +2544,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \ -e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \ -e 's|@''HAVE_REALPATH''@|$(HAVE_REALPATH)|g' \ -e 's|@''HAVE_RPMATCH''@|$(HAVE_RPMATCH)|g' \ + -e 's|@''HAVE_SECURE_GETENV''@|$(HAVE_SECURE_GETENV)|g' \ -e 's|@''HAVE_DECL_SETENV''@|$(HAVE_DECL_SETENV)|g' \ -e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \ -e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \ @@ -2519,6 +2561,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \ -e 's|@''REPLACE_PTSNAME''@|$(REPLACE_PTSNAME)|g' \ -e 's|@''REPLACE_PTSNAME_R''@|$(REPLACE_PTSNAME_R)|g' \ -e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \ + -e 's|@''REPLACE_QSORT_R''@|$(REPLACE_QSORT_R)|g' \ -e 's|@''REPLACE_RANDOM_R''@|$(REPLACE_RANDOM_R)|g' \ -e 's|@''REPLACE_REALLOC''@|$(REPLACE_REALLOC)|g' \ -e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \ @@ -2676,6 +2719,31 @@ sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNU } > $@-t && \ mv $@-t $@ +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +sys/time.h: sys_time.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/@''HAVE_SYS_TIME_H''@/$(HAVE_SYS_TIME_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_SYS_TIME_H''@|$(NEXT_SYS_TIME_H)|g' \ + -e 's/@''GNULIB_GETTIMEOFDAY''@/$(GNULIB_GETTIMEOFDAY)/g' \ + -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \ + -e 's/@''HAVE_GETTIMEOFDAY''@/$(HAVE_GETTIMEOFDAY)/g' \ + -e 's/@''HAVE_STRUCT_TIMEVAL''@/$(HAVE_STRUCT_TIMEVAL)/g' \ + -e 's/@''REPLACE_GETTIMEOFDAY''@/$(REPLACE_GETTIMEOFDAY)/g' \ + -e 's/@''REPLACE_STRUCT_TIMEVAL''@/$(REPLACE_STRUCT_TIMEVAL)/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_time.in.h; \ + } > $@-t && \ + mv $@-t $@ + # We need the following in order to create when the system # doesn't have one that works with the given compiler. sys/types.h: sys_types.in.h $(top_builddir)/config.status @@ -2702,15 +2770,20 @@ time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $( -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_GETTIMEOFDAY''@/$(GNULIB_GETTIMEOFDAY)/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/@''GNULIB_TIME_RZ''@/$(GNULIB_TIME_RZ)/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|@''HAVE_TIMEZONE_T''@|$(HAVE_TIMEZONE_T)|g' \ + -e 's|@''REPLACE_GMTIME''@|$(REPLACE_GMTIME)|g' \ + -e 's|@''REPLACE_LOCALTIME''@|$(REPLACE_LOCALTIME)|g' \ -e 's|@''REPLACE_LOCALTIME_R''@|$(REPLACE_LOCALTIME_R)|g' \ -e 's|@''REPLACE_MKTIME''@|$(REPLACE_MKTIME)|g' \ -e 's|@''REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \ @@ -2718,6 +2791,7 @@ time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $( -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 's|@''UNISTD_H_DEFINES_STRUCT_TIMESPEC''@|$(UNISTD_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)' \ @@ -2838,6 +2912,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H -e 's|@''REPLACE_FTRUNCATE''@|$(REPLACE_FTRUNCATE)|g' \ -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \ -e 's|@''REPLACE_GETDOMAINNAME''@|$(REPLACE_GETDOMAINNAME)|g' \ + -e 's|@''REPLACE_GETDTABLESIZE''@|$(REPLACE_GETDTABLESIZE)|g' \ -e 's|@''REPLACE_GETLOGIN_R''@|$(REPLACE_GETLOGIN_R)|g' \ -e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \ -e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \ @@ -2850,9 +2925,11 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H -e 's|@''REPLACE_PWRITE''@|$(REPLACE_PWRITE)|g' \ -e 's|@''REPLACE_READ''@|$(REPLACE_READ)|g' \ -e 's|@''REPLACE_READLINK''@|$(REPLACE_READLINK)|g' \ + -e 's|@''REPLACE_READLINKAT''@|$(REPLACE_READLINKAT)|g' \ -e 's|@''REPLACE_RMDIR''@|$(REPLACE_RMDIR)|g' \ -e 's|@''REPLACE_SLEEP''@|$(REPLACE_SLEEP)|g' \ -e 's|@''REPLACE_SYMLINK''@|$(REPLACE_SYMLINK)|g' \ + -e 's|@''REPLACE_SYMLINKAT''@|$(REPLACE_SYMLINKAT)|g' \ -e 's|@''REPLACE_TTYNAME_R''@|$(REPLACE_TTYNAME_R)|g' \ -e 's|@''REPLACE_UNLINK''@|$(REPLACE_UNLINK)|g' \ -e 's|@''REPLACE_UNLINKAT''@|$(REPLACE_UNLINKAT)|g' \ diff --git a/gdb/gnulib/import/alloca.in.h b/gdb/gnulib/import/alloca.in.h index d20f4b8f1c..906fe92379 100644 --- a/gdb/gnulib/import/alloca.in.h +++ b/gdb/gnulib/import/alloca.in.h @@ -1,6 +1,6 @@ /* Memory allocation on the stack. - Copyright (C) 1995, 1999, 2001-2004, 2006-2012 Free Software Foundation, + Copyright (C) 1995, 1999, 2001-2004, 2006-2015 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it diff --git a/gdb/gnulib/import/basename-lgpl.c b/gdb/gnulib/import/basename-lgpl.c index 43ef8c211b..aae1280f2f 100644 --- a/gdb/gnulib/import/basename-lgpl.c +++ b/gdb/gnulib/import/basename-lgpl.c @@ -1,6 +1,6 @@ /* basename.c -- return the last element in a file name - Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2012 Free Software + Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify diff --git a/gdb/gnulib/import/canonicalize-lgpl.c b/gdb/gnulib/import/canonicalize-lgpl.c index 6d26fa6ee3..1c9f2ee91b 100644 --- a/gdb/gnulib/import/canonicalize-lgpl.c +++ b/gdb/gnulib/import/canonicalize-lgpl.c @@ -1,5 +1,5 @@ /* Return the canonical absolute name of a given file. - Copyright (C) 1996-2012 Free Software Foundation, Inc. + Copyright (C) 1996-2015 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 @@ -16,16 +16,16 @@ along with this program. If not, see . */ #ifndef _LIBC +/* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc + optimizes away the name == NULL test below. */ +# define _GL_ARG_NONNULL(params) + # define _GL_USE_STDLIB_ALLOC 1 # include #endif #if !HAVE_CANONICALIZE_FILE_NAME || !FUNC_REALPATH_WORKS || defined _LIBC -/* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc - optimizes away the name == NULL test below. */ -#define _GL_ARG_NONNULL(params) - /* Specification. */ #include diff --git a/gdb/gnulib/import/config.charset b/gdb/gnulib/import/config.charset index 0a3b343add..f06d7e9f00 100644 --- a/gdb/gnulib/import/config.charset +++ b/gdb/gnulib/import/config.charset @@ -1,7 +1,7 @@ #! /bin/sh # Output a system dependent table of character encoding aliases. # -# Copyright (C) 2000-2004, 2006-2012 Free Software Foundation, Inc. +# Copyright (C) 2000-2004, 2006-2015 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 @@ -348,12 +348,10 @@ case "$os" in #echo "sun_eu_greek ?" # what is this? echo "UTF-8 UTF-8" ;; - freebsd* | os2*) + freebsd*) # FreeBSD 4.2 doesn't have nl_langinfo(CODESET); therefore # localcharset.c falls back to using the full locale name # from the environment variables. - # Likewise for OS/2. OS/2 has XFree86 just like FreeBSD. Just - # reuse FreeBSD's locale data for OS/2. echo "C ASCII" echo "US-ASCII ASCII" for l in la_LN lt_LN; do diff --git a/gdb/gnulib/import/dirent.in.h b/gdb/gnulib/import/dirent.in.h index cdbc5fd4fd..154d2689e3 100644 --- a/gdb/gnulib/import/dirent.in.h +++ b/gdb/gnulib/import/dirent.in.h @@ -1,5 +1,5 @@ /* A GNU-like . - Copyright (C) 2006-2012 Free Software Foundation, Inc. + Copyright (C) 2006-2015 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 @@ -77,6 +77,7 @@ typedef struct gl_directory DIR; # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef opendir # define opendir rpl_opendir +# define GNULIB_defined_opendir 1 # endif _GL_FUNCDECL_RPL (opendir, DIR *, (const char *dir_name) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (opendir, DIR *, (const char *dir_name)); @@ -128,6 +129,7 @@ _GL_WARN_ON_USE (rewinddir, "rewinddir is not portable - " # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef closedir # define closedir rpl_closedir +# define GNULIB_defined_closedir 1 # endif _GL_FUNCDECL_RPL (closedir, int, (DIR *dirp) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (closedir, int, (DIR *dirp)); diff --git a/gdb/gnulib/import/dirfd.c b/gdb/gnulib/import/dirfd.c index 2f4d424f48..c91f8e5587 100644 --- a/gdb/gnulib/import/dirfd.c +++ b/gdb/gnulib/import/dirfd.c @@ -1,6 +1,6 @@ /* dirfd.c -- return the file descriptor associated with an open DIR* - Copyright (C) 2001, 2006, 2008-2012 Free Software Foundation, Inc. + Copyright (C) 2001, 2006, 2008-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gdb/gnulib/import/dirname-lgpl.c b/gdb/gnulib/import/dirname-lgpl.c index 2895cbcb28..98391356fd 100644 --- a/gdb/gnulib/import/dirname-lgpl.c +++ b/gdb/gnulib/import/dirname-lgpl.c @@ -1,6 +1,6 @@ /* dirname.c -- return all but the last element in a file name - Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2012 Free Software + Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify diff --git a/gdb/gnulib/import/dirname.h b/gdb/gnulib/import/dirname.h index 51a685c3a4..55021ec5e6 100644 --- a/gdb/gnulib/import/dirname.h +++ b/gdb/gnulib/import/dirname.h @@ -1,6 +1,6 @@ /* Take file names apart into directory and base names. - Copyright (C) 1998, 2001, 2003-2006, 2009-2012 Free Software Foundation, + Copyright (C) 1998, 2001, 2003-2006, 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -31,6 +31,10 @@ # define DOUBLE_SLASH_IS_DISTINCT_ROOT 0 # endif +#ifdef __cplusplus +extern "C" { +#endif + # if GNULIB_DIRNAME char *base_name (char const *file); char *dir_name (char const *file); @@ -43,4 +47,8 @@ char *last_component (char const *file) _GL_ATTRIBUTE_PURE; bool strip_trailing_slashes (char *file); +#ifdef __cplusplus +} /* extern "C" */ +#endif + #endif /* not DIRNAME_H_ */ diff --git a/gdb/gnulib/import/dosname.h b/gdb/gnulib/import/dosname.h index 0468ce4dc8..893baf6ccf 100644 --- a/gdb/gnulib/import/dosname.h +++ b/gdb/gnulib/import/dosname.h @@ -1,6 +1,6 @@ /* File names on MS-DOS/Windows systems. - Copyright (C) 2000-2001, 2004-2006, 2009-2012 Free Software Foundation, Inc. + Copyright (C) 2000-2001, 2004-2006, 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gdb/gnulib/import/errno.in.h b/gdb/gnulib/import/errno.in.h index f9612c3aff..affbb97988 100644 --- a/gdb/gnulib/import/errno.in.h +++ b/gdb/gnulib/import/errno.in.h @@ -1,6 +1,6 @@ /* A POSIX-like . - Copyright (C) 2008-2012 Free Software Foundation, Inc. + Copyright (C) 2008-2015 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gdb/gnulib/import/extra/snippet/arg-nonnull.h b/gdb/gnulib/import/extra/snippet/arg-nonnull.h index 3a9dd2664e..0d55e2bced 100644 --- a/gdb/gnulib/import/extra/snippet/arg-nonnull.h +++ b/gdb/gnulib/import/extra/snippet/arg-nonnull.h @@ -1,5 +1,5 @@ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2012 Free Software Foundation, Inc. + Copyright (C) 2009-2015 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 diff --git a/gdb/gnulib/import/extra/snippet/c++defs.h b/gdb/gnulib/import/extra/snippet/c++defs.h index 96da94b97b..585b38ab39 100644 --- a/gdb/gnulib/import/extra/snippet/c++defs.h +++ b/gdb/gnulib/import/extra/snippet/c++defs.h @@ -1,5 +1,5 @@ /* C++ compatible function declaration macros. - Copyright (C) 2010-2012 Free Software Foundation, Inc. + Copyright (C) 2010-2015 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 diff --git a/gdb/gnulib/import/extra/snippet/warn-on-use.h b/gdb/gnulib/import/extra/snippet/warn-on-use.h index 51e69bbd9b..90f4985ce1 100644 --- a/gdb/gnulib/import/extra/snippet/warn-on-use.h +++ b/gdb/gnulib/import/extra/snippet/warn-on-use.h @@ -1,5 +1,5 @@ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2012 Free Software Foundation, Inc. + Copyright (C) 2010-2015 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 diff --git a/gdb/gnulib/import/extra/update-copyright b/gdb/gnulib/import/extra/update-copyright old mode 100644 new mode 100755 index 082b749d62..8cc36e22d5 --- a/gdb/gnulib/import/extra/update-copyright +++ b/gdb/gnulib/import/extra/update-copyright @@ -3,9 +3,9 @@ eval '(exit $?0)' && eval 'exec perl -wS -0777 -pi "$0" ${1+"$@"}' if 0; # Update an FSF copyright year list to include the current year. -my $VERSION = '2012-02-05.21:39'; # UTC +my $VERSION = '2015-01-15.20:53'; # UTC -# Copyright (C) 2009-2012 Free Software Foundation, Inc. +# Copyright (C) 2009-2015 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 @@ -124,7 +124,7 @@ use strict; use warnings; my $copyright_re = 'Copyright'; -my $circle_c_re = '(?:\([cC]\)|@copyright{}|©)'; +my $circle_c_re = '(?:\([cC]\)|@copyright\{}|\\\\\(co|©)'; my $holder = $ENV{UPDATE_COPYRIGHT_HOLDER}; $holder ||= 'Free Software Foundation, Inc.'; my $prefix_max = 5; @@ -192,7 +192,7 @@ if (defined $stmt_re) if ($final_year != $this_year) { # Update the year. - $stmt =~ s/$final_year_orig/$final_year, $this_year/; + $stmt =~ s/\b$final_year_orig\b/$final_year, $this_year/; } if ($final_year != $this_year || $ENV{'UPDATE_COPYRIGHT_FORCE'}) { diff --git a/gdb/gnulib/import/float+.h b/gdb/gnulib/import/float+.h index 75e56a1219..e6aaa922da 100644 --- a/gdb/gnulib/import/float+.h +++ b/gdb/gnulib/import/float+.h @@ -1,5 +1,5 @@ /* Supplemental information about the floating-point formats. - Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc. Written by Bruno Haible , 2007. This program is free software; you can redistribute it and/or modify diff --git a/gdb/gnulib/import/float.c b/gdb/gnulib/import/float.c index ea31866548..dac9f88e34 100644 --- a/gdb/gnulib/import/float.c +++ b/gdb/gnulib/import/float.c @@ -1,5 +1,5 @@ /* Auxiliary definitions for . - Copyright (C) 2011-2012 Free Software Foundation, Inc. + Copyright (C) 2011-2015 Free Software Foundation, Inc. Written by Bruno Haible , 2011. This program is free software: you can redistribute it and/or modify diff --git a/gdb/gnulib/import/float.in.h b/gdb/gnulib/import/float.in.h index b4205103be..3bb3826474 100644 --- a/gdb/gnulib/import/float.in.h +++ b/gdb/gnulib/import/float.in.h @@ -1,6 +1,6 @@ /* A correct . - Copyright (C) 2007-2012 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gdb/gnulib/import/fnmatch.c b/gdb/gnulib/import/fnmatch.c index 842182bf6a..f4a9e7c674 100644 --- a/gdb/gnulib/import/fnmatch.c +++ b/gdb/gnulib/import/fnmatch.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-1993, 1996-2007, 2009-2012 Free Software Foundation, Inc. +/* Copyright (C) 1991-1993, 1996-2007, 2009-2015 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gdb/gnulib/import/fnmatch.in.h b/gdb/gnulib/import/fnmatch.in.h index b0a3c95b97..eb5815a08a 100644 --- a/gdb/gnulib/import/fnmatch.in.h +++ b/gdb/gnulib/import/fnmatch.in.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-1993, 1996-1999, 2001-2003, 2005, 2007, 2009-2012 Free +/* Copyright (C) 1991-1993, 1996-1999, 2001-2003, 2005, 2007, 2009-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. diff --git a/gdb/gnulib/import/fnmatch_loop.c b/gdb/gnulib/import/fnmatch_loop.c index 048079e11f..61778bdd57 100644 --- a/gdb/gnulib/import/fnmatch_loop.c +++ b/gdb/gnulib/import/fnmatch_loop.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-1993, 1996-2006, 2009-2012 Free Software Foundation, Inc. +/* Copyright (C) 1991-1993, 1996-2006, 2009-2015 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 @@ -227,6 +227,8 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end, c = *p++; for (;;) { + bool is_range = false; + if (!(flags & FNM_NOESCAPE) && c == L_('\\')) { if (*p == L_('\0')) @@ -420,8 +422,6 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end, } else { - bool is_range = false; - #ifdef _LIBC bool is_seqval = false; diff --git a/gdb/gnulib/import/fpucw.h b/gdb/gnulib/import/fpucw.h index 23e4c81411..cedd5b427f 100644 --- a/gdb/gnulib/import/fpucw.h +++ b/gdb/gnulib/import/fpucw.h @@ -1,5 +1,5 @@ /* Manipulating the FPU control word. - Copyright (C) 2007-2012 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. Written by Bruno Haible , 2007. This program is free software: you can redistribute it and/or modify diff --git a/gdb/gnulib/import/frexp.c b/gdb/gnulib/import/frexp.c index 4f5d0c03e8..776bd53c62 100644 --- a/gdb/gnulib/import/frexp.c +++ b/gdb/gnulib/import/frexp.c @@ -1,5 +1,5 @@ /* Split a double into fraction and mantissa. - Copyright (C) 2007-2012 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gdb/gnulib/import/frexpl.c b/gdb/gnulib/import/frexpl.c index b74ceeb56f..e09cc108c6 100644 --- a/gdb/gnulib/import/frexpl.c +++ b/gdb/gnulib/import/frexpl.c @@ -1,5 +1,5 @@ /* Split a 'long double' into fraction and mantissa. - Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gdb/gnulib/import/gettimeofday.c b/gdb/gnulib/import/gettimeofday.c new file mode 100644 index 0000000000..e0e2e696d0 --- /dev/null +++ b/gdb/gnulib/import/gettimeofday.c @@ -0,0 +1,154 @@ +/* Provide gettimeofday for systems that don't have it or for which it's broken. + + Copyright (C) 2001-2003, 2005-2007, 2009-2015 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 . */ + +/* written by Jim Meyering */ + +#include + +/* Specification. */ +#include + +#include + +#if HAVE_SYS_TIMEB_H +# include +#endif + +#if GETTIMEOFDAY_CLOBBERS_LOCALTIME || TZSET_CLOBBERS_LOCALTIME + +/* Work around the bug in some systems whereby gettimeofday clobbers + the static buffer that localtime uses for its return value. The + gettimeofday function from Mac OS X 10.0.4 (i.e., Darwin 1.3.7) has + this problem. The tzset replacement is necessary for at least + Solaris 2.5, 2.5.1, and 2.6. */ + +static struct tm tm_zero_buffer; +static struct tm *localtime_buffer_addr = &tm_zero_buffer; + +# undef localtime +extern struct tm *localtime (time_t const *); + +# undef gmtime +extern struct tm *gmtime (time_t const *); + +/* This is a wrapper for localtime. It is used only on systems for which + gettimeofday clobbers the static buffer used for localtime's result. + + On the first call, record the address of the static buffer that + localtime uses for its result. */ + +struct tm * +rpl_localtime (time_t const *timep) +{ + struct tm *tm = localtime (timep); + + if (localtime_buffer_addr == &tm_zero_buffer) + localtime_buffer_addr = tm; + + return tm; +} + +/* Same as above, since gmtime and localtime use the same buffer. */ +struct tm * +rpl_gmtime (time_t const *timep) +{ + struct tm *tm = gmtime (timep); + + if (localtime_buffer_addr == &tm_zero_buffer) + localtime_buffer_addr = tm; + + return tm; +} + +#endif /* GETTIMEOFDAY_CLOBBERS_LOCALTIME || TZSET_CLOBBERS_LOCALTIME */ + +#if TZSET_CLOBBERS_LOCALTIME + +# undef tzset +extern void tzset (void); + +/* This is a wrapper for tzset, for systems on which tzset may clobber + the static buffer used for localtime's result. */ +void +rpl_tzset (void) +{ + /* Save and restore the contents of the buffer used for localtime's + result around the call to tzset. */ + struct tm save = *localtime_buffer_addr; + tzset (); + *localtime_buffer_addr = save; +} +#endif + +/* This is a wrapper for gettimeofday. It is used only on systems + that lack this function, or whose implementation of this function + causes problems. */ + +int +gettimeofday (struct timeval *restrict tv, void *restrict tz) +{ +#undef gettimeofday +#if HAVE_GETTIMEOFDAY +# if GETTIMEOFDAY_CLOBBERS_LOCALTIME + /* Save and restore the contents of the buffer used for localtime's + result around the call to gettimeofday. */ + struct tm save = *localtime_buffer_addr; +# endif + +# if defined timeval /* 'struct timeval' overridden by gnulib? */ +# undef timeval + struct timeval otv; + int result = gettimeofday (&otv, (struct timezone *) tz); + if (result == 0) + { + tv->tv_sec = otv.tv_sec; + tv->tv_usec = otv.tv_usec; + } +# else + int result = gettimeofday (tv, (struct timezone *) tz); +# endif + +# if GETTIMEOFDAY_CLOBBERS_LOCALTIME + *localtime_buffer_addr = save; +# endif + + return result; + +#else + +# if HAVE__FTIME + + struct _timeb timebuf; + _ftime (&timebuf); + tv->tv_sec = timebuf.time; + tv->tv_usec = timebuf.millitm * 1000; + +# else + +# if !defined OK_TO_USE_1S_CLOCK +# error "Only 1-second nominal clock resolution found. Is that intended?" \ + "If so, compile with the -DOK_TO_USE_1S_CLOCK option." +# endif + tv->tv_sec = time (NULL); + tv->tv_usec = 0; + +# endif + + return 0; + +#endif +} diff --git a/gdb/gnulib/import/inttypes.in.h b/gdb/gnulib/import/inttypes.in.h index b9da2b5b09..78846f6968 100644 --- a/gdb/gnulib/import/inttypes.in.h +++ b/gdb/gnulib/import/inttypes.in.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006-2012 Free Software Foundation, Inc. +/* Copyright (C) 2006-2015 Free Software Foundation, Inc. Written by Paul Eggert, Bruno Haible, Derek Price. This file is part of gnulib. @@ -51,6 +51,10 @@ #endif /* Get CHAR_BIT. */ #include +/* On mingw, __USE_MINGW_ANSI_STDIO only works if is also included */ +#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# include +#endif #if !(INT_MIN == INT32_MIN && INT_MAX == INT32_MAX) # error "This file assumes that 'int' has exactly 32 bits. Please report your platform and compiler to ." @@ -1105,12 +1109,22 @@ _GL_WARN_ON_USE (strtoimax, "strtoimax is unportable - " #endif #if @GNULIB_STRTOUMAX@ -# if !@HAVE_DECL_STRTOUMAX@ -# undef strtoumax +# if @REPLACE_STRTOUMAX@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef strtoumax +# define strtoumax rpl_strtoumax +# endif +_GL_FUNCDECL_RPL (strtoumax, uintmax_t, + (const char *, char **, int) _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (strtoumax, uintmax_t, (const char *, char **, int)); +# else +# if !@HAVE_DECL_STRTOUMAX@ +# undef strtoumax _GL_FUNCDECL_SYS (strtoumax, uintmax_t, (const char *, char **, int) _GL_ARG_NONNULL ((1))); -# endif +# endif _GL_CXXALIAS_SYS (strtoumax, uintmax_t, (const char *, char **, int)); +# endif _GL_CXXALIASWARN (strtoumax); #elif defined GNULIB_POSIXCHECK # undef strtoumax diff --git a/gdb/gnulib/import/isnan.c b/gdb/gnulib/import/isnan.c index a5a7d92c03..5eb11d9aa3 100644 --- a/gdb/gnulib/import/isnan.c +++ b/gdb/gnulib/import/isnan.c @@ -1,5 +1,5 @@ /* Test for NaN that does not need libm. - Copyright (C) 2007-2012 Free Software Foundation, Inc. + Copyright (C) 2007-2015 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 @@ -79,10 +79,21 @@ extern int rpl_isnanf (float x); ((sizeof (DOUBLE) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) typedef union { DOUBLE value; unsigned int word[NWORDS]; } memory_double; +/* Most hosts nowadays use IEEE floating point, so they use IEC 60559 + representations, have infinities and NaNs, and do not trap on + exceptions. Define IEEE_FLOATING_POINT if this host is one of the + typical ones. The C11 macro __STDC_IEC_559__ is close to what is + wanted here, but is not quite right because this file does not require + all the features of C11 Annex F (and does not require C11 at all, + for that matter). */ + +#define IEEE_FLOATING_POINT (FLT_RADIX == 2 && FLT_MANT_DIG == 24 \ + && FLT_MIN_EXP == -125 && FLT_MAX_EXP == 128) + int FUNC (DOUBLE x) { -#ifdef KNOWN_EXPBIT0_LOCATION +#if defined KNOWN_EXPBIT0_LOCATION && IEEE_FLOATING_POINT # if defined USE_LONG_DOUBLE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE /* Special CPU dependent code is needed to treat bit patterns outside the IEEE 754 specification (such as Pseudo-NaNs, Pseudo-Infinities, @@ -153,8 +164,9 @@ FUNC (DOUBLE x) } # endif #else - /* The configuration did not find sufficient information. Give up about - the signaling NaNs, handle only the quiet NaNs. */ + /* The configuration did not find sufficient information, or does + not use IEEE floating point. Give up about the signaling NaNs; + handle only the quiet NaNs. */ if (x == x) { # if defined USE_LONG_DOUBLE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE diff --git a/gdb/gnulib/import/isnand-nolibm.h b/gdb/gnulib/import/isnand-nolibm.h index 56fb27094c..ca3a87af26 100644 --- a/gdb/gnulib/import/isnand-nolibm.h +++ b/gdb/gnulib/import/isnand-nolibm.h @@ -1,5 +1,5 @@ /* Test for NaN that does not need libm. - Copyright (C) 2007-2012 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gdb/gnulib/import/isnand.c b/gdb/gnulib/import/isnand.c index ef815f3c95..3fd803b90a 100644 --- a/gdb/gnulib/import/isnand.c +++ b/gdb/gnulib/import/isnand.c @@ -1,5 +1,5 @@ /* Test for NaN that does not need libm. - Copyright (C) 2008-2012 Free Software Foundation, Inc. + Copyright (C) 2008-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gdb/gnulib/import/isnanl-nolibm.h b/gdb/gnulib/import/isnanl-nolibm.h index 58d963dbc3..22d536d594 100644 --- a/gdb/gnulib/import/isnanl-nolibm.h +++ b/gdb/gnulib/import/isnanl-nolibm.h @@ -1,5 +1,5 @@ /* Test for NaN that does not need libm. - Copyright (C) 2007-2012 Free Software Foundation, Inc. + Copyright (C) 2007-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gdb/gnulib/import/isnanl.c b/gdb/gnulib/import/isnanl.c index 597ac2a8fe..8f05eb73f7 100644 --- a/gdb/gnulib/import/isnanl.c +++ b/gdb/gnulib/import/isnanl.c @@ -1,5 +1,5 @@ /* Test for NaN that does not need libm. - Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gdb/gnulib/import/itold.c b/gdb/gnulib/import/itold.c index 95ff7e1785..1eee03e345 100644 --- a/gdb/gnulib/import/itold.c +++ b/gdb/gnulib/import/itold.c @@ -1,5 +1,5 @@ /* Replacement for 'int' to 'long double' conversion routine. - Copyright (C) 2011-2012 Free Software Foundation, Inc. + Copyright (C) 2011-2015 Free Software Foundation, Inc. Written by Bruno Haible , 2011. This program is free software: you can redistribute it and/or modify diff --git a/gdb/gnulib/import/localcharset.c b/gdb/gnulib/import/localcharset.c index 8d16c87a76..1f02aa5988 100644 --- a/gdb/gnulib/import/localcharset.c +++ b/gdb/gnulib/import/localcharset.c @@ -1,6 +1,6 @@ /* Determine a canonical name for the current locale's character encoding. - Copyright (C) 2000-2006, 2008-2012 Free Software Foundation, Inc. + Copyright (C) 2000-2006, 2008-2015 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 @@ -34,6 +34,7 @@ #if defined _WIN32 || defined __WIN32__ # define WINDOWS_NATIVE +# include #endif #if defined __EMX__ @@ -65,6 +66,11 @@ # include #endif +/* For MB_CUR_MAX_L */ +#if defined DARWIN7 +# include +#endif + #if ENABLE_RELOCATABLE # include "relocatable.h" #else @@ -122,7 +128,7 @@ get_charset_aliases (void) cp = charset_aliases; if (cp == NULL) { -#if !(defined DARWIN7 || defined VMS || defined WINDOWS_NATIVE || defined __CYGWIN__) +#if !(defined DARWIN7 || defined VMS || defined WINDOWS_NATIVE || defined __CYGWIN__ || defined OS2) const char *dir; const char *base = "charset.alias"; char *file_name; @@ -336,6 +342,36 @@ get_charset_aliases (void) "CP54936" "\0" "GB18030" "\0" "CP65001" "\0" "UTF-8" "\0"; # endif +# if defined OS2 + /* To avoid the troubles of installing a separate file in the same + directory as the DLL and of retrieving the DLL's directory at + runtime, simply inline the aliases here. */ + + /* The list of encodings is taken from "List of OS/2 Codepages" + by Alex Taylor: + . + See also "IBM Globalization - Code page identifiers": + . */ + cp = "CP813" "\0" "ISO-8859-7" "\0" + "CP878" "\0" "KOI8-R" "\0" + "CP819" "\0" "ISO-8859-1" "\0" + "CP912" "\0" "ISO-8859-2" "\0" + "CP913" "\0" "ISO-8859-3" "\0" + "CP914" "\0" "ISO-8859-4" "\0" + "CP915" "\0" "ISO-8859-5" "\0" + "CP916" "\0" "ISO-8859-8" "\0" + "CP920" "\0" "ISO-8859-9" "\0" + "CP921" "\0" "ISO-8859-13" "\0" + "CP923" "\0" "ISO-8859-15" "\0" + "CP954" "\0" "EUC-JP" "\0" + "CP964" "\0" "EUC-TW" "\0" + "CP970" "\0" "EUC-KR" "\0" + "CP1089" "\0" "ISO-8859-6" "\0" + "CP1208" "\0" "UTF-8" "\0" + "CP1381" "\0" "GB2312" "\0" + "CP1386" "\0" "GBK" "\0" + "CP3372" "\0" "EUC-JP" "\0"; +# endif #endif charset_aliases = cp; @@ -456,14 +492,34 @@ locale_charset (void) static char buf[2 + 10 + 1]; - /* The Windows API has a function returning the locale's codepage as a - number: GetACP(). - When the output goes to a console window, it needs to be provided in - GetOEMCP() encoding if the console is using a raster font, or in - GetConsoleOutputCP() encoding if it is using a TrueType font. - But in GUI programs and for output sent to files and pipes, GetACP() - encoding is the best bet. */ - sprintf (buf, "CP%u", GetACP ()); + /* The Windows API has a function returning the locale's codepage as + a number, but the value doesn't change according to what the + 'setlocale' call specified. So we use it as a last resort, in + case the string returned by 'setlocale' doesn't specify the + codepage. */ + char *current_locale = setlocale (LC_ALL, NULL); + char *pdot; + + /* If they set different locales for different categories, + 'setlocale' will return a semi-colon separated list of locale + values. To make sure we use the correct one, we choose LC_CTYPE. */ + if (strchr (current_locale, ';')) + current_locale = setlocale (LC_CTYPE, NULL); + + pdot = strrchr (current_locale, '.'); + if (pdot) + sprintf (buf, "CP%s", pdot + 1); + else + { + /* The Windows API has a function returning the locale's codepage as a + number: GetACP(). + When the output goes to a console window, it needs to be provided in + GetOEMCP() encoding if the console is using a raster font, or in + GetConsoleOutputCP() encoding if it is using a TrueType font. + But in GUI programs and for output sent to files and pipes, GetACP() + encoding is the best bet. */ + sprintf (buf, "CP%u", GetACP ()); + } codeset = buf; #elif defined OS2 @@ -473,6 +529,8 @@ locale_charset (void) ULONG cp[3]; ULONG cplen; + codeset = NULL; + /* Allow user to override the codeset, as set in the operating system, with standard language environment variables. */ locale = getenv ("LC_ALL"); @@ -504,10 +562,12 @@ locale_charset (void) } } - /* Resolve through the charset.alias file. */ - codeset = locale; + /* For the POSIX locale, don't use the system's codepage. */ + if (strcmp (locale, "C") == 0 || strcmp (locale, "POSIX") == 0) + codeset = ""; } - else + + if (codeset == NULL) { /* OS/2 has a function returning the locale's codepage as a number. */ if (DosQueryCp (sizeof (cp), cp, &cplen)) @@ -545,7 +605,7 @@ locale_charset (void) #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) + if (strcmp (codeset, "UTF-8") == 0 && MB_CUR_MAX_L (uselocale (NULL)) <= 1) codeset = "ASCII"; #endif diff --git a/gdb/gnulib/import/localcharset.h b/gdb/gnulib/import/localcharset.h index 39dc593995..c5e6d46350 100644 --- a/gdb/gnulib/import/localcharset.h +++ b/gdb/gnulib/import/localcharset.h @@ -1,5 +1,5 @@ /* Determine a canonical name for the current locale's character encoding. - Copyright (C) 2000-2003, 2009-2012 Free Software Foundation, Inc. + Copyright (C) 2000-2003, 2009-2015 Free Software Foundation, Inc. This file is part of the GNU CHARSET Library. This program is free software; you can redistribute it and/or modify diff --git a/gdb/gnulib/import/lstat.c b/gdb/gnulib/import/lstat.c index 97fe6bb2d5..31dee1387f 100644 --- a/gdb/gnulib/import/lstat.c +++ b/gdb/gnulib/import/lstat.c @@ -1,6 +1,6 @@ /* Work around a bug of lstat on some systems - Copyright (C) 1997-2006, 2008-2012 Free Software Foundation, Inc. + Copyright (C) 1997-2006, 2008-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gdb/gnulib/import/m4/00gnulib.m4 b/gdb/gnulib/import/m4/00gnulib.m4 index d978cb898c..c7103ed52f 100644 --- a/gdb/gnulib/import/m4/00gnulib.m4 +++ b/gdb/gnulib/import/m4/00gnulib.m4 @@ -1,12 +1,28 @@ -# 00gnulib.m4 serial 2 -dnl Copyright (C) 2009-2012 Free Software Foundation, Inc. +# 00gnulib.m4 serial 3 +dnl Copyright (C) 2009-2015 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 This file must be named something that sorts before all other dnl gnulib-provided .m4 files. It is needed until such time as we can -dnl assume Autoconf 2.64, with its improved AC_DEFUN_ONCE semantics. +dnl assume Autoconf 2.64, with its improved AC_DEFUN_ONCE and +dnl m4_divert semantics. + +# Until autoconf 2.63, handling of the diversion stack required m4_init +# to be called first; but this does not happen with aclocal. Wrapping +# the entire execution in another layer of the diversion stack fixes this. +# Worse, prior to autoconf 2.62, m4_wrap depended on the underlying m4 +# for whether it was FIFO or LIFO; in order to properly balance with +# m4_init, we need to undo our push just before anything wrapped within +# the m4_init body. The way to ensure this is to wrap both sides of +# m4_init with a one-shot macro that does the pop at the right time. +m4_ifndef([_m4_divert_diversion], +[m4_divert_push([KILL]) +m4_define([gl_divert_fixup], [m4_divert_pop()m4_define([$0])]) +m4_define([m4_init], + [gl_divert_fixup()]m4_defn([m4_init])[gl_divert_fixup()])]) + # AC_DEFUN_ONCE([NAME], VALUE) # ---------------------------- diff --git a/gdb/gnulib/import/m4/absolute-header.m4 b/gdb/gnulib/import/m4/absolute-header.m4 new file mode 100644 index 0000000000..bc19dfc301 --- /dev/null +++ b/gdb/gnulib/import/m4/absolute-header.m4 @@ -0,0 +1,102 @@ +# absolute-header.m4 serial 16 +dnl Copyright (C) 2006-2015 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 Derek Price. + +# gl_ABSOLUTE_HEADER(HEADER1 HEADER2 ...) +# --------------------------------------- +# Find the absolute name of a header file, testing first if the header exists. +# If the header were sys/inttypes.h, this macro would define +# ABSOLUTE_SYS_INTTYPES_H to the '""' quoted absolute name of sys/inttypes.h +# in config.h +# (e.g. '#define ABSOLUTE_SYS_INTTYPES_H "///usr/include/sys/inttypes.h"'). +# The three "///" are to pacify Sun C 5.8, which otherwise would say +# "warning: #include of /usr/include/... may be non-portable". +# Use '""', not '<>', so that the /// cannot be confused with a C99 comment. +# Note: This macro assumes that the header file is not empty after +# preprocessing, i.e. it does not only define preprocessor macros but also +# provides some type/enum definitions or function/variable declarations. +AC_DEFUN([gl_ABSOLUTE_HEADER], +[AC_REQUIRE([AC_CANONICAL_HOST]) +AC_LANG_PREPROC_REQUIRE()dnl +dnl FIXME: gl_absolute_header and ac_header_exists must be used unquoted +dnl until we can assume autoconf 2.64 or newer. +m4_foreach_w([gl_HEADER_NAME], [$1], + [AS_VAR_PUSHDEF([gl_absolute_header], + [gl_cv_absolute_]m4_defn([gl_HEADER_NAME]))dnl + AC_CACHE_CHECK([absolute name of <]m4_defn([gl_HEADER_NAME])[>], + m4_defn([gl_absolute_header]), + [AS_VAR_PUSHDEF([ac_header_exists], + [ac_cv_header_]m4_defn([gl_HEADER_NAME]))dnl + AC_CHECK_HEADERS_ONCE(m4_defn([gl_HEADER_NAME]))dnl + if test AS_VAR_GET(ac_header_exists) = yes; then + gl_ABSOLUTE_HEADER_ONE(m4_defn([gl_HEADER_NAME])) + fi + AS_VAR_POPDEF([ac_header_exists])dnl + ])dnl + AC_DEFINE_UNQUOTED(AS_TR_CPP([ABSOLUTE_]m4_defn([gl_HEADER_NAME])), + ["AS_VAR_GET(gl_absolute_header)"], + [Define this to an absolute name of <]m4_defn([gl_HEADER_NAME])[>.]) + AS_VAR_POPDEF([gl_absolute_header])dnl +])dnl +])# gl_ABSOLUTE_HEADER + +# gl_ABSOLUTE_HEADER_ONE(HEADER) +# ------------------------------ +# Like gl_ABSOLUTE_HEADER, except that: +# - it assumes that the header exists, +# - it uses the current CPPFLAGS, +# - it does not cache the result, +# - it is silent. +AC_DEFUN([gl_ABSOLUTE_HEADER_ONE], +[ + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_LANG_CONFTEST([AC_LANG_SOURCE([[#include <]]m4_dquote([$1])[[>]])]) + dnl AIX "xlc -E" and "cc -E" omit #line directives for header files + dnl that contain only a #include of other header files and no + dnl non-comment tokens of their own. This leads to a failure to + dnl detect the absolute name of , , + dnl and others. The workaround is to force preservation of comments + dnl through option -C. This ensures all necessary #line directives + dnl are present. GCC supports option -C as well. + case "$host_os" in + aix*) gl_absname_cpp="$ac_cpp -C" ;; + *) gl_absname_cpp="$ac_cpp" ;; + esac +changequote(,) + case "$host_os" in + mingw*) + dnl For the sake of native Windows compilers (excluding gcc), + dnl treat backslash as a directory separator, like /. + dnl Actually, these compilers use a double-backslash as + dnl directory separator, inside the + dnl # line "filename" + dnl directives. + gl_dirsep_regex='[/\\]' + ;; + *) + gl_dirsep_regex='\/' + ;; + esac + dnl A sed expression that turns a string into a basic regular + dnl expression, for use within "/.../". + gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' + gl_header_literal_regex=`echo '$1' \ + | 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 + }' +changequote([,]) + dnl eval is necessary to expand gl_absname_cpp. + dnl Ultrix and Pyramid sh refuse to redirect output of eval, + dnl so use subshell. + AS_VAR_SET([gl_cv_absolute_]AS_TR_SH([[$1]]), +[`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD | + sed -n "$gl_absolute_header_sed"`]) +]) diff --git a/gdb/gnulib/import/m4/alloca.m4 b/gdb/gnulib/import/m4/alloca.m4 index 656924be88..8408bed288 100644 --- a/gdb/gnulib/import/m4/alloca.m4 +++ b/gdb/gnulib/import/m4/alloca.m4 @@ -1,5 +1,5 @@ # alloca.m4 serial 14 -dnl Copyright (C) 2002-2004, 2006-2007, 2009-2012 Free Software Foundation, +dnl Copyright (C) 2002-2004, 2006-2007, 2009-2015 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, diff --git a/gdb/gnulib/import/m4/canonicalize.m4 b/gdb/gnulib/import/m4/canonicalize.m4 index ea51ac4203..6d932fd1ab 100644 --- a/gdb/gnulib/import/m4/canonicalize.m4 +++ b/gdb/gnulib/import/m4/canonicalize.m4 @@ -1,6 +1,6 @@ # canonicalize.m4 serial 26 -dnl Copyright (C) 2003-2007, 2009-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2003-2007, 2009-2015 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, diff --git a/gdb/gnulib/import/m4/codeset.m4 b/gdb/gnulib/import/m4/codeset.m4 index cf53d24167..d7de8d67e0 100644 --- a/gdb/gnulib/import/m4/codeset.m4 +++ b/gdb/gnulib/import/m4/codeset.m4 @@ -1,5 +1,5 @@ # codeset.m4 serial 5 (gettext-0.18.2) -dnl Copyright (C) 2000-2002, 2006, 2008-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2000-2002, 2006, 2008-2014 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gdb/gnulib/import/m4/configmake.m4 b/gdb/gnulib/import/m4/configmake.m4 index 8c82371eb0..49d3a13e36 100644 --- a/gdb/gnulib/import/m4/configmake.m4 +++ b/gdb/gnulib/import/m4/configmake.m4 @@ -1,5 +1,5 @@ -# configmake.m4 serial 1 -dnl Copyright (C) 2010-2012 Free Software Foundation, Inc. +# configmake.m4 serial 2 +dnl Copyright (C) 2010-2015 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. @@ -7,8 +7,9 @@ dnl with or without modifications, as long as this notice is preserved. # gl_CONFIGMAKE_PREP # ------------------ # Guarantee all of the standard directory variables, even when used with -# autoconf 2.59 (datarootdir wasn't supported until 2.59c) or automake -# 1.9.6 (pkglibexecdir wasn't supported until 1.10b.). +# autoconf 2.59 (datarootdir wasn't supported until 2.59c, and runstatedir +# in 2.70) or automake 1.9.6 (pkglibexecdir wasn't supported until 1.10b, +# and runstatedir in 1.14.1). AC_DEFUN([gl_CONFIGMAKE_PREP], [ dnl Technically, datadir should default to datarootdir. But if @@ -43,6 +44,10 @@ AC_DEFUN([gl_CONFIGMAKE_PREP], if test "x$localedir" = x; then AC_SUBST([localedir], ['${datarootdir}/locale']) fi + dnl Added in autoconf 2.70 + if test "x$runstatedir" = x; then + AC_SUBST([runstatedir], ['${localstatedir}/run']) + fi dnl Automake 1.9.6 only lacks pkglibexecdir; and since 1.11 merely dnl provides it without AC_SUBST, this blind use of AC_SUBST is safe. diff --git a/gdb/gnulib/import/m4/dirent_h.m4 b/gdb/gnulib/import/m4/dirent_h.m4 index f6c0fa7ba3..7abd1d05e1 100644 --- a/gdb/gnulib/import/m4/dirent_h.m4 +++ b/gdb/gnulib/import/m4/dirent_h.m4 @@ -1,5 +1,5 @@ # dirent_h.m4 serial 16 -dnl Copyright (C) 2008-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2008-2015 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gdb/gnulib/import/m4/dirfd.m4 b/gdb/gnulib/import/m4/dirfd.m4 index fc475d78b9..ce56cff691 100644 --- a/gdb/gnulib/import/m4/dirfd.m4 +++ b/gdb/gnulib/import/m4/dirfd.m4 @@ -2,7 +2,7 @@ dnl Find out how to get the file descriptor associated with an open DIR*. -# Copyright (C) 2001-2006, 2008-2012 Free Software Foundation, Inc. +# Copyright (C) 2001-2006, 2008-2015 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. diff --git a/gdb/gnulib/import/m4/dirname.m4 b/gdb/gnulib/import/m4/dirname.m4 index 65639ec89e..2a0be516e8 100644 --- a/gdb/gnulib/import/m4/dirname.m4 +++ b/gdb/gnulib/import/m4/dirname.m4 @@ -1,5 +1,5 @@ #serial 10 -*- autoconf -*- -dnl Copyright (C) 2002-2006, 2009-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2006, 2009-2015 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gdb/gnulib/import/m4/double-slash-root.m4 b/gdb/gnulib/import/m4/double-slash-root.m4 index 1e03751375..f307eb2ffc 100644 --- a/gdb/gnulib/import/m4/double-slash-root.m4 +++ b/gdb/gnulib/import/m4/double-slash-root.m4 @@ -1,5 +1,5 @@ # double-slash-root.m4 serial 4 -*- Autoconf -*- -dnl Copyright (C) 2006, 2008-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2006, 2008-2015 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gdb/gnulib/import/m4/eealloc.m4 b/gdb/gnulib/import/m4/eealloc.m4 index 9e5df45d31..322bdd50b4 100644 --- a/gdb/gnulib/import/m4/eealloc.m4 +++ b/gdb/gnulib/import/m4/eealloc.m4 @@ -1,5 +1,5 @@ # eealloc.m4 serial 3 -dnl Copyright (C) 2003, 2009-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2003, 2009-2015 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gdb/gnulib/import/m4/errno_h.m4 b/gdb/gnulib/import/m4/errno_h.m4 index 4e33ba853a..cfaa687615 100644 --- a/gdb/gnulib/import/m4/errno_h.m4 +++ b/gdb/gnulib/import/m4/errno_h.m4 @@ -1,5 +1,5 @@ # errno_h.m4 serial 12 -dnl Copyright (C) 2004, 2006, 2008-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2004, 2006, 2008-2015 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gdb/gnulib/import/m4/exponentd.m4 b/gdb/gnulib/import/m4/exponentd.m4 index 0ae4ccfac9..84f1691a65 100644 --- a/gdb/gnulib/import/m4/exponentd.m4 +++ b/gdb/gnulib/import/m4/exponentd.m4 @@ -1,5 +1,5 @@ # exponentd.m4 serial 3 -dnl Copyright (C) 2007-2008, 2010-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2007-2008, 2010-2015 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gdb/gnulib/import/m4/exponentl.m4 b/gdb/gnulib/import/m4/exponentl.m4 index a7cd13bc99..6b95e73723 100644 --- a/gdb/gnulib/import/m4/exponentl.m4 +++ b/gdb/gnulib/import/m4/exponentl.m4 @@ -1,5 +1,5 @@ # exponentl.m4 serial 3 -dnl Copyright (C) 2007-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2007-2015 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gdb/gnulib/import/m4/extensions.m4 b/gdb/gnulib/import/m4/extensions.m4 index 6d17d8a748..35bc49c97b 100644 --- a/gdb/gnulib/import/m4/extensions.m4 +++ b/gdb/gnulib/import/m4/extensions.m4 @@ -1,14 +1,14 @@ -# serial 12 -*- Autoconf -*- +# serial 13 -*- Autoconf -*- # Enable extensions on systems that normally disable them. -# Copyright (C) 2003, 2006-2012 Free Software Foundation, Inc. +# Copyright (C) 2003, 2006-2015 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# This definition of AC_USE_SYSTEM_EXTENSIONS is stolen from CVS +# This definition of AC_USE_SYSTEM_EXTENSIONS is stolen from git # Autoconf. Perhaps we can remove this once we can assume Autoconf -# 2.62 or later everywhere, but since CVS Autoconf mutates rapidly +# 2.70 or later everywhere, but since Autoconf mutates rapidly # enough in this area it's likely we'll need to redefine # AC_USE_SYSTEM_EXTENSIONS for quite some time. @@ -30,6 +30,7 @@ # ------------------------ # Enable extensions on systems that normally disable them, # typically due to standards-conformance issues. +# # Remember that #undef in AH_VERBATIM gets replaced with #define by # AC_DEFINE. The goal here is to define all known feature-enabling # macros, then, if reports of conflicts are made, disable macros that @@ -38,8 +39,6 @@ AC_DEFUN_ONCE([AC_USE_SYSTEM_EXTENSIONS], [AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl AC_BEFORE([$0], [AC_RUN_IFELSE])dnl - AC_REQUIRE([AC_CANONICAL_HOST]) - AC_CHECK_HEADER([minix/config.h], [MINIX=yes], [MINIX=]) if test "$MINIX" = yes; then AC_DEFINE([_POSIX_SOURCE], [1], @@ -50,24 +49,18 @@ AC_BEFORE([$0], [AC_RUN_IFELSE])dnl except with this defined.]) AC_DEFINE([_MINIX], [1], [Define to 1 if on MINIX.]) + AC_DEFINE([_NETBSD_SOURCE], [1], + [Define to 1 to make NetBSD features available. MINIX 3 needs this.]) fi - dnl HP-UX 11.11 defines mbstate_t only if _XOPEN_SOURCE is defined to 500, - dnl regardless of whether the flags -Ae or _D_HPUX_SOURCE=1 are already - dnl provided. - case "$host_os" in - hpux*) - AC_DEFINE([_XOPEN_SOURCE], [500], - [Define to 500 only on HP-UX.]) - ;; - esac - - AH_VERBATIM([__EXTENSIONS__], +dnl Use a different key than __EXTENSIONS__, as that name broke existing +dnl configure.ac when using autoheader 2.62. + AH_VERBATIM([USE_SYSTEM_EXTENSIONS], [/* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE #endif -/* Enable general extensions on Mac OS X. */ +/* Enable general extensions on OS X. */ #ifndef _DARWIN_C_SOURCE # undef _DARWIN_C_SOURCE #endif @@ -75,6 +68,10 @@ AC_BEFORE([$0], [AC_RUN_IFELSE])dnl #ifndef _GNU_SOURCE # undef _GNU_SOURCE #endif +/* Use GNU style printf and scanf. */ +#ifndef __USE_MINGW_ANSI_STDIO +# undef __USE_MINGW_ANSI_STDIO +#endif /* Enable threading extensions on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS @@ -83,6 +80,12 @@ AC_BEFORE([$0], [AC_RUN_IFELSE])dnl #ifndef _TANDEM_SOURCE # undef _TANDEM_SOURCE #endif +/* Enable X/Open extensions if necessary. HP-UX 11.11 defines + mbstate_t only if _XOPEN_SOURCE is defined to 500, regardless of + whether compiling with -Ae or -D_HPUX_SOURCE=1. */ +#ifndef _XOPEN_SOURCE +# undef _XOPEN_SOURCE +#endif /* Enable general extensions on Solaris. */ #ifndef __EXTENSIONS__ # undef __EXTENSIONS__ @@ -101,8 +104,25 @@ AC_BEFORE([$0], [AC_RUN_IFELSE])dnl AC_DEFINE([_ALL_SOURCE]) AC_DEFINE([_DARWIN_C_SOURCE]) AC_DEFINE([_GNU_SOURCE]) + AC_DEFINE([__USE_MINGW_ANSI_STDIO]) AC_DEFINE([_POSIX_PTHREAD_SEMANTICS]) AC_DEFINE([_TANDEM_SOURCE]) + AC_CACHE_CHECK([whether _XOPEN_SOURCE should be defined], + [ac_cv_should_define__xopen_source], + [ac_cv_should_define__xopen_source=no + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[ + #include + mbstate_t x;]])], + [], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[ + #define _XOPEN_SOURCE 500 + #include + mbstate_t x;]])], + [ac_cv_should_define__xopen_source=yes])])]) + test $ac_cv_should_define__xopen_source = yes && + AC_DEFINE([_XOPEN_SOURCE], [500]) ])# AC_USE_SYSTEM_EXTENSIONS # gl_USE_SYSTEM_EXTENSIONS diff --git a/gdb/gnulib/import/m4/extern-inline.m4 b/gdb/gnulib/import/m4/extern-inline.m4 index 0a9fc9a75b..72800650e6 100644 --- a/gdb/gnulib/import/m4/extern-inline.m4 +++ b/gdb/gnulib/import/m4/extern-inline.m4 @@ -1,6 +1,6 @@ dnl 'extern inline' a la ISO C99. -dnl Copyright 2012 Free Software Foundation, Inc. +dnl Copyright 2012-2015 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. @@ -8,40 +8,79 @@ dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_EXTERN_INLINE], [ AH_VERBATIM([extern_inline], -[/* _GL_INLINE is a portable alternative to ISO C99 plain 'inline'. - _GL_EXTERN_INLINE is a portable alternative to 'extern inline'. - _GL_INLINE_HEADER_BEGIN contains useful stuff to put - in an include file, before uses of _GL_INLINE. - It suppresses GCC's bogus "no previous prototype for 'FOO'" diagnostic, - when FOO is an inline function in the header; see - . - _GL_INLINE_HEADER_END contains useful stuff to put - in the same include file, after uses of _GL_INLINE. - - Suppress the use of extern inline on Apple's platforms, - as Libc-825.25 (2012-09-19) is incompatible with it; see - . - Perhaps Apple will fix this some day. */ +[/* Please see the Gnulib manual for how to use these macros. + + Suppress extern inline with HP-UX cc, as it appears to be broken; see + . + + Suppress extern inline with Sun C in standards-conformance mode, as it + mishandles inline functions that call each other. E.g., for 'inline void f + (void) { } inline void g (void) { f (); }', c99 incorrectly complains + 'reference to static identifier "f" in extern inline function'. + This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16. + + Suppress extern inline (with or without __attribute__ ((__gnu_inline__))) + on configurations that mistakenly use 'static inline' to implement + functions or macros in standard C headers like . For example, + if isdigit is mistakenly implemented via a static inline function, + a program containing an extern inline function that calls isdigit + may not work since the C standard prohibits extern inline functions + from calling static functions. This bug is known to occur on: + + OS X 10.8 and earlier; see: + http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00023.html + + DragonFly; see + http://muscles.dragonflybsd.org/bulk/bleeding-edge-potential/latest-per-pkg/ah-tty-0.3.12.log + + FreeBSD; see: + http://lists.gnu.org/archive/html/bug-gnulib/2014-07/msg00104.html + + OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and + for clang but remains for g++; see . + Assume DragonFly and FreeBSD will be similar. */ +#if (((defined __APPLE__ && defined __MACH__) \ + || defined __DragonFly__ || defined __FreeBSD__) \ + && (defined __header_inline \ + ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \ + && ! defined __clang__) \ + : ((! defined _DONT_USE_CTYPE_INLINE_ \ + && (defined __GNUC__ || defined __cplusplus)) \ + || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \ + && defined __GNUC__ && ! defined __cplusplus)))) +# define _GL_EXTERN_INLINE_STDHEADER_BUG +#endif #if ((__GNUC__ \ ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \ - : 199901L <= __STDC_VERSION__) \ - && !defined __APPLE__) + : (199901L <= __STDC_VERSION__ \ + && !defined __HP_cc \ + && !(defined __SUNPRO_C && __STDC__))) \ + && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) # define _GL_INLINE inline # define _GL_EXTERN_INLINE extern inline -#elif 2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __APPLE__ -# if __GNUC_GNU_INLINE__ +# define _GL_EXTERN_INLINE_IN_USE +#elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \ + && !defined _GL_EXTERN_INLINE_STDHEADER_BUG) +# if defined __GNUC_GNU_INLINE__ && __GNUC_GNU_INLINE__ /* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */ # define _GL_INLINE extern inline __attribute__ ((__gnu_inline__)) # else # define _GL_INLINE extern inline # endif # define _GL_EXTERN_INLINE extern +# define _GL_EXTERN_INLINE_IN_USE #else # define _GL_INLINE static _GL_UNUSED # define _GL_EXTERN_INLINE static _GL_UNUSED #endif -#if 4 < __GNUC__ + (6 <= __GNUC_MINOR__) +/* In GCC 4.6 (inclusive) to 5.1 (exclusive), + suppress bogus "no previous prototype for 'FOO'" + and "no previous declaration for 'FOO'" diagnostics, + when FOO is an inline function in the header; see + and + . */ +#if __GNUC__ == 4 && 6 <= __GNUC_MINOR__ # if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ # define _GL_INLINE_HEADER_CONST_PRAGMA # else diff --git a/gdb/gnulib/import/m4/fcntl-o.m4 b/gdb/gnulib/import/m4/fcntl-o.m4 index 740e78b681..891a62fb6a 100644 --- a/gdb/gnulib/import/m4/fcntl-o.m4 +++ b/gdb/gnulib/import/m4/fcntl-o.m4 @@ -1,5 +1,5 @@ # fcntl-o.m4 serial 4 -dnl Copyright (C) 2006, 2009-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2006, 2009-2015 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gdb/gnulib/import/m4/float_h.m4 b/gdb/gnulib/import/m4/float_h.m4 index 51c9c7b35c..e4853f3b09 100644 --- a/gdb/gnulib/import/m4/float_h.m4 +++ b/gdb/gnulib/import/m4/float_h.m4 @@ -1,5 +1,5 @@ # float_h.m4 serial 9 -dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gdb/gnulib/import/m4/fnmatch.m4 b/gdb/gnulib/import/m4/fnmatch.m4 index e46b6e521c..c33792fe95 100644 --- a/gdb/gnulib/import/m4/fnmatch.m4 +++ b/gdb/gnulib/import/m4/fnmatch.m4 @@ -1,6 +1,6 @@ # Check for fnmatch - serial 9. -# Copyright (C) 2000-2007, 2009-2012 Free Software Foundation, Inc. +# Copyright (C) 2000-2007, 2009-2015 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. diff --git a/gdb/gnulib/import/m4/fpieee.m4 b/gdb/gnulib/import/m4/fpieee.m4 index 82fd778325..a4e48997ed 100644 --- a/gdb/gnulib/import/m4/fpieee.m4 +++ b/gdb/gnulib/import/m4/fpieee.m4 @@ -1,5 +1,5 @@ # fpieee.m4 serial 2 -dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gdb/gnulib/import/m4/frexp.m4 b/gdb/gnulib/import/m4/frexp.m4 index fb8db7046e..04f40679a6 100644 --- a/gdb/gnulib/import/m4/frexp.m4 +++ b/gdb/gnulib/import/m4/frexp.m4 @@ -1,5 +1,5 @@ -# frexp.m4 serial 14 -dnl Copyright (C) 2007-2012 Free Software Foundation, Inc. +# frexp.m4 serial 15 +dnl Copyright (C) 2007-2015 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. @@ -93,7 +93,7 @@ AC_DEFUN([gl_FUNC_FREXP_WORKS], [ AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CHECK_FUNCS_ONCE([alarm]) + AC_CHECK_DECLS_ONCE([alarm]) AC_CACHE_CHECK([whether frexp works], [gl_cv_func_frexp_works], [ AC_RUN_IFELSE( @@ -101,7 +101,8 @@ AC_DEFUN([gl_FUNC_FREXP_WORKS], #include #include #include -#if HAVE_ALARM +#if HAVE_DECL_ALARM +# include # include #endif /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0. @@ -124,9 +125,10 @@ int main() int i; volatile double x; double zero = 0.0; -#if HAVE_ALARM +#if HAVE_DECL_ALARM /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite number. Let the test fail in this case. */ + signal (SIGALRM, SIG_DFL); alarm (5); #endif /* Test on denormalized numbers. */ diff --git a/gdb/gnulib/import/m4/frexpl.m4 b/gdb/gnulib/import/m4/frexpl.m4 index 774d540fd9..cd3ac6e52e 100644 --- a/gdb/gnulib/import/m4/frexpl.m4 +++ b/gdb/gnulib/import/m4/frexpl.m4 @@ -1,5 +1,5 @@ # frexpl.m4 serial 20 -dnl Copyright (C) 2007-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2007-2015 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gdb/gnulib/import/m4/gettimeofday.m4 b/gdb/gnulib/import/m4/gettimeofday.m4 new file mode 100644 index 0000000000..ce246e18bc --- /dev/null +++ b/gdb/gnulib/import/m4/gettimeofday.m4 @@ -0,0 +1,138 @@ +# serial 21 + +# Copyright (C) 2001-2003, 2005, 2007, 2009-2015 Free Software Foundation, Inc. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +dnl From Jim Meyering. + +AC_DEFUN([gl_FUNC_GETTIMEOFDAY], +[ + AC_REQUIRE([AC_C_RESTRICT]) + AC_REQUIRE([gl_HEADER_SYS_TIME_H]) + AC_REQUIRE([gl_HEADER_SYS_TIME_H_DEFAULTS]) + AC_CHECK_FUNCS_ONCE([gettimeofday]) + + gl_gettimeofday_timezone=void + if test $ac_cv_func_gettimeofday != yes; then + HAVE_GETTIMEOFDAY=0 + else + gl_FUNC_GETTIMEOFDAY_CLOBBER + AC_CACHE_CHECK([for gettimeofday with POSIX signature], + [gl_cv_func_gettimeofday_posix_signature], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include + struct timeval c; + int gettimeofday (struct timeval *restrict, void *restrict); + ]], + [[/* glibc uses struct timezone * rather than the POSIX void * + if _GNU_SOURCE is defined. However, since the only portable + use of gettimeofday uses NULL as the second parameter, and + since the glibc definition is actually more typesafe, it is + not worth wrapping this to get a compliant signature. */ + int (*f) (struct timeval *restrict, void *restrict) + = gettimeofday; + int x = f (&c, 0); + return !(x | c.tv_sec | c.tv_usec); + ]])], + [gl_cv_func_gettimeofday_posix_signature=yes], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include +int gettimeofday (struct timeval *restrict, struct timezone *restrict); + ]])], + [gl_cv_func_gettimeofday_posix_signature=almost], + [gl_cv_func_gettimeofday_posix_signature=no])])]) + if test $gl_cv_func_gettimeofday_posix_signature = almost; then + gl_gettimeofday_timezone='struct timezone' + elif test $gl_cv_func_gettimeofday_posix_signature != yes; then + REPLACE_GETTIMEOFDAY=1 + fi + dnl If we override 'struct timeval', we also have to override gettimeofday. + if test $REPLACE_STRUCT_TIMEVAL = 1; then + REPLACE_GETTIMEOFDAY=1 + fi + m4_ifdef([gl_FUNC_TZSET_CLOBBER], [ + gl_FUNC_TZSET_CLOBBER + case "$gl_cv_func_tzset_clobber" in + *yes) + REPLACE_GETTIMEOFDAY=1 + gl_GETTIMEOFDAY_REPLACE_LOCALTIME + AC_DEFINE([tzset], [rpl_tzset], + [Define to rpl_tzset if the wrapper function should be used.]) + AC_DEFINE([TZSET_CLOBBERS_LOCALTIME], [1], + [Define if tzset clobbers localtime's static buffer.]) + ;; + esac + ]) + fi + AC_DEFINE_UNQUOTED([GETTIMEOFDAY_TIMEZONE], [$gl_gettimeofday_timezone], + [Define this to 'void' or 'struct timezone' to match the system's + declaration of the second argument to gettimeofday.]) +]) + + +dnl See if gettimeofday clobbers the static buffer that localtime uses +dnl for its return value. The gettimeofday function from Mac OS X 10.0.4 +dnl (i.e., Darwin 1.3.7) has this problem. +dnl +dnl If it does, then arrange to use gettimeofday and localtime only via +dnl the wrapper functions that work around the problem. + +AC_DEFUN([gl_FUNC_GETTIMEOFDAY_CLOBBER], +[ + AC_REQUIRE([gl_HEADER_SYS_TIME_H]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + + AC_CACHE_CHECK([whether gettimeofday clobbers localtime buffer], + [gl_cv_func_gettimeofday_clobber], + [AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [[#include + #include + #include + #include + ]], + [[ + time_t t = 0; + struct tm *lt; + struct tm saved_lt; + struct timeval tv; + lt = localtime (&t); + saved_lt = *lt; + gettimeofday (&tv, NULL); + return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0; + ]])], + [gl_cv_func_gettimeofday_clobber=no], + [gl_cv_func_gettimeofday_clobber=yes], + [# When cross-compiling: + case "$host_os" in + # Guess all is fine on glibc systems. + *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;; + # If we don't know, assume the worst. + *) gl_cv_func_gettimeofday_clobber="guessing yes" ;; + esac + ])]) + + case "$gl_cv_func_gettimeofday_clobber" in + *yes) + REPLACE_GETTIMEOFDAY=1 + gl_GETTIMEOFDAY_REPLACE_LOCALTIME + AC_DEFINE([GETTIMEOFDAY_CLOBBERS_LOCALTIME], [1], + [Define if gettimeofday clobbers the localtime buffer.]) + ;; + esac +]) + +AC_DEFUN([gl_GETTIMEOFDAY_REPLACE_LOCALTIME], [ + REPLACE_GMTIME=1 + REPLACE_LOCALTIME=1 +]) + +# Prerequisites of lib/gettimeofday.c. +AC_DEFUN([gl_PREREQ_GETTIMEOFDAY], [ + AC_CHECK_HEADERS([sys/timeb.h]) + AC_CHECK_FUNCS([_ftime]) +]) diff --git a/gdb/gnulib/import/m4/glibc21.m4 b/gdb/gnulib/import/m4/glibc21.m4 index c938fb1a0c..3a971c5a24 100644 --- a/gdb/gnulib/import/m4/glibc21.m4 +++ b/gdb/gnulib/import/m4/glibc21.m4 @@ -1,5 +1,5 @@ # glibc21.m4 serial 5 -dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2012 Free Software Foundation, +dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2015 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, diff --git a/gdb/gnulib/import/m4/gnulib-cache.m4 b/gdb/gnulib/import/m4/gnulib-cache.m4 index 959cdb6893..ad51e3e7d6 100644 --- a/gdb/gnulib/import/m4/gnulib-cache.m4 +++ b/gdb/gnulib/import/m4/gnulib-cache.m4 @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2012 Free Software Foundation, Inc. +# Copyright (C) 2002-2015 Free Software Foundation, Inc. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gdb/gnulib/import/m4/gnulib-common.m4 b/gdb/gnulib/import/m4/gnulib-common.m4 index 15d2b2b3de..40e82f6e27 100644 --- a/gdb/gnulib/import/m4/gnulib-common.m4 +++ b/gdb/gnulib/import/m4/gnulib-common.m4 @@ -1,5 +1,5 @@ -# gnulib-common.m4 serial 33 -dnl Copyright (C) 2007-2012 Free Software Foundation, Inc. +# gnulib-common.m4 serial 36 +dnl Copyright (C) 2007-2015 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. @@ -49,6 +49,16 @@ AC_DEFUN([gl_COMMON_BODY], [ is a misnomer outside of parameter lists. */ #define _UNUSED_PARAMETER_ _GL_UNUSED +/* gcc supports the "unused" attribute on possibly unused labels, and + g++ has since version 4.5. Note to support C++ as well as C, + _GL_UNUSED_LABEL should be used with a trailing ; */ +#if !defined __cplusplus || __GNUC__ > 4 \ + || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5) +# define _GL_UNUSED_LABEL _GL_UNUSED +#else +# define _GL_UNUSED_LABEL +#endif + /* The __pure__ attribute was added in gcc 2.96. */ #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) # define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) @@ -268,12 +278,12 @@ Amsterdam dnl but prefer ${host}-ar over ar (useful for cross-compiling). AC_CHECK_TOOL([AR], [ar], [ar]) if test -z "$ARFLAGS"; then - ARFLAGS='cru' + ARFLAGS='cr' fi fi else if test -z "$ARFLAGS"; then - ARFLAGS='cru' + ARFLAGS='cr' fi fi AC_SUBST([AR]) @@ -294,6 +304,8 @@ Amsterdam # for interoperability with automake-1.9.6 from autoconf-2.62. # Remove this macro when we can assume autoconf >= 2.62 or # autoconf >= 2.60 && automake >= 1.10. +# AC_AUTOCONF_VERSION was introduced in 2.62, so use that as the witness. +m4_ifndef([AC_AUTOCONF_VERSION],[ m4_ifdef([AC_PROG_MKDIR_P], [ dnl For automake-1.9.6 && autoconf < 2.62: Ensure MKDIR_P is AC_SUBSTed. m4_define([AC_PROG_MKDIR_P], @@ -304,27 +316,31 @@ m4_ifdef([AC_PROG_MKDIR_P], [ [AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake MKDIR_P='$(mkdir_p)' AC_SUBST([MKDIR_P])])]) +]) # AC_C_RESTRICT -# This definition overrides the AC_C_RESTRICT macro from autoconf 2.60..2.61, -# so that mixed use of GNU C and GNU C++ and mixed use of Sun C and Sun C++ -# works. -# This definition can be removed once autoconf >= 2.62 can be assumed. -m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.62]),[-1],[ +# This definition is copied from post-2.69 Autoconf and overrides the +# AC_C_RESTRICT macro from autoconf 2.60..2.69. It can be removed +# once autoconf >= 2.70 can be assumed. It's painful to check version +# numbers, and in practice this macro is more up-to-date than Autoconf +# is, so override Autoconf unconditionally. AC_DEFUN([AC_C_RESTRICT], [AC_CACHE_CHECK([for C/C++ restrict keyword], [ac_cv_c_restrict], [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 - AC_COMPILE_IFELSE([AC_LANG_PROGRAM( - [[typedef int * int_ptr; - int foo (int_ptr $ac_kw ip) { - return ip[0]; - }]], - [[int s[1]; - int * $ac_kw t = s; - t[0] = 0; - return foo(t)]])], + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[typedef int *int_ptr; + int foo (int_ptr $ac_kw ip) { return ip[0]; } + int bar (int [$ac_kw]); /* Catch GCC bug 14050. */ + int bar (int ip[$ac_kw]) { return ip[0]; } + ]], + [[int s[1]; + int *$ac_kw t = s; + t[0] = 0; + return foo (t) + bar (t); + ]])], [ac_cv_c_restrict=$ac_kw]) test "$ac_cv_c_restrict" != no && break done @@ -334,21 +350,21 @@ AC_DEFUN([AC_C_RESTRICT], nothing if this is not supported. Do not define if restrict is supported directly. */ #undef restrict -/* Work around a bug in Sun C++: it does not support _Restrict, even - though the corresponding Sun C compiler does, which causes - "#define restrict _Restrict" in the previous line. Perhaps some future - version of Sun C++ will work with _Restrict; if so, it'll probably - define __RESTRICT, just as Sun C does. */ +/* Work around a bug in Sun C++: it does not support _Restrict or + __restrict__, even though the corresponding Sun C compiler ends up with + "#define restrict _Restrict" or "#define restrict __restrict__" in the + previous line. Perhaps some future version of Sun C++ will work with + restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ #if defined __SUNPRO_CC && !defined __RESTRICT # define _Restrict +# define __restrict__ #endif]) case $ac_cv_c_restrict in restrict) ;; no) AC_DEFINE([restrict], []) ;; *) AC_DEFINE_UNQUOTED([restrict], [$ac_cv_c_restrict]) ;; esac -]) -]) +])# AC_C_RESTRICT # gl_BIGENDIAN # is like AC_C_BIGENDIAN, except that it can be AC_REQUIREd. @@ -371,3 +387,63 @@ AC_DEFUN([gl_CACHE_VAL_SILENT], AC_CACHE_VAL([$1], [$2]) as_echo_n="$saved_as_echo_n" ]) + +# AS_VAR_COPY was added in autoconf 2.63b +m4_define_default([AS_VAR_COPY], +[AS_LITERAL_IF([$1[]$2], [$1=$$2], [eval $1=\$$2])]) + +# AC_PROG_SED was added in autoconf 2.59b +m4_ifndef([AC_PROG_SED], +[AC_DEFUN([AC_PROG_SED], +[AC_CACHE_CHECK([for a sed that does not truncate output], ac_cv_path_SED, + [dnl ac_script should not contain more than 99 commands (for HP-UX sed), + dnl but more than about 7000 bytes, to catch a limit in Solaris 8 /usr/ucb/sed. + ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ + for ac_i in 1 2 3 4 5 6 7; do + ac_script="$ac_script$as_nl$ac_script" + done + echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed + AS_UNSET([ac_script]) + if test -z "$SED"; then + ac_path_SED_found=false + _AS_PATH_WALK([], [ + for ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" + AS_EXECUTABLE_P(["$ac_path_SED"]) || continue + case `"$ac_path_SED" --version 2>&1` in + *GNU*) ac_cv_path_SED=$ac_path_SED ac_path_SED_found=:;; + *) + ac_count=0 + _AS_ECHO_N([0123456789]) >conftest.in + while : + do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo >> conftest.nl + "$ac_path_SED" -f conftest.sed conftest.out 2>/dev/null || break + diff conftest.out conftest.nl >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_SED_max-0}; then + # Best so far, but keep looking for better + ac_cv_path_SED=$ac_path_SED + ac_path_SED_max=$ac_count + fi + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; + esac + $ac_path_SED_found && break 3 + done + done]) + if test -z "$ac_cv_path_SED"; then + AC_ERROR([no acceptable sed could be found in \$PATH]) + fi + else + ac_cv_path_SED=$SED + fi + SED="$ac_cv_path_SED" + AC_SUBST([SED])dnl + rm -f conftest.sed +])])]) diff --git a/gdb/gnulib/import/m4/gnulib-comp.m4 b/gdb/gnulib/import/m4/gnulib-comp.m4 index 29f8f7332c..5601894f5b 100644 --- a/gdb/gnulib/import/m4/gnulib-comp.m4 +++ b/gdb/gnulib/import/m4/gnulib-comp.m4 @@ -1,5 +1,5 @@ # DO NOT EDIT! GENERATED AUTOMATICALLY! -# Copyright (C) 2002-2012 Free Software Foundation, Inc. +# Copyright (C) 2002-2015 Free Software Foundation, Inc. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -38,6 +38,7 @@ AC_DEFUN([gl_EARLY], m4_pattern_allow([^gl_LIBOBJS$])dnl a variable m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable AC_REQUIRE([gl_PROG_AR_RANLIB]) + # Code from module absolute-header: # Code from module alloca: # Code from module alloca-opt: # Code from module canonicalize-lgpl: @@ -60,6 +61,7 @@ AC_DEFUN([gl_EARLY], # Code from module fpucw: # Code from module frexp: # Code from module frexpl: + # Code from module gettimeofday: # Code from module include_next: # Code from module inttypes: # Code from module inttypes-incomplete: @@ -103,6 +105,7 @@ AC_DEFUN([gl_EARLY], # Code from module strstr-simple: # Code from module strtok_r: # Code from module sys_stat: + # Code from module sys_time: # Code from module sys_types: # Code from module time: # Code from module unistd: @@ -176,6 +179,12 @@ AC_DEFUN([gl_INIT], AC_LIBOBJ([frexpl]) fi gl_MATH_MODULE_INDICATOR([frexpl]) + gl_FUNC_GETTIMEOFDAY + if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then + AC_LIBOBJ([gettimeofday]) + gl_PREREQ_GETTIMEOFDAY + fi + gl_SYS_TIME_MODULE_INDICATOR([gettimeofday]) gl_INTTYPES_H gl_INTTYPES_INCOMPLETE gl_FUNC_ISNAND_NO_LIBM @@ -287,6 +296,8 @@ AC_DEFUN([gl_INIT], gl_STRING_MODULE_INDICATOR([strtok_r]) gl_HEADER_SYS_STAT_H AC_PROG_MKDIR_P + gl_HEADER_SYS_TIME_H + AC_PROG_MKDIR_P gl_SYS_TYPES_H AC_PROG_MKDIR_P gl_HEADER_TIME_H @@ -458,6 +469,7 @@ AC_DEFUN([gl_FILE_LIST], [ lib/fpucw.h lib/frexp.c lib/frexpl.c + lib/gettimeofday.c lib/inttypes.in.h lib/isnan.c lib/isnand-nolibm.h @@ -493,7 +505,6 @@ AC_DEFUN([gl_FILE_LIST], [ lib/stdbool.in.h lib/stddef.in.h lib/stdint.in.h - lib/stdio.c lib/stdio.in.h lib/stdlib.in.h lib/str-two-way.h @@ -505,6 +516,7 @@ AC_DEFUN([gl_FILE_LIST], [ lib/strstr.c lib/strtok_r.c lib/sys_stat.in.h + lib/sys_time.in.h lib/sys_types.in.h lib/time.in.h lib/unistd.c @@ -514,6 +526,7 @@ AC_DEFUN([gl_FILE_LIST], [ lib/wctype-h.c lib/wctype.in.h m4/00gnulib.m4 + m4/absolute-header.m4 m4/alloca.m4 m4/canonicalize.m4 m4/codeset.m4 @@ -534,6 +547,7 @@ AC_DEFUN([gl_FILE_LIST], [ m4/fpieee.m4 m4/frexp.m4 m4/frexpl.m4 + m4/gettimeofday.m4 m4/glibc21.m4 m4/gnulib-common.m4 m4/include_next.m4 @@ -575,7 +589,9 @@ AC_DEFUN([gl_FILE_LIST], [ m4/string_h.m4 m4/strstr.m4 m4/strtok_r.m4 + m4/sys_socket_h.m4 m4/sys_stat_h.m4 + m4/sys_time_h.m4 m4/sys_types_h.m4 m4/time_h.m4 m4/unistd_h.m4 diff --git a/gdb/gnulib/import/m4/gnulib-tool.m4 b/gdb/gnulib/import/m4/gnulib-tool.m4 index a09ffc1d1a..fede1fc3bd 100644 --- a/gdb/gnulib/import/m4/gnulib-tool.m4 +++ b/gdb/gnulib/import/m4/gnulib-tool.m4 @@ -1,5 +1,5 @@ # gnulib-tool.m4 serial 2 -dnl Copyright (C) 2004-2005, 2009-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2004-2005, 2009-2015 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gdb/gnulib/import/m4/include_next.m4 b/gdb/gnulib/import/m4/include_next.m4 index a60a2614dc..233d254e80 100644 --- a/gdb/gnulib/import/m4/include_next.m4 +++ b/gdb/gnulib/import/m4/include_next.m4 @@ -1,5 +1,5 @@ # include_next.m4 serial 23 -dnl Copyright (C) 2006-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2006-2015 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. @@ -192,56 +192,9 @@ dnl until we can assume autoconf 2.64 or newer. if test AS_VAR_GET(gl_header_exists) = yes; then AS_VAR_POPDEF([gl_header_exists]) ]) - AC_LANG_CONFTEST( - [AC_LANG_SOURCE( - [[#include <]]m4_dquote(m4_defn([gl_HEADER_NAME]))[[>]] - )]) - dnl AIX "xlc -E" and "cc -E" omit #line directives for header - dnl files that contain only a #include of other header files and - dnl no non-comment tokens of their own. This leads to a failure - dnl to detect the absolute name of , , - dnl and others. The workaround is to force preservation - dnl of comments through option -C. This ensures all necessary - dnl #line directives are present. GCC supports option -C as well. - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac -changequote(,) - case "$host_os" in - mingw*) - dnl For the sake of native Windows compilers (excluding gcc), - dnl treat backslash as a directory separator, like /. - dnl Actually, these compilers use a double-backslash as - dnl directory separator, inside the - dnl # line "filename" - dnl directives. - gl_dirsep_regex='[/\\]' - ;; - *) - gl_dirsep_regex='\/' - ;; - esac - dnl A sed expression that turns a string into a basic regular - dnl expression, for use within "/.../". - gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' -changequote([,]) - gl_header_literal_regex=`echo ']m4_defn([gl_HEADER_NAME])[' \ - | 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/ -changequote(,)dnl - s|^/[^/]|//&| -changequote([,])dnl - p - q - }' - dnl eval is necessary to expand gl_absname_cpp. - dnl Ultrix and Pyramid sh refuse to redirect output of eval, - dnl so use subshell. - AS_VAR_SET(gl_next_header, - ['"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD | - sed -n "$gl_absolute_header_sed"`'"']) + gl_ABSOLUTE_HEADER_ONE(gl_HEADER_NAME) + AS_VAR_COPY([gl_header], [gl_cv_absolute_]AS_TR_SH(gl_HEADER_NAME)) + AS_VAR_SET(gl_next_header, ['"'$gl_header'"']) m4_if([$2], [check], [else AS_VAR_SET(gl_next_header, ['<'gl_HEADER_NAME'>']) diff --git a/gdb/gnulib/import/m4/inttypes-pri.m4 b/gdb/gnulib/import/m4/inttypes-pri.m4 index 977206fae8..0884e71e67 100644 --- a/gdb/gnulib/import/m4/inttypes-pri.m4 +++ b/gdb/gnulib/import/m4/inttypes-pri.m4 @@ -1,5 +1,5 @@ # inttypes-pri.m4 serial 7 (gettext-0.18.2) -dnl Copyright (C) 1997-2002, 2006, 2008-2012 Free Software Foundation, Inc. +dnl Copyright (C) 1997-2002, 2006, 2008-2015 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gdb/gnulib/import/m4/inttypes.m4 b/gdb/gnulib/import/m4/inttypes.m4 index eec4f41d03..4209ffd150 100644 --- a/gdb/gnulib/import/m4/inttypes.m4 +++ b/gdb/gnulib/import/m4/inttypes.m4 @@ -1,5 +1,5 @@ # inttypes.m4 serial 26 -dnl Copyright (C) 2006-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2006-2015 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. @@ -148,6 +148,7 @@ AC_DEFUN([gl_INTTYPES_H_DEFAULTS], HAVE_DECL_STRTOIMAX=1; AC_SUBST([HAVE_DECL_STRTOIMAX]) HAVE_DECL_STRTOUMAX=1; AC_SUBST([HAVE_DECL_STRTOUMAX]) REPLACE_STRTOIMAX=0; AC_SUBST([REPLACE_STRTOIMAX]) + REPLACE_STRTOUMAX=0; AC_SUBST([REPLACE_STRTOUMAX]) INT32_MAX_LT_INTMAX_MAX=1; AC_SUBST([INT32_MAX_LT_INTMAX_MAX]) INT64_MAX_EQ_LONG_MAX='defined _LP64'; AC_SUBST([INT64_MAX_EQ_LONG_MAX]) PRI_MACROS_BROKEN=0; AC_SUBST([PRI_MACROS_BROKEN]) diff --git a/gdb/gnulib/import/m4/isnand.m4 b/gdb/gnulib/import/m4/isnand.m4 index 54b64a452d..4d5c615bc1 100644 --- a/gdb/gnulib/import/m4/isnand.m4 +++ b/gdb/gnulib/import/m4/isnand.m4 @@ -1,5 +1,5 @@ # isnand.m4 serial 11 -dnl Copyright (C) 2007-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2007-2015 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gdb/gnulib/import/m4/isnanl.m4 b/gdb/gnulib/import/m4/isnanl.m4 index 81469ab8c8..b86ca9efec 100644 --- a/gdb/gnulib/import/m4/isnanl.m4 +++ b/gdb/gnulib/import/m4/isnanl.m4 @@ -1,5 +1,5 @@ -# isnanl.m4 serial 17 -dnl Copyright (C) 2007-2012 Free Software Foundation, Inc. +# isnanl.m4 serial 19 +dnl Copyright (C) 2007-2015 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. @@ -108,11 +108,8 @@ AC_DEFUN([gl_HAVE_ISNANL_IN_LIBM], ]) ]) -dnl Test whether isnanl() recognizes all numbers which are neither finite nor -dnl infinite. This test fails e.g. on NetBSD/i386 and on glibc/ia64. -dnl Also, the GCC >= 4.0 built-in __builtin_isnanl does not pass the tests -dnl - for pseudo-denormals on i686 and x86_64, -dnl - for pseudo-zeroes, unnormalized numbers, and pseudo-denormals on ia64. +dnl Test whether isnanl() recognizes all canonical numbers which are neither +dnl finite nor infinite. AC_DEFUN([gl_FUNC_ISNANL_WORKS], [ AC_REQUIRE([AC_PROG_CC]) @@ -177,7 +174,7 @@ int main () # ifdef WORDS_BIGENDIAN # define LDBL80_WORDS(exponent,manthi,mantlo) \ { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \ - ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \ + ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16), \ (unsigned int) (mantlo) << 16 \ } # else @@ -197,41 +194,35 @@ int main () if (!isnanl (x.value)) result |= 2; } - /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities, - Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in - Intel IA-64 Architecture Software Developer's Manual, Volume 1: - Application Architecture. - Table 5-2 "Floating-Point Register Encodings" - Figure 5-6 "Memory to Floating-Point Register Data Translation" - */ + /* isnanl should return something even for noncanonical values. */ { /* Pseudo-NaN. */ static memory_long_double x = { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) }; - if (!isnanl (x.value)) + if (isnanl (x.value) && !isnanl (x.value)) result |= 4; } { /* Pseudo-Infinity. */ static memory_long_double x = { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) }; - if (!isnanl (x.value)) + if (isnanl (x.value) && !isnanl (x.value)) result |= 8; } { /* Pseudo-Zero. */ static memory_long_double x = { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) }; - if (!isnanl (x.value)) + if (isnanl (x.value) && !isnanl (x.value)) result |= 16; } { /* Unnormalized number. */ static memory_long_double x = { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) }; - if (!isnanl (x.value)) + if (isnanl (x.value) && !isnanl (x.value)) result |= 32; } { /* Pseudo-Denormal. */ static memory_long_double x = { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) }; - if (!isnanl (x.value)) + if (isnanl (x.value) && !isnanl (x.value)) result |= 64; } #endif @@ -240,16 +231,6 @@ int main () }]])], [gl_cv_func_isnanl_works=yes], [gl_cv_func_isnanl_works=no], - [case "$host_cpu" in - # Guess no on ia64, x86_64, i386. - ia64 | x86_64 | i*86) gl_cv_func_isnanl_works="guessing no";; - *) - case "$host_os" in - netbsd*) gl_cv_func_isnanl_works="guessing no";; - *) gl_cv_func_isnanl_works="guessing yes";; - esac - ;; - esac - ]) + [gl_cv_func_isnanl_works="guessing yes"]) ]) ]) diff --git a/gdb/gnulib/import/m4/largefile.m4 b/gdb/gnulib/import/m4/largefile.m4 index a88850afed..b7a6c48b68 100644 --- a/gdb/gnulib/import/m4/largefile.m4 +++ b/gdb/gnulib/import/m4/largefile.m4 @@ -1,13 +1,14 @@ # Enable large files on systems where this is not the default. -# Copyright 1992-1996, 1998-2012 Free Software Foundation, Inc. +# Copyright 1992-1996, 1998-2015 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# The following implementation works around a problem in autoconf <= 2.68; -# AC_SYS_LARGEFILE does not configure for large inodes on Mac OS X 10.5. -m4_version_prereq([2.69], [] ,[ +# The following implementation works around a problem in autoconf <= 2.69; +# AC_SYS_LARGEFILE does not configure for large inodes on Mac OS X 10.5, +# or configures them incorrectly in some cases. +m4_version_prereq([2.70], [] ,[ # _AC_SYS_LARGEFILE_TEST_INCLUDES # ------------------------------- @@ -25,9 +26,9 @@ m4_define([_AC_SYS_LARGEFILE_TEST_INCLUDES], # _AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, VALUE, -# CACHE-VAR, -# DESCRIPTION, -# PROLOGUE, [FUNCTION-BODY]) +# CACHE-VAR, +# DESCRIPTION, +# PROLOGUE, [FUNCTION-BODY]) # -------------------------------------------------------- m4_define([_AC_SYS_LARGEFILE_MACRO_VALUE], [AC_CACHE_CHECK([for $1 value needed for large files], [$3], @@ -93,15 +94,11 @@ if test "$enable_largefile" != no; then [_AC_SYS_LARGEFILE_TEST_INCLUDES]) fi - AH_VERBATIM([_DARWIN_USE_64_BIT_INODE], -[/* Enable large inode numbers on Mac OS X. */ -#ifndef _DARWIN_USE_64_BIT_INODE -# define _DARWIN_USE_64_BIT_INODE 1 -#endif]) + AC_DEFINE([_DARWIN_USE_64_BIT_INODE], [1], + [Enable large inode numbers on Mac OS X 10.5.]) fi ])# AC_SYS_LARGEFILE - -])# m4_version_prereq 2.69 +])# m4_version_prereq 2.70 # Enable large files on systems where this is implemented by Gnulib, not by the # system headers. diff --git a/gdb/gnulib/import/m4/localcharset.m4 b/gdb/gnulib/import/m4/localcharset.m4 index 8010379b18..f03916c024 100644 --- a/gdb/gnulib/import/m4/localcharset.m4 +++ b/gdb/gnulib/import/m4/localcharset.m4 @@ -1,5 +1,5 @@ # localcharset.m4 serial 7 -dnl Copyright (C) 2002, 2004, 2006, 2009-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2002, 2004, 2006, 2009-2015 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gdb/gnulib/import/m4/locale-fr.m4 b/gdb/gnulib/import/m4/locale-fr.m4 index 71b68476c6..92ff55250e 100644 --- a/gdb/gnulib/import/m4/locale-fr.m4 +++ b/gdb/gnulib/import/m4/locale-fr.m4 @@ -1,5 +1,5 @@ # locale-fr.m4 serial 17 -dnl Copyright (C) 2003, 2005-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2003, 2005-2015 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gdb/gnulib/import/m4/locale-ja.m4 b/gdb/gnulib/import/m4/locale-ja.m4 index 5ba0e4381a..a3abef8777 100644 --- a/gdb/gnulib/import/m4/locale-ja.m4 +++ b/gdb/gnulib/import/m4/locale-ja.m4 @@ -1,5 +1,5 @@ # locale-ja.m4 serial 12 -dnl Copyright (C) 2003, 2005-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2003, 2005-2015 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gdb/gnulib/import/m4/locale-zh.m4 b/gdb/gnulib/import/m4/locale-zh.m4 index e5502b29e1..c5c4ef6592 100644 --- a/gdb/gnulib/import/m4/locale-zh.m4 +++ b/gdb/gnulib/import/m4/locale-zh.m4 @@ -1,5 +1,5 @@ # locale-zh.m4 serial 12 -dnl Copyright (C) 2003, 2005-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2003, 2005-2015 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gdb/gnulib/import/m4/longlong.m4 b/gdb/gnulib/import/m4/longlong.m4 index b9c65c756e..d57bc700d4 100644 --- a/gdb/gnulib/import/m4/longlong.m4 +++ b/gdb/gnulib/import/m4/longlong.m4 @@ -1,5 +1,5 @@ # longlong.m4 serial 17 -dnl Copyright (C) 1999-2007, 2009-2012 Free Software Foundation, Inc. +dnl Copyright (C) 1999-2007, 2009-2015 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gdb/gnulib/import/m4/lstat.m4 b/gdb/gnulib/import/m4/lstat.m4 index 01b4eb953d..adf752c0df 100644 --- a/gdb/gnulib/import/m4/lstat.m4 +++ b/gdb/gnulib/import/m4/lstat.m4 @@ -1,6 +1,6 @@ -# serial 26 +# serial 27 -# Copyright (C) 1997-2001, 2003-2012 Free Software Foundation, Inc. +# Copyright (C) 1997-2001, 2003-2015 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -37,30 +37,28 @@ AC_DEFUN([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK], [gl_cv_func_lstat_dereferences_slashed_symlink], [rm -f conftest.sym conftest.file echo >conftest.file - if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then - AC_RUN_IFELSE( - [AC_LANG_PROGRAM( - [AC_INCLUDES_DEFAULT], - [[struct stat sbuf; - /* Linux will dereference the symlink and fail, as required by - POSIX. That is better in the sense that it means we will not - have to compile and use the lstat wrapper. */ - return lstat ("conftest.sym/", &sbuf) == 0; - ]])], - [gl_cv_func_lstat_dereferences_slashed_symlink=yes], - [gl_cv_func_lstat_dereferences_slashed_symlink=no], - [case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;; - # If we don't know, assume the worst. - *) gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;; - esac - ]) - else - # If the 'ln -s' command failed, then we probably don't even - # have an lstat function. - gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" - fi + AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [AC_INCLUDES_DEFAULT], + [[struct stat sbuf; + if (symlink ("conftest.file", "conftest.sym") != 0) + return 1; + /* Linux will dereference the symlink and fail, as required by + POSIX. That is better in the sense that it means we will not + have to compile and use the lstat wrapper. */ + return lstat ("conftest.sym/", &sbuf) == 0; + ]])], + [gl_cv_func_lstat_dereferences_slashed_symlink=yes], + [gl_cv_func_lstat_dereferences_slashed_symlink=no], + [case "$host_os" in + *-gnu*) + # Guess yes on glibc systems. + gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;; + *) + # If we don't know, assume the worst. + gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;; + esac + ]) rm -f conftest.sym conftest.file ]) case "$gl_cv_func_lstat_dereferences_slashed_symlink" in diff --git a/gdb/gnulib/import/m4/malloc.m4 b/gdb/gnulib/import/m4/malloc.m4 index 8fa48e93bc..31368ab97f 100644 --- a/gdb/gnulib/import/m4/malloc.m4 +++ b/gdb/gnulib/import/m4/malloc.m4 @@ -1,5 +1,5 @@ # malloc.m4 serial 14 -dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gdb/gnulib/import/m4/malloca.m4 b/gdb/gnulib/import/m4/malloca.m4 index 7841979f3c..7248951746 100644 --- a/gdb/gnulib/import/m4/malloca.m4 +++ b/gdb/gnulib/import/m4/malloca.m4 @@ -1,5 +1,5 @@ # malloca.m4 serial 1 -dnl Copyright (C) 2003-2004, 2006-2007, 2009-2012 Free Software Foundation, +dnl Copyright (C) 2003-2004, 2006-2007, 2009-2015 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, diff --git a/gdb/gnulib/import/m4/math_h.m4 b/gdb/gnulib/import/m4/math_h.m4 index 338e80dd15..7d0f58346b 100644 --- a/gdb/gnulib/import/m4/math_h.m4 +++ b/gdb/gnulib/import/m4/math_h.m4 @@ -1,5 +1,5 @@ # math_h.m4 serial 114 -dnl Copyright (C) 2007-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2007-2015 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gdb/gnulib/import/m4/mbrtowc.m4 b/gdb/gnulib/import/m4/mbrtowc.m4 index 8f829c8ea5..c0d751dc84 100644 --- a/gdb/gnulib/import/m4/mbrtowc.m4 +++ b/gdb/gnulib/import/m4/mbrtowc.m4 @@ -1,5 +1,5 @@ -# mbrtowc.m4 serial 25 -dnl Copyright (C) 2001-2002, 2004-2005, 2008-2012 Free Software Foundation, +# mbrtowc.m4 serial 26 +dnl Copyright (C) 2001-2002, 2004-2005, 2008-2015 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -39,6 +39,7 @@ AC_DEFUN([gl_FUNC_MBRTOWC], gl_MBRTOWC_NULL_ARG2 gl_MBRTOWC_RETVAL gl_MBRTOWC_NUL_RETVAL + gl_MBRTOWC_EMPTY_INPUT case "$gl_cv_func_mbrtowc_null_arg1" in *yes) ;; *) AC_DEFINE([MBRTOWC_NULL_ARG1_BUG], [1], @@ -67,6 +68,14 @@ AC_DEFUN([gl_FUNC_MBRTOWC], REPLACE_MBRTOWC=1 ;; esac + case "$gl_cv_func_mbrtowc_empty_input" in + *yes) ;; + *) AC_DEFINE([MBRTOWC_EMPTY_INPUT_BUG], [1], + [Define if the mbrtowc function does not return (size_t) -2 + for empty input.]) + REPLACE_MBRTOWC=1 + ;; + esac fi fi ]) @@ -533,6 +542,41 @@ int main () ]) ]) +dnl Test whether mbrtowc returns the correct value on empty input. + +AC_DEFUN([gl_MBRTOWC_EMPTY_INPUT], +[ + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + AC_CACHE_CHECK([whether mbrtowc works on empty input], + [gl_cv_func_mbrtowc_empty_input], + [ + dnl Initial guess, used when cross-compiling or when no suitable locale + dnl is present. +changequote(,)dnl + case "$host_os" in + # Guess no on AIX and glibc systems. + aix* | *-gnu*) + gl_cv_func_mbrtowc_empty_input="guessing no" ;; + *) gl_cv_func_mbrtowc_empty_input="guessing yes" ;; + esac +changequote([,])dnl + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ + #include + static wchar_t wc; + static mbstate_t mbs; + int + main (void) + { + return mbrtowc (&wc, "", 0, &mbs) == (size_t) -2; + }]])], + [gl_cv_func_mbrtowc_empty_input=no], + [gl_cv_func_mbrtowc_empty_input=yes], + [:]) + ]) +]) + # Prerequisites of lib/mbrtowc.c. AC_DEFUN([gl_PREREQ_MBRTOWC], [ : diff --git a/gdb/gnulib/import/m4/mbsinit.m4 b/gdb/gnulib/import/m4/mbsinit.m4 index da56c3d11b..61c4032902 100644 --- a/gdb/gnulib/import/m4/mbsinit.m4 +++ b/gdb/gnulib/import/m4/mbsinit.m4 @@ -1,5 +1,5 @@ # mbsinit.m4 serial 8 -dnl Copyright (C) 2008, 2010-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2008, 2010-2015 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gdb/gnulib/import/m4/mbsrtowcs.m4 b/gdb/gnulib/import/m4/mbsrtowcs.m4 index a95f6064a0..cea47e51be 100644 --- a/gdb/gnulib/import/m4/mbsrtowcs.m4 +++ b/gdb/gnulib/import/m4/mbsrtowcs.m4 @@ -1,5 +1,5 @@ # mbsrtowcs.m4 serial 13 -dnl Copyright (C) 2008-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2008-2015 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gdb/gnulib/import/m4/mbstate_t.m4 b/gdb/gnulib/import/m4/mbstate_t.m4 index 61a8190ce7..42ad6cd632 100644 --- a/gdb/gnulib/import/m4/mbstate_t.m4 +++ b/gdb/gnulib/import/m4/mbstate_t.m4 @@ -1,5 +1,5 @@ # mbstate_t.m4 serial 13 -dnl Copyright (C) 2000-2002, 2008-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2000-2002, 2008-2015 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gdb/gnulib/import/m4/memchr.m4 b/gdb/gnulib/import/m4/memchr.m4 index 004029450f..cb958d8626 100644 --- a/gdb/gnulib/import/m4/memchr.m4 +++ b/gdb/gnulib/import/m4/memchr.m4 @@ -1,5 +1,5 @@ # memchr.m4 serial 12 -dnl Copyright (C) 2002-2004, 2009-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2004, 2009-2015 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gdb/gnulib/import/m4/memmem.m4 b/gdb/gnulib/import/m4/memmem.m4 index 88f9e20521..80f2b1e339 100644 --- a/gdb/gnulib/import/m4/memmem.m4 +++ b/gdb/gnulib/import/m4/memmem.m4 @@ -1,5 +1,5 @@ # memmem.m4 serial 24 -dnl Copyright (C) 2002-2004, 2007-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2004, 2007-2015 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gdb/gnulib/import/m4/mmap-anon.m4 b/gdb/gnulib/import/m4/mmap-anon.m4 index 748b17d97a..92a88d05fb 100644 --- a/gdb/gnulib/import/m4/mmap-anon.m4 +++ b/gdb/gnulib/import/m4/mmap-anon.m4 @@ -1,5 +1,5 @@ # mmap-anon.m4 serial 10 -dnl Copyright (C) 2005, 2007, 2009-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2005, 2007, 2009-2015 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gdb/gnulib/import/m4/multiarch.m4 b/gdb/gnulib/import/m4/multiarch.m4 index 0c288b8d2a..fc575c1d43 100644 --- a/gdb/gnulib/import/m4/multiarch.m4 +++ b/gdb/gnulib/import/m4/multiarch.m4 @@ -1,5 +1,5 @@ # multiarch.m4 serial 7 -dnl Copyright (C) 2008-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2008-2015 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gdb/gnulib/import/m4/nocrash.m4 b/gdb/gnulib/import/m4/nocrash.m4 index c2638df626..56283180f0 100644 --- a/gdb/gnulib/import/m4/nocrash.m4 +++ b/gdb/gnulib/import/m4/nocrash.m4 @@ -1,5 +1,5 @@ # nocrash.m4 serial 4 -dnl Copyright (C) 2005, 2009-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2005, 2009-2015 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gdb/gnulib/import/m4/off_t.m4 b/gdb/gnulib/import/m4/off_t.m4 index dfca2dfd23..0eb14678be 100644 --- a/gdb/gnulib/import/m4/off_t.m4 +++ b/gdb/gnulib/import/m4/off_t.m4 @@ -1,5 +1,5 @@ # off_t.m4 serial 1 -dnl Copyright (C) 2012 Free Software Foundation, Inc. +dnl Copyright (C) 2012-2015 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gdb/gnulib/import/m4/pathmax.m4 b/gdb/gnulib/import/m4/pathmax.m4 index 011786129e..0e3db7a237 100644 --- a/gdb/gnulib/import/m4/pathmax.m4 +++ b/gdb/gnulib/import/m4/pathmax.m4 @@ -1,5 +1,5 @@ # pathmax.m4 serial 10 -dnl Copyright (C) 2002-2003, 2005-2006, 2009-2012 Free Software Foundation, +dnl Copyright (C) 2002-2003, 2005-2006, 2009-2015 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, diff --git a/gdb/gnulib/import/m4/readlink.m4 b/gdb/gnulib/import/m4/readlink.m4 index ccf5141d40..88c9bfef71 100644 --- a/gdb/gnulib/import/m4/readlink.m4 +++ b/gdb/gnulib/import/m4/readlink.m4 @@ -1,5 +1,5 @@ # readlink.m4 serial 12 -dnl Copyright (C) 2003, 2007, 2009-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2003, 2007, 2009-2015 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gdb/gnulib/import/m4/rename.m4 b/gdb/gnulib/import/m4/rename.m4 index 378b5ecfce..b5e4334574 100644 --- a/gdb/gnulib/import/m4/rename.m4 +++ b/gdb/gnulib/import/m4/rename.m4 @@ -1,6 +1,6 @@ # serial 26 -# Copyright (C) 2001, 2003, 2005-2006, 2009-2012 Free Software Foundation, Inc. +# Copyright (C) 2001, 2003, 2005-2006, 2009-2015 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. diff --git a/gdb/gnulib/import/m4/rmdir.m4 b/gdb/gnulib/import/m4/rmdir.m4 index 34ca87639b..09ed159e04 100644 --- a/gdb/gnulib/import/m4/rmdir.m4 +++ b/gdb/gnulib/import/m4/rmdir.m4 @@ -1,5 +1,5 @@ # rmdir.m4 serial 13 -dnl Copyright (C) 2002, 2005, 2009-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2002, 2005, 2009-2015 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gdb/gnulib/import/m4/ssize_t.m4 b/gdb/gnulib/import/m4/ssize_t.m4 index 209d64c823..25bd451434 100644 --- a/gdb/gnulib/import/m4/ssize_t.m4 +++ b/gdb/gnulib/import/m4/ssize_t.m4 @@ -1,5 +1,5 @@ # ssize_t.m4 serial 5 (gettext-0.18.2) -dnl Copyright (C) 2001-2003, 2006, 2010-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2001-2003, 2006, 2010-2015 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gdb/gnulib/import/m4/stat.m4 b/gdb/gnulib/import/m4/stat.m4 index 0fd117e05e..d1b3768963 100644 --- a/gdb/gnulib/import/m4/stat.m4 +++ b/gdb/gnulib/import/m4/stat.m4 @@ -1,6 +1,6 @@ # serial 11 -# Copyright (C) 2009-2012 Free Software Foundation, Inc. +# Copyright (C) 2009-2015 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff --git a/gdb/gnulib/import/m4/stdbool.m4 b/gdb/gnulib/import/m4/stdbool.m4 index eabfa64579..7273b82246 100644 --- a/gdb/gnulib/import/m4/stdbool.m4 +++ b/gdb/gnulib/import/m4/stdbool.m4 @@ -1,6 +1,6 @@ # Check for stdbool.h that conforms to C99. -dnl Copyright (C) 2002-2006, 2009-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2006, 2009-2015 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gdb/gnulib/import/m4/stddef_h.m4 b/gdb/gnulib/import/m4/stddef_h.m4 index cc11609609..231050274a 100644 --- a/gdb/gnulib/import/m4/stddef_h.m4 +++ b/gdb/gnulib/import/m4/stddef_h.m4 @@ -1,6 +1,6 @@ -dnl A placeholder for POSIX 2008 , for platforms that have issues. -# stddef_h.m4 serial 4 -dnl Copyright (C) 2009-2012 Free Software Foundation, Inc. +dnl A placeholder for , for platforms that have issues. +# stddef_h.m4 serial 5 +dnl Copyright (C) 2009-2015 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. @@ -10,6 +10,9 @@ AC_DEFUN([gl_STDDEF_H], AC_REQUIRE([gl_STDDEF_H_DEFAULTS]) AC_REQUIRE([gt_TYPE_WCHAR_T]) STDDEF_H= + AC_CHECK_TYPE([max_align_t], [], [HAVE_MAX_ALIGN_T=0; STDDEF_H=stddef.h], + [[#include + ]]) if test $gt_cv_c_wchar_t = no; then HAVE_WCHAR_T=0 STDDEF_H=stddef.h @@ -43,5 +46,6 @@ AC_DEFUN([gl_STDDEF_H_DEFAULTS], [ dnl Assume proper GNU behavior unless another module says otherwise. REPLACE_NULL=0; AC_SUBST([REPLACE_NULL]) + HAVE_MAX_ALIGN_T=1; AC_SUBST([HAVE_MAX_ALIGN_T]) HAVE_WCHAR_T=1; AC_SUBST([HAVE_WCHAR_T]) ]) diff --git a/gdb/gnulib/import/m4/stdint.m4 b/gdb/gnulib/import/m4/stdint.m4 index 28d342ea23..4011a4942a 100644 --- a/gdb/gnulib/import/m4/stdint.m4 +++ b/gdb/gnulib/import/m4/stdint.m4 @@ -1,5 +1,5 @@ # stdint.m4 serial 43 -dnl Copyright (C) 2001-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2001-2015 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gdb/gnulib/import/m4/stdio_h.m4 b/gdb/gnulib/import/m4/stdio_h.m4 index 3bd6580366..f60cc2156e 100644 --- a/gdb/gnulib/import/m4/stdio_h.m4 +++ b/gdb/gnulib/import/m4/stdio_h.m4 @@ -1,14 +1,41 @@ -# stdio_h.m4 serial 43 -dnl Copyright (C) 2007-2012 Free Software Foundation, Inc. +# stdio_h.m4 serial 46 +dnl Copyright (C) 2007-2015 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_STDIO_H], [ + dnl For __USE_MINGW_ANSI_STDIO + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + AC_REQUIRE([gl_STDIO_H_DEFAULTS]) gl_NEXT_HEADERS([stdio.h]) + dnl Determine whether __USE_MINGW_ANSI_STDIO makes printf and + dnl inttypes.h behave like gnu instead of system; we must give our + dnl printf wrapper the right attribute to match. + AC_CACHE_CHECK([which flavor of printf attribute matches inttypes macros], + [gl_cv_func_printf_attribute_flavor], + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + #define __STDC_FORMAT_MACROS 1 + #include + #include + /* For non-mingw systems, compilation will trivially succeed. + For mingw, compilation will succeed for older mingw (system + printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */ + #if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) && \ + (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) + extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1]; + #endif + ]])], [gl_cv_func_printf_attribute_flavor=system], + [gl_cv_func_printf_attribute_flavor=gnu])]) + if test "$gl_cv_func_printf_attribute_flavor" = gnu; then + AC_DEFINE([GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU], [1], + [Define to 1 if printf and friends should be labeled with + attribute "__gnu_printf__" instead of "__printf__"]) + fi + dnl No need to create extra modules for these functions. Everyone who uses dnl likely needs them. GNULIB_FSCANF=1 diff --git a/gdb/gnulib/import/m4/stdlib_h.m4 b/gdb/gnulib/import/m4/stdlib_h.m4 index 9c69f2e4d1..0b4c623ec7 100644 --- a/gdb/gnulib/import/m4/stdlib_h.m4 +++ b/gdb/gnulib/import/m4/stdlib_h.m4 @@ -1,5 +1,5 @@ -# stdlib_h.m4 serial 41 -dnl Copyright (C) 2007-2012 Free Software Foundation, Inc. +# stdlib_h.m4 serial 42 +dnl Copyright (C) 2007-2015 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -22,7 +22,7 @@ AC_DEFUN([gl_STDLIB_H], ]], [_Exit atoll canonicalize_file_name getloadavg getsubopt grantpt initstate initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps posix_openpt ptsname ptsname_r random random_r realpath rpmatch - setenv setstate setstate_r srandom srandom_r + secure_getenv setenv setstate setstate_r srandom srandom_r strtod strtoll strtoull unlockpt unsetenv]) ]) @@ -55,11 +55,13 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS], GNULIB_PTSNAME=0; AC_SUBST([GNULIB_PTSNAME]) GNULIB_PTSNAME_R=0; AC_SUBST([GNULIB_PTSNAME_R]) GNULIB_PUTENV=0; AC_SUBST([GNULIB_PUTENV]) + GNULIB_QSORT_R=0; AC_SUBST([GNULIB_QSORT_R]) GNULIB_RANDOM=0; AC_SUBST([GNULIB_RANDOM]) GNULIB_RANDOM_R=0; AC_SUBST([GNULIB_RANDOM_R]) GNULIB_REALLOC_POSIX=0; AC_SUBST([GNULIB_REALLOC_POSIX]) GNULIB_REALPATH=0; AC_SUBST([GNULIB_REALPATH]) GNULIB_RPMATCH=0; AC_SUBST([GNULIB_RPMATCH]) + GNULIB_SECURE_GETENV=0; AC_SUBST([GNULIB_SECURE_GETENV]) GNULIB_SETENV=0; AC_SUBST([GNULIB_SETENV]) GNULIB_STRTOD=0; AC_SUBST([GNULIB_STRTOD]) GNULIB_STRTOLL=0; AC_SUBST([GNULIB_STRTOLL]) @@ -88,6 +90,7 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS], HAVE_RANDOM_R=1; AC_SUBST([HAVE_RANDOM_R]) HAVE_REALPATH=1; AC_SUBST([HAVE_REALPATH]) HAVE_RPMATCH=1; AC_SUBST([HAVE_RPMATCH]) + HAVE_SECURE_GETENV=1; AC_SUBST([HAVE_SECURE_GETENV]) HAVE_SETENV=1; AC_SUBST([HAVE_SETENV]) HAVE_DECL_SETENV=1; AC_SUBST([HAVE_DECL_SETENV]) HAVE_STRTOD=1; AC_SUBST([HAVE_STRTOD]) @@ -105,6 +108,7 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS], REPLACE_PTSNAME=0; AC_SUBST([REPLACE_PTSNAME]) REPLACE_PTSNAME_R=0; AC_SUBST([REPLACE_PTSNAME_R]) REPLACE_PUTENV=0; AC_SUBST([REPLACE_PUTENV]) + REPLACE_QSORT_R=0; AC_SUBST([REPLACE_QSORT_R]) REPLACE_RANDOM_R=0; AC_SUBST([REPLACE_RANDOM_R]) REPLACE_REALLOC=0; AC_SUBST([REPLACE_REALLOC]) REPLACE_REALPATH=0; AC_SUBST([REPLACE_REALPATH]) diff --git a/gdb/gnulib/import/m4/string_h.m4 b/gdb/gnulib/import/m4/string_h.m4 index 5677e092d4..55d09ef407 100644 --- a/gdb/gnulib/import/m4/string_h.m4 +++ b/gdb/gnulib/import/m4/string_h.m4 @@ -1,6 +1,6 @@ # Configure a GNU-like replacement for . -# Copyright (C) 2007-2012 Free Software Foundation, Inc. +# Copyright (C) 2007-2015 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. diff --git a/gdb/gnulib/import/m4/strstr.m4 b/gdb/gnulib/import/m4/strstr.m4 index b8f94bf757..040c0b9dfd 100644 --- a/gdb/gnulib/import/m4/strstr.m4 +++ b/gdb/gnulib/import/m4/strstr.m4 @@ -1,5 +1,5 @@ # strstr.m4 serial 16 -dnl Copyright (C) 2008-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2008-2015 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gdb/gnulib/import/m4/strtok_r.m4 b/gdb/gnulib/import/m4/strtok_r.m4 index 60e33a695f..9ed6a25c91 100644 --- a/gdb/gnulib/import/m4/strtok_r.m4 +++ b/gdb/gnulib/import/m4/strtok_r.m4 @@ -1,5 +1,5 @@ # strtok_r.m4 serial 13 -dnl Copyright (C) 2002-2004, 2006-2007, 2009-2012 Free Software Foundation, +dnl Copyright (C) 2002-2004, 2006-2007, 2009-2015 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, 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 0000000000..eaeabe7d96 --- /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-2015 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 is self-contained], + [gl_cv_header_sys_socket_h_selfcontained], + [ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[]])], + [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, 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 defines the SHUT_* macros], + [gl_cv_header_sys_socket_h_shut], + [ + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[#include ]], + [[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 +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +#ifdef HAVE_WS2TCPIP_H +#include +#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 + #ifdef HAVE_SYS_SOCKET_H + #include + #endif + #ifdef HAVE_WS2TCPIP_H + #include + #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 +#include + ]], [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 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 replacement and of the +# 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/m4/sys_stat_h.m4 b/gdb/gnulib/import/m4/sys_stat_h.m4 index 8af3353ea5..6c909e816a 100644 --- a/gdb/gnulib/import/m4/sys_stat_h.m4 +++ b/gdb/gnulib/import/m4/sys_stat_h.m4 @@ -1,5 +1,5 @@ # sys_stat_h.m4 serial 28 -*- Autoconf -*- -dnl Copyright (C) 2006-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2006-2015 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gdb/gnulib/import/m4/sys_time_h.m4 b/gdb/gnulib/import/m4/sys_time_h.m4 new file mode 100644 index 0000000000..28c8b1acbb --- /dev/null +++ b/gdb/gnulib/import/m4/sys_time_h.m4 @@ -0,0 +1,111 @@ +# Configure a replacement for . +# serial 8 + +# Copyright (C) 2007, 2009-2015 Free Software Foundation, Inc. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# Written by Paul Eggert and Martin Lambers. + +AC_DEFUN([gl_HEADER_SYS_TIME_H], +[ + dnl Use AC_REQUIRE here, so that the REPLACE_GETTIMEOFDAY=0 statement + dnl below is expanded once only, before all REPLACE_GETTIMEOFDAY=1 + dnl statements that occur in other macros. + AC_REQUIRE([gl_HEADER_SYS_TIME_H_BODY]) +]) + +AC_DEFUN([gl_HEADER_SYS_TIME_H_BODY], +[ + AC_REQUIRE([AC_C_RESTRICT]) + AC_REQUIRE([gl_HEADER_SYS_TIME_H_DEFAULTS]) + AC_CHECK_HEADERS_ONCE([sys/time.h]) + gl_CHECK_NEXT_HEADERS([sys/time.h]) + + if test $ac_cv_header_sys_time_h != yes; then + HAVE_SYS_TIME_H=0 + fi + + dnl On native Windows with MSVC, 'struct timeval' is defined in + dnl only. So include that header in the list. + gl_PREREQ_SYS_H_WINSOCK2 + AC_CACHE_CHECK([for struct timeval], [gl_cv_sys_struct_timeval], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#if HAVE_SYS_TIME_H + #include + #endif + #include + #if HAVE_WINSOCK2_H + # include + #endif + ]], + [[static struct timeval x; x.tv_sec = x.tv_usec;]])], + [gl_cv_sys_struct_timeval=yes], + [gl_cv_sys_struct_timeval=no]) + ]) + if test $gl_cv_sys_struct_timeval != yes; then + HAVE_STRUCT_TIMEVAL=0 + else + dnl On native Windows with a 64-bit 'time_t', 'struct timeval' is defined + dnl (in and for mingw64, in only + dnl for MSVC) with a tv_sec field of type 'long' (32-bit!), which is + dnl smaller than the 'time_t' type mandated by POSIX. + dnl On OpenBSD 5.1 amd64, tv_sec is 64 bits and time_t 32 bits, but + dnl that is good enough. + AC_CACHE_CHECK([for wide-enough struct timeval.tv_sec member], + [gl_cv_sys_struct_timeval_tv_sec], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#if HAVE_SYS_TIME_H + #include + #endif + #include + #if HAVE_WINSOCK2_H + # include + #endif + ]], + [[static struct timeval x; + typedef int verify_tv_sec_type[ + sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1 + ]; + ]])], + [gl_cv_sys_struct_timeval_tv_sec=yes], + [gl_cv_sys_struct_timeval_tv_sec=no]) + ]) + if test $gl_cv_sys_struct_timeval_tv_sec != yes; then + REPLACE_STRUCT_TIMEVAL=1 + fi + fi + + 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([[ +#if HAVE_SYS_TIME_H +# include +#endif +#include + ]], [gettimeofday]) +]) + +AC_DEFUN([gl_SYS_TIME_MODULE_INDICATOR], +[ + dnl Use AC_REQUIRE here, so that the default settings are expanded once only. + AC_REQUIRE([gl_HEADER_SYS_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_SYS_TIME_H_DEFAULTS], +[ + GNULIB_GETTIMEOFDAY=0; AC_SUBST([GNULIB_GETTIMEOFDAY]) + dnl Assume POSIX behavior unless another module says otherwise. + HAVE_GETTIMEOFDAY=1; AC_SUBST([HAVE_GETTIMEOFDAY]) + HAVE_STRUCT_TIMEVAL=1; AC_SUBST([HAVE_STRUCT_TIMEVAL]) + HAVE_SYS_TIME_H=1; AC_SUBST([HAVE_SYS_TIME_H]) + HAVE_TIMEZONE_T=0; AC_SUBST([HAVE_TIMEZONE_T]) + REPLACE_GETTIMEOFDAY=0; AC_SUBST([REPLACE_GETTIMEOFDAY]) + REPLACE_STRUCT_TIMEVAL=0; AC_SUBST([REPLACE_STRUCT_TIMEVAL]) +]) diff --git a/gdb/gnulib/import/m4/sys_types_h.m4 b/gdb/gnulib/import/m4/sys_types_h.m4 index f11eef2fe8..2232aece63 100644 --- a/gdb/gnulib/import/m4/sys_types_h.m4 +++ b/gdb/gnulib/import/m4/sys_types_h.m4 @@ -1,10 +1,10 @@ -# sys_types_h.m4 serial 4 -dnl Copyright (C) 2011-2012 Free Software Foundation, Inc. +# sys_types_h.m4 serial 5 +dnl Copyright (C) 2011-2015 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_SYS_TYPES_H], +AC_DEFUN_ONCE([gl_SYS_TYPES_H], [ AC_REQUIRE([gl_SYS_TYPES_H_DEFAULTS]) gl_NEXT_HEADERS([sys/types.h]) diff --git a/gdb/gnulib/import/m4/time_h.m4 b/gdb/gnulib/import/m4/time_h.m4 index 6415bfbcb7..754b469a0d 100644 --- a/gdb/gnulib/import/m4/time_h.m4 +++ b/gdb/gnulib/import/m4/time_h.m4 @@ -1,8 +1,8 @@ # Configure a more-standard replacement for . -# Copyright (C) 2000-2001, 2003-2007, 2009-2012 Free Software Foundation, Inc. +# Copyright (C) 2000-2001, 2003-2007, 2009-2015 Free Software Foundation, Inc. -# serial 7 +# serial 9 # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -26,7 +26,7 @@ AC_DEFUN([gl_HEADER_TIME_H_BODY], ]) dnl Check whether 'struct timespec' is declared -dnl in time.h, sys/time.h, or pthread.h. +dnl in time.h, sys/time.h, pthread.h, or unistd.h. AC_DEFUN([gl_CHECK_TYPE_STRUCT_TIMESPEC], [ @@ -44,6 +44,7 @@ AC_DEFUN([gl_CHECK_TYPE_STRUCT_TIMESPEC], TIME_H_DEFINES_STRUCT_TIMESPEC=0 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0 + UNISTD_H_DEFINES_STRUCT_TIMESPEC=0 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then TIME_H_DEFINES_STRUCT_TIMESPEC=1 else @@ -70,12 +71,26 @@ AC_DEFUN([gl_CHECK_TYPE_STRUCT_TIMESPEC], [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 + else + AC_CACHE_CHECK([for struct timespec in ], + [gl_cv_sys_struct_timespec_in_unistd_h], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include + ]], + [[static struct timespec x; x.tv_sec = x.tv_nsec;]])], + [gl_cv_sys_struct_timespec_in_unistd_h=yes], + [gl_cv_sys_struct_timespec_in_unistd_h=no])]) + if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then + UNISTD_H_DEFINES_STRUCT_TIMESPEC=1 + fi 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_SUBST([UNISTD_H_DEFINES_STRUCT_TIMESPEC]) ]) AC_DEFUN([gl_TIME_MODULE_INDICATOR], @@ -94,6 +109,7 @@ AC_DEFUN([gl_HEADER_TIME_H_DEFAULTS], GNULIB_STRPTIME=0; AC_SUBST([GNULIB_STRPTIME]) GNULIB_TIMEGM=0; AC_SUBST([GNULIB_TIMEGM]) GNULIB_TIME_R=0; AC_SUBST([GNULIB_TIME_R]) + GNULIB_TIME_RZ=0; AC_SUBST([GNULIB_TIME_RZ]) 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]) @@ -106,4 +122,13 @@ AC_DEFUN([gl_HEADER_TIME_H_DEFAULTS], REPLACE_MKTIME=GNULIB_PORTCHECK; AC_SUBST([REPLACE_MKTIME]) REPLACE_NANOSLEEP=GNULIB_PORTCHECK; AC_SUBST([REPLACE_NANOSLEEP]) REPLACE_TIMEGM=GNULIB_PORTCHECK; AC_SUBST([REPLACE_TIMEGM]) + + dnl Hack so that the time module doesn't depend on the sys_time module. + dnl First, default GNULIB_GETTIMEOFDAY to 0 if sys_time is absent. + : ${GNULIB_GETTIMEOFDAY=0}; AC_SUBST([GNULIB_GETTIMEOFDAY]) + dnl Second, it's OK to not use GNULIB_PORTCHECK for REPLACE_GMTIME + dnl and REPLACE_LOCALTIME, as portability to Solaris 2.6 and earlier + dnl is no longer a big deal. + REPLACE_GMTIME=0; AC_SUBST([REPLACE_GMTIME]) + REPLACE_LOCALTIME=0; AC_SUBST([REPLACE_LOCALTIME]) ]) diff --git a/gdb/gnulib/import/m4/unistd_h.m4 b/gdb/gnulib/import/m4/unistd_h.m4 index f68fbff8ce..b3c581f7b2 100644 --- a/gdb/gnulib/import/m4/unistd_h.m4 +++ b/gdb/gnulib/import/m4/unistd_h.m4 @@ -1,5 +1,5 @@ -# unistd_h.m4 serial 66 -dnl Copyright (C) 2006-2012 Free Software Foundation, Inc. +# unistd_h.m4 serial 68 +dnl Copyright (C) 2006-2015 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. @@ -160,6 +160,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS], REPLACE_FTRUNCATE=0; AC_SUBST([REPLACE_FTRUNCATE]) REPLACE_GETCWD=0; AC_SUBST([REPLACE_GETCWD]) REPLACE_GETDOMAINNAME=0; AC_SUBST([REPLACE_GETDOMAINNAME]) + REPLACE_GETDTABLESIZE=0; AC_SUBST([REPLACE_GETDTABLESIZE]) REPLACE_GETLOGIN_R=0; AC_SUBST([REPLACE_GETLOGIN_R]) REPLACE_GETGROUPS=0; AC_SUBST([REPLACE_GETGROUPS]) REPLACE_GETPAGESIZE=0; AC_SUBST([REPLACE_GETPAGESIZE]) @@ -172,9 +173,11 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS], REPLACE_PWRITE=0; AC_SUBST([REPLACE_PWRITE]) REPLACE_READ=0; AC_SUBST([REPLACE_READ]) REPLACE_READLINK=0; AC_SUBST([REPLACE_READLINK]) + REPLACE_READLINKAT=0; AC_SUBST([REPLACE_READLINKAT]) REPLACE_RMDIR=0; AC_SUBST([REPLACE_RMDIR]) REPLACE_SLEEP=0; AC_SUBST([REPLACE_SLEEP]) REPLACE_SYMLINK=0; AC_SUBST([REPLACE_SYMLINK]) + REPLACE_SYMLINKAT=0; AC_SUBST([REPLACE_SYMLINKAT]) REPLACE_TTYNAME_R=0; AC_SUBST([REPLACE_TTYNAME_R]) REPLACE_UNLINK=0; AC_SUBST([REPLACE_UNLINK]) REPLACE_UNLINKAT=0; AC_SUBST([REPLACE_UNLINKAT]) diff --git a/gdb/gnulib/import/m4/warn-on-use.m4 b/gdb/gnulib/import/m4/warn-on-use.m4 index a77802eb91..1e98dc9b77 100644 --- a/gdb/gnulib/import/m4/warn-on-use.m4 +++ b/gdb/gnulib/import/m4/warn-on-use.m4 @@ -1,5 +1,5 @@ # warn-on-use.m4 serial 5 -dnl Copyright (C) 2010-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2010-2015 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gdb/gnulib/import/m4/wchar_h.m4 b/gdb/gnulib/import/m4/wchar_h.m4 index c7a8b2d781..9d1b0f8b6d 100644 --- a/gdb/gnulib/import/m4/wchar_h.m4 +++ b/gdb/gnulib/import/m4/wchar_h.m4 @@ -1,6 +1,6 @@ dnl A placeholder for ISO C99 , for platforms that have issues. -dnl Copyright (C) 2007-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2007-2015 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gdb/gnulib/import/m4/wchar_t.m4 b/gdb/gnulib/import/m4/wchar_t.m4 index 534735d8c6..dc964e67e2 100644 --- a/gdb/gnulib/import/m4/wchar_t.m4 +++ b/gdb/gnulib/import/m4/wchar_t.m4 @@ -1,5 +1,5 @@ # wchar_t.m4 serial 4 (gettext-0.18.2) -dnl Copyright (C) 2002-2003, 2008-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2003, 2008-2015 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gdb/gnulib/import/m4/wctype_h.m4 b/gdb/gnulib/import/m4/wctype_h.m4 index 885e6fcb21..95a4705b0e 100644 --- a/gdb/gnulib/import/m4/wctype_h.m4 +++ b/gdb/gnulib/import/m4/wctype_h.m4 @@ -2,7 +2,7 @@ dnl A placeholder for ISO C99 , for platforms that lack it. -dnl Copyright (C) 2006-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2006-2015 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gdb/gnulib/import/m4/wint_t.m4 b/gdb/gnulib/import/m4/wint_t.m4 index 3260cce323..ca3fd449a1 100644 --- a/gdb/gnulib/import/m4/wint_t.m4 +++ b/gdb/gnulib/import/m4/wint_t.m4 @@ -1,5 +1,5 @@ # wint_t.m4 serial 5 (gettext-0.18.2) -dnl Copyright (C) 2003, 2007-2012 Free Software Foundation, Inc. +dnl Copyright (C) 2003, 2007-2015 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. diff --git a/gdb/gnulib/import/malloc.c b/gdb/gnulib/import/malloc.c index e0d5c89d18..00800a2848 100644 --- a/gdb/gnulib/import/malloc.c +++ b/gdb/gnulib/import/malloc.c @@ -1,6 +1,6 @@ /* malloc() function that is glibc compatible. - Copyright (C) 1997-1998, 2006-2007, 2009-2012 Free Software Foundation, Inc. + Copyright (C) 1997-1998, 2006-2007, 2009-2015 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gdb/gnulib/import/malloca.c b/gdb/gnulib/import/malloca.c index 1f7533a7d3..198a96ce74 100644 --- a/gdb/gnulib/import/malloca.c +++ b/gdb/gnulib/import/malloca.c @@ -1,5 +1,5 @@ /* Safe automatic memory allocation. - Copyright (C) 2003, 2006-2007, 2009-2012 Free Software Foundation, Inc. + Copyright (C) 2003, 2006-2007, 2009-2015 Free Software Foundation, Inc. Written by Bruno Haible , 2003. This program is free software; you can redistribute it and/or modify @@ -49,12 +49,18 @@ #define MAGIC_SIZE sizeof (int) /* This is how the header info would look like without any alignment considerations. */ -struct preliminary_header { void *next; char room[MAGIC_SIZE]; }; +struct preliminary_header { void *next; int magic; }; /* But the header's size must be a multiple of sa_alignment_max. */ #define HEADER_SIZE \ (((sizeof (struct preliminary_header) + sa_alignment_max - 1) / sa_alignment_max) * sa_alignment_max) -struct header { void *next; char room[HEADER_SIZE - sizeof (struct preliminary_header) + MAGIC_SIZE]; }; -verify (HEADER_SIZE == sizeof (struct header)); +union header { + void *next; + struct { + char room[HEADER_SIZE - MAGIC_SIZE]; + int word; + } magic; +}; +verify (HEADER_SIZE == sizeof (union header)); /* We make the hash table quite big, so that during lookups the probability of empty hash buckets is quite high. There is no need to make the hash table resizable, because when the hash table gets filled so much that the @@ -74,20 +80,21 @@ mmalloca (size_t n) if (nplus >= n) { - char *p = (char *) malloc (nplus); + void *p = malloc (nplus); if (p != NULL) { size_t slot; + union header *h = p; - p += HEADER_SIZE; + p = h + 1; /* Put a magic number into the indicator word. */ - ((int *) p)[-1] = MAGIC_NUMBER; + h->magic.word = MAGIC_NUMBER; /* Enter p into the hash table. */ slot = (uintptr_t) p % HASH_TABLE_SIZE; - ((struct header *) (p - HEADER_SIZE))->next = mmalloca_results[slot]; + h->next = mmalloca_results[slot]; mmalloca_results[slot] = p; return p; @@ -123,15 +130,17 @@ freea (void *p) void **chain = &mmalloca_results[slot]; for (; *chain != NULL;) { + union header *h = p; if (*chain == p) { /* Found it. Remove it from the hash table and free it. */ - char *p_begin = (char *) p - HEADER_SIZE; - *chain = ((struct header *) p_begin)->next; + union header *p_begin = h - 1; + *chain = p_begin->next; free (p_begin); return; } - chain = &((struct header *) ((char *) *chain - HEADER_SIZE))->next; + h = *chain; + chain = &h[-1].next; } } /* At this point, we know it was not a mmalloca() result. */ diff --git a/gdb/gnulib/import/malloca.h b/gdb/gnulib/import/malloca.h index f06e9e7b46..7a4190cfe4 100644 --- a/gdb/gnulib/import/malloca.h +++ b/gdb/gnulib/import/malloca.h @@ -1,5 +1,5 @@ /* Safe automatic memory allocation. - Copyright (C) 2003-2007, 2009-2012 Free Software Foundation, Inc. + Copyright (C) 2003-2007, 2009-2015 Free Software Foundation, Inc. Written by Bruno Haible , 2003. This program is free software; you can redistribute it and/or modify @@ -92,7 +92,7 @@ extern void * nmalloca (size_t n, size_t s); /* ------------------- Auxiliary, non-public definitions ------------------- */ /* Determine the alignment of a type at compile time. */ -#if defined __GNUC__ +#if defined __GNUC__ || defined __IBM__ALIGNOF__ # define sa_alignof __alignof__ #elif defined __cplusplus template struct sa_alignof_helper { char __slot1; type __slot2; }; diff --git a/gdb/gnulib/import/math.in.h b/gdb/gnulib/import/math.in.h index 252e205340..62a089ab2d 100644 --- a/gdb/gnulib/import/math.in.h +++ b/gdb/gnulib/import/math.in.h @@ -1,6 +1,6 @@ /* A GNU-like . - Copyright (C) 2002-2003, 2007-2012 Free Software Foundation, Inc. + Copyright (C) 2002-2003, 2007-2015 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 @@ -28,6 +28,9 @@ #ifndef _@GUARD_PREFIX@_MATH_H #define _@GUARD_PREFIX@_MATH_H +#ifndef _GL_INLINE_HEADER_BEGIN + #error "Please include config.h first." +#endif _GL_INLINE_HEADER_BEGIN #ifndef _GL_MATH_INLINE # define _GL_MATH_INLINE _GL_INLINE diff --git a/gdb/gnulib/import/mbrtowc.c b/gdb/gnulib/import/mbrtowc.c index e3f354beed..e49d55b3b1 100644 --- a/gdb/gnulib/import/mbrtowc.c +++ b/gdb/gnulib/import/mbrtowc.c @@ -1,5 +1,5 @@ /* Convert multibyte character to wide character. - Copyright (C) 1999-2002, 2005-2012 Free Software Foundation, Inc. + Copyright (C) 1999-2002, 2005-2015 Free Software Foundation, Inc. Written by Bruno Haible , 2008. This program is free software: you can redistribute it and/or modify @@ -328,7 +328,7 @@ mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps) size_t rpl_mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps) { -# if MBRTOWC_NULL_ARG2_BUG || MBRTOWC_RETVAL_BUG +# if MBRTOWC_NULL_ARG2_BUG || MBRTOWC_RETVAL_BUG || MBRTOWC_EMPTY_INPUT_BUG if (s == NULL) { pwc = NULL; @@ -337,6 +337,11 @@ rpl_mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps) } # endif +# if MBRTOWC_EMPTY_INPUT_BUG + if (n == 0) + return (size_t) -2; +# endif + # if MBRTOWC_RETVAL_BUG { static mbstate_t internal_state; diff --git a/gdb/gnulib/import/mbsinit.c b/gdb/gnulib/import/mbsinit.c index 638142e8ba..4effdd8047 100644 --- a/gdb/gnulib/import/mbsinit.c +++ b/gdb/gnulib/import/mbsinit.c @@ -1,5 +1,5 @@ /* Test for initial conversion state. - Copyright (C) 2008-2012 Free Software Foundation, Inc. + Copyright (C) 2008-2015 Free Software Foundation, Inc. Written by Bruno Haible , 2008. This program is free software: you can redistribute it and/or modify diff --git a/gdb/gnulib/import/mbsrtowcs-impl.h b/gdb/gnulib/import/mbsrtowcs-impl.h index 019bc336d2..a0f4271742 100644 --- a/gdb/gnulib/import/mbsrtowcs-impl.h +++ b/gdb/gnulib/import/mbsrtowcs-impl.h @@ -1,5 +1,5 @@ /* Convert string to wide string. - Copyright (C) 2008-2012 Free Software Foundation, Inc. + Copyright (C) 2008-2015 Free Software Foundation, Inc. Written by Bruno Haible , 2008. This program is free software: you can redistribute it and/or modify diff --git a/gdb/gnulib/import/mbsrtowcs-state.c b/gdb/gnulib/import/mbsrtowcs-state.c index cca17912f6..522eb69068 100644 --- a/gdb/gnulib/import/mbsrtowcs-state.c +++ b/gdb/gnulib/import/mbsrtowcs-state.c @@ -1,5 +1,5 @@ /* Convert string to wide string. - Copyright (C) 2008-2012 Free Software Foundation, Inc. + Copyright (C) 2008-2015 Free Software Foundation, Inc. Written by Bruno Haible , 2008. This program is free software: you can redistribute it and/or modify diff --git a/gdb/gnulib/import/mbsrtowcs.c b/gdb/gnulib/import/mbsrtowcs.c index e3ec8767c3..c37eba72c9 100644 --- a/gdb/gnulib/import/mbsrtowcs.c +++ b/gdb/gnulib/import/mbsrtowcs.c @@ -1,5 +1,5 @@ /* Convert string to wide string. - Copyright (C) 2008-2012 Free Software Foundation, Inc. + Copyright (C) 2008-2015 Free Software Foundation, Inc. Written by Bruno Haible , 2008. This program is free software: you can redistribute it and/or modify diff --git a/gdb/gnulib/import/memchr.c b/gdb/gnulib/import/memchr.c index b8fb0efb95..f74cc9afc1 100644 --- a/gdb/gnulib/import/memchr.c +++ b/gdb/gnulib/import/memchr.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2012 +/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2015 Free Software Foundation, Inc. Based on strlen implementation by Torbjorn Granlund (tege@sics.se), diff --git a/gdb/gnulib/import/memmem.c b/gdb/gnulib/import/memmem.c index 29ffcc038a..e40fedacb4 100644 --- a/gdb/gnulib/import/memmem.c +++ b/gdb/gnulib/import/memmem.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-1994, 1996-1998, 2000, 2004, 2007-2012 Free Software +/* Copyright (C) 1991-1994, 1996-1998, 2000, 2004, 2007-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. diff --git a/gdb/gnulib/import/pathmax.h b/gdb/gnulib/import/pathmax.h index 03db7cb519..2f3b64f457 100644 --- a/gdb/gnulib/import/pathmax.h +++ b/gdb/gnulib/import/pathmax.h @@ -1,5 +1,5 @@ /* Define PATH_MAX somehow. Requires sys/types.h. - Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2012 Free Software + Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2015 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify diff --git a/gdb/gnulib/import/readlink.c b/gdb/gnulib/import/readlink.c index baac132244..965c3e2558 100644 --- a/gdb/gnulib/import/readlink.c +++ b/gdb/gnulib/import/readlink.c @@ -1,5 +1,5 @@ /* Stub for readlink(). - Copyright (C) 2003-2007, 2009-2012 Free Software Foundation, Inc. + Copyright (C) 2003-2007, 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gdb/gnulib/import/ref-add.sin b/gdb/gnulib/import/ref-add.sin index 4ec043f87d..6cbe5b540b 100644 --- a/gdb/gnulib/import/ref-add.sin +++ b/gdb/gnulib/import/ref-add.sin @@ -1,6 +1,6 @@ # Add this package to a list of references stored in a text file. # -# Copyright (C) 2000, 2009-2012 Free Software Foundation, Inc. +# Copyright (C) 2000, 2009-2015 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gdb/gnulib/import/ref-del.sin b/gdb/gnulib/import/ref-del.sin index eb0388117b..f50cf0aa42 100644 --- a/gdb/gnulib/import/ref-del.sin +++ b/gdb/gnulib/import/ref-del.sin @@ -1,6 +1,6 @@ # Remove this package from a list of references stored in a text file. # -# Copyright (C) 2000, 2009-2012 Free Software Foundation, Inc. +# Copyright (C) 2000, 2009-2015 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gdb/gnulib/import/rename.c b/gdb/gnulib/import/rename.c index 4ebfc313ee..43be743db4 100644 --- a/gdb/gnulib/import/rename.c +++ b/gdb/gnulib/import/rename.c @@ -1,6 +1,6 @@ /* Work around rename bugs in some systems. - Copyright (C) 2001-2003, 2005-2006, 2009-2012 Free Software Foundation, Inc. + Copyright (C) 2001-2003, 2005-2006, 2009-2015 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 @@ -285,7 +285,7 @@ rpl_rename (char const *src, char const *dst) char *dst_temp = (char *) dst; bool src_slash; bool dst_slash; - bool dst_exists; + bool dst_exists _GL_UNUSED; int ret_val = -1; int rename_errno = ENOTDIR; struct stat src_st; @@ -462,7 +462,9 @@ rpl_rename (char const *src, char const *dst) ret_val = rename (src_temp, dst_temp); rename_errno = errno; - out: + + out: _GL_UNUSED_LABEL; + if (src_temp != src) free (src_temp); if (dst_temp != dst) diff --git a/gdb/gnulib/import/rmdir.c b/gdb/gnulib/import/rmdir.c index 50170645a5..ae21d54195 100644 --- a/gdb/gnulib/import/rmdir.c +++ b/gdb/gnulib/import/rmdir.c @@ -1,6 +1,6 @@ /* Work around rmdir bugs. - Copyright (C) 1988, 1990, 1999, 2003-2006, 2009-2012 Free Software + Copyright (C) 1988, 1990, 1999, 2003-2006, 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify diff --git a/gdb/gnulib/import/same-inode.h b/gdb/gnulib/import/same-inode.h index 8c3900d041..ecc3049d74 100644 --- a/gdb/gnulib/import/same-inode.h +++ b/gdb/gnulib/import/same-inode.h @@ -1,6 +1,6 @@ /* Determine whether two stat buffers refer to the same file. - Copyright (C) 2006, 2009-2012 Free Software Foundation, Inc. + Copyright (C) 2006, 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gdb/gnulib/import/stat.c b/gdb/gnulib/import/stat.c index c0bcb88320..2209826fc3 100644 --- a/gdb/gnulib/import/stat.c +++ b/gdb/gnulib/import/stat.c @@ -1,5 +1,5 @@ /* Work around platform bugs in stat. - Copyright (C) 2009-2012 Free Software Foundation, Inc. + Copyright (C) 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gdb/gnulib/import/stdbool.in.h b/gdb/gnulib/import/stdbool.in.h index 1f8caee4f2..64a1761825 100644 --- a/gdb/gnulib/import/stdbool.in.h +++ b/gdb/gnulib/import/stdbool.in.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2003, 2006-2012 Free Software Foundation, Inc. +/* Copyright (C) 2001-2003, 2006-2015 Free Software Foundation, Inc. Written by Bruno Haible , 2001. This program is free software; you can redistribute it and/or modify diff --git a/gdb/gnulib/import/stddef.in.h b/gdb/gnulib/import/stddef.in.h index 17fcaea2bf..698307bc95 100644 --- a/gdb/gnulib/import/stddef.in.h +++ b/gdb/gnulib/import/stddef.in.h @@ -1,6 +1,6 @@ /* A substitute for POSIX 2008 , for platforms that have issues. - Copyright (C) 2009-2012 Free Software Foundation, Inc. + Copyright (C) 2009-2015 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 @@ -39,7 +39,6 @@ # if !(defined _@GUARD_PREFIX@_STDDEF_H && defined _GL_STDDEF_WINT_T) # ifdef __need_wint_t -# undef _@GUARD_PREFIX@_STDDEF_H # define _GL_STDDEF_WINT_T # endif # @INCLUDE_NEXT@ @NEXT_STDDEF_H@ @@ -54,33 +53,56 @@ # @INCLUDE_NEXT@ @NEXT_STDDEF_H@ -# ifndef _@GUARD_PREFIX@_STDDEF_H -# define _@GUARD_PREFIX@_STDDEF_H - /* On NetBSD 5.0, the definition of NULL lacks proper parentheses. */ -#if @REPLACE_NULL@ -# undef NULL -# ifdef __cplusplus +# if (@REPLACE_NULL@ \ + && (!defined _@GUARD_PREFIX@_STDDEF_H || defined _GL_STDDEF_WINT_T)) +# undef NULL +# ifdef __cplusplus /* ISO C++ says that the macro NULL must expand to an integer constant expression, hence '((void *) 0)' is not allowed in C++. */ -# if __GNUG__ >= 3 +# if __GNUG__ >= 3 /* GNU C++ has a __null macro that behaves like an integer ('int' or 'long') but has the same size as a pointer. Use that, to avoid warnings. */ -# define NULL __null -# else -# define NULL 0L +# define NULL __null +# else +# define NULL 0L +# endif +# else +# define NULL ((void *) 0) +# endif # endif -# else -# define NULL ((void *) 0) -# endif -#endif + +# ifndef _@GUARD_PREFIX@_STDDEF_H +# define _@GUARD_PREFIX@_STDDEF_H /* Some platforms lack wchar_t. */ #if !@HAVE_WCHAR_T@ # define wchar_t int #endif +/* Some platforms lack max_align_t. */ +#if !@HAVE_MAX_ALIGN_T@ +/* On the x86, the maximum storage alignment of double, long, etc. is 4, + but GCC's C11 ABI for x86 says that max_align_t has an alignment of 8, + and the C11 standard allows this. Work around this problem by + using __alignof__ (which returns 8 for double) rather than _Alignof + (which returns 4), and align each union member accordingly. */ +# ifdef __GNUC__ +# define _GL_STDDEF_ALIGNAS(type) \ + __attribute__ ((__aligned__ (__alignof__ (type)))) +# else +# define _GL_STDDEF_ALIGNAS(type) /* */ +# endif +typedef union +{ + char *__p _GL_STDDEF_ALIGNAS (char *); + double __d _GL_STDDEF_ALIGNAS (double); + long double __ld _GL_STDDEF_ALIGNAS (long double); + long int __i _GL_STDDEF_ALIGNAS (long int); +} max_align_t; +#endif + # endif /* _@GUARD_PREFIX@_STDDEF_H */ # endif /* _@GUARD_PREFIX@_STDDEF_H */ #endif /* __need_XXX */ diff --git a/gdb/gnulib/import/stdint.in.h b/gdb/gnulib/import/stdint.in.h index e2a0eb19ac..378de2ec6d 100644 --- a/gdb/gnulib/import/stdint.in.h +++ b/gdb/gnulib/import/stdint.in.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2002, 2004-2012 Free Software Foundation, Inc. +/* Copyright (C) 2001-2002, 2004-2015 Free Software Foundation, Inc. Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood. This file is part of gnulib. @@ -38,8 +38,7 @@ other system header files; just include the system's . Ideally we should test __BIONIC__ here, but it is only defined after has been included; hence test __ANDROID__ instead. */ -#if defined __ANDROID__ \ - && defined _SYS_TYPES_H_ && !defined _SSIZE_T_DEFINED_ +#if defined __ANDROID__ && defined _GL_INCLUDING_SYS_TYPES_H # @INCLUDE_NEXT@ @NEXT_STDINT_H@ #else diff --git a/gdb/gnulib/import/stdio.c b/gdb/gnulib/import/stdio.c deleted file mode 100644 index e6ed82996b..0000000000 --- a/gdb/gnulib/import/stdio.c +++ /dev/null @@ -1,3 +0,0 @@ -#include -#define _GL_STDIO_INLINE _GL_EXTERN_INLINE -#include "stdio.h" diff --git a/gdb/gnulib/import/stdio.in.h b/gdb/gnulib/import/stdio.in.h index f3b52d28f6..ec43874296 100644 --- a/gdb/gnulib/import/stdio.in.h +++ b/gdb/gnulib/import/stdio.in.h @@ -1,6 +1,6 @@ /* A GNU-like . - Copyright (C) 2004, 2007-2012 Free Software Foundation, Inc. + Copyright (C) 2004, 2007-2015 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 @@ -46,11 +46,6 @@ #ifndef _@GUARD_PREFIX@_STDIO_H #define _@GUARD_PREFIX@_STDIO_H -_GL_INLINE_HEADER_BEGIN -#ifndef _GL_STDIO_INLINE -# define _GL_STDIO_INLINE _GL_INLINE -#endif - /* Get va_list. Needed on many systems, including glibc 2.8. */ #include @@ -89,8 +84,13 @@ _GL_INLINE_HEADER_BEGIN except that it indicates to GCC that the supported format string directives are the ones of the system printf(), rather than the ones standardized by ISO C99 and POSIX. */ -#define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \ +#if GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU +# define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \ + _GL_ATTRIBUTE_FORMAT_PRINTF (formatstring_parameter, first_argument) +#else +# define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \ _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument)) +#endif /* _GL_ATTRIBUTE_FORMAT_SCANF indicates to GCC that the function takes a format string and arguments, @@ -129,6 +129,15 @@ _GL_INLINE_HEADER_BEGIN #define _GL_STDIO_STRINGIZE(token) #token #define _GL_STDIO_MACROEXPAND_AND_STRINGIZE(token) _GL_STDIO_STRINGIZE(token) +/* When also using extern inline, suppress the use of static inline in + standard headers of problematic Apple configurations, as Libc at + least through Libc-825.26 (2013-04-09) mishandles it; see, e.g., + . + Perhaps Apple will fix this some day. */ +#if (defined _GL_EXTERN_INLINE_IN_USE && defined __APPLE__ \ + && defined __GNUC__ && defined __STDC__) +# undef putc_unlocked +#endif #if @GNULIB_DPRINTF@ # if @REPLACE_DPRINTF@ @@ -580,21 +589,27 @@ _GL_CXXALIAS_RPL (fwrite, size_t, _GL_CXXALIAS_SYS (fwrite, size_t, (const void *ptr, size_t s, size_t n, FILE *stream)); -/* Work around glibc bug 11959 +/* Work around bug 11959 when fortifying glibc 2.4 through 2.15 , which sometimes causes an unwanted diagnostic for fwrite calls. - This affects only function declaration attributes, so it's not - needed for C++. */ -# if !defined __cplusplus && 0 < __USE_FORTIFY_LEVEL -_GL_STDIO_INLINE size_t _GL_ARG_NONNULL ((1, 4)) -rpl_fwrite (const void *ptr, size_t s, size_t n, FILE *stream) -{ - size_t r = fwrite (ptr, s, n, stream); - (void) r; - return r; -} + This affects only function declaration attributes under certain + versions of gcc and clang, and is not needed for C++. */ +# if (0 < __USE_FORTIFY_LEVEL \ + && __GLIBC__ == 2 && 4 <= __GLIBC_MINOR__ && __GLIBC_MINOR__ <= 15 \ + && 3 < __GNUC__ + (4 <= __GNUC_MINOR__) \ + && !defined __cplusplus) # undef fwrite +# undef fwrite_unlocked +extern size_t __REDIRECT (rpl_fwrite, + (const void *__restrict, size_t, size_t, + FILE *__restrict), + fwrite); +extern size_t __REDIRECT (rpl_fwrite_unlocked, + (const void *__restrict, size_t, size_t, + FILE *__restrict), + fwrite_unlocked); # define fwrite rpl_fwrite +# define fwrite_unlocked rpl_fwrite_unlocked # endif # endif _GL_CXXALIASWARN (fwrite); @@ -708,11 +723,10 @@ _GL_WARN_ON_USE (getline, "getline is unportable - " so any use of gets warrants an unconditional warning; besides, C11 removed it. */ #undef gets -#if HAVE_RAW_DECL_GETS +#if HAVE_RAW_DECL_GETS && !defined __cplusplus _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); #endif - #if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@ struct obstack; /* Grow an obstack with formatted output. Return the number of @@ -1338,8 +1352,6 @@ _GL_WARN_ON_USE (vsprintf, "vsprintf is not always POSIX compliant - " "POSIX compliance"); #endif -_GL_INLINE_HEADER_END - #endif /* _@GUARD_PREFIX@_STDIO_H */ #endif /* _@GUARD_PREFIX@_STDIO_H */ #endif diff --git a/gdb/gnulib/import/stdlib.in.h b/gdb/gnulib/import/stdlib.in.h index 65558402bf..428a119188 100644 --- a/gdb/gnulib/import/stdlib.in.h +++ b/gdb/gnulib/import/stdlib.in.h @@ -1,6 +1,6 @@ /* A GNU-like . - Copyright (C) 1995, 2001-2004, 2006-2012 Free Software Foundation, Inc. + Copyright (C) 1995, 2001-2004, 2006-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -20,8 +20,9 @@ #endif @PRAGMA_COLUMNS@ -#if defined __need_malloc_and_calloc -/* Special invocation convention inside glibc header files. */ +#if defined __need_system_stdlib_h || defined __need_malloc_and_calloc +/* Special invocation conventions inside some gnulib header files, + and inside some glibc header files, respectively. */ #@INCLUDE_NEXT@ @NEXT_STDLIB_H@ @@ -519,6 +520,29 @@ _GL_CXXALIAS_SYS (putenv, int, (char *string)); _GL_CXXALIASWARN (putenv); #endif +#if @GNULIB_QSORT_R@ +# if @REPLACE_QSORT_R@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef qsort_r +# define qsort_r rpl_qsort_r +# endif +_GL_FUNCDECL_RPL (qsort_r, void, (void *base, size_t nmemb, size_t size, + int (*compare) (void const *, void const *, + void *), + void *arg) _GL_ARG_NONNULL ((1, 4))); +_GL_CXXALIAS_RPL (qsort_r, void, (void *base, size_t nmemb, size_t size, + int (*compare) (void const *, void const *, + void *), + void *arg)); +# else +_GL_CXXALIAS_SYS (qsort_r, void, (void *base, size_t nmemb, size_t size, + int (*compare) (void const *, void const *, + void *), + void *arg)); +# endif +_GL_CXXALIASWARN (qsort_r); +#endif + #if @GNULIB_RANDOM_R@ # if !@HAVE_RANDOM_R@ @@ -766,6 +790,22 @@ _GL_WARN_ON_USE (rpmatch, "rpmatch is unportable - " # endif #endif +#if @GNULIB_SECURE_GETENV@ +/* Look up NAME in the environment, returning 0 in insecure situations. */ +# if !@HAVE_SECURE_GETENV@ +_GL_FUNCDECL_SYS (secure_getenv, char *, + (char const *name) _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (secure_getenv, char *, (char const *name)); +_GL_CXXALIASWARN (secure_getenv); +#elif defined GNULIB_POSIXCHECK +# undef secure_getenv +# if HAVE_RAW_DECL_SECURE_GETENV +_GL_WARN_ON_USE (secure_getenv, "secure_getenv is unportable - " + "use gnulib module secure_getenv for portability"); +# endif +#endif + #if @GNULIB_SETENV@ /* Set NAME to VALUE in the environment. If REPLACE is nonzero, overwrite an existing value. */ diff --git a/gdb/gnulib/import/str-two-way.h b/gdb/gnulib/import/str-two-way.h index af8f77b512..6e10c8e398 100644 --- a/gdb/gnulib/import/str-two-way.h +++ b/gdb/gnulib/import/str-two-way.h @@ -1,5 +1,5 @@ /* Byte-wise substring search, using the Two-Way algorithm. - Copyright (C) 2008-2012 Free Software Foundation, Inc. + Copyright (C) 2008-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Eric Blake , 2008. diff --git a/gdb/gnulib/import/streq.h b/gdb/gnulib/import/streq.h index b312f7f917..6107fc6bd2 100644 --- a/gdb/gnulib/import/streq.h +++ b/gdb/gnulib/import/streq.h @@ -1,5 +1,5 @@ /* Optimized string comparison. - Copyright (C) 2001-2002, 2007, 2009-2012 Free Software Foundation, Inc. + Copyright (C) 2001-2002, 2007, 2009-2015 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 diff --git a/gdb/gnulib/import/string.in.h b/gdb/gnulib/import/string.in.h index f8d7520eaa..2abd6bc0e1 100644 --- a/gdb/gnulib/import/string.in.h +++ b/gdb/gnulib/import/string.in.h @@ -1,6 +1,6 @@ /* A GNU-like . - Copyright (C) 1995-1996, 2001-2012 Free Software Foundation, Inc. + Copyright (C) 1995-1996, 2001-2015 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 @@ -15,16 +15,32 @@ You should have received a copy of the GNU General Public License along with this program; if not, see . */ -#ifndef _@GUARD_PREFIX@_STRING_H - #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ +#if defined _GL_ALREADY_INCLUDING_STRING_H +/* Special invocation convention: + - On OS X/NetBSD we have a sequence of nested includes + -> -> "string.h" + In this situation system _chk variants due to -D_FORTIFY_SOURCE + might be used after any replacements defined here. */ + +#@INCLUDE_NEXT@ @NEXT_STRING_H@ + +#else +/* Normal invocation convention. */ + +#ifndef _@GUARD_PREFIX@_STRING_H + +#define _GL_ALREADY_INCLUDING_STRING_H + /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_STRING_H@ +#undef _GL_ALREADY_INCLUDING_STRING_H + #ifndef _@GUARD_PREFIX@_STRING_H #define _@GUARD_PREFIX@_STRING_H @@ -1027,3 +1043,4 @@ _GL_WARN_ON_USE (strverscmp, "strverscmp is unportable - " #endif /* _@GUARD_PREFIX@_STRING_H */ #endif /* _@GUARD_PREFIX@_STRING_H */ +#endif diff --git a/gdb/gnulib/import/stripslash.c b/gdb/gnulib/import/stripslash.c index ef458c63a9..12359cf7bf 100644 --- a/gdb/gnulib/import/stripslash.c +++ b/gdb/gnulib/import/stripslash.c @@ -1,6 +1,6 @@ /* stripslash.c -- remove redundant trailing slashes from a file name - Copyright (C) 1990, 2001, 2003-2006, 2009-2012 Free Software Foundation, + Copyright (C) 1990, 2001, 2003-2006, 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify diff --git a/gdb/gnulib/import/strnlen1.c b/gdb/gnulib/import/strnlen1.c index 52dc507895..48272a8883 100644 --- a/gdb/gnulib/import/strnlen1.c +++ b/gdb/gnulib/import/strnlen1.c @@ -1,5 +1,5 @@ /* Find the length of STRING + 1, but scan at most MAXLEN bytes. - Copyright (C) 2005-2006, 2009-2012 Free Software Foundation, Inc. + Copyright (C) 2005-2006, 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gdb/gnulib/import/strnlen1.h b/gdb/gnulib/import/strnlen1.h index 4c4f0c0813..794e436ec5 100644 --- a/gdb/gnulib/import/strnlen1.h +++ b/gdb/gnulib/import/strnlen1.h @@ -1,5 +1,5 @@ /* Find the length of STRING + 1, but scan at most MAXLEN bytes. - Copyright (C) 2005, 2009-2012 Free Software Foundation, Inc. + Copyright (C) 2005, 2009-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/gdb/gnulib/import/strstr.c b/gdb/gnulib/import/strstr.c index 94d625292b..fbc11a2d71 100644 --- a/gdb/gnulib/import/strstr.c +++ b/gdb/gnulib/import/strstr.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-1994, 1996-1998, 2000, 2004, 2007-2012 Free Software +/* Copyright (C) 1991-1994, 1996-1998, 2000, 2004, 2007-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. diff --git a/gdb/gnulib/import/strtok_r.c b/gdb/gnulib/import/strtok_r.c index e1499bcefa..183aebce16 100644 --- a/gdb/gnulib/import/strtok_r.c +++ b/gdb/gnulib/import/strtok_r.c @@ -1,5 +1,5 @@ /* Reentrant string tokenizer. Generic version. - Copyright (C) 1991, 1996-1999, 2001, 2004, 2007, 2009-2012 Free Software + Copyright (C) 1991, 1996-1999, 2001, 2004, 2007, 2009-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. diff --git a/gdb/gnulib/import/sys_stat.in.h b/gdb/gnulib/import/sys_stat.in.h index ac05ddb5ce..9f5e85369f 100644 --- a/gdb/gnulib/import/sys_stat.in.h +++ b/gdb/gnulib/import/sys_stat.in.h @@ -1,5 +1,5 @@ /* Provide a more complete sys/stat header file. - Copyright (C) 2005-2012 Free Software Foundation, Inc. + Copyright (C) 2005-2015 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 @@ -150,6 +150,10 @@ # endif #endif +#ifndef S_ISMPX /* AIX */ +# define S_ISMPX(m) 0 +#endif + #ifndef S_ISNAM /* Xenix */ # ifdef S_IFNAM # define S_ISNAM(m) (((m) & S_IFMT) == S_IFNAM) diff --git a/gdb/gnulib/import/sys_time.in.h b/gdb/gnulib/import/sys_time.in.h new file mode 100644 index 0000000000..c556c5db23 --- /dev/null +++ b/gdb/gnulib/import/sys_time.in.h @@ -0,0 +1,213 @@ +/* Provide a more complete sys/time.h. + + Copyright (C) 2007-2015 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 . */ + +/* Written by Paul Eggert. */ + +#ifndef _@GUARD_PREFIX@_SYS_TIME_H + +#if __GNUC__ >= 3 +@PRAGMA_SYSTEM_HEADER@ +#endif +@PRAGMA_COLUMNS@ + +/* On Cygwin and on many BSDish systems, includes itself + recursively via . + Simply delegate to the system's header in this case; it is a no-op. + Without this extra ifdef, the C++ gettimeofday declaration below + would be a forward declaration in gnulib's nested . */ +#if defined _CYGWIN_SYS_TIME_H || defined _SYS_TIME_H || defined _SYS_TIME_H_ +# @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@ +#else + +/* The include_next requires a split double-inclusion guard. */ +#if @HAVE_SYS_TIME_H@ +# @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@ +#endif + +#ifndef _@GUARD_PREFIX@_SYS_TIME_H +#define _@GUARD_PREFIX@_SYS_TIME_H + +#if ! @HAVE_SYS_TIME_H@ +# include +#endif + +/* On native Windows with MSVC, get the 'struct timeval' type. + Also, on native Windows with a 64-bit time_t, where we are overriding the + 'struct timeval' type, get all declarations of system functions whose + signature contains 'struct timeval'. */ +#if (defined _MSC_VER || @REPLACE_STRUCT_TIMEVAL@) && @HAVE_WINSOCK2_H@ && !defined _GL_INCLUDING_WINSOCK2_H +# define _GL_INCLUDING_WINSOCK2_H +# include +# undef _GL_INCLUDING_WINSOCK2_H +#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. */ + +#ifdef __cplusplus +extern "C" { +#endif + +#if !@HAVE_STRUCT_TIMEVAL@ || @REPLACE_STRUCT_TIMEVAL@ + +# if @REPLACE_STRUCT_TIMEVAL@ +# define timeval rpl_timeval +# endif + +# if !GNULIB_defined_struct_timeval +struct timeval +{ + time_t tv_sec; + long int tv_usec; +}; +# define GNULIB_defined_struct_timeval 1 +# endif + +#endif + +#ifdef __cplusplus +} +#endif + +#if @GNULIB_GETTIMEOFDAY@ +# if @REPLACE_GETTIMEOFDAY@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef gettimeofday +# define gettimeofday rpl_gettimeofday +# endif +_GL_FUNCDECL_RPL (gettimeofday, int, + (struct timeval *restrict, void *restrict) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (gettimeofday, int, + (struct timeval *restrict, void *restrict)); +# else +# if !@HAVE_GETTIMEOFDAY@ +_GL_FUNCDECL_SYS (gettimeofday, int, + (struct timeval *restrict, void *restrict) + _GL_ARG_NONNULL ((1))); +# endif +/* Need to cast, because on glibc systems, by default, the second argument is + struct timezone *. */ +_GL_CXXALIAS_SYS_CAST (gettimeofday, int, + (struct timeval *restrict, void *restrict)); +# endif +_GL_CXXALIASWARN (gettimeofday); +#elif defined GNULIB_POSIXCHECK +# undef gettimeofday +# if HAVE_RAW_DECL_GETTIMEOFDAY +_GL_WARN_ON_USE (gettimeofday, "gettimeofday is unportable - " + "use gnulib module gettimeofday for portability"); +# endif +#endif + +/* Hide some function declarations from . */ + +#if defined _MSC_VER && @HAVE_WINSOCK2_H@ +# if !defined _@GUARD_PREFIX@_UNISTD_H +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef close +# define close close_used_without_including_unistd_h +# else + _GL_WARN_ON_USE (close, + "close() used without including "); +# endif +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef gethostname +# define gethostname gethostname_used_without_including_unistd_h +# else + _GL_WARN_ON_USE (gethostname, + "gethostname() used without including "); +# endif +# endif +# if !defined _@GUARD_PREFIX@_SYS_SOCKET_H +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef socket +# define socket socket_used_without_including_sys_socket_h +# undef connect +# define connect connect_used_without_including_sys_socket_h +# undef accept +# define accept accept_used_without_including_sys_socket_h +# undef bind +# define bind bind_used_without_including_sys_socket_h +# undef getpeername +# define getpeername getpeername_used_without_including_sys_socket_h +# undef getsockname +# define getsockname getsockname_used_without_including_sys_socket_h +# undef getsockopt +# define getsockopt getsockopt_used_without_including_sys_socket_h +# undef listen +# define listen listen_used_without_including_sys_socket_h +# undef recv +# define recv recv_used_without_including_sys_socket_h +# undef send +# define send send_used_without_including_sys_socket_h +# undef recvfrom +# define recvfrom recvfrom_used_without_including_sys_socket_h +# undef sendto +# define sendto sendto_used_without_including_sys_socket_h +# undef setsockopt +# define setsockopt setsockopt_used_without_including_sys_socket_h +# undef shutdown +# define shutdown shutdown_used_without_including_sys_socket_h +# else + _GL_WARN_ON_USE (socket, + "socket() used without including "); + _GL_WARN_ON_USE (connect, + "connect() used without including "); + _GL_WARN_ON_USE (accept, + "accept() used without including "); + _GL_WARN_ON_USE (bind, + "bind() used without including "); + _GL_WARN_ON_USE (getpeername, + "getpeername() used without including "); + _GL_WARN_ON_USE (getsockname, + "getsockname() used without including "); + _GL_WARN_ON_USE (getsockopt, + "getsockopt() used without including "); + _GL_WARN_ON_USE (listen, + "listen() used without including "); + _GL_WARN_ON_USE (recv, + "recv() used without including "); + _GL_WARN_ON_USE (send, + "send() used without including "); + _GL_WARN_ON_USE (recvfrom, + "recvfrom() used without including "); + _GL_WARN_ON_USE (sendto, + "sendto() used without including "); + _GL_WARN_ON_USE (setsockopt, + "setsockopt() used without including "); + _GL_WARN_ON_USE (shutdown, + "shutdown() used without including "); +# endif +# endif +# if !defined _@GUARD_PREFIX@_SYS_SELECT_H +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef select +# define select select_used_without_including_sys_select_h +# else + _GL_WARN_ON_USE (select, + "select() used without including "); +# endif +# endif +#endif + +#endif /* _@GUARD_PREFIX@_SYS_TIME_H */ +#endif /* _CYGWIN_SYS_TIME_H */ +#endif /* _@GUARD_PREFIX@_SYS_TIME_H */ diff --git a/gdb/gnulib/import/sys_types.in.h b/gdb/gnulib/import/sys_types.in.h index 8139d98f6a..814bc179b0 100644 --- a/gdb/gnulib/import/sys_types.in.h +++ b/gdb/gnulib/import/sys_types.in.h @@ -1,6 +1,6 @@ /* Provide a more complete sys/types.h. - Copyright (C) 2011-2012 Free Software Foundation, Inc. + Copyright (C) 2011-2015 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 @@ -23,7 +23,9 @@ #ifndef _@GUARD_PREFIX@_SYS_TYPES_H /* The include_next requires a split double-inclusion guard. */ +# define _GL_INCLUDING_SYS_TYPES_H #@INCLUDE_NEXT@ @NEXT_SYS_TYPES_H@ +# undef _GL_INCLUDING_SYS_TYPES_H #ifndef _@GUARD_PREFIX@_SYS_TYPES_H #define _@GUARD_PREFIX@_SYS_TYPES_H diff --git a/gdb/gnulib/import/time.in.h b/gdb/gnulib/import/time.in.h index 04cde057cf..a90552ce44 100644 --- a/gdb/gnulib/import/time.in.h +++ b/gdb/gnulib/import/time.in.h @@ -1,6 +1,6 @@ /* A more-standard . - Copyright (C) 2007-2012 Free Software Foundation, Inc. + Copyright (C) 2007-2015 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 @@ -22,11 +22,13 @@ /* 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 eventually includes itself + symbols. (However, skip this for MinGW as it treats __need_time_t + incompatibly.) Also, Solaris 8 eventually includes itself recursively; if that is happening, just include the system without adding our own declarations. */ -#if (defined __need_time_t || defined __need_clock_t \ - || defined __need_timespec \ +#if (((defined __need_time_t || defined __need_clock_t \ + || defined __need_timespec) \ + && !defined __MINGW32__) \ || defined _@GUARD_PREFIX@_TIME_H) # @INCLUDE_NEXT@ @NEXT_TIME_H@ @@ -48,20 +50,15 @@ /* 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 - (e.g., FreeBSD circa 1997). Stock Mingw does not define it, but the - pthreads-win32 library defines it in . */ + (e.g., FreeBSD circa 1997). Stock Mingw prior to 3.0 does not define it, + but the pthreads-win32 library defines it in . */ # if ! @TIME_H_DEFINES_STRUCT_TIMESPEC@ # if @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ # include # elif @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ # include -/* The pthreads-win32 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 +# elif @UNISTD_H_DEFINES_STRUCT_TIMESPEC@ +# include # else # ifdef __cplusplus @@ -187,6 +184,39 @@ _GL_CXXALIASWARN (gmtime_r); # endif # endif +/* Convert TIMER to RESULT, assuming local time and UTC respectively. See + and + . */ +# if @GNULIB_GETTIMEOFDAY@ +# if @REPLACE_LOCALTIME@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef localtime +# define localtime rpl_localtime +# endif +_GL_FUNCDECL_RPL (localtime, struct tm *, (time_t const *__timer) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (localtime, struct tm *, (time_t const *__timer)); +# else +_GL_CXXALIAS_SYS (localtime, struct tm *, (time_t const *__timer)); +# endif +_GL_CXXALIASWARN (localtime); +# endif + +# if @GNULIB_GETTIMEOFDAY@ +# if @REPLACE_GMTIME@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef gmtime +# define gmtime rpl_gmtime +# endif +_GL_FUNCDECL_RPL (gmtime, struct tm *, (time_t const *__timer) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (gmtime, struct tm *, (time_t const *__timer)); +# else +_GL_CXXALIAS_SYS (gmtime, struct tm *, (time_t const *__timer)); +# endif +_GL_CXXALIASWARN (gmtime); +# endif + /* Parse BUF as a time stamp, assuming FORMAT specifies its layout, and store the resulting broken-down time into TM. See . */ @@ -203,6 +233,25 @@ _GL_CXXALIAS_SYS (strptime, char *, (char const *restrict __buf, _GL_CXXALIASWARN (strptime); # endif +# if defined _GNU_SOURCE && @GNULIB_TIME_RZ@ && ! @HAVE_TIMEZONE_T@ +typedef struct tm_zone *timezone_t; +_GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); +_GL_CXXALIAS_SYS (tzalloc, timezone_t, (char const *__name)); +_GL_FUNCDECL_SYS (tzfree, void, (timezone_t __tz)); +_GL_CXXALIAS_SYS (tzfree, void, (timezone_t __tz)); +_GL_FUNCDECL_SYS (localtime_rz, struct tm *, + (timezone_t __tz, time_t const *restrict __timer, + struct tm *restrict __result) _GL_ARG_NONNULL ((2, 3))); +_GL_CXXALIAS_SYS (localtime_rz, struct tm *, + (timezone_t __tz, time_t const *restrict __timer, + struct tm *restrict __result)); +_GL_FUNCDECL_SYS (mktime_z, time_t, + (timezone_t __tz, struct tm *restrict __result) + _GL_ARG_NONNULL ((2))); +_GL_CXXALIAS_SYS (mktime_z, time_t, + (timezone_t __tz, struct tm *restrict __result)); +# endif + /* Convert TM to a time_t value, assuming UTC. */ # if @GNULIB_TIMEGM@ # if @REPLACE_TIMEGM@ diff --git a/gdb/gnulib/import/unistd.in.h b/gdb/gnulib/import/unistd.in.h index 6171f77ac7..958fea2a57 100644 --- a/gdb/gnulib/import/unistd.in.h +++ b/gdb/gnulib/import/unistd.in.h @@ -1,5 +1,5 @@ /* Substitute for and wrapper around . - Copyright (C) 2003-2012 Free Software Foundation, Inc. + Copyright (C) 2003-2015 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 @@ -14,32 +14,30 @@ You should have received a copy of the GNU General Public License along with this program; if not, see . */ +#ifndef _@GUARD_PREFIX@_UNISTD_H + #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ +#ifdef _GL_INCLUDING_UNISTD_H /* Special invocation convention: - - On mingw, several headers, including , include , - but we need to ensure that both the system and - are completely included before we replace gethostname. */ -#if @GNULIB_GETHOSTNAME@ && @UNISTD_H_HAVE_WINSOCK2_H@ \ - && !defined _GL_WINSOCK2_H_WITNESS && defined _WINSOCK2_H -/* is being indirectly included for the first time from - ; avoid declaring any overrides. */ -# if @HAVE_UNISTD_H@ -# @INCLUDE_NEXT@ @NEXT_UNISTD_H@ -# else -# error unexpected; report this to bug-gnulib@gnu.org -# endif -# define _GL_WINSOCK2_H_WITNESS + - On Mac OS X 10.3.9 we have a sequence of nested includes + -> -> -> + In this situation, the functions are not yet declared, therefore we cannot + provide the C++ aliases. */ -/* Normal invocation. */ -#elif !defined _@GUARD_PREFIX@_UNISTD_H +#@INCLUDE_NEXT@ @NEXT_UNISTD_H@ + +#else +/* Normal invocation convention. */ /* The include_next requires a split double-inclusion guard. */ #if @HAVE_UNISTD_H@ +# define _GL_INCLUDING_UNISTD_H # @INCLUDE_NEXT@ @NEXT_UNISTD_H@ +# undef _GL_INCLUDING_UNISTD_H #endif /* Get all possible declarations of gethostname(). */ @@ -77,9 +75,13 @@ /* mingw, MSVC, BeOS, Haiku declare environ in , not in . */ /* Solaris declares getcwd not only in but also in . */ +/* OSF Tru64 Unix cannot see gnulib rpl_strtod when system is + included here. */ /* But avoid namespace pollution on glibc systems. */ -#ifndef __GLIBC__ +#if !defined __GLIBC__ && !defined __osf__ +# define __need_system_stdlib_h # include +# undef __need_system_stdlib_h #endif /* Native Windows platforms declare chdir, getcwd, rmdir in @@ -124,9 +126,13 @@ /* Get getopt(), optarg, optind, opterr, optopt. But avoid namespace pollution on glibc systems. */ #if @GNULIB_UNISTD_H_GETOPT@ && !defined __GLIBC__ && !defined _GL_SYSTEM_GETOPT +# define __need_getopt # include #endif +#ifndef _GL_INLINE_HEADER_BEGIN + #error "Please include config.h first." +#endif _GL_INLINE_HEADER_BEGIN #ifndef _GL_UNISTD_INLINE # define _GL_UNISTD_INLINE _GL_INLINE @@ -395,6 +401,12 @@ _GL_WARN_ON_USE (dup3, "dup3 is unportable - " /* Set of environment variables and values. An array of strings of the form "VARIABLE=VALUE", terminated with a NULL. */ # if defined __APPLE__ && defined __MACH__ +# include +# if !TARGET_OS_IPHONE && !TARGET_IPHONE_SIMULATOR +# define _GL_USE_CRT_EXTERNS +# endif +# endif +# ifdef _GL_USE_CRT_EXTERNS # include # define environ (*_NSGetEnviron ()) # else @@ -662,10 +674,19 @@ _GL_WARN_ON_USE (getdomainname, "getdomainname is unportable - " #if @GNULIB_GETDTABLESIZE@ /* Return the maximum number of file descriptors in the current process. In POSIX, this is same as sysconf (_SC_OPEN_MAX). */ -# if !@HAVE_GETDTABLESIZE@ +# if @REPLACE_GETDTABLESIZE@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef getdtablesize +# define getdtablesize rpl_getdtablesize +# endif +_GL_FUNCDECL_RPL (getdtablesize, int, (void)); +_GL_CXXALIAS_RPL (getdtablesize, int, (void)); +# else +# if !@HAVE_GETDTABLESIZE@ _GL_FUNCDECL_SYS (getdtablesize, int, (void)); -# endif +# endif _GL_CXXALIAS_SYS (getdtablesize, int, (void)); +# endif _GL_CXXALIASWARN (getdtablesize); #elif defined GNULIB_POSIXCHECK # undef getdtablesize @@ -1272,13 +1293,24 @@ _GL_WARN_ON_USE (readlink, "readlink is unportable - " #if @GNULIB_READLINKAT@ -# if !@HAVE_READLINKAT@ +# if @REPLACE_READLINKAT@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define readlinkat rpl_readlinkat +# endif +_GL_FUNCDECL_RPL (readlinkat, ssize_t, + (int fd, char const *file, char *buf, size_t len) + _GL_ARG_NONNULL ((2, 3))); +_GL_CXXALIAS_RPL (readlinkat, ssize_t, + (int fd, char const *file, char *buf, size_t len)); +# else +# if !@HAVE_READLINKAT@ _GL_FUNCDECL_SYS (readlinkat, ssize_t, (int fd, char const *file, char *buf, size_t len) _GL_ARG_NONNULL ((2, 3))); -# endif +# endif _GL_CXXALIAS_SYS (readlinkat, ssize_t, (int fd, char const *file, char *buf, size_t len)); +# endif _GL_CXXALIASWARN (readlinkat); #elif defined GNULIB_POSIXCHECK # undef readlinkat @@ -1392,13 +1424,25 @@ _GL_WARN_ON_USE (symlink, "symlink is not portable - " #if @GNULIB_SYMLINKAT@ -# if !@HAVE_SYMLINKAT@ +# if @REPLACE_SYMLINKAT@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef symlinkat +# define symlinkat rpl_symlinkat +# endif +_GL_FUNCDECL_RPL (symlinkat, int, + (char const *contents, int fd, char const *file) + _GL_ARG_NONNULL ((1, 3))); +_GL_CXXALIAS_RPL (symlinkat, int, + (char const *contents, int fd, char const *file)); +# else +# if !@HAVE_SYMLINKAT@ _GL_FUNCDECL_SYS (symlinkat, int, (char const *contents, int fd, char const *file) _GL_ARG_NONNULL ((1, 3))); -# endif +# endif _GL_CXXALIAS_SYS (symlinkat, int, (char const *contents, int fd, char const *file)); +# endif _GL_CXXALIASWARN (symlinkat); #elif defined GNULIB_POSIXCHECK # undef symlinkat @@ -1538,4 +1582,5 @@ _GL_CXXALIASWARN (write); _GL_INLINE_HEADER_END #endif /* _@GUARD_PREFIX@_UNISTD_H */ +#endif /* _GL_INCLUDING_UNISTD_H */ #endif /* _@GUARD_PREFIX@_UNISTD_H */ diff --git a/gdb/gnulib/import/verify.h b/gdb/gnulib/import/verify.h index 0c320b19ad..60eba49811 100644 --- a/gdb/gnulib/import/verify.h +++ b/gdb/gnulib/import/verify.h @@ -1,6 +1,6 @@ /* Compile-time assert-like macros. - Copyright (C) 2005-2006, 2009-2012 Free Software Foundation, Inc. + Copyright (C) 2005-2006, 2009-2015 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 @@ -18,7 +18,7 @@ /* Written by Paul Eggert, Bruno Haible, and Jim Meyering. */ #ifndef _GL_VERIFY_H -# define _GL_VERIFY_H +#define _GL_VERIFY_H /* Define _GL_HAVE__STATIC_ASSERT to 1 if _Static_assert works as per C11. @@ -31,14 +31,24 @@ Use this only with GCC. If we were willing to slow 'configure' down we could also use it with other compilers, but since this affects only the quality of diagnostics, why bother? */ -# if (4 < __GNUC__ || (__GNUC__ == 4 && 6 <= __GNUC_MINOR__)) && !defined __cplusplus -# define _GL_HAVE__STATIC_ASSERT 1 -# endif +#if (4 < __GNUC__ + (6 <= __GNUC_MINOR__) \ + && (201112L <= __STDC_VERSION__ || !defined __STRICT_ANSI__) \ + && !defined __cplusplus) +# define _GL_HAVE__STATIC_ASSERT 1 +#endif /* The condition (99 < __GNUC__) is temporary, until we know about the first G++ release that supports static_assert. */ -# if (99 < __GNUC__) && defined __cplusplus -# define _GL_HAVE_STATIC_ASSERT 1 -# endif +#if (99 < __GNUC__) && defined __cplusplus +# define _GL_HAVE_STATIC_ASSERT 1 +#endif + +/* FreeBSD 9.1 , included by and lots of other + system headers, defines a conflicting _Static_assert that is no + better than ours; override it. */ +#ifndef _GL_HAVE_STATIC_ASSERT +# include +# undef _Static_assert +#endif /* Each of these macros verifies that its argument R is nonzero. To be portable, R should be an integer constant expression. Unlike @@ -141,50 +151,50 @@ Use a template type to work around the problem. */ /* Concatenate two preprocessor tokens. */ -# define _GL_CONCAT(x, y) _GL_CONCAT0 (x, y) -# define _GL_CONCAT0(x, y) x##y +#define _GL_CONCAT(x, y) _GL_CONCAT0 (x, y) +#define _GL_CONCAT0(x, y) x##y /* _GL_COUNTER is an integer, preferably one that changes each time we use it. Use __COUNTER__ if it works, falling back on __LINE__ otherwise. __LINE__ isn't perfect, but it's better than a constant. */ -# if defined __COUNTER__ && __COUNTER__ != __COUNTER__ -# define _GL_COUNTER __COUNTER__ -# else -# define _GL_COUNTER __LINE__ -# endif +#if defined __COUNTER__ && __COUNTER__ != __COUNTER__ +# define _GL_COUNTER __COUNTER__ +#else +# define _GL_COUNTER __LINE__ +#endif /* Generate a symbol with the given prefix, making it unique if possible. */ -# define _GL_GENSYM(prefix) _GL_CONCAT (prefix, _GL_COUNTER) +#define _GL_GENSYM(prefix) _GL_CONCAT (prefix, _GL_COUNTER) /* Verify requirement R at compile-time, as an integer constant expression that returns 1. If R is false, fail at compile-time, preferably with a diagnostic that includes the string-literal DIAGNOSTIC. */ -# define _GL_VERIFY_TRUE(R, DIAGNOSTIC) \ - (!!sizeof (_GL_VERIFY_TYPE (R, DIAGNOSTIC))) +#define _GL_VERIFY_TRUE(R, DIAGNOSTIC) \ + (!!sizeof (_GL_VERIFY_TYPE (R, DIAGNOSTIC))) -# ifdef __cplusplus -# if !GNULIB_defined_struct__gl_verify_type +#ifdef __cplusplus +# if !GNULIB_defined_struct__gl_verify_type template struct _gl_verify_type { unsigned int _gl_verify_error_if_negative: w; }; -# define GNULIB_defined_struct__gl_verify_type 1 -# endif -# define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \ - _gl_verify_type<(R) ? 1 : -1> -# elif defined _GL_HAVE__STATIC_ASSERT -# define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \ - struct { \ - _Static_assert (R, DIAGNOSTIC); \ - int _gl_dummy; \ - } -# else -# define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \ - struct { unsigned int _gl_verify_error_if_negative: (R) ? 1 : -1; } +# define GNULIB_defined_struct__gl_verify_type 1 # endif +# define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \ + _gl_verify_type<(R) ? 1 : -1> +#elif defined _GL_HAVE__STATIC_ASSERT +# define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \ + struct { \ + _Static_assert (R, DIAGNOSTIC); \ + int _gl_dummy; \ + } +#else +# define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \ + struct { unsigned int _gl_verify_error_if_negative: (R) ? 1 : -1; } +#endif /* Verify requirement R at compile-time, as a declaration without a trailing ';'. If R is false, fail at compile-time, preferably @@ -193,23 +203,23 @@ template Unfortunately, unlike C11, this implementation must appear as an ordinary declaration, and cannot appear inside struct { ... }. */ -# ifdef _GL_HAVE__STATIC_ASSERT -# define _GL_VERIFY _Static_assert -# else -# define _GL_VERIFY(R, DIAGNOSTIC) \ - extern int (*_GL_GENSYM (_gl_verify_function) (void)) \ - [_GL_VERIFY_TRUE (R, DIAGNOSTIC)] -# endif +#ifdef _GL_HAVE__STATIC_ASSERT +# define _GL_VERIFY _Static_assert +#else +# define _GL_VERIFY(R, DIAGNOSTIC) \ + extern int (*_GL_GENSYM (_gl_verify_function) (void)) \ + [_GL_VERIFY_TRUE (R, DIAGNOSTIC)] +#endif /* _GL_STATIC_ASSERT_H is defined if this code is copied into assert.h. */ -# ifdef _GL_STATIC_ASSERT_H -# if !defined _GL_HAVE__STATIC_ASSERT && !defined _Static_assert -# define _Static_assert(R, DIAGNOSTIC) _GL_VERIFY (R, DIAGNOSTIC) -# endif -# if !defined _GL_HAVE_STATIC_ASSERT && !defined static_assert -# define static_assert _Static_assert /* C11 requires this #define. */ -# endif +#ifdef _GL_STATIC_ASSERT_H +# if !defined _GL_HAVE__STATIC_ASSERT && !defined _Static_assert +# define _Static_assert(R, DIAGNOSTIC) _GL_VERIFY (R, DIAGNOSTIC) # endif +# if !defined _GL_HAVE_STATIC_ASSERT && !defined static_assert +# define static_assert _Static_assert /* C11 requires this #define. */ +# endif +#endif /* @assert.h omit start@ */ @@ -227,18 +237,42 @@ template verify_true is obsolescent; please use verify_expr instead. */ -# define verify_true(R) _GL_VERIFY_TRUE (R, "verify_true (" #R ")") +#define verify_true(R) _GL_VERIFY_TRUE (R, "verify_true (" #R ")") /* Verify requirement R at compile-time. Return the value of the expression E. */ -# define verify_expr(R, E) \ - (_GL_VERIFY_TRUE (R, "verify_expr (" #R ", " #E ")") ? (E) : (E)) +#define verify_expr(R, E) \ + (_GL_VERIFY_TRUE (R, "verify_expr (" #R ", " #E ")") ? (E) : (E)) /* Verify requirement R at compile-time, as a declaration without a trailing ';'. */ -# define verify(R) _GL_VERIFY (R, "verify (" #R ")") +#define verify(R) _GL_VERIFY (R, "verify (" #R ")") + +#ifndef __has_builtin +# define __has_builtin(x) 0 +#endif + +/* Assume that R always holds. This lets the compiler optimize + accordingly. R should not have side-effects; it may or may not be + evaluated. Behavior is undefined if R is false. */ + +#if (__has_builtin (__builtin_unreachable) \ + || 4 < __GNUC__ + (5 <= __GNUC_MINOR__)) +# define assume(R) ((R) ? (void) 0 : __builtin_unreachable ()) +#elif 1200 <= _MSC_VER +# define assume(R) __assume (R) +#elif (defined lint \ + && (__has_builtin (__builtin_trap) \ + || 3 < __GNUC__ + (3 < __GNUC_MINOR__ + (4 <= __GNUC_PATCHLEVEL__)))) + /* Doing it this way helps various packages when configured with + --enable-gcc-warnings, which compiles with -Dlint. It's nicer + when 'assume' silences warnings even with older GCCs. */ +# define assume(R) ((R) ? (void) 0 : __builtin_trap ()) +#else +# define assume(R) ((void) (0 && (R))) +#endif /* @assert.h omit end@ */ diff --git a/gdb/gnulib/import/wchar.in.h b/gdb/gnulib/import/wchar.in.h index f9bc30c030..684299f7d1 100644 --- a/gdb/gnulib/import/wchar.in.h +++ b/gdb/gnulib/import/wchar.in.h @@ -1,6 +1,6 @@ /* A substitute for ISO C99 , for platforms that have issues. - Copyright (C) 2007-2012 Free Software Foundation, Inc. + Copyright (C) 2007-2015 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 @@ -30,9 +30,14 @@ #endif @PRAGMA_COLUMNS@ -#if defined __need_mbstate_t || defined __need_wint_t || (defined __hpux && ((defined _INTTYPES_INCLUDED && !defined strtoimax) || defined _GL_JUST_INCLUDE_SYSTEM_WCHAR_H)) || defined _GL_ALREADY_INCLUDING_WCHAR_H +#if (((defined __need_mbstate_t || defined __need_wint_t) \ + && !defined __MINGW32__) \ + || (defined __hpux \ + && ((defined _INTTYPES_INCLUDED && !defined strtoimax) \ + || defined _GL_JUST_INCLUDE_SYSTEM_WCHAR_H)) \ + || defined _GL_ALREADY_INCLUDING_WCHAR_H) /* Special invocation convention: - - Inside glibc and uClibc header files. + - Inside glibc and uClibc header files, but not MinGW. - On HP-UX 11.00 we have a sequence of nested includes -> -> , and the latter includes , once indirectly -> -> -> diff --git a/gdb/gnulib/import/wctype.in.h b/gdb/gnulib/import/wctype.in.h index 3c98fa3e63..9050b7e587 100644 --- a/gdb/gnulib/import/wctype.in.h +++ b/gdb/gnulib/import/wctype.in.h @@ -1,6 +1,6 @@ /* A substitute for ISO C99 , for platforms that lack it. - Copyright (C) 2006-2012 Free Software Foundation, Inc. + Copyright (C) 2006-2015 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 @@ -44,6 +44,13 @@ # include #endif +/* mingw has declarations of towupper and towlower in as + well . Include in advance to avoid rpl_ prefix + being added to the declarations. */ +#ifdef __MINGW32__ +# include +#endif + /* Include the original if it exists. BeOS 5 has the functions but no . */ /* The include_next requires a split double-inclusion guard. */ @@ -54,6 +61,9 @@ #ifndef _@GUARD_PREFIX@_WCTYPE_H #define _@GUARD_PREFIX@_WCTYPE_H +#ifndef _GL_INLINE_HEADER_BEGIN + #error "Please include config.h first." +#endif _GL_INLINE_HEADER_BEGIN #ifndef _GL_WCTYPE_INLINE # define _GL_WCTYPE_INLINE _GL_INLINE diff --git a/gdb/gnulib/update-gnulib.sh b/gdb/gnulib/update-gnulib.sh index f85b71e861..91a9dde07d 100755 --- a/gdb/gnulib/update-gnulib.sh +++ b/gdb/gnulib/update-gnulib.sh @@ -54,7 +54,7 @@ IMPORTED_GNULIB_MODULES="\ " # The gnulib commit ID to use for the update. -GNULIB_COMMIT_SHA1="8d5bd1402003bd0153984b138735adf537d960b0" +GNULIB_COMMIT_SHA1="1029a8112290f6eee9d7878a391c49db42c999bd" # The expected version number for the various auto tools we will # use after the import. -- 2.34.1