From 5e8754f90abbbf832987477eea4ee91a9d2f694c Mon Sep 17 00:00:00 2001 From: Sergio Durigan Junior Date: Mon, 10 Sep 2018 12:22:59 -0400 Subject: [PATCH] Revert "Update gnulib to current upstream master" This reverts commit 7a6dbc2fdb2323c35e981f93236f323e9d7c0b24 ("Update gnulib to current upstream master"). It is needed because the gnulib update caused problems with people using old GCC compilers (version 4.8, for example), which support C99 but don't default to using it. Unfortunately this broke GDB for these users. A more detailed report of what happened can be found at: https://lists.gnu.org/archive/html/bug-gnulib/2018-08/msg00157.html The reason for updating our gnulib copy was to fix PR gdb/23558. Reverting this patch reintroduces the bug, so in order to fix it I will submit a subsequent patch which cherry-picks the fix from gnulib. gdb/ChangeLog: 2018-09-10 Sergio Durigan Junior Revert: 2018-08-29 Sergio Durigan Junior PR gdb/23555 PR gdb/23558 * gnulib/aclocal.m4: Regenerate. * gnulib/config.in: Regenerate. * gnulib/configure: Regenerate. * gnulib/import/Makefile.am: Update. * gnulib/import/Makefile.in: Update. * gnulib/import/extra/snippet/_Noreturn.h: Rename to... * gnulib/import/_Noreturn.h: ... this. * gnulib/import/alloca.in.h: Update. * gnulib/import/extra/snippet/arg-nonnull.h: Rename to... * gnulib/import/arg-nonnull.h: ... this. * gnulib/import/assure.h: Update. * gnulib/import/at-func.c: Update. * gnulib/import/basename-lgpl.c: Update. * gnulib/import/extra/snippet/c++defs.h: Rename to... * gnulib/import/c++defs.h: ... this. * gnulib/import/canonicalize-lgpl.c: Update. * gnulib/import/cdefs.h: Update. * gnulib/import/chdir-long.c: Update. * gnulib/import/chdir-long.h: Update. * gnulib/import/cloexec.c: Update. * gnulib/import/cloexec.h: Update. * gnulib/import/close.c: Update. * gnulib/import/closedir.c: Update. * gnulib/import/config.charset: Update. * gnulib/import/dirent-private.h: 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/dup-safer-flag.c: Update. * gnulib/import/dup-safer.c: Update. * gnulib/import/dup.c: Update. * gnulib/import/dup2.c: Update. * gnulib/import/errno.in.h: Update. * gnulib/import/error.c: Update. * gnulib/import/error.h: Update. * gnulib/import/exitfail.c: Update. * gnulib/import/exitfail.h: Update. * gnulib/import/extra/update-copyright: Update. * gnulib/import/fchdir.c: Update. * gnulib/import/fcntl.c: Update. * gnulib/import/fcntl.in.h: Update. * gnulib/import/fd-hook.c: Update. * gnulib/import/fd-hook.h: Update. * gnulib/import/fd-safer-flag.c: Update. * gnulib/import/fd-safer.c: Update. * gnulib/import/fdopendir.c: Update. * gnulib/import/filename.h: Update. * gnulib/import/filenamecat-lgpl.c: Update. * gnulib/import/filenamecat.h: Update. * gnulib/import/flexmember.h: 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/fstat.c: Update. * gnulib/import/fstatat.c: Update. * gnulib/import/getcwd-lgpl.c: Update. * gnulib/import/getcwd.c: Update. * gnulib/import/getdtablesize.c: Update. * gnulib/import/getlogin_r.c: Update. * gnulib/import/getprogname.c: Update. * gnulib/import/getprogname.h: Update. * gnulib/import/gettext.h: Update. * gnulib/import/gettimeofday.c: Update. * gnulib/import/glob-libc.h: Update. * gnulib/import/glob.c: Update. * gnulib/import/glob.in.h: Update. * gnulib/import/glob_internal.h: Update. * gnulib/import/glob_pattern_p.c: Update. * gnulib/import/globfree.c: Update. * gnulib/import/hard-locale.c: Update. * gnulib/import/hard-locale.h: Update. * gnulib/import/intprops.h: 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/libc-config.h: Update. * gnulib/import/limits.in.h: Update. * gnulib/import/localcharset.c: Update. * gnulib/import/localcharset.h: Update. * gnulib/import/localtime-buffer.c: Update. * gnulib/import/localtime-buffer.h: Update. * gnulib/import/lstat.c: Update. * gnulib/import/m4/00gnulib.m4: Update. * gnulib/import/m4/__inline.m4: Update. * gnulib/import/m4/absolute-header.m4: Update. * gnulib/import/m4/alloca.m4: Update. * gnulib/import/m4/builtin-expect.m4: Update. * gnulib/import/m4/canonicalize.m4: Update. * gnulib/import/m4/chdir-long.m4: Update. * gnulib/import/m4/close.m4: Update. * gnulib/import/m4/closedir.m4: Update. * gnulib/import/m4/configmake.m4: Update. * gnulib/import/m4/d-ino.m4: Update. * gnulib/import/m4/d-type.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/dup.m4: Update. * gnulib/import/m4/dup2.m4: Update. * gnulib/import/m4/eealloc.m4: Update. * gnulib/import/m4/environ.m4: Update. * gnulib/import/m4/errno_h.m4: Update. * gnulib/import/m4/error.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/fchdir.m4: Update. * gnulib/import/m4/fcntl-o.m4: Update. * gnulib/import/m4/fcntl.m4: Update. * gnulib/import/m4/fcntl_h.m4: Update. * gnulib/import/m4/fdopendir.m4: Update. * gnulib/import/m4/filenamecat.m4: Update. * gnulib/import/m4/flexmember.m4: Update. * gnulib/import/m4/float_h.m4: Update. * gnulib/import/m4/fnmatch.m4: Update. * gnulib/import/m4/fnmatch_h.m4: Update. * gnulib/import/m4/fpieee.m4: Update. * gnulib/import/m4/frexp.m4: Update. * gnulib/import/m4/frexpl.m4: Update. * gnulib/import/m4/fstat.m4: Update. * gnulib/import/m4/fstatat.m4: Update. * gnulib/import/m4/getcwd-abort-bug.m4: Update. * gnulib/import/m4/getcwd-path-max.m4: Update. * gnulib/import/m4/getcwd.m4: Update. * gnulib/import/m4/getdtablesize.m4: Update. * gnulib/import/m4/getlogin.m4: Update. * gnulib/import/m4/getlogin_r.m4: Update. * gnulib/import/m4/getpagesize.m4: Update. * gnulib/import/m4/getprogname.m4: Update. * gnulib/import/m4/gettimeofday.m4: Update. * gnulib/import/m4/glibc21.m4: Update. * gnulib/import/m4/glob.m4: Update. * gnulib/import/m4/glob_h.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/hard-locale.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/limits-h.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/localtime-buffer.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/mempcpy.m4: Update. * gnulib/import/m4/memrchr.m4: Update. * gnulib/import/m4/mkdir.m4: Update. * gnulib/import/m4/mkstemp.m4: Update. * gnulib/import/m4/mmap-anon.m4: Update. * gnulib/import/m4/mode_t.m4: Update. * gnulib/import/m4/msvc-inval.m4: Update. * gnulib/import/m4/msvc-nothrow.m4: Update. * gnulib/import/m4/multiarch.m4: Update. * gnulib/import/m4/nocrash.m4: Update. * gnulib/import/m4/off_t.m4: Update. * gnulib/import/m4/onceonly.m4: Update. * gnulib/import/m4/open-cloexec.m4: Update. * gnulib/import/m4/open.m4: Update. * gnulib/import/m4/openat.m4: Update. * gnulib/import/m4/opendir.m4: Update. * gnulib/import/m4/pathmax.m4: Update. * gnulib/import/m4/rawmemchr.m4: Update. * gnulib/import/m4/readdir.m4: Update. * gnulib/import/m4/readlink.m4: Update. * gnulib/import/m4/realloc.m4: Update. * gnulib/import/m4/rename.m4: Update. * gnulib/import/m4/rewinddir.m4: Update. * gnulib/import/m4/rmdir.m4: Update. * gnulib/import/m4/save-cwd.m4: Update. * gnulib/import/m4/secure_getenv.m4: Update. * gnulib/import/m4/setenv.m4: Update. * gnulib/import/m4/signal_h.m4: Update. * gnulib/import/m4/ssize_t.m4: Update. * gnulib/import/m4/stat-time.m4: Update. * gnulib/import/m4/stat.m4: Update. * gnulib/import/m4/std-gnu11.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/strchrnul.m4: Update. * gnulib/import/m4/strdup.m4: Update. * gnulib/import/m4/strerror.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/tempname.m4: Update. * gnulib/import/m4/time_h.m4: Update. * gnulib/import/m4/unistd-safer.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/malloc/scratch_buffer.h: Update. * gnulib/import/malloc/scratch_buffer_grow.c: Update. * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update. * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update. * gnulib/import/malloca.c: Update. * gnulib/import/malloca.h: Update. * gnulib/import/malloca.valgrind: 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/mempcpy.c: Update. * gnulib/import/memrchr.c: Update. * gnulib/import/mkdir.c: Update. * gnulib/import/mkstemp.c: Update. * gnulib/import/msvc-inval.c: Update. * gnulib/import/msvc-inval.h: Update. * gnulib/import/msvc-nothrow.c: Update. * gnulib/import/msvc-nothrow.h: Update. * gnulib/import/open.c: Update. * gnulib/import/openat-die.c: Update. * gnulib/import/openat-priv.h: Update. * gnulib/import/openat-proc.c: Update. * gnulib/import/openat.c: Update. * gnulib/import/openat.h: Update. * gnulib/import/opendir.c: Update. * gnulib/import/pathmax.h: Update. * gnulib/import/pipe-safer.c: Update. * gnulib/import/rawmemchr.c: Update. * gnulib/import/readdir.c: Update. * gnulib/import/readlink.c: Update. * gnulib/import/realloc.c: Update. * gnulib/import/ref-add.sin: Update. * gnulib/import/ref-del.sin: Update. * gnulib/import/rename.c: Update. * gnulib/import/rewinddir.c: Update. * gnulib/import/rmdir.c: Update. * gnulib/import/same-inode.h: Update. * gnulib/import/save-cwd.c: Update. * gnulib/import/save-cwd.h: Update. * gnulib/import/scratch_buffer.h: Update. * gnulib/import/secure_getenv.c: Update. * gnulib/import/setenv.c: Update. * gnulib/import/signal.in.h: Update. * gnulib/import/stat-time.c: Update. * gnulib/import/stat-time.h: Update. * gnulib/import/stat-w32.c: Update. * gnulib/import/stat-w32.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.in.h: Update. * gnulib/import/stdlib.in.h: Update. * gnulib/import/str-two-way.h: Update. * gnulib/import/strchrnul.c: Update. * gnulib/import/strdup.c: Update. * gnulib/import/streq.h: Update. * gnulib/import/strerror-override.c: Update. * gnulib/import/strerror-override.h: Update. * gnulib/import/strerror.c: 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/tempname.c: Update. * gnulib/import/tempname.h: Update. * gnulib/import/time.in.h: Update. * gnulib/import/unistd--.h: Update. * gnulib/import/unistd-safer.h: Update. * gnulib/import/unistd.in.h: Update. * gnulib/import/unsetenv.c: Update. * gnulib/import/verify.h: Update. * gnulib/import/extra/snippet/warn-on-use.h: Update. * gnulib/import/wchar.in.h: Update. * gnulib/import/wctype.in.h: Update. * gnulib/import/xalloc-oversized.h: Update. * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to "53e2c179f26a890fa6685af4b6c1397ee370433b". --- gdb/ChangeLog | 328 + gdb/gnulib/aclocal.m4 | 545 +- gdb/gnulib/config.in | 995 +- gdb/gnulib/configure | 8989 ++++++++--------- gdb/gnulib/import/Makefile.am | 429 +- gdb/gnulib/import/Makefile.in | 586 +- gdb/gnulib/import/alloca.in.h | 4 +- gdb/gnulib/import/assure.h | 4 +- gdb/gnulib/import/at-func.c | 4 +- gdb/gnulib/import/basename-lgpl.c | 4 +- gdb/gnulib/import/canonicalize-lgpl.c | 16 +- gdb/gnulib/import/cdefs.h | 508 - gdb/gnulib/import/chdir-long.c | 4 +- gdb/gnulib/import/chdir-long.h | 4 +- gdb/gnulib/import/cloexec.c | 6 +- gdb/gnulib/import/cloexec.h | 6 +- gdb/gnulib/import/close.c | 8 +- gdb/gnulib/import/closedir.c | 4 +- gdb/gnulib/import/config.charset | 682 ++ gdb/gnulib/import/dirent-private.h | 4 +- gdb/gnulib/import/dirent.in.h | 4 +- gdb/gnulib/import/dirfd.c | 4 +- gdb/gnulib/import/dirname-lgpl.c | 4 +- gdb/gnulib/import/dirname.h | 6 +- gdb/gnulib/import/dosname.h | 9 +- gdb/gnulib/import/dup-safer-flag.c | 38 - gdb/gnulib/import/dup-safer.c | 4 +- gdb/gnulib/import/dup.c | 8 +- gdb/gnulib/import/dup2.c | 52 +- gdb/gnulib/import/errno.in.h | 8 +- gdb/gnulib/import/error.c | 31 +- gdb/gnulib/import/error.h | 4 +- gdb/gnulib/import/exitfail.c | 4 +- gdb/gnulib/import/exitfail.h | 4 +- .../import/{ => extra/snippet}/_Noreturn.h | 0 .../import/{ => extra/snippet}/arg-nonnull.h | 4 +- .../import/{ => extra/snippet}/c++defs.h | 48 +- .../import/{ => extra/snippet}/warn-on-use.h | 68 +- gdb/gnulib/import/extra/update-copyright | 13 +- gdb/gnulib/import/fchdir.c | 4 +- gdb/gnulib/import/fcntl.c | 14 +- gdb/gnulib/import/fcntl.in.h | 11 +- gdb/gnulib/import/fd-hook.c | 6 +- gdb/gnulib/import/fd-hook.h | 6 +- gdb/gnulib/import/fd-safer-flag.c | 52 - gdb/gnulib/import/fd-safer.c | 4 +- gdb/gnulib/import/fdopendir.c | 4 +- gdb/gnulib/import/filename.h | 6 +- gdb/gnulib/import/filenamecat-lgpl.c | 61 +- gdb/gnulib/import/filenamecat.h | 4 +- gdb/gnulib/import/flexmember.h | 23 +- gdb/gnulib/import/float+.h | 4 +- gdb/gnulib/import/float.c | 4 +- gdb/gnulib/import/float.in.h | 10 +- gdb/gnulib/import/fnmatch.c | 16 +- gdb/gnulib/import/fnmatch.in.h | 71 +- gdb/gnulib/import/fnmatch_loop.c | 12 +- gdb/gnulib/import/fpucw.h | 8 +- gdb/gnulib/import/frexp.c | 4 +- gdb/gnulib/import/frexpl.c | 4 +- gdb/gnulib/import/fstat.c | 72 +- gdb/gnulib/import/fstatat.c | 20 +- gdb/gnulib/import/getcwd-lgpl.c | 4 +- gdb/gnulib/import/getcwd.c | 4 +- gdb/gnulib/import/getdtablesize.c | 19 +- gdb/gnulib/import/getlogin_r.c | 34 +- gdb/gnulib/import/getprogname.c | 54 +- gdb/gnulib/import/getprogname.h | 4 +- gdb/gnulib/import/gettext.h | 12 +- gdb/gnulib/import/gettimeofday.c | 160 +- gdb/gnulib/import/glob-libc.h | 115 +- gdb/gnulib/import/glob.c | 909 +- gdb/gnulib/import/glob.in.h | 179 +- gdb/gnulib/import/glob_internal.h | 65 - gdb/gnulib/import/glob_pattern_p.c | 33 - gdb/gnulib/import/globfree.c | 41 - gdb/gnulib/import/hard-locale.c | 4 +- gdb/gnulib/import/hard-locale.h | 4 +- gdb/gnulib/import/intprops.h | 89 +- gdb/gnulib/import/inttypes.in.h | 10 +- gdb/gnulib/import/isnan.c | 4 +- gdb/gnulib/import/isnand-nolibm.h | 4 +- gdb/gnulib/import/isnand.c | 4 +- gdb/gnulib/import/isnanl-nolibm.h | 4 +- gdb/gnulib/import/isnanl.c | 4 +- gdb/gnulib/import/itold.c | 4 +- gdb/gnulib/import/libc-config.h | 174 - gdb/gnulib/import/limits.in.h | 15 +- gdb/gnulib/import/localcharset.c | 1085 +- gdb/gnulib/import/localcharset.h | 100 +- gdb/gnulib/import/localtime-buffer.c | 58 - gdb/gnulib/import/localtime-buffer.h | 27 - gdb/gnulib/import/lstat.c | 43 +- gdb/gnulib/import/m4/00gnulib.m4 | 2 +- gdb/gnulib/import/m4/__inline.m4 | 22 - gdb/gnulib/import/m4/absolute-header.m4 | 2 +- gdb/gnulib/import/m4/alloca.m4 | 6 +- gdb/gnulib/import/m4/builtin-expect.m4 | 49 - gdb/gnulib/import/m4/canonicalize.m4 | 10 +- gdb/gnulib/import/m4/chdir-long.m4 | 10 +- gdb/gnulib/import/m4/close.m4 | 14 +- gdb/gnulib/import/m4/closedir.m4 | 5 +- gdb/gnulib/import/m4/configmake.m4 | 55 + gdb/gnulib/import/m4/d-ino.m4 | 14 +- gdb/gnulib/import/m4/d-type.m4 | 6 +- gdb/gnulib/import/m4/dirent_h.m4 | 2 +- gdb/gnulib/import/m4/dirfd.m4 | 11 +- gdb/gnulib/import/m4/dirname.m4 | 2 +- gdb/gnulib/import/m4/double-slash-root.m4 | 2 +- gdb/gnulib/import/m4/dup.m4 | 22 +- gdb/gnulib/import/m4/dup2.m4 | 2 +- gdb/gnulib/import/m4/eealloc.m4 | 2 +- gdb/gnulib/import/m4/environ.m4 | 2 +- gdb/gnulib/import/m4/errno_h.m4 | 2 +- gdb/gnulib/import/m4/error.m4 | 2 +- gdb/gnulib/import/m4/exponentd.m4 | 2 +- gdb/gnulib/import/m4/exponentl.m4 | 22 +- gdb/gnulib/import/m4/extensions.m4 | 20 +- gdb/gnulib/import/m4/extern-inline.m4 | 26 +- gdb/gnulib/import/m4/fchdir.m4 | 16 +- gdb/gnulib/import/m4/fcntl-o.m4 | 13 +- gdb/gnulib/import/m4/fcntl.m4 | 2 +- gdb/gnulib/import/m4/fcntl_h.m4 | 2 +- gdb/gnulib/import/m4/fdopendir.m4 | 2 +- gdb/gnulib/import/m4/filenamecat.m4 | 2 +- gdb/gnulib/import/m4/flexmember.m4 | 9 +- gdb/gnulib/import/m4/float_h.m4 | 36 +- gdb/gnulib/import/m4/fnmatch.m4 | 231 +- gdb/gnulib/import/m4/fnmatch_h.m4 | 75 - gdb/gnulib/import/m4/fpieee.m4 | 4 +- gdb/gnulib/import/m4/frexp.m4 | 17 +- gdb/gnulib/import/m4/frexpl.m4 | 6 +- gdb/gnulib/import/m4/fstat.m4 | 29 +- gdb/gnulib/import/m4/fstatat.m4 | 23 +- gdb/gnulib/import/m4/getcwd-abort-bug.m4 | 44 +- gdb/gnulib/import/m4/getcwd-path-max.m4 | 42 +- gdb/gnulib/import/m4/getcwd.m4 | 22 +- gdb/gnulib/import/m4/getdtablesize.m4 | 56 +- gdb/gnulib/import/m4/getlogin.m4 | 32 - gdb/gnulib/import/m4/getlogin_r.m4 | 32 +- gdb/gnulib/import/m4/getpagesize.m4 | 49 - gdb/gnulib/import/m4/getprogname.m4 | 2 +- gdb/gnulib/import/m4/gettimeofday.m4 | 48 +- gdb/gnulib/import/m4/glibc21.m4 | 34 + gdb/gnulib/import/m4/glob.m4 | 108 +- gdb/gnulib/import/m4/glob_h.m4 | 72 - gdb/gnulib/import/m4/gnulib-cache.m4 | 47 +- gdb/gnulib/import/m4/gnulib-common.m4 | 48 +- gdb/gnulib/import/m4/gnulib-comp.m4 | 113 +- gdb/gnulib/import/m4/gnulib-tool.m4 | 2 +- gdb/gnulib/import/m4/hard-locale.m4 | 11 + gdb/gnulib/import/m4/include_next.m4 | 7 +- gdb/gnulib/import/m4/inttypes-pri.m4 | 2 +- gdb/gnulib/import/m4/inttypes.m4 | 5 +- gdb/gnulib/import/m4/isnand.m4 | 2 +- gdb/gnulib/import/m4/isnanl.m4 | 18 +- gdb/gnulib/import/m4/largefile.m4 | 23 +- gdb/gnulib/import/m4/limits-h.m4 | 10 +- gdb/gnulib/import/m4/localcharset.m4 | 10 +- gdb/gnulib/import/m4/locale-fr.m4 | 31 +- gdb/gnulib/import/m4/locale-ja.m4 | 39 +- gdb/gnulib/import/m4/locale-zh.m4 | 39 +- gdb/gnulib/import/m4/localtime-buffer.m4 | 21 - gdb/gnulib/import/m4/longlong.m4 | 2 +- gdb/gnulib/import/m4/lstat.m4 | 18 +- gdb/gnulib/import/m4/malloc.m4 | 10 +- gdb/gnulib/import/m4/malloca.m4 | 2 +- gdb/gnulib/import/m4/math_h.m4 | 17 +- gdb/gnulib/import/m4/mbrtowc.m4 | 40 +- 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 | 33 +- gdb/gnulib/import/m4/memmem.m4 | 9 +- gdb/gnulib/import/m4/mempcpy.m4 | 2 +- gdb/gnulib/import/m4/memrchr.m4 | 2 +- gdb/gnulib/import/m4/mkdir.m4 | 33 +- gdb/gnulib/import/m4/mkstemp.m4 | 14 +- gdb/gnulib/import/m4/mmap-anon.m4 | 2 +- gdb/gnulib/import/m4/mode_t.m4 | 2 +- gdb/gnulib/import/m4/msvc-inval.m4 | 2 +- gdb/gnulib/import/m4/msvc-nothrow.m4 | 2 +- gdb/gnulib/import/m4/multiarch.m4 | 2 +- gdb/gnulib/import/m4/nocrash.m4 | 6 +- gdb/gnulib/import/m4/off_t.m4 | 2 +- gdb/gnulib/import/m4/onceonly.m4 | 4 +- gdb/gnulib/import/m4/open-cloexec.m4 | 21 - gdb/gnulib/import/m4/open.m4 | 8 +- gdb/gnulib/import/m4/openat.m4 | 10 +- gdb/gnulib/import/m4/opendir.m4 | 5 +- gdb/gnulib/import/m4/pathmax.m4 | 6 +- gdb/gnulib/import/m4/rawmemchr.m4 | 2 +- gdb/gnulib/import/m4/readdir.m4 | 2 +- gdb/gnulib/import/m4/readlink.m4 | 14 +- gdb/gnulib/import/m4/realloc.m4 | 8 +- gdb/gnulib/import/m4/rename.m4 | 73 +- gdb/gnulib/import/m4/rewinddir.m4 | 2 +- gdb/gnulib/import/m4/rmdir.m4 | 16 +- gdb/gnulib/import/m4/save-cwd.m4 | 2 +- gdb/gnulib/import/m4/secure_getenv.m4 | 26 + gdb/gnulib/import/m4/setenv.m4 | 12 +- gdb/gnulib/import/m4/signal_h.m4 | 2 +- gdb/gnulib/import/m4/ssize_t.m4 | 2 +- gdb/gnulib/import/m4/stat-time.m4 | 83 - gdb/gnulib/import/m4/stat.m4 | 113 +- gdb/gnulib/import/m4/std-gnu11.m4 | 824 -- gdb/gnulib/import/m4/stdbool.m4 | 6 +- gdb/gnulib/import/m4/stddef_h.m4 | 2 +- gdb/gnulib/import/m4/stdint.m4 | 118 +- gdb/gnulib/import/m4/stdio_h.m4 | 6 +- gdb/gnulib/import/m4/stdlib_h.m4 | 17 +- gdb/gnulib/import/m4/strchrnul.m4 | 2 +- gdb/gnulib/import/m4/strdup.m4 | 2 +- gdb/gnulib/import/m4/strerror.m4 | 22 +- gdb/gnulib/import/m4/string_h.m4 | 16 +- gdb/gnulib/import/m4/strstr.m4 | 11 +- gdb/gnulib/import/m4/strtok_r.m4 | 19 +- gdb/gnulib/import/m4/sys_socket_h.m4 | 2 +- gdb/gnulib/import/m4/sys_stat_h.m4 | 20 +- gdb/gnulib/import/m4/sys_time_h.m4 | 5 +- gdb/gnulib/import/m4/sys_types_h.m4 | 19 +- gdb/gnulib/import/m4/tempname.m4 | 2 +- gdb/gnulib/import/m4/time_h.m4 | 14 +- gdb/gnulib/import/m4/unistd-safer.m4 | 2 +- gdb/gnulib/import/m4/unistd_h.m4 | 20 +- gdb/gnulib/import/m4/warn-on-use.m4 | 42 +- gdb/gnulib/import/m4/wchar_h.m4 | 25 +- gdb/gnulib/import/m4/wchar_t.m4 | 2 +- gdb/gnulib/import/m4/wctype_h.m4 | 9 +- gdb/gnulib/import/m4/wint_t.m4 | 48 +- gdb/gnulib/import/malloc.c | 4 +- gdb/gnulib/import/malloc/scratch_buffer.h | 135 - .../import/malloc/scratch_buffer_grow.c | 56 - .../malloc/scratch_buffer_grow_preserve.c | 67 - .../malloc/scratch_buffer_set_array_size.c | 64 - gdb/gnulib/import/malloca.c | 140 +- gdb/gnulib/import/malloca.h | 28 +- gdb/gnulib/import/malloca.valgrind | 7 + gdb/gnulib/import/math.in.h | 257 +- gdb/gnulib/import/mbrtowc.c | 101 +- gdb/gnulib/import/mbsinit.c | 38 +- gdb/gnulib/import/mbsrtowcs-impl.h | 4 +- gdb/gnulib/import/mbsrtowcs-state.c | 6 +- gdb/gnulib/import/mbsrtowcs.c | 4 +- gdb/gnulib/import/memchr.c | 4 +- gdb/gnulib/import/memmem.c | 8 +- gdb/gnulib/import/mempcpy.c | 4 +- gdb/gnulib/import/memrchr.c | 4 +- gdb/gnulib/import/mkdir.c | 6 +- gdb/gnulib/import/mkstemp.c | 4 +- gdb/gnulib/import/msvc-inval.c | 4 +- gdb/gnulib/import/msvc-inval.h | 8 +- gdb/gnulib/import/msvc-nothrow.c | 8 +- gdb/gnulib/import/msvc-nothrow.h | 6 +- gdb/gnulib/import/open.c | 35 +- gdb/gnulib/import/openat-die.c | 4 +- gdb/gnulib/import/openat-priv.h | 4 +- gdb/gnulib/import/openat-proc.c | 4 +- gdb/gnulib/import/openat.c | 38 +- gdb/gnulib/import/openat.h | 4 +- gdb/gnulib/import/opendir.c | 4 +- gdb/gnulib/import/pathmax.h | 8 +- gdb/gnulib/import/pipe-safer.c | 4 +- gdb/gnulib/import/rawmemchr.c | 4 +- gdb/gnulib/import/readdir.c | 4 +- gdb/gnulib/import/readlink.c | 4 +- gdb/gnulib/import/realloc.c | 4 +- gdb/gnulib/import/ref-add.sin | 29 + gdb/gnulib/import/ref-del.sin | 24 + gdb/gnulib/import/rename.c | 6 +- gdb/gnulib/import/rewinddir.c | 4 +- gdb/gnulib/import/rmdir.c | 4 +- gdb/gnulib/import/same-inode.h | 22 +- gdb/gnulib/import/save-cwd.c | 10 +- gdb/gnulib/import/save-cwd.h | 4 +- gdb/gnulib/import/scratch_buffer.h | 11 - gdb/gnulib/import/secure_getenv.c | 54 + gdb/gnulib/import/setenv.c | 4 +- gdb/gnulib/import/signal.in.h | 8 +- gdb/gnulib/import/stat-time.c | 3 - gdb/gnulib/import/stat-time.h | 252 - gdb/gnulib/import/stat-w32.c | 425 - gdb/gnulib/import/stat-w32.h | 37 - gdb/gnulib/import/stat.c | 421 +- gdb/gnulib/import/stdbool.in.h | 10 +- gdb/gnulib/import/stddef.in.h | 22 +- gdb/gnulib/import/stdint.in.h | 56 +- gdb/gnulib/import/stdio.in.h | 32 +- gdb/gnulib/import/stdlib.in.h | 32 +- gdb/gnulib/import/str-two-way.h | 8 +- gdb/gnulib/import/strchrnul.c | 4 +- gdb/gnulib/import/strdup.c | 4 +- gdb/gnulib/import/streq.h | 4 +- gdb/gnulib/import/strerror-override.c | 4 +- gdb/gnulib/import/strerror-override.h | 4 +- gdb/gnulib/import/strerror.c | 7 +- gdb/gnulib/import/string.in.h | 21 +- gdb/gnulib/import/stripslash.c | 4 +- gdb/gnulib/import/strnlen1.c | 4 +- gdb/gnulib/import/strnlen1.h | 4 +- gdb/gnulib/import/strstr.c | 8 +- gdb/gnulib/import/strtok_r.c | 4 +- gdb/gnulib/import/sys_stat.in.h | 188 +- gdb/gnulib/import/sys_time.in.h | 4 +- gdb/gnulib/import/sys_types.in.h | 61 +- gdb/gnulib/import/tempname.c | 7 +- gdb/gnulib/import/tempname.h | 4 +- gdb/gnulib/import/time.in.h | 65 +- gdb/gnulib/import/unistd--.h | 4 +- gdb/gnulib/import/unistd-safer.h | 4 +- gdb/gnulib/import/unistd.in.h | 128 +- gdb/gnulib/import/unsetenv.c | 4 +- gdb/gnulib/import/verify.h | 14 +- gdb/gnulib/import/wchar.in.h | 57 +- gdb/gnulib/import/wctype.in.h | 28 +- gdb/gnulib/import/xalloc-oversized.h | 60 - gdb/gnulib/update-gnulib.sh | 2 +- 317 files changed, 10117 insertions(+), 13902 deletions(-) delete mode 100644 gdb/gnulib/import/cdefs.h create mode 100644 gdb/gnulib/import/config.charset delete mode 100644 gdb/gnulib/import/dup-safer-flag.c rename gdb/gnulib/import/{ => extra/snippet}/_Noreturn.h (100%) rename gdb/gnulib/import/{ => extra/snippet}/arg-nonnull.h (88%) rename gdb/gnulib/import/{ => extra/snippet}/c++defs.h (87%) rename gdb/gnulib/import/{ => extra/snippet}/warn-on-use.h (63%) delete mode 100644 gdb/gnulib/import/fd-safer-flag.c delete mode 100644 gdb/gnulib/import/glob_internal.h delete mode 100644 gdb/gnulib/import/glob_pattern_p.c delete mode 100644 gdb/gnulib/import/globfree.c delete mode 100644 gdb/gnulib/import/libc-config.h delete mode 100644 gdb/gnulib/import/localtime-buffer.c delete mode 100644 gdb/gnulib/import/localtime-buffer.h delete mode 100644 gdb/gnulib/import/m4/__inline.m4 delete mode 100644 gdb/gnulib/import/m4/builtin-expect.m4 create mode 100644 gdb/gnulib/import/m4/configmake.m4 delete mode 100644 gdb/gnulib/import/m4/fnmatch_h.m4 delete mode 100644 gdb/gnulib/import/m4/getlogin.m4 delete mode 100644 gdb/gnulib/import/m4/getpagesize.m4 create mode 100644 gdb/gnulib/import/m4/glibc21.m4 delete mode 100644 gdb/gnulib/import/m4/glob_h.m4 create mode 100644 gdb/gnulib/import/m4/hard-locale.m4 delete mode 100644 gdb/gnulib/import/m4/localtime-buffer.m4 delete mode 100644 gdb/gnulib/import/m4/open-cloexec.m4 create mode 100644 gdb/gnulib/import/m4/secure_getenv.m4 delete mode 100644 gdb/gnulib/import/m4/stat-time.m4 delete mode 100644 gdb/gnulib/import/m4/std-gnu11.m4 delete mode 100644 gdb/gnulib/import/malloc/scratch_buffer.h delete mode 100644 gdb/gnulib/import/malloc/scratch_buffer_grow.c delete mode 100644 gdb/gnulib/import/malloc/scratch_buffer_grow_preserve.c delete mode 100644 gdb/gnulib/import/malloc/scratch_buffer_set_array_size.c create mode 100644 gdb/gnulib/import/malloca.valgrind create mode 100644 gdb/gnulib/import/ref-add.sin create mode 100644 gdb/gnulib/import/ref-del.sin delete mode 100644 gdb/gnulib/import/scratch_buffer.h create mode 100644 gdb/gnulib/import/secure_getenv.c delete mode 100644 gdb/gnulib/import/stat-time.c delete mode 100644 gdb/gnulib/import/stat-time.h delete mode 100644 gdb/gnulib/import/stat-w32.c delete mode 100644 gdb/gnulib/import/stat-w32.h delete mode 100644 gdb/gnulib/import/xalloc-oversized.h diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 4c421262e33..b48b679403c 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,331 @@ +2018-09-10 Sergio Durigan Junior + + Revert: + 2018-08-29 Sergio Durigan Junior + + PR gdb/23555 + PR gdb/23558 + * gnulib/aclocal.m4: Regenerate. + * gnulib/config.in: Regenerate. + * gnulib/configure: Regenerate. + * gnulib/import/Makefile.am: Update. + * gnulib/import/Makefile.in: Update. + * gnulib/import/extra/snippet/_Noreturn.h: Rename to... + * gnulib/import/_Noreturn.h: ... this. + * gnulib/import/alloca.in.h: Update. + * gnulib/import/extra/snippet/arg-nonnull.h: Rename to... + * gnulib/import/arg-nonnull.h: ... this. + * gnulib/import/assure.h: Update. + * gnulib/import/at-func.c: Update. + * gnulib/import/basename-lgpl.c: Update. + * gnulib/import/extra/snippet/c++defs.h: Rename to... + * gnulib/import/c++defs.h: ... this. + * gnulib/import/canonicalize-lgpl.c: Update. + * gnulib/import/cdefs.h: Update. + * gnulib/import/chdir-long.c: Update. + * gnulib/import/chdir-long.h: Update. + * gnulib/import/cloexec.c: Update. + * gnulib/import/cloexec.h: Update. + * gnulib/import/close.c: Update. + * gnulib/import/closedir.c: Update. + * gnulib/import/config.charset: Update. + * gnulib/import/dirent-private.h: 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/dup-safer-flag.c: Update. + * gnulib/import/dup-safer.c: Update. + * gnulib/import/dup.c: Update. + * gnulib/import/dup2.c: Update. + * gnulib/import/errno.in.h: Update. + * gnulib/import/error.c: Update. + * gnulib/import/error.h: Update. + * gnulib/import/exitfail.c: Update. + * gnulib/import/exitfail.h: Update. + * gnulib/import/extra/update-copyright: Update. + * gnulib/import/fchdir.c: Update. + * gnulib/import/fcntl.c: Update. + * gnulib/import/fcntl.in.h: Update. + * gnulib/import/fd-hook.c: Update. + * gnulib/import/fd-hook.h: Update. + * gnulib/import/fd-safer-flag.c: Update. + * gnulib/import/fd-safer.c: Update. + * gnulib/import/fdopendir.c: Update. + * gnulib/import/filename.h: Update. + * gnulib/import/filenamecat-lgpl.c: Update. + * gnulib/import/filenamecat.h: Update. + * gnulib/import/flexmember.h: 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/fstat.c: Update. + * gnulib/import/fstatat.c: Update. + * gnulib/import/getcwd-lgpl.c: Update. + * gnulib/import/getcwd.c: Update. + * gnulib/import/getdtablesize.c: Update. + * gnulib/import/getlogin_r.c: Update. + * gnulib/import/getprogname.c: Update. + * gnulib/import/getprogname.h: Update. + * gnulib/import/gettext.h: Update. + * gnulib/import/gettimeofday.c: Update. + * gnulib/import/glob-libc.h: Update. + * gnulib/import/glob.c: Update. + * gnulib/import/glob.in.h: Update. + * gnulib/import/glob_internal.h: Update. + * gnulib/import/glob_pattern_p.c: Update. + * gnulib/import/globfree.c: Update. + * gnulib/import/hard-locale.c: Update. + * gnulib/import/hard-locale.h: Update. + * gnulib/import/intprops.h: 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/libc-config.h: Update. + * gnulib/import/limits.in.h: Update. + * gnulib/import/localcharset.c: Update. + * gnulib/import/localcharset.h: Update. + * gnulib/import/localtime-buffer.c: Update. + * gnulib/import/localtime-buffer.h: Update. + * gnulib/import/lstat.c: Update. + * gnulib/import/m4/00gnulib.m4: Update. + * gnulib/import/m4/__inline.m4: Update. + * gnulib/import/m4/absolute-header.m4: Update. + * gnulib/import/m4/alloca.m4: Update. + * gnulib/import/m4/builtin-expect.m4: Update. + * gnulib/import/m4/canonicalize.m4: Update. + * gnulib/import/m4/chdir-long.m4: Update. + * gnulib/import/m4/close.m4: Update. + * gnulib/import/m4/closedir.m4: Update. + * gnulib/import/m4/configmake.m4: Update. + * gnulib/import/m4/d-ino.m4: Update. + * gnulib/import/m4/d-type.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/dup.m4: Update. + * gnulib/import/m4/dup2.m4: Update. + * gnulib/import/m4/eealloc.m4: Update. + * gnulib/import/m4/environ.m4: Update. + * gnulib/import/m4/errno_h.m4: Update. + * gnulib/import/m4/error.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/fchdir.m4: Update. + * gnulib/import/m4/fcntl-o.m4: Update. + * gnulib/import/m4/fcntl.m4: Update. + * gnulib/import/m4/fcntl_h.m4: Update. + * gnulib/import/m4/fdopendir.m4: Update. + * gnulib/import/m4/filenamecat.m4: Update. + * gnulib/import/m4/flexmember.m4: Update. + * gnulib/import/m4/float_h.m4: Update. + * gnulib/import/m4/fnmatch.m4: Update. + * gnulib/import/m4/fnmatch_h.m4: Update. + * gnulib/import/m4/fpieee.m4: Update. + * gnulib/import/m4/frexp.m4: Update. + * gnulib/import/m4/frexpl.m4: Update. + * gnulib/import/m4/fstat.m4: Update. + * gnulib/import/m4/fstatat.m4: Update. + * gnulib/import/m4/getcwd-abort-bug.m4: Update. + * gnulib/import/m4/getcwd-path-max.m4: Update. + * gnulib/import/m4/getcwd.m4: Update. + * gnulib/import/m4/getdtablesize.m4: Update. + * gnulib/import/m4/getlogin.m4: Update. + * gnulib/import/m4/getlogin_r.m4: Update. + * gnulib/import/m4/getpagesize.m4: Update. + * gnulib/import/m4/getprogname.m4: Update. + * gnulib/import/m4/gettimeofday.m4: Update. + * gnulib/import/m4/glibc21.m4: Update. + * gnulib/import/m4/glob.m4: Update. + * gnulib/import/m4/glob_h.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/hard-locale.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/limits-h.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/localtime-buffer.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/mempcpy.m4: Update. + * gnulib/import/m4/memrchr.m4: Update. + * gnulib/import/m4/mkdir.m4: Update. + * gnulib/import/m4/mkstemp.m4: Update. + * gnulib/import/m4/mmap-anon.m4: Update. + * gnulib/import/m4/mode_t.m4: Update. + * gnulib/import/m4/msvc-inval.m4: Update. + * gnulib/import/m4/msvc-nothrow.m4: Update. + * gnulib/import/m4/multiarch.m4: Update. + * gnulib/import/m4/nocrash.m4: Update. + * gnulib/import/m4/off_t.m4: Update. + * gnulib/import/m4/onceonly.m4: Update. + * gnulib/import/m4/open-cloexec.m4: Update. + * gnulib/import/m4/open.m4: Update. + * gnulib/import/m4/openat.m4: Update. + * gnulib/import/m4/opendir.m4: Update. + * gnulib/import/m4/pathmax.m4: Update. + * gnulib/import/m4/rawmemchr.m4: Update. + * gnulib/import/m4/readdir.m4: Update. + * gnulib/import/m4/readlink.m4: Update. + * gnulib/import/m4/realloc.m4: Update. + * gnulib/import/m4/rename.m4: Update. + * gnulib/import/m4/rewinddir.m4: Update. + * gnulib/import/m4/rmdir.m4: Update. + * gnulib/import/m4/save-cwd.m4: Update. + * gnulib/import/m4/secure_getenv.m4: Update. + * gnulib/import/m4/setenv.m4: Update. + * gnulib/import/m4/signal_h.m4: Update. + * gnulib/import/m4/ssize_t.m4: Update. + * gnulib/import/m4/stat-time.m4: Update. + * gnulib/import/m4/stat.m4: Update. + * gnulib/import/m4/std-gnu11.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/strchrnul.m4: Update. + * gnulib/import/m4/strdup.m4: Update. + * gnulib/import/m4/strerror.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/tempname.m4: Update. + * gnulib/import/m4/time_h.m4: Update. + * gnulib/import/m4/unistd-safer.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/malloc/scratch_buffer.h: Update. + * gnulib/import/malloc/scratch_buffer_grow.c: Update. + * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update. + * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update. + * gnulib/import/malloca.c: Update. + * gnulib/import/malloca.h: Update. + * gnulib/import/malloca.valgrind: 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/mempcpy.c: Update. + * gnulib/import/memrchr.c: Update. + * gnulib/import/mkdir.c: Update. + * gnulib/import/mkstemp.c: Update. + * gnulib/import/msvc-inval.c: Update. + * gnulib/import/msvc-inval.h: Update. + * gnulib/import/msvc-nothrow.c: Update. + * gnulib/import/msvc-nothrow.h: Update. + * gnulib/import/open.c: Update. + * gnulib/import/openat-die.c: Update. + * gnulib/import/openat-priv.h: Update. + * gnulib/import/openat-proc.c: Update. + * gnulib/import/openat.c: Update. + * gnulib/import/openat.h: Update. + * gnulib/import/opendir.c: Update. + * gnulib/import/pathmax.h: Update. + * gnulib/import/pipe-safer.c: Update. + * gnulib/import/rawmemchr.c: Update. + * gnulib/import/readdir.c: Update. + * gnulib/import/readlink.c: Update. + * gnulib/import/realloc.c: Update. + * gnulib/import/ref-add.sin: Update. + * gnulib/import/ref-del.sin: Update. + * gnulib/import/rename.c: Update. + * gnulib/import/rewinddir.c: Update. + * gnulib/import/rmdir.c: Update. + * gnulib/import/same-inode.h: Update. + * gnulib/import/save-cwd.c: Update. + * gnulib/import/save-cwd.h: Update. + * gnulib/import/scratch_buffer.h: Update. + * gnulib/import/secure_getenv.c: Update. + * gnulib/import/setenv.c: Update. + * gnulib/import/signal.in.h: Update. + * gnulib/import/stat-time.c: Update. + * gnulib/import/stat-time.h: Update. + * gnulib/import/stat-w32.c: Update. + * gnulib/import/stat-w32.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.in.h: Update. + * gnulib/import/stdlib.in.h: Update. + * gnulib/import/str-two-way.h: Update. + * gnulib/import/strchrnul.c: Update. + * gnulib/import/strdup.c: Update. + * gnulib/import/streq.h: Update. + * gnulib/import/strerror-override.c: Update. + * gnulib/import/strerror-override.h: Update. + * gnulib/import/strerror.c: 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/tempname.c: Update. + * gnulib/import/tempname.h: Update. + * gnulib/import/time.in.h: Update. + * gnulib/import/unistd--.h: Update. + * gnulib/import/unistd-safer.h: Update. + * gnulib/import/unistd.in.h: Update. + * gnulib/import/unsetenv.c: Update. + * gnulib/import/verify.h: Update. + * gnulib/import/extra/snippet/warn-on-use.h: Update. + * gnulib/import/wchar.in.h: Update. + * gnulib/import/wctype.in.h: Update. + * gnulib/import/xalloc-oversized.h: Update. + * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to + "53e2c179f26a890fa6685af4b6c1397ee370433b". + 2018-09-10 Simon Marchi * record-btrace.c (get_thread_current_frame): Remove diff --git a/gdb/gnulib/aclocal.m4 b/gdb/gnulib/aclocal.m4 index 68b6760be45..b897337bcab 100644 --- a/gdb/gnulib/aclocal.m4 +++ b/gdb/gnulib/aclocal.m4 @@ -20,460 +20,6 @@ You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) -# po.m4 serial 24 (gettext-0.19) -dnl Copyright (C) 1995-2014, 2016 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 -dnl This file can be used in projects which are not available under -dnl the GNU General Public License or the GNU Library General Public -dnl License but which still want to provide support for the GNU gettext -dnl functionality. -dnl Please note that the actual code of the GNU gettext library is covered -dnl by the GNU Library General Public License, and the rest of the GNU -dnl gettext package is covered by the GNU General Public License. -dnl They are *not* in the public domain. - -dnl Authors: -dnl Ulrich Drepper , 1995-2000. -dnl Bruno Haible , 2000-2003. - -AC_PREREQ([2.60]) - -dnl Checks for all prerequisites of the po subdirectory. -AC_DEFUN([AM_PO_SUBDIRS], -[ - AC_REQUIRE([AC_PROG_MAKE_SET])dnl - AC_REQUIRE([AC_PROG_INSTALL])dnl - AC_REQUIRE([AC_PROG_MKDIR_P])dnl - AC_REQUIRE([AC_PROG_SED])dnl - AC_REQUIRE([AM_NLS])dnl - - dnl Release version of the gettext macros. This is used to ensure that - dnl the gettext macros and po/Makefile.in.in are in sync. - AC_SUBST([GETTEXT_MACRO_VERSION], [0.19]) - - dnl Perform the following tests also if --disable-nls has been given, - dnl because they are needed for "make dist" to work. - - dnl Search for GNU msgfmt in the PATH. - dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions. - dnl The second test excludes FreeBSD msgfmt. - AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, - [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && - (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], - :) - AC_PATH_PROG([GMSGFMT], [gmsgfmt], [$MSGFMT]) - - dnl Test whether it is GNU msgfmt >= 0.15. -changequote(,)dnl - case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in - '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;; - *) MSGFMT_015=$MSGFMT ;; - esac -changequote([,])dnl - AC_SUBST([MSGFMT_015]) -changequote(,)dnl - case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in - '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;; - *) GMSGFMT_015=$GMSGFMT ;; - esac -changequote([,])dnl - AC_SUBST([GMSGFMT_015]) - - dnl Search for GNU xgettext 0.12 or newer in the PATH. - dnl The first test excludes Solaris xgettext and early GNU xgettext versions. - dnl The second test excludes FreeBSD xgettext. - AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, - [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && - (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], - :) - dnl Remove leftover from FreeBSD xgettext call. - rm -f messages.po - - dnl Test whether it is GNU xgettext >= 0.15. -changequote(,)dnl - case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in - '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;; - *) XGETTEXT_015=$XGETTEXT ;; - esac -changequote([,])dnl - AC_SUBST([XGETTEXT_015]) - - dnl Search for GNU msgmerge 0.11 or newer in the PATH. - AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge, - [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :) - - dnl Installation directories. - dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we - dnl have to define it here, so that it can be used in po/Makefile. - test -n "$localedir" || localedir='${datadir}/locale' - AC_SUBST([localedir]) - - dnl Support for AM_XGETTEXT_OPTION. - test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS= - AC_SUBST([XGETTEXT_EXTRA_OPTIONS]) - - AC_CONFIG_COMMANDS([po-directories], [[ - for ac_file in $CONFIG_FILES; do - # Support "outfile[:infile[:infile...]]" - case "$ac_file" in - *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - esac - # PO directories have a Makefile.in generated from Makefile.in.in. - case "$ac_file" in */Makefile.in) - # Adjust a relative srcdir. - ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` - ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'` - ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` - # In autoconf-2.13 it is called $ac_given_srcdir. - # In autoconf-2.50 it is called $srcdir. - test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" - case "$ac_given_srcdir" in - .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; - /*) top_srcdir="$ac_given_srcdir" ;; - *) top_srcdir="$ac_dots$ac_given_srcdir" ;; - esac - # Treat a directory as a PO directory if and only if it has a - # POTFILES.in file. This allows packages to have multiple PO - # directories under different names or in different locations. - if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then - rm -f "$ac_dir/POTFILES" - test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" - gt_tab=`printf '\t'` - cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" - POMAKEFILEDEPS="POTFILES.in" - # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend - # on $ac_dir but don't depend on user-specified configuration - # parameters. - if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then - # The LINGUAS file contains the set of available languages. - if test -n "$OBSOLETE_ALL_LINGUAS"; then - test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" - fi - ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` - # Hide the ALL_LINGUAS assignment from automake < 1.5. - eval 'ALL_LINGUAS''=$ALL_LINGUAS_' - POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" - else - # The set of available languages was given in configure.in. - # Hide the ALL_LINGUAS assignment from automake < 1.5. - eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' - fi - # Compute POFILES - # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) - # Compute UPDATEPOFILES - # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) - # Compute DUMMYPOFILES - # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) - # Compute GMOFILES - # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) - case "$ac_given_srcdir" in - .) srcdirpre= ;; - *) srcdirpre='$(srcdir)/' ;; - esac - POFILES= - UPDATEPOFILES= - DUMMYPOFILES= - GMOFILES= - for lang in $ALL_LINGUAS; do - POFILES="$POFILES $srcdirpre$lang.po" - UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" - DUMMYPOFILES="$DUMMYPOFILES $lang.nop" - GMOFILES="$GMOFILES $srcdirpre$lang.gmo" - done - # CATALOGS depends on both $ac_dir and the user's LINGUAS - # environment variable. - INST_LINGUAS= - if test -n "$ALL_LINGUAS"; then - for presentlang in $ALL_LINGUAS; do - useit=no - if test "%UNSET%" != "$LINGUAS"; then - desiredlanguages="$LINGUAS" - else - desiredlanguages="$ALL_LINGUAS" - fi - for desiredlang in $desiredlanguages; do - # Use the presentlang catalog if desiredlang is - # a. equal to presentlang, or - # b. a variant of presentlang (because in this case, - # presentlang can be used as a fallback for messages - # which are not translated in the desiredlang catalog). - case "$desiredlang" in - "$presentlang"*) useit=yes;; - esac - done - if test $useit = yes; then - INST_LINGUAS="$INST_LINGUAS $presentlang" - fi - done - fi - CATALOGS= - if test -n "$INST_LINGUAS"; then - for lang in $INST_LINGUAS; do - CATALOGS="$CATALOGS $lang.gmo" - done - fi - test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" - sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" - for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do - if test -f "$f"; then - case "$f" in - *.orig | *.bak | *~) ;; - *) cat "$f" >> "$ac_dir/Makefile" ;; - esac - fi - done - fi - ;; - esac - done]], - [# Capture the value of obsolete ALL_LINGUAS because we need it to compute - # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it - # from automake < 1.5. - eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' - # Capture the value of LINGUAS because we need it to compute CATALOGS. - LINGUAS="${LINGUAS-%UNSET%}" - ]) -]) - -dnl Postprocesses a Makefile in a directory containing PO files. -AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE], -[ - # When this code is run, in config.status, two variables have already been - # set: - # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in, - # - LINGUAS is the value of the environment variable LINGUAS at configure - # time. - -changequote(,)dnl - # Adjust a relative srcdir. - ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` - ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'` - ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` - # In autoconf-2.13 it is called $ac_given_srcdir. - # In autoconf-2.50 it is called $srcdir. - test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" - case "$ac_given_srcdir" in - .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; - /*) top_srcdir="$ac_given_srcdir" ;; - *) top_srcdir="$ac_dots$ac_given_srcdir" ;; - esac - - # Find a way to echo strings without interpreting backslash. - if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then - gt_echo='echo' - else - if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then - gt_echo='printf %s\n' - else - echo_func () { - cat < "$ac_file.tmp" - tab=`printf '\t'` - if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then - # Add dependencies that cannot be formulated as a simple suffix rule. - for lang in $ALL_LINGUAS; do - frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` - cat >> "$ac_file.tmp" < /dev/null; then - # Add dependencies that cannot be formulated as a simple suffix rule. - for lang in $ALL_LINGUAS; do - frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'` - cat >> "$ac_file.tmp" <> "$ac_file.tmp" <&AS_MESSAGE_LOG_FD + ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + (exit $ac_status); }]) + # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996-2017 Free Software Foundation, Inc. @@ -1653,15 +1276,14 @@ AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([import/m4/00gnulib.m4]) -m4_include([import/m4/__inline.m4]) m4_include([import/m4/absolute-header.m4]) m4_include([import/m4/alloca.m4]) -m4_include([import/m4/builtin-expect.m4]) m4_include([import/m4/canonicalize.m4]) m4_include([import/m4/chdir-long.m4]) m4_include([import/m4/close.m4]) m4_include([import/m4/closedir.m4]) m4_include([import/m4/codeset.m4]) +m4_include([import/m4/configmake.m4]) m4_include([import/m4/d-ino.m4]) m4_include([import/m4/d-type.m4]) m4_include([import/m4/dirent_h.m4]) @@ -1687,7 +1309,6 @@ m4_include([import/m4/filenamecat.m4]) m4_include([import/m4/flexmember.m4]) m4_include([import/m4/float_h.m4]) m4_include([import/m4/fnmatch.m4]) -m4_include([import/m4/fnmatch_h.m4]) m4_include([import/m4/fpieee.m4]) m4_include([import/m4/frexp.m4]) m4_include([import/m4/frexpl.m4]) @@ -1697,15 +1318,14 @@ m4_include([import/m4/getcwd-abort-bug.m4]) m4_include([import/m4/getcwd-path-max.m4]) m4_include([import/m4/getcwd.m4]) m4_include([import/m4/getdtablesize.m4]) -m4_include([import/m4/getlogin.m4]) m4_include([import/m4/getlogin_r.m4]) -m4_include([import/m4/getpagesize.m4]) m4_include([import/m4/getprogname.m4]) m4_include([import/m4/gettimeofday.m4]) +m4_include([import/m4/glibc21.m4]) m4_include([import/m4/glob.m4]) -m4_include([import/m4/glob_h.m4]) m4_include([import/m4/gnulib-common.m4]) m4_include([import/m4/gnulib-comp.m4]) +m4_include([import/m4/hard-locale.m4]) m4_include([import/m4/include_next.m4]) m4_include([import/m4/inttypes-pri.m4]) m4_include([import/m4/inttypes.m4]) @@ -1717,7 +1337,6 @@ m4_include([import/m4/localcharset.m4]) m4_include([import/m4/locale-fr.m4]) m4_include([import/m4/locale-ja.m4]) m4_include([import/m4/locale-zh.m4]) -m4_include([import/m4/localtime-buffer.m4]) m4_include([import/m4/longlong.m4]) m4_include([import/m4/lstat.m4]) m4_include([import/m4/malloc.m4]) @@ -1741,7 +1360,6 @@ m4_include([import/m4/multiarch.m4]) m4_include([import/m4/nocrash.m4]) m4_include([import/m4/off_t.m4]) m4_include([import/m4/onceonly.m4]) -m4_include([import/m4/open-cloexec.m4]) m4_include([import/m4/open.m4]) m4_include([import/m4/openat.m4]) m4_include([import/m4/opendir.m4]) @@ -1754,12 +1372,11 @@ m4_include([import/m4/rename.m4]) m4_include([import/m4/rewinddir.m4]) m4_include([import/m4/rmdir.m4]) m4_include([import/m4/save-cwd.m4]) +m4_include([import/m4/secure_getenv.m4]) m4_include([import/m4/setenv.m4]) m4_include([import/m4/signal_h.m4]) m4_include([import/m4/ssize_t.m4]) -m4_include([import/m4/stat-time.m4]) m4_include([import/m4/stat.m4]) -m4_include([import/m4/std-gnu11.m4]) m4_include([import/m4/stdbool.m4]) m4_include([import/m4/stddef_h.m4]) m4_include([import/m4/stdint.m4]) diff --git a/gdb/gnulib/config.in b/gdb/gnulib/config.in index c26d932bc44..41351ea55f8 100644 --- a/gdb/gnulib/config.in +++ b/gdb/gnulib/config.in @@ -87,14 +87,6 @@ whether the gnulib module fdopendir shall be considered present. */ #undef GNULIB_FDOPENDIR -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module fd-safer-flag shall be considered present. */ -#undef GNULIB_FD_SAFER_FLAG - -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module fnmatch-gnu shall be considered present. */ -#undef GNULIB_FNMATCH_GNU - /* Define to a C preprocessor expression that evaluates to 1 or 0, depending whether the gnulib module fscanf shall be considered present. */ #undef GNULIB_FSCANF @@ -103,10 +95,6 @@ whether the gnulib module getcwd shall be considered present. */ #undef GNULIB_GETCWD -/* Define to a C preprocessor expression that evaluates to 1 or 0, depending - whether the gnulib module msvc-nothrow shall be considered present. */ -#undef GNULIB_MSVC_NOTHROW - /* Define to a C preprocessor expression that evaluates to 1 or 0, depending whether the gnulib module openat shall be considered present. */ #undef GNULIB_OPENAT @@ -160,9 +148,6 @@ /* Define to 1 when the gnulib module fdopendir should be tested. */ #undef GNULIB_TEST_FDOPENDIR -/* Define to 1 when the gnulib module fnmatch should be tested. */ -#undef GNULIB_TEST_FNMATCH - /* Define to 1 when the gnulib module frexp should be tested. */ #undef GNULIB_TEST_FREXP @@ -187,9 +172,6 @@ /* Define to 1 when the gnulib module gettimeofday should be tested. */ #undef GNULIB_TEST_GETTIMEOFDAY -/* Define to 1 when the gnulib module glob should be tested. */ -#undef GNULIB_TEST_GLOB - /* Define to 1 when the gnulib module lstat should be tested. */ #undef GNULIB_TEST_LSTAT @@ -253,6 +235,9 @@ /* Define to 1 when the gnulib module rmdir should be tested. */ #undef GNULIB_TEST_RMDIR +/* Define to 1 when the gnulib module secure_getenv should be tested. */ +#undef GNULIB_TEST_SECURE_GETENV + /* Define to 1 when the gnulib module setenv should be tested. */ #undef GNULIB_TEST_SETENV @@ -297,9 +282,6 @@ /* Define to 1 if you have the `closedir' function. */ #undef HAVE_CLOSEDIR -/* Define to 1 if you have the header file. */ -#undef HAVE_CRTDEFS_H - /* Define to 1 if you have the declaration of `alarm', and to 0 if you don't. */ #undef HAVE_DECL_ALARM @@ -320,6 +302,10 @@ */ #undef HAVE_DECL_GETCWD +/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you + don't. */ +#undef HAVE_DECL_GETC_UNLOCKED + /* Define to 1 if you have the declaration of `getdtablesize', and to 0 if you don't. */ #undef HAVE_DECL_GETDTABLESIZE @@ -416,12 +402,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_FEATURES_H -/* Define to 1 if you have the 'fnmatch' function. */ -#undef HAVE_FNMATCH - -/* Define to 1 if you have the header file. */ -#undef HAVE_FNMATCH_H - /* Define if the frexp() function is available and works. */ #undef HAVE_FREXP @@ -441,13 +421,22 @@ /* Define to 1 if you have the 'getdtablesize' function. */ #undef HAVE_GETDTABLESIZE +/* Define to 1 if you have the 'getegid' function. */ +#undef HAVE_GETEGID + +/* Define to 1 if you have the 'geteuid' function. */ +#undef HAVE_GETEUID + /* Define to 1 if you have the 'getexecname' function. */ #undef HAVE_GETEXECNAME +/* Define to 1 if you have the 'getgid' function. */ +#undef HAVE_GETGID + /* Define to 1 if you have the 'getlogin_r' function. */ #undef HAVE_GETLOGIN_R -/* Define to 1 if the system has the 'getpagesize' function. */ +/* Define to 1 if you have the `getpagesize' function. */ #undef HAVE_GETPAGESIZE /* Define to 1 if you have the 'getprogname' function. */ @@ -459,15 +448,12 @@ /* Define to 1 if you have the 'gettimeofday' function. */ #undef HAVE_GETTIMEOFDAY -/* Define to 1 if you have the 'glob' function. */ -#undef HAVE_GLOB +/* Define to 1 if you have the 'getuid' function. */ +#undef HAVE_GETUID /* Define to 1 if you have the header file. */ #undef HAVE_GLOB_H -/* Define to 1 if you have the 'glob_pattern_p' function. */ -#undef HAVE_GLOB_PATTERN_P - /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H @@ -480,6 +466,9 @@ /* Define if the isnan(long double) function is available in libc. */ #undef HAVE_ISNANL_IN_LIBC +/* Define to 1 if you have the `issetugid' function. */ +#undef HAVE_ISSETUGID + /* Define to 1 if you have the 'iswcntrl' function. */ #undef HAVE_ISWCNTRL @@ -565,6 +554,829 @@ /* Define to 1 if you have the `rawmemchr' function. */ #undef HAVE_RAWMEMCHR +/* Define to 1 if acosf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_ACOSF + +/* Define to 1 if acosl is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_ACOSL + +/* Define to 1 if alphasort is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_ALPHASORT + +/* Define to 1 if asinf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_ASINF + +/* Define to 1 if asinl is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_ASINL + +/* Define to 1 if atanf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_ATANF + +/* Define to 1 if atanl is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_ATANL + +/* Define to 1 if atoll is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_ATOLL + +/* Define to 1 if btowc is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_BTOWC + +/* Define to 1 if canonicalize_file_name is declared even after undefining + macros. */ +#undef HAVE_RAW_DECL_CANONICALIZE_FILE_NAME + +/* Define to 1 if cbrt is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_CBRT + +/* Define to 1 if cbrtf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_CBRTF + +/* Define to 1 if cbrtl is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_CBRTL + +/* Define to 1 if ceilf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_CEILF + +/* Define to 1 if ceill is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_CEILL + +/* Define to 1 if chdir is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_CHDIR + +/* Define to 1 if chown is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_CHOWN + +/* Define to 1 if closedir is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_CLOSEDIR + +/* Define to 1 if copysign is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_COPYSIGN + +/* Define to 1 if copysignf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_COPYSIGNF + +/* Define to 1 if copysignl is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_COPYSIGNL + +/* Define to 1 if cosf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_COSF + +/* Define to 1 if coshf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_COSHF + +/* Define to 1 if cosl is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_COSL + +/* Define to 1 if dirfd is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_DIRFD + +/* Define to 1 if dprintf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_DPRINTF + +/* Define to 1 if dup is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_DUP + +/* Define to 1 if dup2 is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_DUP2 + +/* Define to 1 if dup3 is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_DUP3 + +/* Define to 1 if endusershell is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_ENDUSERSHELL + +/* Define to 1 if environ is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_ENVIRON + +/* Define to 1 if euidaccess is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_EUIDACCESS + +/* Define to 1 if exp2 is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_EXP2 + +/* Define to 1 if exp2f is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_EXP2F + +/* Define to 1 if exp2l is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_EXP2L + +/* Define to 1 if expf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_EXPF + +/* Define to 1 if expl is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_EXPL + +/* Define to 1 if expm1 is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_EXPM1 + +/* Define to 1 if expm1f is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_EXPM1F + +/* Define to 1 if expm1l is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_EXPM1L + +/* Define to 1 if fabsf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_FABSF + +/* Define to 1 if fabsl is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_FABSL + +/* Define to 1 if faccessat is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_FACCESSAT + +/* Define to 1 if fchdir is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_FCHDIR + +/* Define to 1 if fchmodat is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_FCHMODAT + +/* Define to 1 if fchownat is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_FCHOWNAT + +/* Define to 1 if fcntl is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_FCNTL + +/* Define to 1 if fdatasync is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_FDATASYNC + +/* Define to 1 if fdopendir is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_FDOPENDIR + +/* Define to 1 if ffsl is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_FFSL + +/* Define to 1 if ffsll is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_FFSLL + +/* Define to 1 if floorf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_FLOORF + +/* Define to 1 if floorl is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_FLOORL + +/* Define to 1 if fma is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_FMA + +/* Define to 1 if fmaf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_FMAF + +/* Define to 1 if fmal is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_FMAL + +/* Define to 1 if fmod is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_FMOD + +/* Define to 1 if fmodf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_FMODF + +/* Define to 1 if fmodl is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_FMODL + +/* Define to 1 if fpurge is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_FPURGE + +/* Define to 1 if frexpf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_FREXPF + +/* Define to 1 if frexpl is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_FREXPL + +/* Define to 1 if fseeko is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_FSEEKO + +/* Define to 1 if fstat is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_FSTAT + +/* Define to 1 if fstatat is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_FSTATAT + +/* Define to 1 if fsync is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_FSYNC + +/* Define to 1 if ftello is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_FTELLO + +/* Define to 1 if ftruncate is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_FTRUNCATE + +/* Define to 1 if futimens is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_FUTIMENS + +/* Define to 1 if getcwd is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_GETCWD + +/* Define to 1 if getdelim is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_GETDELIM + +/* Define to 1 if getdomainname is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_GETDOMAINNAME + +/* Define to 1 if getdtablesize is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_GETDTABLESIZE + +/* Define to 1 if getgroups is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_GETGROUPS + +/* Define to 1 if gethostname is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_GETHOSTNAME + +/* Define to 1 if getline is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_GETLINE + +/* Define to 1 if getloadavg is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_GETLOADAVG + +/* Define to 1 if getlogin is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_GETLOGIN + +/* Define to 1 if getlogin_r is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_GETLOGIN_R + +/* Define to 1 if getpagesize is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_GETPAGESIZE + +/* Define to 1 if gets is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_GETS + +/* 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 + +/* Define to 1 if grantpt is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_GRANTPT + +/* Define to 1 if group_member is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_GROUP_MEMBER + +/* Define to 1 if hypotf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_HYPOTF + +/* Define to 1 if hypotl is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_HYPOTL + +/* Define to 1 if ilogb is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_ILOGB + +/* Define to 1 if ilogbf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_ILOGBF + +/* Define to 1 if ilogbl is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_ILOGBL + +/* Define to 1 if imaxabs is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_IMAXABS + +/* Define to 1 if imaxdiv is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_IMAXDIV + +/* Define to 1 if initstate is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_INITSTATE + +/* Define to 1 if initstate_r is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_INITSTATE_R + +/* Define to 1 if isatty is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_ISATTY + +/* Define to 1 if iswctype is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_ISWCTYPE + +/* Define to 1 if lchmod is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_LCHMOD + +/* Define to 1 if lchown is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_LCHOWN + +/* Define to 1 if ldexpf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_LDEXPF + +/* Define to 1 if ldexpl is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_LDEXPL + +/* Define to 1 if link is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_LINK + +/* Define to 1 if linkat is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_LINKAT + +/* Define to 1 if log is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_LOG + +/* Define to 1 if log10 is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_LOG10 + +/* Define to 1 if log10f is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_LOG10F + +/* Define to 1 if log10l is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_LOG10L + +/* Define to 1 if log1p is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_LOG1P + +/* Define to 1 if log1pf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_LOG1PF + +/* Define to 1 if log1pl is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_LOG1PL + +/* Define to 1 if log2 is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_LOG2 + +/* Define to 1 if log2f is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_LOG2F + +/* Define to 1 if log2l is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_LOG2L + +/* Define to 1 if logb is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_LOGB + +/* Define to 1 if logbf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_LOGBF + +/* Define to 1 if logbl is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_LOGBL + +/* Define to 1 if logf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_LOGF + +/* Define to 1 if logl is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_LOGL + +/* Define to 1 if lseek is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_LSEEK + +/* Define to 1 if lstat is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_LSTAT + +/* Define to 1 if mbrlen is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_MBRLEN + +/* Define to 1 if mbrtowc is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_MBRTOWC + +/* Define to 1 if mbsinit is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_MBSINIT + +/* Define to 1 if mbsnrtowcs is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_MBSNRTOWCS + +/* Define to 1 if mbsrtowcs is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_MBSRTOWCS + +/* Define to 1 if memmem is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_MEMMEM + +/* Define to 1 if mempcpy is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_MEMPCPY + +/* Define to 1 if memrchr is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_MEMRCHR + +/* Define to 1 if mkdirat is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_MKDIRAT + +/* Define to 1 if mkdtemp is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_MKDTEMP + +/* Define to 1 if mkfifo is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_MKFIFO + +/* Define to 1 if mkfifoat is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_MKFIFOAT + +/* Define to 1 if mknod is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_MKNOD + +/* Define to 1 if mknodat is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_MKNODAT + +/* Define to 1 if mkostemp is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_MKOSTEMP + +/* Define to 1 if mkostemps is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_MKOSTEMPS + +/* Define to 1 if mkstemp is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_MKSTEMP + +/* Define to 1 if mkstemps is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_MKSTEMPS + +/* Define to 1 if modf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_MODF + +/* Define to 1 if modff is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_MODFF + +/* Define to 1 if modfl is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_MODFL + +/* Define to 1 if openat is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_OPENAT + +/* Define to 1 if opendir is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_OPENDIR + +/* Define to 1 if pclose is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_PCLOSE + +/* Define to 1 if pipe is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_PIPE + +/* Define to 1 if pipe2 is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_PIPE2 + +/* Define to 1 if popen is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_POPEN + +/* Define to 1 if posix_openpt is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_POSIX_OPENPT + +/* Define to 1 if powf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_POWF + +/* Define to 1 if pread is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_PREAD + +/* Define to 1 if pthread_sigmask is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_PTHREAD_SIGMASK + +/* Define to 1 if ptsname is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_PTSNAME + +/* Define to 1 if ptsname_r is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_PTSNAME_R + +/* Define to 1 if pwrite is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_PWRITE + +/* Define to 1 if qsort_r is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_QSORT_R + +/* Define to 1 if random is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_RANDOM + +/* Define to 1 if random_r is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_RANDOM_R + +/* Define to 1 if rawmemchr is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_RAWMEMCHR + +/* Define to 1 if readdir is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_READDIR + +/* Define to 1 if readlink is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_READLINK + +/* Define to 1 if readlinkat is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_READLINKAT + +/* Define to 1 if realpath is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_REALPATH + +/* Define to 1 if remainder is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_REMAINDER + +/* Define to 1 if remainderf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_REMAINDERF + +/* Define to 1 if remainderl is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_REMAINDERL + +/* Define to 1 if renameat is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_RENAMEAT + +/* Define to 1 if rewinddir is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_REWINDDIR + +/* Define to 1 if rint is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_RINT + +/* Define to 1 if rintf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_RINTF + +/* Define to 1 if rintl is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_RINTL + +/* Define to 1 if rmdir is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_RMDIR + +/* Define to 1 if round is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_ROUND + +/* Define to 1 if roundf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_ROUNDF + +/* Define to 1 if roundl is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_ROUNDL + +/* Define to 1 if rpmatch is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_RPMATCH + +/* 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 + +/* Define to 1 if sethostname is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_SETHOSTNAME + +/* Define to 1 if setstate is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_SETSTATE + +/* Define to 1 if setstate_r is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_SETSTATE_R + +/* Define to 1 if setusershell is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_SETUSERSHELL + +/* Define to 1 if sigaction is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_SIGACTION + +/* Define to 1 if sigaddset is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_SIGADDSET + +/* Define to 1 if sigdelset is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_SIGDELSET + +/* Define to 1 if sigemptyset is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_SIGEMPTYSET + +/* Define to 1 if sigfillset is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_SIGFILLSET + +/* Define to 1 if sigismember is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_SIGISMEMBER + +/* Define to 1 if sigpending is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_SIGPENDING + +/* Define to 1 if sigprocmask is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_SIGPROCMASK + +/* Define to 1 if sinf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_SINF + +/* Define to 1 if sinhf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_SINHF + +/* Define to 1 if sinl is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_SINL + +/* Define to 1 if sleep is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_SLEEP + +/* Define to 1 if snprintf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_SNPRINTF + +/* Define to 1 if sqrtf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_SQRTF + +/* Define to 1 if sqrtl is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_SQRTL + +/* Define to 1 if srandom is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_SRANDOM + +/* Define to 1 if srandom_r is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_SRANDOM_R + +/* Define to 1 if stat is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_STAT + +/* Define to 1 if stpcpy is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_STPCPY + +/* Define to 1 if stpncpy is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_STPNCPY + +/* Define to 1 if strcasestr is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_STRCASESTR + +/* Define to 1 if strchrnul is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_STRCHRNUL + +/* Define to 1 if strdup is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_STRDUP + +/* Define to 1 if strerror_r is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_STRERROR_R + +/* Define to 1 if strncat is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_STRNCAT + +/* Define to 1 if strndup is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_STRNDUP + +/* Define to 1 if strnlen is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_STRNLEN + +/* Define to 1 if strpbrk is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_STRPBRK + +/* Define to 1 if strsep is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_STRSEP + +/* Define to 1 if strsignal is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_STRSIGNAL + +/* Define to 1 if strtod is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_STRTOD + +/* Define to 1 if strtoimax is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_STRTOIMAX + +/* Define to 1 if strtok_r is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_STRTOK_R + +/* Define to 1 if strtoll is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_STRTOLL + +/* Define to 1 if strtoull is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_STRTOULL + +/* Define to 1 if strtoumax is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_STRTOUMAX + +/* Define to 1 if strverscmp is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_STRVERSCMP + +/* Define to 1 if symlink is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_SYMLINK + +/* Define to 1 if symlinkat is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_SYMLINKAT + +/* Define to 1 if tanf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_TANF + +/* Define to 1 if tanhf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_TANHF + +/* Define to 1 if tanl is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_TANL + +/* Define to 1 if tmpfile is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_TMPFILE + +/* Define to 1 if towctrans is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_TOWCTRANS + +/* Define to 1 if trunc is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_TRUNC + +/* Define to 1 if truncf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_TRUNCF + +/* Define to 1 if truncl is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_TRUNCL + +/* Define to 1 if ttyname_r is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_TTYNAME_R + +/* Define to 1 if unlink is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_UNLINK + +/* Define to 1 if unlinkat is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_UNLINKAT + +/* Define to 1 if unlockpt is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_UNLOCKPT + +/* Define to 1 if unsetenv is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_UNSETENV + +/* Define to 1 if usleep is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_USLEEP + +/* Define to 1 if utimensat is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_UTIMENSAT + +/* Define to 1 if vdprintf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_VDPRINTF + +/* Define to 1 if vsnprintf is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_VSNPRINTF + +/* Define to 1 if wcpcpy is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_WCPCPY + +/* Define to 1 if wcpncpy is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_WCPNCPY + +/* Define to 1 if wcrtomb is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_WCRTOMB + +/* Define to 1 if wcscasecmp is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_WCSCASECMP + +/* Define to 1 if wcscat is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_WCSCAT + +/* Define to 1 if wcschr is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_WCSCHR + +/* Define to 1 if wcscmp is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_WCSCMP + +/* Define to 1 if wcscoll is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_WCSCOLL + +/* Define to 1 if wcscpy is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_WCSCPY + +/* Define to 1 if wcscspn is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_WCSCSPN + +/* Define to 1 if wcsdup is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_WCSDUP + +/* Define to 1 if wcslen is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_WCSLEN + +/* Define to 1 if wcsncasecmp is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_WCSNCASECMP + +/* Define to 1 if wcsncat is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_WCSNCAT + +/* Define to 1 if wcsncmp is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_WCSNCMP + +/* Define to 1 if wcsncpy is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_WCSNCPY + +/* Define to 1 if wcsnlen is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_WCSNLEN + +/* Define to 1 if wcsnrtombs is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_WCSNRTOMBS + +/* Define to 1 if wcspbrk is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_WCSPBRK + +/* Define to 1 if wcsrchr is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_WCSRCHR + +/* Define to 1 if wcsrtombs is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_WCSRTOMBS + +/* Define to 1 if wcsspn is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_WCSSPN + +/* Define to 1 if wcsstr is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_WCSSTR + +/* Define to 1 if wcstok is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_WCSTOK + +/* Define to 1 if wcswidth is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_WCSWIDTH + +/* Define to 1 if wcsxfrm is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_WCSXFRM + +/* Define to 1 if wctob is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_WCTOB + +/* Define to 1 if wctrans is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_WCTRANS + +/* Define to 1 if wctype is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_WCTYPE + +/* Define to 1 if wcwidth is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_WCWIDTH + +/* Define to 1 if wmemchr is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_WMEMCHR + +/* Define to 1 if wmemcmp is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_WMEMCMP + +/* Define to 1 if wmemcpy is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_WMEMCPY + +/* Define to 1 if wmemmove is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_WMEMMOVE + +/* Define to 1 if wmemset is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_WMEMSET + +/* Define to 1 if _Exit is declared even after undefining macros. */ +#undef HAVE_RAW_DECL__EXIT + /* Define to 1 if you have the `readdir' function. */ #undef HAVE_READDIR @@ -586,6 +1398,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SEARCH_H +/* Define to 1 if you have the 'secure_getenv' function. */ +#undef HAVE_SECURE_GETENV + /* Define to 1 if you have the `setdtablesize' function. */ #undef HAVE_SETDTABLESIZE @@ -632,33 +1447,15 @@ headers. */ #undef HAVE_STRUCT_DIRENT_D_TYPE -/* Define to 1 if `st_atimensec' is a member of `struct stat'. */ -#undef HAVE_STRUCT_STAT_ST_ATIMENSEC - -/* Define to 1 if `st_atimespec.tv_nsec' is a member of `struct stat'. */ -#undef HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC - -/* Define to 1 if `st_atim.st__tim.tv_nsec' is a member of `struct stat'. */ -#undef HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC - -/* Define to 1 if `st_atim.tv_nsec' is a member of `struct stat'. */ -#undef HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC - -/* Define to 1 if `st_birthtimensec' is a member of `struct stat'. */ -#undef HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC - -/* Define to 1 if `st_birthtimespec.tv_nsec' is a member of `struct stat'. */ -#undef HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC - -/* Define to 1 if `st_birthtim.tv_nsec' is a member of `struct stat'. */ -#undef HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC - /* Define to 1 if you have the 'symlink' function. */ #undef HAVE_SYMLINK /* Define to 1 if you have the header file. */ #undef HAVE_SYS_BITYPES_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_CDEFS_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_INTTYPES_H @@ -674,6 +1471,9 @@ /* 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 @@ -735,21 +1535,14 @@ /* 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 to 1 if you have the '_set_invalid_parameter_handler' function. */ #undef HAVE__SET_INVALID_PARAMETER_HANDLER -/* Define to 1 if the compiler supports __builtin_expect, - and to 2 if does. */ -#undef HAVE___BUILTIN_EXPECT -#ifndef HAVE___BUILTIN_EXPECT -# define __builtin_expect(e, c) (e) -#elif HAVE___BUILTIN_EXPECT == 2 -# include -#endif - - -/* Define to 1 if the compiler supports the keyword '__inline'. */ -#undef HAVE___INLINE +/* Define to 1 if you have the `__secure_getenv' function. */ +#undef HAVE___SECURE_GETENV /* Define as the bit index in the word where to find bit 0 of the exponent of 'long double'. */ @@ -834,7 +1627,7 @@ #undef RENAME_HARD_LINK_BUG /* Define if rename does not correctly handle slashes on the destination - argument, such as on Solaris 11 or NetBSD 1.6. */ + argument, such as on Solaris 10 or NetBSD 1.6. */ #undef RENAME_TRAILING_SLASH_DEST_BUG /* Define if rename does not correctly handle slashes on the source argument, @@ -847,6 +1640,10 @@ /* Define to 1 if gnulib's fchdir() replacement is used. */ #undef REPLACE_FCHDIR +/* Define to 1 if stat needs help when passed a directory name with a trailing + slash */ +#undef REPLACE_FUNC_STAT_DIR + /* Define to 1 if stat needs help when passed a file name with a trailing slash */ #undef REPLACE_FUNC_STAT_FILE @@ -883,10 +1680,6 @@ /* Define to 1 if strerror_r returns char *. */ #undef STRERROR_R_CHAR_P -/* Define to 1 if the type of the st_atim member of a struct stat is struct - timespec. */ -#undef TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC - /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE @@ -899,14 +1692,6 @@ #ifndef _GNU_SOURCE # undef _GNU_SOURCE #endif -/* Enable NetBSD extensions on NetBSD. */ -#ifndef _NETBSD_SOURCE -# undef _NETBSD_SOURCE -#endif -/* Enable OpenBSD extensions on NetBSD. */ -#ifndef _OPENBSD_SOURCE -# undef _OPENBSD_SOURCE -#endif /* Enable threading extensions on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS @@ -949,11 +1734,6 @@ #ifndef _XOPEN_SOURCE # undef _XOPEN_SOURCE #endif -/* Enable X/Open compliant socket functions that do not require linking - with -lxnet on HP-UX 11.11. */ -#ifndef _HPUX_ALT_XOPEN_SOCKET_API -# undef _HPUX_ALT_XOPEN_SOCKET_API -#endif /* Enable general extensions on Solaris. */ #ifndef __EXTENSIONS__ # undef __EXTENSIONS__ @@ -989,6 +1769,10 @@ /* Number of bits in a file offset, on hosts where this is settable. */ #undef _FILE_OFFSET_BITS +/* Define to 1 if Gnulib overrides 'struct stat' on Windows so that struct + stat.st_size becomes 64-bit. */ +#undef _GL_WINDOWS_64_BIT_ST_SIZE + /* Define for large files, on AIX-style hosts. */ #undef _LARGE_FILES @@ -1019,9 +1803,6 @@ /* Define to 1 if you need to in order for 'stat' and other things to work. */ #undef _POSIX_SOURCE -/* For standard stat data types on VMS. */ -#undef _USE_STD_STAT - /* Define to 1 if the system predates C++11. */ #undef __STDC_CONSTANT_MACROS @@ -1031,7 +1812,7 @@ /* 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 @@ -1045,32 +1826,20 @@ 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 (ISO C 99 section 6.7.4.(3). - This bug is known to occur on: + from calling static functions. This bug is known to occur on: OS X 10.8 and earlier; see: - https://lists.gnu.org/r/bug-gnulib/2012-12/msg00023.html + 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: - https://lists.gnu.org/r/bug-gnulib/2014-07/msg00104.html + 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. - - GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 - inline semantics, unless -fgnu89-inline is used. It defines a macro - __GNUC_STDC_INLINE__ to indicate this situation or a macro - __GNUC_GNU_INLINE__ to indicate the opposite situation. - GCC 4.2 with -std=c99 or -std=gnu99 implements the GNU C inline - semantics but warns, unless -fgnu89-inline is used: - warning: C99 inline functions are not supported; using GNU89 - warning: to disable this warning use -fgnu89-inline or the gnu_inline function attribute - It defines a macro __GNUC_GNU_INLINE__ to indicate this situation. - */ + 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 \ @@ -1132,15 +1901,12 @@ # define _GL_INLINE_HEADER_END #endif +/* Define to a replacement function name for fnmatch(). */ +#undef fnmatch + /* Define to `int' if doesn't define. */ #undef gid_t -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -#undef inline -#endif - /* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of earlier versions), but does not display it by setting __GNUC_STDC_INLINE__. @@ -1222,10 +1988,3 @@ # define _GL_ATTRIBUTE_CONST /* empty */ #endif -/* The __malloc__ attribute was added in gcc 3. */ -#if 3 <= __GNUC__ -# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) -#else -# define _GL_ATTRIBUTE_MALLOC /* empty */ -#endif - diff --git a/gdb/gnulib/configure b/gdb/gnulib/configure index 525f19f5b03..8c3027635f5 100644 --- a/gdb/gnulib/configure +++ b/gdb/gnulib/configure @@ -685,7 +685,6 @@ GNULIB_WCTRANS GNULIB_ISWCTYPE GNULIB_WCTYPE GNULIB_ISWBLANK -HAVE_CRTDEFS_H HAVE_WINT_T HAVE_FEATURES_H NEXT_AS_FIRST_DIRECTIVE_WCHAR_H @@ -699,7 +698,22 @@ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC TIME_H_DEFINES_STRUCT_TIMESPEC NEXT_AS_FIRST_DIRECTIVE_TIME_H NEXT_TIME_H -WINDOWS_STAT_INODES +REPLACE_LOCALTIME +REPLACE_GMTIME +REPLACE_TIMEGM +REPLACE_NANOSLEEP +REPLACE_MKTIME +REPLACE_LOCALTIME_R +HAVE_TIMEGM +HAVE_STRPTIME +HAVE_NANOSLEEP +HAVE_DECL_LOCALTIME_R +GNULIB_TIME_RZ +GNULIB_TIME_R +GNULIB_TIMEGM +GNULIB_STRPTIME +GNULIB_NANOSLEEP +GNULIB_MKTIME WINDOWS_64_BIT_OFF_T NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H NEXT_SYS_TYPES_H @@ -842,17 +856,17 @@ GNULIB_FDOPEN GNULIB_FCLOSE GNULIB_DPRINTF UNDEFINE_STRTOK_R +REPLACE_STRTOK_R REPLACE_STRSIGNAL +REPLACE_STRNLEN +REPLACE_STRNDUP +REPLACE_STRNCAT REPLACE_STRERROR_R REPLACE_STRERROR -REPLACE_STRTOK_R +REPLACE_STRCHRNUL REPLACE_STRCASESTR REPLACE_STRSTR -REPLACE_STRNLEN -REPLACE_STRNDUP -REPLACE_STRNCAT REPLACE_STRDUP -REPLACE_STRCHRNUL REPLACE_STPNCPY REPLACE_MEMMEM REPLACE_MEMCHR @@ -876,7 +890,6 @@ HAVE_DECL_MEMMEM HAVE_MEMCHR HAVE_FFSLL HAVE_FFSL -HAVE_EXPLICIT_BZERO HAVE_MBSLEN GNULIB_STRVERSCMP GNULIB_STRSIGNAL @@ -915,12 +928,10 @@ GNULIB_MEMMEM GNULIB_MEMCHR GNULIB_FFSLL GNULIB_FFSL -GNULIB_EXPLICIT_BZERO LOCALE_FR LOCALE_FR_UTF8 LOCALE_ZH_CN LOCALE_JA -REPLACE_WCSFTIME REPLACE_WCSWIDTH REPLACE_WCWIDTH REPLACE_WCSNRTOMBS @@ -936,7 +947,6 @@ REPLACE_BTOWC REPLACE_MBSTATE_T HAVE_DECL_WCWIDTH HAVE_DECL_WCTOB -HAVE_WCSFTIME HAVE_WCSWIDTH HAVE_WCSTOK HAVE_WCSSTR @@ -974,7 +984,6 @@ HAVE_MBRLEN HAVE_MBRTOWC HAVE_MBSINIT HAVE_BTOWC -GNULIB_WCSFTIME GNULIB_WCSWIDTH GNULIB_WCSTOK GNULIB_WCSSTR @@ -1017,6 +1026,7 @@ GNULIB_BTOWC NEXT_AS_FIRST_DIRECTIVE_MATH_H NEXT_MATH_H LOCALCHARSET_TESTS_ENVIRONMENT +GLIBC21 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H NEXT_INTTYPES_H UINT64_MAX_EQ_ULONG_MAX @@ -1027,7 +1037,6 @@ INT64_MAX_EQ_LONG_MAX INT32_MAX_LT_INTMAX_MAX REPLACE_STRTOUMAX REPLACE_STRTOIMAX -HAVE_IMAXDIV_T HAVE_DECL_STRTOUMAX HAVE_DECL_STRTOIMAX HAVE_DECL_IMAXDIV @@ -1064,61 +1073,27 @@ HAVE_INTTYPES_H HAVE_WCHAR_H HAVE_UNSIGNED_LONG_LONG_INT HAVE_LONG_LONG_INT -GNULIB_OVERRIDES_WINT_T GL_GENERATE_LIMITS_H_FALSE GL_GENERATE_LIMITS_H_TRUE LIMITS_H NEXT_AS_FIRST_DIRECTIVE_LIMITS_H NEXT_LIMITS_H +HAVE_SYS_CDEFS_H GL_GENERATE_GLOB_H_FALSE GL_GENERATE_GLOB_H_TRUE GLOB_H -HAVE_GLOB_H -NEXT_AS_FIRST_DIRECTIVE_GLOB_H -NEXT_GLOB_H -REPLACE_GLOB_PATTERN_P -REPLACE_GLOB -HAVE_GLOB_PATTERN_P -HAVE_GLOB -GNULIB_GLOB -REPLACE_LOCALTIME -REPLACE_GMTIME -REPLACE_TZSET -REPLACE_TIMEGM -REPLACE_STRFTIME -REPLACE_NANOSLEEP -REPLACE_MKTIME -REPLACE_LOCALTIME_R -REPLACE_CTIME -HAVE_TIMEZONE_T -HAVE_TZSET -HAVE_TIMEGM -HAVE_STRPTIME -HAVE_NANOSLEEP -HAVE_DECL_LOCALTIME_R -GNULIB_TZSET -GNULIB_TIME_RZ -GNULIB_TIME_R -GNULIB_TIMEGM -GNULIB_STRPTIME -GNULIB_STRFTIME -GNULIB_NANOSLEEP -GNULIB_LOCALTIME -GNULIB_MKTIME -GNULIB_CTIME 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 LTLIBINTL LIBINTL -LIB_GETLOGIN WINDOWS_64_BIT_ST_SIZE -WINDOWS_STAT_TIMESPEC NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H NEXT_SYS_STAT_H REPLACE_UTIMENSAT @@ -1141,7 +1116,6 @@ HAVE_LCHMOD HAVE_FUTIMENS HAVE_FSTATAT HAVE_FCHMODAT -GNULIB_OVERRIDES_STRUCT_STAT GNULIB_UTIMENSAT GNULIB_STAT GNULIB_MKNODAT @@ -1161,12 +1135,7 @@ FREXP_LIBM REPLACE_TRUNCL REPLACE_TRUNCF REPLACE_TRUNC -REPLACE_TANHF -REPLACE_TANF REPLACE_SQRTL -REPLACE_SQRTF -REPLACE_SINHF -REPLACE_SINF REPLACE_SIGNBIT_USING_GCC REPLACE_SIGNBIT REPLACE_ROUNDL @@ -1198,7 +1167,6 @@ REPLACE_LDEXPL REPLACE_ISNAN REPLACE_ISINF REPLACE_ISFINITE -REPLACE_ILOGBL REPLACE_ILOGBF REPLACE_ILOGB REPLACE_HYPOTL @@ -1222,18 +1190,11 @@ REPLACE_EXP2L REPLACE_EXP2 REPLACE_EXPM1F REPLACE_EXPM1 -REPLACE_EXPF -REPLACE_COSHF -REPLACE_COSF REPLACE_CEILL REPLACE_CEILF REPLACE_CEIL REPLACE_CBRTL REPLACE_CBRTF -REPLACE_ATAN2F -REPLACE_ATANF -REPLACE_ASINF -REPLACE_ACOSF HAVE_DECL_TRUNCL HAVE_DECL_TRUNCF HAVE_DECL_TRUNC @@ -1428,12 +1389,6 @@ GNULIB_ACOSF GL_GENERATE_FNMATCH_H_FALSE GL_GENERATE_FNMATCH_H_TRUE FNMATCH_H -HAVE_FNMATCH_H -NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H -NEXT_FNMATCH_H -REPLACE_FNMATCH -HAVE_FNMATCH -GNULIB_FNMATCH REPLACE_ITOLD GL_GENERATE_FLOAT_H_FALSE GL_GENERATE_FLOAT_H_TRUE @@ -1469,6 +1424,9 @@ PRAGMA_COLUMNS PRAGMA_SYSTEM_HEADER INCLUDE_NEXT_AS_FIRST_DIRECTIVE INCLUDE_NEXT +pkglibexecdir +runstatedir +lispdir REPLACE_FDOPENDIR REPLACE_DIRFD REPLACE_CLOSEDIR @@ -1499,7 +1457,6 @@ REPLACE_USLEEP REPLACE_UNLINKAT REPLACE_UNLINK REPLACE_TTYNAME_R -REPLACE_TRUNCATE REPLACE_SYMLINKAT REPLACE_SYMLINK REPLACE_SLEEP @@ -1514,7 +1471,6 @@ REPLACE_LINKAT REPLACE_LINK REPLACE_LCHOWN REPLACE_ISATTY -REPLACE_GETPASS REPLACE_GETPAGESIZE REPLACE_GETGROUPS REPLACE_GETLOGIN_R @@ -1523,7 +1479,6 @@ REPLACE_GETDOMAINNAME REPLACE_GETCWD REPLACE_FTRUNCATE REPLACE_FCHOWNAT -REPLACE_FACCESSAT REPLACE_DUP2 REPLACE_DUP REPLACE_CLOSE @@ -1531,12 +1486,10 @@ REPLACE_CHOWN HAVE_SYS_PARAM_H HAVE_OS_H HAVE_DECL_TTYNAME_R -HAVE_DECL_TRUNCATE HAVE_DECL_SETHOSTNAME HAVE_DECL_GETUSERSHELL HAVE_DECL_GETPAGESIZE HAVE_DECL_GETLOGIN_R -HAVE_DECL_GETLOGIN HAVE_DECL_GETDOMAINNAME HAVE_DECL_FDATASYNC HAVE_DECL_FCHDIR @@ -1557,7 +1510,6 @@ HAVE_LINKAT HAVE_LINK HAVE_LCHOWN HAVE_GROUP_MEMBER -HAVE_GETPASS HAVE_GETPAGESIZE HAVE_GETLOGIN HAVE_GETHOSTNAME @@ -1580,7 +1532,6 @@ GNULIB_UNLINK GNULIB_UNISTD_H_SIGPIPE GNULIB_UNISTD_H_NONBLOCKING GNULIB_TTYNAME_R -GNULIB_TRUNCATE GNULIB_SYMLINKAT GNULIB_SYMLINK GNULIB_SLEEP @@ -1600,7 +1551,6 @@ GNULIB_LCHOWN GNULIB_ISATTY GNULIB_GROUP_MEMBER GNULIB_GETUSERSHELL -GNULIB_GETPASS GNULIB_GETPAGESIZE GNULIB_GETLOGIN_R GNULIB_GETLOGIN @@ -1646,13 +1596,11 @@ HAVE_STRUCT_RANDOM_DATA HAVE_STRTOULL HAVE_STRTOLL HAVE_STRTOD -HAVE_DECL_SETSTATE HAVE_DECL_SETENV HAVE_SETENV HAVE_SECURE_GETENV HAVE_RPMATCH HAVE_REALPATH -HAVE_REALLOCARRAY HAVE_RANDOM_R HAVE_RANDOM_H HAVE_RANDOM @@ -1665,7 +1613,6 @@ HAVE_MKSTEMP HAVE_MKOSTEMPS HAVE_MKOSTEMP HAVE_MKDTEMP -HAVE_DECL_INITSTATE HAVE_GRANTPT HAVE_GETSUBOPT HAVE_DECL_GETLOADAVG @@ -1684,7 +1631,6 @@ GNULIB_SECURE_GETENV GNULIB_RPMATCH GNULIB_REALPATH GNULIB_REALLOC_POSIX -GNULIB_REALLOCARRAY GNULIB_RANDOM_R GNULIB_RANDOM GNULIB_QSORT_R @@ -1726,6 +1672,7 @@ build_cpu build RANLIB ARFLAGS +ac_ct_AR AR EGREP GREP @@ -3145,63 +3092,6 @@ rm -f conftest.val as_fn_set_status $ac_retval } # ac_fn_c_compute_int - -# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES -# ---------------------------------------------------- -# Tries to find if the field MEMBER exists in type AGGR, after including -# INCLUDES, setting cache variable VAR accordingly. -ac_fn_c_check_member () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 -$as_echo_n "checking for $2.$3... " >&6; } -if eval \${$4+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$5 -int -main () -{ -static $2 ac_aggr; -if (ac_aggr.$3) -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$4=yes" -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$5 -int -main () -{ -static $2 ac_aggr; -if (sizeof ac_aggr.$3) -return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$4=yes" -else - eval "$4=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 -eval ac_res=\$$4 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_member cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. @@ -3500,8 +3390,6 @@ gl_func_list="$gl_func_list fcntl" gl_func_list="$gl_func_list symlink" gl_func_list="$gl_func_list fdopendir" gl_func_list="$gl_func_list mempcpy" -gl_header_list="$gl_header_list fnmatch.h" -gl_func_list="$gl_func_list fnmatch" gl_func_list="$gl_func_list btowc" gl_func_list="$gl_func_list isblank" gl_func_list="$gl_func_list iswctype" @@ -3519,9 +3407,7 @@ gl_func_list="$gl_func_list getprogname" gl_func_list="$gl_func_list getexecname" gl_header_list="$gl_header_list sys/time.h" gl_func_list="$gl_func_list gettimeofday" -gl_header_list="$gl_header_list glob.h" -gl_func_list="$gl_func_list glob" -gl_func_list="$gl_func_list glob_pattern_p" +gl_header_list="$gl_header_list sys/cdefs.h" gl_func_list="$gl_func_list getpwnam_r" gl_header_list="$gl_header_list limits.h" gl_header_list="$gl_header_list wchar.h" @@ -3536,11 +3422,15 @@ gl_func_list="$gl_func_list mprotect" gl_func_list="$gl_func_list mkstemp" gl_func_list="$gl_func_list openat" gl_func_list="$gl_func_list link" +gl_func_list="$gl_func_list secure_getenv" +gl_func_list="$gl_func_list getuid" +gl_func_list="$gl_func_list geteuid" +gl_func_list="$gl_func_list getgid" +gl_func_list="$gl_func_list getegid" gl_func_list="$gl_func_list setenv" gl_func_list="$gl_func_list strdup" gl_func_list="$gl_func_list pipe" gl_header_list="$gl_header_list features.h" -gl_header_list="$gl_header_list crtdefs.h" gl_func_list="$gl_func_list iswcntrl" # Check that the precious variables saved in the cache have kept the same # value. @@ -3932,100 +3822,6 @@ esac fi fi -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. -set dummy ${ac_tool_prefix}clang; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}clang" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "clang", so it can be a program name with args. -set dummy clang; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="clang" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - fi @@ -4038,7 +3834,7 @@ See \`config.log' for more details" "$LINENO" 5; } $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 -for ac_option in --version -v -V -qversion -version; do +for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; @@ -4424,222 +4220,81 @@ else CFLAGS= fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 -$as_echo_n "checking for $CC option to enable C11 features... " >&6; } -if ${ac_cv_prog_cc_c11+:} false; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else - ac_cv_prog_cc_c11=no + ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include -#include -#include -#include -#include #include - -// Check varargs macros. These examples are taken from C99 6.10.3.5. -#define debug(...) fprintf (stderr, __VA_ARGS__) -#define showlist(...) puts (#__VA_ARGS__) -#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) -static void -test_varargs_macros (void) -{ - int x = 1234; - int y = 5678; - debug ("Flag"); - debug ("X = %d\n", x); - showlist (The first, second, and third items.); - report (x>y, "x is %d but y is %d", x, y); -} - -// Check long long types. -#define BIG64 18446744073709551615ull -#define BIG32 4294967295ul -#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) -#if !BIG_OK - your preprocessor is broken; -#endif -#if BIG_OK -#else - your preprocessor is broken; -#endif -static long long int bignum = -9223372036854775807LL; -static unsigned long long int ubignum = BIG64; - -struct incomplete_array -{ - int datasize; - double data[]; -}; - -struct named_init { - int number; - const wchar_t *name; - double average; -}; - -typedef const char *ccp; - -static inline int -test_restrict (ccp restrict text) +struct stat; +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; { - // See if C++-style comments work. - // Iterate through items via the restricted pointer. - // Also check for declarations in for loops. - for (unsigned int i = 0; *(text+i) != '\0'; ++i) - continue; - return 0; + return p[i]; } - -// Check varargs and va_copy. -static bool -test_varargs (const char *format, ...) +static char *f (char * (*g) (char **, int), char **p, ...) { - va_list args; - va_start (args, format); - va_list args_copy; - va_copy (args_copy, args); - - const char *str = ""; - int number = 0; - float fnumber = 0; - - while (*format) - { - switch (*format++) - { - case 's': // string - str = va_arg (args_copy, const char *); - break; - case 'd': // int - number = va_arg (args_copy, int); - break; - case 'f': // float - fnumber = va_arg (args_copy, double); - break; - default: - break; - } - } - va_end (args_copy); - va_end (args); - - return *str && number && fnumber; + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; } -// Check _Alignas. -char _Alignas (double) aligned_as_double; -char _Alignas (0) no_special_alignment; -extern char aligned_as_int; -char _Alignas (0) _Alignas (int) aligned_as_int; - -// Check _Alignof. -enum -{ - int_alignment = _Alignof (int), - int_array_alignment = _Alignof (int[100]), - char_alignment = _Alignof (char) -}; -_Static_assert (0 < -_Alignof (int), "_Alignof is signed"); - -// Check _Noreturn. -int _Noreturn does_not_return (void) { for (;;) continue; } - -// Check _Static_assert. -struct test_static_assert -{ - int x; - _Static_assert (sizeof (int) <= sizeof (long int), - "_Static_assert does not work in struct"); - long int y; -}; -// Check UTF-8 literals. -#define u8 syntax error! -char const utf8_literal[] = u8"happens to be ASCII" "another string"; - -// Check duplicate typedefs. -typedef long *long_ptr; -typedef long int *long_ptr; -typedef long_ptr long_ptr; +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; -// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1. -struct anonymous -{ - union { - struct { int i; int j; }; - struct { int k; long int l; } w; - }; - int m; -} v1; +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; int main () { - - // Check bool. - _Bool success = false; - - // Check restrict. - if (test_restrict ("String literal") == 0) - success = true; - char *restrict newvar = "Another string"; - - // Check varargs. - success &= test_varargs ("s, d' f .", "string", 65, 34.234); - test_varargs_macros (); - - // Check flexible array members. - struct incomplete_array *ia = - malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); - ia->datasize = 10; - for (int i = 0; i < ia->datasize; ++i) - ia->data[i] = i * 1.234; - - // Check named initializers. - struct named_init ni = { - .number = 34, - .name = L"Test wide string", - .average = 543.34343, - }; - - ni.number = 58; - - int dynamic_array[ni.number]; - dynamic_array[ni.number - 1] = 543; - - // work around unused variable warnings - return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x' - || dynamic_array[ni.number - 1] != 543); - - v1.i = 2; - v1.w.k = 5; - _Static_assert ((offsetof (struct anonymous, i) - == offsetof (struct anonymous, w.k)), - "Anonymous union alignment botch"); - +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF -for ac_arg in '' -std=gnu11 +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c11=$ac_arg + ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c11" != "xno" && break + test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL -ac_prog_cc_stdc_options= -case "x$ac_cv_prog_cc_c11" in +case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; @@ -4647,295 +4302,104 @@ $as_echo "none needed" >&6; } ;; { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) - ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c11" - CC=$CC$ac_prog_cc_stdc_options - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 -$as_echo "$ac_cv_prog_cc_c11" >&6; } ;; + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac -if test "x$ac_cv_prog_cc_c11" != xno; then : - ac_prog_cc_stdc=c11 - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 -$as_echo_n "checking for $CC option to enable C99 features... " >&6; } -if ${ac_cv_prog_cc_c99+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c99=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include -#include -#include - -// Check varargs macros. These examples are taken from C99 6.10.3.5. -#define debug(...) fprintf (stderr, __VA_ARGS__) -#define showlist(...) puts (#__VA_ARGS__) -#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) -static void -test_varargs_macros (void) -{ - int x = 1234; - int y = 5678; - debug ("Flag"); - debug ("X = %d\n", x); - showlist (The first, second, and third items.); - report (x>y, "x is %d but y is %d", x, y); -} - -// Check long long types. -#define BIG64 18446744073709551615ull -#define BIG32 4294967295ul -#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) -#if !BIG_OK - your preprocessor is broken; -#endif -#if BIG_OK -#else - your preprocessor is broken; -#endif -static long long int bignum = -9223372036854775807LL; -static unsigned long long int ubignum = BIG64; - -struct incomplete_array -{ - int datasize; - double data[]; -}; - -struct named_init { - int number; - const wchar_t *name; - double average; -}; - -typedef const char *ccp; - -static inline int -test_restrict (ccp restrict text) -{ - // See if C++-style comments work. - // Iterate through items via the restricted pointer. - // Also check for declarations in for loops. - for (unsigned int i = 0; *(text+i) != '\0'; ++i) - continue; - return 0; -} - -// Check varargs and va_copy. -static bool -test_varargs (const char *format, ...) -{ - va_list args; - va_start (args, format); - va_list args_copy; - va_copy (args_copy, args); - - const char *str = ""; - int number = 0; - float fnumber = 0; - - while (*format) - { - switch (*format++) - { - case 's': // string - str = va_arg (args_copy, const char *); - break; - case 'd': // int - number = va_arg (args_copy, int); - break; - case 'f': // float - fnumber = va_arg (args_copy, double); - break; - default: - break; - } - } - va_end (args_copy); - va_end (args); +if test "x$ac_cv_prog_cc_c89" != xno; then : - return *str && number && fnumber; -} -int -main () -{ +fi - // Check bool. - _Bool success = false; - - // Check restrict. - if (test_restrict ("String literal") == 0) - success = true; - char *restrict newvar = "Another string"; - - // Check varargs. - success &= test_varargs ("s, d' f .", "string", 65, 34.234); - test_varargs_macros (); - - // Check flexible array members. - struct incomplete_array *ia = - malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); - ia->datasize = 10; - for (int i = 0; i < ia->datasize; ++i) - ia->data[i] = i * 1.234; - - // Check named initializers. - struct named_init ni = { - .number = 34, - .name = L"Test wide string", - .average = 543.34343, - }; +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +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 - ni.number = 58; +ac_aux_dir= +for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +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 - int dynamic_array[ni.number]; - dynamic_array[ni.number - 1] = 543; +# 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. - // work around unused variable warnings - return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x' - || dynamic_array[ni.number - 1] != 543); - ; - return 0; -} -_ACEOF -for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc1x -qlanglvl=extc99 -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c99=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c99" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC +# Expand $ac_aux_dir to an absolute path. +am_aux_dir=`cd "$ac_aux_dir" && pwd` -fi -# AC_CACHE_VAL -ac_prog_cc_stdc_options= -case "x$ac_cv_prog_cc_c99" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c99" - CC=$CC$ac_prog_cc_stdc_options - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 -$as_echo "$ac_cv_prog_cc_c99" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c99" != xno; then : - ac_prog_cc_stdc=c99 - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 -$as_echo_n "checking for $CC option to enable C89 features... " >&6; } -if ${ac_cv_prog_cc_c89+:} false; then : +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 +$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } +if ${am_cv_prog_cc_c_o+:} false; then : $as_echo_n "(cached) " >&6 else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -struct stat; -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; int main () { -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; return 0; } _ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -ac_prog_cc_stdc_options= -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c89" - CC=$CC$ac_prog_cc_stdc_options - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : - ac_prog_cc_stdc=c89 - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 -else - ac_prog_cc_stdc=no - ac_cv_prog_cc_stdc=no -fi - -fi - + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 + ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 +$as_echo "$am_cv_prog_cc_c_o" >&6; } +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" fi - ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -4943,6 +4407,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -5401,10 +4866,6 @@ $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } $as_echo "#define _GNU_SOURCE 1" >>confdefs.h - $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h - - $as_echo "#define _OPENBSD_SOURCE 1" >>confdefs.h - $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h $as_echo "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h @@ -5471,8 +4932,6 @@ $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 - $as_echo "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h - @@ -5518,12 +4977,11 @@ $as_echo "$gl_cv_c_amsterdam_compiler" >&6; } ARFLAGS='-o' fi else - : - fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. -set dummy ${ac_tool_prefix}ar; ac_word=$2 + if test -n "$ac_tool_prefix"; then + for ac_prog in ar lib "link -lib" + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AR+:} false; then : @@ -5539,7 +4997,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_AR="${ac_tool_prefix}ar" + ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -5559,11 +5017,15 @@ $as_echo "no" >&6; } fi + test -n "$AR" && break + done fi -if test -z "$ac_cv_prog_AR"; then +if test -z "$AR"; then ac_ct_AR=$AR - # Extract the first word of "ar", so it can be a program name with args. -set dummy ar; ac_word=$2 + for ac_prog in ar lib "link -lib" +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AR+:} false; then : @@ -5579,7 +5041,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_AR="ar" + ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -5598,8 +5060,12 @@ else $as_echo "no" >&6; } fi + + test -n "$ac_ct_AR" && break +done + if test "x$ac_ct_AR" = x; then - AR="ar" + AR="false" else case $cross_compiling:$ac_tool_warned in yes:) @@ -5609,56 +5075,219 @@ ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi -else - AR="$ac_cv_prog_AR" fi - if test -z "$ARFLAGS"; then - ARFLAGS='cr' - fi - +: ${AR=ar} - - if test -z "$RANLIB"; then - if test $gl_cv_c_amsterdam_compiler = yes; then - RANLIB=':' - else - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_RANLIB+:} false; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5 +$as_echo_n "checking the archiver ($AR) interface... " >&6; } +if ${am_cv_ar_interface+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +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 + + am_cv_ar_interface=ar + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int some_variable = 0; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5 + (eval $am_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -eq 0; then + am_cv_ar_interface=ar + else + am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5 + (eval $am_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -eq 0; then + am_cv_ar_interface=lib + else + am_cv_ar_interface=unknown + fi + fi + rm -f conftest.lib libconftest.a + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +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 + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5 +$as_echo "$am_cv_ar_interface" >&6; } + +case $am_cv_ar_interface in +ar) + ;; +lib) + # Microsoft lib, so override with the ar-lib wrapper script. + # FIXME: It is wrong to rewrite AR. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__AR in this case, + # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something + # similar. + AR="$am_aux_dir/ar-lib $AR" + ;; +unknown) + as_fn_error $? "could not determine $AR interface" "$LINENO" 5 + ;; +esac + + fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +set dummy ${ac_tool_prefix}ar; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AR="${ac_tool_prefix}ar" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_AR"; then + ac_ct_AR=$AR + # Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_AR="ar" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_AR" = x; then + AR="ar" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi +else + AR="$ac_cv_prog_AR" +fi + + if test -z "$ARFLAGS"; then + ARFLAGS='cr' + fi + -fi -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi + + if test -z "$RANLIB"; then + if test $gl_cv_c_amsterdam_compiler = yes; then + RANLIB=':' + else + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi fi @@ -5719,36 +5348,6 @@ fi fi - -ac_aux_dir= -for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - if test -f "$ac_dir/install-sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f "$ac_dir/install.sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f "$ac_dir/shtool"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi -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 @@ -5830,7 +5429,7 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac alpha*) # On Alpha systems, a compiler option provides the behaviour. # See the ieee(3) manual page, also available at - # + # if test -n "$GCC"; then # GCC has the option -mieee. # For full IEEE compliance (rarely needed), use option -mieee-with-inexact. @@ -6057,20 +5656,18 @@ fi - # Code from module absolute-header: # Code from module alloca: # Code from module alloca-opt: # Code from module assure: # Code from module at-internal: - # Code from module builtin-expect: - # Code from module c99: # Code from module canonicalize-lgpl: # Code from module chdir: # Code from module chdir-long: # Code from module cloexec: # Code from module close: # Code from module closedir: + # Code from module configmake: # Code from module d-ino: # Code from module d-type: # Code from module dirent: @@ -6090,7 +5687,6 @@ fi # Code from module fcntl: # Code from module fcntl-h: # Code from module fd-hook: - # Code from module fd-safer-flag: # Code from module fdopendir: # Code from module filename: # Code from module filenamecat-lgpl: @@ -6098,7 +5694,6 @@ fi # Code from module float: # Code from module fnmatch: # Code from module fnmatch-gnu: - # Code from module fnmatch-h: # Code from module fpieee: # Code from module fpucw: @@ -6114,7 +5709,6 @@ fi # Code from module gettext-h: # Code from module gettimeofday: # Code from module glob: - # Code from module glob-h: # Code from module hard-locale: # Code from module include_next: # Code from module intprops: @@ -6124,10 +5718,8 @@ fi # Code from module isnanl-nolibm: # Code from module largefile: - # Code from module libc-config: # Code from module limits-h: # Code from module localcharset: - # Code from module localtime-buffer: # Code from module lstat: # Code from module malloc-posix: # Code from module malloca: @@ -6161,7 +5753,7 @@ fi # Code from module rmdir: # Code from module same-inode: # Code from module save-cwd: - # Code from module scratch_buffer: + # Code from module secure_getenv: # Code from module setenv: # Code from module signal-h: # Code from module snippet/_Noreturn: @@ -6170,8 +5762,6 @@ fi # Code from module snippet/warn-on-use: # Code from module ssize_t: # Code from module stat: - # Code from module stat-time: - # Code from module std-gnu11: # Code from module stdbool: # Code from module stddef: # Code from module stdint: @@ -6199,445 +5789,676 @@ fi # Code from module verify: # Code from module wchar: # Code from module wctype-h: - # Code from module xalloc-oversized: - - -am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc - - -ac_aux_dir= -for ac_dir in ../.. "$srcdir"/../..; do - if test -f "$ac_dir/install-sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f "$ac_dir/install.sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f "$ac_dir/shtool"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi -done -if test -z "$ac_aux_dir"; then - as_fn_error $? "cannot find install-sh, install.sh, or shtool in ../.. \"$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. - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 -$as_echo_n "checking target system type... " >&6; } -if ${ac_cv_target+:} false; then : +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +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 +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else - if test "x$target_alias" = x; then - ac_cv_target=$ac_cv_host + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. else - ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 -$as_echo "$ac_cv_target" >&6; } -case $ac_cv_target in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; -esac -target=$ac_cv_target -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_target -shift -target_cpu=$1 -target_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -target_os=$* -IFS=$ac_save_IFS -case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac - - -# The aliases save the names the user supplied, while $host etc. -# will get canonicalized. -test -n "$target_alias" && - test "$program_prefix$program_suffix$program_transform_name" = \ - NONENONEs,x,x, && - program_prefix=${target_alias}- - - - - - - - - LIBC_FATAL_STDERR_=1 - export LIBC_FATAL_STDERR_ - -ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" -if test "x$ac_cv_type_size_t" = xyes; then : +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi -cat >>confdefs.h <<_ACEOF -#define size_t unsigned int -_ACEOF fi - -# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works -# for constant arguments. Useless! -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 -$as_echo_n "checking for working alloca.h... " >&6; } -if ${ac_cv_working_alloca_h+:} false; then : +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -char *p = (char *) alloca (2 * sizeof (int)); - if (p) return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_working_alloca_h=yes + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else - ac_cv_working_alloca_h=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 -$as_echo "$ac_cv_working_alloca_h" >&6; } -if test $ac_cv_working_alloca_h = yes; then - -$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 -$as_echo_n "checking for alloca... " >&6; } -if ${ac_cv_func_alloca_works+:} false; then : +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __GNUC__ -# define alloca __builtin_alloca -#else -# ifdef _MSC_VER -# include -# define alloca _alloca -# else -# ifdef HAVE_ALLOCA_H -# include -# else -# ifdef _AIX - #pragma alloca -# else -# ifndef alloca /* predefined by HP cc +Olibcalls */ -void *alloca (size_t); -# endif -# endif -# endif -# endif -#endif - -int -main () -{ -char *p = (char *) alloca (1); - if (p) return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_func_alloca_works=yes + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. else - ac_cv_func_alloca_works=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 -$as_echo "$ac_cv_func_alloca_works" >&6; } - -if test $ac_cv_func_alloca_works = yes; then - -$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h - +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - # The SVR3 libPW and SVR4 libucb both contain incompatible functions -# that cause trouble. Some versions do not even contain alloca or -# contain a buggy version. If you still want to use their alloca, -# use ar to extract alloca.o from them instead of compiling alloca.c. - - - - - -ALLOCA=\${LIBOBJDIR}alloca.$ac_objext - -$as_echo "#define C_ALLOCA 1" >>confdefs.h + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 -$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } -if ${ac_cv_os_cray+:} false; then : + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#if defined CRAY && ! defined CRAY2 -webecray -#else -wenotbecray -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "webecray" >/dev/null 2>&1; then : - ac_cv_os_cray=yes + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. else - ac_cv_os_cray=no -fi -rm -f conftest* - + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 -$as_echo "$ac_cv_os_cray" >&6; } -if test $ac_cv_os_cray = yes; then - for ac_func in _getb67 GETB67 getb67; do - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : -cat >>confdefs.h <<_ACEOF -#define CRAY_STACKSEG_END $ac_func -_ACEOF - break fi - +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 -$as_echo_n "checking stack direction for C alloca... " >&6; } -if ${ac_cv_c_stack_direction+:} false; then : + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then : - ac_cv_c_stack_direction=0 + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } + +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if ${ac_cv_c_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default -int -find_stack_direction (int *addr, int depth) -{ - int dir, dummy = 0; - if (! addr) - addr = &dummy; - *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; - dir = depth ? find_stack_direction (addr, depth - 1) : 0; - return dir + dummy; -} int -main (int argc, char **argv) +main () { - return find_stack_direction (0, argc + !argv + 20) < 0; +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_c_stack_direction=1 +if ac_fn_c_try_compile "$LINENO"; then : + ac_compiler_gnu=yes else - ac_cv_c_stack_direction=-1 -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + ac_compiler_gnu=no fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 -$as_echo "$ac_cv_c_stack_direction" >&6; } -cat >>confdefs.h <<_ACEOF -#define STACK_DIRECTION $ac_cv_c_stack_direction -_ACEOF - - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= fi +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if ${ac_cv_prog_cc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int +main () +{ - GNULIB__EXIT=0; - GNULIB_ATOLL=0; - GNULIB_CALLOC_POSIX=0; - GNULIB_CANONICALIZE_FILE_NAME=0; - GNULIB_GETLOADAVG=0; - GNULIB_GETSUBOPT=0; - GNULIB_GRANTPT=0; - GNULIB_MALLOC_POSIX=0; - GNULIB_MBTOWC=0; - GNULIB_MKDTEMP=0; - GNULIB_MKOSTEMP=0; - GNULIB_MKOSTEMPS=0; - GNULIB_MKSTEMP=0; - GNULIB_MKSTEMPS=0; - GNULIB_POSIX_OPENPT=0; - GNULIB_PTSNAME=0; - GNULIB_PTSNAME_R=0; - GNULIB_PUTENV=0; - GNULIB_QSORT_R=0; - GNULIB_RANDOM=0; - GNULIB_RANDOM_R=0; - GNULIB_REALLOCARRAY=0; - GNULIB_REALLOC_POSIX=0; - GNULIB_REALPATH=0; - GNULIB_RPMATCH=0; - GNULIB_SECURE_GETENV=0; - GNULIB_SETENV=0; - GNULIB_STRTOD=0; - GNULIB_STRTOLL=0; - GNULIB_STRTOULL=0; - GNULIB_SYSTEM_POSIX=0; - GNULIB_UNLOCKPT=0; - GNULIB_UNSETENV=0; - GNULIB_WCTOMB=0; - HAVE__EXIT=1; - HAVE_ATOLL=1; - HAVE_CANONICALIZE_FILE_NAME=1; - HAVE_DECL_GETLOADAVG=1; - HAVE_GETSUBOPT=1; - HAVE_GRANTPT=1; - HAVE_DECL_INITSTATE=1; - HAVE_MKDTEMP=1; - HAVE_MKOSTEMP=1; - HAVE_MKOSTEMPS=1; - HAVE_MKSTEMP=1; - HAVE_MKSTEMPS=1; - HAVE_POSIX_OPENPT=1; - HAVE_PTSNAME=1; - HAVE_PTSNAME_R=1; - HAVE_QSORT_R=1; - HAVE_RANDOM=1; - HAVE_RANDOM_H=1; - HAVE_RANDOM_R=1; - HAVE_REALLOCARRAY=1; - HAVE_REALPATH=1; - HAVE_RPMATCH=1; - HAVE_SECURE_GETENV=1; - HAVE_SETENV=1; - HAVE_DECL_SETENV=1; - HAVE_DECL_SETSTATE=1; - HAVE_STRTOD=1; - HAVE_STRTOLL=1; - HAVE_STRTOULL=1; - HAVE_STRUCT_RANDOM_DATA=1; - HAVE_SYS_LOADAVG_H=0; - HAVE_UNLOCKPT=1; - HAVE_DECL_UNSETENV=1; - REPLACE_CALLOC=0; - REPLACE_CANONICALIZE_FILE_NAME=0; - REPLACE_MALLOC=0; - REPLACE_MBTOWC=0; - REPLACE_MKSTEMP=0; - REPLACE_PTSNAME=0; - REPLACE_PTSNAME_R=0; - REPLACE_PUTENV=0; - REPLACE_QSORT_R=0; - REPLACE_RANDOM_R=0; - REPLACE_REALLOC=0; - REPLACE_REALPATH=0; - REPLACE_SETENV=0; - REPLACE_STRTOD=0; - REPLACE_UNSETENV=0; - REPLACE_WCTOMB=0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +else + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int +main () +{ + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : +else + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int +main () +{ - for ac_func in $gl_func_list -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 + ; + return 0; +} _ACEOF - +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes fi -done - - - - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if ${ac_cv_prog_cc_c89+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +struct stat; +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c89=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c89" != xno; then : +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +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_ext=c +ac_cpp='$CPP $CPPFLAGS' +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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 +$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } +if ${am_cv_prog_cc_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int +main () +{ + ; + return 0; +} +_ACEOF + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 + ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 +$as_echo "$am_cv_prog_cc_c_o" >&6; } +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +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 +am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5 -$as_echo_n "checking whether // is distinct from /... " >&6; } -if ${gl_cv_double_slash_root+:} false; then : +ac_aux_dir= +for ac_dir in ../.. "$srcdir"/../..; do + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + as_fn_error $? "cannot find install-sh, install.sh, or shtool in ../.. \"$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. + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 +$as_echo_n "checking target system type... " >&6; } +if ${ac_cv_target+:} false; then : $as_echo_n "(cached) " >&6 else - if test x"$cross_compiling" = xyes ; then - # When cross-compiling, there is no way to tell whether // is special - # short of a list of hosts. However, the only known hosts to date - # that have a distinct // are Apollo DomainOS (too old to port to), - # Cygwin, and z/OS. If anyone knows of another system for which // has - # special semantics and is distinct from /, please report it to - # . - case $host in - *-cygwin | i370-ibm-openedition) - gl_cv_double_slash_root=yes ;; - *) - # Be optimistic and assume that / and // are the same when we - # don't know. - gl_cv_double_slash_root='unknown, assuming no' ;; - esac - else - set x `ls -di / // 2>/dev/null` - if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then - gl_cv_double_slash_root=no - else - gl_cv_double_slash_root=yes - fi - fi + if test "x$target_alias" = x; then + ac_cv_target=$ac_cv_host +else + ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5 -$as_echo "$gl_cv_double_slash_root" >&6; } - if test "$gl_cv_double_slash_root" = yes; then -$as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 +$as_echo "$ac_cv_target" >&6; } +case $ac_cv_target in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; +esac +target=$ac_cv_target +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_target +shift +target_cpu=$1 +target_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +target_os=$* +IFS=$ac_save_IFS +case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac - fi +# The aliases save the names the user supplied, while $host etc. +# will get canonicalized. +test -n "$target_alias" && + test "$program_prefix$program_suffix$program_transform_name" = \ + NONENONEs,x,x, && + program_prefix=${target_alias}- @@ -6645,402 +6466,306 @@ $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h - : + LIBC_FATAL_STDERR_=1 + export LIBC_FATAL_STDERR_ +ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" +if test "x$ac_cv_type_size_t" = xyes; then : +else +cat >>confdefs.h <<_ACEOF +#define size_t unsigned int +_ACEOF +fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5 -$as_echo_n "checking whether realpath works... " >&6; } -if ${gl_cv_func_realpath_works+:} false; then : +# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works +# for constant arguments. Useless! +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 +$as_echo_n "checking for working alloca.h... " >&6; } +if ${ac_cv_working_alloca_h+:} false; then : $as_echo_n "(cached) " >&6 else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +char *p = (char *) alloca (2 * sizeof (int)); + if (p) return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_working_alloca_h=yes +else + ac_cv_working_alloca_h=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 +$as_echo "$ac_cv_working_alloca_h" >&6; } +if test $ac_cv_working_alloca_h = yes; then - touch conftest.a - mkdir conftest.d - if test "$cross_compiling" = yes; then : - case "$host_os" in - # Guess yes on glibc systems. - *-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;; - # Guess no on native Windows. - mingw*) gl_cv_func_realpath_works="guessing no" ;; - # If we don't know, assume the worst. - *) gl_cv_func_realpath_works="guessing no" ;; - esac +$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 +$as_echo_n "checking for alloca... " >&6; } +if ${ac_cv_func_alloca_works+:} false; then : + $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#ifdef __GNUC__ +# define alloca __builtin_alloca +#else +# ifdef _MSC_VER +# include +# define alloca _alloca +# else +# ifdef HAVE_ALLOCA_H +# include +# else +# ifdef _AIX + #pragma alloca +# else +# ifndef alloca /* predefined by HP cc +Olibcalls */ +void *alloca (size_t); +# endif +# endif +# endif +# endif +#endif - - -#include -#if defined __MACH__ && defined __APPLE__ -/* Avoid a crash on Mac OS X. */ -#include -#include -#include -#include -#include -#include -/* The exception port on which our thread listens. */ -static mach_port_t our_exception_port; -/* The main function of the thread listening for exceptions of type - EXC_BAD_ACCESS. */ -static void * -mach_exception_thread (void *arg) -{ - /* Buffer for a message to be received. */ - struct { - mach_msg_header_t head; - mach_msg_body_t msgh_body; - char data[1024]; - } msg; - mach_msg_return_t retval; - /* Wait for a message on the exception port. */ - retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg), - our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL); - if (retval != MACH_MSG_SUCCESS) - abort (); - exit (1); -} -static void -nocrash_init (void) +int +main () { - mach_port_t self = mach_task_self (); - /* Allocate a port on which the thread shall listen for exceptions. */ - if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port) - == KERN_SUCCESS) { - /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */ - if (mach_port_insert_right (self, our_exception_port, our_exception_port, - MACH_MSG_TYPE_MAKE_SEND) - == KERN_SUCCESS) { - /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting - for us. */ - exception_mask_t mask = EXC_MASK_BAD_ACCESS; - /* Create the thread listening on the exception port. */ - pthread_attr_t attr; - pthread_t thread; - if (pthread_attr_init (&attr) == 0 - && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0 - && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) { - pthread_attr_destroy (&attr); - /* Replace the exception port info for these exceptions with our own. - Note that we replace the exception port for the entire task, not only - for a particular thread. This has the effect that when our exception - port gets the message, the thread specific exception port has already - been asked, and we don't need to bother about it. - See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */ - task_set_exception_ports (self, mask, our_exception_port, - EXCEPTION_DEFAULT, MACHINE_THREAD_STATE); - } - } - } +char *p = (char *) alloca (1); + if (p) return 0; + ; + return 0; } -#elif defined _WIN32 && ! defined __CYGWIN__ -/* Avoid a crash on native Windows. */ -#define WIN32_LEAN_AND_MEAN -#include -#include -static LONG WINAPI -exception_filter (EXCEPTION_POINTERS *ExceptionInfo) -{ - switch (ExceptionInfo->ExceptionRecord->ExceptionCode) - { - case EXCEPTION_ACCESS_VIOLATION: - case EXCEPTION_IN_PAGE_ERROR: - case EXCEPTION_STACK_OVERFLOW: - case EXCEPTION_GUARD_PAGE: - case EXCEPTION_PRIV_INSTRUCTION: - case EXCEPTION_ILLEGAL_INSTRUCTION: - case EXCEPTION_DATATYPE_MISALIGNMENT: - case EXCEPTION_ARRAY_BOUNDS_EXCEEDED: - case EXCEPTION_NONCONTINUABLE_EXCEPTION: - exit (1); - } - return EXCEPTION_CONTINUE_SEARCH; -} -static void -nocrash_init (void) -{ - SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter); -} -#else -/* Avoid a crash on POSIX systems. */ -#include -#include -/* A POSIX signal handler. */ -static void -exception_handler (int sig) -{ - _exit (1); -} -static void -nocrash_init (void) -{ -#ifdef SIGSEGV - signal (SIGSEGV, exception_handler); -#endif -#ifdef SIGBUS - signal (SIGBUS, exception_handler); -#endif -} -#endif - - #include - #include - -int -main () -{ - - int result = 0; - { - char *name = realpath ("conftest.a", NULL); - if (!(name && *name == '/')) - result |= 1; - free (name); - } - { - char *name = realpath ("conftest.b/../conftest.a", NULL); - if (name != NULL) - result |= 2; - free (name); - } - { - char *name = realpath ("conftest.a/", NULL); - if (name != NULL) - result |= 4; - free (name); - } - { - char *name1 = realpath (".", NULL); - char *name2 = realpath ("conftest.d//./..", NULL); - if (! name1 || ! name2 || strcmp (name1, name2)) - result |= 8; - free (name1); - free (name2); - } - return result; - - ; - return 0; -} - _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_realpath_works=yes +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_func_alloca_works=yes else - gl_cv_func_realpath_works=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - rm -rf conftest.a conftest.d - + ac_cv_func_alloca_works=no fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5 -$as_echo "$gl_cv_func_realpath_works" >&6; } - case "$gl_cv_func_realpath_works" in - *yes) - -$as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h - - ;; - esac - - - - - - for ac_header in $gl_header_list -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 +$as_echo "$ac_cv_func_alloca_works" >&6; } -done - - - - - - - +if test $ac_cv_func_alloca_works = yes; then - : +$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h +else + # The SVR3 libPW and SVR4 libucb both contain incompatible functions +# that cause trouble. Some versions do not even contain alloca or +# contain a buggy version. If you still want to use their alloca, +# use ar to extract alloca.o from them instead of compiling alloca.c. +ALLOCA=\${LIBOBJDIR}alloca.$ac_objext +$as_echo "#define C_ALLOCA 1" >>confdefs.h +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 +$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } +if ${ac_cv_os_cray+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined CRAY && ! defined CRAY2 +webecray +#else +wenotbecray +#endif +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "webecray" >/dev/null 2>&1; then : + ac_cv_os_cray=yes +else + ac_cv_os_cray=no +fi +rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 +$as_echo "$ac_cv_os_cray" >&6; } +if test $ac_cv_os_cray = yes; then + for ac_func in _getb67 GETB67 getb67; do + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : +cat >>confdefs.h <<_ACEOF +#define CRAY_STACKSEG_END $ac_func +_ACEOF + break +fi - : + done +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 +$as_echo_n "checking stack direction for C alloca... " >&6; } +if ${ac_cv_c_stack_direction+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_c_stack_direction=0 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +find_stack_direction (int *addr, int depth) +{ + int dir, dummy = 0; + if (! addr) + addr = &dummy; + *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; + dir = depth ? find_stack_direction (addr, depth - 1) : 0; + return dir + dummy; +} +int +main (int argc, char **argv) +{ + return find_stack_direction (0, argc + !argv + 20) < 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_c_stack_direction=1 +else + ac_cv_c_stack_direction=-1 +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: $ac_cv_c_stack_direction" >&5 +$as_echo "$ac_cv_c_stack_direction" >&6; } +cat >>confdefs.h <<_ACEOF +#define STACK_DIRECTION $ac_cv_c_stack_direction +_ACEOF +fi - GNULIB_CHDIR=0; - GNULIB_CHOWN=0; - GNULIB_CLOSE=0; - GNULIB_DUP=0; - GNULIB_DUP2=0; - GNULIB_DUP3=0; - GNULIB_ENVIRON=0; - GNULIB_EUIDACCESS=0; - GNULIB_FACCESSAT=0; - GNULIB_FCHDIR=0; - GNULIB_FCHOWNAT=0; - GNULIB_FDATASYNC=0; - GNULIB_FSYNC=0; - GNULIB_FTRUNCATE=0; - GNULIB_GETCWD=0; - GNULIB_GETDOMAINNAME=0; - GNULIB_GETDTABLESIZE=0; - GNULIB_GETGROUPS=0; - GNULIB_GETHOSTNAME=0; - GNULIB_GETLOGIN=0; - GNULIB_GETLOGIN_R=0; - GNULIB_GETPAGESIZE=0; - GNULIB_GETPASS=0; - GNULIB_GETUSERSHELL=0; - GNULIB_GROUP_MEMBER=0; - GNULIB_ISATTY=0; - GNULIB_LCHOWN=0; - GNULIB_LINK=0; - GNULIB_LINKAT=0; - GNULIB_LSEEK=0; - GNULIB_PIPE=0; - GNULIB_PIPE2=0; - GNULIB_PREAD=0; - GNULIB_PWRITE=0; - GNULIB_READ=0; - GNULIB_READLINK=0; - GNULIB_READLINKAT=0; - GNULIB_RMDIR=0; - GNULIB_SETHOSTNAME=0; - GNULIB_SLEEP=0; - GNULIB_SYMLINK=0; - GNULIB_SYMLINKAT=0; - GNULIB_TRUNCATE=0; - GNULIB_TTYNAME_R=0; - GNULIB_UNISTD_H_NONBLOCKING=0; - GNULIB_UNISTD_H_SIGPIPE=0; - GNULIB_UNLINK=0; - GNULIB_UNLINKAT=0; - GNULIB_USLEEP=0; - GNULIB_WRITE=0; - HAVE_CHOWN=1; - HAVE_DUP2=1; - HAVE_DUP3=1; - HAVE_EUIDACCESS=1; - HAVE_FACCESSAT=1; - HAVE_FCHDIR=1; - HAVE_FCHOWNAT=1; - HAVE_FDATASYNC=1; - HAVE_FSYNC=1; - HAVE_FTRUNCATE=1; - HAVE_GETDTABLESIZE=1; - HAVE_GETGROUPS=1; - HAVE_GETHOSTNAME=1; - HAVE_GETLOGIN=1; - HAVE_GETPAGESIZE=1; - HAVE_GETPASS=1; - HAVE_GROUP_MEMBER=1; - HAVE_LCHOWN=1; - HAVE_LINK=1; - HAVE_LINKAT=1; - HAVE_PIPE=1; - HAVE_PIPE2=1; - HAVE_PREAD=1; - HAVE_PWRITE=1; - HAVE_READLINK=1; - HAVE_READLINKAT=1; - HAVE_SETHOSTNAME=1; - HAVE_SLEEP=1; - HAVE_SYMLINK=1; - HAVE_SYMLINKAT=1; - HAVE_UNLINKAT=1; - HAVE_USLEEP=1; - HAVE_DECL_ENVIRON=1; - HAVE_DECL_FCHDIR=1; - HAVE_DECL_FDATASYNC=1; - HAVE_DECL_GETDOMAINNAME=1; - HAVE_DECL_GETLOGIN=1; - HAVE_DECL_GETLOGIN_R=1; - HAVE_DECL_GETPAGESIZE=1; - HAVE_DECL_GETUSERSHELL=1; - HAVE_DECL_SETHOSTNAME=1; - HAVE_DECL_TRUNCATE=1; - HAVE_DECL_TTYNAME_R=1; - HAVE_OS_H=0; - HAVE_SYS_PARAM_H=0; - REPLACE_CHOWN=0; - REPLACE_CLOSE=0; - REPLACE_DUP=0; - REPLACE_DUP2=0; - REPLACE_FACCESSAT=0; - REPLACE_FCHOWNAT=0; - REPLACE_FTRUNCATE=0; - REPLACE_GETCWD=0; - REPLACE_GETDOMAINNAME=0; - REPLACE_GETDTABLESIZE=0; - REPLACE_GETLOGIN_R=0; - REPLACE_GETGROUPS=0; - REPLACE_GETPAGESIZE=0; - REPLACE_GETPASS=0; - REPLACE_ISATTY=0; - REPLACE_LCHOWN=0; - REPLACE_LINK=0; - REPLACE_LINKAT=0; - REPLACE_LSEEK=0; - REPLACE_PREAD=0; - REPLACE_PWRITE=0; - REPLACE_READ=0; - REPLACE_READLINK=0; - REPLACE_READLINKAT=0; - REPLACE_RMDIR=0; - REPLACE_SLEEP=0; - REPLACE_SYMLINK=0; - REPLACE_SYMLINKAT=0; - REPLACE_TRUNCATE=0; - REPLACE_TTYNAME_R=0; - REPLACE_UNLINK=0; - REPLACE_UNLINKAT=0; - REPLACE_USLEEP=0; - REPLACE_WRITE=0; - UNISTD_H_HAVE_WINSOCK2_H=0; - UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0; - - - - - + GNULIB__EXIT=0; + GNULIB_ATOLL=0; + GNULIB_CALLOC_POSIX=0; + GNULIB_CANONICALIZE_FILE_NAME=0; + GNULIB_GETLOADAVG=0; + GNULIB_GETSUBOPT=0; + GNULIB_GRANTPT=0; + GNULIB_MALLOC_POSIX=0; + GNULIB_MBTOWC=0; + GNULIB_MKDTEMP=0; + GNULIB_MKOSTEMP=0; + GNULIB_MKOSTEMPS=0; + GNULIB_MKSTEMP=0; + GNULIB_MKSTEMPS=0; + GNULIB_POSIX_OPENPT=0; + 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; + GNULIB_STRTOULL=0; + GNULIB_SYSTEM_POSIX=0; + GNULIB_UNLOCKPT=0; + GNULIB_UNSETENV=0; + GNULIB_WCTOMB=0; + HAVE__EXIT=1; + HAVE_ATOLL=1; + HAVE_CANONICALIZE_FILE_NAME=1; + HAVE_DECL_GETLOADAVG=1; + HAVE_GETSUBOPT=1; + HAVE_GRANTPT=1; + HAVE_MKDTEMP=1; + HAVE_MKOSTEMP=1; + HAVE_MKOSTEMPS=1; + HAVE_MKSTEMP=1; + HAVE_MKSTEMPS=1; + HAVE_POSIX_OPENPT=1; + HAVE_PTSNAME=1; + HAVE_PTSNAME_R=1; + HAVE_QSORT_R=1; + HAVE_RANDOM=1; + HAVE_RANDOM_H=1; + HAVE_RANDOM_R=1; + HAVE_REALPATH=1; + HAVE_RPMATCH=1; + HAVE_SECURE_GETENV=1; + HAVE_SETENV=1; + HAVE_DECL_SETENV=1; + HAVE_STRTOD=1; + HAVE_STRTOLL=1; + HAVE_STRTOULL=1; + HAVE_STRUCT_RANDOM_DATA=1; + HAVE_SYS_LOADAVG_H=0; + HAVE_UNLOCKPT=1; + HAVE_DECL_UNSETENV=1; + REPLACE_CALLOC=0; + REPLACE_CANONICALIZE_FILE_NAME=0; + REPLACE_MALLOC=0; + REPLACE_MBTOWC=0; + REPLACE_MKSTEMP=0; + REPLACE_PTSNAME=0; + REPLACE_PTSNAME_R=0; + REPLACE_PUTENV=0; + REPLACE_QSORT_R=0; + REPLACE_RANDOM_R=0; + REPLACE_REALLOC=0; + REPLACE_REALPATH=0; + REPLACE_SETENV=0; + REPLACE_STRTOD=0; + REPLACE_UNSETENV=0; + REPLACE_WCTOMB=0; - : + for ac_func in $gl_func_list +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF +fi +done @@ -7055,728 +6780,617 @@ done - : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5 +$as_echo_n "checking whether // is distinct from /... " >&6; } +if ${gl_cv_double_slash_root+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test x"$cross_compiling" = xyes ; then + # When cross-compiling, there is no way to tell whether // is special + # short of a list of hosts. However, the only known hosts to date + # that have a distinct // are Apollo DomainOS (too old to port to), + # Cygwin, and z/OS. If anyone knows of another system for which // has + # special semantics and is distinct from /, please report it to + # . + case $host in + *-cygwin | i370-ibm-openedition) + gl_cv_double_slash_root=yes ;; + *) + # Be optimistic and assume that / and // are the same when we + # don't know. + gl_cv_double_slash_root='unknown, assuming no' ;; + esac + else + set x `ls -di / // 2>/dev/null` + if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then + gl_cv_double_slash_root=no + else + gl_cv_double_slash_root=yes + fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5 +$as_echo "$gl_cv_double_slash_root" >&6; } + if test "$gl_cv_double_slash_root" = yes; then +$as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h - if test $ac_cv_func__set_invalid_parameter_handler = yes; then - HAVE_MSVC_INVALID_PARAMETER_HANDLER=1 + fi -$as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h - else - HAVE_MSVC_INVALID_PARAMETER_HANDLER=0 - fi + : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5 +$as_echo_n "checking whether realpath works... " >&6; } +if ${gl_cv_func_realpath_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + touch conftest.a + mkdir conftest.d + if test "$cross_compiling" = yes; then : + case "$host_os" in + # Guess yes on glibc systems. + *-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_realpath_works="guessing no" ;; + esac - GNULIB_OPENDIR=0; - GNULIB_READDIR=0; - GNULIB_REWINDDIR=0; - GNULIB_CLOSEDIR=0; - GNULIB_DIRFD=0; - GNULIB_FDOPENDIR=0; - GNULIB_SCANDIR=0; - GNULIB_ALPHASORT=0; - HAVE_OPENDIR=1; - HAVE_READDIR=1; - HAVE_REWINDDIR=1; - HAVE_CLOSEDIR=1; - HAVE_DECL_DIRFD=1; - HAVE_DECL_FDOPENDIR=1; - HAVE_FDOPENDIR=1; - HAVE_SCANDIR=1; - HAVE_ALPHASORT=1; - REPLACE_OPENDIR=0; - REPLACE_CLOSEDIR=0; - REPLACE_DIRFD=0; - REPLACE_FDOPENDIR=0; +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5 -$as_echo_n "checking whether the preprocessor supports include_next... " >&6; } -if ${gl_cv_have_include_next+:} false; then : - $as_echo_n "(cached) " >&6 -else - rm -rf conftestd1a conftestd1b conftestd2 - mkdir conftestd1a conftestd1b conftestd2 - cat < conftestd1a/conftest.h -#define DEFINED_IN_CONFTESTD1 -#include_next -#ifdef DEFINED_IN_CONFTESTD2 -int foo; +#include +#if defined __MACH__ && defined __APPLE__ +/* Avoid a crash on Mac OS X. */ +#include +#include +#include +#include +#include +#include +/* The exception port on which our thread listens. */ +static mach_port_t our_exception_port; +/* The main function of the thread listening for exceptions of type + EXC_BAD_ACCESS. */ +static void * +mach_exception_thread (void *arg) +{ + /* Buffer for a message to be received. */ + struct { + mach_msg_header_t head; + mach_msg_body_t msgh_body; + char data[1024]; + } msg; + mach_msg_return_t retval; + /* Wait for a message on the exception port. */ + retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg), + our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL); + if (retval != MACH_MSG_SUCCESS) + abort (); + exit (1); +} +static void +nocrash_init (void) +{ + mach_port_t self = mach_task_self (); + /* Allocate a port on which the thread shall listen for exceptions. */ + if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port) + == KERN_SUCCESS) { + /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */ + if (mach_port_insert_right (self, our_exception_port, our_exception_port, + MACH_MSG_TYPE_MAKE_SEND) + == KERN_SUCCESS) { + /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting + for us. */ + exception_mask_t mask = EXC_MASK_BAD_ACCESS; + /* Create the thread listening on the exception port. */ + pthread_attr_t attr; + pthread_t thread; + if (pthread_attr_init (&attr) == 0 + && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0 + && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) { + pthread_attr_destroy (&attr); + /* Replace the exception port info for these exceptions with our own. + Note that we replace the exception port for the entire task, not only + for a particular thread. This has the effect that when our exception + port gets the message, the thread specific exception port has already + been asked, and we don't need to bother about it. + See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */ + task_set_exception_ports (self, mask, our_exception_port, + EXCEPTION_DEFAULT, MACHINE_THREAD_STATE); + } + } + } +} +#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +/* Avoid a crash on native Windows. */ +#define WIN32_LEAN_AND_MEAN +#include +#include +static LONG WINAPI +exception_filter (EXCEPTION_POINTERS *ExceptionInfo) +{ + switch (ExceptionInfo->ExceptionRecord->ExceptionCode) + { + case EXCEPTION_ACCESS_VIOLATION: + case EXCEPTION_IN_PAGE_ERROR: + case EXCEPTION_STACK_OVERFLOW: + case EXCEPTION_GUARD_PAGE: + case EXCEPTION_PRIV_INSTRUCTION: + case EXCEPTION_ILLEGAL_INSTRUCTION: + case EXCEPTION_DATATYPE_MISALIGNMENT: + case EXCEPTION_ARRAY_BOUNDS_EXCEEDED: + case EXCEPTION_NONCONTINUABLE_EXCEPTION: + exit (1); + } + return EXCEPTION_CONTINUE_SEARCH; +} +static void +nocrash_init (void) +{ + SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter); +} #else -#error "include_next doesn't work" +/* Avoid a crash on POSIX systems. */ +#include +#include +/* A POSIX signal handler. */ +static void +exception_handler (int sig) +{ + _exit (1); +} +static void +nocrash_init (void) +{ +#ifdef SIGSEGV + signal (SIGSEGV, exception_handler); #endif -EOF - cat < conftestd1b/conftest.h -#define DEFINED_IN_CONFTESTD1 -#include -#include_next -#ifdef DEFINED_IN_CONFTESTD2 -int foo; -#else -#error "include_next doesn't work" +#ifdef SIGBUS + signal (SIGBUS, exception_handler); #endif -EOF - cat < conftestd2/conftest.h -#ifndef DEFINED_IN_CONFTESTD1 -#error "include_next test doesn't work" +} #endif -#define DEFINED_IN_CONFTESTD2 -EOF - gl_save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_have_include_next=yes -else - CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_have_include_next=buggy -else - gl_cv_have_include_next=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 - CPPFLAGS="$gl_save_CPPFLAGS" - rm -rf conftestd1a conftestd1b conftestd2 - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5 -$as_echo "$gl_cv_have_include_next" >&6; } - PRAGMA_SYSTEM_HEADER= - if test $gl_cv_have_include_next = yes; then - INCLUDE_NEXT=include_next - INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next - if test -n "$GCC"; then - PRAGMA_SYSTEM_HEADER='#pragma GCC system_header' - fi - else - if test $gl_cv_have_include_next = buggy; then - INCLUDE_NEXT=include - INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next - else - INCLUDE_NEXT=include - INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include - fi - fi + #include + #include +int +main () +{ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5 -$as_echo_n "checking whether system header files limit the line length... " >&6; } -if ${gl_cv_pragma_columns+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + int result = 0; + { + char *name = realpath ("conftest.a", NULL); + if (!(name && *name == '/')) + result |= 1; + free (name); + } + { + char *name = realpath ("conftest.b/../conftest.a", NULL); + if (name != NULL) + result |= 2; + free (name); + } + { + char *name = realpath ("conftest.a/", NULL); + if (name != NULL) + result |= 4; + free (name); + } + { + char *name1 = realpath (".", NULL); + char *name2 = realpath ("conftest.d//./..", NULL); + if (! name1 || ! name2 || strcmp (name1, name2)) + result |= 8; + free (name1); + free (name2); + } + return result; -#ifdef __TANDEM -choke me -#endif + ; + return 0; +} _ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "choke me" >/dev/null 2>&1; then : - gl_cv_pragma_columns=yes +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_realpath_works=yes else - gl_cv_pragma_columns=no + gl_cv_func_realpath_works=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f conftest* + rm -rf conftest.a conftest.d fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5 -$as_echo "$gl_cv_pragma_columns" >&6; } - if test $gl_cv_pragma_columns = yes; then - PRAGMA_COLUMNS="#pragma COLUMNS 10000" - else - PRAGMA_COLUMNS= - fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5 +$as_echo "$gl_cv_func_realpath_works" >&6; } + case "$gl_cv_func_realpath_works" in + *yes) +$as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h + ;; + esac + for ac_header in $gl_header_list +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF +fi +done - : + : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5 -$as_echo_n "checking if environ is properly declared... " >&6; } - if ${gt_cv_var_environ_declaration+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#if HAVE_UNISTD_H - #include - #endif - /* mingw, BeOS, Haiku declare environ in , not in . */ - #include - extern struct { int foo; } environ; -int -main () -{ -environ.foo = 1; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gt_cv_var_environ_declaration=no -else - gt_cv_var_environ_declaration=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5 -$as_echo "$gt_cv_var_environ_declaration" >&6; } - if test $gt_cv_var_environ_declaration = yes; then -$as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h - fi - if test $gt_cv_var_environ_declaration != yes; then - HAVE_DECL_ENVIRON=0 - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5 -$as_echo_n "checking for complete errno.h... " >&6; } -if ${gl_cv_header_errno_h_complete+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#if !defined ETXTBSY -booboo -#endif -#if !defined ENOMSG -booboo -#endif -#if !defined EIDRM -booboo -#endif -#if !defined ENOLINK -booboo -#endif -#if !defined EPROTO -booboo -#endif -#if !defined EMULTIHOP -booboo -#endif -#if !defined EBADMSG -booboo -#endif -#if !defined EOVERFLOW -booboo -#endif -#if !defined ENOTSUP -booboo -#endif -#if !defined ENETRESET -booboo -#endif -#if !defined ECONNABORTED -booboo -#endif -#if !defined ESTALE -booboo -#endif -#if !defined EDQUOT -booboo -#endif -#if !defined ECANCELED -booboo -#endif -#if !defined EOWNERDEAD -booboo -#endif -#if !defined ENOTRECOVERABLE -booboo -#endif -#if !defined EILSEQ -booboo -#endif + : -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "booboo" >/dev/null 2>&1; then : - gl_cv_header_errno_h_complete=no -else - gl_cv_header_errno_h_complete=yes -fi -rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5 -$as_echo "$gl_cv_header_errno_h_complete" >&6; } - if test $gl_cv_header_errno_h_complete = yes; then - ERRNO_H='' - else + GNULIB_CHDIR=0; + GNULIB_CHOWN=0; + GNULIB_CLOSE=0; + GNULIB_DUP=0; + GNULIB_DUP2=0; + GNULIB_DUP3=0; + GNULIB_ENVIRON=0; + GNULIB_EUIDACCESS=0; + GNULIB_FACCESSAT=0; + GNULIB_FCHDIR=0; + GNULIB_FCHOWNAT=0; + GNULIB_FDATASYNC=0; + GNULIB_FSYNC=0; + GNULIB_FTRUNCATE=0; + GNULIB_GETCWD=0; + GNULIB_GETDOMAINNAME=0; + GNULIB_GETDTABLESIZE=0; + GNULIB_GETGROUPS=0; + GNULIB_GETHOSTNAME=0; + GNULIB_GETLOGIN=0; + GNULIB_GETLOGIN_R=0; + GNULIB_GETPAGESIZE=0; + GNULIB_GETUSERSHELL=0; + GNULIB_GROUP_MEMBER=0; + GNULIB_ISATTY=0; + GNULIB_LCHOWN=0; + GNULIB_LINK=0; + GNULIB_LINKAT=0; + GNULIB_LSEEK=0; + GNULIB_PIPE=0; + GNULIB_PIPE2=0; + GNULIB_PREAD=0; + GNULIB_PWRITE=0; + GNULIB_READ=0; + GNULIB_READLINK=0; + GNULIB_READLINKAT=0; + GNULIB_RMDIR=0; + GNULIB_SETHOSTNAME=0; + GNULIB_SLEEP=0; + GNULIB_SYMLINK=0; + GNULIB_SYMLINKAT=0; + GNULIB_TTYNAME_R=0; + GNULIB_UNISTD_H_NONBLOCKING=0; + GNULIB_UNISTD_H_SIGPIPE=0; + GNULIB_UNLINK=0; + GNULIB_UNLINKAT=0; + GNULIB_USLEEP=0; + GNULIB_WRITE=0; + HAVE_CHOWN=1; + HAVE_DUP2=1; + HAVE_DUP3=1; + HAVE_EUIDACCESS=1; + HAVE_FACCESSAT=1; + HAVE_FCHDIR=1; + HAVE_FCHOWNAT=1; + HAVE_FDATASYNC=1; + HAVE_FSYNC=1; + HAVE_FTRUNCATE=1; + HAVE_GETDTABLESIZE=1; + HAVE_GETGROUPS=1; + HAVE_GETHOSTNAME=1; + HAVE_GETLOGIN=1; + HAVE_GETPAGESIZE=1; + HAVE_GROUP_MEMBER=1; + HAVE_LCHOWN=1; + HAVE_LINK=1; + HAVE_LINKAT=1; + HAVE_PIPE=1; + HAVE_PIPE2=1; + HAVE_PREAD=1; + HAVE_PWRITE=1; + HAVE_READLINK=1; + HAVE_READLINKAT=1; + HAVE_SETHOSTNAME=1; + HAVE_SLEEP=1; + HAVE_SYMLINK=1; + HAVE_SYMLINKAT=1; + HAVE_UNLINKAT=1; + HAVE_USLEEP=1; + HAVE_DECL_ENVIRON=1; + HAVE_DECL_FCHDIR=1; + HAVE_DECL_FDATASYNC=1; + HAVE_DECL_GETDOMAINNAME=1; + HAVE_DECL_GETLOGIN_R=1; + HAVE_DECL_GETPAGESIZE=1; + HAVE_DECL_GETUSERSHELL=1; + HAVE_DECL_SETHOSTNAME=1; + HAVE_DECL_TTYNAME_R=1; + HAVE_OS_H=0; + HAVE_SYS_PARAM_H=0; + REPLACE_CHOWN=0; + REPLACE_CLOSE=0; + REPLACE_DUP=0; + REPLACE_DUP2=0; + REPLACE_FCHOWNAT=0; + REPLACE_FTRUNCATE=0; + REPLACE_GETCWD=0; + REPLACE_GETDOMAINNAME=0; + REPLACE_GETDTABLESIZE=0; + REPLACE_GETLOGIN_R=0; + REPLACE_GETGROUPS=0; + REPLACE_GETPAGESIZE=0; + REPLACE_ISATTY=0; + REPLACE_LCHOWN=0; + REPLACE_LINK=0; + REPLACE_LINKAT=0; + REPLACE_LSEEK=0; + REPLACE_PREAD=0; + REPLACE_PWRITE=0; + REPLACE_READ=0; + REPLACE_READLINK=0; + REPLACE_READLINKAT=0; + REPLACE_RMDIR=0; + REPLACE_SLEEP=0; + REPLACE_SYMLINK=0; + REPLACE_SYMLINKAT=0; + REPLACE_TTYNAME_R=0; + REPLACE_UNLINK=0; + REPLACE_UNLINKAT=0; + REPLACE_USLEEP=0; + REPLACE_WRITE=0; + UNISTD_H_HAVE_WINSOCK2_H=0; + UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0; - if test $gl_cv_have_include_next = yes; then - gl_cv_next_errno_h='<'errno.h'>' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if ${gl_cv_next_errno_h+:} false; 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 '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 - NEXT_ERRNO_H=$gl_cv_next_errno_h - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'errno.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_errno_h - fi - NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive - ERRNO_H='errno.h' - fi - if test -n "$ERRNO_H"; then - GL_GENERATE_ERRNO_H_TRUE= - GL_GENERATE_ERRNO_H_FALSE='#' -else - GL_GENERATE_ERRNO_H_TRUE='#' - GL_GENERATE_ERRNO_H_FALSE= -fi - if test -n "$ERRNO_H"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5 -$as_echo_n "checking for EMULTIHOP value... " >&6; } -if ${gl_cv_header_errno_h_EMULTIHOP+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#ifdef EMULTIHOP -yes -#endif -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1; then : - gl_cv_header_errno_h_EMULTIHOP=yes -else - gl_cv_header_errno_h_EMULTIHOP=no -fi -rm -f conftest* - if test $gl_cv_header_errno_h_EMULTIHOP = no; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#define _XOPEN_SOURCE_EXTENDED 1 -#include -#ifdef EMULTIHOP -yes -#endif + : -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1; then : - gl_cv_header_errno_h_EMULTIHOP=hidden -fi -rm -f conftest* - if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then - if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" " -#define _XOPEN_SOURCE_EXTENDED 1 -#include -/* The following two lines are a workaround against an autoconf-2.52 bug. */ -#include -#include -"; then : -fi - fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5 -$as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; } - case $gl_cv_header_errno_h_EMULTIHOP in - yes | no) - EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE= - ;; - *) - EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP" - ;; - esac + if test $ac_cv_func__set_invalid_parameter_handler = yes; then + HAVE_MSVC_INVALID_PARAMETER_HANDLER=1 +$as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h + else + HAVE_MSVC_INVALID_PARAMETER_HANDLER=0 fi - if test -n "$ERRNO_H"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5 -$as_echo_n "checking for ENOLINK value... " >&6; } -if ${gl_cv_header_errno_h_ENOLINK+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#ifdef ENOLINK -yes -#endif -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1; then : - gl_cv_header_errno_h_ENOLINK=yes -else - gl_cv_header_errno_h_ENOLINK=no -fi -rm -f conftest* - if test $gl_cv_header_errno_h_ENOLINK = no; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#define _XOPEN_SOURCE_EXTENDED 1 -#include -#ifdef ENOLINK -yes -#endif -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1; then : - gl_cv_header_errno_h_ENOLINK=hidden -fi -rm -f conftest* - if test $gl_cv_header_errno_h_ENOLINK = hidden; then - if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" " -#define _XOPEN_SOURCE_EXTENDED 1 -#include -/* The following two lines are a workaround against an autoconf-2.52 bug. */ -#include -#include -"; then : -fi - fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5 -$as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; } - case $gl_cv_header_errno_h_ENOLINK in - yes | no) - ENOLINK_HIDDEN=0; ENOLINK_VALUE= - ;; - *) - ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK" - ;; - esac + GNULIB_OPENDIR=0; + GNULIB_READDIR=0; + GNULIB_REWINDDIR=0; + GNULIB_CLOSEDIR=0; + GNULIB_DIRFD=0; + GNULIB_FDOPENDIR=0; + GNULIB_SCANDIR=0; + GNULIB_ALPHASORT=0; + HAVE_OPENDIR=1; + HAVE_READDIR=1; + HAVE_REWINDDIR=1; + HAVE_CLOSEDIR=1; + HAVE_DECL_DIRFD=1; + HAVE_DECL_FDOPENDIR=1; + HAVE_FDOPENDIR=1; + HAVE_SCANDIR=1; + HAVE_ALPHASORT=1; + REPLACE_OPENDIR=0; + REPLACE_CLOSEDIR=0; + REPLACE_DIRFD=0; + REPLACE_FDOPENDIR=0; - fi - if test -n "$ERRNO_H"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5 -$as_echo_n "checking for EOVERFLOW value... " >&6; } -if ${gl_cv_header_errno_h_EOVERFLOW+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5 +$as_echo_n "checking whether the preprocessor supports include_next... " >&6; } +if ${gl_cv_have_include_next+:} false; then : $as_echo_n "(cached) " >&6 else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#ifdef EOVERFLOW -yes + rm -rf conftestd1a conftestd1b conftestd2 + mkdir conftestd1a conftestd1b conftestd2 + cat < conftestd1a/conftest.h +#define DEFINED_IN_CONFTESTD1 +#include_next +#ifdef DEFINED_IN_CONFTESTD2 +int foo; +#else +#error "include_next doesn't work" #endif - +EOF + cat < conftestd1b/conftest.h +#define DEFINED_IN_CONFTESTD1 +#include +#include_next +#ifdef DEFINED_IN_CONFTESTD2 +int foo; +#else +#error "include_next doesn't work" +#endif +EOF + cat < conftestd2/conftest.h +#ifndef DEFINED_IN_CONFTESTD1 +#error "include_next test doesn't work" +#endif +#define DEFINED_IN_CONFTESTD2 +EOF + gl_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include _ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1; then : - gl_cv_header_errno_h_EOVERFLOW=yes +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_have_include_next=yes else - gl_cv_header_errno_h_EOVERFLOW=no -fi -rm -f conftest* - - if test $gl_cv_header_errno_h_EOVERFLOW = no; then + CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - -#define _XOPEN_SOURCE_EXTENDED 1 -#include -#ifdef EOVERFLOW -yes -#endif - +#include _ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1; then : - gl_cv_header_errno_h_EOVERFLOW=hidden +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_have_include_next=buggy +else + gl_cv_have_include_next=no fi -rm -f conftest* - - if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then - if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" " -#define _XOPEN_SOURCE_EXTENDED 1 -#include -/* The following two lines are a workaround against an autoconf-2.52 bug. */ -#include -#include -"; then : +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - - fi - fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CPPFLAGS="$gl_save_CPPFLAGS" + rm -rf conftestd1a conftestd1b conftestd2 fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5 -$as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; } - case $gl_cv_header_errno_h_EOVERFLOW in - yes | no) - EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE= - ;; - *) - EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW" - ;; - esac - - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5 +$as_echo "$gl_cv_have_include_next" >&6; } + PRAGMA_SYSTEM_HEADER= + if test $gl_cv_have_include_next = yes; then + INCLUDE_NEXT=include_next + INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next + if test -n "$GCC"; then + PRAGMA_SYSTEM_HEADER='#pragma GCC system_header' + fi + else + if test $gl_cv_have_include_next = buggy; then + INCLUDE_NEXT=include + INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next + else + INCLUDE_NEXT=include + INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include + fi fi -ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default" -if test "x$ac_cv_have_decl_strerror_r" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_STRERROR_R $ac_have_decl -_ACEOF - -for ac_func in strerror_r -do : - ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r" -if test "x$ac_cv_func_strerror_r" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_STRERROR_R 1 -_ACEOF - -fi -done -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5 -$as_echo_n "checking whether strerror_r returns char *... " >&6; } -if ${ac_cv_func_strerror_r_char_p+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5 +$as_echo_n "checking whether system header files limit the line length... " >&6; } +if ${gl_cv_pragma_columns+:} false; then : $as_echo_n "(cached) " >&6 else - - ac_cv_func_strerror_r_char_p=no - if test $ac_cv_have_decl_strerror_r = yes; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_includes_default -int -main () -{ - char buf[100]; - char x = *strerror_r (0, buf, sizeof buf); - char *p = strerror_r (0, buf, sizeof buf); - return !p || x; +#ifdef __TANDEM +choke me +#endif - ; - return 0; -} _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_func_strerror_r_char_p=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - else - # strerror_r is not declared. Choose between - # systems that have relatively inaccessible declarations for the - # function. BeOS and DEC UNIX 4.0 fall in this category, but the - # former has a strerror_r that returns char*, while the latter - # has a strerror_r that returns `int'. - # This test should segfault on the DEC system. - if test "$cross_compiling" = yes; then : - : +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "choke me" >/dev/null 2>&1; then : + gl_cv_pragma_columns=yes else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default - extern char *strerror_r (); -int -main () -{ -char buf[100]; - char x = *strerror_r (0, buf, sizeof buf); - return ! isalpha (x); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_func_strerror_r_char_p=yes -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5 -$as_echo "$ac_cv_func_strerror_r_char_p" >&6; } -if test $ac_cv_func_strerror_r_char_p = yes; then - -$as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h - + gl_cv_pragma_columns=no fi +rm -f conftest* - XGETTEXT_EXTRA_OPTIONS= - - - - - - ac_fn_c_check_decl "$LINENO" "fchdir" "ac_cv_have_decl_fchdir" "$ac_includes_default" -if test "x$ac_cv_have_decl_fchdir" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_FCHDIR $ac_have_decl -_ACEOF +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5 +$as_echo "$gl_cv_pragma_columns" >&6; } + if test $gl_cv_pragma_columns = yes; then + PRAGMA_COLUMNS="#pragma COLUMNS 10000" + else + PRAGMA_COLUMNS= + fi - GNULIB_FCNTL=0; - GNULIB_NONBLOCKING=0; - GNULIB_OPEN=0; - GNULIB_OPENAT=0; - HAVE_FCNTL=1; - HAVE_OPENAT=1; - REPLACE_FCNTL=0; - REPLACE_OPEN=0; - REPLACE_OPENAT=0; @@ -7786,231 +7400,138 @@ _ACEOF + : - : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5 +$as_echo_n "checking if environ is properly declared... " >&6; } + if ${gt_cv_var_environ_declaration+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if HAVE_UNISTD_H + #include + #endif + /* mingw, BeOS, Haiku declare environ in , not in . */ + #include + extern struct { int foo; } environ; +int +main () +{ +environ.foo = 1; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gt_cv_var_environ_declaration=no +else + gt_cv_var_environ_declaration=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5 +$as_echo "$gt_cv_var_environ_declaration" >&6; } + if test $gt_cv_var_environ_declaration = yes; then +$as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h - : + fi + if test $gt_cv_var_environ_declaration != yes; then + HAVE_DECL_ENVIRON=0 + fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5 -$as_echo_n "checking for working fcntl.h... " >&6; } -if ${gl_cv_header_working_fcntl_h+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5 +$as_echo_n "checking for complete errno.h... " >&6; } +if ${gl_cv_header_errno_h_complete+:} false; then : $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then : - case "$host_os" in - # Guess 'no' on native Windows. - mingw*) gl_cv_header_working_fcntl_h='no' ;; - *) gl_cv_header_working_fcntl_h=cross-compiling ;; - esac -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - #include - #if HAVE_UNISTD_H - # include - #else /* on Windows with MSVC */ - # include - # include - # defined sleep(n) _sleep ((n) * 1000) - #endif - #include - #ifndef O_NOATIME - #define O_NOATIME 0 - #endif - #ifndef O_NOFOLLOW - #define O_NOFOLLOW 0 - #endif - static int const constants[] = - { - O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND, - O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY - }; - -int -main () -{ - int result = !constants; - #if HAVE_SYMLINK - { - static char const sym[] = "conftest.sym"; - if (symlink ("/dev/null", sym) != 0) - result |= 2; - else - { - int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0); - if (fd >= 0) - { - close (fd); - result |= 4; - } - } - if (unlink (sym) != 0 || symlink (".", sym) != 0) - result |= 2; - else - { - int fd = open (sym, O_RDONLY | O_NOFOLLOW); - if (fd >= 0) - { - close (fd); - result |= 4; - } - } - unlink (sym); - } - #endif - { - static char const file[] = "confdefs.h"; - int fd = open (file, O_RDONLY | O_NOATIME); - if (fd < 0) - result |= 8; - else - { - struct stat st0; - if (fstat (fd, &st0) != 0) - result |= 16; - else - { - char c; - sleep (1); - if (read (fd, &c, 1) != 1) - result |= 24; - else - { - if (close (fd) != 0) - result |= 32; - else - { - struct stat st1; - if (stat (file, &st1) != 0) - result |= 40; - else - if (st0.st_atime != st1.st_atime) - result |= 64; - } - } - } - } - } - return result; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_header_working_fcntl_h=yes -else - case $? in #( - 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #( - 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #( - 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #( - *) gl_cv_header_working_fcntl_h='no';; - esac -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5 -$as_echo "$gl_cv_header_working_fcntl_h" >&6; } - - case $gl_cv_header_working_fcntl_h in #( - *O_NOATIME* | no | cross-compiling) ac_val=0;; #( - *) ac_val=1;; - esac - -cat >>confdefs.h <<_ACEOF -#define HAVE_WORKING_O_NOATIME $ac_val -_ACEOF - - - case $gl_cv_header_working_fcntl_h in #( - *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #( - *) ac_val=1;; - esac +#include +#if !defined ETXTBSY +booboo +#endif +#if !defined ENOMSG +booboo +#endif +#if !defined EIDRM +booboo +#endif +#if !defined ENOLINK +booboo +#endif +#if !defined EPROTO +booboo +#endif +#if !defined EMULTIHOP +booboo +#endif +#if !defined EBADMSG +booboo +#endif +#if !defined EOVERFLOW +booboo +#endif +#if !defined ENOTSUP +booboo +#endif +#if !defined ENETRESET +booboo +#endif +#if !defined ECONNABORTED +booboo +#endif +#if !defined ESTALE +booboo +#endif +#if !defined EDQUOT +booboo +#endif +#if !defined ECANCELED +booboo +#endif +#if !defined EOWNERDEAD +booboo +#endif +#if !defined ENOTRECOVERABLE +booboo +#endif +#if !defined EILSEQ +booboo +#endif -cat >>confdefs.h <<_ACEOF -#define HAVE_WORKING_O_NOFOLLOW $ac_val _ACEOF - - -ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" -if test "x$ac_cv_type_pid_t" = xyes; then : - +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "booboo" >/dev/null 2>&1; then : + gl_cv_header_errno_h_complete=no else - -cat >>confdefs.h <<_ACEOF -#define pid_t int -_ACEOF - + gl_cv_header_errno_h_complete=yes fi +rm -f conftest* -ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default" -if test "x$ac_cv_type_mode_t" = xyes; then : - -else - -cat >>confdefs.h <<_ACEOF -#define mode_t int -_ACEOF fi - - - - - - - - - - - - - GNULIB_FNMATCH=0; - HAVE_FNMATCH=1; - REPLACE_FNMATCH=0; - - - - - - - - - - - : - - - - - - - - - - - - : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5 +$as_echo "$gl_cv_header_errno_h_complete" >&6; } + if test $gl_cv_header_errno_h_complete = yes; then + ERRNO_H='' + else @@ -8020,22 +7541,19 @@ fi if test $gl_cv_have_include_next = yes; then - gl_cv_next_fnmatch_h='<'fnmatch.h'>' + gl_cv_next_errno_h='<'errno.h'>' else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if ${gl_cv_next_fnmatch_h+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 +$as_echo_n "checking absolute name of ... " >&6; } +if ${gl_cv_next_errno_h+:} false; then : $as_echo_n "(cached) " >&6 else - if test $ac_cv_header_fnmatch_h = yes; then - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#include _ACEOF case "$host_os" in aix*) gl_absname_cpp="$ac_cpp -C" ;; @@ -8051,7 +7569,7 @@ _ACEOF ;; esac gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' - gl_header_literal_regex=`echo 'fnmatch.h' \ + 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/ @@ -8060,930 +7578,999 @@ _ACEOF q }' - gl_cv_absolute_fnmatch_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + 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_fnmatch_h - gl_cv_next_fnmatch_h='"'$gl_header'"' - else - gl_cv_next_fnmatch_h='<'fnmatch.h'>' - fi + 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_fnmatch_h" >&5 -$as_echo "$gl_cv_next_fnmatch_h" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5 +$as_echo "$gl_cv_next_errno_h" >&6; } fi - NEXT_FNMATCH_H=$gl_cv_next_fnmatch_h + NEXT_ERRNO_H=$gl_cv_next_errno_h if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'fnmatch.h'>' + gl_next_as_first_directive='<'errno.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_fnmatch_h + gl_next_as_first_directive=$gl_cv_next_errno_h fi - NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H=$gl_next_as_first_directive - - - + NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive - if test $ac_cv_header_fnmatch_h = yes; then - HAVE_FNMATCH_H=1 - else - HAVE_FNMATCH_H=0 + ERRNO_H='errno.h' fi - - FNMATCH_H='' - if false; then - FNMATCH_H=fnmatch.h - else - if test $ac_cv_header_fnmatch_h != yes; then - FNMATCH_H=fnmatch.h - fi - fi - - - if test -n "$FNMATCH_H"; then - GL_GENERATE_FNMATCH_H_TRUE= - GL_GENERATE_FNMATCH_H_FALSE='#' + if test -n "$ERRNO_H"; then + GL_GENERATE_ERRNO_H_TRUE= + GL_GENERATE_ERRNO_H_FALSE='#' else - GL_GENERATE_FNMATCH_H_TRUE='#' - GL_GENERATE_FNMATCH_H_FALSE= + GL_GENERATE_ERRNO_H_TRUE='#' + GL_GENERATE_ERRNO_H_FALSE= fi + if test -n "$ERRNO_H"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5 +$as_echo_n "checking for EMULTIHOP value... " >&6; } +if ${gl_cv_header_errno_h_EMULTIHOP+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#ifdef EMULTIHOP +yes +#endif - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5 -$as_echo_n "checking for mbstate_t... " >&6; } -if ${ac_cv_type_mbstate_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include -int -main () -{ -mbstate_t x; return sizeof x; - ; - return 0; -} _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_type_mbstate_t=yes +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + gl_cv_header_errno_h_EMULTIHOP=yes else - ac_cv_type_mbstate_t=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + gl_cv_header_errno_h_EMULTIHOP=no fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5 -$as_echo "$ac_cv_type_mbstate_t" >&6; } - if test $ac_cv_type_mbstate_t = yes; then +rm -f conftest* -$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h + if test $gl_cv_header_errno_h_EMULTIHOP = no; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - else +#define _XOPEN_SOURCE_EXTENDED 1 +#include +#ifdef EMULTIHOP +yes +#endif -$as_echo "#define mbstate_t int" >>confdefs.h +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + gl_cv_header_errno_h_EMULTIHOP=hidden +fi +rm -f conftest* - fi + if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then + if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" " +#define _XOPEN_SOURCE_EXTENDED 1 +#include +/* The following two lines are a workaround against an autoconf-2.52 bug. */ +#include +#include +"; then : +fi + fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5 +$as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; } + case $gl_cv_header_errno_h_EMULTIHOP in + yes | no) + EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE= + ;; + *) + EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP" + ;; + esac + fi + if test -n "$ERRNO_H"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5 +$as_echo_n "checking for ENOLINK value... " >&6; } +if ${gl_cv_header_errno_h_ENOLINK+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#ifdef ENOLINK +yes +#endif +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + gl_cv_header_errno_h_ENOLINK=yes +else + gl_cv_header_errno_h_ENOLINK=no +fi +rm -f conftest* + if test $gl_cv_header_errno_h_ENOLINK = no; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define _XOPEN_SOURCE_EXTENDED 1 +#include +#ifdef ENOLINK +yes +#endif +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + gl_cv_header_errno_h_ENOLINK=hidden +fi +rm -f conftest* + if test $gl_cv_header_errno_h_ENOLINK = hidden; then + if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" " +#define _XOPEN_SOURCE_EXTENDED 1 +#include +/* The following two lines are a workaround against an autoconf-2.52 bug. */ +#include +#include +"; then : +fi + fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5 +$as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; } + case $gl_cv_header_errno_h_ENOLINK in + yes | no) + ENOLINK_HIDDEN=0; ENOLINK_VALUE= + ;; + *) + ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK" + ;; + esac + fi + if test -n "$ERRNO_H"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5 +$as_echo_n "checking for EOVERFLOW value... " >&6; } +if ${gl_cv_header_errno_h_EOVERFLOW+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#ifdef EOVERFLOW +yes +#endif +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + gl_cv_header_errno_h_EOVERFLOW=yes +else + gl_cv_header_errno_h_EOVERFLOW=no +fi +rm -f conftest* + if test $gl_cv_header_errno_h_EOVERFLOW = no; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define _XOPEN_SOURCE_EXTENDED 1 +#include +#ifdef EOVERFLOW +yes +#endif +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : + gl_cv_header_errno_h_EOVERFLOW=hidden +fi +rm -f conftest* + if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then + if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" " +#define _XOPEN_SOURCE_EXTENDED 1 +#include +/* The following two lines are a workaround against an autoconf-2.52 bug. */ +#include +#include +"; then : +fi + fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5 +$as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; } + case $gl_cv_header_errno_h_EOVERFLOW in + yes | no) + EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE= + ;; + *) + EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW" + ;; + esac + fi +ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default" +if test "x$ac_cv_have_decl_strerror_r" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_STRERROR_R $ac_have_decl +_ACEOF +for ac_func in strerror_r +do : + ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r" +if test "x$ac_cv_func_strerror_r" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STRERROR_R 1 +_ACEOF +fi +done +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5 +$as_echo_n "checking whether strerror_r returns char *... " >&6; } +if ${ac_cv_func_strerror_r_char_p+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_func_strerror_r_char_p=no + if test $ac_cv_have_decl_strerror_r = yes; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ + char buf[100]; + char x = *strerror_r (0, buf, sizeof buf); + char *p = strerror_r (0, buf, sizeof buf); + return !p || x; - GNULIB_ACOSF=0; - GNULIB_ACOSL=0; - GNULIB_ASINF=0; - GNULIB_ASINL=0; - GNULIB_ATANF=0; - GNULIB_ATANL=0; - GNULIB_ATAN2F=0; - GNULIB_CBRT=0; - GNULIB_CBRTF=0; - GNULIB_CBRTL=0; - GNULIB_CEIL=0; - GNULIB_CEILF=0; - GNULIB_CEILL=0; - GNULIB_COPYSIGN=0; - GNULIB_COPYSIGNF=0; - GNULIB_COPYSIGNL=0; - GNULIB_COSF=0; - GNULIB_COSL=0; - GNULIB_COSHF=0; - GNULIB_EXPF=0; - GNULIB_EXPL=0; - GNULIB_EXP2=0; - GNULIB_EXP2F=0; - GNULIB_EXP2L=0; - GNULIB_EXPM1=0; - GNULIB_EXPM1F=0; - GNULIB_EXPM1L=0; - GNULIB_FABSF=0; - GNULIB_FABSL=0; - GNULIB_FLOOR=0; - GNULIB_FLOORF=0; - GNULIB_FLOORL=0; - GNULIB_FMA=0; - GNULIB_FMAF=0; - GNULIB_FMAL=0; - GNULIB_FMOD=0; - GNULIB_FMODF=0; - GNULIB_FMODL=0; - GNULIB_FREXPF=0; - GNULIB_FREXP=0; - GNULIB_FREXPL=0; - GNULIB_HYPOT=0; - GNULIB_HYPOTF=0; - GNULIB_HYPOTL=0; - GNULIB_ILOGB=0; - GNULIB_ILOGBF=0; - GNULIB_ILOGBL=0; - GNULIB_ISFINITE=0; - GNULIB_ISINF=0; - GNULIB_ISNAN=0; - GNULIB_ISNANF=0; - GNULIB_ISNAND=0; - GNULIB_ISNANL=0; - GNULIB_LDEXPF=0; - GNULIB_LDEXPL=0; - GNULIB_LOG=0; - GNULIB_LOGF=0; - GNULIB_LOGL=0; - GNULIB_LOG10=0; - GNULIB_LOG10F=0; - GNULIB_LOG10L=0; - GNULIB_LOG1P=0; - GNULIB_LOG1PF=0; - GNULIB_LOG1PL=0; - GNULIB_LOG2=0; - GNULIB_LOG2F=0; - GNULIB_LOG2L=0; - GNULIB_LOGB=0; - GNULIB_LOGBF=0; - GNULIB_LOGBL=0; - GNULIB_MODF=0; - GNULIB_MODFF=0; - GNULIB_MODFL=0; - GNULIB_POWF=0; - GNULIB_REMAINDER=0; - GNULIB_REMAINDERF=0; - GNULIB_REMAINDERL=0; - GNULIB_RINT=0; - GNULIB_RINTF=0; - GNULIB_RINTL=0; - GNULIB_ROUND=0; - GNULIB_ROUNDF=0; - GNULIB_ROUNDL=0; - GNULIB_SIGNBIT=0; - GNULIB_SINF=0; - GNULIB_SINL=0; - GNULIB_SINHF=0; - GNULIB_SQRTF=0; - GNULIB_SQRTL=0; - GNULIB_TANF=0; - GNULIB_TANL=0; - GNULIB_TANHF=0; - GNULIB_TRUNC=0; - GNULIB_TRUNCF=0; - GNULIB_TRUNCL=0; - HAVE_ACOSF=1; - HAVE_ACOSL=1; - HAVE_ASINF=1; - HAVE_ASINL=1; - HAVE_ATANF=1; - HAVE_ATANL=1; - HAVE_ATAN2F=1; - HAVE_CBRT=1; - HAVE_CBRTF=1; - HAVE_CBRTL=1; - HAVE_COPYSIGN=1; - HAVE_COPYSIGNL=1; - HAVE_COSF=1; - HAVE_COSL=1; - HAVE_COSHF=1; - HAVE_EXPF=1; - HAVE_EXPL=1; - HAVE_EXPM1=1; - HAVE_EXPM1F=1; - HAVE_FABSF=1; - HAVE_FABSL=1; - HAVE_FMA=1; - HAVE_FMAF=1; - HAVE_FMAL=1; - HAVE_FMODF=1; - HAVE_FMODL=1; - HAVE_FREXPF=1; - HAVE_HYPOTF=1; - HAVE_HYPOTL=1; - HAVE_ILOGB=1; - HAVE_ILOGBF=1; - HAVE_ILOGBL=1; - HAVE_ISNANF=1; - HAVE_ISNAND=1; - HAVE_ISNANL=1; - HAVE_LDEXPF=1; - HAVE_LOGF=1; - HAVE_LOGL=1; - HAVE_LOG10F=1; - HAVE_LOG10L=1; - HAVE_LOG1P=1; - HAVE_LOG1PF=1; - HAVE_LOG1PL=1; - HAVE_LOGBF=1; - HAVE_LOGBL=1; - HAVE_MODFF=1; - HAVE_MODFL=1; - HAVE_POWF=1; - HAVE_REMAINDER=1; - HAVE_REMAINDERF=1; - HAVE_RINT=1; - HAVE_RINTL=1; - HAVE_SINF=1; - HAVE_SINL=1; - HAVE_SINHF=1; - HAVE_SQRTF=1; - HAVE_SQRTL=1; - HAVE_TANF=1; - HAVE_TANL=1; - HAVE_TANHF=1; - HAVE_DECL_ACOSL=1; - HAVE_DECL_ASINL=1; - HAVE_DECL_ATANL=1; - HAVE_DECL_CBRTF=1; - HAVE_DECL_CBRTL=1; - HAVE_DECL_CEILF=1; - HAVE_DECL_CEILL=1; - HAVE_DECL_COPYSIGNF=1; - HAVE_DECL_COSL=1; - HAVE_DECL_EXPL=1; - HAVE_DECL_EXP2=1; - HAVE_DECL_EXP2F=1; - HAVE_DECL_EXP2L=1; - HAVE_DECL_EXPM1L=1; - HAVE_DECL_FLOORF=1; - HAVE_DECL_FLOORL=1; - HAVE_DECL_FREXPL=1; - HAVE_DECL_LDEXPL=1; - HAVE_DECL_LOGL=1; - HAVE_DECL_LOG10L=1; - HAVE_DECL_LOG2=1; - HAVE_DECL_LOG2F=1; - HAVE_DECL_LOG2L=1; - HAVE_DECL_LOGB=1; - HAVE_DECL_REMAINDER=1; - HAVE_DECL_REMAINDERL=1; - HAVE_DECL_RINTF=1; - HAVE_DECL_ROUND=1; - HAVE_DECL_ROUNDF=1; - HAVE_DECL_ROUNDL=1; - HAVE_DECL_SINL=1; - HAVE_DECL_SQRTL=1; - HAVE_DECL_TANL=1; - HAVE_DECL_TRUNC=1; - HAVE_DECL_TRUNCF=1; - HAVE_DECL_TRUNCL=1; - REPLACE_ACOSF=0; - REPLACE_ASINF=0; - REPLACE_ATANF=0; - REPLACE_ATAN2F=0; - REPLACE_CBRTF=0; - REPLACE_CBRTL=0; - REPLACE_CEIL=0; - REPLACE_CEILF=0; - REPLACE_CEILL=0; - REPLACE_COSF=0; - REPLACE_COSHF=0; - REPLACE_EXPF=0; - REPLACE_EXPM1=0; - REPLACE_EXPM1F=0; - REPLACE_EXP2=0; - REPLACE_EXP2L=0; - REPLACE_FABSL=0; - REPLACE_FLOOR=0; - REPLACE_FLOORF=0; - REPLACE_FLOORL=0; - REPLACE_FMA=0; - REPLACE_FMAF=0; - REPLACE_FMAL=0; - REPLACE_FMOD=0; - REPLACE_FMODF=0; - REPLACE_FMODL=0; - REPLACE_FREXPF=0; - REPLACE_FREXP=0; - REPLACE_FREXPL=0; - REPLACE_HUGE_VAL=0; - REPLACE_HYPOT=0; - REPLACE_HYPOTF=0; - REPLACE_HYPOTL=0; - REPLACE_ILOGB=0; - REPLACE_ILOGBF=0; - REPLACE_ILOGBL=0; - REPLACE_ISFINITE=0; - REPLACE_ISINF=0; - REPLACE_ISNAN=0; - REPLACE_LDEXPL=0; - REPLACE_LOG=0; - REPLACE_LOGF=0; - REPLACE_LOGL=0; - REPLACE_LOG10=0; - REPLACE_LOG10F=0; - REPLACE_LOG10L=0; - REPLACE_LOG1P=0; - REPLACE_LOG1PF=0; - REPLACE_LOG1PL=0; - REPLACE_LOG2=0; - REPLACE_LOG2F=0; - REPLACE_LOG2L=0; - REPLACE_LOGB=0; - REPLACE_LOGBF=0; - REPLACE_LOGBL=0; - REPLACE_MODF=0; - REPLACE_MODFF=0; - REPLACE_MODFL=0; - REPLACE_NAN=0; - REPLACE_REMAINDER=0; - REPLACE_REMAINDERF=0; - REPLACE_REMAINDERL=0; - REPLACE_ROUND=0; - REPLACE_ROUNDF=0; - REPLACE_ROUNDL=0; - REPLACE_SIGNBIT=0; - REPLACE_SIGNBIT_USING_GCC=0; - REPLACE_SINF=0; - REPLACE_SINHF=0; - REPLACE_SQRTF=0; - REPLACE_SQRTL=0; - REPLACE_TANF=0; - REPLACE_TANHF=0; - REPLACE_TRUNC=0; - REPLACE_TRUNCF=0; - REPLACE_TRUNCL=0; - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used without linking with libm" >&5 -$as_echo_n "checking whether frexp() can be used without linking with libm... " >&6; } -if ${gl_cv_func_frexp_no_libm+:} false; then : - $as_echo_n "(cached) " >&6 -else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - double x; -int -main () -{ -int e; return frexp (x, &e) > 0; ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - gl_cv_func_frexp_no_libm=yes -else - gl_cv_func_frexp_no_libm=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_func_strerror_r_char_p=yes 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" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_ALARM $ac_have_decl -_ACEOF - - - - - - FREXP_LIBM= - if test $gl_cv_func_frexp_no_libm = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used with libm" >&5 -$as_echo_n "checking whether frexp() can be used with libm... " >&6; } -if ${gl_cv_func_frexp_in_libm+:} false; then : - $as_echo_n "(cached) " >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + else + # strerror_r is not declared. Choose between + # systems that have relatively inaccessible declarations for the + # function. BeOS and DEC UNIX 4.0 fall in this category, but the + # former has a strerror_r that returns char*, while the latter + # has a strerror_r that returns `int'. + # This test should segfault on the DEC system. + if test "$cross_compiling" = yes; then : + : else - - save_LIBS="$LIBS" - LIBS="$LIBS -lm" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - double x; +$ac_includes_default + extern char *strerror_r (); int main () { -int e; return frexp (x, &e) > 0; +char buf[100]; + char x = *strerror_r (0, buf, sizeof buf); + return ! isalpha (x); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - gl_cv_func_frexp_in_libm=yes -else - gl_cv_func_frexp_in_libm=no +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_strerror_r_char_p=yes fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS="$save_LIBS" - +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_in_libm" >&5 -$as_echo "$gl_cv_func_frexp_in_libm" >&6; } - if test $gl_cv_func_frexp_in_libm = yes; then - FREXP_LIBM=-lm + fi - fi - if test $gl_cv_func_frexp_no_libm = yes \ - || test $gl_cv_func_frexp_in_libm = yes; then - save_LIBS="$LIBS" - LIBS="$LIBS $FREXP_LIBM" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5 +$as_echo "$ac_cv_func_strerror_r_char_p" >&6; } +if test $ac_cv_func_strerror_r_char_p = yes; then +$as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h - : +fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5 -$as_echo_n "checking whether frexp works... " >&6; } -if ${gl_cv_func_frexp_works+:} false; then : - $as_echo_n "(cached) " >&6 + ac_fn_c_check_decl "$LINENO" "fchdir" "ac_cv_have_decl_fchdir" "$ac_includes_default" +if test "x$ac_cv_have_decl_fchdir" = xyes; then : + ac_have_decl=1 else + ac_have_decl=0 +fi - if test "$cross_compiling" = yes; then : - case "$host_os" in - netbsd* | irix*) gl_cv_func_frexp_works="guessing no" ;; - mingw*) # Guess yes with MSVC, no with mingw. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_FCHDIR $ac_have_decl +_ACEOF -#ifdef _MSC_VER - Good -#endif -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "Good" >/dev/null 2>&1; then : - gl_cv_func_frexp_works="guessing yes" -else - gl_cv_func_frexp_works="guessing no" -fi -rm -f conftest* - ;; - *) gl_cv_func_frexp_works="guessing yes" ;; - esac + GNULIB_FCNTL=0; + GNULIB_NONBLOCKING=0; + GNULIB_OPEN=0; + GNULIB_OPENAT=0; + HAVE_FCNTL=1; + HAVE_OPENAT=1; + REPLACE_FCNTL=0; + REPLACE_OPEN=0; + REPLACE_OPENAT=0; -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#if HAVE_DECL_ALARM -# include -# include -#endif -/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0. - ICC 10.0 has a bug when optimizing the expression -zero. - The expression -DBL_MIN * DBL_MIN does not work when cross-compiling - to PowerPC on Mac OS X 10.5. */ -#if defined __hpux || defined __sgi || defined __ICC -static double -compute_minus_zero (void) -{ - return -DBL_MIN * DBL_MIN; -} -# define minus_zero compute_minus_zero () -#else -double minus_zero = -0.0; -#endif -int main() -{ - int result = 0; - int i; - volatile double x; - double zero = 0.0; -#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. */ - for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5) - ; - if (x > 0.0) - { - int exp; - double y = frexp (x, &exp); - /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022. - On NetBSD: y = 0.75. Correct: y = 0.5. */ - if (y != 0.5) - result |= 1; - } - /* Test on infinite numbers. */ - x = 1.0 / zero; - { - int exp; - double y = frexp (x, &exp); - if (y != x) - result |= 2; - } - /* Test on negative zero. */ - x = minus_zero; - { - int exp; - double y = frexp (x, &exp); - if (memcmp (&y, &x, sizeof x)) - result |= 4; - } - return result; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_frexp_works=yes -else - gl_cv_func_frexp_works=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5 -$as_echo "$gl_cv_func_frexp_works" >&6; } - LIBS="$save_LIBS" - case "$gl_cv_func_frexp_works" in - *yes) gl_func_frexp=yes ;; - *) gl_func_frexp=no; REPLACE_FREXP=1; FREXP_LIBM= ;; - esac - else - gl_func_frexp=no - fi - if test $gl_func_frexp = yes; then -$as_echo "#define HAVE_FREXP 1" >>confdefs.h - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long double and double are the same" >&5 -$as_echo_n "checking whether long double and double are the same... " >&6; } -if ${gl_cv_long_double_equals_double+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -typedef int check[sizeof (long double) == sizeof (double) - && LDBL_MANT_DIG == DBL_MANT_DIG - && LDBL_MAX_EXP == DBL_MAX_EXP - && LDBL_MIN_EXP == DBL_MIN_EXP - ? 1 : -1]; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_long_double_equals_double=yes -else - gl_cv_long_double_equals_double=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_long_double_equals_double" >&5 -$as_echo "$gl_cv_long_double_equals_double" >&6; } - if test $gl_cv_long_double_equals_double = yes; then -$as_echo "#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1" >>confdefs.h - HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=1 - else - HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=0 - fi + : + : - ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include -" -if test "x$ac_cv_have_decl_frexpl" = xyes; then : -else - HAVE_DECL_FREXPL=0 -fi - FREXPL_LIBM= - if test $HAVE_DECL_FREXPL = 1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5 -$as_echo_n "checking whether frexpl() can be used without linking with libm... " >&6; } -if ${gl_cv_func_frexpl_no_libm+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5 +$as_echo_n "checking for working fcntl.h... " >&6; } +if ${gl_cv_header_working_fcntl_h+:} false; then : $as_echo_n "(cached) " >&6 else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "$cross_compiling" = yes; then : + gl_cv_header_working_fcntl_h=cross-compiling +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - long double x; -int +#include + #include + #if HAVE_UNISTD_H + # include + #else /* on Windows with MSVC */ + # include + # include + # defined sleep(n) _sleep ((n) * 1000) + #endif + #include + #ifndef O_NOATIME + #define O_NOATIME 0 + #endif + #ifndef O_NOFOLLOW + #define O_NOFOLLOW 0 + #endif + static int const constants[] = + { + O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND, + O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY + }; + +int main () { -int e; return frexpl (x, &e) > 0; + + int result = !constants; + #if HAVE_SYMLINK + { + static char const sym[] = "conftest.sym"; + if (symlink ("/dev/null", sym) != 0) + result |= 2; + else + { + int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0); + if (fd >= 0) + { + close (fd); + result |= 4; + } + } + if (unlink (sym) != 0 || symlink (".", sym) != 0) + result |= 2; + else + { + int fd = open (sym, O_RDONLY | O_NOFOLLOW); + if (fd >= 0) + { + close (fd); + result |= 4; + } + } + unlink (sym); + } + #endif + { + static char const file[] = "confdefs.h"; + int fd = open (file, O_RDONLY | O_NOATIME); + if (fd < 0) + result |= 8; + else + { + struct stat st0; + if (fstat (fd, &st0) != 0) + result |= 16; + else + { + char c; + sleep (1); + if (read (fd, &c, 1) != 1) + result |= 24; + else + { + if (close (fd) != 0) + result |= 32; + else + { + struct stat st1; + if (stat (file, &st1) != 0) + result |= 40; + else + if (st0.st_atime != st1.st_atime) + result |= 64; + } + } + } + } + } + return result; ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - gl_cv_func_frexpl_no_libm=yes +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_header_working_fcntl_h=yes else - gl_cv_func_frexpl_no_libm=no + case $? in #( + 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #( + 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #( + 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #( + *) gl_cv_header_working_fcntl_h='no';; + esac fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5 +$as_echo "$gl_cv_header_working_fcntl_h" >&6; } + + case $gl_cv_header_working_fcntl_h in #( + *O_NOATIME* | no | cross-compiling) ac_val=0;; #( + *) ac_val=1;; + esac + +cat >>confdefs.h <<_ACEOF +#define HAVE_WORKING_O_NOATIME $ac_val +_ACEOF + + + case $gl_cv_header_working_fcntl_h in #( + *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #( + *) ac_val=1;; + esac + +cat >>confdefs.h <<_ACEOF +#define HAVE_WORKING_O_NOFOLLOW $ac_val +_ACEOF + + +ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" +if test "x$ac_cv_type_pid_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define pid_t int +_ACEOF + +fi + +ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default" +if test "x$ac_cv_type_mode_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define mode_t int +_ACEOF + +fi + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5 +$as_echo_n "checking for mbstate_t... " >&6; } +if ${ac_cv_type_mbstate_t+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#include +#include +#include +#include +int +main () +{ +mbstate_t x; return sizeof x; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_type_mbstate_t=yes +else + ac_cv_type_mbstate_t=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5 +$as_echo "$ac_cv_type_mbstate_t" >&6; } + if test $ac_cv_type_mbstate_t = yes; then + +$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h + + else + +$as_echo "#define mbstate_t int" >>confdefs.h + + fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GNULIB_ACOSF=0; + GNULIB_ACOSL=0; + GNULIB_ASINF=0; + GNULIB_ASINL=0; + GNULIB_ATANF=0; + GNULIB_ATANL=0; + GNULIB_ATAN2F=0; + GNULIB_CBRT=0; + GNULIB_CBRTF=0; + GNULIB_CBRTL=0; + GNULIB_CEIL=0; + GNULIB_CEILF=0; + GNULIB_CEILL=0; + GNULIB_COPYSIGN=0; + GNULIB_COPYSIGNF=0; + GNULIB_COPYSIGNL=0; + GNULIB_COSF=0; + GNULIB_COSL=0; + GNULIB_COSHF=0; + GNULIB_EXPF=0; + GNULIB_EXPL=0; + GNULIB_EXP2=0; + GNULIB_EXP2F=0; + GNULIB_EXP2L=0; + GNULIB_EXPM1=0; + GNULIB_EXPM1F=0; + GNULIB_EXPM1L=0; + GNULIB_FABSF=0; + GNULIB_FABSL=0; + GNULIB_FLOOR=0; + GNULIB_FLOORF=0; + GNULIB_FLOORL=0; + GNULIB_FMA=0; + GNULIB_FMAF=0; + GNULIB_FMAL=0; + GNULIB_FMOD=0; + GNULIB_FMODF=0; + GNULIB_FMODL=0; + GNULIB_FREXPF=0; + GNULIB_FREXP=0; + GNULIB_FREXPL=0; + GNULIB_HYPOT=0; + GNULIB_HYPOTF=0; + GNULIB_HYPOTL=0; + GNULIB_ILOGB=0; + GNULIB_ILOGBF=0; + GNULIB_ILOGBL=0; + GNULIB_ISFINITE=0; + GNULIB_ISINF=0; + GNULIB_ISNAN=0; + GNULIB_ISNANF=0; + GNULIB_ISNAND=0; + GNULIB_ISNANL=0; + GNULIB_LDEXPF=0; + GNULIB_LDEXPL=0; + GNULIB_LOG=0; + GNULIB_LOGF=0; + GNULIB_LOGL=0; + GNULIB_LOG10=0; + GNULIB_LOG10F=0; + GNULIB_LOG10L=0; + GNULIB_LOG1P=0; + GNULIB_LOG1PF=0; + GNULIB_LOG1PL=0; + GNULIB_LOG2=0; + GNULIB_LOG2F=0; + GNULIB_LOG2L=0; + GNULIB_LOGB=0; + GNULIB_LOGBF=0; + GNULIB_LOGBL=0; + GNULIB_MODF=0; + GNULIB_MODFF=0; + GNULIB_MODFL=0; + GNULIB_POWF=0; + GNULIB_REMAINDER=0; + GNULIB_REMAINDERF=0; + GNULIB_REMAINDERL=0; + GNULIB_RINT=0; + GNULIB_RINTF=0; + GNULIB_RINTL=0; + GNULIB_ROUND=0; + GNULIB_ROUNDF=0; + GNULIB_ROUNDL=0; + GNULIB_SIGNBIT=0; + GNULIB_SINF=0; + GNULIB_SINL=0; + GNULIB_SINHF=0; + GNULIB_SQRTF=0; + GNULIB_SQRTL=0; + GNULIB_TANF=0; + GNULIB_TANL=0; + GNULIB_TANHF=0; + GNULIB_TRUNC=0; + GNULIB_TRUNCF=0; + GNULIB_TRUNCL=0; + HAVE_ACOSF=1; + HAVE_ACOSL=1; + HAVE_ASINF=1; + HAVE_ASINL=1; + HAVE_ATANF=1; + HAVE_ATANL=1; + HAVE_ATAN2F=1; + HAVE_CBRT=1; + HAVE_CBRTF=1; + HAVE_CBRTL=1; + HAVE_COPYSIGN=1; + HAVE_COPYSIGNL=1; + HAVE_COSF=1; + HAVE_COSL=1; + HAVE_COSHF=1; + HAVE_EXPF=1; + HAVE_EXPL=1; + HAVE_EXPM1=1; + HAVE_EXPM1F=1; + HAVE_FABSF=1; + HAVE_FABSL=1; + HAVE_FMA=1; + HAVE_FMAF=1; + HAVE_FMAL=1; + HAVE_FMODF=1; + HAVE_FMODL=1; + HAVE_FREXPF=1; + HAVE_HYPOTF=1; + HAVE_HYPOTL=1; + HAVE_ILOGB=1; + HAVE_ILOGBF=1; + HAVE_ILOGBL=1; + HAVE_ISNANF=1; + HAVE_ISNAND=1; + HAVE_ISNANL=1; + HAVE_LDEXPF=1; + HAVE_LOGF=1; + HAVE_LOGL=1; + HAVE_LOG10F=1; + HAVE_LOG10L=1; + HAVE_LOG1P=1; + HAVE_LOG1PF=1; + HAVE_LOG1PL=1; + HAVE_LOGBF=1; + HAVE_LOGBL=1; + HAVE_MODFF=1; + HAVE_MODFL=1; + HAVE_POWF=1; + HAVE_REMAINDER=1; + HAVE_REMAINDERF=1; + HAVE_RINT=1; + HAVE_RINTL=1; + HAVE_SINF=1; + HAVE_SINL=1; + HAVE_SINHF=1; + HAVE_SQRTF=1; + HAVE_SQRTL=1; + HAVE_TANF=1; + HAVE_TANL=1; + HAVE_TANHF=1; + HAVE_DECL_ACOSL=1; + HAVE_DECL_ASINL=1; + HAVE_DECL_ATANL=1; + HAVE_DECL_CBRTF=1; + HAVE_DECL_CBRTL=1; + HAVE_DECL_CEILF=1; + HAVE_DECL_CEILL=1; + HAVE_DECL_COPYSIGNF=1; + HAVE_DECL_COSL=1; + HAVE_DECL_EXPL=1; + HAVE_DECL_EXP2=1; + HAVE_DECL_EXP2F=1; + HAVE_DECL_EXP2L=1; + HAVE_DECL_EXPM1L=1; + HAVE_DECL_FLOORF=1; + HAVE_DECL_FLOORL=1; + HAVE_DECL_FREXPL=1; + HAVE_DECL_LDEXPL=1; + HAVE_DECL_LOGL=1; + HAVE_DECL_LOG10L=1; + HAVE_DECL_LOG2=1; + HAVE_DECL_LOG2F=1; + HAVE_DECL_LOG2L=1; + HAVE_DECL_LOGB=1; + HAVE_DECL_REMAINDER=1; + HAVE_DECL_REMAINDERL=1; + HAVE_DECL_RINTF=1; + HAVE_DECL_ROUND=1; + HAVE_DECL_ROUNDF=1; + HAVE_DECL_ROUNDL=1; + HAVE_DECL_SINL=1; + HAVE_DECL_SQRTL=1; + HAVE_DECL_TANL=1; + HAVE_DECL_TRUNC=1; + HAVE_DECL_TRUNCF=1; + HAVE_DECL_TRUNCL=1; + REPLACE_CBRTF=0; + REPLACE_CBRTL=0; + REPLACE_CEIL=0; + REPLACE_CEILF=0; + REPLACE_CEILL=0; + REPLACE_EXPM1=0; + REPLACE_EXPM1F=0; + REPLACE_EXP2=0; + REPLACE_EXP2L=0; + REPLACE_FABSL=0; + REPLACE_FLOOR=0; + REPLACE_FLOORF=0; + REPLACE_FLOORL=0; + REPLACE_FMA=0; + REPLACE_FMAF=0; + REPLACE_FMAL=0; + REPLACE_FMOD=0; + REPLACE_FMODF=0; + REPLACE_FMODL=0; + REPLACE_FREXPF=0; + REPLACE_FREXP=0; + REPLACE_FREXPL=0; + REPLACE_HUGE_VAL=0; + REPLACE_HYPOT=0; + REPLACE_HYPOTF=0; + REPLACE_HYPOTL=0; + REPLACE_ILOGB=0; + REPLACE_ILOGBF=0; + REPLACE_ISFINITE=0; + REPLACE_ISINF=0; + REPLACE_ISNAN=0; + REPLACE_LDEXPL=0; + REPLACE_LOG=0; + REPLACE_LOGF=0; + REPLACE_LOGL=0; + REPLACE_LOG10=0; + REPLACE_LOG10F=0; + REPLACE_LOG10L=0; + REPLACE_LOG1P=0; + REPLACE_LOG1PF=0; + REPLACE_LOG1PL=0; + REPLACE_LOG2=0; + REPLACE_LOG2F=0; + REPLACE_LOG2L=0; + REPLACE_LOGB=0; + REPLACE_LOGBF=0; + REPLACE_LOGBL=0; + REPLACE_MODF=0; + REPLACE_MODFF=0; + REPLACE_MODFL=0; + REPLACE_NAN=0; + REPLACE_REMAINDER=0; + REPLACE_REMAINDERF=0; + REPLACE_REMAINDERL=0; + REPLACE_ROUND=0; + REPLACE_ROUNDF=0; + REPLACE_ROUNDL=0; + REPLACE_SIGNBIT=0; + REPLACE_SIGNBIT_USING_GCC=0; + REPLACE_SQRTL=0; + REPLACE_TRUNC=0; + REPLACE_TRUNCF=0; + REPLACE_TRUNCL=0; -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5 -$as_echo "$gl_cv_func_frexpl_no_libm" >&6; } - if test $gl_cv_func_frexpl_no_libm = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used with libm" >&5 -$as_echo_n "checking whether frexpl() can be used with libm... " >&6; } -if ${gl_cv_func_frexpl_in_libm+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used without linking with libm" >&5 +$as_echo_n "checking whether frexp() can be used without linking with libm... " >&6; } +if ${gl_cv_func_frexp_no_libm+:} false; then : $as_echo_n "(cached) " >&6 else - save_LIBS="$LIBS" - LIBS="$LIBS -lm" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include - long double x; + double x; int main () { -int e; return frexpl (x, &e) > 0; +int e; return frexp (x, &e) > 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - gl_cv_func_frexpl_in_libm=yes + gl_cv_func_frexp_no_libm=yes else - gl_cv_func_frexpl_in_libm=no + gl_cv_func_frexp_no_libm=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LIBS="$save_LIBS" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_in_libm" >&5 -$as_echo "$gl_cv_func_frexpl_in_libm" >&6; } - if test $gl_cv_func_frexpl_in_libm = yes; then - FREXPL_LIBM=-lm - fi - fi - if test $gl_cv_func_frexpl_no_libm = yes \ - || test $gl_cv_func_frexpl_in_libm = yes; then - save_LIBS="$LIBS" - LIBS="$LIBS $FREXPL_LIBM" +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_no_libm" >&5 +$as_echo "$gl_cv_func_frexp_no_libm" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5 -$as_echo_n "checking whether frexpl works... " >&6; } -if ${gl_cv_func_frexpl_works+:} false; then : - $as_echo_n "(cached) " >&6 + ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default" +if test "x$ac_cv_have_decl_alarm" = xyes; then : + ac_have_decl=1 else + ac_have_decl=0 +fi - if test "$cross_compiling" = yes; then : +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_ALARM $ac_have_decl +_ACEOF - case "$host_os" in - aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*) - gl_cv_func_frexpl_works="guessing no";; - *) gl_cv_func_frexpl_works="guessing yes";; - esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long double and double are the same" >&5 +$as_echo_n "checking whether long double and double are the same... " >&6; } +if ${gl_cv_long_double_equals_double+:} false; then : + $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include -#include -/* Override the values of , like done in float.in.h. */ -#if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__) -# undef LDBL_MIN_EXP -# define LDBL_MIN_EXP (-16381) -#endif -#if defined __i386__ && (defined __FreeBSD__ || defined __DragonFly__) -# undef LDBL_MIN_EXP -# define LDBL_MIN_EXP (-16381) -#endif -#if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__ -# undef LDBL_MIN_EXP -# define LDBL_MIN_EXP DBL_MIN_EXP -#endif -#if defined __sgi && (LDBL_MANT_DIG >= 106) -# if defined __GNUC__ -# undef LDBL_MIN_EXP -# define LDBL_MIN_EXP DBL_MIN_EXP -# endif -#endif -extern -#ifdef __cplusplus -"C" -#endif -long double frexpl (long double, int *); -int main() +int +main () { - int result = 0; - volatile long double x; - /* Test on finite numbers that fails on AIX 5.1. */ - x = 16.0L; - { - int exp = -9999; - frexpl (x, &exp); - if (exp != 5) - result |= 1; - } - /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl - function returns an invalid (incorrectly normalized) value: it returns - y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 } - but the correct result is - 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */ - x = 1.01L; - { - int exp = -9999; - long double y = frexpl (x, &exp); - if (!(exp == 1 && y == 0.505L)) - result |= 2; - } - /* Test on large finite numbers. This fails on BeOS at i = 16322, while - LDBL_MAX_EXP = 16384. - In the loop end test, we test x against Infinity, rather than comparing - i with LDBL_MAX_EXP, because BeOS has a wrong LDBL_MAX_EXP. */ - { - int i; - for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L) - { - int exp = -9999; - frexpl (x, &exp); - if (exp != i) - { - result |= 4; - break; - } - } - } - /* Test on denormalized numbers. */ - { - int i; - for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L) - ; - if (x > 0.0L) - { - int exp; - long double y = frexpl (x, &exp); - /* On machines with IEEE854 arithmetic: x = 1.68105e-4932, - exp = -16382, y = 0.5. On Mac OS X 10.5: exp = -16384, y = 0.5. */ - if (exp != LDBL_MIN_EXP - 1) - result |= 8; - } - } - /* Test on infinite numbers. */ - x = 1.0L / 0.0L; - { - int exp; - long double y = frexpl (x, &exp); - if (y != x) - result |= 16; - } - return result; +typedef int check[sizeof (long double) == sizeof (double) + && LDBL_MANT_DIG == DBL_MANT_DIG + && LDBL_MAX_EXP == DBL_MAX_EXP + && LDBL_MIN_EXP == DBL_MIN_EXP + ? 1 : -1]; + + ; + return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_frexpl_works=yes +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_long_double_equals_double=yes else - gl_cv_func_frexpl_works=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + gl_cv_long_double_equals_double=no fi - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_long_double_equals_double" >&5 +$as_echo "$gl_cv_long_double_equals_double" >&6; } + if test $gl_cv_long_double_equals_double = yes; then - fi - fi - if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then - if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then +$as_echo "#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1" >>confdefs.h - FREXPL_LIBM="$FREXP_LIBM" - else - FREXPL_LIBM= - fi + HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=1 + else + HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=0 fi @@ -9001,7 +8588,6 @@ $as_echo "#define HAVE_FREXPL 1" >>confdefs.h GNULIB_MKNODAT=0; GNULIB_STAT=0; GNULIB_UTIMENSAT=0; - GNULIB_OVERRIDES_STRUCT_STAT=0; HAVE_FCHMODAT=1; HAVE_FSTATAT=1; HAVE_FUTIMENS=1; @@ -9107,40 +8693,7 @@ $as_echo "$gl_cv_type_off_t_64" >&6; } else WINDOWS_64_BIT_OFF_T=0 fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit st_size" >&5 -$as_echo_n "checking for 64-bit st_size... " >&6; } -if ${gl_cv_member_st_size_64+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - struct stat buf; - int verify_st_size_size[sizeof (buf.st_size) >= 8 ? 1 : -1]; - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_member_st_size_64=yes -else - gl_cv_member_st_size_64=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_member_st_size_64" >&5 -$as_echo "$gl_cv_member_st_size_64" >&6; } - if test $gl_cv_member_st_size_64 = no; then - WINDOWS_64_BIT_ST_SIZE=1 - else - WINDOWS_64_BIT_ST_SIZE=0 - fi + WINDOWS_64_BIT_ST_SIZE=1 ;; *) WINDOWS_64_BIT_OFF_T=0 @@ -9241,14 +8794,14 @@ $as_echo "$gl_cv_next_sys_stat_h" >&6; } - WINDOWS_STAT_TIMESPEC=0 - - + if test $WINDOWS_64_BIT_ST_SIZE = 1; then +$as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h + fi ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include #include @@ -9263,11 +8816,48 @@ fi + for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do + as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 +$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } +if eval \${$as_gl_Symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#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; } + if eval test \"x\$"$as_gl_Symbol"\" = 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 whether lstat correctly handles trailing slash" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5 $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; } if ${gl_cv_func_lstat_dereferences_slashed_symlink+:} false; then : $as_echo_n "(cached) " >&6 @@ -9276,15 +8866,9 @@ else echo >conftest.file if test "$cross_compiling" = yes; then : case "$host_os" in - linux-* | linux) - # Guess yes on Linux systems. - gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;; - *-gnu* | gnu*) + *-gnu*) # Guess yes on glibc systems. gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;; - mingw*) - # Guess no on native Windows. - gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;; *) # If we don't know, assume the worst. gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;; @@ -9353,12 +8937,12 @@ if ${gl_cv_func_getcwd_null+:} false; then : else if test "$cross_compiling" = yes; then : case "$host_os" in - # Guess yes on glibc systems. - *-gnu* | gnu*) gl_cv_func_getcwd_null="guessing yes";; - # Guess yes on Cygwin. - cygwin*) gl_cv_func_getcwd_null="guessing yes";; - # If we don't know, assume the worst. - *) gl_cv_func_getcwd_null="guessing no";; + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_getcwd_null="guessing yes";; + # Guess yes on Cygwin. + cygwin*) gl_cv_func_getcwd_null="guessing yes";; + # If we don't know, assume the worst. + *) gl_cv_func_getcwd_null="guessing no";; esac else @@ -9379,7 +8963,7 @@ int main () { -#if defined _WIN32 && ! defined __CYGWIN__ +#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* mingw cwd does not start with '/', but getcwd does allocate. However, mingw fails to honor non-zero size. */ #else @@ -9391,9 +8975,9 @@ main () if (! f) return 2; if (f[0] != '/') - { free (f); return 3; } + return 3; if (f[1] != '\0') - { free (f); return 4; } + return 4; free (f); return 0; } @@ -9514,16 +9098,6 @@ _ACEOF - case $host_os in - mingw*) - LIB_GETLOGIN='-ladvapi32' ;; - *) - LIB_GETLOGIN= ;; - esac - - - - @@ -9532,14 +9106,6 @@ _ACEOF - - GNULIB_GETTIMEOFDAY=0; - HAVE_GETTIMEOFDAY=1; - HAVE_STRUCT_TIMEVAL=1; - HAVE_SYS_TIME_H=1; - REPLACE_GETTIMEOFDAY=0; - REPLACE_STRUCT_TIMEVAL=0; - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 $as_echo_n "checking for C/C++ restrict keyword... " >&6; } if ${ac_cv_c_restrict+:} false; then : @@ -9551,17 +9117,17 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ typedef int *int_ptr; - int foo (int_ptr $ac_kw ip) { return ip[0]; } - int bar (int [$ac_kw]); /* Catch GCC bug 14050. */ - int bar (int ip[$ac_kw]) { return ip[0]; } + 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); + int *$ac_kw t = s; + t[0] = 0; + return foo (t) + bar (t); ; return 0; @@ -9589,6 +9155,15 @@ _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; + + @@ -9804,182 +9379,48 @@ $as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; } fi - - - - - - - - - - - - - NEED_LOCALTIME_BUFFER=0 - - - GNULIB_CTIME=0; - GNULIB_MKTIME=0; - GNULIB_LOCALTIME=0; - GNULIB_NANOSLEEP=0; - GNULIB_STRFTIME=0; - GNULIB_STRPTIME=0; - GNULIB_TIMEGM=0; - GNULIB_TIME_R=0; - GNULIB_TIME_RZ=0; - GNULIB_TZSET=0; - HAVE_DECL_LOCALTIME_R=1; - HAVE_NANOSLEEP=1; - HAVE_STRPTIME=1; - HAVE_TIMEGM=1; - HAVE_TZSET=1; - HAVE_TIMEZONE_T=0; - REPLACE_CTIME=GNULIB_PORTCHECK; - REPLACE_LOCALTIME_R=GNULIB_PORTCHECK; - REPLACE_MKTIME=GNULIB_PORTCHECK; - REPLACE_NANOSLEEP=GNULIB_PORTCHECK; - REPLACE_STRFTIME=GNULIB_PORTCHECK; - REPLACE_TIMEGM=GNULIB_PORTCHECK; - REPLACE_TZSET=GNULIB_PORTCHECK; - - : ${GNULIB_GETTIMEOFDAY=0}; - REPLACE_GMTIME=0; - REPLACE_LOCALTIME=0; - - - GNULIB_GLOB=0; - HAVE_GLOB=1; - HAVE_GLOB_PATTERN_P=1; - REPLACE_GLOB=0; - REPLACE_GLOB_PATTERN_P=0; - - - - - - - - - - - - : - - - - - - - - - - - - : - - - - - - - - - if test $gl_cv_have_include_next = yes; then - gl_cv_next_glob_h='<'glob.h'>' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if ${gl_cv_next_glob_h+:} false; then : + for gl_func in gettimeofday; do + as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 +$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } +if eval \${$as_gl_Symbol+:} false; then : $as_echo_n "(cached) " >&6 else - - if test $ac_cv_header_glob_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 'glob.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_glob_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n "$gl_absolute_header_sed"` - - gl_header=$gl_cv_absolute_glob_h - gl_cv_next_glob_h='"'$gl_header'"' - else - gl_cv_next_glob_h='<'glob.h'>' - fi - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_glob_h" >&5 -$as_echo "$gl_cv_next_glob_h" >&6; } - fi - NEXT_GLOB_H=$gl_cv_next_glob_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='<'glob.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_glob_h - fi - NEXT_AS_FIRST_DIRECTIVE_GLOB_H=$gl_next_as_first_directive - - - - - - if test $ac_cv_header_glob_h = yes; then - HAVE_GLOB_H=1 - else - HAVE_GLOB_H=0 - fi - - - GLOB_H='' - if false; then - GLOB_H=glob.h - else - if test $ac_cv_header_glob_h != yes; then - GLOB_H=glob.h - fi - fi +#if HAVE_SYS_TIME_H +# include +#endif +#include - if test -n "$GLOB_H"; then - GL_GENERATE_GLOB_H_TRUE= - GL_GENERATE_GLOB_H_FALSE='#' +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 - GL_GENERATE_GLOB_H_TRUE='#' - GL_GENERATE_GLOB_H_FALSE= + 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; } + if eval test \"x\$"$as_gl_Symbol"\" = 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 @@ -10071,130 +9512,38 @@ _ACEOF gl_cv_next_limits_h='<'limits.h'>' fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_limits_h" >&5 -$as_echo "$gl_cv_next_limits_h" >&6; } - fi - NEXT_LIMITS_H=$gl_cv_next_limits_h - - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'limits.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_limits_h - fi - NEXT_AS_FIRST_DIRECTIVE_LIMITS_H=$gl_next_as_first_directive - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether limits.h has ULLONG_WIDTH etc." >&5 -$as_echo_n "checking whether limits.h has ULLONG_WIDTH etc.... " >&6; } -if ${gl_cv_header_limits_width+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifndef __STDC_WANT_IEC_60559_BFP_EXT__ - #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 - #endif - #include - int ullw = ULLONG_WIDTH; -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_header_limits_width=yes -else - gl_cv_header_limits_width=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_width" >&5 -$as_echo "$gl_cv_header_limits_width" >&6; } - if test "$gl_cv_header_limits_width" = yes; then - LIMITS_H= - else - LIMITS_H=limits.h - fi - - if test -n "$LIMITS_H"; then - GL_GENERATE_LIMITS_H_TRUE= - GL_GENERATE_LIMITS_H_FALSE='#' -else - GL_GENERATE_LIMITS_H_TRUE='#' - GL_GENERATE_LIMITS_H_FALSE= -fi - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5 -$as_echo_n "checking for wint_t... " >&6; } -if ${gt_cv_c_wint_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be included - before . */ -#include -#include -#include -#include - wint_t foo = (wchar_t)'\0'; -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gt_cv_c_wint_t=yes -else - gt_cv_c_wint_t=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5 -$as_echo "$gt_cv_c_wint_t" >&6; } - if test $gt_cv_c_wint_t = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_limits_h" >&5 +$as_echo "$gl_cv_next_limits_h" >&6; } + fi + NEXT_LIMITS_H=$gl_cv_next_limits_h + + if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' + gl_next_as_first_directive='<'limits.h'>' + else + # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' + gl_next_as_first_directive=$gl_cv_next_limits_h + fi + NEXT_AS_FIRST_DIRECTIVE_LIMITS_H=$gl_next_as_first_directive -$as_echo "#define HAVE_WINT_T 1" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wint_t is too small" >&5 -$as_echo_n "checking whether wint_t is too small... " >&6; } -if ${gl_cv_type_wint_t_too_small+:} false; then : + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether limits.h has ULLONG_WIDTH etc." >&5 +$as_echo_n "checking whether limits.h has ULLONG_WIDTH etc.... " >&6; } +if ${gl_cv_header_limits_width+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#if !(defined __GLIBC__ && !defined __UCLIBC__) -# include -# include -# include -#endif -#include - int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1]; - +#ifndef __STDC_WANT_IEC_60559_BFP_EXT__ + #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 + #endif + #include + int ullw = ULLONG_WIDTH; int main () { @@ -10204,23 +9553,28 @@ main () } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_type_wint_t_too_small=no + gl_cv_header_limits_width=yes else - gl_cv_type_wint_t_too_small=yes + gl_cv_header_limits_width=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wint_t_too_small" >&5 -$as_echo "$gl_cv_type_wint_t_too_small" >&6; } - if test $gl_cv_type_wint_t_too_small = yes; then - GNULIB_OVERRIDES_WINT_T=1 - else - GNULIB_OVERRIDES_WINT_T=0 - fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_width" >&5 +$as_echo "$gl_cv_header_limits_width" >&6; } + if test "$gl_cv_header_limits_width" = yes; then + LIMITS_H= else - GNULIB_OVERRIDES_WINT_T=0 + LIMITS_H=limits.h fi + if test -n "$LIMITS_H"; then + GL_GENERATE_LIMITS_H_TRUE= + GL_GENERATE_LIMITS_H_FALSE='#' +else + GL_GENERATE_LIMITS_H_TRUE='#' + GL_GENERATE_LIMITS_H_FALSE= +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5 @@ -10396,7 +9750,6 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test $ac_cv_type_long_long_int = yes; then HAVE_LONG_LONG_INT=1 else @@ -10713,12 +10066,7 @@ main () _ACEOF if ac_fn_c_try_compile "$LINENO"; then : if test "$cross_compiling" = yes; then : - case "$host_os" in - # Guess yes on native Windows. - mingw*) gl_cv_header_working_stdint_h="guessing yes" ;; - # In general, assume it works. - *) gl_cv_header_working_stdint_h="guessing yes" ;; - esac + gl_cv_header_working_stdint_h=yes else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -10818,16 +10166,15 @@ $as_echo "$gl_cv_header_working_stdint_h" >&6; } HAVE_SYS_BITYPES_H=0 HAVE_SYS_INTTYPES_H=0 STDINT_H=stdint.h - case "$gl_cv_header_working_stdint_h" in - *yes) - HAVE_C99_STDINT_H=1 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h predates C++11" >&5 + if test "$gl_cv_header_working_stdint_h" = yes; then + HAVE_C99_STDINT_H=1 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h predates C++11" >&5 $as_echo_n "checking whether stdint.h predates C++11... " >&6; } if ${gl_cv_header_stdint_predates_cxx11_h+:} false; then : $as_echo_n "(cached) " >&6 else gl_cv_header_stdint_predates_cxx11_h=yes - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -10865,29 +10212,29 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_predates_cxx11_h" >&5 $as_echo "$gl_cv_header_stdint_predates_cxx11_h" >&6; } - if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then + if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then $as_echo "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h $as_echo "#define __STDC_LIMIT_MACROS 1" >>confdefs.h - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h has UINTMAX_WIDTH etc." >&5 + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h has UINTMAX_WIDTH etc." >&5 $as_echo_n "checking whether stdint.h has UINTMAX_WIDTH etc.... " >&6; } if ${gl_cv_header_stdint_width+:} false; then : $as_echo_n "(cached) " >&6 else gl_cv_header_stdint_width=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - /* Work if build is not clean. */ - #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 - #ifndef __STDC_WANT_IEC_60559_BFP_EXT__ - #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 - #endif - #include + /* Work if build is not clean. */ + #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 + #ifndef __STDC_WANT_IEC_60559_BFP_EXT__ + #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 + #endif + #include /* BSD/OS 4.0.1 has a bug: , and must be included before . */ @@ -10899,7 +10246,7 @@ else # include #endif - int iw = UINTMAX_WIDTH; + int iw = UINTMAX_WIDTH; int main () @@ -10916,12 +10263,11 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_width" >&5 $as_echo "$gl_cv_header_stdint_width" >&6; } - if test "$gl_cv_header_stdint_width" = yes; then - STDINT_H= - fi - ;; - *) - for ac_header in sys/inttypes.h sys/bitypes.h + if test "$gl_cv_header_stdint_width" = yes; then + STDINT_H= + fi + else + for ac_header in sys/inttypes.h sys/bitypes.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" @@ -10934,12 +10280,12 @@ fi done - if test $ac_cv_header_sys_inttypes_h = yes; then - HAVE_SYS_INTTYPES_H=1 - fi - if test $ac_cv_header_sys_bitypes_h = yes; then - HAVE_SYS_BITYPES_H=1 - fi + if test $ac_cv_header_sys_inttypes_h = yes; then + HAVE_SYS_INTTYPES_H=1 + fi + if test $ac_cv_header_sys_bitypes_h = yes; then + HAVE_SYS_BITYPES_H=1 + fi if test $APPLE_UNIVERSAL_BUILD = 0; then @@ -11235,16 +10581,14 @@ _ACEOF - if test $GNULIB_OVERRIDES_WINT_T = 1; then + if test $BITSIZEOF_WINT_T -lt 32; then BITSIZEOF_WINT_T=32 fi - ;; - esac - - + fi - LIMITS_H='limits.h' + # The substitute stdint.h needs the substitute limit.h's _GL_INTEGER_WIDTH. + LIMITS_H=limits.h if test -n "$LIMITS_H"; then GL_GENERATE_LIMITS_H_TRUE= GL_GENERATE_LIMITS_H_FALSE='#' @@ -11258,7 +10602,6 @@ fi - if test -n "$STDINT_H"; then GL_GENERATE_STDINT_H_TRUE= GL_GENERATE_STDINT_H_FALSE='#' @@ -11282,7 +10625,6 @@ fi HAVE_DECL_IMAXDIV=1; HAVE_DECL_STRTOIMAX=1; HAVE_DECL_STRTOUMAX=1; - HAVE_IMAXDIV_T=1; REPLACE_STRTOIMAX=0; REPLACE_STRTOUMAX=0; INT32_MAX_LT_INTMAX_MAX=1; @@ -11391,7 +10733,44 @@ $as_echo "$gl_cv_next_inttypes_h" >&6; } + for gl_func in imaxabs imaxdiv strtoimax strtoumax; 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 eval \${$as_gl_Symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#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; } + if eval test \"x\$"$as_gl_Symbol"\" = 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 @@ -12060,6 +11439,56 @@ $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h fi + ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default" +if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl +_ACEOF + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5 +$as_echo_n "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; } +if ${ac_cv_gnu_library_2_1+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#ifdef __GNU_LIBRARY__ + #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) + Lucky GNU user + #endif +#endif +#ifdef __UCLIBC__ + Lucky user +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "Lucky" >/dev/null 2>&1; then : + ac_cv_gnu_library_2_1=yes +else + ac_cv_gnu_library_2_1=no +fi +rm -f conftest* + + + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5 +$as_echo "$ac_cv_gnu_library_2_1" >&6; } + + GLIBC21="$ac_cv_gnu_library_2_1" + + + @@ -12077,7 +11506,7 @@ else int main () { -#if defined _WIN32 && ! defined __CYGWIN__ +#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ choke me #endif @@ -12118,7 +11547,7 @@ else if test "$cross_compiling" = yes; then : case "$host_os" in # Guess yes on platforms where we know the result. - *-gnu* | gnu* | freebsd* | netbsd* | openbsd* \ + *-gnu* | freebsd* | netbsd* | openbsd* \ | hpux* | solaris* | cygwin* | mingw*) ac_cv_func_malloc_0_nonnull=yes ;; # If we don't know, assume the worst. @@ -12216,7 +11645,6 @@ _ACEOF GNULIB_WCSSTR=0; GNULIB_WCSTOK=0; GNULIB_WCSWIDTH=0; - GNULIB_WCSFTIME=0; HAVE_BTOWC=1; HAVE_MBSINIT=1; HAVE_MBRTOWC=1; @@ -12254,7 +11682,6 @@ _ACEOF HAVE_WCSSTR=1; HAVE_WCSTOK=1; HAVE_WCSWIDTH=1; - HAVE_WCSFTIME=1; HAVE_DECL_WCTOB=1; HAVE_DECL_WCWIDTH=1; REPLACE_MBSTATE_T=0; @@ -12270,7 +11697,6 @@ _ACEOF REPLACE_WCSNRTOMBS=0; REPLACE_WCWIDTH=0; REPLACE_WCSWIDTH=0; - REPLACE_WCSFTIME=0; @@ -12305,14 +11731,9 @@ struct tm t; char buf[16]; int main () { - /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl - imitates locale dependent behaviour by looking at the environment - variables, and all locales use the UTF-8 encoding. */ -#if defined __BEOS__ || defined __HAIKU__ - return 1; -#else + const char *p; /* Check whether the given locale name is recognized by the system. */ -# if defined _WIN32 && !defined __CYGWIN__ +#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE @@ -12320,9 +11741,9 @@ int main () if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) return 1; -# else +#else if (setlocale (LC_ALL, "") == NULL) return 1; -# endif +#endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. @@ -12331,36 +11752,32 @@ int main () some unit tests fail. On MirBSD 10, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "UTF-8". */ -# if HAVE_LANGINFO_CODESET +#if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 || strcmp (cs, "UTF-8") == 0) return 1; } -# endif -# ifdef __CYGWIN__ +#endif +#ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; -# endif +#endif /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales on Cygwin 1.5.x. */ if (MB_CUR_MAX == 1) return 1; /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. This excludes the UTF-8 encoding (except on MirBSD). */ - { - const char *p; - t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; - if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; - for (p = buf; *p != '\0'; p++) - if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) - return 1; - } + t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; + if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; + for (p = buf; *p != '\0'; p++) + if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) + return 1; return 0; -#endif } _ACEOF @@ -12454,14 +11871,9 @@ struct tm t; char buf[16]; int main () { - /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl - imitates locale dependent behaviour by looking at the environment - variables, and all locales use the UTF-8 encoding. */ -#if defined __BEOS__ || defined __HAIKU__ - return 1; -#else + const char *p; /* Check whether the given locale name is recognized by the system. */ -# if defined _WIN32 && !defined __CYGWIN__ +#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE @@ -12469,9 +11881,9 @@ int main () if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) return 1; -# else +#else if (setlocale (LC_ALL, "") == NULL) return 1; -# endif +#endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. @@ -12480,36 +11892,32 @@ int main () some unit tests fail. On MirBSD 10, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "UTF-8". */ -# if HAVE_LANGINFO_CODESET +#if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 || strcmp (cs, "UTF-8") == 0) return 1; } -# endif -# ifdef __CYGWIN__ +#endif +#ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; -# endif +#endif /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. This excludes the UTF-8 encoding (except on MirBSD). */ - { - const char *p; - t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; - if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; - for (p = buf; *p != '\0'; p++) - if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) - return 1; - } + t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; + if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; + for (p = buf; *p != '\0'; p++) + if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) + return 1; /* Check whether a typical GB18030 multibyte sequence is recognized as a single wide character. This excludes the GB2312 and GBK encodings. */ if (mblen ("\203\062\332\066", 5) != 4) return 1; return 0; -#endif } _ACEOF @@ -12598,7 +12006,7 @@ int main () { variables, and all locales use the UTF-8 encoding. */ #if !(defined __BEOS__ || defined __HAIKU__) /* Check whether the given locale name is recognized by the system. */ -# if defined _WIN32 && !defined __CYGWIN__ +# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE @@ -12700,48 +12108,6 @@ $as_echo "$gt_cv_locale_fr_utf8" >&6; } LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 -$as_echo_n "checking for inline... " >&6; } -if ${ac_cv_c_inline+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_c_inline=no -for ac_kw in inline __inline__ __inline; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifndef __cplusplus -typedef int foo_t; -static $ac_kw foo_t static_foo () {return 0; } -$ac_kw foo_t foo () {return 0; } -#endif - -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_inline=$ac_kw -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_inline" != no && break -done - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 -$as_echo "$ac_cv_c_inline" >&6; } - -case $ac_cv_c_inline in - inline | yes) ;; - *) - case $ac_cv_c_inline in - no) ac_val=;; - *) ac_val=$ac_cv_c_inline;; - esac - cat >>confdefs.h <<_ACEOF -#ifndef __cplusplus -#define inline $ac_val -#endif -_ACEOF - ;; -esac - @@ -12764,14 +12130,8 @@ else struct tm t; char buf[16]; int main () { - /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl - imitates locale dependent behaviour by looking at the environment - variables, and all locales use the UTF-8 encoding. */ -#if defined __BEOS__ || defined __HAIKU__ - return 1; -#else /* Check whether the given locale name is recognized by the system. */ -# if defined _WIN32 && !defined __CYGWIN__ +#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE @@ -12779,9 +12139,9 @@ int main () { if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) return 1; -# else +#else if (setlocale (LC_ALL, "") == NULL) return 1; -# endif +#endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. @@ -12790,33 +12150,32 @@ int main () { some unit tests fail. On MirBSD 10, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "UTF-8". */ -# if HAVE_LANGINFO_CODESET +#if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 || strcmp (cs, "UTF-8") == 0) return 1; } -# endif -# ifdef __CYGWIN__ +#endif +#ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; -# endif +#endif /* Check whether in the abbreviation of the second month, the second character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only one byte long. This excludes the UTF-8 encoding. */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1; -# if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ +#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ /* Check whether the decimal separator is a comma. On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point are nl_langinfo(RADIXCHAR) are both ".". */ if (localeconv () ->decimal_point[0] != ',') return 1; -# endif - return 0; #endif + return 0; } _ACEOF @@ -12895,7 +12254,6 @@ $as_echo "$gt_cv_locale_fr" >&6; } - GNULIB_EXPLICIT_BZERO=0; GNULIB_FFSL=0; GNULIB_FFSLL=0; GNULIB_MEMCHR=0; @@ -12934,8 +12292,7 @@ $as_echo "$gt_cv_locale_fr" >&6; } GNULIB_STRSIGNAL=0; GNULIB_STRVERSCMP=0; HAVE_MBSLEN=0; - HAVE_EXPLICIT_BZERO=1; - HAVE_FFSL=1; + HAVE_FFSL=1; HAVE_FFSLL=1; HAVE_MEMCHR=1; HAVE_DECL_MEMMEM=1; @@ -12958,24 +12315,23 @@ $as_echo "$gt_cv_locale_fr" >&6; } REPLACE_MEMCHR=0; REPLACE_MEMMEM=0; REPLACE_STPNCPY=0; - REPLACE_STRCHRNUL=0; REPLACE_STRDUP=0; - REPLACE_STRNCAT=0; - REPLACE_STRNDUP=0; - REPLACE_STRNLEN=0; REPLACE_STRSTR=0; REPLACE_STRCASESTR=0; - REPLACE_STRTOK_R=0; + REPLACE_STRCHRNUL=0; REPLACE_STRERROR=0; REPLACE_STRERROR_R=0; + REPLACE_STRNCAT=0; + REPLACE_STRNDUP=0; + REPLACE_STRNLEN=0; REPLACE_STRSIGNAL=0; + REPLACE_STRTOK_R=0; UNDEFINE_STRTOK_R=0; - # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is # irrelevant for anonymous mappings. @@ -13056,10 +12412,10 @@ $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h if test $HAVE_MEMCHR = 1; then # Detect platform-specific bugs in some versions of glibc: # memchr should not dereference anything with length 0 - # https://bugzilla.redhat.com/show_bug.cgi?id=499689 + # http://bugzilla.redhat.com/499689 # memchr should not dereference overestimated length after a match - # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737 - # https://sourceware.org/bugzilla/show_bug.cgi?id=10162 + # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737 + # http://sourceware.org/bugzilla/show_bug.cgi?id=10162 # Assume that memchr works on platforms that lack mprotect. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5 $as_echo_n "checking whether memchr works... " >&6; } @@ -13067,13 +12423,7 @@ if ${gl_cv_func_memchr_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : - case "$host_os" in - # Guess yes on native Windows. - mingw*) gl_cv_func_memchr_works="guessing yes" ;; - # Be pessimistic for now. - *) gl_cv_func_memchr_works="guessing no" ;; - esac - + gl_cv_func_memchr_works="guessing no" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -13139,14 +12489,12 @@ 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_memchr_works" >&5 $as_echo "$gl_cv_func_memchr_works" >&6; } - case "$gl_cv_func_memchr_works" in - *yes) ;; - *) REPLACE_MEMCHR=1 ;; - esac + if test "$gl_cv_func_memchr_works" != yes; then + REPLACE_MEMCHR=1 + fi fi @@ -13300,37 +12648,6 @@ _ACEOF - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for O_CLOEXEC" >&5 -$as_echo_n "checking for O_CLOEXEC... " >&6; } -if ${gl_cv_macro_O_CLOEXEC+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - #ifndef O_CLOEXEC - choke me; - #endif - -int -main () -{ -return O_CLOEXEC; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_macro_O_CLOEXEC=yes -else - gl_cv_macro_O_CLOEXEC=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_macro_O_CLOEXEC" >&5 -$as_echo "$gl_cv_macro_O_CLOEXEC" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5 $as_echo_n "checking for promoted mode_t type... " >&6; } @@ -13479,6 +12796,31 @@ _ACEOF + + + + + + + + + + + + + + + + + + + + + + + + + ac_fn_c_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default" if test "x$ac_cv_have_decl_setenv" = xyes; then : ac_have_decl=1 @@ -13675,8 +13017,8 @@ else char o[sizeof n == m * sizeof n[0] ? 1 : -1]; char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; /* Catch a bug in an HP-UX C compiler. See - https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html - https://lists.gnu.org/r/bug-coreutils/2005-11/msg00161.html + http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html + http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html */ Bool q = true; Bool *pq = &q; @@ -13782,12 +13124,10 @@ if ${gl_cv_func_strerror_0_works+:} false; then : else if test "$cross_compiling" = yes; then : case "$host_os" in - # Guess yes on glibc systems. - *-gnu* | gnu*) gl_cv_func_strerror_0_works="guessing yes" ;; - # Guess yes on native Windows. - mingw*) gl_cv_func_strerror_0_works="guessing yes" ;; - # If we don't know, assume the worst. - *) gl_cv_func_strerror_0_works="guessing no" ;; + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_strerror_0_works="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_strerror_0_works="guessing no" ;; esac else @@ -13911,13 +13251,50 @@ $as_echo "$gl_cv_next_string_h" >&6; } + for gl_func in ffsl ffsll memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r strerror_r strsignal strverscmp; 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 eval \${$as_gl_Symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#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; } + if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 +_ACEOF + eval ac_cv_have_decl_$gl_func=yes +fi + done - if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then + if test "$gl_cv_func_memchr_works" != yes; then REPLACE_STRSTR=1 else { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5 @@ -14058,10 +13435,6 @@ $as_echo "$MKDIR_P" >&6; } -$as_echo "#define _USE_STD_STAT 1" >>confdefs.h - - - @@ -14141,9 +13514,24 @@ $as_echo "$gl_cv_next_sys_types_h" >&6; } - WINDOWS_STAT_INODES=0 - + 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; + HAVE_TIMEGM=1; + REPLACE_LOCALTIME_R=GNULIB_PORTCHECK; + REPLACE_MKTIME=GNULIB_PORTCHECK; + REPLACE_NANOSLEEP=GNULIB_PORTCHECK; + REPLACE_TIMEGM=GNULIB_PORTCHECK; + : ${GNULIB_GETTIMEOFDAY=0}; + REPLACE_GMTIME=0; + REPLACE_LOCALTIME=0; @@ -14401,8 +13789,7 @@ int main () { return zero(); } _ACEOF save_ac_compile="$ac_compile" ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/` - if echo '#include "conftest.c"' >conftest1.c && - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 @@ -14423,8 +13810,7 @@ int zero (void) { return 0; } _ACEOF ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/` - if echo '#include "conftest.c"' >conftest2.c && - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 @@ -14437,7 +13823,7 @@ _ACEOF fi fi ac_compile="$save_ac_compile" - rm -f conftest12.c conftest12.$ac_objext conftest$ac_exeext + rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5 @@ -14448,7 +13834,7 @@ This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in C99 mode. You have four options: - Add the flag -fgnu89-inline to CC and reconfigure, or - Fix your include files, using parts of - , or + , or - Use a gcc version older than 4.3, or - Don't use the flags -std=c99 or -std=gnu99. Configuration aborted." "$LINENO" 5 @@ -14475,26 +13861,47 @@ Configuration aborted." "$LINENO" 5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5 +$as_echo_n "checking for wint_t... " >&6; } +if ${gt_cv_c_wint_t+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be included + before . */ +#include +#include +#include +#include + wint_t foo = (wchar_t)'\0'; +int +main () +{ + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gt_cv_c_wint_t=yes +else + gt_cv_c_wint_t=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5 +$as_echo "$gt_cv_c_wint_t" >&6; } + if test $gt_cv_c_wint_t = yes; then +$as_echo "#define HAVE_WINT_T 1" >>confdefs.h - - - : - - - - - - if test $ac_cv_header_crtdefs_h = yes; then - HAVE_CRTDEFS_H=1 - else - HAVE_CRTDEFS_H=0 fi - GNULIB_ISWBLANK=0; GNULIB_WCTYPE=0; GNULIB_ISWCTYPE=0; @@ -14599,58 +14006,6 @@ fi gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_expect" >&5 -$as_echo_n "checking for __builtin_expect... " >&6; } -if ${gl_cv___builtin_expect+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - int - main (int argc, char **argv) - { - argc = __builtin_expect (argc, 100); - return argv[argc != 100][0]; - } -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - gl_cv___builtin_expect=yes -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include - int - main (int argc, char **argv) - { - argc = __builtin_expect (argc, 100); - return argv[argc != 100][0]; - } -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - gl_cv___builtin_expect="in " -else - gl_cv___builtin_expect=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv___builtin_expect" >&5 -$as_echo "$gl_cv___builtin_expect" >&6; } - if test "$gl_cv___builtin_expect" = yes; then - $as_echo "#define HAVE___BUILTIN_EXPECT 1" >>confdefs.h - - elif test "$gl_cv___builtin_expect" = "in "; then - $as_echo "#define HAVE___BUILTIN_EXPECT 2" >>confdefs.h - - fi - - - if test $ac_cv_func_canonicalize_file_name = no; then @@ -14659,8 +14014,8 @@ $as_echo "$gl_cv___builtin_expect" >&6; } HAVE_REALPATH=0 else case "$gl_cv_func_realpath_works" in - *yes) ;; - *) REPLACE_REALPATH=1 ;; + *yes) ;; + *) REPLACE_REALPATH=1 ;; esac fi else @@ -14763,7 +14118,7 @@ else # undef PATH_MAX # define PATH_MAX 1024 #endif -#if defined _WIN32 && ! defined __CYGWIN__ +#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # undef PATH_MAX # define PATH_MAX 260 #endif @@ -14805,11 +14160,9 @@ $as_echo "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h - - if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then - REPLACE_CLOSE=1 - fi - + if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then + REPLACE_CLOSE=1 + fi @@ -14965,6 +14318,47 @@ $as_echo "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h + + if test "x$datarootdir" = x; then + datarootdir='${datadir}' + + fi + if test "x$docdir" = x; then + docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' + + fi + if test "x$htmldir" = x; then + htmldir='${docdir}' + + fi + if test "x$dvidir" = x; then + dvidir='${docdir}' + + fi + if test "x$pdfdir" = x; then + pdfdir='${docdir}' + + fi + if test "x$psdir" = x; then + psdir='${docdir}' + + fi + if test "x$lispdir" = x; then + lispdir='${datarootdir}/emacs/site-lisp' + + fi + if test "x$localedir" = x; then + localedir='${datarootdir}/locale' + + fi + if test "x$runstatedir" = x; then + runstatedir='${localstatedir}/run' + + fi + + pkglibexecdir='${libexecdir}/${PACKAGE}' + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5 $as_echo_n "checking for d_ino member in directory struct... " >&6; } if ${gl_cv_struct_dirent_d_ino+:} false; then : @@ -14974,8 +14368,6 @@ else case "$host_os" in # Guess yes on glibc systems with Linux kernel. linux*-gnu*) gl_cv_struct_dirent_d_ino="guessing yes" ;; - # Guess no on native Windows. - mingw*) gl_cv_struct_dirent_d_ino="guessing no" ;; # If we don't know, assume the worst. *) gl_cv_struct_dirent_d_ino="guessing no" ;; esac @@ -14997,11 +14389,11 @@ DIR *dp = opendir ("."); return 1; e = readdir (dp); if (! e) - { closedir (dp); return 2; } + return 2; if (lstat (e->d_name, &st) != 0) - { closedir (dp); return 3; } + return 3; if (e->d_ino != st.st_ino) - { closedir (dp); return 4; } + return 4; closedir (dp); return 0; @@ -15163,7 +14555,44 @@ $as_echo "$gl_cv_next_dirent_h" >&6; } + for gl_func in alphasort closedir dirfd fdopendir opendir readdir rewinddir scandir; do + as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 +$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } +if eval \${$as_gl_Symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#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; } + if eval test \"x\$"$as_gl_Symbol"\" = 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 @@ -15359,11 +14788,9 @@ $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h - - if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then - REPLACE_DUP=1 - fi - + if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then + REPLACE_DUP=1 + fi @@ -15388,12 +14815,7 @@ if ${gl_cv_func_dup_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : - case "$host_os" in - # Guess no on native Windows. - mingw*) gl_cv_func_dup_works="guessing no" ;; - *) gl_cv_func_dup_works="guessing yes" ;; - esac - + gl_cv_func_dup_works='guessing yes' else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -15700,13 +15122,6 @@ $as_echo "$ac_cv_lib_error_at_line" >&6; } fi - XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format" - - - - XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format" - - @@ -15745,14 +15160,10 @@ if ${gl_cv_func_open_directory_works+:} false; then : else if test "$cross_compiling" = yes; then : case "$host_os" in - # Guess yes on Linux systems. - linux-* | linux) gl_cv_func_open_directory_works="guessing yes" ;; - # Guess yes on glibc systems. - *-gnu* | gnu*) gl_cv_func_open_directory_works="guessing yes" ;; - # Guess no on native Windows. - mingw*) gl_cv_func_open_directory_works="guessing no" ;; - # If we don't know, assume the worst. - *) gl_cv_func_open_directory_works="guessing no" ;; + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_open_directory_works="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_open_directory_works="guessing no" ;; esac else @@ -16135,15 +15546,45 @@ $as_echo "$gl_cv_next_fcntl_h" >&6; } + for gl_func in fcntl openat; 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 eval \${$as_gl_Symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include - - - - -cat >>confdefs.h <<_ACEOF -#define GNULIB_FD_SAFER_FLAG 1 +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; } + if eval test \"x\$"$as_gl_Symbol"\" = 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 + @@ -16294,8 +15735,7 @@ else #include #include #include - struct m { struct m *next, **list; char name[]; }; - struct s { struct s *p; struct m *m; int n; double d[]; }; + struct s { int n; double d[]; }; int main () { @@ -16304,8 +15744,6 @@ int m = getchar (); nbytes += sizeof (struct s) - 1; nbytes -= nbytes % sizeof (struct s); struct s *p = malloc (nbytes); - p->p = p; - p->m = NULL; p->d[0] = 0.0; return p->d != (double *) NULL; ; @@ -16339,7 +15777,7 @@ $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h aix* | beos* | openbsd* | mirbsd* | irix*) FLOAT_H=float.h ;; - freebsd* | dragonfly*) + freebsd*) case "$host_cpu" in i[34567]86 ) FLOAT_H=float.h @@ -16350,18 +15788,17 @@ $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined __LP64__ || defined __x86_64__ || defined __amd64__ - int ok; - #else - error fail - #endif - + yes + #endif _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : else FLOAT_H=float.h fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest* + ;; esac ;; @@ -16374,7 +15811,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ;; esac case "$host_os" in - aix* | freebsd* | dragonfly* | linux*) + aix* | freebsd* | linux*) if test -n "$FLOAT_H"; then REPLACE_FLOAT_LDBL=1 fi @@ -16394,22 +15831,19 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined __LP64__ || defined __arch64__ - int ok; - #else - error fail - #endif - + yes + #endif _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then : gl_cv_func_itold_works="guessing no" else gl_cv_func_itold_works="guessing yes" fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f conftest* + ;; - # Guess yes on native Windows. - mingw*) gl_cv_func_itold_works="guessing yes" ;; - *) gl_cv_func_itold_works="guessing yes" ;; + *) gl_cv_func_itold_works="guessing yes" ;; esac else @@ -16558,116 +15992,108 @@ fi + + FNMATCH_H= gl_fnmatch_required_lowercase=` echo $gl_fnmatch_required | LC_ALL=C tr '[A-Z]' '[a-z]' ` - - : - - - - - - if test $ac_cv_func_fnmatch = no; then - HAVE_FNMATCH=0 - else - gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working $gl_fnmatch_required fnmatch" >&5 + gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working $gl_fnmatch_required fnmatch" >&5 $as_echo_n "checking for working $gl_fnmatch_required fnmatch... " >&6; } if eval \${$gl_fnmatch_cache_var+:} false; then : $as_echo_n "(cached) " >&6 else - if test $gl_fnmatch_required = GNU; then - gl_fnmatch_gnu_start= - gl_fnmatch_gnu_end= - else - gl_fnmatch_gnu_start='#if 0' - gl_fnmatch_gnu_end='#endif' - fi - if test "$cross_compiling" = yes; then : + if test $gl_fnmatch_required = GNU; then + gl_fnmatch_gnu_start= + gl_fnmatch_gnu_end= + else + gl_fnmatch_gnu_start='#if 0' + gl_fnmatch_gnu_end='#endif' + fi + if test "$cross_compiling" = yes; then : eval "$gl_fnmatch_cache_var=\"guessing no\"" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include - static int - y (char const *pattern, char const *string, int flags) - { - return fnmatch (pattern, string, flags) == 0; - } - static int - n (char const *pattern, char const *string, int flags) - { - return fnmatch (pattern, string, flags) == FNM_NOMATCH; - } + static int + y (char const *pattern, char const *string, int flags) + { + return fnmatch (pattern, string, flags) == 0; + } + static int + n (char const *pattern, char const *string, int flags) + { + return fnmatch (pattern, string, flags) == FNM_NOMATCH; + } int main () { char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]"; - char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]"; - static char const A_1[] = { 'A' - 1, 0 }; - static char const A01[] = { 'A' + 1, 0 }; - static char const a_1[] = { 'a' - 1, 0 }; - static char const a01[] = { 'a' + 1, 0 }; - static char const bs_1[] = { '\\\\' - 1, 0 }; - static char const bs01[] = { '\\\\' + 1, 0 }; - int result = 0; - if (!n ("a*", "", 0)) - return 1; - if (!y ("a*", "abc", 0)) - return 1; - if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */ - return 1; - if (!n ("d*/*1", "d/s/1", FNM_PATHNAME)) - return 2; - if (!y ("a\\\\bc", "abc", 0)) - return 3; - if (!n ("a\\\\bc", "abc", FNM_NOESCAPE)) - return 3; - if (!y ("*x", ".x", 0)) - return 4; - if (!n ("*x", ".x", FNM_PERIOD)) - return 4; - if (!y (Apat, "\\\\", 0)) - return 5; - if (!y (Apat, "A", 0)) - return 5; - if (!y (apat, "\\\\", 0)) - return 5; - if (!y (apat, "a", 0)) - return 5; - if (!(n (Apat, A_1, 0) == ('A' < '\\\\'))) - return 5; - if (!(n (apat, a_1, 0) == ('a' < '\\\\'))) - return 5; - if (!(y (Apat, A01, 0) == ('A' < '\\\\'))) - return 5; - if (!(y (apat, a01, 0) == ('a' < '\\\\'))) - return 5; - if (!(y (Apat, bs_1, 0) == ('A' < '\\\\'))) - return 5; - if (!(y (apat, bs_1, 0) == ('a' < '\\\\'))) - return 5; - if (!(n (Apat, bs01, 0) == ('A' < '\\\\'))) - return 5; - if (!(n (apat, bs01, 0) == ('a' < '\\\\'))) - return 5; - $gl_fnmatch_gnu_start - if (!y ("xxXX", "xXxX", FNM_CASEFOLD)) - result |= 8; - if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH)) - result |= 16; - if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME)) - result |= 32; - if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR)) - result |= 64; - if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR)) - result |= 64; - if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR)) - result |= 64; - $gl_fnmatch_gnu_end - return result; + char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]"; + static char const A_1[] = { 'A' - 1, 0 }; + static char const A01[] = { 'A' + 1, 0 }; + static char const a_1[] = { 'a' - 1, 0 }; + static char const a01[] = { 'a' + 1, 0 }; + static char const bs_1[] = { '\\\\' - 1, 0 }; + static char const bs01[] = { '\\\\' + 1, 0 }; + int result = 0; + if (!n ("a*", "", 0)) + return 1; + if (!y ("a*", "abc", 0)) + return 1; + if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */ + return 1; + if (!n ("d*/*1", "d/s/1", FNM_PATHNAME)) + return 2; + if (!y ("a\\\\bc", "abc", 0)) + return 3; + if (!n ("a\\\\bc", "abc", FNM_NOESCAPE)) + return 3; + if (!y ("*x", ".x", 0)) + return 4; + if (!n ("*x", ".x", FNM_PERIOD)) + return 4; + if (!y (Apat, "\\\\", 0)) + return 5; + if (!y (Apat, "A", 0)) + return 5; + if (!y (apat, "\\\\", 0)) + return 5; + if (!y (apat, "a", 0)) + return 5; + if (!(n (Apat, A_1, 0) == ('A' < '\\\\'))) + return 5; + if (!(n (apat, a_1, 0) == ('a' < '\\\\'))) + return 5; + if (!(y (Apat, A01, 0) == ('A' < '\\\\'))) + return 5; + if (!(y (apat, a01, 0) == ('a' < '\\\\'))) + return 5; + if (!(y (Apat, bs_1, 0) == ('A' < '\\\\'))) + return 5; + if (!(y (apat, bs_1, 0) == ('a' < '\\\\'))) + return 5; + if (!(n (Apat, bs01, 0) == ('A' < '\\\\'))) + return 5; + if (!(n (apat, bs01, 0) == ('a' < '\\\\'))) + return 5; + $gl_fnmatch_gnu_start + if (!y ("xxXX", "xXxX", FNM_CASEFOLD)) + result |= 8; + if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH)) + result |= 16; + if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME)) + result |= 32; + if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR)) + result |= 64; + if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR)) + result |= 64; + if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR)) + result |= 64; + $gl_fnmatch_gnu_end + return result; ; return 0; @@ -16687,15 +16113,13 @@ fi eval ac_res=\$$gl_fnmatch_cache_var { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\"" - if test "$gl_fnmatch_result" != yes; then - REPLACE_FNMATCH=1 - fi + eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\"" + if test "$gl_fnmatch_result" = yes; then + rm -f "$gl_source_base/fnmatch.h" + else + FNMATCH_H=fnmatch.h fi - if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then - - FNMATCH_H='fnmatch.h' if test -n "$FNMATCH_H"; then GL_GENERATE_FNMATCH_H_TRUE= GL_GENERATE_FNMATCH_H_FALSE='#' @@ -16705,9 +16129,7 @@ else fi - fi - - if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then + if test -n "$FNMATCH_H"; then @@ -16720,6 +16142,11 @@ fi +cat >>confdefs.h <<_ACEOF +#define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch +_ACEOF + + ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include " if test "x$ac_cv_have_decl_isblank" = xyes; then : @@ -16774,22 +16201,39 @@ _ACEOF - GNULIB_FNMATCH=1 + if test -n "$FNMATCH_H"; then + + + + + gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext" -$as_echo "#define GNULIB_TEST_FNMATCH 1" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch +_ACEOF + ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include +" +if test "x$ac_cv_have_decl_isblank" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_ISBLANK $ac_have_decl +_ACEOF + : - if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then @@ -16798,21 +16242,78 @@ $as_echo "#define GNULIB_TEST_FNMATCH 1" >>confdefs.h - gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext" - ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include -" -if test "x$ac_cv_have_decl_isblank" = xyes; then : - ac_have_decl=1 + + + + + + + + + + + + + + + + : + + + + + + + fi + + + + FREXP_LIBM= + if test $gl_cv_func_frexp_no_libm = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used with libm" >&5 +$as_echo_n "checking whether frexp() can be used with libm... " >&6; } +if ${gl_cv_func_frexp_in_libm+:} false; then : + $as_echo_n "(cached) " >&6 else - ac_have_decl=0 -fi -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_ISBLANK $ac_have_decl + save_LIBS="$LIBS" + LIBS="$LIBS -lm" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + double x; +int +main () +{ +int e; return frexp (x, &e) > 0; + ; + return 0; +} _ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_func_frexp_in_libm=yes +else + gl_cv_func_frexp_in_libm=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$save_LIBS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_in_libm" >&5 +$as_echo "$gl_cv_func_frexp_in_libm" >&6; } + if test $gl_cv_func_frexp_in_libm = yes; then + FREXP_LIBM=-lm + fi + fi + if test $gl_cv_func_frexp_no_libm = yes \ + || test $gl_cv_func_frexp_in_libm = yes; then + save_LIBS="$LIBS" + LIBS="$LIBS $FREXP_LIBM" + : @@ -16821,12 +16322,116 @@ _ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5 +$as_echo_n "checking whether frexp works... " >&6; } +if ${gl_cv_func_frexp_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + + if test "$cross_compiling" = yes; then : + case "$host_os" in + netbsd* | irix* | mingw*) gl_cv_func_frexp_works="guessing no";; + *) gl_cv_func_frexp_works="guessing yes";; + esac + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +#include +#if HAVE_DECL_ALARM +# include +# include +#endif +/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0. + ICC 10.0 has a bug when optimizing the expression -zero. + The expression -DBL_MIN * DBL_MIN does not work when cross-compiling + to PowerPC on Mac OS X 10.5. */ +#if defined __hpux || defined __sgi || defined __ICC +static double +compute_minus_zero (void) +{ + return -DBL_MIN * DBL_MIN; +} +# define minus_zero compute_minus_zero () +#else +double minus_zero = -0.0; +#endif +int main() +{ + int result = 0; + int i; + volatile double x; + double zero = 0.0; +#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. */ + for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5) + ; + if (x > 0.0) + { + int exp; + double y = frexp (x, &exp); + /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022. + On NetBSD: y = 0.75. Correct: y = 0.5. */ + if (y != 0.5) + result |= 1; + } + /* Test on infinite numbers. */ + x = 1.0 / zero; + { + int exp; + double y = frexp (x, &exp); + if (y != x) + result |= 2; + } + /* Test on negative zero. */ + x = minus_zero; + { + int exp; + double y = frexp (x, &exp); + if (memcmp (&y, &x, sizeof x)) + result |= 4; + } + return result; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_frexp_works=yes +else + gl_cv_func_frexp_works=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5 +$as_echo "$gl_cv_func_frexp_works" >&6; } + LIBS="$save_LIBS" + case "$gl_cv_func_frexp_works" in + *yes) gl_func_frexp=yes ;; + *) gl_func_frexp=no; REPLACE_FREXP=1; FREXP_LIBM= ;; + esac + else + gl_func_frexp=no + fi + if test $gl_func_frexp = yes; then +$as_echo "#define HAVE_FREXP 1" >>confdefs.h + fi + if test $gl_func_frexp != yes; then @@ -16835,57 +16440,262 @@ _ACEOF + gl_LIBOBJS="$gl_LIBOBJS frexp.$ac_objext" + fi + GNULIB_FREXP=1 - : +$as_echo "#define GNULIB_TEST_FREXP 1" >>confdefs.h - fi -cat >>confdefs.h <<_ACEOF -#define GNULIB_FNMATCH_GNU 1 -_ACEOF - if test $gl_func_frexp != yes; then + ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include +" +if test "x$ac_cv_have_decl_frexpl" = xyes; then : +else + HAVE_DECL_FREXPL=0 +fi + FREXPL_LIBM= + if test $HAVE_DECL_FREXPL = 1; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5 +$as_echo_n "checking whether frexpl() can be used without linking with libm... " >&6; } +if ${gl_cv_func_frexpl_no_libm+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + long double x; +int +main () +{ +int e; return frexpl (x, &e) > 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_func_frexpl_no_libm=yes +else + gl_cv_func_frexpl_no_libm=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5 +$as_echo "$gl_cv_func_frexpl_no_libm" >&6; } + if test $gl_cv_func_frexpl_no_libm = no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used with libm" >&5 +$as_echo_n "checking whether frexpl() can be used with libm... " >&6; } +if ${gl_cv_func_frexpl_in_libm+:} false; then : + $as_echo_n "(cached) " >&6 +else - gl_LIBOBJS="$gl_LIBOBJS frexp.$ac_objext" + save_LIBS="$LIBS" + LIBS="$LIBS -lm" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + long double x; +int +main () +{ +int e; return frexpl (x, &e) > 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + gl_cv_func_frexpl_in_libm=yes +else + gl_cv_func_frexpl_in_libm=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LIBS="$save_LIBS" - fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_in_libm" >&5 +$as_echo "$gl_cv_func_frexpl_in_libm" >&6; } + if test $gl_cv_func_frexpl_in_libm = yes; then + FREXPL_LIBM=-lm + fi + fi + if test $gl_cv_func_frexpl_no_libm = yes \ + || test $gl_cv_func_frexpl_in_libm = yes; then + save_LIBS="$LIBS" + LIBS="$LIBS $FREXPL_LIBM" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5 +$as_echo_n "checking whether frexpl works... " >&6; } +if ${gl_cv_func_frexpl_works+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + case "$host_os" in + aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*) + gl_cv_func_frexpl_works="guessing no";; + *) gl_cv_func_frexpl_works="guessing yes";; + esac - GNULIB_FREXP=1 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +/* Override the values of , like done in float.in.h. */ +#if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__) +# undef LDBL_MIN_EXP +# define LDBL_MIN_EXP (-16381) +#endif +#if defined __i386__ && defined __FreeBSD__ +# undef LDBL_MIN_EXP +# define LDBL_MIN_EXP (-16381) +#endif +#if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__ +# undef LDBL_MIN_EXP +# define LDBL_MIN_EXP DBL_MIN_EXP +#endif +#if defined __sgi && (LDBL_MANT_DIG >= 106) +# if defined __GNUC__ +# undef LDBL_MIN_EXP +# define LDBL_MIN_EXP DBL_MIN_EXP +# endif +#endif +extern +#ifdef __cplusplus +"C" +#endif +long double frexpl (long double, int *); +int main() +{ + int result = 0; + volatile long double x; + /* Test on finite numbers that fails on AIX 5.1. */ + x = 16.0L; + { + int exp = -9999; + frexpl (x, &exp); + if (exp != 5) + result |= 1; + } + /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl + function returns an invalid (incorrectly normalized) value: it returns + y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 } + but the correct result is + 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */ + x = 1.01L; + { + int exp = -9999; + long double y = frexpl (x, &exp); + if (!(exp == 1 && y == 0.505L)) + result |= 2; + } + /* Test on large finite numbers. This fails on BeOS at i = 16322, while + LDBL_MAX_EXP = 16384. + In the loop end test, we test x against Infinity, rather than comparing + i with LDBL_MAX_EXP, because BeOS has a wrong LDBL_MAX_EXP. */ + { + int i; + for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L) + { + int exp = -9999; + frexpl (x, &exp); + if (exp != i) + { + result |= 4; + break; + } + } + } + /* Test on denormalized numbers. */ + { + int i; + for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L) + ; + if (x > 0.0L) + { + int exp; + long double y = frexpl (x, &exp); + /* On machines with IEEE854 arithmetic: x = 1.68105e-4932, + exp = -16382, y = 0.5. On Mac OS X 10.5: exp = -16384, y = 0.5. */ + if (exp != LDBL_MIN_EXP - 1) + result |= 8; + } + } + /* Test on infinite numbers. */ + x = 1.0L / 0.0L; + { + int exp; + long double y = frexpl (x, &exp); + if (y != x) + result |= 16; + } + return result; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_frexpl_works=yes +else + gl_cv_func_frexpl_works=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_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 GNULIB_TEST_FREXP 1" >>confdefs.h +$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 @@ -16919,11 +16729,14 @@ $as_echo "#define GNULIB_TEST_FREXPL 1" >>confdefs.h - case "$host_os" in - mingw* | solaris*) - REPLACE_FSTAT=1 - ;; - esac + if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then + REPLACE_FSTAT=1 + fi + + + if test $WINDOWS_64_BIT_ST_SIZE = 1; then + REPLACE_FSTAT=1 + fi @@ -16960,24 +16773,7 @@ $as_echo "#define GNULIB_TEST_FREXPL 1" >>confdefs.h gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext" - case "$host_os" in - mingw*) - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext" - - ;; - esac - - - : - + : fi @@ -16999,7 +16795,6 @@ $as_echo "#define GNULIB_TEST_FSTAT 1" >>confdefs.h - : @@ -17051,20 +16846,15 @@ $as_echo "$gl_cv_func_fstatat_zero_flag" >&6; } case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in *yes+*yes) ;; - *) REPLACE_FSTATAT=1 ;; - esac - - case $host_os in - solaris*) - REPLACE_FSTATAT=1 ;; - esac - - case $REPLACE_FSTATAT,$gl_cv_func_fstatat_zero_flag in - 1,*yes) + *) REPLACE_FSTATAT=1 + case $gl_cv_func_fstatat_zero_flag in + *yes) $as_echo "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h ;; + esac + ;; esac fi @@ -17131,22 +16921,10 @@ else # Arrange for deletion of the temporary directory this test creates. ac_clean_files="$ac_clean_files confdir3" if test "$cross_compiling" = yes; then : - # Cross-compilation guesses: - case "$host_os" in - aix*) # On AIX, it has the AIX bug. - gl_cv_func_getcwd_path_max='no, it has the AIX bug' ;; - gnu*) # On Hurd, it is 'yes'. - gl_cv_func_getcwd_path_max=yes ;; - linux* | kfreebsd*) - # On older Linux+glibc it's 'no, but it is partly working', - # on newer Linux+glibc it's 'yes'. - # On Linux+musl libc, it's 'no, but it is partly working'. - # On kFreeBSD+glibc, it's 'no, but it is partly working'. - gl_cv_func_getcwd_path_max='no, but it is partly working' ;; - *) # If we don't know, assume the worst. - gl_cv_func_getcwd_path_max=no ;; - esac - + case "$host_os" in + aix*) gl_cv_func_getcwd_path_max='no, it has the AIX bug';; + *) gl_cv_func_getcwd_path_max=no;; + esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -17180,7 +16958,7 @@ else # undef PATH_MAX # define PATH_MAX 1024 #endif -#if defined _WIN32 && ! defined __CYGWIN__ +#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # undef PATH_MAX # define PATH_MAX 260 #endif @@ -17350,11 +17128,11 @@ if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_getcwd_path_max=yes else case $? in - 10|11|12) gl_cv_func_getcwd_path_max='no, but it is partly working';; - 31) gl_cv_func_getcwd_path_max='no, it has the AIX bug';; - 32) gl_cv_func_getcwd_path_max='yes, but with shorter paths';; - *) gl_cv_func_getcwd_path_max=no;; - esac + 10|11|12) gl_cv_func_getcwd_path_max='no, but it is partly working';; + 31) gl_cv_func_getcwd_path_max='no, it has the AIX bug';; + 32) gl_cv_func_getcwd_path_max='yes, but with shorter paths';; + *) gl_cv_func_getcwd_path_max=no;; + esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext @@ -17383,44 +17161,16 @@ $as_echo "$gl_cv_func_getcwd_path_max" >&6; } - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5 -$as_echo_n "checking for getpagesize... " >&6; } -if ${gl_cv_func_getpagesize+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -return getpagesize(); - ; - return 0; -} - -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - gl_cv_func_getpagesize=yes -else - gl_cv_func_getpagesize=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getpagesize" >&5 -$as_echo "$gl_cv_func_getpagesize" >&6; } - - if test $gl_cv_func_getpagesize = yes; then - -cat >>confdefs.h <<_ACEOF + for ac_func in getpagesize +do : + ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" +if test "x$ac_cv_func_getpagesize" = xyes; then : + cat >>confdefs.h <<_ACEOF #define HAVE_GETPAGESIZE 1 _ACEOF - fi +fi +done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd aborts when 4k < cwd_length < 16k" >&5 $as_echo_n "checking whether getcwd aborts when 4k < cwd_length < 16k... " >&6; } @@ -17463,7 +17213,7 @@ else # undef PATH_MAX # define PATH_MAX 1024 #endif -#if defined _WIN32 && ! defined __CYGWIN__ +#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # undef PATH_MAX # define PATH_MAX 260 #endif @@ -17555,12 +17305,12 @@ _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_getcwd_abort_bug=no else - ret=$? - if test $ret -ge 128 || test $ret = 4; then - gl_cv_func_getcwd_abort_bug=yes - else - gl_cv_func_getcwd_abort_bug=no - fi + ret=$? + if test $ret -ge 128 || test $ret = 4; then + gl_cv_func_getcwd_abort_bug=yes + else + gl_cv_func_getcwd_abort_bug=no + fi fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext @@ -17703,34 +17453,33 @@ $as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h if test $ac_cv_func_getdtablesize = yes && test $ac_cv_have_decl_getdtablesize = yes; then + # Cygwin 1.7.25 automatically increases the RLIMIT_NOFILE soft limit + # up to an unchangeable hard limit; all other platforms correctly + # require setrlimit before getdtablesize() can report a larger value. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getdtablesize works" >&5 $as_echo_n "checking whether getdtablesize works... " >&6; } if ${gl_cv_func_getdtablesize_works+:} false; then : $as_echo_n "(cached) " >&6 else - case "$host_os" in - vms*) gl_cv_func_getdtablesize_works="no (limitation)" ;; - *) - if test "$cross_compiling" = yes; then : + if test "$cross_compiling" = yes; then : case "$host_os" in - cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows - gl_cv_func_getdtablesize_works="guessing no" ;; - *) gl_cv_func_getdtablesize_works="guessing yes" ;; - esac - + cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows + gl_cv_func_getdtablesize_works="guessing no" ;; + *) gl_cv_func_getdtablesize_works="guessing yes" ;; + esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - #include + #include int main () { int size = getdtablesize(); - if (dup2 (0, getdtablesize()) != -1) - return 1; - if (size != getdtablesize()) - return 2; + if (dup2 (0, getdtablesize()) != -1) + return 1; + if (size != getdtablesize()) + return 2; ; return 0; @@ -17745,14 +17494,12 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi - ;; - esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getdtablesize_works" >&5 $as_echo "$gl_cv_func_getdtablesize_works" >&6; } case "$gl_cv_func_getdtablesize_works" in - *yes | "no (limitation)") ;; + *yes) ;; *) REPLACE_GETDTABLESIZE=1 ;; esac else @@ -17822,10 +17569,10 @@ if ${gl_cv_func_getlogin_r_works+:} false; then : else case "$host_os" in - # Guess no on Mac OS X, OSF/1. - darwin* | osf*) gl_cv_func_getlogin_r_works="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_getlogin_r_works="guessing yes" ;; + # Guess no on OSF/1. + osf*) gl_cv_func_getlogin_r_works="guessing no" ;; + # Guess yes otherwise. + *) gl_cv_func_getlogin_r_works="guessing yes" ;; esac if test "$cross_compiling" = yes; then : : @@ -17834,7 +17581,6 @@ else /* end confdefs.h. */ #include -#include #include #if !HAVE_DECL_GETLOGIN_R extern @@ -17850,22 +17596,19 @@ main (void) char buf[100]; if (getlogin_r (buf, 0) == 0) - result |= 1; + result |= 16; if (getlogin_r (buf, 1) == 0) - result |= 2; - if (getlogin_r (buf, 100) == 0) - { - size_t n = strlen (buf); - if (getlogin_r (buf, n) == 0) - result |= 4; - } + result |= 17; return result; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gl_cv_func_getlogin_r_works=yes else - gl_cv_func_getlogin_r_works=no + case $? in + 16 | 17) gl_cv_func_getlogin_r_works=no ;; + esac + fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext @@ -17919,7 +17662,6 @@ $as_echo "#define GNULIB_TEST_GETLOGIN_R 1" >>confdefs.h - : @@ -18025,7 +17767,6 @@ $as_echo "#define HAVE_VAR___PROGNAME 1" >>confdefs.h - : @@ -18040,7 +17781,6 @@ $as_echo "#define HAVE_VAR___PROGNAME 1" >>confdefs.h - { $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 ${gl_cv_func_gettimeofday_clobber+:} false; then : @@ -18049,12 +17789,10 @@ else if test "$cross_compiling" = yes; then : # When cross-compiling: case "$host_os" in - # Guess all is fine on glibc systems. - *-gnu* | gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;; - # Guess no on native Windows. - mingw*) gl_cv_func_gettimeofday_clobber="guessing no" ;; - # If we don't know, assume the worst. - *) gl_cv_func_gettimeofday_clobber="guessing yes" ;; + # 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 @@ -18099,15 +17837,12 @@ $as_echo "$gl_cv_func_gettimeofday_clobber" >&6; } *yes) REPLACE_GETTIMEOFDAY=1 -$as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h - - - - - NEED_LOCALTIME_BUFFER=1 REPLACE_GMTIME=1 REPLACE_LOCALTIME=1 + +$as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h + ;; esac @@ -18174,9 +17909,7 @@ $as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; } if test $REPLACE_STRUCT_TIMEVAL = 1; then REPLACE_GETTIMEOFDAY=1 fi - case "$host_os" in - mingw*) REPLACE_GETTIMEOFDAY=1 ;; - esac + fi cat >>confdefs.h <<_ACEOF @@ -18195,91 +17928,117 @@ _ACEOF gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext" - : - fi - - + 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" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SYS_TIMEB_H 1 +_ACEOF +fi - GNULIB_GETTIMEOFDAY=1 +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" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE__FTIME 1 +_ACEOF +fi +done + fi -$as_echo "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h + GNULIB_GETTIMEOFDAY=1 - : +$as_echo "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h + GLOB_H= + for ac_header in glob.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "glob.h" "ac_cv_header_glob_h" "$ac_includes_default" +if test "x$ac_cv_header_glob_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GLOB_H 1 +_ACEOF +else + GLOB_H=glob.h +fi +done - if test $ac_cv_func_glob = no; then - HAVE_GLOB=0 - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU glob interface version 1 or 2" >&5 -$as_echo_n "checking for GNU glob interface version 1 or 2... " >&6; } -if ${gl_cv_gnu_glob_interface_version_1_2+:} false; then : + if test -z "$GLOB_H"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU glob interface version 1" >&5 +$as_echo_n "checking for GNU glob interface version 1... " >&6; } +if ${gl_cv_gnu_glob_interface_version_1+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include -char a[_GNU_GLOB_INTERFACE_VERSION == 1 || _GNU_GLOB_INTERFACE_VERSION == 2 ? 1 : -1]; +char a[_GNU_GLOB_INTERFACE_VERSION == 1 ? 1 : -1]; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_gnu_glob_interface_version_1_2=yes + gl_cv_gnu_glob_interface_version_1=yes else - gl_cv_gnu_glob_interface_version_1_2=no + gl_cv_gnu_glob_interface_version_1=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_gnu_glob_interface_version_1_2" >&5 -$as_echo "$gl_cv_gnu_glob_interface_version_1_2" >&6; } - if test "$gl_cv_gnu_glob_interface_version_1_2" = "no"; then - REPLACE_GLOB=1 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_gnu_glob_interface_version_1" >&5 +$as_echo "$gl_cv_gnu_glob_interface_version_1" >&6; } + + if test "$gl_cv_gnu_glob_interface_version_1" = "no"; then + GLOB_H=glob.h fi + fi - if test $REPLACE_GLOB = 0; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether glob lists broken symlinks" >&5 + if test -z "$GLOB_H"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether glob lists broken symlinks" >&5 $as_echo_n "checking whether glob lists broken symlinks... " >&6; } if ${gl_cv_glob_lists_symlinks+:} false; then : $as_echo_n "(cached) " >&6 else - if ln -s conf-doesntexist conf$$-globtest 2>/dev/null; then - gl_cv_glob_lists_symlinks=maybe - else - # If we can't make a symlink, then we cannot test this issue. Be - # pessimistic about this. - gl_cv_glob_lists_symlinks=no - fi - if test $gl_cv_glob_lists_symlinks = maybe; then - if test "$cross_compiling" = yes; then : + if ln -s conf-doesntexist conf$$-globtest 2>/dev/null; then + gl_cv_glob_lists_symlinks=maybe + else + # If we can't make a symlink, then we cannot test this issue. Be + # pessimistic about this. + gl_cv_glob_lists_symlinks=no + fi + + if test $gl_cv_glob_lists_symlinks = maybe; then + if test "$cross_compiling" = yes; then : gl_cv_glob_lists_symlinks=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ + #include - #include +#include int main () { glob_t found; - if (glob ("conf*-globtest", 0, NULL, &found) == GLOB_NOMATCH) - return 1; - +if (glob ("conf*-globtest", 0, NULL, &found) == GLOB_NOMATCH) return 1; ; return 0; } @@ -18293,31 +18052,19 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi - fi - rm -f conf$$-globtest - + fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_glob_lists_symlinks" >&5 $as_echo "$gl_cv_glob_lists_symlinks" >&6; } - if test $gl_cv_glob_lists_symlinks = no; then - REPLACE_GLOB=1 - fi - fi - - fi - if test $ac_cv_func_glob_pattern_p = no; then - HAVE_GLOB_PATTERN_P=0 - else - if test $REPLACE_GLOB = 1; then - REPLACE_GLOB_PATTERN_P=1 + if test $gl_cv_glob_lists_symlinks = no; then + GLOB_H=glob.h fi fi - if test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1; then + rm -f conf$$-globtest - GLOB_H='glob.h' if test -n "$GLOB_H"; then GL_GENERATE_GLOB_H_TRUE= GL_GENERATE_GLOB_H_FALSE='#' @@ -18327,9 +18074,7 @@ else fi - fi - - if test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1; then + if test -n "$GLOB_H"; then @@ -18342,17 +18087,6 @@ fi - - - - - - - gl_LIBOBJS="$gl_LIBOBJS globfree.$ac_objext" - - - - : @@ -18360,44 +18094,29 @@ fi - : - - - - - - - - + if test $ac_cv_header_sys_cdefs_h = yes; then + HAVE_SYS_CDEFS_H=1 + else + HAVE_SYS_CDEFS_H=0 fi - if test $HAVE_GLOB_PATTERN_P = 0 || test $REPLACE_GLOB_PATTERN_P = 1; then - - - - - - - gl_LIBOBJS="$gl_LIBOBJS glob_pattern_p.$ac_objext" - - fi - + : - GNULIB_GLOB=1 -$as_echo "#define GNULIB_TEST_GLOB 1" >>confdefs.h + fi + : @@ -18765,28 +18484,7 @@ if ${gl_cv_func_isnanl_works+:} false; then : else if test "$cross_compiling" = yes; then : - case "$host_os" in - mingw*) # Guess yes on mingw, no on MSVC. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef __MINGW32__ - Known -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "Known" >/dev/null 2>&1; then : gl_cv_func_isnanl_works="guessing yes" -else - gl_cv_func_isnanl_works="guessing no" -fi -rm -f conftest* - - ;; - *) gl_cv_func_isnanl_works="guessing yes" ;; - esac - else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -18940,7 +18638,7 @@ $as_echo "#define HAVE_ISNANL_IN_LIBC 1" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5 $as_echo_n "checking where to find the exponent in a 'long double'... " >&6; } if ${gl_cv_cc_long_double_expbit0+:} false; then : $as_echo_n "(cached) " >&6 @@ -18949,39 +18647,6 @@ else if test "$cross_compiling" = yes; then : gl_cv_cc_long_double_expbit0="unknown" - case "$host_os" in - mingw*) # On native Windows (little-endian), we know the result - # in two cases: mingw, MSVC. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef __MINGW32__ - Known -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "Known" >/dev/null 2>&1; then : - gl_cv_cc_long_double_expbit0="word 2 bit 0" -fi -rm -f conftest* - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef _MSC_VER - Known -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "Known" >/dev/null 2>&1; then : - gl_cv_cc_long_double_expbit0="word 1 bit 20" -fi -rm -f conftest* - - ;; - esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -19089,45 +18754,11 @@ _ACEOF fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the __inline keyword" >&5 -$as_echo_n "checking whether the compiler supports the __inline keyword... " >&6; } -if ${gl_cv_c___inline+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -typedef int foo_t; - static __inline foo_t foo (void) { return 0; } -int -main () -{ -return foo (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_c___inline=yes -else - gl_cv_c___inline=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c___inline" >&5 -$as_echo "$gl_cv_c___inline" >&6; } - if test $gl_cv_c___inline = yes; then - -$as_echo "#define HAVE___INLINE 1" >>confdefs.h - - fi - - - LOCALCHARSET_TESTS_ENVIRONMENT= - + : @@ -19136,8 +18767,8 @@ $as_echo "#define HAVE___INLINE 1" >>confdefs.h - gl_LIBOBJS="$gl_LIBOBJS localtime-buffer.$ac_objext" + LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\"" @@ -19150,8 +18781,8 @@ $as_echo "#define HAVE___INLINE 1" >>confdefs.h if test $ac_cv_func_lstat = yes; then - case $host_os,$gl_cv_func_lstat_dereferences_slashed_symlink in - solaris* | *no) + case "$gl_cv_func_lstat_dereferences_slashed_symlink" in + *no) REPLACE_LSTAT=1 ;; esac @@ -19383,7 +19014,43 @@ $as_echo "$gl_cv_header_math_huge_val_works" >&6; } fi + for gl_func in acosf acosl asinf asinl atanf atanl cbrt cbrtf cbrtl ceilf ceill copysign copysignf copysignl cosf cosl coshf expf expl exp2 exp2f exp2l expm1 expm1f expm1l fabsf fabsl floorf floorl fma fmaf fmal fmod fmodf fmodl frexpf frexpl hypotf hypotl ilogb ilogbf ilogbl ldexpf ldexpl log logf logl log10 log10f log10l log1p log1pf log1pl log2 log2f log2l logb logbf logbl modf modff modfl powf remainder remainderf remainderl rint rintf rintl round roundf roundl sinf sinl sinhf sqrtf sqrtl tanf tanl tanhf trunc truncf truncl; 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 eval \${$as_gl_Symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#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; } + if eval test \"x\$"$as_gl_Symbol"\" = 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 @@ -19452,7 +19119,7 @@ int main () memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) if (mbsinit (&state)) - return 2; + return 1; } return 0; } @@ -19519,7 +19186,7 @@ int main () memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, input + 3, 6, &state) != 4 && mbtowc (&wc, input + 3, 6) == 4) - return 2; + return 1; } return 0; } @@ -19712,7 +19379,7 @@ int main () mbrtowc (&wc, NULL, 5, &state); /* Check that wc was not modified. */ if (wc != (wchar_t) 0xBADFACE) - return 2; + return 1; } return 0; } @@ -19912,7 +19579,7 @@ int main () memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, "", 1, &state) != 0) - return 2; + return 1; } return 0; } @@ -19941,11 +19608,10 @@ if ${gl_cv_func_mbrtowc_empty_input+:} false; then : else case "$host_os" in - # Guess no on AIX and glibc systems. - aix* | *-gnu* | gnu*) gl_cv_func_mbrtowc_empty_input="guessing no" ;; - # Guess yes on native Windows. - mingw*) gl_cv_func_mbrtowc_empty_input="guessing yes" ;; - *) gl_cv_func_mbrtowc_empty_input="guessing yes" ;; + # 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 : : @@ -19977,7 +19643,7 @@ fi $as_echo "$gl_cv_func_mbrtowc_empty_input" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5 $as_echo_n "checking whether the C locale is free of encoding errors... " >&6; } if ${gl_cv_C_locale_sans_EILSEQ+:} false; then : $as_echo_n "(cached) " >&6 @@ -19986,11 +19652,7 @@ else gl_cv_C_locale_sans_EILSEQ="guessing no" if test "$cross_compiling" = yes; then : - case "$host_os" in - # Guess yes on native Windows. - mingw*) gl_cv_C_locale_sans_EILSEQ="guessing yes" ;; - esac - + : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -20005,7 +19667,7 @@ main () int i; char *locale = setlocale (LC_ALL, "C"); if (! locale) - return 2; + return 1; for (i = CHAR_MIN; i <= CHAR_MAX; i++) { char c = i; @@ -20013,7 +19675,7 @@ main () mbstate_t mbs = { 0, }; size_t ss = mbrtowc (&wc, &c, 1, &mbs); if (1 < ss) - return 3; + return 1; } return 0; @@ -20030,7 +19692,6 @@ 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_C_locale_sans_EILSEQ" >&5 $as_echo "$gl_cv_C_locale_sans_EILSEQ" >&6; } @@ -20098,7 +19759,6 @@ $as_echo "#define C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext" - : fi @@ -20184,7 +19844,7 @@ int main () memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) if (mbsinit (&state)) - return 2; + return 1; } return 0; } @@ -20251,7 +19911,7 @@ int main () memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, input + 3, 6, &state) != 4 && mbtowc (&wc, input + 3, 6) == 4) - return 2; + return 1; } return 0; } @@ -20424,7 +20084,7 @@ int main () memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) if (mbsinit (&state)) - return 2; + return 1; } return 0; } @@ -20491,7 +20151,7 @@ int main () memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, input + 3, 6, &state) != 4 && mbtowc (&wc, input + 3, 6) == 4) - return 2; + return 1; } return 0; } @@ -20832,9 +20492,6 @@ main () if (!memmem (haystack, 2 * m + 1, needle, m + 1)) result |= 1; } - /* Free allocated memory, in case some sanitizer is watching. */ - free (haystack); - free (needle); return result; ; @@ -21139,30 +20796,10 @@ else rm -rf conftest.dir if test "$cross_compiling" = yes; then : case "$host_os" in - # Guess yes on Linux systems. - linux-* | linux) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;; - # Guess yes on glibc systems. - *-gnu* | gnu*) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;; - # Guess yes on MSVC, no on mingw. - mingw*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef _MSC_VER - Known -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "Known" >/dev/null 2>&1; then : - gl_cv_func_mkdir_trailing_slash_works="guessing yes" -else - gl_cv_func_mkdir_trailing_slash_works="guessing no" -fi -rm -f conftest* - - ;; - # If we don't know, assume the worst. - *) gl_cv_func_mkdir_trailing_slash_works="guessing no" ;; + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_mkdir_trailing_slash_works="guessing no" ;; esac else @@ -21210,12 +20847,10 @@ else rm -rf conftest.dir if test "$cross_compiling" = yes; then : case "$host_os" in - # Guess yes on glibc systems. - *-gnu* | gnu*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;; - # Guess no on native Windows. - mingw*) gl_cv_func_mkdir_trailing_dot_works="guessing no" ;; - # If we don't know, assume the worst. - *) gl_cv_func_mkdir_trailing_dot_works="guessing no" ;; + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_mkdir_trailing_dot_works="guessing no" ;; esac else @@ -21290,12 +20925,10 @@ else mkdir conftest.mkstemp if test "$cross_compiling" = yes; then : case "$host_os" in - # Guess yes on glibc systems. - *-gnu* | gnu*) gl_cv_func_working_mkstemp="guessing yes" ;; - # Guess no on native Windows. - mingw*) gl_cv_func_working_mkstemp="guessing no" ;; - # If we don't know, assume the worst. - *) gl_cv_func_working_mkstemp="guessing no" ;; + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_working_mkstemp="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_working_mkstemp="guessing no" ;; esac else @@ -21417,14 +21050,6 @@ $as_echo "#define GNULIB_TEST_MKSTEMP 1" >>confdefs.h fi -cat >>confdefs.h <<_ACEOF -#define GNULIB_MSVC_NOTHROW 1 -_ACEOF - - - - - case "$host_os" in mingw* | pw*) @@ -21438,9 +21063,6 @@ _ACEOF - if test "$gl_cv_macro_O_CLOEXEC" != yes; then - REPLACE_OPEN=1 - fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5 $as_echo_n "checking whether open recognizes a trailing slash... " >&6; } if ${gl_cv_func_open_slash+:} false; then : @@ -21568,12 +21190,10 @@ $as_echo "#define GNULIB_TEST_OPEN 1" >>confdefs.h - - case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink+$gl_cv_macro_O_CLOEXEC in - yes+*yes+yes) + case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink in + yes+*yes) ;; yes+*) - # Solaris 10 lacks O_CLOEXEC. # Solaris 9 has *at functions, but uniformly mishandles trailing # slash in all of them. REPLACE_OPENAT=1 @@ -21839,12 +21459,10 @@ else ln -s conftest.link conftest.lnk2 if test "$cross_compiling" = yes; then : case "$host_os" in - # Guess yes on Linux systems. - linux-* | linux) gl_cv_func_readlink_works="guessing yes" ;; - # Guess yes on glibc systems. - *-gnu* | gnu*) gl_cv_func_readlink_works="guessing yes" ;; - # If we don't know, assume the worst. - *) gl_cv_func_readlink_works="guessing no" ;; + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_readlink_works="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_readlink_works="guessing no" ;; esac else @@ -21982,14 +21600,10 @@ else fi if test "$cross_compiling" = yes; then : case "$host_os" in - # Guess yes on Linux systems. - linux-* | linux) gl_cv_func_rename_slash_dst_works="guessing yes" ;; - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_rename_slash_dst_works="guessing yes" ;; - # Guess no on native Windows. - mingw*) gl_cv_func_rename_slash_dst_works="guessing no" ;; - # If we don't know, assume the worst. - *) gl_cv_func_rename_slash_dst_works="guessing no" ;; + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_rename_slash_dst_works="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_rename_slash_dst_works="guessing no" ;; esac else @@ -22055,14 +21669,10 @@ else fi if test "$cross_compiling" = yes; then : case "$host_os" in - # Guess yes on Linux systems. - linux-* | linux) gl_cv_func_rename_slash_src_works="guessing yes" ;; - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_rename_slash_src_works="guessing yes" ;; - # Guess yes on native Windows. - mingw*) gl_cv_func_rename_slash_src_works="guessing yes" ;; - # If we don't know, assume the worst. - *) gl_cv_func_rename_slash_src_works="guessing no" ;; + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_rename_slash_src_works="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_rename_slash_src_works="guessing no" ;; esac else @@ -22127,26 +21737,21 @@ if ${gl_cv_func_rename_link_works+:} false; then : $as_echo_n "(cached) " >&6 else if test $ac_cv_func_link = yes; then - rm -rf conftest.f conftest.f1 conftest.f2 - if touch conftest.f conftest.f2 && ln conftest.f conftest.f1 && + rm -rf conftest.f conftest.f1 + if touch conftest.f && ln conftest.f conftest.f1 && set x `ls -i conftest.f conftest.f1` && test "" = ""; then if test "$cross_compiling" = yes; then : case "$host_os" in - # Guess yes on Linux systems. - linux-* | linux) gl_cv_func_rename_link_works="guessing yes" ;; - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_rename_link_works="guessing yes" ;; - # Guess yes on native Windows. - mingw*) gl_cv_func_rename_link_works="guessing yes" ;; - # If we don't know, assume the worst. - *) gl_cv_func_rename_link_works="guessing no" ;; + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_rename_link_works="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_rename_link_works="guessing no" ;; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -# include # include # include # include @@ -22159,18 +21764,10 @@ int result = 0; result |= 1; if (unlink ("conftest.f1")) result |= 2; - - /* Allow either the POSIX-required behavior, where the - previous rename kept conftest.f, or the (better) NetBSD - behavior, where it removed conftest.f. */ - if (rename ("conftest.f", "conftest.f") != 0 - && errno != ENOENT) + if (rename ("conftest.f", "conftest.f")) result |= 4; - if (rename ("conftest.f1", "conftest.f1") == 0) result |= 8; - if (rename ("conftest.f2", "conftest.f2") != 0) - result |= 16; return result; ; @@ -22189,7 +21786,7 @@ fi else gl_cv_func_rename_link_works="guessing no" fi - rm -rf conftest.f conftest.f1 conftest.f2 + rm -rf conftest.f conftest.f1 else gl_cv_func_rename_link_works=yes fi @@ -22217,14 +21814,10 @@ else as_fn_error $? "cannot create temporary files" "$LINENO" 5 if test "$cross_compiling" = yes; then : case "$host_os" in - # Guess yes on Linux systems. - linux-* | linux) gl_cv_func_rename_dest_works="guessing yes" ;; - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_rename_dest_works="guessing yes" ;; - # Guess no on native Windows. - mingw*) gl_cv_func_rename_dest_works="guessing no" ;; - # If we don't know, assume the worst. - *) gl_cv_func_rename_dest_works="guessing no" ;; + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_rename_dest_works="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_rename_dest_works="guessing no" ;; esac else @@ -22362,14 +21955,10 @@ else touch conftest.file if test "$cross_compiling" = yes; then : case "$host_os" in - # Guess yes on Linux systems. - linux-* | linux) gl_cv_func_rmdir_works="guessing yes" ;; - # Guess yes on glibc systems. - *-gnu* | gnu*) gl_cv_func_rmdir_works="guessing yes" ;; - # Guess no on native Windows. - mingw*) gl_cv_func_rmdir_works="guessing no" ;; - # If we don't know, assume the worst. - *) gl_cv_func_rmdir_works="guessing no" ;; + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_rmdir_works="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_rmdir_works="guessing no" ;; esac else @@ -22457,6 +22046,90 @@ $as_echo "#define GNULIB_TEST_RMDIR 1" >>confdefs.h + + + + : + + + + + + if test $ac_cv_func_secure_getenv = no; then + HAVE_SECURE_GETENV=0 + fi + + if test $HAVE_SECURE_GETENV = 0; then + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS secure_getenv.$ac_objext" + + + for ac_func in __secure_getenv +do : + ac_fn_c_check_func "$LINENO" "__secure_getenv" "ac_cv_func___secure_getenv" +if test "x$ac_cv_func___secure_getenv" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE___SECURE_GETENV 1 +_ACEOF + +fi +done + + if test $ac_cv_func___secure_getenv = no; then + for ac_func in issetugid +do : + ac_fn_c_check_func "$LINENO" "issetugid" "ac_cv_func_issetugid" +if test "x$ac_cv_func_issetugid" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_ISSETUGID 1 +_ACEOF + +fi +done + + fi + + : + + + + + + + + + + + + + + + + fi + + + + + + GNULIB_SECURE_GETENV=1 + + + + + +$as_echo "#define GNULIB_TEST_SECURE_GETENV 1" >>confdefs.h + + + + + if test $ac_cv_func_setenv = no; then HAVE_SETENV=0 else @@ -22467,10 +22140,10 @@ if ${gl_cv_func_setenv_works+:} false; then : else if test "$cross_compiling" = yes; then : case "$host_os" in - # Guess yes on glibc systems. - *-gnu* | gnu*) gl_cv_func_setenv_works="guessing yes" ;; - # If we don't know, assume the worst. - *) gl_cv_func_setenv_works="guessing no" ;; + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_setenv_works="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_setenv_works="guessing no" ;; esac else @@ -22656,7 +22329,44 @@ fi + for gl_func in pthread_sigmask sigaction sigaddset sigdelset sigemptyset sigfillset sigismember sigpending sigprocmask; 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 eval \${$as_gl_Symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#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; } + if eval test \"x\$"$as_gl_Symbol"\" = 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 @@ -22695,38 +22405,22 @@ $as_echo "#define ssize_t int" >>confdefs.h - : - case "$host_os" in - mingw*) - REPLACE_STAT=1 - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5 -$as_echo_n "checking whether stat handles trailing slashes on files... " >&6; } -if ${gl_cv_func_stat_file_slash+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5 +$as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; } +if ${gl_cv_func_stat_dir_slash+:} false; then : $as_echo_n "(cached) " >&6 else - touch conftest.tmp - # Assume that if we have lstat, we can also check symlinks. - if test $ac_cv_func_lstat = yes; then - ln -s conftest.tmp conftest.lnk - fi - if test "$cross_compiling" = yes; then : - case "$host_os" in - # Guess yes on Linux systems. - linux-* | linux) gl_cv_func_stat_file_slash="guessing yes" ;; - # Guess yes on glibc systems. - *-gnu* | gnu*) gl_cv_func_stat_file_slash="guessing yes" ;; - # If we don't know, assume the worst. - *) gl_cv_func_stat_file_slash="guessing no" ;; - esac - + if test "$cross_compiling" = yes; then : + case $host_os in + mingw*) gl_cv_func_stat_dir_slash="guessing no";; + *) gl_cv_func_stat_dir_slash="guessing yes";; + esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -22735,240 +22429,115 @@ else int main () { -int result = 0; - struct stat st; - if (!stat ("conftest.tmp/", &st)) - result |= 1; -#if HAVE_LSTAT - if (!stat ("conftest.lnk/", &st)) - result |= 2; -#endif - return result; - +struct stat st; return stat (".", &st) != stat ("./", &st); ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_stat_file_slash=yes + gl_cv_func_stat_dir_slash=yes else - gl_cv_func_stat_file_slash=no + gl_cv_func_stat_dir_slash=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi - rm -f conftest.tmp conftest.lnk fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5 -$as_echo "$gl_cv_func_stat_file_slash" >&6; } - case $gl_cv_func_stat_file_slash in - *no) - REPLACE_STAT=1 - -$as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h -;; - esac - case $host_os in - solaris*) - REPLACE_FSTAT=1 ;; - esac - ;; - esac - - if test $REPLACE_STAT = 1; then - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext" - - case "$host_os" in - mingw*) - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext" - - ;; - esac - - - : - - fi - - - - - - GNULIB_STAT=1 - - - - - -$as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h - - - - - - - : - - - - - - - ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.tv_nsec" "ac_cv_member_struct_stat_st_atim_tv_nsec" "#include - #include -" -if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1 -_ACEOF - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5 -$as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; } -if ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+:} false; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5 +$as_echo "$gl_cv_func_stat_dir_slash" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5 +$as_echo_n "checking whether stat handles trailing slashes on files... " >&6; } +if ${gl_cv_func_stat_file_slash+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include - #include - #if HAVE_SYS_TIME_H - # include - #endif - #include - struct timespec ts; - struct stat st; - -int -main () -{ - - st.st_atim = ts; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes -else - ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5 -$as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; } - if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then - -$as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h - - fi -else - ac_fn_c_check_member "$LINENO" "struct stat" "st_atimespec.tv_nsec" "ac_cv_member_struct_stat_st_atimespec_tv_nsec" "#include - #include -" -if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1 -_ACEOF - - -else - ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include - #include -" -if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STAT_ST_ATIMENSEC 1 -_ACEOF - + touch conftest.tmp + # Assume that if we have lstat, we can also check symlinks. + if test $ac_cv_func_lstat = yes; then + ln -s conftest.tmp conftest.lnk + fi + if test "$cross_compiling" = yes; then : + case "$host_os" in + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_stat_file_slash="guessing no" ;; + esac else - ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.st__tim.tv_nsec" "ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" "#include - #include -" -if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1 -_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +int result = 0; + struct stat st; + if (!stat ("conftest.tmp/", &st)) + result |= 1; +#if HAVE_LSTAT + if (!stat ("conftest.lnk/", &st)) + result |= 2; +#endif + return result; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_stat_file_slash=yes +else + gl_cv_func_stat_file_slash=no fi - +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi + rm -f conftest.tmp conftest.lnk fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5 +$as_echo "$gl_cv_func_stat_file_slash" >&6; } + case $gl_cv_func_stat_dir_slash in + *no) REPLACE_STAT=1 -fi +$as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h +;; + esac + case $gl_cv_func_stat_file_slash in + *no) REPLACE_STAT=1 +$as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h +;; + esac + if test $REPLACE_STAT = 1; then - : - ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimespec.tv_nsec" "ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" "#include - #include -" -if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = xyes; then : + gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext" -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1 -_ACEOF + : + fi -else - ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include - #include -" -if test "x$ac_cv_member_struct_stat_st_birthtimensec" = xyes; then : -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1 -_ACEOF -else - ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtim.tv_nsec" "ac_cv_member_struct_stat_st_birthtim_tv_nsec" "#include - #include -" -if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = xyes; then : + GNULIB_STAT=1 -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1 -_ACEOF -fi -fi -fi +$as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h + @@ -23221,7 +22790,7 @@ else /* 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 __CYGWIN__) && \ + #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 @@ -23286,7 +22855,44 @@ _ACEOF + for gl_func in dprintf fpurge fseeko ftello getdelim getline gets pclose popen renameat snprintf tmpfile vdprintf vsnprintf; 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 eval \${$as_gl_Symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#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; } + if eval test \"x\$"$as_gl_Symbol"\" = 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 @@ -23364,7 +22970,50 @@ $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 qsort_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; } +if eval \${$as_gl_Symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#if HAVE_SYS_LOADAVG_H +# include +#endif +#if HAVE_RANDOM_H +# include +#endif + +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; } + if eval test \"x\$"$as_gl_Symbol"\" = 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 @@ -23543,10 +23192,10 @@ if ${gl_cv_func_working_strerror+:} false; then : else if test "$cross_compiling" = yes; then : case "$host_os" in - # Guess yes on glibc systems. - *-gnu* | gnu*) gl_cv_func_working_strerror="guessing yes" ;; - # If we don't know, assume the worst. - *) gl_cv_func_working_strerror="guessing no" ;; + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_working_strerror="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_working_strerror="guessing no" ;; esac else @@ -23747,9 +23396,6 @@ main () if (!strstr (haystack, needle)) result |= 1; } - /* Free allocated memory, in case some sanitizer is watching. */ - free (haystack); - free (needle); return result; ; @@ -23792,7 +23438,7 @@ $as_echo "$gl_cv_func_strstr_linear" >&6; } - if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then + if test "$gl_cv_func_memchr_works" != yes; then REPLACE_STRSTR=1 else { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5 @@ -23918,12 +23564,11 @@ if ${gl_cv_func_strtok_r_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : - case "$host_os" in - # Guess no on glibc systems. - *-gnu* | gnu*) gl_cv_func_strtok_r_works="guessing no" ;; - # Guess yes on native Windows. - mingw*) gl_cv_func_strtok_r_works="guessing yes" ;; - *) gl_cv_func_strtok_r_works="guessing yes" ;; + + case "$host_os" in + # Guess no on glibc systems. + *-gnu*) gl_cv_func_strtok_r_works="guessing no";; + *) gl_cv_func_strtok_r_works="guessing yes";; esac else @@ -24108,14 +23753,14 @@ $as_echo "$gl_cv_next_sys_stat_h" >&6; } - WINDOWS_STAT_TIMESPEC=0 - - + if test $WINDOWS_64_BIT_ST_SIZE = 1; then +$as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h + fi ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include #include @@ -24130,7 +23775,44 @@ fi + for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do + as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 +$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } +if eval \${$as_gl_Symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#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; } + if eval test \"x\$"$as_gl_Symbol"\" = 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 @@ -24247,7 +23929,56 @@ $as_echo "$gl_cv_next_unistd_h" >&6; } + for gl_func in chdir chown dup dup2 dup3 environ euidaccess faccessat fchdir fchownat fdatasync fsync ftruncate getcwd getdomainname getdtablesize getgroups gethostname getlogin getlogin_r getpagesize getusershell setusershell endusershell group_member isatty lchown link linkat lseek pipe pipe2 pread pwrite readlink readlinkat rmdir sethostname sleep symlink symlinkat ttyname_r unlink unlinkat usleep; 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 eval \${$as_gl_Symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#if HAVE_UNISTD_H +# include +#endif +/* Some systems declare various items in the wrong headers. */ +#if !(defined __GLIBC__ && !defined __UCLIBC__) +# include +# include +# include +# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# include +# endif +#endif + +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; } + if eval test \"x\$"$as_gl_Symbol"\" = 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 @@ -24534,9 +24265,54 @@ $as_echo "$gl_cv_next_wchar_h" >&6; } + for gl_func in btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb wcsrtombs wcsnrtombs wcwidth wmemchr wmemcmp wmemcpy wmemmove wmemset wcslen wcsnlen wcscpy wcpcpy wcsncpy wcpncpy wcscat wcsncat wcscmp wcsncmp wcscasecmp wcsncasecmp wcscoll wcsxfrm wcsdup wcschr wcsrchr wcscspn wcsspn wcspbrk wcsstr wcstok wcswidth ; 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 eval \${$as_gl_Symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#if !(defined __GLIBC__ && !defined __UCLIBC__) +# include +# include +# 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; } + if eval test \"x\$"$as_gl_Symbol"\" = 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 @@ -24571,8 +24347,6 @@ $as_echo "$gl_cv_next_wchar_h" >&6; } - - : @@ -24660,7 +24434,7 @@ if ${gl_cv_func_iswcntrl_works+:} false; then : else if test "$cross_compiling" = yes; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #if __GNU_LIBRARY__ == 1 @@ -24863,7 +24637,55 @@ $as_echo "$gl_cv_type_wctrans_t" >&6; } fi + for gl_func in wctype iswctype wctrans towctrans ; 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 eval \${$as_gl_Symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Tru64 with Desktop Toolkit C has a bug: must be included before + . + BSD/OS 4.0.1 has a bug: , and must be + included before . */ +#if !(defined __GLIBC__ && !defined __UCLIBC__) +# include +# include +# include +# 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; } + if eval test \"x\$"$as_gl_Symbol"\" = 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 # End of code from modules @@ -25080,9 +24902,6 @@ test "$program_suffix" != NONE && ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` -# Expand $ac_aux_dir to an absolute path. -am_aux_dir=`cd "$ac_aux_dir" && pwd` - if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) @@ -26010,14 +25829,6 @@ if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_F as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then - as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${GL_GENERATE_GLOB_H_TRUE}" && test -z "${GL_GENERATE_GLOB_H_FALSE}"; then - as_fn_error $? "conditional \"GL_GENERATE_GLOB_H\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi if test -z "${GL_GENERATE_GLOB_H_TRUE}" && test -z "${GL_GENERATE_GLOB_H_FALSE}"; then as_fn_error $? "conditional \"GL_GENERATE_GLOB_H\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 diff --git a/gdb/gnulib/import/Makefile.am b/gdb/gnulib/import/Makefile.am index d177724df82..67acc9dd816 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-2018 Free Software Foundation, Inc. +# Copyright (C) 2002-2016 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 @@ -13,7 +13,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this file. If not, see . +# along with this file. If not, see . # # As a special exception to the GNU General Public License, # this file may be distributed as part of a program that @@ -21,51 +21,9 @@ # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. -# Reproduce by: -# gnulib-tool --import \ -# --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 \ -# getcwd \ -# glob \ -# inttypes \ -# limits-h \ -# lstat \ -# memchr \ -# memmem \ -# mkdir \ -# mkstemp \ -# pathmax \ -# rawmemchr \ -# readlink \ -# rename \ -# setenv \ -# signal-h \ -# strchrnul \ -# strstr \ -# strtok_r \ -# sys_stat \ -# unistd \ -# unsetenv \ -# update-copyright \ -# wchar \ -# wctype-h - -AUTOMAKE_OPTIONS = 1.9.6 gnits subdir-objects +# Reproduce by: gnulib-tool --import --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 getcwd glob inttypes limits-h lstat memchr memmem mkdir mkstemp pathmax rawmemchr readlink rename setenv signal-h strchrnul strstr strtok_r sys_stat unistd unsetenv update-copyright wchar wctype-h + +AUTOMAKE_OPTIONS = 1.9.6 gnits SUBDIRS = noinst_HEADERS = @@ -79,7 +37,6 @@ MOSTLYCLEANDIRS = CLEANFILES = DISTCLEANFILES = MAINTAINERCLEANFILES = -# No GNU Make output. EXTRA_DIST += m4/gnulib-cache.m4 AM_CPPFLAGS = @@ -195,6 +152,51 @@ EXTRA_libgnu_a_SOURCES += closedir.c ## end gnulib module closedir +## begin gnulib module configmake + +# Listed in the same order as the GNU makefile conventions, and +# 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 + $(AM_V_GEN)rm -f $@-t && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + echo '#define PREFIX "$(prefix)"'; \ + echo '#define EXEC_PREFIX "$(exec_prefix)"'; \ + echo '#define BINDIR "$(bindir)"'; \ + echo '#define SBINDIR "$(sbindir)"'; \ + echo '#define LIBEXECDIR "$(libexecdir)"'; \ + echo '#define DATAROOTDIR "$(datarootdir)"'; \ + echo '#define DATADIR "$(datadir)"'; \ + 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)"'; \ + echo '#define INFODIR "$(infodir)"'; \ + echo '#define HTMLDIR "$(htmldir)"'; \ + echo '#define DVIDIR "$(dvidir)"'; \ + echo '#define PDFDIR "$(pdfdir)"'; \ + echo '#define PSDIR "$(psdir)"'; \ + echo '#define LIBDIR "$(libdir)"'; \ + echo '#define LISPDIR "$(lispdir)"'; \ + echo '#define LOCALEDIR "$(localedir)"'; \ + echo '#define MANDIR "$(mandir)"'; \ + echo '#define MANEXT "$(manext)"'; \ + echo '#define PKGDATADIR "$(pkgdatadir)"'; \ + echo '#define PKGINCLUDEDIR "$(pkgincludedir)"'; \ + echo '#define PKGLIBDIR "$(pkglibdir)"'; \ + echo '#define PKGLIBEXECDIR "$(pkglibexecdir)"'; \ + } | sed '/""/d' > $@-t && \ + mv -f $@-t $@ + +BUILT_SOURCES += configmake.h +CLEANFILES += configmake.h configmake.h-t + +## end gnulib module configmake + ## begin gnulib module dirent BUILT_SOURCES += dirent.h @@ -397,12 +399,6 @@ EXTRA_DIST += fd-hook.h ## end gnulib module fd-hook -## begin gnulib module fd-safer-flag - -libgnu_a_SOURCES += fd-safer-flag.c dup-safer-flag.c - -## end gnulib module fd-safer-flag - ## begin gnulib module fdopendir @@ -467,46 +463,29 @@ EXTRA_libgnu_a_SOURCES += float.c itold.c ## begin gnulib module fnmatch - -EXTRA_DIST += fnmatch.c fnmatch_loop.c - -EXTRA_libgnu_a_SOURCES += fnmatch.c fnmatch_loop.c - -## end gnulib module fnmatch - -## begin gnulib module fnmatch-h - BUILT_SOURCES += $(FNMATCH_H) -# We need the following in order to create . +# We need the following in order to create when the system +# doesn't have one that supports the required API. if GL_GENERATE_FNMATCH_H -fnmatch.h: fnmatch.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) +fnmatch.h: fnmatch.in.h $(top_builddir)/config.status $(ARG_NONNULL_H) $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ - -e 's|@''HAVE_FNMATCH_H''@|$(HAVE_FNMATCH_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_FNMATCH_H''@|$(NEXT_FNMATCH_H)|g' \ - -e 's/@''GNULIB_FNMATCH''@/$(GNULIB_FNMATCH)/g' \ - -e 's|@''HAVE_FNMATCH''@|$(HAVE_FNMATCH)|g' \ - -e 's|@''REPLACE_FNMATCH''@|$(REPLACE_FNMATCH)|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)' \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ < $(srcdir)/fnmatch.in.h; \ } > $@-t && \ - mv $@-t $@ + mv -f $@-t $@ else fnmatch.h: $(top_builddir)/config.status rm -f $@ endif MOSTLYCLEANFILES += fnmatch.h fnmatch.h-t -EXTRA_DIST += fnmatch.in.h +EXTRA_DIST += fnmatch.c fnmatch.in.h fnmatch_loop.c + +EXTRA_libgnu_a_SOURCES += fnmatch.c fnmatch_loop.c -## end gnulib module fnmatch-h +## end gnulib module fnmatch ## begin gnulib module fpucw @@ -536,9 +515,9 @@ EXTRA_libgnu_a_SOURCES += frexp.c frexpl.c ## begin gnulib module fstat -EXTRA_DIST += fstat.c stat-w32.c stat-w32.h +EXTRA_DIST += fstat.c -EXTRA_libgnu_a_SOURCES += fstat.c stat-w32.c +EXTRA_libgnu_a_SOURCES += fstat.c ## end gnulib module fstat @@ -610,48 +589,32 @@ EXTRA_libgnu_a_SOURCES += gettimeofday.c ## begin gnulib module glob - -EXTRA_DIST += glob.c glob_internal.h glob_pattern_p.c globfree.c - -EXTRA_libgnu_a_SOURCES += glob.c glob_pattern_p.c globfree.c - -## end gnulib module glob - -## begin gnulib module glob-h - BUILT_SOURCES += $(GLOB_H) -# We need the following in order to create . +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. if GL_GENERATE_GLOB_H glob.h: glob.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ - -e 's|@''HAVE_GLOB_H''@|$(HAVE_GLOB_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_GLOB_H''@|$(NEXT_GLOB_H)|g' \ - -e 's/@''GNULIB_GLOB''@/$(GNULIB_GLOB)/g' \ - -e 's|@''HAVE_GLOB''@|$(HAVE_GLOB)|g' \ - -e 's|@''HAVE_GLOB_PATTERN_P''@|$(HAVE_GLOB_PATTERN_P)|g' \ - -e 's|@''REPLACE_GLOB''@|$(REPLACE_GLOB)|g' \ - -e 's|@''REPLACE_GLOB_PATTERN_P''@|$(REPLACE_GLOB_PATTERN_P)|g' \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''HAVE_SYS_CDEFS_H''@|$(HAVE_SYS_CDEFS_H)|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)/glob.in.h; \ } > $@-t && \ - mv $@-t $@ + mv -f $@-t $@ else glob.h: $(top_builddir)/config.status rm -f $@ endif MOSTLYCLEANFILES += glob.h glob.h-t -EXTRA_DIST += glob-libc.h glob.in.h +EXTRA_DIST += glob-libc.h glob.c glob.in.h -## end gnulib module glob-h +EXTRA_libgnu_a_SOURCES += glob.c + +## end gnulib module glob ## begin gnulib module hard-locale @@ -695,7 +658,6 @@ inttypes.h: inttypes.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_U -e 's/@''HAVE_DECL_IMAXDIV''@/$(HAVE_DECL_IMAXDIV)/g' \ -e 's/@''HAVE_DECL_STRTOIMAX''@/$(HAVE_DECL_STRTOIMAX)/g' \ -e 's/@''HAVE_DECL_STRTOUMAX''@/$(HAVE_DECL_STRTOUMAX)/g' \ - -e 's/@''HAVE_IMAXDIV_T''@/$(HAVE_IMAXDIV_T)/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' \ @@ -732,13 +694,6 @@ EXTRA_libgnu_a_SOURCES += isnan.c isnanl.c ## end gnulib module isnanl-nolibm -## begin gnulib module libc-config - - -EXTRA_DIST += cdefs.h libc-config.h - -## end gnulib module libc-config - ## begin gnulib module limits-h BUILT_SOURCES += $(LIMITS_H) @@ -769,20 +724,77 @@ EXTRA_DIST += limits.in.h ## begin gnulib module localcharset -libgnu_a_SOURCES += localcharset.c - -EXTRA_DIST += localcharset.h - -## end gnulib module localcharset +libgnu_a_SOURCES += localcharset.h localcharset.c + +# We need the following in order to install a simple file in $(libdir) +# which is shared with other installed packages. We use a list of referencing +# packages so that "make uninstall" will remove the file if and only if it +# is not used by another installed package. +# On systems with glibc-2.1 or newer, the file is redundant, therefore we +# avoid installing it. + +all-local: charset.alias ref-add.sed ref-del.sed + +charset_alias = $(DESTDIR)$(libdir)/charset.alias +charset_tmp = $(DESTDIR)$(libdir)/charset.tmp +install-exec-local: install-exec-localcharset +install-exec-localcharset: all-local + if test $(GLIBC21) = no; then \ + case '$(host_os)' in \ + darwin[56]*) \ + need_charset_alias=true ;; \ + darwin* | cygwin* | mingw* | pw32* | cegcc*) \ + need_charset_alias=false ;; \ + *) \ + need_charset_alias=true ;; \ + esac ; \ + else \ + need_charset_alias=false ; \ + fi ; \ + if $$need_charset_alias; then \ + $(mkinstalldirs) $(DESTDIR)$(libdir) ; \ + fi ; \ + if test -f $(charset_alias); then \ + sed -f ref-add.sed $(charset_alias) > $(charset_tmp) ; \ + $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \ + rm -f $(charset_tmp) ; \ + else \ + if $$need_charset_alias; then \ + sed -f ref-add.sed charset.alias > $(charset_tmp) ; \ + $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \ + rm -f $(charset_tmp) ; \ + fi ; \ + fi + +uninstall-local: uninstall-localcharset +uninstall-localcharset: all-local + if test -f $(charset_alias); then \ + sed -f ref-del.sed $(charset_alias) > $(charset_tmp); \ + if grep '^# Packages using this file: $$' $(charset_tmp) \ + > /dev/null; then \ + rm -f $(charset_alias); \ + else \ + $(INSTALL_DATA) $(charset_tmp) $(charset_alias); \ + fi; \ + rm -f $(charset_tmp); \ + fi -## begin gnulib module localtime-buffer +charset.alias: config.charset + $(AM_V_GEN)rm -f t-$@ $@ && \ + $(SHELL) $(srcdir)/config.charset '$(host)' > t-$@ && \ + mv t-$@ $@ +SUFFIXES += .sed .sin +.sin.sed: + $(AM_V_GEN)rm -f t-$@ $@ && \ + sed -e '/^#/d' -e 's/@''PACKAGE''@/$(PACKAGE)/g' $< > t-$@ && \ + mv t-$@ $@ -EXTRA_DIST += localtime-buffer.c localtime-buffer.h +CLEANFILES += charset.alias ref-add.sed ref-del.sed -EXTRA_libgnu_a_SOURCES += localtime-buffer.c +EXTRA_DIST += config.charset ref-add.sin ref-del.sin -## end gnulib module localtime-buffer +## end gnulib module localcharset ## begin gnulib module lstat @@ -806,7 +818,7 @@ EXTRA_libgnu_a_SOURCES += malloc.c libgnu_a_SOURCES += malloca.c -EXTRA_DIST += malloca.h +EXTRA_DIST += malloca.h malloca.valgrind ## end gnulib module malloca @@ -1019,18 +1031,11 @@ math.h: math.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $( -e 's|@''HAVE_DECL_TRUNCF''@|$(HAVE_DECL_TRUNCF)|g' \ -e 's|@''HAVE_DECL_TRUNCL''@|$(HAVE_DECL_TRUNCL)|g' \ | \ - sed -e 's|@''REPLACE_ACOSF''@|$(REPLACE_ACOSF)|g' \ - -e 's|@''REPLACE_ASINF''@|$(REPLACE_ASINF)|g' \ - -e 's|@''REPLACE_ATANF''@|$(REPLACE_ATANF)|g' \ - -e 's|@''REPLACE_ATAN2F''@|$(REPLACE_ATAN2F)|g' \ - -e 's|@''REPLACE_CBRTF''@|$(REPLACE_CBRTF)|g' \ + sed -e 's|@''REPLACE_CBRTF''@|$(REPLACE_CBRTF)|g' \ -e 's|@''REPLACE_CBRTL''@|$(REPLACE_CBRTL)|g' \ -e 's|@''REPLACE_CEIL''@|$(REPLACE_CEIL)|g' \ -e 's|@''REPLACE_CEILF''@|$(REPLACE_CEILF)|g' \ -e 's|@''REPLACE_CEILL''@|$(REPLACE_CEILL)|g' \ - -e 's|@''REPLACE_COSF''@|$(REPLACE_COSF)|g' \ - -e 's|@''REPLACE_COSHF''@|$(REPLACE_COSHF)|g' \ - -e 's|@''REPLACE_EXPF''@|$(REPLACE_EXPF)|g' \ -e 's|@''REPLACE_EXPM1''@|$(REPLACE_EXPM1)|g' \ -e 's|@''REPLACE_EXPM1F''@|$(REPLACE_EXPM1F)|g' \ -e 's|@''REPLACE_EXP2''@|$(REPLACE_EXP2)|g' \ @@ -1054,7 +1059,6 @@ math.h: math.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $( -e 's|@''REPLACE_HYPOTL''@|$(REPLACE_HYPOTL)|g' \ -e 's|@''REPLACE_ILOGB''@|$(REPLACE_ILOGB)|g' \ -e 's|@''REPLACE_ILOGBF''@|$(REPLACE_ILOGBF)|g' \ - -e 's|@''REPLACE_ILOGBL''@|$(REPLACE_ILOGBL)|g' \ -e 's|@''REPLACE_ISFINITE''@|$(REPLACE_ISFINITE)|g' \ -e 's|@''REPLACE_ISINF''@|$(REPLACE_ISINF)|g' \ -e 's|@''REPLACE_ISNAN''@|$(REPLACE_ISNAN)|g' \ @@ -1087,12 +1091,7 @@ math.h: math.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $( -e 's|@''REPLACE_ROUNDL''@|$(REPLACE_ROUNDL)|g' \ -e 's|@''REPLACE_SIGNBIT''@|$(REPLACE_SIGNBIT)|g' \ -e 's|@''REPLACE_SIGNBIT_USING_GCC''@|$(REPLACE_SIGNBIT_USING_GCC)|g' \ - -e 's|@''REPLACE_SINF''@|$(REPLACE_SINF)|g' \ - -e 's|@''REPLACE_SINHF''@|$(REPLACE_SINHF)|g' \ - -e 's|@''REPLACE_SQRTF''@|$(REPLACE_SQRTF)|g' \ -e 's|@''REPLACE_SQRTL''@|$(REPLACE_SQRTL)|g' \ - -e 's|@''REPLACE_TANF''@|$(REPLACE_TANF)|g' \ - -e 's|@''REPLACE_TANHF''@|$(REPLACE_TANHF)|g' \ -e 's|@''REPLACE_TRUNC''@|$(REPLACE_TRUNC)|g' \ -e 's|@''REPLACE_TRUNCF''@|$(REPLACE_TRUNCF)|g' \ -e 's|@''REPLACE_TRUNCL''@|$(REPLACE_TRUNCL)|g' \ @@ -1331,13 +1330,14 @@ EXTRA_DIST += save-cwd.h ## end gnulib module save-cwd -## begin gnulib module scratch_buffer +## begin gnulib module secure_getenv + -libgnu_a_SOURCES += malloc/scratch_buffer_grow.c malloc/scratch_buffer_grow_preserve.c malloc/scratch_buffer_set_array_size.c +EXTRA_DIST += secure_getenv.c -EXTRA_DIST += malloc/scratch_buffer.h scratch_buffer.h +EXTRA_libgnu_a_SOURCES += secure_getenv.c -## end gnulib module scratch_buffer +## end gnulib module secure_getenv ## begin gnulib module setenv @@ -1362,8 +1362,8 @@ signal.h: signal.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_SIGNAL_H''@|$(NEXT_SIGNAL_H)|g' \ - -e 's/@''GNULIB_PTHREAD_SIGMASK''@/$(GNULIB_PTHREAD_SIGMASK)/g' \ - -e 's/@''GNULIB_RAISE''@/$(GNULIB_RAISE)/g' \ + -e 's|@''GNULIB_PTHREAD_SIGMASK''@|$(GNULIB_PTHREAD_SIGMASK)|g' \ + -e 's|@''GNULIB_RAISE''@|$(GNULIB_RAISE)|g' \ -e 's/@''GNULIB_SIGNAL_H_SIGPIPE''@/$(GNULIB_SIGNAL_H_SIGPIPE)/g' \ -e 's/@''GNULIB_SIGPROCMASK''@/$(GNULIB_SIGPROCMASK)/g' \ -e 's/@''GNULIB_SIGACTION''@/$(GNULIB_SIGACTION)/g' \ @@ -1393,68 +1393,93 @@ EXTRA_DIST += signal.in.h ## begin gnulib module snippet/_Noreturn # Because this Makefile snippet defines a variable used by other -# gnulib Makefile snippets, it must be present in all makefiles that +# gnulib Makefile snippets, it must be present in all Makefile.am that # need it. This is ensured by the applicability 'all' defined above. -_NORETURN_H=$(srcdir)/_Noreturn.h +_NORETURN_H=$(top_srcdir)/import/extra/snippet/_Noreturn.h -EXTRA_DIST += _Noreturn.h +EXTRA_DIST += $(top_srcdir)/import/extra/snippet/_Noreturn.h ## end gnulib module snippet/_Noreturn ## begin gnulib module snippet/arg-nonnull -# Because this Makefile snippet defines a variable used by other -# gnulib Makefile snippets, it must be present in all makefiles that -# need it. This is ensured by the applicability 'all' defined above. +# The BUILT_SOURCES created by this Makefile snippet are not used via #include +# statements but through direct file reference. Therefore this snippet must be +# present in all Makefile.am that need it. This is ensured by the applicability +# 'all' defined above. + +BUILT_SOURCES += arg-nonnull.h +# The arg-nonnull.h that gets inserted into generated .h files is the same as +# build-aux/snippet/arg-nonnull.h, except that it has the copyright header cut +# off. +arg-nonnull.h: $(top_srcdir)/import/extra/snippet/arg-nonnull.h + $(AM_V_GEN)rm -f $@-t $@ && \ + sed -n -e '/GL_ARG_NONNULL/,$$p' \ + < $(top_srcdir)/import/extra/snippet/arg-nonnull.h \ + > $@-t && \ + mv $@-t $@ +MOSTLYCLEANFILES += arg-nonnull.h arg-nonnull.h-t -ARG_NONNULL_H=$(srcdir)/arg-nonnull.h +ARG_NONNULL_H=arg-nonnull.h -EXTRA_DIST += arg-nonnull.h +EXTRA_DIST += $(top_srcdir)/import/extra/snippet/arg-nonnull.h ## end gnulib module snippet/arg-nonnull ## begin gnulib module snippet/c++defs -# Because this Makefile snippet defines a variable used by other -# gnulib Makefile snippets, it must be present in all makefiles that -# need it. This is ensured by the applicability 'all' defined above. +# The BUILT_SOURCES created by this Makefile snippet are not used via #include +# statements but through direct file reference. Therefore this snippet must be +# present in all Makefile.am that need it. This is ensured by the applicability +# 'all' defined above. -CXXDEFS_H=$(srcdir)/c++defs.h +BUILT_SOURCES += c++defs.h +# The c++defs.h that gets inserted into generated .h files is the same as +# build-aux/snippet/c++defs.h, except that it has the copyright header cut off. +c++defs.h: $(top_srcdir)/import/extra/snippet/c++defs.h + $(AM_V_GEN)rm -f $@-t $@ && \ + sed -n -e '/_GL_CXXDEFS/,$$p' \ + < $(top_srcdir)/import/extra/snippet/c++defs.h \ + > $@-t && \ + mv $@-t $@ +MOSTLYCLEANFILES += c++defs.h c++defs.h-t + +CXXDEFS_H=c++defs.h -EXTRA_DIST += c++defs.h +EXTRA_DIST += $(top_srcdir)/import/extra/snippet/c++defs.h ## end gnulib module snippet/c++defs ## begin gnulib module snippet/warn-on-use -# Because this Makefile snippet defines a variable used by other -# gnulib Makefile snippets, it must be present in all makefiles that -# need it. This is ensured by the applicability 'all' defined above. +BUILT_SOURCES += warn-on-use.h +# The warn-on-use.h that gets inserted into generated .h files is the same as +# build-aux/snippet/warn-on-use.h, except that it has the copyright header cut +# off. +warn-on-use.h: $(top_srcdir)/import/extra/snippet/warn-on-use.h + $(AM_V_GEN)rm -f $@-t $@ && \ + sed -n -e '/^.ifndef/,$$p' \ + < $(top_srcdir)/import/extra/snippet/warn-on-use.h \ + > $@-t && \ + mv $@-t $@ +MOSTLYCLEANFILES += warn-on-use.h warn-on-use.h-t -WARN_ON_USE_H=$(srcdir)/warn-on-use.h +WARN_ON_USE_H=warn-on-use.h -EXTRA_DIST += warn-on-use.h +EXTRA_DIST += $(top_srcdir)/import/extra/snippet/warn-on-use.h ## end gnulib module snippet/warn-on-use ## begin gnulib module stat -EXTRA_DIST += stat-w32.c stat-w32.h stat.c +EXTRA_DIST += stat.c -EXTRA_libgnu_a_SOURCES += stat-w32.c stat.c +EXTRA_libgnu_a_SOURCES += stat.c ## end gnulib module stat -## begin gnulib module stat-time - -libgnu_a_SOURCES += stat-time.c - -EXTRA_DIST += stat-time.h - -## end gnulib module stat-time - ## begin gnulib module stdbool BUILT_SOURCES += $(STDBOOL_H) @@ -1547,7 +1572,6 @@ stdint.h: stdint.in.h $(top_builddir)/config.status -e 's/@''BITSIZEOF_WINT_T''@/$(BITSIZEOF_WINT_T)/g' \ -e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \ -e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \ - -e 's/@''GNULIB_OVERRIDES_WINT_T''@/$(GNULIB_OVERRIDES_WINT_T)/g' \ < $(srcdir)/stdint.in.h; \ } > $@-t && \ mv $@-t $@ @@ -1726,7 +1750,6 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \ -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_REALLOCARRAY''@/$(GNULIB_REALLOCARRAY)/g' \ -e 's/@''GNULIB_REALPATH''@/$(GNULIB_REALPATH)/g' \ -e 's/@''GNULIB_RPMATCH''@/$(GNULIB_RPMATCH)/g' \ -e 's/@''GNULIB_SECURE_GETENV''@/$(GNULIB_SECURE_GETENV)/g' \ @@ -1745,7 +1768,6 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \ -e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \ -e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \ -e 's|@''HAVE_GRANTPT''@|$(HAVE_GRANTPT)|g' \ - -e 's|@''HAVE_DECL_INITSTATE''@|$(HAVE_DECL_INITSTATE)|g' \ -e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \ -e 's|@''HAVE_MKOSTEMP''@|$(HAVE_MKOSTEMP)|g' \ -e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \ @@ -1758,12 +1780,10 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \ -e 's|@''HAVE_RANDOM''@|$(HAVE_RANDOM)|g' \ -e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \ -e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \ - -e 's|@''HAVE_REALLOCARRAY''@|$(HAVE_REALLOCARRAY)|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_DECL_SETSTATE''@|$(HAVE_DECL_SETSTATE)|g' \ -e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \ -e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \ -e 's|@''HAVE_STRTOULL''@|$(HAVE_STRTOULL)|g' \ @@ -1856,7 +1876,6 @@ string.h: string.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_STRING_H''@|$(NEXT_STRING_H)|g' \ - -e 's/@''GNULIB_EXPLICIT_BZERO''@/$(GNULIB_EXPLICIT_BZERO)/g' \ -e 's/@''GNULIB_FFSL''@/$(GNULIB_FFSL)/g' \ -e 's/@''GNULIB_FFSLL''@/$(GNULIB_FFSLL)/g' \ -e 's/@''GNULIB_MBSLEN''@/$(GNULIB_MBSLEN)/g' \ @@ -1895,8 +1914,7 @@ string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H -e 's/@''GNULIB_STRSIGNAL''@/$(GNULIB_STRSIGNAL)/g' \ -e 's/@''GNULIB_STRVERSCMP''@/$(GNULIB_STRVERSCMP)/g' \ < $(srcdir)/string.in.h | \ - sed -e 's|@''HAVE_EXPLICIT_BZERO''@|$(HAVE_EXPLICIT_BZERO)|g' \ - -e 's|@''HAVE_FFSL''@|$(HAVE_FFSL)|g' \ + sed -e 's|@''HAVE_FFSL''@|$(HAVE_FFSL)|g' \ -e 's|@''HAVE_FFSLL''@|$(HAVE_FFSLL)|g' \ -e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \ -e 's|@''HAVE_MEMCHR''@|$(HAVE_MEMCHR)|g' \ @@ -1917,20 +1935,20 @@ string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H -e 's|@''HAVE_DECL_STRERROR_R''@|$(HAVE_DECL_STRERROR_R)|g' \ -e 's|@''HAVE_DECL_STRSIGNAL''@|$(HAVE_DECL_STRSIGNAL)|g' \ -e 's|@''HAVE_STRVERSCMP''@|$(HAVE_STRVERSCMP)|g' \ + -e 's|@''REPLACE_STPNCPY''@|$(REPLACE_STPNCPY)|g' \ -e 's|@''REPLACE_MEMCHR''@|$(REPLACE_MEMCHR)|g' \ -e 's|@''REPLACE_MEMMEM''@|$(REPLACE_MEMMEM)|g' \ - -e 's|@''REPLACE_STPNCPY''@|$(REPLACE_STPNCPY)|g' \ + -e 's|@''REPLACE_STRCASESTR''@|$(REPLACE_STRCASESTR)|g' \ -e 's|@''REPLACE_STRCHRNUL''@|$(REPLACE_STRCHRNUL)|g' \ -e 's|@''REPLACE_STRDUP''@|$(REPLACE_STRDUP)|g' \ - -e 's|@''REPLACE_STRNCAT''@|$(REPLACE_STRNCAT)|g' \ - -e 's|@''REPLACE_STRNDUP''@|$(REPLACE_STRNDUP)|g' \ - -e 's|@''REPLACE_STRNLEN''@|$(REPLACE_STRNLEN)|g' \ -e 's|@''REPLACE_STRSTR''@|$(REPLACE_STRSTR)|g' \ - -e 's|@''REPLACE_STRCASESTR''@|$(REPLACE_STRCASESTR)|g' \ - -e 's|@''REPLACE_STRTOK_R''@|$(REPLACE_STRTOK_R)|g' \ -e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \ -e 's|@''REPLACE_STRERROR_R''@|$(REPLACE_STRERROR_R)|g' \ + -e 's|@''REPLACE_STRNCAT''@|$(REPLACE_STRNCAT)|g' \ + -e 's|@''REPLACE_STRNDUP''@|$(REPLACE_STRNDUP)|g' \ + -e 's|@''REPLACE_STRNLEN''@|$(REPLACE_STRNLEN)|g' \ -e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \ + -e 's|@''REPLACE_STRTOK_R''@|$(REPLACE_STRTOK_R)|g' \ -e 's|@''UNDEFINE_STRTOK_R''@|$(UNDEFINE_STRTOK_R)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ @@ -1984,7 +2002,6 @@ sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNU -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_SYS_STAT_H''@|$(NEXT_SYS_STAT_H)|g' \ -e 's|@''WINDOWS_64_BIT_ST_SIZE''@|$(WINDOWS_64_BIT_ST_SIZE)|g' \ - -e 's|@''WINDOWS_STAT_TIMESPEC''@|$(WINDOWS_STAT_TIMESPEC)|g' \ -e 's/@''GNULIB_FCHMODAT''@/$(GNULIB_FCHMODAT)/g' \ -e 's/@''GNULIB_FSTAT''@/$(GNULIB_FSTAT)/g' \ -e 's/@''GNULIB_FSTATAT''@/$(GNULIB_FSTATAT)/g' \ @@ -1998,7 +2015,6 @@ sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNU -e 's/@''GNULIB_MKNODAT''@/$(GNULIB_MKNODAT)/g' \ -e 's/@''GNULIB_STAT''@/$(GNULIB_STAT)/g' \ -e 's/@''GNULIB_UTIMENSAT''@/$(GNULIB_UTIMENSAT)/g' \ - -e 's/@''GNULIB_OVERRIDES_STRUCT_STAT''@/$(GNULIB_OVERRIDES_STRUCT_STAT)/g' \ -e 's|@''HAVE_FCHMODAT''@|$(HAVE_FCHMODAT)|g' \ -e 's|@''HAVE_FSTATAT''@|$(HAVE_FSTATAT)|g' \ -e 's|@''HAVE_FUTIMENS''@|$(HAVE_FUTIMENS)|g' \ @@ -2082,7 +2098,6 @@ sys/types.h: sys_types.in.h $(top_builddir)/config.status -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_SYS_TYPES_H''@|$(NEXT_SYS_TYPES_H)|g' \ -e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \ - -e 's|@''WINDOWS_STAT_INODES''@|$(WINDOWS_STAT_INODES)|g' \ < $(srcdir)/sys_types.in.h; \ } > $@-t && \ mv $@-t $@ @@ -2114,31 +2129,24 @@ 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_CTIME''@/$(GNULIB_CTIME)/g' \ - -e 's/@''GNULIB_LOCALTIME''@/$(GNULIB_LOCALTIME)/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_STRFTIME''@/$(GNULIB_STRFTIME)/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/@''GNULIB_TZSET''@/$(GNULIB_TZSET)/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|@''HAVE_TZSET''@|$(HAVE_TZSET)|g' \ - -e 's|@''REPLACE_CTIME''@|$(REPLACE_CTIME)|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' \ - -e 's|@''REPLACE_STRFTIME''@|$(REPLACE_STRFTIME)|g' \ -e 's|@''REPLACE_TIMEGM''@|$(REPLACE_TIMEGM)|g' \ - -e 's|@''REPLACE_TZSET''@|$(REPLACE_TZSET)|g' \ -e 's|@''PTHREAD_H_DEFINES_STRUCT_TIMESPEC''@|$(PTHREAD_H_DEFINES_STRUCT_TIMESPEC)|g' \ -e 's|@''SYS_TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(SYS_TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \ -e 's|@''TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \ @@ -2194,7 +2202,6 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H -e 's/@''GNULIB_GETLOGIN''@/$(GNULIB_GETLOGIN)/g' \ -e 's/@''GNULIB_GETLOGIN_R''@/$(GNULIB_GETLOGIN_R)/g' \ -e 's/@''GNULIB_GETPAGESIZE''@/$(GNULIB_GETPAGESIZE)/g' \ - -e 's/@''GNULIB_GETPASS''@/$(GNULIB_GETPASS)/g' \ -e 's/@''GNULIB_GETUSERSHELL''@/$(GNULIB_GETUSERSHELL)/g' \ -e 's/@''GNULIB_GROUP_MEMBER''@/$(GNULIB_GROUP_MEMBER)/g' \ -e 's/@''GNULIB_ISATTY''@/$(GNULIB_ISATTY)/g' \ @@ -2214,7 +2221,6 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H -e 's/@''GNULIB_SLEEP''@/$(GNULIB_SLEEP)/g' \ -e 's/@''GNULIB_SYMLINK''@/$(GNULIB_SYMLINK)/g' \ -e 's/@''GNULIB_SYMLINKAT''@/$(GNULIB_SYMLINKAT)/g' \ - -e 's/@''GNULIB_TRUNCATE''@/$(GNULIB_TRUNCATE)/g' \ -e 's/@''GNULIB_TTYNAME_R''@/$(GNULIB_TTYNAME_R)/g' \ -e 's/@''GNULIB_UNISTD_H_GETOPT''@/0$(GNULIB_GL_UNISTD_H_GETOPT)/g' \ -e 's/@''GNULIB_UNISTD_H_NONBLOCKING''@/$(GNULIB_UNISTD_H_NONBLOCKING)/g' \ @@ -2237,8 +2243,8 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H -e 's|@''HAVE_GETDTABLESIZE''@|$(HAVE_GETDTABLESIZE)|g' \ -e 's|@''HAVE_GETGROUPS''@|$(HAVE_GETGROUPS)|g' \ -e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \ + -e 's|@''HAVE_GETLOGIN''@|$(HAVE_GETLOGIN)|g' \ -e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \ - -e 's|@''HAVE_GETPASS''@|$(HAVE_GETPASS)|g' \ -e 's|@''HAVE_GROUP_MEMBER''@|$(HAVE_GROUP_MEMBER)|g' \ -e 's|@''HAVE_LCHOWN''@|$(HAVE_LCHOWN)|g' \ -e 's|@''HAVE_LINK''@|$(HAVE_LINK)|g' \ @@ -2259,12 +2265,10 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H -e 's|@''HAVE_DECL_FCHDIR''@|$(HAVE_DECL_FCHDIR)|g' \ -e 's|@''HAVE_DECL_FDATASYNC''@|$(HAVE_DECL_FDATASYNC)|g' \ -e 's|@''HAVE_DECL_GETDOMAINNAME''@|$(HAVE_DECL_GETDOMAINNAME)|g' \ - -e 's|@''HAVE_DECL_GETLOGIN''@|$(HAVE_DECL_GETLOGIN)|g' \ -e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \ -e 's|@''HAVE_DECL_GETPAGESIZE''@|$(HAVE_DECL_GETPAGESIZE)|g' \ -e 's|@''HAVE_DECL_GETUSERSHELL''@|$(HAVE_DECL_GETUSERSHELL)|g' \ -e 's|@''HAVE_DECL_SETHOSTNAME''@|$(HAVE_DECL_SETHOSTNAME)|g' \ - -e 's|@''HAVE_DECL_TRUNCATE''@|$(HAVE_DECL_TRUNCATE)|g' \ -e 's|@''HAVE_DECL_TTYNAME_R''@|$(HAVE_DECL_TTYNAME_R)|g' \ -e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \ -e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \ @@ -2273,7 +2277,6 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H -e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \ -e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \ -e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \ - -e 's|@''REPLACE_FACCESSAT''@|$(REPLACE_FACCESSAT)|g' \ -e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \ -e 's|@''REPLACE_FTRUNCATE''@|$(REPLACE_FTRUNCATE)|g' \ -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \ @@ -2282,7 +2285,6 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H -e 's|@''REPLACE_GETLOGIN_R''@|$(REPLACE_GETLOGIN_R)|g' \ -e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \ -e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \ - -e 's|@''REPLACE_GETPASS''@|$(REPLACE_GETPASS)|g' \ -e 's|@''REPLACE_ISATTY''@|$(REPLACE_ISATTY)|g' \ -e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \ -e 's|@''REPLACE_LINK''@|$(REPLACE_LINK)|g' \ @@ -2297,7 +2299,6 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H -e 's|@''REPLACE_SLEEP''@|$(REPLACE_SLEEP)|g' \ -e 's|@''REPLACE_SYMLINK''@|$(REPLACE_SYMLINK)|g' \ -e 's|@''REPLACE_SYMLINKAT''@|$(REPLACE_SYMLINKAT)|g' \ - -e 's|@''REPLACE_TRUNCATE''@|$(REPLACE_TRUNCATE)|g' \ -e 's|@''REPLACE_TTYNAME_R''@|$(REPLACE_TTYNAME_R)|g' \ -e 's|@''REPLACE_UNLINK''@|$(REPLACE_UNLINK)|g' \ -e 's|@''REPLACE_UNLINKAT''@|$(REPLACE_UNLINKAT)|g' \ @@ -2363,8 +2364,6 @@ wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) -e 's|@''HAVE_FEATURES_H''@|$(HAVE_FEATURES_H)|g' \ -e 's|@''NEXT_WCHAR_H''@|$(NEXT_WCHAR_H)|g' \ -e 's|@''HAVE_WCHAR_H''@|$(HAVE_WCHAR_H)|g' \ - -e 's/@''HAVE_CRTDEFS_H''@/$(HAVE_CRTDEFS_H)/g' \ - -e 's/@''GNULIB_OVERRIDES_WINT_T''@/$(GNULIB_OVERRIDES_WINT_T)/g' \ -e 's/@''GNULIB_BTOWC''@/$(GNULIB_BTOWC)/g' \ -e 's/@''GNULIB_WCTOB''@/$(GNULIB_WCTOB)/g' \ -e 's/@''GNULIB_MBSINIT''@/$(GNULIB_MBSINIT)/g' \ @@ -2404,7 +2403,6 @@ wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) -e 's/@''GNULIB_WCSSTR''@/$(GNULIB_WCSSTR)/g' \ -e 's/@''GNULIB_WCSTOK''@/$(GNULIB_WCSTOK)/g' \ -e 's/@''GNULIB_WCSWIDTH''@/$(GNULIB_WCSWIDTH)/g' \ - -e 's/@''GNULIB_WCSFTIME''@/$(GNULIB_WCSFTIME)/g' \ < $(srcdir)/wchar.in.h | \ sed -e 's|@''HAVE_WINT_T''@|$(HAVE_WINT_T)|g' \ -e 's|@''HAVE_BTOWC''@|$(HAVE_BTOWC)|g' \ @@ -2444,7 +2442,6 @@ wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) -e 's|@''HAVE_WCSSTR''@|$(HAVE_WCSSTR)|g' \ -e 's|@''HAVE_WCSTOK''@|$(HAVE_WCSTOK)|g' \ -e 's|@''HAVE_WCSWIDTH''@|$(HAVE_WCSWIDTH)|g' \ - -e 's|@''HAVE_WCSFTIME''@|$(HAVE_WCSFTIME)|g' \ -e 's|@''HAVE_DECL_WCTOB''@|$(HAVE_DECL_WCTOB)|g' \ -e 's|@''HAVE_DECL_WCWIDTH''@|$(HAVE_DECL_WCWIDTH)|g' \ | \ @@ -2461,7 +2458,6 @@ wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) -e 's|@''REPLACE_WCSNRTOMBS''@|$(REPLACE_WCSNRTOMBS)|g' \ -e 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \ -e 's|@''REPLACE_WCSWIDTH''@|$(REPLACE_WCSWIDTH)|g' \ - -e 's|@''REPLACE_WCSFTIME''@|$(REPLACE_WCSFTIME)|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)'; \ @@ -2489,8 +2485,6 @@ wctype.h: wctype.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_WCTYPE_H''@|$(NEXT_WCTYPE_H)|g' \ - -e 's/@''HAVE_CRTDEFS_H''@/$(HAVE_CRTDEFS_H)/g' \ - -e 's/@''GNULIB_OVERRIDES_WINT_T''@/$(GNULIB_OVERRIDES_WINT_T)/g' \ -e 's/@''GNULIB_ISWBLANK''@/$(GNULIB_ISWBLANK)/g' \ -e 's/@''GNULIB_WCTYPE''@/$(GNULIB_WCTYPE)/g' \ -e 's/@''GNULIB_ISWCTYPE''@/$(GNULIB_ISWCTYPE)/g' \ @@ -2515,13 +2509,6 @@ EXTRA_DIST += wctype.in.h ## end gnulib module wctype-h -## begin gnulib module xalloc-oversized - - -EXTRA_DIST += xalloc-oversized.h - -## end gnulib module xalloc-oversized - mostlyclean-local: mostlyclean-generic @for dir in '' $(MOSTLYCLEANDIRS); do \ diff --git a/gdb/gnulib/import/Makefile.in b/gdb/gnulib/import/Makefile.in index 52efc1fe604..5c1a22b842d 100644 --- a/gdb/gnulib/import/Makefile.in +++ b/gdb/gnulib/import/Makefile.in @@ -14,7 +14,7 @@ @SET_MAKE@ -# Copyright (C) 2002-2018 Free Software Foundation, Inc. +# Copyright (C) 2002-2016 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 @@ -27,7 +27,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this file. If not, see . +# along with this file. If not, see . # # As a special exception to the GNU General Public License, # this file may be distributed as part of a program that @@ -35,49 +35,7 @@ # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. -# Reproduce by: -# gnulib-tool --import \ -# --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 \ -# getcwd \ -# glob \ -# inttypes \ -# limits-h \ -# lstat \ -# memchr \ -# memmem \ -# mkdir \ -# mkstemp \ -# pathmax \ -# rawmemchr \ -# readlink \ -# rename \ -# setenv \ -# signal-h \ -# strchrnul \ -# strstr \ -# strtok_r \ -# sys_stat \ -# unistd \ -# unsetenv \ -# update-copyright \ -# wchar \ -# wctype-h +# Reproduce by: gnulib-tool --import --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 getcwd glob inttypes limits-h lstat memchr memmem mkdir mkstemp pathmax rawmemchr readlink rename setenv signal-h strchrnul strstr strtok_r sys_stat unistd unsetenv update-copyright wchar wctype-h @@ -140,7 +98,6 @@ am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c @@ -159,15 +116,14 @@ target_triplet = @target@ subdir = import ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/import/m4/00gnulib.m4 \ - $(top_srcdir)/import/m4/__inline.m4 \ $(top_srcdir)/import/m4/absolute-header.m4 \ $(top_srcdir)/import/m4/alloca.m4 \ - $(top_srcdir)/import/m4/builtin-expect.m4 \ $(top_srcdir)/import/m4/canonicalize.m4 \ $(top_srcdir)/import/m4/chdir-long.m4 \ $(top_srcdir)/import/m4/close.m4 \ $(top_srcdir)/import/m4/closedir.m4 \ $(top_srcdir)/import/m4/codeset.m4 \ + $(top_srcdir)/import/m4/configmake.m4 \ $(top_srcdir)/import/m4/d-ino.m4 \ $(top_srcdir)/import/m4/d-type.m4 \ $(top_srcdir)/import/m4/dirent_h.m4 \ @@ -192,7 +148,6 @@ am__aclocal_m4_deps = $(top_srcdir)/import/m4/00gnulib.m4 \ $(top_srcdir)/import/m4/flexmember.m4 \ $(top_srcdir)/import/m4/float_h.m4 \ $(top_srcdir)/import/m4/fnmatch.m4 \ - $(top_srcdir)/import/m4/fnmatch_h.m4 \ $(top_srcdir)/import/m4/fpieee.m4 \ $(top_srcdir)/import/m4/frexp.m4 \ $(top_srcdir)/import/m4/frexpl.m4 \ @@ -202,15 +157,14 @@ am__aclocal_m4_deps = $(top_srcdir)/import/m4/00gnulib.m4 \ $(top_srcdir)/import/m4/getcwd-path-max.m4 \ $(top_srcdir)/import/m4/getcwd.m4 \ $(top_srcdir)/import/m4/getdtablesize.m4 \ - $(top_srcdir)/import/m4/getlogin.m4 \ $(top_srcdir)/import/m4/getlogin_r.m4 \ - $(top_srcdir)/import/m4/getpagesize.m4 \ $(top_srcdir)/import/m4/getprogname.m4 \ $(top_srcdir)/import/m4/gettimeofday.m4 \ + $(top_srcdir)/import/m4/glibc21.m4 \ $(top_srcdir)/import/m4/glob.m4 \ - $(top_srcdir)/import/m4/glob_h.m4 \ $(top_srcdir)/import/m4/gnulib-common.m4 \ $(top_srcdir)/import/m4/gnulib-comp.m4 \ + $(top_srcdir)/import/m4/hard-locale.m4 \ $(top_srcdir)/import/m4/include_next.m4 \ $(top_srcdir)/import/m4/inttypes-pri.m4 \ $(top_srcdir)/import/m4/inttypes.m4 \ @@ -222,7 +176,6 @@ am__aclocal_m4_deps = $(top_srcdir)/import/m4/00gnulib.m4 \ $(top_srcdir)/import/m4/locale-fr.m4 \ $(top_srcdir)/import/m4/locale-ja.m4 \ $(top_srcdir)/import/m4/locale-zh.m4 \ - $(top_srcdir)/import/m4/localtime-buffer.m4 \ $(top_srcdir)/import/m4/longlong.m4 \ $(top_srcdir)/import/m4/lstat.m4 \ $(top_srcdir)/import/m4/malloc.m4 \ @@ -246,7 +199,6 @@ am__aclocal_m4_deps = $(top_srcdir)/import/m4/00gnulib.m4 \ $(top_srcdir)/import/m4/nocrash.m4 \ $(top_srcdir)/import/m4/off_t.m4 \ $(top_srcdir)/import/m4/onceonly.m4 \ - $(top_srcdir)/import/m4/open-cloexec.m4 \ $(top_srcdir)/import/m4/open.m4 \ $(top_srcdir)/import/m4/openat.m4 \ $(top_srcdir)/import/m4/opendir.m4 \ @@ -259,12 +211,11 @@ am__aclocal_m4_deps = $(top_srcdir)/import/m4/00gnulib.m4 \ $(top_srcdir)/import/m4/rewinddir.m4 \ $(top_srcdir)/import/m4/rmdir.m4 \ $(top_srcdir)/import/m4/save-cwd.m4 \ + $(top_srcdir)/import/m4/secure_getenv.m4 \ $(top_srcdir)/import/m4/setenv.m4 \ $(top_srcdir)/import/m4/signal_h.m4 \ $(top_srcdir)/import/m4/ssize_t.m4 \ - $(top_srcdir)/import/m4/stat-time.m4 \ $(top_srcdir)/import/m4/stat.m4 \ - $(top_srcdir)/import/m4/std-gnu11.m4 \ $(top_srcdir)/import/m4/stdbool.m4 \ $(top_srcdir)/import/m4/stddef_h.m4 \ $(top_srcdir)/import/m4/stdint.m4 \ @@ -304,20 +255,15 @@ am__v_AR_0 = @echo " AR " $@; am__v_AR_1 = libgnu_a_AR = $(AR) $(ARFLAGS) am__DEPENDENCIES_1 = -am__dirstamp = $(am__leading_dot)dirstamp am_libgnu_a_OBJECTS = cloexec.$(OBJEXT) dirname-lgpl.$(OBJEXT) \ basename-lgpl.$(OBJEXT) stripslash.$(OBJEXT) \ - exitfail.$(OBJEXT) fd-hook.$(OBJEXT) fd-safer-flag.$(OBJEXT) \ - dup-safer-flag.$(OBJEXT) filenamecat-lgpl.$(OBJEXT) \ - getprogname.$(OBJEXT) hard-locale.$(OBJEXT) \ - localcharset.$(OBJEXT) malloca.$(OBJEXT) math.$(OBJEXT) \ - openat-die.$(OBJEXT) save-cwd.$(OBJEXT) \ - malloc/scratch_buffer_grow.$(OBJEXT) \ - malloc/scratch_buffer_grow_preserve.$(OBJEXT) \ - malloc/scratch_buffer_set_array_size.$(OBJEXT) \ - stat-time.$(OBJEXT) strnlen1.$(OBJEXT) tempname.$(OBJEXT) \ - unistd.$(OBJEXT) dup-safer.$(OBJEXT) fd-safer.$(OBJEXT) \ - pipe-safer.$(OBJEXT) wctype-h.$(OBJEXT) + exitfail.$(OBJEXT) fd-hook.$(OBJEXT) \ + filenamecat-lgpl.$(OBJEXT) getprogname.$(OBJEXT) \ + hard-locale.$(OBJEXT) localcharset.$(OBJEXT) malloca.$(OBJEXT) \ + math.$(OBJEXT) openat-die.$(OBJEXT) save-cwd.$(OBJEXT) \ + strnlen1.$(OBJEXT) tempname.$(OBJEXT) unistd.$(OBJEXT) \ + dup-safer.$(OBJEXT) fd-safer.$(OBJEXT) pipe-safer.$(OBJEXT) \ + wctype-h.$(OBJEXT) libgnu_a_OBJECTS = $(am_libgnu_a_OBJECTS) LTLIBRARIES = $(noinst_LTLIBRARIES) AM_V_P = $(am__v_P_@AM_V@) @@ -420,6 +366,7 @@ am__relativize = \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" +pkglibexecdir = @pkglibexecdir@ ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ ALLOCA_H = @ALLOCA_H@ @@ -461,6 +408,7 @@ FLOAT_H = @FLOAT_H@ FNMATCH_H = @FNMATCH_H@ FREXPL_LIBM = @FREXPL_LIBM@ FREXP_LIBM = @FREXP_LIBM@ +GLIBC21 = @GLIBC21@ GLOB_H = @GLOB_H@ GNULIB_ACOSF = @GNULIB_ACOSF@ GNULIB_ACOSL = @GNULIB_ACOSL@ @@ -490,7 +438,6 @@ GNULIB_COPYSIGNL = @GNULIB_COPYSIGNL@ GNULIB_COSF = @GNULIB_COSF@ GNULIB_COSHF = @GNULIB_COSHF@ GNULIB_COSL = @GNULIB_COSL@ -GNULIB_CTIME = @GNULIB_CTIME@ GNULIB_DIRFD = @GNULIB_DIRFD@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ GNULIB_DUP = @GNULIB_DUP@ @@ -503,7 +450,6 @@ GNULIB_EXP2F = @GNULIB_EXP2F@ GNULIB_EXP2L = @GNULIB_EXP2L@ GNULIB_EXPF = @GNULIB_EXPF@ GNULIB_EXPL = @GNULIB_EXPL@ -GNULIB_EXPLICIT_BZERO = @GNULIB_EXPLICIT_BZERO@ GNULIB_EXPM1 = @GNULIB_EXPM1@ GNULIB_EXPM1F = @GNULIB_EXPM1F@ GNULIB_EXPM1L = @GNULIB_EXPM1L@ @@ -532,7 +478,6 @@ GNULIB_FMAL = @GNULIB_FMAL@ GNULIB_FMOD = @GNULIB_FMOD@ GNULIB_FMODF = @GNULIB_FMODF@ GNULIB_FMODL = @GNULIB_FMODL@ -GNULIB_FNMATCH = @GNULIB_FNMATCH@ GNULIB_FOPEN = @GNULIB_FOPEN@ GNULIB_FPRINTF = @GNULIB_FPRINTF@ GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@ @@ -568,11 +513,9 @@ GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ -GNULIB_GETPASS = @GNULIB_GETPASS@ GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@ GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@ GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@ -GNULIB_GLOB = @GNULIB_GLOB@ GNULIB_GRANTPT = @GNULIB_GRANTPT@ GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@ GNULIB_HYPOT = @GNULIB_HYPOT@ @@ -598,7 +541,6 @@ GNULIB_LDEXPF = @GNULIB_LDEXPF@ GNULIB_LDEXPL = @GNULIB_LDEXPL@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ -GNULIB_LOCALTIME = @GNULIB_LOCALTIME@ GNULIB_LOG = @GNULIB_LOG@ GNULIB_LOG10 = @GNULIB_LOG10@ GNULIB_LOG10F = @GNULIB_LOG10F@ @@ -662,8 +604,6 @@ GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@ GNULIB_OPEN = @GNULIB_OPEN@ GNULIB_OPENAT = @GNULIB_OPENAT@ GNULIB_OPENDIR = @GNULIB_OPENDIR@ -GNULIB_OVERRIDES_STRUCT_STAT = @GNULIB_OVERRIDES_STRUCT_STAT@ -GNULIB_OVERRIDES_WINT_T = @GNULIB_OVERRIDES_WINT_T@ GNULIB_PCLOSE = @GNULIB_PCLOSE@ GNULIB_PERROR = @GNULIB_PERROR@ GNULIB_PIPE = @GNULIB_PIPE@ @@ -691,7 +631,6 @@ GNULIB_READ = @GNULIB_READ@ GNULIB_READDIR = @GNULIB_READDIR@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ -GNULIB_REALLOCARRAY = @GNULIB_REALLOCARRAY@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ GNULIB_REALPATH = @GNULIB_REALPATH@ GNULIB_REMAINDER = @GNULIB_REMAINDER@ @@ -736,7 +675,6 @@ GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ GNULIB_STRDUP = @GNULIB_STRDUP@ GNULIB_STRERROR = @GNULIB_STRERROR@ GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ -GNULIB_STRFTIME = @GNULIB_STRFTIME@ GNULIB_STRNCAT = @GNULIB_STRNCAT@ GNULIB_STRNDUP = @GNULIB_STRNDUP@ GNULIB_STRNLEN = @GNULIB_STRNLEN@ @@ -764,11 +702,9 @@ GNULIB_TIME_RZ = @GNULIB_TIME_RZ@ GNULIB_TMPFILE = @GNULIB_TMPFILE@ GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@ GNULIB_TRUNC = @GNULIB_TRUNC@ -GNULIB_TRUNCATE = @GNULIB_TRUNCATE@ GNULIB_TRUNCF = @GNULIB_TRUNCF@ GNULIB_TRUNCL = @GNULIB_TRUNCL@ GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ -GNULIB_TZSET = @GNULIB_TZSET@ GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ @@ -798,7 +734,6 @@ GNULIB_WCSCOLL = @GNULIB_WCSCOLL@ GNULIB_WCSCPY = @GNULIB_WCSCPY@ GNULIB_WCSCSPN = @GNULIB_WCSCSPN@ GNULIB_WCSDUP = @GNULIB_WCSDUP@ -GNULIB_WCSFTIME = @GNULIB_WCSFTIME@ GNULIB_WCSLEN = @GNULIB_WCSLEN@ GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@ GNULIB_WCSNCAT = @GNULIB_WCSNCAT@ @@ -849,7 +784,6 @@ HAVE_COPYSIGNL = @HAVE_COPYSIGNL@ HAVE_COSF = @HAVE_COSF@ HAVE_COSHF = @HAVE_COSHF@ HAVE_COSL = @HAVE_COSL@ -HAVE_CRTDEFS_H = @HAVE_CRTDEFS_H@ HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@ HAVE_DECL_ASINL = @HAVE_DECL_ASINL@ HAVE_DECL_ATANL = @HAVE_DECL_ATANL@ @@ -879,13 +813,11 @@ HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ -HAVE_DECL_GETLOGIN = @HAVE_DECL_GETLOGIN@ HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ -HAVE_DECL_INITSTATE = @HAVE_DECL_INITSTATE@ HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ HAVE_DECL_LOG10L = @HAVE_DECL_LOG10L@ @@ -905,7 +837,6 @@ HAVE_DECL_ROUNDF = @HAVE_DECL_ROUNDF@ HAVE_DECL_ROUNDL = @HAVE_DECL_ROUNDL@ HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@ -HAVE_DECL_SETSTATE = @HAVE_DECL_SETSTATE@ HAVE_DECL_SINL = @HAVE_DECL_SINL@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@ @@ -919,7 +850,6 @@ HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@ HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@ HAVE_DECL_TANL = @HAVE_DECL_TANL@ HAVE_DECL_TRUNC = @HAVE_DECL_TRUNC@ -HAVE_DECL_TRUNCATE = @HAVE_DECL_TRUNCATE@ HAVE_DECL_TRUNCF = @HAVE_DECL_TRUNCF@ HAVE_DECL_TRUNCL = @HAVE_DECL_TRUNCL@ HAVE_DECL_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ @@ -934,7 +864,6 @@ HAVE_DUP3 = @HAVE_DUP3@ HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ HAVE_EXPF = @HAVE_EXPF@ HAVE_EXPL = @HAVE_EXPL@ -HAVE_EXPLICIT_BZERO = @HAVE_EXPLICIT_BZERO@ HAVE_EXPM1 = @HAVE_EXPM1@ HAVE_EXPM1F = @HAVE_EXPM1F@ HAVE_FABSF = @HAVE_FABSF@ @@ -954,8 +883,6 @@ HAVE_FMAF = @HAVE_FMAF@ HAVE_FMAL = @HAVE_FMAL@ HAVE_FMODF = @HAVE_FMODF@ HAVE_FMODL = @HAVE_FMODL@ -HAVE_FNMATCH = @HAVE_FNMATCH@ -HAVE_FNMATCH_H = @HAVE_FNMATCH_H@ HAVE_FREXPF = @HAVE_FREXPF@ HAVE_FSEEKO = @HAVE_FSEEKO@ HAVE_FSTATAT = @HAVE_FSTATAT@ @@ -968,12 +895,8 @@ HAVE_GETGROUPS = @HAVE_GETGROUPS@ HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ HAVE_GETLOGIN = @HAVE_GETLOGIN@ HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ -HAVE_GETPASS = @HAVE_GETPASS@ HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@ -HAVE_GLOB = @HAVE_GLOB@ -HAVE_GLOB_H = @HAVE_GLOB_H@ -HAVE_GLOB_PATTERN_P = @HAVE_GLOB_PATTERN_P@ HAVE_GRANTPT = @HAVE_GRANTPT@ HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ HAVE_HYPOTF = @HAVE_HYPOTF@ @@ -981,7 +904,6 @@ HAVE_HYPOTL = @HAVE_HYPOTL@ HAVE_ILOGB = @HAVE_ILOGB@ HAVE_ILOGBF = @HAVE_ILOGBF@ HAVE_ILOGBL = @HAVE_ILOGBL@ -HAVE_IMAXDIV_T = @HAVE_IMAXDIV_T@ HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISNAND = @HAVE_ISNAND@ HAVE_ISNANF = @HAVE_ISNANF@ @@ -1051,7 +973,6 @@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ HAVE_READDIR = @HAVE_READDIR@ HAVE_READLINK = @HAVE_READLINK@ HAVE_READLINKAT = @HAVE_READLINKAT@ -HAVE_REALLOCARRAY = @HAVE_REALLOCARRAY@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_REMAINDER = @HAVE_REMAINDER@ HAVE_REMAINDERF = @HAVE_REMAINDERF@ @@ -1096,6 +1017,7 @@ HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ HAVE_SYMLINK = @HAVE_SYMLINK@ HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ +HAVE_SYS_CDEFS_H = @HAVE_SYS_CDEFS_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@ @@ -1107,7 +1029,6 @@ HAVE_TANL = @HAVE_TANL@ HAVE_TIMEGM = @HAVE_TIMEGM@ HAVE_TIMEZONE_T = @HAVE_TIMEZONE_T@ HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@ -HAVE_TZSET = @HAVE_TZSET@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ HAVE_UNLINKAT = @HAVE_UNLINKAT@ HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ @@ -1129,7 +1050,6 @@ HAVE_WCSCOLL = @HAVE_WCSCOLL@ HAVE_WCSCPY = @HAVE_WCSCPY@ HAVE_WCSCSPN = @HAVE_WCSCSPN@ HAVE_WCSDUP = @HAVE_WCSDUP@ -HAVE_WCSFTIME = @HAVE_WCSFTIME@ HAVE_WCSLEN = @HAVE_WCSLEN@ HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@ HAVE_WCSNCAT = @HAVE_WCSNCAT@ @@ -1172,7 +1092,6 @@ LIBGNU_LTLIBDEPS = @LIBGNU_LTLIBDEPS@ LIBINTL = @LIBINTL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ -LIB_GETLOGIN = @LIB_GETLOGIN@ LIMITS_H = @LIMITS_H@ LN_S = @LN_S@ LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ @@ -1189,8 +1108,6 @@ NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ -NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H = @NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H@ -NEXT_AS_FIRST_DIRECTIVE_GLOB_H = @NEXT_AS_FIRST_DIRECTIVE_GLOB_H@ NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@ NEXT_AS_FIRST_DIRECTIVE_LIMITS_H = @NEXT_AS_FIRST_DIRECTIVE_LIMITS_H@ NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@ @@ -1211,8 +1128,6 @@ NEXT_DIRENT_H = @NEXT_DIRENT_H@ NEXT_ERRNO_H = @NEXT_ERRNO_H@ NEXT_FCNTL_H = @NEXT_FCNTL_H@ NEXT_FLOAT_H = @NEXT_FLOAT_H@ -NEXT_FNMATCH_H = @NEXT_FNMATCH_H@ -NEXT_GLOB_H = @NEXT_GLOB_H@ NEXT_INTTYPES_H = @NEXT_INTTYPES_H@ NEXT_LIMITS_H = @NEXT_LIMITS_H@ NEXT_MATH_H = @NEXT_MATH_H@ @@ -1245,10 +1160,6 @@ PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@ PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@ RANLIB = @RANLIB@ -REPLACE_ACOSF = @REPLACE_ACOSF@ -REPLACE_ASINF = @REPLACE_ASINF@ -REPLACE_ATAN2F = @REPLACE_ATAN2F@ -REPLACE_ATANF = @REPLACE_ATANF@ REPLACE_BTOWC = @REPLACE_BTOWC@ REPLACE_CALLOC = @REPLACE_CALLOC@ REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ @@ -1260,20 +1171,15 @@ REPLACE_CEILL = @REPLACE_CEILL@ REPLACE_CHOWN = @REPLACE_CHOWN@ REPLACE_CLOSE = @REPLACE_CLOSE@ REPLACE_CLOSEDIR = @REPLACE_CLOSEDIR@ -REPLACE_COSF = @REPLACE_COSF@ -REPLACE_COSHF = @REPLACE_COSHF@ -REPLACE_CTIME = @REPLACE_CTIME@ REPLACE_DIRFD = @REPLACE_DIRFD@ REPLACE_DPRINTF = @REPLACE_DPRINTF@ REPLACE_DUP = @REPLACE_DUP@ REPLACE_DUP2 = @REPLACE_DUP2@ REPLACE_EXP2 = @REPLACE_EXP2@ REPLACE_EXP2L = @REPLACE_EXP2L@ -REPLACE_EXPF = @REPLACE_EXPF@ REPLACE_EXPM1 = @REPLACE_EXPM1@ REPLACE_EXPM1F = @REPLACE_EXPM1F@ REPLACE_FABSL = @REPLACE_FABSL@ -REPLACE_FACCESSAT = @REPLACE_FACCESSAT@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FCNTL = @REPLACE_FCNTL@ @@ -1289,7 +1195,6 @@ REPLACE_FMAL = @REPLACE_FMAL@ REPLACE_FMOD = @REPLACE_FMOD@ REPLACE_FMODF = @REPLACE_FMODF@ REPLACE_FMODL = @REPLACE_FMODL@ -REPLACE_FNMATCH = @REPLACE_FNMATCH@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ REPLACE_FPURGE = @REPLACE_FPURGE@ @@ -1313,10 +1218,7 @@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ -REPLACE_GETPASS = @REPLACE_GETPASS@ REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ -REPLACE_GLOB = @REPLACE_GLOB@ -REPLACE_GLOB_PATTERN_P = @REPLACE_GLOB_PATTERN_P@ REPLACE_GMTIME = @REPLACE_GMTIME@ REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@ REPLACE_HYPOT = @REPLACE_HYPOT@ @@ -1324,7 +1226,6 @@ REPLACE_HYPOTF = @REPLACE_HYPOTF@ REPLACE_HYPOTL = @REPLACE_HYPOTL@ REPLACE_ILOGB = @REPLACE_ILOGB@ REPLACE_ILOGBF = @REPLACE_ILOGBF@ -REPLACE_ILOGBL = @REPLACE_ILOGBL@ REPLACE_ISATTY = @REPLACE_ISATTY@ REPLACE_ISFINITE = @REPLACE_ISFINITE@ REPLACE_ISINF = @REPLACE_ISINF@ @@ -1410,12 +1311,9 @@ REPLACE_ROUNDL = @REPLACE_ROUNDL@ REPLACE_SETENV = @REPLACE_SETENV@ REPLACE_SIGNBIT = @REPLACE_SIGNBIT@ REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@ -REPLACE_SINF = @REPLACE_SINF@ -REPLACE_SINHF = @REPLACE_SINHF@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ -REPLACE_SQRTF = @REPLACE_SQRTF@ REPLACE_SQRTL = @REPLACE_SQRTL@ REPLACE_STAT = @REPLACE_STAT@ REPLACE_STDIO_READ_FUNCS = @REPLACE_STDIO_READ_FUNCS@ @@ -1426,7 +1324,6 @@ REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@ REPLACE_STRDUP = @REPLACE_STRDUP@ REPLACE_STRERROR = @REPLACE_STRERROR@ REPLACE_STRERROR_R = @REPLACE_STRERROR_R@ -REPLACE_STRFTIME = @REPLACE_STRFTIME@ REPLACE_STRNCAT = @REPLACE_STRNCAT@ REPLACE_STRNDUP = @REPLACE_STRNDUP@ REPLACE_STRNLEN = @REPLACE_STRNLEN@ @@ -1439,17 +1336,13 @@ REPLACE_STRTOUMAX = @REPLACE_STRTOUMAX@ REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@ REPLACE_SYMLINK = @REPLACE_SYMLINK@ REPLACE_SYMLINKAT = @REPLACE_SYMLINKAT@ -REPLACE_TANF = @REPLACE_TANF@ -REPLACE_TANHF = @REPLACE_TANHF@ REPLACE_TIMEGM = @REPLACE_TIMEGM@ REPLACE_TMPFILE = @REPLACE_TMPFILE@ REPLACE_TOWLOWER = @REPLACE_TOWLOWER@ REPLACE_TRUNC = @REPLACE_TRUNC@ -REPLACE_TRUNCATE = @REPLACE_TRUNCATE@ REPLACE_TRUNCF = @REPLACE_TRUNCF@ REPLACE_TRUNCL = @REPLACE_TRUNCL@ REPLACE_TTYNAME_R = @REPLACE_TTYNAME_R@ -REPLACE_TZSET = @REPLACE_TZSET@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ REPLACE_UNSETENV = @REPLACE_UNSETENV@ @@ -1462,7 +1355,6 @@ REPLACE_VPRINTF = @REPLACE_VPRINTF@ REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ -REPLACE_WCSFTIME = @REPLACE_WCSFTIME@ REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@ @@ -1490,13 +1382,12 @@ VERSION = @VERSION@ WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@ WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@ WINDOWS_64_BIT_ST_SIZE = @WINDOWS_64_BIT_ST_SIZE@ -WINDOWS_STAT_INODES = @WINDOWS_STAT_INODES@ -WINDOWS_STAT_TIMESPEC = @WINDOWS_STAT_TIMESPEC@ WINT_T_SUFFIX = @WINT_T_SUFFIX@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ @@ -1531,6 +1422,7 @@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ +lispdir = @lispdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ @@ -1540,6 +1432,7 @@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -1552,122 +1445,121 @@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -AUTOMAKE_OPTIONS = 1.9.6 gnits subdir-objects +AUTOMAKE_OPTIONS = 1.9.6 gnits SUBDIRS = noinst_HEADERS = noinst_LIBRARIES = libgnu.a noinst_LTLIBRARIES = -# No GNU Make output. EXTRA_DIST = m4/gnulib-cache.m4 alloca.c alloca.in.h assure.h \ openat-priv.h openat-proc.c canonicalize-lgpl.c chdir-long.c \ chdir-long.h cloexec.h close.c closedir.c dirent-private.h \ dirent.in.h dirfd.c dirname.h dosname.h dup.c dup2.c \ errno.in.h error.c error.h exitfail.h fchdir.c fcntl.c \ fcntl.in.h fd-hook.h fdopendir.c filename.h filenamecat.h \ - flexmember.h float.c float.in.h itold.c fnmatch.c \ - fnmatch_loop.c fnmatch.in.h fpucw.h frexp.c frexp.c frexpl.c \ - fstat.c stat-w32.c stat-w32.h at-func.c fstatat.c getcwd.c \ - getcwd-lgpl.c getdtablesize.c getlogin_r.c gettimeofday.c \ - glob.c glob_internal.h glob_pattern_p.c globfree.c glob-libc.h \ - glob.in.h hard-locale.h intprops.h inttypes.in.h float+.h \ - isnan.c isnand-nolibm.h isnand.c float+.h isnan.c \ - isnanl-nolibm.h isnanl.c cdefs.h libc-config.h limits.in.h \ - localcharset.h localtime-buffer.c localtime-buffer.h lstat.c \ - malloc.c malloca.h 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 mempcpy.c memrchr.c \ - mkdir.c mkstemp.c msvc-inval.c msvc-inval.h msvc-nothrow.c \ - msvc-nothrow.h open.c openat.c openat.h dirent-private.h \ - opendir.c pathmax.h rawmemchr.c rawmemchr.valgrind \ - dirent-private.h readdir.c readlink.c realloc.c rename.c \ - dirent-private.h rewinddir.c rmdir.c same-inode.h save-cwd.h \ - malloc/scratch_buffer.h scratch_buffer.h setenv.c signal.in.h \ - _Noreturn.h arg-nonnull.h c++defs.h warn-on-use.h stat-w32.c \ - stat-w32.h stat.c stat-time.h stdbool.in.h stddef.in.h \ - stdint.in.h stdio.in.h stdlib.in.h strchrnul.c \ - strchrnul.valgrind strdup.c streq.h strerror.c \ + flexmember.h float.c float.in.h itold.c fnmatch.c fnmatch.in.h \ + fnmatch_loop.c fpucw.h frexp.c frexp.c frexpl.c fstat.c \ + at-func.c fstatat.c getcwd.c getcwd-lgpl.c getdtablesize.c \ + getlogin_r.c gettimeofday.c glob-libc.h glob.c glob.in.h \ + hard-locale.h intprops.h inttypes.in.h float+.h isnan.c \ + isnand-nolibm.h isnand.c float+.h isnan.c isnanl-nolibm.h \ + isnanl.c limits.in.h 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 \ + mempcpy.c memrchr.c mkdir.c mkstemp.c msvc-inval.c \ + msvc-inval.h msvc-nothrow.c msvc-nothrow.h open.c openat.c \ + openat.h dirent-private.h opendir.c pathmax.h rawmemchr.c \ + rawmemchr.valgrind dirent-private.h readdir.c readlink.c \ + realloc.c rename.c dirent-private.h rewinddir.c rmdir.c \ + same-inode.h save-cwd.h secure_getenv.c setenv.c signal.in.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 \ + strchrnul.c strchrnul.valgrind strdup.c streq.h strerror.c \ strerror-override.c strerror-override.h string.in.h \ str-two-way.h strstr.c strtok_r.c sys_stat.in.h sys_time.in.h \ sys_types.in.h tempname.h time.in.h unistd.in.h unistd--.h \ unistd-safer.h unsetenv.c \ $(top_srcdir)/import/extra/update-copyright verify.h \ - wchar.in.h wctype.in.h xalloc-oversized.h -BUILT_SOURCES = $(ALLOCA_H) dirent.h $(ERRNO_H) fcntl.h $(FLOAT_H) \ - $(FNMATCH_H) $(GLOB_H) inttypes.h $(LIMITS_H) math.h signal.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 +# present in all Makefile.am that need it. This is ensured by the applicability +# 'all' defined above. + +# The BUILT_SOURCES created by this Makefile snippet are not used via #include +# statements but through direct file reference. Therefore this snippet must be +# present in all Makefile.am that need it. This is ensured by the applicability +# 'all' defined above. +BUILT_SOURCES = $(ALLOCA_H) configmake.h dirent.h $(ERRNO_H) fcntl.h \ + $(FLOAT_H) $(FNMATCH_H) $(GLOB_H) inttypes.h $(LIMITS_H) \ + math.h signal.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/time.h sys/types.h time.h unistd.h wchar.h \ wctype.h -SUFFIXES = +SUFFIXES = .sed .sin MOSTLYCLEANFILES = core *.stackdump alloca.h alloca.h-t dirent.h \ dirent.h-t errno.h errno.h-t fcntl.h fcntl.h-t float.h \ float.h-t fnmatch.h fnmatch.h-t glob.h glob.h-t inttypes.h \ inttypes.h-t limits.h limits.h-t math.h math.h-t signal.h \ - signal.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/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 + signal.h-t arg-nonnull.h arg-nonnull.h-t c++defs.h c++defs.h-t \ + warn-on-use.h warn-on-use.h-t stdbool.h stdbool.h-t stddef.h \ + stddef.h-t stdint.h stdint.h-t stdio.h stdio.h-t stdlib.h \ + stdlib.h-t string.h string.h-t sys/stat.h sys/stat.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 = +CLEANFILES = configmake.h configmake.h-t charset.alias ref-add.sed \ + ref-del.sed DISTCLEANFILES = MAINTAINERCLEANFILES = AM_CPPFLAGS = AM_CFLAGS = libgnu_a_SOURCES = cloexec.c dirname-lgpl.c basename-lgpl.c \ - stripslash.c exitfail.c fd-hook.c fd-safer-flag.c \ - dup-safer-flag.c filenamecat-lgpl.c getprogname.h \ - getprogname.c gettext.h hard-locale.c localcharset.c malloca.c \ - math.c openat-die.c save-cwd.c malloc/scratch_buffer_grow.c \ - malloc/scratch_buffer_grow_preserve.c \ - malloc/scratch_buffer_set_array_size.c stat-time.c strnlen1.h \ - strnlen1.c tempname.c unistd.c dup-safer.c fd-safer.c \ - pipe-safer.c wctype-h.c + stripslash.c exitfail.c fd-hook.c filenamecat-lgpl.c \ + getprogname.h getprogname.c gettext.h hard-locale.c \ + localcharset.h localcharset.c malloca.c math.c openat-die.c \ + save-cwd.c strnlen1.h strnlen1.c tempname.c unistd.c \ + dup-safer.c fd-safer.c pipe-safer.c wctype-h.c libgnu_a_LIBADD = $(gl_LIBOBJS) @ALLOCA@ libgnu_a_DEPENDENCIES = $(gl_LIBOBJS) @ALLOCA@ EXTRA_libgnu_a_SOURCES = alloca.c openat-proc.c canonicalize-lgpl.c \ chdir-long.c close.c closedir.c dirfd.c dup.c dup2.c error.c \ fchdir.c fcntl.c fdopendir.c float.c itold.c fnmatch.c \ - fnmatch_loop.c frexp.c frexp.c frexpl.c fstat.c stat-w32.c \ - at-func.c fstatat.c getcwd.c getcwd-lgpl.c getdtablesize.c \ - getlogin_r.c gettimeofday.c glob.c glob_pattern_p.c globfree.c \ - isnan.c isnand.c isnan.c isnanl.c localtime-buffer.c lstat.c \ - malloc.c mbrtowc.c mbsinit.c mbsrtowcs-state.c mbsrtowcs.c \ - memchr.c memmem.c mempcpy.c memrchr.c mkdir.c mkstemp.c \ - msvc-inval.c msvc-nothrow.c open.c openat.c opendir.c \ - rawmemchr.c readdir.c readlink.c realloc.c rename.c \ - rewinddir.c rmdir.c setenv.c stat-w32.c stat.c strchrnul.c \ - strdup.c strerror.c strerror-override.c strstr.c strtok_r.c \ - unsetenv.c + fnmatch_loop.c frexp.c frexp.c frexpl.c fstat.c at-func.c \ + fstatat.c getcwd.c getcwd-lgpl.c getdtablesize.c getlogin_r.c \ + gettimeofday.c glob.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 mempcpy.c memrchr.c mkdir.c \ + mkstemp.c msvc-inval.c msvc-nothrow.c open.c openat.c \ + opendir.c rawmemchr.c readdir.c readlink.c realloc.c rename.c \ + rewinddir.c rmdir.c secure_getenv.c setenv.c stat.c \ + strchrnul.c strdup.c strerror.c strerror-override.c strstr.c \ + strtok_r.c unsetenv.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 # Because this Makefile snippet defines a variable used by other -# gnulib Makefile snippets, it must be present in all makefiles that -# need it. This is ensured by the applicability 'all' defined above. -_NORETURN_H = $(srcdir)/_Noreturn.h - -# Because this Makefile snippet defines a variable used by other -# gnulib Makefile snippets, it must be present in all makefiles that -# need it. This is ensured by the applicability 'all' defined above. -ARG_NONNULL_H = $(srcdir)/arg-nonnull.h - -# Because this Makefile snippet defines a variable used by other -# gnulib Makefile snippets, it must be present in all makefiles that -# need it. This is ensured by the applicability 'all' defined above. -CXXDEFS_H = $(srcdir)/c++defs.h - -# Because this Makefile snippet defines a variable used by other -# gnulib Makefile snippets, it must be present in all makefiles that +# gnulib Makefile snippets, it must be present in all Makefile.am that # need it. This is ensured by the applicability 'all' defined above. -WARN_ON_USE_H = $(srcdir)/warn-on-use.h +_NORETURN_H = $(top_srcdir)/import/extra/snippet/_Noreturn.h +ARG_NONNULL_H = arg-nonnull.h +CXXDEFS_H = c++defs.h +WARN_ON_USE_H = warn-on-use.h all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: -.SUFFIXES: .c .o .obj +.SUFFIXES: .sed .sin .c .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ @@ -1700,18 +1592,6 @@ $(am__aclocal_m4_deps): clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -malloc/$(am__dirstamp): - @$(MKDIR_P) malloc - @: > malloc/$(am__dirstamp) -malloc/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) malloc/$(DEPDIR) - @: > malloc/$(DEPDIR)/$(am__dirstamp) -malloc/scratch_buffer_grow.$(OBJEXT): malloc/$(am__dirstamp) \ - malloc/$(DEPDIR)/$(am__dirstamp) -malloc/scratch_buffer_grow_preserve.$(OBJEXT): malloc/$(am__dirstamp) \ - malloc/$(DEPDIR)/$(am__dirstamp) -malloc/scratch_buffer_set_array_size.$(OBJEXT): \ - malloc/$(am__dirstamp) malloc/$(DEPDIR)/$(am__dirstamp) libgnu.a: $(libgnu_a_OBJECTS) $(libgnu_a_DEPENDENCIES) $(EXTRA_libgnu_a_DEPENDENCIES) $(AM_V_at)-rm -f libgnu.a @@ -1731,7 +1611,6 @@ clean-noinstLTLIBRARIES: mostlyclean-compile: -rm -f *.$(OBJEXT) - -rm -f malloc/*.$(OBJEXT) distclean-compile: -rm -f *.tab.c @@ -1746,7 +1625,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/closedir.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dirfd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dirname-lgpl.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dup-safer-flag.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dup-safer.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dup.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dup2.Po@am__quote@ @@ -1755,7 +1633,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fchdir.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcntl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fd-hook.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fd-safer-flag.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fd-safer.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fdopendir.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filenamecat-lgpl.Po@am__quote@ @@ -1773,15 +1650,12 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getprogname.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gettimeofday.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glob.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glob_pattern_p.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/globfree.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hard-locale.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@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/itold.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/localcharset.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/localtime-buffer.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lstat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/malloc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/malloca.Po@am__quote@ @@ -1812,9 +1686,8 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rewinddir.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rmdir.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/save-cwd.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/secure_getenv.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setenv.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stat-time.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stat-w32.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strchrnul.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strdup.Po@am__quote@ @@ -1828,22 +1701,17 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unistd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unsetenv.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wctype-h.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@malloc/$(DEPDIR)/scratch_buffer_grow.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@malloc/$(DEPDIR)/scratch_buffer_grow_preserve.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@malloc/$(DEPDIR)/scratch_buffer_set_array_size.Po@am__quote@ .c.o: -@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ -@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: -@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ -@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` @@ -2005,7 +1873,7 @@ distdir: $(DISTFILES) check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-recursive -all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(HEADERS) +all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(HEADERS) all-local installdirs: installdirs-recursive installdirs-am: install: $(BUILT_SOURCES) @@ -2037,8 +1905,6 @@ clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -rm -f malloc/$(DEPDIR)/$(am__dirstamp) - -rm -f malloc/$(am__dirstamp) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @@ -2052,7 +1918,7 @@ clean-am: clean-generic clean-noinstLIBRARIES clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-recursive - -rm -rf ./$(DEPDIR) malloc/$(DEPDIR) + -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags @@ -2075,7 +1941,7 @@ install-dvi: install-dvi-recursive install-dvi-am: -install-exec-am: +install-exec-am: install-exec-local install-html: install-html-recursive @@ -2098,7 +1964,7 @@ install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive - -rm -rf ./$(DEPDIR) malloc/$(DEPDIR) + -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic @@ -2115,24 +1981,25 @@ ps: ps-recursive ps-am: -uninstall-am: +uninstall-am: uninstall-local .MAKE: $(am__recursive_targets) all check install install-am \ install-strip -.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ - check-am clean clean-generic clean-noinstLIBRARIES \ +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am all-local \ + check check-am clean clean-generic clean-noinstLIBRARIES \ clean-noinstLTLIBRARIES cscopelist-am ctags ctags-am distclean \ distclean-compile distclean-generic distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs installdirs-am \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-local pdf \ - pdf-am ps ps-am tags tags-am uninstall uninstall-am + install-exec install-exec-am install-exec-local install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-local pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am uninstall-local .PRECIOUS: Makefile @@ -2148,6 +2015,44 @@ uninstall-am: @GL_GENERATE_ALLOCA_H_FALSE@alloca.h: $(top_builddir)/config.status @GL_GENERATE_ALLOCA_H_FALSE@ rm -f $@ +# Listed in the same order as the GNU makefile conventions, and +# 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 + $(AM_V_GEN)rm -f $@-t && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + echo '#define PREFIX "$(prefix)"'; \ + echo '#define EXEC_PREFIX "$(exec_prefix)"'; \ + echo '#define BINDIR "$(bindir)"'; \ + echo '#define SBINDIR "$(sbindir)"'; \ + echo '#define LIBEXECDIR "$(libexecdir)"'; \ + echo '#define DATAROOTDIR "$(datarootdir)"'; \ + echo '#define DATADIR "$(datadir)"'; \ + 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)"'; \ + echo '#define INFODIR "$(infodir)"'; \ + echo '#define HTMLDIR "$(htmldir)"'; \ + echo '#define DVIDIR "$(dvidir)"'; \ + echo '#define PDFDIR "$(pdfdir)"'; \ + echo '#define PSDIR "$(psdir)"'; \ + echo '#define LIBDIR "$(libdir)"'; \ + echo '#define LISPDIR "$(lispdir)"'; \ + echo '#define LOCALEDIR "$(localedir)"'; \ + echo '#define MANDIR "$(mandir)"'; \ + echo '#define MANEXT "$(manext)"'; \ + echo '#define PKGDATADIR "$(pkgdatadir)"'; \ + echo '#define PKGINCLUDEDIR "$(pkgincludedir)"'; \ + echo '#define PKGLIBDIR "$(pkglibdir)"'; \ + echo '#define PKGLIBEXECDIR "$(pkglibexecdir)"'; \ + } | sed '/""/d' > $@-t && \ + mv -f $@-t $@ + # We need the following in order to create when the system # doesn't have one that works with the given compiler. dirent.h: dirent.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) @@ -2252,49 +2157,30 @@ fcntl.h: fcntl.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) @GL_GENERATE_FLOAT_H_FALSE@float.h: $(top_builddir)/config.status @GL_GENERATE_FLOAT_H_FALSE@ rm -f $@ -# We need the following in order to create . -@GL_GENERATE_FNMATCH_H_TRUE@fnmatch.h: fnmatch.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) +# We need the following in order to create when the system +# doesn't have one that supports the required API. +@GL_GENERATE_FNMATCH_H_TRUE@fnmatch.h: fnmatch.in.h $(top_builddir)/config.status $(ARG_NONNULL_H) @GL_GENERATE_FNMATCH_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \ -@GL_GENERATE_FNMATCH_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ -@GL_GENERATE_FNMATCH_H_TRUE@ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -@GL_GENERATE_FNMATCH_H_TRUE@ -e 's|@''HAVE_FNMATCH_H''@|$(HAVE_FNMATCH_H)|g' \ -@GL_GENERATE_FNMATCH_H_TRUE@ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -@GL_GENERATE_FNMATCH_H_TRUE@ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -@GL_GENERATE_FNMATCH_H_TRUE@ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -@GL_GENERATE_FNMATCH_H_TRUE@ -e 's|@''NEXT_FNMATCH_H''@|$(NEXT_FNMATCH_H)|g' \ -@GL_GENERATE_FNMATCH_H_TRUE@ -e 's/@''GNULIB_FNMATCH''@/$(GNULIB_FNMATCH)/g' \ -@GL_GENERATE_FNMATCH_H_TRUE@ -e 's|@''HAVE_FNMATCH''@|$(HAVE_FNMATCH)|g' \ -@GL_GENERATE_FNMATCH_H_TRUE@ -e 's|@''REPLACE_FNMATCH''@|$(REPLACE_FNMATCH)|g' \ -@GL_GENERATE_FNMATCH_H_TRUE@ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -@GL_GENERATE_FNMATCH_H_TRUE@ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -@GL_GENERATE_FNMATCH_H_TRUE@ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ +@GL_GENERATE_FNMATCH_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ +@GL_GENERATE_FNMATCH_H_TRUE@ sed -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ @GL_GENERATE_FNMATCH_H_TRUE@ < $(srcdir)/fnmatch.in.h; \ @GL_GENERATE_FNMATCH_H_TRUE@ } > $@-t && \ -@GL_GENERATE_FNMATCH_H_TRUE@ mv $@-t $@ +@GL_GENERATE_FNMATCH_H_TRUE@ mv -f $@-t $@ @GL_GENERATE_FNMATCH_H_FALSE@fnmatch.h: $(top_builddir)/config.status @GL_GENERATE_FNMATCH_H_FALSE@ rm -f $@ -# We need the following in order to create . +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. @GL_GENERATE_GLOB_H_TRUE@glob.h: glob.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) @GL_GENERATE_GLOB_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \ -@GL_GENERATE_GLOB_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ -@GL_GENERATE_GLOB_H_TRUE@ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -@GL_GENERATE_GLOB_H_TRUE@ -e 's|@''HAVE_GLOB_H''@|$(HAVE_GLOB_H)|g' \ -@GL_GENERATE_GLOB_H_TRUE@ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -@GL_GENERATE_GLOB_H_TRUE@ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -@GL_GENERATE_GLOB_H_TRUE@ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -@GL_GENERATE_GLOB_H_TRUE@ -e 's|@''NEXT_GLOB_H''@|$(NEXT_GLOB_H)|g' \ -@GL_GENERATE_GLOB_H_TRUE@ -e 's/@''GNULIB_GLOB''@/$(GNULIB_GLOB)/g' \ -@GL_GENERATE_GLOB_H_TRUE@ -e 's|@''HAVE_GLOB''@|$(HAVE_GLOB)|g' \ -@GL_GENERATE_GLOB_H_TRUE@ -e 's|@''HAVE_GLOB_PATTERN_P''@|$(HAVE_GLOB_PATTERN_P)|g' \ -@GL_GENERATE_GLOB_H_TRUE@ -e 's|@''REPLACE_GLOB''@|$(REPLACE_GLOB)|g' \ -@GL_GENERATE_GLOB_H_TRUE@ -e 's|@''REPLACE_GLOB_PATTERN_P''@|$(REPLACE_GLOB_PATTERN_P)|g' \ +@GL_GENERATE_GLOB_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ +@GL_GENERATE_GLOB_H_TRUE@ sed -e 's|@''HAVE_SYS_CDEFS_H''@|$(HAVE_SYS_CDEFS_H)|g' \ @GL_GENERATE_GLOB_H_TRUE@ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ @GL_GENERATE_GLOB_H_TRUE@ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ @GL_GENERATE_GLOB_H_TRUE@ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ @GL_GENERATE_GLOB_H_TRUE@ < $(srcdir)/glob.in.h; \ @GL_GENERATE_GLOB_H_TRUE@ } > $@-t && \ -@GL_GENERATE_GLOB_H_TRUE@ mv $@-t $@ +@GL_GENERATE_GLOB_H_TRUE@ mv -f $@-t $@ @GL_GENERATE_GLOB_H_FALSE@glob.h: $(top_builddir)/config.status @GL_GENERATE_GLOB_H_FALSE@ rm -f $@ @@ -2321,7 +2207,6 @@ inttypes.h: inttypes.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_U -e 's/@''HAVE_DECL_IMAXDIV''@/$(HAVE_DECL_IMAXDIV)/g' \ -e 's/@''HAVE_DECL_STRTOIMAX''@/$(HAVE_DECL_STRTOIMAX)/g' \ -e 's/@''HAVE_DECL_STRTOUMAX''@/$(HAVE_DECL_STRTOUMAX)/g' \ - -e 's/@''HAVE_IMAXDIV_T''@/$(HAVE_IMAXDIV_T)/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' \ @@ -2351,6 +2236,65 @@ inttypes.h: inttypes.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_U @GL_GENERATE_LIMITS_H_FALSE@limits.h: $(top_builddir)/config.status @GL_GENERATE_LIMITS_H_FALSE@ rm -f $@ +# We need the following in order to install a simple file in $(libdir) +# which is shared with other installed packages. We use a list of referencing +# packages so that "make uninstall" will remove the file if and only if it +# is not used by another installed package. +# On systems with glibc-2.1 or newer, the file is redundant, therefore we +# avoid installing it. + +all-local: charset.alias ref-add.sed ref-del.sed +install-exec-local: install-exec-localcharset +install-exec-localcharset: all-local + if test $(GLIBC21) = no; then \ + case '$(host_os)' in \ + darwin[56]*) \ + need_charset_alias=true ;; \ + darwin* | cygwin* | mingw* | pw32* | cegcc*) \ + need_charset_alias=false ;; \ + *) \ + need_charset_alias=true ;; \ + esac ; \ + else \ + need_charset_alias=false ; \ + fi ; \ + if $$need_charset_alias; then \ + $(mkinstalldirs) $(DESTDIR)$(libdir) ; \ + fi ; \ + if test -f $(charset_alias); then \ + sed -f ref-add.sed $(charset_alias) > $(charset_tmp) ; \ + $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \ + rm -f $(charset_tmp) ; \ + else \ + if $$need_charset_alias; then \ + sed -f ref-add.sed charset.alias > $(charset_tmp) ; \ + $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \ + rm -f $(charset_tmp) ; \ + fi ; \ + fi + +uninstall-local: uninstall-localcharset +uninstall-localcharset: all-local + if test -f $(charset_alias); then \ + sed -f ref-del.sed $(charset_alias) > $(charset_tmp); \ + if grep '^# Packages using this file: $$' $(charset_tmp) \ + > /dev/null; then \ + rm -f $(charset_alias); \ + else \ + $(INSTALL_DATA) $(charset_tmp) $(charset_alias); \ + fi; \ + rm -f $(charset_tmp); \ + fi + +charset.alias: config.charset + $(AM_V_GEN)rm -f t-$@ $@ && \ + $(SHELL) $(srcdir)/config.charset '$(host)' > t-$@ && \ + mv t-$@ $@ +.sin.sed: + $(AM_V_GEN)rm -f t-$@ $@ && \ + sed -e '/^#/d' -e 's/@''PACKAGE''@/$(PACKAGE)/g' $< > t-$@ && \ + mv t-$@ $@ + # We need the following in order to create when the system # doesn't have one that works with the given compiler. math.h: math.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) @@ -2555,18 +2499,11 @@ math.h: math.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $( -e 's|@''HAVE_DECL_TRUNCF''@|$(HAVE_DECL_TRUNCF)|g' \ -e 's|@''HAVE_DECL_TRUNCL''@|$(HAVE_DECL_TRUNCL)|g' \ | \ - sed -e 's|@''REPLACE_ACOSF''@|$(REPLACE_ACOSF)|g' \ - -e 's|@''REPLACE_ASINF''@|$(REPLACE_ASINF)|g' \ - -e 's|@''REPLACE_ATANF''@|$(REPLACE_ATANF)|g' \ - -e 's|@''REPLACE_ATAN2F''@|$(REPLACE_ATAN2F)|g' \ - -e 's|@''REPLACE_CBRTF''@|$(REPLACE_CBRTF)|g' \ + sed -e 's|@''REPLACE_CBRTF''@|$(REPLACE_CBRTF)|g' \ -e 's|@''REPLACE_CBRTL''@|$(REPLACE_CBRTL)|g' \ -e 's|@''REPLACE_CEIL''@|$(REPLACE_CEIL)|g' \ -e 's|@''REPLACE_CEILF''@|$(REPLACE_CEILF)|g' \ -e 's|@''REPLACE_CEILL''@|$(REPLACE_CEILL)|g' \ - -e 's|@''REPLACE_COSF''@|$(REPLACE_COSF)|g' \ - -e 's|@''REPLACE_COSHF''@|$(REPLACE_COSHF)|g' \ - -e 's|@''REPLACE_EXPF''@|$(REPLACE_EXPF)|g' \ -e 's|@''REPLACE_EXPM1''@|$(REPLACE_EXPM1)|g' \ -e 's|@''REPLACE_EXPM1F''@|$(REPLACE_EXPM1F)|g' \ -e 's|@''REPLACE_EXP2''@|$(REPLACE_EXP2)|g' \ @@ -2590,7 +2527,6 @@ math.h: math.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $( -e 's|@''REPLACE_HYPOTL''@|$(REPLACE_HYPOTL)|g' \ -e 's|@''REPLACE_ILOGB''@|$(REPLACE_ILOGB)|g' \ -e 's|@''REPLACE_ILOGBF''@|$(REPLACE_ILOGBF)|g' \ - -e 's|@''REPLACE_ILOGBL''@|$(REPLACE_ILOGBL)|g' \ -e 's|@''REPLACE_ISFINITE''@|$(REPLACE_ISFINITE)|g' \ -e 's|@''REPLACE_ISINF''@|$(REPLACE_ISINF)|g' \ -e 's|@''REPLACE_ISNAN''@|$(REPLACE_ISNAN)|g' \ @@ -2623,12 +2559,7 @@ math.h: math.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $( -e 's|@''REPLACE_ROUNDL''@|$(REPLACE_ROUNDL)|g' \ -e 's|@''REPLACE_SIGNBIT''@|$(REPLACE_SIGNBIT)|g' \ -e 's|@''REPLACE_SIGNBIT_USING_GCC''@|$(REPLACE_SIGNBIT_USING_GCC)|g' \ - -e 's|@''REPLACE_SINF''@|$(REPLACE_SINF)|g' \ - -e 's|@''REPLACE_SINHF''@|$(REPLACE_SINHF)|g' \ - -e 's|@''REPLACE_SQRTF''@|$(REPLACE_SQRTF)|g' \ -e 's|@''REPLACE_SQRTL''@|$(REPLACE_SQRTL)|g' \ - -e 's|@''REPLACE_TANF''@|$(REPLACE_TANF)|g' \ - -e 's|@''REPLACE_TANHF''@|$(REPLACE_TANHF)|g' \ -e 's|@''REPLACE_TRUNC''@|$(REPLACE_TRUNC)|g' \ -e 's|@''REPLACE_TRUNCF''@|$(REPLACE_TRUNCF)|g' \ -e 's|@''REPLACE_TRUNCL''@|$(REPLACE_TRUNCL)|g' \ @@ -2648,8 +2579,8 @@ signal.h: signal.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_SIGNAL_H''@|$(NEXT_SIGNAL_H)|g' \ - -e 's/@''GNULIB_PTHREAD_SIGMASK''@/$(GNULIB_PTHREAD_SIGMASK)/g' \ - -e 's/@''GNULIB_RAISE''@/$(GNULIB_RAISE)/g' \ + -e 's|@''GNULIB_PTHREAD_SIGMASK''@|$(GNULIB_PTHREAD_SIGMASK)|g' \ + -e 's|@''GNULIB_RAISE''@|$(GNULIB_RAISE)|g' \ -e 's/@''GNULIB_SIGNAL_H_SIGPIPE''@/$(GNULIB_SIGNAL_H_SIGPIPE)/g' \ -e 's/@''GNULIB_SIGPROCMASK''@/$(GNULIB_SIGPROCMASK)/g' \ -e 's/@''GNULIB_SIGACTION''@/$(GNULIB_SIGACTION)/g' \ @@ -2670,6 +2601,32 @@ signal.h: signal.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H < $(srcdir)/signal.in.h; \ } > $@-t && \ mv $@-t $@ +# The arg-nonnull.h that gets inserted into generated .h files is the same as +# build-aux/snippet/arg-nonnull.h, except that it has the copyright header cut +# off. +arg-nonnull.h: $(top_srcdir)/import/extra/snippet/arg-nonnull.h + $(AM_V_GEN)rm -f $@-t $@ && \ + sed -n -e '/GL_ARG_NONNULL/,$$p' \ + < $(top_srcdir)/import/extra/snippet/arg-nonnull.h \ + > $@-t && \ + mv $@-t $@ +# The c++defs.h that gets inserted into generated .h files is the same as +# build-aux/snippet/c++defs.h, except that it has the copyright header cut off. +c++defs.h: $(top_srcdir)/import/extra/snippet/c++defs.h + $(AM_V_GEN)rm -f $@-t $@ && \ + sed -n -e '/_GL_CXXDEFS/,$$p' \ + < $(top_srcdir)/import/extra/snippet/c++defs.h \ + > $@-t && \ + mv $@-t $@ +# The warn-on-use.h that gets inserted into generated .h files is the same as +# build-aux/snippet/warn-on-use.h, except that it has the copyright header cut +# off. +warn-on-use.h: $(top_srcdir)/import/extra/snippet/warn-on-use.h + $(AM_V_GEN)rm -f $@-t $@ && \ + sed -n -e '/^.ifndef/,$$p' \ + < $(top_srcdir)/import/extra/snippet/warn-on-use.h \ + > $@-t && \ + mv $@-t $@ # We need the following in order to create when the system # doesn't have one that works. @@ -2734,7 +2691,6 @@ signal.h: signal.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''BITSIZEOF_WINT_T''@/$(BITSIZEOF_WINT_T)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \ @GL_GENERATE_STDINT_H_TRUE@ -e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \ -@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''GNULIB_OVERRIDES_WINT_T''@/$(GNULIB_OVERRIDES_WINT_T)/g' \ @GL_GENERATE_STDINT_H_TRUE@ < $(srcdir)/stdint.in.h; \ @GL_GENERATE_STDINT_H_TRUE@ } > $@-t && \ @GL_GENERATE_STDINT_H_TRUE@ mv $@-t $@ @@ -2893,7 +2849,6 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \ -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_REALLOCARRAY''@/$(GNULIB_REALLOCARRAY)/g' \ -e 's/@''GNULIB_REALPATH''@/$(GNULIB_REALPATH)/g' \ -e 's/@''GNULIB_RPMATCH''@/$(GNULIB_RPMATCH)/g' \ -e 's/@''GNULIB_SECURE_GETENV''@/$(GNULIB_SECURE_GETENV)/g' \ @@ -2912,7 +2867,6 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \ -e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \ -e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \ -e 's|@''HAVE_GRANTPT''@|$(HAVE_GRANTPT)|g' \ - -e 's|@''HAVE_DECL_INITSTATE''@|$(HAVE_DECL_INITSTATE)|g' \ -e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \ -e 's|@''HAVE_MKOSTEMP''@|$(HAVE_MKOSTEMP)|g' \ -e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \ @@ -2925,12 +2879,10 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \ -e 's|@''HAVE_RANDOM''@|$(HAVE_RANDOM)|g' \ -e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \ -e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \ - -e 's|@''HAVE_REALLOCARRAY''@|$(HAVE_REALLOCARRAY)|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_DECL_SETSTATE''@|$(HAVE_DECL_SETSTATE)|g' \ -e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \ -e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \ -e 's|@''HAVE_STRTOULL''@|$(HAVE_STRTOULL)|g' \ @@ -2971,7 +2923,6 @@ string.h: string.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_STRING_H''@|$(NEXT_STRING_H)|g' \ - -e 's/@''GNULIB_EXPLICIT_BZERO''@/$(GNULIB_EXPLICIT_BZERO)/g' \ -e 's/@''GNULIB_FFSL''@/$(GNULIB_FFSL)/g' \ -e 's/@''GNULIB_FFSLL''@/$(GNULIB_FFSLL)/g' \ -e 's/@''GNULIB_MBSLEN''@/$(GNULIB_MBSLEN)/g' \ @@ -3010,8 +2961,7 @@ string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H -e 's/@''GNULIB_STRSIGNAL''@/$(GNULIB_STRSIGNAL)/g' \ -e 's/@''GNULIB_STRVERSCMP''@/$(GNULIB_STRVERSCMP)/g' \ < $(srcdir)/string.in.h | \ - sed -e 's|@''HAVE_EXPLICIT_BZERO''@|$(HAVE_EXPLICIT_BZERO)|g' \ - -e 's|@''HAVE_FFSL''@|$(HAVE_FFSL)|g' \ + sed -e 's|@''HAVE_FFSL''@|$(HAVE_FFSL)|g' \ -e 's|@''HAVE_FFSLL''@|$(HAVE_FFSLL)|g' \ -e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \ -e 's|@''HAVE_MEMCHR''@|$(HAVE_MEMCHR)|g' \ @@ -3032,20 +2982,20 @@ string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H -e 's|@''HAVE_DECL_STRERROR_R''@|$(HAVE_DECL_STRERROR_R)|g' \ -e 's|@''HAVE_DECL_STRSIGNAL''@|$(HAVE_DECL_STRSIGNAL)|g' \ -e 's|@''HAVE_STRVERSCMP''@|$(HAVE_STRVERSCMP)|g' \ + -e 's|@''REPLACE_STPNCPY''@|$(REPLACE_STPNCPY)|g' \ -e 's|@''REPLACE_MEMCHR''@|$(REPLACE_MEMCHR)|g' \ -e 's|@''REPLACE_MEMMEM''@|$(REPLACE_MEMMEM)|g' \ - -e 's|@''REPLACE_STPNCPY''@|$(REPLACE_STPNCPY)|g' \ + -e 's|@''REPLACE_STRCASESTR''@|$(REPLACE_STRCASESTR)|g' \ -e 's|@''REPLACE_STRCHRNUL''@|$(REPLACE_STRCHRNUL)|g' \ -e 's|@''REPLACE_STRDUP''@|$(REPLACE_STRDUP)|g' \ - -e 's|@''REPLACE_STRNCAT''@|$(REPLACE_STRNCAT)|g' \ - -e 's|@''REPLACE_STRNDUP''@|$(REPLACE_STRNDUP)|g' \ - -e 's|@''REPLACE_STRNLEN''@|$(REPLACE_STRNLEN)|g' \ -e 's|@''REPLACE_STRSTR''@|$(REPLACE_STRSTR)|g' \ - -e 's|@''REPLACE_STRCASESTR''@|$(REPLACE_STRCASESTR)|g' \ - -e 's|@''REPLACE_STRTOK_R''@|$(REPLACE_STRTOK_R)|g' \ -e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \ -e 's|@''REPLACE_STRERROR_R''@|$(REPLACE_STRERROR_R)|g' \ + -e 's|@''REPLACE_STRNCAT''@|$(REPLACE_STRNCAT)|g' \ + -e 's|@''REPLACE_STRNDUP''@|$(REPLACE_STRNDUP)|g' \ + -e 's|@''REPLACE_STRNLEN''@|$(REPLACE_STRNLEN)|g' \ -e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \ + -e 's|@''REPLACE_STRTOK_R''@|$(REPLACE_STRTOK_R)|g' \ -e 's|@''UNDEFINE_STRTOK_R''@|$(UNDEFINE_STRTOK_R)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ @@ -3066,7 +3016,6 @@ sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNU -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_SYS_STAT_H''@|$(NEXT_SYS_STAT_H)|g' \ -e 's|@''WINDOWS_64_BIT_ST_SIZE''@|$(WINDOWS_64_BIT_ST_SIZE)|g' \ - -e 's|@''WINDOWS_STAT_TIMESPEC''@|$(WINDOWS_STAT_TIMESPEC)|g' \ -e 's/@''GNULIB_FCHMODAT''@/$(GNULIB_FCHMODAT)/g' \ -e 's/@''GNULIB_FSTAT''@/$(GNULIB_FSTAT)/g' \ -e 's/@''GNULIB_FSTATAT''@/$(GNULIB_FSTATAT)/g' \ @@ -3080,7 +3029,6 @@ sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNU -e 's/@''GNULIB_MKNODAT''@/$(GNULIB_MKNODAT)/g' \ -e 's/@''GNULIB_STAT''@/$(GNULIB_STAT)/g' \ -e 's/@''GNULIB_UTIMENSAT''@/$(GNULIB_UTIMENSAT)/g' \ - -e 's/@''GNULIB_OVERRIDES_STRUCT_STAT''@/$(GNULIB_OVERRIDES_STRUCT_STAT)/g' \ -e 's|@''HAVE_FCHMODAT''@|$(HAVE_FCHMODAT)|g' \ -e 's|@''HAVE_FSTATAT''@|$(HAVE_FSTATAT)|g' \ -e 's|@''HAVE_FUTIMENS''@|$(HAVE_FUTIMENS)|g' \ @@ -3145,7 +3093,6 @@ sys/types.h: sys_types.in.h $(top_builddir)/config.status -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_SYS_TYPES_H''@|$(NEXT_SYS_TYPES_H)|g' \ -e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \ - -e 's|@''WINDOWS_STAT_INODES''@|$(WINDOWS_STAT_INODES)|g' \ < $(srcdir)/sys_types.in.h; \ } > $@-t && \ mv $@-t $@ @@ -3160,31 +3107,24 @@ 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_CTIME''@/$(GNULIB_CTIME)/g' \ - -e 's/@''GNULIB_LOCALTIME''@/$(GNULIB_LOCALTIME)/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_STRFTIME''@/$(GNULIB_STRFTIME)/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/@''GNULIB_TZSET''@/$(GNULIB_TZSET)/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|@''HAVE_TZSET''@|$(HAVE_TZSET)|g' \ - -e 's|@''REPLACE_CTIME''@|$(REPLACE_CTIME)|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' \ - -e 's|@''REPLACE_STRFTIME''@|$(REPLACE_STRFTIME)|g' \ -e 's|@''REPLACE_TIMEGM''@|$(REPLACE_TIMEGM)|g' \ - -e 's|@''REPLACE_TZSET''@|$(REPLACE_TZSET)|g' \ -e 's|@''PTHREAD_H_DEFINES_STRUCT_TIMESPEC''@|$(PTHREAD_H_DEFINES_STRUCT_TIMESPEC)|g' \ -e 's|@''SYS_TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(SYS_TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \ -e 's|@''TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \ @@ -3230,7 +3170,6 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H -e 's/@''GNULIB_GETLOGIN''@/$(GNULIB_GETLOGIN)/g' \ -e 's/@''GNULIB_GETLOGIN_R''@/$(GNULIB_GETLOGIN_R)/g' \ -e 's/@''GNULIB_GETPAGESIZE''@/$(GNULIB_GETPAGESIZE)/g' \ - -e 's/@''GNULIB_GETPASS''@/$(GNULIB_GETPASS)/g' \ -e 's/@''GNULIB_GETUSERSHELL''@/$(GNULIB_GETUSERSHELL)/g' \ -e 's/@''GNULIB_GROUP_MEMBER''@/$(GNULIB_GROUP_MEMBER)/g' \ -e 's/@''GNULIB_ISATTY''@/$(GNULIB_ISATTY)/g' \ @@ -3250,7 +3189,6 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H -e 's/@''GNULIB_SLEEP''@/$(GNULIB_SLEEP)/g' \ -e 's/@''GNULIB_SYMLINK''@/$(GNULIB_SYMLINK)/g' \ -e 's/@''GNULIB_SYMLINKAT''@/$(GNULIB_SYMLINKAT)/g' \ - -e 's/@''GNULIB_TRUNCATE''@/$(GNULIB_TRUNCATE)/g' \ -e 's/@''GNULIB_TTYNAME_R''@/$(GNULIB_TTYNAME_R)/g' \ -e 's/@''GNULIB_UNISTD_H_GETOPT''@/0$(GNULIB_GL_UNISTD_H_GETOPT)/g' \ -e 's/@''GNULIB_UNISTD_H_NONBLOCKING''@/$(GNULIB_UNISTD_H_NONBLOCKING)/g' \ @@ -3273,8 +3211,8 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H -e 's|@''HAVE_GETDTABLESIZE''@|$(HAVE_GETDTABLESIZE)|g' \ -e 's|@''HAVE_GETGROUPS''@|$(HAVE_GETGROUPS)|g' \ -e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \ + -e 's|@''HAVE_GETLOGIN''@|$(HAVE_GETLOGIN)|g' \ -e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \ - -e 's|@''HAVE_GETPASS''@|$(HAVE_GETPASS)|g' \ -e 's|@''HAVE_GROUP_MEMBER''@|$(HAVE_GROUP_MEMBER)|g' \ -e 's|@''HAVE_LCHOWN''@|$(HAVE_LCHOWN)|g' \ -e 's|@''HAVE_LINK''@|$(HAVE_LINK)|g' \ @@ -3295,12 +3233,10 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H -e 's|@''HAVE_DECL_FCHDIR''@|$(HAVE_DECL_FCHDIR)|g' \ -e 's|@''HAVE_DECL_FDATASYNC''@|$(HAVE_DECL_FDATASYNC)|g' \ -e 's|@''HAVE_DECL_GETDOMAINNAME''@|$(HAVE_DECL_GETDOMAINNAME)|g' \ - -e 's|@''HAVE_DECL_GETLOGIN''@|$(HAVE_DECL_GETLOGIN)|g' \ -e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \ -e 's|@''HAVE_DECL_GETPAGESIZE''@|$(HAVE_DECL_GETPAGESIZE)|g' \ -e 's|@''HAVE_DECL_GETUSERSHELL''@|$(HAVE_DECL_GETUSERSHELL)|g' \ -e 's|@''HAVE_DECL_SETHOSTNAME''@|$(HAVE_DECL_SETHOSTNAME)|g' \ - -e 's|@''HAVE_DECL_TRUNCATE''@|$(HAVE_DECL_TRUNCATE)|g' \ -e 's|@''HAVE_DECL_TTYNAME_R''@|$(HAVE_DECL_TTYNAME_R)|g' \ -e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \ -e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \ @@ -3309,7 +3245,6 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H -e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \ -e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \ -e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \ - -e 's|@''REPLACE_FACCESSAT''@|$(REPLACE_FACCESSAT)|g' \ -e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \ -e 's|@''REPLACE_FTRUNCATE''@|$(REPLACE_FTRUNCATE)|g' \ -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \ @@ -3318,7 +3253,6 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H -e 's|@''REPLACE_GETLOGIN_R''@|$(REPLACE_GETLOGIN_R)|g' \ -e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \ -e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \ - -e 's|@''REPLACE_GETPASS''@|$(REPLACE_GETPASS)|g' \ -e 's|@''REPLACE_ISATTY''@|$(REPLACE_ISATTY)|g' \ -e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \ -e 's|@''REPLACE_LINK''@|$(REPLACE_LINK)|g' \ @@ -3333,7 +3267,6 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H -e 's|@''REPLACE_SLEEP''@|$(REPLACE_SLEEP)|g' \ -e 's|@''REPLACE_SYMLINK''@|$(REPLACE_SYMLINK)|g' \ -e 's|@''REPLACE_SYMLINKAT''@|$(REPLACE_SYMLINKAT)|g' \ - -e 's|@''REPLACE_TRUNCATE''@|$(REPLACE_TRUNCATE)|g' \ -e 's|@''REPLACE_TTYNAME_R''@|$(REPLACE_TTYNAME_R)|g' \ -e 's|@''REPLACE_UNLINK''@|$(REPLACE_UNLINK)|g' \ -e 's|@''REPLACE_UNLINKAT''@|$(REPLACE_UNLINKAT)|g' \ @@ -3359,8 +3292,6 @@ wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) -e 's|@''HAVE_FEATURES_H''@|$(HAVE_FEATURES_H)|g' \ -e 's|@''NEXT_WCHAR_H''@|$(NEXT_WCHAR_H)|g' \ -e 's|@''HAVE_WCHAR_H''@|$(HAVE_WCHAR_H)|g' \ - -e 's/@''HAVE_CRTDEFS_H''@/$(HAVE_CRTDEFS_H)/g' \ - -e 's/@''GNULIB_OVERRIDES_WINT_T''@/$(GNULIB_OVERRIDES_WINT_T)/g' \ -e 's/@''GNULIB_BTOWC''@/$(GNULIB_BTOWC)/g' \ -e 's/@''GNULIB_WCTOB''@/$(GNULIB_WCTOB)/g' \ -e 's/@''GNULIB_MBSINIT''@/$(GNULIB_MBSINIT)/g' \ @@ -3400,7 +3331,6 @@ wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) -e 's/@''GNULIB_WCSSTR''@/$(GNULIB_WCSSTR)/g' \ -e 's/@''GNULIB_WCSTOK''@/$(GNULIB_WCSTOK)/g' \ -e 's/@''GNULIB_WCSWIDTH''@/$(GNULIB_WCSWIDTH)/g' \ - -e 's/@''GNULIB_WCSFTIME''@/$(GNULIB_WCSFTIME)/g' \ < $(srcdir)/wchar.in.h | \ sed -e 's|@''HAVE_WINT_T''@|$(HAVE_WINT_T)|g' \ -e 's|@''HAVE_BTOWC''@|$(HAVE_BTOWC)|g' \ @@ -3440,7 +3370,6 @@ wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) -e 's|@''HAVE_WCSSTR''@|$(HAVE_WCSSTR)|g' \ -e 's|@''HAVE_WCSTOK''@|$(HAVE_WCSTOK)|g' \ -e 's|@''HAVE_WCSWIDTH''@|$(HAVE_WCSWIDTH)|g' \ - -e 's|@''HAVE_WCSFTIME''@|$(HAVE_WCSFTIME)|g' \ -e 's|@''HAVE_DECL_WCTOB''@|$(HAVE_DECL_WCTOB)|g' \ -e 's|@''HAVE_DECL_WCWIDTH''@|$(HAVE_DECL_WCWIDTH)|g' \ | \ @@ -3457,7 +3386,6 @@ wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) -e 's|@''REPLACE_WCSNRTOMBS''@|$(REPLACE_WCSNRTOMBS)|g' \ -e 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \ -e 's|@''REPLACE_WCSWIDTH''@|$(REPLACE_WCSWIDTH)|g' \ - -e 's|@''REPLACE_WCSFTIME''@|$(REPLACE_WCSFTIME)|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)'; \ @@ -3475,8 +3403,6 @@ wctype.h: wctype.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_WCTYPE_H''@|$(NEXT_WCTYPE_H)|g' \ - -e 's/@''HAVE_CRTDEFS_H''@/$(HAVE_CRTDEFS_H)/g' \ - -e 's/@''GNULIB_OVERRIDES_WINT_T''@/$(GNULIB_OVERRIDES_WINT_T)/g' \ -e 's/@''GNULIB_ISWBLANK''@/$(GNULIB_ISWBLANK)/g' \ -e 's/@''GNULIB_WCTYPE''@/$(GNULIB_WCTYPE)/g' \ -e 's/@''GNULIB_ISWCTYPE''@/$(GNULIB_ISWCTYPE)/g' \ diff --git a/gdb/gnulib/import/alloca.in.h b/gdb/gnulib/import/alloca.in.h index 5ad8af8b411..6a25ecdb7b7 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-2018 Free Software Foundation, + Copyright (C) 1995, 1999, 2001-2004, 2006-2016 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it @@ -15,7 +15,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, see - . + . */ /* Avoid using the symbol _ALLOCA_H here, as Bison assumes _ALLOCA_H diff --git a/gdb/gnulib/import/assure.h b/gdb/gnulib/import/assure.h index de6c38db6af..de1f6656886 100644 --- a/gdb/gnulib/import/assure.h +++ b/gdb/gnulib/import/assure.h @@ -1,6 +1,6 @@ /* Run-time assert-like macros. - Copyright (C) 2014-2018 Free Software Foundation, Inc. + Copyright (C) 2014-2016 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Paul Eggert. */ diff --git a/gdb/gnulib/import/at-func.c b/gdb/gnulib/import/at-func.c index 55e4b8c0eb0..5a8894a4ab5 100644 --- a/gdb/gnulib/import/at-func.c +++ b/gdb/gnulib/import/at-func.c @@ -1,5 +1,5 @@ /* Define at-style functions like fstatat, unlinkat, fchownat, etc. - Copyright (C) 2006, 2009-2018 Free Software Foundation, Inc. + Copyright (C) 2006, 2009-2016 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* written by Jim Meyering */ diff --git a/gdb/gnulib/import/basename-lgpl.c b/gdb/gnulib/import/basename-lgpl.c index 33f9994f22e..11821096ae9 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-2018 Free Software + Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -14,7 +14,7 @@ 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 . */ + along with this program. If not, see . */ #include diff --git a/gdb/gnulib/import/canonicalize-lgpl.c b/gdb/gnulib/import/canonicalize-lgpl.c index 7831b3f19c3..4b1f6cb40ff 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-2018 Free Software Foundation, Inc. + Copyright (C) 1996-2016 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ #ifndef _LIBC /* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc @@ -59,10 +59,8 @@ */ # undef getcwd # endif -# if defined VMS && !defined getcwd - /* We want the directory in Unix syntax, not in VMS syntax. - The gnulib override of 'getcwd' takes 2 arguments; the original VMS - 'getcwd' takes 3 arguments. */ +# ifdef VMS + /* We want the directory in Unix syntax, not in VMS syntax. */ # define __getcwd(buf, max) getcwd (buf, max, 0) # else # define __getcwd getcwd @@ -95,9 +93,9 @@ static void alloc_failed (void) { -#if defined _WIN32 && ! defined __CYGWIN__ +#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* Avoid errno problem without using the malloc or realloc modules; see: - https://lists.gnu.org/r/bug-gnulib/2016-08/msg00025.html */ + http://lists.gnu.org/archive/html/bug-gnulib/2016-08/msg00025.html */ errno = ENOMEM; #endif } @@ -270,8 +268,6 @@ __realpath (const char *name, char *resolved) #endif *dest = '\0'; - /* FIXME: if lstat fails with errno == EOVERFLOW, - the entry exists. */ #ifdef _LIBC if (__lxstat64 (_STAT_VER, rpath, &st) < 0) #else diff --git a/gdb/gnulib/import/cdefs.h b/gdb/gnulib/import/cdefs.h deleted file mode 100644 index 235ca62c5b8..00000000000 --- a/gdb/gnulib/import/cdefs.h +++ /dev/null @@ -1,508 +0,0 @@ -/* Copyright (C) 1992-2018 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public - License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. - - The GNU C Library 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 the GNU C Library; if not, see - . */ - -#ifndef _SYS_CDEFS_H -#define _SYS_CDEFS_H 1 - -/* We are almost always included from features.h. */ -#ifndef _FEATURES_H -# include -#endif - -/* The GNU libc does not support any K&R compilers or the traditional mode - of ISO C compilers anymore. Check for some of the combinations not - anymore supported. */ -#if defined __GNUC__ && !defined __STDC__ -# error "You need a ISO C conforming compiler to use the glibc headers" -#endif - -/* Some user header file might have defined this before. */ -#undef __P -#undef __PMT - -#ifdef __GNUC__ - -/* All functions, except those with callbacks or those that - synchronize memory, are leaf functions. */ -# if __GNUC_PREREQ (4, 6) && !defined _LIBC -# define __LEAF , __leaf__ -# define __LEAF_ATTR __attribute__ ((__leaf__)) -# else -# define __LEAF -# define __LEAF_ATTR -# endif - -/* GCC can always grok prototypes. For C++ programs we add throw() - to help it optimize the function calls. But this works only with - gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions - as non-throwing using a function attribute since programs can use - the -fexceptions options for C code as well. */ -# if !defined __cplusplus && __GNUC_PREREQ (3, 3) -# define __THROW __attribute__ ((__nothrow__ __LEAF)) -# define __THROWNL __attribute__ ((__nothrow__)) -# define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct -# define __NTHNL(fct) __attribute__ ((__nothrow__)) fct -# else -# if defined __cplusplus && __GNUC_PREREQ (2,8) -# define __THROW throw () -# define __THROWNL throw () -# define __NTH(fct) __LEAF_ATTR fct throw () -# define __NTHNL(fct) fct throw () -# else -# define __THROW -# define __THROWNL -# define __NTH(fct) fct -# define __NTHNL(fct) fct -# endif -# endif - -#else /* Not GCC. */ - -# if (defined __cplusplus \ - || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)) -# define __inline inline -# else -# define __inline /* No inline functions. */ -# endif - -# define __THROW -# define __THROWNL -# define __NTH(fct) fct - -#endif /* GCC. */ - -/* Compilers that are not clang may object to - #if defined __clang__ && __has_extension(...) - even though they do not need to evaluate the right-hand side of the &&. */ -#if defined __clang__ && defined __has_extension -# define __glibc_clang_has_extension(ext) __has_extension (ext) -#else -# define __glibc_clang_has_extension(ext) 0 -#endif - -/* These two macros are not used in glibc anymore. They are kept here - only because some other projects expect the macros to be defined. */ -#define __P(args) args -#define __PMT(args) args - -/* For these things, GCC behaves the ANSI way normally, - and the non-ANSI way under -traditional. */ - -#define __CONCAT(x,y) x ## y -#define __STRING(x) #x - -/* This is not a typedef so `const __ptr_t' does the right thing. */ -#define __ptr_t void * - - -/* C++ needs to know that types and declarations are C, not C++. */ -#ifdef __cplusplus -# define __BEGIN_DECLS extern "C" { -# define __END_DECLS } -#else -# define __BEGIN_DECLS -# define __END_DECLS -#endif - - -/* Fortify support. */ -#define __bos(ptr) __builtin_object_size (ptr, __USE_FORTIFY_LEVEL > 1) -#define __bos0(ptr) __builtin_object_size (ptr, 0) - -#if __GNUC_PREREQ (4,3) -# define __warndecl(name, msg) \ - extern void name (void) __attribute__((__warning__ (msg))) -# define __warnattr(msg) __attribute__((__warning__ (msg))) -# define __errordecl(name, msg) \ - extern void name (void) __attribute__((__error__ (msg))) -#else -# define __warndecl(name, msg) extern void name (void) -# define __warnattr(msg) -# define __errordecl(name, msg) extern void name (void) -#endif - -/* Support for flexible arrays. - Headers that should use flexible arrays only if they're "real" - (e.g. only if they won't affect sizeof()) should test - #if __glibc_c99_flexarr_available. */ -#if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L -# define __flexarr [] -# define __glibc_c99_flexarr_available 1 -#elif __GNUC_PREREQ (2,97) -/* GCC 2.97 supports C99 flexible array members as an extension, - even when in C89 mode or compiling C++ (any version). */ -# define __flexarr [] -# define __glibc_c99_flexarr_available 1 -#elif defined __GNUC__ -/* Pre-2.97 GCC did not support C99 flexible arrays but did have - an equivalent extension with slightly different notation. */ -# define __flexarr [0] -# define __glibc_c99_flexarr_available 1 -#else -/* Some other non-C99 compiler. Approximate with [1]. */ -# define __flexarr [1] -# define __glibc_c99_flexarr_available 0 -#endif - - -/* __asm__ ("xyz") is used throughout the headers to rename functions - at the assembly language level. This is wrapped by the __REDIRECT - macro, in order to support compilers that can do this some other - way. When compilers don't support asm-names at all, we have to do - preprocessor tricks instead (which don't have exactly the right - semantics, but it's the best we can do). - - Example: - int __REDIRECT(setpgrp, (__pid_t pid, __pid_t pgrp), setpgid); */ - -#if defined __GNUC__ && __GNUC__ >= 2 - -# define __REDIRECT(name, proto, alias) name proto __asm__ (__ASMNAME (#alias)) -# ifdef __cplusplus -# define __REDIRECT_NTH(name, proto, alias) \ - name proto __THROW __asm__ (__ASMNAME (#alias)) -# define __REDIRECT_NTHNL(name, proto, alias) \ - name proto __THROWNL __asm__ (__ASMNAME (#alias)) -# else -# define __REDIRECT_NTH(name, proto, alias) \ - name proto __asm__ (__ASMNAME (#alias)) __THROW -# define __REDIRECT_NTHNL(name, proto, alias) \ - name proto __asm__ (__ASMNAME (#alias)) __THROWNL -# endif -# define __ASMNAME(cname) __ASMNAME2 (__USER_LABEL_PREFIX__, cname) -# define __ASMNAME2(prefix, cname) __STRING (prefix) cname - -/* -#elif __SOME_OTHER_COMPILER__ - -# define __REDIRECT(name, proto, alias) name proto; \ - _Pragma("let " #name " = " #alias) -*/ -#endif - -/* GCC has various useful declarations that can be made with the - `__attribute__' syntax. All of the ways we use this do fine if - they are omitted for compilers that don't understand it. */ -#if !defined __GNUC__ || __GNUC__ < 2 -# define __attribute__(xyz) /* Ignore */ -#endif - -/* At some point during the gcc 2.96 development the `malloc' attribute - for functions was introduced. We don't want to use it unconditionally - (although this would be possible) since it generates warnings. */ -#if __GNUC_PREREQ (2,96) -# define __attribute_malloc__ __attribute__ ((__malloc__)) -#else -# define __attribute_malloc__ /* Ignore */ -#endif - -/* Tell the compiler which arguments to an allocation function - indicate the size of the allocation. */ -#if __GNUC_PREREQ (4, 3) -# define __attribute_alloc_size__(params) \ - __attribute__ ((__alloc_size__ params)) -#else -# define __attribute_alloc_size__(params) /* Ignore. */ -#endif - -/* At some point during the gcc 2.96 development the `pure' attribute - for functions was introduced. We don't want to use it unconditionally - (although this would be possible) since it generates warnings. */ -#if __GNUC_PREREQ (2,96) -# define __attribute_pure__ __attribute__ ((__pure__)) -#else -# define __attribute_pure__ /* Ignore */ -#endif - -/* This declaration tells the compiler that the value is constant. */ -#if __GNUC_PREREQ (2,5) -# define __attribute_const__ __attribute__ ((__const__)) -#else -# define __attribute_const__ /* Ignore */ -#endif - -/* At some point during the gcc 3.1 development the `used' attribute - for functions was introduced. We don't want to use it unconditionally - (although this would be possible) since it generates warnings. */ -#if __GNUC_PREREQ (3,1) -# define __attribute_used__ __attribute__ ((__used__)) -# define __attribute_noinline__ __attribute__ ((__noinline__)) -#else -# define __attribute_used__ __attribute__ ((__unused__)) -# define __attribute_noinline__ /* Ignore */ -#endif - -/* Since version 3.2, gcc allows marking deprecated functions. */ -#if __GNUC_PREREQ (3,2) -# define __attribute_deprecated__ __attribute__ ((__deprecated__)) -#else -# define __attribute_deprecated__ /* Ignore */ -#endif - -/* Since version 4.5, gcc also allows one to specify the message printed - when a deprecated function is used. clang claims to be gcc 4.2, but - may also support this feature. */ -#if __GNUC_PREREQ (4,5) || \ - __glibc_clang_has_extension (__attribute_deprecated_with_message__) -# define __attribute_deprecated_msg__(msg) \ - __attribute__ ((__deprecated__ (msg))) -#else -# define __attribute_deprecated_msg__(msg) __attribute_deprecated__ -#endif - -/* At some point during the gcc 2.8 development the `format_arg' attribute - for functions was introduced. We don't want to use it unconditionally - (although this would be possible) since it generates warnings. - If several `format_arg' attributes are given for the same function, in - gcc-3.0 and older, all but the last one are ignored. In newer gccs, - all designated arguments are considered. */ -#if __GNUC_PREREQ (2,8) -# define __attribute_format_arg__(x) __attribute__ ((__format_arg__ (x))) -#else -# define __attribute_format_arg__(x) /* Ignore */ -#endif - -/* At some point during the gcc 2.97 development the `strfmon' format - attribute for functions was introduced. We don't want to use it - unconditionally (although this would be possible) since it - generates warnings. */ -#if __GNUC_PREREQ (2,97) -# define __attribute_format_strfmon__(a,b) \ - __attribute__ ((__format__ (__strfmon__, a, b))) -#else -# define __attribute_format_strfmon__(a,b) /* Ignore */ -#endif - -/* The nonnull function attribute marks pointer parameters that - must not be NULL. Do not define __nonnull if it is already defined, - for portability when this file is used in Gnulib. */ -#ifndef __nonnull -# if __GNUC_PREREQ (3,3) -# define __nonnull(params) __attribute__ ((__nonnull__ params)) -# else -# define __nonnull(params) -# endif -#endif - -/* If fortification mode, we warn about unused results of certain - function calls which can lead to problems. */ -#if __GNUC_PREREQ (3,4) -# define __attribute_warn_unused_result__ \ - __attribute__ ((__warn_unused_result__)) -# if defined __USE_FORTIFY_LEVEL && __USE_FORTIFY_LEVEL > 0 -# define __wur __attribute_warn_unused_result__ -# endif -#else -# define __attribute_warn_unused_result__ /* empty */ -#endif -#ifndef __wur -# define __wur /* Ignore */ -#endif - -/* Forces a function to be always inlined. */ -#if __GNUC_PREREQ (3,2) -/* The Linux kernel defines __always_inline in stddef.h (283d7573), and - it conflicts with this definition. Therefore undefine it first to - allow either header to be included first. */ -# undef __always_inline -# define __always_inline __inline __attribute__ ((__always_inline__)) -#else -# undef __always_inline -# define __always_inline __inline -#endif - -/* Associate error messages with the source location of the call site rather - than with the source location inside the function. */ -#if __GNUC_PREREQ (4,3) -# define __attribute_artificial__ __attribute__ ((__artificial__)) -#else -# define __attribute_artificial__ /* Ignore */ -#endif - -/* GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 - inline semantics, unless -fgnu89-inline is used. Using __GNUC_STDC_INLINE__ - or __GNUC_GNU_INLINE is not a good enough check for gcc because gcc versions - older than 4.3 may define these macros and still not guarantee GNU inlining - semantics. - - clang++ identifies itself as gcc-4.2, but has support for GNU inlining - semantics, that can be checked fot by using the __GNUC_STDC_INLINE_ and - __GNUC_GNU_INLINE__ macro definitions. */ -#if (!defined __cplusplus || __GNUC_PREREQ (4,3) \ - || (defined __clang__ && (defined __GNUC_STDC_INLINE__ \ - || defined __GNUC_GNU_INLINE__))) -# if defined __GNUC_STDC_INLINE__ || defined __cplusplus -# define __extern_inline extern __inline __attribute__ ((__gnu_inline__)) -# define __extern_always_inline \ - extern __always_inline __attribute__ ((__gnu_inline__)) -# else -# define __extern_inline extern __inline -# define __extern_always_inline extern __always_inline -# endif -#endif - -#ifdef __extern_always_inline -# define __fortify_function __extern_always_inline __attribute_artificial__ -#endif - -/* GCC 4.3 and above allow passing all anonymous arguments of an - __extern_always_inline function to some other vararg function. */ -#if __GNUC_PREREQ (4,3) -# define __va_arg_pack() __builtin_va_arg_pack () -# define __va_arg_pack_len() __builtin_va_arg_pack_len () -#endif - -/* It is possible to compile containing GCC extensions even if GCC is - run in pedantic mode if the uses are carefully marked using the - `__extension__' keyword. But this is not generally available before - version 2.8. */ -#if !__GNUC_PREREQ (2,8) -# define __extension__ /* Ignore */ -#endif - -/* __restrict is known in EGCS 1.2 and above. */ -#if !__GNUC_PREREQ (2,92) -# if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L -# define __restrict restrict -# else -# define __restrict /* Ignore */ -# endif -#endif - -/* ISO C99 also allows to declare arrays as non-overlapping. The syntax is - array_name[restrict] - GCC 3.1 supports this. */ -#if __GNUC_PREREQ (3,1) && !defined __GNUG__ -# define __restrict_arr __restrict -#else -# ifdef __GNUC__ -# define __restrict_arr /* Not supported in old GCC. */ -# else -# if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L -# define __restrict_arr restrict -# else -/* Some other non-C99 compiler. */ -# define __restrict_arr /* Not supported. */ -# endif -# endif -#endif - -#if __GNUC__ >= 3 -# define __glibc_unlikely(cond) __builtin_expect ((cond), 0) -# define __glibc_likely(cond) __builtin_expect ((cond), 1) -#else -# define __glibc_unlikely(cond) (cond) -# define __glibc_likely(cond) (cond) -#endif - -#if (!defined _Noreturn \ - && (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 201112 \ - && !__GNUC_PREREQ (4,7)) -# if __GNUC_PREREQ (2,8) -# define _Noreturn __attribute__ ((__noreturn__)) -# else -# define _Noreturn -# endif -#endif - -#if __GNUC_PREREQ (8, 0) -/* Describes a char array whose address can safely be passed as the first - argument to strncpy and strncat, as the char array is not necessarily - a NUL-terminated string. */ -# define __attribute_nonstring__ __attribute__ ((__nonstring__)) -#else -# define __attribute_nonstring__ -#endif - -#if (!defined _Static_assert && !defined __cplusplus \ - && (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 201112 \ - && (!__GNUC_PREREQ (4, 6) || defined __STRICT_ANSI__)) -# define _Static_assert(expr, diagnostic) \ - extern int (*__Static_assert_function (void)) \ - [!!sizeof (struct { int __error_if_negative: (expr) ? 2 : -1; })] -#endif - -/* The #ifndef lets Gnulib avoid including these on non-glibc - platforms, where the includes typically do not exist. */ -#ifndef __WORDSIZE -# include -# include -#endif - -#if defined __LONG_DOUBLE_MATH_OPTIONAL && defined __NO_LONG_DOUBLE_MATH -# define __LDBL_COMPAT 1 -# ifdef __REDIRECT -# define __LDBL_REDIR1(name, proto, alias) __REDIRECT (name, proto, alias) -# define __LDBL_REDIR(name, proto) \ - __LDBL_REDIR1 (name, proto, __nldbl_##name) -# define __LDBL_REDIR1_NTH(name, proto, alias) __REDIRECT_NTH (name, proto, alias) -# define __LDBL_REDIR_NTH(name, proto) \ - __LDBL_REDIR1_NTH (name, proto, __nldbl_##name) -# define __LDBL_REDIR1_DECL(name, alias) \ - extern __typeof (name) name __asm (__ASMNAME (#alias)); -# define __LDBL_REDIR_DECL(name) \ - extern __typeof (name) name __asm (__ASMNAME ("__nldbl_" #name)); -# define __REDIRECT_LDBL(name, proto, alias) \ - __LDBL_REDIR1 (name, proto, __nldbl_##alias) -# define __REDIRECT_NTH_LDBL(name, proto, alias) \ - __LDBL_REDIR1_NTH (name, proto, __nldbl_##alias) -# endif -#endif -#if !defined __LDBL_COMPAT || !defined __REDIRECT -# define __LDBL_REDIR1(name, proto, alias) name proto -# define __LDBL_REDIR(name, proto) name proto -# define __LDBL_REDIR1_NTH(name, proto, alias) name proto __THROW -# define __LDBL_REDIR_NTH(name, proto) name proto __THROW -# define __LDBL_REDIR_DECL(name) -# ifdef __REDIRECT -# define __REDIRECT_LDBL(name, proto, alias) __REDIRECT (name, proto, alias) -# define __REDIRECT_NTH_LDBL(name, proto, alias) \ - __REDIRECT_NTH (name, proto, alias) -# endif -#endif - -/* __glibc_macro_warning (MESSAGE) issues warning MESSAGE. This is - intended for use in preprocessor macros. - - Note: MESSAGE must be a _single_ string; concatenation of string - literals is not supported. */ -#if __GNUC_PREREQ (4,8) || __glibc_clang_prereq (3,5) -# define __glibc_macro_warning1(message) _Pragma (#message) -# define __glibc_macro_warning(message) \ - __glibc_macro_warning1 (GCC warning message) -#else -# define __glibc_macro_warning(msg) -#endif - -/* Generic selection (ISO C11) is a C-only feature, available in GCC - since version 4.9. Previous versions do not provide generic - selection, even though they might set __STDC_VERSION__ to 201112L, - when in -std=c11 mode. Thus, we must check for !defined __GNUC__ - when testing __STDC_VERSION__ for generic selection support. - On the other hand, Clang also defines __GNUC__, so a clang-specific - check is required to enable the use of generic selection. */ -#if !defined __cplusplus \ - && (__GNUC_PREREQ (4, 9) \ - || __glibc_clang_has_extension (c_generic_selections) \ - || (!defined __GNUC__ && defined __STDC_VERSION__ \ - && __STDC_VERSION__ >= 201112L)) -# define __HAVE_GENERIC_SELECTION 1 -#else -# define __HAVE_GENERIC_SELECTION 0 -#endif - -#endif /* sys/cdefs.h */ diff --git a/gdb/gnulib/import/chdir-long.c b/gdb/gnulib/import/chdir-long.c index d70f0b20f30..5a039ced881 100644 --- a/gdb/gnulib/import/chdir-long.c +++ b/gdb/gnulib/import/chdir-long.c @@ -1,5 +1,5 @@ /* provide a chdir function that tries not to fail due to ENAMETOOLONG - Copyright (C) 2004-2018 Free Software Foundation, Inc. + Copyright (C) 2004-2016 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* written by Jim Meyering */ diff --git a/gdb/gnulib/import/chdir-long.h b/gdb/gnulib/import/chdir-long.h index 34d24bce526..614b6cfc985 100644 --- a/gdb/gnulib/import/chdir-long.h +++ b/gdb/gnulib/import/chdir-long.h @@ -1,5 +1,5 @@ /* provide a chdir function that tries not to fail due to ENAMETOOLONG - Copyright (C) 2004-2005, 2009-2018 Free Software Foundation, Inc. + Copyright (C) 2004-2005, 2009-2016 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Jim Meyering. */ diff --git a/gdb/gnulib/import/cloexec.c b/gdb/gnulib/import/cloexec.c index 238ab188866..1202836f7c2 100644 --- a/gdb/gnulib/import/cloexec.c +++ b/gdb/gnulib/import/cloexec.c @@ -1,6 +1,6 @@ -/* cloexec.c - set or clear the close-on-exec descriptor flag +/* closexec.c - set or clear the close-on-exec descriptor flag - Copyright (C) 1991, 2004-2006, 2009-2018 Free Software Foundation, Inc. + Copyright (C) 1991, 2004-2006, 2009-2016 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 @@ -13,7 +13,7 @@ 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 . + along with this program. If not, see . The code is taken from glibc/manual/llio.texi */ diff --git a/gdb/gnulib/import/cloexec.h b/gdb/gnulib/import/cloexec.h index 59028058e6d..0e5843736cd 100644 --- a/gdb/gnulib/import/cloexec.h +++ b/gdb/gnulib/import/cloexec.h @@ -1,6 +1,6 @@ -/* cloexec.c - set or clear the close-on-exec descriptor flag +/* closexec.c - set or clear the close-on-exec descriptor flag - Copyright (C) 2004, 2009-2018 Free Software Foundation, Inc. + Copyright (C) 2004, 2009-2016 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 @@ -13,7 +13,7 @@ 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 . + along with this program. If not, see . */ diff --git a/gdb/gnulib/import/close.c b/gdb/gnulib/import/close.c index 01c326a28c7..46a7aa5176d 100644 --- a/gdb/gnulib/import/close.c +++ b/gdb/gnulib/import/close.c @@ -1,5 +1,5 @@ /* close replacement. - Copyright (C) 2008-2018 Free Software Foundation, Inc. + Copyright (C) 2008-2016 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #include @@ -22,9 +22,7 @@ #include #include "fd-hook.h" -#if HAVE_MSVC_INVALID_PARAMETER_HANDLER -# include "msvc-inval.h" -#endif +#include "msvc-inval.h" #undef close diff --git a/gdb/gnulib/import/closedir.c b/gdb/gnulib/import/closedir.c index 562a3ec07be..30d12903517 100644 --- a/gdb/gnulib/import/closedir.c +++ b/gdb/gnulib/import/closedir.c @@ -1,5 +1,5 @@ /* Stop reading the entries of a directory. - Copyright (C) 2006-2018 Free Software Foundation, Inc. + Copyright (C) 2006-2016 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #include diff --git a/gdb/gnulib/import/config.charset b/gdb/gnulib/import/config.charset new file mode 100644 index 00000000000..947d9164ea7 --- /dev/null +++ b/gdb/gnulib/import/config.charset @@ -0,0 +1,682 @@ +#! /bin/sh +# Output a system dependent table of character encoding aliases. +# +# Copyright (C) 2000-2004, 2006-2016 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 . +# +# The table consists of lines of the form +# ALIAS CANONICAL +# +# ALIAS is the (system dependent) result of "nl_langinfo (CODESET)". +# ALIAS is compared in a case sensitive way. +# +# CANONICAL is the GNU canonical name for this character encoding. +# It must be an encoding supported by libiconv. Support by GNU libc is +# also desirable. CANONICAL is case insensitive. Usually an upper case +# MIME charset name is preferred. +# The current list of GNU canonical charset names is as follows. +# +# name MIME? used by which systems +# (darwin = Mac OS X, woe32 = native Windows) +# +# ASCII, ANSI_X3.4-1968 glibc solaris freebsd netbsd darwin cygwin +# ISO-8859-1 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin +# ISO-8859-2 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin +# ISO-8859-3 Y glibc solaris cygwin +# ISO-8859-4 Y osf solaris freebsd netbsd openbsd darwin +# ISO-8859-5 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin +# ISO-8859-6 Y glibc aix hpux solaris cygwin +# ISO-8859-7 Y glibc aix hpux irix osf solaris netbsd openbsd darwin cygwin +# ISO-8859-8 Y glibc aix hpux osf solaris cygwin +# ISO-8859-9 Y glibc aix hpux irix osf solaris darwin cygwin +# ISO-8859-13 glibc netbsd openbsd darwin cygwin +# ISO-8859-14 glibc cygwin +# ISO-8859-15 glibc aix osf solaris freebsd netbsd openbsd darwin cygwin +# KOI8-R Y glibc solaris freebsd netbsd openbsd darwin +# KOI8-U Y glibc freebsd netbsd openbsd darwin cygwin +# KOI8-T glibc +# CP437 dos +# CP775 dos +# CP850 aix osf dos +# CP852 dos +# CP855 dos +# CP856 aix +# CP857 dos +# CP861 dos +# CP862 dos +# CP864 dos +# CP865 dos +# CP866 freebsd netbsd openbsd darwin dos +# CP869 dos +# CP874 woe32 dos +# CP922 aix +# CP932 aix cygwin woe32 dos +# CP943 aix +# CP949 osf darwin woe32 dos +# CP950 woe32 dos +# CP1046 aix +# CP1124 aix +# CP1125 dos +# CP1129 aix +# CP1131 darwin +# CP1250 woe32 +# CP1251 glibc solaris netbsd openbsd darwin cygwin woe32 +# CP1252 aix woe32 +# CP1253 woe32 +# CP1254 woe32 +# CP1255 glibc woe32 +# CP1256 woe32 +# CP1257 woe32 +# GB2312 Y glibc aix hpux irix solaris freebsd netbsd darwin +# EUC-JP Y glibc aix hpux irix osf solaris freebsd netbsd darwin +# EUC-KR Y glibc aix hpux irix osf solaris freebsd netbsd darwin cygwin +# EUC-TW glibc aix hpux irix osf solaris netbsd +# BIG5 Y glibc aix hpux osf solaris freebsd netbsd darwin cygwin +# BIG5-HKSCS glibc solaris darwin +# GBK glibc aix osf solaris darwin cygwin woe32 dos +# GB18030 glibc solaris netbsd darwin +# SHIFT_JIS Y hpux osf solaris freebsd netbsd darwin +# JOHAB glibc solaris woe32 +# TIS-620 glibc aix hpux osf solaris cygwin +# VISCII Y glibc +# TCVN5712-1 glibc +# ARMSCII-8 glibc darwin +# GEORGIAN-PS glibc cygwin +# PT154 glibc +# HP-ROMAN8 hpux +# HP-ARABIC8 hpux +# HP-GREEK8 hpux +# HP-HEBREW8 hpux +# HP-TURKISH8 hpux +# HP-KANA8 hpux +# DEC-KANJI osf +# DEC-HANYU osf +# UTF-8 Y glibc aix hpux osf solaris netbsd darwin cygwin +# +# Note: Names which are not marked as being a MIME name should not be used in +# Internet protocols for information interchange (mail, news, etc.). +# +# Note: ASCII and ANSI_X3.4-1968 are synonymous canonical names. Applications +# must understand both names and treat them as equivalent. +# +# The first argument passed to this file is the canonical host specification, +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM + +host="$1" +os=`echo "$host" | sed -e 's/^[^-]*-[^-]*-\(.*\)$/\1/'` +echo "# This file contains a table of character encoding aliases," +echo "# suitable for operating system '${os}'." +echo "# It was automatically generated from config.charset." +# List of references, updated during installation: +echo "# Packages using this file: " +case "$os" in + linux-gnulibc1*) + # Linux libc5 doesn't have nl_langinfo(CODESET); therefore + # localcharset.c falls back to using the full locale name + # from the environment variables. + echo "C ASCII" + echo "POSIX ASCII" + for l in af af_ZA ca ca_ES da da_DK de de_AT de_BE de_CH de_DE de_LU \ + en en_AU en_BW en_CA en_DK en_GB en_IE en_NZ en_US en_ZA \ + en_ZW es es_AR es_BO es_CL es_CO es_DO es_EC es_ES es_GT \ + es_HN es_MX es_PA es_PE es_PY es_SV es_US es_UY es_VE et \ + et_EE eu eu_ES fi fi_FI fo fo_FO fr fr_BE fr_CA fr_CH fr_FR \ + fr_LU ga ga_IE gl gl_ES id id_ID in in_ID is is_IS it it_CH \ + it_IT kl kl_GL nl nl_BE nl_NL no no_NO pt pt_BR pt_PT sv \ + sv_FI sv_SE; do + echo "$l ISO-8859-1" + echo "$l.iso-8859-1 ISO-8859-1" + echo "$l.iso-8859-15 ISO-8859-15" + echo "$l.iso-8859-15@euro ISO-8859-15" + echo "$l@euro ISO-8859-15" + echo "$l.cp-437 CP437" + echo "$l.cp-850 CP850" + echo "$l.cp-1252 CP1252" + echo "$l.cp-1252@euro CP1252" + #echo "$l.atari-st ATARI-ST" # not a commonly used encoding + echo "$l.utf-8 UTF-8" + echo "$l.utf-8@euro UTF-8" + done + for l in cs cs_CZ hr hr_HR hu hu_HU pl pl_PL ro ro_RO sk sk_SK sl \ + sl_SI sr sr_CS sr_YU; do + echo "$l ISO-8859-2" + echo "$l.iso-8859-2 ISO-8859-2" + echo "$l.cp-852 CP852" + echo "$l.cp-1250 CP1250" + echo "$l.utf-8 UTF-8" + done + for l in mk mk_MK ru ru_RU; do + echo "$l ISO-8859-5" + echo "$l.iso-8859-5 ISO-8859-5" + echo "$l.koi8-r KOI8-R" + echo "$l.cp-866 CP866" + echo "$l.cp-1251 CP1251" + echo "$l.utf-8 UTF-8" + done + for l in ar ar_SA; do + echo "$l ISO-8859-6" + echo "$l.iso-8859-6 ISO-8859-6" + echo "$l.cp-864 CP864" + #echo "$l.cp-868 CP868" # not a commonly used encoding + echo "$l.cp-1256 CP1256" + echo "$l.utf-8 UTF-8" + done + for l in el el_GR gr gr_GR; do + echo "$l ISO-8859-7" + echo "$l.iso-8859-7 ISO-8859-7" + echo "$l.cp-869 CP869" + echo "$l.cp-1253 CP1253" + echo "$l.cp-1253@euro CP1253" + echo "$l.utf-8 UTF-8" + echo "$l.utf-8@euro UTF-8" + done + for l in he he_IL iw iw_IL; do + echo "$l ISO-8859-8" + echo "$l.iso-8859-8 ISO-8859-8" + echo "$l.cp-862 CP862" + echo "$l.cp-1255 CP1255" + echo "$l.utf-8 UTF-8" + done + for l in tr tr_TR; do + echo "$l ISO-8859-9" + echo "$l.iso-8859-9 ISO-8859-9" + echo "$l.cp-857 CP857" + echo "$l.cp-1254 CP1254" + echo "$l.utf-8 UTF-8" + done + for l in lt lt_LT lv lv_LV; do + #echo "$l BALTIC" # not a commonly used encoding, wrong encoding name + echo "$l ISO-8859-13" + done + for l in ru_UA uk uk_UA; do + echo "$l KOI8-U" + done + for l in zh zh_CN; do + #echo "$l GB_2312-80" # not a commonly used encoding, wrong encoding name + echo "$l GB2312" + done + for l in ja ja_JP ja_JP.EUC; do + echo "$l EUC-JP" + done + for l in ko ko_KR; do + echo "$l EUC-KR" + done + for l in th th_TH; do + echo "$l TIS-620" + done + for l in fa fa_IR; do + #echo "$l ISIRI-3342" # a broken encoding + echo "$l.utf-8 UTF-8" + done + ;; + linux* | *-gnu*) + # With glibc-2.1 or newer, we don't need any canonicalization, + # because glibc has iconv and both glibc and libiconv support all + # GNU canonical names directly. Therefore, the Makefile does not + # need to install the alias file at all. + # The following applies only to glibc-2.0.x and older libcs. + echo "ISO_646.IRV:1983 ASCII" + ;; + aix*) + echo "ISO8859-1 ISO-8859-1" + echo "ISO8859-2 ISO-8859-2" + echo "ISO8859-5 ISO-8859-5" + echo "ISO8859-6 ISO-8859-6" + echo "ISO8859-7 ISO-8859-7" + echo "ISO8859-8 ISO-8859-8" + echo "ISO8859-9 ISO-8859-9" + echo "ISO8859-15 ISO-8859-15" + echo "IBM-850 CP850" + echo "IBM-856 CP856" + echo "IBM-921 ISO-8859-13" + echo "IBM-922 CP922" + echo "IBM-932 CP932" + echo "IBM-943 CP943" + echo "IBM-1046 CP1046" + echo "IBM-1124 CP1124" + echo "IBM-1129 CP1129" + echo "IBM-1252 CP1252" + echo "IBM-eucCN GB2312" + echo "IBM-eucJP EUC-JP" + echo "IBM-eucKR EUC-KR" + echo "IBM-eucTW EUC-TW" + echo "big5 BIG5" + echo "GBK GBK" + echo "TIS-620 TIS-620" + echo "UTF-8 UTF-8" + ;; + hpux*) + echo "iso88591 ISO-8859-1" + echo "iso88592 ISO-8859-2" + echo "iso88595 ISO-8859-5" + echo "iso88596 ISO-8859-6" + echo "iso88597 ISO-8859-7" + echo "iso88598 ISO-8859-8" + echo "iso88599 ISO-8859-9" + echo "iso885915 ISO-8859-15" + echo "roman8 HP-ROMAN8" + echo "arabic8 HP-ARABIC8" + echo "greek8 HP-GREEK8" + echo "hebrew8 HP-HEBREW8" + echo "turkish8 HP-TURKISH8" + echo "kana8 HP-KANA8" + echo "tis620 TIS-620" + echo "big5 BIG5" + echo "eucJP EUC-JP" + echo "eucKR EUC-KR" + echo "eucTW EUC-TW" + echo "hp15CN GB2312" + #echo "ccdc ?" # what is this? + echo "SJIS SHIFT_JIS" + echo "utf8 UTF-8" + ;; + irix*) + echo "ISO8859-1 ISO-8859-1" + echo "ISO8859-2 ISO-8859-2" + echo "ISO8859-5 ISO-8859-5" + echo "ISO8859-7 ISO-8859-7" + echo "ISO8859-9 ISO-8859-9" + echo "eucCN GB2312" + echo "eucJP EUC-JP" + echo "eucKR EUC-KR" + echo "eucTW EUC-TW" + ;; + osf*) + echo "ISO8859-1 ISO-8859-1" + echo "ISO8859-2 ISO-8859-2" + echo "ISO8859-4 ISO-8859-4" + echo "ISO8859-5 ISO-8859-5" + echo "ISO8859-7 ISO-8859-7" + echo "ISO8859-8 ISO-8859-8" + echo "ISO8859-9 ISO-8859-9" + echo "ISO8859-15 ISO-8859-15" + echo "cp850 CP850" + echo "big5 BIG5" + echo "dechanyu DEC-HANYU" + echo "dechanzi GB2312" + echo "deckanji DEC-KANJI" + echo "deckorean EUC-KR" + echo "eucJP EUC-JP" + echo "eucKR EUC-KR" + echo "eucTW EUC-TW" + echo "GBK GBK" + echo "KSC5601 CP949" + echo "sdeckanji EUC-JP" + echo "SJIS SHIFT_JIS" + echo "TACTIS TIS-620" + echo "UTF-8 UTF-8" + ;; + solaris*) + echo "646 ASCII" + echo "ISO8859-1 ISO-8859-1" + echo "ISO8859-2 ISO-8859-2" + echo "ISO8859-3 ISO-8859-3" + echo "ISO8859-4 ISO-8859-4" + echo "ISO8859-5 ISO-8859-5" + echo "ISO8859-6 ISO-8859-6" + echo "ISO8859-7 ISO-8859-7" + echo "ISO8859-8 ISO-8859-8" + echo "ISO8859-9 ISO-8859-9" + echo "ISO8859-15 ISO-8859-15" + echo "koi8-r KOI8-R" + echo "ansi-1251 CP1251" + echo "BIG5 BIG5" + echo "Big5-HKSCS BIG5-HKSCS" + echo "gb2312 GB2312" + echo "GBK GBK" + echo "GB18030 GB18030" + echo "cns11643 EUC-TW" + echo "5601 EUC-KR" + echo "ko_KR.johap92 JOHAB" + echo "eucJP EUC-JP" + echo "PCK SHIFT_JIS" + echo "TIS620.2533 TIS-620" + #echo "sun_eu_greek ?" # what is this? + echo "UTF-8 UTF-8" + ;; + 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. + echo "C ASCII" + echo "US-ASCII ASCII" + for l in la_LN lt_LN; do + echo "$l.ASCII ASCII" + done + for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \ + fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT la_LN \ + lt_LN nl_BE nl_NL no_NO pt_PT sv_SE; do + echo "$l.ISO_8859-1 ISO-8859-1" + echo "$l.DIS_8859-15 ISO-8859-15" + done + for l in cs_CZ hr_HR hu_HU la_LN lt_LN pl_PL sl_SI; do + echo "$l.ISO_8859-2 ISO-8859-2" + done + for l in la_LN lt_LT; do + echo "$l.ISO_8859-4 ISO-8859-4" + done + for l in ru_RU ru_SU; do + echo "$l.KOI8-R KOI8-R" + echo "$l.ISO_8859-5 ISO-8859-5" + echo "$l.CP866 CP866" + done + echo "uk_UA.KOI8-U KOI8-U" + echo "zh_TW.BIG5 BIG5" + echo "zh_TW.Big5 BIG5" + echo "zh_CN.EUC GB2312" + echo "ja_JP.EUC EUC-JP" + echo "ja_JP.SJIS SHIFT_JIS" + echo "ja_JP.Shift_JIS SHIFT_JIS" + echo "ko_KR.EUC EUC-KR" + ;; + netbsd*) + echo "646 ASCII" + echo "ISO8859-1 ISO-8859-1" + echo "ISO8859-2 ISO-8859-2" + echo "ISO8859-4 ISO-8859-4" + echo "ISO8859-5 ISO-8859-5" + echo "ISO8859-7 ISO-8859-7" + echo "ISO8859-13 ISO-8859-13" + echo "ISO8859-15 ISO-8859-15" + echo "eucCN GB2312" + echo "eucJP EUC-JP" + echo "eucKR EUC-KR" + echo "eucTW EUC-TW" + echo "BIG5 BIG5" + echo "SJIS SHIFT_JIS" + ;; + openbsd*) + echo "646 ASCII" + echo "ISO8859-1 ISO-8859-1" + echo "ISO8859-2 ISO-8859-2" + echo "ISO8859-4 ISO-8859-4" + echo "ISO8859-5 ISO-8859-5" + echo "ISO8859-7 ISO-8859-7" + echo "ISO8859-13 ISO-8859-13" + echo "ISO8859-15 ISO-8859-15" + ;; + darwin[56]*) + # Darwin 6.8 doesn't have nl_langinfo(CODESET); therefore + # localcharset.c falls back to using the full locale name + # from the environment variables. + echo "C ASCII" + for l in en_AU en_CA en_GB en_US la_LN; do + echo "$l.US-ASCII ASCII" + done + for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \ + fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT nl_BE \ + nl_NL no_NO pt_PT sv_SE; do + echo "$l ISO-8859-1" + echo "$l.ISO8859-1 ISO-8859-1" + echo "$l.ISO8859-15 ISO-8859-15" + done + for l in la_LN; do + echo "$l.ISO8859-1 ISO-8859-1" + echo "$l.ISO8859-15 ISO-8859-15" + done + for l in cs_CZ hr_HR hu_HU la_LN pl_PL sl_SI; do + echo "$l.ISO8859-2 ISO-8859-2" + done + for l in la_LN lt_LT; do + echo "$l.ISO8859-4 ISO-8859-4" + done + for l in ru_RU; do + echo "$l.KOI8-R KOI8-R" + echo "$l.ISO8859-5 ISO-8859-5" + echo "$l.CP866 CP866" + done + for l in bg_BG; do + echo "$l.CP1251 CP1251" + done + echo "uk_UA.KOI8-U KOI8-U" + echo "zh_TW.BIG5 BIG5" + echo "zh_TW.Big5 BIG5" + echo "zh_CN.EUC GB2312" + echo "ja_JP.EUC EUC-JP" + echo "ja_JP.SJIS SHIFT_JIS" + echo "ko_KR.EUC EUC-KR" + ;; + darwin*) + # Darwin 7.5 has nl_langinfo(CODESET), but sometimes its value is + # useless: + # - It returns the empty string when LANG is set to a locale of the + # form ll_CC, although ll_CC/LC_CTYPE is a symlink to an UTF-8 + # LC_CTYPE file. + # - The environment variables LANG, LC_CTYPE, LC_ALL are not set by + # the system; nl_langinfo(CODESET) returns "US-ASCII" in this case. + # - The documentation says: + # "... all code that calls BSD system routines should ensure + # that the const *char parameters of these routines are in UTF-8 + # encoding. All BSD system functions expect their string + # parameters to be in UTF-8 encoding and nothing else." + # It also says + # "An additional caveat is that string parameters for files, + # paths, and other file-system entities must be in canonical + # UTF-8. In a canonical UTF-8 Unicode string, all decomposable + # characters are decomposed ..." + # but this is not true: You can pass non-decomposed UTF-8 strings + # to file system functions, and it is the OS which will convert + # them to decomposed UTF-8 before accessing the file system. + # - The Apple Terminal application displays UTF-8 by default. + # - However, other applications are free to use different encodings: + # - xterm uses ISO-8859-1 by default. + # - TextEdit uses MacRoman by default. + # We prefer UTF-8 over decomposed UTF-8-MAC because one should + # minimize the use of decomposed Unicode. Unfortunately, through the + # Darwin file system, decomposed UTF-8 strings are leaked into user + # space nevertheless. + # Then there are also the locales with encodings other than US-ASCII + # and UTF-8. These locales can be occasionally useful to users (e.g. + # when grepping through ISO-8859-1 encoded text files), when all their + # file names are in US-ASCII. + echo "ISO8859-1 ISO-8859-1" + echo "ISO8859-2 ISO-8859-2" + echo "ISO8859-4 ISO-8859-4" + echo "ISO8859-5 ISO-8859-5" + echo "ISO8859-7 ISO-8859-7" + echo "ISO8859-9 ISO-8859-9" + echo "ISO8859-13 ISO-8859-13" + echo "ISO8859-15 ISO-8859-15" + echo "KOI8-R KOI8-R" + echo "KOI8-U KOI8-U" + echo "CP866 CP866" + echo "CP949 CP949" + echo "CP1131 CP1131" + echo "CP1251 CP1251" + echo "eucCN GB2312" + echo "GB2312 GB2312" + echo "eucJP EUC-JP" + echo "eucKR EUC-KR" + echo "Big5 BIG5" + echo "Big5HKSCS BIG5-HKSCS" + echo "GBK GBK" + echo "GB18030 GB18030" + echo "SJIS SHIFT_JIS" + echo "ARMSCII-8 ARMSCII-8" + echo "PT154 PT154" + #echo "ISCII-DEV ?" + echo "* UTF-8" + ;; + beos* | haiku*) + # BeOS and Haiku have a single locale, and it has UTF-8 encoding. + echo "* UTF-8" + ;; + msdosdjgpp*) + # DJGPP 2.03 doesn't have nl_langinfo(CODESET); therefore + # localcharset.c falls back to using the full locale name + # from the environment variables. + echo "#" + echo "# The encodings given here may not all be correct." + echo "# If you find that the encoding given for your language and" + echo "# country is not the one your DOS machine actually uses, just" + echo "# correct it in this file, and send a mail to" + echo "# Juan Manuel Guerrero " + echo "# and Bruno Haible ." + echo "#" + echo "C ASCII" + # ISO-8859-1 languages + echo "ca CP850" + echo "ca_ES CP850" + echo "da CP865" # not CP850 ?? + echo "da_DK CP865" # not CP850 ?? + echo "de CP850" + echo "de_AT CP850" + echo "de_CH CP850" + echo "de_DE CP850" + echo "en CP850" + echo "en_AU CP850" # not CP437 ?? + echo "en_CA CP850" + echo "en_GB CP850" + echo "en_NZ CP437" + echo "en_US CP437" + echo "en_ZA CP850" # not CP437 ?? + echo "es CP850" + echo "es_AR CP850" + echo "es_BO CP850" + echo "es_CL CP850" + echo "es_CO CP850" + echo "es_CR CP850" + echo "es_CU CP850" + echo "es_DO CP850" + echo "es_EC CP850" + echo "es_ES CP850" + echo "es_GT CP850" + echo "es_HN CP850" + echo "es_MX CP850" + echo "es_NI CP850" + echo "es_PA CP850" + echo "es_PY CP850" + echo "es_PE CP850" + echo "es_SV CP850" + echo "es_UY CP850" + echo "es_VE CP850" + echo "et CP850" + echo "et_EE CP850" + echo "eu CP850" + echo "eu_ES CP850" + echo "fi CP850" + echo "fi_FI CP850" + echo "fr CP850" + echo "fr_BE CP850" + echo "fr_CA CP850" + echo "fr_CH CP850" + echo "fr_FR CP850" + echo "ga CP850" + echo "ga_IE CP850" + echo "gd CP850" + echo "gd_GB CP850" + echo "gl CP850" + echo "gl_ES CP850" + echo "id CP850" # not CP437 ?? + echo "id_ID CP850" # not CP437 ?? + echo "is CP861" # not CP850 ?? + echo "is_IS CP861" # not CP850 ?? + echo "it CP850" + echo "it_CH CP850" + echo "it_IT CP850" + echo "lt CP775" + echo "lt_LT CP775" + echo "lv CP775" + echo "lv_LV CP775" + echo "nb CP865" # not CP850 ?? + echo "nb_NO CP865" # not CP850 ?? + echo "nl CP850" + echo "nl_BE CP850" + echo "nl_NL CP850" + echo "nn CP865" # not CP850 ?? + echo "nn_NO CP865" # not CP850 ?? + echo "no CP865" # not CP850 ?? + echo "no_NO CP865" # not CP850 ?? + echo "pt CP850" + echo "pt_BR CP850" + echo "pt_PT CP850" + echo "sv CP850" + echo "sv_SE CP850" + # ISO-8859-2 languages + echo "cs CP852" + echo "cs_CZ CP852" + echo "hr CP852" + echo "hr_HR CP852" + echo "hu CP852" + echo "hu_HU CP852" + echo "pl CP852" + echo "pl_PL CP852" + echo "ro CP852" + echo "ro_RO CP852" + echo "sk CP852" + echo "sk_SK CP852" + echo "sl CP852" + echo "sl_SI CP852" + echo "sq CP852" + echo "sq_AL CP852" + echo "sr CP852" # CP852 or CP866 or CP855 ?? + echo "sr_CS CP852" # CP852 or CP866 or CP855 ?? + echo "sr_YU CP852" # CP852 or CP866 or CP855 ?? + # ISO-8859-3 languages + echo "mt CP850" + echo "mt_MT CP850" + # ISO-8859-5 languages + echo "be CP866" + echo "be_BE CP866" + echo "bg CP866" # not CP855 ?? + echo "bg_BG CP866" # not CP855 ?? + echo "mk CP866" # not CP855 ?? + echo "mk_MK CP866" # not CP855 ?? + echo "ru CP866" + echo "ru_RU CP866" + echo "uk CP1125" + echo "uk_UA CP1125" + # ISO-8859-6 languages + echo "ar CP864" + echo "ar_AE CP864" + echo "ar_DZ CP864" + echo "ar_EG CP864" + echo "ar_IQ CP864" + echo "ar_IR CP864" + echo "ar_JO CP864" + echo "ar_KW CP864" + echo "ar_MA CP864" + echo "ar_OM CP864" + echo "ar_QA CP864" + echo "ar_SA CP864" + echo "ar_SY CP864" + # ISO-8859-7 languages + echo "el CP869" + echo "el_GR CP869" + # ISO-8859-8 languages + echo "he CP862" + echo "he_IL CP862" + # ISO-8859-9 languages + echo "tr CP857" + echo "tr_TR CP857" + # Japanese + echo "ja CP932" + echo "ja_JP CP932" + # Chinese + echo "zh_CN GBK" + echo "zh_TW CP950" # not CP938 ?? + # Korean + echo "kr CP949" # not CP934 ?? + echo "kr_KR CP949" # not CP934 ?? + # Thai + echo "th CP874" + echo "th_TH CP874" + # Other + echo "eo CP850" + echo "eo_EO CP850" + ;; +esac diff --git a/gdb/gnulib/import/dirent-private.h b/gdb/gnulib/import/dirent-private.h index 69edcc52e2d..9b200f30da0 100644 --- a/gdb/gnulib/import/dirent-private.h +++ b/gdb/gnulib/import/dirent-private.h @@ -1,5 +1,5 @@ /* Private details of the DIR type. - Copyright (C) 2011-2018 Free Software Foundation, Inc. + Copyright (C) 2011-2016 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #ifndef _DIRENT_PRIVATE_H #define _DIRENT_PRIVATE_H 1 diff --git a/gdb/gnulib/import/dirent.in.h b/gdb/gnulib/import/dirent.in.h index 2ab25af68f0..65482d7b7ac 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-2018 Free Software Foundation, Inc. + Copyright (C) 2006-2016 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #ifndef _@GUARD_PREFIX@_DIRENT_H diff --git a/gdb/gnulib/import/dirfd.c b/gdb/gnulib/import/dirfd.c index 19c80468bcf..a32584856a2 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-2018 Free Software Foundation, Inc. + Copyright (C) 2001, 2006, 2008-2016 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Jim Meyering. */ diff --git a/gdb/gnulib/import/dirname-lgpl.c b/gdb/gnulib/import/dirname-lgpl.c index a40f6a901fa..a7aabf94162 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-2018 Free Software + Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -14,7 +14,7 @@ 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 . */ + along with this program. If not, see . */ #include diff --git a/gdb/gnulib/import/dirname.h b/gdb/gnulib/import/dirname.h index 8b5111168d7..875b31bae52 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-2018 Free Software Foundation, + Copyright (C) 1998, 2001, 2003-2006, 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -14,7 +14,7 @@ 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 . */ + along with this program. If not, see . */ #ifndef DIRNAME_H_ # define DIRNAME_H_ 1 @@ -36,7 +36,7 @@ extern "C" { #endif # if GNULIB_DIRNAME -char *base_name (char const *file) _GL_ATTRIBUTE_MALLOC; +char *base_name (char const *file); char *dir_name (char const *file); # endif diff --git a/gdb/gnulib/import/dosname.h b/gdb/gnulib/import/dosname.h index fef3b6daa1f..83a953f3c0f 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-2018 Free Software Foundation, Inc. + Copyright (C) 2000-2001, 2004-2006, 2009-2016 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 @@ -13,15 +13,16 @@ 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 . + along with this program. If not, see . From Paul Eggert and Jim Meyering. */ #ifndef _DOSNAME_H #define _DOSNAME_H -#if (defined _WIN32 || defined __CYGWIN__ \ - || defined __EMX__ || defined __MSDOS__ || defined __DJGPP__) +#if (defined _WIN32 || defined __WIN32__ || \ + defined __MSDOS__ || defined __CYGWIN__ || \ + defined __EMX__ || defined __DJGPP__) /* This internal macro assumes ASCII, but all hosts that support drive letters use ASCII. */ # define _IS_DRIVE_LETTER(C) (((unsigned int) (C) | ('a' - 'A')) - 'a' \ diff --git a/gdb/gnulib/import/dup-safer-flag.c b/gdb/gnulib/import/dup-safer-flag.c deleted file mode 100644 index aa28194d535..00000000000 --- a/gdb/gnulib/import/dup-safer-flag.c +++ /dev/null @@ -1,38 +0,0 @@ -/* Duplicate a file descriptor result, avoiding clobbering - STD{IN,OUT,ERR}_FILENO, with specific flags. - - Copyright (C) 2001, 2004-2006, 2009-2018 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Paul Eggert and Eric Blake. */ - -#include - -/* Specification. */ -#include "unistd-safer.h" - -#include -#include - -/* Like dup, but do not return STDIN_FILENO, STDOUT_FILENO, or - STDERR_FILENO. If FLAG contains O_CLOEXEC, behave like - fcntl(F_DUPFD_CLOEXEC) rather than fcntl(F_DUPFD). */ - -int -dup_safer_flag (int fd, int flag) -{ - return fcntl (fd, (flag & O_CLOEXEC) ? F_DUPFD_CLOEXEC : F_DUPFD, - STDERR_FILENO + 1); -} diff --git a/gdb/gnulib/import/dup-safer.c b/gdb/gnulib/import/dup-safer.c index 1f1679ea18f..6ed8f792532 100644 --- a/gdb/gnulib/import/dup-safer.c +++ b/gdb/gnulib/import/dup-safer.c @@ -1,6 +1,6 @@ /* Invoke dup, but avoid some glitches. - Copyright (C) 2001, 2004-2006, 2009-2018 Free Software Foundation, Inc. + Copyright (C) 2001, 2004-2006, 2009-2016 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Paul Eggert. */ diff --git a/gdb/gnulib/import/dup.c b/gdb/gnulib/import/dup.c index 51136db81d6..034fcf8d318 100644 --- a/gdb/gnulib/import/dup.c +++ b/gdb/gnulib/import/dup.c @@ -1,6 +1,6 @@ /* Duplicate an open file descriptor. - Copyright (C) 2011-2018 Free Software Foundation, Inc. + Copyright (C) 2011-2016 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ #include @@ -22,9 +22,7 @@ #include -#if HAVE_MSVC_INVALID_PARAMETER_HANDLER -# include "msvc-inval.h" -#endif +#include "msvc-inval.h" #undef dup diff --git a/gdb/gnulib/import/dup2.c b/gdb/gnulib/import/dup2.c index c7d176728d4..5d026f21fa7 100644 --- a/gdb/gnulib/import/dup2.c +++ b/gdb/gnulib/import/dup2.c @@ -1,6 +1,6 @@ /* Duplicate an open file descriptor to a specified file descriptor. - Copyright (C) 1999, 2004-2007, 2009-2018 Free Software Foundation, Inc. + Copyright (C) 1999, 2004-2007, 2009-2016 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ /* written by Paul Eggert */ @@ -29,45 +29,16 @@ # undef dup2 -# if defined _WIN32 && ! defined __CYGWIN__ +# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* Get declarations of the native Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include -# if HAVE_MSVC_INVALID_PARAMETER_HANDLER -# include "msvc-inval.h" -# endif +# include "msvc-inval.h" /* Get _get_osfhandle. */ -# if GNULIB_MSVC_NOTHROW -# include "msvc-nothrow.h" -# else -# include -# endif - -# if HAVE_MSVC_INVALID_PARAMETER_HANDLER -static int -dup2_nothrow (int fd, int desired_fd) -{ - int result; - - TRY_MSVC_INVAL - { - result = dup2 (fd, desired_fd); - } - CATCH_MSVC_INVAL - { - errno = EBADF; - result = -1; - } - DONE_MSVC_INVAL; - - return result; -} -# else -# define dup2_nothrow dup2 -# endif +# include "msvc-nothrow.h" static int ms_windows_dup2 (int fd, int desired_fd) @@ -88,14 +59,23 @@ ms_windows_dup2 (int fd, int desired_fd) } /* Wine 1.0.1 return 0 when desired_fd is negative but not -1: - https://bugs.winehq.org/show_bug.cgi?id=21289 */ + http://bugs.winehq.org/show_bug.cgi?id=21289 */ if (desired_fd < 0) { errno = EBADF; return -1; } - result = dup2_nothrow (fd, desired_fd); + TRY_MSVC_INVAL + { + result = dup2 (fd, desired_fd); + } + CATCH_MSVC_INVAL + { + errno = EBADF; + result = -1; + } + DONE_MSVC_INVAL; if (result == 0) result = desired_fd; diff --git a/gdb/gnulib/import/errno.in.h b/gdb/gnulib/import/errno.in.h index b95c4e9ce76..b8397ee465d 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-2018 Free Software Foundation, Inc. + Copyright (C) 2008-2016 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program; if not, see . */ #ifndef _@GUARD_PREFIX@_ERRNO_H @@ -30,7 +30,7 @@ /* On native Windows platforms, many macros are not defined. */ -# if defined _WIN32 && ! defined __CYGWIN__ +# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* These are the same values as defined by MSVC 10, for interoperability. */ @@ -248,7 +248,7 @@ interoperability. */ # define EOWNERDEAD 58 # define ENOTRECOVERABLE 59 -# elif defined _WIN32 && ! defined __CYGWIN__ +# elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* We have a conflict here: pthreads-win32 defines these values differently than MSVC 10. It's hairy to decide which one to use. */ # if defined __MINGW32__ && !defined USE_WINDOWS_THREADS diff --git a/gdb/gnulib/import/error.c b/gdb/gnulib/import/error.c index adc873391cb..b3b1286a350 100644 --- a/gdb/gnulib/import/error.c +++ b/gdb/gnulib/import/error.c @@ -1,5 +1,5 @@ /* Error handler for noninteractive utilities - Copyright (C) 1990-1998, 2000-2007, 2009-2018 Free Software Foundation, Inc. + Copyright (C) 1990-1998, 2000-2007, 2009-2016 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by David MacKenzie . */ @@ -93,37 +93,33 @@ extern void __error_at_line (int status, int errnum, const char *file_name, # include # include -# if defined _WIN32 && ! defined __CYGWIN__ +# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* Get declarations of the native Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include /* Get _get_osfhandle. */ -# if GNULIB_MSVC_NOTHROW -# include "msvc-nothrow.h" -# else -# include -# endif +# include "msvc-nothrow.h" # endif /* The gnulib override of fcntl is not needed in this file. */ # undef fcntl -# if !(GNULIB_STRERROR_R_POSIX || HAVE_DECL_STRERROR_R) +# if !HAVE_DECL_STRERROR_R # ifndef HAVE_DECL_STRERROR_R "this configure-time declaration test was not run" # endif # if STRERROR_R_CHAR_P -char *strerror_r (int errnum, char *buf, size_t buflen); +char *strerror_r (); # else -int strerror_r (int errnum, char *buf, size_t buflen); +int strerror_r (); # endif # endif #define program_name getprogname () -# if GNULIB_STRERROR_R_POSIX || HAVE_STRERROR_R || defined strerror_r +# if HAVE_STRERROR_R || defined strerror_r # define __strerror_r strerror_r -# endif /* GNULIB_STRERROR_R_POSIX || HAVE_STRERROR_R || defined strerror_r */ +# endif /* HAVE_STRERROR_R || defined strerror_r */ #endif /* not _LIBC */ #if !_LIBC @@ -131,7 +127,7 @@ int strerror_r (int errnum, char *buf, size_t buflen); static int is_open (int fd) { -# if defined _WIN32 && ! defined __CYGWIN__ +# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* On native Windows: The initial state of unassigned standard file descriptors is that they are open but point to an INVALID_HANDLE_VALUE. There is no fcntl, and the gnulib replacement fcntl does not support @@ -176,9 +172,9 @@ print_errno_message (int errnum) { char const *s; -#if _LIBC || GNULIB_STRERROR_R_POSIX || defined HAVE_STRERROR_R +#if defined HAVE_STRERROR_R || _LIBC char errbuf[1024]; -# if _LIBC || (!GNULIB_STRERROR_R_POSIX && STRERROR_R_CHAR_P) +# if _LIBC || STRERROR_R_CHAR_P s = __strerror_r (errnum, errbuf, sizeof errbuf); # else if (__strerror_r (errnum, errbuf, sizeof errbuf) == 0) @@ -272,6 +268,7 @@ error_tail (int status, int errnum, const char *message, va_list args) else #endif vfprintf (stderr, message, args); + va_end (args); ++error_message_count; if (errnum) @@ -321,7 +318,6 @@ error (int status, int errnum, const char *message, ...) va_start (args, message); error_tail (status, errnum, message, args); - va_end (args); #ifdef _LIBC _IO_funlockfile (stderr); @@ -392,7 +388,6 @@ error_at_line (int status, int errnum, const char *file_name, va_start (args, message); error_tail (status, errnum, message, args); - va_end (args); #ifdef _LIBC _IO_funlockfile (stderr); diff --git a/gdb/gnulib/import/error.h b/gdb/gnulib/import/error.h index 36401e1aa33..6a69db09358 100644 --- a/gdb/gnulib/import/error.h +++ b/gdb/gnulib/import/error.h @@ -1,5 +1,5 @@ /* Declaration for error-reporting function - Copyright (C) 1995-1997, 2003, 2006, 2008-2018 Free Software Foundation, + Copyright (C) 1995-1997, 2003, 2006, 2008-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -14,7 +14,7 @@ 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 . */ + along with this program. If not, see . */ #ifndef _ERROR_H #define _ERROR_H 1 diff --git a/gdb/gnulib/import/exitfail.c b/gdb/gnulib/import/exitfail.c index 19c5cba049c..8033c22ab41 100644 --- a/gdb/gnulib/import/exitfail.c +++ b/gdb/gnulib/import/exitfail.c @@ -1,6 +1,6 @@ /* Failure exit status - Copyright (C) 2002-2003, 2005-2007, 2009-2018 Free Software Foundation, Inc. + Copyright (C) 2002-2003, 2005-2007, 2009-2016 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ #include diff --git a/gdb/gnulib/import/exitfail.h b/gdb/gnulib/import/exitfail.h index a42057b11a9..62311bd48ca 100644 --- a/gdb/gnulib/import/exitfail.h +++ b/gdb/gnulib/import/exitfail.h @@ -1,6 +1,6 @@ /* Failure exit status - Copyright (C) 2002, 2009-2018 Free Software Foundation, Inc. + Copyright (C) 2002, 2009-2016 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 @@ -13,6 +13,6 @@ 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 . */ + along with this program. If not, see . */ extern int volatile exit_failure; diff --git a/gdb/gnulib/import/_Noreturn.h b/gdb/gnulib/import/extra/snippet/_Noreturn.h similarity index 100% rename from gdb/gnulib/import/_Noreturn.h rename to gdb/gnulib/import/extra/snippet/_Noreturn.h diff --git a/gdb/gnulib/import/arg-nonnull.h b/gdb/gnulib/import/extra/snippet/arg-nonnull.h similarity index 88% rename from gdb/gnulib/import/arg-nonnull.h rename to gdb/gnulib/import/extra/snippet/arg-nonnull.h index 5f034083129..584649f694b 100644 --- a/gdb/gnulib/import/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-2018 Free Software Foundation, Inc. + Copyright (C) 2009-2016 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools that the values passed as arguments n, ..., m must be non-NULL pointers. diff --git a/gdb/gnulib/import/c++defs.h b/gdb/gnulib/import/extra/snippet/c++defs.h similarity index 87% rename from gdb/gnulib/import/c++defs.h rename to gdb/gnulib/import/extra/snippet/c++defs.h index 72ff1ffa519..d42ea25d852 100644 --- a/gdb/gnulib/import/c++defs.h +++ b/gdb/gnulib/import/extra/snippet/c++defs.h @@ -1,5 +1,5 @@ /* C++ compatible function declaration macros. - Copyright (C) 2010-2018 Free Software Foundation, Inc. + Copyright (C) 2010-2016 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #ifndef _GL_CXXDEFS_H #define _GL_CXXDEFS_H @@ -133,11 +133,8 @@ static const struct _gl_ ## func ## _wrapper \ { \ typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return ::rpl_func; \ - } \ + inline type rpl () const { return ::rpl_func; } \ + inline operator type () const { return rpl (); } \ } func = {}; \ } \ _GL_EXTERN_C int _gl_cxxalias_dummy @@ -158,11 +155,9 @@ static const struct _gl_ ## func ## _wrapper \ { \ typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast(::rpl_func); \ - } \ + inline type rpl () const \ + { return reinterpret_cast(::rpl_func); } \ + inline operator type () const { return rpl (); } \ } func = {}; \ } \ _GL_EXTERN_C int _gl_cxxalias_dummy @@ -188,13 +183,10 @@ static const struct _gl_ ## func ## _wrapper \ { \ typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return ::func; \ - } \ + inline type rpl () const { return ::func; } \ + inline operator type () const { return rpl (); } \ } func = {}; \ - } \ + } \ _GL_EXTERN_C int _gl_cxxalias_dummy #else # define _GL_CXXALIAS_SYS(func,rettype,parameters) \ @@ -213,11 +205,9 @@ static const struct _gl_ ## func ## _wrapper \ { \ typedef rettype (*type) parameters; \ - \ - inline operator type () const \ - { \ - return reinterpret_cast(::func); \ - } \ + inline type rpl () const \ + { return reinterpret_cast(::func); } \ + inline operator type () const { return rpl (); }\ } func = {}; \ } \ _GL_EXTERN_C int _gl_cxxalias_dummy @@ -245,10 +235,10 @@ { \ typedef rettype (*type) parameters; \ \ - inline operator type () const \ - { \ - return reinterpret_cast((rettype2 (*) parameters2)(::func)); \ - } \ + inline type rpl () const \ + { return reinterpret_cast((rettype2 (*) parameters2)(::func)); }\ + \ + inline operator type () const { return rpl (); } \ } func = {}; \ } \ _GL_EXTERN_C int _gl_cxxalias_dummy @@ -266,7 +256,7 @@ _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) # define _GL_CXXALIASWARN_1(func,namespace) \ _GL_CXXALIASWARN_2 (func, namespace) -/* To work around GCC bug , +/* To work around GCC bug , we enable the warning only when not optimizing. */ # if !__OPTIMIZE__ # define _GL_CXXALIASWARN_2(func,namespace) \ @@ -294,7 +284,7 @@ GNULIB_NAMESPACE) # define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) -/* To work around GCC bug , +/* To work around GCC bug , we enable the warning only when not optimizing. */ # if !__OPTIMIZE__ # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ diff --git a/gdb/gnulib/import/warn-on-use.h b/gdb/gnulib/import/extra/snippet/warn-on-use.h similarity index 63% rename from gdb/gnulib/import/warn-on-use.h rename to gdb/gnulib/import/extra/snippet/warn-on-use.h index 72d67cc2348..2948b47882e 100644 --- a/gdb/gnulib/import/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-2018 Free Software Foundation, Inc. + Copyright (C) 2010-2016 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* _GL_WARN_ON_USE (function, "literal string") issues a declaration for FUNCTION which will then trigger a compiler warning containing @@ -20,32 +20,23 @@ supported by the compiler. If the compiler does not support this feature, the macro expands to an unused extern declaration. - _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the - attribute used in _GL_WARN_ON_USE. If the compiler does not support - this feature, it expands to empty. - - These macros are useful for marking a function as a potential + This macro is useful for marking a function as a potential portability trap, with the intent that "literal string" include instructions on the replacement function that should be used - instead. - _GL_WARN_ON_USE is for functions with 'extern' linkage. - _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline' - linkage. - - However, one of the reasons that a function is a portability trap is - if it has the wrong signature. Declaring FUNCTION with a different - signature in C is a compilation error, so this macro must use the - same type as any existing declaration so that programs that avoid - the problematic FUNCTION do not fail to compile merely because they - included a header that poisoned the function. But this implies that - _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already - have a declaration. Use of this macro implies that there must not - be any other macro hiding the declaration of FUNCTION; but - undefining FUNCTION first is part of the poisoning process anyway - (although for symbols that are provided only via a macro, the result - is a compilation error rather than a warning containing - "literal string"). Also note that in C++, it is only safe to use if - FUNCTION has no overloads. + instead. However, one of the reasons that a function is a + portability trap is if it has the wrong signature. Declaring + FUNCTION with a different signature in C is a compilation error, so + this macro must use the same type as any existing declaration so + that programs that avoid the problematic FUNCTION do not fail to + compile merely because they included a header that poisoned the + function. But this implies that _GL_WARN_ON_USE is only safe to + use if FUNCTION is known to already have a declaration. Use of + this macro implies that there must not be any other macro hiding + the declaration of FUNCTION; but undefining FUNCTION first is part + of the poisoning process anyway (although for symbols that are + provided only via a macro, the result is a compilation error rather + than a warning containing "literal string"). Also note that in + C++, it is only safe to use if FUNCTION has no overloads. For an example, it is possible to poison 'getline' by: - adding a call to gl_WARN_ON_USE_PREPARE([[#include ]], @@ -63,21 +54,12 @@ (less common usage, like &environ, will cause a compilation error rather than issue the nice warning, but the end result of informing the developer about their portability problem is still achieved): - #if HAVE_RAW_DECL_ENVIRON - static char *** - rpl_environ (void) { return &environ; } - _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); - # undef environ - # define environ (*rpl_environ ()) - #endif - or better (avoiding contradictory use of 'static' and 'extern'): - #if HAVE_RAW_DECL_ENVIRON - static char *** - _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared") - rpl_environ (void) { return &environ; } - # undef environ - # define environ (*rpl_environ ()) - #endif + #if HAVE_RAW_DECL_ENVIRON + static char ***rpl_environ (void) { return &environ; } + _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); + # undef environ + # define environ (*rpl_environ ()) + #endif */ #ifndef _GL_WARN_ON_USE @@ -85,17 +67,13 @@ /* A compiler attribute is available in gcc versions 4.3.0 and later. */ # define _GL_WARN_ON_USE(function, message) \ extern __typeof__ (function) function __attribute__ ((__warning__ (message))) -# define _GL_WARN_ON_USE_ATTRIBUTE(message) \ - __attribute__ ((__warning__ (message))) # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING /* Verify the existence of the function. */ # define _GL_WARN_ON_USE(function, message) \ extern __typeof__ (function) function -# define _GL_WARN_ON_USE_ATTRIBUTE(message) # else /* Unsupported. */ # define _GL_WARN_ON_USE(function, message) \ _GL_WARN_EXTERN_C int _gl_warn_on_use -# define _GL_WARN_ON_USE_ATTRIBUTE(message) # endif #endif diff --git a/gdb/gnulib/import/extra/update-copyright b/gdb/gnulib/import/extra/update-copyright index f2fc97e368f..17ee6b14d11 100755 --- 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" "$@"' if 0; # Update an FSF copyright year list to include the current year. -my $VERSION = '2018-03-07.03:47'; # UTC +my $VERSION = '2016-01-12.23:13'; # UTC -# Copyright (C) 2009-2018 Free Software Foundation, Inc. +# Copyright (C) 2009-2016 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 @@ my $VERSION = '2018-03-07.03:47'; # UTC # 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 . +# along with this program. If not, see . # Written by Jim Meyering and Joel E. Denny @@ -81,7 +81,6 @@ my $VERSION = '2018-03-07.03:47'; # UTC # B. (c) # C. @copyright{} # D. © -# E. © # # 4. The "Copyright" appears at the beginning of a line, except that it # may be prefixed by any sequence (e.g., a comment) of no more than @@ -125,7 +124,7 @@ use strict; use warnings; my $copyright_re = 'Copyright'; -my $circle_c_re = '(?:\([cC]\)|@copyright\{}|\\\\\(co|©|©)'; +my $circle_c_re = '(?:\([cC]\)|@copyright\{}|\\\\\(co|©)'; my $holder = $ENV{UPDATE_COPYRIGHT_HOLDER}; $holder ||= 'Free Software Foundation, Inc.'; my $prefix_max = 5; @@ -264,12 +263,10 @@ else print STDERR "$ARGV: warning: copyright statement not found\n"; } -# Hey Emacs! # Local variables: -# coding: utf-8 # mode: perl # indent-tabs-mode: nil -# eval: (add-hook 'before-save-hook 'time-stamp) +# eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "my $VERSION = '" # time-stamp-format: "%:y-%02m-%02d.%02H:%02M" # time-stamp-time-zone: "UTC0" diff --git a/gdb/gnulib/import/fchdir.c b/gdb/gnulib/import/fchdir.c index 6b0f97e7460..8a7a072d7a6 100644 --- a/gdb/gnulib/import/fchdir.c +++ b/gdb/gnulib/import/fchdir.c @@ -1,5 +1,5 @@ /* fchdir replacement. - Copyright (C) 2006-2018 Free Software Foundation, Inc. + Copyright (C) 2006-2016 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #include diff --git a/gdb/gnulib/import/fcntl.c b/gdb/gnulib/import/fcntl.c index be6583565b4..fd17e962f8b 100644 --- a/gdb/gnulib/import/fcntl.c +++ b/gdb/gnulib/import/fcntl.c @@ -1,6 +1,6 @@ /* Provide file descriptor control. - Copyright (C) 2009-2018 Free Software Foundation, Inc. + Copyright (C) 2009-2016 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Eric Blake . */ @@ -32,17 +32,13 @@ #endif #undef fcntl -#if defined _WIN32 && ! defined __CYGWIN__ +#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* Get declarations of the native Windows API functions. */ # define WIN32_LEAN_AND_MEAN # include /* Get _get_osfhandle. */ -# if GNULIB_MSVC_NOTHROW -# include "msvc-nothrow.h" -# else -# include -# endif +# include "msvc-nothrow.h" /* Upper bound on getdtablesize(). See lib/getdtablesize.c. */ # define OPEN_MAX_MAX 0x10000 @@ -376,7 +372,7 @@ rpl_fcntl (int fd, int action, /* arg */...) #if !HAVE_FCNTL case F_GETFD: { -# if defined _WIN32 && ! defined __CYGWIN__ +# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ HANDLE handle = (HANDLE) _get_osfhandle (fd); DWORD flags; if (handle == INVALID_HANDLE_VALUE diff --git a/gdb/gnulib/import/fcntl.in.h b/gdb/gnulib/import/fcntl.in.h index a1e7d35c1b9..b94397307e9 100644 --- a/gdb/gnulib/import/fcntl.in.h +++ b/gdb/gnulib/import/fcntl.in.h @@ -1,6 +1,6 @@ /* Like , but with non-working flags defined to 0. - Copyright (C) 2006-2018 Free Software Foundation, Inc. + Copyright (C) 2006-2016 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ /* written by Paul Eggert */ @@ -68,7 +68,7 @@ /* Native Windows platforms declare open(), creat() in . */ #if (@GNULIB_OPEN@ || defined GNULIB_POSIXCHECK) \ - && (defined _WIN32 && ! defined __CYGWIN__) + && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) # include #endif @@ -213,10 +213,7 @@ _GL_WARN_ON_USE (openat, "openat is not portable - " #endif #ifndef O_CLOEXEC -# define O_CLOEXEC 0x40000000 /* Try to not collide with system O_* flags. */ -# define GNULIB_defined_O_CLOEXEC 1 -#else -# define GNULIB_defined_O_CLOEXEC 0 +# define O_CLOEXEC 0 #endif #ifndef O_DIRECT diff --git a/gdb/gnulib/import/fd-hook.c b/gdb/gnulib/import/fd-hook.c index 95a0662bc04..8676c6bdfc0 100644 --- a/gdb/gnulib/import/fd-hook.c +++ b/gdb/gnulib/import/fd-hook.c @@ -1,5 +1,5 @@ -/* Hook for making file descriptor functions close(), ioctl() extensible. - Copyright (C) 2009-2018 Free Software Foundation, Inc. +/* Hook for making making file descriptor functions close(), ioctl() extensible. + Copyright (C) 2009-2016 Free Software Foundation, Inc. Written by Bruno Haible , 2009. This program is free software: you can redistribute it and/or modify it @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ #include diff --git a/gdb/gnulib/import/fd-hook.h b/gdb/gnulib/import/fd-hook.h index dbc5b67a81a..9568d07511b 100644 --- a/gdb/gnulib/import/fd-hook.h +++ b/gdb/gnulib/import/fd-hook.h @@ -1,5 +1,5 @@ -/* Hook for making file descriptor functions close(), ioctl() extensible. - Copyright (C) 2009-2018 Free Software Foundation, Inc. +/* Hook for making making file descriptor functions close(), ioctl() extensible. + Copyright (C) 2009-2016 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #ifndef FD_HOOK_H diff --git a/gdb/gnulib/import/fd-safer-flag.c b/gdb/gnulib/import/fd-safer-flag.c deleted file mode 100644 index b7574848d72..00000000000 --- a/gdb/gnulib/import/fd-safer-flag.c +++ /dev/null @@ -1,52 +0,0 @@ -/* Adjust a file descriptor result so that it avoids clobbering - STD{IN,OUT,ERR}_FILENO, with specific flags. - - Copyright (C) 2005-2006, 2009-2018 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Paul Eggert and Eric Blake. */ - -#include - -/* Specification. */ -#include "unistd-safer.h" - -#include -#include - -/* Return FD, unless FD would be a copy of standard input, output, or - error; in that case, return a duplicate of FD, closing FD. If FLAG - contains O_CLOEXEC, the returned FD will have close-on-exec - semantics. On failure to duplicate, close FD, set errno, and - return -1. Preserve errno if FD is negative, so that the caller - can always inspect errno when the returned value is negative. - - This function is usefully wrapped around functions that return file - descriptors, e.g., fd_safer_flag (open ("file", O_RDONLY | flag), flag). */ - -int -fd_safer_flag (int fd, int flag) -{ - if (STDIN_FILENO <= fd && fd <= STDERR_FILENO) - { - int f = dup_safer_flag (fd, flag); - int e = errno; - close (fd); - errno = e; - fd = f; - } - - return fd; -} diff --git a/gdb/gnulib/import/fd-safer.c b/gdb/gnulib/import/fd-safer.c index 1ea9a4981dc..8a6bee2ee18 100644 --- a/gdb/gnulib/import/fd-safer.c +++ b/gdb/gnulib/import/fd-safer.c @@ -1,6 +1,6 @@ /* Return a safer copy of a file descriptor. - Copyright (C) 2005-2006, 2009-2018 Free Software Foundation, Inc. + Copyright (C) 2005-2006, 2009-2016 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Paul Eggert. */ diff --git a/gdb/gnulib/import/fdopendir.c b/gdb/gnulib/import/fdopendir.c index 9adefd210b5..c1f4dcbaca0 100644 --- a/gdb/gnulib/import/fdopendir.c +++ b/gdb/gnulib/import/fdopendir.c @@ -1,5 +1,5 @@ /* provide a replacement fdopendir function - Copyright (C) 2004-2018 Free Software Foundation, Inc. + Copyright (C) 2004-2016 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* written by Jim Meyering */ diff --git a/gdb/gnulib/import/filename.h b/gdb/gnulib/import/filename.h index a7ad7e7e0c0..7d2c31a8c38 100644 --- a/gdb/gnulib/import/filename.h +++ b/gdb/gnulib/import/filename.h @@ -1,5 +1,5 @@ /* Basic filename support macros. - Copyright (C) 2001-2004, 2007-2018 Free Software Foundation, Inc. + Copyright (C) 2001-2004, 2007-2016 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #ifndef _FILENAME_H #define _FILENAME_H @@ -28,7 +28,7 @@ extern "C" { it may be concatenated to a directory pathname. IS_PATH_WITH_DIR(P) tests whether P contains a directory specification. */ -#if defined _WIN32 || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ +#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ /* Native Windows, Cygwin, OS/2, DOS */ # define ISSLASH(C) ((C) == '/' || (C) == '\\') # define HAS_DEVICE(P) \ diff --git a/gdb/gnulib/import/filenamecat-lgpl.c b/gdb/gnulib/import/filenamecat-lgpl.c index f50ecc13827..4903fbf370c 100644 --- a/gdb/gnulib/import/filenamecat-lgpl.c +++ b/gdb/gnulib/import/filenamecat-lgpl.c @@ -1,6 +1,6 @@ /* Concatenate two arbitrary file names. - Copyright (C) 1996-2007, 2009-2018 Free Software Foundation, Inc. + Copyright (C) 1996-2007, 2009-2016 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Jim Meyering. */ @@ -31,54 +31,55 @@ # define mempcpy(D, S, N) ((void *) ((char *) memcpy (D, S, N) + (N))) #endif -/* Concatenate two file name components, DIR and BASE, in +/* Return the longest suffix of F that is a relative file name. + If it has no such suffix, return the empty string. */ + +static char const * _GL_ATTRIBUTE_PURE +longest_relative_suffix (char const *f) +{ + for (f += FILE_SYSTEM_PREFIX_LEN (f); ISSLASH (*f); f++) + continue; + return f; +} + +/* Concatenate two file name components, DIR and ABASE, in newly-allocated storage and return the result. The resulting file name F is such that the commands "ls F" and "(cd - DIR; ls ./BASE)" refer to the same file. If necessary, put - a separator between DIR and BASE in the result. Typically this - separator is "/", but in rare cases it might be ".". + DIR; ls BASE)" refer to the same file, where BASE is ABASE with any + file system prefixes and leading separators removed. + Arrange for a directory separator if necessary between DIR and BASE + in the result, removing any redundant separators. In any case, if BASE_IN_RESULT is non-NULL, set - *BASE_IN_RESULT to point to the copy of BASE at the end of the - returned concatenation. + *BASE_IN_RESULT to point to the copy of ABASE in the returned + concatenation. However, if ABASE begins with more than one slash, + set *BASE_IN_RESULT to point to the sole corresponding slash that + is copied into the result buffer. Return NULL if malloc fails. */ char * -mfile_name_concat (char const *dir, char const *base, char **base_in_result) +mfile_name_concat (char const *dir, char const *abase, char **base_in_result) { char const *dirbase = last_component (dir); size_t dirbaselen = base_len (dirbase); size_t dirlen = dirbase - dir + dirbaselen; + size_t needs_separator = (dirbaselen && ! ISSLASH (dirbase[dirbaselen - 1])); + + char const *base = longest_relative_suffix (abase); size_t baselen = strlen (base); - char sep = '\0'; - if (dirbaselen) - { - /* DIR is not a file system root, so separate with / if needed. */ - if (! ISSLASH (dir[dirlen - 1]) && ! ISSLASH (*base)) - sep = '/'; - } - else if (ISSLASH (*base)) - { - /* DIR is a file system root and BASE begins with a slash, so - separate with ".". For example, if DIR is "/" and BASE is - "/foo" then return "/./foo", as "//foo" would be wrong on - some POSIX systems. A fancier algorithm could omit "." in - some cases but is not worth the trouble. */ - sep = '.'; - } - - char *p_concat = malloc (dirlen + (sep != '\0') + baselen + 1); + + char *p_concat = malloc (dirlen + needs_separator + baselen + 1); char *p; if (p_concat == NULL) return NULL; p = mempcpy (p_concat, dir, dirlen); - *p = sep; - p += sep != '\0'; + *p = DIRECTORY_SEPARATOR; + p += needs_separator; if (base_in_result) - *base_in_result = p; + *base_in_result = p - IS_ABSOLUTE_FILE_NAME (abase); p = mempcpy (p, base, baselen); *p = '\0'; diff --git a/gdb/gnulib/import/filenamecat.h b/gdb/gnulib/import/filenamecat.h index fee6153242f..791a0af9b7a 100644 --- a/gdb/gnulib/import/filenamecat.h +++ b/gdb/gnulib/import/filenamecat.h @@ -1,6 +1,6 @@ /* Concatenate two arbitrary file names. - Copyright (C) 1996-1997, 2003, 2005, 2007, 2009-2018 Free Software + Copyright (C) 1996-1997, 2003, 2005, 2007, 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -14,7 +14,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Jim Meyering. */ diff --git a/gdb/gnulib/import/flexmember.h b/gdb/gnulib/import/flexmember.h index 7e3f59837bb..62c556bae25 100644 --- a/gdb/gnulib/import/flexmember.h +++ b/gdb/gnulib/import/flexmember.h @@ -1,22 +1,19 @@ /* Sizes of structs with flexible array members. - Copyright 2016-2018 Free Software Foundation, Inc. + Copyright 2016 Free Software Foundation, Inc. - This file is part of the GNU C Library. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public - License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, + 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. + 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 the GNU C Library; if not, see - . + You should have received a copy of the GNU General Public License + along with this program. If not, see . Written by Paul Eggert. */ diff --git a/gdb/gnulib/import/float+.h b/gdb/gnulib/import/float+.h index 2cb858f6a84..00fcc763225 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-2018 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc. Written by Bruno Haible , 2007. This program is free software; you can redistribute it and/or modify @@ -13,7 +13,7 @@ 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 . */ + along with this program; if not, see . */ #ifndef _FLOATPLUS_H #define _FLOATPLUS_H diff --git a/gdb/gnulib/import/float.c b/gdb/gnulib/import/float.c index 7caca837969..1bad2ee2bd9 100644 --- a/gdb/gnulib/import/float.c +++ b/gdb/gnulib/import/float.c @@ -1,5 +1,5 @@ /* Auxiliary definitions for . - Copyright (C) 2011-2018 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. Written by Bruno Haible , 2011. This program is free software: you can redistribute it and/or modify @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ #include diff --git a/gdb/gnulib/import/float.in.h b/gdb/gnulib/import/float.in.h index 2cdbd1226b8..0b93d90087a 100644 --- a/gdb/gnulib/import/float.in.h +++ b/gdb/gnulib/import/float.in.h @@ -1,6 +1,6 @@ /* A correct . - Copyright (C) 2007-2018 Free Software Foundation, Inc. + Copyright (C) 2007-2016 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ #ifndef _@GUARD_PREFIX@_FLOAT_H @@ -62,8 +62,8 @@ /* On FreeBSD/x86 6.4, the 'long double' type really has only 53 bits of precision in the compiler but 64 bits of precision at runtime. See - . */ -#if defined __i386__ && (defined __FreeBSD__ || defined __DragonFly__) + . */ +#if defined __i386__ && defined __FreeBSD__ /* Number of mantissa units, in base FLT_RADIX. */ # undef LDBL_MANT_DIG # define LDBL_MANT_DIG 64 @@ -81,7 +81,7 @@ # define LDBL_MAX_EXP 16384 /* Minimum positive normalized number. */ # undef LDBL_MIN -# define LDBL_MIN 3.362103143112093506262677817321752E-4932L /* = 0x1p-16382L */ +# define LDBL_MIN 3.3621031431120935E-4932L /* = 0x1p-16382L */ /* Maximum representable finite number. */ # undef LDBL_MAX /* LDBL_MAX is represented as { 0xFFFFFFFF, 0xFFFFFFFF, 32766 }. diff --git a/gdb/gnulib/import/fnmatch.c b/gdb/gnulib/import/fnmatch.c index 0fa0a3db98a..0858091cf36 100644 --- a/gdb/gnulib/import/fnmatch.c +++ b/gdb/gnulib/import/fnmatch.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-1993, 1996-2007, 2009-2018 Free Software Foundation, Inc. +/* Copyright (C) 1991-1993, 1996-2007, 2009-2016 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 @@ -11,7 +11,7 @@ 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 . */ + along with this program; if not, see . */ #ifndef _LIBC # include @@ -22,6 +22,10 @@ # define _GNU_SOURCE 1 #endif +#if ! defined __builtin_expect && defined __GNUC__ && __GNUC__ < 3 +# define __builtin_expect(expr, expected) (expr) +#endif + #include #include @@ -65,14 +69,6 @@ extern int fnmatch (const char *pattern, const char *string, int flags); #include "flexmember.h" -#ifndef FALLTHROUGH -# if __GNUC__ < 7 -# define FALLTHROUGH ((void) 0) -# else -# define FALLTHROUGH __attribute__ ((__fallthrough__)) -# endif -#endif - /* We often have to test for FNM_FILE_NAME and FNM_PERIOD being both set. */ #define NO_LEADING_PERIOD(flags) \ ((flags & (FNM_FILE_NAME | FNM_PERIOD)) == (FNM_FILE_NAME | FNM_PERIOD)) diff --git a/gdb/gnulib/import/fnmatch.in.h b/gdb/gnulib/import/fnmatch.in.h index af896bdfe8c..890ee56f278 100644 --- a/gdb/gnulib/import/fnmatch.in.h +++ b/gdb/gnulib/import/fnmatch.in.h @@ -1,5 +1,4 @@ -/* Substitute for and wrapper around . - Copyright (C) 1991-1993, 1996-1999, 2001-2003, 2005, 2007, 2009-2018 Free +/* Copyright (C) 1991-1993, 1996-1999, 2001-2003, 2005, 2007, 2009-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -15,30 +14,16 @@ 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 . */ + along with this program; if not, see . */ -#ifndef _@GUARD_PREFIX@_FNMATCH_H - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -/* The include_next requires a split double-inclusion guard. */ -#if @HAVE_FNMATCH_H@ && !@REPLACE_FNMATCH@ -# @INCLUDE_NEXT@ @NEXT_FNMATCH_H@ -#endif - -#ifndef _@GUARD_PREFIX@_FNMATCH_H -#define _@GUARD_PREFIX@_FNMATCH_H - -/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ +#ifndef _FNMATCH_H +#define _FNMATCH_H 1 /* The definition of _GL_ARG_NONNULL is copied here. */ -/* The definition of _GL_WARN_ON_USE is copied here. */ - -#if !@HAVE_FNMATCH_H@ || @REPLACE_FNMATCH@ +#ifdef __cplusplus +extern "C" { +#endif /* We #undef these before defining them because some losing systems (HP-UX A.08.07 for example) define these in . */ @@ -69,42 +54,14 @@ # define FNM_NOSYS (-1) #endif -#endif - - -#if @GNULIB_FNMATCH@ /* Match NAME against the file name pattern PATTERN, returning zero if it matches, FNM_NOMATCH if not. */ -# if @REPLACE_FNMATCH@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fnmatch rpl_fnmatch -# endif -_GL_FUNCDECL_RPL (fnmatch, int, - (const char *pattern, const char *name, int flags) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (fnmatch, int, - (const char *pattern, const char *name, int flags)); -# else -# if !@HAVE_FNMATCH@ -_GL_FUNCDECL_SYS (fnmatch, int, - (const char *pattern, const char *name, int flags) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (fnmatch, int, - (const char *pattern, const char *name, int flags)); -# endif -# if !GNULIB_FNMATCH_GNU -_GL_CXXALIASWARN (fnmatch); -# endif -#elif defined GNULIB_POSIXCHECK -# undef fnmatch -# if HAVE_RAW_DECL_FNMATCH -_GL_WARN_ON_USE (fnmatch, - "fnmatch does not portably work - " - "use gnulib module fnmatch for portability or gnulib module fnmatch-gnu for a glibc compatible implementation"); -# endif -#endif +extern int fnmatch (const char *__pattern, const char *__name, + int __flags) + _GL_ARG_NONNULL ((1, 2)); +#ifdef __cplusplus +} +#endif -#endif /* _@GUARD_PREFIX@_FNMATCH_H */ -#endif /* _@GUARD_PREFIX@_FNMATCH_H */ +#endif /* fnmatch.h */ diff --git a/gdb/gnulib/import/fnmatch_loop.c b/gdb/gnulib/import/fnmatch_loop.c index dcf5a151f44..0c2b48437cd 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-2018 Free Software Foundation, Inc. +/* Copyright (C) 1991-1993, 1996-2006, 2009-2016 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program; if not, see . */ /* Match STRING against the file name pattern PATTERN, returning zero if it matches, nonzero if not. */ @@ -960,7 +960,7 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end, new_no_leading_period = true; break; } - FALLTHROUGH; + /* FALLTHROUGH */ default: normal_match: if (n == string_end || c != FOLD ((UCHAR) *n)) @@ -1114,7 +1114,8 @@ EXT (INT opt, const CHAR *pattern, const CHAR *string, const CHAR *string_end, case L_('*'): if (FCT (p, string, string_end, no_leading_period, flags) == 0) return 0; - FALLTHROUGH; + /* FALLTHROUGH */ + case L_('+'): do { @@ -1150,7 +1151,8 @@ EXT (INT opt, const CHAR *pattern, const CHAR *string, const CHAR *string_end, case L_('?'): if (FCT (p, string, string_end, no_leading_period, flags) == 0) return 0; - FALLTHROUGH; + /* FALLTHROUGH */ + case L_('@'): do /* I cannot believe it but 'strcat' is actually acceptable diff --git a/gdb/gnulib/import/fpucw.h b/gdb/gnulib/import/fpucw.h index 0c048008857..05ee0cac947 100644 --- a/gdb/gnulib/import/fpucw.h +++ b/gdb/gnulib/import/fpucw.h @@ -1,5 +1,5 @@ /* Manipulating the FPU control word. -*- coding: utf-8 -*- - Copyright (C) 2007-2018 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. Written by Bruno Haible , 2007. This program is free software: you can redistribute it and/or modify @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ #ifndef _FPUCW_H #define _FPUCW_H @@ -35,13 +35,13 @@ The FPU control word is under control of the application, i.e. it is not required to be set either way by the ABI. (In fact, the i386 ABI - https://www.linux-mips.org/pub/linux/mips/doc/ABI/abi386-4.pdf page 3-12 = page 38 + http://refspecs.freestandards.org/elf/abi386-4.pdf page 3-12 = page 38 is not clear about it. But in any case, gcc treats the control word like a "preserved" register: it emits code that assumes that the control word is preserved across calls, and it restores the control word at the end of functions that modify it.) - See Vincent Lefèvre's page https://www.vinc17.net/research/extended.en.html + See Vincent Lefèvre's page http://www.vinc17.org/research/extended.en.html for a good explanation. See http://www.uwsg.iu.edu/hypermail/linux/kernel/0103.0/0453.html for some argumentation which setting should be the default. */ diff --git a/gdb/gnulib/import/frexp.c b/gdb/gnulib/import/frexp.c index 37ea13aa84c..5edb028b651 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-2018 Free Software Foundation, Inc. + Copyright (C) 2007-2016 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Paolo Bonzini , 2003, and Bruno Haible , 2007. */ diff --git a/gdb/gnulib/import/frexpl.c b/gdb/gnulib/import/frexpl.c index 2ac0c03fd87..714a2ffded9 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-2018 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2016 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #include diff --git a/gdb/gnulib/import/fstat.c b/gdb/gnulib/import/fstat.c index 41ee7618d22..435c4290702 100644 --- a/gdb/gnulib/import/fstat.c +++ b/gdb/gnulib/import/fstat.c @@ -1,5 +1,5 @@ /* fstat() replacement. - Copyright (C) 2011-2018 Free Software Foundation, Inc. + Copyright (C) 2011-2016 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* If the user's config.h happens to include , let it include only the system's here, so that orig_fstat doesn't recurse to @@ -23,13 +23,13 @@ /* Get the original definition of fstat. It might be defined as a macro. */ #include #include -#undef __need_system_sys_stat_h - -#if defined _WIN32 && ! defined __CYGWIN__ -# define WINDOWS_NATIVE +#if _GL_WINDOWS_64_BIT_ST_SIZE +# undef stat /* avoid warning on mingw64 with _FILE_OFFSET_BITS=64 */ +# define stat _stati64 +# undef fstat /* avoid warning on mingw64 with _FILE_OFFSET_BITS=64 */ +# define fstat _fstati64 #endif - -#if !defined WINDOWS_NATIVE +#undef __need_system_sys_stat_h static int orig_fstat (int fd, struct stat *buf) @@ -37,27 +37,40 @@ orig_fstat (int fd, struct stat *buf) return fstat (fd, buf); } -#endif - /* Specification. */ /* Write "sys/stat.h" here, not , otherwise OSF/1 5.1 DTK cc eliminates this include because of the preliminary #include above. */ #include "sys/stat.h" -#include "stat-time.h" - #include #include -#ifdef WINDOWS_NATIVE -# define WIN32_LEAN_AND_MEAN -# include -# if GNULIB_MSVC_NOTHROW -# include "msvc-nothrow.h" -# else -# include -# endif -# include "stat-w32.h" + +#if HAVE_MSVC_INVALID_PARAMETER_HANDLER +# include "msvc-inval.h" +#endif + +#if HAVE_MSVC_INVALID_PARAMETER_HANDLER +static int +fstat_nothrow (int fd, struct stat *buf) +{ + int result; + + TRY_MSVC_INVAL + { + result = orig_fstat (fd, buf); + } + CATCH_MSVC_INVAL + { + result = -1; + errno = EBADF; + } + DONE_MSVC_INVAL; + + return result; +} +#else +# define fstat_nothrow orig_fstat #endif int @@ -71,20 +84,5 @@ rpl_fstat (int fd, struct stat *buf) return stat (name, buf); #endif -#ifdef WINDOWS_NATIVE - /* Fill the fields ourselves, because the original fstat function returns - values for st_atime, st_mtime, st_ctime that depend on the current time - zone. See - */ - HANDLE h = (HANDLE) _get_osfhandle (fd); - - if (h == INVALID_HANDLE_VALUE) - { - errno = EBADF; - return -1; - } - return _gl_fstat_by_handle (h, NULL, buf); -#else - return stat_time_normalize (orig_fstat (fd, buf), buf); -#endif + return fstat_nothrow (fd, buf); } diff --git a/gdb/gnulib/import/fstatat.c b/gdb/gnulib/import/fstatat.c index 63ceceb6d86..ebbecfd14ab 100644 --- a/gdb/gnulib/import/fstatat.c +++ b/gdb/gnulib/import/fstatat.c @@ -1,6 +1,6 @@ /* Work around an fstatat bug on Solaris 9. - Copyright (C) 2006, 2009-2018 Free Software Foundation, Inc. + Copyright (C) 2006, 2009-2016 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Paul Eggert and Jim Meyering. */ @@ -28,7 +28,7 @@ #include #undef __need_system_sys_stat_h -#if HAVE_FSTATAT && HAVE_WORKING_FSTATAT_ZERO_FLAG +#if HAVE_FSTATAT static int orig_fstatat (int fd, char const *filename, struct stat *buf, int flags) { @@ -41,8 +41,6 @@ orig_fstatat (int fd, char const *filename, struct stat *buf, int flags) above. */ #include "sys/stat.h" -#include "stat-time.h" - #include #include #include @@ -53,12 +51,6 @@ orig_fstatat (int fd, char const *filename, struct stat *buf, int flags) # define LSTAT_FOLLOWS_SLASHED_SYMLINK 0 # endif -static int -normal_fstatat (int fd, char const *file, struct stat *st, int flag) -{ - return stat_time_normalize (orig_fstatat (fd, file, st, flag), st); -} - /* fstatat should always follow symbolic links that end in /, but on Solaris 9 it doesn't if AT_SYMLINK_NOFOLLOW is specified. Likewise, trailing slash on a non-directory should be an error. @@ -71,7 +63,7 @@ normal_fstatat (int fd, char const *file, struct stat *st, int flag) int rpl_fstatat (int fd, char const *file, struct stat *st, int flag) { - int result = normal_fstatat (fd, file, st, flag); + int result = orig_fstatat (fd, file, st, flag); size_t len; if (LSTAT_FOLLOWS_SLASHED_SYMLINK || result != 0) @@ -87,7 +79,7 @@ rpl_fstatat (int fd, char const *file, struct stat *st, int flag) errno = ENOTDIR; return -1; } - result = normal_fstatat (fd, file, st, flag & ~AT_SYMLINK_NOFOLLOW); + result = orig_fstatat (fd, file, st, flag & ~AT_SYMLINK_NOFOLLOW); } /* Fix stat behavior. */ if (result == 0 && !S_ISDIR (st->st_mode) && file[len - 1] == '/') @@ -119,7 +111,7 @@ stat_func (char const *name, struct stat *st) # endif /* Replacement for Solaris' function by the same name. - + First, try to simulate it via l?stat ("/proc/self/fd/FD/FILE"). Failing that, simulate it via save_cwd/fchdir/(stat|lstat)/restore_cwd. If either the save_cwd or the restore_cwd fails (relatively unlikely), diff --git a/gdb/gnulib/import/getcwd-lgpl.c b/gdb/gnulib/import/getcwd-lgpl.c index 9f0e0072e81..c553f7b4926 100644 --- a/gdb/gnulib/import/getcwd-lgpl.c +++ b/gdb/gnulib/import/getcwd-lgpl.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2011-2018 Free Software Foundation, Inc. +/* Copyright (C) 2011-2016 Free Software Foundation, Inc. This file is part of gnulib. This program is free software: you can redistribute it and/or modify @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #include diff --git a/gdb/gnulib/import/getcwd.c b/gdb/gnulib/import/getcwd.c index 71043ab20a5..e1265fdd3a4 100644 --- a/gdb/gnulib/import/getcwd.c +++ b/gdb/gnulib/import/getcwd.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-1999, 2004-2018 Free Software Foundation, Inc. +/* Copyright (C) 1991-1999, 2004-2016 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #if !_LIBC # include diff --git a/gdb/gnulib/import/getdtablesize.c b/gdb/gnulib/import/getdtablesize.c index ac05bc483cc..d23405571b0 100644 --- a/gdb/gnulib/import/getdtablesize.c +++ b/gdb/gnulib/import/getdtablesize.c @@ -1,5 +1,5 @@ -/* getdtablesize() function: Return maximum possible file descriptor value + 1. - Copyright (C) 2008-2018 Free Software Foundation, Inc. +/* getdtablesize() function for platforms that don't have it. + Copyright (C) 2008-2016 Free Software Foundation, Inc. Written by Bruno Haible , 2008. This program is free software: you can redistribute it and/or modify @@ -13,20 +13,18 @@ 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 . */ + along with this program. If not, see . */ #include /* Specification. */ #include -#if defined _WIN32 && ! defined __CYGWIN__ +#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # include -# if HAVE_MSVC_INVALID_PARAMETER_HANDLER -# include "msvc-inval.h" -# endif +# include "msvc-inval.h" # if HAVE_MSVC_INVALID_PARAMETER_HANDLER static int @@ -46,8 +44,7 @@ _setmaxstdio_nothrow (int newmax) return result; } -# else -# define _setmaxstdio_nothrow _setmaxstdio +# define _setmaxstdio _setmaxstdio_nothrow # endif /* Cache for the previous getdtablesize () result. Safe to cache because @@ -79,9 +76,9 @@ getdtablesize (void) freed when we call _setmaxstdio with the original value. */ int orig_max_stdio = _getmaxstdio (); unsigned int bound; - for (bound = 0x10000; _setmaxstdio_nothrow (bound) < 0; bound = bound / 2) + for (bound = 0x10000; _setmaxstdio (bound) < 0; bound = bound / 2) ; - _setmaxstdio_nothrow (orig_max_stdio); + _setmaxstdio (orig_max_stdio); dtablesize = bound; } return dtablesize; diff --git a/gdb/gnulib/import/getlogin_r.c b/gdb/gnulib/import/getlogin_r.c index 0fa10377560..2bafb55fb14 100644 --- a/gdb/gnulib/import/getlogin_r.c +++ b/gdb/gnulib/import/getlogin_r.c @@ -1,6 +1,6 @@ /* Provide a working getlogin_r for systems which lack it. - Copyright (C) 2005-2007, 2010-2018 Free Software Foundation, Inc. + Copyright (C) 2005-2007, 2010-2016 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program; if not, see . */ /* Written by Paul Eggert, Derek Price, and Bruno Haible. */ @@ -25,9 +25,7 @@ #include #include -#include "malloca.h" - -#if defined _WIN32 && ! defined __CYGWIN__ +#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # define WIN32_LEAN_AND_MEAN # include #else @@ -41,7 +39,7 @@ int getlogin_r (char *name, size_t size) { #undef getlogin_r -#if defined _WIN32 && ! defined __CYGWIN__ +#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* Native Windows platform. */ DWORD sz; @@ -65,27 +63,9 @@ getlogin_r (char *name, size_t size) /* Platform with a getlogin_r() function. */ int ret = getlogin_r (name, size); - if (ret == 0) - { - const char *nul = memchr (name, '\0', size); - if (nul == NULL) - /* name contains a truncated result. */ - return ERANGE; - if (size > 0 && nul == name + size - 1) - { - /* strlen(name) == size-1. Determine whether the untruncated result - would have had length size-1 or size. */ - char *room = (char *) malloca (size + 1); - if (room == NULL) - return ENOMEM; - ret = getlogin_r (room, size + 1); - /* The untruncated result should be the same as in the first call. */ - if (ret == 0 && memcmp (name, room, size) != 0) - /* The untruncated result would have been different. */ - ret = ERANGE; - freea (room); - } - } + if (ret == 0 && memchr (name, '\0', size) == NULL) + /* name contains a truncated result. */ + return ERANGE; return ret; #else /* Platform with a getlogin() function. */ diff --git a/gdb/gnulib/import/getprogname.c b/gdb/gnulib/import/getprogname.c index c824b47c967..a7246e9ef2e 100644 --- a/gdb/gnulib/import/getprogname.c +++ b/gdb/gnulib/import/getprogname.c @@ -1,5 +1,5 @@ /* Program name management. - Copyright (C) 2016-2018 Free Software Foundation, Inc. + Copyright (C) 2016 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #include @@ -43,14 +43,6 @@ # include #endif -#ifdef __sgi -# include -# include -# include -# include -# include -#endif - #include "dirname.h" #ifndef HAVE_GETPROGNAME /* not Mac OS X, FreeBSD, NetBSD, OpenBSD >= 5.4, Cygwin */ @@ -64,7 +56,7 @@ getprogname (void) /* https://www.gnu.org/software/libc/manual/html_node/Error-Messages.html */ return last_component (program_invocation_name); # elif HAVE_GETEXECNAME /* Solaris */ - /* https://docs.oracle.com/cd/E19253-01/816-5168/6mbb3hrb1/index.html */ + /* http://docs.oracle.com/cd/E19253-01/816-5168/6mbb3hrb1/index.html */ const char *p = getexecname (); if (!p) p = "?"; @@ -74,7 +66,7 @@ getprogname (void) const char *p = __argv && __argv[0] ? __argv[0] : "?"; return last_component (p); # elif HAVE_VAR___PROGNAME /* OpenBSD, QNX */ - /* https://man.openbsd.org/style.9 */ + /* http://man.openbsd.org/style.9 */ /* http://www.qnx.de/developers/docs/6.5.0/index.jsp?topic=%2Fcom.qnx.doc.neutrino_lib_ref%2Fp%2F__progname.html */ /* Be careful to declare this only when we absolutely need it (OpenBSD 5.1), rather than when it's available. Otherwise, @@ -85,8 +77,9 @@ getprogname (void) return p && p[0] ? p : "?"; # elif _AIX /* AIX */ /* Idea by Bastien ROUCARIÈS, - https://lists.gnu.org/r/bug-gnulib/2010-12/msg00095.html - Reference: https://www.ibm.com/support/knowledgecenter/en/ssw_aix_61/com.ibm.aix.basetrf1/getprocs.htm + http://lists.gnu.org/archive/html/bug-gnulib/2010-12/msg00095.html + Reference: http:// + ibm.biz/knowctr#ssw_aix_53/com.ibm.aix.basetechref/doc/basetrf1/getprocs.htm */ static char *p; static int first = 1; @@ -150,42 +143,9 @@ getprogname (void) free (buf.ps_pathptr); } return p; -# elif defined __sgi /* IRIX */ - char filename[50]; - int fd; - - sprintf (filename, "/proc/pinfo/%d", (int) getpid ()); - fd = open (filename, O_RDONLY); - if (0 <= fd) - { - prpsinfo_t buf; - int ioctl_ok = 0 <= ioctl (fd, PIOCPSINFO, &buf); - close (fd); - if (ioctl_ok) - { - char *name = buf.pr_fname; - size_t namesize = sizeof buf.pr_fname; - char *namenul = memchr (name, '\0', namesize); - size_t namelen = namenul ? namenul - name : namesize; - char *namecopy = malloc (namelen + 1); - if (namecopy) - { - namecopy[namelen] = 0; - return memcpy (namecopy, name, namelen); - } - } - } - return NULL; # else # error "getprogname module not ported to this OS" # endif } #endif - -/* - * Hey Emacs! - * Local Variables: - * coding: utf-8 - * End: - */ diff --git a/gdb/gnulib/import/getprogname.h b/gdb/gnulib/import/getprogname.h index ee6688fc2ae..e8f9e978b16 100644 --- a/gdb/gnulib/import/getprogname.h +++ b/gdb/gnulib/import/getprogname.h @@ -1,5 +1,5 @@ /* Program name management. - Copyright (C) 2016-2018 Free Software Foundation, Inc. + Copyright (C) 2016 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #ifndef _GL_GETPROGNAME_H #define _GL_GETPROGNAME_H diff --git a/gdb/gnulib/import/gettext.h b/gdb/gnulib/import/gettext.h index f2d7458f4a8..9a232cc3a86 100644 --- a/gdb/gnulib/import/gettext.h +++ b/gdb/gnulib/import/gettext.h @@ -1,5 +1,5 @@ /* Convenience header for conditional use of GNU . - Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2018 Free Software + Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2016 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify @@ -13,14 +13,13 @@ 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 . */ + with this program; if not, see . */ #ifndef _LIBGETTEXT_H #define _LIBGETTEXT_H 1 -/* NLS can be disabled through the configure --disable-nls option - or through "#define ENABLE NLS 0" before including this file. */ -#if defined ENABLE_NLS && ENABLE_NLS +/* NLS can be disabled through the configure --disable-nls option. */ +#if ENABLE_NLS /* Get declarations of GNU message catalog functions. */ # include @@ -185,8 +184,7 @@ npgettext_aux (const char *domain, #include #if (((__GNUC__ >= 3 || __GNUG__ >= 2) && !defined __STRICT_ANSI__) \ - /* || __STDC_VERSION__ == 199901L - || (__STDC_VERSION__ >= 201112L && !defined __STDC_NO_VLA__) */ ) + /* || __STDC_VERSION__ >= 199901L */ ) # define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 1 #else # define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 0 diff --git a/gdb/gnulib/import/gettimeofday.c b/gdb/gnulib/import/gettimeofday.c index 1bd50fa3d36..224ca6a1762 100644 --- a/gdb/gnulib/import/gettimeofday.c +++ b/gdb/gnulib/import/gettimeofday.c @@ -1,6 +1,6 @@ /* Provide gettimeofday for systems that don't have it or for which it's broken. - Copyright (C) 2001-2003, 2005-2007, 2009-2018 Free Software Foundation, Inc. + Copyright (C) 2001-2003, 2005-2007, 2009-2016 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program; if not, see . */ /* written by Jim Meyering */ @@ -24,99 +24,93 @@ #include -#if defined _WIN32 && ! defined __CYGWIN__ -# define WINDOWS_NATIVE -# include +#if HAVE_SYS_TIMEB_H +# include #endif -#include "localtime-buffer.h" +#if GETTIMEOFDAY_CLOBBERS_LOCALTIME || TZSET_CLOBBERS_LOCALTIME -#ifdef WINDOWS_NATIVE +/* 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; -/* Avoid warnings from gcc -Wcast-function-type. */ -# define GetProcAddress \ - (void *) GetProcAddress +# undef localtime +extern struct tm *localtime (time_t const *); -/* GetSystemTimePreciseAsFileTime was introduced only in Windows 8. */ -typedef void (WINAPI * GetSystemTimePreciseAsFileTimeFuncType) (FILETIME *lpTime); -static GetSystemTimePreciseAsFileTimeFuncType GetSystemTimePreciseAsFileTimeFunc = NULL; -static BOOL initialized = FALSE; +# undef gmtime +extern struct tm *gmtime (time_t const *); -static void -initialize (void) +/* 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) { - HMODULE kernel32 = LoadLibrary ("kernel32.dll"); - if (kernel32 != NULL) - { - GetSystemTimePreciseAsFileTimeFunc = - (GetSystemTimePreciseAsFileTimeFuncType) GetProcAddress (kernel32, "GetSystemTimePreciseAsFileTime"); - } - initialized = TRUE; + 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. - 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. */ + causes problems. */ int gettimeofday (struct timeval *restrict tv, void *restrict tz) { #undef gettimeofday -#ifdef WINDOWS_NATIVE - - /* On native Windows, there are two ways to get the current time: - GetSystemTimeAsFileTime - - or - GetSystemTimePreciseAsFileTime - . - GetSystemTimeAsFileTime produces values that jump by increments of - 15.627 milliseconds (!) on average. - Whereas GetSystemTimePreciseAsFileTime values usually jump by 1 or 2 - microseconds. - More discussion on this topic: - . */ - FILETIME current_time; - - if (!initialized) - initialize (); - if (GetSystemTimePreciseAsFileTimeFunc != NULL) - GetSystemTimePreciseAsFileTimeFunc (¤t_time); - else - GetSystemTimeAsFileTime (¤t_time); - - /* Convert from FILETIME to 'struct timeval'. */ - /* FILETIME: */ - ULONGLONG since_1601 = - ((ULONGLONG) current_time.dwHighDateTime << 32) - | (ULONGLONG) current_time.dwLowDateTime; - /* Between 1601-01-01 and 1970-01-01 there were 280 normal years and 89 leap - years, in total 134774 days. */ - ULONGLONG since_1970 = - since_1601 - (ULONGLONG) 134774 * (ULONGLONG) 86400 * (ULONGLONG) 10000000; - ULONGLONG microseconds_since_1970 = since_1970 / (ULONGLONG) 10; - tv->tv_sec = microseconds_since_1970 / (ULONGLONG) 1000000; - tv->tv_usec = microseconds_since_1970 % (ULONGLONG) 1000000; - - return 0; - -#else - -# if HAVE_GETTIMEOFDAY -# if GETTIMEOFDAY_CLOBBERS_LOCALTIME +#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 +# endif -# if defined timeval /* 'struct timeval' overridden by gnulib? */ -# undef timeval +# if defined timeval /* 'struct timeval' overridden by gnulib? */ +# undef timeval struct timeval otv; int result = gettimeofday (&otv, (struct timezone *) tz); if (result == 0) @@ -124,16 +118,25 @@ gettimeofday (struct timeval *restrict tv, void *restrict tz) tv->tv_sec = otv.tv_sec; tv->tv_usec = otv.tv_usec; } -# else +# else int result = gettimeofday (tv, (struct timezone *) tz); -# endif +# endif -# if GETTIMEOFDAY_CLOBBERS_LOCALTIME +# if GETTIMEOFDAY_CLOBBERS_LOCALTIME *localtime_buffer_addr = save; -# endif +# 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 @@ -143,8 +146,9 @@ gettimeofday (struct timeval *restrict tv, void *restrict tz) tv->tv_sec = time (NULL); tv->tv_usec = 0; +# endif + return 0; -# endif #endif } diff --git a/gdb/gnulib/import/glob-libc.h b/gdb/gnulib/import/glob-libc.h index 564ef1728a9..6256077f702 100644 --- a/gdb/gnulib/import/glob-libc.h +++ b/gdb/gnulib/import/glob-libc.h @@ -1,19 +1,19 @@ -/* Copyright (C) 1991-2018 Free Software Foundation, Inc. +/* Copyright (C) 1991-1992, 1995-1998, 2000-2001, 2004-2007, 2009-2016 Free + Software Foundation, Inc. This file is part of the GNU C Library. - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public - License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. - The GNU C Library is distributed in the hope that it will be useful, + 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. + 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 the GNU C Library; if not, see - . */ + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ #ifndef _GLOB_H #define _GLOB_H 1 @@ -22,10 +22,42 @@ # include #endif +/* GCC 2.95 and later have "__restrict"; C99 compilers have + "restrict", and "configure" may have defined "restrict". + Other compilers use __restrict, __restrict__, and _Restrict, and + 'configure' might #define 'restrict' to those words, so pick a + different name. */ +#ifndef _Restrict_ +# if 199901L <= __STDC_VERSION__ +# define _Restrict_ restrict +# elif 2 < __GNUC__ || (2 == __GNUC__ && 95 <= __GNUC_MINOR__) +# define _Restrict_ __restrict +# else +# define _Restrict_ +# endif +#endif + __BEGIN_DECLS -#define __need_size_t -#include +/* We need 'size_t' for the following definitions. */ +#ifndef __size_t +# if defined __GNUC__ && __GNUC__ >= 2 +typedef __SIZE_TYPE__ __size_t; +# ifdef __USE_XOPEN +typedef __SIZE_TYPE__ size_t; +# endif +# else +# include +# ifndef __size_t +# define __size_t size_t +# endif +# endif +#else +/* The GNU CC stddef.h version defines __size_t as empty. We need a real + definition. */ +# undef __size_t +# define __size_t size_t +#endif /* Bits set in the FLAGS argument to 'glob'. */ #define GLOB_ERR (1 << 0)/* Return on read errors. */ @@ -37,7 +69,7 @@ __BEGIN_DECLS #define GLOB_NOESCAPE (1 << 6)/* Backslashes don't quote metacharacters. */ #define GLOB_PERIOD (1 << 7)/* Leading '.' can be matched by metachars. */ -#if !defined __USE_POSIX2 || defined __USE_MISC +#if !defined __USE_POSIX2 || defined __USE_BSD || defined __USE_GNU # define GLOB_MAGCHAR (1 << 8)/* Set in gl_flags if any metachars seen. */ # define GLOB_ALTDIRFUNC (1 << 9)/* Use gl_opendir et al functions. */ # define GLOB_BRACE (1 << 10)/* Expand "{a,b}" to "a" "b". */ @@ -73,9 +105,9 @@ struct stat; #endif typedef struct { - size_t gl_pathc; /* Count of paths matched by the pattern. */ + __size_t gl_pathc; /* Count of paths matched by the pattern. */ char **gl_pathv; /* List of matched pathnames. */ - size_t gl_offs; /* Slots to reserve in 'gl_pathv'. */ + __size_t gl_offs; /* Slots to reserve in 'gl_pathv'. */ int gl_flags; /* Set to FLAGS, maybe | GLOB_MAGCHAR. */ /* If the GLOB_ALTDIRFUNC flag is set, the following functions @@ -88,23 +120,23 @@ typedef struct #endif void *(*gl_opendir) (const char *); #ifdef __USE_GNU - int (*gl_lstat) (const char *__restrict, struct stat *__restrict); - int (*gl_stat) (const char *__restrict, struct stat *__restrict); + int (*gl_lstat) (const char *_Restrict_, struct stat *_Restrict_); + int (*gl_stat) (const char *_Restrict_, struct stat *_Restrict_); #else - int (*gl_lstat) (const char *__restrict, void *__restrict); - int (*gl_stat) (const char *__restrict, void *__restrict); + int (*gl_lstat) (const char *_Restrict_, void *_Restrict_); + int (*gl_stat) (const char *_Restrict_, void *_Restrict_); #endif } glob_t; -#ifdef __USE_LARGEFILE64 +#if defined __USE_LARGEFILE64 && !defined __GLOB_GNULIB # ifdef __USE_GNU struct stat64; # endif typedef struct { - size_t gl_pathc; + __size_t gl_pathc; char **gl_pathv; - size_t gl_offs; + __size_t gl_offs; int gl_flags; /* If the GLOB_ALTDIRFUNC flag is set, the following functions @@ -117,15 +149,20 @@ typedef struct # endif void *(*gl_opendir) (const char *); # ifdef __USE_GNU - int (*gl_lstat) (const char *__restrict, struct stat64 *__restrict); - int (*gl_stat) (const char *__restrict, struct stat64 *__restrict); + int (*gl_lstat) (const char *_Restrict_, struct stat64 *_Restrict_); + int (*gl_stat) (const char *_Restrict_, struct stat64 *_Restrict_); # else - int (*gl_lstat) (const char *__restrict, void *__restrict); - int (*gl_stat) (const char *__restrict, void *__restrict); + int (*gl_lstat) (const char *_Restrict_, void *_Restrict_); + int (*gl_stat) (const char *_Restrict_, void *_Restrict_); # endif } glob64_t; #endif +#if __USE_FILE_OFFSET64 && __GNUC__ < 2 && !defined __GLOB_GNULIB +# define glob glob64 +# define globfree globfree64 +#endif + /* Do glob searching for PATTERN, placing results in PGLOB. The bits defined above may be set in FLAGS. If a directory cannot be opened or read and ERRFUNC is not nil, @@ -134,28 +171,29 @@ typedef struct 'glob' returns GLOB_ABEND; if it returns zero, the error is ignored. If memory cannot be allocated for PGLOB, GLOB_NOSPACE is returned. Otherwise, 'glob' returns zero. */ -#if !defined __USE_FILE_OFFSET64 || defined __GLOB_GNULIB -extern int glob (const char *__restrict __pattern, int __flags, +#if !defined __USE_FILE_OFFSET64 || __GNUC__ < 2 || defined __GLOB_GNULIB +extern int glob (const char *_Restrict_ __pattern, int __flags, int (*__errfunc) (const char *, int), - glob_t *__restrict __pglob) __THROW; + glob_t *_Restrict_ __pglob) __THROW _GL_ARG_NONNULL ((1, 4)); /* Free storage allocated in PGLOB by a previous 'glob' call. */ -extern void globfree (glob_t *__pglob) __THROW; +extern void globfree (glob_t *__pglob) __THROW _GL_ARG_NONNULL ((1)); #else -extern int __REDIRECT_NTH (glob, (const char *__restrict __pattern, +extern int __REDIRECT_NTH (glob, (const char *_Restrict_ __pattern, int __flags, int (*__errfunc) (const char *, int), - glob_t *__restrict __pglob), glob64); + glob_t *_Restrict_ __pglob), glob64); extern void __REDIRECT_NTH (globfree, (glob_t *__pglob), globfree64); #endif -#ifdef __USE_LARGEFILE64 -extern int glob64 (const char *__restrict __pattern, int __flags, +#if defined __USE_LARGEFILE64 && !defined __GLOB_GNULIB +extern int glob64 (const char *_Restrict_ __pattern, int __flags, int (*__errfunc) (const char *, int), - glob64_t *__restrict __pglob) __THROW; + glob64_t *_Restrict_ __pglob) + __THROW _GL_ARG_NONNULL ((1, 4)); -extern void globfree64 (glob64_t *__pglob) __THROW; +extern void globfree64 (glob64_t *__pglob) __THROW _GL_ARG_NONNULL ((1)); #endif @@ -165,7 +203,8 @@ extern void globfree64 (glob64_t *__pglob) __THROW; This function is not part of the interface specified by POSIX.2 but several programs want to use it. */ -extern int glob_pattern_p (const char *__pattern, int __quote) __THROW; +extern int glob_pattern_p (const char *__pattern, int __quote) + __THROW _GL_ARG_NONNULL ((1)); #endif __END_DECLS diff --git a/gdb/gnulib/import/glob.c b/gdb/gnulib/import/glob.c index 280bd9f4e7f..4b04b902e51 100644 --- a/gdb/gnulib/import/glob.c +++ b/gdb/gnulib/import/glob.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-2018 Free Software Foundation, Inc. +/* Copyright (C) 1991-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -13,16 +13,13 @@ You should have received a copy of the GNU General Public License along with the GNU C Library; if not, see - . */ + . */ #ifndef _LIBC - /* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc - optimizes away the pattern == NULL test below. */ + optimizes away the pattern == NULL || pglob == NULL tests below. */ # define _GL_ARG_NONNULL(params) - # include - #endif #include @@ -33,10 +30,21 @@ #include #include #include + +/* Outcomment the following line for production quality code. */ +/* #define NDEBUG 1 */ #include + +#include /* Needed on stupid SunOS for assert. */ + +#ifndef GLOB_ONLY_P + #include +#if !defined POSIX && defined _POSIX_VERSION +# define POSIX +#endif -#if defined _WIN32 && ! defined __CYGWIN__ +#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # define WINDOWS32 #endif @@ -45,6 +53,10 @@ #endif #include +#ifndef __set_errno +# define __set_errno(val) errno = (val) +#endif + #include #include #include @@ -58,18 +70,13 @@ # define opendir(name) __opendir (name) # define readdir(str) __readdir64 (str) # define getpwnam_r(name, bufp, buf, len, res) \ - __getpwnam_r (name, bufp, buf, len, res) -# ifndef __lstat64 -# define __lstat64(fname, buf) __lxstat64 (_STAT_VER, fname, buf) -# endif + __getpwnam_r (name, bufp, buf, len, res) # ifndef __stat64 # define __stat64(fname, buf) __xstat64 (_STAT_VER, fname, buf) # endif # define struct_stat64 struct stat64 -# define FLEXIBLE_ARRAY_MEMBER #else /* !_LIBC */ # define __getlogin_r(buf, len) getlogin_r (buf, len) -# define __lstat64(fname, buf) lstat (fname, buf) # define __stat64(fname, buf) stat (fname, buf) # define __fxstatat64(_, d, f, st, flag) fstatat (d, f, st, flag) # define struct_stat64 struct stat @@ -77,63 +84,94 @@ # define __alloca alloca # endif # define __readdir readdir +# define __glob_pattern_p glob_pattern_p # define COMPILE_GLOB64 #endif /* _LIBC */ #include -#include -#include -#include - -static const char *next_brace_sub (const char *begin, int flags) __THROWNL; +#include "flexmember.h" -/* The type of ((struct dirent *) 0)->d_type is 'unsigned char' on most - platforms, but 'unsigned int' in the mingw from mingw.org. */ -typedef uint_fast32_t dirent_type; - -#if !defined _LIBC && !defined HAVE_STRUCT_DIRENT_D_TYPE -/* Any distinct values will do here. - Undef any existing macros out of the way. */ -# undef DT_UNKNOWN -# undef DT_DIR -# undef DT_LNK -# define DT_UNKNOWN 0 -# define DT_DIR 1 -# define DT_LNK 2 +#ifdef _SC_GETPW_R_SIZE_MAX +# define GETPW_R_SIZE_MAX() sysconf (_SC_GETPW_R_SIZE_MAX) +#else +# define GETPW_R_SIZE_MAX() (-1) #endif +#ifdef _SC_LOGIN_NAME_MAX +# define GET_LOGIN_NAME_MAX() sysconf (_SC_LOGIN_NAME_MAX) +#else +# define GET_LOGIN_NAME_MAX() (-1) +#endif + +static const char *next_brace_sub (const char *begin, int flags) __THROWNL; /* A representation of a directory entry which does not depend on the layout of struct dirent, or the size of ino_t. */ struct readdir_result { const char *name; -#if defined _DIRENT_HAVE_D_TYPE || defined HAVE_STRUCT_DIRENT_D_TYPE - dirent_type type; -#endif +# if defined _DIRENT_HAVE_D_TYPE || defined HAVE_STRUCT_DIRENT_D_TYPE + uint8_t type; +# endif + bool skip_entry; }; -/* Initialize and return type member of struct readdir_result. */ -static dirent_type -readdir_result_type (struct readdir_result d) +# if defined _DIRENT_HAVE_D_TYPE || defined HAVE_STRUCT_DIRENT_D_TYPE +/* Initializer based on the d_type member of struct dirent. */ +# define D_TYPE_TO_RESULT(source) (source)->d_type, + +/* True if the directory entry D might be a symbolic link. */ +static bool +readdir_result_might_be_symlink (struct readdir_result d) { -#if defined _DIRENT_HAVE_D_TYPE || defined HAVE_STRUCT_DIRENT_D_TYPE -# define D_TYPE_TO_RESULT(source) (source)->d_type, - return d.type; -#else -# define D_TYPE_TO_RESULT(source) - return DT_UNKNOWN; -#endif + return d.type == DT_UNKNOWN || d.type == DT_LNK; } +/* True if the directory entry D might be a directory. */ +static bool +readdir_result_might_be_dir (struct readdir_result d) +{ + return d.type == DT_DIR || readdir_result_might_be_symlink (d); +} +# else /* defined _DIRENT_HAVE_D_TYPE || defined HAVE_STRUCT_DIRENT_D_TYPE */ +# define D_TYPE_TO_RESULT(source) + +/* If we do not have type information, symbolic links and directories + are always a possibility. */ + +static bool +readdir_result_might_be_symlink (struct readdir_result d) +{ + return true; +} + +static bool +readdir_result_might_be_dir (struct readdir_result d) +{ + return true; +} + +# endif /* defined _DIRENT_HAVE_D_TYPE || defined HAVE_STRUCT_DIRENT_D_TYPE */ + +# if (defined POSIX || defined WINDOWS32) && !defined __GNU_LIBRARY__ +/* Initializer for skip_entry. POSIX does not require that the d_ino + field be present, and some systems do not provide it. */ +# define D_INO_TO_RESULT(source) false, +# else +# define D_INO_TO_RESULT(source) (source)->d_ino == 0, +# endif + /* Construct an initializer for a struct readdir_result object from a struct dirent *. No copy of the name is made. */ #define READDIR_RESULT_INITIALIZER(source) \ { \ source->d_name, \ D_TYPE_TO_RESULT (source) \ + D_INO_TO_RESULT (source) \ } +#endif /* !defined GLOB_ONLY_P */ + /* Call gl_readdir on STREAM. This macro can be overridden to reduce type safety if an old interface version needs to be supported. */ #ifndef GL_READDIR @@ -171,6 +209,27 @@ convert_dirent64 (const struct dirent64 *source) } #endif + +#ifndef attribute_hidden +# define attribute_hidden +#endif + +#ifndef __attribute_noinline__ +# if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 1) +# define __attribute_noinline__ /* Ignore */ +#else +# define __attribute_noinline__ __attribute__ ((__noinline__)) +# endif +#endif + +#if ! defined __builtin_expect && __GNUC__ < 3 +# define __builtin_expect(expr, expected) (expr) +#endif + +#ifndef __glibc_unlikely +# define __glibc_unlikely(expr) __builtin_expect (expr, 0) +#endif + #ifndef _LIBC /* The results of opendir() in this file are not used with dirfd and fchdir, and we do not leak fds to any single-threaded code that could use stdio, @@ -191,14 +250,18 @@ convert_dirent64 (const struct dirent64 *source) ((void) (buf), (void) (len), (void) (newlen), (void) (avar), (void *) 0) #endif +#ifndef __has_builtin +# define __has_builtin(x) 0 +#endif + /* Set *R = A + B. Return true if the answer is mathematically incorrect due to overflow; in this case, *R is the low order - bits of the correct answer. */ + bits of the correct answer.. */ static bool size_add_wrapv (size_t a, size_t b, size_t *r) { -#if 5 <= __GNUC__ && !defined __ICC +#if 5 <= __GNUC__ || __has_builtin (__builtin_add_overflow) return __builtin_add_overflow (a, b, r); #else *r = a + b; @@ -217,22 +280,14 @@ glob_use_alloca (size_t alloca_used, size_t len) static int glob_in_dir (const char *pattern, const char *directory, int flags, int (*errfunc) (const char *, int), glob_t *pglob, size_t alloca_used); +extern int __glob_pattern_type (const char *pattern, int quote) + attribute_hidden; + +#ifndef GLOB_ONLY_P static int prefix_array (const char *prefix, char **array, size_t n) __THROWNL; static int collated_compare (const void *, const void *) __THROWNL; -/* Return true if FILENAME is a directory or a symbolic link to a directory. - Use FLAGS and PGLOB to resolve the filename. */ -static bool -is_dir (char const *filename, int flags, glob_t const *pglob) -{ - struct stat st; - struct_stat64 st64; - return (__glibc_unlikely (flags & GLOB_ALTDIRFUNC) - ? pglob->gl_stat (filename, &st) == 0 && S_ISDIR (st.st_mode) - : __stat64 (filename, &st64) == 0 && S_ISDIR (st64.st_mode)); -} - /* Find the end of the sub-pattern in a brace expression. */ static const char * next_brace_sub (const char *cp, int flags) @@ -257,6 +312,7 @@ next_brace_sub (const char *cp, int flags) return *cp != '\0' ? cp : NULL; } +#endif /* !defined GLOB_ONLY_P */ /* Do glob searching for PATTERN, placing results in PGLOB. The bits defined above may be set in FLAGS. @@ -301,28 +357,6 @@ glob (const char *pattern, int flags, int (*errfunc) (const char *, int), also makes all the code that uses gl_offs simpler. */ pglob->gl_offs = 0; - if (!(flags & GLOB_APPEND)) - { - pglob->gl_pathc = 0; - if (!(flags & GLOB_DOOFFS)) - pglob->gl_pathv = NULL; - else - { - size_t i; - - if (pglob->gl_offs >= ~((size_t) 0) / sizeof (char *)) - return GLOB_NOSPACE; - - pglob->gl_pathv = (char **) malloc ((pglob->gl_offs + 1) - * sizeof (char *)); - if (pglob->gl_pathv == NULL) - return GLOB_NOSPACE; - - for (i = 0; i <= pglob->gl_offs; ++i) - pglob->gl_pathv[i] = NULL; - } - } - if (flags & GLOB_BRACE) { const char *begin; @@ -352,7 +386,7 @@ glob (const char *pattern, int flags, int (*errfunc) (const char *, int), if (begin != NULL) { /* Allocate working buffer large enough for our work. Note that - we have at least an opening and closing brace. */ + we have at least an opening and closing brace. */ size_t firstc; char *alt_start; const char *p; @@ -368,7 +402,14 @@ glob (const char *pattern, int flags, int (*errfunc) (const char *, int), { onealt = malloc (pattern_len); if (onealt == NULL) - return GLOB_NOSPACE; + { + if (!(flags & GLOB_APPEND)) + { + pglob->gl_pathc = 0; + pglob->gl_pathv = NULL; + } + return GLOB_NOSPACE; + } } /* We know the prefix for all sub-patterns. */ @@ -383,8 +424,7 @@ glob (const char *pattern, int flags, int (*errfunc) (const char *, int), illegal_brace: if (__glibc_unlikely (!alloca_onealt)) free (onealt); - flags &= ~GLOB_BRACE; - goto no_brace; + return glob (pattern, flags & ~GLOB_BRACE, errfunc, pglob); } /* Now find the end of the whole brace expression. */ @@ -405,6 +445,14 @@ glob (const char *pattern, int flags, int (*errfunc) (const char *, int), points past the final }. We will accumulate result names from recursive runs for each brace alternative in the buffer using GLOB_APPEND. */ + + if (!(flags & GLOB_APPEND)) + { + /* This call is to set a new vector, so clear out the + vector so we can append to it. */ + pglob->gl_pathc = 0; + pglob->gl_pathv = NULL; + } firstc = pglob->gl_pathc; p = begin + 1; @@ -452,12 +500,31 @@ glob (const char *pattern, int flags, int (*errfunc) (const char *, int), } } - no_brace: + if (!(flags & GLOB_APPEND)) + { + pglob->gl_pathc = 0; + if (!(flags & GLOB_DOOFFS)) + pglob->gl_pathv = NULL; + else + { + size_t i; + + if (pglob->gl_offs >= SIZE_MAX / sizeof (char *)) + return GLOB_NOSPACE; + + pglob->gl_pathv = malloc ((pglob->gl_offs + 1) * sizeof (char *)); + if (pglob->gl_pathv == NULL) + return GLOB_NOSPACE; + + for (i = 0; i <= pglob->gl_offs; ++i) + pglob->gl_pathv[i] = NULL; + } + } + oldcount = pglob->gl_pathc + pglob->gl_offs; /* Find the filename. */ filename = strrchr (pattern, '/'); - #if defined __MSDOS__ || defined WINDOWS32 /* The case of "d:pattern". Since ':' is not allowed in file names, we can safely assume that wherever it @@ -466,7 +533,6 @@ glob (const char *pattern, int flags, int (*errfunc) (const char *, int), if (filename == NULL) filename = strchr (pattern, ':'); #endif /* __MSDOS__ || WINDOWS32 */ - dirname_modified = 0; if (filename == NULL) { @@ -491,7 +557,11 @@ glob (const char *pattern, int flags, int (*errfunc) (const char *, int), } filename = pattern; +#ifdef _AMIGA + dirname = (char *) ""; +#else dirname = (char *) "."; +#endif dirlen = 0; } } @@ -508,7 +578,6 @@ glob (const char *pattern, int flags, int (*errfunc) (const char *, int), { char *newp; dirlen = filename - pattern; - #if defined __MSDOS__ || defined WINDOWS32 if (*filename == ':' || (filename > pattern + 1 && filename[-1] == ':')) @@ -527,7 +596,6 @@ glob (const char *pattern, int flags, int (*errfunc) (const char *, int), from "d:/", since "d:" and "d:/" are not the same.*/ } #endif - if (glob_use_alloca (alloca_used, dirlen + 1)) newp = alloca_account (dirlen + 1, alloca_used); else @@ -541,19 +609,17 @@ glob (const char *pattern, int flags, int (*errfunc) (const char *, int), dirname = newp; ++filename; + if (filename[0] == '\0' #if defined __MSDOS__ || defined WINDOWS32 - bool drive_root = (dirlen > 1 - && (dirname[dirlen - 1] == ':' - || (dirlen > 2 && dirname[dirlen - 2] == ':' - && dirname[dirlen - 1] == '/'))); -#else - bool drive_root = false; + && dirname[dirlen - 1] != ':' + && (dirlen < 3 || dirname[dirlen - 2] != ':' + || dirname[dirlen - 1] != '/') #endif - - if (filename[0] == '\0' && dirlen > 1 && !drive_root) + && dirlen > 1) /* "pattern/". Expand "pattern", appending slashes. */ { int orig_flags = flags; + int val; if (!(flags & GLOB_NOESCAPE) && dirname[dirlen - 1] == '\\') { /* "pattern\\/". Remove the final backslash if it hasn't @@ -567,7 +633,7 @@ glob (const char *pattern, int flags, int (*errfunc) (const char *, int), flags &= ~(GLOB_NOCHECK | GLOB_NOMAGIC); } } - int val = glob (dirname, flags | GLOB_MARK, errfunc, pglob); + val = glob (dirname, flags | GLOB_MARK, errfunc, pglob); if (val == 0) pglob->gl_flags = ((pglob->gl_flags & ~GLOB_MARK) | (flags & GLOB_MARK)); @@ -593,11 +659,15 @@ glob (const char *pattern, int flags, int (*errfunc) (const char *, int), /* Look up home directory. */ char *home_dir = getenv ("HOME"); int malloc_home_dir = 0; +# ifdef _AMIGA + if (home_dir == NULL || home_dir[0] == '\0') + home_dir = "SYS:"; +# else +# ifdef WINDOWS32 + /* Windows NT defines HOMEDRIVE and HOMEPATH. But give preference + to HOME, because the user can change HOME. */ if (home_dir == NULL || home_dir[0] == '\0') { -#ifdef WINDOWS32 - /* Windows NT defines HOMEDRIVE and HOMEPATH. But give - preference to HOME, because the user can change HOME. */ const char *home_drive = getenv ("HOMEDRIVE"); const char *home_path = getenv ("HOMEPATH"); @@ -613,65 +683,140 @@ glob (const char *pattern, int flags, int (*errfunc) (const char *, int), } else home_dir = "c:/users/default"; /* poor default */ -#else - int err; - struct passwd *p; - struct passwd pwbuf; - struct scratch_buffer s; - scratch_buffer_init (&s); - while (true) + } +# else + if (home_dir == NULL || home_dir[0] == '\0') + { + int success; + char *name; + int malloc_name = 0; + size_t buflen = GET_LOGIN_NAME_MAX () + 1; + + if (buflen == 0) + /* 'sysconf' does not support _SC_LOGIN_NAME_MAX. Try + a moderate value. */ + buflen = 20; + if (glob_use_alloca (alloca_used, buflen)) + name = alloca_account (buflen, alloca_used); + else { - p = NULL; - err = __getlogin_r (s.data, s.length); - if (err == 0) - { -# if defined HAVE_GETPWNAM_R || defined _LIBC - size_t ssize = strlen (s.data) + 1; - char *sdata = s.data; - err = getpwnam_r (sdata, &pwbuf, sdata + ssize, - s.length - ssize, &p); -# else - p = getpwnam (s.data); - if (p == NULL) - err = errno; -# endif - } - if (err != ERANGE) - break; - if (!scratch_buffer_grow (&s)) + name = malloc (buflen); + if (name == NULL) { retval = GLOB_NOSPACE; goto out; } + malloc_name = 1; } - if (err == 0) - { - home_dir = strdup (p->pw_dir); - malloc_home_dir = 1; - } - scratch_buffer_free (&s); - if (err == 0 && home_dir == NULL) + + success = __getlogin_r (name, buflen) == 0; + if (success) { - retval = GLOB_NOSPACE; - goto out; + struct passwd *p; +# if defined HAVE_GETPWNAM_R || defined _LIBC + long int pwbuflenmax = GETPW_R_SIZE_MAX (); + size_t pwbuflen = pwbuflenmax; + char *pwtmpbuf; + struct passwd pwbuf; + char *malloc_pwtmpbuf = NULL; + int save = errno; + +# ifndef _LIBC + if (! (0 < pwbuflenmax && pwbuflenmax <= SIZE_MAX)) + /* Perhaps 'sysconf' does not support _SC_GETPW_R_SIZE_MAX. + Try a moderate value. */ + pwbuflen = 1024; +# endif + if (glob_use_alloca (alloca_used, pwbuflen)) + pwtmpbuf = alloca_account (pwbuflen, alloca_used); + else + { + pwtmpbuf = malloc (pwbuflen); + if (pwtmpbuf == NULL) + { + retval = GLOB_NOSPACE; + goto out; + } + malloc_pwtmpbuf = pwtmpbuf; + } + + while (getpwnam_r (name, &pwbuf, pwtmpbuf, pwbuflen, &p) + != 0) + { + size_t newlen; + bool v; + if (errno != ERANGE) + { + p = NULL; + break; + } + v = size_add_wrapv (pwbuflen, pwbuflen, &newlen); + if (!v && malloc_pwtmpbuf == NULL + && glob_use_alloca (alloca_used, newlen)) + pwtmpbuf = extend_alloca_account (pwtmpbuf, pwbuflen, + newlen, alloca_used); + else + { + char *newp = (v ? NULL + : realloc (malloc_pwtmpbuf, newlen)); + if (newp == NULL) + { + free (malloc_pwtmpbuf); + retval = GLOB_NOSPACE; + goto out; + } + malloc_pwtmpbuf = pwtmpbuf = newp; + } + pwbuflen = newlen; + __set_errno (save); + } +# else + p = getpwnam (name); +# endif + if (__glibc_unlikely (malloc_name)) + free (name); + if (p != NULL) + { + if (malloc_pwtmpbuf == NULL) + home_dir = p->pw_dir; + else + { + size_t home_dir_len = strlen (p->pw_dir) + 1; + if (glob_use_alloca (alloca_used, home_dir_len)) + home_dir = alloca_account (home_dir_len, + alloca_used); + else + { + home_dir = malloc (home_dir_len); + if (home_dir == NULL) + { + free (pwtmpbuf); + retval = GLOB_NOSPACE; + goto out; + } + malloc_home_dir = 1; + } + memcpy (home_dir, p->pw_dir, home_dir_len); + + free (pwtmpbuf); + } + } } -#endif /* WINDOWS32 */ } if (home_dir == NULL || home_dir[0] == '\0') { - if (__glibc_unlikely (malloc_home_dir)) - free (home_dir); if (flags & GLOB_TILDE_CHECK) { + if (__glibc_unlikely (malloc_home_dir)) + free (home_dir); retval = GLOB_NOMATCH; goto out; } else - { - home_dir = (char *) "~"; /* No luck. */ - malloc_home_dir = 0; - } + home_dir = (char *) "~"; /* No luck. */ } +# endif /* WINDOWS32 */ +# endif /* Now construct the full directory. */ if (dirname[1] == '\0') { @@ -710,15 +855,12 @@ glob (const char *pattern, int flags, int (*errfunc) (const char *, int), dirname = newp; dirlen += home_len - 1; malloc_dirname = !use_alloca; - - if (__glibc_unlikely (malloc_home_dir)) - free (home_dir); } dirname_modified = 1; } +# if !defined _AMIGA && !defined WINDOWS32 else { -#ifndef WINDOWS32 char *end_name = strchr (dirname, '/'); char *user_name; int malloc_user_name = 0; @@ -757,11 +899,11 @@ glob (const char *pattern, int flags, int (*errfunc) (const char *, int), char *p = mempcpy (newp, dirname + 1, unescape - dirname - 1); char *q = unescape; - while (q != end_name) + while (*q != '\0') { if (*q == '\\') { - if (q + 1 == end_name) + if (q[1] == '\0') { /* "~fo\\o\\" unescape to user_name "foo\\", but "~fo\\o\\/" unescape to user_name @@ -777,7 +919,7 @@ glob (const char *pattern, int flags, int (*errfunc) (const char *, int), *p = '\0'; } else - *((char *) mempcpy (newp, dirname + 1, end_name - dirname - 1)) + *((char *) mempcpy (newp, dirname + 1, end_name - dirname)) = '\0'; user_name = newp; } @@ -785,21 +927,61 @@ glob (const char *pattern, int flags, int (*errfunc) (const char *, int), /* Look up specific user's home directory. */ { struct passwd *p; - struct scratch_buffer pwtmpbuf; - scratch_buffer_init (&pwtmpbuf); - # if defined HAVE_GETPWNAM_R || defined _LIBC + long int buflenmax = GETPW_R_SIZE_MAX (); + size_t buflen = buflenmax; + char *pwtmpbuf; + char *malloc_pwtmpbuf = NULL; struct passwd pwbuf; - - while (getpwnam_r (user_name, &pwbuf, - pwtmpbuf.data, pwtmpbuf.length, &p) - == ERANGE) + int save = errno; + +# ifndef _LIBC + if (! (0 <= buflenmax && buflenmax <= SIZE_MAX)) + /* Perhaps 'sysconf' does not support _SC_GETPW_R_SIZE_MAX. Try a + moderate value. */ + buflen = 1024; +# endif + if (glob_use_alloca (alloca_used, buflen)) + pwtmpbuf = alloca_account (buflen, alloca_used); + else { - if (!scratch_buffer_grow (&pwtmpbuf)) + pwtmpbuf = malloc (buflen); + if (pwtmpbuf == NULL) { + nomem_getpw: + if (__glibc_unlikely (malloc_user_name)) + free (user_name); retval = GLOB_NOSPACE; goto out; } + malloc_pwtmpbuf = pwtmpbuf; + } + + while (getpwnam_r (user_name, &pwbuf, pwtmpbuf, buflen, &p) != 0) + { + size_t newlen; + bool v; + if (errno != ERANGE) + { + p = NULL; + break; + } + v = size_add_wrapv (buflen, buflen, &newlen); + if (!v && malloc_pwtmpbuf == NULL + && glob_use_alloca (alloca_used, newlen)) + pwtmpbuf = extend_alloca_account (pwtmpbuf, buflen, + newlen, alloca_used); + else + { + char *newp = v ? NULL : realloc (malloc_pwtmpbuf, newlen); + if (newp == NULL) + { + free (malloc_pwtmpbuf); + goto nomem_getpw; + } + malloc_pwtmpbuf = pwtmpbuf = newp; + } + __set_errno (save); } # else p = getpwnam (user_name); @@ -813,7 +995,6 @@ glob (const char *pattern, int flags, int (*errfunc) (const char *, int), { size_t home_len = strlen (p->pw_dir); size_t rest_len = end_name == NULL ? 0 : strlen (end_name); - char *d; if (__glibc_unlikely (malloc_dirname)) free (dirname); @@ -827,87 +1008,91 @@ glob (const char *pattern, int flags, int (*errfunc) (const char *, int), dirname = malloc (home_len + rest_len + 1); if (dirname == NULL) { - scratch_buffer_free (&pwtmpbuf); + free (malloc_pwtmpbuf); retval = GLOB_NOSPACE; goto out; } malloc_dirname = 1; } - d = mempcpy (dirname, p->pw_dir, home_len); - if (end_name != NULL) - d = mempcpy (d, end_name, rest_len); - *d = '\0'; + *((char *) mempcpy (mempcpy (dirname, p->pw_dir, home_len), + end_name, rest_len)) = '\0'; dirlen = home_len + rest_len; dirname_modified = 1; + + free (malloc_pwtmpbuf); } else { + free (malloc_pwtmpbuf); + if (flags & GLOB_TILDE_CHECK) - { - /* We have to regard it as an error if we cannot find the - home directory. */ - retval = GLOB_NOMATCH; - goto out; - } + /* We have to regard it as an error if we cannot find the + home directory. */ + return GLOB_NOMATCH; } - scratch_buffer_free (&pwtmpbuf); } -#endif /* !WINDOWS32 */ } +# endif /* Not Amiga && not WINDOWS32. */ } /* Now test whether we looked for "~" or "~NAME". In this case we can give the answer now. */ if (filename == NULL) { - size_t newcount = pglob->gl_pathc + pglob->gl_offs; - char **new_gl_pathv; - - if (newcount > SIZE_MAX / sizeof (char *) - 2) + struct stat st; + struct_stat64 st64; + + /* Return the directory if we don't check for error or if it exists. */ + if ((flags & GLOB_NOCHECK) + || (((__builtin_expect (flags & GLOB_ALTDIRFUNC, 0)) + ? ((*pglob->gl_stat) (dirname, &st) == 0 + && S_ISDIR (st.st_mode)) + : (__stat64 (dirname, &st64) == 0 && S_ISDIR (st64.st_mode))))) { - nospace: - free (pglob->gl_pathv); - pglob->gl_pathv = NULL; - pglob->gl_pathc = 0; - retval = GLOB_NOSPACE; - goto out; - } + size_t newcount = pglob->gl_pathc + pglob->gl_offs; + char **new_gl_pathv; - new_gl_pathv = realloc (pglob->gl_pathv, - (newcount + 2) * sizeof (char *)); - if (new_gl_pathv == NULL) - goto nospace; - pglob->gl_pathv = new_gl_pathv; + if (newcount > SIZE_MAX / sizeof (char *) - 2) + { + nospace: + free (pglob->gl_pathv); + pglob->gl_pathv = NULL; + pglob->gl_pathc = 0; + return GLOB_NOSPACE; + } - if (flags & GLOB_MARK && is_dir (dirname, flags, pglob)) - { - char *p; - pglob->gl_pathv[newcount] = malloc (dirlen + 2); - if (pglob->gl_pathv[newcount] == NULL) + new_gl_pathv = realloc (pglob->gl_pathv, + (newcount + 2) * sizeof (char *)); + if (new_gl_pathv == NULL) goto nospace; - p = mempcpy (pglob->gl_pathv[newcount], dirname, dirlen); - p[0] = '/'; - p[1] = '\0'; - if (__glibc_unlikely (malloc_dirname)) - free (dirname); - } - else - { - if (__glibc_unlikely (malloc_dirname)) - pglob->gl_pathv[newcount] = dirname; + pglob->gl_pathv = new_gl_pathv; + + if (flags & GLOB_MARK) + { + char *p; + pglob->gl_pathv[newcount] = malloc (dirlen + 2); + if (pglob->gl_pathv[newcount] == NULL) + goto nospace; + p = mempcpy (pglob->gl_pathv[newcount], dirname, dirlen); + p[0] = '/'; + p[1] = '\0'; + } else { pglob->gl_pathv[newcount] = strdup (dirname); if (pglob->gl_pathv[newcount] == NULL) goto nospace; } + pglob->gl_pathv[++newcount] = NULL; + ++pglob->gl_pathc; + pglob->gl_flags = flags; + + return 0; } - pglob->gl_pathv[++newcount] = NULL; - ++pglob->gl_pathc; - pglob->gl_flags = flags; - return 0; + /* Not found. */ + return GLOB_NOMATCH; } meta = __glob_pattern_type (dirname, !(flags & GLOB_NOESCAPE)); @@ -916,7 +1101,7 @@ glob (const char *pattern, int flags, int (*errfunc) (const char *, int), [ which we handle the same, using fnmatch. Broken unterminated pattern bracket expressions ought to be rare enough that it is not worth special casing them, fnmatch will do the right thing. */ - if (meta & (GLOBPAT_SPECIAL | GLOBPAT_BRACKET)) + if (meta & 5) { /* The directory name contains metacharacters, so we have to glob for the directory, and then glob for @@ -953,10 +1138,7 @@ glob (const char *pattern, int flags, int (*errfunc) (const char *, int), if (status != 0) { if ((flags & GLOB_NOCHECK) == 0 || status != GLOB_NOMATCH) - { - retval = status; - goto out; - } + return status; goto no_matches; } @@ -967,6 +1149,19 @@ glob (const char *pattern, int flags, int (*errfunc) (const char *, int), { size_t old_pathc; +#ifdef SHELL + { + /* Make globbing interruptible in the bash shell. */ + extern int interrupt_state; + + if (interrupt_state) + { + globfree (&dirs); + return GLOB_ABORTED; + } + } +#endif /* SHELL. */ + old_pathc = pglob->gl_pathc; status = glob_in_dir (filename, dirs.gl_pathv[i], ((flags | GLOB_APPEND) @@ -981,8 +1176,7 @@ glob (const char *pattern, int flags, int (*errfunc) (const char *, int), globfree (&dirs); globfree (pglob); pglob->gl_pathc = 0; - retval = status; - goto out; + return status; } /* Stick the directory on the front of each name. */ @@ -993,8 +1187,7 @@ glob (const char *pattern, int flags, int (*errfunc) (const char *, int), globfree (&dirs); globfree (pglob); pglob->gl_pathc = 0; - retval = GLOB_NOSPACE; - goto out; + return GLOB_NOSPACE; } } @@ -1016,8 +1209,7 @@ glob (const char *pattern, int flags, int (*errfunc) (const char *, int), { nospace2: globfree (&dirs); - retval = GLOB_NOSPACE; - goto out; + return GLOB_NOSPACE; } new_gl_pathv = realloc (pglob->gl_pathv, @@ -1032,8 +1224,7 @@ glob (const char *pattern, int flags, int (*errfunc) (const char *, int), globfree (&dirs); globfree (pglob); pglob->gl_pathc = 0; - retval = GLOB_NOSPACE; - goto out; + return GLOB_NOSPACE; } ++pglob->gl_pathc; @@ -1045,8 +1236,7 @@ glob (const char *pattern, int flags, int (*errfunc) (const char *, int), else { globfree (&dirs); - retval = GLOB_NOMATCH; - goto out; + return GLOB_NOMATCH; } } @@ -1057,7 +1247,7 @@ glob (const char *pattern, int flags, int (*errfunc) (const char *, int), size_t old_pathc = pglob->gl_pathc; int orig_flags = flags; - if (meta & GLOBPAT_BACKSLASH) + if (meta & 2) { char *p = strchr (dirname, '\\'), *q; /* We need to unescape the dirname string. It is certainly @@ -1092,8 +1282,7 @@ glob (const char *pattern, int flags, int (*errfunc) (const char *, int), flags = orig_flags; goto no_matches; } - retval = status; - goto out; + return status; } if (dirlen > 0) @@ -1105,8 +1294,7 @@ glob (const char *pattern, int flags, int (*errfunc) (const char *, int), { globfree (pglob); pglob->gl_pathc = 0; - retval = GLOB_NOSPACE; - goto out; + return GLOB_NOSPACE; } } } @@ -1115,9 +1303,15 @@ glob (const char *pattern, int flags, int (*errfunc) (const char *, int), { /* Append slashes to directory names. */ size_t i; + struct stat st; + struct_stat64 st64; for (i = oldcount; i < pglob->gl_pathc + pglob->gl_offs; ++i) - if (is_dir (pglob->gl_pathv[i], flags, pglob)) + if ((__builtin_expect (flags & GLOB_ALTDIRFUNC, 0) + ? ((*pglob->gl_stat) (pglob->gl_pathv[i], &st) == 0 + && S_ISDIR (st.st_mode)) + : (__stat64 (pglob->gl_pathv[i], &st64) == 0 + && S_ISDIR (st64.st_mode)))) { size_t len = strlen (pglob->gl_pathv[i]) + 2; char *new = realloc (pglob->gl_pathv[i], len); @@ -1125,8 +1319,7 @@ glob (const char *pattern, int flags, int (*errfunc) (const char *, int), { globfree (pglob); pglob->gl_pathc = 0; - retval = GLOB_NOSPACE; - goto out; + return GLOB_NOSPACE; } strcpy (&new[len - 2], "/"); pglob->gl_pathv[i] = new; @@ -1152,6 +1345,26 @@ libc_hidden_def (glob) #endif +#ifndef GLOB_ONLY_P + +/* Free storage allocated in PGLOB by a previous 'glob' call. */ +void +globfree (glob_t *pglob) +{ + if (pglob->gl_pathv != NULL) + { + size_t i; + for (i = 0; i < pglob->gl_pathc; ++i) + free (pglob->gl_pathv[pglob->gl_offs + i]); + free (pglob->gl_pathv); + pglob->gl_pathv = NULL; + } +} +#if defined _LIBC && !defined globfree +libc_hidden_def (globfree) +#endif + + /* Do a collated comparison of A and B. */ static int collated_compare (const void *a, const void *b) @@ -1178,15 +1391,19 @@ prefix_array (const char *dirname, char **array, size_t n) { size_t i; size_t dirlen = strlen (dirname); - char dirsep_char = '/'; +#if defined __MSDOS__ || defined WINDOWS32 + int sep_char = '/'; +# define DIRSEP_CHAR sep_char +#else +# define DIRSEP_CHAR '/' +#endif if (dirlen == 1 && dirname[0] == '/') /* DIRNAME is just "/", so normal prepending would get us "//foo". We want "/foo" instead, so don't prepend any chars from DIRNAME. */ dirlen = 0; - #if defined __MSDOS__ || defined WINDOWS32 - if (dirlen > 1) + else if (dirlen > 1) { if (dirname[dirlen - 1] == '/' && dirname[dirlen - 2] == ':') /* DIRNAME is "d:/". Don't prepend the slash from DIRNAME. */ @@ -1195,7 +1412,7 @@ prefix_array (const char *dirname, char **array, size_t n) { /* DIRNAME is "d:". Use ':' instead of '/'. */ --dirlen; - dirsep_char = ':'; + sep_char = ':'; } } #endif @@ -1213,7 +1430,7 @@ prefix_array (const char *dirname, char **array, size_t n) { char *endp = mempcpy (new, dirname, dirlen); - *endp++ = dirsep_char; + *endp++ = DIRSEP_CHAR; mempcpy (endp, array[i], eltlen); } free (array[i]); @@ -1223,6 +1440,107 @@ prefix_array (const char *dirname, char **array, size_t n) return 0; } + +/* We must not compile this function twice. */ +#ifndef NO_GLOB_PATTERN_P +int +__glob_pattern_type (const char *pattern, int quote) +{ + const char *p; + int ret = 0; + + for (p = pattern; *p != '\0'; ++p) + switch (*p) + { + case '?': + case '*': + return 1; + + case '\\': + if (quote) + { + if (p[1] != '\0') + ++p; + ret |= 2; + } + break; + + case '[': + ret |= 4; + break; + + case ']': + if (ret & 4) + return 1; + break; + } + + return ret; +} + +/* Return nonzero if PATTERN contains any metacharacters. + Metacharacters can be quoted with backslashes if QUOTE is nonzero. */ +int +__glob_pattern_p (const char *pattern, int quote) +{ + return __glob_pattern_type (pattern, quote) == 1; +} +# ifdef _LIBC +weak_alias (__glob_pattern_p, glob_pattern_p) +# endif +#endif + + +/* We put this in a separate function mainly to allow the memory + allocated with alloca to be recycled. */ +static int +__attribute_noinline__ +link_exists2_p (const char *dir, size_t dirlen, const char *fname, + glob_t *pglob +# if !defined _LIBC && !HAVE_FSTATAT + , int flags +# endif + ) +{ + size_t fnamelen = strlen (fname); + char *fullname = __alloca (dirlen + 1 + fnamelen + 1); + struct stat st; + + mempcpy (mempcpy (mempcpy (fullname, dir, dirlen), "/", 1), + fname, fnamelen + 1); + +# if !defined _LIBC && !HAVE_FSTATAT + if (__builtin_expect ((flags & GLOB_ALTDIRFUNC) == 0, 1)) + { + struct_stat64 st64; + return __stat64 (fullname, &st64) == 0; + } +# endif + return (*pglob->gl_stat) (fullname, &st) == 0; +} + +/* Return true if DIR/FNAME exists. */ +static int +link_exists_p (int dfd, const char *dir, size_t dirlen, const char *fname, + glob_t *pglob, int flags) +{ +# if defined _LIBC || HAVE_FSTATAT + if (__builtin_expect (flags & GLOB_ALTDIRFUNC, 0)) + return link_exists2_p (dir, dirlen, fname, pglob); + else + { + /* dfd cannot be -1 here, because dirfd never returns -1 on + glibc, or on hosts that have fstatat. */ + struct_stat64 st64; + return __fxstatat64 (_STAT_VER, dfd, fname, &st64, 0) == 0; + } +# else + return link_exists2_p (dir, dirlen, fname, pglob, flags); +# endif +} +#endif /* !defined GLOB_ONLY_P */ + + /* Like 'glob', but PATTERN is a final pathname component, and matches are searched for in DIRECTORY. The GLOB_NOSORT bit in FLAGS is ignored. No sorting is ever done. @@ -1234,36 +1552,38 @@ glob_in_dir (const char *pattern, const char *directory, int flags, { size_t dirlen = strlen (directory); void *stream = NULL; -# define GLOBNAMES_MEMBERS(nnames) \ - struct globnames *next; size_t count; char *name[nnames]; - struct globnames { GLOBNAMES_MEMBERS (FLEXIBLE_ARRAY_MEMBER) }; - struct { GLOBNAMES_MEMBERS (64) } init_names_buf; - struct globnames *init_names = (struct globnames *) &init_names_buf; - struct globnames *names = init_names; - struct globnames *names_alloca = init_names; + struct globnames + { + struct globnames *next; + size_t count; + char *name[64]; + }; + struct globnames init_names; + struct globnames *names = &init_names; + struct globnames *names_alloca = &init_names; size_t nfound = 0; size_t cur = 0; int meta; int save; int result; - alloca_used += sizeof init_names_buf; + alloca_used += sizeof (init_names); - init_names->next = NULL; - init_names->count = ((sizeof init_names_buf - - offsetof (struct globnames, name)) - / sizeof init_names->name[0]); + init_names.next = NULL; + init_names.count = sizeof init_names.name / sizeof init_names.name[0]; meta = __glob_pattern_type (pattern, !(flags & GLOB_NOESCAPE)); - if (meta == GLOBPAT_NONE && (flags & (GLOB_NOCHECK|GLOB_NOMAGIC))) + if (meta == 0 && (flags & (GLOB_NOCHECK|GLOB_NOMAGIC))) { /* We need not do any tests. The PATTERN contains no meta characters and we must not return an error therefore the result will always contain exactly one name. */ flags |= GLOB_NOCHECK; } - else if (meta == GLOBPAT_NONE) + else if (meta == 0) { + /* Since we use the normal file functions we can also use stat() + to verify the file is there. */ union { struct stat st; @@ -1287,11 +1607,9 @@ glob_in_dir (const char *pattern, const char *directory, int flags, mempcpy (mempcpy (mempcpy (fullname, directory, dirlen), "/", 1), pattern, patlen + 1); - if (((__builtin_expect (flags & GLOB_ALTDIRFUNC, 0) - ? (*pglob->gl_lstat) (fullname, &ust.st) - : __lstat64 (fullname, &ust.st64)) - == 0) - || errno == EOVERFLOW) + if ((__builtin_expect (flags & GLOB_ALTDIRFUNC, 0) + ? (*pglob->gl_stat) (fullname, &ust.st) + : __stat64 (fullname, &ust.st64)) == 0) /* We found this file to be existing. Now tell the rest of the function to copy this name into the result. */ flags |= GLOB_NOCHECK; @@ -1313,8 +1631,14 @@ glob_in_dir (const char *pattern, const char *directory, int flags, } else { + int dfd = (__builtin_expect (flags & GLOB_ALTDIRFUNC, 0) + ? -1 : dirfd ((DIR *) stream)); int fnm_flags = ((!(flags & GLOB_PERIOD) ? FNM_PERIOD : 0) - | ((flags & GLOB_NOESCAPE) ? FNM_NOESCAPE : 0)); + | ((flags & GLOB_NOESCAPE) ? FNM_NOESCAPE : 0) +#if defined _AMIGA || defined VMS + | FNM_CASEFOLD +#endif + ); flags |= GLOB_MAGCHAR; while (1) @@ -1334,46 +1658,51 @@ glob_in_dir (const char *pattern, const char *directory, int flags, } if (d.name == NULL) break; + if (d.skip_entry) + continue; /* If we shall match only directories use the information provided by the dirent call if possible. */ - if (flags & GLOB_ONLYDIR) - switch (readdir_result_type (d)) - { - case DT_DIR: case DT_LNK: case DT_UNKNOWN: break; - default: continue; - } + if ((flags & GLOB_ONLYDIR) && !readdir_result_might_be_dir (d)) + continue; if (fnmatch (pattern, d.name, fnm_flags) == 0) { - if (cur == names->count) + /* If the file we found is a symlink we have to + make sure the target file exists. */ + if (!readdir_result_might_be_symlink (d) + || link_exists_p (dfd, directory, dirlen, d.name, + pglob, flags)) { - struct globnames *newnames; - size_t count = names->count * 2; - size_t nameoff = offsetof (struct globnames, name); - size_t size = FLEXSIZEOF (struct globnames, name, - count * sizeof (char *)); - if ((SIZE_MAX - nameoff) / 2 / sizeof (char *) - < names->count) + if (cur == names->count) + { + struct globnames *newnames; + size_t count = names->count * 2; + size_t nameoff = offsetof (struct globnames, name); + size_t size = FLEXSIZEOF (struct globnames, name, + count * sizeof (char *)); + if ((SIZE_MAX - nameoff) / 2 / sizeof (char *) + < names->count) + goto memory_error; + if (glob_use_alloca (alloca_used, size)) + newnames = names_alloca + = alloca_account (size, alloca_used); + else if ((newnames = malloc (size)) + == NULL) + goto memory_error; + newnames->count = count; + newnames->next = names; + names = newnames; + cur = 0; + } + names->name[cur] = strdup (d.name); + if (names->name[cur] == NULL) goto memory_error; - if (glob_use_alloca (alloca_used, size)) - newnames = names_alloca - = alloca_account (size, alloca_used); - else if ((newnames = malloc (size)) - == NULL) + ++cur; + ++nfound; + if (SIZE_MAX - pglob->gl_offs <= nfound) goto memory_error; - newnames->count = count; - newnames->next = names; - names = newnames; - cur = 0; } - names->name[cur] = strdup (d.name); - if (names->name[cur] == NULL) - goto memory_error; - ++cur; - ++nfound; - if (SIZE_MAX - pglob->gl_offs <= nfound) - goto memory_error; } } } @@ -1402,7 +1731,7 @@ glob_in_dir (const char *pattern, const char *directory, int flags, new_gl_pathv = realloc (pglob->gl_pathv, (pglob->gl_pathc + pglob->gl_offs + nfound + 1) - * sizeof (char *)); + * sizeof (char *)); if (new_gl_pathv == NULL) { @@ -1410,7 +1739,8 @@ glob_in_dir (const char *pattern, const char *directory, int flags, while (1) { struct globnames *old = names; - for (size_t i = 0; i < cur; ++i) + size_t i; + for (i = 0; i < cur; ++i) free (names->name[i]); names = names->next; /* NB: we will not leak memory here if we exit without @@ -1419,7 +1749,7 @@ glob_in_dir (const char *pattern, const char *directory, int flags, and this is the block assigned to OLD here. */ if (names == NULL) { - assert (old == init_names); + assert (old == &init_names); break; } cur = names->count; @@ -1435,7 +1765,8 @@ glob_in_dir (const char *pattern, const char *directory, int flags, while (1) { struct globnames *old = names; - for (size_t i = 0; i < cur; ++i) + size_t i; + for (i = 0; i < cur; ++i) new_gl_pathv[pglob->gl_offs + pglob->gl_pathc++] = names->name[i]; names = names->next; @@ -1445,7 +1776,7 @@ glob_in_dir (const char *pattern, const char *directory, int flags, and this is the block assigned to OLD here. */ if (names == NULL) { - assert (old == init_names); + assert (old == &init_names); break; } cur = names->count; diff --git a/gdb/gnulib/import/glob.in.h b/gdb/gnulib/import/glob.in.h index c4f99a44450..77816bc0995 100644 --- a/gdb/gnulib/import/glob.in.h +++ b/gdb/gnulib/import/glob.in.h @@ -1,6 +1,6 @@ /* glob.h -- Find a path matching a pattern. - Copyright (C) 2005-2007, 2009-2018 Free Software Foundation, Inc. + Copyright (C) 2005-2007, 2009-2016 Free Software Foundation, Inc. Written by Derek Price & Paul Eggert @@ -15,166 +15,79 @@ 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 . */ + along with this program; if not, see . */ -#ifndef _@GUARD_PREFIX@_GLOB_H +#ifndef _GL_GLOB_H +#define _GL_GLOB_H -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ +#if @HAVE_SYS_CDEFS_H@ +# include #endif -@PRAGMA_COLUMNS@ -/* The include_next requires a split double-inclusion guard. */ -#if @HAVE_GLOB_H@ && !@REPLACE_GLOB@ -# @INCLUDE_NEXT@ @NEXT_GLOB_H@ -#endif - -#ifndef _@GUARD_PREFIX@_GLOB_H -#define _@GUARD_PREFIX@_GLOB_H - -/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ +#include -/* The definition of _GL_ARG_NONNULL is copied here. */ - -/* The definition of _GL_WARN_ON_USE is copied here. */ +/* On some systems, such as AIX 5.1, does a "#define stat stat64". + Make sure this definition is seen before glob-libc.h defines types that + rely on 'struct stat'. */ +#include -/* GCC 2.95 and later have "__restrict"; C99 compilers have - "restrict", and "configure" may have defined "restrict". - Other compilers use __restrict, __restrict__, and _Restrict, and - 'configure' might #define 'restrict' to those words, so pick a - different name. */ -#ifndef _Restrict_ -# if 199901L <= __STDC_VERSION__ -# define _Restrict_ restrict -# elif 2 < __GNUC__ || (2 == __GNUC__ && 95 <= __GNUC_MINOR__) -# define _Restrict_ __restrict +#ifndef __BEGIN_DECLS +# ifdef __cplusplus +# define __BEGIN_DECLS extern "C" { +# define __END_DECLS } # else -# define _Restrict_ +# define __BEGIN_DECLS +# define __END_DECLS # endif #endif - -#ifdef __cplusplus -extern "C" { +#ifndef __THROW +# define __THROW #endif -typedef int (*_gl_glob_errfunc_fn) (const char *, int); -#ifdef __cplusplus -} +#ifndef __THROWNL +# define __THROWNL #endif +/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ -#if !@HAVE_GLOB_H@ || @REPLACE_GLOB@ - - -/* Preparations for including the standard GNU C Library header. */ - -# include - -# include +/* The definition of _GL_ARG_NONNULL is copied here. */ -/* On some systems, such as AIX 5.1, does a "#define stat stat64". - Make sure this definition is seen before glob-libc.h defines types that - rely on 'struct stat'. */ -# include +/* The definition of _GL_WARN_ON_USE is copied here. */ -# ifndef __USE_GNU -# define __USE_GNU 1 -# endif +#ifndef __size_t +# define __size_t size_t +#endif +#ifndef __USE_GNU +# define __USE_GNU 1 +#endif -# if @REPLACE_GLOB@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define glob rpl_glob -# define globfree rpl_globfree -# endif -# endif -# if @REPLACE_GLOB_PATTERN_P@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define glob_pattern_p rpl_glob_pattern_p -# endif -# endif -# define __glob_pattern_p glob_pattern_p -# define __GLOB_GNULIB 1 +#define glob rpl_glob +#define globfree rpl_globfree +#define glob_pattern_p rpl_glob_pattern_p +#define __GLOB_GNULIB 1 /* Now the standard GNU C Library header should work. */ -# include "glob-libc.h" - - -#endif +#include "glob-libc.h" +__BEGIN_DECLS +typedef int (*_gl_glob_errfunc_fn) (const char *, int); +__END_DECLS -#if @GNULIB_GLOB@ -# if @REPLACE_GLOB@ -_GL_FUNCDECL_RPL (glob, int, (const char *_Restrict_ __pattern, int __flags, - _gl_glob_errfunc_fn __errfunc, - glob_t *_Restrict_ __pglob) - _GL_ARG_NONNULL ((1))); +#if defined __cplusplus && defined GNULIB_NAMESPACE +# undef glob +# undef globfree +# undef glob_pattern_p _GL_CXXALIAS_RPL (glob, int, (const char *_Restrict_ __pattern, int __flags, _gl_glob_errfunc_fn __errfunc, glob_t *_Restrict_ __pglob)); -# else -# if !@HAVE_GLOB@ -_GL_FUNCDECL_SYS (glob, int, (const char *_Restrict_ __pattern, int __flags, - _gl_glob_errfunc_fn __errfunc, - glob_t *_Restrict_ __pglob) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (glob, int, (const char *_Restrict_ __pattern, int __flags, - _gl_glob_errfunc_fn __errfunc, - glob_t *_Restrict_ __pglob)); -# endif -_GL_CXXALIASWARN (glob); -#elif defined GNULIB_POSIXCHECK -# undef glob -# if HAVE_RAW_DECL_GLOB -_GL_WARN_ON_USE (glob, - "glob is unportable - " - "use gnulib module glob for portability"); -# endif -#endif - -#if @GNULIB_GLOB@ -# if @REPLACE_GLOB@ -_GL_FUNCDECL_RPL (globfree, void, (glob_t *__pglob) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (globfree, void, (glob_t *__pglob)); -# else -# if !@HAVE_GLOB@ -_GL_FUNCDECL_SYS (globfree, void, (glob_t *__pglob) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (globfree, void, (glob_t *__pglob)); -# endif -_GL_CXXALIASWARN (globfree); -#elif defined GNULIB_POSIXCHECK -# undef globfree -# if HAVE_RAW_DECL_GLOBFREE -_GL_WARN_ON_USE (globfree, - "globfree is unportable - " - "use gnulib module glob for portability"); -# endif -#endif - -#if @GNULIB_GLOB@ -# if @REPLACE_GLOB_PATTERN_P@ -_GL_FUNCDECL_RPL (glob_pattern_p, int, (const char *__pattern, int __quote) - _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (glob_pattern_p, int, (const char *__pattern, int __quote)); -# else -# if !@HAVE_GLOB_PATTERN_P@ -_GL_FUNCDECL_SYS (glob_pattern_p, int, (const char *__pattern, int __quote) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (glob_pattern_p, int, (const char *__pattern, int __quote)); -# endif +# if 0 /* The C function name is rpl_glob, not glob. */ +_GL_CXXALIASWARN (glob); +_GL_CXXALIASWARN (globfree); _GL_CXXALIASWARN (glob_pattern_p); -#elif defined GNULIB_POSIXCHECK -# undef glob_pattern_p -# if HAVE_RAW_DECL_GLOB_PATTERN_P -_GL_WARN_ON_USE (glob_pattern_p, - "glob_pattern_p is unportable - " - "use gnulib module glob for portability"); # endif #endif - -#endif /* _@GUARD_PREFIX@_GLOB_H */ -#endif /* _@GUARD_PREFIX@_GLOB_H */ +#endif /* _GL_GLOB_H */ diff --git a/gdb/gnulib/import/glob_internal.h b/gdb/gnulib/import/glob_internal.h deleted file mode 100644 index 7cb06077e7e..00000000000 --- a/gdb/gnulib/import/glob_internal.h +++ /dev/null @@ -1,65 +0,0 @@ -/* Shared definition for glob and glob_pattern_p. - Copyright (C) 2017-2018 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public - License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. - - The GNU C Library 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 the GNU C Library; if not, see - . */ - -#ifndef GLOB_INTERNAL_H -# define GLOB_INTERNAL_H - -enum -{ - GLOBPAT_NONE = 0x0, - GLOBPAT_SPECIAL = 0x1, - GLOBPAT_BACKSLASH = 0x2, - GLOBPAT_BRACKET = 0x4 -}; - -static inline int -__glob_pattern_type (const char *pattern, int quote) -{ - const char *p; - int ret = GLOBPAT_NONE; - - for (p = pattern; *p != '\0'; ++p) - switch (*p) - { - case '?': - case '*': - return GLOBPAT_SPECIAL; - - case '\\': - if (quote) - { - if (p[1] != '\0') - ++p; - ret |= GLOBPAT_BACKSLASH; - } - break; - - case '[': - ret |= GLOBPAT_BRACKET; - break; - - case ']': - if (ret & 4) - return GLOBPAT_SPECIAL; - break; - } - - return ret; -} - -#endif /* GLOB_INTERNAL_H */ diff --git a/gdb/gnulib/import/glob_pattern_p.c b/gdb/gnulib/import/glob_pattern_p.c deleted file mode 100644 index 6117c37ae37..00000000000 --- a/gdb/gnulib/import/glob_pattern_p.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Return nonzero if PATTERN contains any metacharacters. - Copyright (C) 2017-2018 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public - License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. - - The GNU C Library 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 the GNU C Library; if not, see - . */ - -#ifndef _LIBC -# include -#endif - -#include -#include "glob_internal.h" - -/* Return nonzero if PATTERN contains any metacharacters. - Metacharacters can be quoted with backslashes if QUOTE is nonzero. */ -int -__glob_pattern_p (const char *pattern, int quote) -{ - return __glob_pattern_type (pattern, quote) == GLOBPAT_SPECIAL; -} -weak_alias (__glob_pattern_p, glob_pattern_p) diff --git a/gdb/gnulib/import/globfree.c b/gdb/gnulib/import/globfree.c deleted file mode 100644 index 764a319e16e..00000000000 --- a/gdb/gnulib/import/globfree.c +++ /dev/null @@ -1,41 +0,0 @@ -/* Frees the dynamically allocated storage from an earlier call to glob. - Copyright (C) 2017-2018 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public - License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. - - The GNU C Library 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 the GNU C Library; if not, see - . */ - -#ifndef _LIBC -# include -#endif - -#include -#include - -/* Free storage allocated in PGLOB by a previous `glob' call. */ -void -globfree (glob_t *pglob) -{ - if (pglob->gl_pathv != NULL) - { - size_t i; - for (i = 0; i < pglob->gl_pathc; ++i) - free (pglob->gl_pathv[pglob->gl_offs + i]); - free (pglob->gl_pathv); - pglob->gl_pathv = NULL; - } -} -#ifndef globfree -libc_hidden_def (globfree) -#endif diff --git a/gdb/gnulib/import/hard-locale.c b/gdb/gnulib/import/hard-locale.c index 49bc6caff43..c7d9da526f8 100644 --- a/gdb/gnulib/import/hard-locale.c +++ b/gdb/gnulib/import/hard-locale.c @@ -1,6 +1,6 @@ /* hard-locale.c -- Determine whether a locale is hard. - Copyright (C) 1997-1999, 2002-2004, 2006-2007, 2009-2018 Free Software + Copyright (C) 1997-1999, 2002-2004, 2006-2007, 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -14,7 +14,7 @@ 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 . */ + along with this program. If not, see . */ #include diff --git a/gdb/gnulib/import/hard-locale.h b/gdb/gnulib/import/hard-locale.h index 22eecc5ed80..7644afa37fb 100644 --- a/gdb/gnulib/import/hard-locale.h +++ b/gdb/gnulib/import/hard-locale.h @@ -1,6 +1,6 @@ /* Determine whether a locale is hard. - Copyright (C) 1999, 2003-2004, 2009-2018 Free Software Foundation, Inc. + Copyright (C) 1999, 2003-2004, 2009-2016 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ #ifndef HARD_LOCALE_H_ # define HARD_LOCALE_H_ 1 diff --git a/gdb/gnulib/import/intprops.h b/gdb/gnulib/import/intprops.h index 15e470cbc6e..8add5def8ec 100644 --- a/gdb/gnulib/import/intprops.h +++ b/gdb/gnulib/import/intprops.h @@ -1,6 +1,6 @@ /* intprops.h -- properties of integer types - Copyright (C) 2001-2018 Free Software Foundation, Inc. + Copyright (C) 2001-2016 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Paul Eggert. */ @@ -21,12 +21,17 @@ #define _GL_INTPROPS_H #include +#include + +#ifndef __has_builtin +# define __has_builtin(x) 0 +#endif /* Return a value with the common real type of E and V and the value of V. */ #define _GL_INT_CONVERT(e, v) (0 * (e) + (v)) /* Act like _GL_INT_CONVERT (E, -V) but work around a bug in IRIX 6.5 cc; see - . */ + . */ #define _GL_INT_NEGATE_CONVERT(e, v) (0 * (e) - (v)) /* The extra casts in the following macros work around compiler bugs, @@ -79,7 +84,24 @@ /* This include file assumes that signed types are two's complement without padding bits; the above macros have undefined behavior otherwise. If this is a problem for you, please let us know how to fix it for your host. - This assumption is tested by the intprops-tests module. */ + As a sanity check, test the assumption for some signed types that + bounds. */ +verify (TYPE_MINIMUM (signed char) == SCHAR_MIN); +verify (TYPE_MAXIMUM (signed char) == SCHAR_MAX); +verify (TYPE_MINIMUM (short int) == SHRT_MIN); +verify (TYPE_MAXIMUM (short int) == SHRT_MAX); +verify (TYPE_MINIMUM (int) == INT_MIN); +verify (TYPE_MAXIMUM (int) == INT_MAX); +verify (TYPE_MINIMUM (long int) == LONG_MIN); +verify (TYPE_MAXIMUM (long int) == LONG_MAX); +#ifdef LLONG_MAX +verify (TYPE_MINIMUM (long long int) == LLONG_MIN); +verify (TYPE_MAXIMUM (long long int) == LLONG_MAX); +#endif +/* Similarly, sanity-check one ISO/IEC TS 18661-1:2014 macro if defined. */ +#ifdef UINT_WIDTH +verify (TYPE_WIDTH (unsigned int) == UINT_WIDTH); +#endif /* Does the __typeof__ keyword work? This could be done by 'configure', but for now it's easier to do it by hand. */ @@ -179,7 +201,7 @@ /* Return 1 if A * B would overflow in [MIN,MAX] arithmetic. See above for restrictions. Avoid && and || as they tickle bugs in Sun C 5.11 2010/08/13 and other compilers; see - . */ + . */ #define INT_MULTIPLY_RANGE_OVERFLOW(a, b, min, max) \ ((b) < 0 \ ? ((a) < 0 \ @@ -219,14 +241,12 @@ : (max) >> (b) < (a)) /* True if __builtin_add_overflow (A, B, P) works when P is non-null. */ -#if 5 <= __GNUC__ && !defined __ICC -# define _GL_HAS_BUILTIN_OVERFLOW 1 -#else -# define _GL_HAS_BUILTIN_OVERFLOW 0 -#endif +#define _GL_HAS_BUILTIN_OVERFLOW \ + (5 <= __GNUC__ || __has_builtin (__builtin_add_overflow)) /* True if __builtin_add_overflow_p (A, B, C) works. */ -#define _GL_HAS_BUILTIN_OVERFLOW_P (7 <= __GNUC__) +#define _GL_HAS_BUILTIN_OVERFLOW_P \ + (7 <= __GNUC__ || __has_builtin (__builtin_add_overflow_p)) /* The _GL*_OVERFLOW macros have the same restrictions as the *_RANGE_OVERFLOW macros, except that they do not assume that operands @@ -375,10 +395,10 @@ (_Generic \ (*(r), \ signed char: \ - _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \ + _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned char, \ signed char, SCHAR_MIN, SCHAR_MAX), \ short int: \ - _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \ + _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned short int, \ short int, SHRT_MIN, SHRT_MAX), \ int: \ _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \ @@ -392,10 +412,10 @@ #else # define _GL_INT_OP_WRAPV(a, b, r, op, builtin, overflow) \ (sizeof *(r) == sizeof (signed char) \ - ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \ + ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned char, \ signed char, SCHAR_MIN, SCHAR_MAX) \ : sizeof *(r) == sizeof (short int) \ - ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \ + ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned short int, \ short int, SHRT_MIN, SHRT_MAX) \ : sizeof *(r) == sizeof (int) \ ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \ @@ -417,8 +437,9 @@ /* Store the low-order bits of A B into *R, where the operation is given by OP. Use the unsigned type UT for calculation to avoid - overflow problems. *R's type is T, with extrema TMIN and TMAX. - T must be a signed integer type. Return 1 if the result overflows. */ + overflow problems. *R's type is T, with extremal values TMIN and + TMAX. T must be a signed integer type. Return 1 if the result + overflows. */ #define _GL_INT_OP_CALC(a, b, r, op, overflow, ut, t, tmin, tmax) \ (sizeof ((a) op (b)) < sizeof (t) \ ? _GL_INT_OP_CALC1 ((t) (a), (t) (b), r, op, overflow, ut, t, tmin, tmax) \ @@ -427,27 +448,17 @@ ((overflow (a, b) \ || (EXPR_SIGNED ((a) op (b)) && ((a) op (b)) < (tmin)) \ || (tmax) < ((a) op (b))) \ - ? (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t), 1) \ - : (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t), 0)) - -/* Return the low-order bits of A B, where the operation is given - by OP. Use the unsigned type UT for calculation to avoid undefined - behavior on signed integer overflow, and convert the result to type T. - UT is at least as wide as T and is no narrower than unsigned int, - T is two's complement, and there is no padding or trap representations. - Assume that converting UT to T yields the low-order bits, as is - done in all known two's-complement C compilers. E.g., see: - https://gcc.gnu.org/onlinedocs/gcc/Integers-implementation.html - - According to the C standard, converting UT to T yields an - implementation-defined result or signal for values outside T's - range. However, code that works around this theoretical problem - runs afoul of a compiler bug in Oracle Studio 12.3 x86. See: - https://lists.gnu.org/r/bug-gnulib/2017-04/msg00049.html - As the compiler bug is real, don't try to work around the - theoretical problem. */ - -#define _GL_INT_OP_WRAPV_VIA_UNSIGNED(a, b, op, ut, t) \ - ((t) ((ut) (a) op (ut) (b))) + ? (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t, tmin, tmax), 1) \ + : (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t, tmin, tmax), 0)) + +/* Return A B, where the operation is given by OP. Use the + unsigned type UT for calculation to avoid overflow problems. + Convert the result to type T without overflow by subtracting TMIN + from large values before converting, and adding it afterwards. + Compilers can optimize all the operations except OP. */ +#define _GL_INT_OP_WRAPV_VIA_UNSIGNED(a, b, op, ut, t, tmin, tmax) \ + (((ut) (a) op (ut) (b)) <= (tmax) \ + ? (t) ((ut) (a) op (ut) (b)) \ + : ((t) (((ut) (a) op (ut) (b)) - (tmin)) + (tmin))) #endif /* _GL_INTPROPS_H */ diff --git a/gdb/gnulib/import/inttypes.in.h b/gdb/gnulib/import/inttypes.in.h index c7d7968e6e9..ed09db6e86e 100644 --- a/gdb/gnulib/import/inttypes.in.h +++ b/gdb/gnulib/import/inttypes.in.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006-2018 Free Software Foundation, Inc. +/* Copyright (C) 2006-2016 Free Software Foundation, Inc. Written by Paul Eggert, Bruno Haible, Derek Price. This file is part of gnulib. @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ /* * ISO C 99 for platforms that lack it. @@ -52,7 +52,7 @@ /* Get CHAR_BIT. */ #include /* On mingw, __USE_MINGW_ANSI_STDIO only works if is also included */ -#if defined _WIN32 && ! defined __CYGWIN__ +#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # include #endif @@ -1067,13 +1067,11 @@ _GL_WARN_ON_USE (imaxabs, "imaxabs is unportable - " #endif #if @GNULIB_IMAXDIV@ -# if !@HAVE_IMAXDIV_T@ +# if !@HAVE_DECL_IMAXDIV@ # if !GNULIB_defined_imaxdiv_t typedef struct { intmax_t quot; intmax_t rem; } imaxdiv_t; # define GNULIB_defined_imaxdiv_t 1 # endif -# endif -# if !@HAVE_DECL_IMAXDIV@ extern imaxdiv_t imaxdiv (intmax_t, intmax_t); # endif #elif defined GNULIB_POSIXCHECK diff --git a/gdb/gnulib/import/isnan.c b/gdb/gnulib/import/isnan.c index a25c882b102..e1e57b2ff2c 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-2018 Free Software Foundation, Inc. + Copyright (C) 2007-2016 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible , 2007. */ diff --git a/gdb/gnulib/import/isnand-nolibm.h b/gdb/gnulib/import/isnand-nolibm.h index 7be45739557..dc4726464aa 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-2018 Free Software Foundation, Inc. + Copyright (C) 2007-2016 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #if HAVE_ISNAND_IN_LIBC /* Get declaration of isnan macro. */ diff --git a/gdb/gnulib/import/isnand.c b/gdb/gnulib/import/isnand.c index 4871a5cf869..405b23a14de 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-2018 Free Software Foundation, Inc. + Copyright (C) 2008-2016 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible , 2008. */ diff --git a/gdb/gnulib/import/isnanl-nolibm.h b/gdb/gnulib/import/isnanl-nolibm.h index ddd12f0d24d..efd919959b8 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-2018 Free Software Foundation, Inc. + Copyright (C) 2007-2016 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #if HAVE_ISNANL_IN_LIBC /* Get declaration of isnan macro or (older) isnanl function. */ diff --git a/gdb/gnulib/import/isnanl.c b/gdb/gnulib/import/isnanl.c index f45d1f27109..67d39d177dc 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-2018 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2016 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible , 2007. */ diff --git a/gdb/gnulib/import/itold.c b/gdb/gnulib/import/itold.c index 6a43bd8daef..5533392e538 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-2018 Free Software Foundation, Inc. + Copyright (C) 2011-2016 Free Software Foundation, Inc. Written by Bruno Haible , 2011. This program is free software: you can redistribute it and/or modify @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ #include diff --git a/gdb/gnulib/import/libc-config.h b/gdb/gnulib/import/libc-config.h deleted file mode 100644 index d7b40935cd4..00000000000 --- a/gdb/gnulib/import/libc-config.h +++ /dev/null @@ -1,174 +0,0 @@ -/* System definitions for code taken from the GNU C Library - - Copyright 2017-2018 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public - License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public - License along with this program; if not, see - . */ - -/* Written by Paul Eggert. */ - -/* This is intended to be a good-enough substitute for glibc system - macros like those defined in , so that Gnulib code - shared with glibc can do this as the first #include: - - #ifndef _LIBC - # include - #endif - - When compiled as part of glibc this is a no-op; when compiled as - part of Gnulib this includes Gnulib's and defines macros - that glibc library code would normally assume. */ - -#include - -/* On glibc this includes and and #defines - _FEATURES_H, __WORDSIZE, and __set_errno. On FreeBSD 11 it - includes which defines __nonnull. Elsewhere it - is harmless. */ -#include - -/* From glibc . */ -#ifndef __set_errno -# define __set_errno(val) (errno = (val)) -#endif - -/* From glibc . */ - -#ifndef __GNUC_PREREQ -# if defined __GNUC__ && defined __GNUC_MINOR__ -# define __GNUC_PREREQ(maj, min) ((maj) < __GNUC__ + ((min) <= __GNUC_MINOR__)) -# else -# define __GNUC_PREREQ(maj, min) 0 -# endif -#endif - -#ifndef __glibc_clang_prereq -# if defined __clang_major__ && defined __clang_minor__ -# define __glibc_clang_prereq(maj, min) \ - ((maj) < __clang_major__ + ((min) <= __clang_minor__)) -# else -# define __glibc_clang_prereq(maj, min) 0 -# endif -#endif - - -/* Prepare to include , which is our copy of glibc - . */ - -/* Define _FEATURES_H so that does not include . */ -#ifndef _FEATURES_H -# define _FEATURES_H 1 -#endif -/* Define __WORDSIZE so that does not attempt to include - nonexistent files. Make it a syntax error, since Gnulib does not - use __WORDSIZE now, and if Gnulib uses it later the syntax error - will let us know that __WORDSIZE needs configuring. */ -#ifndef __WORDSIZE -# define __WORDSIZE %%% -#endif -/* Undef the macros unconditionally defined by our copy of glibc - , so that they do not clash with any system-defined - versions. */ -#undef _SYS_CDEFS_H -#undef __ASMNAME -#undef __ASMNAME2 -#undef __BEGIN_DECLS -#undef __CONCAT -#undef __END_DECLS -#undef __HAVE_GENERIC_SELECTION -#undef __LDBL_COMPAT -#undef __LDBL_REDIR -#undef __LDBL_REDIR1 -#undef __LDBL_REDIR1_DECL -#undef __LDBL_REDIR1_NTH -#undef __LDBL_REDIR_DECL -#undef __LDBL_REDIR_NTH -#undef __LEAF -#undef __LEAF_ATTR -#undef __NTH -#undef __NTHNL -#undef __P -#undef __PMT -#undef __REDIRECT -#undef __REDIRECT_LDBL -#undef __REDIRECT_NTH -#undef __REDIRECT_NTHNL -#undef __REDIRECT_NTH_LDBL -#undef __STRING -#undef __THROW -#undef __THROWNL -#undef __always_inline -#undef __attribute__ -#undef __attribute_alloc_size__ -#undef __attribute_artificial__ -#undef __attribute_const__ -#undef __attribute_deprecated__ -#undef __attribute_deprecated_msg__ -#undef __attribute_format_arg__ -#undef __attribute_format_strfmon__ -#undef __attribute_malloc__ -#undef __attribute_noinline__ -#undef __attribute_nonstring__ -#undef __attribute_pure__ -#undef __attribute_used__ -#undef __attribute_warn_unused_result__ -#undef __bos -#undef __bos0 -#undef __errordecl -#undef __extension__ -#undef __extern_always_inline -#undef __extern_inline -#undef __flexarr -#undef __fortify_function -#undef __glibc_c99_flexarr_available -#undef __glibc_clang_has_extension -#undef __glibc_likely -#undef __glibc_macro_warning -#undef __glibc_macro_warning1 -#undef __glibc_unlikely -#undef __inline -#undef __ptr_t -#undef __restrict -#undef __restrict_arr -#undef __va_arg_pack -#undef __va_arg_pack_len -#undef __warnattr -#undef __warndecl - -/* Include our copy of glibc . */ -#include - -/* __inline is too pessimistic for non-GCC. */ -#undef __inline -#ifndef HAVE___INLINE -# if 199901 <= __STDC_VERSION__ || defined inline -# define __inline inline -# else -# define __inline -# endif -#endif - - -/* A substitute for glibc , good enough for Gnulib. */ -#define attribute_hidden -#define libc_hidden_proto(name, ...) -#define libc_hidden_def(name) -#define libc_hidden_weak(name) -#define libc_hidden_ver(local, name) -#define strong_alias(name, aliasname) -#define weak_alias(name, aliasname) - -/* A substitute for glibc , good enough for Gnulib. */ -#define SHLIB_COMPAT(lib, introduced, obsoleted) 0 -#define versioned_symbol(lib, local, symbol, version) diff --git a/gdb/gnulib/import/limits.in.h b/gdb/gnulib/import/limits.in.h index 2c809d97ac4..a1eae02ada8 100644 --- a/gdb/gnulib/import/limits.in.h +++ b/gdb/gnulib/import/limits.in.h @@ -1,6 +1,6 @@ /* A GNU-like . - Copyright 2016-2018 Free Software Foundation, Inc. + Copyright 2016 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program; if not, see . */ #ifndef _@GUARD_PREFIX@_LIMITS_H @@ -28,17 +28,6 @@ #ifndef _@GUARD_PREFIX@_LIMITS_H #define _@GUARD_PREFIX@_LIMITS_H -/* For HP-UX 11.31. */ -#if defined LONG_LONG_MIN && !defined LLONG_MIN -# define LLONG_MIN LONG_LONG_MIN -#endif -#if defined LONG_LONG_MAX && !defined LLONG_MAX -# define LLONG_MAX LONG_LONG_MAX -#endif -#if defined ULONG_LONG_MAX && !defined ULLONG_MAX -# define ULLONG_MAX ULONG_LONG_MAX -#endif - /* The number of usable bits in an unsigned or signed integer type with minimum value MIN and maximum value MAX, as an int expression suitable in #if. Cover all known practical hosts. This diff --git a/gdb/gnulib/import/localcharset.c b/gdb/gnulib/import/localcharset.c index 58c5718c3ed..b2a0369782d 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-2018 Free Software Foundation, Inc. + Copyright (C) 2000-2006, 2008-2016 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 @@ -13,7 +13,7 @@ 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 . */ + with this program; if not, see . */ /* Written by Bruno Haible . */ @@ -22,6 +22,7 @@ /* Specification. */ #include "localcharset.h" +#include #include #include #include @@ -31,7 +32,7 @@ # define DARWIN7 /* Darwin 7 or newer, i.e. Mac OS X 10.3 or newer */ #endif -#if defined _WIN32 && !defined __CYGWIN__ +#if defined _WIN32 || defined __WIN32__ # define WINDOWS_NATIVE # include #endif @@ -44,10 +45,11 @@ #endif #if !defined WINDOWS_NATIVE +# include # if HAVE_LANGINFO_CODESET # include # else -# if 0 /* see comment regarding use of setlocale(), below */ +# if 0 /* see comment below */ # include # endif # endif @@ -69,613 +71,317 @@ # include #endif +#if ENABLE_RELOCATABLE +# include "relocatable.h" +#else +# define relocate(pathname) (pathname) +#endif + +/* Get LIBDIR. */ +#ifndef LIBDIR +# include "configmake.h" +#endif + +/* Define O_NOFOLLOW to 0 on platforms where it does not exist. */ +#ifndef O_NOFOLLOW +# define O_NOFOLLOW 0 +#endif + +#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ + /* Native Windows, Cygwin, OS/2, DOS */ +# define ISSLASH(C) ((C) == '/' || (C) == '\\') +#endif -#if HAVE_LANGINFO_CODESET || defined WINDOWS_NATIVE || defined OS2 +#ifndef DIRECTORY_SEPARATOR +# define DIRECTORY_SEPARATOR '/' +#endif -/* On these platforms, we use a mapping from non-canonical encoding name - to GNU canonical encoding name. */ +#ifndef ISSLASH +# define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR) +#endif -/* With glibc-2.1 or newer, we don't need any canonicalization, - because glibc has iconv and both glibc and libiconv support all - GNU canonical names directly. */ -# if !((defined __GNU_LIBRARY__ && __GLIBC__ >= 2) || defined __UCLIBC__) +#if HAVE_DECL_GETC_UNLOCKED +# undef getc +# define getc getc_unlocked +#endif -struct table_entry +/* The following static variable is declared 'volatile' to avoid a + possible multithread problem in the function get_charset_aliases. If we + are running in a threaded environment, and if two threads initialize + 'charset_aliases' simultaneously, both will produce the same value, + and everything will be ok if the two assignments to 'charset_aliases' + are atomic. But I don't know what will happen if the two assignments mix. */ +#if __STDC__ != 1 +# define volatile /* empty */ +#endif +/* Pointer to the contents of the charset.alias file, if it has already been + read, else NULL. Its format is: + ALIAS_1 '\0' CANONICAL_1 '\0' ... ALIAS_n '\0' CANONICAL_n '\0' '\0' */ +static const char * volatile charset_aliases; + +/* Return a pointer to the contents of the charset.alias file. */ +static const char * +get_charset_aliases (void) { - const char alias[11+1]; - const char canonical[11+1]; -}; - -/* Table of platform-dependent mappings, sorted in ascending order. */ -static const struct table_entry alias_table[] = - { -# if defined __FreeBSD__ /* FreeBSD */ - /*{ "ARMSCII-8", "ARMSCII-8" },*/ - { "Big5", "BIG5" }, - { "C", "ASCII" }, - /*{ "CP1131", "CP1131" },*/ - /*{ "CP1251", "CP1251" },*/ - /*{ "CP866", "CP866" },*/ - /*{ "GB18030", "GB18030" },*/ - /*{ "GB2312", "GB2312" },*/ - /*{ "GBK", "GBK" },*/ - /*{ "ISCII-DEV", "?" },*/ - { "ISO8859-1", "ISO-8859-1" }, - { "ISO8859-13", "ISO-8859-13" }, - { "ISO8859-15", "ISO-8859-15" }, - { "ISO8859-2", "ISO-8859-2" }, - { "ISO8859-5", "ISO-8859-5" }, - { "ISO8859-7", "ISO-8859-7" }, - { "ISO8859-9", "ISO-8859-9" }, - /*{ "KOI8-R", "KOI8-R" },*/ - /*{ "KOI8-U", "KOI8-U" },*/ - { "SJIS", "SHIFT_JIS" }, - { "US-ASCII", "ASCII" }, - { "eucCN", "GB2312" }, - { "eucJP", "EUC-JP" }, - { "eucKR", "EUC-KR" } -# define alias_table_defined -# endif -# if defined __NetBSD__ /* NetBSD */ - { "646", "ASCII" }, - /*{ "ARMSCII-8", "ARMSCII-8" },*/ - /*{ "BIG5", "BIG5" },*/ - { "Big5-HKSCS", "BIG5-HKSCS" }, - /*{ "CP1251", "CP1251" },*/ - /*{ "CP866", "CP866" },*/ - /*{ "GB18030", "GB18030" },*/ - /*{ "GB2312", "GB2312" },*/ - { "ISO8859-1", "ISO-8859-1" }, - { "ISO8859-13", "ISO-8859-13" }, - { "ISO8859-15", "ISO-8859-15" }, - { "ISO8859-2", "ISO-8859-2" }, - { "ISO8859-4", "ISO-8859-4" }, - { "ISO8859-5", "ISO-8859-5" }, - { "ISO8859-7", "ISO-8859-7" }, - /*{ "KOI8-R", "KOI8-R" },*/ - /*{ "KOI8-U", "KOI8-U" },*/ - /*{ "PT154", "PT154" },*/ - { "SJIS", "SHIFT_JIS" }, - { "eucCN", "GB2312" }, - { "eucJP", "EUC-JP" }, - { "eucKR", "EUC-KR" }, - { "eucTW", "EUC-TW" } -# define alias_table_defined -# endif -# if defined __OpenBSD__ /* OpenBSD */ - { "646", "ASCII" }, - { "ISO8859-1", "ISO-8859-1" }, - { "ISO8859-13", "ISO-8859-13" }, - { "ISO8859-15", "ISO-8859-15" }, - { "ISO8859-2", "ISO-8859-2" }, - { "ISO8859-4", "ISO-8859-4" }, - { "ISO8859-5", "ISO-8859-5" }, - { "ISO8859-7", "ISO-8859-7" } -# define alias_table_defined -# endif -# if defined __APPLE__ && defined __MACH__ /* Mac OS X */ - /* Darwin 7.5 has nl_langinfo(CODESET), but sometimes its value is - useless: - - It returns the empty string when LANG is set to a locale of the - form ll_CC, although ll_CC/LC_CTYPE is a symlink to an UTF-8 - LC_CTYPE file. - - The environment variables LANG, LC_CTYPE, LC_ALL are not set by - the system; nl_langinfo(CODESET) returns "US-ASCII" in this case. - - The documentation says: - "... all code that calls BSD system routines should ensure - that the const *char parameters of these routines are in UTF-8 - encoding. All BSD system functions expect their string - parameters to be in UTF-8 encoding and nothing else." - It also says - "An additional caveat is that string parameters for files, - paths, and other file-system entities must be in canonical - UTF-8. In a canonical UTF-8 Unicode string, all decomposable - characters are decomposed ..." - but this is not true: You can pass non-decomposed UTF-8 strings - to file system functions, and it is the OS which will convert - them to decomposed UTF-8 before accessing the file system. - - The Apple Terminal application displays UTF-8 by default. - - However, other applications are free to use different encodings: - - xterm uses ISO-8859-1 by default. - - TextEdit uses MacRoman by default. - We prefer UTF-8 over decomposed UTF-8-MAC because one should - minimize the use of decomposed Unicode. Unfortunately, through the - Darwin file system, decomposed UTF-8 strings are leaked into user - space nevertheless. - Then there are also the locales with encodings other than US-ASCII - and UTF-8. These locales can be occasionally useful to users (e.g. - when grepping through ISO-8859-1 encoded text files), when all their - file names are in US-ASCII. - */ - { "ARMSCII-8", "ARMSCII-8" }, - { "Big5", "BIG5" }, - { "Big5HKSCS", "BIG5-HKSCS" }, - { "CP1131", "CP1131" }, - { "CP1251", "CP1251" }, - { "CP866", "CP866" }, - { "CP949", "CP949" }, - { "GB18030", "GB18030" }, - { "GB2312", "GB2312" }, - { "GBK", "GBK" }, - /*{ "ISCII-DEV", "?" },*/ - { "ISO8859-1", "ISO-8859-1" }, - { "ISO8859-13", "ISO-8859-13" }, - { "ISO8859-15", "ISO-8859-15" }, - { "ISO8859-2", "ISO-8859-2" }, - { "ISO8859-4", "ISO-8859-4" }, - { "ISO8859-5", "ISO-8859-5" }, - { "ISO8859-7", "ISO-8859-7" }, - { "ISO8859-9", "ISO-8859-9" }, - { "KOI8-R", "KOI8-R" }, - { "KOI8-U", "KOI8-U" }, - { "PT154", "PT154" }, - { "SJIS", "SHIFT_JIS" }, - { "eucCN", "GB2312" }, - { "eucJP", "EUC-JP" }, - { "eucKR", "EUC-KR" } -# define alias_table_defined -# endif -# if defined _AIX /* AIX */ - /*{ "GBK", "GBK" },*/ - { "IBM-1046", "CP1046" }, - { "IBM-1124", "CP1124" }, - { "IBM-1129", "CP1129" }, - { "IBM-1252", "CP1252" }, - { "IBM-850", "CP850" }, - { "IBM-856", "CP856" }, - { "IBM-921", "ISO-8859-13" }, - { "IBM-922", "CP922" }, - { "IBM-932", "CP932" }, - { "IBM-943", "CP943" }, - { "IBM-eucCN", "GB2312" }, - { "IBM-eucJP", "EUC-JP" }, - { "IBM-eucKR", "EUC-KR" }, - { "IBM-eucTW", "EUC-TW" }, - { "ISO8859-1", "ISO-8859-1" }, - { "ISO8859-15", "ISO-8859-15" }, - { "ISO8859-2", "ISO-8859-2" }, - { "ISO8859-5", "ISO-8859-5" }, - { "ISO8859-6", "ISO-8859-6" }, - { "ISO8859-7", "ISO-8859-7" }, - { "ISO8859-8", "ISO-8859-8" }, - { "ISO8859-9", "ISO-8859-9" }, - { "TIS-620", "TIS-620" }, - /*{ "UTF-8", "UTF-8" },*/ - { "big5", "BIG5" } -# define alias_table_defined -# endif -# if defined __hpux /* HP-UX */ - { "SJIS", "SHIFT_JIS" }, - { "arabic8", "HP-ARABIC8" }, - { "big5", "BIG5" }, - { "cp1251", "CP1251" }, - { "eucJP", "EUC-JP" }, - { "eucKR", "EUC-KR" }, - { "eucTW", "EUC-TW" }, - { "gb18030", "GB18030" }, - { "greek8", "HP-GREEK8" }, - { "hebrew8", "HP-HEBREW8" }, - { "hkbig5", "BIG5-HKSCS" }, - { "hp15CN", "GB2312" }, - { "iso88591", "ISO-8859-1" }, - { "iso885913", "ISO-8859-13" }, - { "iso885915", "ISO-8859-15" }, - { "iso88592", "ISO-8859-2" }, - { "iso88594", "ISO-8859-4" }, - { "iso88595", "ISO-8859-5" }, - { "iso88596", "ISO-8859-6" }, - { "iso88597", "ISO-8859-7" }, - { "iso88598", "ISO-8859-8" }, - { "iso88599", "ISO-8859-9" }, - { "kana8", "HP-KANA8" }, - { "koi8r", "KOI8-R" }, - { "roman8", "HP-ROMAN8" }, - { "tis620", "TIS-620" }, - { "turkish8", "HP-TURKISH8" }, - { "utf8", "UTF-8" } -# define alias_table_defined -# endif -# if defined __sgi /* IRIX */ - { "ISO8859-1", "ISO-8859-1" }, - { "ISO8859-15", "ISO-8859-15" }, - { "ISO8859-2", "ISO-8859-2" }, - { "ISO8859-5", "ISO-8859-5" }, - { "ISO8859-7", "ISO-8859-7" }, - { "ISO8859-9", "ISO-8859-9" }, - { "eucCN", "GB2312" }, - { "eucJP", "EUC-JP" }, - { "eucKR", "EUC-KR" }, - { "eucTW", "EUC-TW" } -# define alias_table_defined -# endif -# if defined __osf__ /* OSF/1 */ - /*{ "GBK", "GBK" },*/ - { "ISO8859-1", "ISO-8859-1" }, - { "ISO8859-15", "ISO-8859-15" }, - { "ISO8859-2", "ISO-8859-2" }, - { "ISO8859-4", "ISO-8859-4" }, - { "ISO8859-5", "ISO-8859-5" }, - { "ISO8859-7", "ISO-8859-7" }, - { "ISO8859-8", "ISO-8859-8" }, - { "ISO8859-9", "ISO-8859-9" }, - { "KSC5601", "CP949" }, - { "SJIS", "SHIFT_JIS" }, - { "TACTIS", "TIS-620" }, - /*{ "UTF-8", "UTF-8" },*/ - { "big5", "BIG5" }, - { "cp850", "CP850" }, - { "dechanyu", "DEC-HANYU" }, - { "dechanzi", "GB2312" }, - { "deckanji", "DEC-KANJI" }, - { "deckorean", "EUC-KR" }, - { "eucJP", "EUC-JP" }, - { "eucKR", "EUC-KR" }, - { "eucTW", "EUC-TW" }, - { "sdeckanji", "EUC-JP" } -# define alias_table_defined -# endif -# if defined __sun /* Solaris */ - { "5601", "EUC-KR" }, - { "646", "ASCII" }, - /*{ "BIG5", "BIG5" },*/ - { "Big5-HKSCS", "BIG5-HKSCS" }, - { "GB18030", "GB18030" }, - /*{ "GBK", "GBK" },*/ - { "ISO8859-1", "ISO-8859-1" }, - { "ISO8859-11", "TIS-620" }, - { "ISO8859-13", "ISO-8859-13" }, - { "ISO8859-15", "ISO-8859-15" }, - { "ISO8859-2", "ISO-8859-2" }, - { "ISO8859-3", "ISO-8859-3" }, - { "ISO8859-4", "ISO-8859-4" }, - { "ISO8859-5", "ISO-8859-5" }, - { "ISO8859-6", "ISO-8859-6" }, - { "ISO8859-7", "ISO-8859-7" }, - { "ISO8859-8", "ISO-8859-8" }, - { "ISO8859-9", "ISO-8859-9" }, - { "PCK", "SHIFT_JIS" }, - { "TIS620.2533", "TIS-620" }, - /*{ "UTF-8", "UTF-8" },*/ - { "ansi-1251", "CP1251" }, - { "cns11643", "EUC-TW" }, - { "eucJP", "EUC-JP" }, - { "gb2312", "GB2312" }, - { "koi8-r", "KOI8-R" } -# define alias_table_defined -# endif -# if defined __minix /* Minix */ - { "646", "ASCII" } -# define alias_table_defined -# endif -# if defined WINDOWS_NATIVE || defined __CYGWIN__ /* Windows */ - { "CP1361", "JOHAB" }, - { "CP20127", "ASCII" }, - { "CP20866", "KOI8-R" }, - { "CP20936", "GB2312" }, - { "CP21866", "KOI8-RU" }, - { "CP28591", "ISO-8859-1" }, - { "CP28592", "ISO-8859-2" }, - { "CP28593", "ISO-8859-3" }, - { "CP28594", "ISO-8859-4" }, - { "CP28595", "ISO-8859-5" }, - { "CP28596", "ISO-8859-6" }, - { "CP28597", "ISO-8859-7" }, - { "CP28598", "ISO-8859-8" }, - { "CP28599", "ISO-8859-9" }, - { "CP28605", "ISO-8859-15" }, - { "CP38598", "ISO-8859-8" }, - { "CP51932", "EUC-JP" }, - { "CP51936", "GB2312" }, - { "CP51949", "EUC-KR" }, - { "CP51950", "EUC-TW" }, - { "CP54936", "GB18030" }, - { "CP65001", "UTF-8" }, - { "CP936", "GBK" } -# define alias_table_defined -# endif -# if defined OS2 /* OS/2 */ - /* The list of encodings is taken from "List of OS/2 Codepages" - by Alex Taylor: - . - See also "IBM Globalization - Code page identifiers": - . */ - { "CP1089", "ISO-8859-6" }, - { "CP1208", "UTF-8" }, - { "CP1381", "GB2312" }, - { "CP1386", "GBK" }, - { "CP3372", "EUC-JP" }, - { "CP813", "ISO-8859-7" }, - { "CP819", "ISO-8859-1" }, - { "CP878", "KOI8-R" }, - { "CP912", "ISO-8859-2" }, - { "CP913", "ISO-8859-3" }, - { "CP914", "ISO-8859-4" }, - { "CP915", "ISO-8859-5" }, - { "CP916", "ISO-8859-8" }, - { "CP920", "ISO-8859-9" }, - { "CP921", "ISO-8859-13" }, - { "CP923", "ISO-8859-15" }, - { "CP954", "EUC-JP" }, - { "CP964", "EUC-TW" }, - { "CP970", "EUC-KR" } -# define alias_table_defined -# endif -# if defined VMS /* OpenVMS */ - /* The list of encodings is taken from the OpenVMS 7.3-1 documentation - "Compaq C Run-Time Library Reference Manual for OpenVMS systems" - section 10.7 "Handling Different Character Sets". */ - { "DECHANYU", "DEC-HANYU" }, - { "DECHANZI", "GB2312" }, - { "DECKANJI", "DEC-KANJI" }, - { "DECKOREAN", "EUC-KR" }, - { "ISO8859-1", "ISO-8859-1" }, - { "ISO8859-2", "ISO-8859-2" }, - { "ISO8859-5", "ISO-8859-5" }, - { "ISO8859-7", "ISO-8859-7" }, - { "ISO8859-8", "ISO-8859-8" }, - { "ISO8859-9", "ISO-8859-9" }, - { "SDECKANJI", "EUC-JP" }, - { "SJIS", "SHIFT_JIS" }, - { "eucJP", "EUC-JP" }, - { "eucTW", "EUC-TW" } -# define alias_table_defined -# endif -# ifndef alias_table_defined - /* Just a dummy entry, to avoid a C syntax error. */ - { "", "" } -# endif - }; + const char *cp; -# endif + cp = charset_aliases; + if (cp == NULL) + { +#if !(defined DARWIN7 || defined VMS || defined WINDOWS_NATIVE || defined __CYGWIN__ || defined OS2) + const char *dir; + const char *base = "charset.alias"; + char *file_name; + + /* Make it possible to override the charset.alias location. This is + necessary for running the testsuite before "make install". */ + dir = getenv ("CHARSETALIASDIR"); + if (dir == NULL || dir[0] == '\0') + dir = relocate (LIBDIR); + + /* Concatenate dir and base into freshly allocated file_name. */ + { + size_t dir_len = strlen (dir); + size_t base_len = strlen (base); + int add_slash = (dir_len > 0 && !ISSLASH (dir[dir_len - 1])); + file_name = (char *) malloc (dir_len + add_slash + base_len + 1); + if (file_name != NULL) + { + memcpy (file_name, dir, dir_len); + if (add_slash) + file_name[dir_len] = DIRECTORY_SEPARATOR; + memcpy (file_name + dir_len + add_slash, base, base_len + 1); + } + } + + if (file_name == NULL) + /* Out of memory. Treat the file as empty. */ + cp = ""; + else + { + int fd; + + /* Open the file. Reject symbolic links on platforms that support + O_NOFOLLOW. This is a security feature. Without it, an attacker + could retrieve parts of the contents (namely, the tail of the + first line that starts with "* ") of an arbitrary file by placing + a symbolic link to that file under the name "charset.alias" in + some writable directory and defining the environment variable + CHARSETALIASDIR to point to that directory. */ + fd = open (file_name, + O_RDONLY | (HAVE_WORKING_O_NOFOLLOW ? O_NOFOLLOW : 0)); + if (fd < 0) + /* File not found. Treat it as empty. */ + cp = ""; + else + { + FILE *fp; + + fp = fdopen (fd, "r"); + if (fp == NULL) + { + /* Out of memory. Treat the file as empty. */ + close (fd); + cp = ""; + } + else + { + /* Parse the file's contents. */ + char *res_ptr = NULL; + size_t res_size = 0; + + for (;;) + { + int c; + char buf1[50+1]; + char buf2[50+1]; + size_t l1, l2; + char *old_res_ptr; + + c = getc (fp); + if (c == EOF) + break; + if (c == '\n' || c == ' ' || c == '\t') + continue; + if (c == '#') + { + /* Skip comment, to end of line. */ + do + c = getc (fp); + while (!(c == EOF || c == '\n')); + if (c == EOF) + break; + continue; + } + ungetc (c, fp); + if (fscanf (fp, "%50s %50s", buf1, buf2) < 2) + break; + l1 = strlen (buf1); + l2 = strlen (buf2); + old_res_ptr = res_ptr; + if (res_size == 0) + { + res_size = l1 + 1 + l2 + 1; + res_ptr = (char *) malloc (res_size + 1); + } + else + { + res_size += l1 + 1 + l2 + 1; + res_ptr = (char *) realloc (res_ptr, res_size + 1); + } + if (res_ptr == NULL) + { + /* Out of memory. */ + res_size = 0; + free (old_res_ptr); + break; + } + strcpy (res_ptr + res_size - (l2 + 1) - (l1 + 1), buf1); + strcpy (res_ptr + res_size - (l2 + 1), buf2); + } + fclose (fp); + if (res_size == 0) + cp = ""; + else + { + *(res_ptr + res_size) = '\0'; + cp = res_ptr; + } + } + } + + free (file_name); + } #else -/* On these platforms, we use a mapping from locale name to GNU canonical - encoding name. */ +# if defined DARWIN7 + /* To avoid the trouble of installing a file that is shared by many + GNU packages -- many packaging systems have problems with this --, + simply inline the aliases here. */ + cp = "ISO8859-1" "\0" "ISO-8859-1" "\0" + "ISO8859-2" "\0" "ISO-8859-2" "\0" + "ISO8859-4" "\0" "ISO-8859-4" "\0" + "ISO8859-5" "\0" "ISO-8859-5" "\0" + "ISO8859-7" "\0" "ISO-8859-7" "\0" + "ISO8859-9" "\0" "ISO-8859-9" "\0" + "ISO8859-13" "\0" "ISO-8859-13" "\0" + "ISO8859-15" "\0" "ISO-8859-15" "\0" + "KOI8-R" "\0" "KOI8-R" "\0" + "KOI8-U" "\0" "KOI8-U" "\0" + "CP866" "\0" "CP866" "\0" + "CP949" "\0" "CP949" "\0" + "CP1131" "\0" "CP1131" "\0" + "CP1251" "\0" "CP1251" "\0" + "eucCN" "\0" "GB2312" "\0" + "GB2312" "\0" "GB2312" "\0" + "eucJP" "\0" "EUC-JP" "\0" + "eucKR" "\0" "EUC-KR" "\0" + "Big5" "\0" "BIG5" "\0" + "Big5HKSCS" "\0" "BIG5-HKSCS" "\0" + "GBK" "\0" "GBK" "\0" + "GB18030" "\0" "GB18030" "\0" + "SJIS" "\0" "SHIFT_JIS" "\0" + "ARMSCII-8" "\0" "ARMSCII-8" "\0" + "PT154" "\0" "PT154" "\0" + /*"ISCII-DEV" "\0" "?" "\0"*/ + "*" "\0" "UTF-8" "\0"; +# endif -struct table_entry -{ - const char locale[17+1]; - const char canonical[11+1]; -}; - -/* Table of platform-dependent mappings, sorted in ascending order. */ -static const struct table_entry locale_table[] = - { -# if defined __FreeBSD__ /* FreeBSD 4.2 */ - { "cs_CZ.ISO_8859-2", "ISO-8859-2" }, - { "da_DK.DIS_8859-15", "ISO-8859-15" }, - { "da_DK.ISO_8859-1", "ISO-8859-1" }, - { "de_AT.DIS_8859-15", "ISO-8859-15" }, - { "de_AT.ISO_8859-1", "ISO-8859-1" }, - { "de_CH.DIS_8859-15", "ISO-8859-15" }, - { "de_CH.ISO_8859-1", "ISO-8859-1" }, - { "de_DE.DIS_8859-15", "ISO-8859-15" }, - { "de_DE.ISO_8859-1", "ISO-8859-1" }, - { "en_AU.DIS_8859-15", "ISO-8859-15" }, - { "en_AU.ISO_8859-1", "ISO-8859-1" }, - { "en_CA.DIS_8859-15", "ISO-8859-15" }, - { "en_CA.ISO_8859-1", "ISO-8859-1" }, - { "en_GB.DIS_8859-15", "ISO-8859-15" }, - { "en_GB.ISO_8859-1", "ISO-8859-1" }, - { "en_US.DIS_8859-15", "ISO-8859-15" }, - { "en_US.ISO_8859-1", "ISO-8859-1" }, - { "es_ES.DIS_8859-15", "ISO-8859-15" }, - { "es_ES.ISO_8859-1", "ISO-8859-1" }, - { "fi_FI.DIS_8859-15", "ISO-8859-15" }, - { "fi_FI.ISO_8859-1", "ISO-8859-1" }, - { "fr_BE.DIS_8859-15", "ISO-8859-15" }, - { "fr_BE.ISO_8859-1", "ISO-8859-1" }, - { "fr_CA.DIS_8859-15", "ISO-8859-15" }, - { "fr_CA.ISO_8859-1", "ISO-8859-1" }, - { "fr_CH.DIS_8859-15", "ISO-8859-15" }, - { "fr_CH.ISO_8859-1", "ISO-8859-1" }, - { "fr_FR.DIS_8859-15", "ISO-8859-15" }, - { "fr_FR.ISO_8859-1", "ISO-8859-1" }, - { "hr_HR.ISO_8859-2", "ISO-8859-2" }, - { "hu_HU.ISO_8859-2", "ISO-8859-2" }, - { "is_IS.DIS_8859-15", "ISO-8859-15" }, - { "is_IS.ISO_8859-1", "ISO-8859-1" }, - { "it_CH.DIS_8859-15", "ISO-8859-15" }, - { "it_CH.ISO_8859-1", "ISO-8859-1" }, - { "it_IT.DIS_8859-15", "ISO-8859-15" }, - { "it_IT.ISO_8859-1", "ISO-8859-1" }, - { "ja_JP.EUC", "EUC-JP" }, - { "ja_JP.SJIS", "SHIFT_JIS" }, - { "ja_JP.Shift_JIS", "SHIFT_JIS" }, - { "ko_KR.EUC", "EUC-KR" }, - { "la_LN.ASCII", "ASCII" }, - { "la_LN.DIS_8859-15", "ISO-8859-15" }, - { "la_LN.ISO_8859-1", "ISO-8859-1" }, - { "la_LN.ISO_8859-2", "ISO-8859-2" }, - { "la_LN.ISO_8859-4", "ISO-8859-4" }, - { "lt_LN.ASCII", "ASCII" }, - { "lt_LN.DIS_8859-15", "ISO-8859-15" }, - { "lt_LN.ISO_8859-1", "ISO-8859-1" }, - { "lt_LN.ISO_8859-2", "ISO-8859-2" }, - { "lt_LT.ISO_8859-4", "ISO-8859-4" }, - { "nl_BE.DIS_8859-15", "ISO-8859-15" }, - { "nl_BE.ISO_8859-1", "ISO-8859-1" }, - { "nl_NL.DIS_8859-15", "ISO-8859-15" }, - { "nl_NL.ISO_8859-1", "ISO-8859-1" }, - { "no_NO.DIS_8859-15", "ISO-8859-15" }, - { "no_NO.ISO_8859-1", "ISO-8859-1" }, - { "pl_PL.ISO_8859-2", "ISO-8859-2" }, - { "pt_PT.DIS_8859-15", "ISO-8859-15" }, - { "pt_PT.ISO_8859-1", "ISO-8859-1" }, - { "ru_RU.CP866", "CP866" }, - { "ru_RU.ISO_8859-5", "ISO-8859-5" }, - { "ru_RU.KOI8-R", "KOI8-R" }, - { "ru_SU.CP866", "CP866" }, - { "ru_SU.ISO_8859-5", "ISO-8859-5" }, - { "ru_SU.KOI8-R", "KOI8-R" }, - { "sl_SI.ISO_8859-2", "ISO-8859-2" }, - { "sv_SE.DIS_8859-15", "ISO-8859-15" }, - { "sv_SE.ISO_8859-1", "ISO-8859-1" }, - { "uk_UA.KOI8-U", "KOI8-U" }, - { "zh_CN.EUC", "GB2312" }, - { "zh_TW.BIG5", "BIG5" }, - { "zh_TW.Big5", "BIG5" } -# define locale_table_defined +# if defined VMS + /* To avoid the troubles of an extra file charset.alias_vms in the + sources of many GNU packages, simply inline the aliases here. */ + /* The list of encodings is taken from the OpenVMS 7.3-1 documentation + "Compaq C Run-Time Library Reference Manual for OpenVMS systems" + section 10.7 "Handling Different Character Sets". */ + cp = "ISO8859-1" "\0" "ISO-8859-1" "\0" + "ISO8859-2" "\0" "ISO-8859-2" "\0" + "ISO8859-5" "\0" "ISO-8859-5" "\0" + "ISO8859-7" "\0" "ISO-8859-7" "\0" + "ISO8859-8" "\0" "ISO-8859-8" "\0" + "ISO8859-9" "\0" "ISO-8859-9" "\0" + /* Japanese */ + "eucJP" "\0" "EUC-JP" "\0" + "SJIS" "\0" "SHIFT_JIS" "\0" + "DECKANJI" "\0" "DEC-KANJI" "\0" + "SDECKANJI" "\0" "EUC-JP" "\0" + /* Chinese */ + "eucTW" "\0" "EUC-TW" "\0" + "DECHANYU" "\0" "DEC-HANYU" "\0" + "DECHANZI" "\0" "GB2312" "\0" + /* Korean */ + "DECKOREAN" "\0" "EUC-KR" "\0"; # endif -# if defined __DJGPP__ /* DOS / DJGPP 2.03 */ - /* The encodings given here may not all be correct. - If you find that the encoding given for your language and - country is not the one your DOS machine actually uses, just - correct it in this file, and send a mail to - Juan Manuel Guerrero - and . */ - { "C", "ASCII" }, - { "ar", "CP864" }, - { "ar_AE", "CP864" }, - { "ar_DZ", "CP864" }, - { "ar_EG", "CP864" }, - { "ar_IQ", "CP864" }, - { "ar_IR", "CP864" }, - { "ar_JO", "CP864" }, - { "ar_KW", "CP864" }, - { "ar_MA", "CP864" }, - { "ar_OM", "CP864" }, - { "ar_QA", "CP864" }, - { "ar_SA", "CP864" }, - { "ar_SY", "CP864" }, - { "be", "CP866" }, - { "be_BE", "CP866" }, - { "bg", "CP866" }, /* not CP855 ?? */ - { "bg_BG", "CP866" }, /* not CP855 ?? */ - { "ca", "CP850" }, - { "ca_ES", "CP850" }, - { "cs", "CP852" }, - { "cs_CZ", "CP852" }, - { "da", "CP865" }, /* not CP850 ?? */ - { "da_DK", "CP865" }, /* not CP850 ?? */ - { "de", "CP850" }, - { "de_AT", "CP850" }, - { "de_CH", "CP850" }, - { "de_DE", "CP850" }, - { "el", "CP869" }, - { "el_GR", "CP869" }, - { "en", "CP850" }, - { "en_AU", "CP850" }, /* not CP437 ?? */ - { "en_CA", "CP850" }, - { "en_GB", "CP850" }, - { "en_NZ", "CP437" }, - { "en_US", "CP437" }, - { "en_ZA", "CP850" }, /* not CP437 ?? */ - { "eo", "CP850" }, - { "eo_EO", "CP850" }, - { "es", "CP850" }, - { "es_AR", "CP850" }, - { "es_BO", "CP850" }, - { "es_CL", "CP850" }, - { "es_CO", "CP850" }, - { "es_CR", "CP850" }, - { "es_CU", "CP850" }, - { "es_DO", "CP850" }, - { "es_EC", "CP850" }, - { "es_ES", "CP850" }, - { "es_GT", "CP850" }, - { "es_HN", "CP850" }, - { "es_MX", "CP850" }, - { "es_NI", "CP850" }, - { "es_PA", "CP850" }, - { "es_PE", "CP850" }, - { "es_PY", "CP850" }, - { "es_SV", "CP850" }, - { "es_UY", "CP850" }, - { "es_VE", "CP850" }, - { "et", "CP850" }, - { "et_EE", "CP850" }, - { "eu", "CP850" }, - { "eu_ES", "CP850" }, - { "fi", "CP850" }, - { "fi_FI", "CP850" }, - { "fr", "CP850" }, - { "fr_BE", "CP850" }, - { "fr_CA", "CP850" }, - { "fr_CH", "CP850" }, - { "fr_FR", "CP850" }, - { "ga", "CP850" }, - { "ga_IE", "CP850" }, - { "gd", "CP850" }, - { "gd_GB", "CP850" }, - { "gl", "CP850" }, - { "gl_ES", "CP850" }, - { "he", "CP862" }, - { "he_IL", "CP862" }, - { "hr", "CP852" }, - { "hr_HR", "CP852" }, - { "hu", "CP852" }, - { "hu_HU", "CP852" }, - { "id", "CP850" }, /* not CP437 ?? */ - { "id_ID", "CP850" }, /* not CP437 ?? */ - { "is", "CP861" }, /* not CP850 ?? */ - { "is_IS", "CP861" }, /* not CP850 ?? */ - { "it", "CP850" }, - { "it_CH", "CP850" }, - { "it_IT", "CP850" }, - { "ja", "CP932" }, - { "ja_JP", "CP932" }, - { "kr", "CP949" }, /* not CP934 ?? */ - { "kr_KR", "CP949" }, /* not CP934 ?? */ - { "lt", "CP775" }, - { "lt_LT", "CP775" }, - { "lv", "CP775" }, - { "lv_LV", "CP775" }, - { "mk", "CP866" }, /* not CP855 ?? */ - { "mk_MK", "CP866" }, /* not CP855 ?? */ - { "mt", "CP850" }, - { "mt_MT", "CP850" }, - { "nb", "CP865" }, /* not CP850 ?? */ - { "nb_NO", "CP865" }, /* not CP850 ?? */ - { "nl", "CP850" }, - { "nl_BE", "CP850" }, - { "nl_NL", "CP850" }, - { "nn", "CP865" }, /* not CP850 ?? */ - { "nn_NO", "CP865" }, /* not CP850 ?? */ - { "no", "CP865" }, /* not CP850 ?? */ - { "no_NO", "CP865" }, /* not CP850 ?? */ - { "pl", "CP852" }, - { "pl_PL", "CP852" }, - { "pt", "CP850" }, - { "pt_BR", "CP850" }, - { "pt_PT", "CP850" }, - { "ro", "CP852" }, - { "ro_RO", "CP852" }, - { "ru", "CP866" }, - { "ru_RU", "CP866" }, - { "sk", "CP852" }, - { "sk_SK", "CP852" }, - { "sl", "CP852" }, - { "sl_SI", "CP852" }, - { "sq", "CP852" }, - { "sq_AL", "CP852" }, - { "sr", "CP852" }, /* CP852 or CP866 or CP855 ?? */ - { "sr_CS", "CP852" }, /* CP852 or CP866 or CP855 ?? */ - { "sr_YU", "CP852" }, /* CP852 or CP866 or CP855 ?? */ - { "sv", "CP850" }, - { "sv_SE", "CP850" }, - { "th", "CP874" }, - { "th_TH", "CP874" }, - { "tr", "CP857" }, - { "tr_TR", "CP857" }, - { "uk", "CP1125" }, - { "uk_UA", "CP1125" }, - { "zh_CN", "GBK" }, - { "zh_TW", "CP950" } /* not CP938 ?? */ -# define locale_table_defined + +# if defined WINDOWS_NATIVE || defined __CYGWIN__ + /* 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. */ + + cp = "CP936" "\0" "GBK" "\0" + "CP1361" "\0" "JOHAB" "\0" + "CP20127" "\0" "ASCII" "\0" + "CP20866" "\0" "KOI8-R" "\0" + "CP20936" "\0" "GB2312" "\0" + "CP21866" "\0" "KOI8-RU" "\0" + "CP28591" "\0" "ISO-8859-1" "\0" + "CP28592" "\0" "ISO-8859-2" "\0" + "CP28593" "\0" "ISO-8859-3" "\0" + "CP28594" "\0" "ISO-8859-4" "\0" + "CP28595" "\0" "ISO-8859-5" "\0" + "CP28596" "\0" "ISO-8859-6" "\0" + "CP28597" "\0" "ISO-8859-7" "\0" + "CP28598" "\0" "ISO-8859-8" "\0" + "CP28599" "\0" "ISO-8859-9" "\0" + "CP28605" "\0" "ISO-8859-15" "\0" + "CP38598" "\0" "ISO-8859-8" "\0" + "CP51932" "\0" "EUC-JP" "\0" + "CP51936" "\0" "GB2312" "\0" + "CP51949" "\0" "EUC-KR" "\0" + "CP51950" "\0" "EUC-TW" "\0" + "CP54936" "\0" "GB18030" "\0" + "CP65001" "\0" "UTF-8" "\0"; # endif -# ifndef locale_table_defined - /* Just a dummy entry, to avoid a C syntax error. */ - { "", "" } +# 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; + } + + return cp; +} /* Determine the current locale's character encoding, and canonicalize it - into one of the canonical names listed in localcharset.h. + into one of the canonical names listed in config.charset. The result must not be freed; it is statically allocated. If the canonical name cannot be determined, the result is a non-canonical name. */ @@ -687,8 +393,9 @@ const char * locale_charset (void) { const char *codeset; + const char *aliases; -#if HAVE_LANGINFO_CODESET || defined WINDOWS_NATIVE || defined OS2 +#if !(defined WINDOWS_NATIVE || defined OS2) # if HAVE_LANGINFO_CODESET @@ -751,11 +458,37 @@ locale_charset (void) } # endif - if (codeset == NULL) - /* The canonical name cannot be determined. */ - codeset = ""; +# else + + /* On old systems which lack it, use setlocale or getenv. */ + const char *locale = NULL; + + /* But most old systems don't have a complete set of locales. Some + (like SunOS 4 or DJGPP) have only the C locale. Therefore we don't + use setlocale here; it would return "C" when it doesn't support the + locale name the user has set. */ +# if 0 + locale = setlocale (LC_CTYPE, NULL); +# endif + if (locale == NULL || locale[0] == '\0') + { + locale = getenv ("LC_ALL"); + if (locale == NULL || locale[0] == '\0') + { + locale = getenv ("LC_CTYPE"); + if (locale == NULL || locale[0] == '\0') + locale = getenv ("LANG"); + } + } + + /* On some old systems, one used to set locale = "iso8859_1". On others, + you set it to "language_COUNTRY.charset". In any case, we resolve it + through the charset.alias file. */ + codeset = locale; -# elif defined WINDOWS_NATIVE +# endif + +#elif defined WINDOWS_NATIVE static char buf[2 + 10 + 1]; @@ -774,7 +507,7 @@ locale_charset (void) current_locale = setlocale (LC_CTYPE, NULL); pdot = strrchr (current_locale, '.'); - if (pdot && 2 + strlen (pdot + 1) + 1 <= sizeof (buf)) + if (pdot) sprintf (buf, "CP%s", pdot + 1); else { @@ -789,7 +522,7 @@ locale_charset (void) } codeset = buf; -# elif defined OS2 +#elif defined OS2 const char *locale; static char buf[2 + 10 + 1]; @@ -846,144 +579,28 @@ locale_charset (void) } } -# else - -# error "Add code for other platforms here." - -# endif - - /* Resolve alias. */ - { -# ifdef alias_table_defined - /* On some platforms, UTF-8 locales are the most frequently used ones. - Speed up the common case and slow down the less common cases by - testing for this case first. */ -# if defined __OpenBSD__ || (defined __APPLE__ && defined __MACH__) || defined __sun || defined __CYGWIN__ - if (strcmp (codeset, "UTF-8") == 0) - goto done_table_lookup; - else -# endif - { - const struct table_entry * const table = alias_table; - size_t const table_size = - sizeof (alias_table) / sizeof (struct table_entry); - /* The table is sorted. Perform a binary search. */ - size_t hi = table_size; - size_t lo = 0; - while (lo < hi) - { - /* Invariant: - for i < lo, strcmp (table[i].alias, codeset) < 0, - for i >= hi, strcmp (table[i].alias, codeset) > 0. */ - size_t mid = (hi + lo) >> 1; /* >= lo, < hi */ - int cmp = strcmp (table[mid].alias, codeset); - if (cmp < 0) - lo = mid + 1; - else if (cmp > 0) - hi = mid; - else - { - /* Found an i with - strcmp (table[i].alias, codeset) == 0. */ - codeset = table[mid].canonical; - goto done_table_lookup; - } - } - } - if (0) - done_table_lookup: ; - else -# endif - { - /* Did not find it in the table. */ - /* On Mac OS X, all modern locales use the UTF-8 encoding. - BeOS and Haiku have a single locale, and it has UTF-8 encoding. */ -# if (defined __APPLE__ && defined __MACH__) || defined __BEOS__ || defined __HAIKU__ - codeset = "UTF-8"; -# else - /* Don't return an empty string. GNU libc and GNU libiconv interpret - the empty string as denoting "the locale's character encoding", - thus GNU libiconv would call this function a second time. */ - if (codeset[0] == '\0') - codeset = "ASCII"; -# endif - } - } - -#else - - /* On old systems which lack it, use setlocale or getenv. */ - const char *locale = NULL; +#endif - /* But most old systems don't have a complete set of locales. Some - (like DJGPP) have only the C locale. Therefore we don't use setlocale - here; it would return "C" when it doesn't support the locale name the - user has set. */ -# if 0 - locale = setlocale (LC_CTYPE, NULL); -# endif - if (locale == NULL || locale[0] == '\0') - { - locale = getenv ("LC_ALL"); - if (locale == NULL || locale[0] == '\0') - { - locale = getenv ("LC_CTYPE"); - if (locale == NULL || locale[0] == '\0') - locale = getenv ("LANG"); - if (locale == NULL) - locale = ""; - } - } + if (codeset == NULL) + /* The canonical name cannot be determined. */ + codeset = ""; - /* Map locale name to canonical encoding name. */ - { -# ifdef locale_table_defined - const struct table_entry * const table = locale_table; - size_t const table_size = - sizeof (locale_table) / sizeof (struct table_entry); - /* The table is sorted. Perform a binary search. */ - size_t hi = table_size; - size_t lo = 0; - while (lo < hi) + /* Resolve alias. */ + for (aliases = get_charset_aliases (); + *aliases != '\0'; + aliases += strlen (aliases) + 1, aliases += strlen (aliases) + 1) + if (strcmp (codeset, aliases) == 0 + || (aliases[0] == '*' && aliases[1] == '\0')) { - /* Invariant: - for i < lo, strcmp (table[i].locale, locale) < 0, - for i >= hi, strcmp (table[i].locale, locale) > 0. */ - size_t mid = (hi + lo) >> 1; /* >= lo, < hi */ - int cmp = strcmp (table[mid].locale, locale); - if (cmp < 0) - lo = mid + 1; - else if (cmp > 0) - hi = mid; - else - { - /* Found an i with - strcmp (table[i].locale, locale) == 0. */ - codeset = table[mid].canonical; - goto done_table_lookup; - } + codeset = aliases + strlen (aliases) + 1; + break; } - if (0) - done_table_lookup: ; - else -# endif - { - /* Did not find it in the table. */ - /* On Mac OS X, all modern locales use the UTF-8 encoding. - BeOS and Haiku have a single locale, and it has UTF-8 encoding. */ -# if (defined __APPLE__ && defined __MACH__) || defined __BEOS__ || defined __HAIKU__ - codeset = "UTF-8"; -# else - /* The canonical name cannot be determined. */ - /* Don't return an empty string. GNU libc and GNU libiconv interpret - the empty string as denoting "the locale's character encoding", - thus GNU libiconv would call this function a second time. */ - codeset = "ASCII"; -# endif - } - } -#endif + /* Don't return an empty string. GNU libc and GNU libiconv interpret + the empty string as denoting "the locale's character encoding", + thus GNU libiconv would call this function a second time. */ + if (codeset[0] == '\0') + codeset = "ASCII"; #ifdef DARWIN7 /* Mac OS X sets MB_CUR_MAX to 1 when LC_ALL=C, and "UTF-8" diff --git a/gdb/gnulib/import/localcharset.h b/gdb/gnulib/import/localcharset.h index e4ba2960ba4..915182e328c 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-2018 Free Software Foundation, Inc. + Copyright (C) 2000-2003, 2009-2016 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 @@ -13,7 +13,7 @@ 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 . */ + with this program; if not, see . */ #ifndef _LOCALCHARSET_H #define _LOCALCHARSET_H @@ -25,106 +25,12 @@ extern "C" { /* Determine the current locale's character encoding, and canonicalize it - into one of the canonical names listed below. + into one of the canonical names listed in config.charset. The result must not be freed; it is statically allocated. If the canonical name cannot be determined, the result is a non-canonical name. */ extern const char * locale_charset (void); -/* About GNU canonical names for character encodings: - - Every canonical name must be supported by GNU libiconv. Support by GNU libc - is also desirable. - - The name is case insensitive. Usually an upper case MIME charset name is - preferred. - - The current list of these GNU canonical names is: - - name MIME? used by which systems - (darwin = Mac OS X, windows = native Windows) - - ASCII, ANSI_X3.4-1968 glibc solaris freebsd netbsd darwin minix cygwin - ISO-8859-1 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin - ISO-8859-2 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin - ISO-8859-3 Y glibc solaris cygwin - ISO-8859-4 Y hpux osf solaris freebsd netbsd openbsd darwin - ISO-8859-5 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin - ISO-8859-6 Y glibc aix hpux solaris cygwin - ISO-8859-7 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin - ISO-8859-8 Y glibc aix hpux osf solaris cygwin - ISO-8859-9 Y glibc aix hpux irix osf solaris freebsd darwin cygwin - ISO-8859-13 glibc hpux solaris freebsd netbsd openbsd darwin cygwin - ISO-8859-14 glibc cygwin - ISO-8859-15 glibc aix irix osf solaris freebsd netbsd openbsd darwin cygwin - KOI8-R Y glibc hpux solaris freebsd netbsd openbsd darwin - KOI8-U Y glibc freebsd netbsd openbsd darwin cygwin - KOI8-T glibc - CP437 dos - CP775 dos - CP850 aix osf dos - CP852 dos - CP855 dos - CP856 aix - CP857 dos - CP861 dos - CP862 dos - CP864 dos - CP865 dos - CP866 freebsd netbsd openbsd darwin dos - CP869 dos - CP874 windows dos - CP922 aix - CP932 aix cygwin windows dos - CP943 aix - CP949 osf darwin windows dos - CP950 windows dos - CP1046 aix - CP1124 aix - CP1125 dos - CP1129 aix - CP1131 freebsd darwin - CP1250 windows - CP1251 glibc hpux solaris freebsd netbsd openbsd darwin cygwin windows - CP1252 aix windows - CP1253 windows - CP1254 windows - CP1255 glibc windows - CP1256 windows - CP1257 windows - GB2312 Y glibc aix hpux irix solaris freebsd netbsd darwin cygwin - EUC-JP Y glibc aix hpux irix osf solaris freebsd netbsd darwin cygwin - EUC-KR Y glibc aix hpux irix osf solaris freebsd netbsd darwin cygwin - EUC-TW glibc aix hpux irix osf solaris netbsd - BIG5 Y glibc aix hpux osf solaris freebsd netbsd darwin cygwin - BIG5-HKSCS glibc hpux solaris netbsd darwin - GBK glibc aix osf solaris freebsd darwin cygwin windows dos - GB18030 glibc hpux solaris freebsd netbsd darwin - SHIFT_JIS Y hpux osf solaris freebsd netbsd darwin - JOHAB glibc solaris windows - TIS-620 glibc aix hpux osf solaris cygwin - VISCII Y glibc - TCVN5712-1 glibc - ARMSCII-8 glibc freebsd netbsd darwin - GEORGIAN-PS glibc cygwin - PT154 glibc netbsd cygwin - HP-ROMAN8 hpux - HP-ARABIC8 hpux - HP-GREEK8 hpux - HP-HEBREW8 hpux - HP-TURKISH8 hpux - HP-KANA8 hpux - DEC-KANJI osf - DEC-HANYU osf - UTF-8 Y glibc aix hpux osf solaris netbsd darwin cygwin - - Note: Names which are not marked as being a MIME name should not be used in - Internet protocols for information interchange (mail, news, etc.). - - Note: ASCII and ANSI_X3.4-1968 are synonymous canonical names. Applications - must understand both names and treat them as equivalent. - */ - #ifdef __cplusplus } diff --git a/gdb/gnulib/import/localtime-buffer.c b/gdb/gnulib/import/localtime-buffer.c deleted file mode 100644 index df11f4321db..00000000000 --- a/gdb/gnulib/import/localtime-buffer.c +++ /dev/null @@ -1,58 +0,0 @@ -/* Provide access to the last buffer returned by localtime() or gmtime(). - - Copyright (C) 2001-2003, 2005-2007, 2009-2018 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 "localtime-buffer.h" - -#if GETTIMEOFDAY_CLOBBERS_LOCALTIME || TZSET_CLOBBERS_LOCALTIME - -static struct tm tm_zero_buffer; -struct tm *localtime_buffer_addr = &tm_zero_buffer; - -/* This is a wrapper for localtime. - - 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 diff --git a/gdb/gnulib/import/localtime-buffer.h b/gdb/gnulib/import/localtime-buffer.h deleted file mode 100644 index f381ff0e6de..00000000000 --- a/gdb/gnulib/import/localtime-buffer.h +++ /dev/null @@ -1,27 +0,0 @@ -/* Provide access to the last buffer returned by localtime() or gmtime(). - - Copyright (C) 2001-2003, 2005-2007, 2009-2018 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 - -#if GETTIMEOFDAY_CLOBBERS_LOCALTIME || TZSET_CLOBBERS_LOCALTIME - -/* The address of the last buffer returned by localtime() or gmtime(). */ -extern struct tm *localtime_buffer_addr; - -#endif diff --git a/gdb/gnulib/import/lstat.c b/gdb/gnulib/import/lstat.c index 5873bbd67c9..03b063436d4 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-2018 Free Software Foundation, Inc. + Copyright (C) 1997-2006, 2008-2016 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ /* written by Jim Meyering */ @@ -47,8 +47,6 @@ orig_lstat (const char *filename, struct stat *buf) above. */ # include "sys/stat.h" -# include "stat-time.h" - # include # include @@ -68,33 +66,32 @@ orig_lstat (const char *filename, struct stat *buf) int rpl_lstat (const char *file, struct stat *sbuf) { - int result = orig_lstat (file, sbuf); + size_t len; + int lstat_result = orig_lstat (file, sbuf); + + if (lstat_result != 0) + return lstat_result; /* This replacement file can blindly check against '/' rather than using the ISSLASH macro, because all platforms with '\\' either lack symlinks (mingw) or have working lstat (cygwin) and thus do not compile this file. 0 len should have already been filtered out above, with a failure return of ENOENT. */ - if (result == 0) + len = strlen (file); + if (file[len - 1] != '/' || S_ISDIR (sbuf->st_mode)) + return 0; + + /* At this point, a trailing slash is only permitted on + symlink-to-dir; but it should have found information on the + directory, not the symlink. Call stat() to get info about the + link's referent. Our replacement stat guarantees valid results, + even if the symlink is not pointing to a directory. */ + if (!S_ISLNK (sbuf->st_mode)) { - if (S_ISDIR (sbuf->st_mode) || file[strlen (file) - 1] != '/') - result = stat_time_normalize (result, sbuf); - else - { - /* At this point, a trailing slash is permitted only on - symlink-to-dir; but it should have found information on the - directory, not the symlink. Call 'stat' to get info about the - link's referent. Our replacement stat guarantees valid results, - even if the symlink is not pointing to a directory. */ - if (!S_ISLNK (sbuf->st_mode)) - { - errno = ENOTDIR; - return -1; - } - result = stat (file, sbuf); - } + errno = ENOTDIR; + return -1; } - return result; + return stat (file, sbuf); } #endif /* HAVE_LSTAT */ diff --git a/gdb/gnulib/import/m4/00gnulib.m4 b/gdb/gnulib/import/m4/00gnulib.m4 index bd24796a670..bb37e32aa3c 100644 --- a/gdb/gnulib/import/m4/00gnulib.m4 +++ b/gdb/gnulib/import/m4/00gnulib.m4 @@ -1,5 +1,5 @@ # 00gnulib.m4 serial 3 -dnl Copyright (C) 2009-2018 Free Software Foundation, Inc. +dnl Copyright (C) 2009-2016 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/__inline.m4 b/gdb/gnulib/import/m4/__inline.m4 deleted file mode 100644 index 3d0c4798997..00000000000 --- a/gdb/gnulib/import/m4/__inline.m4 +++ /dev/null @@ -1,22 +0,0 @@ -# Test for __inline keyword -dnl Copyright 2017-2018 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___INLINE], -[ - AC_CACHE_CHECK([whether the compiler supports the __inline keyword], - [gl_cv_c___inline], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[typedef int foo_t; - static __inline foo_t foo (void) { return 0; }]], - [[return foo ();]])], - [gl_cv_c___inline=yes], - [gl_cv_c___inline=no])]) - if test $gl_cv_c___inline = yes; then - AC_DEFINE([HAVE___INLINE], [1], - [Define to 1 if the compiler supports the keyword '__inline'.]) - fi -]) diff --git a/gdb/gnulib/import/m4/absolute-header.m4 b/gdb/gnulib/import/m4/absolute-header.m4 index 4e67e5fab2a..7ffc38d7a2b 100644 --- a/gdb/gnulib/import/m4/absolute-header.m4 +++ b/gdb/gnulib/import/m4/absolute-header.m4 @@ -1,5 +1,5 @@ # absolute-header.m4 serial 16 -dnl Copyright (C) 2006-2018 Free Software Foundation, Inc. +dnl Copyright (C) 2006-2016 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/alloca.m4 b/gdb/gnulib/import/m4/alloca.m4 index b9d94e89a74..2382ff1eeea 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-2018 Free Software Foundation, +dnl Copyright (C) 2002-2004, 2006-2007, 2009-2016 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, @@ -44,12 +44,12 @@ AC_DEFUN([gl_FUNC_ALLOCA], AC_DEFUN([gl_PREREQ_ALLOCA], [:]) # This works around a bug in autoconf <= 2.68. -# See . +# See . m4_version_prereq([2.69], [] ,[ # This is taken from the following Autoconf patch: -# https://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=6cd9f12520b0d6f76d3230d7565feba1ecf29497 +# http://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=6cd9f12520b0d6f76d3230d7565feba1ecf29497 # _AC_LIBOBJ_ALLOCA # ----------------- diff --git a/gdb/gnulib/import/m4/builtin-expect.m4 b/gdb/gnulib/import/m4/builtin-expect.m4 deleted file mode 100644 index a1eaf965b45..00000000000 --- a/gdb/gnulib/import/m4/builtin-expect.m4 +++ /dev/null @@ -1,49 +0,0 @@ -dnl Check for __builtin_expect. - -dnl Copyright 2016-2018 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl Written by Paul Eggert. - -AC_DEFUN([gl___BUILTIN_EXPECT], -[ - AC_CACHE_CHECK([for __builtin_expect], - [gl_cv___builtin_expect], - [AC_LINK_IFELSE( - [AC_LANG_SOURCE([[ - int - main (int argc, char **argv) - { - argc = __builtin_expect (argc, 100); - return argv[argc != 100][0]; - }]])], - [gl_cv___builtin_expect=yes], - [AC_LINK_IFELSE( - [AC_LANG_SOURCE([[ - #include - int - main (int argc, char **argv) - { - argc = __builtin_expect (argc, 100); - return argv[argc != 100][0]; - }]])], - [gl_cv___builtin_expect="in "], - [gl_cv___builtin_expect=no])])]) - if test "$gl_cv___builtin_expect" = yes; then - AC_DEFINE([HAVE___BUILTIN_EXPECT], [1]) - elif test "$gl_cv___builtin_expect" = "in "; then - AC_DEFINE([HAVE___BUILTIN_EXPECT], [2]) - fi - AH_VERBATIM([HAVE___BUILTIN_EXPECT], - [/* Define to 1 if the compiler supports __builtin_expect, - and to 2 if does. */ -#undef HAVE___BUILTIN_EXPECT -#ifndef HAVE___BUILTIN_EXPECT -# define __builtin_expect(e, c) (e) -#elif HAVE___BUILTIN_EXPECT == 2 -# include -#endif - ]) -]) diff --git a/gdb/gnulib/import/m4/canonicalize.m4 b/gdb/gnulib/import/m4/canonicalize.m4 index 0c238946be0..cbbf3e26724 100644 --- a/gdb/gnulib/import/m4/canonicalize.m4 +++ b/gdb/gnulib/import/m4/canonicalize.m4 @@ -1,6 +1,6 @@ -# canonicalize.m4 serial 29 +# canonicalize.m4 serial 28 -dnl Copyright (C) 2003-2007, 2009-2018 Free Software Foundation, Inc. +dnl Copyright (C) 2003-2007, 2009-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -35,8 +35,8 @@ AC_DEFUN([gl_CANONICALIZE_LGPL], HAVE_REALPATH=0 else case "$gl_cv_func_realpath_works" in - *yes) ;; - *) REPLACE_REALPATH=1 ;; + *yes) ;; + *) REPLACE_REALPATH=1 ;; esac fi else @@ -113,8 +113,6 @@ AC_DEFUN([gl_FUNC_REALPATH_WORKS], [case "$host_os" in # Guess yes on glibc systems. *-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;; - # Guess no on native Windows. - mingw*) gl_cv_func_realpath_works="guessing no" ;; # If we don't know, assume the worst. *) gl_cv_func_realpath_works="guessing no" ;; esac diff --git a/gdb/gnulib/import/m4/chdir-long.m4 b/gdb/gnulib/import/m4/chdir-long.m4 index 46dbbc42f07..85e7a2284c6 100644 --- a/gdb/gnulib/import/m4/chdir-long.m4 +++ b/gdb/gnulib/import/m4/chdir-long.m4 @@ -1,4 +1,4 @@ -#serial 16 +#serial 15 # Use Gnulib's robust chdir function. # It can handle arbitrarily long directory names, which means @@ -6,7 +6,7 @@ # never fails with ENAMETOOLONG. # Arrange to compile chdir-long.c only on systems that define PATH_MAX. -dnl Copyright (C) 2004-2007, 2009-2018 Free Software Foundation, Inc. +dnl Copyright (C) 2004-2007, 2009-2016 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. @@ -17,14 +17,14 @@ AC_DEFUN([gl_FUNC_CHDIR_LONG], [ AC_REQUIRE([gl_PATHMAX_SNIPPET_PREREQ]) AC_CACHE_CHECK([whether this system has an arbitrary file name length limit], - [gl_cv_have_arbitrary_file_name_length_limit], + gl_cv_have_arbitrary_file_name_length_limit, [AC_EGREP_CPP([have_arbitrary_file_name_length_limit], gl_PATHMAX_SNIPPET[ #ifdef PATH_MAX have_arbitrary_file_name_length_limit #endif], - [gl_cv_have_arbitrary_file_name_length_limit=yes], - [gl_cv_have_arbitrary_file_name_length_limit=no])]) + gl_cv_have_arbitrary_file_name_length_limit=yes, + gl_cv_have_arbitrary_file_name_length_limit=no)]) ]) AC_DEFUN([gl_PREREQ_CHDIR_LONG], [:]) diff --git a/gdb/gnulib/import/m4/close.m4 b/gdb/gnulib/import/m4/close.m4 index f11b17ec7f7..310f076bed8 100644 --- a/gdb/gnulib/import/m4/close.m4 +++ b/gdb/gnulib/import/m4/close.m4 @@ -1,5 +1,5 @@ -# close.m4 serial 9 -dnl Copyright (C) 2008-2018 Free Software Foundation, Inc. +# close.m4 serial 8 +dnl Copyright (C) 2008-2016 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,12 +7,10 @@ dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_CLOSE], [ AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) - m4_ifdef([gl_MSVC_INVAL], [ - AC_REQUIRE([gl_MSVC_INVAL]) - if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then - REPLACE_CLOSE=1 - fi - ]) + AC_REQUIRE([gl_MSVC_INVAL]) + if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then + REPLACE_CLOSE=1 + fi m4_ifdef([gl_PREREQ_SYS_H_WINSOCK2], [ gl_PREREQ_SYS_H_WINSOCK2 if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then diff --git a/gdb/gnulib/import/m4/closedir.m4 b/gdb/gnulib/import/m4/closedir.m4 index 338b5a73c5c..0c9fd82de2a 100644 --- a/gdb/gnulib/import/m4/closedir.m4 +++ b/gdb/gnulib/import/m4/closedir.m4 @@ -1,5 +1,5 @@ -# closedir.m4 serial 6 -dnl Copyright (C) 2011-2018 Free Software Foundation, Inc. +# closedir.m4 serial 5 +dnl Copyright (C) 2011-2016 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,7 +7,6 @@ dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_CLOSEDIR], [ AC_REQUIRE([gl_DIRENT_H_DEFAULTS]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CHECK_FUNCS([closedir]) if test $ac_cv_func_closedir = no; then diff --git a/gdb/gnulib/import/m4/configmake.m4 b/gdb/gnulib/import/m4/configmake.m4 new file mode 100644 index 00000000000..80b92548ca3 --- /dev/null +++ b/gdb/gnulib/import/m4/configmake.m4 @@ -0,0 +1,55 @@ +# configmake.m4 serial 2 +dnl Copyright (C) 2010-2016 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. + +# gl_CONFIGMAKE_PREP +# ------------------ +# Guarantee all of the standard directory variables, even when used with +# 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 + dnl autoconf is too old to provide datarootdir, then reversing the + dnl definition is a reasonable compromise. Only AC_SUBST a variable + dnl if it was not already defined earlier by autoconf. + if test "x$datarootdir" = x; then + AC_SUBST([datarootdir], ['${datadir}']) + fi + dnl Copy the approach used in autoconf 2.60. + if test "x$docdir" = x; then + AC_SUBST([docdir], [m4_ifset([AC_PACKAGE_TARNAME], + ['${datarootdir}/doc/${PACKAGE_TARNAME}'], + ['${datarootdir}/doc/${PACKAGE}'])]) + fi + dnl The remaining variables missing from autoconf 2.59 are easier. + if test "x$htmldir" = x; then + AC_SUBST([htmldir], ['${docdir}']) + fi + if test "x$dvidir" = x; then + AC_SUBST([dvidir], ['${docdir}']) + fi + if test "x$pdfdir" = x; then + AC_SUBST([pdfdir], ['${docdir}']) + fi + if test "x$psdir" = x; then + AC_SUBST([psdir], ['${docdir}']) + fi + if test "x$lispdir" = x; then + AC_SUBST([lispdir], ['${datarootdir}/emacs/site-lisp']) + fi + 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. + AC_SUBST([pkglibexecdir], ['${libexecdir}/${PACKAGE}']) +]) diff --git a/gdb/gnulib/import/m4/d-ino.m4 b/gdb/gnulib/import/m4/d-ino.m4 index 4f8b1a2e6dc..f3ce54c9d88 100644 --- a/gdb/gnulib/import/m4/d-ino.m4 +++ b/gdb/gnulib/import/m4/d-ino.m4 @@ -1,11 +1,11 @@ -# serial 18 +# serial 15 dnl From Jim Meyering. dnl dnl Check whether struct dirent has a member named d_ino. dnl -# Copyright (C) 1997, 1999-2001, 2003-2004, 2006-2007, 2009-2018 Free Software +# Copyright (C) 1997, 1999-2001, 2003-2004, 2006-2007, 2009-2016 Free Software # Foundation, Inc. # This file is free software; the Free Software Foundation @@ -15,7 +15,7 @@ dnl AC_DEFUN([gl_CHECK_TYPE_STRUCT_DIRENT_D_INO], [AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([for d_ino member in directory struct], - [gl_cv_struct_dirent_d_ino], + gl_cv_struct_dirent_d_ino, [AC_RUN_IFELSE( [AC_LANG_PROGRAM( [[#include @@ -29,11 +29,11 @@ AC_DEFUN([gl_CHECK_TYPE_STRUCT_DIRENT_D_INO], return 1; e = readdir (dp); if (! e) - { closedir (dp); return 2; } + return 2; if (lstat (e->d_name, &st) != 0) - { closedir (dp); return 3; } + return 3; if (e->d_ino != st.st_ino) - { closedir (dp); return 4; } + return 4; closedir (dp); return 0; ]])], @@ -42,8 +42,6 @@ AC_DEFUN([gl_CHECK_TYPE_STRUCT_DIRENT_D_INO], [case "$host_os" in # Guess yes on glibc systems with Linux kernel. linux*-gnu*) gl_cv_struct_dirent_d_ino="guessing yes" ;; - # Guess no on native Windows. - mingw*) gl_cv_struct_dirent_d_ino="guessing no" ;; # If we don't know, assume the worst. *) gl_cv_struct_dirent_d_ino="guessing no" ;; esac diff --git a/gdb/gnulib/import/m4/d-type.m4 b/gdb/gnulib/import/m4/d-type.m4 index ab6463d71d5..eda762c47f9 100644 --- a/gdb/gnulib/import/m4/d-type.m4 +++ b/gdb/gnulib/import/m4/d-type.m4 @@ -1,11 +1,11 @@ -# serial 12 +# serial 11 dnl From Jim Meyering. dnl dnl Check whether struct dirent has a member named d_type. dnl -# Copyright (C) 1997, 1999-2004, 2006, 2009-2018 Free Software Foundation, Inc. +# Copyright (C) 1997, 1999-2004, 2006, 2009-2016 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -13,7 +13,7 @@ dnl AC_DEFUN([gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE], [AC_CACHE_CHECK([for d_type member in directory struct], - [gl_cv_struct_dirent_d_type], + gl_cv_struct_dirent_d_type, [AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include #include diff --git a/gdb/gnulib/import/m4/dirent_h.m4 b/gdb/gnulib/import/m4/dirent_h.m4 index b054a920b52..68836a4066b 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-2018 Free Software Foundation, Inc. +dnl Copyright (C) 2008-2016 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 48589b916fc..1d7cb080d8e 100644 --- a/gdb/gnulib/import/m4/dirfd.m4 +++ b/gdb/gnulib/import/m4/dirfd.m4 @@ -1,8 +1,8 @@ -# serial 26 -*- Autoconf -*- +# serial 24 -*- Autoconf -*- dnl Find out how to get the file descriptor associated with an open DIR*. -# Copyright (C) 2001-2006, 2008-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2006, 2008-2016 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. @@ -12,7 +12,6 @@ dnl From Jim Meyering AC_DEFUN([gl_FUNC_DIRFD], [ AC_REQUIRE([gl_DIRENT_H_DEFAULTS]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles dnl Persuade glibc to declare dirfd(). AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) @@ -26,15 +25,15 @@ AC_DEFUN([gl_FUNC_DIRFD], fi AC_CACHE_CHECK([whether dirfd is a macro], - [gl_cv_func_dirfd_macro], + gl_cv_func_dirfd_macro, [AC_EGREP_CPP([dirent_header_defines_dirfd], [ #include #include #ifdef dirfd dirent_header_defines_dirfd #endif], - [gl_cv_func_dirfd_macro=yes], - [gl_cv_func_dirfd_macro=no])]) + gl_cv_func_dirfd_macro=yes, + gl_cv_func_dirfd_macro=no)]) # Use the replacement if we have no function or macro with that name, # or if OS/2 kLIBC whose dirfd() does not work. diff --git a/gdb/gnulib/import/m4/dirname.m4 b/gdb/gnulib/import/m4/dirname.m4 index 820b0478a24..6f8bec32c48 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-2018 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2006, 2009-2016 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 e99d4a368de..dfd3921d1ec 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-2018 Free Software Foundation, Inc. +dnl Copyright (C) 2006, 2008-2016 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/dup.m4 b/gdb/gnulib/import/m4/dup.m4 index ec04d69053b..e30348c8cd4 100644 --- a/gdb/gnulib/import/m4/dup.m4 +++ b/gdb/gnulib/import/m4/dup.m4 @@ -1,5 +1,5 @@ -# dup.m4 serial 6 -dnl Copyright (C) 2011-2018 Free Software Foundation, Inc. +# dup.m4 serial 4 +dnl Copyright (C) 2011-2016 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,13 +7,10 @@ dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_DUP], [ AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - m4_ifdef([gl_MSVC_INVAL], [ - AC_REQUIRE([gl_MSVC_INVAL]) - if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then - REPLACE_DUP=1 - fi - ]) + AC_REQUIRE([gl_MSVC_INVAL]) + if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then + REPLACE_DUP=1 + fi dnl Replace dup() for supporting the gnulib-defined fchdir() function, dnl to keep fchdir's bookkeeping up-to-date. m4_ifdef([gl_FUNC_FCHDIR], [ @@ -34,12 +31,7 @@ AC_DEFUN([gl_FUNC_DUP], ], [gl_cv_func_dup_works=yes], [gl_cv_func_dup_works=no], - [case "$host_os" in - # Guess no on native Windows. - mingw*) gl_cv_func_dup_works="guessing no" ;; - *) gl_cv_func_dup_works="guessing yes" ;; - esac - ]) + [gl_cv_func_dup_works='guessing yes']) ]) case "$gl_cv_func_dup_works" in *yes) ;; diff --git a/gdb/gnulib/import/m4/dup2.m4 b/gdb/gnulib/import/m4/dup2.m4 index c785d37339a..5b68312b1e7 100644 --- a/gdb/gnulib/import/m4/dup2.m4 +++ b/gdb/gnulib/import/m4/dup2.m4 @@ -1,5 +1,5 @@ #serial 25 -dnl Copyright (C) 2002, 2005, 2007, 2009-2018 Free Software Foundation, Inc. +dnl Copyright (C) 2002, 2005, 2007, 2009-2016 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 a5a4e267d8e..63d74defece 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-2018 Free Software Foundation, Inc. +dnl Copyright (C) 2003, 2009-2016 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/environ.m4 b/gdb/gnulib/import/m4/environ.m4 index 68b67eaca4e..9a0ea7e2144 100644 --- a/gdb/gnulib/import/m4/environ.m4 +++ b/gdb/gnulib/import/m4/environ.m4 @@ -1,5 +1,5 @@ # environ.m4 serial 6 -dnl Copyright (C) 2001-2004, 2006-2018 Free Software Foundation, Inc. +dnl Copyright (C) 2001-2004, 2006-2016 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 9dbdedd505a..b111fce0532 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-2018 Free Software Foundation, Inc. +dnl Copyright (C) 2004, 2006, 2008-2016 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/error.m4 b/gdb/gnulib/import/m4/error.m4 index 280fdceafe0..f772bcf580e 100644 --- a/gdb/gnulib/import/m4/error.m4 +++ b/gdb/gnulib/import/m4/error.m4 @@ -1,6 +1,6 @@ #serial 14 -# Copyright (C) 1996-1998, 2001-2004, 2009-2018 Free Software Foundation, Inc. +# Copyright (C) 1996-1998, 2001-2004, 2009-2016 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/exponentd.m4 b/gdb/gnulib/import/m4/exponentd.m4 index 7b02a4c27fb..7869a7d6cb7 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-2018 Free Software Foundation, Inc. +dnl Copyright (C) 2007-2008, 2010-2016 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 136fa61e344..c49cf2c3edf 100644 --- a/gdb/gnulib/import/m4/exponentl.m4 +++ b/gdb/gnulib/import/m4/exponentl.m4 @@ -1,12 +1,11 @@ -# exponentl.m4 serial 4 -dnl Copyright (C) 2007-2018 Free Software Foundation, Inc. +# exponentl.m4 serial 3 +dnl Copyright (C) 2007-2016 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_LONG_DOUBLE_EXPONENT_LOCATION], [ AC_REQUIRE([gl_BIGENDIAN]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([where to find the exponent in a 'long double'], [gl_cv_cc_long_double_expbit0], [ @@ -80,24 +79,9 @@ int main () [gl_cv_cc_long_double_expbit0=`cat conftest.out`], [gl_cv_cc_long_double_expbit0="unknown"], [ - dnl When cross-compiling, in general we don't know. It depends on the + dnl When cross-compiling, we don't know. It depends on the dnl ABI and compiler version. There are too many cases. gl_cv_cc_long_double_expbit0="unknown" - case "$host_os" in - mingw*) # On native Windows (little-endian), we know the result - # in two cases: mingw, MSVC. - AC_EGREP_CPP([Known], [ -#ifdef __MINGW32__ - Known -#endif - ], [gl_cv_cc_long_double_expbit0="word 2 bit 0"]) - AC_EGREP_CPP([Known], [ -#ifdef _MSC_VER - Known -#endif - ], [gl_cv_cc_long_double_expbit0="word 1 bit 20"]) - ;; - esac ]) rm -f conftest.out ]) diff --git a/gdb/gnulib/import/m4/extensions.m4 b/gdb/gnulib/import/m4/extensions.m4 index 71a854f8bfa..e114a6f7290 100644 --- a/gdb/gnulib/import/m4/extensions.m4 +++ b/gdb/gnulib/import/m4/extensions.m4 @@ -1,7 +1,7 @@ -# serial 18 -*- Autoconf -*- +# serial 15 -*- Autoconf -*- # Enable extensions on systems that normally disable them. -# Copyright (C) 2003, 2006-2018 Free Software Foundation, Inc. +# Copyright (C) 2003, 2006-2016 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. @@ -68,14 +68,6 @@ dnl configure.ac when using autoheader 2.62. #ifndef _GNU_SOURCE # undef _GNU_SOURCE #endif -/* Enable NetBSD extensions on NetBSD. */ -#ifndef _NETBSD_SOURCE -# undef _NETBSD_SOURCE -#endif -/* Enable OpenBSD extensions on NetBSD. */ -#ifndef _OPENBSD_SOURCE -# undef _OPENBSD_SOURCE -#endif /* Enable threading extensions on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS @@ -118,11 +110,6 @@ dnl configure.ac when using autoheader 2.62. #ifndef _XOPEN_SOURCE # undef _XOPEN_SOURCE #endif -/* Enable X/Open compliant socket functions that do not require linking - with -lxnet on HP-UX 11.11. */ -#ifndef _HPUX_ALT_XOPEN_SOCKET_API -# undef _HPUX_ALT_XOPEN_SOCKET_API -#endif /* Enable general extensions on Solaris. */ #ifndef __EXTENSIONS__ # undef __EXTENSIONS__ @@ -141,8 +128,6 @@ dnl configure.ac when using autoheader 2.62. AC_DEFINE([_ALL_SOURCE]) AC_DEFINE([_DARWIN_C_SOURCE]) AC_DEFINE([_GNU_SOURCE]) - AC_DEFINE([_NETBSD_SOURCE]) - AC_DEFINE([_OPENBSD_SOURCE]) AC_DEFINE([_POSIX_PTHREAD_SEMANTICS]) AC_DEFINE([__STDC_WANT_IEC_60559_ATTRIBS_EXT__]) AC_DEFINE([__STDC_WANT_IEC_60559_BFP_EXT__]) @@ -168,7 +153,6 @@ dnl configure.ac when using autoheader 2.62. [ac_cv_should_define__xopen_source=yes])])]) test $ac_cv_should_define__xopen_source = yes && AC_DEFINE([_XOPEN_SOURCE], [500]) - AC_DEFINE([_HPUX_ALT_XOPEN_SOCKET_API]) ])# 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 3661cbda5ed..1e578f3deb4 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-2018 Free Software Foundation, Inc. +dnl Copyright 2012-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -11,7 +11,7 @@ AC_DEFUN([gl_EXTERN_INLINE], [/* 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 @@ -25,32 +25,20 @@ AC_DEFUN([gl_EXTERN_INLINE], 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 (ISO C 99 section 6.7.4.(3). - This bug is known to occur on: + from calling static functions. This bug is known to occur on: OS X 10.8 and earlier; see: - https://lists.gnu.org/r/bug-gnulib/2012-12/msg00023.html + 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: - https://lists.gnu.org/r/bug-gnulib/2014-07/msg00104.html + 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. - - GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 - inline semantics, unless -fgnu89-inline is used. It defines a macro - __GNUC_STDC_INLINE__ to indicate this situation or a macro - __GNUC_GNU_INLINE__ to indicate the opposite situation. - GCC 4.2 with -std=c99 or -std=gnu99 implements the GNU C inline - semantics but warns, unless -fgnu89-inline is used: - warning: C99 inline functions are not supported; using GNU89 - warning: to disable this warning use -fgnu89-inline or the gnu_inline function attribute - It defines a macro __GNUC_GNU_INLINE__ to indicate this situation. - */ + 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 \ diff --git a/gdb/gnulib/import/m4/fchdir.m4 b/gdb/gnulib/import/m4/fchdir.m4 index 470b228f7f9..4264166a81f 100644 --- a/gdb/gnulib/import/m4/fchdir.m4 +++ b/gdb/gnulib/import/m4/fchdir.m4 @@ -1,5 +1,5 @@ -# fchdir.m4 serial 24 -dnl Copyright (C) 2006-2018 Free Software Foundation, Inc. +# fchdir.m4 serial 21 +dnl Copyright (C) 2006-2016 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. @@ -31,14 +31,10 @@ AC_DEFUN([gl_FUNC_FCHDIR], [gl_cv_func_open_directory_works=yes], [gl_cv_func_open_directory_works=no], [case "$host_os" in - # Guess yes on Linux systems. - linux-* | linux) gl_cv_func_open_directory_works="guessing yes" ;; - # Guess yes on glibc systems. - *-gnu* | gnu*) gl_cv_func_open_directory_works="guessing yes" ;; - # Guess no on native Windows. - mingw*) gl_cv_func_open_directory_works="guessing no" ;; - # If we don't know, assume the worst. - *) gl_cv_func_open_directory_works="guessing no" ;; + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_open_directory_works="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_open_directory_works="guessing no" ;; esac ])]) case "$gl_cv_func_open_directory_works" in diff --git a/gdb/gnulib/import/m4/fcntl-o.m4 b/gdb/gnulib/import/m4/fcntl-o.m4 index 4dc3daa2faf..24fcf88d094 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 5 -dnl Copyright (C) 2006, 2009-2018 Free Software Foundation, Inc. +# fcntl-o.m4 serial 4 +dnl Copyright (C) 2006, 2009-2016 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. @@ -18,7 +18,6 @@ AC_DEFUN([gl_FCNTL_O_FLAGS], [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])], [AC_REQUIRE([AC_GNU_SOURCE])]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CHECK_HEADERS_ONCE([unistd.h]) AC_CHECK_FUNCS_ONCE([symlink]) AC_CACHE_CHECK([for working fcntl.h], [gl_cv_header_working_fcntl_h], @@ -117,13 +116,7 @@ AC_DEFUN([gl_FCNTL_O_FLAGS], 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #( *) gl_cv_header_working_fcntl_h='no';; esac], - [case "$host_os" in - # Guess 'no' on native Windows. - mingw*) gl_cv_header_working_fcntl_h='no' ;; - *) gl_cv_header_working_fcntl_h=cross-compiling ;; - esac - ]) - ]) + [gl_cv_header_working_fcntl_h=cross-compiling])]) case $gl_cv_header_working_fcntl_h in #( *O_NOATIME* | no | cross-compiling) ac_val=0;; #( diff --git a/gdb/gnulib/import/m4/fcntl.m4 b/gdb/gnulib/import/m4/fcntl.m4 index 46b2445191f..bb61470b2e1 100644 --- a/gdb/gnulib/import/m4/fcntl.m4 +++ b/gdb/gnulib/import/m4/fcntl.m4 @@ -1,5 +1,5 @@ # fcntl.m4 serial 9 -dnl Copyright (C) 2009-2018 Free Software Foundation, Inc. +dnl Copyright (C) 2009-2016 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/fcntl_h.m4 b/gdb/gnulib/import/m4/fcntl_h.m4 index 9fd3ab1a829..ef0d78dde1c 100644 --- a/gdb/gnulib/import/m4/fcntl_h.m4 +++ b/gdb/gnulib/import/m4/fcntl_h.m4 @@ -1,6 +1,6 @@ # serial 15 # Configure fcntl.h. -dnl Copyright (C) 2006-2007, 2009-2018 Free Software Foundation, Inc. +dnl Copyright (C) 2006-2007, 2009-2016 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/fdopendir.m4 b/gdb/gnulib/import/m4/fdopendir.m4 index df44d5edfb4..cadbee3ca97 100644 --- a/gdb/gnulib/import/m4/fdopendir.m4 +++ b/gdb/gnulib/import/m4/fdopendir.m4 @@ -1,7 +1,7 @@ # serial 10 # See if we need to provide fdopendir. -dnl Copyright (C) 2009-2018 Free Software Foundation, Inc. +dnl Copyright (C) 2009-2016 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/filenamecat.m4 b/gdb/gnulib/import/m4/filenamecat.m4 index 1387aeb34d8..b7948802e48 100644 --- a/gdb/gnulib/import/m4/filenamecat.m4 +++ b/gdb/gnulib/import/m4/filenamecat.m4 @@ -1,5 +1,5 @@ # filenamecat.m4 serial 11 -dnl Copyright (C) 2002-2006, 2009-2018 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2006, 2009-2016 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/flexmember.m4 b/gdb/gnulib/import/m4/flexmember.m4 index db93cf35882..155ae9b8120 100644 --- a/gdb/gnulib/import/m4/flexmember.m4 +++ b/gdb/gnulib/import/m4/flexmember.m4 @@ -1,7 +1,7 @@ -# serial 5 +# serial 4 # Check for flexible array member support. -# Copyright (C) 2006, 2009-2018 Free Software Foundation, Inc. +# Copyright (C) 2006, 2009-2016 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. @@ -17,15 +17,12 @@ AC_DEFUN([AC_C_FLEXIBLE_ARRAY_MEMBER], [[#include #include #include - struct m { struct m *next, **list; char name[]; }; - struct s { struct s *p; struct m *m; int n; double d[]; };]], + struct s { int n; double d[]; };]], [[int m = getchar (); size_t nbytes = offsetof (struct s, d) + m * sizeof (double); nbytes += sizeof (struct s) - 1; nbytes -= nbytes % sizeof (struct s); struct s *p = malloc (nbytes); - p->p = p; - p->m = NULL; p->d[0] = 0.0; return p->d != (double *) NULL;]])], [ac_cv_c_flexmember=yes], diff --git a/gdb/gnulib/import/m4/float_h.m4 b/gdb/gnulib/import/m4/float_h.m4 index 02beb853f88..e2887eb5c64 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 12 -dnl Copyright (C) 2007, 2009-2018 Free Software Foundation, Inc. +# float_h.m4 serial 9 +dnl Copyright (C) 2007, 2009-2016 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. @@ -14,7 +14,7 @@ AC_DEFUN([gl_FLOAT_H], aix* | beos* | openbsd* | mirbsd* | irix*) FLOAT_H=float.h ;; - freebsd* | dragonfly*) + freebsd*) case "$host_cpu" in changequote(,)dnl i[34567]86 ) @@ -24,14 +24,10 @@ changequote([,])dnl x86_64 ) # On x86_64 systems, the C compiler may still be generating # 32-bit code. - AC_COMPILE_IFELSE( - [AC_LANG_SOURCE( - [[#if defined __LP64__ || defined __x86_64__ || defined __amd64__ - int ok; - #else - error fail - #endif - ]])], + AC_EGREP_CPP([yes], + [#if defined __LP64__ || defined __x86_64__ || defined __amd64__ + yes + #endif], [], [FLOAT_H=float.h]) ;; @@ -46,7 +42,7 @@ changequote([,])dnl ;; esac case "$host_os" in - aix* | freebsd* | dragonfly* | linux*) + aix* | freebsd* | linux*) if test -n "$FLOAT_H"; then REPLACE_FLOAT_LDBL=1 fi @@ -73,20 +69,14 @@ int main () [gl_cv_func_itold_works=no], [case "$host" in sparc*-*-linux*) - AC_COMPILE_IFELSE( - [AC_LANG_SOURCE( - [[#if defined __LP64__ || defined __arch64__ - int ok; - #else - error fail - #endif - ]])], + AC_EGREP_CPP([yes], + [#if defined __LP64__ || defined __arch64__ + yes + #endif], [gl_cv_func_itold_works="guessing no"], [gl_cv_func_itold_works="guessing yes"]) ;; - # Guess yes on native Windows. - mingw*) gl_cv_func_itold_works="guessing yes" ;; - *) gl_cv_func_itold_works="guessing yes" ;; + *) gl_cv_func_itold_works="guessing yes" ;; esac ]) ]) diff --git a/gdb/gnulib/import/m4/fnmatch.m4 b/gdb/gnulib/import/m4/fnmatch.m4 index a61545ac274..b38f56c4d5c 100644 --- a/gdb/gnulib/import/m4/fnmatch.m4 +++ b/gdb/gnulib/import/m4/fnmatch.m4 @@ -1,6 +1,6 @@ -# Check for fnmatch - serial 13. -*- coding: utf-8 -*- +# Check for fnmatch - serial 9. -*- coding: utf-8 -*- -# Copyright (C) 2000-2007, 2009-2018 Free Software Foundation, Inc. +# Copyright (C) 2000-2007, 2009-2016 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. @@ -13,120 +13,124 @@ AC_DEFUN([gl_FUNC_FNMATCH_POSIX], [ m4_divert_text([DEFAULTS], [gl_fnmatch_required=POSIX]) - AC_REQUIRE([gl_FNMATCH_H]) + dnl Persuade glibc to declare FNM_CASEFOLD etc. + dnl This is only needed if gl_fnmatch_required = GNU. It would be possible + dnl to avoid this dependency for gl_FUNC_FNMATCH_POSIX by putting + dnl gl_FUNC_FNMATCH_GNU into a separate .m4 file. + AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) + + FNMATCH_H= gl_fnmatch_required_lowercase=` echo $gl_fnmatch_required | LC_ALL=C tr '[[A-Z]]' '[[a-z]]' ` - AC_CHECK_FUNCS_ONCE([fnmatch]) - if test $ac_cv_func_fnmatch = no; then - HAVE_FNMATCH=0 + gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}" + AC_CACHE_CHECK([for working $gl_fnmatch_required fnmatch], + [$gl_fnmatch_cache_var], + [dnl Some versions of Solaris, SCO, and the GNU C Library + dnl have a broken or incompatible fnmatch. + dnl So we run a test program. If we are cross-compiling, take no chance. + dnl Thanks to John Oleynick, François Pinard, and Paul Eggert for this + dnl test. + if test $gl_fnmatch_required = GNU; then + gl_fnmatch_gnu_start= + gl_fnmatch_gnu_end= + else + gl_fnmatch_gnu_start='#if 0' + gl_fnmatch_gnu_end='#endif' + fi + AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [[#include + static int + y (char const *pattern, char const *string, int flags) + { + return fnmatch (pattern, string, flags) == 0; + } + static int + n (char const *pattern, char const *string, int flags) + { + return fnmatch (pattern, string, flags) == FNM_NOMATCH; + } + ]], + [[char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]"; + char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]"; + static char const A_1[] = { 'A' - 1, 0 }; + static char const A01[] = { 'A' + 1, 0 }; + static char const a_1[] = { 'a' - 1, 0 }; + static char const a01[] = { 'a' + 1, 0 }; + static char const bs_1[] = { '\\\\' - 1, 0 }; + static char const bs01[] = { '\\\\' + 1, 0 }; + int result = 0; + if (!n ("a*", "", 0)) + return 1; + if (!y ("a*", "abc", 0)) + return 1; + if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */ + return 1; + if (!n ("d*/*1", "d/s/1", FNM_PATHNAME)) + return 2; + if (!y ("a\\\\bc", "abc", 0)) + return 3; + if (!n ("a\\\\bc", "abc", FNM_NOESCAPE)) + return 3; + if (!y ("*x", ".x", 0)) + return 4; + if (!n ("*x", ".x", FNM_PERIOD)) + return 4; + if (!y (Apat, "\\\\", 0)) + return 5; + if (!y (Apat, "A", 0)) + return 5; + if (!y (apat, "\\\\", 0)) + return 5; + if (!y (apat, "a", 0)) + return 5; + if (!(n (Apat, A_1, 0) == ('A' < '\\\\'))) + return 5; + if (!(n (apat, a_1, 0) == ('a' < '\\\\'))) + return 5; + if (!(y (Apat, A01, 0) == ('A' < '\\\\'))) + return 5; + if (!(y (apat, a01, 0) == ('a' < '\\\\'))) + return 5; + if (!(y (Apat, bs_1, 0) == ('A' < '\\\\'))) + return 5; + if (!(y (apat, bs_1, 0) == ('a' < '\\\\'))) + return 5; + if (!(n (Apat, bs01, 0) == ('A' < '\\\\'))) + return 5; + if (!(n (apat, bs01, 0) == ('a' < '\\\\'))) + return 5; + $gl_fnmatch_gnu_start + if (!y ("xxXX", "xXxX", FNM_CASEFOLD)) + result |= 8; + if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH)) + result |= 16; + if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME)) + result |= 32; + if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR)) + result |= 64; + if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR)) + result |= 64; + if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR)) + result |= 64; + $gl_fnmatch_gnu_end + return result; + ]])], + [eval "$gl_fnmatch_cache_var=yes"], + [eval "$gl_fnmatch_cache_var=no"], + [eval "$gl_fnmatch_cache_var=\"guessing no\""]) + ]) + eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\"" + if test "$gl_fnmatch_result" = yes; then + dnl Not strictly necessary. Only to avoid spurious leftover files if people + dnl don't do "make distclean". + rm -f "$gl_source_base/fnmatch.h" else - gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}" - AC_CACHE_CHECK([for working $gl_fnmatch_required fnmatch], - [$gl_fnmatch_cache_var], - [dnl Some versions of Solaris, SCO, and the GNU C Library - dnl have a broken or incompatible fnmatch. - dnl So we run a test program. If we are cross-compiling, take no chance. - dnl Thanks to John Oleynick, François Pinard, and Paul Eggert for this - dnl test. - if test $gl_fnmatch_required = GNU; then - gl_fnmatch_gnu_start= - gl_fnmatch_gnu_end= - else - gl_fnmatch_gnu_start='#if 0' - gl_fnmatch_gnu_end='#endif' - fi - AC_RUN_IFELSE( - [AC_LANG_PROGRAM( - [[#include - static int - y (char const *pattern, char const *string, int flags) - { - return fnmatch (pattern, string, flags) == 0; - } - static int - n (char const *pattern, char const *string, int flags) - { - return fnmatch (pattern, string, flags) == FNM_NOMATCH; - } - ]], - [[char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]"; - char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]"; - static char const A_1[] = { 'A' - 1, 0 }; - static char const A01[] = { 'A' + 1, 0 }; - static char const a_1[] = { 'a' - 1, 0 }; - static char const a01[] = { 'a' + 1, 0 }; - static char const bs_1[] = { '\\\\' - 1, 0 }; - static char const bs01[] = { '\\\\' + 1, 0 }; - int result = 0; - if (!n ("a*", "", 0)) - return 1; - if (!y ("a*", "abc", 0)) - return 1; - if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */ - return 1; - if (!n ("d*/*1", "d/s/1", FNM_PATHNAME)) - return 2; - if (!y ("a\\\\bc", "abc", 0)) - return 3; - if (!n ("a\\\\bc", "abc", FNM_NOESCAPE)) - return 3; - if (!y ("*x", ".x", 0)) - return 4; - if (!n ("*x", ".x", FNM_PERIOD)) - return 4; - if (!y (Apat, "\\\\", 0)) - return 5; - if (!y (Apat, "A", 0)) - return 5; - if (!y (apat, "\\\\", 0)) - return 5; - if (!y (apat, "a", 0)) - return 5; - if (!(n (Apat, A_1, 0) == ('A' < '\\\\'))) - return 5; - if (!(n (apat, a_1, 0) == ('a' < '\\\\'))) - return 5; - if (!(y (Apat, A01, 0) == ('A' < '\\\\'))) - return 5; - if (!(y (apat, a01, 0) == ('a' < '\\\\'))) - return 5; - if (!(y (Apat, bs_1, 0) == ('A' < '\\\\'))) - return 5; - if (!(y (apat, bs_1, 0) == ('a' < '\\\\'))) - return 5; - if (!(n (Apat, bs01, 0) == ('A' < '\\\\'))) - return 5; - if (!(n (apat, bs01, 0) == ('a' < '\\\\'))) - return 5; - $gl_fnmatch_gnu_start - if (!y ("xxXX", "xXxX", FNM_CASEFOLD)) - result |= 8; - if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH)) - result |= 16; - if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME)) - result |= 32; - if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR)) - result |= 64; - if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR)) - result |= 64; - if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR)) - result |= 64; - $gl_fnmatch_gnu_end - return result; - ]])], - [eval "$gl_fnmatch_cache_var=yes"], - [eval "$gl_fnmatch_cache_var=no"], - [eval "$gl_fnmatch_cache_var=\"guessing no\""]) - ]) - eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\"" - if test "$gl_fnmatch_result" != yes; then - REPLACE_FNMATCH=1 - fi - fi - if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then - gl_REPLACE_FNMATCH_H + FNMATCH_H=fnmatch.h fi + AC_SUBST([FNMATCH_H]) + AM_CONDITIONAL([GL_GENERATE_FNMATCH_H], [test -n "$FNMATCH_H"]) ]) # Request a POSIX compliant fnmatch function with GNU extensions. @@ -139,6 +143,11 @@ AC_DEFUN([gl_FUNC_FNMATCH_GNU], AC_DEFUN([gl_PREREQ_FNMATCH], [ + dnl We must choose a different name for our function, since on ELF systems + dnl a broken fnmatch() in libc.so would override our fnmatch() if it is + dnl compiled into a shared library. + AC_DEFINE_UNQUOTED([fnmatch], [${gl_fnmatch_required_lowercase}_fnmatch], + [Define to a replacement function name for fnmatch().]) dnl Prerequisites of lib/fnmatch.c. AC_REQUIRE([AC_TYPE_MBSTATE_T]) AC_CHECK_DECLS([isblank], [], [], [[#include ]]) diff --git a/gdb/gnulib/import/m4/fnmatch_h.m4 b/gdb/gnulib/import/m4/fnmatch_h.m4 deleted file mode 100644 index 077dfef00d5..00000000000 --- a/gdb/gnulib/import/m4/fnmatch_h.m4 +++ /dev/null @@ -1,75 +0,0 @@ -# fnmatch_h.m4 serial 4 -dnl Copyright (C) 2009-2018 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. - -AC_DEFUN_ONCE([gl_FNMATCH_H], -[ - AC_REQUIRE([gl_FNMATCH_H_DEFAULTS]) - m4_ifdef([gl_ANSI_CXX], [AC_REQUIRE([gl_ANSI_CXX])]) - AC_CHECK_HEADERS_ONCE([fnmatch.h]) - gl_CHECK_NEXT_HEADERS([fnmatch.h]) - - dnl Persuade glibc to declare FNM_CASEFOLD etc. - dnl This is only needed if gl_fnmatch_required = GNU. It would be possible - dnl to avoid this dependency for gl_FUNC_FNMATCH_POSIX by putting - dnl gl_FUNC_FNMATCH_GNU into a separate .m4 file. - AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) - - if test $ac_cv_header_fnmatch_h = yes; then - HAVE_FNMATCH_H=1 - else - HAVE_FNMATCH_H=0 - fi - AC_SUBST([HAVE_FNMATCH_H]) - - m4_ifdef([gl_POSIXCHECK], - [FNMATCH_H=fnmatch.h], - [FNMATCH_H='' - if m4_ifdef([gl_ANSI_CXX], [test "$CXX" != no], [false]); then - dnl Override always, to support the C++ GNULIB_NAMESPACE. - FNMATCH_H=fnmatch.h - else - if test $ac_cv_header_fnmatch_h != yes; then - dnl Provide a substitute file. - FNMATCH_H=fnmatch.h - fi - fi - ]) - AC_SUBST([FNMATCH_H]) - AM_CONDITIONAL([GL_GENERATE_FNMATCH_H], [test -n "$FNMATCH_H"]) - - dnl Check for declarations of anything we want to poison if the - dnl corresponding gnulib module is not in use. - gl_WARN_ON_USE_PREPARE([[#include - ]], - [fnmatch]) -]) - -dnl Unconditionally enables the replacement of . -AC_DEFUN([gl_REPLACE_FNMATCH_H], -[ - AC_REQUIRE([gl_FNMATCH_H_DEFAULTS]) - FNMATCH_H='fnmatch.h' - AM_CONDITIONAL([GL_GENERATE_FNMATCH_H], [test -n "$FNMATCH_H"]) -]) - -AC_DEFUN([gl_FNMATCH_MODULE_INDICATOR], -[ - dnl Use AC_REQUIRE here, so that the default settings are expanded once only. - AC_REQUIRE([gl_FNMATCH_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_FNMATCH_H_DEFAULTS], -[ - GNULIB_FNMATCH=0; AC_SUBST([GNULIB_FNMATCH]) - dnl Assume POSIX behavior unless another module says otherwise. - HAVE_FNMATCH=1; AC_SUBST([HAVE_FNMATCH]) - REPLACE_FNMATCH=0; AC_SUBST([REPLACE_FNMATCH]) -]) diff --git a/gdb/gnulib/import/m4/fpieee.m4 b/gdb/gnulib/import/m4/fpieee.m4 index b58840f789d..e11ac9f09c1 100644 --- a/gdb/gnulib/import/m4/fpieee.m4 +++ b/gdb/gnulib/import/m4/fpieee.m4 @@ -1,5 +1,5 @@ # fpieee.m4 serial 2 -*- coding: utf-8 -*- -dnl Copyright (C) 2007, 2009-2018 Free Software Foundation, Inc. +dnl Copyright (C) 2007, 2009-2016 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. @@ -33,7 +33,7 @@ AC_DEFUN([gl_FP_IEEE], alpha*) # On Alpha systems, a compiler option provides the behaviour. # See the ieee(3) manual page, also available at - # + # if test -n "$GCC"; then # GCC has the option -mieee. # For full IEEE compliance (rarely needed), use option -mieee-with-inexact. diff --git a/gdb/gnulib/import/m4/frexp.m4 b/gdb/gnulib/import/m4/frexp.m4 index 33e07f598b8..23f5821677e 100644 --- a/gdb/gnulib/import/m4/frexp.m4 +++ b/gdb/gnulib/import/m4/frexp.m4 @@ -1,5 +1,5 @@ -# frexp.m4 serial 16 -dnl Copyright (C) 2007-2018 Free Software Foundation, Inc. +# frexp.m4 serial 15 +dnl Copyright (C) 2007-2016 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. @@ -164,17 +164,8 @@ int main() [gl_cv_func_frexp_works=yes], [gl_cv_func_frexp_works=no], [case "$host_os" in - netbsd* | irix*) gl_cv_func_frexp_works="guessing no" ;; - mingw*) # Guess yes with MSVC, no with mingw. - AC_EGREP_CPP([Good], [ -#ifdef _MSC_VER - Good -#endif - ], - [gl_cv_func_frexp_works="guessing yes"], - [gl_cv_func_frexp_works="guessing no"]) - ;; - *) gl_cv_func_frexp_works="guessing yes" ;; + netbsd* | irix* | mingw*) gl_cv_func_frexp_works="guessing no";; + *) gl_cv_func_frexp_works="guessing yes";; esac ]) ]) diff --git a/gdb/gnulib/import/m4/frexpl.m4 b/gdb/gnulib/import/m4/frexpl.m4 index d7845d1943a..0bc6afee31a 100644 --- a/gdb/gnulib/import/m4/frexpl.m4 +++ b/gdb/gnulib/import/m4/frexpl.m4 @@ -1,5 +1,5 @@ -# frexpl.m4 serial 21 -dnl Copyright (C) 2007-2018 Free Software Foundation, Inc. +# frexpl.m4 serial 20 +dnl Copyright (C) 2007-2016 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. @@ -131,7 +131,7 @@ AC_DEFUN([gl_FUNC_FREXPL_WORKS], # undef LDBL_MIN_EXP # define LDBL_MIN_EXP (-16381) #endif -#if defined __i386__ && (defined __FreeBSD__ || defined __DragonFly__) +#if defined __i386__ && defined __FreeBSD__ # undef LDBL_MIN_EXP # define LDBL_MIN_EXP (-16381) #endif diff --git a/gdb/gnulib/import/m4/fstat.m4 b/gdb/gnulib/import/m4/fstat.m4 index f7fc3837ea2..29f9b81654a 100644 --- a/gdb/gnulib/import/m4/fstat.m4 +++ b/gdb/gnulib/import/m4/fstat.m4 @@ -1,22 +1,22 @@ -# fstat.m4 serial 6 -dnl Copyright (C) 2011-2018 Free Software Foundation, Inc. +# fstat.m4 serial 4 +dnl Copyright (C) 2011-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_FSTAT], [ - AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) - case "$host_os" in - mingw* | solaris*) - dnl On MinGW, the original stat() returns st_atime, st_mtime, - dnl st_ctime values that are affected by the time zone. - dnl Solaris stat can return a negative tv_nsec. - REPLACE_FSTAT=1 - ;; - esac + AC_REQUIRE([gl_MSVC_INVAL]) + if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then + REPLACE_FSTAT=1 + fi + + AC_REQUIRE([gl_HEADER_SYS_STAT_H]) + if test $WINDOWS_64_BIT_ST_SIZE = 1; then + REPLACE_FSTAT=1 + fi dnl Replace fstat() for supporting the gnulib-defined open() on directories. m4_ifdef([gl_FUNC_FCHDIR], [ @@ -32,8 +32,5 @@ AC_DEFUN([gl_FUNC_FSTAT], ]) ]) -# Prerequisites of lib/fstat.c and lib/stat-w32.c. -AC_DEFUN([gl_PREREQ_FSTAT], [ - AC_REQUIRE([gl_HEADER_SYS_STAT_H]) - : -]) +# Prerequisites of lib/fstat.c. +AC_DEFUN([gl_PREREQ_FSTAT], [:]) diff --git a/gdb/gnulib/import/m4/fstatat.m4 b/gdb/gnulib/import/m4/fstatat.m4 index ac353bf9ca5..84177f02cf0 100644 --- a/gdb/gnulib/import/m4/fstatat.m4 +++ b/gdb/gnulib/import/m4/fstatat.m4 @@ -1,5 +1,5 @@ -# fstatat.m4 serial 4 -dnl Copyright (C) 2004-2018 Free Software Foundation, Inc. +# fstatat.m4 serial 3 +dnl Copyright (C) 2004-2016 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. @@ -13,14 +13,14 @@ AC_DEFUN([gl_FUNC_FSTATAT], AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) AC_REQUIRE([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK]) - AC_REQUIRE([AC_CANONICAL_HOST]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CHECK_FUNCS_ONCE([fstatat]) if test $ac_cv_func_fstatat = no; then HAVE_FSTATAT=0 else dnl Test for an AIX 7.1 bug; see - dnl . + dnl . AC_CACHE_CHECK([whether fstatat (..., 0) works], [gl_cv_func_fstatat_zero_flag], [AC_RUN_IFELSE( @@ -46,20 +46,15 @@ AC_DEFUN([gl_FUNC_FSTATAT], case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in *yes+*yes) ;; - *) REPLACE_FSTATAT=1 ;; - esac - - case $host_os in - solaris*) - REPLACE_FSTATAT=1 ;; - esac - - case $REPLACE_FSTATAT,$gl_cv_func_fstatat_zero_flag in - 1,*yes) + *) REPLACE_FSTATAT=1 + case $gl_cv_func_fstatat_zero_flag in + *yes) AC_DEFINE([HAVE_WORKING_FSTATAT_ZERO_FLAG], [1], [Define to 1 if fstatat (..., 0) works. For example, it does not work in AIX 7.1.]) ;; + esac + ;; esac fi ]) diff --git a/gdb/gnulib/import/m4/getcwd-abort-bug.m4 b/gdb/gnulib/import/m4/getcwd-abort-bug.m4 index 8904360a2a3..b73f47430b6 100644 --- a/gdb/gnulib/import/m4/getcwd-abort-bug.m4 +++ b/gdb/gnulib/import/m4/getcwd-abort-bug.m4 @@ -1,9 +1,9 @@ -# serial 9 +# serial 7 # Determine whether getcwd aborts when the length of the working directory # name is unusually large. Any length between 4k and 16k trigger the bug # when using glibc-2.4.90-9 or older. -# Copyright (C) 2006, 2009-2018 Free Software Foundation, Inc. +# Copyright (C) 2006, 2009-2016 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. @@ -16,15 +16,9 @@ AC_DEFUN([gl_FUNC_GETCWD_ABORT_BUG], AC_CHECK_DECLS_ONCE([getcwd]) AC_CHECK_HEADERS_ONCE([unistd.h]) AC_REQUIRE([gl_PATHMAX_SNIPPET_PREREQ]) - - gl_CHECK_FUNC_GETPAGESIZE - if test $gl_cv_func_getpagesize = yes; then - AC_DEFINE_UNQUOTED([HAVE_GETPAGESIZE], [1], - [Define to 1 if the system has the 'getpagesize' function.]) - fi - + AC_CHECK_FUNCS([getpagesize]) AC_CACHE_CHECK([whether getcwd aborts when 4k < cwd_length < 16k], - [gl_cv_func_getcwd_abort_bug], + gl_cv_func_getcwd_abort_bug, [# Remove any remnants of a previous test. rm -rf confdir-14B--- # Arrange for deletion of the temporary directory this test creates. @@ -127,20 +121,20 @@ main () return fail; } ]])], - [gl_cv_func_getcwd_abort_bug=no], - [dnl An abort will provoke an exit code of something like 134 (128 + 6). - dnl An exit code of 4 can also occur (in OpenBSD 4.9, NetBSD 5.1 for - dnl example): getcwd (NULL, 0) fails rather than returning a string - dnl longer than PATH_MAX. This may be POSIX compliant (in some - dnl interpretations of POSIX). But gnulib's getcwd module wants to - dnl provide a non-NULL value in this case. - ret=$? - if test $ret -ge 128 || test $ret = 4; then - gl_cv_func_getcwd_abort_bug=yes - else - gl_cv_func_getcwd_abort_bug=no - fi], - [gl_cv_func_getcwd_abort_bug=yes]) - ]) + [gl_cv_func_getcwd_abort_bug=no], + [dnl An abort will provoke an exit code of something like 134 (128 + 6). + dnl An exit code of 4 can also occur (in OpenBSD 4.9, NetBSD 5.1 for + dnl example): getcwd (NULL, 0) fails rather than returning a string + dnl longer than PATH_MAX. This may be POSIX compliant (in some + dnl interpretations of POSIX). But gnulib's getcwd module wants to + dnl provide a non-NULL value in this case. + ret=$? + if test $ret -ge 128 || test $ret = 4; then + gl_cv_func_getcwd_abort_bug=yes + else + gl_cv_func_getcwd_abort_bug=no + fi], + [gl_cv_func_getcwd_abort_bug=yes]) + ]) AS_IF([test $gl_cv_func_getcwd_abort_bug = yes], [$1], [$2]) ]) diff --git a/gdb/gnulib/import/m4/getcwd-path-max.m4 b/gdb/gnulib/import/m4/getcwd-path-max.m4 index 90b1efff699..2531ccff65c 100644 --- a/gdb/gnulib/import/m4/getcwd-path-max.m4 +++ b/gdb/gnulib/import/m4/getcwd-path-max.m4 @@ -1,4 +1,4 @@ -# serial 21 +# serial 19 # Check for several getcwd bugs with long file names. # If so, arrange to compile the wrapper function. @@ -6,7 +6,7 @@ # I've heard that this is due to a Linux kernel bug, and that it has # been fixed between 2.4.21-pre3 and 2.4.21-pre4. -# Copyright (C) 2003-2007, 2009-2018 Free Software Foundation, Inc. +# Copyright (C) 2003-2007, 2009-2016 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. @@ -21,7 +21,7 @@ AC_DEFUN([gl_FUNC_GETCWD_PATH_MAX], AC_CHECK_HEADERS_ONCE([unistd.h]) AC_REQUIRE([gl_PATHMAX_SNIPPET_PREREQ]) AC_CACHE_CHECK([whether getcwd handles long file names properly], - [gl_cv_func_getcwd_path_max], + gl_cv_func_getcwd_path_max, [# Arrange for deletion of the temporary directory this test creates. ac_clean_files="$ac_clean_files confdir3" dnl Please keep this in sync with tests/test-getcwd.c. @@ -202,28 +202,16 @@ main () #endif } ]])], - [gl_cv_func_getcwd_path_max=yes], - [case $? in - 10|11|12) gl_cv_func_getcwd_path_max='no, but it is partly working';; - 31) gl_cv_func_getcwd_path_max='no, it has the AIX bug';; - 32) gl_cv_func_getcwd_path_max='yes, but with shorter paths';; - *) gl_cv_func_getcwd_path_max=no;; - esac], - [# Cross-compilation guesses: - case "$host_os" in - aix*) # On AIX, it has the AIX bug. - gl_cv_func_getcwd_path_max='no, it has the AIX bug' ;; - gnu*) # On Hurd, it is 'yes'. - gl_cv_func_getcwd_path_max=yes ;; - linux* | kfreebsd*) - # On older Linux+glibc it's 'no, but it is partly working', - # on newer Linux+glibc it's 'yes'. - # On Linux+musl libc, it's 'no, but it is partly working'. - # On kFreeBSD+glibc, it's 'no, but it is partly working'. - gl_cv_func_getcwd_path_max='no, but it is partly working' ;; - *) # If we don't know, assume the worst. - gl_cv_func_getcwd_path_max=no ;; - esac - ]) - ]) + [gl_cv_func_getcwd_path_max=yes], + [case $? in + 10|11|12) gl_cv_func_getcwd_path_max='no, but it is partly working';; + 31) gl_cv_func_getcwd_path_max='no, it has the AIX bug';; + 32) gl_cv_func_getcwd_path_max='yes, but with shorter paths';; + *) gl_cv_func_getcwd_path_max=no;; + esac], + [case "$host_os" in + aix*) gl_cv_func_getcwd_path_max='no, it has the AIX bug';; + *) gl_cv_func_getcwd_path_max=no;; + esac]) + ]) ]) diff --git a/gdb/gnulib/import/m4/getcwd.m4 b/gdb/gnulib/import/m4/getcwd.m4 index 019934d5807..566c3c13ea8 100644 --- a/gdb/gnulib/import/m4/getcwd.m4 +++ b/gdb/gnulib/import/m4/getcwd.m4 @@ -1,12 +1,12 @@ # getcwd.m4 - check for working getcwd that is compatible with glibc -# Copyright (C) 2001, 2003-2007, 2009-2018 Free Software Foundation, Inc. +# Copyright (C) 2001, 2003-2007, 2009-2016 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. -# serial 16 +# serial 13 AC_DEFUN([gl_FUNC_GETCWD_NULL], [ @@ -25,7 +25,7 @@ AC_DEFUN([gl_FUNC_GETCWD_NULL], char *getcwd (); # endif ]], [[ -#if defined _WIN32 && ! defined __CYGWIN__ +#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* mingw cwd does not start with '/', but getcwd does allocate. However, mingw fails to honor non-zero size. */ #else @@ -37,9 +37,9 @@ AC_DEFUN([gl_FUNC_GETCWD_NULL], if (! f) return 2; if (f[0] != '/') - { free (f); return 3; } + return 3; if (f[1] != '\0') - { free (f); return 4; } + return 4; free (f); return 0; } @@ -48,12 +48,12 @@ AC_DEFUN([gl_FUNC_GETCWD_NULL], [gl_cv_func_getcwd_null=yes], [gl_cv_func_getcwd_null=no], [[case "$host_os" in - # Guess yes on glibc systems. - *-gnu* | gnu*) gl_cv_func_getcwd_null="guessing yes";; - # Guess yes on Cygwin. - cygwin*) gl_cv_func_getcwd_null="guessing yes";; - # If we don't know, assume the worst. - *) gl_cv_func_getcwd_null="guessing no";; + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_getcwd_null="guessing yes";; + # Guess yes on Cygwin. + cygwin*) gl_cv_func_getcwd_null="guessing yes";; + # If we don't know, assume the worst. + *) gl_cv_func_getcwd_null="guessing no";; esac ]])]) ]) diff --git a/gdb/gnulib/import/m4/getdtablesize.m4 b/gdb/gnulib/import/m4/getdtablesize.m4 index 4cc1a8ff21e..1bf4db043e6 100644 --- a/gdb/gnulib/import/m4/getdtablesize.m4 +++ b/gdb/gnulib/import/m4/getdtablesize.m4 @@ -1,5 +1,5 @@ -# getdtablesize.m4 serial 7 -dnl Copyright (C) 2008-2018 Free Software Foundation, Inc. +# getdtablesize.m4 serial 6 +dnl Copyright (C) 2008-2016 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. @@ -12,43 +12,29 @@ AC_DEFUN([gl_FUNC_GETDTABLESIZE], AC_CHECK_DECLS_ONCE([getdtablesize]) if test $ac_cv_func_getdtablesize = yes && test $ac_cv_have_decl_getdtablesize = yes; then + # Cygwin 1.7.25 automatically increases the RLIMIT_NOFILE soft limit + # up to an unchangeable hard limit; all other platforms correctly + # require setrlimit before getdtablesize() can report a larger value. AC_CACHE_CHECK([whether getdtablesize works], [gl_cv_func_getdtablesize_works], - [dnl There are two concepts: the "maximum possible file descriptor value + 1" - dnl and the "maximum number of open file descriptors in a process". - dnl Per SUSv2 and POSIX, getdtablesize() should return the first one. - dnl On most platforms, the first and the second concept are the same. - dnl On OpenVMS, however, they are different and getdtablesize() returns - dnl the second one; thus the test below fails. But we don't care - dnl because there's no good way to write a replacement getdtablesize(). - case "$host_os" in - vms*) gl_cv_func_getdtablesize_works="no (limitation)" ;; - *) - dnl Cygwin 1.7.25 automatically increases the RLIMIT_NOFILE soft - dnl limit up to an unchangeable hard limit; all other platforms - dnl correctly require setrlimit before getdtablesize() can report - dnl a larger value. - AC_RUN_IFELSE([ - AC_LANG_PROGRAM([[#include ]], - [int size = getdtablesize(); - if (dup2 (0, getdtablesize()) != -1) - return 1; - if (size != getdtablesize()) - return 2; - ])], - [gl_cv_func_getdtablesize_works=yes], - [gl_cv_func_getdtablesize_works=no], - [case "$host_os" in - cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows - gl_cv_func_getdtablesize_works="guessing no" ;; - *) gl_cv_func_getdtablesize_works="guessing yes" ;; - esac - ]) - ;; - esac + [AC_RUN_IFELSE([ + AC_LANG_PROGRAM([[#include ]], + [int size = getdtablesize(); + if (dup2 (0, getdtablesize()) != -1) + return 1; + if (size != getdtablesize()) + return 2; + ])], + [gl_cv_func_getdtablesize_works=yes], + [gl_cv_func_getdtablesize_works=no], + [case "$host_os" in + cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows + gl_cv_func_getdtablesize_works="guessing no" ;; + *) gl_cv_func_getdtablesize_works="guessing yes" ;; + esac]) ]) case "$gl_cv_func_getdtablesize_works" in - *yes | "no (limitation)") ;; + *yes) ;; *) REPLACE_GETDTABLESIZE=1 ;; esac else diff --git a/gdb/gnulib/import/m4/getlogin.m4 b/gdb/gnulib/import/m4/getlogin.m4 deleted file mode 100644 index a564db25c17..00000000000 --- a/gdb/gnulib/import/m4/getlogin.m4 +++ /dev/null @@ -1,32 +0,0 @@ -# getlogin.m4 serial 5 -dnl Copyright (C) 2010-2018 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_GETLOGIN], -[ - AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) - AC_CHECK_DECLS_ONCE([getlogin]) - if test $ac_cv_have_decl_getlogin = no; then - HAVE_DECL_GETLOGIN=0 - fi - AC_CHECK_FUNCS_ONCE([getlogin]) - if test $ac_cv_func_getlogin = no; then - HAVE_GETLOGIN=0 - fi -]) - -dnl Determines the library needed by the implementation of the -dnl getlogin and getlogin_r functions. -AC_DEFUN([gl_LIB_GETLOGIN], -[ - AC_REQUIRE([AC_CANONICAL_HOST]) - case $host_os in - mingw*) - LIB_GETLOGIN='-ladvapi32' ;; - *) - LIB_GETLOGIN= ;; - esac - AC_SUBST([LIB_GETLOGIN]) -]) diff --git a/gdb/gnulib/import/m4/getlogin_r.m4 b/gdb/gnulib/import/m4/getlogin_r.m4 index 0b04a5fba76..80f82f4f926 100644 --- a/gdb/gnulib/import/m4/getlogin_r.m4 +++ b/gdb/gnulib/import/m4/getlogin_r.m4 @@ -1,6 +1,6 @@ -#serial 12 +#serial 11 -# Copyright (C) 2005-2007, 2009-2018 Free Software Foundation, Inc. +# Copyright (C) 2005-2007, 2009-2016 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -30,8 +30,8 @@ AC_DEFUN([gl_FUNC_GETLOGIN_R], HAVE_GETLOGIN_R=0 else HAVE_GETLOGIN_R=1 - dnl On Mac OS X 10.12 and OSF/1 5.1, getlogin_r returns a truncated result - dnl if the buffer is not large enough. + dnl On OSF/1 5.1, getlogin_r returns a truncated result if the buffer is + dnl not large enough. AC_REQUIRE([AC_CANONICAL_HOST]) AC_CACHE_CHECK([whether getlogin_r works with small buffers], [gl_cv_func_getlogin_r_works], @@ -39,16 +39,15 @@ AC_DEFUN([gl_FUNC_GETLOGIN_R], dnl Initial guess, used when cross-compiling. changequote(,)dnl case "$host_os" in - # Guess no on Mac OS X, OSF/1. - darwin* | osf*) gl_cv_func_getlogin_r_works="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_getlogin_r_works="guessing yes" ;; + # Guess no on OSF/1. + osf*) gl_cv_func_getlogin_r_works="guessing no" ;; + # Guess yes otherwise. + *) gl_cv_func_getlogin_r_works="guessing yes" ;; esac changequote([,])dnl AC_RUN_IFELSE( [AC_LANG_SOURCE([[ #include -#include #include #if !HAVE_DECL_GETLOGIN_R extern @@ -64,19 +63,16 @@ main (void) char buf[100]; if (getlogin_r (buf, 0) == 0) - result |= 1; + result |= 16; if (getlogin_r (buf, 1) == 0) - result |= 2; - if (getlogin_r (buf, 100) == 0) - { - size_t n = strlen (buf); - if (getlogin_r (buf, n) == 0) - result |= 4; - } + result |= 17; return result; }]])], [gl_cv_func_getlogin_r_works=yes], - [gl_cv_func_getlogin_r_works=no], + [case $? in + 16 | 17) gl_cv_func_getlogin_r_works=no ;; + esac + ], [:]) ]) case "$gl_cv_func_getlogin_r_works" in diff --git a/gdb/gnulib/import/m4/getpagesize.m4 b/gdb/gnulib/import/m4/getpagesize.m4 deleted file mode 100644 index eb17d60d8ea..00000000000 --- a/gdb/gnulib/import/m4/getpagesize.m4 +++ /dev/null @@ -1,49 +0,0 @@ -# getpagesize.m4 serial 10 -dnl Copyright (C) 2002, 2004-2005, 2007, 2009-2018 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, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_GETPAGESIZE], -[ - AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) - AC_REQUIRE([AC_CANONICAL_HOST]) - gl_CHECK_FUNC_GETPAGESIZE - if test $gl_cv_func_getpagesize = no; then - HAVE_GETPAGESIZE=0 - AC_CHECK_HEADERS([OS.h]) - if test $ac_cv_header_OS_h = yes; then - HAVE_OS_H=1 - fi - AC_CHECK_HEADERS([sys/param.h]) - if test $ac_cv_header_sys_param_h = yes; then - HAVE_SYS_PARAM_H=1 - fi - fi - case "$host_os" in - mingw*) - REPLACE_GETPAGESIZE=1 - ;; - esac - dnl Also check whether it's declared. - dnl mingw has getpagesize() in libgcc.a but doesn't declare it. - AC_CHECK_DECL([getpagesize], , [HAVE_DECL_GETPAGESIZE=0]) -]) - -dnl Tests whether the function getpagesize() exists. -dnl Sets gl_cv_func_getpagesize. -AC_DEFUN([gl_CHECK_FUNC_GETPAGESIZE], -[ - dnl We can't use AC_CHECK_FUNC here, because getpagesize() is defined as a - dnl static inline function when compiling for Android 4.4 or older. - AC_CACHE_CHECK([for getpagesize], [gl_cv_func_getpagesize], - [AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[#include ]], - [[return getpagesize();]]) - ], - [gl_cv_func_getpagesize=yes], - [gl_cv_func_getpagesize=no]) - ]) -]) diff --git a/gdb/gnulib/import/m4/getprogname.m4 b/gdb/gnulib/import/m4/getprogname.m4 index 3a9ba8b6005..f027037fc6b 100644 --- a/gdb/gnulib/import/m4/getprogname.m4 +++ b/gdb/gnulib/import/m4/getprogname.m4 @@ -1,6 +1,6 @@ # getprogname.m4 - check for getprogname or replacements for it -# Copyright (C) 2016-2018 Free Software Foundation, Inc. +# Copyright (C) 2016 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/gettimeofday.m4 b/gdb/gnulib/import/m4/gettimeofday.m4 index 198695ea7b0..4ae5d63fe3e 100644 --- a/gdb/gnulib/import/m4/gettimeofday.m4 +++ b/gdb/gnulib/import/m4/gettimeofday.m4 @@ -1,6 +1,6 @@ -# serial 25 +# serial 21 -# Copyright (C) 2001-2003, 2005, 2007, 2009-2018 Free Software Foundation, Inc. +# Copyright (C) 2001-2003, 2005, 2007, 2009-2016 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. @@ -9,10 +9,9 @@ dnl From Jim Meyering. AC_DEFUN([gl_FUNC_GETTIMEOFDAY], [ - AC_REQUIRE([gl_HEADER_SYS_TIME_H_DEFAULTS]) AC_REQUIRE([AC_C_RESTRICT]) - AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([gl_HEADER_SYS_TIME_H]) + AC_REQUIRE([gl_HEADER_SYS_TIME_H_DEFAULTS]) AC_CHECK_FUNCS_ONCE([gettimeofday]) gl_gettimeofday_timezone=void @@ -55,11 +54,19 @@ int gettimeofday (struct timeval *restrict, struct timezone *restrict); if test $REPLACE_STRUCT_TIMEVAL = 1; then REPLACE_GETTIMEOFDAY=1 fi - dnl On mingw, the original gettimeofday has only a precision of 15.6 - dnl milliseconds. So override it. - case "$host_os" in - mingw*) REPLACE_GETTIMEOFDAY=1 ;; - esac + 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 @@ -78,7 +85,6 @@ AC_DEFUN([gl_FUNC_GETTIMEOFDAY_CLOBBER], [ AC_REQUIRE([gl_HEADER_SYS_TIME_H]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_REQUIRE([gl_LOCALTIME_BUFFER_DEFAULTS]) AC_CACHE_CHECK([whether gettimeofday clobbers localtime buffer], [gl_cv_func_gettimeofday_clobber], @@ -103,24 +109,30 @@ AC_DEFUN([gl_FUNC_GETTIMEOFDAY_CLOBBER], [gl_cv_func_gettimeofday_clobber=yes], [# When cross-compiling: case "$host_os" in - # Guess all is fine on glibc systems. - *-gnu* | gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;; - # Guess no on native Windows. - mingw*) gl_cv_func_gettimeofday_clobber="guessing no" ;; - # If we don't know, assume the worst. - *) gl_cv_func_gettimeofday_clobber="guessing yes" ;; + # 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.]) - gl_LOCALTIME_BUFFER_NEEDED ;; esac ]) +AC_DEFUN([gl_GETTIMEOFDAY_REPLACE_LOCALTIME], [ + REPLACE_GMTIME=1 + REPLACE_LOCALTIME=1 +]) + # Prerequisites of lib/gettimeofday.c. -AC_DEFUN([gl_PREREQ_GETTIMEOFDAY], [:]) +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 new file mode 100644 index 00000000000..dafebf5017d --- /dev/null +++ b/gdb/gnulib/import/m4/glibc21.m4 @@ -0,0 +1,34 @@ +# glibc21.m4 serial 5 +dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2016 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, +dnl with or without modifications, as long as this notice is preserved. + +# Test for the GNU C Library, version 2.1 or newer, or uClibc. +# From Bruno Haible. + +AC_DEFUN([gl_GLIBC21], + [ + AC_CACHE_CHECK([whether we are using the GNU C Library >= 2.1 or uClibc], + [ac_cv_gnu_library_2_1], + [AC_EGREP_CPP([Lucky], + [ +#include +#ifdef __GNU_LIBRARY__ + #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) + Lucky GNU user + #endif +#endif +#ifdef __UCLIBC__ + Lucky user +#endif + ], + [ac_cv_gnu_library_2_1=yes], + [ac_cv_gnu_library_2_1=no]) + ] + ) + AC_SUBST([GLIBC21]) + GLIBC21="$ac_cv_gnu_library_2_1" + ] +) diff --git a/gdb/gnulib/import/m4/glob.m4 b/gdb/gnulib/import/m4/glob.m4 index 53a19111679..adf5fe2865c 100644 --- a/gdb/gnulib/import/m4/glob.m4 +++ b/gdb/gnulib/import/m4/glob.m4 @@ -1,5 +1,5 @@ -# glob.m4 serial 21 -dnl Copyright (C) 2005-2007, 2009-2018 Free Software Foundation, Inc. +# glob.m4 serial 14 +dnl Copyright (C) 2005-2007, 2009-2016 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. @@ -9,74 +9,68 @@ dnl with or without modifications, as long as this notice is preserved. # always include for the glob prototypes. AC_DEFUN([gl_GLOB], -[ - AC_REQUIRE([gl_GLOB_H]) - - AC_CHECK_FUNCS_ONCE([glob glob_pattern_p]) - if test $ac_cv_func_glob = no; then - HAVE_GLOB=0 - else +[ GLOB_H= + AC_CHECK_HEADERS([glob.h], [], [GLOB_H=glob.h]) - AC_CACHE_CHECK([for GNU glob interface version 1 or 2], - [gl_cv_gnu_glob_interface_version_1_2], + if test -z "$GLOB_H"; then + AC_CACHE_CHECK([for GNU glob interface version 1], + [gl_cv_gnu_glob_interface_version_1], [ AC_COMPILE_IFELSE([AC_LANG_SOURCE( [[#include -char a[_GNU_GLOB_INTERFACE_VERSION == 1 || _GNU_GLOB_INTERFACE_VERSION == 2 ? 1 : -1];]])], - [gl_cv_gnu_glob_interface_version_1_2=yes], - [gl_cv_gnu_glob_interface_version_1_2=no])]) - if test "$gl_cv_gnu_glob_interface_version_1_2" = "no"; then - REPLACE_GLOB=1 +char a[_GNU_GLOB_INTERFACE_VERSION == 1 ? 1 : -1];]])], + [gl_cv_gnu_glob_interface_version_1=yes], + [gl_cv_gnu_glob_interface_version_1=no])]) + + if test "$gl_cv_gnu_glob_interface_version_1" = "no"; then + GLOB_H=glob.h fi + fi - if test $REPLACE_GLOB = 0; then - AC_CACHE_CHECK([whether glob lists broken symlinks], - [gl_cv_glob_lists_symlinks], - [if ln -s conf-doesntexist conf$$-globtest 2>/dev/null; then - gl_cv_glob_lists_symlinks=maybe - else - # If we can't make a symlink, then we cannot test this issue. Be - # pessimistic about this. - gl_cv_glob_lists_symlinks=no - fi - if test $gl_cv_glob_lists_symlinks = maybe; then - AC_RUN_IFELSE( - [AC_LANG_PROGRAM( - [[#include - #include ]], - [[glob_t found; - if (glob ("conf*-globtest", 0, NULL, &found) == GLOB_NOMATCH) - return 1; - ]])], - [gl_cv_glob_lists_symlinks=yes], - [gl_cv_glob_lists_symlinks=no], - [gl_cv_glob_lists_symlinks=no]) - fi - rm -f conf$$-globtest - ]) - if test $gl_cv_glob_lists_symlinks = no; then - REPLACE_GLOB=1 + if test -z "$GLOB_H"; then + AC_CACHE_CHECK([whether glob lists broken symlinks], + [gl_cv_glob_lists_symlinks], +[ if ln -s conf-doesntexist conf$$-globtest 2>/dev/null; then + gl_cv_glob_lists_symlinks=maybe + else + # If we can't make a symlink, then we cannot test this issue. Be + # pessimistic about this. + gl_cv_glob_lists_symlinks=no fi - fi - fi + if test $gl_cv_glob_lists_symlinks = maybe; then + AC_RUN_IFELSE([ +AC_LANG_PROGRAM( +[[#include +#include ]], +[[glob_t found; +if (glob ("conf*-globtest", 0, NULL, &found) == GLOB_NOMATCH) return 1;]])], + [gl_cv_glob_lists_symlinks=yes], + [gl_cv_glob_lists_symlinks=no], [gl_cv_glob_lists_symlinks=no]) + fi]) - if test $ac_cv_func_glob_pattern_p = no; then - HAVE_GLOB_PATTERN_P=0 - else - if test $REPLACE_GLOB = 1; then - REPLACE_GLOB_PATTERN_P=1 + if test $gl_cv_glob_lists_symlinks = no; then + GLOB_H=glob.h fi fi - if test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1; then - gl_REPLACE_GLOB_H - fi + rm -f conf$$-globtest + + AC_SUBST([GLOB_H]) + AM_CONDITIONAL([GL_GENERATE_GLOB_H], [test -n "$GLOB_H"]) ]) -# Prerequisites of lib/glob.c and lib/globfree.c. +# Prerequisites of lib/glob.*. AC_DEFUN([gl_PREREQ_GLOB], [ - AC_REQUIRE([gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE]) - AC_CHECK_HEADERS_ONCE([unistd.h]) - AC_CHECK_FUNCS_ONCE([getlogin_r getpwnam_r]) + AC_REQUIRE([gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE])dnl + AC_REQUIRE([AC_C_RESTRICT])dnl + AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])dnl + AC_CHECK_HEADERS_ONCE([sys/cdefs.h unistd.h])dnl + if test $ac_cv_header_sys_cdefs_h = yes; then + HAVE_SYS_CDEFS_H=1 + else + HAVE_SYS_CDEFS_H=0 + fi + AC_SUBST([HAVE_SYS_CDEFS_H]) + AC_CHECK_FUNCS_ONCE([fstatat getlogin_r getpwnam_r])dnl ]) diff --git a/gdb/gnulib/import/m4/glob_h.m4 b/gdb/gnulib/import/m4/glob_h.m4 deleted file mode 100644 index 3ac78a82a8c..00000000000 --- a/gdb/gnulib/import/m4/glob_h.m4 +++ /dev/null @@ -1,72 +0,0 @@ -# glob_h.m4 serial 5 -dnl Copyright (C) 2018 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. - -AC_DEFUN_ONCE([gl_GLOB_H], -[ - AC_REQUIRE([gl_GLOB_H_DEFAULTS]) - m4_ifdef([gl_ANSI_CXX], [AC_REQUIRE([gl_ANSI_CXX])]) - AC_REQUIRE([AC_C_RESTRICT]) - AC_CHECK_HEADERS_ONCE([glob.h]) - gl_CHECK_NEXT_HEADERS([glob.h]) - - if test $ac_cv_header_glob_h = yes; then - HAVE_GLOB_H=1 - else - HAVE_GLOB_H=0 - fi - AC_SUBST([HAVE_GLOB_H]) - - m4_ifdef([gl_POSIXCHECK], - [GLOB_H=glob.h], - [GLOB_H='' - if m4_ifdef([gl_ANSI_CXX], [test "$CXX" != no], [false]); then - dnl Override always, to support the C++ GNULIB_NAMESPACE. - GLOB_H=glob.h - else - if test $ac_cv_header_glob_h != yes; then - dnl Provide a substitute file. - GLOB_H=glob.h - fi - fi - ]) - AC_SUBST([GLOB_H]) - AM_CONDITIONAL([GL_GENERATE_GLOB_H], [test -n "$GLOB_H"]) - - dnl Check for declarations of anything we want to poison if the - dnl corresponding gnulib module is not in use. - gl_WARN_ON_USE_PREPARE([[#include - ]], - [glob globfree glob_pattern_p]) -]) - -dnl Unconditionally enables the replacement of . -AC_DEFUN([gl_REPLACE_GLOB_H], -[ - AC_REQUIRE([gl_GLOB_H_DEFAULTS]) - GLOB_H='glob.h' - AM_CONDITIONAL([GL_GENERATE_GLOB_H], [test -n "$GLOB_H"]) -]) - -AC_DEFUN([gl_GLOB_MODULE_INDICATOR], -[ - dnl Use AC_REQUIRE here, so that the default settings are expanded once only. - AC_REQUIRE([gl_GLOB_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_GLOB_H_DEFAULTS], -[ - GNULIB_GLOB=0; AC_SUBST([GNULIB_GLOB]) - dnl Assume POSIX and GNU behavior unless another module says otherwise. - HAVE_GLOB=1; AC_SUBST([HAVE_GLOB]) - HAVE_GLOB_PATTERN_P=1; AC_SUBST([HAVE_GLOB_PATTERN_P]) - REPLACE_GLOB=0; AC_SUBST([REPLACE_GLOB]) - REPLACE_GLOB_PATTERN_P=0; AC_SUBST([REPLACE_GLOB_PATTERN_P]) -]) diff --git a/gdb/gnulib/import/m4/gnulib-cache.m4 b/gdb/gnulib/import/m4/gnulib-cache.m4 index 457f2913c70..225b52acf90 100644 --- a/gdb/gnulib/import/m4/gnulib-cache.m4 +++ b/gdb/gnulib/import/m4/gnulib-cache.m4 @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2018 Free Software Foundation, Inc. +# Copyright (C) 2002-2016 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 @@ -11,7 +11,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this file. If not, see . +# along with this file. If not, see . # # As a special exception to the GNU General Public License, # this file may be distributed as part of a program that @@ -27,48 +27,7 @@ # Specification in the form of a command-line invocation: -# gnulib-tool --import \ -# --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 \ -# getcwd \ -# glob \ -# inttypes \ -# limits-h \ -# lstat \ -# memchr \ -# memmem \ -# mkdir \ -# mkstemp \ -# pathmax \ -# rawmemchr \ -# readlink \ -# rename \ -# setenv \ -# signal-h \ -# strchrnul \ -# strstr \ -# strtok_r \ -# sys_stat \ -# unistd \ -# unsetenv \ -# update-copyright \ -# wchar \ -# wctype-h +# gnulib-tool --import --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 getcwd glob inttypes limits-h lstat memchr memmem mkdir mkstemp pathmax rawmemchr readlink rename setenv signal-h strchrnul strstr strtok_r sys_stat unistd unsetenv update-copyright wchar wctype-h # Specification in the form of a few gnulib-tool.m4 macro invocations: gl_LOCAL_DIR([]) diff --git a/gdb/gnulib/import/m4/gnulib-common.m4 b/gdb/gnulib/import/m4/gnulib-common.m4 index 5f07855acf1..f8454c8a014 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 39 -dnl Copyright (C) 2007-2018 Free Software Foundation, Inc. +# gnulib-common.m4 serial 36 +dnl Copyright (C) 2007-2016 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. @@ -72,13 +72,6 @@ AC_DEFUN([gl_COMMON_BODY], [ #else # define _GL_ATTRIBUTE_CONST /* empty */ #endif - -/* The __malloc__ attribute was added in gcc 3. */ -#if 3 <= __GNUC__ -# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) -#else -# define _GL_ATTRIBUTE_MALLOC /* empty */ -#endif ]) dnl Preparation for running test programs: dnl Tell glibc to write diagnostics from -D_FORTIFY_SOURCE=2 to stderr, not @@ -235,13 +228,13 @@ m4_ifndef([AS_VAR_IF], # This is like AC_PROG_CC_C99, except that # - AC_PROG_CC_C99 did not exist in Autoconf versions < 2.60, # - AC_PROG_CC_C99 does not mix well with AC_PROG_CC_STDC -# , +# , # but many more packages use AC_PROG_CC_STDC than AC_PROG_CC_C99 -# . +# . # Remaining problems: # - When AC_PROG_CC_STDC is invoked twice, it adds the C99 enabling options # to CC twice -# . +# . # - AC_PROG_CC_STDC is likely to change now that C11 is an ISO standard. AC_DEFUN([gl_PROG_CC_C99], [ @@ -263,8 +256,7 @@ AC_DEFUN([gl_PROG_AR_RANLIB], dnl library formats. In particular, the GNU binutils programs ar and ranlib dnl produce libraries that work only with gcc, not with cc. AC_REQUIRE([AC_PROG_CC]) - dnl The '][' hides this use from 'aclocal'. - AC_BEFORE([$0], [A][M_PROG_AR]) + AC_BEFORE([$0], [AM_PROG_AR]) AC_CACHE_CHECK([for Minix Amsterdam compiler], [gl_cv_c_amsterdam_compiler], [ AC_EGREP_CPP([Amsterdam], @@ -296,9 +288,7 @@ Amsterdam dnl __ACK__. It may seem like its easier to avoid calling the macro here, dnl but we need to AC_SUBST both AR/ARFLAGS (thus those must have some good dnl default value and automake should usually know them). - dnl - dnl The '][' hides this use from 'aclocal'. - m4_ifdef([A][M_PROG_AR], [A][M_PROG_AR], [:]) + m4_ifdef([AM_PROG_AR], [AM_PROG_AR], [:]) fi dnl In case the code above has not helped with setting AR/ARFLAGS, use @@ -354,16 +344,16 @@ AC_DEFUN([AC_C_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 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); - ]])], + [[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 @@ -466,9 +456,7 @@ m4_ifndef([AC_PROG_SED], 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 b8f20daba4f..6fee9efce1d 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-2018 Free Software Foundation, Inc. +# Copyright (C) 2002-2016 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 @@ -12,7 +12,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this file. If not, see . +# along with this file. If not, see . # # As a special exception to the GNU General Public License, # this file may be distributed as part of a program that @@ -42,20 +42,18 @@ AC_DEFUN([gl_EARLY], AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) AC_REQUIRE([gl_PROG_AR_RANLIB]) - AC_REQUIRE([AM_PROG_CC_C_O]) # Code from module absolute-header: # Code from module alloca: # Code from module alloca-opt: # Code from module assure: # Code from module at-internal: - # Code from module builtin-expect: - # Code from module c99: # Code from module canonicalize-lgpl: # Code from module chdir: # Code from module chdir-long: # Code from module cloexec: # Code from module close: # Code from module closedir: + # Code from module configmake: # Code from module d-ino: # Code from module d-type: # Code from module dirent: @@ -75,7 +73,6 @@ AC_DEFUN([gl_EARLY], # Code from module fcntl: # Code from module fcntl-h: # Code from module fd-hook: - # Code from module fd-safer-flag: # Code from module fdopendir: # Code from module filename: # Code from module filenamecat-lgpl: @@ -83,7 +80,6 @@ AC_DEFUN([gl_EARLY], # Code from module float: # Code from module fnmatch: # Code from module fnmatch-gnu: - # Code from module fnmatch-h: # Code from module fpieee: AC_REQUIRE([gl_FP_IEEE]) # Code from module fpucw: @@ -99,7 +95,6 @@ AC_DEFUN([gl_EARLY], # Code from module gettext-h: # Code from module gettimeofday: # Code from module glob: - # Code from module glob-h: # Code from module hard-locale: # Code from module include_next: # Code from module intprops: @@ -109,10 +104,8 @@ AC_DEFUN([gl_EARLY], # Code from module isnanl-nolibm: # Code from module largefile: AC_REQUIRE([AC_SYS_LARGEFILE]) - # Code from module libc-config: # Code from module limits-h: # Code from module localcharset: - # Code from module localtime-buffer: # Code from module lstat: # Code from module malloc-posix: # Code from module malloca: @@ -146,7 +139,7 @@ AC_DEFUN([gl_EARLY], # Code from module rmdir: # Code from module same-inode: # Code from module save-cwd: - # Code from module scratch_buffer: + # Code from module secure_getenv: # Code from module setenv: # Code from module signal-h: # Code from module snippet/_Noreturn: @@ -155,8 +148,6 @@ AC_DEFUN([gl_EARLY], # Code from module snippet/warn-on-use: # Code from module ssize_t: # Code from module stat: - # Code from module stat-time: - # Code from module std-gnu11: # Code from module stdbool: # Code from module stddef: # Code from module stdint: @@ -184,7 +175,6 @@ AC_DEFUN([gl_EARLY], # Code from module verify: # Code from module wchar: # Code from module wctype-h: - # Code from module xalloc-oversized: ]) # This macro should be invoked from ./configure.ac, in the section @@ -205,7 +195,6 @@ AC_DEFUN([gl_INIT], gl_source_base='import' gl_FUNC_ALLOCA AC_LIBOBJ([openat-proc]) - gl___BUILTIN_EXPECT gl_CANONICALIZE_LGPL if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then AC_LIBOBJ([canonicalize-lgpl]) @@ -230,6 +219,7 @@ AC_DEFUN([gl_INIT], AC_LIBOBJ([closedir]) fi gl_DIRENT_MODULE_INDICATOR([closedir]) + gl_CONFIGMAKE_PREP gl_CHECK_TYPE_STRUCT_DIRENT_D_INO gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE gl_DIRENT_H @@ -274,7 +264,6 @@ AC_DEFUN([gl_INIT], fi gl_FCNTL_MODULE_INDICATOR([fcntl]) gl_FCNTL_H - gl_MODULE_INDICATOR([fd-safer-flag]) gl_FUNC_FDOPENDIR if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then AC_LIBOBJ([fdopendir]) @@ -291,24 +280,21 @@ AC_DEFUN([gl_INIT], AC_LIBOBJ([itold]) fi gl_FUNC_FNMATCH_POSIX - if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then + if test -n "$FNMATCH_H"; then AC_LIBOBJ([fnmatch]) gl_PREREQ_FNMATCH fi - gl_FNMATCH_MODULE_INDICATOR([fnmatch]) gl_FUNC_FNMATCH_GNU - if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then + if test -n "$FNMATCH_H"; then AC_LIBOBJ([fnmatch]) gl_PREREQ_FNMATCH fi - gl_MODULE_INDICATOR([fnmatch-gnu]) - gl_FNMATCH_H - AC_REQUIRE([gl_FUNC_FREXP]) + gl_FUNC_FREXP if test $gl_func_frexp != yes; then AC_LIBOBJ([frexp]) fi gl_MATH_MODULE_INDICATOR([frexp]) - AC_REQUIRE([gl_FUNC_FREXPL]) + gl_FUNC_FREXPL if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then AC_LIBOBJ([frexpl]) fi @@ -316,11 +302,6 @@ AC_DEFUN([gl_INIT], gl_FUNC_FSTAT if test $REPLACE_FSTAT = 1; then AC_LIBOBJ([fstat]) - case "$host_os" in - mingw*) - AC_LIBOBJ([stat-w32]) - ;; - esac gl_PREREQ_FSTAT fi gl_SYS_STAT_MODULE_INDICATOR([fstat]) @@ -353,7 +334,6 @@ AC_DEFUN([gl_INIT], gl_PREREQ_GETLOGIN_R fi gl_UNISTD_MODULE_INDICATOR([getlogin_r]) - AC_REQUIRE([gl_LIB_GETLOGIN]) gl_FUNC_GETPROGNAME AC_SUBST([LIBINTL]) AC_SUBST([LTLIBINTL]) @@ -364,16 +344,11 @@ AC_DEFUN([gl_INIT], fi gl_SYS_TIME_MODULE_INDICATOR([gettimeofday]) gl_GLOB - if test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1; then + if test -n "$GLOB_H"; then AC_LIBOBJ([glob]) - AC_LIBOBJ([globfree]) gl_PREREQ_GLOB fi - if test $HAVE_GLOB_PATTERN_P = 0 || test $REPLACE_GLOB_PATTERN_P = 1; then - AC_LIBOBJ([glob_pattern_p]) - fi - gl_GLOB_MODULE_INDICATOR([glob]) - gl_GLOB_H + gl_HARD_LOCALE gl_INTTYPES_H gl_INTTYPES_INCOMPLETE gl_FUNC_ISNAND_NO_LIBM @@ -387,14 +362,10 @@ AC_DEFUN([gl_INIT], gl_PREREQ_ISNANL fi AC_REQUIRE([gl_LARGEFILE]) - gl___INLINE gl_LIMITS_H gl_LOCALCHARSET - dnl For backward compatibility. Some packages still use this. - LOCALCHARSET_TESTS_ENVIRONMENT= + LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\"" AC_SUBST([LOCALCHARSET_TESTS_ENVIRONMENT]) - AC_REQUIRE([gl_LOCALTIME_BUFFER_DEFAULTS]) - AC_LIBOBJ([localtime-buffer]) gl_FUNC_LSTAT if test $REPLACE_LSTAT = 1; then AC_LIBOBJ([lstat]) @@ -472,7 +443,6 @@ AC_DEFUN([gl_INIT], if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then AC_LIBOBJ([msvc-nothrow]) fi - gl_MODULE_INDICATOR([msvc-nothrow]) gl_MULTIARCH gl_FUNC_OPEN if test $REPLACE_OPEN = 1; then @@ -531,6 +501,12 @@ AC_DEFUN([gl_INIT], fi gl_UNISTD_MODULE_INDICATOR([rmdir]) gl_SAVE_CWD + gl_FUNC_SECURE_GETENV + if test $HAVE_SECURE_GETENV = 0; then + AC_LIBOBJ([secure_getenv]) + gl_PREREQ_SECURE_GETENV + fi + gl_STDLIB_MODULE_INDICATOR([secure_getenv]) gl_FUNC_SETENV if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then AC_LIBOBJ([setenv]) @@ -541,16 +517,9 @@ AC_DEFUN([gl_INIT], gl_FUNC_STAT if test $REPLACE_STAT = 1; then AC_LIBOBJ([stat]) - case "$host_os" in - mingw*) - AC_LIBOBJ([stat-w32]) - ;; - esac gl_PREREQ_STAT fi gl_SYS_STAT_MODULE_INDICATOR([stat]) - gl_STAT_TIME - gl_STAT_BIRTHTIME AM_STDBOOL_H gl_STDDEF_H gl_STDINT_H @@ -754,30 +723,30 @@ AC_DEFUN([gltests_LIBSOURCES], [ # This macro records the list of files which have been installed by # gnulib-tool and may be removed by future gnulib-tool invocations. AC_DEFUN([gl_FILE_LIST], [ + build-aux/snippet/_Noreturn.h + build-aux/snippet/arg-nonnull.h + build-aux/snippet/c++defs.h + build-aux/snippet/warn-on-use.h build-aux/update-copyright - lib/_Noreturn.h lib/alloca.c lib/alloca.in.h - lib/arg-nonnull.h lib/assure.h lib/at-func.c lib/basename-lgpl.c - lib/c++defs.h lib/canonicalize-lgpl.c - lib/cdefs.h lib/chdir-long.c lib/chdir-long.h lib/cloexec.c lib/cloexec.h lib/close.c lib/closedir.c + lib/config.charset lib/dirent-private.h lib/dirent.in.h lib/dirfd.c lib/dirname-lgpl.c lib/dirname.h lib/dosname.h - lib/dup-safer-flag.c lib/dup-safer.c lib/dup.c lib/dup2.c @@ -791,7 +760,6 @@ AC_DEFUN([gl_FILE_LIST], [ lib/fcntl.in.h lib/fd-hook.c lib/fd-hook.h - lib/fd-safer-flag.c lib/fd-safer.c lib/fdopendir.c lib/filename.h @@ -820,9 +788,6 @@ AC_DEFUN([gl_FILE_LIST], [ lib/glob-libc.h lib/glob.c lib/glob.in.h - lib/glob_internal.h - lib/glob_pattern_p.c - lib/globfree.c lib/hard-locale.c lib/hard-locale.h lib/intprops.h @@ -833,20 +798,14 @@ AC_DEFUN([gl_FILE_LIST], [ lib/isnanl-nolibm.h lib/isnanl.c lib/itold.c - lib/libc-config.h lib/limits.in.h lib/localcharset.c lib/localcharset.h - lib/localtime-buffer.c - lib/localtime-buffer.h lib/lstat.c lib/malloc.c - lib/malloc/scratch_buffer.h - lib/malloc/scratch_buffer_grow.c - lib/malloc/scratch_buffer_grow_preserve.c - lib/malloc/scratch_buffer_set_array_size.c lib/malloca.c lib/malloca.h + lib/malloca.valgrind lib/math.c lib/math.in.h lib/mbrtowc.c @@ -879,19 +838,17 @@ AC_DEFUN([gl_FILE_LIST], [ lib/readdir.c lib/readlink.c lib/realloc.c + lib/ref-add.sin + lib/ref-del.sin lib/rename.c lib/rewinddir.c lib/rmdir.c lib/same-inode.h lib/save-cwd.c lib/save-cwd.h - lib/scratch_buffer.h + lib/secure_getenv.c lib/setenv.c lib/signal.in.h - lib/stat-time.c - lib/stat-time.h - lib/stat-w32.c - lib/stat-w32.h lib/stat.c lib/stdbool.in.h lib/stddef.in.h @@ -924,21 +881,18 @@ AC_DEFUN([gl_FILE_LIST], [ lib/unistd.in.h lib/unsetenv.c lib/verify.h - lib/warn-on-use.h lib/wchar.in.h lib/wctype-h.c lib/wctype.in.h - lib/xalloc-oversized.h m4/00gnulib.m4 - m4/__inline.m4 m4/absolute-header.m4 m4/alloca.m4 - m4/builtin-expect.m4 m4/canonicalize.m4 m4/chdir-long.m4 m4/close.m4 m4/closedir.m4 m4/codeset.m4 + m4/configmake.m4 m4/d-ino.m4 m4/d-type.m4 m4/dirent_h.m4 @@ -964,7 +918,6 @@ AC_DEFUN([gl_FILE_LIST], [ m4/flexmember.m4 m4/float_h.m4 m4/fnmatch.m4 - m4/fnmatch_h.m4 m4/fpieee.m4 m4/frexp.m4 m4/frexpl.m4 @@ -974,14 +927,13 @@ AC_DEFUN([gl_FILE_LIST], [ m4/getcwd-path-max.m4 m4/getcwd.m4 m4/getdtablesize.m4 - m4/getlogin.m4 m4/getlogin_r.m4 - m4/getpagesize.m4 m4/getprogname.m4 m4/gettimeofday.m4 + m4/glibc21.m4 m4/glob.m4 - m4/glob_h.m4 m4/gnulib-common.m4 + m4/hard-locale.m4 m4/include_next.m4 m4/inttypes-pri.m4 m4/inttypes.m4 @@ -993,7 +945,6 @@ AC_DEFUN([gl_FILE_LIST], [ m4/locale-fr.m4 m4/locale-ja.m4 m4/locale-zh.m4 - m4/localtime-buffer.m4 m4/longlong.m4 m4/lstat.m4 m4/malloc.m4 @@ -1017,7 +968,6 @@ AC_DEFUN([gl_FILE_LIST], [ m4/nocrash.m4 m4/off_t.m4 m4/onceonly.m4 - m4/open-cloexec.m4 m4/open.m4 m4/openat.m4 m4/opendir.m4 @@ -1030,12 +980,11 @@ AC_DEFUN([gl_FILE_LIST], [ m4/rewinddir.m4 m4/rmdir.m4 m4/save-cwd.m4 + m4/secure_getenv.m4 m4/setenv.m4 m4/signal_h.m4 m4/ssize_t.m4 - m4/stat-time.m4 m4/stat.m4 - m4/std-gnu11.m4 m4/stdbool.m4 m4/stddef_h.m4 m4/stdint.m4 diff --git a/gdb/gnulib/import/m4/gnulib-tool.m4 b/gdb/gnulib/import/m4/gnulib-tool.m4 index 3088e0bab21..0d2ee444b4f 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-2018 Free Software Foundation, Inc. +dnl Copyright (C) 2004-2005, 2009-2016 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/hard-locale.m4 b/gdb/gnulib/import/m4/hard-locale.m4 new file mode 100644 index 00000000000..4661bfc5acc --- /dev/null +++ b/gdb/gnulib/import/m4/hard-locale.m4 @@ -0,0 +1,11 @@ +# hard-locale.m4 serial 8 +dnl Copyright (C) 2002-2006, 2009-2016 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 No prerequisites of lib/hard-locale.c. +AC_DEFUN([gl_HARD_LOCALE], +[ + : +]) diff --git a/gdb/gnulib/import/m4/include_next.m4 b/gdb/gnulib/import/m4/include_next.m4 index a363cb013be..db0f2c0795c 100644 --- a/gdb/gnulib/import/m4/include_next.m4 +++ b/gdb/gnulib/import/m4/include_next.m4 @@ -1,13 +1,12 @@ -# include_next.m4 serial 24 -dnl Copyright (C) 2006-2018 Free Software Foundation, Inc. +# include_next.m4 serial 23 +dnl Copyright (C) 2006-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Paul Eggert and Derek Price. -dnl Sets INCLUDE_NEXT, INCLUDE_NEXT_AS_FIRST_DIRECTIVE, PRAGMA_SYSTEM_HEADER, -dnl and PRAGMA_COLUMNS. +dnl Sets INCLUDE_NEXT and PRAGMA_SYSTEM_HEADER. dnl dnl INCLUDE_NEXT expands to 'include_next' if the compiler supports it, or to dnl 'include' otherwise. diff --git a/gdb/gnulib/import/m4/inttypes-pri.m4 b/gdb/gnulib/import/m4/inttypes-pri.m4 index c8442625daf..ae20183db42 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-2018 Free Software Foundation, Inc. +dnl Copyright (C) 1997-2002, 2006, 2008-2016 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 d756f012f6a..61cdb1a8483 100644 --- a/gdb/gnulib/import/m4/inttypes.m4 +++ b/gdb/gnulib/import/m4/inttypes.m4 @@ -1,5 +1,5 @@ -# inttypes.m4 serial 27 -dnl Copyright (C) 2006-2018 Free Software Foundation, Inc. +# inttypes.m4 serial 26 +dnl Copyright (C) 2006-2016 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. @@ -147,7 +147,6 @@ AC_DEFUN([gl_INTTYPES_H_DEFAULTS], HAVE_DECL_IMAXDIV=1; AC_SUBST([HAVE_DECL_IMAXDIV]) HAVE_DECL_STRTOIMAX=1; AC_SUBST([HAVE_DECL_STRTOIMAX]) HAVE_DECL_STRTOUMAX=1; AC_SUBST([HAVE_DECL_STRTOUMAX]) - HAVE_IMAXDIV_T=1; AC_SUBST([HAVE_IMAXDIV_T]) 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]) diff --git a/gdb/gnulib/import/m4/isnand.m4 b/gdb/gnulib/import/m4/isnand.m4 index 03da55d6057..bcf3840dbc2 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-2018 Free Software Foundation, Inc. +dnl Copyright (C) 2007-2016 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 74014d63e15..9766e47201c 100644 --- a/gdb/gnulib/import/m4/isnanl.m4 +++ b/gdb/gnulib/import/m4/isnanl.m4 @@ -1,5 +1,5 @@ -# isnanl.m4 serial 20 -dnl Copyright (C) 2007-2018 Free Software Foundation, Inc. +# isnanl.m4 serial 19 +dnl Copyright (C) 2007-2016 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. @@ -231,18 +231,6 @@ int main () }]])], [gl_cv_func_isnanl_works=yes], [gl_cv_func_isnanl_works=no], - [case "$host_os" in - mingw*) # Guess yes on mingw, no on MSVC. - AC_EGREP_CPP([Known], [ -#ifdef __MINGW32__ - Known -#endif - ], - [gl_cv_func_isnanl_works="guessing yes"], - [gl_cv_func_isnanl_works="guessing no"]) - ;; - *) gl_cv_func_isnanl_works="guessing yes" ;; - 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 bec7cd13bca..8bbdfaac1db 100644 --- a/gdb/gnulib/import/m4/largefile.m4 +++ b/gdb/gnulib/import/m4/largefile.m4 @@ -1,6 +1,6 @@ # Enable large files on systems where this is not the default. -# Copyright 1992-1996, 1998-2018 Free Software Foundation, Inc. +# Copyright 1992-1996, 1998-2016 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. @@ -126,24 +126,9 @@ AC_DEFUN([gl_LARGEFILE], else WINDOWS_64_BIT_OFF_T=0 fi - dnl Some mingw versions define, if _FILE_OFFSET_BITS=64, 'struct stat' - dnl to 'struct _stat32i64' or 'struct _stat64' (depending on - dnl _USE_32BIT_TIME_T), which has a 32-bit st_size member. - AC_CACHE_CHECK([for 64-bit st_size], [gl_cv_member_st_size_64], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include - struct stat buf; - int verify_st_size_size[sizeof (buf.st_size) >= 8 ? 1 : -1]; - ]], - [[]])], - [gl_cv_member_st_size_64=yes], [gl_cv_member_st_size_64=no]) - ]) - if test $gl_cv_member_st_size_64 = no; then - WINDOWS_64_BIT_ST_SIZE=1 - else - WINDOWS_64_BIT_ST_SIZE=0 - fi + dnl But all native Windows platforms (including mingw64) have a 32-bit + dnl st_size member in 'struct stat'. + WINDOWS_64_BIT_ST_SIZE=1 ;; *) dnl Nothing to do on gnulib's side. diff --git a/gdb/gnulib/import/m4/limits-h.m4 b/gdb/gnulib/import/m4/limits-h.m4 index 83886634396..31fdf0a779e 100644 --- a/gdb/gnulib/import/m4/limits-h.m4 +++ b/gdb/gnulib/import/m4/limits-h.m4 @@ -1,6 +1,6 @@ dnl Check whether limits.h has needed features. -dnl Copyright 2016-2018 Free Software Foundation, Inc. +dnl Copyright 2016 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. @@ -29,11 +29,3 @@ AC_DEFUN_ONCE([gl_LIMITS_H], AC_SUBST([LIMITS_H]) AM_CONDITIONAL([GL_GENERATE_LIMITS_H], [test -n "$LIMITS_H"]) ]) - -dnl Unconditionally enables the replacement of . -AC_DEFUN([gl_REPLACE_LIMITS_H], -[ - AC_REQUIRE([gl_LIMITS_H]) - LIMITS_H='limits.h' - AM_CONDITIONAL([GL_GENERATE_LIMITS_H], [test -n "$LIMITS_H"]) -]) diff --git a/gdb/gnulib/import/m4/localcharset.m4 b/gdb/gnulib/import/m4/localcharset.m4 index d38a2c9eb34..22c311b9858 100644 --- a/gdb/gnulib/import/m4/localcharset.m4 +++ b/gdb/gnulib/import/m4/localcharset.m4 @@ -1,5 +1,5 @@ -# localcharset.m4 serial 8 -dnl Copyright (C) 2002, 2004, 2006, 2009-2018 Free Software Foundation, Inc. +# localcharset.m4 serial 7 +dnl Copyright (C) 2002, 2004, 2006, 2009-2016 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,4 +8,10 @@ AC_DEFUN([gl_LOCALCHARSET], [ dnl Prerequisites of lib/localcharset.c. AC_REQUIRE([AM_LANGINFO_CODESET]) + AC_REQUIRE([gl_FCNTL_O_FLAGS]) + AC_CHECK_DECLS_ONCE([getc_unlocked]) + + dnl Prerequisites of the lib/Makefile.am snippet. + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_REQUIRE([gl_GLIBC21]) ]) diff --git a/gdb/gnulib/import/m4/locale-fr.m4 b/gdb/gnulib/import/m4/locale-fr.m4 index a37a0d20241..92896a0391d 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 19 -dnl Copyright (C) 2003, 2005-2018 Free Software Foundation, Inc. +# locale-fr.m4 serial 17 +dnl Copyright (C) 2003, 2005-2016 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. @@ -24,14 +24,8 @@ changequote(,)dnl struct tm t; char buf[16]; int main () { - /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl - imitates locale dependent behaviour by looking at the environment - variables, and all locales use the UTF-8 encoding. */ -#if defined __BEOS__ || defined __HAIKU__ - return 1; -#else /* Check whether the given locale name is recognized by the system. */ -# if defined _WIN32 && !defined __CYGWIN__ +#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE @@ -39,9 +33,9 @@ int main () { if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) return 1; -# else +#else if (setlocale (LC_ALL, "") == NULL) return 1; -# endif +#endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. @@ -50,33 +44,32 @@ int main () { some unit tests fail. On MirBSD 10, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "UTF-8". */ -# if HAVE_LANGINFO_CODESET +#if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 || strcmp (cs, "UTF-8") == 0) return 1; } -# endif -# ifdef __CYGWIN__ +#endif +#ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; -# endif +#endif /* Check whether in the abbreviation of the second month, the second character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only one byte long. This excludes the UTF-8 encoding. */ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1; -# if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ +#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ /* Check whether the decimal separator is a comma. On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point are nl_langinfo(RADIXCHAR) are both ".". */ if (localeconv () ->decimal_point[0] != ',') return 1; -# endif - return 0; #endif + return 0; } changequote([,])dnl ])]) @@ -160,7 +153,7 @@ int main () { variables, and all locales use the UTF-8 encoding. */ #if !(defined __BEOS__ || defined __HAIKU__) /* Check whether the given locale name is recognized by the system. */ -# if defined _WIN32 && !defined __CYGWIN__ +# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE diff --git a/gdb/gnulib/import/m4/locale-ja.m4 b/gdb/gnulib/import/m4/locale-ja.m4 index 9f1623191d3..f222a086963 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 14 -dnl Copyright (C) 2003, 2005-2018 Free Software Foundation, Inc. +# locale-ja.m4 serial 12 +dnl Copyright (C) 2003, 2005-2016 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. @@ -25,14 +25,9 @@ struct tm t; char buf[16]; int main () { - /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl - imitates locale dependent behaviour by looking at the environment - variables, and all locales use the UTF-8 encoding. */ -#if defined __BEOS__ || defined __HAIKU__ - return 1; -#else + const char *p; /* Check whether the given locale name is recognized by the system. */ -# if defined _WIN32 && !defined __CYGWIN__ +#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE @@ -40,9 +35,9 @@ int main () if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) return 1; -# else +#else if (setlocale (LC_ALL, "") == NULL) return 1; -# endif +#endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. @@ -51,36 +46,32 @@ int main () some unit tests fail. On MirBSD 10, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "UTF-8". */ -# if HAVE_LANGINFO_CODESET +#if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 || strcmp (cs, "UTF-8") == 0) return 1; } -# endif -# ifdef __CYGWIN__ +#endif +#ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; -# endif +#endif /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales on Cygwin 1.5.x. */ if (MB_CUR_MAX == 1) return 1; /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. This excludes the UTF-8 encoding (except on MirBSD). */ - { - const char *p; - t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; - if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; - for (p = buf; *p != '\0'; p++) - if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) - return 1; - } + t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; + if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; + for (p = buf; *p != '\0'; p++) + if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) + return 1; return 0; -#endif } changequote([,])dnl ])]) diff --git a/gdb/gnulib/import/m4/locale-zh.m4 b/gdb/gnulib/import/m4/locale-zh.m4 index cfb447f08d4..2271f7783bc 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 14 -dnl Copyright (C) 2003, 2005-2018 Free Software Foundation, Inc. +# locale-zh.m4 serial 12 +dnl Copyright (C) 2003, 2005-2016 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. @@ -26,14 +26,9 @@ struct tm t; char buf[16]; int main () { - /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl - imitates locale dependent behaviour by looking at the environment - variables, and all locales use the UTF-8 encoding. */ -#if defined __BEOS__ || defined __HAIKU__ - return 1; -#else + const char *p; /* Check whether the given locale name is recognized by the system. */ -# if defined _WIN32 && !defined __CYGWIN__ +#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ /* On native Windows, setlocale(category, "") looks at the system settings, not at the environment variables. Also, when an encoding suffix such as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE @@ -41,9 +36,9 @@ int main () if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) return 1; -# else +#else if (setlocale (LC_ALL, "") == NULL) return 1; -# endif +#endif /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) is empty, and the behaviour of Tcl 8.4 in this locale is not useful. @@ -52,36 +47,32 @@ int main () some unit tests fail. On MirBSD 10, when an unsupported locale is specified, setlocale() succeeds but then nl_langinfo(CODESET) is "UTF-8". */ -# if HAVE_LANGINFO_CODESET +#if HAVE_LANGINFO_CODESET { const char *cs = nl_langinfo (CODESET); if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 || strcmp (cs, "UTF-8") == 0) return 1; } -# endif -# ifdef __CYGWIN__ +#endif +#ifdef __CYGWIN__ /* On Cygwin, avoid locale names without encoding suffix, because the locale_charset() function relies on the encoding suffix. Note that LC_ALL is set on the command line. */ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; -# endif +#endif /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. This excludes the UTF-8 encoding (except on MirBSD). */ - { - const char *p; - t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; - if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; - for (p = buf; *p != '\0'; p++) - if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) - return 1; - } + t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; + if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; + for (p = buf; *p != '\0'; p++) + if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) + return 1; /* Check whether a typical GB18030 multibyte sequence is recognized as a single wide character. This excludes the GB2312 and GBK encodings. */ if (mblen ("\203\062\332\066", 5) != 4) return 1; return 0; -#endif } changequote([,])dnl ])]) diff --git a/gdb/gnulib/import/m4/localtime-buffer.m4 b/gdb/gnulib/import/m4/localtime-buffer.m4 deleted file mode 100644 index 4b3ec57bfb2..00000000000 --- a/gdb/gnulib/import/m4/localtime-buffer.m4 +++ /dev/null @@ -1,21 +0,0 @@ -# localtime-buffer.m4 serial 1 -dnl Copyright (C) 2017-2018 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_LOCALTIME_BUFFER_DEFAULTS], -[ - NEED_LOCALTIME_BUFFER=0 -]) - -dnl Macro invoked from other modules, to signal that the compilation of -dnl module 'localtime-buffer' is needed. -AC_DEFUN([gl_LOCALTIME_BUFFER_NEEDED], -[ - AC_REQUIRE([gl_LOCALTIME_BUFFER_DEFAULTS]) - AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) - NEED_LOCALTIME_BUFFER=1 - REPLACE_GMTIME=1 - REPLACE_LOCALTIME=1 -]) diff --git a/gdb/gnulib/import/m4/longlong.m4 b/gdb/gnulib/import/m4/longlong.m4 index 27e63265a81..36d8b124212 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-2018 Free Software Foundation, Inc. +dnl Copyright (C) 1999-2007, 2009-2016 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 3694e4ceaf7..e143d5c8b58 100644 --- a/gdb/gnulib/import/m4/lstat.m4 +++ b/gdb/gnulib/import/m4/lstat.m4 @@ -1,6 +1,6 @@ -# serial 32 +# serial 27 -# Copyright (C) 1997-2001, 2003-2018 Free Software Foundation, Inc. +# Copyright (C) 1997-2001, 2003-2016 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -10,15 +10,14 @@ dnl From Jim Meyering. AC_DEFUN([gl_FUNC_LSTAT], [ - AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) dnl If lstat does not exist, the replacement does dnl "#define lstat stat", and lstat.c is a no-op. AC_CHECK_FUNCS_ONCE([lstat]) if test $ac_cv_func_lstat = yes; then AC_REQUIRE([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK]) - case $host_os,$gl_cv_func_lstat_dereferences_slashed_symlink in - solaris* | *no) + case "$gl_cv_func_lstat_dereferences_slashed_symlink" in + *no) REPLACE_LSTAT=1 ;; esac @@ -34,7 +33,6 @@ AC_DEFUN([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK], [ dnl We don't use AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK any more, because it dnl is no longer maintained in Autoconf and because it invokes AC_LIBOBJ. - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether lstat correctly handles trailing slash], [gl_cv_func_lstat_dereferences_slashed_symlink], [rm -f conftest.sym conftest.file @@ -53,15 +51,9 @@ AC_DEFUN([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK], [gl_cv_func_lstat_dereferences_slashed_symlink=yes], [gl_cv_func_lstat_dereferences_slashed_symlink=no], [case "$host_os" in - linux-* | linux) - # Guess yes on Linux systems. - gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;; - *-gnu* | gnu*) + *-gnu*) # Guess yes on glibc systems. gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;; - mingw*) - # Guess no on native Windows. - gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;; *) # If we don't know, assume the worst. gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;; diff --git a/gdb/gnulib/import/m4/malloc.m4 b/gdb/gnulib/import/m4/malloc.m4 index 4c182b41406..c393690e27d 100644 --- a/gdb/gnulib/import/m4/malloc.m4 +++ b/gdb/gnulib/import/m4/malloc.m4 @@ -1,5 +1,5 @@ -# malloc.m4 serial 17 -dnl Copyright (C) 2007, 2009-2018 Free Software Foundation, Inc. +# malloc.m4 serial 15 +dnl Copyright (C) 2007, 2009-2016 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,7 +7,7 @@ dnl with or without modifications, as long as this notice is preserved. m4_version_prereq([2.70], [] ,[ # This is adapted with modifications from upstream Autoconf here: -# https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=04be2b7a29d65d9a08e64e8e56e594c91749598c +# http://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=04be2b7a29d65d9a08e64e8e56e594c91749598c AC_DEFUN([_AC_FUNC_MALLOC_IF], [ AC_REQUIRE([AC_HEADER_STDC])dnl @@ -32,7 +32,7 @@ AC_DEFUN([_AC_FUNC_MALLOC_IF], [ac_cv_func_malloc_0_nonnull=no], [case "$host_os" in # Guess yes on platforms where we know the result. - *-gnu* | gnu* | freebsd* | netbsd* | openbsd* \ + *-gnu* | freebsd* | netbsd* | openbsd* \ | hpux* | solaris* | cygwin* | mingw*) ac_cv_func_malloc_0_nonnull=yes ;; # If we don't know, assume the worst. @@ -91,7 +91,7 @@ AC_DEFUN([gl_CHECK_MALLOC_POSIX], AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[]], - [[#if defined _WIN32 && ! defined __CYGWIN__ + [[#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ choke me #endif ]])], diff --git a/gdb/gnulib/import/m4/malloca.m4 b/gdb/gnulib/import/m4/malloca.m4 index 2251e613eb7..b368b20e50d 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-2018 Free Software Foundation, +dnl Copyright (C) 2003-2004, 2006-2007, 2009-2016 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 d0c7ed11e88..35d07ee5f54 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 116 -dnl Copyright (C) 2007-2018 Free Software Foundation, Inc. +# math_h.m4 serial 114 +dnl Copyright (C) 2007-2016 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. @@ -256,18 +256,11 @@ AC_DEFUN([gl_MATH_H_DEFAULTS], HAVE_DECL_TRUNC=1; AC_SUBST([HAVE_DECL_TRUNC]) HAVE_DECL_TRUNCF=1; AC_SUBST([HAVE_DECL_TRUNCF]) HAVE_DECL_TRUNCL=1; AC_SUBST([HAVE_DECL_TRUNCL]) - REPLACE_ACOSF=0; AC_SUBST([REPLACE_ACOSF]) - REPLACE_ASINF=0; AC_SUBST([REPLACE_ASINF]) - REPLACE_ATANF=0; AC_SUBST([REPLACE_ATANF]) - REPLACE_ATAN2F=0; AC_SUBST([REPLACE_ATAN2F]) REPLACE_CBRTF=0; AC_SUBST([REPLACE_CBRTF]) REPLACE_CBRTL=0; AC_SUBST([REPLACE_CBRTL]) REPLACE_CEIL=0; AC_SUBST([REPLACE_CEIL]) REPLACE_CEILF=0; AC_SUBST([REPLACE_CEILF]) REPLACE_CEILL=0; AC_SUBST([REPLACE_CEILL]) - REPLACE_COSF=0; AC_SUBST([REPLACE_COSF]) - REPLACE_COSHF=0; AC_SUBST([REPLACE_COSHF]) - REPLACE_EXPF=0; AC_SUBST([REPLACE_EXPF]) REPLACE_EXPM1=0; AC_SUBST([REPLACE_EXPM1]) REPLACE_EXPM1F=0; AC_SUBST([REPLACE_EXPM1F]) REPLACE_EXP2=0; AC_SUBST([REPLACE_EXP2]) @@ -291,7 +284,6 @@ AC_DEFUN([gl_MATH_H_DEFAULTS], REPLACE_HYPOTL=0; AC_SUBST([REPLACE_HYPOTL]) REPLACE_ILOGB=0; AC_SUBST([REPLACE_ILOGB]) REPLACE_ILOGBF=0; AC_SUBST([REPLACE_ILOGBF]) - REPLACE_ILOGBL=0; AC_SUBST([REPLACE_ILOGBL]) REPLACE_ISFINITE=0; AC_SUBST([REPLACE_ISFINITE]) REPLACE_ISINF=0; AC_SUBST([REPLACE_ISINF]) REPLACE_ISNAN=0; AC_SUBST([REPLACE_ISNAN]) @@ -323,12 +315,7 @@ AC_DEFUN([gl_MATH_H_DEFAULTS], REPLACE_ROUNDL=0; AC_SUBST([REPLACE_ROUNDL]) REPLACE_SIGNBIT=0; AC_SUBST([REPLACE_SIGNBIT]) REPLACE_SIGNBIT_USING_GCC=0; AC_SUBST([REPLACE_SIGNBIT_USING_GCC]) - REPLACE_SINF=0; AC_SUBST([REPLACE_SINF]) - REPLACE_SINHF=0; AC_SUBST([REPLACE_SINHF]) - REPLACE_SQRTF=0; AC_SUBST([REPLACE_SQRTF]) REPLACE_SQRTL=0; AC_SUBST([REPLACE_SQRTL]) - REPLACE_TANF=0; AC_SUBST([REPLACE_TANF]) - REPLACE_TANHF=0; AC_SUBST([REPLACE_TANHF]) REPLACE_TRUNC=0; AC_SUBST([REPLACE_TRUNC]) REPLACE_TRUNCF=0; AC_SUBST([REPLACE_TRUNCF]) REPLACE_TRUNCL=0; AC_SUBST([REPLACE_TRUNCL]) diff --git a/gdb/gnulib/import/m4/mbrtowc.m4 b/gdb/gnulib/import/m4/mbrtowc.m4 index c706d04bcad..d370fccf06d 100644 --- a/gdb/gnulib/import/m4/mbrtowc.m4 +++ b/gdb/gnulib/import/m4/mbrtowc.m4 @@ -1,5 +1,5 @@ -# mbrtowc.m4 serial 31 -*- coding: utf-8 -*- -dnl Copyright (C) 2001-2002, 2004-2005, 2008-2018 Free Software Foundation, +# mbrtowc.m4 serial 27 -*- coding: utf-8 -*- +dnl Copyright (C) 2001-2002, 2004-2005, 2008-2016 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, @@ -164,7 +164,7 @@ int main () memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) if (mbsinit (&state)) - return 2; + return 1; } return 0; }]])], @@ -224,7 +224,7 @@ int main () memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, input + 3, 6, &state) != 4 && mbtowc (&wc, input + 3, 6) == 4) - return 2; + return 1; } return 0; }]])], @@ -352,7 +352,7 @@ int main () mbrtowc (&wc, NULL, 5, &state); /* Check that wc was not modified. */ if (wc != (wchar_t) 0xBADFACE) - return 2; + return 1; } return 0; }]])], @@ -539,7 +539,7 @@ int main () memset (&state, '\0', sizeof (mbstate_t)); if (mbrtowc (&wc, "", 1, &state) != 0) - return 2; + return 1; } return 0; }]])], @@ -563,11 +563,10 @@ AC_DEFUN([gl_MBRTOWC_EMPTY_INPUT], dnl is present. changequote(,)dnl case "$host_os" in - # Guess no on AIX and glibc systems. - aix* | *-gnu* | gnu*) gl_cv_func_mbrtowc_empty_input="guessing no" ;; - # Guess yes on native Windows. - mingw*) gl_cv_func_mbrtowc_empty_input="guessing yes" ;; - *) gl_cv_func_mbrtowc_empty_input="guessing yes" ;; + # 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( @@ -593,7 +592,6 @@ dnl https://sourceware.org/bugzilla/show_bug.cgi?id=19932 AC_DEFUN([gl_MBRTOWC_C_LOCALE], [ - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CACHE_CHECK([whether the C locale is free of encoding errors], [gl_cv_C_locale_sans_EILSEQ], [ @@ -610,7 +608,7 @@ AC_DEFUN([gl_MBRTOWC_C_LOCALE], int i; char *locale = setlocale (LC_ALL, "C"); if (! locale) - return 2; + return 1; for (i = CHAR_MIN; i <= CHAR_MAX; i++) { char c = i; @@ -618,23 +616,17 @@ AC_DEFUN([gl_MBRTOWC_C_LOCALE], mbstate_t mbs = { 0, }; size_t ss = mbrtowc (&wc, &c, 1, &mbs); if (1 < ss) - return 3; + return 1; } return 0; ]])], [gl_cv_C_locale_sans_EILSEQ=yes], [gl_cv_C_locale_sans_EILSEQ=no], - [case "$host_os" in - # Guess yes on native Windows. - mingw*) gl_cv_C_locale_sans_EILSEQ="guessing yes" ;; - esac - ]) - ]) + [:])]) ]) # Prerequisites of lib/mbrtowc.c. AC_DEFUN([gl_PREREQ_MBRTOWC], [ - AC_REQUIRE([AC_C_INLINE]) : ]) @@ -647,7 +639,7 @@ AC_DEFUN([AC_FUNC_MBRTOWC], [ dnl Same as AC_FUNC_MBRTOWC in autoconf-2.60. AC_CACHE_CHECK([whether mbrtowc and mbstate_t are properly declared], - [gl_cv_func_mbrtowc], + gl_cv_func_mbrtowc, [AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[/* Tru64 with Desktop Toolkit C has a bug: must be @@ -663,8 +655,8 @@ AC_DEFUN([AC_FUNC_MBRTOWC], size_t n = 1; mbstate_t state; return ! (sizeof state && (mbrtowc) (&wc, s, n, &state));]])], - [gl_cv_func_mbrtowc=yes], - [gl_cv_func_mbrtowc=no])]) + gl_cv_func_mbrtowc=yes, + gl_cv_func_mbrtowc=no)]) if test $gl_cv_func_mbrtowc = yes; then AC_DEFINE([HAVE_MBRTOWC], [1], [Define to 1 if mbrtowc and mbstate_t are properly declared.]) diff --git a/gdb/gnulib/import/m4/mbsinit.m4 b/gdb/gnulib/import/m4/mbsinit.m4 index 5cba3df0f05..88f08367a26 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-2018 Free Software Foundation, Inc. +dnl Copyright (C) 2008, 2010-2016 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 871dd965b71..3b5dc6ea0e6 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-2018 Free Software Foundation, Inc. +dnl Copyright (C) 2008-2016 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 004aa0d17c8..0a8eae25469 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-2018 Free Software Foundation, Inc. +dnl Copyright (C) 2000-2002, 2008-2016 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 83c65c11e32..25d32f0ec99 100644 --- a/gdb/gnulib/import/m4/memchr.m4 +++ b/gdb/gnulib/import/m4/memchr.m4 @@ -1,13 +1,11 @@ -# memchr.m4 serial 13 -dnl Copyright (C) 2002-2004, 2009-2018 Free Software Foundation, Inc. +# memchr.m4 serial 12 +dnl Copyright (C) 2002-2004, 2009-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN_ONCE([gl_FUNC_MEMCHR], [ - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - dnl Check for prerequisites for memory fence checks. gl_FUNC_MMAP_ANON AC_CHECK_HEADERS_ONCE([sys/mman.h]) @@ -25,10 +23,10 @@ AC_DEFUN_ONCE([gl_FUNC_MEMCHR], if test $HAVE_MEMCHR = 1; then # Detect platform-specific bugs in some versions of glibc: # memchr should not dereference anything with length 0 - # https://bugzilla.redhat.com/show_bug.cgi?id=499689 + # http://bugzilla.redhat.com/499689 # memchr should not dereference overestimated length after a match - # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737 - # https://sourceware.org/bugzilla/show_bug.cgi?id=10162 + # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737 + # http://sourceware.org/bugzilla/show_bug.cgi?id=10162 # Assume that memchr works on platforms that lack mprotect. AC_CACHE_CHECK([whether memchr works], [gl_cv_func_memchr_works], [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ @@ -75,21 +73,12 @@ AC_DEFUN_ONCE([gl_FUNC_MEMCHR], result |= 4; } return result; -]])], - [gl_cv_func_memchr_works=yes], - [gl_cv_func_memchr_works=no], - [case "$host_os" in - # Guess yes on native Windows. - mingw*) gl_cv_func_memchr_works="guessing yes" ;; - # Be pessimistic for now. - *) gl_cv_func_memchr_works="guessing no" ;; - esac - ]) - ]) - case "$gl_cv_func_memchr_works" in - *yes) ;; - *) REPLACE_MEMCHR=1 ;; - esac +]])], [gl_cv_func_memchr_works=yes], [gl_cv_func_memchr_works=no], + [dnl Be pessimistic for now. + gl_cv_func_memchr_works="guessing no"])]) + if test "$gl_cv_func_memchr_works" != yes; then + REPLACE_MEMCHR=1 + fi fi ]) diff --git a/gdb/gnulib/import/m4/memmem.m4 b/gdb/gnulib/import/m4/memmem.m4 index 609971ec3ce..981ede76b40 100644 --- a/gdb/gnulib/import/m4/memmem.m4 +++ b/gdb/gnulib/import/m4/memmem.m4 @@ -1,5 +1,5 @@ -# memmem.m4 serial 25 -dnl Copyright (C) 2002-2004, 2007-2018 Free Software Foundation, Inc. +# memmem.m4 serial 24 +dnl Copyright (C) 2002-2004, 2007-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -21,7 +21,7 @@ AC_DEFUN([gl_FUNC_MEMMEM_SIMPLE], if test $ac_cv_have_decl_memmem = no; then HAVE_DECL_MEMMEM=0 else - dnl Detect https://sourceware.org/bugzilla/show_bug.cgi?id=12092. + dnl Detect http://sourceware.org/bugzilla/show_bug.cgi?id=12092. dnl Also check that we handle empty needles correctly. AC_CACHE_CHECK([whether memmem works], [gl_cv_func_memmem_works_always], @@ -113,9 +113,6 @@ static void quit (int sig) { _exit (sig + 128); } if (!memmem (haystack, 2 * m + 1, needle, m + 1)) result |= 1; } - /* Free allocated memory, in case some sanitizer is watching. */ - free (haystack); - free (needle); return result; ]])], [gl_cv_func_memmem_works_fast=yes], [gl_cv_func_memmem_works_fast=no], diff --git a/gdb/gnulib/import/m4/mempcpy.m4 b/gdb/gnulib/import/m4/mempcpy.m4 index eedf9312d6f..6991f29f033 100644 --- a/gdb/gnulib/import/m4/mempcpy.m4 +++ b/gdb/gnulib/import/m4/mempcpy.m4 @@ -1,5 +1,5 @@ # mempcpy.m4 serial 11 -dnl Copyright (C) 2003-2004, 2006-2007, 2009-2018 Free Software Foundation, +dnl Copyright (C) 2003-2004, 2006-2007, 2009-2016 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/memrchr.m4 b/gdb/gnulib/import/m4/memrchr.m4 index a036b3911f0..6e7df5c6d54 100644 --- a/gdb/gnulib/import/m4/memrchr.m4 +++ b/gdb/gnulib/import/m4/memrchr.m4 @@ -1,5 +1,5 @@ # memrchr.m4 serial 10 -dnl Copyright (C) 2002-2003, 2005-2007, 2009-2018 Free Software Foundation, +dnl Copyright (C) 2002-2003, 2005-2007, 2009-2016 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/mkdir.m4 b/gdb/gnulib/import/m4/mkdir.m4 index 1452999cbf2..574092bb258 100644 --- a/gdb/gnulib/import/m4/mkdir.m4 +++ b/gdb/gnulib/import/m4/mkdir.m4 @@ -1,6 +1,6 @@ -# serial 14 +# serial 11 -# Copyright (C) 2001, 2003-2004, 2006, 2008-2018 Free Software Foundation, Inc. +# Copyright (C) 2001, 2003-2004, 2006, 2008-2016 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. @@ -23,21 +23,10 @@ AC_DEFUN([gl_FUNC_MKDIR], [gl_cv_func_mkdir_trailing_slash_works=yes], [gl_cv_func_mkdir_trailing_slash_works=no], [case "$host_os" in - # Guess yes on Linux systems. - linux-* | linux) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;; - # Guess yes on glibc systems. - *-gnu* | gnu*) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;; - # Guess yes on MSVC, no on mingw. - mingw*) AC_EGREP_CPP([Known], [ -#ifdef _MSC_VER - Known -#endif - ], - [gl_cv_func_mkdir_trailing_slash_works="guessing yes"], - [gl_cv_func_mkdir_trailing_slash_works="guessing no"]) - ;; - # If we don't know, assume the worst. - *) gl_cv_func_mkdir_trailing_slash_works="guessing no" ;; + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_mkdir_trailing_slash_works="guessing no" ;; esac ]) rm -rf conftest.dir @@ -60,12 +49,10 @@ AC_DEFUN([gl_FUNC_MKDIR], [gl_cv_func_mkdir_trailing_dot_works=yes], [gl_cv_func_mkdir_trailing_dot_works=no], [case "$host_os" in - # Guess yes on glibc systems. - *-gnu* | gnu*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;; - # Guess no on native Windows. - mingw*) gl_cv_func_mkdir_trailing_dot_works="guessing no" ;; - # If we don't know, assume the worst. - *) gl_cv_func_mkdir_trailing_dot_works="guessing no" ;; + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_mkdir_trailing_dot_works="guessing no" ;; esac ]) rm -rf conftest.dir diff --git a/gdb/gnulib/import/m4/mkstemp.m4 b/gdb/gnulib/import/m4/mkstemp.m4 index 1407ed9eeda..131e4a7b261 100644 --- a/gdb/gnulib/import/m4/mkstemp.m4 +++ b/gdb/gnulib/import/m4/mkstemp.m4 @@ -1,6 +1,6 @@ -#serial 25 +#serial 23 -# Copyright (C) 2001, 2003-2007, 2009-2018 Free Software Foundation, Inc. +# Copyright (C) 2001, 2003-2007, 2009-2016 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. @@ -57,12 +57,10 @@ AC_DEFUN([gl_FUNC_MKSTEMP], [gl_cv_func_working_mkstemp=yes], [gl_cv_func_working_mkstemp=no], [case "$host_os" in - # Guess yes on glibc systems. - *-gnu* | gnu*) gl_cv_func_working_mkstemp="guessing yes" ;; - # Guess no on native Windows. - mingw*) gl_cv_func_working_mkstemp="guessing no" ;; - # If we don't know, assume the worst. - *) gl_cv_func_working_mkstemp="guessing no" ;; + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_working_mkstemp="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_working_mkstemp="guessing no" ;; esac ]) rm -rf conftest.mkstemp diff --git a/gdb/gnulib/import/m4/mmap-anon.m4 b/gdb/gnulib/import/m4/mmap-anon.m4 index 55fea82bb89..853c89dc9b5 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-2018 Free Software Foundation, Inc. +dnl Copyright (C) 2005, 2007, 2009-2016 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/mode_t.m4 b/gdb/gnulib/import/m4/mode_t.m4 index 83e276c53c7..0cd40dba493 100644 --- a/gdb/gnulib/import/m4/mode_t.m4 +++ b/gdb/gnulib/import/m4/mode_t.m4 @@ -1,5 +1,5 @@ # mode_t.m4 serial 2 -dnl Copyright (C) 2009-2018 Free Software Foundation, Inc. +dnl Copyright (C) 2009-2016 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/msvc-inval.m4 b/gdb/gnulib/import/m4/msvc-inval.m4 index 55baeecc638..f5e4c89309e 100644 --- a/gdb/gnulib/import/m4/msvc-inval.m4 +++ b/gdb/gnulib/import/m4/msvc-inval.m4 @@ -1,5 +1,5 @@ # msvc-inval.m4 serial 1 -dnl Copyright (C) 2011-2018 Free Software Foundation, Inc. +dnl Copyright (C) 2011-2016 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/msvc-nothrow.m4 b/gdb/gnulib/import/m4/msvc-nothrow.m4 index 74ae4277f55..58f5c0bc205 100644 --- a/gdb/gnulib/import/m4/msvc-nothrow.m4 +++ b/gdb/gnulib/import/m4/msvc-nothrow.m4 @@ -1,5 +1,5 @@ # msvc-nothrow.m4 serial 1 -dnl Copyright (C) 2011-2018 Free Software Foundation, Inc. +dnl Copyright (C) 2011-2016 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 38a11cc1d94..43b5d057508 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-2018 Free Software Foundation, Inc. +dnl Copyright (C) 2008-2016 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 49140074d08..d8dd8f13a12 100644 --- a/gdb/gnulib/import/m4/nocrash.m4 +++ b/gdb/gnulib/import/m4/nocrash.m4 @@ -1,5 +1,5 @@ -# nocrash.m4 serial 5 -dnl Copyright (C) 2005, 2009-2018 Free Software Foundation, Inc. +# nocrash.m4 serial 4 +dnl Copyright (C) 2005, 2009-2016 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. @@ -79,7 +79,7 @@ nocrash_init (void) } } } -#elif defined _WIN32 && ! defined __CYGWIN__ +#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* Avoid a crash on native Windows. */ #define WIN32_LEAN_AND_MEAN #include diff --git a/gdb/gnulib/import/m4/off_t.m4 b/gdb/gnulib/import/m4/off_t.m4 index f4d578751d5..282751b47b4 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-2018 Free Software Foundation, Inc. +dnl Copyright (C) 2012-2016 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/onceonly.m4 b/gdb/gnulib/import/m4/onceonly.m4 index 5ab3dd7d3ac..c0c9e2c8100 100644 --- a/gdb/gnulib/import/m4/onceonly.m4 +++ b/gdb/gnulib/import/m4/onceonly.m4 @@ -1,5 +1,5 @@ # onceonly.m4 serial 9 -dnl Copyright (C) 2002-2003, 2005-2006, 2008-2018 Free Software Foundation, +dnl Copyright (C) 2002-2003, 2005-2006, 2008-2016 Free Software Foundation, dnl Inc. dnl dnl This file is free software; you can redistribute it and/or modify @@ -13,7 +13,7 @@ dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License -dnl along with this file. If not, see . +dnl along with this file. If not, see . dnl dnl As a special exception to the GNU General Public License, dnl this file may be distributed as part of a program diff --git a/gdb/gnulib/import/m4/open-cloexec.m4 b/gdb/gnulib/import/m4/open-cloexec.m4 deleted file mode 100644 index a272784eb06..00000000000 --- a/gdb/gnulib/import/m4/open-cloexec.m4 +++ /dev/null @@ -1,21 +0,0 @@ -# Test whether O_CLOEXEC is defined. - -dnl Copyright 2017-2018 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_PREPROC_O_CLOEXEC], -[ - AC_CACHE_CHECK([for O_CLOEXEC], - [gl_cv_macro_O_CLOEXEC], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([[#include - #ifndef O_CLOEXEC - choke me; - #endif - ]], - [[return O_CLOEXEC;]])], - [gl_cv_macro_O_CLOEXEC=yes], - [gl_cv_macro_O_CLOEXEC=no])]) -]) diff --git a/gdb/gnulib/import/m4/open.m4 b/gdb/gnulib/import/m4/open.m4 index 8b3d4024e11..53d30381dd7 100644 --- a/gdb/gnulib/import/m4/open.m4 +++ b/gdb/gnulib/import/m4/open.m4 @@ -1,5 +1,5 @@ -# open.m4 serial 15 -dnl Copyright (C) 2007-2018 Free Software Foundation, Inc. +# open.m4 serial 14 +dnl Copyright (C) 2007-2016 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,7 +7,6 @@ dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_OPEN], [ AC_REQUIRE([AC_CANONICAL_HOST]) - AC_REQUIRE([gl_PREPROC_O_CLOEXEC]) case "$host_os" in mingw* | pw*) REPLACE_OPEN=1 @@ -16,9 +15,6 @@ AC_DEFUN([gl_FUNC_OPEN], dnl open("foo/") should not create a file when the file name has a dnl trailing slash. FreeBSD only has the problem on symlinks. AC_CHECK_FUNCS_ONCE([lstat]) - if test "$gl_cv_macro_O_CLOEXEC" != yes; then - REPLACE_OPEN=1 - fi AC_CACHE_CHECK([whether open recognizes a trailing slash], [gl_cv_func_open_slash], [# Assume that if we have lstat, we can also check symlinks. diff --git a/gdb/gnulib/import/m4/openat.m4 b/gdb/gnulib/import/m4/openat.m4 index e8377201fdd..fdeb1de6a3d 100644 --- a/gdb/gnulib/import/m4/openat.m4 +++ b/gdb/gnulib/import/m4/openat.m4 @@ -1,7 +1,7 @@ -# serial 46 +# serial 45 # See if we need to use our replacement for Solaris' openat et al functions. -dnl Copyright (C) 2004-2018 Free Software Foundation, Inc. +dnl Copyright (C) 2004-2016 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. @@ -14,12 +14,10 @@ AC_DEFUN([gl_FUNC_OPENAT], AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) AC_CHECK_FUNCS_ONCE([openat]) AC_REQUIRE([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK]) - AC_REQUIRE([gl_PREPROC_O_CLOEXEC]) - case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink+$gl_cv_macro_O_CLOEXEC in - yes+*yes+yes) + case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink in + yes+*yes) ;; yes+*) - # Solaris 10 lacks O_CLOEXEC. # Solaris 9 has *at functions, but uniformly mishandles trailing # slash in all of them. REPLACE_OPENAT=1 diff --git a/gdb/gnulib/import/m4/opendir.m4 b/gdb/gnulib/import/m4/opendir.m4 index 5609536ab61..ffaa6ae3baa 100644 --- a/gdb/gnulib/import/m4/opendir.m4 +++ b/gdb/gnulib/import/m4/opendir.m4 @@ -1,5 +1,5 @@ -# opendir.m4 serial 5 -dnl Copyright (C) 2011-2018 Free Software Foundation, Inc. +# opendir.m4 serial 4 +dnl Copyright (C) 2011-2016 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,7 +7,6 @@ dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_OPENDIR], [ AC_REQUIRE([gl_DIRENT_H_DEFAULTS]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CHECK_FUNCS([opendir]) if test $ac_cv_func_opendir = no; then diff --git a/gdb/gnulib/import/m4/pathmax.m4 b/gdb/gnulib/import/m4/pathmax.m4 index 292a2569711..6f8e59a1a24 100644 --- a/gdb/gnulib/import/m4/pathmax.m4 +++ b/gdb/gnulib/import/m4/pathmax.m4 @@ -1,5 +1,5 @@ -# pathmax.m4 serial 11 -dnl Copyright (C) 2002-2003, 2005-2006, 2009-2018 Free Software Foundation, +# pathmax.m4 serial 10 +dnl Copyright (C) 2002-2003, 2005-2006, 2009-2016 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, @@ -29,7 +29,7 @@ AC_DEFUN([gl_PATHMAX_SNIPPET], [[ # undef PATH_MAX # define PATH_MAX 1024 #endif -#if defined _WIN32 && ! defined __CYGWIN__ +#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # undef PATH_MAX # define PATH_MAX 260 #endif diff --git a/gdb/gnulib/import/m4/rawmemchr.m4 b/gdb/gnulib/import/m4/rawmemchr.m4 index b7497b8473b..d3ccb7eb389 100644 --- a/gdb/gnulib/import/m4/rawmemchr.m4 +++ b/gdb/gnulib/import/m4/rawmemchr.m4 @@ -1,5 +1,5 @@ # rawmemchr.m4 serial 2 -dnl Copyright (C) 2003, 2007-2018 Free Software Foundation, Inc. +dnl Copyright (C) 2003, 2007-2016 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/readdir.m4 b/gdb/gnulib/import/m4/readdir.m4 index f45a45f189e..eda3acf73dc 100644 --- a/gdb/gnulib/import/m4/readdir.m4 +++ b/gdb/gnulib/import/m4/readdir.m4 @@ -1,5 +1,5 @@ # readdir.m4 serial 1 -dnl Copyright (C) 2011-2018 Free Software Foundation, Inc. +dnl Copyright (C) 2011-2016 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/readlink.m4 b/gdb/gnulib/import/m4/readlink.m4 index 4d0ab4836b0..ede0378b481 100644 --- a/gdb/gnulib/import/m4/readlink.m4 +++ b/gdb/gnulib/import/m4/readlink.m4 @@ -1,5 +1,5 @@ -# readlink.m4 serial 14 -dnl Copyright (C) 2003, 2007, 2009-2018 Free Software Foundation, Inc. +# readlink.m4 serial 12 +dnl Copyright (C) 2003, 2007, 2009-2016 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. @@ -34,12 +34,10 @@ AC_DEFUN([gl_FUNC_READLINK], return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;]])], [gl_cv_func_readlink_works=yes], [gl_cv_func_readlink_works=no], [case "$host_os" in - # Guess yes on Linux systems. - linux-* | linux) gl_cv_func_readlink_works="guessing yes" ;; - # Guess yes on glibc systems. - *-gnu* | gnu*) gl_cv_func_readlink_works="guessing yes" ;; - # If we don't know, assume the worst. - *) gl_cv_func_readlink_works="guessing no" ;; + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_readlink_works="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_readlink_works="guessing no" ;; esac ]) rm -f conftest.link conftest.lnk2]) diff --git a/gdb/gnulib/import/m4/realloc.m4 b/gdb/gnulib/import/m4/realloc.m4 index 23c0d5d1c30..fc2282544dd 100644 --- a/gdb/gnulib/import/m4/realloc.m4 +++ b/gdb/gnulib/import/m4/realloc.m4 @@ -1,5 +1,5 @@ -# realloc.m4 serial 15 -dnl Copyright (C) 2007, 2009-2018 Free Software Foundation, Inc. +# realloc.m4 serial 14 +dnl Copyright (C) 2007, 2009-2016 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,7 +7,7 @@ dnl with or without modifications, as long as this notice is preserved. m4_version_prereq([2.70], [] ,[ # This is adapted with modifications from upstream Autoconf here: -# https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=04be2b7a29d65d9a08e64e8e56e594c91749598c +# http://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=04be2b7a29d65d9a08e64e8e56e594c91749598c AC_DEFUN([_AC_FUNC_REALLOC_IF], [ AC_REQUIRE([AC_HEADER_STDC])dnl @@ -32,7 +32,7 @@ AC_DEFUN([_AC_FUNC_REALLOC_IF], [ac_cv_func_realloc_0_nonnull=no], [case "$host_os" in # Guess yes on platforms where we know the result. - *-gnu* | gnu* | freebsd* | netbsd* | openbsd* \ + *-gnu* | freebsd* | netbsd* | openbsd* \ | hpux* | solaris* | cygwin* | mingw*) ac_cv_func_realloc_0_nonnull=yes ;; # If we don't know, assume the worst. diff --git a/gdb/gnulib/import/m4/rename.m4 b/gdb/gnulib/import/m4/rename.m4 index e7ff1bfac3c..fbcc758d5a6 100644 --- a/gdb/gnulib/import/m4/rename.m4 +++ b/gdb/gnulib/import/m4/rename.m4 @@ -1,6 +1,6 @@ -# serial 30 +# serial 26 -# Copyright (C) 2001, 2003, 2005-2006, 2009-2018 Free Software Foundation, Inc. +# Copyright (C) 2001, 2003, 2005-2006, 2009-2016 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. @@ -19,7 +19,7 @@ AC_DEFUN([gl_FUNC_RENAME], AC_REQUIRE([gl_STDIO_H_DEFAULTS]) AC_CHECK_FUNCS_ONCE([lstat]) - dnl Solaris 11, AIX 7.1 mistakenly allow rename("file","name/"). + dnl Solaris 10, AIX 7.1 mistakenly allow rename("file","name/"). dnl NetBSD 1.6 mistakenly forbids rename("dir","name/"). dnl FreeBSD 7.2 mistakenly allows rename("file","link-to-file/"). dnl The Solaris bug can be worked around without stripping @@ -55,14 +55,10 @@ AC_DEFUN([gl_FUNC_RENAME], [gl_cv_func_rename_slash_dst_works=no], dnl When crosscompiling, assume rename is broken. [case "$host_os" in - # Guess yes on Linux systems. - linux-* | linux) gl_cv_func_rename_slash_dst_works="guessing yes" ;; - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_rename_slash_dst_works="guessing yes" ;; - # Guess no on native Windows. - mingw*) gl_cv_func_rename_slash_dst_works="guessing no" ;; - # If we don't know, assume the worst. - *) gl_cv_func_rename_slash_dst_works="guessing no" ;; + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_rename_slash_dst_works="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_rename_slash_dst_works="guessing no" ;; esac ]) rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk @@ -73,7 +69,7 @@ AC_DEFUN([gl_FUNC_RENAME], REPLACE_RENAME=1 AC_DEFINE([RENAME_TRAILING_SLASH_DEST_BUG], [1], [Define if rename does not correctly handle slashes on the destination - argument, such as on Solaris 11 or NetBSD 1.6.]) + argument, such as on Solaris 10 or NetBSD 1.6.]) ;; esac @@ -111,14 +107,10 @@ AC_DEFUN([gl_FUNC_RENAME], [gl_cv_func_rename_slash_src_works=no], dnl When crosscompiling, assume rename is broken. [case "$host_os" in - # Guess yes on Linux systems. - linux-* | linux) gl_cv_func_rename_slash_src_works="guessing yes" ;; - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_rename_slash_src_works="guessing yes" ;; - # Guess yes on native Windows. - mingw*) gl_cv_func_rename_slash_src_works="guessing yes" ;; - # If we don't know, assume the worst. - *) gl_cv_func_rename_slash_src_works="guessing no" ;; + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_rename_slash_src_works="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_rename_slash_src_works="guessing no" ;; esac ]) rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk @@ -140,12 +132,11 @@ AC_DEFUN([gl_FUNC_RENAME], AC_CACHE_CHECK([whether rename manages hard links correctly], [gl_cv_func_rename_link_works], [if test $ac_cv_func_link = yes; then - rm -rf conftest.f conftest.f1 conftest.f2 - if touch conftest.f conftest.f2 && ln conftest.f conftest.f1 && + rm -rf conftest.f conftest.f1 + if touch conftest.f && ln conftest.f conftest.f1 && set x `ls -i conftest.f conftest.f1` && test "$2" = "$4"; then AC_RUN_IFELSE( [AC_LANG_PROGRAM([[ -# include # include # include # include @@ -155,38 +146,26 @@ AC_DEFUN([gl_FUNC_RENAME], result |= 1; if (unlink ("conftest.f1")) result |= 2; - - /* Allow either the POSIX-required behavior, where the - previous rename kept conftest.f, or the (better) NetBSD - behavior, where it removed conftest.f. */ - if (rename ("conftest.f", "conftest.f") != 0 - && errno != ENOENT) + if (rename ("conftest.f", "conftest.f")) result |= 4; - if (rename ("conftest.f1", "conftest.f1") == 0) result |= 8; - if (rename ("conftest.f2", "conftest.f2") != 0) - result |= 16; return result; ]])], [gl_cv_func_rename_link_works=yes], [gl_cv_func_rename_link_works=no], dnl When crosscompiling, assume rename is broken. [case "$host_os" in - # Guess yes on Linux systems. - linux-* | linux) gl_cv_func_rename_link_works="guessing yes" ;; - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_rename_link_works="guessing yes" ;; - # Guess yes on native Windows. - mingw*) gl_cv_func_rename_link_works="guessing yes" ;; - # If we don't know, assume the worst. - *) gl_cv_func_rename_link_works="guessing no" ;; + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_rename_link_works="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_rename_link_works="guessing no" ;; esac ]) else gl_cv_func_rename_link_works="guessing no" fi - rm -rf conftest.f conftest.f1 conftest.f2 + rm -rf conftest.f conftest.f1 else gl_cv_func_rename_link_works=yes fi @@ -226,14 +205,10 @@ AC_DEFUN([gl_FUNC_RENAME], [gl_cv_func_rename_dest_works=no], dnl When crosscompiling, assume rename is broken. [case "$host_os" in - # Guess yes on Linux systems. - linux-* | linux) gl_cv_func_rename_dest_works="guessing yes" ;; - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_rename_dest_works="guessing yes" ;; - # Guess no on native Windows. - mingw*) gl_cv_func_rename_dest_works="guessing no" ;; - # If we don't know, assume the worst. - *) gl_cv_func_rename_dest_works="guessing no" ;; + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_rename_dest_works="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_rename_dest_works="guessing no" ;; esac ]) rm -rf conftest.f conftest.d1 conftest.d2 diff --git a/gdb/gnulib/import/m4/rewinddir.m4 b/gdb/gnulib/import/m4/rewinddir.m4 index 4a78c1f354d..0d3d6c619de 100644 --- a/gdb/gnulib/import/m4/rewinddir.m4 +++ b/gdb/gnulib/import/m4/rewinddir.m4 @@ -1,5 +1,5 @@ # rewinddir.m4 serial 1 -dnl Copyright (C) 2011-2018 Free Software Foundation, Inc. +dnl Copyright (C) 2011-2016 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/rmdir.m4 b/gdb/gnulib/import/m4/rmdir.m4 index a24d845e37b..ebb3b5db196 100644 --- a/gdb/gnulib/import/m4/rmdir.m4 +++ b/gdb/gnulib/import/m4/rmdir.m4 @@ -1,5 +1,5 @@ -# rmdir.m4 serial 16 -dnl Copyright (C) 2002, 2005, 2009-2018 Free Software Foundation, Inc. +# rmdir.m4 serial 13 +dnl Copyright (C) 2002, 2005, 2009-2016 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. @@ -33,14 +33,10 @@ AC_DEFUN([gl_FUNC_RMDIR], ]])], [gl_cv_func_rmdir_works=yes], [gl_cv_func_rmdir_works=no], [case "$host_os" in - # Guess yes on Linux systems. - linux-* | linux) gl_cv_func_rmdir_works="guessing yes" ;; - # Guess yes on glibc systems. - *-gnu* | gnu*) gl_cv_func_rmdir_works="guessing yes" ;; - # Guess no on native Windows. - mingw*) gl_cv_func_rmdir_works="guessing no" ;; - # If we don't know, assume the worst. - *) gl_cv_func_rmdir_works="guessing no" ;; + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_rmdir_works="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_rmdir_works="guessing no" ;; esac ]) rm -rf conftest.dir conftest.file]) diff --git a/gdb/gnulib/import/m4/save-cwd.m4 b/gdb/gnulib/import/m4/save-cwd.m4 index d0270ea604e..d6e24100072 100644 --- a/gdb/gnulib/import/m4/save-cwd.m4 +++ b/gdb/gnulib/import/m4/save-cwd.m4 @@ -1,5 +1,5 @@ # serial 10 -dnl Copyright (C) 2002-2006, 2009-2018 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2006, 2009-2016 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/secure_getenv.m4 b/gdb/gnulib/import/m4/secure_getenv.m4 new file mode 100644 index 00000000000..3983173603a --- /dev/null +++ b/gdb/gnulib/import/m4/secure_getenv.m4 @@ -0,0 +1,26 @@ +# Look up an environment variable more securely. +dnl Copyright 2013-2016 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +AC_DEFUN([gl_FUNC_SECURE_GETENV], +[ + dnl Persuade glibc to declare secure_getenv(). + AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) + + AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) + AC_CHECK_FUNCS_ONCE([secure_getenv]) + if test $ac_cv_func_secure_getenv = no; then + HAVE_SECURE_GETENV=0 + fi +]) + +# Prerequisites of lib/secure_getenv.c. +AC_DEFUN([gl_PREREQ_SECURE_GETENV], [ + AC_CHECK_FUNCS([__secure_getenv]) + if test $ac_cv_func___secure_getenv = no; then + AC_CHECK_FUNCS([issetugid]) + fi + AC_CHECK_FUNCS_ONCE([getuid geteuid getgid getegid]) +]) diff --git a/gdb/gnulib/import/m4/setenv.m4 b/gdb/gnulib/import/m4/setenv.m4 index 5d257f71709..5d49aba60dd 100644 --- a/gdb/gnulib/import/m4/setenv.m4 +++ b/gdb/gnulib/import/m4/setenv.m4 @@ -1,5 +1,5 @@ -# setenv.m4 serial 27 -dnl Copyright (C) 2001-2004, 2006-2018 Free Software Foundation, Inc. +# setenv.m4 serial 26 +dnl Copyright (C) 2001-2004, 2006-2016 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. @@ -35,10 +35,10 @@ AC_DEFUN([gl_FUNC_SETENV], ]])], [gl_cv_func_setenv_works=yes], [gl_cv_func_setenv_works=no], [case "$host_os" in - # Guess yes on glibc systems. - *-gnu* | gnu*) gl_cv_func_setenv_works="guessing yes" ;; - # If we don't know, assume the worst. - *) gl_cv_func_setenv_works="guessing no" ;; + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_setenv_works="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_setenv_works="guessing no" ;; esac ])]) case "$gl_cv_func_setenv_works" in diff --git a/gdb/gnulib/import/m4/signal_h.m4 b/gdb/gnulib/import/m4/signal_h.m4 index 394b91d3b24..bcfd7b4be30 100644 --- a/gdb/gnulib/import/m4/signal_h.m4 +++ b/gdb/gnulib/import/m4/signal_h.m4 @@ -1,5 +1,5 @@ # signal_h.m4 serial 18 -dnl Copyright (C) 2007-2018 Free Software Foundation, Inc. +dnl Copyright (C) 2007-2016 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 0977f205f3d..3e7b9e6e024 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-2018 Free Software Foundation, Inc. +dnl Copyright (C) 2001-2003, 2006, 2010-2016 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-time.m4 b/gdb/gnulib/import/m4/stat-time.m4 deleted file mode 100644 index d0d17ed4ff7..00000000000 --- a/gdb/gnulib/import/m4/stat-time.m4 +++ /dev/null @@ -1,83 +0,0 @@ -# Checks for stat-related time functions. - -# Copyright (C) 1998-1999, 2001, 2003, 2005-2007, 2009-2018 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 Paul Eggert. - -# st_atim.tv_nsec - Linux, Solaris, Cygwin -# st_atimespec.tv_nsec - FreeBSD, NetBSD, if ! defined _POSIX_SOURCE -# st_atimensec - FreeBSD, NetBSD, if defined _POSIX_SOURCE -# st_atim.st__tim.tv_nsec - UnixWare (at least 2.1.2 through 7.1) - -# st_birthtimespec - FreeBSD, NetBSD (hidden on OpenBSD 3.9, anyway) -# st_birthtim - Cygwin 1.7.0+ - -AC_DEFUN([gl_STAT_TIME], -[ - AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) - AC_CHECK_HEADERS_ONCE([sys/time.h]) - - AC_CHECK_MEMBERS([struct stat.st_atim.tv_nsec], - [AC_CACHE_CHECK([whether struct stat.st_atim is of type struct timespec], - [ac_cv_typeof_struct_stat_st_atim_is_struct_timespec], - [AC_COMPILE_IFELSE([AC_LANG_PROGRAM( - [[ - #include - #include - #if HAVE_SYS_TIME_H - # include - #endif - #include - struct timespec ts; - struct stat st; - ]], - [[ - st.st_atim = ts; - ]])], - [ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes], - [ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no])]) - if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then - AC_DEFINE([TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC], [1], - [Define to 1 if the type of the st_atim member of a struct stat is - struct timespec.]) - fi], - [AC_CHECK_MEMBERS([struct stat.st_atimespec.tv_nsec], [], - [AC_CHECK_MEMBERS([struct stat.st_atimensec], [], - [AC_CHECK_MEMBERS([struct stat.st_atim.st__tim.tv_nsec], [], [], - [#include - #include ])], - [#include - #include ])], - [#include - #include ])], - [#include - #include ]) -]) - -# Check for st_birthtime, a feature from UFS2 (FreeBSD, NetBSD, OpenBSD, etc.) -# and NTFS (Cygwin). -# There was a time when this field was named st_createtime (21 June -# 2002 to 16 July 2002) But that window is very small and applied only -# to development code, so systems still using that configuration are -# not supported. See revisions 1.10 and 1.11 of FreeBSD's -# src/sys/ufs/ufs/dinode.h. -# -AC_DEFUN([gl_STAT_BIRTHTIME], -[ - AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) - AC_CHECK_HEADERS_ONCE([sys/time.h]) - AC_CHECK_MEMBERS([struct stat.st_birthtimespec.tv_nsec], [], - [AC_CHECK_MEMBERS([struct stat.st_birthtimensec], [], - [AC_CHECK_MEMBERS([struct stat.st_birthtim.tv_nsec], [], [], - [#include - #include ])], - [#include - #include ])], - [#include - #include ]) -]) diff --git a/gdb/gnulib/import/m4/stat.m4 b/gdb/gnulib/import/m4/stat.m4 index e8ec3b2b966..a794975de9c 100644 --- a/gdb/gnulib/import/m4/stat.m4 +++ b/gdb/gnulib/import/m4/stat.m4 @@ -1,6 +1,6 @@ -# serial 15 +# serial 11 -# Copyright (C) 2009-2018 Free Software Foundation, Inc. +# Copyright (C) 2009-2016 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -8,67 +8,64 @@ AC_DEFUN([gl_FUNC_STAT], [ - AC_REQUIRE([AC_CANONICAL_HOST]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) AC_CHECK_FUNCS_ONCE([lstat]) - case "$host_os" in - mingw*) - dnl On this platform, the original stat() returns st_atime, st_mtime, - dnl st_ctime values that are affected by the time zone. - REPLACE_STAT=1 - ;; - *) - dnl AIX 7.1, Solaris 9, mingw64 mistakenly succeed on stat("file/"). - dnl (For mingw, this is due to a broken stat() override in libmingwex.a.) - dnl FreeBSD 7.2 mistakenly succeeds on stat("link-to-file/"). - AC_CACHE_CHECK([whether stat handles trailing slashes on files], - [gl_cv_func_stat_file_slash], - [touch conftest.tmp - # Assume that if we have lstat, we can also check symlinks. - if test $ac_cv_func_lstat = yes; then - ln -s conftest.tmp conftest.lnk - fi - AC_RUN_IFELSE( - [AC_LANG_PROGRAM( - [[#include + dnl mingw is the only known platform where stat(".") and stat("./") differ + AC_CACHE_CHECK([whether stat handles trailing slashes on directories], + [gl_cv_func_stat_dir_slash], + [AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [[#include +]], [[struct stat st; return stat (".", &st) != stat ("./", &st);]])], + [gl_cv_func_stat_dir_slash=yes], [gl_cv_func_stat_dir_slash=no], + [case $host_os in + mingw*) gl_cv_func_stat_dir_slash="guessing no";; + *) gl_cv_func_stat_dir_slash="guessing yes";; + esac])]) + dnl AIX 7.1, Solaris 9, mingw64 mistakenly succeed on stat("file/"). + dnl (For mingw, this is due to a broken stat() override in libmingwex.a.) + dnl FreeBSD 7.2 mistakenly succeeds on stat("link-to-file/"). + AC_CACHE_CHECK([whether stat handles trailing slashes on files], + [gl_cv_func_stat_file_slash], + [touch conftest.tmp + # Assume that if we have lstat, we can also check symlinks. + if test $ac_cv_func_lstat = yes; then + ln -s conftest.tmp conftest.lnk + fi + AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [[#include ]], [[int result = 0; - struct stat st; - if (!stat ("conftest.tmp/", &st)) - result |= 1; + struct stat st; + if (!stat ("conftest.tmp/", &st)) + result |= 1; #if HAVE_LSTAT - if (!stat ("conftest.lnk/", &st)) - result |= 2; + if (!stat ("conftest.lnk/", &st)) + result |= 2; #endif - return result; - ]])], - [gl_cv_func_stat_file_slash=yes], [gl_cv_func_stat_file_slash=no], - [case "$host_os" in - # Guess yes on Linux systems. - linux-* | linux) gl_cv_func_stat_file_slash="guessing yes" ;; - # Guess yes on glibc systems. - *-gnu* | gnu*) gl_cv_func_stat_file_slash="guessing yes" ;; - # If we don't know, assume the worst. - *) gl_cv_func_stat_file_slash="guessing no" ;; - esac - ]) - rm -f conftest.tmp conftest.lnk]) - case $gl_cv_func_stat_file_slash in - *no) - REPLACE_STAT=1 - AC_DEFINE([REPLACE_FUNC_STAT_FILE], [1], [Define to 1 if stat needs - help when passed a file name with a trailing slash]);; - esac - case $host_os in - dnl Solaris stat can return a negative tv_nsec. - solaris*) - REPLACE_FSTAT=1 ;; - esac - ;; + return result; + ]])], + [gl_cv_func_stat_file_slash=yes], [gl_cv_func_stat_file_slash=no], + [case "$host_os" in + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_stat_file_slash="guessing no" ;; + esac + ]) + rm -f conftest.tmp conftest.lnk]) + case $gl_cv_func_stat_dir_slash in + *no) REPLACE_STAT=1 + AC_DEFINE([REPLACE_FUNC_STAT_DIR], [1], [Define to 1 if stat needs + help when passed a directory name with a trailing slash]);; + esac + case $gl_cv_func_stat_file_slash in + *no) REPLACE_STAT=1 + AC_DEFINE([REPLACE_FUNC_STAT_FILE], [1], [Define to 1 if stat needs + help when passed a file name with a trailing slash]);; esac ]) -# Prerequisites of lib/stat.c and lib/stat-w32.c. -AC_DEFUN([gl_PREREQ_STAT], [ - AC_REQUIRE([gl_HEADER_SYS_STAT_H]) - : -]) +# Prerequisites of lib/stat.c. +AC_DEFUN([gl_PREREQ_STAT], [:]) diff --git a/gdb/gnulib/import/m4/std-gnu11.m4 b/gdb/gnulib/import/m4/std-gnu11.m4 deleted file mode 100644 index c85ac430150..00000000000 --- a/gdb/gnulib/import/m4/std-gnu11.m4 +++ /dev/null @@ -1,824 +0,0 @@ -# Prefer GNU C11 and C++11 to earlier versions. -*- coding: utf-8 -*- - -# This implementation is taken from GNU Autoconf lib/autoconf/c.m4 -# commit 017d5ddd82854911f0119691d91ea8a1438824d6 -# dated Sun Apr 3 13:57:17 2016 -0700 -# This implementation will be obsolete once we can assume Autoconf 2.70 -# or later is installed everywhere a Gnulib program might be developed. - - -# Copyright (C) 2001-2018 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# Written by David MacKenzie, with help from -# Akim Demaille, Paul Eggert, -# François Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor, -# Roland McGrath, Noah Friedman, david d zuhn, and many others. - - -# AC_PROG_CC([COMPILER ...]) -# -------------------------- -# COMPILER ... is a space separated list of C compilers to search for. -# This just gives the user an opportunity to specify an alternative -# search list for the C compiler. -AC_DEFUN_ONCE([AC_PROG_CC], -[AC_LANG_PUSH(C)dnl -AC_ARG_VAR([CC], [C compiler command])dnl -AC_ARG_VAR([CFLAGS], [C compiler flags])dnl -_AC_ARG_VAR_LDFLAGS()dnl -_AC_ARG_VAR_LIBS()dnl -_AC_ARG_VAR_CPPFLAGS()dnl -m4_ifval([$1], - [AC_CHECK_TOOLS(CC, [$1])], -[AC_CHECK_TOOL(CC, gcc) -if test -z "$CC"; then - dnl Here we want: - dnl AC_CHECK_TOOL(CC, cc) - dnl but without the check for a tool without the prefix. - dnl Until the check is removed from there, copy the code: - if test -n "$ac_tool_prefix"; then - AC_CHECK_PROG(CC, [${ac_tool_prefix}cc], [${ac_tool_prefix}cc]) - fi -fi -if test -z "$CC"; then - AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc) -fi -if test -z "$CC"; then - AC_CHECK_TOOLS(CC, cl.exe) -fi -if test -z "$CC"; then - AC_CHECK_TOOL(CC, clang) -fi -]) - -test -z "$CC" && AC_MSG_FAILURE([no acceptable C compiler found in \$PATH]) - -# Provide some information about the compiler. -_AS_ECHO_LOG([checking for _AC_LANG compiler version]) -set X $ac_compile -ac_compiler=$[2] -for ac_option in --version -v -V -qversion -version; do - _AC_DO_LIMIT([$ac_compiler $ac_option >&AS_MESSAGE_LOG_FD]) -done - -m4_expand_once([_AC_COMPILER_EXEEXT])[]dnl -m4_expand_once([_AC_COMPILER_OBJEXT])[]dnl -_AC_LANG_COMPILER_GNU -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi -_AC_PROG_CC_G -dnl -dnl Set ac_prog_cc_stdc to the supported C version. -dnl Also set the documented variable ac_cv_prog_cc_stdc; -dnl its name was chosen when it was cached, but it is no longer cached. -_AC_PROG_CC_C11([ac_prog_cc_stdc=c11 - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11], - [_AC_PROG_CC_C99([ac_prog_cc_stdc=c99 - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99], - [_AC_PROG_CC_C89([ac_prog_cc_stdc=c89 - ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89], - [ac_prog_cc_stdc=no - ac_cv_prog_cc_stdc=no])])]) -dnl -AC_LANG_POP(C)dnl -])# AC_PROG_CC - - - -# AC_PROG_CXX([LIST-OF-COMPILERS]) -# -------------------------------- -# LIST-OF-COMPILERS is a space separated list of C++ compilers to search -# for (if not specified, a default list is used). This just gives the -# user an opportunity to specify an alternative search list for the C++ -# compiler. -# aCC HP-UX C++ compiler much better than `CC', so test before. -# FCC Fujitsu C++ compiler -# KCC KAI C++ compiler -# RCC Rational C++ -# xlC_r AIX C Set++ (with support for reentrant code) -# xlC AIX C Set++ -AC_DEFUN([AC_PROG_CXX], -[AC_LANG_PUSH(C++)dnl -AC_ARG_VAR([CXX], [C++ compiler command])dnl -AC_ARG_VAR([CXXFLAGS], [C++ compiler flags])dnl -_AC_ARG_VAR_LDFLAGS()dnl -_AC_ARG_VAR_LIBS()dnl -_AC_ARG_VAR_CPPFLAGS()dnl -_AC_ARG_VAR_PRECIOUS([CCC])dnl -if test -z "$CXX"; then - if test -n "$CCC"; then - CXX=$CCC - else - AC_CHECK_TOOLS(CXX, - [m4_default([$1], - [g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC clang++])], - g++) - fi -fi -# Provide some information about the compiler. -_AS_ECHO_LOG([checking for _AC_LANG compiler version]) -set X $ac_compile -ac_compiler=$[2] -for ac_option in --version -v -V -qversion; do - _AC_DO_LIMIT([$ac_compiler $ac_option >&AS_MESSAGE_LOG_FD]) -done - -m4_expand_once([_AC_COMPILER_EXEEXT])[]dnl -m4_expand_once([_AC_COMPILER_OBJEXT])[]dnl -_AC_LANG_COMPILER_GNU -if test $ac_compiler_gnu = yes; then - GXX=yes -else - GXX= -fi -_AC_PROG_CXX_G -_AC_PROG_CXX_CXX11([ac_prog_cxx_stdcxx=cxx11 - ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx11 - ac_cv_prog_cxx_cxx98=$ac_cv_prog_cxx_cxx11], - [_AC_PROG_CXX_CXX98([ac_prog_cxx_stdcxx=cxx98 - ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx98], - [ac_prog_cxx_stdcxx=no - ac_cv_prog_cxx_stdcxx=no])]) -AC_LANG_POP(C++)dnl -])# AC_PROG_CXX - - -# _AC_C_STD_TRY(STANDARD, TEST-PROLOGUE, TEST-BODY, OPTION-LIST, -# ACTION-IF-AVAILABLE, ACTION-IF-UNAVAILABLE) -# -------------------------------------------------------------- -# Check whether the C compiler accepts features of STANDARD (e.g `c89', `c99') -# by trying to compile a program of TEST-PROLOGUE and TEST-BODY. If this fails, -# try again with each compiler option in the space-separated OPTION-LIST; if one -# helps, append it to CC. If eventually successful, run ACTION-IF-AVAILABLE, -# else ACTION-IF-UNAVAILABLE. -AC_DEFUN([_AC_C_STD_TRY], -[AC_MSG_CHECKING([for $CC option to enable ]m4_translit($1, [c], [C])[ features]) -AC_CACHE_VAL(ac_cv_prog_cc_$1, -[ac_cv_prog_cc_$1=no -ac_save_CC=$CC -AC_LANG_CONFTEST([AC_LANG_PROGRAM([$2], [$3])]) -for ac_arg in '' $4 -do - CC="$ac_save_CC $ac_arg" - _AC_COMPILE_IFELSE([], [ac_cv_prog_cc_$1=$ac_arg]) - test "x$ac_cv_prog_cc_$1" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC -])# AC_CACHE_VAL -ac_prog_cc_stdc_options= -case "x$ac_cv_prog_cc_$1" in - x) - AC_MSG_RESULT([none needed]) ;; - xno) - AC_MSG_RESULT([unsupported]) ;; - *) - ac_prog_cc_stdc_options=" $ac_cv_prog_cc_$1" - CC=$CC$ac_prog_cc_stdc_options - AC_MSG_RESULT([$ac_cv_prog_cc_$1]) ;; -esac -AS_IF([test "x$ac_cv_prog_cc_$1" != xno], [$5], [$6]) -])# _AC_C_STD_TRY - -# _AC_C_C99_TEST_HEADER -# --------------------- -# A C header suitable for testing for C99. -AC_DEFUN([_AC_C_C99_TEST_HEADER], -[[#include -#include -#include -#include -#include -#include - -// Check varargs macros. These examples are taken from C99 6.10.3.5. -#define debug(...) fprintf (stderr, __VA_ARGS__) -#define showlist(...) puts (#__VA_ARGS__) -#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) -static void -test_varargs_macros (void) -{ - int x = 1234; - int y = 5678; - debug ("Flag"); - debug ("X = %d\n", x); - showlist (The first, second, and third items.); - report (x>y, "x is %d but y is %d", x, y); -} - -// Check long long types. -#define BIG64 18446744073709551615ull -#define BIG32 4294967295ul -#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) -#if !BIG_OK - your preprocessor is broken; -#endif -#if BIG_OK -#else - your preprocessor is broken; -#endif -static long long int bignum = -9223372036854775807LL; -static unsigned long long int ubignum = BIG64; - -struct incomplete_array -{ - int datasize; - double data[]; -}; - -struct named_init { - int number; - const wchar_t *name; - double average; -}; - -typedef const char *ccp; - -static inline int -test_restrict (ccp restrict text) -{ - // See if C++-style comments work. - // Iterate through items via the restricted pointer. - // Also check for declarations in for loops. - for (unsigned int i = 0; *(text+i) != '\0'; ++i) - continue; - return 0; -} - -// Check varargs and va_copy. -static bool -test_varargs (const char *format, ...) -{ - va_list args; - va_start (args, format); - va_list args_copy; - va_copy (args_copy, args); - - const char *str = ""; - int number = 0; - float fnumber = 0; - - while (*format) - { - switch (*format++) - { - case 's': // string - str = va_arg (args_copy, const char *); - break; - case 'd': // int - number = va_arg (args_copy, int); - break; - case 'f': // float - fnumber = va_arg (args_copy, double); - break; - default: - break; - } - } - va_end (args_copy); - va_end (args); - - return *str && number && fnumber; -}]])# _AC_C_C99_TEST_HEADER - -# _AC_C_C99_TEST_BODY -# ------------------- -# A C body suitable for testing for C99, assuming the corresponding header. -AC_DEFUN([_AC_C_C99_TEST_BODY], -[[ - // Check bool. - _Bool success = false; - - // Check restrict. - if (test_restrict ("String literal") == 0) - success = true; - char *restrict newvar = "Another string"; - - // Check varargs. - success &= test_varargs ("s, d' f .", "string", 65, 34.234); - test_varargs_macros (); - - // Check flexible array members. - struct incomplete_array *ia = - malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); - ia->datasize = 10; - for (int i = 0; i < ia->datasize; ++i) - ia->data[i] = i * 1.234; - - // Check named initializers. - struct named_init ni = { - .number = 34, - .name = L"Test wide string", - .average = 543.34343, - }; - - ni.number = 58; - - int dynamic_array[ni.number]; - dynamic_array[ni.number - 1] = 543; - - // work around unused variable warnings - return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x' - || dynamic_array[ni.number - 1] != 543); -]]) - -# _AC_PROG_CC_C99 ([ACTION-IF-AVAILABLE], [ACTION-IF-UNAVAILABLE]) -# ---------------------------------------------------------------- -# If the C compiler is not in ISO C99 mode by default, try to add an -# option to output variable CC to make it so. This macro tries -# various options that select ISO C99 on some system or another. It -# considers the compiler to be in ISO C99 mode if it handles _Bool, -# // comments, flexible array members, inline, long long int, mixed -# code and declarations, named initialization of structs, restrict, -# va_copy, varargs macros, variable declarations in for loops and -# variable length arrays. -AC_DEFUN([_AC_PROG_CC_C99], -[_AC_C_STD_TRY([c99], -[_AC_C_C99_TEST_HEADER], -[_AC_C_C99_TEST_BODY], -dnl Try -dnl GCC -std=gnu99 (unused restrictive modes: -std=c99 -std=iso9899:1999) -dnl IBM XL C -qlanglvl=extc1x (V12.1; does not pass C11 test) -dnl IBM XL C -qlanglvl=extc99 -dnl (pre-V12.1; unused restrictive mode: -qlanglvl=stdc99) -dnl HP cc -AC99 -dnl Intel ICC -std=c99, -c99 (deprecated) -dnl IRIX -c99 -dnl Solaris -D_STDC_C99= -dnl cc's -xc99 option uses linker magic to define the external -dnl symbol __xpg4 as if by "int __xpg4 = 1;", which enables C99 -dnl behavior for C library functions. This is not wanted here, -dnl because it means that a single module compiled with -xc99 -dnl alters C runtime behavior for the entire program, not for -dnl just the module. Instead, define the (private) symbol -dnl _STDC_C99, which suppresses a bogus failure in . -dnl The resulting compiler passes the test case here, and that's -dnl good enough. For more, please see the thread starting at: -dnl https://lists.gnu.org/r/autoconf/2010-12/msg00059.html -dnl Tru64 -c99 -dnl with extended modes being tried first. -[[-std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc1x -qlanglvl=extc99]], [$1], [$2])[]dnl -])# _AC_PROG_CC_C99 - - -# _AC_PROG_CC_C11 ([ACTION-IF-AVAILABLE], [ACTION-IF-UNAVAILABLE]) -# ---------------------------------------------------------------- -# If the C compiler is not in ISO C11 mode by default, try to add an -# option to output variable CC to make it so. This macro tries -# various options that select ISO C11 on some system or another. It -# considers the compiler to be in ISO C11 mode if it handles _Alignas, -# _Alignof, _Noreturn, _Static_assert, UTF-8 string literals, -# duplicate typedefs, and anonymous structures and unions. -AC_DEFUN([_AC_PROG_CC_C11], -[_AC_C_STD_TRY([c11], -[_AC_C_C99_TEST_HEADER[ -// Check _Alignas. -char _Alignas (double) aligned_as_double; -char _Alignas (0) no_special_alignment; -extern char aligned_as_int; -char _Alignas (0) _Alignas (int) aligned_as_int; - -// Check _Alignof. -enum -{ - int_alignment = _Alignof (int), - int_array_alignment = _Alignof (int[100]), - char_alignment = _Alignof (char) -}; -_Static_assert (0 < -_Alignof (int), "_Alignof is signed"); - -// Check _Noreturn. -int _Noreturn does_not_return (void) { for (;;) continue; } - -// Check _Static_assert. -struct test_static_assert -{ - int x; - _Static_assert (sizeof (int) <= sizeof (long int), - "_Static_assert does not work in struct"); - long int y; -}; - -// Check UTF-8 literals. -#define u8 syntax error! -char const utf8_literal[] = u8"happens to be ASCII" "another string"; - -// Check duplicate typedefs. -typedef long *long_ptr; -typedef long int *long_ptr; -typedef long_ptr long_ptr; - -// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1. -struct anonymous -{ - union { - struct { int i; int j; }; - struct { int k; long int l; } w; - }; - int m; -} v1; -]], -[_AC_C_C99_TEST_BODY[ - v1.i = 2; - v1.w.k = 5; - _Static_assert ((offsetof (struct anonymous, i) - == offsetof (struct anonymous, w.k)), - "Anonymous union alignment botch"); -]], -dnl Try -dnl GCC -std=gnu11 (unused restrictive mode: -std=c11) -dnl with extended modes being tried first. -dnl -dnl Do not try -qlanglvl=extc1x, because IBM XL C V12.1 (the latest version as -dnl of September 2012) does not pass the C11 test. For now, try extc1x when -dnl compiling the C99 test instead, since it enables _Static_assert and -dnl _Noreturn, which is a win. If -qlanglvl=extc11 or -qlanglvl=extc1x passes -dnl the C11 test in some future version of IBM XL C, we'll add it here, -dnl preferably extc11. -[[-std=gnu11]], [$1], [$2])[]dnl -])# _AC_PROG_CC_C11 - - -# AC_PROG_CC_C89 -# -------------- -# Do not use AU_ALIAS here and in AC_PROG_CC_C99 and AC_PROG_CC_STDC, -# as that'd be incompatible with how Automake redefines AC_PROG_CC. See -# . -AU_DEFUN([AC_PROG_CC_C89], - [AC_REQUIRE([AC_PROG_CC])], - [$0 is obsolete; use AC_PROG_CC] -) - -# AC_PROG_CC_C99 -# -------------- -AU_DEFUN([AC_PROG_CC_C99], - [AC_REQUIRE([AC_PROG_CC])], - [$0 is obsolete; use AC_PROG_CC] -) - -# AC_PROG_CC_STDC -# --------------- -AU_DEFUN([AC_PROG_CC_STDC], - [AC_REQUIRE([AC_PROG_CC])], - [$0 is obsolete; use AC_PROG_CC] -) - - -# AC_C_PROTOTYPES -# --------------- -# Check if the C compiler supports prototypes, included if it needs -# options. -AC_DEFUN([AC_C_PROTOTYPES], -[AC_REQUIRE([AC_PROG_CC])dnl -if test "$ac_prog_cc_stdc" != no; then - AC_DEFINE(PROTOTYPES, 1, - [Define to 1 if the C compiler supports function prototypes.]) - AC_DEFINE(__PROTOTYPES, 1, - [Define like PROTOTYPES; this can be used by system headers.]) -fi -])# AC_C_PROTOTYPES - - -# _AC_CXX_STD_TRY(STANDARD, TEST-PROLOGUE, TEST-BODY, OPTION-LIST, -# ACTION-IF-AVAILABLE, ACTION-IF-UNAVAILABLE) -# ---------------------------------------------------------------- -# Check whether the C++ compiler accepts features of STANDARD (e.g -# `cxx98', `cxx11') by trying to compile a program of TEST-PROLOGUE -# and TEST-BODY. If this fails, try again with each compiler option -# in the space-separated OPTION-LIST; if one helps, append it to CXX. -# If eventually successful, run ACTION-IF-AVAILABLE, else -# ACTION-IF-UNAVAILABLE. -AC_DEFUN([_AC_CXX_STD_TRY], -[AC_MSG_CHECKING([for $CXX option to enable ]m4_translit(m4_translit($1, [x], [+]), [a-z], [A-Z])[ features]) -AC_LANG_PUSH(C++)dnl -AC_CACHE_VAL(ac_cv_prog_cxx_$1, -[ac_cv_prog_cxx_$1=no -ac_save_CXX=$CXX -AC_LANG_CONFTEST([AC_LANG_PROGRAM([$2], [$3])]) -for ac_arg in '' $4 -do - CXX="$ac_save_CXX $ac_arg" - _AC_COMPILE_IFELSE([], [ac_cv_prog_cxx_$1=$ac_arg]) - test "x$ac_cv_prog_cxx_$1" != "xno" && break -done -rm -f conftest.$ac_ext -CXX=$ac_save_CXX -])# AC_CACHE_VAL -ac_prog_cxx_stdcxx_options= -case "x$ac_cv_prog_cxx_$1" in - x) - AC_MSG_RESULT([none needed]) ;; - xno) - AC_MSG_RESULT([unsupported]) ;; - *) - ac_prog_cxx_stdcxx_options=" $ac_cv_prog_cxx_$1" - CXX=$CXX$ac_prog_cxx_stdcxx_options - AC_MSG_RESULT([$ac_cv_prog_cxx_$1]) ;; -esac -AC_LANG_POP(C++)dnl -AS_IF([test "x$ac_cv_prog_cxx_$1" != xno], [$5], [$6]) -])# _AC_CXX_STD_TRY - -# _AC_CXX_CXX98_TEST_HEADER -# ------------------------- -# A C++ header suitable for testing for CXX98. -AC_DEFUN([_AC_CXX_CXX98_TEST_HEADER], -[[ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace test { - typedef std::vector string_vec; - typedef std::pair map_value; - typedef std::map map_type; - typedef std::set set_type; - - template - class printer { - public: - printer(std::ostringstream& os): os(os) {} - void operator() (T elem) { os << elem << std::endl; } - private: - std::ostringstream& os; - }; -} -]])# _AC_CXX_CXX98_TEST_HEADER - -# _AC_CXX_CXX98_TEST_BODY -# ----------------------- -# A C++ body suitable for testing for CXX98, assuming the corresponding header. -AC_DEFUN([_AC_CXX_CXX98_TEST_BODY], -[[ - -try { - // Basic string. - std::string teststr("ASCII text"); - teststr += " string"; - - // Simple vector. - test::string_vec testvec; - testvec.push_back(teststr); - testvec.push_back("foo"); - testvec.push_back("bar"); - if (testvec.size() != 3) { - throw std::runtime_error("vector size is not 1"); - } - - // Dump vector into stringstream and obtain string. - std::ostringstream os; - for (test::string_vec::const_iterator i = testvec.begin(); - i != testvec.end(); ++i) { - if (i + 1 != testvec.end()) { - os << teststr << '\n'; - } - } - // Check algorithms work. - std::for_each(testvec.begin(), testvec.end(), test::printer(os)); - std::string os_out = os.str(); - - // Test pair and map. - test::map_type testmap; - testmap.insert(std::make_pair(std::string("key"), - std::make_pair(53,false))); - - // Test set. - int values[] = {9, 7, 13, 15, 4, 18, 12, 10, 5, 3, 14, 19, 17, 8, 6, 20, 16, 2, 11, 1}; - test::set_type testset(values, values + sizeof(values)/sizeof(values[0])); - std::list testlist(testset.begin(), testset.end()); - std::copy(testset.begin(), testset.end(), std::back_inserter(testlist)); -} catch (const std::exception& e) { - std::cerr << "Caught exception: " << e.what() << std::endl; - - // Test fstream - std::ofstream of("test.txt"); - of << "Test ASCII text\n" << std::flush; - of << "N= " << std::hex << std::setw(8) << std::left << 534 << std::endl; - of.close(); -} -std::exit(0); -]]) - -# _AC_CXX_CXX11_TEST_HEADER -# ------------------------- -# A C++ header suitable for testing for CXX11. -AC_DEFUN([_AC_CXX_CXX11_TEST_HEADER], -[[ -#include -#include -#include -#include -#include -#include -#include - -namespace cxx11test -{ - typedef std::shared_ptr sptr; - typedef std::weak_ptr wptr; - - typedef std::tuple tp; - typedef std::array int_array; - - constexpr int get_val() { return 20; } - - struct testinit - { - int i; - double d; - }; - - class delegate { - public: - delegate(int n) : n(n) {} - delegate(): delegate(2354) {} - - virtual int getval() { return this->n; }; - protected: - int n; - }; - - class overridden : public delegate { - public: - overridden(int n): delegate(n) {} - virtual int getval() override final { return this->n * 2; } - }; - - class nocopy { - public: - nocopy(int i): i(i) {} - nocopy() = default; - nocopy(const nocopy&) = delete; - nocopy & operator=(const nocopy&) = delete; - private: - int i; - }; -} -]])# _AC_CXX_CXX11_TEST_HEADER - -# _AC_CXX_CXX11_TEST_BODY -# ----------------------- -# A C++ body suitable for testing for CXX11, assuming the corresponding header. -AC_DEFUN([_AC_CXX_CXX11_TEST_BODY], -[[ -{ - // Test auto and decltype - std::deque d; - d.push_front(43); - d.push_front(484); - d.push_front(3); - d.push_front(844); - int total = 0; - for (auto i = d.begin(); i != d.end(); ++i) { total += *i; } - - auto a1 = 6538; - auto a2 = 48573953.4; - auto a3 = "String literal"; - - decltype(a2) a4 = 34895.034; -} -{ - // Test constexpr - short sa[cxx11test::get_val()] = { 0 }; -} -{ - // Test initializer lists - cxx11test::testinit il = { 4323, 435234.23544 }; -} -{ - // Test range-based for and lambda - cxx11test::int_array array = {9, 7, 13, 15, 4, 18, 12, 10, 5, 3, 14, 19, 17, 8, 6, 20, 16, 2, 11, 1}; - for (int &x : array) { x += 23; } - std::for_each(array.begin(), array.end(), [](int v1){ std::cout << v1; }); -} -{ - using cxx11test::sptr; - using cxx11test::wptr; - - sptr sp(new std::string("ASCII string")); - wptr wp(sp); - sptr sp2(wp); -} -{ - cxx11test::tp tuple("test", 54, 45.53434); - double d = std::get<2>(tuple); - std::string s; - int i; - std::tie(s,i,d) = tuple; -} -{ - static std::regex filename_regex("^_?([a-z0-9_.]+-)+[a-z0-9]+$"); - std::string testmatch("Test if this string matches"); - bool match = std::regex_search(testmatch, filename_regex); -} -{ - cxx11test::int_array array = {9, 7, 13, 15, 4, 18, 12, 10, 5, 3, 14, 19, 17, 8, 6, 20, 16, 2, 11, 1}; - cxx11test::int_array::size_type size = array.size(); -} -{ - // Test constructor delegation - cxx11test::delegate d1; - cxx11test::delegate d2(); - cxx11test::delegate d3(45); -} -{ - // Test override and final - cxx11test::overridden o1(55464); -} -{ - // Test nullptr - char *c = nullptr; -} -{ - // Test template brackets - std::vector> v1; -} -{ - // Unicode literals - char const *utf8 = u8"UTF-8 string \u2500"; - char16_t const *utf16 = u"UTF-8 string \u2500"; - char32_t const *utf32 = U"UTF-32 string \u2500"; -} -]]) - -# _AC_PROG_CXX_CXX98 ([ACTION-IF-AVAILABLE], [ACTION-IF-UNAVAILABLE]) -# ------------------------------------------------------------------- - -# If the C++ compiler is not in ISO C++98 mode by default, try to add -# an option to output variable CXX to make it so. This macro tries -# various options that select ISO C++98 on some system or another. It -# considers the compiler to be in ISO C++98 mode if it handles basic -# features of the std namespace including: string, containers (list, -# map, set, vector), streams (fstreams, iostreams, stringstreams, -# iomanip), pair, exceptions and algorithms. - - -AC_DEFUN([_AC_PROG_CXX_CXX98], -[_AC_CXX_STD_TRY([cxx98], -[_AC_CXX_CXX98_TEST_HEADER], -[_AC_CXX_CXX98_TEST_BODY], -dnl Try -dnl GCC -std=gnu++98 (unused restrictive mode: -std=c++98) -dnl IBM XL C -qlanglvl=extended -dnl HP aC++ -AA -dnl Intel ICC -std=gnu++98 -dnl Solaris N/A (default) -dnl Tru64 N/A (default, but -std gnu could be used) -dnl with extended modes being tried first. -[[-std=gnu++98 -std=c++98 -qlanglvl=extended -AA]], [$1], [$2])[]dnl -])# _AC_PROG_CXX_CXX98 - -# _AC_PROG_CXX_CXX11 ([ACTION-IF-AVAILABLE], [ACTION-IF-UNAVAILABLE]) -# ------------------------------------------------------------------- -# If the C++ compiler is not in ISO CXX11 mode by default, try to add -# an option to output variable CXX to make it so. This macro tries -# various options that select ISO C++11 on some system or another. It -# considers the compiler to be in ISO C++11 mode if it handles all the -# tests from the C++98 checks, plus the following: Language features -# (auto, constexpr, decltype, default/deleted constructors, delegate -# constructors, final, initializer lists, lambda functions, nullptr, -# override, range-based for loops, template brackets without spaces, -# unicode literals) and library features (array, memory (shared_ptr, -# weak_ptr), regex and tuple types). -AC_DEFUN([_AC_PROG_CXX_CXX11], -[_AC_CXX_STD_TRY([cxx11], -[_AC_CXX_CXX11_TEST_HEADER -_AC_CXX_CXX98_TEST_HEADER], -[_AC_CXX_CXX11_TEST_BODY -_AC_CXX_CXX98_TEST_BODY], -dnl Try -dnl GCC -std=gnu++11 (unused restrictive mode: -std=c++11) [and 0x variants] -dnl IBM XL C -qlanglvl=extended0x -dnl (pre-V12.1; unused restrictive mode: -qlanglvl=stdcxx11) -dnl HP aC++ -AA -dnl Intel ICC -std=c++11 -std=c++0x -dnl Solaris N/A (no support) -dnl Tru64 N/A (no support) -dnl with extended modes being tried first. -[[-std=gnu++11 -std=c++11 -std=gnu++0x -std=c++0x -qlanglvl=extended0x -AA]], [$1], [$2])[]dnl -])# _AC_PROG_CXX_CXX11 diff --git a/gdb/gnulib/import/m4/stdbool.m4 b/gdb/gnulib/import/m4/stdbool.m4 index f8c057760f2..2a9b1db86f3 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-2018 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2006, 2009-2016 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. @@ -87,8 +87,8 @@ AC_DEFUN([AC_CHECK_HEADER_STDBOOL], char o[sizeof n == m * sizeof n[0] ? 1 : -1]; char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; /* Catch a bug in an HP-UX C compiler. See - https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html - https://lists.gnu.org/r/bug-coreutils/2005-11/msg00161.html + http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html + http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html */ Bool q = true; Bool *pq = &q; diff --git a/gdb/gnulib/import/m4/stddef_h.m4 b/gdb/gnulib/import/m4/stddef_h.m4 index ba3d201cf37..c045c65f9f8 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 , for platforms that have issues. # stddef_h.m4 serial 5 -dnl Copyright (C) 2009-2018 Free Software Foundation, Inc. +dnl Copyright (C) 2009-2016 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/stdint.m4 b/gdb/gnulib/import/m4/stdint.m4 index 38dbbedffec..05b6ab7846b 100644 --- a/gdb/gnulib/import/m4/stdint.m4 +++ b/gdb/gnulib/import/m4/stdint.m4 @@ -1,5 +1,5 @@ -# stdint.m4 serial 52 -dnl Copyright (C) 2001-2018 Free Software Foundation, Inc. +# stdint.m4 serial 48 +dnl Copyright (C) 2001-2016 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,10 +10,8 @@ dnl Test whether is supported or must be substituted. AC_DEFUN_ONCE([gl_STDINT_H], [ AC_PREREQ([2.59])dnl - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_REQUIRE([gl_LIMITS_H]) - AC_REQUIRE([gt_TYPE_WINT_T]) dnl Check for long long int and unsigned long long int. AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) @@ -289,12 +287,8 @@ static const char *macro_values[] = ]])], [gl_cv_header_working_stdint_h=yes], [], - [case "$host_os" in - # Guess yes on native Windows. - mingw*) gl_cv_header_working_stdint_h="guessing yes" ;; - # In general, assume it works. - *) gl_cv_header_working_stdint_h="guessing yes" ;; - esac + [dnl When cross-compiling, assume it works. + gl_cv_header_working_stdint_h=yes ]) ]) ]) @@ -304,16 +298,15 @@ static const char *macro_values[] = HAVE_SYS_BITYPES_H=0 HAVE_SYS_INTTYPES_H=0 STDINT_H=stdint.h - case "$gl_cv_header_working_stdint_h" in - *yes) - HAVE_C99_STDINT_H=1 - dnl Now see whether the system works without - dnl __STDC_CONSTANT_MACROS/__STDC_LIMIT_MACROS defined. - AC_CACHE_CHECK([whether stdint.h predates C++11], - [gl_cv_header_stdint_predates_cxx11_h], - [gl_cv_header_stdint_predates_cxx11_h=yes - AC_COMPILE_IFELSE([ - AC_LANG_PROGRAM([[ + if test "$gl_cv_header_working_stdint_h" = yes; then + HAVE_C99_STDINT_H=1 + dnl Now see whether the system works without + dnl __STDC_CONSTANT_MACROS/__STDC_LIMIT_MACROS defined. + AC_CACHE_CHECK([whether stdint.h predates C++11], + [gl_cv_header_stdint_predates_cxx11_h], + [gl_cv_header_stdint_predates_cxx11_h=yes + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ #include ] @@ -321,50 +314,49 @@ gl_STDINT_INCLUDES [ intmax_t im = INTMAX_MAX; int32_t i32 = INT32_C (0x7fffffff); - ]])], - [gl_cv_header_stdint_predates_cxx11_h=no])]) + ]])], + [gl_cv_header_stdint_predates_cxx11_h=no])]) - if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then - AC_DEFINE([__STDC_CONSTANT_MACROS], [1], - [Define to 1 if the system predates C++11.]) - AC_DEFINE([__STDC_LIMIT_MACROS], [1], - [Define to 1 if the system predates C++11.]) - fi - AC_CACHE_CHECK([whether stdint.h has UINTMAX_WIDTH etc.], - [gl_cv_header_stdint_width], - [gl_cv_header_stdint_width=no - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([[ - /* Work if build is not clean. */ - #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 - #ifndef __STDC_WANT_IEC_60559_BFP_EXT__ - #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 - #endif - #include - ]gl_STDINT_INCLUDES[ - int iw = UINTMAX_WIDTH; - ]])], - [gl_cv_header_stdint_width=yes])]) - if test "$gl_cv_header_stdint_width" = yes; then - STDINT_H= - fi - ;; - *) - dnl Check for , and for - dnl (used in Linux libc4 >= 4.6.7 and libc5). - AC_CHECK_HEADERS([sys/inttypes.h sys/bitypes.h]) - if test $ac_cv_header_sys_inttypes_h = yes; then - HAVE_SYS_INTTYPES_H=1 - fi - if test $ac_cv_header_sys_bitypes_h = yes; then - HAVE_SYS_BITYPES_H=1 - fi - gl_STDINT_TYPE_PROPERTIES - ;; - esac + if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then + AC_DEFINE([__STDC_CONSTANT_MACROS], [1], + [Define to 1 if the system predates C++11.]) + AC_DEFINE([__STDC_LIMIT_MACROS], [1], + [Define to 1 if the system predates C++11.]) + fi + AC_CACHE_CHECK([whether stdint.h has UINTMAX_WIDTH etc.], + [gl_cv_header_stdint_width], + [gl_cv_header_stdint_width=no + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[ + /* Work if build is not clean. */ + #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 + #ifndef __STDC_WANT_IEC_60559_BFP_EXT__ + #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 + #endif + #include + ]gl_STDINT_INCLUDES[ + int iw = UINTMAX_WIDTH; + ]])], + [gl_cv_header_stdint_width=yes])]) + if test "$gl_cv_header_stdint_width" = yes; then + STDINT_H= + fi + else + dnl Check for , and for + dnl (used in Linux libc4 >= 4.6.7 and libc5). + AC_CHECK_HEADERS([sys/inttypes.h sys/bitypes.h]) + if test $ac_cv_header_sys_inttypes_h = yes; then + HAVE_SYS_INTTYPES_H=1 + fi + if test $ac_cv_header_sys_bitypes_h = yes; then + HAVE_SYS_BITYPES_H=1 + fi + gl_STDINT_TYPE_PROPERTIES + fi - dnl The substitute stdint.h needs the substitute limit.h's _GL_INTEGER_WIDTH. - gl_REPLACE_LIMITS_H + # The substitute stdint.h needs the substitute limit.h's _GL_INTEGER_WIDTH. + LIMITS_H=limits.h + AM_CONDITIONAL([GL_GENERATE_LIMITS_H], [test -n "$LIMITS_H"]) AC_SUBST([HAVE_C99_STDINT_H]) AC_SUBST([HAVE_SYS_BITYPES_H]) @@ -536,7 +528,7 @@ AC_DEFUN([gl_STDINT_TYPE_PROPERTIES], dnl requirement that wint_t is "unchanged by default argument promotions". dnl In this case gnulib's and override wint_t. dnl Set the variable BITSIZEOF_WINT_T accordingly. - if test $GNULIB_OVERRIDES_WINT_T = 1; then + if test $BITSIZEOF_WINT_T -lt 32; then BITSIZEOF_WINT_T=32 fi ]) diff --git a/gdb/gnulib/import/m4/stdio_h.m4 b/gdb/gnulib/import/m4/stdio_h.m4 index 0debe69e92d..eaa25a01d49 100644 --- a/gdb/gnulib/import/m4/stdio_h.m4 +++ b/gdb/gnulib/import/m4/stdio_h.m4 @@ -1,5 +1,5 @@ -# stdio_h.m4 serial 49 -dnl Copyright (C) 2007-2018 Free Software Foundation, Inc. +# stdio_h.m4 serial 48 +dnl Copyright (C) 2007-2016 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. @@ -28,7 +28,7 @@ AC_DEFUN([gl_STDIO_H], /* 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 __CYGWIN__) && \ + #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 diff --git a/gdb/gnulib/import/m4/stdlib_h.m4 b/gdb/gnulib/import/m4/stdlib_h.m4 index 49dc5d59cbe..3999068153d 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 45 -dnl Copyright (C) 2007-2018 Free Software Foundation, Inc. +# stdlib_h.m4 serial 43 +dnl Copyright (C) 2007-2016 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. @@ -14,9 +14,6 @@ AC_DEFUN([gl_STDLIB_H], dnl guaranteed by C89. gl_WARN_ON_USE_PREPARE([[#include #if HAVE_SYS_LOADAVG_H -/* OpenIndiana has a bug: must be included before - . */ -# include # include #endif #if HAVE_RANDOM_H @@ -24,9 +21,9 @@ AC_DEFUN([gl_STDLIB_H], #endif ]], [_Exit atoll canonicalize_file_name getloadavg getsubopt grantpt initstate initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps - posix_openpt ptsname ptsname_r qsort_r random random_r reallocarray - realpath rpmatch secure_getenv setenv setstate setstate_r srandom - srandom_r strtod strtoll strtoull unlockpt unsetenv]) + posix_openpt ptsname ptsname_r qsort_r random random_r realpath rpmatch + secure_getenv setenv setstate setstate_r srandom srandom_r + strtod strtoll strtoull unlockpt unsetenv]) ]) AC_DEFUN([gl_STDLIB_MODULE_INDICATOR], @@ -61,7 +58,6 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS], 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_REALLOCARRAY=0; AC_SUBST([GNULIB_REALLOCARRAY]) GNULIB_REALLOC_POSIX=0; AC_SUBST([GNULIB_REALLOC_POSIX]) GNULIB_REALPATH=0; AC_SUBST([GNULIB_REALPATH]) GNULIB_RPMATCH=0; AC_SUBST([GNULIB_RPMATCH]) @@ -81,7 +77,6 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS], HAVE_DECL_GETLOADAVG=1; AC_SUBST([HAVE_DECL_GETLOADAVG]) HAVE_GETSUBOPT=1; AC_SUBST([HAVE_GETSUBOPT]) HAVE_GRANTPT=1; AC_SUBST([HAVE_GRANTPT]) - HAVE_DECL_INITSTATE=1; AC_SUBST([HAVE_DECL_INITSTATE]) HAVE_MKDTEMP=1; AC_SUBST([HAVE_MKDTEMP]) HAVE_MKOSTEMP=1; AC_SUBST([HAVE_MKOSTEMP]) HAVE_MKOSTEMPS=1; AC_SUBST([HAVE_MKOSTEMPS]) @@ -94,13 +89,11 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS], HAVE_RANDOM=1; AC_SUBST([HAVE_RANDOM]) HAVE_RANDOM_H=1; AC_SUBST([HAVE_RANDOM_H]) HAVE_RANDOM_R=1; AC_SUBST([HAVE_RANDOM_R]) - HAVE_REALLOCARRAY=1; AC_SUBST([HAVE_REALLOCARRAY]) 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_DECL_SETSTATE=1; AC_SUBST([HAVE_DECL_SETSTATE]) HAVE_STRTOD=1; AC_SUBST([HAVE_STRTOD]) HAVE_STRTOLL=1; AC_SUBST([HAVE_STRTOLL]) HAVE_STRTOULL=1; AC_SUBST([HAVE_STRTOULL]) diff --git a/gdb/gnulib/import/m4/strchrnul.m4 b/gdb/gnulib/import/m4/strchrnul.m4 index 689f128b868..ac5c2117dc5 100644 --- a/gdb/gnulib/import/m4/strchrnul.m4 +++ b/gdb/gnulib/import/m4/strchrnul.m4 @@ -1,5 +1,5 @@ # strchrnul.m4 serial 9 -dnl Copyright (C) 2003, 2007, 2009-2018 Free Software Foundation, Inc. +dnl Copyright (C) 2003, 2007, 2009-2016 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/strdup.m4 b/gdb/gnulib/import/m4/strdup.m4 index dddaa01e198..ff7060abd38 100644 --- a/gdb/gnulib/import/m4/strdup.m4 +++ b/gdb/gnulib/import/m4/strdup.m4 @@ -1,6 +1,6 @@ # strdup.m4 serial 13 -dnl Copyright (C) 2002-2018 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2016 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/strerror.m4 b/gdb/gnulib/import/m4/strerror.m4 index b886b8d6f32..e286594b585 100644 --- a/gdb/gnulib/import/m4/strerror.m4 +++ b/gdb/gnulib/import/m4/strerror.m4 @@ -1,5 +1,5 @@ -# strerror.m4 serial 19 -dnl Copyright (C) 2002, 2007-2018 Free Software Foundation, Inc. +# strerror.m4 serial 17 +dnl Copyright (C) 2002, 2007-2016 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. @@ -24,10 +24,10 @@ AC_DEFUN([gl_FUNC_STRERROR], [gl_cv_func_working_strerror=yes], [gl_cv_func_working_strerror=no], [case "$host_os" in - # Guess yes on glibc systems. - *-gnu* | gnu*) gl_cv_func_working_strerror="guessing yes" ;; - # If we don't know, assume the worst. - *) gl_cv_func_working_strerror="guessing no" ;; + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_working_strerror="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_working_strerror="guessing no" ;; esac ]) ]) @@ -78,12 +78,10 @@ AC_DEFUN([gl_FUNC_STRERROR_0], [gl_cv_func_strerror_0_works=yes], [gl_cv_func_strerror_0_works=no], [case "$host_os" in - # Guess yes on glibc systems. - *-gnu* | gnu*) gl_cv_func_strerror_0_works="guessing yes" ;; - # Guess yes on native Windows. - mingw*) gl_cv_func_strerror_0_works="guessing yes" ;; - # If we don't know, assume the worst. - *) gl_cv_func_strerror_0_works="guessing no" ;; + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_strerror_0_works="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_strerror_0_works="guessing no" ;; esac ]) ]) diff --git a/gdb/gnulib/import/m4/string_h.m4 b/gdb/gnulib/import/m4/string_h.m4 index 97c80dcc157..0c5ec6f9a09 100644 --- a/gdb/gnulib/import/m4/string_h.m4 +++ b/gdb/gnulib/import/m4/string_h.m4 @@ -1,11 +1,11 @@ # Configure a GNU-like replacement for . -# Copyright (C) 2007-2018 Free Software Foundation, Inc. +# Copyright (C) 2007-2016 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. -# serial 22 +# serial 21 # Written by Paul Eggert. @@ -43,7 +43,6 @@ AC_DEFUN([gl_STRING_MODULE_INDICATOR], AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS], [ - GNULIB_EXPLICIT_BZERO=0; AC_SUBST([GNULIB_EXPLICIT_BZERO]) GNULIB_FFSL=0; AC_SUBST([GNULIB_FFSL]) GNULIB_FFSLL=0; AC_SUBST([GNULIB_FFSLL]) GNULIB_MEMCHR=0; AC_SUBST([GNULIB_MEMCHR]) @@ -83,7 +82,6 @@ AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS], GNULIB_STRVERSCMP=0; AC_SUBST([GNULIB_STRVERSCMP]) HAVE_MBSLEN=0; AC_SUBST([HAVE_MBSLEN]) dnl Assume proper GNU behavior unless another module says otherwise. - HAVE_EXPLICIT_BZERO=1; AC_SUBST([HAVE_EXPLICIT_BZERO]) HAVE_FFSL=1; AC_SUBST([HAVE_FFSL]) HAVE_FFSLL=1; AC_SUBST([HAVE_FFSLL]) HAVE_MEMCHR=1; AC_SUBST([HAVE_MEMCHR]) @@ -107,16 +105,16 @@ AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS], REPLACE_MEMCHR=0; AC_SUBST([REPLACE_MEMCHR]) REPLACE_MEMMEM=0; AC_SUBST([REPLACE_MEMMEM]) REPLACE_STPNCPY=0; AC_SUBST([REPLACE_STPNCPY]) - REPLACE_STRCHRNUL=0; AC_SUBST([REPLACE_STRCHRNUL]) REPLACE_STRDUP=0; AC_SUBST([REPLACE_STRDUP]) - REPLACE_STRNCAT=0; AC_SUBST([REPLACE_STRNCAT]) - REPLACE_STRNDUP=0; AC_SUBST([REPLACE_STRNDUP]) - REPLACE_STRNLEN=0; AC_SUBST([REPLACE_STRNLEN]) REPLACE_STRSTR=0; AC_SUBST([REPLACE_STRSTR]) REPLACE_STRCASESTR=0; AC_SUBST([REPLACE_STRCASESTR]) - REPLACE_STRTOK_R=0; AC_SUBST([REPLACE_STRTOK_R]) + REPLACE_STRCHRNUL=0; AC_SUBST([REPLACE_STRCHRNUL]) REPLACE_STRERROR=0; AC_SUBST([REPLACE_STRERROR]) REPLACE_STRERROR_R=0; AC_SUBST([REPLACE_STRERROR_R]) + REPLACE_STRNCAT=0; AC_SUBST([REPLACE_STRNCAT]) + REPLACE_STRNDUP=0; AC_SUBST([REPLACE_STRNDUP]) + REPLACE_STRNLEN=0; AC_SUBST([REPLACE_STRNLEN]) REPLACE_STRSIGNAL=0; AC_SUBST([REPLACE_STRSIGNAL]) + REPLACE_STRTOK_R=0; AC_SUBST([REPLACE_STRTOK_R]) UNDEFINE_STRTOK_R=0; AC_SUBST([UNDEFINE_STRTOK_R]) ]) diff --git a/gdb/gnulib/import/m4/strstr.m4 b/gdb/gnulib/import/m4/strstr.m4 index aa590a97b6b..bfe4c8590d9 100644 --- a/gdb/gnulib/import/m4/strstr.m4 +++ b/gdb/gnulib/import/m4/strstr.m4 @@ -1,5 +1,5 @@ -# strstr.m4 serial 19 -dnl Copyright (C) 2008-2018 Free Software Foundation, Inc. +# strstr.m4 serial 17 +dnl Copyright (C) 2008-2016 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. @@ -9,10 +9,10 @@ AC_DEFUN([gl_FUNC_STRSTR_SIMPLE], [ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) AC_REQUIRE([gl_FUNC_MEMCHR]) - if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then + if test "$gl_cv_func_memchr_works" != yes; then REPLACE_STRSTR=1 else - dnl Detect https://sourceware.org/bugzilla/show_bug.cgi?id=12092. + dnl Detect http://sourceware.org/bugzilla/show_bug.cgi?id=12092. AC_CACHE_CHECK([whether strstr works], [gl_cv_func_strstr_works_always], [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ @@ -99,9 +99,6 @@ static void quit (int sig) { _exit (sig + 128); } if (!strstr (haystack, needle)) result |= 1; } - /* Free allocated memory, in case some sanitizer is watching. */ - free (haystack); - free (needle); return result; ]])], [gl_cv_func_strstr_linear=yes], [gl_cv_func_strstr_linear=no], diff --git a/gdb/gnulib/import/m4/strtok_r.m4 b/gdb/gnulib/import/m4/strtok_r.m4 index b777089ca4b..d010307bbc8 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 15 -dnl Copyright (C) 2002-2004, 2006-2007, 2009-2018 Free Software Foundation, +# strtok_r.m4 serial 13 +dnl Copyright (C) 2002-2004, 2006-2007, 2009-2016 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, @@ -19,7 +19,7 @@ AC_DEFUN([gl_FUNC_STRTOK_R], dnl when the second argument to strtok_r is a constant string that has dnl exactly one byte and compiling with optimization. This bug is, for dnl example, present in the glibc 2.7-18 package in Debian "lenny". - dnl See . + dnl See . AC_CACHE_CHECK([whether strtok_r works], [gl_cv_func_strtok_r_works], [AC_RUN_IFELSE( [AC_LANG_PROGRAM([[ @@ -41,13 +41,14 @@ AC_DEFUN([gl_FUNC_STRTOK_R], ], [gl_cv_func_strtok_r_works=yes], [gl_cv_func_strtok_r_works=no], - [case "$host_os" in - # Guess no on glibc systems. - *-gnu* | gnu*) gl_cv_func_strtok_r_works="guessing no" ;; - # Guess yes on native Windows. - mingw*) gl_cv_func_strtok_r_works="guessing yes" ;; - *) gl_cv_func_strtok_r_works="guessing yes" ;; + [ +changequote(,)dnl + case "$host_os" in + # Guess no on glibc systems. + *-gnu*) gl_cv_func_strtok_r_works="guessing no";; + *) gl_cv_func_strtok_r_works="guessing yes";; esac +changequote([,])dnl ]) ]) case "$gl_cv_func_strtok_r_works" in diff --git a/gdb/gnulib/import/m4/sys_socket_h.m4 b/gdb/gnulib/import/m4/sys_socket_h.m4 index f21037879d8..ae500c76053 100644 --- a/gdb/gnulib/import/m4/sys_socket_h.m4 +++ b/gdb/gnulib/import/m4/sys_socket_h.m4 @@ -1,5 +1,5 @@ # sys_socket_h.m4 serial 23 -dnl Copyright (C) 2005-2018 Free Software Foundation, Inc. +dnl Copyright (C) 2005-2016 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_stat_h.m4 b/gdb/gnulib/import/m4/sys_stat_h.m4 index 52f06aa8e8e..3d43b6f5ef2 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 31 -*- Autoconf -*- -dnl Copyright (C) 2006-2018 Free Software Foundation, Inc. +# sys_stat_h.m4 serial 28 -*- Autoconf -*- +dnl Copyright (C) 2006-2016 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. @@ -19,21 +19,18 @@ AC_DEFUN([gl_HEADER_SYS_STAT_H], dnl Ensure the type mode_t gets defined. AC_REQUIRE([AC_TYPE_MODE_T]) - dnl Whether to enable precise timestamps in 'struct stat'. - m4_ifdef([gl_WINDOWS_STAT_TIMESPEC], [ - AC_REQUIRE([gl_WINDOWS_STAT_TIMESPEC]) - ], [ - WINDOWS_STAT_TIMESPEC=0 - ]) - AC_SUBST([WINDOWS_STAT_TIMESPEC]) - - dnl Whether to ensure that struct stat.st_size is 64-bit wide. + dnl Whether to override 'struct stat'. m4_ifdef([gl_LARGEFILE], [ AC_REQUIRE([gl_LARGEFILE]) ], [ WINDOWS_64_BIT_ST_SIZE=0 ]) AC_SUBST([WINDOWS_64_BIT_ST_SIZE]) + if test $WINDOWS_64_BIT_ST_SIZE = 1; then + AC_DEFINE([_GL_WINDOWS_64_BIT_ST_SIZE], [1], + [Define to 1 if Gnulib overrides 'struct stat' on Windows so that + struct stat.st_size becomes 64-bit.]) + fi dnl Define types that are supposed to be defined in or dnl . @@ -75,7 +72,6 @@ AC_DEFUN([gl_SYS_STAT_H_DEFAULTS], GNULIB_MKNODAT=0; AC_SUBST([GNULIB_MKNODAT]) GNULIB_STAT=0; AC_SUBST([GNULIB_STAT]) GNULIB_UTIMENSAT=0; AC_SUBST([GNULIB_UTIMENSAT]) - GNULIB_OVERRIDES_STRUCT_STAT=0; AC_SUBST([GNULIB_OVERRIDES_STRUCT_STAT]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_FCHMODAT=1; AC_SUBST([HAVE_FCHMODAT]) HAVE_FSTATAT=1; AC_SUBST([HAVE_FSTATAT]) diff --git a/gdb/gnulib/import/m4/sys_time_h.m4 b/gdb/gnulib/import/m4/sys_time_h.m4 index d7e9268db5b..3061a9c185f 100644 --- a/gdb/gnulib/import/m4/sys_time_h.m4 +++ b/gdb/gnulib/import/m4/sys_time_h.m4 @@ -1,7 +1,7 @@ # Configure a replacement for . -# serial 9 +# serial 8 -# Copyright (C) 2007, 2009-2018 Free Software Foundation, Inc. +# Copyright (C) 2007, 2009-2016 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. @@ -105,6 +105,7 @@ AC_DEFUN([gl_HEADER_SYS_TIME_H_DEFAULTS], 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 2debfb0d5b7..159b005b3d4 100644 --- a/gdb/gnulib/import/m4/sys_types_h.m4 +++ b/gdb/gnulib/import/m4/sys_types_h.m4 @@ -1,14 +1,11 @@ -# sys_types_h.m4 serial 9 -dnl Copyright (C) 2011-2018 Free Software Foundation, Inc. +# sys_types_h.m4 serial 6 +dnl Copyright (C) 2011-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN_ONCE([gl_SYS_TYPES_H], [ - dnl Use sane struct stat types in OpenVMS 8.2 and later. - AC_DEFINE([_USE_STD_STAT], 1, [For standard stat data types on VMS.]) - AC_REQUIRE([gl_SYS_TYPES_H_DEFAULTS]) gl_NEXT_HEADERS([sys/types.h]) @@ -20,14 +17,6 @@ AC_DEFUN_ONCE([gl_SYS_TYPES_H], dnl Whether to override the 'off_t' type. AC_REQUIRE([gl_TYPE_OFF_T]) - - dnl Whether to override the 'dev_t' and 'ino_t' types. - m4_ifdef([gl_WINDOWS_STAT_INODES], [ - AC_REQUIRE([gl_WINDOWS_STAT_INODES]) - ], [ - WINDOWS_STAT_INODES=0 - ]) - AC_SUBST([WINDOWS_STAT_INODES]) ]) AC_DEFUN([gl_SYS_TYPES_H_DEFAULTS], @@ -35,12 +24,12 @@ AC_DEFUN([gl_SYS_TYPES_H_DEFAULTS], ]) # This works around a buggy version in autoconf <= 2.69. -# See +# See m4_version_prereq([2.70], [], [ # This is taken from the following Autoconf patch: -# https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=e17a30e987d7ee695fb4294a82d987ec3dc9b974 +# http://git.sv.gnu.org/cgit/autoconf.git/commit/?id=e17a30e98 m4_undefine([AC_HEADER_MAJOR]) AC_DEFUN([AC_HEADER_MAJOR], diff --git a/gdb/gnulib/import/m4/tempname.m4 b/gdb/gnulib/import/m4/tempname.m4 index ed813f173a8..acf4c8d07c0 100644 --- a/gdb/gnulib/import/m4/tempname.m4 +++ b/gdb/gnulib/import/m4/tempname.m4 @@ -1,6 +1,6 @@ #serial 5 -# Copyright (C) 2006-2007, 2009-2018 Free Software Foundation, Inc. +# Copyright (C) 2006-2007, 2009-2016 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/time_h.m4 b/gdb/gnulib/import/m4/time_h.m4 index ad6f2f591c9..eb2a631e2ce 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-2018 Free Software Foundation, Inc. +# Copyright (C) 2000-2001, 2003-2007, 2009-2016 Free Software Foundation, Inc. -# serial 11 +# serial 9 # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -104,34 +104,24 @@ AC_DEFUN([gl_TIME_MODULE_INDICATOR], AC_DEFUN([gl_HEADER_TIME_H_DEFAULTS], [ - GNULIB_CTIME=0; AC_SUBST([GNULIB_CTIME]) GNULIB_MKTIME=0; AC_SUBST([GNULIB_MKTIME]) - GNULIB_LOCALTIME=0; AC_SUBST([GNULIB_LOCALTIME]) GNULIB_NANOSLEEP=0; AC_SUBST([GNULIB_NANOSLEEP]) - GNULIB_STRFTIME=0; AC_SUBST([GNULIB_STRFTIME]) 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]) - GNULIB_TZSET=0; AC_SUBST([GNULIB_TZSET]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_DECL_LOCALTIME_R=1; AC_SUBST([HAVE_DECL_LOCALTIME_R]) HAVE_NANOSLEEP=1; AC_SUBST([HAVE_NANOSLEEP]) HAVE_STRPTIME=1; AC_SUBST([HAVE_STRPTIME]) HAVE_TIMEGM=1; AC_SUBST([HAVE_TIMEGM]) - HAVE_TZSET=1; AC_SUBST([HAVE_TZSET]) - dnl Even GNU libc does not have timezone_t yet. - HAVE_TIMEZONE_T=0; AC_SUBST([HAVE_TIMEZONE_T]) dnl If another module says to replace or to not replace, do that. dnl Otherwise, replace only if someone compiles with -DGNULIB_PORTCHECK; dnl this lets maintainers check for portability. - REPLACE_CTIME=GNULIB_PORTCHECK; AC_SUBST([REPLACE_CTIME]) REPLACE_LOCALTIME_R=GNULIB_PORTCHECK; AC_SUBST([REPLACE_LOCALTIME_R]) REPLACE_MKTIME=GNULIB_PORTCHECK; AC_SUBST([REPLACE_MKTIME]) REPLACE_NANOSLEEP=GNULIB_PORTCHECK; AC_SUBST([REPLACE_NANOSLEEP]) - REPLACE_STRFTIME=GNULIB_PORTCHECK; AC_SUBST([REPLACE_STRFTIME]) REPLACE_TIMEGM=GNULIB_PORTCHECK; AC_SUBST([REPLACE_TIMEGM]) - REPLACE_TZSET=GNULIB_PORTCHECK; AC_SUBST([REPLACE_TZSET]) 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. diff --git a/gdb/gnulib/import/m4/unistd-safer.m4 b/gdb/gnulib/import/m4/unistd-safer.m4 index 2027f771f65..ceb5cc66bbf 100644 --- a/gdb/gnulib/import/m4/unistd-safer.m4 +++ b/gdb/gnulib/import/m4/unistd-safer.m4 @@ -1,5 +1,5 @@ #serial 9 -dnl Copyright (C) 2002, 2005-2006, 2009-2018 Free Software Foundation, Inc. +dnl Copyright (C) 2002, 2005-2006, 2009-2016 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/unistd_h.m4 b/gdb/gnulib/import/m4/unistd_h.m4 index 3ba64da8a0b..544dadb4122 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 74 -dnl Copyright (C) 2006-2018 Free Software Foundation, Inc. +# unistd_h.m4 serial 68 +dnl Copyright (C) 2006-2016 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. @@ -37,17 +37,17 @@ AC_DEFUN([gl_UNISTD_H], # include # include # include -# if defined _WIN32 && ! defined __CYGWIN__ +# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # include # endif #endif ]], [chdir chown dup dup2 dup3 environ euidaccess faccessat fchdir fchownat fdatasync fsync ftruncate getcwd getdomainname getdtablesize getgroups - gethostname getlogin getlogin_r getpagesize getpass + gethostname getlogin getlogin_r getpagesize getusershell setusershell endusershell group_member isatty lchown link linkat lseek pipe pipe2 pread pwrite - readlink readlinkat rmdir sethostname sleep symlink symlinkat - truncate ttyname_r unlink unlinkat usleep]) + readlink readlinkat rmdir sethostname sleep symlink symlinkat ttyname_r + unlink unlinkat usleep]) ]) AC_DEFUN([gl_UNISTD_MODULE_INDICATOR], @@ -83,7 +83,6 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS], GNULIB_GETLOGIN=0; AC_SUBST([GNULIB_GETLOGIN]) GNULIB_GETLOGIN_R=0; AC_SUBST([GNULIB_GETLOGIN_R]) GNULIB_GETPAGESIZE=0; AC_SUBST([GNULIB_GETPAGESIZE]) - GNULIB_GETPASS=0; AC_SUBST([GNULIB_GETPASS]) GNULIB_GETUSERSHELL=0; AC_SUBST([GNULIB_GETUSERSHELL]) GNULIB_GROUP_MEMBER=0; AC_SUBST([GNULIB_GROUP_MEMBER]) GNULIB_ISATTY=0; AC_SUBST([GNULIB_ISATTY]) @@ -103,7 +102,6 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS], GNULIB_SLEEP=0; AC_SUBST([GNULIB_SLEEP]) GNULIB_SYMLINK=0; AC_SUBST([GNULIB_SYMLINK]) GNULIB_SYMLINKAT=0; AC_SUBST([GNULIB_SYMLINKAT]) - GNULIB_TRUNCATE=0; AC_SUBST([GNULIB_TRUNCATE]) GNULIB_TTYNAME_R=0; AC_SUBST([GNULIB_TTYNAME_R]) GNULIB_UNISTD_H_NONBLOCKING=0; AC_SUBST([GNULIB_UNISTD_H_NONBLOCKING]) GNULIB_UNISTD_H_SIGPIPE=0; AC_SUBST([GNULIB_UNISTD_H_SIGPIPE]) @@ -127,7 +125,6 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS], HAVE_GETHOSTNAME=1; AC_SUBST([HAVE_GETHOSTNAME]) HAVE_GETLOGIN=1; AC_SUBST([HAVE_GETLOGIN]) HAVE_GETPAGESIZE=1; AC_SUBST([HAVE_GETPAGESIZE]) - HAVE_GETPASS=1; AC_SUBST([HAVE_GETPASS]) HAVE_GROUP_MEMBER=1; AC_SUBST([HAVE_GROUP_MEMBER]) HAVE_LCHOWN=1; AC_SUBST([HAVE_LCHOWN]) HAVE_LINK=1; AC_SUBST([HAVE_LINK]) @@ -148,12 +145,10 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS], HAVE_DECL_FCHDIR=1; AC_SUBST([HAVE_DECL_FCHDIR]) HAVE_DECL_FDATASYNC=1; AC_SUBST([HAVE_DECL_FDATASYNC]) HAVE_DECL_GETDOMAINNAME=1; AC_SUBST([HAVE_DECL_GETDOMAINNAME]) - HAVE_DECL_GETLOGIN=1; AC_SUBST([HAVE_DECL_GETLOGIN]) HAVE_DECL_GETLOGIN_R=1; AC_SUBST([HAVE_DECL_GETLOGIN_R]) HAVE_DECL_GETPAGESIZE=1; AC_SUBST([HAVE_DECL_GETPAGESIZE]) HAVE_DECL_GETUSERSHELL=1; AC_SUBST([HAVE_DECL_GETUSERSHELL]) HAVE_DECL_SETHOSTNAME=1; AC_SUBST([HAVE_DECL_SETHOSTNAME]) - HAVE_DECL_TRUNCATE=1; AC_SUBST([HAVE_DECL_TRUNCATE]) HAVE_DECL_TTYNAME_R=1; AC_SUBST([HAVE_DECL_TTYNAME_R]) HAVE_OS_H=0; AC_SUBST([HAVE_OS_H]) HAVE_SYS_PARAM_H=0; AC_SUBST([HAVE_SYS_PARAM_H]) @@ -161,7 +156,6 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS], REPLACE_CLOSE=0; AC_SUBST([REPLACE_CLOSE]) REPLACE_DUP=0; AC_SUBST([REPLACE_DUP]) REPLACE_DUP2=0; AC_SUBST([REPLACE_DUP2]) - REPLACE_FACCESSAT=0; AC_SUBST([REPLACE_FACCESSAT]) REPLACE_FCHOWNAT=0; AC_SUBST([REPLACE_FCHOWNAT]) REPLACE_FTRUNCATE=0; AC_SUBST([REPLACE_FTRUNCATE]) REPLACE_GETCWD=0; AC_SUBST([REPLACE_GETCWD]) @@ -170,7 +164,6 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS], REPLACE_GETLOGIN_R=0; AC_SUBST([REPLACE_GETLOGIN_R]) REPLACE_GETGROUPS=0; AC_SUBST([REPLACE_GETGROUPS]) REPLACE_GETPAGESIZE=0; AC_SUBST([REPLACE_GETPAGESIZE]) - REPLACE_GETPASS=0; AC_SUBST([REPLACE_GETPASS]) REPLACE_ISATTY=0; AC_SUBST([REPLACE_ISATTY]) REPLACE_LCHOWN=0; AC_SUBST([REPLACE_LCHOWN]) REPLACE_LINK=0; AC_SUBST([REPLACE_LINK]) @@ -185,7 +178,6 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS], REPLACE_SLEEP=0; AC_SUBST([REPLACE_SLEEP]) REPLACE_SYMLINK=0; AC_SUBST([REPLACE_SYMLINK]) REPLACE_SYMLINKAT=0; AC_SUBST([REPLACE_SYMLINKAT]) - REPLACE_TRUNCATE=0; AC_SUBST([REPLACE_TRUNCATE]) 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 8e270cf8534..08440ec593b 100644 --- a/gdb/gnulib/import/m4/warn-on-use.m4 +++ b/gdb/gnulib/import/m4/warn-on-use.m4 @@ -1,13 +1,11 @@ -# warn-on-use.m4 serial 6 -dnl Copyright (C) 2010-2018 Free Software Foundation, Inc. +# warn-on-use.m4 serial 5 +dnl Copyright (C) 2010-2016 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. # gl_WARN_ON_USE_PREPARE(INCLUDES, NAMES) # --------------------------------------- -# If the module 'posixcheck' is in use: -# # For each whitespace-separated element in the list of NAMES, define # HAVE_RAW_DECL_name if the function has a declaration among INCLUDES # even after being undefined as a macro. @@ -25,27 +23,25 @@ dnl with or without modifications, as long as this notice is preserved. # needing gl_WARN_ON_USE_PREPARE. AC_DEFUN([gl_WARN_ON_USE_PREPARE], [ - m4_ifdef([gl_POSIXCHECK], - [m4_foreach_w([gl_decl], [$2], - [AH_TEMPLATE([HAVE_RAW_DECL_]AS_TR_CPP(m4_defn([gl_decl])), - [Define to 1 if ]m4_defn([gl_decl])[ is declared even after - undefining macros.])])dnl + m4_foreach_w([gl_decl], [$2], + [AH_TEMPLATE([HAVE_RAW_DECL_]AS_TR_CPP(m4_defn([gl_decl])), + [Define to 1 if ]m4_defn([gl_decl])[ is declared even after + undefining macros.])])dnl dnl FIXME: gl_Symbol must be used unquoted until we can assume dnl autoconf 2.64 or newer. - for gl_func in m4_flatten([$2]); do - AS_VAR_PUSHDEF([gl_Symbol], [gl_cv_have_raw_decl_$gl_func])dnl - AC_CACHE_CHECK([whether $gl_func is declared without a macro], - gl_Symbol, - [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([$1], + for gl_func in m4_flatten([$2]); do + AS_VAR_PUSHDEF([gl_Symbol], [gl_cv_have_raw_decl_$gl_func])dnl + AC_CACHE_CHECK([whether $gl_func is declared without a macro], + gl_Symbol, + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([$1], [@%:@undef $gl_func (void) $gl_func;])], - [AS_VAR_SET(gl_Symbol, [yes])], [AS_VAR_SET(gl_Symbol, [no])])]) - AS_VAR_IF(gl_Symbol, [yes], - [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_RAW_DECL_$gl_func]), [1]) - dnl shortcut - if the raw declaration exists, then set a cache - dnl variable to allow skipping any later AC_CHECK_DECL efforts - eval ac_cv_have_decl_$gl_func=yes]) - AS_VAR_POPDEF([gl_Symbol])dnl - done - ]) + [AS_VAR_SET(gl_Symbol, [yes])], [AS_VAR_SET(gl_Symbol, [no])])]) + AS_VAR_IF(gl_Symbol, [yes], + [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_RAW_DECL_$gl_func]), [1]) + dnl shortcut - if the raw declaration exists, then set a cache + dnl variable to allow skipping any later AC_CHECK_DECL efforts + eval ac_cv_have_decl_$gl_func=yes]) + AS_VAR_POPDEF([gl_Symbol])dnl + done ]) diff --git a/gdb/gnulib/import/m4/wchar_h.m4 b/gdb/gnulib/import/m4/wchar_h.m4 index a062ca981df..16017a59fbb 100644 --- a/gdb/gnulib/import/m4/wchar_h.m4 +++ b/gdb/gnulib/import/m4/wchar_h.m4 @@ -1,13 +1,13 @@ dnl A placeholder for ISO C99 , for platforms that have issues. -dnl Copyright (C) 2007-2018 Free Software Foundation, Inc. +dnl Copyright (C) 2007-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Written by Eric Blake. -# wchar_h.m4 serial 43 +# wchar_h.m4 serial 40 AC_DEFUN([gl_WCHAR_H], [ @@ -35,8 +35,6 @@ AC_DEFUN([gl_WCHAR_H], fi AC_SUBST([HAVE_WINT_T]) - AC_REQUIRE([gl_TYPE_WINT_T_PREREQ]) - 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([[ @@ -55,7 +53,7 @@ AC_DEFUN([gl_WCHAR_H], wcsrtombs wcsnrtombs wcwidth wmemchr wmemcmp wmemcpy wmemmove wmemset wcslen wcsnlen wcscpy wcpcpy wcsncpy wcpncpy wcscat wcsncat wcscmp wcsncmp wcscasecmp wcsncasecmp wcscoll wcsxfrm wcsdup wcschr wcsrchr - wcscspn wcsspn wcspbrk wcsstr wcstok wcswidth wcsftime + wcscspn wcsspn wcspbrk wcsstr wcstok wcswidth ]) ]) @@ -63,8 +61,8 @@ dnl Check whether is usable at all. AC_DEFUN([gl_WCHAR_H_INLINE_OK], [ dnl Test whether suffers due to the transition from '__inline' to - dnl 'gnu_inline'. See - dnl and . In summary, + dnl 'gnu_inline'. See + dnl and . In summary, dnl glibc version 2.5 or older, together with gcc version 4.3 or newer and dnl the option -std=c99 or -std=gnu99, leads to a broken . AC_CACHE_CHECK([whether uses 'inline' correctly], @@ -90,8 +88,7 @@ int main () { return zero(); } dnl that the object file has the latter name from the start. save_ac_compile="$ac_compile" ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/` - if echo '#include "conftest.c"' >conftest1.c && - AC_TRY_EVAL([ac_compile]); then + if AC_TRY_EVAL([ac_compile]); then AC_LANG_CONFTEST([ AC_LANG_SOURCE([[#define wcstod renamed_wcstod /* Tru64 with Desktop Toolkit C has a bug: must be included before @@ -106,8 +103,7 @@ int zero (void) { return 0; } ]])]) dnl See note above about renaming object files. ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/` - if echo '#include "conftest.c"' >conftest2.c && - AC_TRY_EVAL([ac_compile]); then + if AC_TRY_EVAL([ac_compile]); then if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&AS_MESSAGE_LOG_FD 2>&1; then : else @@ -116,7 +112,7 @@ int zero (void) { return 0; } fi fi ac_compile="$save_ac_compile" - rm -f conftest[12].c conftest[12].$ac_objext conftest$ac_exeext + rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext ]) if test $gl_cv_header_wchar_h_correct_inline = no; then AC_MSG_ERROR([ cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS). @@ -124,7 +120,7 @@ This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in C99 mode. You have four options: - Add the flag -fgnu89-inline to CC and reconfigure, or - Fix your include files, using parts of - , or + , or - Use a gcc version older than 4.3, or - Don't use the flags -std=c99 or -std=gnu99. Configuration aborted.]) @@ -181,7 +177,6 @@ AC_DEFUN([gl_WCHAR_H_DEFAULTS], GNULIB_WCSSTR=0; AC_SUBST([GNULIB_WCSSTR]) GNULIB_WCSTOK=0; AC_SUBST([GNULIB_WCSTOK]) GNULIB_WCSWIDTH=0; AC_SUBST([GNULIB_WCSWIDTH]) - GNULIB_WCSFTIME=0; AC_SUBST([GNULIB_WCSFTIME]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_BTOWC=1; AC_SUBST([HAVE_BTOWC]) HAVE_MBSINIT=1; AC_SUBST([HAVE_MBSINIT]) @@ -220,7 +215,6 @@ AC_DEFUN([gl_WCHAR_H_DEFAULTS], HAVE_WCSSTR=1; AC_SUBST([HAVE_WCSSTR]) HAVE_WCSTOK=1; AC_SUBST([HAVE_WCSTOK]) HAVE_WCSWIDTH=1; AC_SUBST([HAVE_WCSWIDTH]) - HAVE_WCSFTIME=1; AC_SUBST([HAVE_WCSFTIME]) HAVE_DECL_WCTOB=1; AC_SUBST([HAVE_DECL_WCTOB]) HAVE_DECL_WCWIDTH=1; AC_SUBST([HAVE_DECL_WCWIDTH]) REPLACE_MBSTATE_T=0; AC_SUBST([REPLACE_MBSTATE_T]) @@ -236,5 +230,4 @@ AC_DEFUN([gl_WCHAR_H_DEFAULTS], REPLACE_WCSNRTOMBS=0; AC_SUBST([REPLACE_WCSNRTOMBS]) REPLACE_WCWIDTH=0; AC_SUBST([REPLACE_WCWIDTH]) REPLACE_WCSWIDTH=0; AC_SUBST([REPLACE_WCSWIDTH]) - REPLACE_WCSFTIME=0; AC_SUBST([REPLACE_WCSFTIME]) ]) diff --git a/gdb/gnulib/import/m4/wchar_t.m4 b/gdb/gnulib/import/m4/wchar_t.m4 index 83bc3d5bd1d..2db8c3f2f62 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-2018 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2003, 2008-2016 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 15d1ef3253e..accc001ca3e 100644 --- a/gdb/gnulib/import/m4/wctype_h.m4 +++ b/gdb/gnulib/import/m4/wctype_h.m4 @@ -1,8 +1,8 @@ -# wctype_h.m4 serial 21 +# wctype_h.m4 serial 18 dnl A placeholder for ISO C99 , for platforms that lack it. -dnl Copyright (C) 2006-2018 Free Software Foundation, Inc. +dnl Copyright (C) 2006-2016 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. @@ -30,8 +30,6 @@ AC_DEFUN([gl_WCTYPE_H], fi AC_SUBST([HAVE_WINT_T]) - AC_REQUIRE([gl_TYPE_WINT_T_PREREQ]) - gl_CHECK_NEXT_HEADERS([wctype.h]) if test $ac_cv_header_wctype_h = yes; then if test $ac_cv_func_iswcntrl = yes; then @@ -53,8 +51,7 @@ AC_DEFUN([gl_WCTYPE_H], int main () { return iswprint ('x') == 0; } ]])], [gl_cv_func_iswcntrl_works=yes], [gl_cv_func_iswcntrl_works=no], - [dnl Guess no on Linux libc5, yes otherwise. - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include + [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include #if __GNU_LIBRARY__ == 1 Linux libc5 i18n is broken. #endif]], [])], diff --git a/gdb/gnulib/import/m4/wint_t.m4 b/gdb/gnulib/import/m4/wint_t.m4 index 95f68548421..8ff2a5b5a28 100644 --- a/gdb/gnulib/import/m4/wint_t.m4 +++ b/gdb/gnulib/import/m4/wint_t.m4 @@ -1,12 +1,11 @@ -# wint_t.m4 serial 7 -dnl Copyright (C) 2003, 2007-2018 Free Software Foundation, Inc. +# wint_t.m4 serial 5 (gettext-0.18.2) +dnl Copyright (C) 2003, 2007-2016 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. -dnl Test whether has the 'wint_t' type and whether gnulib's -dnl or would, if present, override 'wint_t'. +dnl Test whether has the 'wint_t' type. dnl Prerequisite: AC_PROG_CC AC_DEFUN([gt_TYPE_WINT_T], @@ -29,46 +28,5 @@ AC_DEFUN([gt_TYPE_WINT_T], [gt_cv_c_wint_t=no])]) if test $gt_cv_c_wint_t = yes; then AC_DEFINE([HAVE_WINT_T], [1], [Define if you have the 'wint_t' type.]) - - dnl Determine whether gnulib's or would, if present, - dnl override 'wint_t'. - AC_CACHE_CHECK([whether wint_t is too small], - [gl_cv_type_wint_t_too_small], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([[ -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#if !(defined __GLIBC__ && !defined __UCLIBC__) -# include -# include -# include -#endif -#include - int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1]; - ]])], - [gl_cv_type_wint_t_too_small=no], - [gl_cv_type_wint_t_too_small=yes])]) - if test $gl_cv_type_wint_t_too_small = yes; then - GNULIB_OVERRIDES_WINT_T=1 - else - GNULIB_OVERRIDES_WINT_T=0 - fi - else - GNULIB_OVERRIDES_WINT_T=0 - fi - AC_SUBST([GNULIB_OVERRIDES_WINT_T]) -]) - -dnl Prerequisites of the 'wint_t' override. -AC_DEFUN([gl_TYPE_WINT_T_PREREQ], -[ - AC_CHECK_HEADERS_ONCE([crtdefs.h]) - if test $ac_cv_header_crtdefs_h = yes; then - HAVE_CRTDEFS_H=1 - else - HAVE_CRTDEFS_H=0 fi - AC_SUBST([HAVE_CRTDEFS_H]) ]) diff --git a/gdb/gnulib/import/malloc.c b/gdb/gnulib/import/malloc.c index 471c3abb5ff..e9b01d26153 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-2018 Free Software Foundation, Inc. + Copyright (C) 1997-1998, 2006-2007, 2009-2016 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program; if not, see . */ /* written by Jim Meyering and Bruno Haible */ diff --git a/gdb/gnulib/import/malloc/scratch_buffer.h b/gdb/gnulib/import/malloc/scratch_buffer.h deleted file mode 100644 index e511b812478..00000000000 --- a/gdb/gnulib/import/malloc/scratch_buffer.h +++ /dev/null @@ -1,135 +0,0 @@ -/* Variable-sized buffer with on-stack default allocation. - Copyright (C) 2015-2018 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public - License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. - - The GNU C Library 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 the GNU C Library; if not, see - . */ - -#ifndef _SCRATCH_BUFFER_H -#define _SCRATCH_BUFFER_H - -/* Scratch buffers with a default stack allocation and fallback to - heap allocation. It is expected that this function is used in this - way: - - struct scratch_buffer tmpbuf; - scratch_buffer_init (&tmpbuf); - - while (!function_that_uses_buffer (tmpbuf.data, tmpbuf.length)) - if (!scratch_buffer_grow (&tmpbuf)) - return -1; - - scratch_buffer_free (&tmpbuf); - return 0; - - The allocation functions (scratch_buffer_grow, - scratch_buffer_grow_preserve, scratch_buffer_set_array_size) make - sure that the heap allocation, if any, is freed, so that the code - above does not have a memory leak. The buffer still remains in a - state that can be deallocated using scratch_buffer_free, so a loop - like this is valid as well: - - struct scratch_buffer tmpbuf; - scratch_buffer_init (&tmpbuf); - - while (!function_that_uses_buffer (tmpbuf.data, tmpbuf.length)) - if (!scratch_buffer_grow (&tmpbuf)) - break; - - scratch_buffer_free (&tmpbuf); - - scratch_buffer_grow and scratch_buffer_grow_preserve are guaranteed - to grow the buffer by at least 512 bytes. This means that when - using the scratch buffer as a backing store for a non-character - array whose element size, in bytes, is 512 or smaller, the scratch - buffer only has to grow once to make room for at least one more - element. -*/ - -#include -#include -#include - -/* Scratch buffer. Must be initialized with scratch_buffer_init - before its use. */ -struct scratch_buffer { - void *data; /* Pointer to the beginning of the scratch area. */ - size_t length; /* Allocated space at the data pointer, in bytes. */ - max_align_t __space[(1023 + sizeof (max_align_t)) / sizeof (max_align_t)]; -}; - -/* Initializes *BUFFER so that BUFFER->data points to BUFFER->__space - and BUFFER->length reflects the available space. */ -static inline void -scratch_buffer_init (struct scratch_buffer *buffer) -{ - buffer->data = buffer->__space; - buffer->length = sizeof (buffer->__space); -} - -/* Deallocates *BUFFER (if it was heap-allocated). */ -static inline void -scratch_buffer_free (struct scratch_buffer *buffer) -{ - if (buffer->data != buffer->__space) - free (buffer->data); -} - -/* Grow *BUFFER by some arbitrary amount. The buffer contents is NOT - preserved. Return true on success, false on allocation failure (in - which case the old buffer is freed). On success, the new buffer is - larger than the previous size. On failure, *BUFFER is deallocated, - but remains in a free-able state, and errno is set. */ -bool __libc_scratch_buffer_grow (struct scratch_buffer *buffer); -libc_hidden_proto (__libc_scratch_buffer_grow) - -/* Alias for __libc_scratch_buffer_grow. */ -static __always_inline bool -scratch_buffer_grow (struct scratch_buffer *buffer) -{ - return __glibc_likely (__libc_scratch_buffer_grow (buffer)); -} - -/* Like __libc_scratch_buffer_grow, but preserve the old buffer - contents on success, as a prefix of the new buffer. */ -bool __libc_scratch_buffer_grow_preserve (struct scratch_buffer *buffer); -libc_hidden_proto (__libc_scratch_buffer_grow_preserve) - -/* Alias for __libc_scratch_buffer_grow_preserve. */ -static __always_inline bool -scratch_buffer_grow_preserve (struct scratch_buffer *buffer) -{ - return __glibc_likely (__libc_scratch_buffer_grow_preserve (buffer)); -} - -/* Grow *BUFFER so that it can store at least NELEM elements of SIZE - bytes. The buffer contents are NOT preserved. Both NELEM and SIZE - can be zero. Return true on success, false on allocation failure - (in which case the old buffer is freed, but *BUFFER remains in a - free-able state, and errno is set). It is unspecified whether this - function can reduce the array size. */ -bool __libc_scratch_buffer_set_array_size (struct scratch_buffer *buffer, - size_t nelem, size_t size); -libc_hidden_proto (__libc_scratch_buffer_set_array_size) - -/* Alias for __libc_scratch_set_array_size. */ -static __always_inline bool -scratch_buffer_set_array_size (struct scratch_buffer *buffer, - size_t nelem, size_t size) -{ - return __glibc_likely (__libc_scratch_buffer_set_array_size - (buffer, nelem, size)); -} - -#endif /* _SCRATCH_BUFFER_H */ diff --git a/gdb/gnulib/import/malloc/scratch_buffer_grow.c b/gdb/gnulib/import/malloc/scratch_buffer_grow.c deleted file mode 100644 index d108cb7e05c..00000000000 --- a/gdb/gnulib/import/malloc/scratch_buffer_grow.c +++ /dev/null @@ -1,56 +0,0 @@ -/* Variable-sized buffer with on-stack default allocation. - Copyright (C) 2015-2018 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public - License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. - - The GNU C Library 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 the GNU C Library; if not, see - . */ - -#ifndef _LIBC -# include -#endif - -#include -#include - -bool -__libc_scratch_buffer_grow (struct scratch_buffer *buffer) -{ - void *new_ptr; - size_t new_length = buffer->length * 2; - - /* Discard old buffer. */ - scratch_buffer_free (buffer); - - /* Check for overflow. */ - if (__glibc_likely (new_length >= buffer->length)) - new_ptr = malloc (new_length); - else - { - __set_errno (ENOMEM); - new_ptr = NULL; - } - - if (__glibc_unlikely (new_ptr == NULL)) - { - /* Buffer must remain valid to free. */ - scratch_buffer_init (buffer); - return false; - } - - /* Install new heap-based buffer. */ - buffer->data = new_ptr; - buffer->length = new_length; - return true; -} -libc_hidden_def (__libc_scratch_buffer_grow) diff --git a/gdb/gnulib/import/malloc/scratch_buffer_grow_preserve.c b/gdb/gnulib/import/malloc/scratch_buffer_grow_preserve.c deleted file mode 100644 index 5221ede2607..00000000000 --- a/gdb/gnulib/import/malloc/scratch_buffer_grow_preserve.c +++ /dev/null @@ -1,67 +0,0 @@ -/* Variable-sized buffer with on-stack default allocation. - Copyright (C) 2015-2018 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public - License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. - - The GNU C Library 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 the GNU C Library; if not, see - . */ - -#ifndef _LIBC -# include -#endif - -#include -#include -#include - -bool -__libc_scratch_buffer_grow_preserve (struct scratch_buffer *buffer) -{ - size_t new_length = 2 * buffer->length; - void *new_ptr; - - if (buffer->data == buffer->__space) - { - /* Move buffer to the heap. No overflow is possible because - buffer->length describes a small buffer on the stack. */ - new_ptr = malloc (new_length); - if (new_ptr == NULL) - return false; - memcpy (new_ptr, buffer->__space, buffer->length); - } - else - { - /* Buffer was already on the heap. Check for overflow. */ - if (__glibc_likely (new_length >= buffer->length)) - new_ptr = realloc (buffer->data, new_length); - else - { - __set_errno (ENOMEM); - new_ptr = NULL; - } - - if (__glibc_unlikely (new_ptr == NULL)) - { - /* Deallocate, but buffer must remain valid to free. */ - free (buffer->data); - scratch_buffer_init (buffer); - return false; - } - } - - /* Install new heap-based buffer. */ - buffer->data = new_ptr; - buffer->length = new_length; - return true; -} -libc_hidden_def (__libc_scratch_buffer_grow_preserve) diff --git a/gdb/gnulib/import/malloc/scratch_buffer_set_array_size.c b/gdb/gnulib/import/malloc/scratch_buffer_set_array_size.c deleted file mode 100644 index 4e43e7c0000..00000000000 --- a/gdb/gnulib/import/malloc/scratch_buffer_set_array_size.c +++ /dev/null @@ -1,64 +0,0 @@ -/* Variable-sized buffer with on-stack default allocation. - Copyright (C) 2015-2018 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public - License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. - - The GNU C Library 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 the GNU C Library; if not, see - . */ - -#ifndef _LIBC -# include -#endif - -#include -#include -#include - -bool -__libc_scratch_buffer_set_array_size (struct scratch_buffer *buffer, - size_t nelem, size_t size) -{ - size_t new_length = nelem * size; - - /* Avoid overflow check if both values are small. */ - if ((nelem | size) >> (sizeof (size_t) * CHAR_BIT / 2) != 0 - && nelem != 0 && size != new_length / nelem) - { - /* Overflow. Discard the old buffer, but it must remain valid - to free. */ - scratch_buffer_free (buffer); - scratch_buffer_init (buffer); - __set_errno (ENOMEM); - return false; - } - - if (new_length <= buffer->length) - return true; - - /* Discard old buffer. */ - scratch_buffer_free (buffer); - - char *new_ptr = malloc (new_length); - if (new_ptr == NULL) - { - /* Buffer must remain valid to free. */ - scratch_buffer_init (buffer); - return false; - } - - /* Install new heap-based buffer. */ - buffer->data = new_ptr; - buffer->length = new_length; - return true; -} -libc_hidden_def (__libc_scratch_buffer_set_array_size) diff --git a/gdb/gnulib/import/malloca.c b/gdb/gnulib/import/malloca.c index c54e1e0f9b7..a6132775b16 100644 --- a/gdb/gnulib/import/malloca.c +++ b/gdb/gnulib/import/malloca.c @@ -1,6 +1,6 @@ /* Safe automatic memory allocation. - Copyright (C) 2003, 2006-2007, 2009-2018 Free Software Foundation, Inc. - Written by Bruno Haible , 2003, 2018. + Copyright (C) 2003, 2006-2007, 2009-2016 Free Software Foundation, Inc. + Written by Bruno Haible , 2003. 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program; if not, see . */ #define _GL_USE_STDLIB_ALLOC 1 #include @@ -21,49 +21,82 @@ /* Specification. */ #include "malloca.h" +#include + #include "verify.h" /* The speed critical point in this file is freea() applied to an alloca() result: it must be fast, to match the speed of alloca(). The speed of mmalloca() and freea() in the other case are not critical, because they - are only invoked for big memory sizes. - Here we use a bit in the address as an indicator, an idea by Ondřej Bílka. - malloca() can return three types of pointers: - - Pointers ≡ 0 mod 2*sa_alignment_max come from stack allocation. - - Pointers ≡ sa_alignment_max mod 2*sa_alignment_max come from heap - allocation. - - NULL comes from a failed heap allocation. */ - -/* Type for holding very small pointer differences. */ -typedef unsigned char small_t; -/* Verify that it is wide enough. */ -verify (2 * sa_alignment_max - 1 <= (small_t) -1); + are only invoked for big memory sizes. */ + +#if HAVE_ALLOCA + +/* Store the mmalloca() results in a hash table. This is needed to reliably + distinguish a mmalloca() result and an alloca() result. + + Although it is possible that the same pointer is returned by alloca() and + by mmalloca() at different times in the same application, it does not lead + to a bug in freea(), because: + - Before a pointer returned by alloca() can point into malloc()ed memory, + the function must return, and once this has happened the programmer must + not call freea() on it anyway. + - Before a pointer returned by mmalloca() can point into the stack, it + must be freed. The only function that can free it is freea(), and + when freea() frees it, it also removes it from the hash table. */ + +#define MAGIC_NUMBER 0x1415fb4a +#define MAGIC_SIZE sizeof (int) +/* This is how the header info would look like without any alignment + considerations. */ +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) +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 + lookup becomes slow, it means that the application has memory leaks. */ +#define HASH_TABLE_SIZE 257 +static void * mmalloca_results[HASH_TABLE_SIZE]; + +#endif void * mmalloca (size_t n) { #if HAVE_ALLOCA - /* Allocate one more word, used to determine the address to pass to freea(), - and room for the alignment ≡ sa_alignment_max mod 2*sa_alignment_max. */ - size_t nplus = n + sizeof (small_t) + 2 * sa_alignment_max - 1; + /* Allocate one more word, that serves as an indicator for malloc()ed + memory, so that freea() of an alloca() result is fast. */ + size_t nplus = n + HEADER_SIZE; if (nplus >= n) { - char *mem = (char *) malloc (nplus); + void *p = malloc (nplus); - if (mem != NULL) + if (p != NULL) { - char *p = - (char *)((((uintptr_t)mem + sizeof (small_t) + sa_alignment_max - 1) - & ~(uintptr_t)(2 * sa_alignment_max - 1)) - + sa_alignment_max); - /* Here p >= mem + sizeof (small_t), - and p <= mem + sizeof (small_t) + 2 * sa_alignment_max - 1 - hence p + n <= mem + nplus. - So, the memory range [p, p+n) lies in the allocated memory range - [mem, mem + nplus). */ - ((small_t *) p)[-1] = p - mem; - /* p ≡ sa_alignment_max mod 2*sa_alignment_max. */ + size_t slot; + union header *h = p; + + p = h + 1; + + /* Put a magic number into the indicator word. */ + h->magic.word = MAGIC_NUMBER; + + /* Enter p into the hash table. */ + slot = (uintptr_t) p % HASH_TABLE_SIZE; + h->next = mmalloca_results[slot]; + mmalloca_results[slot] = p; + return p; } } @@ -82,24 +115,35 @@ mmalloca (size_t n) void freea (void *p) { - /* Check argument. */ - if ((uintptr_t) p & (sa_alignment_max - 1)) - { - /* p was not the result of a malloca() call. Invalid argument. */ - abort (); - } - /* Determine whether p was a non-NULL pointer returned by mmalloca(). */ - if ((uintptr_t) p & sa_alignment_max) + /* mmalloca() may have returned NULL. */ + if (p != NULL) { - void *mem = (char *) p - ((small_t *) p)[-1]; - free (mem); + /* Attempt to quickly distinguish the mmalloca() result - which has + a magic indicator word - and the alloca() result - which has an + uninitialized indicator word. It is for this test that sa_increment + additional bytes are allocated in the alloca() case. */ + if (((int *) p)[-1] == MAGIC_NUMBER) + { + /* Looks like a mmalloca() result. To see whether it really is one, + perform a lookup in the hash table. */ + size_t slot = (uintptr_t) p % HASH_TABLE_SIZE; + 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. */ + union header *p_begin = h - 1; + *chain = p_begin->next; + free (p_begin); + return; + } + h = *chain; + chain = &h[-1].next; + } + } + /* At this point, we know it was not a mmalloca() result. */ } } #endif - -/* - * Hey Emacs! - * Local Variables: - * coding: utf-8 - * End: - */ diff --git a/gdb/gnulib/import/malloca.h b/gdb/gnulib/import/malloca.h index 1e47813ff48..fa27a9e7a2d 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-2018 Free Software Foundation, Inc. + Copyright (C) 2003-2007, 2009-2016 Free Software Foundation, Inc. Written by Bruno Haible , 2003. This program is free software; you can redistribute it and/or modify @@ -13,7 +13,7 @@ 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 . */ + along with this program; if not, see . */ #ifndef _MALLOCA_H #define _MALLOCA_H @@ -21,9 +21,6 @@ #include #include #include -#include - -#include "xalloc-oversized.h" #ifdef __cplusplus @@ -56,10 +53,8 @@ extern "C" { the function returns. Upon failure, it returns NULL. */ #if HAVE_ALLOCA # define malloca(N) \ - ((N) < 4032 - (2 * sa_alignment_max - 1) \ - ? (void *) (((uintptr_t) (char *) alloca ((N) + 2 * sa_alignment_max - 1) \ - + (2 * sa_alignment_max - 1)) \ - & ~(uintptr_t)(2 * sa_alignment_max - 1)) \ + ((N) < 4032 - sa_increment \ + ? (void *) ((char *) alloca ((N) + sa_increment) + sa_increment) \ : mmalloca (N)) #else # define malloca(N) \ @@ -78,7 +73,15 @@ extern void freea (void *p); It allocates an array of N objects, each with S bytes of memory, on the stack. S must be positive and N must be nonnegative. The array must be freed using freea() before the function returns. */ -#define nmalloca(n, s) (xalloc_oversized (n, s) ? NULL : malloca ((n) * (s))) +#if 1 +/* Cf. the definition of xalloc_oversized. */ +# define nmalloca(n, s) \ + ((n) > (size_t) (sizeof (ptrdiff_t) <= sizeof (size_t) ? -1 : -2) / (s) \ + ? NULL \ + : malloca ((n) * (s))) +#else +extern void * nmalloca (size_t n, size_t s); +#endif #ifdef __cplusplus @@ -121,7 +124,10 @@ enum | (sa_alignment_longlong - 1) #endif | (sa_alignment_longdouble - 1) - ) + 1 + ) + 1, +/* The increment that guarantees room for a magic word must be >= sizeof (int) + and a multiple of sa_alignment_max. */ + sa_increment = ((sizeof (int) + sa_alignment_max - 1) / sa_alignment_max) * sa_alignment_max }; #endif /* _MALLOCA_H */ diff --git a/gdb/gnulib/import/malloca.valgrind b/gdb/gnulib/import/malloca.valgrind new file mode 100644 index 00000000000..52f0a50f57f --- /dev/null +++ b/gdb/gnulib/import/malloca.valgrind @@ -0,0 +1,7 @@ +# Suppress a valgrind message about use of uninitialized memory in freea(). +# This use is OK because it provides only a speedup. +{ + freea + Memcheck:Cond + fun:freea +} diff --git a/gdb/gnulib/import/math.in.h b/gdb/gnulib/import/math.in.h index c30fc202c0d..e1dc97030fe 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-2018 Free Software Foundation, Inc. + Copyright (C) 2002-2003, 2007-2016 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ #ifndef _@GUARD_PREFIX@_MATH_H @@ -28,11 +28,6 @@ #ifndef _@GUARD_PREFIX@_MATH_H #define _@GUARD_PREFIX@_MATH_H -/* On OpenVMS, NAN, INFINITY, and HUGEVAL macros are defined in . */ -#if defined __VMS && ! defined NAN -# include -#endif - #ifndef _GL_INLINE_HEADER_BEGIN #error "Please include config.h first." #endif @@ -92,27 +87,27 @@ _GL_END_NAMESPACE classification macros with an argument of real-floating (that is, one of float, double, or long double). */ #define _GL_WARN_REAL_FLOATING_DECL(func) \ -_GL_MATH_INLINE int \ -_GL_WARN_ON_USE_ATTRIBUTE (#func " is unportable - " \ - "use gnulib module " #func " for portability") \ -rpl_ ## func ## f (float f) \ -{ \ - return func (f); \ -} \ -_GL_MATH_INLINE int \ -_GL_WARN_ON_USE_ATTRIBUTE (#func " is unportable - " \ - "use gnulib module " #func " for portability") \ -rpl_ ## func ## d (double d) \ -{ \ - return func (d); \ -} \ -_GL_MATH_INLINE int \ -_GL_WARN_ON_USE_ATTRIBUTE (#func " is unportable - " \ - "use gnulib module " #func " for portability") \ -rpl_ ## func ## l (long double l) \ -{ \ - return func (l); \ -} +_GL_MATH_INLINE int \ +rpl_ ## func ## f (float f) \ +{ \ + return func (f); \ +} \ +_GL_MATH_INLINE int \ +rpl_ ## func ## d (double d) \ +{ \ + return func (d); \ +} \ +_GL_MATH_INLINE int \ +rpl_ ## func ## l (long double l) \ +{ \ + return func (l); \ +} \ +_GL_WARN_ON_USE (rpl_ ## func ## f, #func " is unportable - " \ + "use gnulib module " #func " for portability"); \ +_GL_WARN_ON_USE (rpl_ ## func ## d, #func " is unportable - " \ + "use gnulib module " #func " for portability"); \ +_GL_WARN_ON_USE (rpl_ ## func ## l, #func " is unportable - " \ + "use gnulib module " #func " for portability") #define _GL_WARN_REAL_FLOATING_IMPL(func, value) \ (sizeof (value) == sizeof (float) ? rpl_ ## func ## f (value) \ : sizeof (value) == sizeof (double) ? rpl_ ## func ## d (value) \ @@ -194,17 +189,8 @@ _NaN () #endif -#if defined FP_ILOGB0 && defined FP_ILOGBNAN - /* Ensure FP_ILOGB0 and FP_ILOGBNAN are correct. */ -# if defined __HAIKU__ - /* Haiku: match what ilogb() does */ -# undef FP_ILOGB0 -# undef FP_ILOGBNAN -# define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */ -# define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */ -# endif -#else - /* Ensure FP_ILOGB0 and FP_ILOGBNAN are defined. */ +/* Ensure FP_ILOGB0 and FP_ILOGBNAN are defined. */ +#if !(defined FP_ILOGB0 && defined FP_ILOGBNAN) # if defined __NetBSD__ || defined __sgi /* NetBSD, IRIX 6.5: match what ilogb() does */ # define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */ @@ -226,20 +212,11 @@ _NaN () #if @GNULIB_ACOSF@ -# if @REPLACE_ACOSF@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef acosf -# define acosf rpl_acosf -# endif -_GL_FUNCDECL_RPL (acosf, float, (float x)); -_GL_CXXALIAS_RPL (acosf, float, (float x)); -# else -# if !@HAVE_ACOSF@ -# undef acosf +# if !@HAVE_ACOSF@ +# undef acosf _GL_FUNCDECL_SYS (acosf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (acosf, float, (float x)); # endif +_GL_CXXALIAS_SYS (acosf, float, (float x)); _GL_CXXALIASWARN (acosf); #elif defined GNULIB_POSIXCHECK # undef acosf @@ -266,20 +243,11 @@ _GL_WARN_ON_USE (acosl, "acosl is unportable - " #if @GNULIB_ASINF@ -# if @REPLACE_ASINF@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef asinf -# define asinf rpl_asinf -# endif -_GL_FUNCDECL_RPL (asinf, float, (float x)); -_GL_CXXALIAS_RPL (asinf, float, (float x)); -# else -# if !@HAVE_ASINF@ -# undef asinf +# if !@HAVE_ASINF@ +# undef asinf _GL_FUNCDECL_SYS (asinf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (asinf, float, (float x)); # endif +_GL_CXXALIAS_SYS (asinf, float, (float x)); _GL_CXXALIASWARN (asinf); #elif defined GNULIB_POSIXCHECK # undef asinf @@ -306,20 +274,11 @@ _GL_WARN_ON_USE (asinl, "asinl is unportable - " #if @GNULIB_ATANF@ -# if @REPLACE_ATANF@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef atanf -# define atanf rpl_atanf -# endif -_GL_FUNCDECL_RPL (atanf, float, (float x)); -_GL_CXXALIAS_RPL (atanf, float, (float x)); -# else -# if !@HAVE_ATANF@ -# undef atanf +# if !@HAVE_ATANF@ +# undef atanf _GL_FUNCDECL_SYS (atanf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (atanf, float, (float x)); # endif +_GL_CXXALIAS_SYS (atanf, float, (float x)); _GL_CXXALIASWARN (atanf); #elif defined GNULIB_POSIXCHECK # undef atanf @@ -346,20 +305,11 @@ _GL_WARN_ON_USE (atanl, "atanl is unportable - " #if @GNULIB_ATAN2F@ -# if @REPLACE_ATAN2F@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef atan2f -# define atan2f rpl_atan2f -# endif -_GL_FUNCDECL_RPL (atan2f, float, (float y, float x)); -_GL_CXXALIAS_RPL (atan2f, float, (float y, float x)); -# else -# if !@HAVE_ATAN2F@ -# undef atan2f +# if !@HAVE_ATAN2F@ +# undef atan2f _GL_FUNCDECL_SYS (atan2f, float, (float y, float x)); -# endif -_GL_CXXALIAS_SYS (atan2f, float, (float y, float x)); # endif +_GL_CXXALIAS_SYS (atan2f, float, (float y, float x)); _GL_CXXALIASWARN (atan2f); #elif defined GNULIB_POSIXCHECK # undef atan2f @@ -538,20 +488,11 @@ _GL_WARN_ON_USE (copysign, "copysignl is unportable - " #if @GNULIB_COSF@ -# if @REPLACE_COSF@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef cosf -# define cosf rpl_cosf -# endif -_GL_FUNCDECL_RPL (cosf, float, (float x)); -_GL_CXXALIAS_RPL (cosf, float, (float x)); -# else -# if !@HAVE_COSF@ -# undef cosf +# if !@HAVE_COSF@ +# undef cosf _GL_FUNCDECL_SYS (cosf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (cosf, float, (float x)); # endif +_GL_CXXALIAS_SYS (cosf, float, (float x)); _GL_CXXALIASWARN (cosf); #elif defined GNULIB_POSIXCHECK # undef cosf @@ -578,20 +519,11 @@ _GL_WARN_ON_USE (cosl, "cosl is unportable - " #if @GNULIB_COSHF@ -# if @REPLACE_COSHF@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef coshf -# define coshf rpl_coshf -# endif -_GL_FUNCDECL_RPL (coshf, float, (float x)); -_GL_CXXALIAS_RPL (coshf, float, (float x)); -# else -# if !@HAVE_COSHF@ -# undef coshf +# if !@HAVE_COSHF@ +# undef coshf _GL_FUNCDECL_SYS (coshf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (coshf, float, (float x)); # endif +_GL_CXXALIAS_SYS (coshf, float, (float x)); _GL_CXXALIASWARN (coshf); #elif defined GNULIB_POSIXCHECK # undef coshf @@ -603,20 +535,11 @@ _GL_WARN_ON_USE (coshf, "coshf is unportable - " #if @GNULIB_EXPF@ -# if @REPLACE_EXPF@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef expf -# define expf rpl_expf -# endif -_GL_FUNCDECL_RPL (expf, float, (float x)); -_GL_CXXALIAS_RPL (expf, float, (float x)); -# else -# if !@HAVE_EXPF@ -# undef expf +# if !@HAVE_EXPF@ +# undef expf _GL_FUNCDECL_SYS (expf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (expf, float, (float x)); # endif +_GL_CXXALIAS_SYS (expf, float, (float x)); _GL_CXXALIASWARN (expf); #elif defined GNULIB_POSIXCHECK # undef expf @@ -1223,19 +1146,10 @@ _GL_WARN_ON_USE (ilogb, "ilogb is unportable - " #endif #if @GNULIB_ILOGBL@ -# if @REPLACE_ILOGBL@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ilogbl -# define ilogbl rpl_ilogbl -# endif -_GL_FUNCDECL_RPL (ilogbl, int, (long double x)); -_GL_CXXALIAS_RPL (ilogbl, int, (long double x)); -# else -# if !@HAVE_ILOGBL@ +# if !@HAVE_ILOGBL@ _GL_FUNCDECL_SYS (ilogbl, int, (long double x)); -# endif -_GL_CXXALIAS_SYS (ilogbl, int, (long double x)); # endif +_GL_CXXALIAS_SYS (ilogbl, int, (long double x)); _GL_CXXALIASWARN (ilogbl); #elif defined GNULIB_POSIXCHECK # undef ilogbl @@ -1913,20 +1827,11 @@ _GL_WARN_ON_USE (roundl, "roundl is unportable - " #if @GNULIB_SINF@ -# if @REPLACE_SINF@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef sinf -# define sinf rpl_sinf -# endif -_GL_FUNCDECL_RPL (sinf, float, (float x)); -_GL_CXXALIAS_RPL (sinf, float, (float x)); -# else -# if !@HAVE_SINF@ - # undef sinf +# if !@HAVE_SINF@ +# undef sinf _GL_FUNCDECL_SYS (sinf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (sinf, float, (float x)); # endif +_GL_CXXALIAS_SYS (sinf, float, (float x)); _GL_CXXALIASWARN (sinf); #elif defined GNULIB_POSIXCHECK # undef sinf @@ -1953,20 +1858,11 @@ _GL_WARN_ON_USE (sinl, "sinl is unportable - " #if @GNULIB_SINHF@ -# if @REPLACE_SINHF@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef sinhf -# define sinhf rpl_sinhf -# endif -_GL_FUNCDECL_RPL (sinhf, float, (float x)); -_GL_CXXALIAS_RPL (sinhf, float, (float x)); -# else -# if !@HAVE_SINHF@ -# undef sinhf +# if !@HAVE_SINHF@ +# undef sinhf _GL_FUNCDECL_SYS (sinhf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (sinhf, float, (float x)); # endif +_GL_CXXALIAS_SYS (sinhf, float, (float x)); _GL_CXXALIASWARN (sinhf); #elif defined GNULIB_POSIXCHECK # undef sinhf @@ -1978,20 +1874,11 @@ _GL_WARN_ON_USE (sinhf, "sinhf is unportable - " #if @GNULIB_SQRTF@ -# if @REPLACE_SQRTF@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef sqrtf -# define sqrtf rpl_sqrtf -# endif -_GL_FUNCDECL_RPL (sqrtf, float, (float x)); -_GL_CXXALIAS_RPL (sqrtf, float, (float x)); -# else -# if !@HAVE_SQRTF@ -# undef sqrtf +# if !@HAVE_SQRTF@ +# undef sqrtf _GL_FUNCDECL_SYS (sqrtf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (sqrtf, float, (float x)); # endif +_GL_CXXALIAS_SYS (sqrtf, float, (float x)); _GL_CXXALIASWARN (sqrtf); #elif defined GNULIB_POSIXCHECK # undef sqrtf @@ -2027,20 +1914,11 @@ _GL_WARN_ON_USE (sqrtl, "sqrtl is unportable - " #if @GNULIB_TANF@ -# if @REPLACE_TANF@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef tanf -# define tanf rpl_tanf -# endif -_GL_FUNCDECL_RPL (tanf, float, (float x)); -_GL_CXXALIAS_RPL (tanf, float, (float x)); -# else -# if !@HAVE_TANF@ -# undef tanf +# if !@HAVE_TANF@ +# undef tanf _GL_FUNCDECL_SYS (tanf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (tanf, float, (float x)); # endif +_GL_CXXALIAS_SYS (tanf, float, (float x)); _GL_CXXALIASWARN (tanf); #elif defined GNULIB_POSIXCHECK # undef tanf @@ -2067,20 +1945,11 @@ _GL_WARN_ON_USE (tanl, "tanl is unportable - " #if @GNULIB_TANHF@ -# if @REPLACE_TANHF@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef tanhf -# define tanhf rpl_tanhf -# endif -_GL_FUNCDECL_RPL (tanhf, float, (float x)); -_GL_CXXALIAS_RPL (tanhf, float, (float x)); -# else -# if !@HAVE_TANHF@ -# undef tanhf +# if !@HAVE_TANHF@ +# undef tanhf _GL_FUNCDECL_SYS (tanhf, float, (float x)); -# endif -_GL_CXXALIAS_SYS (tanhf, float, (float x)); # endif +_GL_CXXALIAS_SYS (tanhf, float, (float x)); _GL_CXXALIASWARN (tanhf); #elif defined GNULIB_POSIXCHECK # undef tanhf diff --git a/gdb/gnulib/import/mbrtowc.c b/gdb/gnulib/import/mbrtowc.c index 2f6df287a50..cdd874bc5a8 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-2018 Free Software Foundation, Inc. + Copyright (C) 1999-2002, 2005-2016 Free Software Foundation, Inc. Written by Bruno Haible , 2008. This program is free software: you can redistribute it and/or modify @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ #include @@ -35,61 +35,6 @@ # include "streq.h" # include "verify.h" -# ifndef FALLTHROUGH -# if __GNUC__ < 7 -# define FALLTHROUGH ((void) 0) -# else -# define FALLTHROUGH __attribute__ ((__fallthrough__)) -# endif -# endif - -/* Returns a classification of special values of the encoding of the current - locale. */ -typedef enum { - enc_other, /* other */ - enc_utf8, /* UTF-8 */ - enc_eucjp, /* EUC-JP */ - enc_94, /* EUC-KR, GB2312, BIG5 */ - enc_euctw, /* EUC-TW */ - enc_gb18030, /* GB18030 */ - enc_sjis /* SJIS */ -} enc_t; -static inline enc_t -locale_enc (void) -{ - const char *encoding = locale_charset (); - if (STREQ_OPT (encoding, "UTF-8", 'U', 'T', 'F', '-', '8', 0, 0, 0, 0)) - return enc_utf8; - if (STREQ_OPT (encoding, "EUC-JP", 'E', 'U', 'C', '-', 'J', 'P', 0, 0, 0)) - return enc_eucjp; - if (STREQ_OPT (encoding, "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0) - || STREQ_OPT (encoding, "GB2312", 'G', 'B', '2', '3', '1', '2', 0, 0, 0) - || STREQ_OPT (encoding, "BIG5", 'B', 'I', 'G', '5', 0, 0, 0, 0, 0)) - return enc_94; - if (STREQ_OPT (encoding, "EUC-TW", 'E', 'U', 'C', '-', 'T', 'W', 0, 0, 0)) - return enc_euctw; - if (STREQ_OPT (encoding, "GB18030", 'G', 'B', '1', '8', '0', '3', '0', 0, 0)) - return enc_gb18030; - if (STREQ_OPT (encoding, "SJIS", 'S', 'J', 'I', 'S', 0, 0, 0, 0, 0)) - return enc_sjis; - return enc_other; -} - -#if GNULIB_WCHAR_SINGLE -/* When we know that the locale does not change, provide a speedup by - caching the value of locale_enc. */ -static int cached_locale_enc = -1; -static inline enc_t -locale_enc_cached (void) -{ - if (cached_locale_enc < 0) - cached_locale_enc = locale_enc (); - return cached_locale_enc; -} -#else -/* By default, don't make assumptions, hence no caching. */ -# define locale_enc_cached locale_enc -#endif verify (sizeof (mbstate_t) >= 4); @@ -129,10 +74,10 @@ mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps) break; case 3: buf[2] = pstate[3]; - FALLTHROUGH; + /*FALLTHROUGH*/ case 2: buf[1] = pstate[2]; - FALLTHROUGH; + /*FALLTHROUGH*/ case 1: buf[0] = pstate[1]; p = buf; @@ -153,7 +98,7 @@ mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps) /* Here m > 0. */ # if __GLIBC__ || defined __UCLIBC__ - /* Work around bug */ + /* Work around bug */ mbtowc (NULL, NULL, 0); # endif { @@ -185,9 +130,10 @@ mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps) if (m >= 4 || m >= MB_CUR_MAX) goto invalid; /* Here MB_CUR_MAX > 1 and 0 < m < 4. */ - switch (locale_enc_cached ()) - { - case enc_utf8: /* UTF-8 */ + { + const char *encoding = locale_charset (); + + if (STREQ_OPT (encoding, "UTF-8", 'U', 'T', 'F', '-', '8', 0, 0, 0, 0)) { /* Cf. unistr/u8-mblen.c. */ unsigned char c = (unsigned char) p[0]; @@ -244,7 +190,8 @@ mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps) /* As a reference for this code, you can use the GNU libiconv implementation. Look for uses of the RET_TOOFEW macro. */ - case enc_eucjp: /* EUC-JP */ + if (STREQ_OPT (encoding, + "EUC-JP", 'E', 'U', 'C', '-', 'J', 'P', 0, 0, 0)) { if (m == 1) { @@ -267,8 +214,12 @@ mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps) } goto invalid; } - - case enc_94: /* EUC-KR, GB2312, BIG5 */ + if (STREQ_OPT (encoding, + "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0) + || STREQ_OPT (encoding, + "GB2312", 'G', 'B', '2', '3', '1', '2', 0, 0, 0) + || STREQ_OPT (encoding, + "BIG5", 'B', 'I', 'G', '5', 0, 0, 0, 0, 0)) { if (m == 1) { @@ -279,8 +230,8 @@ mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps) } goto invalid; } - - case enc_euctw: /* EUC-TW */ + if (STREQ_OPT (encoding, + "EUC-TW", 'E', 'U', 'C', '-', 'T', 'W', 0, 0, 0)) { if (m == 1) { @@ -298,8 +249,8 @@ mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps) } goto invalid; } - - case enc_gb18030: /* GB18030 */ + if (STREQ_OPT (encoding, + "GB18030", 'G', 'B', '1', '8', '0', '3', '0', 0, 0)) { if (m == 1) { @@ -332,8 +283,7 @@ mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps) } goto invalid; } - - case enc_sjis: /* SJIS */ + if (STREQ_OPT (encoding, "SJIS", 'S', 'J', 'I', 'S', 0, 0, 0, 0, 0)) { if (m == 1) { @@ -346,10 +296,9 @@ mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps) goto invalid; } - default: - /* An unknown multibyte encoding. */ - goto incomplete; - } + /* An unknown multibyte encoding. */ + goto incomplete; + } incomplete: { diff --git a/gdb/gnulib/import/mbsinit.c b/gdb/gnulib/import/mbsinit.c index e23a5ad3184..372b523ad6c 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-2018 Free Software Foundation, Inc. + Copyright (C) 2008-2016 Free Software Foundation, Inc. Written by Bruno Haible , 2008. This program is free software: you can redistribute it and/or modify @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ #include @@ -22,7 +22,17 @@ #include "verify.h" -#if GNULIB_defined_mbstate_t +#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ + +/* On native Windows, 'mbstate_t' is defined as 'int'. */ + +int +mbsinit (const mbstate_t *ps) +{ + return ps == NULL || *ps == 0; +} + +#else /* Platforms that lack mbsinit() also lack mbrlen(), mbrtowc(), mbsrtowcs() and wcrtomb(), wcsrtombs(). @@ -35,7 +45,6 @@ We define the meaning of mbstate_t as follows: - In mb -> wc direction, mbstate_t's first byte contains the number of buffered bytes (in the range 0..3), followed by up to 3 buffered bytes. - See mbrtowc.c. - In wc -> mb direction, mbstate_t contains no information. In other words, it is always in the initial state. */ @@ -49,25 +58,4 @@ mbsinit (const mbstate_t *ps) return pstate == NULL || pstate[0] == 0; } -#else - -int -mbsinit (const mbstate_t *ps) -{ -# if defined _WIN32 && !defined __CYGWIN__ - /* Native Windows. */ -# ifdef __MINGW32__ - /* On mingw, 'mbstate_t' is defined as 'int'. */ - return ps == NULL || *ps == 0; -# else - /* MSVC defines 'mbstate_t' as an 8-byte struct; the first 4-bytes matter. */ - return ps == NULL || *(const unsigned int *)ps == 0; -# endif -# else - /* Minix, HP-UX 11.00, Solaris 2.6, Interix, ... */ - /* Maybe this definition works, maybe not... */ - return ps == NULL || *(const char *)ps == 0; -# endif -} - #endif diff --git a/gdb/gnulib/import/mbsrtowcs-impl.h b/gdb/gnulib/import/mbsrtowcs-impl.h index 2588a8881a7..f99fa34ada9 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-2018 Free Software Foundation, Inc. + Copyright (C) 2008-2016 Free Software Foundation, Inc. Written by Bruno Haible , 2008. This program is free software: you can redistribute it and/or modify @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ size_t mbsrtowcs (wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps) diff --git a/gdb/gnulib/import/mbsrtowcs-state.c b/gdb/gnulib/import/mbsrtowcs-state.c index 2ab2618bc56..905547a974b 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-2018 Free Software Foundation, Inc. + Copyright (C) 2008-2016 Free Software Foundation, Inc. Written by Bruno Haible , 2008. This program is free software: you can redistribute it and/or modify @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ #include @@ -23,7 +23,7 @@ mbstate_t _gl_mbsrtowcs_state /* The state must initially be in the "initial state"; so, zero-initialize it. On most systems, putting it into BSS is sufficient. Not so on Mac OS X 10.3, - see . + see . When it needs an initializer, use 0 or {0} as initializer? 0 only works when mbstate_t is a scalar type (such as when gnulib defines it, or on AIX, IRIX, mingw). {0} works as an initializer in all cases: for a struct diff --git a/gdb/gnulib/import/mbsrtowcs.c b/gdb/gnulib/import/mbsrtowcs.c index 1da1ce5af42..54bf6f71d71 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-2018 Free Software Foundation, Inc. + Copyright (C) 2008-2016 Free Software Foundation, Inc. Written by Bruno Haible , 2008. This program is free software: you can redistribute it and/or modify @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ #include diff --git a/gdb/gnulib/import/memchr.c b/gdb/gnulib/import/memchr.c index 0b4754654c9..b565542c39a 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-2018 +/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2016 Free Software Foundation, Inc. Based on strlen implementation by Torbjorn Granlund (tege@sics.se), @@ -21,7 +21,7 @@ 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 . */ +along with this program. If not, see . */ #ifndef _LIBC # include diff --git a/gdb/gnulib/import/memmem.c b/gdb/gnulib/import/memmem.c index 260848d6597..7d1f971355c 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-2018 Free Software +/* Copyright (C) 1991-1994, 1996-1998, 2000, 2004, 2007-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -13,7 +13,7 @@ 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 . */ + with this program; if not, see . */ /* This particular implementation was written by Eric Blake, 2008. */ @@ -24,6 +24,10 @@ /* Specification of memmem. */ #include +#ifndef _LIBC +# define __builtin_expect(expr, val) (expr) +#endif + #define RETURN_TYPE void * #define AVAILABLE(h, h_l, j, n_l) ((j) <= (h_l) - (n_l)) #include "str-two-way.h" diff --git a/gdb/gnulib/import/mempcpy.c b/gdb/gnulib/import/mempcpy.c index a9ed1121c4c..d579f64a0ab 100644 --- a/gdb/gnulib/import/mempcpy.c +++ b/gdb/gnulib/import/mempcpy.c @@ -1,5 +1,5 @@ /* Copy memory area and return pointer after last written byte. - Copyright (C) 2003, 2007, 2009-2018 Free Software Foundation, Inc. + Copyright (C) 2003, 2007, 2009-2016 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program; if not, see . */ #include diff --git a/gdb/gnulib/import/memrchr.c b/gdb/gnulib/import/memrchr.c index 99acfd9c56d..e6212e5c4f8 100644 --- a/gdb/gnulib/import/memrchr.c +++ b/gdb/gnulib/import/memrchr.c @@ -1,6 +1,6 @@ /* memrchr -- find the last occurrence of a byte in a memory block - Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2018 Free Software + Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2016 Free Software Foundation, Inc. Based on strlen implementation by Torbjorn Granlund (tege@sics.se), @@ -20,7 +20,7 @@ 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 . */ + along with this program. If not, see . */ #if defined _LIBC # include diff --git a/gdb/gnulib/import/mkdir.c b/gdb/gnulib/import/mkdir.c index 37d5a0f4362..59bdea132cf 100644 --- a/gdb/gnulib/import/mkdir.c +++ b/gdb/gnulib/import/mkdir.c @@ -1,7 +1,7 @@ /* On some systems, mkdir ("foo/", 0700) fails because of the trailing slash. On those systems, this wrapper removes the trailing slash. - Copyright (C) 2001, 2003, 2006, 2008-2018 Free Software Foundation, Inc. + Copyright (C) 2001, 2003, 2006, 2008-2016 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,7 +14,7 @@ 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 . */ + along with this program. If not, see . */ /* written by Jim Meyering */ @@ -38,7 +38,7 @@ Additionally, it declares _mkdir (and depending on compile flags, an alias mkdir), only in the nonstandard includes and , which are included in the override. */ -#if defined _WIN32 && ! defined __CYGWIN__ +#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # define mkdir(name,mode) _mkdir (name) # define maybe_unused _GL_UNUSED #else diff --git a/gdb/gnulib/import/mkstemp.c b/gdb/gnulib/import/mkstemp.c index 02a7b65386c..90ed78e49ed 100644 --- a/gdb/gnulib/import/mkstemp.c +++ b/gdb/gnulib/import/mkstemp.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998-1999, 2001, 2005-2007, 2009-2018 Free Software +/* Copyright (C) 1998-1999, 2001, 2005-2007, 2009-2016 Free Software Foundation, Inc. This file is derived from the one in the GNU C Library. @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ #if !_LIBC # include diff --git a/gdb/gnulib/import/msvc-inval.c b/gdb/gnulib/import/msvc-inval.c index 0f19a09aee7..baaf39eda1f 100644 --- a/gdb/gnulib/import/msvc-inval.c +++ b/gdb/gnulib/import/msvc-inval.c @@ -1,5 +1,5 @@ /* Invalid parameter handler for MSVC runtime libraries. - Copyright (C) 2011-2018 Free Software Foundation, Inc. + Copyright (C) 2011-2016 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 @@ -12,7 +12,7 @@ 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 . */ + with this program; if not, see . */ #include diff --git a/gdb/gnulib/import/msvc-inval.h b/gdb/gnulib/import/msvc-inval.h index 8e7ff303a71..027c94972a5 100644 --- a/gdb/gnulib/import/msvc-inval.h +++ b/gdb/gnulib/import/msvc-inval.h @@ -1,5 +1,5 @@ /* Invalid parameter handler for MSVC runtime libraries. - Copyright (C) 2011-2018 Free Software Foundation, Inc. + Copyright (C) 2011-2016 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 @@ -12,7 +12,7 @@ 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 . */ + with this program; if not, see . */ #ifndef _MSVC_INVAL_H #define _MSVC_INVAL_H @@ -95,7 +95,7 @@ extern void gl_msvc_inval_ensure_handler (void); /* Gnulib can define its own status codes, as described in the page "Raising Software Exceptions" on microsoft.com - . + . Our status codes are composed of - 0xE0000000, mandatory for all user-defined status codes, - 0x474E550, a API identifier ("GNU"), @@ -106,7 +106,7 @@ extern void gl_msvc_inval_ensure_handler (void); # if defined _MSC_VER /* A compiler that supports __try/__except, as described in the page "try-except statement" on microsoft.com - . + . With __try/__except, we can use the multithread-safe exception handling. */ # ifdef __cplusplus diff --git a/gdb/gnulib/import/msvc-nothrow.c b/gdb/gnulib/import/msvc-nothrow.c index 785733e4395..ba75bbfb27f 100644 --- a/gdb/gnulib/import/msvc-nothrow.c +++ b/gdb/gnulib/import/msvc-nothrow.c @@ -1,6 +1,6 @@ /* Wrappers that don't throw invalid parameter notifications with MSVC runtime libraries. - Copyright (C) 2011-2018 Free Software Foundation, Inc. + Copyright (C) 2011-2016 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 @@ -13,7 +13,7 @@ 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 . */ + with this program; if not, see . */ #include @@ -24,9 +24,7 @@ #define WIN32_LEAN_AND_MEAN #include -#if HAVE_MSVC_INVALID_PARAMETER_HANDLER -# include "msvc-inval.h" -#endif +#include "msvc-inval.h" #undef _get_osfhandle diff --git a/gdb/gnulib/import/msvc-nothrow.h b/gdb/gnulib/import/msvc-nothrow.h index a9671c3b641..3493b84a86a 100644 --- a/gdb/gnulib/import/msvc-nothrow.h +++ b/gdb/gnulib/import/msvc-nothrow.h @@ -1,6 +1,6 @@ /* Wrappers that don't throw invalid parameter notifications with MSVC runtime libraries. - Copyright (C) 2011-2018 Free Software Foundation, Inc. + Copyright (C) 2011-2016 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 @@ -13,7 +13,7 @@ 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 . */ + with this program; if not, see . */ #ifndef _MSVC_NOTHROW_H #define _MSVC_NOTHROW_H @@ -25,7 +25,7 @@ This file defines wrappers that turn such an invalid parameter notification into an error code. */ -#if defined _WIN32 && ! defined __CYGWIN__ +#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* Get original declaration of _get_osfhandle. */ # include diff --git a/gdb/gnulib/import/open.c b/gdb/gnulib/import/open.c index 792e258ba0b..e9c312069e1 100644 --- a/gdb/gnulib/import/open.c +++ b/gdb/gnulib/import/open.c @@ -1,5 +1,5 @@ /* Open a descriptor to a file. - Copyright (C) 2007-2018 Free Software Foundation, Inc. + Copyright (C) 2007-2016 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible , 2007. */ @@ -38,8 +38,6 @@ orig_open (const char *filename, int flags, mode_t mode) this include because of the preliminary #include above. */ #include "fcntl.h" -#include "cloexec.h" - #include #include #include @@ -54,13 +52,6 @@ orig_open (const char *filename, int flags, mode_t mode) int open (const char *filename, int flags, ...) { - /* 0 = unknown, 1 = yes, -1 = no. */ -#if GNULIB_defined_O_CLOEXEC - int have_cloexec = -1; -#else - static int have_cloexec; -#endif - mode_t mode; int fd; @@ -86,7 +77,7 @@ open (const char *filename, int flags, ...) flags &= ~O_NONBLOCK; #endif -#if defined _WIN32 && ! defined __CYGWIN__ +#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ if (strcmp (filename, "/dev/null") == 0) filename = "NUL"; #endif @@ -124,25 +115,7 @@ open (const char *filename, int flags, ...) } #endif - fd = orig_open (filename, - flags & ~(have_cloexec <= 0 ? O_CLOEXEC : 0), mode); - - if (flags & O_CLOEXEC) - { - if (! have_cloexec) - { - if (0 <= fd) - have_cloexec = 1; - else if (errno == EINVAL) - { - fd = orig_open (filename, flags & ~O_CLOEXEC, mode); - have_cloexec = -1; - } - } - if (have_cloexec < 0 && 0 <= fd) - set_cloexec_flag (fd, true); - } - + fd = orig_open (filename, flags, mode); #if REPLACE_FCHDIR /* Implementing fchdir and fdopendir requires the ability to open a diff --git a/gdb/gnulib/import/openat-die.c b/gdb/gnulib/import/openat-die.c index 26df87afb20..7ab38604ea8 100644 --- a/gdb/gnulib/import/openat-die.c +++ b/gdb/gnulib/import/openat-die.c @@ -1,6 +1,6 @@ /* Report a save- or restore-cwd failure in our openat replacement and then exit. - Copyright (C) 2005-2006, 2008-2018 Free Software Foundation, Inc. + Copyright (C) 2005-2006, 2008-2016 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ #include diff --git a/gdb/gnulib/import/openat-priv.h b/gdb/gnulib/import/openat-priv.h index 5d53df12018..ed763db5c0d 100644 --- a/gdb/gnulib/import/openat-priv.h +++ b/gdb/gnulib/import/openat-priv.h @@ -1,6 +1,6 @@ /* Internals for openat-like functions. - Copyright (C) 2005-2006, 2009-2018 Free Software Foundation, Inc. + Copyright (C) 2005-2006, 2009-2016 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ /* written by Jim Meyering */ diff --git a/gdb/gnulib/import/openat-proc.c b/gdb/gnulib/import/openat-proc.c index 87137eec538..1712340a002 100644 --- a/gdb/gnulib/import/openat-proc.c +++ b/gdb/gnulib/import/openat-proc.c @@ -1,6 +1,6 @@ /* Create /proc/self/fd-related names for subfiles of open directories. - Copyright (C) 2006, 2009-2018 Free Software Foundation, Inc. + Copyright (C) 2006, 2009-2016 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Paul Eggert. */ diff --git a/gdb/gnulib/import/openat.c b/gdb/gnulib/import/openat.c index 341c5113818..acbf7e323ea 100644 --- a/gdb/gnulib/import/openat.c +++ b/gdb/gnulib/import/openat.c @@ -1,5 +1,5 @@ /* provide a replacement openat function - Copyright (C) 2004-2018 Free Software Foundation, Inc. + Copyright (C) 2004-2016 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* written by Jim Meyering */ @@ -41,8 +41,6 @@ orig_openat (int fd, char const *filename, int flags, mode_t mode) #include "openat.h" -#include "cloexec.h" - #include #include #include @@ -52,18 +50,10 @@ orig_openat (int fd, char const *filename, int flags, mode_t mode) #if HAVE_OPENAT -/* Like openat, but support O_CLOEXEC and work around Solaris 9 bugs - with trailing slash. */ +/* Like openat, but work around Solaris 9 bugs with trailing slash. */ int rpl_openat (int dfd, char const *filename, int flags, ...) { - /* 0 = unknown, 1 = yes, -1 = no. */ -#if GNULIB_defined_O_CLOEXEC - int have_cloexec = -1; -#else - static int have_cloexec; -#endif - mode_t mode; int fd; @@ -113,25 +103,7 @@ rpl_openat (int dfd, char const *filename, int flags, ...) } # endif - fd = orig_openat (dfd, filename, - flags & ~(have_cloexec <= 0 ? O_CLOEXEC : 0), mode); - - if (flags & O_CLOEXEC) - { - if (! have_cloexec) - { - if (0 <= fd) - have_cloexec = 1; - else if (errno == EINVAL) - { - fd = orig_openat (dfd, filename, flags & ~O_CLOEXEC, mode); - have_cloexec = -1; - } - } - if (have_cloexec < 0 && 0 <= fd) - set_cloexec_flag (fd, true); - } - + fd = orig_openat (dfd, filename, flags, mode); # if OPEN_TRAILING_SLASH_BUG /* If the filename ends in a slash and fd does not refer to a directory, @@ -174,7 +146,7 @@ rpl_openat (int dfd, char const *filename, int flags, ...) # include "save-cwd.h" /* Replacement for Solaris' openat function. - + First, try to simulate it via open ("/proc/self/fd/FD/FILE"). Failing that, simulate it by doing save_cwd/fchdir/open/restore_cwd. If either the save_cwd or the restore_cwd fails (relatively unlikely), diff --git a/gdb/gnulib/import/openat.h b/gdb/gnulib/import/openat.h index 945e032836b..edee6c56554 100644 --- a/gdb/gnulib/import/openat.h +++ b/gdb/gnulib/import/openat.h @@ -1,5 +1,5 @@ /* provide a replacement openat function - Copyright (C) 2004-2006, 2008-2018 Free Software Foundation, Inc. + Copyright (C) 2004-2006, 2008-2016 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* written by Jim Meyering */ diff --git a/gdb/gnulib/import/opendir.c b/gdb/gnulib/import/opendir.c index b77f54040ef..a135fd834a8 100644 --- a/gdb/gnulib/import/opendir.c +++ b/gdb/gnulib/import/opendir.c @@ -1,5 +1,5 @@ /* Start reading the entries of a directory. - Copyright (C) 2006-2018 Free Software Foundation, Inc. + Copyright (C) 2006-2016 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #include diff --git a/gdb/gnulib/import/pathmax.h b/gdb/gnulib/import/pathmax.h index 7052e6a84e9..aee22f86400 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-2018 Free Software + Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2016 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify @@ -13,7 +13,7 @@ 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 . */ + along with this program; if not, see . */ #ifndef _PATHMAX_H # define _PATHMAX_H @@ -65,10 +65,10 @@ # define PATH_MAX 1024 # endif -# if defined _WIN32 && ! defined __CYGWIN__ +# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* The page "Naming Files, Paths, and Namespaces" on msdn.microsoft.com, section "Maximum Path Length Limitation", - + explains that the maximum size of a filename, including the terminating NUL byte, is 260 = 3 + 256 + 1. This is the same value as diff --git a/gdb/gnulib/import/pipe-safer.c b/gdb/gnulib/import/pipe-safer.c index 1669d90934c..fc6144e5ea1 100644 --- a/gdb/gnulib/import/pipe-safer.c +++ b/gdb/gnulib/import/pipe-safer.c @@ -1,5 +1,5 @@ /* Invoke pipe, but avoid some glitches. - Copyright (C) 2005-2006, 2009-2018 Free Software Foundation, Inc. + Copyright (C) 2005-2006, 2009-2016 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Jim Meyering. */ diff --git a/gdb/gnulib/import/rawmemchr.c b/gdb/gnulib/import/rawmemchr.c index 912bfeb34a8..dbe01bd550b 100644 --- a/gdb/gnulib/import/rawmemchr.c +++ b/gdb/gnulib/import/rawmemchr.c @@ -1,5 +1,5 @@ /* Searching in a string. - Copyright (C) 2008-2018 Free Software Foundation, Inc. + Copyright (C) 2008-2016 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #include diff --git a/gdb/gnulib/import/readdir.c b/gdb/gnulib/import/readdir.c index c1c564d26c8..76b7e9d819b 100644 --- a/gdb/gnulib/import/readdir.c +++ b/gdb/gnulib/import/readdir.c @@ -1,5 +1,5 @@ /* Read the next entry of a directory. - Copyright (C) 2011-2018 Free Software Foundation, Inc. + Copyright (C) 2011-2016 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #include diff --git a/gdb/gnulib/import/readlink.c b/gdb/gnulib/import/readlink.c index 924e00d234a..e6c3925e4d4 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-2018 Free Software Foundation, Inc. + Copyright (C) 2003-2007, 2009-2016 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #include diff --git a/gdb/gnulib/import/realloc.c b/gdb/gnulib/import/realloc.c index 7620b6a9240..83cb44ee3e3 100644 --- a/gdb/gnulib/import/realloc.c +++ b/gdb/gnulib/import/realloc.c @@ -1,6 +1,6 @@ /* realloc() function that is glibc compatible. - Copyright (C) 1997, 2003-2004, 2006-2007, 2009-2018 Free Software + Copyright (C) 1997, 2003-2004, 2006-2007, 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -14,7 +14,7 @@ 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 . */ + along with this program. If not, see . */ /* written by Jim Meyering and Bruno Haible */ diff --git a/gdb/gnulib/import/ref-add.sin b/gdb/gnulib/import/ref-add.sin new file mode 100644 index 00000000000..42d3ab0d83b --- /dev/null +++ b/gdb/gnulib/import/ref-add.sin @@ -0,0 +1,29 @@ +# Add this package to a list of references stored in a text file. +# +# Copyright (C) 2000, 2009-2016 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 Bruno Haible . +# +/^# Packages using this file: / { + s/# Packages using this file:// + ta + :a + s/ @PACKAGE@ / @PACKAGE@ / + tb + s/ $/ @PACKAGE@ / + :b + s/^/# Packages using this file:/ +} diff --git a/gdb/gnulib/import/ref-del.sin b/gdb/gnulib/import/ref-del.sin new file mode 100644 index 00000000000..c77b33ba7e4 --- /dev/null +++ b/gdb/gnulib/import/ref-del.sin @@ -0,0 +1,24 @@ +# Remove this package from a list of references stored in a text file. +# +# Copyright (C) 2000, 2009-2016 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 Bruno Haible . +# +/^# Packages using this file: / { + s/# Packages using this file:// + s/ @PACKAGE@ / / + s/^/# Packages using this file:/ +} diff --git a/gdb/gnulib/import/rename.c b/gdb/gnulib/import/rename.c index 0b457aa3135..e1d169ad22e 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-2018 Free Software Foundation, Inc. + Copyright (C) 2001-2003, 2005-2006, 2009-2016 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Volker Borchert, Eric Blake. */ @@ -23,7 +23,7 @@ #undef rename -#if defined _WIN32 && ! defined __CYGWIN__ +#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* The mingw rename has problems with trailing slashes; it also requires use of native Windows calls to allow atomic renames over existing files. */ diff --git a/gdb/gnulib/import/rewinddir.c b/gdb/gnulib/import/rewinddir.c index 881aa5e1894..2a70e7fe29c 100644 --- a/gdb/gnulib/import/rewinddir.c +++ b/gdb/gnulib/import/rewinddir.c @@ -1,5 +1,5 @@ /* Restart reading the entries of a directory from the beginning. - Copyright (C) 2011-2018 Free Software Foundation, Inc. + Copyright (C) 2011-2016 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #include diff --git a/gdb/gnulib/import/rmdir.c b/gdb/gnulib/import/rmdir.c index 7dc7aec93fa..4949df28188 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-2018 Free Software + Copyright (C) 1988, 1990, 1999, 2003-2006, 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -14,7 +14,7 @@ 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 . */ + along with this program. If not, see . */ #include diff --git a/gdb/gnulib/import/same-inode.h b/gdb/gnulib/import/same-inode.h index 68377954e0b..bf45635d11b 100644 --- a/gdb/gnulib/import/same-inode.h +++ b/gdb/gnulib/import/same-inode.h @@ -1,6 +1,6 @@ -/* Determine whether two stat buffers are known to refer to the same file. +/* Determine whether two stat buffers refer to the same file. - Copyright (C) 2006, 2009-2018 Free Software Foundation, Inc. + Copyright (C) 2006, 2009-2016 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 @@ -13,31 +13,17 @@ 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 . */ + along with this program. If not, see . */ #ifndef SAME_INODE_H # define SAME_INODE_H 1 -# include - -# if defined __VMS && __CRTL_VER < 80200000 +# ifdef __VMS # define SAME_INODE(a, b) \ ((a).st_ino[0] == (b).st_ino[0] \ && (a).st_ino[1] == (b).st_ino[1] \ && (a).st_ino[2] == (b).st_ino[2] \ && (a).st_dev == (b).st_dev) -# elif defined _WIN32 && ! defined __CYGWIN__ - /* Native Windows. */ -# if _GL_WINDOWS_STAT_INODES - /* stat() and fstat() set st_dev and st_ino to 0 if information about - the inode is not available. */ -# define SAME_INODE(a, b) \ - (!((a).st_ino == 0 && (a).st_dev == 0) \ - && (a).st_ino == (b).st_ino && (a).st_dev == (b).st_dev) -# else - /* stat() and fstat() set st_ino to 0 always. */ -# define SAME_INODE(a, b) 0 -# endif # else # define SAME_INODE(a, b) \ ((a).st_ino == (b).st_ino \ diff --git a/gdb/gnulib/import/save-cwd.c b/gdb/gnulib/import/save-cwd.c index 1de4fb36293..27cb7507fe1 100644 --- a/gdb/gnulib/import/save-cwd.c +++ b/gdb/gnulib/import/save-cwd.c @@ -1,6 +1,6 @@ /* save-cwd.c -- Save and restore current working directory. - Copyright (C) 1995, 1997-1998, 2003-2006, 2009-2018 Free Software + Copyright (C) 1995, 1997-1998, 2003-2006, 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -14,7 +14,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Jim Meyering. */ @@ -30,6 +30,7 @@ #include "chdir-long.h" #include "unistd--.h" +#include "cloexec.h" #if GNULIB_FCNTL_SAFER # include "fcntl--.h" @@ -63,15 +64,16 @@ save_cwd (struct saved_cwd *cwd) { cwd->name = NULL; - cwd->desc = open (".", O_SEARCH | O_CLOEXEC); + cwd->desc = open (".", O_SEARCH); if (!GNULIB_FCNTL_SAFER) - cwd->desc = fd_safer_flag (cwd->desc, O_CLOEXEC); + cwd->desc = fd_safer (cwd->desc); if (cwd->desc < 0) { cwd->name = getcwd (NULL, 0); return cwd->name ? 0 : -1; } + set_cloexec_flag (cwd->desc, true); return 0; } diff --git a/gdb/gnulib/import/save-cwd.h b/gdb/gnulib/import/save-cwd.h index a521f7f5b21..dbb598d603a 100644 --- a/gdb/gnulib/import/save-cwd.h +++ b/gdb/gnulib/import/save-cwd.h @@ -1,6 +1,6 @@ /* Save and restore current working directory. - Copyright (C) 1995, 1997-1998, 2003, 2009-2018 Free Software Foundation, + Copyright (C) 1995, 1997-1998, 2003, 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -14,7 +14,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Jim Meyering. */ diff --git a/gdb/gnulib/import/scratch_buffer.h b/gdb/gnulib/import/scratch_buffer.h deleted file mode 100644 index 4c0db3e53b3..00000000000 --- a/gdb/gnulib/import/scratch_buffer.h +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef _GL_SCRATCH_BUFFER_H -#define _GL_SCRATCH_BUFFER_H - -#include - -#define __libc_scratch_buffer_grow gl_scratch_buffer_grow -#define __libc_scratch_buffer_grow_preserve gl_scratch_buffer_grow_preserve -#define __libc_scratch_buffer_set_array_size gl_scratch_buffer_set_array_size -#include - -#endif /* _GL_SCRATCH_BUFFER_H */ diff --git a/gdb/gnulib/import/secure_getenv.c b/gdb/gnulib/import/secure_getenv.c new file mode 100644 index 00000000000..88a60dc33c3 --- /dev/null +++ b/gdb/gnulib/import/secure_getenv.c @@ -0,0 +1,54 @@ +/* Look up an environment variable, returning NULL in insecure situations. + + Copyright 2013-2016 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published + by the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#include + +#include + +#if !HAVE___SECURE_GETENV +# if HAVE_ISSETUGID || (HAVE_GETUID && HAVE_GETEUID && HAVE_GETGID && HAVE_GETEGID) +# include +# endif +#endif + +char * +secure_getenv (char const *name) +{ +#if HAVE___SECURE_GETENV /* glibc */ + return __secure_getenv (name); +#elif HAVE_ISSETUGID /* OS X, FreeBSD, NetBSD, OpenBSD */ + if (issetugid ()) + return NULL; + return getenv (name); +#elif HAVE_GETUID && HAVE_GETEUID && HAVE_GETGID && HAVE_GETEGID /* other Unix */ + if (geteuid () != getuid () || getegid () != getgid ()) + return NULL; + return getenv (name); +#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ /* native Windows */ + /* On native Windows, there is no such concept as setuid or setgid binaries. + - Programs launched as system services have high privileges, but they don't + inherit environment variables from a user. + - Programs launched by a user with "Run as Administrator" have high + privileges and use the environment variables, but the user has been asked + whether he agrees. + - Programs launched by a user without "Run as Administrator" cannot gain + high privileges, therefore there is no risk. */ + return getenv (name); +#else + return NULL; +#endif +} diff --git a/gdb/gnulib/import/setenv.c b/gdb/gnulib/import/setenv.c index 439e1ffc4b1..85c32cb224b 100644 --- a/gdb/gnulib/import/setenv.c +++ b/gdb/gnulib/import/setenv.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1995-2003, 2005-2018 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1995-2003, 2005-2016 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #if !_LIBC /* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc diff --git a/gdb/gnulib/import/signal.in.h b/gdb/gnulib/import/signal.in.h index 7d4927b828e..ab0a049f8bc 100644 --- a/gdb/gnulib/import/signal.in.h +++ b/gdb/gnulib/import/signal.in.h @@ -1,6 +1,6 @@ /* A GNU-like . - Copyright (C) 2006-2018 Free Software Foundation, Inc. + Copyright (C) 2006-2016 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ @@ -137,7 +137,7 @@ _GL_FUNCDECL_RPL (pthread_sigmask, int, _GL_CXXALIAS_RPL (pthread_sigmask, int, (int how, const sigset_t *new_mask, sigset_t *old_mask)); # else -# if !(@HAVE_PTHREAD_SIGMASK@ || defined pthread_sigmask) +# if !@HAVE_PTHREAD_SIGMASK@ _GL_FUNCDECL_SYS (pthread_sigmask, int, (int how, const sigset_t *new_mask, sigset_t *old_mask)); # endif @@ -200,7 +200,7 @@ typedef int verify_NSIG_constraint[NSIG <= 32 ? 1 : -1]; /* 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 __i386__ || defined __x86_64__)) diff --git a/gdb/gnulib/import/stat-time.c b/gdb/gnulib/import/stat-time.c deleted file mode 100644 index 81b83ddb4fe..00000000000 --- a/gdb/gnulib/import/stat-time.c +++ /dev/null @@ -1,3 +0,0 @@ -#include -#define _GL_STAT_TIME_INLINE _GL_EXTERN_INLINE -#include "stat-time.h" diff --git a/gdb/gnulib/import/stat-time.h b/gdb/gnulib/import/stat-time.h deleted file mode 100644 index 8e787bd3b2d..00000000000 --- a/gdb/gnulib/import/stat-time.h +++ /dev/null @@ -1,252 +0,0 @@ -/* stat-related time functions. - - Copyright (C) 2005, 2007, 2009-2018 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Paul Eggert. */ - -#ifndef STAT_TIME_H -#define STAT_TIME_H 1 - -#include "intprops.h" - -#include -#include -#include -#include - -#ifndef _GL_INLINE_HEADER_BEGIN - #error "Please include config.h first." -#endif -_GL_INLINE_HEADER_BEGIN -#ifndef _GL_STAT_TIME_INLINE -# define _GL_STAT_TIME_INLINE _GL_INLINE -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -/* STAT_TIMESPEC (ST, ST_XTIM) is the ST_XTIM member for *ST of type - struct timespec, if available. If not, then STAT_TIMESPEC_NS (ST, - ST_XTIM) is the nanosecond component of the ST_XTIM member for *ST, - if available. ST_XTIM can be st_atim, st_ctim, st_mtim, or st_birthtim - for access, status change, data modification, or birth (creation) - time respectively. - - These macros are private to stat-time.h. */ -#if _GL_WINDOWS_STAT_TIMESPEC || defined HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC -# if _GL_WINDOWS_STAT_TIMESPEC || defined TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC -# define STAT_TIMESPEC(st, st_xtim) ((st)->st_xtim) -# else -# define STAT_TIMESPEC_NS(st, st_xtim) ((st)->st_xtim.tv_nsec) -# endif -#elif defined HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC -# define STAT_TIMESPEC(st, st_xtim) ((st)->st_xtim##espec) -#elif defined HAVE_STRUCT_STAT_ST_ATIMENSEC -# define STAT_TIMESPEC_NS(st, st_xtim) ((st)->st_xtim##ensec) -#elif defined HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC -# define STAT_TIMESPEC_NS(st, st_xtim) ((st)->st_xtim.st__tim.tv_nsec) -#endif - -/* Return the nanosecond component of *ST's access time. */ -_GL_STAT_TIME_INLINE long int _GL_ATTRIBUTE_PURE -get_stat_atime_ns (struct stat const *st) -{ -# if defined STAT_TIMESPEC - return STAT_TIMESPEC (st, st_atim).tv_nsec; -# elif defined STAT_TIMESPEC_NS - return STAT_TIMESPEC_NS (st, st_atim); -# else - return 0; -# endif -} - -/* Return the nanosecond component of *ST's status change time. */ -_GL_STAT_TIME_INLINE long int _GL_ATTRIBUTE_PURE -get_stat_ctime_ns (struct stat const *st) -{ -# if defined STAT_TIMESPEC - return STAT_TIMESPEC (st, st_ctim).tv_nsec; -# elif defined STAT_TIMESPEC_NS - return STAT_TIMESPEC_NS (st, st_ctim); -# else - return 0; -# endif -} - -/* Return the nanosecond component of *ST's data modification time. */ -_GL_STAT_TIME_INLINE long int _GL_ATTRIBUTE_PURE -get_stat_mtime_ns (struct stat const *st) -{ -# if defined STAT_TIMESPEC - return STAT_TIMESPEC (st, st_mtim).tv_nsec; -# elif defined STAT_TIMESPEC_NS - return STAT_TIMESPEC_NS (st, st_mtim); -# else - return 0; -# endif -} - -/* Return the nanosecond component of *ST's birth time. */ -_GL_STAT_TIME_INLINE long int _GL_ATTRIBUTE_PURE -get_stat_birthtime_ns (struct stat const *st _GL_UNUSED) -{ -# if defined HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC - return STAT_TIMESPEC (st, st_birthtim).tv_nsec; -# elif defined HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC - return STAT_TIMESPEC_NS (st, st_birthtim); -# else - return 0; -# endif -} - -/* Return *ST's access time. */ -_GL_STAT_TIME_INLINE struct timespec _GL_ATTRIBUTE_PURE -get_stat_atime (struct stat const *st) -{ -#ifdef STAT_TIMESPEC - return STAT_TIMESPEC (st, st_atim); -#else - struct timespec t; - t.tv_sec = st->st_atime; - t.tv_nsec = get_stat_atime_ns (st); - return t; -#endif -} - -/* Return *ST's status change time. */ -_GL_STAT_TIME_INLINE struct timespec _GL_ATTRIBUTE_PURE -get_stat_ctime (struct stat const *st) -{ -#ifdef STAT_TIMESPEC - return STAT_TIMESPEC (st, st_ctim); -#else - struct timespec t; - t.tv_sec = st->st_ctime; - t.tv_nsec = get_stat_ctime_ns (st); - return t; -#endif -} - -/* Return *ST's data modification time. */ -_GL_STAT_TIME_INLINE struct timespec _GL_ATTRIBUTE_PURE -get_stat_mtime (struct stat const *st) -{ -#ifdef STAT_TIMESPEC - return STAT_TIMESPEC (st, st_mtim); -#else - struct timespec t; - t.tv_sec = st->st_mtime; - t.tv_nsec = get_stat_mtime_ns (st); - return t; -#endif -} - -/* Return *ST's birth time, if available; otherwise return a value - with tv_sec and tv_nsec both equal to -1. */ -_GL_STAT_TIME_INLINE struct timespec _GL_ATTRIBUTE_PURE -get_stat_birthtime (struct stat const *st _GL_UNUSED) -{ - struct timespec t; - -#if (defined HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC \ - || defined HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC) - t = STAT_TIMESPEC (st, st_birthtim); -#elif defined HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC - t.tv_sec = st->st_birthtime; - t.tv_nsec = st->st_birthtimensec; -#elif defined _WIN32 && ! defined __CYGWIN__ - /* Native Windows platforms (but not Cygwin) put the "file creation - time" in st_ctime (!). See - . */ -# if _GL_WINDOWS_STAT_TIMESPEC - t = st->st_ctim; -# else - t.tv_sec = st->st_ctime; - t.tv_nsec = 0; -# endif -#else - /* Birth time is not supported. */ - t.tv_sec = -1; - t.tv_nsec = -1; -#endif - -#if (defined HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC \ - || defined HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC \ - || defined HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC) - /* FreeBSD and NetBSD sometimes signal the absence of knowledge by - using zero. Attempt to work around this problem. Alas, this can - report failure even for valid timestamps. Also, NetBSD - sometimes returns junk in the birth time fields; work around this - bug if it is detected. */ - if (! (t.tv_sec && 0 <= t.tv_nsec && t.tv_nsec < 1000000000)) - { - t.tv_sec = -1; - t.tv_nsec = -1; - } -#endif - - return t; -} - -/* If a stat-like function returned RESULT, normalize the timestamps - in *ST, in case this platform suffers from the Solaris 11 bug where - tv_nsec might be negative. Return the adjusted RESULT, setting - errno to EOVERFLOW if normalization overflowed. This function - is intended to be private to this .h file. */ -_GL_STAT_TIME_INLINE int -stat_time_normalize (int result, struct stat *st _GL_UNUSED) -{ -#if defined __sun && defined STAT_TIMESPEC - if (result == 0) - { - long int timespec_resolution = 1000000000; - short int const ts_off[] = { offsetof (struct stat, st_atim), - offsetof (struct stat, st_mtim), - offsetof (struct stat, st_ctim) }; - int i; - for (i = 0; i < sizeof ts_off / sizeof *ts_off; i++) - { - struct timespec *ts = (struct timespec *) ((char *) st + ts_off[i]); - long int q = ts->tv_nsec / timespec_resolution; - long int r = ts->tv_nsec % timespec_resolution; - if (r < 0) - { - r += timespec_resolution; - q--; - } - ts->tv_nsec = r; - /* Overflow is possible, as Solaris 11 stat can yield - tv_sec == TYPE_MINIMUM (time_t) && tv_nsec == -1000000000. - INT_ADD_WRAPV is OK, since time_t is signed on Solaris. */ - if (INT_ADD_WRAPV (q, ts->tv_sec, &ts->tv_sec)) - { - errno = EOVERFLOW; - return -1; - } - } - } -#endif - return result; -} - -#ifdef __cplusplus -} -#endif - -_GL_INLINE_HEADER_END - -#endif diff --git a/gdb/gnulib/import/stat-w32.c b/gdb/gnulib/import/stat-w32.c deleted file mode 100644 index c7a53f9da8d..00000000000 --- a/gdb/gnulib/import/stat-w32.c +++ /dev/null @@ -1,425 +0,0 @@ -/* Core of implementation of fstat and stat for native Windows. - Copyright (C) 2017-2018 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Bruno Haible. */ - -#include - -#if defined _WIN32 && ! defined __CYGWIN__ - -/* Ensure that defines FILE_ID_INFO. */ -#undef _WIN32_WINNT -#define _WIN32_WINNT _WIN32_WINNT_WIN8 - -#include -#include -#include -#include -#include -#include -#include - -/* Specification. */ -#include "stat-w32.h" - -#include "pathmax.h" -#include "verify.h" - -/* Avoid warnings from gcc -Wcast-function-type. */ -#define GetProcAddress \ - (void *) GetProcAddress - -#if _GL_WINDOWS_STAT_INODES == 2 -/* GetFileInformationByHandleEx was introduced only in Windows Vista. */ -typedef DWORD (WINAPI * GetFileInformationByHandleExFuncType) (HANDLE hFile, - FILE_INFO_BY_HANDLE_CLASS fiClass, - LPVOID lpBuffer, - DWORD dwBufferSize); -static GetFileInformationByHandleExFuncType GetFileInformationByHandleExFunc = NULL; -#endif -/* GetFinalPathNameByHandle was introduced only in Windows Vista. */ -typedef DWORD (WINAPI * GetFinalPathNameByHandleFuncType) (HANDLE hFile, - LPTSTR lpFilePath, - DWORD lenFilePath, - DWORD dwFlags); -static GetFinalPathNameByHandleFuncType GetFinalPathNameByHandleFunc = NULL; -static BOOL initialized = FALSE; - -static void -initialize (void) -{ - HMODULE kernel32 = LoadLibrary ("kernel32.dll"); - if (kernel32 != NULL) - { -#if _GL_WINDOWS_STAT_INODES == 2 - GetFileInformationByHandleExFunc = - (GetFileInformationByHandleExFuncType) GetProcAddress (kernel32, "GetFileInformationByHandleEx"); -#endif - GetFinalPathNameByHandleFunc = - (GetFinalPathNameByHandleFuncType) GetProcAddress (kernel32, "GetFinalPathNameByHandleA"); - } - initialized = TRUE; -} - -/* Converts a FILETIME to GMT time since 1970-01-01 00:00:00. */ -#if _GL_WINDOWS_STAT_TIMESPEC -struct timespec -_gl_convert_FILETIME_to_timespec (const FILETIME *ft) -{ - struct timespec result; - /* FILETIME: */ - unsigned long long since_1601 = - ((unsigned long long) ft->dwHighDateTime << 32) - | (unsigned long long) ft->dwLowDateTime; - if (since_1601 == 0) - { - result.tv_sec = 0; - result.tv_nsec = 0; - } - else - { - /* Between 1601-01-01 and 1970-01-01 there were 280 normal years and 89 - leap years, in total 134774 days. */ - unsigned long long since_1970 = - since_1601 - (unsigned long long) 134774 * (unsigned long long) 86400 * (unsigned long long) 10000000; - result.tv_sec = since_1970 / (unsigned long long) 10000000; - result.tv_nsec = (unsigned long) (since_1970 % (unsigned long long) 10000000) * 100; - } - return result; -} -#else -time_t -_gl_convert_FILETIME_to_POSIX (const FILETIME *ft) -{ - /* FILETIME: */ - unsigned long long since_1601 = - ((unsigned long long) ft->dwHighDateTime << 32) - | (unsigned long long) ft->dwLowDateTime; - if (since_1601 == 0) - return 0; - else - { - /* Between 1601-01-01 and 1970-01-01 there were 280 normal years and 89 - leap years, in total 134774 days. */ - unsigned long long since_1970 = - since_1601 - (unsigned long long) 134774 * (unsigned long long) 86400 * (unsigned long long) 10000000; - return since_1970 / (unsigned long long) 10000000; - } -} -#endif - -/* Fill *BUF with information about the file designated by H. - PATH is the file name, if known, otherwise NULL. - Return 0 if successful, or -1 with errno set upon failure. */ -int -_gl_fstat_by_handle (HANDLE h, const char *path, struct stat *buf) -{ - /* GetFileType - */ - DWORD type = GetFileType (h); - if (type == FILE_TYPE_DISK) - { - if (!initialized) - initialize (); - - /* st_mode can be determined through - GetFileAttributesEx - - - or through - GetFileInformationByHandle - - - or through - GetFileInformationByHandleEx with argument FileBasicInfo - - - The latter requires -D_WIN32_WINNT=_WIN32_WINNT_VISTA or higher. */ - BY_HANDLE_FILE_INFORMATION info; - if (! GetFileInformationByHandle (h, &info)) - goto failed; - - /* Test for error conditions before starting to fill *buf. */ - if (sizeof (buf->st_size) <= 4 && info.nFileSizeHigh > 0) - { - errno = EOVERFLOW; - return -1; - } - -#if _GL_WINDOWS_STAT_INODES - /* st_ino can be determined through - GetFileInformationByHandle - - - as 64 bits, or through - GetFileInformationByHandleEx with argument FileIdInfo - - - as 128 bits. - The latter requires -D_WIN32_WINNT=_WIN32_WINNT_WIN8 or higher. */ - /* Experiments show that GetFileInformationByHandleEx does not provide - much more information than GetFileInformationByHandle: - * The dwVolumeSerialNumber from GetFileInformationByHandle is equal - to the low 32 bits of the 64-bit VolumeSerialNumber from - GetFileInformationByHandleEx, and is apparently sufficient for - identifying the device. - * The nFileIndex from GetFileInformationByHandle is equal to the low - 64 bits of the 128-bit FileId from GetFileInformationByHandleEx, - and the high 64 bits of this 128-bit FileId are zero. - * On a FAT file system, GetFileInformationByHandleEx fails with error - ERROR_INVALID_PARAMETER, whereas GetFileInformationByHandle - succeeds. - * On a CIFS/SMB file system, GetFileInformationByHandleEx fails with - error ERROR_INVALID_LEVEL, whereas GetFileInformationByHandle - succeeds. */ -# if _GL_WINDOWS_STAT_INODES == 2 - if (GetFileInformationByHandleExFunc != NULL) - { - FILE_ID_INFO id; - if (GetFileInformationByHandleExFunc (h, FileIdInfo, &id, sizeof (id))) - { - buf->st_dev = id.VolumeSerialNumber; - verify (sizeof (ino_t) == sizeof (id.FileId)); - memcpy (&buf->st_ino, &id.FileId, sizeof (ino_t)); - goto ino_done; - } - else - { - switch (GetLastError ()) - { - case ERROR_INVALID_PARAMETER: /* older Windows version, or FAT */ - case ERROR_INVALID_LEVEL: /* CIFS/SMB file system */ - goto fallback; - default: - goto failed; - } - } - } - fallback: ; - /* Fallback for older Windows versions. */ - buf->st_dev = info.dwVolumeSerialNumber; - buf->st_ino._gl_ino[0] = ((ULONGLONG) info.nFileIndexHigh << 32) | (ULONGLONG) info.nFileIndexLow; - buf->st_ino._gl_ino[1] = 0; - ino_done: ; -# else /* _GL_WINDOWS_STAT_INODES == 1 */ - buf->st_dev = info.dwVolumeSerialNumber; - buf->st_ino = ((ULONGLONG) info.nFileIndexHigh << 32) | (ULONGLONG) info.nFileIndexLow; -# endif -#else - /* st_ino is not wide enough for identifying a file on a device. - Without st_ino, st_dev is pointless. */ - buf->st_dev = 0; - buf->st_ino = 0; -#endif - - /* st_mode. */ - unsigned int mode = - /* XXX How to handle FILE_ATTRIBUTE_REPARSE_POINT ? */ - ((info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ? _S_IFDIR | S_IEXEC_UGO : _S_IFREG) - | S_IREAD_UGO - | ((info.dwFileAttributes & FILE_ATTRIBUTE_READONLY) ? 0 : S_IWRITE_UGO); - if (!(info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) - { - /* Determine whether the file is executable by looking at the file - name suffix. - If the file name is already known, use it. Otherwise, for - non-empty files, it can be determined through - GetFinalPathNameByHandle - - or through - GetFileInformationByHandleEx with argument FileNameInfo - - - Both require -D_WIN32_WINNT=_WIN32_WINNT_VISTA or higher. */ - if (info.nFileSizeHigh > 0 || info.nFileSizeLow > 0) - { - char fpath[PATH_MAX]; - if (path != NULL - || (GetFinalPathNameByHandleFunc != NULL - && GetFinalPathNameByHandleFunc (h, fpath, sizeof (fpath), VOLUME_NAME_NONE) - < sizeof (fpath) - && (path = fpath, 1))) - { - const char *last_dot = NULL; - const char *p; - for (p = path; *p != '\0'; p++) - if (*p == '.') - last_dot = p; - if (last_dot != NULL) - { - const char *suffix = last_dot + 1; - if (_stricmp (suffix, "exe") == 0 - || _stricmp (suffix, "bat") == 0 - || _stricmp (suffix, "cmd") == 0 - || _stricmp (suffix, "com") == 0) - mode |= S_IEXEC_UGO; - } - } - else - /* Cannot determine file name. Pretend that it is executable. */ - mode |= S_IEXEC_UGO; - } - } - buf->st_mode = mode; - - /* st_nlink can be determined through - GetFileInformationByHandle - - - or through - GetFileInformationByHandleEx with argument FileStandardInfo - - - The latter requires -D_WIN32_WINNT=_WIN32_WINNT_VISTA or higher. */ - buf->st_nlink = (info.nNumberOfLinks > SHRT_MAX ? SHRT_MAX : info.nNumberOfLinks); - - /* There's no easy way to map the Windows SID concept to an integer. */ - buf->st_uid = 0; - buf->st_gid = 0; - - /* st_rdev is irrelevant for normal files and directories. */ - buf->st_rdev = 0; - - /* st_size can be determined through - GetFileSizeEx - - or through - GetFileAttributesEx - - - or through - GetFileInformationByHandle - - - or through - GetFileInformationByHandleEx with argument FileStandardInfo - - - The latter requires -D_WIN32_WINNT=_WIN32_WINNT_VISTA or higher. */ - if (sizeof (buf->st_size) <= 4) - /* Range check already done above. */ - buf->st_size = info.nFileSizeLow; - else - buf->st_size = ((long long) info.nFileSizeHigh << 32) | (long long) info.nFileSizeLow; - - /* st_atime, st_mtime, st_ctime can be determined through - GetFileTime - - or through - GetFileAttributesEx - - - or through - GetFileInformationByHandle - - - or through - GetFileInformationByHandleEx with argument FileBasicInfo - - - The latter requires -D_WIN32_WINNT=_WIN32_WINNT_VISTA or higher. */ -#if _GL_WINDOWS_STAT_TIMESPEC - buf->st_atim = _gl_convert_FILETIME_to_timespec (&info.ftLastAccessTime); - buf->st_mtim = _gl_convert_FILETIME_to_timespec (&info.ftLastWriteTime); - buf->st_ctim = _gl_convert_FILETIME_to_timespec (&info.ftCreationTime); -#else - buf->st_atime = _gl_convert_FILETIME_to_POSIX (&info.ftLastAccessTime); - buf->st_mtime = _gl_convert_FILETIME_to_POSIX (&info.ftLastWriteTime); - buf->st_ctime = _gl_convert_FILETIME_to_POSIX (&info.ftCreationTime); -#endif - - return 0; - } - else if (type == FILE_TYPE_CHAR || type == FILE_TYPE_PIPE) - { - buf->st_dev = 0; -#if _GL_WINDOWS_STAT_INODES == 2 - buf->st_ino._gl_ino[0] = buf->st_ino._gl_ino[1] = 0; -#else - buf->st_ino = 0; -#endif - buf->st_mode = (type == FILE_TYPE_PIPE ? _S_IFIFO : _S_IFCHR); - buf->st_nlink = 1; - buf->st_uid = 0; - buf->st_gid = 0; - buf->st_rdev = 0; - if (type == FILE_TYPE_PIPE) - { - /* PeekNamedPipe - */ - DWORD bytes_available; - if (PeekNamedPipe (h, NULL, 0, NULL, &bytes_available, NULL)) - buf->st_size = bytes_available; - else - buf->st_size = 0; - } - else - buf->st_size = 0; -#if _GL_WINDOWS_STAT_TIMESPEC - buf->st_atim.tv_sec = 0; buf->st_atim.tv_nsec = 0; - buf->st_mtim.tv_sec = 0; buf->st_mtim.tv_nsec = 0; - buf->st_ctim.tv_sec = 0; buf->st_ctim.tv_nsec = 0; -#else - buf->st_atime = 0; - buf->st_mtime = 0; - buf->st_ctime = 0; -#endif - return 0; - } - else - { - errno = ENOENT; - return -1; - } - - failed: - { - DWORD error = GetLastError (); - #if 0 - fprintf (stderr, "_gl_fstat_by_handle error 0x%x\n", (unsigned int) error); - #endif - switch (error) - { - case ERROR_ACCESS_DENIED: - case ERROR_SHARING_VIOLATION: - errno = EACCES; - break; - - case ERROR_OUTOFMEMORY: - errno = ENOMEM; - break; - - case ERROR_WRITE_FAULT: - case ERROR_READ_FAULT: - case ERROR_GEN_FAILURE: - errno = EIO; - break; - - default: - errno = EINVAL; - break; - } - return -1; - } -} - -#else - -/* This declaration is solely to ensure that after preprocessing - this file is never empty. */ -typedef int dummy; - -#endif diff --git a/gdb/gnulib/import/stat-w32.h b/gdb/gnulib/import/stat-w32.h deleted file mode 100644 index 9a3ecc14f0d..00000000000 --- a/gdb/gnulib/import/stat-w32.h +++ /dev/null @@ -1,37 +0,0 @@ -/* Core of implementation of fstat and stat for native Windows. - Copyright (C) 2017-2018 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef _STAT_W32_H -#define _STAT_W32_H 1 - -/* Converts a FILETIME to GMT time since 1970-01-01 00:00:00. */ -#if _GL_WINDOWS_STAT_TIMESPEC -extern struct timespec _gl_convert_FILETIME_to_timespec (const FILETIME *ft); -#else -extern time_t _gl_convert_FILETIME_to_POSIX (const FILETIME *ft); -#endif - -/* Fill *BUF with information about the file designated by H. - PATH is the file name, if known, otherwise NULL. - Return 0 if successful, or -1 with errno set upon failure. */ -extern int _gl_fstat_by_handle (HANDLE h, const char *path, struct stat *buf); - -/* Bitmasks for st_mode. */ -#define S_IREAD_UGO (_S_IREAD | (_S_IREAD >> 3) | (_S_IREAD >> 6)) -#define S_IWRITE_UGO (_S_IWRITE | (_S_IWRITE >> 3) | (_S_IWRITE >> 6)) -#define S_IEXEC_UGO (_S_IEXEC | (_S_IEXEC >> 3) | (_S_IEXEC >> 6)) - -#endif /* _STAT_W32_H */ diff --git a/gdb/gnulib/import/stat.c b/gdb/gnulib/import/stat.c index 18c0caa19d1..62e9e0bb064 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-2018 Free Software Foundation, Inc. + Copyright (C) 2009-2016 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 @@ -12,9 +12,9 @@ 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 . */ + along with this program. If not, see . */ -/* Written by Eric Blake and Bruno Haible. */ +/* written by Eric Blake */ /* If the user's config.h happens to include , let it include only the system's here, so that orig_stat doesn't recurse to @@ -27,68 +27,47 @@ #include #undef __need_system_sys_stat_h -#if defined _WIN32 && ! defined __CYGWIN__ -# define WINDOWS_NATIVE +#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ +# if _GL_WINDOWS_64_BIT_ST_SIZE +# undef stat /* avoid warning on mingw64 with _FILE_OFFSET_BITS=64 */ +# define stat _stati64 +# define REPLACE_FUNC_STAT_DIR 1 +# undef REPLACE_FUNC_STAT_FILE +# elif REPLACE_FUNC_STAT_FILE +/* mingw64 has a broken stat() function, based on _stat(), in libmingwex.a. + Bypass it. */ +# define stat _stat +# define REPLACE_FUNC_STAT_DIR 1 +# undef REPLACE_FUNC_STAT_FILE +# endif #endif -#if !defined WINDOWS_NATIVE - static int orig_stat (const char *filename, struct stat *buf) { return stat (filename, buf); } -#endif - /* Specification. */ /* Write "sys/stat.h" here, not , otherwise OSF/1 5.1 DTK cc eliminates this include because of the preliminary #include above. */ #include "sys/stat.h" -#include "stat-time.h" - #include #include #include #include -#include "filename.h" -#include "malloca.h" +#include "dosname.h" #include "verify.h" -#ifdef WINDOWS_NATIVE -# define WIN32_LEAN_AND_MEAN -# include -# include "stat-w32.h" -#endif - -#ifdef WINDOWS_NATIVE -/* Return TRUE if the given file name denotes an UNC root. */ -static BOOL -is_unc_root (const char *rname) -{ - /* Test whether it has the syntax '\\server\share'. */ - if (ISSLASH (rname[0]) && ISSLASH (rname[1])) - { - /* It starts with two slashes. Find the next slash. */ - const char *p = rname + 2; - const char *q = p; - while (*q != '\0' && !ISSLASH (*q)) - q++; - if (q > p && *q != '\0') - { - /* Found the next slash at q. */ - q++; - const char *r = q; - while (*r != '\0' && !ISSLASH (*r)) - r++; - if (r > q && *r == '\0') - return TRUE; - } - } - return FALSE; -} +#if REPLACE_FUNC_STAT_DIR +# include "pathmax.h" + /* The only known systems where REPLACE_FUNC_STAT_DIR is needed also + have a constant PATH_MAX. */ +# ifndef PATH_MAX +# error "Please port this replacement to your platform" +# endif #endif /* Store information about NAME into ST. Work around bugs with @@ -98,332 +77,62 @@ is_unc_root (const char *rname) correctly. */ int -rpl_stat (char const *name, struct stat *buf) +rpl_stat (char const *name, struct stat *st) { -#ifdef WINDOWS_NATIVE - /* Fill the fields ourselves, because the original stat function returns - values for st_atime, st_mtime, st_ctime that depend on the current time - zone. See - */ - /* XXX Should we convert to wchar_t* and prepend '\\?\', in order to work - around length limitations - ? */ - - /* POSIX - specifies: "More than two leading characters shall be treated as - a single character." */ - if (ISSLASH (name[0]) && ISSLASH (name[1]) && ISSLASH (name[2])) - { - name += 2; - while (ISSLASH (name[1])) - name++; - } - - size_t len = strlen (name); - size_t drive_prefix_len = (HAS_DEVICE (name) ? 2 : 0); - - /* Remove trailing slashes (except the very first one, at position - drive_prefix_len), but remember their presence. */ - size_t rlen; - bool check_dir = false; - - rlen = len; - while (rlen > drive_prefix_len && ISSLASH (name[rlen-1])) + int result = orig_stat (name, st); +#if REPLACE_FUNC_STAT_FILE + /* Solaris 9 mistakenly succeeds when given a non-directory with a + trailing slash. */ + if (result == 0 && !S_ISDIR (st->st_mode)) { - check_dir = true; - if (rlen == drive_prefix_len + 1) - break; - rlen--; - } - - /* Handle '' and 'C:'. */ - if (!check_dir && rlen == drive_prefix_len) - { - errno = ENOENT; - return -1; - } - - /* Handle '\\'. */ - if (rlen == 1 && ISSLASH (name[0]) && len >= 2) - { - errno = ENOENT; - return -1; - } - - const char *rname; - char *malloca_rname; - if (rlen == len) - { - rname = name; - malloca_rname = NULL; - } - else - { - malloca_rname = malloca (rlen + 1); - if (malloca_rname == NULL) + size_t len = strlen (name); + if (ISSLASH (name[len - 1])) { - errno = ENOMEM; + errno = ENOTDIR; return -1; } - memcpy (malloca_rname, name, rlen); - malloca_rname[rlen] = '\0'; - rname = malloca_rname; } +#endif /* REPLACE_FUNC_STAT_FILE */ +#if REPLACE_FUNC_STAT_DIR - /* There are two ways to get at the requested information: - - by scanning the parent directory and examining the relevant - directory entry, - - by opening the file directly. - The first approach fails for root directories (e.g. 'C:\') and - UNC root directories (e.g. '\\server\share'). - The second approach fails for some system files (e.g. 'C:\pagefile.sys' - and 'C:\hiberfil.sys'): ERROR_SHARING_VIOLATION. - The second approach gives more information (in particular, correct - st_dev, st_ino, st_nlink fields). - So we use the second approach and, as a fallback except for root and - UNC root directories, also the first approach. */ - { - int ret; - - { - /* Approach based on the file. */ - - /* Open a handle to the file. - CreateFile - - */ - HANDLE h = - CreateFile (rname, - FILE_READ_ATTRIBUTES, - FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, - NULL, - OPEN_EXISTING, - /* FILE_FLAG_POSIX_SEMANTICS (treat file names that differ only - in case as different) makes sense only when applied to *all* - filesystem operations. */ - FILE_FLAG_BACKUP_SEMANTICS /* | FILE_FLAG_POSIX_SEMANTICS */, - NULL); - if (h != INVALID_HANDLE_VALUE) - { - ret = _gl_fstat_by_handle (h, rname, buf); - CloseHandle (h); - goto done; - } - } - - /* Test for root and UNC root directories. */ - if ((rlen == drive_prefix_len + 1 && ISSLASH (rname[drive_prefix_len])) - || is_unc_root (rname)) - goto failed; - - /* Fallback. */ + if (result == -1 && errno == ENOENT) { - /* Approach based on the directory entry. */ - - if (strchr (rname, '?') != NULL || strchr (rname, '*') != NULL) - { - /* Other Windows API functions would fail with error - ERROR_INVALID_NAME. */ - if (malloca_rname != NULL) - freea (malloca_rname); - errno = ENOENT; - return -1; - } - - /* Get the details about the directory entry. This can be done through - FindFirstFile - - - or through - FindFirstFileEx with argument FindExInfoBasic - - - */ - WIN32_FIND_DATA info; - HANDLE h = FindFirstFile (rname, &info); - if (h == INVALID_HANDLE_VALUE) - goto failed; - - /* Test for error conditions before starting to fill *buf. */ - if (sizeof (buf->st_size) <= 4 && info.nFileSizeHigh > 0) - { - FindClose (h); - if (malloca_rname != NULL) - freea (malloca_rname); - errno = EOVERFLOW; - return -1; - } - -# if _GL_WINDOWS_STAT_INODES - buf->st_dev = 0; -# if _GL_WINDOWS_STAT_INODES == 2 - buf->st_ino._gl_ino[0] = buf->st_ino._gl_ino[1] = 0; -# else /* _GL_WINDOWS_STAT_INODES == 1 */ - buf->st_ino = 0; -# endif -# else - /* st_ino is not wide enough for identifying a file on a device. - Without st_ino, st_dev is pointless. */ - buf->st_dev = 0; - buf->st_ino = 0; -# endif - - /* st_mode. */ - unsigned int mode = - /* XXX How to handle FILE_ATTRIBUTE_REPARSE_POINT ? */ - ((info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ? _S_IFDIR | S_IEXEC_UGO : _S_IFREG) - | S_IREAD_UGO - | ((info.dwFileAttributes & FILE_ATTRIBUTE_READONLY) ? 0 : S_IWRITE_UGO); - if (!(info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) + /* Due to mingw's oddities, there are some directories (like + c:\) where stat() only succeeds with a trailing slash, and + other directories (like c:\windows) where stat() only + succeeds without a trailing slash. But we want the two to be + synonymous, since chdir() manages either style. Likewise, Mingw also + reports ENOENT for names longer than PATH_MAX, when we want + ENAMETOOLONG, and for stat("file/"), when we want ENOTDIR. + Fortunately, mingw PATH_MAX is small enough for stack + allocation. */ + char fixed_name[PATH_MAX + 1] = {0}; + size_t len = strlen (name); + bool check_dir = false; + verify (PATH_MAX <= 4096); + if (PATH_MAX <= len) + errno = ENAMETOOLONG; + else if (len) { - /* Determine whether the file is executable by looking at the file - name suffix. */ - if (info.nFileSizeHigh > 0 || info.nFileSizeLow > 0) + strcpy (fixed_name, name); + if (ISSLASH (fixed_name[len - 1])) { - const char *last_dot = NULL; - const char *p; - for (p = info.cFileName; *p != '\0'; p++) - if (*p == '.') - last_dot = p; - if (last_dot != NULL) - { - const char *suffix = last_dot + 1; - if (_stricmp (suffix, "exe") == 0 - || _stricmp (suffix, "bat") == 0 - || _stricmp (suffix, "cmd") == 0 - || _stricmp (suffix, "com") == 0) - mode |= S_IEXEC_UGO; - } + check_dir = true; + while (len && ISSLASH (fixed_name[len - 1])) + fixed_name[--len] = '\0'; + if (!len) + fixed_name[0] = '/'; } - } - buf->st_mode = mode; - - /* st_nlink. Ignore hard links here. */ - buf->st_nlink = 1; - - /* There's no easy way to map the Windows SID concept to an integer. */ - buf->st_uid = 0; - buf->st_gid = 0; - - /* st_rdev is irrelevant for normal files and directories. */ - buf->st_rdev = 0; - - /* st_size. */ - if (sizeof (buf->st_size) <= 4) - /* Range check already done above. */ - buf->st_size = info.nFileSizeLow; - else - buf->st_size = ((long long) info.nFileSizeHigh << 32) | (long long) info.nFileSizeLow; - - /* st_atime, st_mtime, st_ctime. */ -# if _GL_WINDOWS_STAT_TIMESPEC - buf->st_atim = _gl_convert_FILETIME_to_timespec (&info.ftLastAccessTime); - buf->st_mtim = _gl_convert_FILETIME_to_timespec (&info.ftLastWriteTime); - buf->st_ctim = _gl_convert_FILETIME_to_timespec (&info.ftCreationTime); -# else - buf->st_atime = _gl_convert_FILETIME_to_POSIX (&info.ftLastAccessTime); - buf->st_mtime = _gl_convert_FILETIME_to_POSIX (&info.ftLastWriteTime); - buf->st_ctime = _gl_convert_FILETIME_to_POSIX (&info.ftCreationTime); -# endif - - FindClose (h); - - ret = 0; - } - - done: - if (ret >= 0 && check_dir && !S_ISDIR (buf->st_mode)) - { - errno = ENOTDIR; - ret = -1; - } - if (malloca_rname != NULL) - { - int saved_errno = errno; - freea (malloca_rname); - errno = saved_errno; - } - return ret; - } - - failed: - { - DWORD error = GetLastError (); - #if 0 - fprintf (stderr, "rpl_stat error 0x%x\n", (unsigned int) error); - #endif - - if (malloca_rname != NULL) - freea (malloca_rname); - - switch (error) - { - /* Some of these errors probably cannot happen with the specific flags - that we pass to CreateFile. But who knows... */ - case ERROR_FILE_NOT_FOUND: /* The last component of rname does not exist. */ - case ERROR_PATH_NOT_FOUND: /* Some directory component in rname does not exist. */ - case ERROR_BAD_PATHNAME: /* rname is such as '\\server'. */ - case ERROR_BAD_NET_NAME: /* rname is such as '\\server\nonexistentshare'. */ - case ERROR_INVALID_NAME: /* rname contains wildcards, misplaced colon, etc. */ - case ERROR_DIRECTORY: - errno = ENOENT; - break; - - case ERROR_ACCESS_DENIED: /* rname is such as 'C:\System Volume Information\foo'. */ - case ERROR_SHARING_VIOLATION: /* rname is such as 'C:\pagefile.sys' (second approach only). */ - /* XXX map to EACCESS or EPERM? */ - errno = EACCES; - break; - - case ERROR_OUTOFMEMORY: - errno = ENOMEM; - break; - - case ERROR_WRITE_PROTECT: - errno = EROFS; - break; - - case ERROR_WRITE_FAULT: - case ERROR_READ_FAULT: - case ERROR_GEN_FAILURE: - errno = EIO; - break; - - case ERROR_BUFFER_OVERFLOW: - case ERROR_FILENAME_EXCED_RANGE: - errno = ENAMETOOLONG; - break; - - case ERROR_DELETE_PENDING: /* XXX map to EACCESS or EPERM? */ - errno = EPERM; - break; - - default: - errno = EINVAL; - break; - } - - return -1; - } -#else - int result = orig_stat (name, buf); - if (result == 0) - { -# if REPLACE_FUNC_STAT_FILE - /* Solaris 9 mistakenly succeeds when given a non-directory with a - trailing slash. */ - if (!S_ISDIR (buf->st_mode)) - { - size_t len = strlen (name); - if (ISSLASH (name[len - 1])) + else + fixed_name[len++] = '/'; + result = orig_stat (fixed_name, st); + if (result == 0 && check_dir && !S_ISDIR (st->st_mode)) { + result = -1; errno = ENOTDIR; - return -1; } } -# endif /* REPLACE_FUNC_STAT_FILE */ - result = stat_time_normalize (result, buf); } +#endif /* REPLACE_FUNC_STAT_DIR */ return result; -#endif } diff --git a/gdb/gnulib/import/stdbool.in.h b/gdb/gnulib/import/stdbool.in.h index ebf1a2f3b57..7ecf203e750 100644 --- a/gdb/gnulib/import/stdbool.in.h +++ b/gdb/gnulib/import/stdbool.in.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2003, 2006-2018 Free Software Foundation, Inc. +/* Copyright (C) 2001-2003, 2006-2016 Free Software Foundation, Inc. Written by Bruno Haible , 2001. This program is free software; you can redistribute it and/or modify @@ -12,7 +12,7 @@ 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 . */ + along with this program; if not, see . */ #ifndef _GL_STDBOOL_H #define _GL_STDBOOL_H @@ -82,9 +82,9 @@ typedef bool _Bool; /* If @HAVE__BOOL@: Some HP-UX cc and AIX IBM C compiler versions have compiler bugs when the built-in _Bool type is used. See - https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html - https://lists.gnu.org/r/bug-coreutils/2005-11/msg00161.html - https://lists.gnu.org/r/bug-coreutils/2005-10/msg00086.html + http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html + http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html + http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html Similar bugs are likely with other compilers as well; this file wouldn't be used if was working. So we override the _Bool type. diff --git a/gdb/gnulib/import/stddef.in.h b/gdb/gnulib/import/stddef.in.h index 8329a9bf8d3..f4c4a1070d5 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-2018 Free Software Foundation, Inc. + Copyright (C) 2009-2016 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program; if not, see . */ /* Written by Eric Blake. */ @@ -85,28 +85,24 @@ a hack in case the configure-time test was done with g++ even though we are currently compiling with gcc. */ #if ! (@HAVE_MAX_ALIGN_T@ || defined _GCC_MAX_ALIGN_T) -# if !GNULIB_defined_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 +# 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); -} rpl_max_align_t; -# define max_align_t rpl_max_align_t -# define GNULIB_defined_max_align_t 1 -# endif +} max_align_t; #endif # endif /* _@GUARD_PREFIX@_STDDEF_H */ diff --git a/gdb/gnulib/import/stdint.in.h b/gdb/gnulib/import/stdint.in.h index 94e7c81cef3..c86ab096289 100644 --- a/gdb/gnulib/import/stdint.in.h +++ b/gdb/gnulib/import/stdint.in.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2002, 2004-2018 Free Software Foundation, Inc. +/* Copyright (C) 2001-2002, 2004-2016 Free Software Foundation, Inc. Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood. This file is part of gnulib. @@ -13,7 +13,7 @@ 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 . */ + along with this program; if not, see . */ /* * ISO C 99 for platforms that lack it. @@ -83,15 +83,6 @@ LONG_MIN, LONG_MAX, ULONG_MAX, _GL_INTEGER_WIDTH. */ #include -/* Override WINT_MIN and WINT_MAX if gnulib's or overrides - wint_t. */ -#if @GNULIB_OVERRIDES_WINT_T@ -# undef WINT_MIN -# undef WINT_MAX -# define WINT_MIN 0x0U -# define WINT_MAX 0xffffffffU -#endif - #if ! @HAVE_C99_STDINT_H@ /* defines some of the stdint.h types as well, on glibc, @@ -128,13 +119,8 @@ Return an unspecified value if BITS == 0, adding a check to pacify picky compilers. */ -/* These are separate macros, because if you try to merge these macros into - a single one, HP-UX cc rejects the resulting expression in constant - expressions. */ -# define _STDINT_UNSIGNED_MIN(bits, zero) \ - (zero) -# define _STDINT_SIGNED_MIN(bits, zero) \ - (~ _STDINT_MAX (1, bits, zero)) +# define _STDINT_MIN(signed, bits, zero) \ + ((signed) ? ~ _STDINT_MAX (signed, bits, zero) : (zero)) # define _STDINT_MAX(signed, bits, zero) \ (((((zero) + 1) << ((bits) ? (bits) - 1 - (signed) : 0)) - 1) * 2 + 1) @@ -517,15 +503,15 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t) # undef PTRDIFF_MAX # if @APPLE_UNIVERSAL_BUILD@ # ifdef _LP64 -# define PTRDIFF_MIN _STDINT_SIGNED_MIN (64, 0l) +# define PTRDIFF_MIN _STDINT_MIN (1, 64, 0l) # define PTRDIFF_MAX _STDINT_MAX (1, 64, 0l) # else -# define PTRDIFF_MIN _STDINT_SIGNED_MIN (32, 0) +# define PTRDIFF_MIN _STDINT_MIN (1, 32, 0) # define PTRDIFF_MAX _STDINT_MAX (1, 32, 0) # endif # else # define PTRDIFF_MIN \ - _STDINT_SIGNED_MIN (@BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@) + _STDINT_MIN (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@) # define PTRDIFF_MAX \ _STDINT_MAX (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@) # endif @@ -533,13 +519,9 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t) /* sig_atomic_t limits */ # undef SIG_ATOMIC_MIN # undef SIG_ATOMIC_MAX -# if @HAVE_SIGNED_SIG_ATOMIC_T@ -# define SIG_ATOMIC_MIN \ - _STDINT_SIGNED_MIN (@BITSIZEOF_SIG_ATOMIC_T@, 0@SIG_ATOMIC_T_SUFFIX@) -# else -# define SIG_ATOMIC_MIN \ - _STDINT_UNSIGNED_MIN (@BITSIZEOF_SIG_ATOMIC_T@, 0@SIG_ATOMIC_T_SUFFIX@) -# endif +# define SIG_ATOMIC_MIN \ + _STDINT_MIN (@HAVE_SIGNED_SIG_ATOMIC_T@, @BITSIZEOF_SIG_ATOMIC_T@, \ + 0@SIG_ATOMIC_T_SUFFIX@) # define SIG_ATOMIC_MAX \ _STDINT_MAX (@HAVE_SIGNED_SIG_ATOMIC_T@, @BITSIZEOF_SIG_ATOMIC_T@, \ 0@SIG_ATOMIC_T_SUFFIX@) @@ -575,26 +557,16 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t) # endif # undef WCHAR_MIN # undef WCHAR_MAX -# if @HAVE_SIGNED_WCHAR_T@ -# define WCHAR_MIN \ - _STDINT_SIGNED_MIN (@BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@) -# else -# define WCHAR_MIN \ - _STDINT_UNSIGNED_MIN (@BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@) -# endif +# define WCHAR_MIN \ + _STDINT_MIN (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@) # define WCHAR_MAX \ _STDINT_MAX (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@) /* wint_t limits */ # undef WINT_MIN # undef WINT_MAX -# if @HAVE_SIGNED_WINT_T@ -# define WINT_MIN \ - _STDINT_SIGNED_MIN (@BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@) -# else -# define WINT_MIN \ - _STDINT_UNSIGNED_MIN (@BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@) -# endif +# define WINT_MIN \ + _STDINT_MIN (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@) # define WINT_MAX \ _STDINT_MAX (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@) diff --git a/gdb/gnulib/import/stdio.in.h b/gdb/gnulib/import/stdio.in.h index ff7c9c831ac..9b313656c57 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-2018 Free Software Foundation, Inc. + Copyright (C) 2004, 2007-2016 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program; if not, see . */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ @@ -111,33 +111,13 @@ #define _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM(formatstring_parameter, first_argument) \ _GL_ATTRIBUTE_FORMAT ((__scanf__, formatstring_parameter, first_argument)) -/* Solaris 10 and NetBSD 7.0 declare renameat in , not in . */ +/* Solaris 10 declares renameat in , not in . */ /* But in any case avoid namespace pollution on glibc systems. */ -#if (@GNULIB_RENAMEAT@ || defined GNULIB_POSIXCHECK) && (defined __sun || defined __NetBSD__) \ +#if (@GNULIB_RENAMEAT@ || defined GNULIB_POSIXCHECK) && defined __sun \ && ! defined __GLIBC__ # include #endif -/* MSVC declares 'perror' in , not in . We must include - it before we #define perror rpl_perror. */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (@GNULIB_PERROR@ || defined GNULIB_POSIXCHECK) \ - && (defined _WIN32 && ! defined __CYGWIN__) \ - && ! defined __GLIBC__ -# include -#endif - -/* MSVC declares 'remove' in , not in . We must include - it before we #define remove rpl_remove. */ -/* MSVC declares 'rename' in , not in . We must include - it before we #define rename rpl_rename. */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (@GNULIB_REMOVE@ || @GNULIB_RENAME@ || defined GNULIB_POSIXCHECK) \ - && (defined _WIN32 && ! defined __CYGWIN__) \ - && ! defined __GLIBC__ -# include -#endif - /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ @@ -152,7 +132,7 @@ /* 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__) @@ -610,7 +590,7 @@ _GL_CXXALIAS_SYS (fwrite, size_t, (const void *ptr, size_t s, size_t n, FILE *stream)); /* 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 under certain versions of gcc and clang, and is not needed for C++. */ diff --git a/gdb/gnulib/import/stdlib.in.h b/gdb/gnulib/import/stdlib.in.h index 3bf35bf6b0f..db3253bd970 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-2018 Free Software Foundation, Inc. + Copyright (C) 1995, 2001-2004, 2006-2016 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ @@ -47,14 +47,11 @@ /* Solaris declares getloadavg() in . */ #if (@GNULIB_GETLOADAVG@ || defined GNULIB_POSIXCHECK) && @HAVE_SYS_LOADAVG_H@ -/* OpenIndiana has a bug: must be included before - . */ -# include # include #endif /* Native Windows platforms declare mktemp() in . */ -#if 0 && (defined _WIN32 && ! defined __CYGWIN__) +#if 0 && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) # include #endif @@ -90,7 +87,7 @@ struct random_data # endif #endif -#if (@GNULIB_MKSTEMP@ || @GNULIB_MKSTEMPS@ || @GNULIB_GETSUBOPT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__ && !(defined _WIN32 && ! defined __CYGWIN__) +#if (@GNULIB_MKSTEMP@ || @GNULIB_MKSTEMPS@ || @GNULIB_GETSUBOPT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__ && !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) /* On Mac OS X 10.3, only declares mkstemp. */ /* On Mac OS X 10.5, only declares mkstemps. */ /* On Cygwin 1.7.1, only declares getsubopt. */ @@ -600,7 +597,7 @@ _GL_WARN_ON_USE (srandom, "srandom is unportable - " #endif #if @GNULIB_RANDOM@ -# if !@HAVE_RANDOM@ || !@HAVE_DECL_INITSTATE@ +# if !@HAVE_RANDOM@ _GL_FUNCDECL_SYS (initstate, char *, (unsigned int seed, char *buf, size_t buf_size) _GL_ARG_NONNULL ((2))); @@ -617,7 +614,7 @@ _GL_WARN_ON_USE (initstate, "initstate is unportable - " #endif #if @GNULIB_RANDOM@ -# if !@HAVE_RANDOM@ || !@HAVE_DECL_SETSTATE@ +# if !@HAVE_RANDOM@ _GL_FUNCDECL_SYS (setstate, char *, (char *arg_state) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (setstate, char *, (char *arg_state)); @@ -768,23 +765,6 @@ _GL_WARN_ON_USE (realloc, "realloc is not POSIX compliant everywhere - " "use gnulib module realloc-posix for portability"); #endif - -#if @GNULIB_REALLOCARRAY@ -# if ! @HAVE_REALLOCARRAY@ -_GL_FUNCDECL_SYS (reallocarray, void *, - (void *ptr, size_t nmemb, size_t size)); -# endif -_GL_CXXALIAS_SYS (reallocarray, void *, - (void *ptr, size_t nmemb, size_t size)); -_GL_CXXALIASWARN (reallocarray); -#elif defined GNULIB_POSIXCHECK -# undef reallocarray -# if HAVE_RAW_DECL_REALLOCARRAY -_GL_WARN_ON_USE (reallocarray, "reallocarray is not portable - " - "use gnulib module reallocarray for portability"); -# endif -#endif - #if @GNULIB_REALPATH@ # if @REPLACE_REALPATH@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) diff --git a/gdb/gnulib/import/str-two-way.h b/gdb/gnulib/import/str-two-way.h index 85489d1f2f5..0fe31614b55 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-2018 Free Software Foundation, Inc. + Copyright (C) 2008-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Eric Blake , 2008. @@ -14,7 +14,7 @@ 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 . */ + with this program; if not, see . */ /* Before including this file, you need to include and , and define: @@ -50,8 +50,8 @@ achieve improved (potentially sub-linear) performance. See http://www-igm.univ-mlv.fr/~lecroq/string/node26.html#SECTION00260, - https://en.wikipedia.org/wiki/Boyer-Moore_string_search_algorithm, - https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.34.6641&rep=rep1&type=pdf + http://en.wikipedia.org/wiki/Boyer-Moore_string_search_algorithm, + http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.34.6641&rep=rep1&type=pdf */ /* Point at which computing a bad-byte shift table is likely to be diff --git a/gdb/gnulib/import/strchrnul.c b/gdb/gnulib/import/strchrnul.c index 8b3cd88b5e4..1482a77d830 100644 --- a/gdb/gnulib/import/strchrnul.c +++ b/gdb/gnulib/import/strchrnul.c @@ -1,5 +1,5 @@ /* Searching in a string. - Copyright (C) 2003, 2007-2018 Free Software Foundation, Inc. + Copyright (C) 2003, 2007-2016 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #include diff --git a/gdb/gnulib/import/strdup.c b/gdb/gnulib/import/strdup.c index ce43940bc9a..81eb2260ceb 100644 --- a/gdb/gnulib/import/strdup.c +++ b/gdb/gnulib/import/strdup.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1996-1998, 2002-2004, 2006-2007, 2009-2018 Free Software +/* Copyright (C) 1991, 1996-1998, 2002-2004, 2006-2007, 2009-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -14,7 +14,7 @@ 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 . */ + with this program; if not, see . */ #ifndef _LIBC # include diff --git a/gdb/gnulib/import/streq.h b/gdb/gnulib/import/streq.h index bde1b9562ff..234f07568d3 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-2018 Free Software Foundation, Inc. + Copyright (C) 2001-2002, 2007, 2009-2016 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible . */ diff --git a/gdb/gnulib/import/strerror-override.c b/gdb/gnulib/import/strerror-override.c index d3ad21e7245..9bc9b189510 100644 --- a/gdb/gnulib/import/strerror-override.c +++ b/gdb/gnulib/import/strerror-override.c @@ -1,6 +1,6 @@ /* strerror-override.c --- POSIX compatible system error routine - Copyright (C) 2010-2018 Free Software Foundation, Inc. + Copyright (C) 2010-2016 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Bruno Haible , 2010. */ diff --git a/gdb/gnulib/import/strerror-override.h b/gdb/gnulib/import/strerror-override.h index a96fd089095..5264fd5f395 100644 --- a/gdb/gnulib/import/strerror-override.h +++ b/gdb/gnulib/import/strerror-override.h @@ -1,6 +1,6 @@ /* strerror-override.h --- POSIX compatible system error routine - Copyright (C) 2010-2018 Free Software Foundation, Inc. + Copyright (C) 2010-2016 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ #ifndef _GL_STRERROR_OVERRIDE_H # define _GL_STRERROR_OVERRIDE_H diff --git a/gdb/gnulib/import/strerror.c b/gdb/gnulib/import/strerror.c index 36397bb8c68..45c763391c1 100644 --- a/gdb/gnulib/import/strerror.c +++ b/gdb/gnulib/import/strerror.c @@ -1,6 +1,6 @@ /* strerror.c --- POSIX compatible system error routine - Copyright (C) 2007-2018 Free Software Foundation, Inc. + Copyright (C) 2007-2016 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ #include @@ -66,6 +66,5 @@ strerror (int n) if (sizeof buf <= len) abort (); - memcpy (buf, msg, len + 1); - return buf; + return memcpy (buf, msg, len + 1); } diff --git a/gdb/gnulib/import/string.in.h b/gdb/gnulib/import/string.in.h index 29f4ba6b1e1..b3213c4c1ab 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-2018 Free Software Foundation, Inc. + Copyright (C) 1995-1996, 2001-2016 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program; if not, see . */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ @@ -74,23 +74,6 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ -/* Clear a block of memory. The compiler will not delete a call to - this function, even if the block is dead after the call. */ -#if @GNULIB_EXPLICIT_BZERO@ -# if ! @HAVE_EXPLICIT_BZERO@ -_GL_FUNCDECL_SYS (explicit_bzero, void, - (void *__dest, size_t __n) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (explicit_bzero, void, (void *__dest, size_t __n)); -_GL_CXXALIASWARN (explicit_bzero); -#elif defined GNULIB_POSIXCHECK -# undef explicit_bzero -# if HAVE_RAW_DECL_EXPLICIT_BZERO -_GL_WARN_ON_USE (explicit_bzero, "explicit_bzero is unportable - " - "use gnulib module explicit_bzero for portability"); -# endif -#endif - /* Find the index of the least-significant set bit. */ #if @GNULIB_FFSL@ # if !@HAVE_FFSL@ diff --git a/gdb/gnulib/import/stripslash.c b/gdb/gnulib/import/stripslash.c index 60c6781ca1e..0453e36cc6f 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-2018 Free Software Foundation, + Copyright (C) 1990, 2001, 2003-2006, 2009-2016 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -14,7 +14,7 @@ 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 . */ + along with this program. If not, see . */ #include diff --git a/gdb/gnulib/import/strnlen1.c b/gdb/gnulib/import/strnlen1.c index 4459f6b1f11..f5e0ffcf807 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-2018 Free Software Foundation, Inc. + Copyright (C) 2005-2006, 2009-2016 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #include diff --git a/gdb/gnulib/import/strnlen1.h b/gdb/gnulib/import/strnlen1.h index 896a1801bef..d3cd7c19536 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-2018 Free Software Foundation, Inc. + Copyright (C) 2005, 2009-2016 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ #ifndef _STRNLEN1_H #define _STRNLEN1_H diff --git a/gdb/gnulib/import/strstr.c b/gdb/gnulib/import/strstr.c index 8f96d765d29..60cd3e322bc 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-2018 Free Software +/* Copyright (C) 1991-1994, 1996-1998, 2000, 2004, 2007-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -13,7 +13,7 @@ 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 . */ + with this program; if not, see . */ /* This particular implementation was written by Eric Blake, 2008. */ @@ -26,6 +26,10 @@ #include +#ifndef _LIBC +# define __builtin_expect(expr, val) (expr) +#endif + #define RETURN_TYPE char * #define AVAILABLE(h, h_l, j, n_l) \ (!memchr ((h) + (h_l), '\0', (j) + (n_l) - (h_l)) \ diff --git a/gdb/gnulib/import/strtok_r.c b/gdb/gnulib/import/strtok_r.c index ef8e41dc65b..3531634db5a 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-2018 Free Software + Copyright (C) 1991, 1996-1999, 2001, 2004, 2007, 2009-2016 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -14,7 +14,7 @@ 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 . */ + along with this program. If not, see . */ #ifdef HAVE_CONFIG_H # include diff --git a/gdb/gnulib/import/sys_stat.in.h b/gdb/gnulib/import/sys_stat.in.h index 6ae6ac5fbdc..72d9537420c 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.h header file. - Copyright (C) 2005-2018 Free Software Foundation, Inc. +/* Provide a more complete sys/stat header file. + Copyright (C) 2005-2016 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program; if not, see . */ /* Written by Eric Blake, Paul Eggert, and Jim Meyering. */ @@ -57,13 +57,13 @@ /* Before doing "#define mkdir rpl_mkdir" below, we need to include all headers that may declare mkdir(). Native Windows platforms declare mkdir in and/or , not in . */ -#if defined _WIN32 && ! defined __CYGWIN__ +#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # include /* mingw32, mingw64 */ # include /* mingw64, MSVC 9 */ #endif /* Native Windows platforms declare umask() in . */ -#if 0 && (defined _WIN32 && ! defined __CYGWIN__) +#if 0 && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) # include #endif @@ -72,75 +72,6 @@ # define stat _stati64 #endif -/* Optionally, override 'struct stat' on native Windows. */ -#if @GNULIB_OVERRIDES_STRUCT_STAT@ - -# undef stat -# if @GNULIB_STAT@ -# define stat rpl_stat -# else - /* Provoke a clear link error if stat() is used as a function and - module 'stat' is not in use. */ -# define stat stat_used_without_requesting_gnulib_module_stat -# endif - -# if !GNULIB_defined_struct_stat -struct stat -{ - dev_t st_dev; - ino_t st_ino; - mode_t st_mode; - nlink_t st_nlink; -# if 0 - uid_t st_uid; -# else /* uid_t is not defined by default on native Windows. */ - short st_uid; -# endif -# if 0 - gid_t st_gid; -# else /* gid_t is not defined by default on native Windows. */ - short st_gid; -# endif - dev_t st_rdev; - off_t st_size; -# if 0 - blksize_t st_blksize; - blkcnt_t st_blocks; -# endif - -# if @WINDOWS_STAT_TIMESPEC@ - struct timespec st_atim; - struct timespec st_mtim; - struct timespec st_ctim; -# else - time_t st_atime; - time_t st_mtime; - time_t st_ctime; -# endif -}; -# if @WINDOWS_STAT_TIMESPEC@ -# define st_atime st_atim.tv_sec -# define st_mtime st_mtim.tv_sec -# define st_ctime st_ctim.tv_sec - /* Indicator, for gnulib internal purposes. */ -# define _GL_WINDOWS_STAT_TIMESPEC 1 -# endif -# define GNULIB_defined_struct_stat 1 -# endif - -/* Other possible values of st_mode. */ -# if 0 -# define _S_IFBLK 0x6000 -# endif -# if 0 -# define _S_IFLNK 0xA000 -# endif -# if 0 -# define _S_IFSOCK 0xC000 -# endif - -#endif - #ifndef S_IFIFO # ifdef _S_IFIFO # define S_IFIFO _S_IFIFO @@ -414,9 +345,6 @@ _GL_CXXALIAS_RPL (fstat, int, (int fd, struct stat *buf)); _GL_CXXALIAS_SYS (fstat, int, (int fd, struct stat *buf)); # endif _GL_CXXALIASWARN (fstat); -#elif @GNULIB_OVERRIDES_STRUCT_STAT@ -# undef fstat -# define fstat fstat_used_without_requesting_gnulib_module_fstat #elif @WINDOWS_64_BIT_ST_SIZE@ /* Above, we define stat to _stati64. */ # define fstat _fstati64 @@ -450,9 +378,6 @@ _GL_CXXALIAS_SYS (fstatat, int, (int fd, char const *name, struct stat *st, int flags)); # endif _GL_CXXALIASWARN (fstatat); -#elif @GNULIB_OVERRIDES_STRUCT_STAT@ -# undef fstatat -# define fstatat fstatat_used_without_requesting_gnulib_module_fstatat #elif defined GNULIB_POSIXCHECK # undef fstatat # if HAVE_RAW_DECL_FSTATAT @@ -551,9 +476,6 @@ _GL_CXXALIAS_SYS (lstat, int, (const char *name, struct stat *buf)); # if @HAVE_LSTAT@ _GL_CXXALIASWARN (lstat); # endif -#elif @GNULIB_OVERRIDES_STRUCT_STAT@ -# undef lstat -# define lstat lstat_used_without_requesting_gnulib_module_lstat #elif defined GNULIB_POSIXCHECK # undef lstat # if HAVE_RAW_DECL_LSTAT @@ -576,7 +498,7 @@ _GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode)); Additionally, it declares _mkdir (and depending on compile flags, an alias mkdir), only in the nonstandard includes and , which are included above. */ -# if defined _WIN32 && ! defined __CYGWIN__ +# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ # if !GNULIB_defined_rpl_mkdir static int @@ -703,69 +625,63 @@ _GL_WARN_ON_USE (mknodat, "mknodat is not portable - " #if @GNULIB_STAT@ # if @REPLACE_STAT@ -# if !@GNULIB_OVERRIDES_STRUCT_STAT@ - /* We can't use the object-like #define stat rpl_stat, because of - struct stat. This means that rpl_stat will not be used if the user - does (stat)(a,b). Oh well. */ -# if defined _AIX && defined stat && defined _LARGE_FILES - /* With _LARGE_FILES defined, AIX (only) defines stat to stat64, - so we have to replace stat64() instead of stat(). */ -# undef stat64 -# define stat64(name, st) rpl_stat (name, st) -# elif @WINDOWS_64_BIT_ST_SIZE@ - /* Above, we define stat to _stati64. */ -# if defined __MINGW32__ && defined _stati64 -# ifndef _USE_32BIT_TIME_T - /* The system headers define _stati64 to _stat64. */ -# undef _stat64 -# define _stat64(name, st) rpl_stat (name, st) -# endif -# elif defined _MSC_VER && defined _stati64 -# ifdef _USE_32BIT_TIME_T - /* The system headers define _stati64 to _stat32i64. */ -# undef _stat32i64 -# define _stat32i64(name, st) rpl_stat (name, st) -# else - /* The system headers define _stati64 to _stat64. */ -# undef _stat64 -# define _stat64(name, st) rpl_stat (name, st) -# endif -# else -# undef _stati64 -# define _stati64(name, st) rpl_stat (name, st) +/* We can't use the object-like #define stat rpl_stat, because of + struct stat. This means that rpl_stat will not be used if the user + does (stat)(a,b). Oh well. */ +# if defined _AIX && defined stat && defined _LARGE_FILES + /* With _LARGE_FILES defined, AIX (only) defines stat to stat64, + so we have to replace stat64() instead of stat(). */ +# undef stat64 +# define stat64(name, st) rpl_stat (name, st) +# elif @WINDOWS_64_BIT_ST_SIZE@ + /* Above, we define stat to _stati64. */ +# if defined __MINGW32__ && defined _stati64 +# ifndef _USE_32BIT_TIME_T + /* The system headers define _stati64 to _stat64. */ +# undef _stat64 +# define _stat64(name, st) rpl_stat (name, st) # endif -# elif defined __MINGW32__ && defined stat +# elif defined _MSC_VER && defined _stati64 # ifdef _USE_32BIT_TIME_T - /* The system headers define stat to _stat32i64. */ + /* The system headers define _stati64 to _stat32i64. */ # undef _stat32i64 # define _stat32i64(name, st) rpl_stat (name, st) # else - /* The system headers define stat to _stat64. */ + /* The system headers define _stati64 to _stat64. */ # undef _stat64 # define _stat64(name, st) rpl_stat (name, st) # endif -# elif defined _MSC_VER && defined stat -# ifdef _USE_32BIT_TIME_T - /* The system headers define stat to _stat32. */ -# undef _stat32 -# define _stat32(name, st) rpl_stat (name, st) -# else - /* The system headers define stat to _stat64i32. */ -# undef _stat64i32 -# define _stat64i32(name, st) rpl_stat (name, st) -# endif -# else /* !(_AIX || __MINGW32__ || _MSC_VER) */ -# undef stat -# define stat(name, st) rpl_stat (name, st) -# endif /* !_LARGE_FILES */ -# endif /* !@GNULIB_OVERRIDES_STRUCT_STAT@ */ +# else +# undef _stati64 +# define _stati64(name, st) rpl_stat (name, st) +# endif +# elif defined __MINGW32__ && defined stat +# ifdef _USE_32BIT_TIME_T + /* The system headers define stat to _stat32i64. */ +# undef _stat32i64 +# define _stat32i64(name, st) rpl_stat (name, st) +# else + /* The system headers define stat to _stat64. */ +# undef _stat64 +# define _stat64(name, st) rpl_stat (name, st) +# endif +# elif defined _MSC_VER && defined stat +# ifdef _USE_32BIT_TIME_T + /* The system headers define stat to _stat32. */ +# undef _stat32 +# define _stat32(name, st) rpl_stat (name, st) +# else + /* The system headers define stat to _stat64i32. */ +# undef _stat64i32 +# define _stat64i32(name, st) rpl_stat (name, st) +# endif +# else /* !(_AIX ||__MINGW32__ || _MSC_VER) */ +# undef stat +# define stat(name, st) rpl_stat (name, st) +# endif /* !_LARGE_FILES */ _GL_EXTERN_C int stat (const char *name, struct stat *buf) _GL_ARG_NONNULL ((1, 2)); # endif -#elif @GNULIB_OVERRIDES_STRUCT_STAT@ -/* see above: - #define stat stat_used_without_requesting_gnulib_module_stat - */ #elif defined GNULIB_POSIXCHECK # undef stat # if HAVE_RAW_DECL_STAT diff --git a/gdb/gnulib/import/sys_time.in.h b/gdb/gnulib/import/sys_time.in.h index b4a0e49c508..d535a6a48b2 100644 --- a/gdb/gnulib/import/sys_time.in.h +++ b/gdb/gnulib/import/sys_time.in.h @@ -1,6 +1,6 @@ /* Provide a more complete sys/time.h. - Copyright (C) 2007-2018 Free Software Foundation, Inc. + Copyright (C) 2007-2016 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program; if not, see . */ /* Written by Paul Eggert. */ diff --git a/gdb/gnulib/import/sys_types.in.h b/gdb/gnulib/import/sys_types.in.h index 7f8c1c42117..8ab05453829 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-2018 Free Software Foundation, Inc. + Copyright (C) 2011-2016 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 @@ -13,24 +13,13 @@ 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 . */ + along with this program; if not, see . */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ #endif @PRAGMA_COLUMNS@ -#if defined _WIN32 && !defined __CYGWIN__ \ - && (defined __need_off_t || defined __need___off64_t \ - || defined __need_ssize_t || defined __need_time_t) - -/* Special invocation convention inside mingw header files. */ - -#@INCLUDE_NEXT@ @NEXT_SYS_TYPES_H@ - -#else -/* Normal invocation convention. */ - #ifndef _@GUARD_PREFIX@_SYS_TYPES_H /* The include_next requires a split double-inclusion guard. */ @@ -53,54 +42,12 @@ # define _GL_WINDOWS_64_BIT_OFF_T 1 #endif -/* Override dev_t and ino_t if distinguishable inodes support is requested - on native Windows. */ -#if @WINDOWS_STAT_INODES@ - -# if @WINDOWS_STAT_INODES@ == 2 -/* Experimental, not useful in Windows 10. */ - -/* Define dev_t to a 64-bit type. */ -# if !defined GNULIB_defined_dev_t -typedef unsigned long long int rpl_dev_t; -# undef dev_t -# define dev_t rpl_dev_t -# define GNULIB_defined_dev_t 1 -# endif - -/* Define ino_t to a 128-bit type. */ -# if !defined GNULIB_defined_ino_t -/* MSVC does not have a 128-bit integer type. - GCC has a 128-bit integer type __int128, but only on 64-bit targets. */ -typedef struct { unsigned long long int _gl_ino[2]; } rpl_ino_t; -# undef ino_t -# define ino_t rpl_ino_t -# define GNULIB_defined_ino_t 1 -# endif - -# else /* @WINDOWS_STAT_INODES@ == 1 */ - -/* Define ino_t to a 64-bit type. */ -# if !defined GNULIB_defined_ino_t -typedef unsigned long long int rpl_ino_t; -# undef ino_t -# define ino_t rpl_ino_t -# define GNULIB_defined_ino_t 1 -# endif - -# endif - -/* Indicator, for gnulib internal purposes. */ -# define _GL_WINDOWS_STAT_INODES @WINDOWS_STAT_INODES@ - -#endif - /* MSVC 9 defines size_t in , not in . */ /* But avoid namespace pollution on glibc systems. */ -#if (defined _WIN32 && ! defined __CYGWIN__) && ! defined __GLIBC__ +#if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) \ + && ! defined __GLIBC__ # include #endif #endif /* _@GUARD_PREFIX@_SYS_TYPES_H */ #endif /* _@GUARD_PREFIX@_SYS_TYPES_H */ -#endif /* __need_XXX */ diff --git a/gdb/gnulib/import/tempname.c b/gdb/gnulib/import/tempname.c index da81263b8c0..b1e9880f7b6 100644 --- a/gdb/gnulib/import/tempname.c +++ b/gdb/gnulib/import/tempname.c @@ -1,6 +1,6 @@ /* tempname.c - generate the name of a temporary file. - Copyright (C) 1991-2003, 2005-2007, 2009-2018 Free Software Foundation, Inc. + Copyright (C) 1991-2003, 2005-2007, 2009-2016 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ /* Extracted from glibc sysdeps/posix/tempname.c. See also tmpdir.c. */ @@ -69,6 +69,7 @@ # define __mkdir mkdir # define __open open # define __lxstat64(version, file, buf) lstat (file, buf) +# define __secure_getenv secure_getenv #endif #ifdef _LIBC @@ -278,7 +279,7 @@ try_nocreate (char *tmpl, void *flags _GL_UNUSED) { struct_stat64 st; - if (__lxstat64 (_STAT_VER, tmpl, &st) == 0 || errno == EOVERFLOW) + if (__lxstat64 (_STAT_VER, tmpl, &st) == 0) __set_errno (EEXIST); return errno == ENOENT ? 0 : -1; } diff --git a/gdb/gnulib/import/tempname.h b/gdb/gnulib/import/tempname.h index 4020c734c57..be01c514365 100644 --- a/gdb/gnulib/import/tempname.h +++ b/gdb/gnulib/import/tempname.h @@ -1,6 +1,6 @@ /* Create a temporary file or directory. - Copyright (C) 2006, 2009-2018 Free Software Foundation, Inc. + Copyright (C) 2006, 2009-2016 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ /* header written by Eric Blake */ diff --git a/gdb/gnulib/import/time.in.h b/gdb/gnulib/import/time.in.h index cda16c69d2c..865c1141196 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-2018 Free Software Foundation, Inc. + Copyright (C) 2007-2016 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program; if not, see . */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ @@ -120,24 +120,6 @@ _GL_CXXALIAS_SYS (nanosleep, int, _GL_CXXALIASWARN (nanosleep); # endif -/* Initialize time conversion information. */ -# if @GNULIB_TZSET@ -# if @REPLACE_TZSET@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef tzset -# define tzset rpl_tzset -# endif -_GL_FUNCDECL_RPL (tzset, void, (void)); -_GL_CXXALIAS_RPL (tzset, void, (void)); -# else -# if ! @HAVE_TZSET@ -_GL_FUNCDECL_SYS (tzset, void, (void)); -# endif -_GL_CXXALIAS_SYS (tzset, void, (void)); -# endif -_GL_CXXALIASWARN (tzset); -# endif - /* Return the 'time_t' representation of TP and normalize TP. */ # if @GNULIB_MKTIME@ # if @REPLACE_MKTIME@ @@ -205,14 +187,14 @@ _GL_CXXALIASWARN (gmtime_r); /* Convert TIMER to RESULT, assuming local time and UTC respectively. See and . */ -# if @GNULIB_LOCALTIME@ || @REPLACE_LOCALTIME@ +# 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_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (localtime, struct tm *, (time_t const *__timer)); # else _GL_CXXALIAS_SYS (localtime, struct tm *, (time_t const *__timer)); @@ -220,7 +202,7 @@ _GL_CXXALIAS_SYS (localtime, struct tm *, (time_t const *__timer)); _GL_CXXALIASWARN (localtime); # endif -# if 0 || @REPLACE_GMTIME@ +# if @GNULIB_GETTIMEOFDAY@ # if @REPLACE_GMTIME@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef gmtime @@ -235,7 +217,7 @@ _GL_CXXALIAS_SYS (gmtime, struct tm *, (time_t const *__timer)); _GL_CXXALIASWARN (gmtime); # endif -/* Parse BUF as a timestamp, assuming FORMAT specifies its layout, and store +/* Parse BUF as a time stamp, assuming FORMAT specifies its layout, and store the resulting broken-down time into TM. See . */ # if @GNULIB_STRPTIME@ @@ -251,41 +233,6 @@ _GL_CXXALIAS_SYS (strptime, char *, (char const *restrict __buf, _GL_CXXALIASWARN (strptime); # endif -/* Convert *TP to a date and time string. See - . */ -# if @GNULIB_CTIME@ -# if @REPLACE_CTIME@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define ctime rpl_ctime -# endif -_GL_FUNCDECL_RPL (ctime, char *, (time_t const *__tp) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (ctime, char *, (time_t const *__tp)); -# else -_GL_CXXALIAS_SYS (ctime, char *, (time_t const *__tp)); -# endif -_GL_CXXALIASWARN (ctime); -# endif - -/* Convert *TP to a date and time string. See - . */ -# if @GNULIB_STRFTIME@ -# if @REPLACE_STRFTIME@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define strftime rpl_strftime -# endif -_GL_FUNCDECL_RPL (strftime, size_t, (char *__buf, size_t __bufsize, - const char *__fmt, const struct tm *__tp) - _GL_ARG_NONNULL ((1, 3, 4))); -_GL_CXXALIAS_RPL (strftime, size_t, (char *__buf, size_t __bufsize, - const char *__fmt, const struct tm *__tp)); -# else -_GL_CXXALIAS_SYS (strftime, size_t, (char *__buf, size_t __bufsize, - const char *__fmt, const struct tm *__tp)); -# endif -_GL_CXXALIASWARN (strftime); -# 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)); diff --git a/gdb/gnulib/import/unistd--.h b/gdb/gnulib/import/unistd--.h index a6c5266f61a..bd1d0fb2527 100644 --- a/gdb/gnulib/import/unistd--.h +++ b/gdb/gnulib/import/unistd--.h @@ -1,6 +1,6 @@ /* Like unistd.h, but redefine some names to avoid glitches. - Copyright (C) 2005, 2009-2018 Free Software Foundation, Inc. + Copyright (C) 2005, 2009-2016 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Paul Eggert. */ diff --git a/gdb/gnulib/import/unistd-safer.h b/gdb/gnulib/import/unistd-safer.h index 5baf339a087..c8179ce3761 100644 --- a/gdb/gnulib/import/unistd-safer.h +++ b/gdb/gnulib/import/unistd-safer.h @@ -1,6 +1,6 @@ /* Invoke unistd-like functions, but avoid some glitches. - Copyright (C) 2001, 2003, 2005, 2009-2018 Free Software Foundation, Inc. + Copyright (C) 2001, 2003, 2005, 2009-2016 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Paul Eggert and Eric Blake. */ diff --git a/gdb/gnulib/import/unistd.in.h b/gdb/gnulib/import/unistd.in.h index 66f254d60f5..c3af07ad219 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-2018 Free Software Foundation, Inc. + Copyright (C) 2003-2016 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program; if not, see . */ #ifndef _@GUARD_PREFIX@_UNISTD_H @@ -55,13 +55,9 @@ #include /* mingw doesn't define the SEEK_* or *_FILENO macros in . */ -/* MSVC declares 'unlink' in , not in . We must include - it before we #define unlink rpl_unlink. */ /* Cygwin 1.7.1 declares symlinkat in , not in . */ /* But avoid namespace pollution on glibc systems. */ #if (!(defined SEEK_CUR && defined SEEK_END && defined SEEK_SET) \ - || ((@GNULIB_UNLINK@ || defined GNULIB_POSIXCHECK) \ - && (defined _WIN32 && ! defined __CYGWIN__)) \ || ((@GNULIB_SYMLINKAT@ || defined GNULIB_POSIXCHECK) \ && defined __CYGWIN__)) \ && ! defined __GLIBC__ @@ -94,13 +90,13 @@ lseek(), read(), unlink(), write() in . */ #if ((@GNULIB_CHDIR@ || @GNULIB_GETCWD@ || @GNULIB_RMDIR@ \ || defined GNULIB_POSIXCHECK) \ - && (defined _WIN32 && ! defined __CYGWIN__)) + && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)) # include /* mingw32, mingw64 */ # include /* mingw64, MSVC 9 */ #elif (@GNULIB_CLOSE@ || @GNULIB_DUP@ || @GNULIB_DUP2@ || @GNULIB_ISATTY@ \ || @GNULIB_LSEEK@ || @GNULIB_READ@ || @GNULIB_UNLINK@ || @GNULIB_WRITE@ \ || defined GNULIB_POSIXCHECK) \ - && (defined _WIN32 && ! defined __CYGWIN__) + && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) # include #endif @@ -127,17 +123,11 @@ # include #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. */ - - -/* Get getopt(), optarg, optind, opterr, optopt. */ -#if @GNULIB_UNISTD_H_GETOPT@ && !defined _GL_SYSTEM_GETOPT -# include -# include +/* 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 @@ -148,6 +138,13 @@ _GL_INLINE_HEADER_BEGIN # define _GL_UNISTD_INLINE _GL_INLINE #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. */ + + /* Hide some function declarations from . */ #if @GNULIB_GETHOSTNAME@ && @UNISTD_H_HAVE_WINSOCK2_H@ @@ -378,7 +375,7 @@ _GL_WARN_ON_USE (dup2, "dup2 is unportable - " Close NEWFD first if it is open. Return newfd if successful, otherwise -1 and errno set. See the Linux man page at - . */ + . */ # if @HAVE_DUP3@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define dup3 rpl_dup3 @@ -400,13 +397,6 @@ _GL_WARN_ON_USE (dup3, "dup3 is unportable - " #if @GNULIB_ENVIRON@ -# if defined __CYGWIN__ && !defined __i386__ -/* The 'environ' variable is defined in a DLL. Therefore its declaration needs - the '__declspec(dllimport)' attribute, but the system's lacks it. - This leads to a link error on 64-bit Cygwin when the option - -Wl,--disable-auto-import is in use. */ -_GL_EXTERN_C __declspec(dllimport) char **environ; -# endif # if !@HAVE_DECL_ENVIRON@ /* Set of environment variables and values. An array of strings of the form "VARIABLE=VALUE", terminated with a NULL. */ @@ -432,12 +422,12 @@ extern char **environ; #elif defined GNULIB_POSIXCHECK # if HAVE_RAW_DECL_ENVIRON _GL_UNISTD_INLINE char *** -_GL_WARN_ON_USE_ATTRIBUTE ("environ is unportable - " - "use gnulib module environ for portability") rpl_environ (void) { return &environ; } +_GL_WARN_ON_USE (rpl_environ, "environ is unportable - " + "use gnulib module environ for portability"); # undef environ # define environ (*rpl_environ ()) # endif @@ -468,25 +458,13 @@ _GL_WARN_ON_USE (euidaccess, "euidaccess is unportable - " #if @GNULIB_FACCESSAT@ -# if @REPLACE_FACCESSAT@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef faccessat -# define faccessat rpl_faccessat -# endif -_GL_FUNCDECL_RPL (faccessat, int, - (int fd, char const *name, int mode, int flag) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (faccessat, int, - (int fd, char const *name, int mode, int flag)); -# else -# if !@HAVE_FACCESSAT@ +# if !@HAVE_FACCESSAT@ _GL_FUNCDECL_SYS (faccessat, int, (int fd, char const *file, int mode, int flag) _GL_ARG_NONNULL ((2))); -# endif +# endif _GL_CXXALIAS_SYS (faccessat, int, (int fd, char const *file, int mode, int flag)); -# endif _GL_CXXALIASWARN (faccessat); #elif defined GNULIB_POSIXCHECK # undef faccessat @@ -798,7 +776,7 @@ _GL_WARN_ON_USE (gethostname, "gethostname is unportable - " ${LOGNAME-$USER} on Unix platforms, $USERNAME on native Windows platforms. */ -# if !@HAVE_DECL_GETLOGIN@ +# if !@HAVE_GETLOGIN@ _GL_FUNCDECL_SYS (getlogin, char *, (void)); # endif _GL_CXXALIAS_SYS (getlogin, char *, (void)); @@ -935,36 +913,6 @@ _GL_WARN_ON_USE (getpagesize, "getpagesize is unportable - " #endif -#if @GNULIB_GETPASS@ -/* Function getpass() from module 'getpass': - Read a password from /dev/tty or stdin. - Function getpass() from module 'getpass-gnu': - Read a password of arbitrary length from /dev/tty or stdin. */ -# if @REPLACE_GETPASS@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getpass -# define getpass rpl_getpass -# endif -_GL_FUNCDECL_RPL (getpass, char *, (const char *prompt) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (getpass, char *, (const char *prompt)); -# else -# if !@HAVE_GETPASS@ -_GL_FUNCDECL_SYS (getpass, char *, (const char *prompt) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (getpass, char *, (const char *prompt)); -# endif -_GL_CXXALIASWARN (getpass); -#elif defined GNULIB_POSIXCHECK -# undef getpass -# if HAVE_RAW_DECL_GETPASS -_GL_WARN_ON_USE (getpass, "getpass is unportable - " - "use gnulib module getpass or getpass-gnu for portability"); -# endif -#endif - - #if @GNULIB_GETUSERSHELL@ /* Return the next valid login shell on the system, or NULL when the end of the list has been reached. */ @@ -1197,7 +1145,7 @@ _GL_WARN_ON_USE (pipe, "pipe is unportable - " Store the read-end as fd[0] and the write-end as fd[1]. Return 0 upon success, or -1 with errno set upon failure. See also the Linux man page at - . */ + . */ # if @HAVE_PIPE2@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define pipe2 rpl_pipe2 @@ -1505,36 +1453,6 @@ _GL_WARN_ON_USE (symlinkat, "symlinkat is not portable - " #endif -#if @GNULIB_TRUNCATE@ -/* Change the size of the file designated by FILENAME to become equal to LENGTH. - Return 0 if successful, otherwise -1 and errno set. - See the POSIX:2008 specification - . */ -# if @REPLACE_TRUNCATE@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef truncate -# define truncate rpl_truncate -# endif -_GL_FUNCDECL_RPL (truncate, int, (const char *filename, off_t length) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (truncate, int, (const char *filename, off_t length)); -# else -# if !@HAVE_DECL_TRUNCATE@ -_GL_FUNCDECL_SYS (truncate, int, (const char *filename, off_t length) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (truncate, int, (const char *filename, off_t length)); -# endif -_GL_CXXALIASWARN (truncate); -#elif defined GNULIB_POSIXCHECK -# undef truncate -# if HAVE_RAW_DECL_TRUNCATE -_GL_WARN_ON_USE (truncate, "truncate is unportable - " - "use gnulib module truncate for portability"); -# endif -#endif - - #if @GNULIB_TTYNAME_R@ /* Store at most BUFLEN characters of the pathname of the terminal FD is open on in BUF. Return 0 on success, otherwise an error number. */ diff --git a/gdb/gnulib/import/unsetenv.c b/gdb/gnulib/import/unsetenv.c index 82c6c067902..836874475e9 100644 --- a/gdb/gnulib/import/unsetenv.c +++ b/gdb/gnulib/import/unsetenv.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1995-2002, 2005-2018 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1995-2002, 2005-2016 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 @@ -12,7 +12,7 @@ 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 . */ + along with this program. If not, see . */ /* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc optimizes away the name == NULL test below. */ diff --git a/gdb/gnulib/import/verify.h b/gdb/gnulib/import/verify.h index 3b57ddee0ac..5c8381d2906 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-2018 Free Software Foundation, Inc. + Copyright (C) 2005-2006, 2009-2016 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program. If not, see . */ /* Written by Paul Eggert, Bruno Haible, and Jim Meyering. */ @@ -248,12 +248,7 @@ template /* Verify requirement R at compile-time, as a declaration without a trailing ';'. */ -#ifdef __GNUC__ -# define verify(R) _GL_VERIFY (R, "verify (" #R ")") -#else -/* PGI barfs if R is long. Play it safe. */ -# define verify(R) _GL_VERIFY (R, "verify (...)") -#endif +#define verify(R) _GL_VERIFY (R, "verify (" #R ")") #ifndef __has_builtin # define __has_builtin(x) 0 @@ -276,8 +271,7 @@ template when 'assume' silences warnings even with older GCCs. */ # define assume(R) ((R) ? (void) 0 : __builtin_trap ()) #else - /* Some tools grok NOTREACHED, e.g., Oracle Studio 12.6. */ -# define assume(R) ((R) ? (void) 0 : /*NOTREACHED*/ (void) 0) +# 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 51a5dda17dc..75fb9f0254a 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-2018 Free Software Foundation, Inc. + Copyright (C) 2007-2016 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program; if not, see . */ /* Written by Eric Blake. */ @@ -31,7 +31,7 @@ @PRAGMA_COLUMNS@ #if (((defined __need_mbstate_t || defined __need_wint_t) \ - && !defined __MINGW32__) \ + && !defined __MINGW32__ && !defined __KLIBC__) \ || (defined __hpux \ && ((defined _INTTYPES_INCLUDED && !defined strtoimax) \ || defined _GL_JUST_INCLUDE_SYSTEM_WCHAR_H)) \ @@ -113,16 +113,12 @@ # define WEOF -1 # endif #else -/* mingw and MSVC define wint_t as 'unsigned short' in or - . This is too small: ISO C 99 section 7.24.1.(2) says that - wint_t must be "unchanged by default argument promotions". Override it. */ -# if @GNULIB_OVERRIDES_WINT_T@ +/* MSVC defines wint_t as 'unsigned short' in . + This is too small: ISO C 99 section 7.24.1.(2) says that wint_t must be + "unchanged by default argument promotions". Override it. */ +# if defined _MSC_VER # if !GNULIB_defined_wint_t -# if @HAVE_CRTDEFS_H@ -# include -# else -# include -# endif +# include typedef unsigned int rpl_wint_t; # undef wint_t # define wint_t rpl_wint_t @@ -452,6 +448,11 @@ _GL_CXXALIAS_RPL (wcwidth, int, (wchar_t)); # if !@HAVE_DECL_WCWIDTH@ /* wcwidth exists but is not declared. */ _GL_FUNCDECL_SYS (wcwidth, int, (wchar_t) _GL_ATTRIBUTE_PURE); +# elif defined __KLIBC__ +/* On OS/2 kLIBC, wcwidth is a macro that expands to the name of a + static inline function. The implementation of wcwidth in wcwidth.c + causes a "conflicting types" error. */ +# undef wcwidth # endif _GL_CXXALIAS_SYS (wcwidth, int, (wchar_t)); # endif @@ -1035,38 +1036,6 @@ _GL_WARN_ON_USE (wcswidth, "wcswidth is unportable - " #endif -/* Convert *TP to a date and time wide string. See - . */ -#if @GNULIB_WCSFTIME@ -# if @REPLACE_WCSFTIME@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef wcsftime -# define wcsftime rpl_wcsftime -# endif -_GL_FUNCDECL_RPL (wcsftime, size_t, (wchar_t *__buf, size_t __bufsize, - const wchar_t *__fmt, const struct tm *__tp) - _GL_ARG_NONNULL ((1, 3, 4))); -_GL_CXXALIAS_RPL (wcsftime, size_t, (wchar_t *__buf, size_t __bufsize, - const wchar_t *__fmt, const struct tm *__tp)); -# else -# if !@HAVE_WCSFTIME@ -_GL_FUNCDECL_SYS (wcsftime, size_t, (wchar_t *__buf, size_t __bufsize, - const wchar_t *__fmt, const struct tm *__tp) - _GL_ARG_NONNULL ((1, 3, 4))); -# endif -_GL_CXXALIAS_SYS (wcsftime, size_t, (wchar_t *__buf, size_t __bufsize, - const wchar_t *__fmt, const struct tm *__tp)); -# endif -_GL_CXXALIASWARN (wcsftime); -#elif defined GNULIB_POSIXCHECK -# undef wcsftime -# if HAVE_RAW_DECL_WCSFTIME -_GL_WARN_ON_USE (wcsftime, "wcsftime is unportable - " - "use gnulib module wcsftime for portability"); -# endif -#endif - - #endif /* _@GUARD_PREFIX@_WCHAR_H */ #endif /* _@GUARD_PREFIX@_WCHAR_H */ #endif diff --git a/gdb/gnulib/import/wctype.in.h b/gdb/gnulib/import/wctype.in.h index 3c6e5f29038..37b3d8ebf13 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-2018 Free Software Foundation, Inc. + Copyright (C) 2006-2016 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 @@ -13,7 +13,7 @@ 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 . */ + along with this program; if not, see . */ /* Written by Bruno Haible and Paul Eggert. */ @@ -56,13 +56,11 @@ # include #endif -/* Native Windows (mingw, MSVC) have declarations of towupper, towlower, and - isw* functions in , as well as in . Include - , in advance to avoid rpl_ prefix being added to the - declarations. */ -#if defined _WIN32 && ! defined __CYGWIN__ +/* 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 -# include #endif /* Include the original if it exists. @@ -107,16 +105,12 @@ _GL_INLINE_HEADER_BEGIN # define WEOF -1 # endif #else -/* mingw and MSVC define wint_t as 'unsigned short' in or - . This is too small: ISO C 99 section 7.24.1.(2) says that - wint_t must be "unchanged by default argument promotions". Override it. */ -# if @GNULIB_OVERRIDES_WINT_T@ +/* MSVC defines wint_t as 'unsigned short' in . + This is too small: ISO C 99 section 7.24.1.(2) says that wint_t must be + "unchanged by default argument promotions". Override it. */ +# if defined _MSC_VER # if !GNULIB_defined_wint_t -# if @HAVE_CRTDEFS_H@ -# include -# else -# include -# endif +# include typedef unsigned int rpl_wint_t; # undef wint_t # define wint_t rpl_wint_t diff --git a/gdb/gnulib/import/xalloc-oversized.h b/gdb/gnulib/import/xalloc-oversized.h deleted file mode 100644 index 3426e10f4d2..00000000000 --- a/gdb/gnulib/import/xalloc-oversized.h +++ /dev/null @@ -1,60 +0,0 @@ -/* xalloc-oversized.h -- memory allocation size checking - - Copyright (C) 1990-2000, 2003-2004, 2006-2018 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef XALLOC_OVERSIZED_H_ -#define XALLOC_OVERSIZED_H_ - -#include -#include - -/* True if N * S would overflow in a size_t calculation, - or would generate a value larger than PTRDIFF_MAX. - This expands to a constant expression if N and S are both constants. - By gnulib convention, SIZE_MAX represents overflow in size - calculations, so the conservative size_t-based dividend to use here - is SIZE_MAX - 1. */ -#define __xalloc_oversized(n, s) \ - ((size_t) (PTRDIFF_MAX < SIZE_MAX ? PTRDIFF_MAX : SIZE_MAX - 1) / (s) < (n)) - -#if PTRDIFF_MAX < SIZE_MAX -typedef ptrdiff_t __xalloc_count_type; -#else -typedef size_t __xalloc_count_type; -#endif - -/* Return 1 if an array of N objects, each of size S, cannot exist - reliably due to size or ptrdiff_t arithmetic overflow. S must be - positive and N must be nonnegative. This is a macro, not a - function, so that it works correctly even when SIZE_MAX < N. */ - -#if 7 <= __GNUC__ -# define xalloc_oversized(n, s) \ - __builtin_mul_overflow_p (n, s, (__xalloc_count_type) 1) -#elif 5 <= __GNUC__ && !defined __ICC && !__STRICT_ANSI__ -# define xalloc_oversized(n, s) \ - (__builtin_constant_p (n) && __builtin_constant_p (s) \ - ? __xalloc_oversized (n, s) \ - : ({ __xalloc_count_type __xalloc_count; \ - __builtin_mul_overflow (n, s, &__xalloc_count); })) - -/* Other compilers use integer division; this may be slower but is - more portable. */ -#else -# define xalloc_oversized(n, s) __xalloc_oversized (n, s) -#endif - -#endif /* !XALLOC_OVERSIZED_H_ */ diff --git a/gdb/gnulib/update-gnulib.sh b/gdb/gnulib/update-gnulib.sh index 5d29e287a4e..1bae7e124b9 100755 --- a/gdb/gnulib/update-gnulib.sh +++ b/gdb/gnulib/update-gnulib.sh @@ -64,7 +64,7 @@ IMPORTED_GNULIB_MODULES="\ " # The gnulib commit ID to use for the update. -GNULIB_COMMIT_SHA1="53e2c179f26a890fa6685af4b6c1397ee370433b" +GNULIB_COMMIT_SHA1="38237baf99386101934cd93278023aa4ae523ec0" # The expected version number for the various auto tools we will # use after the import. -- 2.30.2