Update gnulib to current upstream master

It has been a while since we don't update our gnulib copy against
their upstream master branch, so I thought I'd propose this patch.  It
also fixes (at least) one bug reported against GDB:

  https://sourceware.org/bugzilla/show_bug.cgi?id=23558

The problem reported there is about the replacement of 'getcwd' when
cross-compiling GDB.  With our current gnulib copy, the mechanism for
deciding whether to use the system's 'getcwd' or gnulib's version is
too simplistic and pessimistic, so when cross-compiling we always end
up using gnulib's version, which has a limitation: it cannot handle
the situation when the parent directory doesn't have read permissions.

This has been reported against upstream gnulib and the fix has been
pushed here:

  https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=a96d2e67052c879b1bcc5bc461722beac75fc372

I regtested this patch on Fedora 28 x86-64, and there were no
regressions.

OK?

gdb/ChangeLog:

2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>

	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".
This commit is contained in:
Sergio Durigan Junior 2018-08-27 18:56:03 -04:00
parent b0f492b90f
commit 7a6dbc2fdb
317 changed files with 12507 additions and 8069 deletions

View File

@ -1,3 +1,328 @@
2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
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-08-16 Gary Benson <gbenson@redhat.com>
PR gdb/13000:

545
gdb/gnulib/aclocal.m4 vendored
View File

@ -20,6 +20,460 @@ 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 <drepper@cygnus.com>, 1995-2000.
dnl Bruno Haible <haible@clisp.cons.org>, 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 <<EOT
$*
EOT
}
gt_echo='echo_func'
fi
fi
# A sed script that extracts the value of VARIABLE from a Makefile.
tab=`printf '\t'`
sed_x_variable='
# Test if the hold space is empty.
x
s/P/P/
x
ta
# Yes it was empty. Look if we have the expected variable definition.
/^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=/{
# Seen the first line of the variable definition.
s/^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=//
ba
}
bd
:a
# Here we are processing a line from the variable definition.
# Remove comment, more precisely replace it with a space.
s/#.*$/ /
# See if the line ends in a backslash.
tb
:b
s/\\$//
# Print the line, without the trailing backslash.
p
tc
# There was no trailing backslash. The end of the variable definition is
# reached. Clear the hold space.
s/^.*$//
x
bd
:c
# A trailing backslash means that the variable definition continues in the
# next line. Put a nonempty string into the hold space to indicate this.
s/^.*$/P/
x
:d
'
changequote([,])dnl
# Set POTFILES to the value of the Makefile variable POTFILES.
sed_x_POTFILES=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`
POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
# Compute POTFILES_DEPS as
# $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
POTFILES_DEPS=
for file in $POTFILES; do
POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
done
POMAKEFILEDEPS=""
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
if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
# The LINGUAS file contains the set of available languages.
ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
else
# Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`
ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
fi
# Hide the ALL_LINGUAS assignment from automake < 1.5.
eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
# 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)
# Compute PROPERTIESFILES
# as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
# Compute CLASSFILES
# as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
# Compute QMFILES
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
# Compute MSGFILES
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
# Compute RESOURCESDLLFILES
# as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
case "$ac_given_srcdir" in
.) srcdirpre= ;;
*) srcdirpre='$(srcdir)/' ;;
esac
POFILES=
UPDATEPOFILES=
DUMMYPOFILES=
GMOFILES=
PROPERTIESFILES=
CLASSFILES=
QMFILES=
MSGFILES=
RESOURCESDLLFILES=
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"
PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
QMFILES="$QMFILES $srcdirpre$lang.qm"
frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
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/'`
RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
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=
JAVACATALOGS=
QTCATALOGS=
TCLCATALOGS=
CSHARPCATALOGS=
if test -n "$INST_LINGUAS"; then
for lang in $INST_LINGUAS; do
CATALOGS="$CATALOGS $lang.gmo"
JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
QTCATALOGS="$QTCATALOGS $lang.qm"
frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
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/'`
CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
done
fi
sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$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" <<EOF
$frobbedlang.msg: $lang.po
${tab}@echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
${tab}\$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
EOF
done
fi
if grep -l '@CSHARPCATALOGS@' "$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/_/-/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" <<EOF
$frobbedlang/\$(DOMAIN).resources.dll: $lang.po
${tab}@echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
${tab}\$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
EOF
done
fi
if test -n "$POMAKEFILEDEPS"; then
cat >> "$ac_file.tmp" <<EOF
Makefile: $POMAKEFILEDEPS
EOF
fi
mv "$ac_file.tmp" "$ac_file"
])
dnl Initializes the accumulator used by AM_XGETTEXT_OPTION.
AC_DEFUN([AM_XGETTEXT_OPTION_INIT],
[
XGETTEXT_EXTRA_OPTIONS=
])
dnl Registers an option to be passed to xgettext in the po subdirectory.
AC_DEFUN([AM_XGETTEXT_OPTION],
[
AC_REQUIRE([AM_XGETTEXT_OPTION_INIT])
XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS $1"
])
# Copyright (C) 2002-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
@ -56,66 +510,6 @@ m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
# Copyright (C) 2011-2017 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.
# AM_PROG_AR([ACT-IF-FAIL])
# -------------------------
# Try to determine the archiver interface, and trigger the ar-lib wrapper
# if it is needed. If the detection of archiver interface fails, run
# ACT-IF-FAIL (default is to abort configure with a proper error message).
AC_DEFUN([AM_PROG_AR],
[AC_BEFORE([$0], [LT_INIT])dnl
AC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl
AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
AC_REQUIRE_AUX_FILE([ar-lib])dnl
AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false])
: ${AR=ar}
AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface],
[AC_LANG_PUSH([C])
am_cv_ar_interface=ar
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])],
[am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
AC_TRY_EVAL([am_ar_try])
if test "$ac_status" -eq 0; then
am_cv_ar_interface=ar
else
am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&AS_MESSAGE_LOG_FD'
AC_TRY_EVAL([am_ar_try])
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
])
AC_LANG_POP([C])])
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)
m4_default([$1],
[AC_MSG_ERROR([could not determine $AR interface])])
;;
esac
AC_SUBST([AR])dnl
])
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
# Copyright (C) 2001-2017 Free Software Foundation, Inc.
@ -937,23 +1331,6 @@ AC_LANG_POP([C])])
# For backward compatibility.
AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
# Copyright (C) 2001-2017 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.
# AM_RUN_LOG(COMMAND)
# -------------------
# Run COMMAND, save the exit status in ac_status, and log it.
# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
AC_DEFUN([AM_RUN_LOG],
[{ echo "$as_me:$LINENO: $1" >&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.
@ -1276,14 +1653,15 @@ 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])
@ -1309,6 +1687,7 @@ 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])
@ -1318,14 +1697,15 @@ 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])
@ -1337,6 +1717,7 @@ 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])
@ -1360,6 +1741,7 @@ 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])
@ -1372,11 +1754,12 @@ 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])

File diff suppressed because it is too large Load Diff

5503
gdb/gnulib/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
## DO NOT EDIT! GENERATED AUTOMATICALLY!
## Process this file with automake to produce Makefile.in.
# Copyright (C) 2002-2016 Free Software Foundation, Inc.
# Copyright (C) 2002-2018 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 <http://www.gnu.org/licenses/>.
# along with this file. If not, see <https://www.gnu.org/licenses/>.
#
# As a special exception to the GNU General Public License,
# this file may be distributed as part of a program that
@ -21,9 +21,51 @@
# 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
AUTOMAKE_OPTIONS = 1.9.6 gnits
AUTOMAKE_OPTIONS = 1.9.6 gnits subdir-objects
SUBDIRS =
noinst_HEADERS =
@ -37,6 +79,7 @@ MOSTLYCLEANDIRS =
CLEANFILES =
DISTCLEANFILES =
MAINTAINERCLEANFILES =
# No GNU Make output.
EXTRA_DIST += m4/gnulib-cache.m4
AM_CPPFLAGS =
@ -152,51 +195,6 @@ 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
@ -399,6 +397,12 @@ 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
@ -463,29 +467,46 @@ 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 <fnmatch.h> when the system
# doesn't have one that supports the required API.
# We need the following in order to create <fnmatch.h>.
if GL_GENERATE_FNMATCH_H
fnmatch.h: fnmatch.in.h $(top_builddir)/config.status $(ARG_NONNULL_H)
fnmatch.h: fnmatch.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 '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
{ 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)' \
< $(srcdir)/fnmatch.in.h; \
} > $@-t && \
mv -f $@-t $@
mv $@-t $@
else
fnmatch.h: $(top_builddir)/config.status
rm -f $@
endif
MOSTLYCLEANFILES += fnmatch.h fnmatch.h-t
EXTRA_DIST += fnmatch.c fnmatch.in.h fnmatch_loop.c
EXTRA_DIST += fnmatch.in.h
EXTRA_libgnu_a_SOURCES += fnmatch.c fnmatch_loop.c
## end gnulib module fnmatch
## end gnulib module fnmatch-h
## begin gnulib module fpucw
@ -515,9 +536,9 @@ EXTRA_libgnu_a_SOURCES += frexp.c frexpl.c
## begin gnulib module fstat
EXTRA_DIST += fstat.c
EXTRA_DIST += fstat.c stat-w32.c stat-w32.h
EXTRA_libgnu_a_SOURCES += fstat.c
EXTRA_libgnu_a_SOURCES += fstat.c stat-w32.c
## end gnulib module fstat
@ -589,32 +610,48 @@ 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 <glob.h> when the system
# doesn't have one that works with the given compiler.
# We need the following in order to create <glob.h>.
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|@''HAVE_SYS_CDEFS_H''@|$(HAVE_SYS_CDEFS_H)|g' \
{ 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' \
-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 -f $@-t $@
mv $@-t $@
else
glob.h: $(top_builddir)/config.status
rm -f $@
endif
MOSTLYCLEANFILES += glob.h glob.h-t
EXTRA_DIST += glob-libc.h glob.c glob.in.h
EXTRA_DIST += glob-libc.h glob.in.h
EXTRA_libgnu_a_SOURCES += glob.c
## end gnulib module glob
## end gnulib module glob-h
## begin gnulib module hard-locale
@ -658,6 +695,7 @@ 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' \
@ -694,6 +732,13 @@ 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)
@ -724,78 +769,21 @@ EXTRA_DIST += limits.in.h
## begin gnulib module localcharset
libgnu_a_SOURCES += localcharset.h localcharset.c
libgnu_a_SOURCES += 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
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-$@ $@
CLEANFILES += charset.alias ref-add.sed ref-del.sed
EXTRA_DIST += config.charset ref-add.sin ref-del.sin
EXTRA_DIST += localcharset.h
## end gnulib module localcharset
## begin gnulib module localtime-buffer
EXTRA_DIST += localtime-buffer.c localtime-buffer.h
EXTRA_libgnu_a_SOURCES += localtime-buffer.c
## end gnulib module localtime-buffer
## begin gnulib module lstat
@ -818,7 +806,7 @@ EXTRA_libgnu_a_SOURCES += malloc.c
libgnu_a_SOURCES += malloca.c
EXTRA_DIST += malloca.h malloca.valgrind
EXTRA_DIST += malloca.h
## end gnulib module malloca
@ -1031,11 +1019,18 @@ 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_CBRTF''@|$(REPLACE_CBRTF)|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' \
-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' \
@ -1059,6 +1054,7 @@ 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' \
@ -1091,7 +1087,12 @@ 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' \
@ -1330,14 +1331,13 @@ EXTRA_DIST += save-cwd.h
## end gnulib module save-cwd
## begin gnulib module secure_getenv
## begin gnulib module scratch_buffer
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 secure_getenv
## end gnulib module scratch_buffer
## 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,93 +1393,68 @@ 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 Makefile.am that
# gnulib Makefile snippets, it must be present in all makefiles that
# need it. This is ensured by the applicability 'all' defined above.
_NORETURN_H=$(top_srcdir)/import/extra/snippet/_Noreturn.h
_NORETURN_H=$(srcdir)/_Noreturn.h
EXTRA_DIST += $(top_srcdir)/import/extra/snippet/_Noreturn.h
EXTRA_DIST += _Noreturn.h
## end gnulib module snippet/_Noreturn
## begin gnulib module snippet/arg-nonnull
# 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.
# 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 += 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 += $(top_srcdir)/import/extra/snippet/arg-nonnull.h
EXTRA_DIST += arg-nonnull.h
## end gnulib module snippet/arg-nonnull
## begin gnulib module snippet/c++defs
# 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.
# 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 += 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=$(srcdir)/c++defs.h
CXXDEFS_H=c++defs.h
EXTRA_DIST += $(top_srcdir)/import/extra/snippet/c++defs.h
EXTRA_DIST += c++defs.h
## end gnulib module snippet/c++defs
## begin gnulib module snippet/warn-on-use
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
# 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.
WARN_ON_USE_H=warn-on-use.h
WARN_ON_USE_H=$(srcdir)/warn-on-use.h
EXTRA_DIST += $(top_srcdir)/import/extra/snippet/warn-on-use.h
EXTRA_DIST += warn-on-use.h
## end gnulib module snippet/warn-on-use
## begin gnulib module stat
EXTRA_DIST += stat.c
EXTRA_DIST += stat-w32.c stat-w32.h stat.c
EXTRA_libgnu_a_SOURCES += stat.c
EXTRA_libgnu_a_SOURCES += stat-w32.c 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)
@ -1572,6 +1547,7 @@ 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 $@
@ -1750,6 +1726,7 @@ 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' \
@ -1768,6 +1745,7 @@ 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' \
@ -1780,10 +1758,12 @@ 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' \
@ -1876,6 +1856,7 @@ 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' \
@ -1914,7 +1895,8 @@ 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_FFSL''@|$(HAVE_FFSL)|g' \
sed -e 's|@''HAVE_EXPLICIT_BZERO''@|$(HAVE_EXPLICIT_BZERO)|g' \
-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' \
@ -1935,20 +1917,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_STRCASESTR''@|$(REPLACE_STRCASESTR)|g' \
-e 's|@''REPLACE_STPNCPY''@|$(REPLACE_STPNCPY)|g' \
-e 's|@''REPLACE_STRCHRNUL''@|$(REPLACE_STRCHRNUL)|g' \
-e 's|@''REPLACE_STRDUP''@|$(REPLACE_STRDUP)|g' \
-e 's|@''REPLACE_STRSTR''@|$(REPLACE_STRSTR)|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_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_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|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)' \
@ -2002,6 +1984,7 @@ 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' \
@ -2015,6 +1998,7 @@ 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' \
@ -2098,6 +2082,7 @@ 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 $@
@ -2129,24 +2114,31 @@ time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \
-e 's/@''GNULIB_GETTIMEOFDAY''@/$(GNULIB_GETTIMEOFDAY)/g' \
-e 's/@''GNULIB_CTIME''@/$(GNULIB_CTIME)/g' \
-e 's/@''GNULIB_LOCALTIME''@/$(GNULIB_LOCALTIME)/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' \
@ -2202,6 +2194,7 @@ 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' \
@ -2221,6 +2214,7 @@ 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' \
@ -2243,8 +2237,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' \
@ -2265,10 +2259,12 @@ 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' \
@ -2277,6 +2273,7 @@ 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' \
@ -2285,6 +2282,7 @@ 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' \
@ -2299,6 +2297,7 @@ 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' \
@ -2364,6 +2363,8 @@ 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' \
@ -2403,6 +2404,7 @@ 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' \
@ -2442,6 +2444,7 @@ 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' \
| \
@ -2458,6 +2461,7 @@ 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)'; \
@ -2485,6 +2489,8 @@ 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' \
@ -2509,6 +2515,13 @@ 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 \

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
/* Memory allocation on the stack.
Copyright (C) 1995, 1999, 2001-2004, 2006-2016 Free Software Foundation,
Copyright (C) 1995, 1999, 2001-2004, 2006-2018 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
<http://www.gnu.org/licenses/>.
<https://www.gnu.org/licenses/>.
*/
/* Avoid using the symbol _ALLOCA_H here, as Bison assumes _ALLOCA_H

View File

@ -1,5 +1,5 @@
/* A C macro for declaring that specific arguments must not be NULL.
Copyright (C) 2009-2016 Free Software Foundation, Inc.
Copyright (C) 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
@ -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 <http://www.gnu.org/licenses/>. */
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* _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.

View File

@ -1,6 +1,6 @@
/* Run-time assert-like macros.
Copyright (C) 2014-2016 Free Software Foundation, Inc.
Copyright (C) 2014-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
@ -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 <http://www.gnu.org/licenses/>. */
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Paul Eggert. */

View File

@ -1,5 +1,5 @@
/* Define at-style functions like fstatat, unlinkat, fchownat, etc.
Copyright (C) 2006, 2009-2016 Free Software Foundation, Inc.
Copyright (C) 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
@ -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 <http://www.gnu.org/licenses/>. */
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* written by Jim Meyering */

View File

@ -1,6 +1,6 @@
/* basename.c -- return the last element in a file name
Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2016 Free Software
Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2018 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 <http://www.gnu.org/licenses/>. */
along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>

View File

@ -1,5 +1,5 @@
/* C++ compatible function declaration macros.
Copyright (C) 2010-2016 Free Software Foundation, Inc.
Copyright (C) 2010-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
@ -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 <http://www.gnu.org/licenses/>. */
along with this program. If not, see <https://www.gnu.org/licenses/>. */
#ifndef _GL_CXXDEFS_H
#define _GL_CXXDEFS_H
@ -133,8 +133,11 @@
static const struct _gl_ ## func ## _wrapper \
{ \
typedef rettype (*type) parameters; \
inline type rpl () const { return ::rpl_func; } \
inline operator type () const { return rpl (); } \
\
inline operator type () const \
{ \
return ::rpl_func; \
} \
} func = {}; \
} \
_GL_EXTERN_C int _gl_cxxalias_dummy
@ -155,9 +158,11 @@
static const struct _gl_ ## func ## _wrapper \
{ \
typedef rettype (*type) parameters; \
inline type rpl () const \
{ return reinterpret_cast<type>(::rpl_func); } \
inline operator type () const { return rpl (); } \
\
inline operator type () const \
{ \
return reinterpret_cast<type>(::rpl_func); \
} \
} func = {}; \
} \
_GL_EXTERN_C int _gl_cxxalias_dummy
@ -183,10 +188,13 @@
static const struct _gl_ ## func ## _wrapper \
{ \
typedef rettype (*type) parameters; \
inline type rpl () const { return ::func; } \
inline operator type () const { return rpl (); } \
\
inline operator type () const \
{ \
return ::func; \
} \
} func = {}; \
} \
} \
_GL_EXTERN_C int _gl_cxxalias_dummy
#else
# define _GL_CXXALIAS_SYS(func,rettype,parameters) \
@ -205,9 +213,11 @@
static const struct _gl_ ## func ## _wrapper \
{ \
typedef rettype (*type) parameters; \
inline type rpl () const \
{ return reinterpret_cast<type>(::func); } \
inline operator type () const { return rpl (); }\
\
inline operator type () const \
{ \
return reinterpret_cast<type>(::func); \
} \
} func = {}; \
} \
_GL_EXTERN_C int _gl_cxxalias_dummy
@ -235,10 +245,10 @@
{ \
typedef rettype (*type) parameters; \
\
inline type rpl () const \
{ return reinterpret_cast<type>((rettype2 (*) parameters2)(::func)); }\
\
inline operator type () const { return rpl (); } \
inline operator type () const \
{ \
return reinterpret_cast<type>((rettype2 (*) parameters2)(::func)); \
} \
} func = {}; \
} \
_GL_EXTERN_C int _gl_cxxalias_dummy
@ -256,7 +266,7 @@
_GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE)
# define _GL_CXXALIASWARN_1(func,namespace) \
_GL_CXXALIASWARN_2 (func, namespace)
/* To work around GCC bug <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
/* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
we enable the warning only when not optimizing. */
# if !__OPTIMIZE__
# define _GL_CXXALIASWARN_2(func,namespace) \
@ -284,7 +294,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 <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
/* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
we enable the warning only when not optimizing. */
# if !__OPTIMIZE__
# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \

View File

@ -1,5 +1,5 @@
/* Return the canonical absolute name of a given file.
Copyright (C) 1996-2016 Free Software Foundation, Inc.
Copyright (C) 1996-2018 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 <http://www.gnu.org/licenses/>. */
along with this program. If not, see <https://www.gnu.org/licenses/>. */
#ifndef _LIBC
/* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc
@ -59,8 +59,10 @@
*/
# undef getcwd
# endif
# ifdef VMS
/* We want the directory in Unix syntax, not in VMS syntax. */
# 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. */
# define __getcwd(buf, max) getcwd (buf, max, 0)
# else
# define __getcwd getcwd
@ -93,9 +95,9 @@
static void
alloc_failed (void)
{
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
#if defined _WIN32 && ! defined __CYGWIN__
/* Avoid errno problem without using the malloc or realloc modules; see:
http://lists.gnu.org/archive/html/bug-gnulib/2016-08/msg00025.html */
https://lists.gnu.org/r/bug-gnulib/2016-08/msg00025.html */
errno = ENOMEM;
#endif
}
@ -268,6 +270,8 @@ __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

508
gdb/gnulib/import/cdefs.h Normal file
View File

@ -0,0 +1,508 @@
/* 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
<https://www.gnu.org/licenses/>. */
#ifndef _SYS_CDEFS_H
#define _SYS_CDEFS_H 1
/* We are almost always included from features.h. */
#ifndef _FEATURES_H
# include <features.h>
#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 <bits/wordsize.h>
# include <bits/long-double.h>
#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 */

View File

@ -1,5 +1,5 @@
/* provide a chdir function that tries not to fail due to ENAMETOOLONG
Copyright (C) 2004-2016 Free Software Foundation, Inc.
Copyright (C) 2004-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
@ -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 <http://www.gnu.org/licenses/>. */
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* written by Jim Meyering */

View File

@ -1,5 +1,5 @@
/* provide a chdir function that tries not to fail due to ENAMETOOLONG
Copyright (C) 2004-2005, 2009-2016 Free Software Foundation, Inc.
Copyright (C) 2004-2005, 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
@ -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 <http://www.gnu.org/licenses/>. */
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Jim Meyering. */

View File

@ -1,6 +1,6 @@
/* closexec.c - set or clear the close-on-exec descriptor flag
/* cloexec.c - set or clear the close-on-exec descriptor flag
Copyright (C) 1991, 2004-2006, 2009-2016 Free Software Foundation, Inc.
Copyright (C) 1991, 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
@ -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 <http://www.gnu.org/licenses/>.
along with this program. If not, see <https://www.gnu.org/licenses/>.
The code is taken from glibc/manual/llio.texi */

View File

@ -1,6 +1,6 @@
/* closexec.c - set or clear the close-on-exec descriptor flag
/* cloexec.c - set or clear the close-on-exec descriptor flag
Copyright (C) 2004, 2009-2016 Free Software Foundation, Inc.
Copyright (C) 2004, 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
@ -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 <http://www.gnu.org/licenses/>.
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

View File

@ -1,5 +1,5 @@
/* close replacement.
Copyright (C) 2008-2016 Free Software Foundation, Inc.
Copyright (C) 2008-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
@ -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 <http://www.gnu.org/licenses/>. */
along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
@ -22,7 +22,9 @@
#include <errno.h>
#include "fd-hook.h"
#include "msvc-inval.h"
#if HAVE_MSVC_INVALID_PARAMETER_HANDLER
# include "msvc-inval.h"
#endif
#undef close

View File

@ -1,5 +1,5 @@
/* Stop reading the entries of a directory.
Copyright (C) 2006-2016 Free Software Foundation, Inc.
Copyright (C) 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
@ -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 <http://www.gnu.org/licenses/>. */
along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>

View File

@ -1,682 +0,0 @@
#! /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 <http://www.gnu.org/licenses/>.
#
# 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 <juan.guerrero@gmx.de>"
echo "# and Bruno Haible <bruno@clisp.org>."
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

View File

@ -1,5 +1,5 @@
/* Private details of the DIR type.
Copyright (C) 2011-2016 Free Software Foundation, Inc.
Copyright (C) 2011-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
@ -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 <http://www.gnu.org/licenses/>. */
along with this program. If not, see <https://www.gnu.org/licenses/>. */
#ifndef _DIRENT_PRIVATE_H
#define _DIRENT_PRIVATE_H 1

View File

@ -1,5 +1,5 @@
/* A GNU-like <dirent.h>.
Copyright (C) 2006-2016 Free Software Foundation, Inc.
Copyright (C) 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
@ -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 <http://www.gnu.org/licenses/>. */
along with this program. If not, see <https://www.gnu.org/licenses/>. */
#ifndef _@GUARD_PREFIX@_DIRENT_H

View File

@ -1,6 +1,6 @@
/* dirfd.c -- return the file descriptor associated with an open DIR*
Copyright (C) 2001, 2006, 2008-2016 Free Software Foundation, Inc.
Copyright (C) 2001, 2006, 2008-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
@ -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 <http://www.gnu.org/licenses/>. */
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Jim Meyering. */

View File

@ -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-2016 Free Software
Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2018 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 <http://www.gnu.org/licenses/>. */
along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>

View File

@ -1,6 +1,6 @@
/* Take file names apart into directory and base names.
Copyright (C) 1998, 2001, 2003-2006, 2009-2016 Free Software Foundation,
Copyright (C) 1998, 2001, 2003-2006, 2009-2018 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 <http://www.gnu.org/licenses/>. */
along with this program. If not, see <https://www.gnu.org/licenses/>. */
#ifndef DIRNAME_H_
# define DIRNAME_H_ 1
@ -36,7 +36,7 @@ extern "C" {
#endif
# if GNULIB_DIRNAME
char *base_name (char const *file);
char *base_name (char const *file) _GL_ATTRIBUTE_MALLOC;
char *dir_name (char const *file);
# endif

View File

@ -1,6 +1,6 @@
/* File names on MS-DOS/Windows systems.
Copyright (C) 2000-2001, 2004-2006, 2009-2016 Free Software Foundation, Inc.
Copyright (C) 2000-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
@ -13,16 +13,15 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
along with this program. If not, see <https://www.gnu.org/licenses/>.
From Paul Eggert and Jim Meyering. */
#ifndef _DOSNAME_H
#define _DOSNAME_H
#if (defined _WIN32 || defined __WIN32__ || \
defined __MSDOS__ || defined __CYGWIN__ || \
defined __EMX__ || defined __DJGPP__)
#if (defined _WIN32 || defined __CYGWIN__ \
|| defined __EMX__ || defined __MSDOS__ || 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' \

View File

@ -0,0 +1,38 @@
/* 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 <https://www.gnu.org/licenses/>. */
/* Written by Paul Eggert and Eric Blake. */
#include <config.h>
/* Specification. */
#include "unistd-safer.h"
#include <fcntl.h>
#include <unistd.h>
/* 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);
}

View File

@ -1,6 +1,6 @@
/* Invoke dup, but avoid some glitches.
Copyright (C) 2001, 2004-2006, 2009-2016 Free Software Foundation, Inc.
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
@ -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 <http://www.gnu.org/licenses/>. */
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Paul Eggert. */

View File

@ -1,6 +1,6 @@
/* Duplicate an open file descriptor.
Copyright (C) 2011-2016 Free Software Foundation, Inc.
Copyright (C) 2011-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
@ -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 <http://www.gnu.org/licenses/>. */
along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
@ -22,7 +22,9 @@
#include <errno.h>
#include "msvc-inval.h"
#if HAVE_MSVC_INVALID_PARAMETER_HANDLER
# include "msvc-inval.h"
#endif
#undef dup

View File

@ -1,6 +1,6 @@
/* Duplicate an open file descriptor to a specified file descriptor.
Copyright (C) 1999, 2004-2007, 2009-2016 Free Software Foundation, Inc.
Copyright (C) 1999, 2004-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
@ -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 <http://www.gnu.org/licenses/>. */
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* written by Paul Eggert */
@ -29,16 +29,45 @@
# undef dup2
# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
# if defined _WIN32 && ! defined __CYGWIN__
/* Get declarations of the native Windows API functions. */
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
# include "msvc-inval.h"
# if HAVE_MSVC_INVALID_PARAMETER_HANDLER
# include "msvc-inval.h"
# endif
/* Get _get_osfhandle. */
# include "msvc-nothrow.h"
# if GNULIB_MSVC_NOTHROW
# include "msvc-nothrow.h"
# else
# include <io.h>
# 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
static int
ms_windows_dup2 (int fd, int desired_fd)
@ -59,23 +88,14 @@ ms_windows_dup2 (int fd, int desired_fd)
}
/* Wine 1.0.1 return 0 when desired_fd is negative but not -1:
http://bugs.winehq.org/show_bug.cgi?id=21289 */
https://bugs.winehq.org/show_bug.cgi?id=21289 */
if (desired_fd < 0)
{
errno = EBADF;
return -1;
}
TRY_MSVC_INVAL
{
result = dup2 (fd, desired_fd);
}
CATCH_MSVC_INVAL
{
errno = EBADF;
result = -1;
}
DONE_MSVC_INVAL;
result = dup2_nothrow (fd, desired_fd);
if (result == 0)
result = desired_fd;

View File

@ -1,6 +1,6 @@
/* A POSIX-like <errno.h>.
Copyright (C) 2008-2016 Free Software Foundation, Inc.
Copyright (C) 2008-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
@ -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 <http://www.gnu.org/licenses/>. */
along with this program; if not, see <https://www.gnu.org/licenses/>. */
#ifndef _@GUARD_PREFIX@_ERRNO_H
@ -30,7 +30,7 @@
/* On native Windows platforms, many macros are not defined. */
# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
# if 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 __WIN32__) && ! defined __CYGWIN__
# elif 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

View File

@ -1,5 +1,5 @@
/* Error handler for noninteractive utilities
Copyright (C) 1990-1998, 2000-2007, 2009-2016 Free Software Foundation, Inc.
Copyright (C) 1990-1998, 2000-2007, 2009-2018 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 <http://www.gnu.org/licenses/>. */
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by David MacKenzie <djm@gnu.ai.mit.edu>. */
@ -93,33 +93,37 @@ extern void __error_at_line (int status, int errnum, const char *file_name,
# include <fcntl.h>
# include <unistd.h>
# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
# if defined _WIN32 && ! defined __CYGWIN__
/* Get declarations of the native Windows API functions. */
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
/* Get _get_osfhandle. */
# include "msvc-nothrow.h"
# if GNULIB_MSVC_NOTHROW
# include "msvc-nothrow.h"
# else
# include <io.h>
# endif
# endif
/* The gnulib override of fcntl is not needed in this file. */
# undef fcntl
# if !HAVE_DECL_STRERROR_R
# if !(GNULIB_STRERROR_R_POSIX || 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 ();
char *strerror_r (int errnum, char *buf, size_t buflen);
# else
int strerror_r ();
int strerror_r (int errnum, char *buf, size_t buflen);
# endif
# endif
#define program_name getprogname ()
# if HAVE_STRERROR_R || defined strerror_r
# if GNULIB_STRERROR_R_POSIX || HAVE_STRERROR_R || defined strerror_r
# define __strerror_r strerror_r
# endif /* HAVE_STRERROR_R || defined strerror_r */
# endif /* GNULIB_STRERROR_R_POSIX || HAVE_STRERROR_R || defined strerror_r */
#endif /* not _LIBC */
#if !_LIBC
@ -127,7 +131,7 @@ int strerror_r ();
static int
is_open (int fd)
{
# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
# if 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
@ -172,9 +176,9 @@ print_errno_message (int errnum)
{
char const *s;
#if defined HAVE_STRERROR_R || _LIBC
#if _LIBC || GNULIB_STRERROR_R_POSIX || defined HAVE_STRERROR_R
char errbuf[1024];
# if _LIBC || STRERROR_R_CHAR_P
# if _LIBC || (!GNULIB_STRERROR_R_POSIX && STRERROR_R_CHAR_P)
s = __strerror_r (errnum, errbuf, sizeof errbuf);
# else
if (__strerror_r (errnum, errbuf, sizeof errbuf) == 0)
@ -268,7 +272,6 @@ 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)
@ -318,6 +321,7 @@ 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);
@ -388,6 +392,7 @@ 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);

View File

@ -1,5 +1,5 @@
/* Declaration for error-reporting function
Copyright (C) 1995-1997, 2003, 2006, 2008-2016 Free Software Foundation,
Copyright (C) 1995-1997, 2003, 2006, 2008-2018 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 <http://www.gnu.org/licenses/>. */
along with this program. If not, see <https://www.gnu.org/licenses/>. */
#ifndef _ERROR_H
#define _ERROR_H 1

View File

@ -1,6 +1,6 @@
/* Failure exit status
Copyright (C) 2002-2003, 2005-2007, 2009-2016 Free Software Foundation, Inc.
Copyright (C) 2002-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
@ -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 <http://www.gnu.org/licenses/>. */
along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>

View File

@ -1,6 +1,6 @@
/* Failure exit status
Copyright (C) 2002, 2009-2016 Free Software Foundation, Inc.
Copyright (C) 2002, 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
@ -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 <http://www.gnu.org/licenses/>. */
along with this program. If not, see <https://www.gnu.org/licenses/>. */
extern int volatile exit_failure;

View File

@ -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 = '2016-01-12.23:13'; # UTC
my $VERSION = '2018-03-07.03:47'; # UTC
# Copyright (C) 2009-2016 Free Software Foundation, Inc.
# Copyright (C) 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
@ -18,7 +18,7 @@ my $VERSION = '2016-01-12.23:13'; # 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 <http://www.gnu.org/licenses/>.
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# Written by Jim Meyering and Joel E. Denny
@ -81,6 +81,7 @@ my $VERSION = '2016-01-12.23:13'; # UTC
# B. (c)
# C. @copyright{}
# D. &copy;
# 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
@ -124,7 +125,7 @@ use strict;
use warnings;
my $copyright_re = 'Copyright';
my $circle_c_re = '(?:\([cC]\)|@copyright\{}|\\\\\(co|&copy;)';
my $circle_c_re = '(?:\([cC]\)|@copyright\{}|\\\\\(co|&copy;)';
my $holder = $ENV{UPDATE_COPYRIGHT_HOLDER};
$holder ||= 'Free Software Foundation, Inc.';
my $prefix_max = 5;
@ -263,10 +264,12 @@ 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 'write-file-hooks 'time-stamp)
# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "my $VERSION = '"
# time-stamp-format: "%:y-%02m-%02d.%02H:%02M"
# time-stamp-time-zone: "UTC0"

View File

@ -1,5 +1,5 @@
/* fchdir replacement.
Copyright (C) 2006-2016 Free Software Foundation, Inc.
Copyright (C) 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
@ -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 <http://www.gnu.org/licenses/>. */
along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>

View File

@ -1,6 +1,6 @@
/* Provide file descriptor control.
Copyright (C) 2009-2016 Free Software Foundation, Inc.
Copyright (C) 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
@ -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 <http://www.gnu.org/licenses/>. */
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Eric Blake <ebb9@byu.net>. */
@ -32,13 +32,17 @@
#endif
#undef fcntl
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
#if defined _WIN32 && ! defined __CYGWIN__
/* Get declarations of the native Windows API functions. */
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
/* Get _get_osfhandle. */
# include "msvc-nothrow.h"
# if GNULIB_MSVC_NOTHROW
# include "msvc-nothrow.h"
# else
# include <io.h>
# endif
/* Upper bound on getdtablesize(). See lib/getdtablesize.c. */
# define OPEN_MAX_MAX 0x10000
@ -372,7 +376,7 @@ rpl_fcntl (int fd, int action, /* arg */...)
#if !HAVE_FCNTL
case F_GETFD:
{
# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
# if defined _WIN32 && ! defined __CYGWIN__
HANDLE handle = (HANDLE) _get_osfhandle (fd);
DWORD flags;
if (handle == INVALID_HANDLE_VALUE

View File

@ -1,6 +1,6 @@
/* Like <fcntl.h>, but with non-working flags defined to 0.
Copyright (C) 2006-2016 Free Software Foundation, Inc.
Copyright (C) 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
@ -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 <http://www.gnu.org/licenses/>. */
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* written by Paul Eggert */
@ -68,7 +68,7 @@
/* Native Windows platforms declare open(), creat() in <io.h>. */
#if (@GNULIB_OPEN@ || defined GNULIB_POSIXCHECK) \
&& ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
&& (defined _WIN32 && ! defined __CYGWIN__)
# include <io.h>
#endif
@ -213,7 +213,10 @@ _GL_WARN_ON_USE (openat, "openat is not portable - "
#endif
#ifndef O_CLOEXEC
# define O_CLOEXEC 0
# 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
#endif
#ifndef O_DIRECT

View File

@ -1,5 +1,5 @@
/* Hook for making making file descriptor functions close(), ioctl() extensible.
Copyright (C) 2009-2016 Free Software Foundation, Inc.
/* Hook for making file descriptor functions close(), ioctl() extensible.
Copyright (C) 2009-2018 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 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 <http://www.gnu.org/licenses/>. */
along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>

View File

@ -1,5 +1,5 @@
/* Hook for making making file descriptor functions close(), ioctl() extensible.
Copyright (C) 2009-2016 Free Software Foundation, Inc.
/* Hook for making file descriptor functions close(), ioctl() extensible.
Copyright (C) 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
@ -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 <http://www.gnu.org/licenses/>. */
along with this program. If not, see <https://www.gnu.org/licenses/>. */
#ifndef FD_HOOK_H

View File

@ -0,0 +1,52 @@
/* 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 <https://www.gnu.org/licenses/>. */
/* Written by Paul Eggert and Eric Blake. */
#include <config.h>
/* Specification. */
#include "unistd-safer.h"
#include <errno.h>
#include <unistd.h>
/* 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;
}

View File

@ -1,6 +1,6 @@
/* Return a safer copy of a file descriptor.
Copyright (C) 2005-2006, 2009-2016 Free Software Foundation, Inc.
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
@ -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 <http://www.gnu.org/licenses/>. */
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Paul Eggert. */

View File

@ -1,5 +1,5 @@
/* provide a replacement fdopendir function
Copyright (C) 2004-2016 Free Software Foundation, Inc.
Copyright (C) 2004-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
@ -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 <http://www.gnu.org/licenses/>. */
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* written by Jim Meyering */

View File

@ -1,5 +1,5 @@
/* Basic filename support macros.
Copyright (C) 2001-2004, 2007-2016 Free Software Foundation, Inc.
Copyright (C) 2001-2004, 2007-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
@ -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 <http://www.gnu.org/licenses/>. */
along with this program. If not, see <https://www.gnu.org/licenses/>. */
#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 __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__
#if defined _WIN32 || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__
/* Native Windows, Cygwin, OS/2, DOS */
# define ISSLASH(C) ((C) == '/' || (C) == '\\')
# define HAS_DEVICE(P) \

View File

@ -1,6 +1,6 @@
/* Concatenate two arbitrary file names.
Copyright (C) 1996-2007, 2009-2016 Free Software Foundation, Inc.
Copyright (C) 1996-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
@ -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 <http://www.gnu.org/licenses/>. */
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Jim Meyering. */
@ -31,55 +31,54 @@
# define mempcpy(D, S, N) ((void *) ((char *) memcpy (D, S, N) + (N)))
#endif
/* 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
/* Concatenate two file name components, DIR and BASE, 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, 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.
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 ".".
In any case, if BASE_IN_RESULT is non-NULL, set
*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.
*BASE_IN_RESULT to point to the copy of BASE at the end of the
returned concatenation.
Return NULL if malloc fails. */
char *
mfile_name_concat (char const *dir, char const *abase, char **base_in_result)
mfile_name_concat (char const *dir, char const *base, 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 + needs_separator + baselen + 1);
char *p_concat = malloc (dirlen + (sep != '\0') + baselen + 1);
char *p;
if (p_concat == NULL)
return NULL;
p = mempcpy (p_concat, dir, dirlen);
*p = DIRECTORY_SEPARATOR;
p += needs_separator;
*p = sep;
p += sep != '\0';
if (base_in_result)
*base_in_result = p - IS_ABSOLUTE_FILE_NAME (abase);
*base_in_result = p;
p = mempcpy (p, base, baselen);
*p = '\0';

View File

@ -1,6 +1,6 @@
/* Concatenate two arbitrary file names.
Copyright (C) 1996-1997, 2003, 2005, 2007, 2009-2016 Free Software
Copyright (C) 1996-1997, 2003, 2005, 2007, 2009-2018 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 <http://www.gnu.org/licenses/>. */
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Jim Meyering. */

View File

@ -1,19 +1,22 @@
/* Sizes of structs with flexible array members.
Copyright 2016 Free Software Foundation, Inc.
Copyright 2016-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 file is part of the GNU C Library.
This program is distributed in the hope that it will be useful,
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.
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
You should have received a copy of the GNU General Public
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>.
Written by Paul Eggert. */

View File

@ -1,5 +1,5 @@
/* Supplemental information about the floating-point formats.
Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
Copyright (C) 2007, 2009-2018 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 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 <http://www.gnu.org/licenses/>. */
along with this program; if not, see <https://www.gnu.org/licenses/>. */
#ifndef _FLOATPLUS_H
#define _FLOATPLUS_H

View File

@ -1,5 +1,5 @@
/* Auxiliary definitions for <float.h>.
Copyright (C) 2011-2016 Free Software Foundation, Inc.
Copyright (C) 2011-2018 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 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 <http://www.gnu.org/licenses/>. */
along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>

View File

@ -1,6 +1,6 @@
/* A correct <float.h>.
Copyright (C) 2007-2016 Free Software Foundation, Inc.
Copyright (C) 2007-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
@ -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 <http://www.gnu.org/licenses/>. */
along with this program. If not, see <https://www.gnu.org/licenses/>. */
#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
<http://lists.gnu.org/archive/html/bug-gnulib/2008-07/msg00063.html>. */
#if defined __i386__ && defined __FreeBSD__
<https://lists.gnu.org/r/bug-gnulib/2008-07/msg00063.html>. */
#if defined __i386__ && (defined __FreeBSD__ || defined __DragonFly__)
/* 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.3621031431120935E-4932L /* = 0x1p-16382L */
# define LDBL_MIN 3.362103143112093506262677817321752E-4932L /* = 0x1p-16382L */
/* Maximum representable finite number. */
# undef LDBL_MAX
/* LDBL_MAX is represented as { 0xFFFFFFFF, 0xFFFFFFFF, 32766 }.

View File

@ -1,4 +1,4 @@
/* Copyright (C) 1991-1993, 1996-2007, 2009-2016 Free Software Foundation, Inc.
/* Copyright (C) 1991-1993, 1996-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
@ -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 <http://www.gnu.org/licenses/>. */
along with this program; if not, see <https://www.gnu.org/licenses/>. */
#ifndef _LIBC
# include <config.h>
@ -22,10 +22,6 @@
# define _GNU_SOURCE 1
#endif
#if ! defined __builtin_expect && defined __GNUC__ && __GNUC__ < 3
# define __builtin_expect(expr, expected) (expr)
#endif
#include <fnmatch.h>
#include <alloca.h>
@ -69,6 +65,14 @@ 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))

View File

@ -1,4 +1,5 @@
/* Copyright (C) 1991-1993, 1996-1999, 2001-2003, 2005, 2007, 2009-2016 Free
/* Substitute for and wrapper around <fnmatch.h>.
Copyright (C) 1991-1993, 1996-1999, 2001-2003, 2005, 2007, 2009-2018 Free
Software Foundation, Inc.
This file is part of the GNU C Library.
@ -14,16 +15,30 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, see <http://www.gnu.org/licenses/>. */
along with this program; if not, see <https://www.gnu.org/licenses/>. */
#ifndef _FNMATCH_H
#define _FNMATCH_H 1
#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. */
/* The definition of _GL_ARG_NONNULL is copied here. */
#ifdef __cplusplus
extern "C" {
#endif
/* The definition of _GL_WARN_ON_USE is copied here. */
#if !@HAVE_FNMATCH_H@ || @REPLACE_FNMATCH@
/* We #undef these before defining them because some losing systems
(HP-UX A.08.07 for example) define these in <unistd.h>. */
@ -54,14 +69,42 @@ extern "C" {
# define FNM_NOSYS (-1)
#endif
/* Match NAME against the file name pattern PATTERN,
returning zero if it matches, FNM_NOMATCH if not. */
extern int fnmatch (const char *__pattern, const char *__name,
int __flags)
_GL_ARG_NONNULL ((1, 2));
#ifdef __cplusplus
}
#endif
#endif /* fnmatch.h */
#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
#endif /* _@GUARD_PREFIX@_FNMATCH_H */
#endif /* _@GUARD_PREFIX@_FNMATCH_H */

View File

@ -1,4 +1,4 @@
/* Copyright (C) 1991-1993, 1996-2006, 2009-2016 Free Software Foundation, Inc.
/* Copyright (C) 1991-1993, 1996-2006, 2009-2018 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 <http://www.gnu.org/licenses/>. */
along with this program; if not, see <https://www.gnu.org/licenses/>. */
/* 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,8 +1114,7 @@ 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
{
@ -1151,8 +1150,7 @@ 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

View File

@ -1,5 +1,5 @@
/* Manipulating the FPU control word. -*- coding: utf-8 -*-
Copyright (C) 2007-2016 Free Software Foundation, Inc.
Copyright (C) 2007-2018 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 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 <http://www.gnu.org/licenses/>. */
along with this program. If not, see <https://www.gnu.org/licenses/>. */
#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
http://refspecs.freestandards.org/elf/abi386-4.pdf page 3-12 = page 38
https://www.linux-mips.org/pub/linux/mips/doc/ABI/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 http://www.vinc17.org/research/extended.en.html
See Vincent Lefèvre's page https://www.vinc17.net/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. */

View File

@ -1,5 +1,5 @@
/* Split a double into fraction and mantissa.
Copyright (C) 2007-2016 Free Software Foundation, Inc.
Copyright (C) 2007-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
@ -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 <http://www.gnu.org/licenses/>. */
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Paolo Bonzini <bonzini@gnu.org>, 2003, and
Bruno Haible <bruno@clisp.org>, 2007. */

View File

@ -1,5 +1,5 @@
/* Split a 'long double' into fraction and mantissa.
Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
Copyright (C) 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
@ -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 <http://www.gnu.org/licenses/>. */
along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>

View File

@ -1,5 +1,5 @@
/* fstat() replacement.
Copyright (C) 2011-2016 Free Software Foundation, Inc.
Copyright (C) 2011-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
@ -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 <http://www.gnu.org/licenses/>. */
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* If the user's config.h happens to include <sys/stat.h>, let it include only
the system's <sys/stat.h> here, so that orig_fstat doesn't recurse to
@ -23,54 +23,41 @@
/* Get the original definition of fstat. It might be defined as a macro. */
#include <sys/types.h>
#include <sys/stat.h>
#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
#undef __need_system_sys_stat_h
#if defined _WIN32 && ! defined __CYGWIN__
# define WINDOWS_NATIVE
#endif
#if !defined WINDOWS_NATIVE
static int
orig_fstat (int fd, struct stat *buf)
{
return fstat (fd, buf);
}
#endif
/* Specification. */
/* Write "sys/stat.h" here, not <sys/stat.h>, otherwise OSF/1 5.1 DTK cc
eliminates this include because of the preliminary #include <sys/stat.h>
above. */
#include "sys/stat.h"
#include "stat-time.h"
#include <errno.h>
#include <unistd.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
#ifdef WINDOWS_NATIVE
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
# if GNULIB_MSVC_NOTHROW
# include "msvc-nothrow.h"
# else
# include <io.h>
# endif
# include "stat-w32.h"
#endif
int
@ -84,5 +71,20 @@ rpl_fstat (int fd, struct stat *buf)
return stat (name, buf);
#endif
return fstat_nothrow (fd, buf);
#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
<https://lists.gnu.org/r/bug-gnulib/2017-04/msg00134.html> */
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
}

View File

@ -1,6 +1,6 @@
/* Work around an fstatat bug on Solaris 9.
Copyright (C) 2006, 2009-2016 Free Software Foundation, Inc.
Copyright (C) 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
@ -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 <http://www.gnu.org/licenses/>. */
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Paul Eggert and Jim Meyering. */
@ -28,7 +28,7 @@
#include <sys/stat.h>
#undef __need_system_sys_stat_h
#if HAVE_FSTATAT
#if HAVE_FSTATAT && HAVE_WORKING_FSTATAT_ZERO_FLAG
static int
orig_fstatat (int fd, char const *filename, struct stat *buf, int flags)
{
@ -41,6 +41,8 @@ orig_fstatat (int fd, char const *filename, struct stat *buf, int flags)
above. */
#include "sys/stat.h"
#include "stat-time.h"
#include <errno.h>
#include <fcntl.h>
#include <string.h>
@ -51,6 +53,12 @@ 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.
@ -63,7 +71,7 @@ orig_fstatat (int fd, char const *filename, struct stat *buf, int flags)
int
rpl_fstatat (int fd, char const *file, struct stat *st, int flag)
{
int result = orig_fstatat (fd, file, st, flag);
int result = normal_fstatat (fd, file, st, flag);
size_t len;
if (LSTAT_FOLLOWS_SLASHED_SYMLINK || result != 0)
@ -79,7 +87,7 @@ rpl_fstatat (int fd, char const *file, struct stat *st, int flag)
errno = ENOTDIR;
return -1;
}
result = orig_fstatat (fd, file, st, flag & ~AT_SYMLINK_NOFOLLOW);
result = normal_fstatat (fd, file, st, flag & ~AT_SYMLINK_NOFOLLOW);
}
/* Fix stat behavior. */
if (result == 0 && !S_ISDIR (st->st_mode) && file[len - 1] == '/')
@ -111,7 +119,7 @@ stat_func (char const *name, struct stat *st)
# endif
/* Replacement for Solaris' function by the same name.
<http://www.google.com/search?q=fstatat+site:docs.sun.com>
<https://www.google.com/search?q=fstatat+site:docs.oracle.com>
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),

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2011-2016 Free Software Foundation, Inc.
/* Copyright (C) 2011-2018 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 <http://www.gnu.org/licenses/>. */
along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>

View File

@ -1,4 +1,4 @@
/* Copyright (C) 1991-1999, 2004-2016 Free Software Foundation, Inc.
/* Copyright (C) 1991-1999, 2004-2018 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 <http://www.gnu.org/licenses/>. */
along with this program. If not, see <https://www.gnu.org/licenses/>. */
#if !_LIBC
# include <config.h>

View File

@ -1,5 +1,5 @@
/* getdtablesize() function for platforms that don't have it.
Copyright (C) 2008-2016 Free Software Foundation, Inc.
/* getdtablesize() function: Return maximum possible file descriptor value + 1.
Copyright (C) 2008-2018 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This program is free software: you can redistribute it and/or modify
@ -13,18 +13,20 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
/* Specification. */
#include <unistd.h>
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
#if defined _WIN32 && ! defined __CYGWIN__
# include <stdio.h>
# include "msvc-inval.h"
# if HAVE_MSVC_INVALID_PARAMETER_HANDLER
# include "msvc-inval.h"
# endif
# if HAVE_MSVC_INVALID_PARAMETER_HANDLER
static int
@ -44,7 +46,8 @@ _setmaxstdio_nothrow (int newmax)
return result;
}
# define _setmaxstdio _setmaxstdio_nothrow
# else
# define _setmaxstdio_nothrow _setmaxstdio
# endif
/* Cache for the previous getdtablesize () result. Safe to cache because
@ -76,9 +79,9 @@ getdtablesize (void)
freed when we call _setmaxstdio with the original value. */
int orig_max_stdio = _getmaxstdio ();
unsigned int bound;
for (bound = 0x10000; _setmaxstdio (bound) < 0; bound = bound / 2)
for (bound = 0x10000; _setmaxstdio_nothrow (bound) < 0; bound = bound / 2)
;
_setmaxstdio (orig_max_stdio);
_setmaxstdio_nothrow (orig_max_stdio);
dtablesize = bound;
}
return dtablesize;

View File

@ -1,6 +1,6 @@
/* Provide a working getlogin_r for systems which lack it.
Copyright (C) 2005-2007, 2010-2016 Free Software Foundation, Inc.
Copyright (C) 2005-2007, 2010-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
@ -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 <http://www.gnu.org/licenses/>. */
along with this program; if not, see <https://www.gnu.org/licenses/>. */
/* Written by Paul Eggert, Derek Price, and Bruno Haible. */
@ -25,7 +25,9 @@
#include <errno.h>
#include <string.h>
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
#include "malloca.h"
#if defined _WIN32 && ! defined __CYGWIN__
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
#else
@ -39,7 +41,7 @@ int
getlogin_r (char *name, size_t size)
{
#undef getlogin_r
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
#if defined _WIN32 && ! defined __CYGWIN__
/* Native Windows platform. */
DWORD sz;
@ -63,9 +65,27 @@ getlogin_r (char *name, size_t size)
/* Platform with a getlogin_r() function. */
int ret = getlogin_r (name, size);
if (ret == 0 && memchr (name, '\0', size) == NULL)
/* name contains a truncated result. */
return ERANGE;
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);
}
}
return ret;
#else
/* Platform with a getlogin() function. */

View File

@ -1,5 +1,5 @@
/* Program name management.
Copyright (C) 2016 Free Software Foundation, Inc.
Copyright (C) 2016-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
@ -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 <http://www.gnu.org/licenses/>. */
along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
@ -43,6 +43,14 @@
# include <string.h>
#endif
#ifdef __sgi
# include <string.h>
# include <unistd.h>
# include <stdio.h>
# include <fcntl.h>
# include <sys/procfs.h>
#endif
#include "dirname.h"
#ifndef HAVE_GETPROGNAME /* not Mac OS X, FreeBSD, NetBSD, OpenBSD >= 5.4, Cygwin */
@ -56,7 +64,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 */
/* http://docs.oracle.com/cd/E19253-01/816-5168/6mbb3hrb1/index.html */
/* https://docs.oracle.com/cd/E19253-01/816-5168/6mbb3hrb1/index.html */
const char *p = getexecname ();
if (!p)
p = "?";
@ -66,7 +74,7 @@ getprogname (void)
const char *p = __argv && __argv[0] ? __argv[0] : "?";
return last_component (p);
# elif HAVE_VAR___PROGNAME /* OpenBSD, QNX */
/* http://man.openbsd.org/style.9 */
/* https://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,
@ -77,9 +85,8 @@ getprogname (void)
return p && p[0] ? p : "?";
# elif _AIX /* AIX */
/* Idea by Bastien ROUCARIÈS,
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
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
*/
static char *p;
static int first = 1;
@ -143,9 +150,42 @@ 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:
*/

View File

@ -1,5 +1,5 @@
/* Program name management.
Copyright (C) 2016 Free Software Foundation, Inc.
Copyright (C) 2016-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
@ -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 <http://www.gnu.org/licenses/>. */
along with this program. If not, see <https://www.gnu.org/licenses/>. */
#ifndef _GL_GETPROGNAME_H
#define _GL_GETPROGNAME_H

View File

@ -1,5 +1,5 @@
/* Convenience header for conditional use of GNU <libintl.h>.
Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2016 Free Software
Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2018 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@ -13,13 +13,14 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, see <http://www.gnu.org/licenses/>. */
with this program; if not, see <https://www.gnu.org/licenses/>. */
#ifndef _LIBGETTEXT_H
#define _LIBGETTEXT_H 1
/* NLS can be disabled through the configure --disable-nls option. */
#if ENABLE_NLS
/* 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
/* Get declarations of GNU message catalog functions. */
# include <libintl.h>
@ -184,7 +185,8 @@ npgettext_aux (const char *domain,
#include <string.h>
#if (((__GNUC__ >= 3 || __GNUG__ >= 2) && !defined __STRICT_ANSI__) \
/* || __STDC_VERSION__ >= 199901L */ )
/* || __STDC_VERSION__ == 199901L
|| (__STDC_VERSION__ >= 201112L && !defined __STDC_NO_VLA__) */ )
# define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 1
#else
# define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 0

View File

@ -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-2016 Free Software Foundation, Inc.
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
@ -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 <http://www.gnu.org/licenses/>. */
along with this program; if not, see <https://www.gnu.org/licenses/>. */
/* written by Jim Meyering */
@ -24,93 +24,99 @@
#include <time.h>
#if HAVE_SYS_TIMEB_H
# include <sys/timeb.h>
#if defined _WIN32 && ! defined __CYGWIN__
# define WINDOWS_NATIVE
# include <windows.h>
#endif
#if GETTIMEOFDAY_CLOBBERS_LOCALTIME || TZSET_CLOBBERS_LOCALTIME
#include "localtime-buffer.h"
/* 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. */
#ifdef WINDOWS_NATIVE
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 *);
/* 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)
static void
initialize (void)
{
struct tm *tm = localtime (timep);
if (localtime_buffer_addr == &tm_zero_buffer)
localtime_buffer_addr = tm;
return tm;
HMODULE kernel32 = LoadLibrary ("kernel32.dll");
if (kernel32 != NULL)
{
GetSystemTimePreciseAsFileTimeFunc =
(GetSystemTimePreciseAsFileTimeFuncType) GetProcAddress (kernel32, "GetSystemTimePreciseAsFileTime");
}
initialized = TRUE;
}
/* 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. */
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. */
int
gettimeofday (struct timeval *restrict tv, void *restrict tz)
{
#undef gettimeofday
#if HAVE_GETTIMEOFDAY
# if GETTIMEOFDAY_CLOBBERS_LOCALTIME
#ifdef WINDOWS_NATIVE
/* On native Windows, there are two ways to get the current time:
GetSystemTimeAsFileTime
<https://msdn.microsoft.com/en-us/library/ms724397.aspx>
or
GetSystemTimePreciseAsFileTime
<https://msdn.microsoft.com/en-us/library/hh706895.aspx>.
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:
<http://www.windowstimestamp.com/description>. */
FILETIME current_time;
if (!initialized)
initialize ();
if (GetSystemTimePreciseAsFileTimeFunc != NULL)
GetSystemTimePreciseAsFileTimeFunc (&current_time);
else
GetSystemTimeAsFileTime (&current_time);
/* Convert from FILETIME to 'struct timeval'. */
/* FILETIME: <https://msdn.microsoft.com/en-us/library/ms724284.aspx> */
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
/* 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)
@ -118,25 +124,16 @@ 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
@ -146,9 +143,8 @@ gettimeofday (struct timeval *restrict tv, void *restrict tz)
tv->tv_sec = time (NULL);
tv->tv_usec = 0;
# endif
return 0;
# endif
#endif
}

View File

@ -1,19 +1,19 @@
/* Copyright (C) 1991-1992, 1995-1998, 2000-2001, 2004-2007, 2009-2016 Free
Software Foundation, Inc.
/* Copyright (C) 1991-2018 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.
This program is distributed in the hope that it will be useful,
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.
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
You should have received a copy of the GNU General Public
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
#ifndef _GLOB_H
#define _GLOB_H 1
@ -22,42 +22,10 @@
# include <sys/cdefs.h>
#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
/* 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 <stddef.h>
# 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
#define __need_size_t
#include <stddef.h>
/* Bits set in the FLAGS argument to 'glob'. */
#define GLOB_ERR (1 << 0)/* Return on read errors. */
@ -69,7 +37,7 @@ typedef __SIZE_TYPE__ size_t;
#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_BSD || defined __USE_GNU
#if !defined __USE_POSIX2 || defined __USE_MISC
# 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". */
@ -105,9 +73,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
@ -120,23 +88,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;
#if defined __USE_LARGEFILE64 && !defined __GLOB_GNULIB
#ifdef __USE_LARGEFILE64
# 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
@ -149,20 +117,15 @@ 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,
@ -171,29 +134,28 @@ 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 || __GNUC__ < 2 || defined __GLOB_GNULIB
extern int glob (const char *_Restrict_ __pattern, int __flags,
#if !defined __USE_FILE_OFFSET64 || defined __GLOB_GNULIB
extern int glob (const char *__restrict __pattern, int __flags,
int (*__errfunc) (const char *, int),
glob_t *_Restrict_ __pglob) __THROW _GL_ARG_NONNULL ((1, 4));
glob_t *__restrict __pglob) __THROW;
/* Free storage allocated in PGLOB by a previous 'glob' call. */
extern void globfree (glob_t *__pglob) __THROW _GL_ARG_NONNULL ((1));
extern void globfree (glob_t *__pglob) __THROW;
#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
#if defined __USE_LARGEFILE64 && !defined __GLOB_GNULIB
extern int glob64 (const char *_Restrict_ __pattern, int __flags,
#ifdef __USE_LARGEFILE64
extern int glob64 (const char *__restrict __pattern, int __flags,
int (*__errfunc) (const char *, int),
glob64_t *_Restrict_ __pglob)
__THROW _GL_ARG_NONNULL ((1, 4));
glob64_t *__restrict __pglob) __THROW;
extern void globfree64 (glob64_t *__pglob) __THROW _GL_ARG_NONNULL ((1));
extern void globfree64 (glob64_t *__pglob) __THROW;
#endif
@ -203,8 +165,7 @@ extern void globfree64 (glob64_t *__pglob) __THROW _GL_ARG_NONNULL ((1));
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 _GL_ARG_NONNULL ((1));
extern int glob_pattern_p (const char *__pattern, int __quote) __THROW;
#endif
__END_DECLS

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
/* glob.h -- Find a path matching a pattern.
Copyright (C) 2005-2007, 2009-2016 Free Software Foundation, Inc.
Copyright (C) 2005-2007, 2009-2018 Free Software Foundation, Inc.
Written by Derek Price <derek@ximbiot.com> & Paul Eggert <eggert@CS.UCLA.EDU>
@ -15,37 +15,22 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, see <http://www.gnu.org/licenses/>. */
along with this program; if not, see <https://www.gnu.org/licenses/>. */
#ifndef _GL_GLOB_H
#define _GL_GLOB_H
#ifndef _@GUARD_PREFIX@_GLOB_H
#if @HAVE_SYS_CDEFS_H@
# include <sys/cdefs.h>
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
#endif
@PRAGMA_COLUMNS@
/* The include_next requires a split double-inclusion guard. */
#if @HAVE_GLOB_H@ && !@REPLACE_GLOB@
# @INCLUDE_NEXT@ @NEXT_GLOB_H@
#endif
#include <stddef.h>
/* On some systems, such as AIX 5.1, <sys/stat.h> does a "#define stat stat64".
Make sure this definition is seen before glob-libc.h defines types that
rely on 'struct stat'. */
#include <sys/stat.h>
#ifndef __BEGIN_DECLS
# ifdef __cplusplus
# define __BEGIN_DECLS extern "C" {
# define __END_DECLS }
# else
# define __BEGIN_DECLS
# define __END_DECLS
# endif
#endif
#ifndef __THROW
# define __THROW
#endif
#ifndef __THROWNL
# define __THROWNL
#endif
#ifndef _@GUARD_PREFIX@_GLOB_H
#define _@GUARD_PREFIX@_GLOB_H
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
@ -53,41 +38,143 @@
/* The definition of _GL_WARN_ON_USE is copied here. */
#ifndef __size_t
# define __size_t size_t
#endif
#ifndef __USE_GNU
# define __USE_GNU 1
#endif
#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"
__BEGIN_DECLS
typedef int (*_gl_glob_errfunc_fn) (const char *, int);
__END_DECLS
#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));
_GL_CXXALIAS_RPL (globfree, void, (glob_t *__pglob));
_GL_CXXALIAS_RPL (glob_pattern_p, int, (const char *__pattern, int __quote));
# if 0 /* The C function name is rpl_glob, not glob. */
_GL_CXXALIASWARN (glob);
_GL_CXXALIASWARN (globfree);
_GL_CXXALIASWARN (glob_pattern_p);
/* 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
#endif /* _GL_GLOB_H */
#ifdef __cplusplus
extern "C" {
#endif
typedef int (*_gl_glob_errfunc_fn) (const char *, int);
#ifdef __cplusplus
}
#endif
#if !@HAVE_GLOB_H@ || @REPLACE_GLOB@
/* Preparations for including the standard GNU C Library header. */
# include <libc-config.h>
# include <stddef.h>
/* On some systems, such as AIX 5.1, <sys/stat.h> does a "#define stat stat64".
Make sure this definition is seen before glob-libc.h defines types that
rely on 'struct stat'. */
# include <sys/stat.h>
# 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
/* Now the standard GNU C Library header should work. */
# include "glob-libc.h"
#endif
#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)));
_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
_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 */

View File

@ -0,0 +1,65 @@
/* 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
<https://www.gnu.org/licenses/>. */
#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 */

View File

@ -0,0 +1,33 @@
/* 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
<https://www.gnu.org/licenses/>. */
#ifndef _LIBC
# include <libc-config.h>
#endif
#include <glob.h>
#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)

View File

@ -0,0 +1,41 @@
/* 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
<https://www.gnu.org/licenses/>. */
#ifndef _LIBC
# include <libc-config.h>
#endif
#include <glob.h>
#include <stdlib.h>
/* 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

View File

@ -1,6 +1,6 @@
/* hard-locale.c -- Determine whether a locale is hard.
Copyright (C) 1997-1999, 2002-2004, 2006-2007, 2009-2016 Free Software
Copyright (C) 1997-1999, 2002-2004, 2006-2007, 2009-2018 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 <http://www.gnu.org/licenses/>. */
along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>

View File

@ -1,6 +1,6 @@
/* Determine whether a locale is hard.
Copyright (C) 1999, 2003-2004, 2009-2016 Free Software Foundation, Inc.
Copyright (C) 1999, 2003-2004, 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
@ -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 <http://www.gnu.org/licenses/>. */
along with this program. If not, see <https://www.gnu.org/licenses/>. */
#ifndef HARD_LOCALE_H_
# define HARD_LOCALE_H_ 1

View File

@ -1,6 +1,6 @@
/* intprops.h -- properties of integer types
Copyright (C) 2001-2016 Free Software Foundation, Inc.
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
@ -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 <http://www.gnu.org/licenses/>. */
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Paul Eggert. */
@ -21,17 +21,12 @@
#define _GL_INTPROPS_H
#include <limits.h>
#include <verify.h>
#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
<http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00406.html>. */
<https://lists.gnu.org/r/bug-gnulib/2011-05/msg00406.html>. */
#define _GL_INT_NEGATE_CONVERT(e, v) (0 * (e) - (v))
/* The extra casts in the following macros work around compiler bugs,
@ -84,24 +79,7 @@
/* 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.
As a sanity check, test the assumption for some signed types that
<limits.h> 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
This assumption is tested by the intprops-tests module. */
/* Does the __typeof__ keyword work? This could be done by
'configure', but for now it's easier to do it by hand. */
@ -201,7 +179,7 @@ verify (TYPE_WIDTH (unsigned int) == UINT_WIDTH);
/* Return 1 if A * B would overflow in [MIN,MAX] arithmetic.
See above for restrictions. Avoid && and || as they tickle
bugs in Sun C 5.11 2010/08/13 and other compilers; see
<http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00401.html>. */
<https://lists.gnu.org/r/bug-gnulib/2011-05/msg00401.html>. */
#define INT_MULTIPLY_RANGE_OVERFLOW(a, b, min, max) \
((b) < 0 \
? ((a) < 0 \
@ -241,12 +219,14 @@ verify (TYPE_WIDTH (unsigned int) == UINT_WIDTH);
: (max) >> (b) < (a))
/* True if __builtin_add_overflow (A, B, P) works when P is non-null. */
#define _GL_HAS_BUILTIN_OVERFLOW \
(5 <= __GNUC__ || __has_builtin (__builtin_add_overflow))
#if 5 <= __GNUC__ && !defined __ICC
# define _GL_HAS_BUILTIN_OVERFLOW 1
#else
# define _GL_HAS_BUILTIN_OVERFLOW 0
#endif
/* True if __builtin_add_overflow_p (A, B, C) works. */
#define _GL_HAS_BUILTIN_OVERFLOW_P \
(7 <= __GNUC__ || __has_builtin (__builtin_add_overflow_p))
#define _GL_HAS_BUILTIN_OVERFLOW_P (7 <= __GNUC__)
/* The _GL*_OVERFLOW macros have the same restrictions as the
*_RANGE_OVERFLOW macros, except that they do not assume that operands
@ -395,10 +375,10 @@ verify (TYPE_WIDTH (unsigned int) == UINT_WIDTH);
(_Generic \
(*(r), \
signed char: \
_GL_INT_OP_CALC (a, b, r, op, overflow, unsigned char, \
_GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
signed char, SCHAR_MIN, SCHAR_MAX), \
short int: \
_GL_INT_OP_CALC (a, b, r, op, overflow, unsigned short int, \
_GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
short int, SHRT_MIN, SHRT_MAX), \
int: \
_GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
@ -412,10 +392,10 @@ verify (TYPE_WIDTH (unsigned int) == UINT_WIDTH);
#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 char, \
? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
signed char, SCHAR_MIN, SCHAR_MAX) \
: sizeof *(r) == sizeof (short int) \
? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned short int, \
? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
short int, SHRT_MIN, SHRT_MAX) \
: sizeof *(r) == sizeof (int) \
? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
@ -437,9 +417,8 @@ verify (TYPE_WIDTH (unsigned int) == UINT_WIDTH);
/* Store the low-order bits of A <op> 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 extremal values TMIN and
TMAX. T must be a signed integer type. Return 1 if the result
overflows. */
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. */
#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) \
@ -448,17 +427,27 @@ verify (TYPE_WIDTH (unsigned int) == UINT_WIDTH);
((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, tmin, tmax), 1) \
: (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t, tmin, tmax), 0))
? (*(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 A <op> 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)))
/* Return the low-order bits of A <op> 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)))
#endif /* _GL_INTPROPS_H */

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2006-2016 Free Software Foundation, Inc.
/* Copyright (C) 2006-2018 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 <http://www.gnu.org/licenses/>. */
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/*
* ISO C 99 <inttypes.h> for platforms that lack it.
@ -52,7 +52,7 @@
/* Get CHAR_BIT. */
#include <limits.h>
/* On mingw, __USE_MINGW_ANSI_STDIO only works if <stdio.h> is also included */
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
#if defined _WIN32 && ! defined __CYGWIN__
# include <stdio.h>
#endif
@ -1067,11 +1067,13 @@ _GL_WARN_ON_USE (imaxabs, "imaxabs is unportable - "
#endif
#if @GNULIB_IMAXDIV@
# if !@HAVE_DECL_IMAXDIV@
# if !@HAVE_IMAXDIV_T@
# 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

View File

@ -1,5 +1,5 @@
/* Test for NaN that does not need libm.
Copyright (C) 2007-2016 Free Software Foundation, Inc.
Copyright (C) 2007-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
@ -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 <http://www.gnu.org/licenses/>. */
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */

View File

@ -1,5 +1,5 @@
/* Test for NaN that does not need libm.
Copyright (C) 2007-2016 Free Software Foundation, Inc.
Copyright (C) 2007-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
@ -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 <http://www.gnu.org/licenses/>. */
along with this program. If not, see <https://www.gnu.org/licenses/>. */
#if HAVE_ISNAND_IN_LIBC
/* Get declaration of isnan macro. */

View File

@ -1,5 +1,5 @@
/* Test for NaN that does not need libm.
Copyright (C) 2008-2016 Free Software Foundation, Inc.
Copyright (C) 2008-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
@ -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 <http://www.gnu.org/licenses/>. */
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>, 2008. */

View File

@ -1,5 +1,5 @@
/* Test for NaN that does not need libm.
Copyright (C) 2007-2016 Free Software Foundation, Inc.
Copyright (C) 2007-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
@ -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 <http://www.gnu.org/licenses/>. */
along with this program. If not, see <https://www.gnu.org/licenses/>. */
#if HAVE_ISNANL_IN_LIBC
/* Get declaration of isnan macro or (older) isnanl function. */

View File

@ -1,5 +1,5 @@
/* Test for NaN that does not need libm.
Copyright (C) 2007, 2009-2016 Free Software Foundation, Inc.
Copyright (C) 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
@ -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 <http://www.gnu.org/licenses/>. */
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */

View File

@ -1,5 +1,5 @@
/* Replacement for 'int' to 'long double' conversion routine.
Copyright (C) 2011-2016 Free Software Foundation, Inc.
Copyright (C) 2011-2018 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 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 <http://www.gnu.org/licenses/>. */
along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>

View File

@ -0,0 +1,174 @@
/* 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
<https://www.gnu.org/licenses/>. */
/* Written by Paul Eggert. */
/* This is intended to be a good-enough substitute for glibc system
macros like those defined in <sys/cdefs.h>, so that Gnulib code
shared with glibc can do this as the first #include:
#ifndef _LIBC
# include <libc-config.h>
#endif
When compiled as part of glibc this is a no-op; when compiled as
part of Gnulib this includes Gnulib's <config.h> and defines macros
that glibc library code would normally assume. */
#include <config.h>
/* On glibc this includes <features.h> and <sys/cdefs.h> and #defines
_FEATURES_H, __WORDSIZE, and __set_errno. On FreeBSD 11 it
includes <sys/cdefs.h> which defines __nonnull. Elsewhere it
is harmless. */
#include <errno.h>
/* From glibc <errno.h>. */
#ifndef __set_errno
# define __set_errno(val) (errno = (val))
#endif
/* From glibc <features.h>. */
#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 <cdefs.h>, which is our copy of glibc
<sys/cdefs.h>. */
/* Define _FEATURES_H so that <cdefs.h> does not include <features.h>. */
#ifndef _FEATURES_H
# define _FEATURES_H 1
#endif
/* Define __WORDSIZE so that <cdefs.h> 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
<sys/cdefs.h>, 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 <sys/cdefs.h>. */
#include <cdefs.h>
/* <cdefs.h> __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 <libc-symbols.h>, 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 <shlib-compat.h>, good enough for Gnulib. */
#define SHLIB_COMPAT(lib, introduced, obsoleted) 0
#define versioned_symbol(lib, local, symbol, version)

View File

@ -1,6 +1,6 @@
/* A GNU-like <limits.h>.
Copyright 2016 Free Software Foundation, Inc.
Copyright 2016-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
@ -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 <http://www.gnu.org/licenses/>. */
along with this program; if not, see <https://www.gnu.org/licenses/>. */
#ifndef _@GUARD_PREFIX@_LIMITS_H
@ -28,6 +28,17 @@
#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

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
/* Determine a canonical name for the current locale's character encoding.
Copyright (C) 2000-2003, 2009-2016 Free Software Foundation, Inc.
Copyright (C) 2000-2003, 2009-2018 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 <http://www.gnu.org/licenses/>. */
with this program; if not, see <https://www.gnu.org/licenses/>. */
#ifndef _LOCALCHARSET_H
#define _LOCALCHARSET_H
@ -25,12 +25,106 @@ extern "C" {
/* Determine the current locale's character encoding, and canonicalize it
into one of the canonical names listed in config.charset.
into one of the canonical names listed below.
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
}

View File

@ -0,0 +1,58 @@
/* 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 <https://www.gnu.org/licenses/>. */
/* written by Jim Meyering */
#include <config.h>
/* 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

View File

@ -0,0 +1,27 @@
/* 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 <https://www.gnu.org/licenses/>. */
/* written by Jim Meyering */
#include <time.h>
#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

View File

@ -1,6 +1,6 @@
/* Work around a bug of lstat on some systems
Copyright (C) 1997-2006, 2008-2016 Free Software Foundation, Inc.
Copyright (C) 1997-2006, 2008-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
@ -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 <http://www.gnu.org/licenses/>. */
along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* written by Jim Meyering */
@ -47,6 +47,8 @@ orig_lstat (const char *filename, struct stat *buf)
above. */
# include "sys/stat.h"
# include "stat-time.h"
# include <string.h>
# include <errno.h>
@ -66,32 +68,33 @@ orig_lstat (const char *filename, struct stat *buf)
int
rpl_lstat (const char *file, struct stat *sbuf)
{
size_t len;
int lstat_result = orig_lstat (file, sbuf);
if (lstat_result != 0)
return lstat_result;
int result = orig_lstat (file, sbuf);
/* 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. */
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 (result == 0)
{
errno = ENOTDIR;
return -1;
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);
}
}
return stat (file, sbuf);
return result;
}
#endif /* HAVE_LSTAT */

View File

@ -1,5 +1,5 @@
# 00gnulib.m4 serial 3
dnl Copyright (C) 2009-2016 Free Software Foundation, Inc.
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.

View File

@ -0,0 +1,22 @@
# 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
])

View File

@ -1,5 +1,5 @@
# absolute-header.m4 serial 16
dnl Copyright (C) 2006-2016 Free Software Foundation, Inc.
dnl Copyright (C) 2006-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.

View File

@ -1,5 +1,5 @@
# alloca.m4 serial 14
dnl Copyright (C) 2002-2004, 2006-2007, 2009-2016 Free Software Foundation,
dnl Copyright (C) 2002-2004, 2006-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,
@ -44,12 +44,12 @@ AC_DEFUN([gl_FUNC_ALLOCA],
AC_DEFUN([gl_PREREQ_ALLOCA], [:])
# This works around a bug in autoconf <= 2.68.
# See <http://lists.gnu.org/archive/html/bug-gnulib/2011-06/msg00277.html>.
# See <https://lists.gnu.org/r/bug-gnulib/2011-06/msg00277.html>.
m4_version_prereq([2.69], [] ,[
# This is taken from the following Autoconf patch:
# http://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=6cd9f12520b0d6f76d3230d7565feba1ecf29497
# https://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=6cd9f12520b0d6f76d3230d7565feba1ecf29497
# _AC_LIBOBJ_ALLOCA
# -----------------

View File

@ -0,0 +1,49 @@
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 <builtins.h>
int
main (int argc, char **argv)
{
argc = __builtin_expect (argc, 100);
return argv[argc != 100][0];
}]])],
[gl_cv___builtin_expect="in <builtins.h>"],
[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 <builtins.h>"; 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 <builtins.h> does. */
#undef HAVE___BUILTIN_EXPECT
#ifndef HAVE___BUILTIN_EXPECT
# define __builtin_expect(e, c) (e)
#elif HAVE___BUILTIN_EXPECT == 2
# include <builtins.h>
#endif
])
])

View File

@ -1,6 +1,6 @@
# canonicalize.m4 serial 28
# canonicalize.m4 serial 29
dnl Copyright (C) 2003-2007, 2009-2016 Free Software Foundation, Inc.
dnl Copyright (C) 2003-2007, 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,
@ -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,6 +113,8 @@ 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

View File

@ -1,4 +1,4 @@
#serial 15
#serial 16
# 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-2016 Free Software Foundation, Inc.
dnl Copyright (C) 2004-2007, 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.
@ -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], [:])

View File

@ -1,5 +1,5 @@
# close.m4 serial 8
dnl Copyright (C) 2008-2016 Free Software Foundation, Inc.
# close.m4 serial 9
dnl Copyright (C) 2008-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.
@ -7,10 +7,12 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_CLOSE],
[
AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
AC_REQUIRE([gl_MSVC_INVAL])
if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
REPLACE_CLOSE=1
fi
m4_ifdef([gl_MSVC_INVAL], [
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

Some files were not shown because too many files have changed in this diff Show More