aboutsummaryrefslogtreecommitdiff
path: root/gnulib/import
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2020-02-22 20:31:54 -0500
committerSimon Marchi <simon.marchi@polymtl.ca>2020-02-22 20:37:18 -0500
commit5df4cba632201687fd8472663138fbeffaa8f315 (patch)
tree330eb3060e16abd42ff22c501843164d1a97b3e5 /gnulib/import
parent7e702065b4730379730c58a2c72e8715526c8875 (diff)
downloadgdb-5df4cba632201687fd8472663138fbeffaa8f315.zip
gdb-5df4cba632201687fd8472663138fbeffaa8f315.tar.gz
gdb-5df4cba632201687fd8472663138fbeffaa8f315.tar.bz2
gdb: update gnulib import
This is mostly to get this commit from gnulib: e22cd2677a4b7beacbf30b93bb0559f7b89f96ce Add ‘extern "C"’ to count-one-bits.h etc. ... which fixes this compilation problem I observed with clang++: CXXLD gdb arch/arm-get-next-pcs.o:arm-get-next-pcs.c:function thumb_get_next_pcs_raw(arm_get_next_pcs*): error: undefined reference to 'count_one_bits(unsigned int)' <more such undefined references> I built-tested on GNU/Linux x86-64 (gcc-9 and clang-9) as well as with the x86_64-w64-mingw32-gcc cross-compiler. gnulib/ChangeLog: * update-gnulib.sh (GNULIB_COMMIT_SHA1): Bump to e22cd2677a4b7beacbf30b93bb0559f7b89f96ce. * Makefile.in, config.in, configure, import/*: Re-generate.
Diffstat (limited to 'gnulib/import')
-rw-r--r--gnulib/import/Makefile.am80
-rw-r--r--gnulib/import/Makefile.in258
-rw-r--r--gnulib/import/_Noreturn.h7
-rw-r--r--gnulib/import/alloca.in.h2
-rw-r--r--gnulib/import/arg-nonnull.h2
-rw-r--r--gnulib/import/arpa_inet.in.h2
-rw-r--r--gnulib/import/assure.h2
-rw-r--r--gnulib/import/at-func.c2
-rw-r--r--gnulib/import/basename-lgpl.c2
-rw-r--r--gnulib/import/c++defs.h5
-rw-r--r--gnulib/import/canonicalize-lgpl.c2
-rw-r--r--gnulib/import/cdefs.h2
-rw-r--r--gnulib/import/chdir-long.c2
-rw-r--r--gnulib/import/chdir-long.h2
-rw-r--r--gnulib/import/cloexec.c2
-rw-r--r--gnulib/import/cloexec.h2
-rw-r--r--gnulib/import/close.c2
-rw-r--r--gnulib/import/closedir.c2
-rw-r--r--gnulib/import/count-one-bits.h10
-rw-r--r--gnulib/import/dirent-private.h2
-rw-r--r--gnulib/import/dirent.in.h2
-rw-r--r--gnulib/import/dirfd.c2
-rw-r--r--gnulib/import/dirname-lgpl.c2
-rw-r--r--gnulib/import/dirname.h2
-rw-r--r--gnulib/import/dosname.h2
-rw-r--r--gnulib/import/dup-safer-flag.c2
-rw-r--r--gnulib/import/dup-safer.c2
-rw-r--r--gnulib/import/dup.c2
-rw-r--r--gnulib/import/dup2.c2
-rw-r--r--gnulib/import/errno.in.h2
-rw-r--r--gnulib/import/error.c2
-rw-r--r--gnulib/import/error.h2
-rw-r--r--gnulib/import/exitfail.c2
-rw-r--r--gnulib/import/exitfail.h2
-rwxr-xr-xgnulib/import/extra/config.rpath684
-rwxr-xr-xgnulib/import/extra/update-copyright2
-rw-r--r--gnulib/import/fchdir.c2
-rw-r--r--gnulib/import/fcntl.c2
-rw-r--r--gnulib/import/fcntl.in.h2
-rw-r--r--gnulib/import/fd-hook.c2
-rw-r--r--gnulib/import/fd-hook.h2
-rw-r--r--gnulib/import/fd-safer-flag.c2
-rw-r--r--gnulib/import/fd-safer.c2
-rw-r--r--gnulib/import/fdopendir.c2
-rw-r--r--gnulib/import/filename.h2
-rw-r--r--gnulib/import/filenamecat-lgpl.c2
-rw-r--r--gnulib/import/filenamecat.h2
-rw-r--r--gnulib/import/flexmember.h2
-rw-r--r--gnulib/import/float+.h2
-rw-r--r--gnulib/import/float.c2
-rw-r--r--gnulib/import/float.in.h2
-rw-r--r--gnulib/import/fnmatch.c2
-rw-r--r--gnulib/import/fnmatch.in.h2
-rw-r--r--gnulib/import/fnmatch_loop.c2
-rw-r--r--gnulib/import/fpucw.h2
-rw-r--r--gnulib/import/frexp.c2
-rw-r--r--gnulib/import/frexpl.c2
-rw-r--r--gnulib/import/fstat.c2
-rw-r--r--gnulib/import/fstatat.c2
-rw-r--r--gnulib/import/getcwd-lgpl.c2
-rw-r--r--gnulib/import/getcwd.c2
-rw-r--r--gnulib/import/getdtablesize.c2
-rw-r--r--gnulib/import/getlogin_r.c2
-rw-r--r--gnulib/import/getprogname.c2
-rw-r--r--gnulib/import/getprogname.h2
-rw-r--r--gnulib/import/gettext.h2
-rw-r--r--gnulib/import/gettimeofday.c2
-rw-r--r--gnulib/import/glob-libc.h2
-rw-r--r--gnulib/import/glob.c14
-rw-r--r--gnulib/import/glob.in.h2
-rw-r--r--gnulib/import/glob_internal.h2
-rw-r--r--gnulib/import/glob_pattern_p.c2
-rw-r--r--gnulib/import/globfree.c2
-rw-r--r--gnulib/import/glthread/lock.c24
-rw-r--r--gnulib/import/glthread/lock.h30
-rw-r--r--gnulib/import/glthread/threadlib.c2
-rw-r--r--gnulib/import/hard-locale.c47
-rw-r--r--gnulib/import/hard-locale.h7
-rw-r--r--gnulib/import/inet_ntop.c2
-rw-r--r--gnulib/import/intprops.h2
-rw-r--r--gnulib/import/inttypes.in.h12
-rw-r--r--gnulib/import/isnan.c2
-rw-r--r--gnulib/import/isnand-nolibm.h2
-rw-r--r--gnulib/import/isnand.c2
-rw-r--r--gnulib/import/isnanl-nolibm.h2
-rw-r--r--gnulib/import/isnanl.c2
-rw-r--r--gnulib/import/itold.c2
-rw-r--r--gnulib/import/lc-charset-dispatch.c82
-rw-r--r--gnulib/import/lc-charset-dispatch.h40
-rw-r--r--gnulib/import/libc-config.h15
-rw-r--r--gnulib/import/limits.in.h2
-rw-r--r--gnulib/import/localcharset.c89
-rw-r--r--gnulib/import/localcharset.h31
-rw-r--r--gnulib/import/locale.in.h305
-rw-r--r--gnulib/import/localtime-buffer.c2
-rw-r--r--gnulib/import/localtime-buffer.h2
-rw-r--r--gnulib/import/lstat.c2
-rw-r--r--gnulib/import/m4/00gnulib.m481
-rw-r--r--gnulib/import/m4/__inline.m42
-rw-r--r--gnulib/import/m4/absolute-header.m42
-rw-r--r--gnulib/import/m4/alloca.m42
-rw-r--r--gnulib/import/m4/arpa_inet_h.m42
-rw-r--r--gnulib/import/m4/builtin-expect.m42
-rw-r--r--gnulib/import/m4/canonicalize.m42
-rw-r--r--gnulib/import/m4/chdir-long.m42
-rw-r--r--gnulib/import/m4/close.m42
-rw-r--r--gnulib/import/m4/closedir.m42
-rw-r--r--gnulib/import/m4/codeset.m42
-rw-r--r--gnulib/import/m4/count-one-bits.m412
-rw-r--r--gnulib/import/m4/d-ino.m42
-rw-r--r--gnulib/import/m4/d-type.m42
-rw-r--r--gnulib/import/m4/dirent_h.m42
-rw-r--r--gnulib/import/m4/dirfd.m42
-rw-r--r--gnulib/import/m4/dirname.m42
-rw-r--r--gnulib/import/m4/double-slash-root.m42
-rw-r--r--gnulib/import/m4/dup.m42
-rw-r--r--gnulib/import/m4/dup2.m42
-rw-r--r--gnulib/import/m4/eealloc.m42
-rw-r--r--gnulib/import/m4/environ.m42
-rw-r--r--gnulib/import/m4/errno_h.m42
-rw-r--r--gnulib/import/m4/error.m42
-rw-r--r--gnulib/import/m4/exponentd.m42
-rw-r--r--gnulib/import/m4/exponentl.m42
-rw-r--r--gnulib/import/m4/extensions.m42
-rw-r--r--gnulib/import/m4/extern-inline.m42
-rw-r--r--gnulib/import/m4/fchdir.m42
-rw-r--r--gnulib/import/m4/fcntl-o.m42
-rw-r--r--gnulib/import/m4/fcntl.m42
-rw-r--r--gnulib/import/m4/fcntl_h.m42
-rw-r--r--gnulib/import/m4/fdopendir.m42
-rw-r--r--gnulib/import/m4/filenamecat.m42
-rw-r--r--gnulib/import/m4/flexmember.m42
-rw-r--r--gnulib/import/m4/float_h.m42
-rw-r--r--gnulib/import/m4/fnmatch.m42
-rw-r--r--gnulib/import/m4/fnmatch_h.m42
-rw-r--r--gnulib/import/m4/fpieee.m42
-rw-r--r--gnulib/import/m4/frexp.m42
-rw-r--r--gnulib/import/m4/frexpl.m42
-rw-r--r--gnulib/import/m4/fstat.m42
-rw-r--r--gnulib/import/m4/fstatat.m42
-rw-r--r--gnulib/import/m4/getcwd-abort-bug.m42
-rw-r--r--gnulib/import/m4/getcwd-path-max.m42
-rw-r--r--gnulib/import/m4/getcwd.m42
-rw-r--r--gnulib/import/m4/getdtablesize.m42
-rw-r--r--gnulib/import/m4/getlogin.m42
-rw-r--r--gnulib/import/m4/getlogin_r.m42
-rw-r--r--gnulib/import/m4/getpagesize.m42
-rw-r--r--gnulib/import/m4/getprogname.m42
-rw-r--r--gnulib/import/m4/gettimeofday.m42
-rw-r--r--gnulib/import/m4/glob.m42
-rw-r--r--gnulib/import/m4/glob_h.m42
-rw-r--r--gnulib/import/m4/gnulib-cache.m42
-rw-r--r--gnulib/import/m4/gnulib-common.m423
-rw-r--r--gnulib/import/m4/gnulib-comp.m443
-rw-r--r--gnulib/import/m4/gnulib-tool.m42
-rw-r--r--gnulib/import/m4/host-cpu-c-abi.m4675
-rw-r--r--gnulib/import/m4/include_next.m42
-rw-r--r--gnulib/import/m4/inet_ntop.m42
-rw-r--r--gnulib/import/m4/inttypes-pri.m42
-rw-r--r--gnulib/import/m4/inttypes.m48
-rw-r--r--gnulib/import/m4/isnand.m42
-rw-r--r--gnulib/import/m4/isnanl.m42
-rw-r--r--gnulib/import/m4/largefile.m46
-rw-r--r--gnulib/import/m4/lib-ld.m4168
-rw-r--r--gnulib/import/m4/lib-link.m4800
-rw-r--r--gnulib/import/m4/lib-prefix.m4320
-rw-r--r--gnulib/import/m4/limits-h.m42
-rw-r--r--gnulib/import/m4/localcharset.m42
-rw-r--r--gnulib/import/m4/locale-fr.m42
-rw-r--r--gnulib/import/m4/locale-ja.m42
-rw-r--r--gnulib/import/m4/locale-zh.m42
-rw-r--r--gnulib/import/m4/locale_h.m4158
-rw-r--r--gnulib/import/m4/localtime-buffer.m42
-rw-r--r--gnulib/import/m4/lock.m42
-rw-r--r--gnulib/import/m4/longlong.m4113
-rw-r--r--gnulib/import/m4/lstat.m42
-rw-r--r--gnulib/import/m4/malloc.m42
-rw-r--r--gnulib/import/m4/malloca.m45
-rw-r--r--gnulib/import/m4/math_h.m42
-rw-r--r--gnulib/import/m4/mbrtowc.m4185
-rw-r--r--gnulib/import/m4/mbsinit.m42
-rw-r--r--gnulib/import/m4/mbsrtowcs.m42
-rw-r--r--gnulib/import/m4/mbstate_t.m42
-rw-r--r--gnulib/import/m4/memchr.m42
-rw-r--r--gnulib/import/m4/memmem.m42
-rw-r--r--gnulib/import/m4/mempcpy.m42
-rw-r--r--gnulib/import/m4/memrchr.m42
-rw-r--r--gnulib/import/m4/mkdir.m42
-rw-r--r--gnulib/import/m4/mkdtemp.m42
-rw-r--r--gnulib/import/m4/mkostemp.m42
-rw-r--r--gnulib/import/m4/mmap-anon.m42
-rw-r--r--gnulib/import/m4/mode_t.m42
-rw-r--r--gnulib/import/m4/msvc-inval.m42
-rw-r--r--gnulib/import/m4/msvc-nothrow.m42
-rw-r--r--gnulib/import/m4/multiarch.m42
-rw-r--r--gnulib/import/m4/netinet_in_h.m42
-rw-r--r--gnulib/import/m4/nocrash.m42
-rw-r--r--gnulib/import/m4/off_t.m42
-rw-r--r--gnulib/import/m4/open-cloexec.m42
-rw-r--r--gnulib/import/m4/open-slash.m42
-rw-r--r--gnulib/import/m4/open.m42
-rw-r--r--gnulib/import/m4/openat.m42
-rw-r--r--gnulib/import/m4/opendir.m42
-rw-r--r--gnulib/import/m4/pathmax.m42
-rw-r--r--gnulib/import/m4/pthread_rwlock_rdlock.m42
-rw-r--r--gnulib/import/m4/rawmemchr.m42
-rw-r--r--gnulib/import/m4/readdir.m42
-rw-r--r--gnulib/import/m4/readlink.m42
-rw-r--r--gnulib/import/m4/realloc.m42
-rw-r--r--gnulib/import/m4/rename.m42
-rw-r--r--gnulib/import/m4/rewinddir.m42
-rw-r--r--gnulib/import/m4/rmdir.m42
-rw-r--r--gnulib/import/m4/save-cwd.m42
-rw-r--r--gnulib/import/m4/setenv.m42
-rw-r--r--gnulib/import/m4/setlocale_null.m498
-rw-r--r--gnulib/import/m4/signal_h.m42
-rw-r--r--gnulib/import/m4/socklen.m42
-rw-r--r--gnulib/import/m4/sockpfaf.m42
-rw-r--r--gnulib/import/m4/ssize_t.m42
-rw-r--r--gnulib/import/m4/stat-time.m42
-rw-r--r--gnulib/import/m4/stat.m42
-rw-r--r--gnulib/import/m4/std-gnu11.m42
-rw-r--r--gnulib/import/m4/stdalign.m42
-rw-r--r--gnulib/import/m4/stdbool.m42
-rw-r--r--gnulib/import/m4/stddef_h.m42
-rw-r--r--gnulib/import/m4/stdint.m425
-rw-r--r--gnulib/import/m4/stdio_h.m42
-rw-r--r--gnulib/import/m4/stdlib_h.m42
-rw-r--r--gnulib/import/m4/strchrnul.m42
-rw-r--r--gnulib/import/m4/strdup.m42
-rw-r--r--gnulib/import/m4/strerror.m42
-rw-r--r--gnulib/import/m4/strerror_r.m42
-rw-r--r--gnulib/import/m4/string_h.m42
-rw-r--r--gnulib/import/m4/strstr.m42
-rw-r--r--gnulib/import/m4/strtok_r.m42
-rw-r--r--gnulib/import/m4/sys_socket_h.m42
-rw-r--r--gnulib/import/m4/sys_stat_h.m46
-rw-r--r--gnulib/import/m4/sys_time_h.m42
-rw-r--r--gnulib/import/m4/sys_types_h.m42
-rw-r--r--gnulib/import/m4/sys_uio_h.m42
-rw-r--r--gnulib/import/m4/tempname.m42
-rw-r--r--gnulib/import/m4/threadlib.m4407
-rw-r--r--gnulib/import/m4/time_h.m42
-rw-r--r--gnulib/import/m4/time_r.m42
-rw-r--r--gnulib/import/m4/unistd-safer.m42
-rw-r--r--gnulib/import/m4/unistd_h.m45
-rw-r--r--gnulib/import/m4/visibility.m477
-rw-r--r--gnulib/import/m4/warn-on-use.m42
-rw-r--r--gnulib/import/m4/wchar_h.m42
-rw-r--r--gnulib/import/m4/wchar_t.m42
-rw-r--r--gnulib/import/m4/wctype_h.m48
-rw-r--r--gnulib/import/m4/wint_t.m42
-rw-r--r--gnulib/import/m4/zzgnulib.m423
-rw-r--r--gnulib/import/malloc.c2
-rw-r--r--gnulib/import/malloc/scratch_buffer.h2
-rw-r--r--gnulib/import/malloc/scratch_buffer_grow.c2
-rw-r--r--gnulib/import/malloc/scratch_buffer_grow_preserve.c2
-rw-r--r--gnulib/import/malloc/scratch_buffer_set_array_size.c2
-rw-r--r--gnulib/import/malloca.c2
-rw-r--r--gnulib/import/malloca.h6
-rw-r--r--gnulib/import/math.in.h2
-rw-r--r--gnulib/import/mbrtowc-impl-utf8.h138
-rw-r--r--gnulib/import/mbrtowc-impl.h262
-rw-r--r--gnulib/import/mbrtowc.c453
-rw-r--r--gnulib/import/mbsinit.c11
-rw-r--r--gnulib/import/mbsrtowcs-impl.h12
-rw-r--r--gnulib/import/mbsrtowcs-state.c2
-rw-r--r--gnulib/import/mbsrtowcs.c6
-rw-r--r--gnulib/import/mbtowc-lock.c150
-rw-r--r--gnulib/import/mbtowc-lock.h115
-rw-r--r--gnulib/import/memchr.c2
-rw-r--r--gnulib/import/memchr.valgrind2
-rw-r--r--gnulib/import/memmem.c2
-rw-r--r--gnulib/import/mempcpy.c2
-rw-r--r--gnulib/import/memrchr.c2
-rw-r--r--gnulib/import/mkdir.c2
-rw-r--r--gnulib/import/mkdtemp.c2
-rw-r--r--gnulib/import/mkostemp.c2
-rw-r--r--gnulib/import/msvc-inval.c2
-rw-r--r--gnulib/import/msvc-inval.h2
-rw-r--r--gnulib/import/msvc-nothrow.c2
-rw-r--r--gnulib/import/msvc-nothrow.h2
-rw-r--r--gnulib/import/netinet_in.in.h2
-rw-r--r--gnulib/import/open.c2
-rw-r--r--gnulib/import/openat-die.c2
-rw-r--r--gnulib/import/openat-priv.h2
-rw-r--r--gnulib/import/openat-proc.c2
-rw-r--r--gnulib/import/openat.c2
-rw-r--r--gnulib/import/openat.h2
-rw-r--r--gnulib/import/opendir.c2
-rw-r--r--gnulib/import/pathmax.h2
-rw-r--r--gnulib/import/pipe-safer.c2
-rw-r--r--gnulib/import/rawmemchr.c2
-rw-r--r--gnulib/import/rawmemchr.valgrind2
-rw-r--r--gnulib/import/readdir.c2
-rw-r--r--gnulib/import/readlink.c2
-rw-r--r--gnulib/import/realloc.c2
-rw-r--r--gnulib/import/rename.c2
-rw-r--r--gnulib/import/rewinddir.c2
-rw-r--r--gnulib/import/rmdir.c2
-rw-r--r--gnulib/import/same-inode.h2
-rw-r--r--gnulib/import/save-cwd.c2
-rw-r--r--gnulib/import/save-cwd.h2
-rw-r--r--gnulib/import/setenv.c2
-rw-r--r--gnulib/import/setlocale-lock.c150
-rw-r--r--gnulib/import/setlocale_null.c411
-rw-r--r--gnulib/import/setlocale_null.h82
-rw-r--r--gnulib/import/signal.in.h2
-rw-r--r--gnulib/import/stat-time.h2
-rw-r--r--gnulib/import/stat-w32.c2
-rw-r--r--gnulib/import/stat-w32.h2
-rw-r--r--gnulib/import/stat.c2
-rw-r--r--gnulib/import/stdalign.in.h2
-rw-r--r--gnulib/import/stdbool.in.h2
-rw-r--r--gnulib/import/stddef.in.h2
-rw-r--r--gnulib/import/stdint.in.h18
-rw-r--r--gnulib/import/stdio.in.h2
-rw-r--r--gnulib/import/stdlib.in.h9
-rw-r--r--gnulib/import/str-two-way.h2
-rw-r--r--gnulib/import/strchrnul.c2
-rw-r--r--gnulib/import/strchrnul.valgrind2
-rw-r--r--gnulib/import/strdup.c2
-rw-r--r--gnulib/import/streq.h2
-rw-r--r--gnulib/import/strerror-override.c2
-rw-r--r--gnulib/import/strerror-override.h2
-rw-r--r--gnulib/import/strerror.c2
-rw-r--r--gnulib/import/strerror_r.c2
-rw-r--r--gnulib/import/string.in.h2
-rw-r--r--gnulib/import/stripslash.c2
-rw-r--r--gnulib/import/strnlen1.c2
-rw-r--r--gnulib/import/strnlen1.h2
-rw-r--r--gnulib/import/strstr.c2
-rw-r--r--gnulib/import/strtok_r.c2
-rw-r--r--gnulib/import/sys_socket.in.h2
-rw-r--r--gnulib/import/sys_stat.in.h43
-rw-r--r--gnulib/import/sys_time.in.h2
-rw-r--r--gnulib/import/sys_types.in.h2
-rw-r--r--gnulib/import/sys_uio.in.h2
-rw-r--r--gnulib/import/tempname.c2
-rw-r--r--gnulib/import/tempname.h2
-rw-r--r--gnulib/import/time.in.h2
-rw-r--r--gnulib/import/time_r.c2
-rw-r--r--gnulib/import/unistd--.h2
-rw-r--r--gnulib/import/unistd-safer.h2
-rw-r--r--gnulib/import/unistd.in.h4
-rw-r--r--gnulib/import/unsetenv.c2
-rw-r--r--gnulib/import/verify.h2
-rw-r--r--gnulib/import/warn-on-use.h2
-rw-r--r--gnulib/import/wchar.in.h14
-rw-r--r--gnulib/import/wctype.in.h104
-rw-r--r--gnulib/import/windows-initguard.h2
-rw-r--r--gnulib/import/windows-mutex.c2
-rw-r--r--gnulib/import/windows-mutex.h2
-rw-r--r--gnulib/import/windows-once.c2
-rw-r--r--gnulib/import/windows-once.h2
-rw-r--r--gnulib/import/windows-recmutex.c2
-rw-r--r--gnulib/import/windows-recmutex.h2
-rw-r--r--gnulib/import/windows-rwlock.c2
-rw-r--r--gnulib/import/windows-rwlock.h2
-rw-r--r--gnulib/import/xalloc-oversized.h2
360 files changed, 3586 insertions, 3992 deletions
diff --git a/gnulib/import/Makefile.am b/gnulib/import/Makefile.am
index 0944473..e0a1e0f 100644
--- a/gnulib/import/Makefile.am
+++ b/gnulib/import/Makefile.am
@@ -1,6 +1,6 @@
## DO NOT EDIT! GENERATED AUTOMATICALLY!
## Process this file with automake to produce Makefile.in.
-# Copyright (C) 2002-2019 Free Software Foundation, Inc.
+# Copyright (C) 2002-2020 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
@@ -186,10 +186,7 @@ EXTRA_DIST += assure.h
## begin gnulib module at-internal
-
-EXTRA_DIST += openat-priv.h openat-proc.c
-
-EXTRA_libgnu_a_SOURCES += openat-proc.c
+libgnu_a_SOURCES += openat-priv.h openat-proc.c
## end gnulib module at-internal
@@ -713,13 +710,6 @@ EXTRA_DIST += hard-locale.h
## end gnulib module hard-locale
-## begin gnulib module havelib
-
-
-EXTRA_DIST += $(top_srcdir)/import/extra/config.rpath
-
-## end gnulib module havelib
-
## begin gnulib module inet_ntop
@@ -752,8 +742,6 @@ inttypes.h: inttypes.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_U
-e 's|@''NEXT_INTTYPES_H''@|$(NEXT_INTTYPES_H)|g' \
-e 's/@''PRI_MACROS_BROKEN''@/$(PRI_MACROS_BROKEN)/g' \
-e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \
- -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \
- -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \
-e 's/@''PRIPTR_PREFIX''@/$(PRIPTR_PREFIX)/g' \
-e 's/@''GNULIB_IMAXABS''@/$(GNULIB_IMAXABS)/g' \
-e 's/@''GNULIB_IMAXDIV''@/$(GNULIB_IMAXDIV)/g' \
@@ -843,6 +831,47 @@ EXTRA_DIST += localcharset.h
## end gnulib module localcharset
+## begin gnulib module locale
+
+BUILT_SOURCES += locale.h
+
+# We need the following in order to create <locale.h> when the system
+# doesn't have one that provides all definitions.
+locale.h: locale.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+ sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+ -e 's|@''NEXT_LOCALE_H''@|$(NEXT_LOCALE_H)|g' \
+ -e 's/@''GNULIB_LOCALECONV''@/$(GNULIB_LOCALECONV)/g' \
+ -e 's/@''GNULIB_SETLOCALE''@/$(GNULIB_SETLOCALE)/g' \
+ -e 's/@''GNULIB_SETLOCALE_NULL''@/$(GNULIB_SETLOCALE_NULL)/g' \
+ -e 's/@''GNULIB_DUPLOCALE''@/$(GNULIB_DUPLOCALE)/g' \
+ -e 's/@''GNULIB_LOCALENAME''@/$(GNULIB_LOCALENAME)/g' \
+ -e 's|@''HAVE_NEWLOCALE''@|$(HAVE_NEWLOCALE)|g' \
+ -e 's|@''HAVE_DUPLOCALE''@|$(HAVE_DUPLOCALE)|g' \
+ -e 's|@''HAVE_FREELOCALE''@|$(HAVE_FREELOCALE)|g' \
+ -e 's|@''HAVE_XLOCALE_H''@|$(HAVE_XLOCALE_H)|g' \
+ -e 's|@''REPLACE_LOCALECONV''@|$(REPLACE_LOCALECONV)|g' \
+ -e 's|@''REPLACE_SETLOCALE''@|$(REPLACE_SETLOCALE)|g' \
+ -e 's|@''REPLACE_NEWLOCALE''@|$(REPLACE_NEWLOCALE)|g' \
+ -e 's|@''REPLACE_DUPLOCALE''@|$(REPLACE_DUPLOCALE)|g' \
+ -e 's|@''REPLACE_FREELOCALE''@|$(REPLACE_FREELOCALE)|g' \
+ -e 's|@''REPLACE_STRUCT_LCONV''@|$(REPLACE_STRUCT_LCONV)|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)/locale.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+MOSTLYCLEANFILES += locale.h locale.h-t
+
+EXTRA_DIST += locale.in.h
+
+## end gnulib module locale
+
## begin gnulib module localtime-buffer
@@ -1187,9 +1216,9 @@ EXTRA_DIST += math.in.h
## begin gnulib module mbrtowc
-EXTRA_DIST += mbrtowc.c
+EXTRA_DIST += lc-charset-dispatch.c lc-charset-dispatch.h mbrtowc-impl-utf8.h mbrtowc-impl.h mbrtowc.c mbtowc-lock.c mbtowc-lock.h windows-initguard.h
-EXTRA_libgnu_a_SOURCES += mbrtowc.c
+EXTRA_libgnu_a_SOURCES += lc-charset-dispatch.c mbrtowc.c mbtowc-lock.c
## end gnulib module mbrtowc
@@ -1465,6 +1494,16 @@ EXTRA_libgnu_a_SOURCES += setenv.c
## end gnulib module setenv
+## begin gnulib module setlocale-null
+
+libgnu_a_SOURCES += setlocale_null.c
+
+EXTRA_DIST += setlocale-lock.c setlocale_null.h windows-initguard.h
+
+EXTRA_libgnu_a_SOURCES += setlocale-lock.c
+
+## end gnulib module setlocale-null
+
## begin gnulib module signal-h
BUILT_SOURCES += signal.h
@@ -1671,8 +1710,6 @@ stdint.h: stdint.in.h $(top_builddir)/config.status
-e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \
-e 's/@''HAVE_SYS_BITYPES_H''@/$(HAVE_SYS_BITYPES_H)/g' \
-e 's/@''HAVE_WCHAR_H''@/$(HAVE_WCHAR_H)/g' \
- -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \
- -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \
-e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \
-e 's/@''BITSIZEOF_PTRDIFF_T''@/$(BITSIZEOF_PTRDIFF_T)/g' \
-e 's/@''PTRDIFF_T_SUFFIX''@/$(PTRDIFF_T_SUFFIX)/g' \
@@ -2220,9 +2257,11 @@ sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNU
-e 's|@''HAVE_MKNOD''@|$(HAVE_MKNOD)|g' \
-e 's|@''HAVE_MKNODAT''@|$(HAVE_MKNODAT)|g' \
-e 's|@''HAVE_UTIMENSAT''@|$(HAVE_UTIMENSAT)|g' \
+ -e 's|@''REPLACE_FCHMODAT''@|$(REPLACE_FCHMODAT)|g' \
-e 's|@''REPLACE_FSTAT''@|$(REPLACE_FSTAT)|g' \
-e 's|@''REPLACE_FSTATAT''@|$(REPLACE_FSTATAT)|g' \
-e 's|@''REPLACE_FUTIMENS''@|$(REPLACE_FUTIMENS)|g' \
+ -e 's|@''REPLACE_LCHMOD''@|$(REPLACE_LCHMOD)|g' \
-e 's|@''REPLACE_LSTAT''@|$(REPLACE_LSTAT)|g' \
-e 's|@''REPLACE_MKDIR''@|$(REPLACE_MKDIR)|g' \
-e 's|@''REPLACE_MKFIFO''@|$(REPLACE_MKFIFO)|g' \
@@ -2446,6 +2485,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e 's/@''GNULIB_GETHOSTNAME''@/$(GNULIB_GETHOSTNAME)/g' \
-e 's/@''GNULIB_GETLOGIN''@/$(GNULIB_GETLOGIN)/g' \
-e 's/@''GNULIB_GETLOGIN_R''@/$(GNULIB_GETLOGIN_R)/g' \
+ -e 's/@''GNULIB_GETOPT_POSIX''@/$(GNULIB_GETOPT_POSIX)/g' \
-e 's/@''GNULIB_GETPAGESIZE''@/$(GNULIB_GETPAGESIZE)/g' \
-e 's/@''GNULIB_GETPASS''@/$(GNULIB_GETPASS)/g' \
-e 's/@''GNULIB_GETUSERSHELL''@/$(GNULIB_GETUSERSHELL)/g' \
@@ -2748,6 +2788,8 @@ wctype.h: wctype.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H
-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_ISWDIGIT''@/$(GNULIB_ISWDIGIT)/g' \
+ -e 's/@''GNULIB_ISWXDIGIT''@/$(GNULIB_ISWXDIGIT)/g' \
-e 's/@''GNULIB_WCTYPE''@/$(GNULIB_WCTYPE)/g' \
-e 's/@''GNULIB_ISWCTYPE''@/$(GNULIB_ISWCTYPE)/g' \
-e 's/@''GNULIB_WCTRANS''@/$(GNULIB_WCTRANS)/g' \
@@ -2758,6 +2800,8 @@ wctype.h: wctype.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H
-e 's/@''HAVE_WCTRANS_T''@/$(HAVE_WCTRANS_T)/g' \
-e 's/@''HAVE_WINT_T''@/$(HAVE_WINT_T)/g' \
-e 's/@''REPLACE_ISWBLANK''@/$(REPLACE_ISWBLANK)/g' \
+ -e 's/@''REPLACE_ISWDIGIT''@/$(REPLACE_ISWDIGIT)/g' \
+ -e 's/@''REPLACE_ISWXDIGIT''@/$(REPLACE_ISWXDIGIT)/g' \
-e 's/@''REPLACE_ISWCNTRL''@/$(REPLACE_ISWCNTRL)/g' \
-e 's/@''REPLACE_TOWLOWER''@/$(REPLACE_TOWLOWER)/g' \
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
diff --git a/gnulib/import/Makefile.in b/gnulib/import/Makefile.in
index f5ad783..1d54bfa 100644
--- a/gnulib/import/Makefile.in
+++ b/gnulib/import/Makefile.in
@@ -14,7 +14,7 @@
@SET_MAKE@
-# Copyright (C) 2002-2019 Free Software Foundation, Inc.
+# Copyright (C) 2002-2020 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
@@ -179,7 +179,6 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/depstand.m4 \
$(top_srcdir)/import/m4/close.m4 \
$(top_srcdir)/import/m4/closedir.m4 \
$(top_srcdir)/import/m4/codeset.m4 \
- $(top_srcdir)/import/m4/count-one-bits.m4 \
$(top_srcdir)/import/m4/d-ino.m4 \
$(top_srcdir)/import/m4/d-type.m4 \
$(top_srcdir)/import/m4/dirent_h.m4 \
@@ -235,9 +234,9 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/depstand.m4 \
$(top_srcdir)/import/m4/locale-fr.m4 \
$(top_srcdir)/import/m4/locale-ja.m4 \
$(top_srcdir)/import/m4/locale-zh.m4 \
+ $(top_srcdir)/import/m4/locale_h.m4 \
$(top_srcdir)/import/m4/localtime-buffer.m4 \
$(top_srcdir)/import/m4/lock.m4 \
- $(top_srcdir)/import/m4/longlong.m4 \
$(top_srcdir)/import/m4/lstat.m4 \
$(top_srcdir)/import/m4/malloc.m4 \
$(top_srcdir)/import/m4/malloca.m4 \
@@ -277,6 +276,7 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/depstand.m4 \
$(top_srcdir)/import/m4/rmdir.m4 \
$(top_srcdir)/import/m4/save-cwd.m4 \
$(top_srcdir)/import/m4/setenv.m4 \
+ $(top_srcdir)/import/m4/setlocale_null.m4 \
$(top_srcdir)/import/m4/signal_h.m4 \
$(top_srcdir)/import/m4/socklen.m4 \
$(top_srcdir)/import/m4/sockpfaf.m4 \
@@ -308,11 +308,13 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/depstand.m4 \
$(top_srcdir)/import/m4/time_r.m4 \
$(top_srcdir)/import/m4/unistd-safer.m4 \
$(top_srcdir)/import/m4/unistd_h.m4 \
+ $(top_srcdir)/import/m4/visibility.m4 \
$(top_srcdir)/import/m4/warn-on-use.m4 \
$(top_srcdir)/import/m4/wchar_h.m4 \
$(top_srcdir)/import/m4/wchar_t.m4 \
$(top_srcdir)/import/m4/wctype_h.m4 \
- $(top_srcdir)/import/m4/wint_t.m4 $(top_srcdir)/configure.ac
+ $(top_srcdir)/import/m4/wint_t.m4 \
+ $(top_srcdir)/import/m4/zzgnulib.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS)
@@ -328,21 +330,22 @@ am__v_AR_1 =
libgnu_a_AR = $(AR) $(ARFLAGS)
am__DEPENDENCIES_1 =
am__dirstamp = $(am__leading_dot)dirstamp
-am_libgnu_a_OBJECTS = cloexec.$(OBJEXT) count-one-bits.$(OBJEXT) \
- dirname-lgpl.$(OBJEXT) basename-lgpl.$(OBJEXT) \
- stripslash.$(OBJEXT) exitfail.$(OBJEXT) fd-hook.$(OBJEXT) \
- fd-safer-flag.$(OBJEXT) dup-safer-flag.$(OBJEXT) \
- filenamecat-lgpl.$(OBJEXT) getprogname.$(OBJEXT) \
- hard-locale.$(OBJEXT) localcharset.$(OBJEXT) \
- glthread/lock.$(OBJEXT) malloca.$(OBJEXT) math.$(OBJEXT) \
- openat-die.$(OBJEXT) save-cwd.$(OBJEXT) \
- malloc/scratch_buffer_grow.$(OBJEXT) \
+am_libgnu_a_OBJECTS = openat-proc.$(OBJEXT) cloexec.$(OBJEXT) \
+ count-one-bits.$(OBJEXT) dirname-lgpl.$(OBJEXT) \
+ basename-lgpl.$(OBJEXT) stripslash.$(OBJEXT) \
+ exitfail.$(OBJEXT) fd-hook.$(OBJEXT) fd-safer-flag.$(OBJEXT) \
+ dup-safer-flag.$(OBJEXT) filenamecat-lgpl.$(OBJEXT) \
+ getprogname.$(OBJEXT) hard-locale.$(OBJEXT) \
+ localcharset.$(OBJEXT) glthread/lock.$(OBJEXT) \
+ malloca.$(OBJEXT) math.$(OBJEXT) openat-die.$(OBJEXT) \
+ save-cwd.$(OBJEXT) malloc/scratch_buffer_grow.$(OBJEXT) \
malloc/scratch_buffer_grow_preserve.$(OBJEXT) \
malloc/scratch_buffer_set_array_size.$(OBJEXT) \
- stat-time.$(OBJEXT) strnlen1.$(OBJEXT) sys_socket.$(OBJEXT) \
- tempname.$(OBJEXT) glthread/threadlib.$(OBJEXT) \
- unistd.$(OBJEXT) dup-safer.$(OBJEXT) fd-safer.$(OBJEXT) \
- pipe-safer.$(OBJEXT) wctype-h.$(OBJEXT)
+ setlocale_null.$(OBJEXT) stat-time.$(OBJEXT) \
+ strnlen1.$(OBJEXT) sys_socket.$(OBJEXT) tempname.$(OBJEXT) \
+ glthread/threadlib.$(OBJEXT) unistd.$(OBJEXT) \
+ dup-safer.$(OBJEXT) fd-safer.$(OBJEXT) pipe-safer.$(OBJEXT) \
+ wctype-h.$(OBJEXT)
libgnu_a_OBJECTS = $(am_libgnu_a_OBJECTS)
LTLIBRARIES = $(noinst_LTLIBRARIES)
AM_V_P = $(am__v_P_@AM_V@)
@@ -435,6 +438,7 @@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CFLAG_VISIBILITY = @CFLAG_VISIBILITY@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
@@ -498,6 +502,7 @@ GNULIB_DPRINTF = @GNULIB_DPRINTF@
GNULIB_DUP = @GNULIB_DUP@
GNULIB_DUP2 = @GNULIB_DUP2@
GNULIB_DUP3 = @GNULIB_DUP3@
+GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@
GNULIB_ENVIRON = @GNULIB_ENVIRON@
GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
GNULIB_EXP2 = @GNULIB_EXP2@
@@ -569,6 +574,7 @@ GNULIB_GETLINE = @GNULIB_GETLINE@
GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@
GNULIB_GETLOGIN = @GNULIB_GETLOGIN@
GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
+GNULIB_GETOPT_POSIX = @GNULIB_GETOPT_POSIX@
GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
GNULIB_GETPASS = @GNULIB_GETPASS@
GNULIB_GETPEERNAME = @GNULIB_GETPEERNAME@
@@ -599,6 +605,8 @@ GNULIB_ISNANF = @GNULIB_ISNANF@
GNULIB_ISNANL = @GNULIB_ISNANL@
GNULIB_ISWBLANK = @GNULIB_ISWBLANK@
GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@
+GNULIB_ISWDIGIT = @GNULIB_ISWDIGIT@
+GNULIB_ISWXDIGIT = @GNULIB_ISWXDIGIT@
GNULIB_LCHMOD = @GNULIB_LCHMOD@
GNULIB_LCHOWN = @GNULIB_LCHOWN@
GNULIB_LDEXPF = @GNULIB_LDEXPF@
@@ -606,6 +614,8 @@ GNULIB_LDEXPL = @GNULIB_LDEXPL@
GNULIB_LINK = @GNULIB_LINK@
GNULIB_LINKAT = @GNULIB_LINKAT@
GNULIB_LISTEN = @GNULIB_LISTEN@
+GNULIB_LOCALECONV = @GNULIB_LOCALECONV@
+GNULIB_LOCALENAME = @GNULIB_LOCALENAME@
GNULIB_LOCALTIME = @GNULIB_LOCALTIME@
GNULIB_LOG = @GNULIB_LOG@
GNULIB_LOG10 = @GNULIB_LOG10@
@@ -726,6 +736,8 @@ GNULIB_SEND = @GNULIB_SEND@
GNULIB_SENDTO = @GNULIB_SENDTO@
GNULIB_SETENV = @GNULIB_SETENV@
GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@
+GNULIB_SETLOCALE = @GNULIB_SETLOCALE@
+GNULIB_SETLOCALE_NULL = @GNULIB_SETLOCALE_NULL@
GNULIB_SETSOCKOPT = @GNULIB_SETSOCKOPT@
GNULIB_SHUTDOWN = @GNULIB_SHUTDOWN@
GNULIB_SIGACTION = @GNULIB_SIGACTION@
@@ -953,6 +965,7 @@ HAVE_DIRENT_H = @HAVE_DIRENT_H@
HAVE_DPRINTF = @HAVE_DPRINTF@
HAVE_DUP2 = @HAVE_DUP2@
HAVE_DUP3 = @HAVE_DUP3@
+HAVE_DUPLOCALE = @HAVE_DUPLOCALE@
HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
HAVE_EXPF = @HAVE_EXPF@
HAVE_EXPL = @HAVE_EXPL@
@@ -978,6 +991,7 @@ HAVE_FMODF = @HAVE_FMODF@
HAVE_FMODL = @HAVE_FMODL@
HAVE_FNMATCH = @HAVE_FNMATCH@
HAVE_FNMATCH_H = @HAVE_FNMATCH_H@
+HAVE_FREELOCALE = @HAVE_FREELOCALE@
HAVE_FREXPF = @HAVE_FREXPF@
HAVE_FSEEKO = @HAVE_FSEEKO@
HAVE_FSTATAT = @HAVE_FSTATAT@
@@ -1025,7 +1039,6 @@ HAVE_LOGBF = @HAVE_LOGBF@
HAVE_LOGBL = @HAVE_LOGBL@
HAVE_LOGF = @HAVE_LOGF@
HAVE_LOGL = @HAVE_LOGL@
-HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
HAVE_LSTAT = @HAVE_LSTAT@
HAVE_MAX_ALIGN_T = @HAVE_MAX_ALIGN_T@
HAVE_MBRLEN = @HAVE_MBRLEN@
@@ -1052,6 +1065,7 @@ HAVE_MODFL = @HAVE_MODFL@
HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@
HAVE_NANOSLEEP = @HAVE_NANOSLEEP@
HAVE_NETINET_IN_H = @HAVE_NETINET_IN_H@
+HAVE_NEWLOCALE = @HAVE_NEWLOCALE@
HAVE_OPENAT = @HAVE_OPENAT@
HAVE_OPENDIR = @HAVE_OPENDIR@
HAVE_OS_H = @HAVE_OS_H@
@@ -1143,11 +1157,11 @@ HAVE_TZSET = @HAVE_TZSET@
HAVE_UNISTD_H = @HAVE_UNISTD_H@
HAVE_UNLINKAT = @HAVE_UNLINKAT@
HAVE_UNLOCKPT = @HAVE_UNLOCKPT@
-HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@
HAVE_USLEEP = @HAVE_USLEEP@
HAVE_UTIMENSAT = @HAVE_UTIMENSAT@
HAVE_VASPRINTF = @HAVE_VASPRINTF@
HAVE_VDPRINTF = @HAVE_VDPRINTF@
+HAVE_VISIBILITY = @HAVE_VISIBILITY@
HAVE_WCHAR_H = @HAVE_WCHAR_H@
HAVE_WCHAR_T = @HAVE_WCHAR_T@
HAVE_WCPCPY = @HAVE_WCPCPY@
@@ -1188,6 +1202,7 @@ HAVE_WMEMCPY = @HAVE_WMEMCPY@
HAVE_WMEMMOVE = @HAVE_WMEMMOVE@
HAVE_WMEMSET = @HAVE_WMEMSET@
HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@
+HAVE_XLOCALE_H = @HAVE_XLOCALE_H@
HAVE__BOOL = @HAVE__BOOL@
HAVE__EXIT = @HAVE__EXIT@
INCLUDE_NEXT = @INCLUDE_NEXT@
@@ -1209,8 +1224,13 @@ LIBOBJS = @LIBOBJS@
LIBPMULTITHREAD = @LIBPMULTITHREAD@
LIBPTHREAD = @LIBPTHREAD@
LIBS = @LIBS@
+LIBSTDTHREAD = @LIBSTDTHREAD@
LIBTHREAD = @LIBTHREAD@
LIB_GETLOGIN = @LIB_GETLOGIN@
+LIB_HARD_LOCALE = @LIB_HARD_LOCALE@
+LIB_MBRTOWC = @LIB_MBRTOWC@
+LIB_SCHED_YIELD = @LIB_SCHED_YIELD@
+LIB_SETLOCALE_NULL = @LIB_SETLOCALE_NULL@
LIMITS_H = @LIMITS_H@
LN_S = @LN_S@
LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@
@@ -1236,6 +1256,7 @@ NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H = @NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H@
NEXT_AS_FIRST_DIRECTIVE_GLOB_H = @NEXT_AS_FIRST_DIRECTIVE_GLOB_H@
NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@
NEXT_AS_FIRST_DIRECTIVE_LIMITS_H = @NEXT_AS_FIRST_DIRECTIVE_LIMITS_H@
+NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@
NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@
NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H = @NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H@
NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@
@@ -1261,6 +1282,7 @@ NEXT_FNMATCH_H = @NEXT_FNMATCH_H@
NEXT_GLOB_H = @NEXT_GLOB_H@
NEXT_INTTYPES_H = @NEXT_INTTYPES_H@
NEXT_LIMITS_H = @NEXT_LIMITS_H@
+NEXT_LOCALE_H = @NEXT_LOCALE_H@
NEXT_MATH_H = @NEXT_MATH_H@
NEXT_NETINET_IN_H = @NEXT_NETINET_IN_H@
NEXT_SIGNAL_H = @NEXT_SIGNAL_H@
@@ -1318,6 +1340,7 @@ REPLACE_DIRFD = @REPLACE_DIRFD@
REPLACE_DPRINTF = @REPLACE_DPRINTF@
REPLACE_DUP = @REPLACE_DUP@
REPLACE_DUP2 = @REPLACE_DUP2@
+REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@
REPLACE_EXP2 = @REPLACE_EXP2@
REPLACE_EXP2L = @REPLACE_EXP2L@
REPLACE_EXPF = @REPLACE_EXPF@
@@ -1327,6 +1350,7 @@ REPLACE_EXPM1F = @REPLACE_EXPM1F@
REPLACE_EXPM1L = @REPLACE_EXPM1L@
REPLACE_FABSL = @REPLACE_FABSL@
REPLACE_FACCESSAT = @REPLACE_FACCESSAT@
+REPLACE_FCHMODAT = @REPLACE_FCHMODAT@
REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@
REPLACE_FCLOSE = @REPLACE_FCLOSE@
REPLACE_FCNTL = @REPLACE_FCNTL@
@@ -1346,6 +1370,7 @@ REPLACE_FNMATCH = @REPLACE_FNMATCH@
REPLACE_FOPEN = @REPLACE_FOPEN@
REPLACE_FPRINTF = @REPLACE_FPRINTF@
REPLACE_FPURGE = @REPLACE_FPURGE@
+REPLACE_FREELOCALE = @REPLACE_FREELOCALE@
REPLACE_FREOPEN = @REPLACE_FREOPEN@
REPLACE_FREXP = @REPLACE_FREXP@
REPLACE_FREXPF = @REPLACE_FREXPF@
@@ -1387,11 +1412,15 @@ REPLACE_ISINF = @REPLACE_ISINF@
REPLACE_ISNAN = @REPLACE_ISNAN@
REPLACE_ISWBLANK = @REPLACE_ISWBLANK@
REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@
+REPLACE_ISWDIGIT = @REPLACE_ISWDIGIT@
+REPLACE_ISWXDIGIT = @REPLACE_ISWXDIGIT@
REPLACE_ITOLD = @REPLACE_ITOLD@
+REPLACE_LCHMOD = @REPLACE_LCHMOD@
REPLACE_LCHOWN = @REPLACE_LCHOWN@
REPLACE_LDEXPL = @REPLACE_LDEXPL@
REPLACE_LINK = @REPLACE_LINK@
REPLACE_LINKAT = @REPLACE_LINKAT@
+REPLACE_LOCALECONV = @REPLACE_LOCALECONV@
REPLACE_LOCALTIME = @REPLACE_LOCALTIME@
REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@
REPLACE_LOG = @REPLACE_LOG@
@@ -1431,6 +1460,7 @@ REPLACE_MODFF = @REPLACE_MODFF@
REPLACE_MODFL = @REPLACE_MODFL@
REPLACE_NAN = @REPLACE_NAN@
REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@
+REPLACE_NEWLOCALE = @REPLACE_NEWLOCALE@
REPLACE_NULL = @REPLACE_NULL@
REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@
REPLACE_OPEN = @REPLACE_OPEN@
@@ -1466,6 +1496,7 @@ REPLACE_ROUND = @REPLACE_ROUND@
REPLACE_ROUNDF = @REPLACE_ROUNDF@
REPLACE_ROUNDL = @REPLACE_ROUNDL@
REPLACE_SETENV = @REPLACE_SETENV@
+REPLACE_SETLOCALE = @REPLACE_SETLOCALE@
REPLACE_SETSTATE = @REPLACE_SETSTATE@
REPLACE_SIGNBIT = @REPLACE_SIGNBIT@
REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@
@@ -1496,6 +1527,7 @@ REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@
REPLACE_STRTOK_R = @REPLACE_STRTOK_R@
REPLACE_STRTOLD = @REPLACE_STRTOLD@
REPLACE_STRTOUMAX = @REPLACE_STRTOUMAX@
+REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@
REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@
REPLACE_SYMLINK = @REPLACE_SYMLINK@
REPLACE_SYMLINKAT = @REPLACE_SYMLINKAT@
@@ -1621,40 +1653,42 @@ noinst_LIBRARIES = libgnu.a
noinst_LTLIBRARIES =
# No GNU Make output.
EXTRA_DIST = m4/gnulib-cache.m4 alloca.c alloca.in.h arpa_inet.in.h \
- assure.h openat-priv.h openat-proc.c canonicalize-lgpl.c \
- chdir-long.c chdir-long.h cloexec.h close.c closedir.c \
- dirent-private.h count-one-bits.h dirent.in.h dirfd.c \
- dirname.h dosname.h dup.c dup2.c errno.in.h error.c error.h \
- exitfail.h fchdir.c fcntl.c fcntl.in.h fd-hook.h fdopendir.c \
- filename.h filenamecat.h flexmember.h float.c float.in.h \
- itold.c fnmatch.c fnmatch_loop.c fnmatch.in.h fpucw.h frexp.c \
- frexp.c frexpl.c fstat.c stat-w32.c stat-w32.h at-func.c \
- fstatat.c getcwd.c getcwd-lgpl.c getdtablesize.c getlogin_r.c \
- gettimeofday.c glob.c glob_internal.h glob_pattern_p.c \
- globfree.c glob-libc.h glob.in.h hard-locale.h \
- $(top_srcdir)/import/extra/config.rpath inet_ntop.c intprops.h \
- inttypes.in.h float+.h isnan.c isnand-nolibm.h isnand.c \
- float+.h isnan.c isnanl-nolibm.h isnanl.c cdefs.h \
- libc-config.h limits.in.h localcharset.h localtime-buffer.c \
+ assure.h canonicalize-lgpl.c chdir-long.c chdir-long.h \
+ cloexec.h close.c closedir.c dirent-private.h count-one-bits.h \
+ dirent.in.h dirfd.c dirname.h dosname.h dup.c dup2.c \
+ errno.in.h error.c error.h exitfail.h fchdir.c fcntl.c \
+ fcntl.in.h fd-hook.h fdopendir.c filename.h filenamecat.h \
+ flexmember.h float.c float.in.h itold.c fnmatch.c \
+ fnmatch_loop.c fnmatch.in.h fpucw.h frexp.c frexp.c frexpl.c \
+ fstat.c stat-w32.c stat-w32.h at-func.c fstatat.c getcwd.c \
+ getcwd-lgpl.c getdtablesize.c getlogin_r.c gettimeofday.c \
+ glob.c glob_internal.h glob_pattern_p.c globfree.c glob-libc.h \
+ glob.in.h hard-locale.h inet_ntop.c intprops.h inttypes.in.h \
+ float+.h isnan.c isnand-nolibm.h isnand.c float+.h isnan.c \
+ isnanl-nolibm.h isnanl.c cdefs.h libc-config.h limits.in.h \
+ localcharset.h locale.in.h localtime-buffer.c \
localtime-buffer.h lstat.c malloc.c malloca.h math.in.h \
- mbrtowc.c mbsinit.c mbsrtowcs-impl.h mbsrtowcs-state.c \
- mbsrtowcs.c memchr.c memchr.valgrind memmem.c str-two-way.h \
- mempcpy.c memrchr.c mkdir.c mkdtemp.c mkostemp.c msvc-inval.c \
- msvc-inval.h msvc-nothrow.c msvc-nothrow.h netinet_in.in.h \
- open.c openat.c openat.h dirent-private.h opendir.c pathmax.h \
- rawmemchr.c rawmemchr.valgrind dirent-private.h readdir.c \
- readlink.c realloc.c rename.c dirent-private.h rewinddir.c \
- rmdir.c same-inode.h save-cwd.h malloc/scratch_buffer.h \
- scratch_buffer.h setenv.c signal.in.h _Noreturn.h \
- arg-nonnull.h c++defs.h warn-on-use.h stat-w32.c stat-w32.h \
- stat.c stat-time.h stdalign.in.h stdbool.in.h stddef.in.h \
- stdint.in.h stdio.in.h stdlib.in.h strchrnul.c \
- strchrnul.valgrind strdup.c streq.h strerror.c \
- strerror-override.c strerror-override.h strerror_r.c \
- string.in.h str-two-way.h strstr.c strtok_r.c sys_socket.in.h \
- sys_stat.in.h sys_time.in.h sys_types.in.h sys_uio.in.h \
- tempname.h time.in.h time_r.c unistd.in.h unistd--.h \
- unistd-safer.h unsetenv.c \
+ lc-charset-dispatch.c lc-charset-dispatch.h \
+ mbrtowc-impl-utf8.h mbrtowc-impl.h mbrtowc.c mbtowc-lock.c \
+ mbtowc-lock.h windows-initguard.h mbsinit.c mbsrtowcs-impl.h \
+ mbsrtowcs-state.c mbsrtowcs.c memchr.c memchr.valgrind \
+ memmem.c str-two-way.h mempcpy.c memrchr.c mkdir.c mkdtemp.c \
+ mkostemp.c msvc-inval.c msvc-inval.h msvc-nothrow.c \
+ msvc-nothrow.h netinet_in.in.h open.c openat.c openat.h \
+ dirent-private.h opendir.c pathmax.h rawmemchr.c \
+ rawmemchr.valgrind dirent-private.h readdir.c readlink.c \
+ realloc.c rename.c dirent-private.h rewinddir.c rmdir.c \
+ same-inode.h save-cwd.h malloc/scratch_buffer.h \
+ scratch_buffer.h setenv.c setlocale-lock.c setlocale_null.h \
+ windows-initguard.h signal.in.h _Noreturn.h arg-nonnull.h \
+ c++defs.h warn-on-use.h stat-w32.c stat-w32.h stat.c \
+ stat-time.h stdalign.in.h stdbool.in.h stddef.in.h stdint.in.h \
+ stdio.in.h stdlib.in.h strchrnul.c strchrnul.valgrind strdup.c \
+ streq.h strerror.c strerror-override.c strerror-override.h \
+ strerror_r.c string.in.h str-two-way.h strstr.c strtok_r.c \
+ sys_socket.in.h sys_stat.in.h sys_time.in.h sys_types.in.h \
+ sys_uio.in.h tempname.h time.in.h time_r.c unistd.in.h \
+ unistd--.h unistd-safer.h unsetenv.c \
$(top_srcdir)/import/extra/update-copyright verify.h \
wchar.in.h wctype.in.h windows-initguard.h windows-mutex.c \
windows-mutex.h windows-once.c windows-once.h \
@@ -1663,56 +1697,59 @@ EXTRA_DIST = m4/gnulib-cache.m4 alloca.c alloca.in.h arpa_inet.in.h \
xalloc-oversized.h
BUILT_SOURCES = $(ALLOCA_H) arpa/inet.h dirent.h $(ERRNO_H) fcntl.h \
$(FLOAT_H) $(FNMATCH_H) $(GLOB_H) inttypes.h $(LIMITS_H) \
- math.h $(NETINET_IN_H) signal.h $(STDALIGN_H) $(STDBOOL_H) \
- $(STDDEF_H) $(STDINT_H) stdio.h stdlib.h string.h sys/socket.h \
- sys/stat.h sys/time.h sys/types.h sys/uio.h time.h unistd.h \
- wchar.h wctype.h
+ locale.h math.h $(NETINET_IN_H) signal.h $(STDALIGN_H) \
+ $(STDBOOL_H) $(STDDEF_H) $(STDINT_H) stdio.h stdlib.h string.h \
+ sys/socket.h sys/stat.h sys/time.h sys/types.h sys/uio.h \
+ time.h unistd.h wchar.h wctype.h
SUFFIXES =
MOSTLYCLEANFILES = core *.stackdump alloca.h alloca.h-t arpa/inet.h \
arpa/inet.h-t dirent.h dirent.h-t errno.h errno.h-t fcntl.h \
fcntl.h-t float.h float.h-t fnmatch.h fnmatch.h-t glob.h \
- glob.h-t inttypes.h inttypes.h-t limits.h limits.h-t math.h \
- math.h-t netinet/in.h netinet/in.h-t signal.h signal.h-t \
- stdalign.h stdalign.h-t stdbool.h stdbool.h-t stddef.h \
- stddef.h-t stdint.h stdint.h-t stdio.h stdio.h-t stdlib.h \
- stdlib.h-t string.h string.h-t sys/socket.h sys/socket.h-t \
- sys/stat.h sys/stat.h-t sys/time.h sys/time.h-t sys/types.h \
- sys/types.h-t sys/uio.h sys/uio.h-t time.h time.h-t unistd.h \
- unistd.h-t wchar.h wchar.h-t wctype.h wctype.h-t
+ glob.h-t inttypes.h inttypes.h-t limits.h limits.h-t locale.h \
+ locale.h-t math.h math.h-t netinet/in.h netinet/in.h-t \
+ signal.h signal.h-t stdalign.h stdalign.h-t stdbool.h \
+ stdbool.h-t stddef.h stddef.h-t stdint.h stdint.h-t stdio.h \
+ stdio.h-t stdlib.h stdlib.h-t string.h string.h-t sys/socket.h \
+ sys/socket.h-t sys/stat.h sys/stat.h-t sys/time.h sys/time.h-t \
+ sys/types.h sys/types.h-t sys/uio.h sys/uio.h-t time.h \
+ time.h-t unistd.h unistd.h-t wchar.h wchar.h-t wctype.h \
+ wctype.h-t
MOSTLYCLEANDIRS = arpa netinet sys sys sys
CLEANFILES =
DISTCLEANFILES =
MAINTAINERCLEANFILES =
AM_CPPFLAGS =
AM_CFLAGS =
-libgnu_a_SOURCES = cloexec.c count-one-bits.c dirname-lgpl.c \
- basename-lgpl.c stripslash.c exitfail.c fd-hook.c \
- fd-safer-flag.c dup-safer-flag.c filenamecat-lgpl.c \
- getprogname.h getprogname.c gettext.h hard-locale.c \
- localcharset.c glthread/lock.h glthread/lock.c malloca.c \
- math.c openat-die.c save-cwd.c malloc/scratch_buffer_grow.c \
+libgnu_a_SOURCES = openat-priv.h openat-proc.c cloexec.c \
+ count-one-bits.c dirname-lgpl.c basename-lgpl.c stripslash.c \
+ exitfail.c fd-hook.c fd-safer-flag.c dup-safer-flag.c \
+ filenamecat-lgpl.c getprogname.h getprogname.c gettext.h \
+ hard-locale.c localcharset.c glthread/lock.h glthread/lock.c \
+ malloca.c math.c openat-die.c save-cwd.c \
+ malloc/scratch_buffer_grow.c \
malloc/scratch_buffer_grow_preserve.c \
- malloc/scratch_buffer_set_array_size.c stat-time.c strnlen1.h \
- strnlen1.c sys_socket.c tempname.c glthread/threadlib.c \
- unistd.c dup-safer.c fd-safer.c pipe-safer.c wctype-h.c
+ malloc/scratch_buffer_set_array_size.c setlocale_null.c \
+ stat-time.c strnlen1.h strnlen1.c sys_socket.c tempname.c \
+ glthread/threadlib.c unistd.c dup-safer.c fd-safer.c \
+ pipe-safer.c wctype-h.c
libgnu_a_LIBADD = $(gl_LIBOBJS) @ALLOCA@
libgnu_a_DEPENDENCIES = $(gl_LIBOBJS) @ALLOCA@
-EXTRA_libgnu_a_SOURCES = alloca.c openat-proc.c canonicalize-lgpl.c \
- chdir-long.c close.c closedir.c dirfd.c dup.c dup2.c error.c \
- fchdir.c fcntl.c fdopendir.c float.c itold.c fnmatch.c \
- fnmatch_loop.c frexp.c frexp.c frexpl.c fstat.c stat-w32.c \
- at-func.c fstatat.c getcwd.c getcwd-lgpl.c getdtablesize.c \
- getlogin_r.c gettimeofday.c glob.c glob_pattern_p.c globfree.c \
- inet_ntop.c isnan.c isnand.c isnan.c isnanl.c \
- localtime-buffer.c lstat.c malloc.c mbrtowc.c mbsinit.c \
- mbsrtowcs-state.c mbsrtowcs.c memchr.c memmem.c mempcpy.c \
- memrchr.c mkdir.c mkdtemp.c mkostemp.c msvc-inval.c \
+EXTRA_libgnu_a_SOURCES = alloca.c canonicalize-lgpl.c chdir-long.c \
+ close.c closedir.c dirfd.c dup.c dup2.c error.c fchdir.c \
+ fcntl.c fdopendir.c float.c itold.c fnmatch.c fnmatch_loop.c \
+ frexp.c frexp.c frexpl.c fstat.c stat-w32.c at-func.c \
+ fstatat.c getcwd.c getcwd-lgpl.c getdtablesize.c getlogin_r.c \
+ gettimeofday.c glob.c glob_pattern_p.c globfree.c inet_ntop.c \
+ isnan.c isnand.c isnan.c isnanl.c localtime-buffer.c lstat.c \
+ malloc.c lc-charset-dispatch.c mbrtowc.c mbtowc-lock.c \
+ mbsinit.c mbsrtowcs-state.c mbsrtowcs.c memchr.c memmem.c \
+ mempcpy.c memrchr.c mkdir.c mkdtemp.c mkostemp.c msvc-inval.c \
msvc-nothrow.c open.c openat.c opendir.c rawmemchr.c readdir.c \
readlink.c realloc.c rename.c rewinddir.c rmdir.c setenv.c \
- stat-w32.c stat.c strchrnul.c strdup.c strerror.c \
- strerror-override.c strerror_r.c strstr.c strtok_r.c time_r.c \
- unsetenv.c windows-mutex.c windows-once.c windows-recmutex.c \
- windows-rwlock.c
+ setlocale-lock.c stat-w32.c stat.c strchrnul.c strdup.c \
+ strerror.c strerror-override.c strerror_r.c strstr.c \
+ strtok_r.c time_r.c unsetenv.c windows-mutex.c windows-once.c \
+ windows-recmutex.c windows-rwlock.c
# Use this preprocessor expression to decide whether #include_next works.
# Do not rely on a 'configure'-time test for this, since the expression
@@ -1868,6 +1905,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isnand.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isnanl.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/itold.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lc-charset-dispatch.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/localcharset.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/localtime-buffer.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lstat.Po@am__quote@
@@ -1878,6 +1916,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbsinit.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbsrtowcs-state.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbsrtowcs.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbtowc-lock.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memchr.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memmem.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mempcpy.Po@am__quote@
@@ -1902,6 +1941,8 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rmdir.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/save-cwd.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setenv.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setlocale-lock.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setlocale_null.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stat-time.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stat-w32.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stat.Po@am__quote@
@@ -2383,8 +2424,6 @@ inttypes.h: inttypes.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_U
-e 's|@''NEXT_INTTYPES_H''@|$(NEXT_INTTYPES_H)|g' \
-e 's/@''PRI_MACROS_BROKEN''@/$(PRI_MACROS_BROKEN)/g' \
-e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \
- -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \
- -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \
-e 's/@''PRIPTR_PREFIX''@/$(PRIPTR_PREFIX)/g' \
-e 's/@''GNULIB_IMAXABS''@/$(GNULIB_IMAXABS)/g' \
-e 's/@''GNULIB_IMAXDIV''@/$(GNULIB_IMAXDIV)/g' \
@@ -2424,6 +2463,38 @@ inttypes.h: inttypes.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_U
@GL_GENERATE_LIMITS_H_FALSE@limits.h: $(top_builddir)/config.status
@GL_GENERATE_LIMITS_H_FALSE@ rm -f $@
+# We need the following in order to create <locale.h> when the system
+# doesn't have one that provides all definitions.
+locale.h: locale.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+ sed -e 's|@''GUARD_PREFIX''@|GL|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+ -e 's|@''NEXT_LOCALE_H''@|$(NEXT_LOCALE_H)|g' \
+ -e 's/@''GNULIB_LOCALECONV''@/$(GNULIB_LOCALECONV)/g' \
+ -e 's/@''GNULIB_SETLOCALE''@/$(GNULIB_SETLOCALE)/g' \
+ -e 's/@''GNULIB_SETLOCALE_NULL''@/$(GNULIB_SETLOCALE_NULL)/g' \
+ -e 's/@''GNULIB_DUPLOCALE''@/$(GNULIB_DUPLOCALE)/g' \
+ -e 's/@''GNULIB_LOCALENAME''@/$(GNULIB_LOCALENAME)/g' \
+ -e 's|@''HAVE_NEWLOCALE''@|$(HAVE_NEWLOCALE)|g' \
+ -e 's|@''HAVE_DUPLOCALE''@|$(HAVE_DUPLOCALE)|g' \
+ -e 's|@''HAVE_FREELOCALE''@|$(HAVE_FREELOCALE)|g' \
+ -e 's|@''HAVE_XLOCALE_H''@|$(HAVE_XLOCALE_H)|g' \
+ -e 's|@''REPLACE_LOCALECONV''@|$(REPLACE_LOCALECONV)|g' \
+ -e 's|@''REPLACE_SETLOCALE''@|$(REPLACE_SETLOCALE)|g' \
+ -e 's|@''REPLACE_NEWLOCALE''@|$(REPLACE_NEWLOCALE)|g' \
+ -e 's|@''REPLACE_DUPLOCALE''@|$(REPLACE_DUPLOCALE)|g' \
+ -e 's|@''REPLACE_FREELOCALE''@|$(REPLACE_FREELOCALE)|g' \
+ -e 's|@''REPLACE_STRUCT_LCONV''@|$(REPLACE_STRUCT_LCONV)|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)/locale.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+
# We need the following in order to create <math.h> when the system
# doesn't have one that works with the given compiler.
math.h: math.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
@@ -2823,8 +2894,6 @@ signal.h: signal.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \
@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_SYS_BITYPES_H''@/$(HAVE_SYS_BITYPES_H)/g' \
@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_WCHAR_H''@/$(HAVE_WCHAR_H)/g' \
-@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \
-@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \
@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \
@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''BITSIZEOF_PTRDIFF_T''@/$(BITSIZEOF_PTRDIFF_T)/g' \
@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''PTRDIFF_T_SUFFIX''@/$(PTRDIFF_T_SUFFIX)/g' \
@@ -3247,9 +3316,11 @@ sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNU
-e 's|@''HAVE_MKNOD''@|$(HAVE_MKNOD)|g' \
-e 's|@''HAVE_MKNODAT''@|$(HAVE_MKNODAT)|g' \
-e 's|@''HAVE_UTIMENSAT''@|$(HAVE_UTIMENSAT)|g' \
+ -e 's|@''REPLACE_FCHMODAT''@|$(REPLACE_FCHMODAT)|g' \
-e 's|@''REPLACE_FSTAT''@|$(REPLACE_FSTAT)|g' \
-e 's|@''REPLACE_FSTATAT''@|$(REPLACE_FSTATAT)|g' \
-e 's|@''REPLACE_FUTIMENS''@|$(REPLACE_FUTIMENS)|g' \
+ -e 's|@''REPLACE_LCHMOD''@|$(REPLACE_LCHMOD)|g' \
-e 's|@''REPLACE_LSTAT''@|$(REPLACE_LSTAT)|g' \
-e 's|@''REPLACE_MKDIR''@|$(REPLACE_MKDIR)|g' \
-e 's|@''REPLACE_MKFIFO''@|$(REPLACE_MKFIFO)|g' \
@@ -3402,6 +3473,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e 's/@''GNULIB_GETHOSTNAME''@/$(GNULIB_GETHOSTNAME)/g' \
-e 's/@''GNULIB_GETLOGIN''@/$(GNULIB_GETLOGIN)/g' \
-e 's/@''GNULIB_GETLOGIN_R''@/$(GNULIB_GETLOGIN_R)/g' \
+ -e 's/@''GNULIB_GETOPT_POSIX''@/$(GNULIB_GETOPT_POSIX)/g' \
-e 's/@''GNULIB_GETPAGESIZE''@/$(GNULIB_GETPAGESIZE)/g' \
-e 's/@''GNULIB_GETPASS''@/$(GNULIB_GETPASS)/g' \
-e 's/@''GNULIB_GETUSERSHELL''@/$(GNULIB_GETUSERSHELL)/g' \
@@ -3654,6 +3726,8 @@ wctype.h: wctype.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H
-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_ISWDIGIT''@/$(GNULIB_ISWDIGIT)/g' \
+ -e 's/@''GNULIB_ISWXDIGIT''@/$(GNULIB_ISWXDIGIT)/g' \
-e 's/@''GNULIB_WCTYPE''@/$(GNULIB_WCTYPE)/g' \
-e 's/@''GNULIB_ISWCTYPE''@/$(GNULIB_ISWCTYPE)/g' \
-e 's/@''GNULIB_WCTRANS''@/$(GNULIB_WCTRANS)/g' \
@@ -3664,6 +3738,8 @@ wctype.h: wctype.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H
-e 's/@''HAVE_WCTRANS_T''@/$(HAVE_WCTRANS_T)/g' \
-e 's/@''HAVE_WINT_T''@/$(HAVE_WINT_T)/g' \
-e 's/@''REPLACE_ISWBLANK''@/$(REPLACE_ISWBLANK)/g' \
+ -e 's/@''REPLACE_ISWDIGIT''@/$(REPLACE_ISWDIGIT)/g' \
+ -e 's/@''REPLACE_ISWXDIGIT''@/$(REPLACE_ISWXDIGIT)/g' \
-e 's/@''REPLACE_ISWCNTRL''@/$(REPLACE_ISWCNTRL)/g' \
-e 's/@''REPLACE_TOWLOWER''@/$(REPLACE_TOWLOWER)/g' \
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
diff --git a/gnulib/import/_Noreturn.h b/gnulib/import/_Noreturn.h
index 7570f82..394ca3c 100644
--- a/gnulib/import/_Noreturn.h
+++ b/gnulib/import/_Noreturn.h
@@ -1,5 +1,5 @@
/* A C macro for declaring that a function does not return.
- Copyright (C) 2011-2019 Free Software Foundation, Inc.
+ Copyright (C) 2011-2020 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
@@ -28,7 +28,10 @@
# define _Noreturn [[noreturn]]
# elif ((!defined __cplusplus || defined __clang__) \
&& (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \
- || 4 < __GNUC__ + (7 <= __GNUC_MINOR__)))
+ || 4 < __GNUC__ + (7 <= __GNUC_MINOR__) \
+ || (defined __apple_build_version__ \
+ ? 6000000 <= __apple_build_version__ \
+ : 3 < __clang_major__ + (5 <= __clang_minor__))))
/* _Noreturn works as-is. */
# elif 2 < __GNUC__ + (8 <= __GNUC_MINOR__) || 0x5110 <= __SUNPRO_C
# define _Noreturn __attribute__ ((__noreturn__))
diff --git a/gnulib/import/alloca.in.h b/gnulib/import/alloca.in.h
index a581d58..c7187e6 100644
--- a/gnulib/import/alloca.in.h
+++ b/gnulib/import/alloca.in.h
@@ -1,6 +1,6 @@
/* Memory allocation on the stack.
- Copyright (C) 1995, 1999, 2001-2004, 2006-2019 Free Software Foundation,
+ Copyright (C) 1995, 1999, 2001-2004, 2006-2020 Free Software Foundation,
Inc.
This program is free software; you can redistribute it and/or modify it
diff --git a/gnulib/import/arg-nonnull.h b/gnulib/import/arg-nonnull.h
index ad8c26c..ac26ca8 100644
--- a/gnulib/import/arg-nonnull.h
+++ b/gnulib/import/arg-nonnull.h
@@ -1,5 +1,5 @@
/* A C macro for declaring that specific arguments must not be NULL.
- Copyright (C) 2009-2019 Free Software Foundation, Inc.
+ Copyright (C) 2009-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published
diff --git a/gnulib/import/arpa_inet.in.h b/gnulib/import/arpa_inet.in.h
index a5b3907..9f13d48 100644
--- a/gnulib/import/arpa_inet.in.h
+++ b/gnulib/import/arpa_inet.in.h
@@ -1,6 +1,6 @@
/* A GNU-like <arpa/inet.h>.
- Copyright (C) 2005-2006, 2008-2019 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2008-2020 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/assure.h b/gnulib/import/assure.h
index c21b6a6..8ea2f6e 100644
--- a/gnulib/import/assure.h
+++ b/gnulib/import/assure.h
@@ -1,6 +1,6 @@
/* Run-time assert-like macros.
- Copyright (C) 2014-2019 Free Software Foundation, Inc.
+ Copyright (C) 2014-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/at-func.c b/gnulib/import/at-func.c
index d2e6319..4a1c909 100644
--- a/gnulib/import/at-func.c
+++ b/gnulib/import/at-func.c
@@ -1,5 +1,5 @@
/* Define at-style functions like fstatat, unlinkat, fchownat, etc.
- Copyright (C) 2006, 2009-2019 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/basename-lgpl.c b/gnulib/import/basename-lgpl.c
index 0ae04ee..565469e 100644
--- a/gnulib/import/basename-lgpl.c
+++ b/gnulib/import/basename-lgpl.c
@@ -1,6 +1,6 @@
/* basename.c -- return the last element in a file name
- Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2019 Free Software
+ Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2020 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
diff --git a/gnulib/import/c++defs.h b/gnulib/import/c++defs.h
index 87d0716..3e6aaab 100644
--- a/gnulib/import/c++defs.h
+++ b/gnulib/import/c++defs.h
@@ -1,5 +1,5 @@
/* C++ compatible function declaration macros.
- Copyright (C) 2010-2019 Free Software Foundation, Inc.
+ Copyright (C) 2010-2020 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
@@ -301,9 +301,6 @@
_GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \
"The symbol ::" #func " refers to the system function. " \
"Use " #namespace "::" #func " instead.")
-# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
-# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
- extern __typeof__ (func) func
# else
# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
_GL_EXTERN_C int _gl_cxxalias_dummy
diff --git a/gnulib/import/canonicalize-lgpl.c b/gnulib/import/canonicalize-lgpl.c
index 4d1be6d..7d3c710 100644
--- a/gnulib/import/canonicalize-lgpl.c
+++ b/gnulib/import/canonicalize-lgpl.c
@@ -1,5 +1,5 @@
/* Return the canonical absolute name of a given file.
- Copyright (C) 1996-2019 Free Software Foundation, Inc.
+ Copyright (C) 1996-2020 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
diff --git a/gnulib/import/cdefs.h b/gnulib/import/cdefs.h
index 96d2616..d8e4a00 100644
--- a/gnulib/import/cdefs.h
+++ b/gnulib/import/cdefs.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2019 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2020 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
diff --git a/gnulib/import/chdir-long.c b/gnulib/import/chdir-long.c
index febdf59..a38d38c 100644
--- a/gnulib/import/chdir-long.c
+++ b/gnulib/import/chdir-long.c
@@ -1,5 +1,5 @@
/* provide a chdir function that tries not to fail due to ENAMETOOLONG
- Copyright (C) 2004-2019 Free Software Foundation, Inc.
+ Copyright (C) 2004-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/chdir-long.h b/gnulib/import/chdir-long.h
index 43259d1..851222f 100644
--- a/gnulib/import/chdir-long.h
+++ b/gnulib/import/chdir-long.h
@@ -1,5 +1,5 @@
/* provide a chdir function that tries not to fail due to ENAMETOOLONG
- Copyright (C) 2004-2005, 2009-2019 Free Software Foundation, Inc.
+ Copyright (C) 2004-2005, 2009-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/cloexec.c b/gnulib/import/cloexec.c
index db42576..510be3d 100644
--- a/gnulib/import/cloexec.c
+++ b/gnulib/import/cloexec.c
@@ -1,6 +1,6 @@
/* cloexec.c - set or clear the close-on-exec descriptor flag
- Copyright (C) 1991, 2004-2006, 2009-2019 Free Software Foundation, Inc.
+ Copyright (C) 1991, 2004-2006, 2009-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/cloexec.h b/gnulib/import/cloexec.h
index 06ad945..f14a997 100644
--- a/gnulib/import/cloexec.h
+++ b/gnulib/import/cloexec.h
@@ -1,6 +1,6 @@
/* cloexec.c - set or clear the close-on-exec descriptor flag
- Copyright (C) 2004, 2009-2019 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2009-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/close.c b/gnulib/import/close.c
index 40ce845..0c8780d 100644
--- a/gnulib/import/close.c
+++ b/gnulib/import/close.c
@@ -1,5 +1,5 @@
/* close replacement.
- Copyright (C) 2008-2019 Free Software Foundation, Inc.
+ Copyright (C) 2008-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/closedir.c b/gnulib/import/closedir.c
index 017fb68..9afaa1f0 100644
--- a/gnulib/import/closedir.c
+++ b/gnulib/import/closedir.c
@@ -1,5 +1,5 @@
/* Stop reading the entries of a directory.
- Copyright (C) 2006-2019 Free Software Foundation, Inc.
+ Copyright (C) 2006-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/count-one-bits.h b/gnulib/import/count-one-bits.h
index 0056994..eea56d8 100644
--- a/gnulib/import/count-one-bits.h
+++ b/gnulib/import/count-one-bits.h
@@ -1,5 +1,5 @@
/* count-one-bits.h -- counts the number of 1-bits in a word.
- Copyright (C) 2007-2019 Free Software Foundation, Inc.
+ Copyright (C) 2007-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -30,6 +30,10 @@ _GL_INLINE_HEADER_BEGIN
# define COUNT_ONE_BITS_INLINE _GL_INLINE
#endif
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* Expand to code that computes the number of 1-bits of the local
variable 'x' of type TYPE (an unsigned integer type) and return it
from the current function. */
@@ -122,13 +126,15 @@ count_one_bits_l (unsigned long int x)
COUNT_ONE_BITS (__builtin_popcountl, __popcnt, unsigned long int);
}
-#if HAVE_UNSIGNED_LONG_LONG_INT
/* Compute and return the number of 1-bits set in X. */
COUNT_ONE_BITS_INLINE int
count_one_bits_ll (unsigned long long int x)
{
COUNT_ONE_BITS (__builtin_popcountll, __popcnt64, unsigned long long int);
}
+
+#ifdef __cplusplus
+}
#endif
_GL_INLINE_HEADER_END
diff --git a/gnulib/import/dirent-private.h b/gnulib/import/dirent-private.h
index 1eb1b35..4b4eba4 100644
--- a/gnulib/import/dirent-private.h
+++ b/gnulib/import/dirent-private.h
@@ -1,5 +1,5 @@
/* Private details of the DIR type.
- Copyright (C) 2011-2019 Free Software Foundation, Inc.
+ Copyright (C) 2011-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/dirent.in.h b/gnulib/import/dirent.in.h
index a3c8eb3..f7c2681 100644
--- a/gnulib/import/dirent.in.h
+++ b/gnulib/import/dirent.in.h
@@ -1,5 +1,5 @@
/* A GNU-like <dirent.h>.
- Copyright (C) 2006-2019 Free Software Foundation, Inc.
+ Copyright (C) 2006-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/dirfd.c b/gnulib/import/dirfd.c
index bc858fd..f653977 100644
--- a/gnulib/import/dirfd.c
+++ b/gnulib/import/dirfd.c
@@ -1,6 +1,6 @@
/* dirfd.c -- return the file descriptor associated with an open DIR*
- Copyright (C) 2001, 2006, 2008-2019 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2006, 2008-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/dirname-lgpl.c b/gnulib/import/dirname-lgpl.c
index 7cf89d8..27d4374 100644
--- a/gnulib/import/dirname-lgpl.c
+++ b/gnulib/import/dirname-lgpl.c
@@ -1,6 +1,6 @@
/* dirname.c -- return all but the last element in a file name
- Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2019 Free Software
+ Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2020 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
diff --git a/gnulib/import/dirname.h b/gnulib/import/dirname.h
index 5791659..8c12d93 100644
--- a/gnulib/import/dirname.h
+++ b/gnulib/import/dirname.h
@@ -1,6 +1,6 @@
/* Take file names apart into directory and base names.
- Copyright (C) 1998, 2001, 2003-2006, 2009-2019 Free Software Foundation,
+ Copyright (C) 1998, 2001, 2003-2006, 2009-2020 Free Software Foundation,
Inc.
This program is free software: you can redistribute it and/or modify
diff --git a/gnulib/import/dosname.h b/gnulib/import/dosname.h
index c0ab684..5782960 100644
--- a/gnulib/import/dosname.h
+++ b/gnulib/import/dosname.h
@@ -1,6 +1,6 @@
/* File names on MS-DOS/Windows systems.
- Copyright (C) 2000-2001, 2004-2006, 2009-2019 Free Software Foundation, Inc.
+ Copyright (C) 2000-2001, 2004-2006, 2009-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/dup-safer-flag.c b/gnulib/import/dup-safer-flag.c
index 485f741..b2c345e 100644
--- a/gnulib/import/dup-safer-flag.c
+++ b/gnulib/import/dup-safer-flag.c
@@ -1,7 +1,7 @@
/* Duplicate a file descriptor result, avoiding clobbering
STD{IN,OUT,ERR}_FILENO, with specific flags.
- Copyright (C) 2001, 2004-2006, 2009-2019 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2004-2006, 2009-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/dup-safer.c b/gnulib/import/dup-safer.c
index c0c5f2a..4ada3fe 100644
--- a/gnulib/import/dup-safer.c
+++ b/gnulib/import/dup-safer.c
@@ -1,6 +1,6 @@
/* Invoke dup, but avoid some glitches.
- Copyright (C) 2001, 2004-2006, 2009-2019 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2004-2006, 2009-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/dup.c b/gnulib/import/dup.c
index d37f920..974d446 100644
--- a/gnulib/import/dup.c
+++ b/gnulib/import/dup.c
@@ -1,6 +1,6 @@
/* Duplicate an open file descriptor.
- Copyright (C) 2011-2019 Free Software Foundation, Inc.
+ Copyright (C) 2011-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/dup2.c b/gnulib/import/dup2.c
index d3aafa4..88ef259 100644
--- a/gnulib/import/dup2.c
+++ b/gnulib/import/dup2.c
@@ -1,6 +1,6 @@
/* Duplicate an open file descriptor to a specified file descriptor.
- Copyright (C) 1999, 2004-2007, 2009-2019 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2004-2007, 2009-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/errno.in.h b/gnulib/import/errno.in.h
index 3bd27f1..c27e0c7 100644
--- a/gnulib/import/errno.in.h
+++ b/gnulib/import/errno.in.h
@@ -1,6 +1,6 @@
/* A POSIX-like <errno.h>.
- Copyright (C) 2008-2019 Free Software Foundation, Inc.
+ Copyright (C) 2008-2020 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/error.c b/gnulib/import/error.c
index f8ab668..3657b51 100644
--- a/gnulib/import/error.c
+++ b/gnulib/import/error.c
@@ -1,5 +1,5 @@
/* Error handler for noninteractive utilities
- Copyright (C) 1990-1998, 2000-2007, 2009-2019 Free Software Foundation, Inc.
+ Copyright (C) 1990-1998, 2000-2007, 2009-2020 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
diff --git a/gnulib/import/error.h b/gnulib/import/error.h
index 3759f8a..bad47a1 100644
--- a/gnulib/import/error.h
+++ b/gnulib/import/error.h
@@ -1,5 +1,5 @@
/* Declaration for error-reporting function
- Copyright (C) 1995-1997, 2003, 2006, 2008-2019 Free Software Foundation,
+ Copyright (C) 1995-1997, 2003, 2006, 2008-2020 Free Software Foundation,
Inc.
This file is part of the GNU C Library.
diff --git a/gnulib/import/exitfail.c b/gnulib/import/exitfail.c
index 69b3513..189fa16 100644
--- a/gnulib/import/exitfail.c
+++ b/gnulib/import/exitfail.c
@@ -1,6 +1,6 @@
/* Failure exit status
- Copyright (C) 2002-2003, 2005-2007, 2009-2019 Free Software Foundation, Inc.
+ Copyright (C) 2002-2003, 2005-2007, 2009-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/exitfail.h b/gnulib/import/exitfail.h
index 480ad1a..a69a03b 100644
--- a/gnulib/import/exitfail.h
+++ b/gnulib/import/exitfail.h
@@ -1,6 +1,6 @@
/* Failure exit status
- Copyright (C) 2002, 2009-2019 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2009-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/extra/config.rpath b/gnulib/import/extra/config.rpath
deleted file mode 100755
index be202c1..0000000
--- a/gnulib/import/extra/config.rpath
+++ /dev/null
@@ -1,684 +0,0 @@
-#! /bin/sh
-# Output a system dependent set of variables, describing how to set the
-# run time search path of shared libraries in an executable.
-#
-# Copyright 1996-2019 Free Software Foundation, Inc.
-# Taken from GNU libtool, 2001
-# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
-#
-# This file is free software; the Free Software Foundation gives
-# unlimited permission to copy and/or distribute it, with or without
-# modifications, as long as this notice is preserved.
-#
-# The first argument passed to this file is the canonical host specification,
-# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
-# or
-# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
-# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
-# should be set by the caller.
-#
-# The set of defined variables is at the end of this script.
-
-# Known limitations:
-# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer
-# than 256 bytes, otherwise the compiler driver will dump core. The only
-# known workaround is to choose shorter directory names for the build
-# directory and/or the installation directory.
-
-# All known linkers require a '.a' archive for static linking (except MSVC,
-# which needs '.lib').
-libext=a
-shrext=.so
-
-host="$1"
-host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
-# Code taken from libtool.m4's _LT_CC_BASENAME.
-
-for cc_temp in $CC""; do
- case $cc_temp in
- compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
- distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
- \-*) ;;
- *) break;;
- esac
-done
-cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'`
-
-# Code taken from libtool.m4's _LT_COMPILER_PIC.
-
-wl=
-if test "$GCC" = yes; then
- wl='-Wl,'
-else
- case "$host_os" in
- aix*)
- wl='-Wl,'
- ;;
- mingw* | cygwin* | pw32* | os2* | cegcc*)
- ;;
- hpux9* | hpux10* | hpux11*)
- wl='-Wl,'
- ;;
- irix5* | irix6* | nonstopux*)
- wl='-Wl,'
- ;;
- linux* | k*bsd*-gnu | kopensolaris*-gnu)
- case $cc_basename in
- ecc*)
- wl='-Wl,'
- ;;
- icc* | ifort*)
- wl='-Wl,'
- ;;
- lf95*)
- wl='-Wl,'
- ;;
- nagfor*)
- wl='-Wl,-Wl,,'
- ;;
- pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
- wl='-Wl,'
- ;;
- ccc*)
- wl='-Wl,'
- ;;
- xl* | bgxl* | bgf* | mpixl*)
- wl='-Wl,'
- ;;
- como)
- wl='-lopt='
- ;;
- *)
- case `$CC -V 2>&1 | sed 5q` in
- *Sun\ F* | *Sun*Fortran*)
- wl=
- ;;
- *Sun\ C*)
- wl='-Wl,'
- ;;
- esac
- ;;
- esac
- ;;
- newsos6)
- ;;
- *nto* | *qnx*)
- ;;
- osf3* | osf4* | osf5*)
- wl='-Wl,'
- ;;
- rdos*)
- ;;
- solaris*)
- case $cc_basename in
- f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
- wl='-Qoption ld '
- ;;
- *)
- wl='-Wl,'
- ;;
- esac
- ;;
- sunos4*)
- wl='-Qoption ld '
- ;;
- sysv4 | sysv4.2uw2* | sysv4.3*)
- wl='-Wl,'
- ;;
- sysv4*MP*)
- ;;
- sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
- wl='-Wl,'
- ;;
- unicos*)
- wl='-Wl,'
- ;;
- uts4*)
- ;;
- esac
-fi
-
-# Code taken from libtool.m4's _LT_LINKER_SHLIBS.
-
-hardcode_libdir_flag_spec=
-hardcode_libdir_separator=
-hardcode_direct=no
-hardcode_minus_L=no
-
-case "$host_os" in
- cygwin* | mingw* | pw32* | cegcc*)
- # FIXME: the MSVC++ port hasn't been tested in a loooong time
- # When not using gcc, we currently assume that we are using
- # Microsoft Visual C++.
- if test "$GCC" != yes; then
- with_gnu_ld=no
- fi
- ;;
- interix*)
- # we just hope/assume this is gcc and not c89 (= MSVC++)
- with_gnu_ld=yes
- ;;
- openbsd*)
- with_gnu_ld=no
- ;;
-esac
-
-ld_shlibs=yes
-if test "$with_gnu_ld" = yes; then
- # Set some defaults for GNU ld with shared library support. These
- # are reset later if shared libraries are not supported. Putting them
- # here allows them to be overridden if necessary.
- # Unlike libtool, we use -rpath here, not --rpath, since the documented
- # option of GNU ld is called -rpath, not --rpath.
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- case "$host_os" in
- aix[3-9]*)
- # On AIX/PPC, the GNU linker is very broken
- if test "$host_cpu" != ia64; then
- ld_shlibs=no
- fi
- ;;
- amigaos*)
- case "$host_cpu" in
- powerpc)
- ;;
- m68k)
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_minus_L=yes
- ;;
- esac
- ;;
- beos*)
- if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
- :
- else
- ld_shlibs=no
- fi
- ;;
- cygwin* | mingw* | pw32* | cegcc*)
- # hardcode_libdir_flag_spec is actually meaningless, as there is
- # no search path for DLLs.
- hardcode_libdir_flag_spec='-L$libdir'
- if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
- :
- else
- ld_shlibs=no
- fi
- ;;
- haiku*)
- ;;
- interix[3-9]*)
- hardcode_direct=no
- hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- ;;
- gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
- if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
- :
- else
- ld_shlibs=no
- fi
- ;;
- netbsd*)
- ;;
- solaris*)
- if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
- ld_shlibs=no
- elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
- :
- else
- ld_shlibs=no
- fi
- ;;
- sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
- case `$LD -v 2>&1` in
- *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
- ld_shlibs=no
- ;;
- *)
- if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
- hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
- else
- ld_shlibs=no
- fi
- ;;
- esac
- ;;
- sunos4*)
- hardcode_direct=yes
- ;;
- *)
- if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
- :
- else
- ld_shlibs=no
- fi
- ;;
- esac
- if test "$ld_shlibs" = no; then
- hardcode_libdir_flag_spec=
- fi
-else
- case "$host_os" in
- aix3*)
- # Note: this linker hardcodes the directories in LIBPATH if there
- # are no directories specified by -L.
- hardcode_minus_L=yes
- if test "$GCC" = yes; then
- # Neither direct hardcoding nor static linking is supported with a
- # broken collect2.
- hardcode_direct=unsupported
- fi
- ;;
- aix[4-9]*)
- if test "$host_cpu" = ia64; then
- # On IA64, the linker does run time linking by default, so we don't
- # have to do anything special.
- aix_use_runtimelinking=no
- else
- aix_use_runtimelinking=no
- # Test if we are trying to use run time linking or normal
- # AIX style linking. If -brtl is somewhere in LDFLAGS, we
- # need to do runtime linking.
- case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
- for ld_flag in $LDFLAGS; do
- if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
- aix_use_runtimelinking=yes
- break
- fi
- done
- ;;
- esac
- fi
- hardcode_direct=yes
- hardcode_libdir_separator=':'
- if test "$GCC" = yes; then
- case $host_os in aix4.[012]|aix4.[012].*)
- collect2name=`${CC} -print-prog-name=collect2`
- if test -f "$collect2name" && \
- strings "$collect2name" | grep resolve_lib_name >/dev/null
- then
- # We have reworked collect2
- :
- else
- # We have old collect2
- hardcode_direct=unsupported
- hardcode_minus_L=yes
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_libdir_separator=
- fi
- ;;
- esac
- fi
- # Begin _LT_AC_SYS_LIBPATH_AIX.
- echo 'int main () { return 0; }' > conftest.c
- ${CC} ${LDFLAGS} conftest.c -o conftest
- aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`
- if test -z "$aix_libpath"; then
- aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
-}'`
- fi
- if test -z "$aix_libpath"; then
- aix_libpath="/usr/lib:/lib"
- fi
- rm -f conftest.c conftest
- # End _LT_AC_SYS_LIBPATH_AIX.
- if test "$aix_use_runtimelinking" = yes; then
- hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
- else
- if test "$host_cpu" = ia64; then
- hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
- else
- hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
- fi
- fi
- ;;
- amigaos*)
- case "$host_cpu" in
- powerpc)
- ;;
- m68k)
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_minus_L=yes
- ;;
- esac
- ;;
- bsdi[45]*)
- ;;
- cygwin* | mingw* | pw32* | cegcc*)
- # When not using gcc, we currently assume that we are using
- # Microsoft Visual C++.
- # hardcode_libdir_flag_spec is actually meaningless, as there is
- # no search path for DLLs.
- hardcode_libdir_flag_spec=' '
- libext=lib
- ;;
- darwin* | rhapsody*)
- hardcode_direct=no
- if { case $cc_basename in ifort*) true;; *) test "$GCC" = yes;; esac; }; then
- :
- else
- ld_shlibs=no
- fi
- ;;
- dgux*)
- hardcode_libdir_flag_spec='-L$libdir'
- ;;
- freebsd2.[01]*)
- hardcode_direct=yes
- hardcode_minus_L=yes
- ;;
- freebsd* | dragonfly*)
- hardcode_libdir_flag_spec='-R$libdir'
- hardcode_direct=yes
- ;;
- hpux9*)
- hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
- hardcode_libdir_separator=:
- hardcode_direct=yes
- # hardcode_minus_L: Not really in the search PATH,
- # but as the default location of the library.
- hardcode_minus_L=yes
- ;;
- hpux10*)
- if test "$with_gnu_ld" = no; then
- hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
- hardcode_libdir_separator=:
- hardcode_direct=yes
- # hardcode_minus_L: Not really in the search PATH,
- # but as the default location of the library.
- hardcode_minus_L=yes
- fi
- ;;
- hpux11*)
- if test "$with_gnu_ld" = no; then
- hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
- hardcode_libdir_separator=:
- case $host_cpu in
- hppa*64*|ia64*)
- hardcode_direct=no
- ;;
- *)
- hardcode_direct=yes
- # hardcode_minus_L: Not really in the search PATH,
- # but as the default location of the library.
- hardcode_minus_L=yes
- ;;
- esac
- fi
- ;;
- irix5* | irix6* | nonstopux*)
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- hardcode_libdir_separator=:
- ;;
- netbsd*)
- hardcode_libdir_flag_spec='-R$libdir'
- hardcode_direct=yes
- ;;
- newsos6)
- hardcode_direct=yes
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- hardcode_libdir_separator=:
- ;;
- *nto* | *qnx*)
- ;;
- openbsd*)
- if test -f /usr/libexec/ld.so; then
- hardcode_direct=yes
- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- else
- case "$host_os" in
- openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
- hardcode_libdir_flag_spec='-R$libdir'
- ;;
- *)
- hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- ;;
- esac
- fi
- else
- ld_shlibs=no
- fi
- ;;
- os2*)
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_minus_L=yes
- ;;
- osf3*)
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- hardcode_libdir_separator=:
- ;;
- osf4* | osf5*)
- if test "$GCC" = yes; then
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- else
- # Both cc and cxx compiler support -rpath directly
- hardcode_libdir_flag_spec='-rpath $libdir'
- fi
- hardcode_libdir_separator=:
- ;;
- solaris*)
- hardcode_libdir_flag_spec='-R$libdir'
- ;;
- sunos4*)
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_direct=yes
- hardcode_minus_L=yes
- ;;
- sysv4)
- case $host_vendor in
- sni)
- hardcode_direct=yes # is this really true???
- ;;
- siemens)
- hardcode_direct=no
- ;;
- motorola)
- hardcode_direct=no #Motorola manual says yes, but my tests say they lie
- ;;
- esac
- ;;
- sysv4.3*)
- ;;
- sysv4*MP*)
- if test -d /usr/nec; then
- ld_shlibs=yes
- fi
- ;;
- sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
- ;;
- sysv5* | sco3.2v5* | sco5v6*)
- hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
- hardcode_libdir_separator=':'
- ;;
- uts4*)
- hardcode_libdir_flag_spec='-L$libdir'
- ;;
- *)
- ld_shlibs=no
- ;;
- esac
-fi
-
-# Check dynamic linker characteristics
-# Code taken from libtool.m4's _LT_SYS_DYNAMIC_LINKER.
-# Unlike libtool.m4, here we don't care about _all_ names of the library, but
-# only about the one the linker finds when passed -lNAME. This is the last
-# element of library_names_spec in libtool.m4, or possibly two of them if the
-# linker has special search rules.
-library_names_spec= # the last element of library_names_spec in libtool.m4
-libname_spec='lib$name'
-case "$host_os" in
- aix3*)
- library_names_spec='$libname.a'
- ;;
- aix[4-9]*)
- library_names_spec='$libname$shrext'
- ;;
- amigaos*)
- case "$host_cpu" in
- powerpc*)
- library_names_spec='$libname$shrext' ;;
- m68k)
- library_names_spec='$libname.a' ;;
- esac
- ;;
- beos*)
- library_names_spec='$libname$shrext'
- ;;
- bsdi[45]*)
- library_names_spec='$libname$shrext'
- ;;
- cygwin* | mingw* | pw32* | cegcc*)
- shrext=.dll
- library_names_spec='$libname.dll.a $libname.lib'
- ;;
- darwin* | rhapsody*)
- shrext=.dylib
- library_names_spec='$libname$shrext'
- ;;
- dgux*)
- library_names_spec='$libname$shrext'
- ;;
- freebsd[23].*)
- library_names_spec='$libname$shrext$versuffix'
- ;;
- freebsd* | dragonfly*)
- library_names_spec='$libname$shrext'
- ;;
- gnu*)
- library_names_spec='$libname$shrext'
- ;;
- haiku*)
- library_names_spec='$libname$shrext'
- ;;
- hpux9* | hpux10* | hpux11*)
- case $host_cpu in
- ia64*)
- shrext=.so
- ;;
- hppa*64*)
- shrext=.sl
- ;;
- *)
- shrext=.sl
- ;;
- esac
- library_names_spec='$libname$shrext'
- ;;
- interix[3-9]*)
- library_names_spec='$libname$shrext'
- ;;
- irix5* | irix6* | nonstopux*)
- library_names_spec='$libname$shrext'
- case "$host_os" in
- irix5* | nonstopux*)
- libsuff= shlibsuff=
- ;;
- *)
- case $LD in
- *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;;
- *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;;
- *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;;
- *) libsuff= shlibsuff= ;;
- esac
- ;;
- esac
- ;;
- linux*oldld* | linux*aout* | linux*coff*)
- ;;
- linux* | k*bsd*-gnu | kopensolaris*-gnu)
- library_names_spec='$libname$shrext'
- ;;
- knetbsd*-gnu)
- library_names_spec='$libname$shrext'
- ;;
- netbsd*)
- library_names_spec='$libname$shrext'
- ;;
- newsos6)
- library_names_spec='$libname$shrext'
- ;;
- *nto* | *qnx*)
- library_names_spec='$libname$shrext'
- ;;
- openbsd*)
- library_names_spec='$libname$shrext$versuffix'
- ;;
- os2*)
- libname_spec='$name'
- shrext=.dll
- library_names_spec='$libname.a'
- ;;
- osf3* | osf4* | osf5*)
- library_names_spec='$libname$shrext'
- ;;
- rdos*)
- ;;
- solaris*)
- library_names_spec='$libname$shrext'
- ;;
- sunos4*)
- library_names_spec='$libname$shrext$versuffix'
- ;;
- sysv4 | sysv4.3*)
- library_names_spec='$libname$shrext'
- ;;
- sysv4*MP*)
- library_names_spec='$libname$shrext'
- ;;
- sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
- library_names_spec='$libname$shrext'
- ;;
- tpf*)
- library_names_spec='$libname$shrext'
- ;;
- uts4*)
- library_names_spec='$libname$shrext'
- ;;
-esac
-
-sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
-escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
-shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
-escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
-escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
-escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
-
-LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
-
-# How to pass a linker flag through the compiler.
-wl="$escaped_wl"
-
-# Static library suffix (normally "a").
-libext="$libext"
-
-# Shared library suffix (normally "so").
-shlibext="$shlibext"
-
-# Format of library name prefix.
-libname_spec="$escaped_libname_spec"
-
-# Library names that the linker finds when passed -lNAME.
-library_names_spec="$escaped_library_names_spec"
-
-# Flag to hardcode \$libdir into a binary during linking.
-# This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
-
-# Whether we need a single -rpath flag with a separated argument.
-hardcode_libdir_separator="$hardcode_libdir_separator"
-
-# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
-# resulting binary.
-hardcode_direct="$hardcode_direct"
-
-# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
-# resulting binary.
-hardcode_minus_L="$hardcode_minus_L"
-
-EOF
diff --git a/gnulib/import/extra/update-copyright b/gnulib/import/extra/update-copyright
index e4809f6..4f79b56 100755
--- a/gnulib/import/extra/update-copyright
+++ b/gnulib/import/extra/update-copyright
@@ -3,7 +3,7 @@
# Update an FSF copyright year list to include the current year.
-# Copyright (C) 2009-2019 Free Software Foundation, Inc.
+# Copyright (C) 2009-2020 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/fchdir.c b/gnulib/import/fchdir.c
index 38ab802..c27914b 100644
--- a/gnulib/import/fchdir.c
+++ b/gnulib/import/fchdir.c
@@ -1,5 +1,5 @@
/* fchdir replacement.
- Copyright (C) 2006-2019 Free Software Foundation, Inc.
+ Copyright (C) 2006-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/fcntl.c b/gnulib/import/fcntl.c
index a3ffaa6..6b9927e 100644
--- a/gnulib/import/fcntl.c
+++ b/gnulib/import/fcntl.c
@@ -1,6 +1,6 @@
/* Provide file descriptor control.
- Copyright (C) 2009-2019 Free Software Foundation, Inc.
+ Copyright (C) 2009-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/fcntl.in.h b/gnulib/import/fcntl.in.h
index abe7993..b2e1e51 100644
--- a/gnulib/import/fcntl.in.h
+++ b/gnulib/import/fcntl.in.h
@@ -1,6 +1,6 @@
/* Like <fcntl.h>, but with non-working flags defined to 0.
- Copyright (C) 2006-2019 Free Software Foundation, Inc.
+ Copyright (C) 2006-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/fd-hook.c b/gnulib/import/fd-hook.c
index 7879119..8840f63 100644
--- a/gnulib/import/fd-hook.c
+++ b/gnulib/import/fd-hook.c
@@ -1,5 +1,5 @@
/* Hook for making file descriptor functions close(), ioctl() extensible.
- Copyright (C) 2009-2019 Free Software Foundation, Inc.
+ Copyright (C) 2009-2020 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
diff --git a/gnulib/import/fd-hook.h b/gnulib/import/fd-hook.h
index bf07f00..ed1a15a 100644
--- a/gnulib/import/fd-hook.h
+++ b/gnulib/import/fd-hook.h
@@ -1,5 +1,5 @@
/* Hook for making file descriptor functions close(), ioctl() extensible.
- Copyright (C) 2009-2019 Free Software Foundation, Inc.
+ Copyright (C) 2009-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published
diff --git a/gnulib/import/fd-safer-flag.c b/gnulib/import/fd-safer-flag.c
index 7c026ef..8fdf8db 100644
--- a/gnulib/import/fd-safer-flag.c
+++ b/gnulib/import/fd-safer-flag.c
@@ -1,7 +1,7 @@
/* Adjust a file descriptor result so that it avoids clobbering
STD{IN,OUT,ERR}_FILENO, with specific flags.
- Copyright (C) 2005-2006, 2009-2019 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2009-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/fd-safer.c b/gnulib/import/fd-safer.c
index b5113e1..e011c00 100644
--- a/gnulib/import/fd-safer.c
+++ b/gnulib/import/fd-safer.c
@@ -1,6 +1,6 @@
/* Return a safer copy of a file descriptor.
- Copyright (C) 2005-2006, 2009-2019 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2009-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/fdopendir.c b/gnulib/import/fdopendir.c
index b65588a..883c0c4 100644
--- a/gnulib/import/fdopendir.c
+++ b/gnulib/import/fdopendir.c
@@ -1,5 +1,5 @@
/* provide a replacement fdopendir function
- Copyright (C) 2004-2019 Free Software Foundation, Inc.
+ Copyright (C) 2004-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/filename.h b/gnulib/import/filename.h
index 3ba3105..d4c7020 100644
--- a/gnulib/import/filename.h
+++ b/gnulib/import/filename.h
@@ -1,5 +1,5 @@
/* Basic filename support macros.
- Copyright (C) 2001-2004, 2007-2019 Free Software Foundation, Inc.
+ Copyright (C) 2001-2004, 2007-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/filenamecat-lgpl.c b/gnulib/import/filenamecat-lgpl.c
index 98b105a..6f666f2 100644
--- a/gnulib/import/filenamecat-lgpl.c
+++ b/gnulib/import/filenamecat-lgpl.c
@@ -1,6 +1,6 @@
/* Concatenate two arbitrary file names.
- Copyright (C) 1996-2007, 2009-2019 Free Software Foundation, Inc.
+ Copyright (C) 1996-2007, 2009-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/filenamecat.h b/gnulib/import/filenamecat.h
index 67b46b0..13387b4 100644
--- a/gnulib/import/filenamecat.h
+++ b/gnulib/import/filenamecat.h
@@ -1,6 +1,6 @@
/* Concatenate two arbitrary file names.
- Copyright (C) 1996-1997, 2003, 2005, 2007, 2009-2019 Free Software
+ Copyright (C) 1996-1997, 2003, 2005, 2007, 2009-2020 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
diff --git a/gnulib/import/flexmember.h b/gnulib/import/flexmember.h
index af17b41..0dc77c3 100644
--- a/gnulib/import/flexmember.h
+++ b/gnulib/import/flexmember.h
@@ -1,6 +1,6 @@
/* Sizes of structs with flexible array members.
- Copyright 2016-2019 Free Software Foundation, Inc.
+ Copyright 2016-2020 Free Software Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/gnulib/import/float+.h b/gnulib/import/float+.h
index 5af861f..1e19a71 100644
--- a/gnulib/import/float+.h
+++ b/gnulib/import/float+.h
@@ -1,5 +1,5 @@
/* Supplemental information about the floating-point formats.
- Copyright (C) 2007, 2009-2019 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2020 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2007.
This program is free software; you can redistribute it and/or modify
diff --git a/gnulib/import/float.c b/gnulib/import/float.c
index 8872deb..af20b0a 100644
--- a/gnulib/import/float.c
+++ b/gnulib/import/float.c
@@ -1,5 +1,5 @@
/* Auxiliary definitions for <float.h>.
- Copyright (C) 2011-2019 Free Software Foundation, Inc.
+ Copyright (C) 2011-2020 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2011.
This program is free software: you can redistribute it and/or modify
diff --git a/gnulib/import/float.in.h b/gnulib/import/float.in.h
index ba094a8..8e4d47d 100644
--- a/gnulib/import/float.in.h
+++ b/gnulib/import/float.in.h
@@ -1,6 +1,6 @@
/* A correct <float.h>.
- Copyright (C) 2007-2019 Free Software Foundation, Inc.
+ Copyright (C) 2007-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/fnmatch.c b/gnulib/import/fnmatch.c
index dbcd290..0338bb3 100644
--- a/gnulib/import/fnmatch.c
+++ b/gnulib/import/fnmatch.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-1993, 1996-2007, 2009-2019 Free Software Foundation, Inc.
+/* Copyright (C) 1991-1993, 1996-2007, 2009-2020 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/fnmatch.in.h b/gnulib/import/fnmatch.in.h
index 24359a0..76ac721 100644
--- a/gnulib/import/fnmatch.in.h
+++ b/gnulib/import/fnmatch.in.h
@@ -1,5 +1,5 @@
/* Substitute for and wrapper around <fnmatch.h>.
- Copyright (C) 1991-1993, 1996-1999, 2001-2003, 2005, 2007, 2009-2019 Free
+ Copyright (C) 1991-1993, 1996-1999, 2001-2003, 2005, 2007, 2009-2020 Free
Software Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/gnulib/import/fnmatch_loop.c b/gnulib/import/fnmatch_loop.c
index 82a7cee..50064ab 100644
--- a/gnulib/import/fnmatch_loop.c
+++ b/gnulib/import/fnmatch_loop.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-1993, 1996-2006, 2009-2019 Free Software Foundation, Inc.
+/* Copyright (C) 1991-1993, 1996-2006, 2009-2020 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
diff --git a/gnulib/import/fpucw.h b/gnulib/import/fpucw.h
index 91a1cbe..1c6edf6 100644
--- a/gnulib/import/fpucw.h
+++ b/gnulib/import/fpucw.h
@@ -1,5 +1,5 @@
/* Manipulating the FPU control word. -*- coding: utf-8 -*-
- Copyright (C) 2007-2019 Free Software Foundation, Inc.
+ Copyright (C) 2007-2020 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2007.
This program is free software: you can redistribute it and/or modify
diff --git a/gnulib/import/frexp.c b/gnulib/import/frexp.c
index d3f1199..ad1dba7 100644
--- a/gnulib/import/frexp.c
+++ b/gnulib/import/frexp.c
@@ -1,5 +1,5 @@
/* Split a double into fraction and mantissa.
- Copyright (C) 2007-2019 Free Software Foundation, Inc.
+ Copyright (C) 2007-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/frexpl.c b/gnulib/import/frexpl.c
index 820cb2d..49484cb 100644
--- a/gnulib/import/frexpl.c
+++ b/gnulib/import/frexpl.c
@@ -1,5 +1,5 @@
/* Split a 'long double' into fraction and mantissa.
- Copyright (C) 2007, 2009-2019 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/fstat.c b/gnulib/import/fstat.c
index a892b8f..235014a 100644
--- a/gnulib/import/fstat.c
+++ b/gnulib/import/fstat.c
@@ -1,5 +1,5 @@
/* fstat() replacement.
- Copyright (C) 2011-2019 Free Software Foundation, Inc.
+ Copyright (C) 2011-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/fstatat.c b/gnulib/import/fstatat.c
index db864da..9da1269 100644
--- a/gnulib/import/fstatat.c
+++ b/gnulib/import/fstatat.c
@@ -1,6 +1,6 @@
/* Work around an fstatat bug on Solaris 9.
- Copyright (C) 2006, 2009-2019 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/getcwd-lgpl.c b/gnulib/import/getcwd-lgpl.c
index 1eaac78..fca6bde 100644
--- a/gnulib/import/getcwd-lgpl.c
+++ b/gnulib/import/getcwd-lgpl.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2011-2019 Free Software Foundation, Inc.
+/* Copyright (C) 2011-2020 Free Software Foundation, Inc.
This file is part of gnulib.
This program is free software: you can redistribute it and/or modify
diff --git a/gnulib/import/getcwd.c b/gnulib/import/getcwd.c
index bf87809..45470fc 100644
--- a/gnulib/import/getcwd.c
+++ b/gnulib/import/getcwd.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-1999, 2004-2019 Free Software Foundation, Inc.
+/* Copyright (C) 1991-1999, 2004-2020 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
diff --git a/gnulib/import/getdtablesize.c b/gnulib/import/getdtablesize.c
index 03a9243..0fe7092 100644
--- a/gnulib/import/getdtablesize.c
+++ b/gnulib/import/getdtablesize.c
@@ -1,5 +1,5 @@
/* getdtablesize() function: Return maximum possible file descriptor value + 1.
- Copyright (C) 2008-2019 Free Software Foundation, Inc.
+ Copyright (C) 2008-2020 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This program is free software: you can redistribute it and/or modify
diff --git a/gnulib/import/getlogin_r.c b/gnulib/import/getlogin_r.c
index a94282c..799ffa4 100644
--- a/gnulib/import/getlogin_r.c
+++ b/gnulib/import/getlogin_r.c
@@ -1,6 +1,6 @@
/* Provide a working getlogin_r for systems which lack it.
- Copyright (C) 2005-2007, 2010-2019 Free Software Foundation, Inc.
+ Copyright (C) 2005-2007, 2010-2020 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/getprogname.c b/gnulib/import/getprogname.c
index de8f49a..9f69f5a 100644
--- a/gnulib/import/getprogname.c
+++ b/gnulib/import/getprogname.c
@@ -1,5 +1,5 @@
/* Program name management.
- Copyright (C) 2016-2019 Free Software Foundation, Inc.
+ Copyright (C) 2016-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/getprogname.h b/gnulib/import/getprogname.h
index 1590b38..676912b 100644
--- a/gnulib/import/getprogname.h
+++ b/gnulib/import/getprogname.h
@@ -1,5 +1,5 @@
/* Program name management.
- Copyright (C) 2016-2019 Free Software Foundation, Inc.
+ Copyright (C) 2016-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/gettext.h b/gnulib/import/gettext.h
index c7c0fdb..0bd1e13 100644
--- a/gnulib/import/gettext.h
+++ b/gnulib/import/gettext.h
@@ -1,5 +1,5 @@
/* Convenience header for conditional use of GNU <libintl.h>.
- Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2019 Free Software
+ Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2020 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
diff --git a/gnulib/import/gettimeofday.c b/gnulib/import/gettimeofday.c
index e728bf4..b63f8f2 100644
--- a/gnulib/import/gettimeofday.c
+++ b/gnulib/import/gettimeofday.c
@@ -1,6 +1,6 @@
/* Provide gettimeofday for systems that don't have it or for which it's broken.
- Copyright (C) 2001-2003, 2005-2007, 2009-2019 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2005-2007, 2009-2020 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/glob-libc.h b/gnulib/import/glob-libc.h
index 9b7f93e..3cbe3b4 100644
--- a/gnulib/import/glob-libc.h
+++ b/gnulib/import/glob-libc.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2020 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
diff --git a/gnulib/import/glob.c b/gnulib/import/glob.c
index 6f57860..f1b20d4 100644
--- a/gnulib/import/glob.c
+++ b/gnulib/import/glob.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2019 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2020 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
@@ -72,6 +72,10 @@
# define __glob glob
# define __getlogin_r(buf, len) getlogin_r (buf, len)
# define __lstat64(fname, buf) lstat (fname, buf)
+# ifdef __MINGW32__
+ /* Avoid GCC warning. mingw has an unused __stat64 macro. */
+# undef __stat64
+# endif
# define __stat64(fname, buf) stat (fname, buf)
# define __fxstatat64(_, d, f, st, flag) fstatat (d, f, st, flag)
# define struct_stat64 struct stat
@@ -839,10 +843,11 @@ __glob (const char *pattern, int flags, int (*errfunc) (const char *, int),
{
size_t home_len = strlen (p->pw_dir);
size_t rest_len = end_name == NULL ? 0 : strlen (end_name);
+ /* dirname contains end_name; we can't free it now. */
+ char *prev_dirname =
+ (__glibc_unlikely (malloc_dirname) ? dirname : NULL);
char *d;
- if (__glibc_unlikely (malloc_dirname))
- free (dirname);
malloc_dirname = 0;
if (glob_use_alloca (alloca_used, home_len + rest_len + 1))
@@ -853,6 +858,7 @@ __glob (const char *pattern, int flags, int (*errfunc) (const char *, int),
dirname = malloc (home_len + rest_len + 1);
if (dirname == NULL)
{
+ free (prev_dirname);
scratch_buffer_free (&pwtmpbuf);
retval = GLOB_NOSPACE;
goto out;
@@ -864,6 +870,8 @@ __glob (const char *pattern, int flags, int (*errfunc) (const char *, int),
d = mempcpy (d, end_name, rest_len);
*d = '\0';
+ free (prev_dirname);
+
dirlen = home_len + rest_len;
dirname_modified = 1;
}
diff --git a/gnulib/import/glob.in.h b/gnulib/import/glob.in.h
index 597979b..e0ea7b5 100644
--- a/gnulib/import/glob.in.h
+++ b/gnulib/import/glob.in.h
@@ -1,6 +1,6 @@
/* glob.h -- Find a path matching a pattern.
- Copyright (C) 2005-2007, 2009-2019 Free Software Foundation, Inc.
+ Copyright (C) 2005-2007, 2009-2020 Free Software Foundation, Inc.
Written by Derek Price <derek@ximbiot.com> & Paul Eggert <eggert@CS.UCLA.EDU>
diff --git a/gnulib/import/glob_internal.h b/gnulib/import/glob_internal.h
index 469d4d9..87a187d 100644
--- a/gnulib/import/glob_internal.h
+++ b/gnulib/import/glob_internal.h
@@ -1,5 +1,5 @@
/* Shared definition for glob and glob_pattern_p.
- Copyright (C) 2017-2019 Free Software Foundation, Inc.
+ Copyright (C) 2017-2020 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
diff --git a/gnulib/import/glob_pattern_p.c b/gnulib/import/glob_pattern_p.c
index 163ce75..1408a24 100644
--- a/gnulib/import/glob_pattern_p.c
+++ b/gnulib/import/glob_pattern_p.c
@@ -1,5 +1,5 @@
/* Return nonzero if PATTERN contains any metacharacters.
- Copyright (C) 2017-2019 Free Software Foundation, Inc.
+ Copyright (C) 2017-2020 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
diff --git a/gnulib/import/globfree.c b/gnulib/import/globfree.c
index 77a1cca..c833bef 100644
--- a/gnulib/import/globfree.c
+++ b/gnulib/import/globfree.c
@@ -1,5 +1,5 @@
/* Frees the dynamically allocated storage from an earlier call to glob.
- Copyright (C) 2017-2019 Free Software Foundation, Inc.
+ Copyright (C) 2017-2020 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
diff --git a/gnulib/import/glthread/lock.c b/gnulib/import/glthread/lock.c
index e471188..10af6f2 100644
--- a/gnulib/import/glthread/lock.c
+++ b/gnulib/import/glthread/lock.c
@@ -1,5 +1,5 @@
/* Locking in multithreaded situations.
- Copyright (C) 2005-2019 Free Software Foundation, Inc.
+ Copyright (C) 2005-2020 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
@@ -254,7 +254,7 @@ glthread_recursive_lock_destroy (gl_recursive_lock_t *lock)
# if HAVE_PTHREAD_RWLOCK && (HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER || (defined PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP && (__GNU_LIBRARY__ > 1)))
-# ifdef PTHREAD_RWLOCK_INITIALIZER
+# if defined PTHREAD_RWLOCK_INITIALIZER || defined PTHREAD_RWLOCK_INITIALIZER_NP
# if !HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER
/* glibc with bug https://sourceware.org/bugzilla/show_bug.cgi?id=13701 */
@@ -718,6 +718,26 @@ glthread_once_singlethreaded (pthread_once_t *once_control)
return 0;
}
+# if !(PTHREAD_IN_USE_DETECTION_HARD || USE_POSIX_THREADS_WEAK)
+
+int
+glthread_once_multithreaded (pthread_once_t *once_control,
+ void (*init_function) (void))
+{
+ int err = pthread_once (once_control, init_function);
+ if (err == ENOSYS)
+ {
+ /* This happens on FreeBSD 11: The pthread_once function in libc returns
+ ENOSYS. */
+ if (glthread_once_singlethreaded (once_control))
+ init_function ();
+ return 0;
+ }
+ return err;
+}
+
+# endif
+
#endif
/* ========================================================================= */
diff --git a/gnulib/import/glthread/lock.h b/gnulib/import/glthread/lock.h
index c190e2e..59485f2 100644
--- a/gnulib/import/glthread/lock.h
+++ b/gnulib/import/glthread/lock.h
@@ -1,5 +1,5 @@
/* Locking in multithreaded situations.
- Copyright (C) 2005-2019 Free Software Foundation, Inc.
+ Copyright (C) 2005-2020 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
@@ -308,7 +308,7 @@ typedef pthread_mutex_t gl_lock_t;
# if HAVE_PTHREAD_RWLOCK && (HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER || (defined PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP && (__GNU_LIBRARY__ > 1)))
-# ifdef PTHREAD_RWLOCK_INITIALIZER
+# if defined PTHREAD_RWLOCK_INITIALIZER || defined PTHREAD_RWLOCK_INITIALIZER_NP
typedef pthread_rwlock_t gl_rwlock_t;
# define gl_rwlock_define(STORAGECLASS, NAME) \
@@ -316,8 +316,13 @@ typedef pthread_rwlock_t gl_rwlock_t;
# define gl_rwlock_define_initialized(STORAGECLASS, NAME) \
STORAGECLASS pthread_rwlock_t NAME = gl_rwlock_initializer;
# if HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER
-# define gl_rwlock_initializer \
- PTHREAD_RWLOCK_INITIALIZER
+# if defined PTHREAD_RWLOCK_INITIALIZER
+# define gl_rwlock_initializer \
+ PTHREAD_RWLOCK_INITIALIZER
+# else
+# define gl_rwlock_initializer \
+ PTHREAD_RWLOCK_INITIALIZER_NP
+# endif
# define glthread_rwlock_init(LOCK) \
(pthread_in_use () ? pthread_rwlock_init (LOCK, NULL) : 0)
# else /* glibc with bug https://sourceware.org/bugzilla/show_bug.cgi?id=13701 */
@@ -500,10 +505,19 @@ extern int glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *l
typedef pthread_once_t gl_once_t;
# define gl_once_define(STORAGECLASS, NAME) \
STORAGECLASS pthread_once_t NAME = PTHREAD_ONCE_INIT;
-# define glthread_once(ONCE_CONTROL, INITFUNCTION) \
- (pthread_in_use () \
- ? pthread_once (ONCE_CONTROL, INITFUNCTION) \
- : (glthread_once_singlethreaded (ONCE_CONTROL) ? (INITFUNCTION (), 0) : 0))
+# if PTHREAD_IN_USE_DETECTION_HARD || USE_POSIX_THREADS_WEAK
+# define glthread_once(ONCE_CONTROL, INITFUNCTION) \
+ (pthread_in_use () \
+ ? pthread_once (ONCE_CONTROL, INITFUNCTION) \
+ : (glthread_once_singlethreaded (ONCE_CONTROL) ? (INITFUNCTION (), 0) : 0))
+# else
+# define glthread_once(ONCE_CONTROL, INITFUNCTION) \
+ (pthread_in_use () \
+ ? glthread_once_multithreaded (ONCE_CONTROL, INITFUNCTION) \
+ : (glthread_once_singlethreaded (ONCE_CONTROL) ? (INITFUNCTION (), 0) : 0))
+extern int glthread_once_multithreaded (pthread_once_t *once_control,
+ void (*init_function) (void));
+# endif
extern int glthread_once_singlethreaded (pthread_once_t *once_control);
# ifdef __cplusplus
diff --git a/gnulib/import/glthread/threadlib.c b/gnulib/import/glthread/threadlib.c
index 86947f5..28bf3c6 100644
--- a/gnulib/import/glthread/threadlib.c
+++ b/gnulib/import/glthread/threadlib.c
@@ -1,5 +1,5 @@
/* Multithreading primitives.
- Copyright (C) 2005-2019 Free Software Foundation, Inc.
+ Copyright (C) 2005-2020 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/hard-locale.c b/gnulib/import/hard-locale.c
index dcfcad6..730e9be 100644
--- a/gnulib/import/hard-locale.c
+++ b/gnulib/import/hard-locale.c
@@ -1,6 +1,6 @@
/* hard-locale.c -- Determine whether a locale is hard.
- Copyright (C) 1997-1999, 2002-2004, 2006-2007, 2009-2019 Free Software
+ Copyright (C) 1997-1999, 2002-2004, 2006-2007, 2009-2020 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
@@ -21,52 +21,15 @@
#include "hard-locale.h"
#include <locale.h>
-#include <stdlib.h>
#include <string.h>
-#ifdef __GLIBC__
-# define GLIBC_VERSION __GLIBC__
-#elif defined __UCLIBC__
-# define GLIBC_VERSION 2
-#else
-# define GLIBC_VERSION 0
-#endif
-
-/* Return true if the current CATEGORY locale is hard, i.e. if you
- can't get away with assuming traditional C or POSIX behavior. */
bool
hard_locale (int category)
{
- bool hard = true;
- char const *p = setlocale (category, NULL);
-
- if (p)
- {
- if (2 <= GLIBC_VERSION)
- {
- if (strcmp (p, "C") == 0 || strcmp (p, "POSIX") == 0)
- hard = false;
- }
- else
- {
- char *locale = strdup (p);
- if (locale)
- {
- /* Temporarily set the locale to the "C" and "POSIX" locales
- to find their names, so that we can determine whether one
- or the other is the caller's locale. */
- if (((p = setlocale (category, "C"))
- && strcmp (p, locale) == 0)
- || ((p = setlocale (category, "POSIX"))
- && strcmp (p, locale) == 0))
- hard = false;
+ char locale[SETLOCALE_NULL_MAX];
- /* Restore the caller's locale. */
- setlocale (category, locale);
- free (locale);
- }
- }
- }
+ if (setlocale_null_r (category, locale, sizeof (locale)))
+ return false;
- return hard;
+ return !(strcmp (locale, "C") == 0 || strcmp (locale, "POSIX") == 0);
}
diff --git a/gnulib/import/hard-locale.h b/gnulib/import/hard-locale.h
index 8f1da96..1886eaa 100644
--- a/gnulib/import/hard-locale.h
+++ b/gnulib/import/hard-locale.h
@@ -1,6 +1,6 @@
/* Determine whether a locale is hard.
- Copyright (C) 1999, 2003-2004, 2009-2019 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2003-2004, 2009-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -20,6 +20,9 @@
# include <stdbool.h>
-bool hard_locale (int);
+/* Return true if the specified CATEGORY of the current locale is hard, i.e.
+ different from the C or POSIX locale that has a fixed behavior.
+ CATEGORY must be one of the LC_* values, but not LC_ALL. */
+extern bool hard_locale (int category);
#endif /* HARD_LOCALE_H_ */
diff --git a/gnulib/import/inet_ntop.c b/gnulib/import/inet_ntop.c
index 14c38d2..b380da4 100644
--- a/gnulib/import/inet_ntop.c
+++ b/gnulib/import/inet_ntop.c
@@ -1,6 +1,6 @@
/* inet_ntop.c -- convert IPv4 and IPv6 addresses from binary to text form
- Copyright (C) 2005-2006, 2008-2019 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2008-2020 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/intprops.h b/gnulib/import/intprops.h
index 0c3963d..dfbcaae 100644
--- a/gnulib/import/intprops.h
+++ b/gnulib/import/intprops.h
@@ -1,6 +1,6 @@
/* intprops.h -- properties of integer types
- Copyright (C) 2001-2019 Free Software Foundation, Inc.
+ Copyright (C) 2001-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published
diff --git a/gnulib/import/inttypes.in.h b/gnulib/import/inttypes.in.h
index 49bcbc1..d6efc7e 100644
--- a/gnulib/import/inttypes.in.h
+++ b/gnulib/import/inttypes.in.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2006-2019 Free Software Foundation, Inc.
+/* Copyright (C) 2006-2020 Free Software Foundation, Inc.
Written by Paul Eggert, Bruno Haible, Derek Price.
This file is part of gnulib.
@@ -38,6 +38,8 @@
# endif
# @INCLUDE_NEXT@ @NEXT_INTTYPES_H@
+
+# define _GL_FINISHED_INCLUDING_SYSTEM_INTTYPES_H
# endif
#endif
@@ -189,7 +191,7 @@
# define _PRI64_PREFIX "l"
# elif defined _MSC_VER || defined __MINGW32__
# define _PRI64_PREFIX "I64"
-# elif @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
+# elif LONG_MAX >> 30 == 1
# define _PRI64_PREFIX _LONG_LONG_FORMAT_PREFIX
# endif
# if !defined PRId64 || @PRI_MACROS_BROKEN@
@@ -206,7 +208,7 @@
# define _PRIu64_PREFIX "l"
# elif defined _MSC_VER || defined __MINGW32__
# define _PRIu64_PREFIX "I64"
-# elif @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
+# elif ULONG_MAX >> 31 == 1
# define _PRIu64_PREFIX _LONG_LONG_FORMAT_PREFIX
# endif
# if !defined PRIo64 || @PRI_MACROS_BROKEN@
@@ -682,7 +684,7 @@
# define _SCN64_PREFIX "l"
# elif defined _MSC_VER || defined __MINGW32__
# define _SCN64_PREFIX "I64"
-# elif @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
+# elif LONG_MAX >> 30 == 1
# define _SCN64_PREFIX _LONG_LONG_FORMAT_PREFIX
# endif
# if !defined SCNd64 || @PRI_MACROS_BROKEN@
@@ -699,7 +701,7 @@
# define _SCNu64_PREFIX "l"
# elif defined _MSC_VER || defined __MINGW32__
# define _SCNu64_PREFIX "I64"
-# elif @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
+# elif ULONG_MAX >> 31 == 1
# define _SCNu64_PREFIX _LONG_LONG_FORMAT_PREFIX
# endif
# if !defined SCNo64 || @PRI_MACROS_BROKEN@
diff --git a/gnulib/import/isnan.c b/gnulib/import/isnan.c
index c399c18..814456d 100644
--- a/gnulib/import/isnan.c
+++ b/gnulib/import/isnan.c
@@ -1,5 +1,5 @@
/* Test for NaN that does not need libm.
- Copyright (C) 2007-2019 Free Software Foundation, Inc.
+ Copyright (C) 2007-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/isnand-nolibm.h b/gnulib/import/isnand-nolibm.h
index 174c61e..cbabed4 100644
--- a/gnulib/import/isnand-nolibm.h
+++ b/gnulib/import/isnand-nolibm.h
@@ -1,5 +1,5 @@
/* Test for NaN that does not need libm.
- Copyright (C) 2007-2019 Free Software Foundation, Inc.
+ Copyright (C) 2007-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/isnand.c b/gnulib/import/isnand.c
index c3cd315..a672553 100644
--- a/gnulib/import/isnand.c
+++ b/gnulib/import/isnand.c
@@ -1,5 +1,5 @@
/* Test for NaN that does not need libm.
- Copyright (C) 2008-2019 Free Software Foundation, Inc.
+ Copyright (C) 2008-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/isnanl-nolibm.h b/gnulib/import/isnanl-nolibm.h
index fdedf56..c45e3ab 100644
--- a/gnulib/import/isnanl-nolibm.h
+++ b/gnulib/import/isnanl-nolibm.h
@@ -1,5 +1,5 @@
/* Test for NaN that does not need libm.
- Copyright (C) 2007-2019 Free Software Foundation, Inc.
+ Copyright (C) 2007-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/isnanl.c b/gnulib/import/isnanl.c
index 99afd29..4532853 100644
--- a/gnulib/import/isnanl.c
+++ b/gnulib/import/isnanl.c
@@ -1,5 +1,5 @@
/* Test for NaN that does not need libm.
- Copyright (C) 2007, 2009-2019 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/itold.c b/gnulib/import/itold.c
index bca01eb..d764003 100644
--- a/gnulib/import/itold.c
+++ b/gnulib/import/itold.c
@@ -1,5 +1,5 @@
/* Replacement for 'int' to 'long double' conversion routine.
- Copyright (C) 2011-2019 Free Software Foundation, Inc.
+ Copyright (C) 2011-2020 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2011.
This program is free software: you can redistribute it and/or modify
diff --git a/gnulib/import/lc-charset-dispatch.c b/gnulib/import/lc-charset-dispatch.c
new file mode 100644
index 0000000..79057d4
--- /dev/null
+++ b/gnulib/import/lc-charset-dispatch.c
@@ -0,0 +1,82 @@
+/* Dispatching based on the current locale's character encoding.
+ Copyright (C) 2018-2020 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 Bruno Haible <bruno@clisp.org>, 2018. */
+
+#include <config.h>
+
+/* Specification. */
+#include "lc-charset-dispatch.h"
+
+#if GNULIB_defined_mbstate_t
+
+# include "localcharset.h"
+# include "streq.h"
+
+# if GNULIB_WCHAR_SINGLE
+/* When we know that the locale does not change, provide a speedup by
+ caching the value of locale_encoding_classification. */
+# define locale_encoding_classification_cached locale_encoding_classification
+# else
+/* By default, don't make assumptions, hence no caching. */
+# define locale_encoding_classification_uncached locale_encoding_classification
+# endif
+
+# if GNULIB_WCHAR_SINGLE
+static inline
+# endif
+enc_t
+locale_encoding_classification_uncached (void)
+{
+ const char *encoding = locale_charset ();
+ if (STREQ_OPT (encoding, "UTF-8", 'U', 'T', 'F', '-', '8', 0, 0, 0, 0))
+ return enc_utf8;
+ if (STREQ_OPT (encoding, "EUC-JP", 'E', 'U', 'C', '-', 'J', 'P', 0, 0, 0))
+ return enc_eucjp;
+ if (STREQ_OPT (encoding, "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0)
+ || STREQ_OPT (encoding, "GB2312", 'G', 'B', '2', '3', '1', '2', 0, 0, 0)
+ || STREQ_OPT (encoding, "BIG5", 'B', 'I', 'G', '5', 0, 0, 0, 0, 0))
+ return enc_94;
+ if (STREQ_OPT (encoding, "EUC-TW", 'E', 'U', 'C', '-', 'T', 'W', 0, 0, 0))
+ return enc_euctw;
+ if (STREQ_OPT (encoding, "GB18030", 'G', 'B', '1', '8', '0', '3', '0', 0, 0))
+ return enc_gb18030;
+ if (STREQ_OPT (encoding, "SJIS", 'S', 'J', 'I', 'S', 0, 0, 0, 0, 0))
+ return enc_sjis;
+ return enc_other;
+}
+
+# if GNULIB_WCHAR_SINGLE
+
+static int cached_locale_enc = -1;
+
+enc_t
+locale_encoding_classification_cached (void)
+{
+ if (cached_locale_enc < 0)
+ cached_locale_enc = locale_encoding_classification_uncached ();
+ return cached_locale_enc;
+}
+
+# endif
+
+#else
+
+/* This declaration is solely to ensure that after preprocessing
+ this file is never empty. */
+typedef int dummy;
+
+#endif
diff --git a/gnulib/import/lc-charset-dispatch.h b/gnulib/import/lc-charset-dispatch.h
new file mode 100644
index 0000000..95c2316
--- /dev/null
+++ b/gnulib/import/lc-charset-dispatch.h
@@ -0,0 +1,40 @@
+/* Dispatching based on the current locale's character encoding.
+ Copyright (C) 2018-2020 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 Bruno Haible <bruno@clisp.org>, 2018. */
+
+#include <wchar.h>
+
+#if GNULIB_defined_mbstate_t
+
+/* A classification of special values of the encoding of the current locale. */
+typedef enum
+ {
+ enc_other, /* other */
+ enc_utf8, /* UTF-8 */
+ enc_eucjp, /* EUC-JP */
+ enc_94, /* EUC-KR, GB2312, BIG5 */
+ enc_euctw, /* EUC-TW */
+ enc_gb18030, /* GB18030 */
+ enc_sjis /* SJIS */
+ }
+ enc_t;
+
+/* Returns a classification of special values of the encoding of the current
+ locale. */
+extern enc_t locale_encoding_classification (void);
+
+#endif
diff --git a/gnulib/import/libc-config.h b/gnulib/import/libc-config.h
index 57c6966..124f1d7 100644
--- a/gnulib/import/libc-config.h
+++ b/gnulib/import/libc-config.h
@@ -1,6 +1,6 @@
/* System definitions for code taken from the GNU C Library
- Copyright 2017-2019 Free Software Foundation, Inc.
+ Copyright 2017-2020 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
@@ -55,8 +55,17 @@
#ifndef __glibc_clang_prereq
# if defined __clang_major__ && defined __clang_minor__
-# define __glibc_clang_prereq(maj, min) \
- ((maj) < __clang_major__ + ((min) <= __clang_minor__))
+# ifdef __apple_build_version__
+/* Apple for some reason renumbers __clang_major__ and __clang_minor__.
+ Gnulib code uses only __glibc_clang_prereq (3, 5); map it to
+ 6000000 <= __apple_build_version__. Support for other calls to
+ __glibc_clang_prereq can be added here as needed. */
+# define __glibc_clang_prereq(maj, min) \
+ ((maj) == 3 && (min) == 5 ? 6000000 <= __apple_build_version__ : 0)
+# else
+# define __glibc_clang_prereq(maj, min) \
+ ((maj) < __clang_major__ + ((min) <= __clang_minor__))
+# endif
# else
# define __glibc_clang_prereq(maj, min) 0
# endif
diff --git a/gnulib/import/limits.in.h b/gnulib/import/limits.in.h
index 39750b3..90c273f 100644
--- a/gnulib/import/limits.in.h
+++ b/gnulib/import/limits.in.h
@@ -1,6 +1,6 @@
/* A GNU-like <limits.h>.
- Copyright 2016-2019 Free Software Foundation, Inc.
+ Copyright 2016-2020 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
diff --git a/gnulib/import/localcharset.c b/gnulib/import/localcharset.c
index 479fcb9..721c8a9 100644
--- a/gnulib/import/localcharset.c
+++ b/gnulib/import/localcharset.c
@@ -1,6 +1,6 @@
/* Determine a canonical name for the current locale's character encoding.
- Copyright (C) 2000-2006, 2008-2019 Free Software Foundation, Inc.
+ Copyright (C) 2000-2006, 2008-2020 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
@@ -58,6 +58,9 @@
#elif defined WINDOWS_NATIVE
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
+ /* For the use of setlocale() below, the Gnulib override in setlocale.c is
+ not needed; see the platform lists in setlocale_null.m4. */
+# undef setlocale
#endif
#if defined OS2
# define INCL_DOS
@@ -150,7 +153,8 @@ static const struct table_entry alias_table[] =
{ "ISO8859-2", "ISO-8859-2" },
{ "ISO8859-4", "ISO-8859-4" },
{ "ISO8859-5", "ISO-8859-5" },
- { "ISO8859-7", "ISO-8859-7" }
+ { "ISO8859-7", "ISO-8859-7" },
+ { "US-ASCII", "ASCII" }
# define alias_table_defined
# endif
# if defined __APPLE__ && defined __MACH__ /* Mac OS X */
@@ -812,8 +816,11 @@ static const struct table_entry locale_table[] =
/* Determine the current locale's character encoding, and canonicalize it
- into one of the canonical names listed in localcharset.h.
- The result must not be freed; it is statically allocated.
+ into one of the canonical names listed below.
+ The result must not be freed; it is statically allocated. The result
+ becomes invalid when setlocale() is used to change the global locale, or
+ when the value of one of the environment variables LC_ALL, LC_CTYPE, LANG
+ is changed; threads in multithreaded programs should not do this.
If the canonical name cannot be determined, the result is a non-canonical
name. */
@@ -825,6 +832,13 @@ locale_charset (void)
{
const char *codeset;
+ /* This function must be multithread-safe. To achieve this without using
+ thread-local storage, we use a simple strcpy or memcpy to fill this static
+ buffer. Filling it through, for example, strcpy + strcat would not be
+ guaranteed to leave the buffer's contents intact if another thread is
+ currently accessing it. If necessary, the contents is first assembled in
+ a stack-allocated buffer. */
+
#if HAVE_LANGINFO_CODESET || defined WINDOWS_NATIVE || defined OS2
# if HAVE_LANGINFO_CODESET
@@ -839,7 +853,7 @@ locale_charset (void)
if (codeset != NULL && strcmp (codeset, "US-ASCII") == 0)
{
const char *locale;
- static char buf[2 + 10 + 1];
+ static char resultbuf[2 + 10 + 1];
locale = getenv ("LC_ALL");
if (locale == NULL || locale[0] == '\0')
@@ -863,11 +877,12 @@ locale_charset (void)
modifier = strchr (dot, '@');
if (modifier == NULL)
return dot;
- if (modifier - dot < sizeof (buf))
+ if (modifier - dot < sizeof (resultbuf))
{
- memcpy (buf, dot, modifier - dot);
- buf [modifier - dot] = '\0';
- return buf;
+ /* This way of filling resultbuf is multithread-safe. */
+ memcpy (resultbuf, dot, modifier - dot);
+ resultbuf [modifier - dot] = '\0';
+ return resultbuf;
}
}
}
@@ -883,8 +898,13 @@ locale_charset (void)
converting to GetConsoleOutputCP(). This leads to correct results,
except when SetConsoleOutputCP has been called and a raster font is
in use. */
- sprintf (buf, "CP%u", GetACP ());
- codeset = buf;
+ {
+ char buf[2 + 10 + 1];
+
+ sprintf (buf, "CP%u", GetACP ());
+ strcpy (resultbuf, buf);
+ codeset = resultbuf;
+ }
}
# endif
@@ -894,34 +914,28 @@ locale_charset (void)
# elif defined WINDOWS_NATIVE
- static char buf[2 + 10 + 1];
+ char buf[2 + 10 + 1];
+ static char resultbuf[2 + 10 + 1];
/* The Windows API has a function returning the locale's codepage as
a number, but the value doesn't change according to what the
'setlocale' call specified. So we use it as a last resort, in
case the string returned by 'setlocale' doesn't specify the
codepage. */
- char *current_locale = setlocale (LC_ALL, NULL);
- char *pdot;
-
- /* If they set different locales for different categories,
- 'setlocale' will return a semi-colon separated list of locale
- values. To make sure we use the correct one, we choose LC_CTYPE. */
- if (strchr (current_locale, ';'))
- current_locale = setlocale (LC_CTYPE, NULL);
+ char *current_locale = setlocale (LC_CTYPE, NULL);
+ char *pdot = strrchr (current_locale, '.');
- pdot = strrchr (current_locale, '.');
if (pdot && 2 + strlen (pdot + 1) + 1 <= sizeof (buf))
sprintf (buf, "CP%s", pdot + 1);
else
{
/* The Windows API has a function returning the locale's codepage as a
- number: GetACP().
- When the output goes to a console window, it needs to be provided in
- GetOEMCP() encoding if the console is using a raster font, or in
- GetConsoleOutputCP() encoding if it is using a TrueType font.
- But in GUI programs and for output sent to files and pipes, GetACP()
- encoding is the best bet. */
+ number: GetACP().
+ When the output goes to a console window, it needs to be provided in
+ GetOEMCP() encoding if the console is using a raster font, or in
+ GetConsoleOutputCP() encoding if it is using a TrueType font.
+ But in GUI programs and for output sent to files and pipes, GetACP()
+ encoding is the best bet. */
sprintf (buf, "CP%u", GetACP ());
}
/* For a locale name such as "French_France.65001", in Windows 10,
@@ -929,12 +943,15 @@ locale_charset (void)
if (strcmp (buf + 2, "65001") == 0 || strcmp (buf + 2, "utf8") == 0)
codeset = "UTF-8";
else
- codeset = buf;
+ {
+ strcpy (resultbuf, buf);
+ codeset = resultbuf;
+ }
# elif defined OS2
const char *locale;
- static char buf[2 + 10 + 1];
+ static char resultbuf[2 + 10 + 1];
ULONG cp[3];
ULONG cplen;
@@ -963,11 +980,12 @@ locale_charset (void)
modifier = strchr (dot, '@');
if (modifier == NULL)
return dot;
- if (modifier - dot < sizeof (buf))
+ if (modifier - dot < sizeof (resultbuf))
{
- memcpy (buf, dot, modifier - dot);
- buf [modifier - dot] = '\0';
- return buf;
+ /* This way of filling resultbuf is multithread-safe. */
+ memcpy (resultbuf, dot, modifier - dot);
+ resultbuf [modifier - dot] = '\0';
+ return resultbuf;
}
}
@@ -983,8 +1001,11 @@ locale_charset (void)
codeset = "";
else
{
+ char buf[2 + 10 + 1];
+
sprintf (buf, "CP%u", cp[0]);
- codeset = buf;
+ strcpy (resultbuf, buf);
+ codeset = resultbuf;
}
}
diff --git a/gnulib/import/localcharset.h b/gnulib/import/localcharset.h
index 7d0d771..aa623be 100644
--- a/gnulib/import/localcharset.h
+++ b/gnulib/import/localcharset.h
@@ -1,5 +1,5 @@
/* Determine a canonical name for the current locale's character encoding.
- Copyright (C) 2000-2003, 2009-2019 Free Software Foundation, Inc.
+ Copyright (C) 2000-2003, 2009-2020 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
@@ -26,7 +26,10 @@ extern "C" {
/* Determine the current locale's character encoding, and canonicalize it
into one of the canonical names listed below.
- The result must not be freed; it is statically allocated.
+ The result must not be freed; it is statically allocated. The result
+ becomes invalid when setlocale() is used to change the global locale, or
+ when the value of one of the environment variables LC_ALL, LC_CTYPE, LANG
+ is changed; threads in multithreaded programs should not do this.
If the canonical name cannot be determined, the result is a non-canonical
name. */
extern const char * locale_charset (void);
@@ -45,15 +48,15 @@ extern const char * locale_charset (void);
(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-1 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin zos
+ ISO-8859-2 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin zos
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-5 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin zos
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-7 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin zos
+ ISO-8859-8 Y glibc aix hpux osf solaris cygwin zos
+ ISO-8859-9 Y glibc aix hpux irix osf solaris freebsd darwin cygwin zos
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
@@ -76,7 +79,7 @@ extern const char * locale_charset (void);
CP874 windows dos
CP922 aix
CP932 aix cygwin windows dos
- CP943 aix
+ CP943 aix zos
CP949 osf darwin windows dos
CP950 windows dos
CP1046 aix
@@ -92,17 +95,17 @@ extern const char * locale_charset (void);
CP1255 glibc windows
CP1256 windows
CP1257 windows
- GB2312 Y glibc aix hpux irix solaris freebsd netbsd darwin cygwin
+ GB2312 Y glibc aix hpux irix solaris freebsd netbsd darwin cygwin zos
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-KR Y glibc aix hpux irix osf solaris freebsd netbsd darwin cygwin zos
EUC-TW glibc aix hpux irix osf solaris netbsd
- BIG5 Y glibc aix hpux osf solaris freebsd netbsd darwin cygwin
+ BIG5 Y glibc aix hpux osf solaris freebsd netbsd darwin cygwin zos
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
+ TIS-620 glibc aix hpux osf solaris cygwin zos
VISCII Y glibc
TCVN5712-1 glibc
ARMSCII-8 glibc freebsd netbsd darwin
@@ -116,7 +119,7 @@ extern const char * locale_charset (void);
HP-KANA8 hpux
DEC-KANJI osf
DEC-HANYU osf
- UTF-8 Y glibc aix hpux osf solaris netbsd darwin cygwin
+ UTF-8 Y glibc aix hpux osf solaris netbsd darwin cygwin zos
Note: Names which are not marked as being a MIME name should not be used in
Internet protocols for information interchange (mail, news, etc.).
diff --git a/gnulib/import/locale.in.h b/gnulib/import/locale.in.h
new file mode 100644
index 0000000..4e9b3f3
--- /dev/null
+++ b/gnulib/import/locale.in.h
@@ -0,0 +1,305 @@
+/* A POSIX <locale.h>.
+ Copyright (C) 2007-2020 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/>. */
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+@PRAGMA_COLUMNS@
+
+#if (defined _WIN32 && !defined __CYGWIN__ && defined __need_locale_t) \
+ || defined _GL_ALREADY_INCLUDING_LOCALE_H
+
+/* Special invocation convention:
+ - Inside mingw header files,
+ - To handle Solaris header files (through Solaris 10) when combined
+ with gettext's libintl.h. */
+
+#@INCLUDE_NEXT@ @NEXT_LOCALE_H@
+
+#else
+/* Normal invocation convention. */
+
+#ifndef _@GUARD_PREFIX@_LOCALE_H
+
+#define _GL_ALREADY_INCLUDING_LOCALE_H
+
+/* The include_next requires a split double-inclusion guard. */
+#@INCLUDE_NEXT@ @NEXT_LOCALE_H@
+
+#undef _GL_ALREADY_INCLUDING_LOCALE_H
+
+#ifndef _@GUARD_PREFIX@_LOCALE_H
+#define _@GUARD_PREFIX@_LOCALE_H
+
+/* NetBSD 5.0 mis-defines NULL. */
+#include <stddef.h>
+
+/* Mac OS X 10.5 defines the locale_t type in <xlocale.h>. */
+#if @HAVE_XLOCALE_H@
+# include <xlocale.h>
+#endif
+
+/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
+
+/* The definition of _GL_ARG_NONNULL is copied here. */
+
+/* The definition of _GL_WARN_ON_USE is copied here. */
+
+/* The LC_MESSAGES locale category is specified in POSIX, but not in ISO C.
+ On systems that don't define it, use the same value as GNU libintl. */
+#if !defined LC_MESSAGES
+# define LC_MESSAGES 1729
+#endif
+
+/* On native Windows with MSVC, 'struct lconv' lacks the members int_p_* and
+ int_n_*. Instead of overriding 'struct lconv', merely define these member
+ names as macros. This avoids trouble in C++ mode. */
+#if defined _MSC_VER
+# define int_p_cs_precedes p_cs_precedes
+# define int_p_sign_posn p_sign_posn
+# define int_p_sep_by_space p_sep_by_space
+# define int_n_cs_precedes n_cs_precedes
+# define int_n_sign_posn n_sign_posn
+# define int_n_sep_by_space n_sep_by_space
+#endif
+
+/* Bionic libc's 'struct lconv' is just a dummy. */
+#if @REPLACE_STRUCT_LCONV@
+# define lconv rpl_lconv
+struct lconv
+{
+ /* All 'char *' are actually 'const char *'. */
+
+ /* Members that depend on the LC_NUMERIC category of the locale. See
+ <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap07.html#tag_07_03_04> */
+
+ /* Symbol used as decimal point. */
+ char *decimal_point;
+ /* Symbol used to separate groups of digits to the left of the decimal
+ point. */
+ char *thousands_sep;
+ /* Definition of the size of groups of digits to the left of the decimal
+ point. */
+ char *grouping;
+
+ /* Members that depend on the LC_MONETARY category of the locale. See
+ <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap07.html#tag_07_03_03> */
+
+ /* Symbol used as decimal point. */
+ char *mon_decimal_point;
+ /* Symbol used to separate groups of digits to the left of the decimal
+ point. */
+ char *mon_thousands_sep;
+ /* Definition of the size of groups of digits to the left of the decimal
+ point. */
+ char *mon_grouping;
+ /* Sign used to indicate a value >= 0. */
+ char *positive_sign;
+ /* Sign used to indicate a value < 0. */
+ char *negative_sign;
+
+ /* For formatting local currency. */
+ /* Currency symbol (3 characters) followed by separator (1 character). */
+ char *currency_symbol;
+ /* Number of digits after the decimal point. */
+ char frac_digits;
+ /* For values >= 0: 1 if the currency symbol precedes the number, 0 if it
+ comes after the number. */
+ char p_cs_precedes;
+ /* For values >= 0: Position of the sign. */
+ char p_sign_posn;
+ /* For values >= 0: Placement of spaces between currency symbol, sign, and
+ number. */
+ char p_sep_by_space;
+ /* For values < 0: 1 if the currency symbol precedes the number, 0 if it
+ comes after the number. */
+ char n_cs_precedes;
+ /* For values < 0: Position of the sign. */
+ char n_sign_posn;
+ /* For values < 0: Placement of spaces between currency symbol, sign, and
+ number. */
+ char n_sep_by_space;
+
+ /* For formatting international currency. */
+ /* Currency symbol (3 characters) followed by separator (1 character). */
+ char *int_curr_symbol;
+ /* Number of digits after the decimal point. */
+ char int_frac_digits;
+ /* For values >= 0: 1 if the currency symbol precedes the number, 0 if it
+ comes after the number. */
+ char int_p_cs_precedes;
+ /* For values >= 0: Position of the sign. */
+ char int_p_sign_posn;
+ /* For values >= 0: Placement of spaces between currency symbol, sign, and
+ number. */
+ char int_p_sep_by_space;
+ /* For values < 0: 1 if the currency symbol precedes the number, 0 if it
+ comes after the number. */
+ char int_n_cs_precedes;
+ /* For values < 0: Position of the sign. */
+ char int_n_sign_posn;
+ /* For values < 0: Placement of spaces between currency symbol, sign, and
+ number. */
+ char int_n_sep_by_space;
+};
+#endif
+
+#if @GNULIB_LOCALECONV@
+# if @REPLACE_LOCALECONV@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef localeconv
+# define localeconv rpl_localeconv
+# endif
+_GL_FUNCDECL_RPL (localeconv, struct lconv *, (void));
+_GL_CXXALIAS_RPL (localeconv, struct lconv *, (void));
+# else
+_GL_CXXALIAS_SYS (localeconv, struct lconv *, (void));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (localeconv);
+# endif
+#elif @REPLACE_STRUCT_LCONV@
+# undef localeconv
+# define localeconv localeconv_used_without_requesting_gnulib_module_localeconv
+#elif defined GNULIB_POSIXCHECK
+# undef localeconv
+# if HAVE_RAW_DECL_LOCALECONV
+_GL_WARN_ON_USE (localeconv,
+ "localeconv returns too few information on some platforms - "
+ "use gnulib module localeconv for portability");
+# endif
+#endif
+
+#if @GNULIB_SETLOCALE@
+# if @REPLACE_SETLOCALE@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef setlocale
+# define setlocale rpl_setlocale
+# define GNULIB_defined_setlocale 1
+# endif
+_GL_FUNCDECL_RPL (setlocale, char *, (int category, const char *locale));
+_GL_CXXALIAS_RPL (setlocale, char *, (int category, const char *locale));
+# else
+_GL_CXXALIAS_SYS (setlocale, char *, (int category, const char *locale));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (setlocale);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef setlocale
+# if HAVE_RAW_DECL_SETLOCALE
+_GL_WARN_ON_USE (setlocale, "setlocale works differently on native Windows - "
+ "use gnulib module setlocale for portability");
+# endif
+#endif
+
+#if @GNULIB_SETLOCALE_NULL@
+/* Included here for convenience. */
+# include "setlocale_null.h"
+#endif
+
+#if /*@GNULIB_NEWLOCALE@ ||*/ (@GNULIB_LOCALENAME@ && @HAVE_NEWLOCALE@)
+# if @REPLACE_NEWLOCALE@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef newlocale
+# define newlocale rpl_newlocale
+# define GNULIB_defined_newlocale 1
+# endif
+_GL_FUNCDECL_RPL (newlocale, locale_t,
+ (int category_mask, const char *name, locale_t base)
+ _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (newlocale, locale_t,
+ (int category_mask, const char *name, locale_t base));
+# else
+# if @HAVE_NEWLOCALE@
+_GL_CXXALIAS_SYS (newlocale, locale_t,
+ (int category_mask, const char *name, locale_t base));
+# endif
+# endif
+# if @HAVE_NEWLOCALE@
+_GL_CXXALIASWARN (newlocale);
+# endif
+# if @HAVE_NEWLOCALE@ || @REPLACE_NEWLOCALE@
+# ifndef HAVE_WORKING_NEWLOCALE
+# define HAVE_WORKING_NEWLOCALE 1
+# endif
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef newlocale
+# if HAVE_RAW_DECL_NEWLOCALE
+_GL_WARN_ON_USE (newlocale, "newlocale is not portable");
+# endif
+#endif
+
+#if @GNULIB_DUPLOCALE@ || (@GNULIB_LOCALENAME@ && @HAVE_DUPLOCALE@)
+# if @REPLACE_DUPLOCALE@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef duplocale
+# define duplocale rpl_duplocale
+# define GNULIB_defined_duplocale 1
+# endif
+_GL_FUNCDECL_RPL (duplocale, locale_t, (locale_t locale) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (duplocale, locale_t, (locale_t locale));
+# else
+# if @HAVE_DUPLOCALE@
+_GL_CXXALIAS_SYS (duplocale, locale_t, (locale_t locale));
+# endif
+# endif
+# if @HAVE_DUPLOCALE@
+_GL_CXXALIASWARN (duplocale);
+# endif
+# if @HAVE_DUPLOCALE@ || @REPLACE_DUPLOCALE@
+# ifndef HAVE_WORKING_DUPLOCALE
+# define HAVE_WORKING_DUPLOCALE 1
+# endif
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef duplocale
+# if HAVE_RAW_DECL_DUPLOCALE
+_GL_WARN_ON_USE (duplocale, "duplocale is buggy on some glibc systems - "
+ "use gnulib module duplocale for portability");
+# endif
+#endif
+
+#if /*@GNULIB_FREELOCALE@ ||*/ (@GNULIB_LOCALENAME@ && @HAVE_FREELOCALE@)
+# if @REPLACE_FREELOCALE@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef freelocale
+# define freelocale rpl_freelocale
+# define GNULIB_defined_freelocale 1
+# endif
+_GL_FUNCDECL_RPL (freelocale, void, (locale_t locale) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (freelocale, void, (locale_t locale));
+# else
+# if @HAVE_FREELOCALE@
+/* Need to cast, because on FreeBSD and Mac OS X 10.13, the return type is
+ int. */
+_GL_CXXALIAS_SYS_CAST (freelocale, void, (locale_t locale));
+# endif
+# endif
+# if @HAVE_FREELOCALE@
+_GL_CXXALIASWARN (freelocale);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef freelocale
+# if HAVE_RAW_DECL_FREELOCALE
+_GL_WARN_ON_USE (freelocale, "freelocale is not portable");
+# endif
+#endif
+
+#endif /* _@GUARD_PREFIX@_LOCALE_H */
+#endif /* _@GUARD_PREFIX@_LOCALE_H */
+#endif /* !(__need_locale_t || _GL_ALREADY_INCLUDING_LOCALE_H) */
diff --git a/gnulib/import/localtime-buffer.c b/gnulib/import/localtime-buffer.c
index b65ea45..141849c 100644
--- a/gnulib/import/localtime-buffer.c
+++ b/gnulib/import/localtime-buffer.c
@@ -1,6 +1,6 @@
/* Provide access to the last buffer returned by localtime() or gmtime().
- Copyright (C) 2001-2003, 2005-2007, 2009-2019 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2005-2007, 2009-2020 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/localtime-buffer.h b/gnulib/import/localtime-buffer.h
index 031111a..3801742 100644
--- a/gnulib/import/localtime-buffer.h
+++ b/gnulib/import/localtime-buffer.h
@@ -1,6 +1,6 @@
/* Provide access to the last buffer returned by localtime() or gmtime().
- Copyright (C) 2001-2003, 2005-2007, 2009-2019 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2005-2007, 2009-2020 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/lstat.c b/gnulib/import/lstat.c
index a3e40d8..f74392b 100644
--- a/gnulib/import/lstat.c
+++ b/gnulib/import/lstat.c
@@ -1,6 +1,6 @@
/* Work around a bug of lstat on some systems
- Copyright (C) 1997-2006, 2008-2019 Free Software Foundation, Inc.
+ Copyright (C) 1997-2006, 2008-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/m4/00gnulib.m4 b/gnulib/import/m4/00gnulib.m4
index e3e0fb6..06eff4f 100644
--- a/gnulib/import/m4/00gnulib.m4
+++ b/gnulib/import/m4/00gnulib.m4
@@ -1,13 +1,14 @@
-# 00gnulib.m4 serial 3
-dnl Copyright (C) 2009-2019 Free Software Foundation, Inc.
+# 00gnulib.m4 serial 7
+dnl Copyright (C) 2009-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl This file must be named something that sorts before all other
-dnl gnulib-provided .m4 files. It is needed until such time as we can
-dnl assume Autoconf 2.64, with its improved AC_DEFUN_ONCE and
-dnl m4_divert semantics.
+dnl gnulib-provided .m4 files. The first part is needed until such time
+dnl as we can assume Autoconf 2.64, with its improved AC_DEFUN_ONCE and
+dnl m4_divert semantics. The second part is needed until the clang fix
+dnl has been included in Autoconf.
# Until autoconf 2.63, handling of the diversion stack required m4_init
# to be called first; but this does not happen with aclocal. Wrapping
@@ -39,6 +40,76 @@ m4_version_prereq([2.63.263], [],
[m4_indir([_gl_DEFUN_ONCE([$1])])])])]dnl
[AC][_DEFUN([_gl_DEFUN_ONCE([$1])], [$2])])])
+# The following definitions arrange to use a compiler option
+# -Werror=implicit-function-declaration in AC_CHECK_DECL, when the
+# compiler is clang. Without it, clang implicitly declares "known"
+# library functions in C mode, but not in C++ mode, which would cause
+# Gnulib to omit a declaration and thus later produce an error in C++
+# mode. As of clang 9.0, these "known" functions are identified through
+# LIBBUILTIN invocations in the LLVM source file
+# llvm/tools/clang/include/clang/Basic/Builtins.def.
+# It's not possible to AC_REQUIRE the extra tests from AC_CHECK_DECL,
+# because AC_CHECK_DECL, like other Autoconf built-ins, is not supposed
+# to AC_REQUIRE anything: some configure.ac files have their first
+# AC_CHECK_DECL executed conditionally. Therefore append the extra tests
+# to AC_PROG_CC.
+AC_DEFUN([gl_COMPILER_CLANG],
+[
+dnl AC_REQUIRE([AC_PROG_CC])
+ AC_CACHE_CHECK([whether the compiler is clang],
+ [gl_cv_compiler_clang],
+ [dnl Use _AC_COMPILE_IFELSE instead of AC_EGREP_CPP, to avoid error
+ dnl "circular dependency of AC_LANG_COMPILER(C)" if AC_PROG_CC has
+ dnl not yet been invoked.
+ _AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[
+ #ifdef __clang__
+ barfbarf
+ #endif
+ ]],[[]])
+ ],
+ [gl_cv_compiler_clang=no],
+ [gl_cv_compiler_clang=yes])
+ ])
+])
+AC_DEFUN([gl_COMPILER_PREPARE_CHECK_DECL],
+[
+dnl AC_REQUIRE([AC_PROG_CC])
+dnl AC_REQUIRE([gl_COMPILER_CLANG])
+ AC_CACHE_CHECK([for compiler option needed when checking for declarations],
+ [gl_cv_compiler_check_decl_option],
+ [if test $gl_cv_compiler_clang = yes; then
+ dnl Test whether the compiler supports the option
+ dnl '-Werror=implicit-function-declaration'.
+ save_ac_compile="$ac_compile"
+ ac_compile="$ac_compile -Werror=implicit-function-declaration"
+ dnl Use _AC_COMPILE_IFELSE instead of AC_COMPILE_IFELSE, to avoid a
+ dnl warning "AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS".
+ _AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],[[]])],
+ [gl_cv_compiler_check_decl_option='-Werror=implicit-function-declaration'],
+ [gl_cv_compiler_check_decl_option=none])
+ ac_compile="$save_ac_compile"
+ else
+ gl_cv_compiler_check_decl_option=none
+ fi
+ ])
+ if test "x$gl_cv_compiler_check_decl_option" != xnone; then
+ ac_compile_for_check_decl="$ac_compile $gl_cv_compiler_check_decl_option"
+ else
+ ac_compile_for_check_decl="$ac_compile"
+ fi
+])
+dnl Redefine _AC_CHECK_DECL_BODY so that it references ac_compile_for_check_decl
+dnl instead of ac_compile. If, for whatever reason, the override of AC_PROG_CC
+dnl in zzgnulib.m4 is inactive, use the original ac_compile.
+m4_define([_AC_CHECK_DECL_BODY],
+[ ac_save_ac_compile="$ac_compile"
+ if test -n "$ac_compile_for_check_decl"; then
+ ac_compile="$ac_compile_for_check_decl"
+ fi]
+m4_defn([_AC_CHECK_DECL_BODY])[ ac_compile="$ac_save_ac_compile"
+])
+
# gl_00GNULIB
# -----------
# Witness macro that this file has been included. Needed to force
diff --git a/gnulib/import/m4/__inline.m4 b/gnulib/import/m4/__inline.m4
index e1aa310..520c8c4 100644
--- a/gnulib/import/m4/__inline.m4
+++ b/gnulib/import/m4/__inline.m4
@@ -1,5 +1,5 @@
# Test for __inline keyword
-dnl Copyright 2017-2019 Free Software Foundation, Inc.
+dnl Copyright 2017-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/absolute-header.m4 b/gnulib/import/m4/absolute-header.m4
index a8f2cba..39726ba 100644
--- a/gnulib/import/m4/absolute-header.m4
+++ b/gnulib/import/m4/absolute-header.m4
@@ -1,5 +1,5 @@
# absolute-header.m4 serial 16
-dnl Copyright (C) 2006-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/alloca.m4 b/gnulib/import/m4/alloca.m4
index 29bd289..5922524 100644
--- a/gnulib/import/m4/alloca.m4
+++ b/gnulib/import/m4/alloca.m4
@@ -1,5 +1,5 @@
# alloca.m4 serial 15
-dnl Copyright (C) 2002-2004, 2006-2007, 2009-2019 Free Software Foundation,
+dnl Copyright (C) 2002-2004, 2006-2007, 2009-2020 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/gnulib/import/m4/arpa_inet_h.m4 b/gnulib/import/m4/arpa_inet_h.m4
index 645011d..b394494 100644
--- a/gnulib/import/m4/arpa_inet_h.m4
+++ b/gnulib/import/m4/arpa_inet_h.m4
@@ -1,5 +1,5 @@
# arpa_inet_h.m4 serial 14
-dnl Copyright (C) 2006, 2008-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2008-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/builtin-expect.m4 b/gnulib/import/m4/builtin-expect.m4
index b65fbf8..a6e8895 100644
--- a/gnulib/import/m4/builtin-expect.m4
+++ b/gnulib/import/m4/builtin-expect.m4
@@ -1,6 +1,6 @@
dnl Check for __builtin_expect.
-dnl Copyright 2016-2019 Free Software Foundation, Inc.
+dnl Copyright 2016-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/canonicalize.m4 b/gnulib/import/m4/canonicalize.m4
index cb0896f..bdc5c8f 100644
--- a/gnulib/import/m4/canonicalize.m4
+++ b/gnulib/import/m4/canonicalize.m4
@@ -1,6 +1,6 @@
# canonicalize.m4 serial 31
-dnl Copyright (C) 2003-2007, 2009-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2003-2007, 2009-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/gnulib/import/m4/chdir-long.m4 b/gnulib/import/m4/chdir-long.m4
index 64b5ef9..a528a5d 100644
--- a/gnulib/import/m4/chdir-long.m4
+++ b/gnulib/import/m4/chdir-long.m4
@@ -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-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2004-2007, 2009-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/close.m4 b/gnulib/import/m4/close.m4
index 7013a13..378ec4c 100644
--- a/gnulib/import/m4/close.m4
+++ b/gnulib/import/m4/close.m4
@@ -1,5 +1,5 @@
# close.m4 serial 9
-dnl Copyright (C) 2008-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/closedir.m4 b/gnulib/import/m4/closedir.m4
index 37dc541..66f6d4e 100644
--- a/gnulib/import/m4/closedir.m4
+++ b/gnulib/import/m4/closedir.m4
@@ -1,5 +1,5 @@
# closedir.m4 serial 6
-dnl Copyright (C) 2011-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/codeset.m4 b/gnulib/import/m4/codeset.m4
index 280f556..9b019cf 100644
--- a/gnulib/import/m4/codeset.m4
+++ b/gnulib/import/m4/codeset.m4
@@ -1,5 +1,5 @@
# codeset.m4 serial 5 (gettext-0.18.2)
-dnl Copyright (C) 2000-2002, 2006, 2008-2014, 2016, 2019 Free Software
+dnl Copyright (C) 2000-2002, 2006, 2008-2014, 2016, 2019-2020 Free Software
dnl Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/gnulib/import/m4/count-one-bits.m4 b/gnulib/import/m4/count-one-bits.m4
deleted file mode 100644
index b4721b5..0000000
--- a/gnulib/import/m4/count-one-bits.m4
+++ /dev/null
@@ -1,12 +0,0 @@
-# count-one-bits.m4 serial 3
-dnl Copyright (C) 2007, 2009-2019 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_COUNT_ONE_BITS],
-[
- dnl We don't need (and can't compile) count_one_bits_ll
- dnl unless the type 'unsigned long long int' exists.
- AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT])
-])
diff --git a/gnulib/import/m4/d-ino.m4 b/gnulib/import/m4/d-ino.m4
index 882fc4c..64ce9ce 100644
--- a/gnulib/import/m4/d-ino.m4
+++ b/gnulib/import/m4/d-ino.m4
@@ -5,7 +5,7 @@ dnl
dnl Check whether struct dirent has a member named d_ino.
dnl
-# Copyright (C) 1997, 1999-2001, 2003-2004, 2006-2007, 2009-2019 Free Software
+# Copyright (C) 1997, 1999-2001, 2003-2004, 2006-2007, 2009-2020 Free Software
# Foundation, Inc.
# This file is free software; the Free Software Foundation
diff --git a/gnulib/import/m4/d-type.m4 b/gnulib/import/m4/d-type.m4
index 4ca56d6..d40220a 100644
--- a/gnulib/import/m4/d-type.m4
+++ b/gnulib/import/m4/d-type.m4
@@ -5,7 +5,7 @@ dnl
dnl Check whether struct dirent has a member named d_type.
dnl
-# Copyright (C) 1997, 1999-2004, 2006, 2009-2019 Free Software Foundation, Inc.
+# Copyright (C) 1997, 1999-2004, 2006, 2009-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
diff --git a/gnulib/import/m4/dirent_h.m4 b/gnulib/import/m4/dirent_h.m4
index 732aa55..8bef6a0 100644
--- a/gnulib/import/m4/dirent_h.m4
+++ b/gnulib/import/m4/dirent_h.m4
@@ -1,5 +1,5 @@
# dirent_h.m4 serial 16
-dnl Copyright (C) 2008-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/dirfd.m4 b/gnulib/import/m4/dirfd.m4
index 5c75869..d92445e 100644
--- a/gnulib/import/m4/dirfd.m4
+++ b/gnulib/import/m4/dirfd.m4
@@ -2,7 +2,7 @@
dnl Find out how to get the file descriptor associated with an open DIR*.
-# Copyright (C) 2001-2006, 2008-2019 Free Software Foundation, Inc.
+# Copyright (C) 2001-2006, 2008-2020 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/dirname.m4 b/gnulib/import/m4/dirname.m4
index 32141ae..9995ff3 100644
--- a/gnulib/import/m4/dirname.m4
+++ b/gnulib/import/m4/dirname.m4
@@ -1,5 +1,5 @@
#serial 10 -*- autoconf -*-
-dnl Copyright (C) 2002-2006, 2009-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2009-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/double-slash-root.m4 b/gnulib/import/m4/double-slash-root.m4
index 0c5afb1..c463ac4 100644
--- a/gnulib/import/m4/double-slash-root.m4
+++ b/gnulib/import/m4/double-slash-root.m4
@@ -1,5 +1,5 @@
# double-slash-root.m4 serial 4 -*- Autoconf -*-
-dnl Copyright (C) 2006, 2008-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2008-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/dup.m4 b/gnulib/import/m4/dup.m4
index 005f1ea..1bf0234 100644
--- a/gnulib/import/m4/dup.m4
+++ b/gnulib/import/m4/dup.m4
@@ -1,5 +1,5 @@
# dup.m4 serial 6
-dnl Copyright (C) 2011-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/dup2.m4 b/gnulib/import/m4/dup2.m4
index b314247..21b1ecc 100644
--- a/gnulib/import/m4/dup2.m4
+++ b/gnulib/import/m4/dup2.m4
@@ -1,5 +1,5 @@
#serial 25
-dnl Copyright (C) 2002, 2005, 2007, 2009-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2005, 2007, 2009-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/eealloc.m4 b/gnulib/import/m4/eealloc.m4
index 2a4b120..236f373 100644
--- a/gnulib/import/m4/eealloc.m4
+++ b/gnulib/import/m4/eealloc.m4
@@ -1,5 +1,5 @@
# eealloc.m4 serial 3
-dnl Copyright (C) 2003, 2009-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2009-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/environ.m4 b/gnulib/import/m4/environ.m4
index c1a6fa3..bab85f1 100644
--- a/gnulib/import/m4/environ.m4
+++ b/gnulib/import/m4/environ.m4
@@ -1,5 +1,5 @@
# environ.m4 serial 7
-dnl Copyright (C) 2001-2004, 2006-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2004, 2006-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/errno_h.m4 b/gnulib/import/m4/errno_h.m4
index 2388854..dd4994f 100644
--- a/gnulib/import/m4/errno_h.m4
+++ b/gnulib/import/m4/errno_h.m4
@@ -1,5 +1,5 @@
# errno_h.m4 serial 13
-dnl Copyright (C) 2004, 2006, 2008-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2004, 2006, 2008-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/error.m4 b/gnulib/import/m4/error.m4
index 393adb5..60c229d 100644
--- a/gnulib/import/m4/error.m4
+++ b/gnulib/import/m4/error.m4
@@ -1,6 +1,6 @@
#serial 14
-# Copyright (C) 1996-1998, 2001-2004, 2009-2019 Free Software Foundation, Inc.
+# Copyright (C) 1996-1998, 2001-2004, 2009-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
diff --git a/gnulib/import/m4/exponentd.m4 b/gnulib/import/m4/exponentd.m4
index 90870df..cca8797 100644
--- a/gnulib/import/m4/exponentd.m4
+++ b/gnulib/import/m4/exponentd.m4
@@ -1,5 +1,5 @@
# exponentd.m4 serial 3
-dnl Copyright (C) 2007-2008, 2010-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2008, 2010-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/exponentl.m4 b/gnulib/import/m4/exponentl.m4
index 4064981..b33b3bf 100644
--- a/gnulib/import/m4/exponentl.m4
+++ b/gnulib/import/m4/exponentl.m4
@@ -1,5 +1,5 @@
# exponentl.m4 serial 4
-dnl Copyright (C) 2007-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/extensions.m4 b/gnulib/import/m4/extensions.m4
index fd1ce81..d7c95ef 100644
--- a/gnulib/import/m4/extensions.m4
+++ b/gnulib/import/m4/extensions.m4
@@ -1,7 +1,7 @@
# serial 18 -*- Autoconf -*-
# Enable extensions on systems that normally disable them.
-# Copyright (C) 2003, 2006-2019 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006-2020 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/extern-inline.m4 b/gnulib/import/m4/extern-inline.m4
index 84421ce..75c5008 100644
--- a/gnulib/import/m4/extern-inline.m4
+++ b/gnulib/import/m4/extern-inline.m4
@@ -1,6 +1,6 @@
dnl 'extern inline' a la ISO C99.
-dnl Copyright 2012-2019 Free Software Foundation, Inc.
+dnl Copyright 2012-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/fchdir.m4 b/gnulib/import/m4/fchdir.m4
index ed29562..dc2ba25 100644
--- a/gnulib/import/m4/fchdir.m4
+++ b/gnulib/import/m4/fchdir.m4
@@ -1,5 +1,5 @@
# fchdir.m4 serial 25
-dnl Copyright (C) 2006-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/fcntl-o.m4 b/gnulib/import/m4/fcntl-o.m4
index 6ab3387..747b865 100644
--- a/gnulib/import/m4/fcntl-o.m4
+++ b/gnulib/import/m4/fcntl-o.m4
@@ -1,5 +1,5 @@
# fcntl-o.m4 serial 6
-dnl Copyright (C) 2006, 2009-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2009-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/fcntl.m4 b/gnulib/import/m4/fcntl.m4
index e409e96..562ae23 100644
--- a/gnulib/import/m4/fcntl.m4
+++ b/gnulib/import/m4/fcntl.m4
@@ -1,5 +1,5 @@
# fcntl.m4 serial 9
-dnl Copyright (C) 2009-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/fcntl_h.m4 b/gnulib/import/m4/fcntl_h.m4
index 60dc5e2..6b25393 100644
--- a/gnulib/import/m4/fcntl_h.m4
+++ b/gnulib/import/m4/fcntl_h.m4
@@ -1,6 +1,6 @@
# serial 16
# Configure fcntl.h.
-dnl Copyright (C) 2006-2007, 2009-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2007, 2009-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/fdopendir.m4 b/gnulib/import/m4/fdopendir.m4
index ad48e4e..d9cc1a0 100644
--- a/gnulib/import/m4/fdopendir.m4
+++ b/gnulib/import/m4/fdopendir.m4
@@ -1,7 +1,7 @@
# serial 12
# See if we need to provide fdopendir.
-dnl Copyright (C) 2009-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/filenamecat.m4 b/gnulib/import/m4/filenamecat.m4
index 351715a..7eff5b9 100644
--- a/gnulib/import/m4/filenamecat.m4
+++ b/gnulib/import/m4/filenamecat.m4
@@ -1,5 +1,5 @@
# filenamecat.m4 serial 11
-dnl Copyright (C) 2002-2006, 2009-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2009-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/flexmember.m4 b/gnulib/import/m4/flexmember.m4
index c245ab0..90f3ddd 100644
--- a/gnulib/import/m4/flexmember.m4
+++ b/gnulib/import/m4/flexmember.m4
@@ -1,7 +1,7 @@
# serial 5
# Check for flexible array member support.
-# Copyright (C) 2006, 2009-2019 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2009-2020 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/float_h.m4 b/gnulib/import/m4/float_h.m4
index 1cd28a0..3ef0bb7 100644
--- a/gnulib/import/m4/float_h.m4
+++ b/gnulib/import/m4/float_h.m4
@@ -1,5 +1,5 @@
# float_h.m4 serial 12
-dnl Copyright (C) 2007, 2009-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/fnmatch.m4 b/gnulib/import/m4/fnmatch.m4
index 75ba55b..0f41f8c 100644
--- a/gnulib/import/m4/fnmatch.m4
+++ b/gnulib/import/m4/fnmatch.m4
@@ -1,6 +1,6 @@
# Check for fnmatch - serial 14. -*- coding: utf-8 -*-
-# Copyright (C) 2000-2007, 2009-2019 Free Software Foundation, Inc.
+# Copyright (C) 2000-2007, 2009-2020 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/fnmatch_h.m4 b/gnulib/import/m4/fnmatch_h.m4
index fba6f86..a21ec2c 100644
--- a/gnulib/import/m4/fnmatch_h.m4
+++ b/gnulib/import/m4/fnmatch_h.m4
@@ -1,5 +1,5 @@
# fnmatch_h.m4 serial 4
-dnl Copyright (C) 2009-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/fpieee.m4 b/gnulib/import/m4/fpieee.m4
index ea1d5da..d5c9aef 100644
--- a/gnulib/import/m4/fpieee.m4
+++ b/gnulib/import/m4/fpieee.m4
@@ -1,5 +1,5 @@
# fpieee.m4 serial 2 -*- coding: utf-8 -*-
-dnl Copyright (C) 2007, 2009-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/frexp.m4 b/gnulib/import/m4/frexp.m4
index 990fce6..5d977d4 100644
--- a/gnulib/import/m4/frexp.m4
+++ b/gnulib/import/m4/frexp.m4
@@ -1,5 +1,5 @@
# frexp.m4 serial 16
-dnl Copyright (C) 2007-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/frexpl.m4 b/gnulib/import/m4/frexpl.m4
index 53eed55..e79fa5c 100644
--- a/gnulib/import/m4/frexpl.m4
+++ b/gnulib/import/m4/frexpl.m4
@@ -1,5 +1,5 @@
# frexpl.m4 serial 21
-dnl Copyright (C) 2007-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/fstat.m4 b/gnulib/import/m4/fstat.m4
index 2a59c8f..53c0896 100644
--- a/gnulib/import/m4/fstat.m4
+++ b/gnulib/import/m4/fstat.m4
@@ -1,5 +1,5 @@
# fstat.m4 serial 6
-dnl Copyright (C) 2011-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/fstatat.m4 b/gnulib/import/m4/fstatat.m4
index 489a55a..19583ed 100644
--- a/gnulib/import/m4/fstatat.m4
+++ b/gnulib/import/m4/fstatat.m4
@@ -1,5 +1,5 @@
# fstatat.m4 serial 4
-dnl Copyright (C) 2004-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2004-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/getcwd-abort-bug.m4 b/gnulib/import/m4/getcwd-abort-bug.m4
index 7227f08..2715f0a 100644
--- a/gnulib/import/m4/getcwd-abort-bug.m4
+++ b/gnulib/import/m4/getcwd-abort-bug.m4
@@ -3,7 +3,7 @@
# name is unusually large. Any length between 4k and 16k trigger the bug
# when using glibc-2.4.90-9 or older.
-# Copyright (C) 2006, 2009-2019 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2009-2020 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/getcwd-path-max.m4 b/gnulib/import/m4/getcwd-path-max.m4
index 95a55be..1ff3f25 100644
--- a/gnulib/import/m4/getcwd-path-max.m4
+++ b/gnulib/import/m4/getcwd-path-max.m4
@@ -6,7 +6,7 @@
# I've heard that this is due to a Linux kernel bug, and that it has
# been fixed between 2.4.21-pre3 and 2.4.21-pre4.
-# Copyright (C) 2003-2007, 2009-2019 Free Software Foundation, Inc.
+# Copyright (C) 2003-2007, 2009-2020 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/getcwd.m4 b/gnulib/import/m4/getcwd.m4
index 3b3f755..ba68c5f 100644
--- a/gnulib/import/m4/getcwd.m4
+++ b/gnulib/import/m4/getcwd.m4
@@ -1,6 +1,6 @@
# getcwd.m4 - check for working getcwd that is compatible with glibc
-# Copyright (C) 2001, 2003-2007, 2009-2019 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003-2007, 2009-2020 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/getdtablesize.m4 b/gnulib/import/m4/getdtablesize.m4
index 96aa241..ab2e3fe 100644
--- a/gnulib/import/m4/getdtablesize.m4
+++ b/gnulib/import/m4/getdtablesize.m4
@@ -1,5 +1,5 @@
# getdtablesize.m4 serial 7
-dnl Copyright (C) 2008-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/getlogin.m4 b/gnulib/import/m4/getlogin.m4
index c13d2e0..a0678d0 100644
--- a/gnulib/import/m4/getlogin.m4
+++ b/gnulib/import/m4/getlogin.m4
@@ -1,5 +1,5 @@
# getlogin.m4 serial 5
-dnl Copyright (C) 2010-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2010-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/getlogin_r.m4 b/gnulib/import/m4/getlogin_r.m4
index aff7086..3ec7692 100644
--- a/gnulib/import/m4/getlogin_r.m4
+++ b/gnulib/import/m4/getlogin_r.m4
@@ -1,6 +1,6 @@
#serial 12
-# Copyright (C) 2005-2007, 2009-2019 Free Software Foundation, Inc.
+# Copyright (C) 2005-2007, 2009-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
diff --git a/gnulib/import/m4/getpagesize.m4 b/gnulib/import/m4/getpagesize.m4
index 546c3ad..8f0f046 100644
--- a/gnulib/import/m4/getpagesize.m4
+++ b/gnulib/import/m4/getpagesize.m4
@@ -1,5 +1,5 @@
# getpagesize.m4 serial 10
-dnl Copyright (C) 2002, 2004-2005, 2007, 2009-2019 Free Software Foundation,
+dnl Copyright (C) 2002, 2004-2005, 2007, 2009-2020 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/gnulib/import/m4/getprogname.m4 b/gnulib/import/m4/getprogname.m4
index 4a96d06..6baefc9 100644
--- a/gnulib/import/m4/getprogname.m4
+++ b/gnulib/import/m4/getprogname.m4
@@ -1,6 +1,6 @@
# getprogname.m4 - check for getprogname or replacements for it
-# Copyright (C) 2016-2019 Free Software Foundation, Inc.
+# Copyright (C) 2016-2020 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/gettimeofday.m4 b/gnulib/import/m4/gettimeofday.m4
index 7eebabd..c72b3ea 100644
--- a/gnulib/import/m4/gettimeofday.m4
+++ b/gnulib/import/m4/gettimeofday.m4
@@ -1,6 +1,6 @@
# serial 27
-# Copyright (C) 2001-2003, 2005, 2007, 2009-2019 Free Software Foundation, Inc.
+# Copyright (C) 2001-2003, 2005, 2007, 2009-2020 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/glob.m4 b/gnulib/import/m4/glob.m4
index 543722c..dbd09e8 100644
--- a/gnulib/import/m4/glob.m4
+++ b/gnulib/import/m4/glob.m4
@@ -1,5 +1,5 @@
# glob.m4 serial 23
-dnl Copyright (C) 2005-2007, 2009-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2007, 2009-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/glob_h.m4 b/gnulib/import/m4/glob_h.m4
index 9cc29d0..7ecc0fd 100644
--- a/gnulib/import/m4/glob_h.m4
+++ b/gnulib/import/m4/glob_h.m4
@@ -1,5 +1,5 @@
# glob_h.m4 serial 5
-dnl Copyright (C) 2018-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2018-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/gnulib-cache.m4 b/gnulib/import/m4/gnulib-cache.m4
index 03101b6..ce00c9e 100644
--- a/gnulib/import/m4/gnulib-cache.m4
+++ b/gnulib/import/m4/gnulib-cache.m4
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2019 Free Software Foundation, Inc.
+# Copyright (C) 2002-2020 Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/m4/gnulib-common.m4 b/gnulib/import/m4/gnulib-common.m4
index d8f0d3f..b4795c1 100644
--- a/gnulib/import/m4/gnulib-common.m4
+++ b/gnulib/import/m4/gnulib-common.m4
@@ -1,5 +1,5 @@
-# gnulib-common.m4 serial 46
-dnl Copyright (C) 2007-2019 Free Software Foundation, Inc.
+# gnulib-common.m4 serial 48
+dnl Copyright (C) 2007-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -12,6 +12,7 @@ AC_DEFUN([gl_COMMON], [
dnl Use AC_REQUIRE here, so that the code is expanded once only.
AC_REQUIRE([gl_00GNULIB])
AC_REQUIRE([gl_COMMON_BODY])
+ AC_REQUIRE([gl_ZZGNULIB])
])
AC_DEFUN([gl_COMMON_BODY], [
AH_VERBATIM([_Noreturn],
@@ -30,7 +31,10 @@ AC_DEFUN([gl_COMMON_BODY], [
# define _Noreturn [[noreturn]]
# elif ((!defined __cplusplus || defined __clang__) \
&& (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \
- || 4 < __GNUC__ + (7 <= __GNUC_MINOR__)))
+ || 4 < __GNUC__ + (7 <= __GNUC_MINOR__) \
+ || (defined __apple_build_version__ \
+ ? 6000000 <= __apple_build_version__ \
+ : 3 < __clang_major__ + (5 <= __clang_minor__))))
/* _Noreturn works as-is. */
# elif 2 < __GNUC__ + (8 <= __GNUC_MINOR__) || 0x5110 <= __SUNPRO_C
# define _Noreturn __attribute__ ((__noreturn__))
@@ -415,12 +419,13 @@ AC_DEFUN([AC_C_RESTRICT],
nothing if this is not supported. Do not define if restrict is
supported directly. */
#undef restrict
-/* Work around a bug in Sun C++: it does not support _Restrict or
- __restrict__, even though the corresponding Sun C compiler ends up with
- "#define restrict _Restrict" or "#define restrict __restrict__" in the
- previous line. Perhaps some future version of Sun C++ will work with
- restrict; if so, hopefully it defines __RESTRICT like Sun C does. */
-#if defined __SUNPRO_CC && !defined __RESTRICT
+/* Work around a bug in older versions of Sun C++, which did not
+ #define __restrict__ or support _Restrict or __restrict__
+ even though the corresponding Sun C compiler ended up with
+ "#define restrict _Restrict" or "#define restrict __restrict__"
+ in the previous line. This workaround can be removed once
+ we assume Oracle Developer Studio 12.5 (2016) or later. */
+#if defined __SUNPRO_CC && !defined __RESTRICT && !defined __restrict__
# define _Restrict
# define __restrict__
#endif])
diff --git a/gnulib/import/m4/gnulib-comp.m4 b/gnulib/import/m4/gnulib-comp.m4
index fe1da67..0c67b32 100644
--- a/gnulib/import/m4/gnulib-comp.m4
+++ b/gnulib/import/m4/gnulib-comp.m4
@@ -1,5 +1,5 @@
# DO NOT EDIT! GENERATED AUTOMATICALLY!
-# Copyright (C) 2002-2019 Free Software Foundation, Inc.
+# Copyright (C) 2002-2020 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
@@ -103,7 +103,6 @@ AC_DEFUN([gl_EARLY],
# Code from module glob:
# Code from module glob-h:
# Code from module hard-locale:
- # Code from module havelib:
# Code from module include_next:
# Code from module inet_ntop:
# Code from module intprops:
@@ -116,6 +115,7 @@ AC_DEFUN([gl_EARLY],
# Code from module libc-config:
# Code from module limits-h:
# Code from module localcharset:
+ # Code from module locale:
# Code from module localtime-buffer:
# Code from module lock:
# Code from module lstat:
@@ -155,6 +155,7 @@ AC_DEFUN([gl_EARLY],
# Code from module save-cwd:
# Code from module scratch_buffer:
# Code from module setenv:
+ # Code from module setlocale-null:
# Code from module signal-h:
# Code from module snippet/_Noreturn:
# Code from module snippet/arg-nonnull:
@@ -225,7 +226,6 @@ AC_DEFUN([gl_INIT],
gl_FUNC_ALLOCA
gl_HEADER_ARPA_INET
AC_PROG_MKDIR_P
- AC_LIBOBJ([openat-proc])
gl___BUILTIN_EXPECT
gl_CANONICALIZE_LGPL
if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
@@ -251,7 +251,6 @@ AC_DEFUN([gl_INIT],
AC_LIBOBJ([closedir])
fi
gl_DIRENT_MODULE_INDICATOR([closedir])
- gl_COUNT_ONE_BITS
gl_CHECK_TYPE_STRUCT_DIRENT_D_INO
gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE
gl_DIRENT_H
@@ -396,6 +395,9 @@ AC_DEFUN([gl_INIT],
fi
gl_GLOB_MODULE_INDICATOR([glob])
gl_GLOB_H
+ AC_REQUIRE([gl_FUNC_SETLOCALE_NULL])
+ LIB_HARD_LOCALE="$LIB_SETLOCALE_NULL"
+ AC_SUBST([LIB_HARD_LOCALE])
gl_FUNC_INET_NTOP
if test $HAVE_INET_NTOP = 0 || test $REPLACE_INET_NTOP = 1; then
AC_LIBOBJ([inet_ntop])
@@ -421,6 +423,7 @@ AC_DEFUN([gl_INIT],
dnl For backward compatibility. Some packages still use this.
LOCALCHARSET_TESTS_ENVIRONMENT=
AC_SUBST([LOCALCHARSET_TESTS_ENVIRONMENT])
+ gl_LOCALE_H
AC_REQUIRE([gl_LOCALTIME_BUFFER_DEFAULTS])
AC_LIBOBJ([localtime-buffer])
gl_LOCK
@@ -441,6 +444,11 @@ AC_DEFUN([gl_INIT],
gl_FUNC_MBRTOWC
if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
AC_LIBOBJ([mbrtowc])
+ if test $REPLACE_MBSTATE_T = 1; then
+ AC_LIBOBJ([lc-charset-dispatch])
+ AC_LIBOBJ([mbtowc-lock])
+ gl_PREREQ_MBTOWC_LOCK
+ fi
gl_PREREQ_MBRTOWC
fi
gl_WCHAR_MODULE_INDICATOR([mbrtowc])
@@ -575,6 +583,12 @@ AC_DEFUN([gl_INIT],
AC_LIBOBJ([setenv])
fi
gl_STDLIB_MODULE_INDICATOR([setenv])
+ gl_FUNC_SETLOCALE_NULL
+ if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
+ AC_LIBOBJ([setlocale-lock])
+ gl_PREREQ_SETLOCALE_LOCK
+ fi
+ gl_LOCALE_MODULE_INDICATOR([setlocale_null])
gl_SIGNAL_H
gl_TYPE_SOCKLEN_T
gt_TYPE_SSIZE_T
@@ -838,7 +852,6 @@ AC_DEFUN([gltests_LIBSOURCES], [
# This macro records the list of files which have been installed by
# gnulib-tool and may be removed by future gnulib-tool invocations.
AC_DEFUN([gl_FILE_LIST], [
- build-aux/config.rpath
build-aux/update-copyright
lib/_Noreturn.h
lib/alloca.c
@@ -925,10 +938,13 @@ AC_DEFUN([gl_FILE_LIST], [
lib/isnanl-nolibm.h
lib/isnanl.c
lib/itold.c
+ lib/lc-charset-dispatch.c
+ lib/lc-charset-dispatch.h
lib/libc-config.h
lib/limits.in.h
lib/localcharset.c
lib/localcharset.h
+ lib/locale.in.h
lib/localtime-buffer.c
lib/localtime-buffer.h
lib/lstat.c
@@ -941,11 +957,15 @@ AC_DEFUN([gl_FILE_LIST], [
lib/malloca.h
lib/math.c
lib/math.in.h
+ lib/mbrtowc-impl-utf8.h
+ lib/mbrtowc-impl.h
lib/mbrtowc.c
lib/mbsinit.c
lib/mbsrtowcs-impl.h
lib/mbsrtowcs-state.c
lib/mbsrtowcs.c
+ lib/mbtowc-lock.c
+ lib/mbtowc-lock.h
lib/memchr.c
lib/memchr.valgrind
lib/memmem.c
@@ -981,6 +1001,9 @@ AC_DEFUN([gl_FILE_LIST], [
lib/save-cwd.h
lib/scratch_buffer.h
lib/setenv.c
+ lib/setlocale-lock.c
+ lib/setlocale_null.c
+ lib/setlocale_null.h
lib/signal.in.h
lib/stat-time.c
lib/stat-time.h
@@ -1049,7 +1072,6 @@ AC_DEFUN([gl_FILE_LIST], [
m4/close.m4
m4/closedir.m4
m4/codeset.m4
- m4/count-one-bits.m4
m4/d-ino.m4
m4/d-type.m4
m4/dirent_h.m4
@@ -1093,7 +1115,6 @@ AC_DEFUN([gl_FILE_LIST], [
m4/glob.m4
m4/glob_h.m4
m4/gnulib-common.m4
- m4/host-cpu-c-abi.m4
m4/include_next.m4
m4/inet_ntop.m4
m4/inttypes-pri.m4
@@ -1101,17 +1122,14 @@ AC_DEFUN([gl_FILE_LIST], [
m4/isnand.m4
m4/isnanl.m4
m4/largefile.m4
- m4/lib-ld.m4
- m4/lib-link.m4
- m4/lib-prefix.m4
m4/limits-h.m4
m4/localcharset.m4
m4/locale-fr.m4
m4/locale-ja.m4
m4/locale-zh.m4
+ m4/locale_h.m4
m4/localtime-buffer.m4
m4/lock.m4
- m4/longlong.m4
m4/lstat.m4
m4/malloc.m4
m4/malloca.m4
@@ -1151,6 +1169,7 @@ AC_DEFUN([gl_FILE_LIST], [
m4/rmdir.m4
m4/save-cwd.m4
m4/setenv.m4
+ m4/setlocale_null.m4
m4/signal_h.m4
m4/socklen.m4
m4/sockpfaf.m4
@@ -1182,9 +1201,11 @@ AC_DEFUN([gl_FILE_LIST], [
m4/time_r.m4
m4/unistd-safer.m4
m4/unistd_h.m4
+ m4/visibility.m4
m4/warn-on-use.m4
m4/wchar_h.m4
m4/wchar_t.m4
m4/wctype_h.m4
m4/wint_t.m4
+ m4/zzgnulib.m4
])
diff --git a/gnulib/import/m4/gnulib-tool.m4 b/gnulib/import/m4/gnulib-tool.m4
index 98e6ade..9e1744f 100644
--- a/gnulib/import/m4/gnulib-tool.m4
+++ b/gnulib/import/m4/gnulib-tool.m4
@@ -1,5 +1,5 @@
# gnulib-tool.m4 serial 2
-dnl Copyright (C) 2004-2005, 2009-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2004-2005, 2009-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/host-cpu-c-abi.m4 b/gnulib/import/m4/host-cpu-c-abi.m4
deleted file mode 100644
index 6fc31bc..0000000
--- a/gnulib/import/m4/host-cpu-c-abi.m4
+++ /dev/null
@@ -1,675 +0,0 @@
-# host-cpu-c-abi.m4 serial 13
-dnl Copyright (C) 2002-2019 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Bruno Haible and Sam Steingold.
-
-dnl Sets the HOST_CPU variable to the canonical name of the CPU.
-dnl Sets the HOST_CPU_C_ABI variable to the canonical name of the CPU with its
-dnl C language ABI (application binary interface).
-dnl Also defines __${HOST_CPU}__ and __${HOST_CPU_C_ABI}__ as C macros in
-dnl config.h.
-dnl
-dnl This canonical name can be used to select a particular assembly language
-dnl source file that will interoperate with C code on the given host.
-dnl
-dnl For example:
-dnl * 'i386' and 'sparc' are different canonical names, because code for i386
-dnl will not run on SPARC CPUs and vice versa. They have different
-dnl instruction sets.
-dnl * 'sparc' and 'sparc64' are different canonical names, because code for
-dnl 'sparc' and code for 'sparc64' cannot be linked together: 'sparc' code
-dnl contains 32-bit instructions, whereas 'sparc64' code contains 64-bit
-dnl instructions. A process on a SPARC CPU can be in 32-bit mode or in 64-bit
-dnl mode, but not both.
-dnl * 'mips' and 'mipsn32' are different canonical names, because they use
-dnl different argument passing and return conventions for C functions, and
-dnl although the instruction set of 'mips' is a large subset of the
-dnl instruction set of 'mipsn32'.
-dnl * 'mipsn32' and 'mips64' are different canonical names, because they use
-dnl different sizes for the C types like 'int' and 'void *', and although
-dnl the instruction sets of 'mipsn32' and 'mips64' are the same.
-dnl * The same canonical name is used for different endiannesses. You can
-dnl determine the endianness through preprocessor symbols:
-dnl - 'arm': test __ARMEL__.
-dnl - 'mips', 'mipsn32', 'mips64': test _MIPSEB vs. _MIPSEL.
-dnl - 'powerpc64': test _BIG_ENDIAN vs. _LITTLE_ENDIAN.
-dnl * The same name 'i386' is used for CPUs of type i386, i486, i586
-dnl (Pentium), AMD K7, Pentium II, Pentium IV, etc., because
-dnl - Instructions that do not exist on all of these CPUs (cmpxchg,
-dnl MMX, SSE, SSE2, 3DNow! etc.) are not frequently used. If your
-dnl assembly language source files use such instructions, you will
-dnl need to make the distinction.
-dnl - Speed of execution of the common instruction set is reasonable across
-dnl the entire family of CPUs. If you have assembly language source files
-dnl that are optimized for particular CPU types (like GNU gmp has), you
-dnl will need to make the distinction.
-dnl See <https://en.wikipedia.org/wiki/X86_instruction_listings>.
-AC_DEFUN([gl_HOST_CPU_C_ABI],
-[
- AC_REQUIRE([AC_CANONICAL_HOST])
- AC_REQUIRE([gl_C_ASM])
- AC_CACHE_CHECK([host CPU and C ABI], [gl_cv_host_cpu_c_abi],
- [case "$host_cpu" in
-
-changequote(,)dnl
- i[34567]86 )
-changequote([,])dnl
- gl_cv_host_cpu_c_abi=i386
- ;;
-
- x86_64 )
- # On x86_64 systems, the C compiler may be generating code in one of
- # these ABIs:
- # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64.
- # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64
- # with native Windows (mingw, MSVC).
- # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32.
- # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386.
- AC_COMPILE_IFELSE(
- [AC_LANG_SOURCE(
- [[#if (defined __x86_64__ || defined __amd64__ \
- || defined _M_X64 || defined _M_AMD64)
- int ok;
- #else
- error fail
- #endif
- ]])],
- [AC_COMPILE_IFELSE(
- [AC_LANG_SOURCE(
- [[#if defined __ILP32__ || defined _ILP32
- int ok;
- #else
- error fail
- #endif
- ]])],
- [gl_cv_host_cpu_c_abi=x86_64-x32],
- [gl_cv_host_cpu_c_abi=x86_64])],
- [gl_cv_host_cpu_c_abi=i386])
- ;;
-
-changequote(,)dnl
- alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] )
-changequote([,])dnl
- gl_cv_host_cpu_c_abi=alpha
- ;;
-
- arm* | aarch64 )
- # Assume arm with EABI.
- # On arm64 systems, the C compiler may be generating code in one of
- # these ABIs:
- # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64.
- # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32.
- # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf.
- AC_COMPILE_IFELSE(
- [AC_LANG_SOURCE(
- [[#ifdef __aarch64__
- int ok;
- #else
- error fail
- #endif
- ]])],
- [AC_COMPILE_IFELSE(
- [AC_LANG_SOURCE(
- [[#if defined __ILP32__ || defined _ILP32
- int ok;
- #else
- error fail
- #endif
- ]])],
- [gl_cv_host_cpu_c_abi=arm64-ilp32],
- [gl_cv_host_cpu_c_abi=arm64])],
- [# Don't distinguish little-endian and big-endian arm, since they
- # don't require different machine code for simple operations and
- # since the user can distinguish them through the preprocessor
- # defines __ARMEL__ vs. __ARMEB__.
- # But distinguish arm which passes floating-point arguments and
- # return values in integer registers (r0, r1, ...) - this is
- # gcc -mfloat-abi=soft or gcc -mfloat-abi=softfp - from arm which
- # passes them in float registers (s0, s1, ...) and double registers
- # (d0, d1, ...) - this is gcc -mfloat-abi=hard. GCC 4.6 or newer
- # sets the preprocessor defines __ARM_PCS (for the first case) and
- # __ARM_PCS_VFP (for the second case), but older GCC does not.
- echo 'double ddd; void func (double dd) { ddd = dd; }' > conftest.c
- # Look for a reference to the register d0 in the .s file.
- AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS $gl_c_asm_opt conftest.c) >/dev/null 2>&1
- if LC_ALL=C grep 'd0,' conftest.$gl_asmext >/dev/null; then
- gl_cv_host_cpu_c_abi=armhf
- else
- gl_cv_host_cpu_c_abi=arm
- fi
- rm -f conftest*
- ])
- ;;
-
- hppa1.0 | hppa1.1 | hppa2.0* | hppa64 )
- # On hppa, the C compiler may be generating 32-bit code or 64-bit
- # code. In the latter case, it defines _LP64 and __LP64__.
- AC_COMPILE_IFELSE(
- [AC_LANG_SOURCE(
- [[#ifdef __LP64__
- int ok;
- #else
- error fail
- #endif
- ]])],
- [gl_cv_host_cpu_c_abi=hppa64],
- [gl_cv_host_cpu_c_abi=hppa])
- ;;
-
- ia64* )
- # On ia64 on HP-UX, the C compiler may be generating 64-bit code or
- # 32-bit code. In the latter case, it defines _ILP32.
- AC_COMPILE_IFELSE(
- [AC_LANG_SOURCE(
- [[#ifdef _ILP32
- int ok;
- #else
- error fail
- #endif
- ]])],
- [gl_cv_host_cpu_c_abi=ia64-ilp32],
- [gl_cv_host_cpu_c_abi=ia64])
- ;;
-
- mips* )
- # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this
- # at 32.
- AC_COMPILE_IFELSE(
- [AC_LANG_SOURCE(
- [[#if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64)
- int ok;
- #else
- error fail
- #endif
- ]])],
- [gl_cv_host_cpu_c_abi=mips64],
- [# In the n32 ABI, _ABIN32 is defined, _ABIO32 is not defined (but
- # may later get defined by <sgidefs.h>), and _MIPS_SIM == _ABIN32.
- # In the 32 ABI, _ABIO32 is defined, _ABIN32 is not defined (but
- # may later get defined by <sgidefs.h>), and _MIPS_SIM == _ABIO32.
- AC_COMPILE_IFELSE(
- [AC_LANG_SOURCE(
- [[#if (_MIPS_SIM == _ABIN32)
- int ok;
- #else
- error fail
- #endif
- ]])],
- [gl_cv_host_cpu_c_abi=mipsn32],
- [gl_cv_host_cpu_c_abi=mips])])
- ;;
-
- powerpc* )
- # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD.
- # No need to distinguish them here; the caller may distinguish
- # them based on the OS.
- # On powerpc64 systems, the C compiler may still be generating
- # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may
- # be generating 64-bit code.
- AC_COMPILE_IFELSE(
- [AC_LANG_SOURCE(
- [[#if defined __powerpc64__ || defined _ARCH_PPC64
- int ok;
- #else
- error fail
- #endif
- ]])],
- [# On powerpc64, there are two ABIs on Linux: The AIX compatible
- # one and the ELFv2 one. The latter defines _CALL_ELF=2.
- AC_COMPILE_IFELSE(
- [AC_LANG_SOURCE(
- [[#if defined _CALL_ELF && _CALL_ELF == 2
- int ok;
- #else
- error fail
- #endif
- ]])],
- [gl_cv_host_cpu_c_abi=powerpc64-elfv2],
- [gl_cv_host_cpu_c_abi=powerpc64])
- ],
- [gl_cv_host_cpu_c_abi=powerpc])
- ;;
-
- rs6000 )
- gl_cv_host_cpu_c_abi=powerpc
- ;;
-
- riscv32 | riscv64 )
- # There are 2 architectures (with variants): rv32* and rv64*.
- AC_COMPILE_IFELSE(
- [AC_LANG_SOURCE(
- [[#if __riscv_xlen == 64
- int ok;
- #else
- error fail
- #endif
- ]])],
- [cpu=riscv64],
- [cpu=riscv32])
- # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d.
- # Size of 'long' and 'void *':
- AC_COMPILE_IFELSE(
- [AC_LANG_SOURCE(
- [[#if defined __LP64__
- int ok;
- #else
- error fail
- #endif
- ]])],
- [main_abi=lp64],
- [main_abi=ilp32])
- # Float ABIs:
- # __riscv_float_abi_double:
- # 'float' and 'double' are passed in floating-point registers.
- # __riscv_float_abi_single:
- # 'float' are passed in floating-point registers.
- # __riscv_float_abi_soft:
- # No values are passed in floating-point registers.
- AC_COMPILE_IFELSE(
- [AC_LANG_SOURCE(
- [[#if defined __riscv_float_abi_double
- int ok;
- #else
- error fail
- #endif
- ]])],
- [float_abi=d],
- [AC_COMPILE_IFELSE(
- [AC_LANG_SOURCE(
- [[#if defined __riscv_float_abi_single
- int ok;
- #else
- error fail
- #endif
- ]])],
- [float_abi=f],
- [float_abi=''])
- ])
- gl_cv_host_cpu_c_abi="${cpu}-${main_abi}${float_abi}"
- ;;
-
- s390* )
- # On s390x, the C compiler may be generating 64-bit (= s390x) code
- # or 31-bit (= s390) code.
- AC_COMPILE_IFELSE(
- [AC_LANG_SOURCE(
- [[#if defined __LP64__ || defined __s390x__
- int ok;
- #else
- error fail
- #endif
- ]])],
- [gl_cv_host_cpu_c_abi=s390x],
- [gl_cv_host_cpu_c_abi=s390])
- ;;
-
- sparc | sparc64 )
- # UltraSPARCs running Linux have `uname -m` = "sparc64", but the
- # C compiler still generates 32-bit code.
- AC_COMPILE_IFELSE(
- [AC_LANG_SOURCE(
- [[#if defined __sparcv9 || defined __arch64__
- int ok;
- #else
- error fail
- #endif
- ]])],
- [gl_cv_host_cpu_c_abi=sparc64],
- [gl_cv_host_cpu_c_abi=sparc])
- ;;
-
- *)
- gl_cv_host_cpu_c_abi="$host_cpu"
- ;;
- esac
- ])
-
- dnl In most cases, $HOST_CPU and $HOST_CPU_C_ABI are the same.
- HOST_CPU=`echo "$gl_cv_host_cpu_c_abi" | sed -e 's/-.*//'`
- HOST_CPU_C_ABI="$gl_cv_host_cpu_c_abi"
- AC_SUBST([HOST_CPU])
- AC_SUBST([HOST_CPU_C_ABI])
-
- # This was
- # AC_DEFINE_UNQUOTED([__${HOST_CPU}__])
- # AC_DEFINE_UNQUOTED([__${HOST_CPU_C_ABI}__])
- # earlier, but KAI C++ 3.2d doesn't like this.
- sed -e 's/-/_/g' >> confdefs.h <<EOF
-#ifndef __${HOST_CPU}__
-#define __${HOST_CPU}__ 1
-#endif
-#ifndef __${HOST_CPU_C_ABI}__
-#define __${HOST_CPU_C_ABI}__ 1
-#endif
-EOF
- AH_TOP([/* CPU and C ABI indicator */
-#ifndef __i386__
-#undef __i386__
-#endif
-#ifndef __x86_64_x32__
-#undef __x86_64_x32__
-#endif
-#ifndef __x86_64__
-#undef __x86_64__
-#endif
-#ifndef __alpha__
-#undef __alpha__
-#endif
-#ifndef __arm__
-#undef __arm__
-#endif
-#ifndef __armhf__
-#undef __armhf__
-#endif
-#ifndef __arm64_ilp32__
-#undef __arm64_ilp32__
-#endif
-#ifndef __arm64__
-#undef __arm64__
-#endif
-#ifndef __hppa__
-#undef __hppa__
-#endif
-#ifndef __hppa64__
-#undef __hppa64__
-#endif
-#ifndef __ia64_ilp32__
-#undef __ia64_ilp32__
-#endif
-#ifndef __ia64__
-#undef __ia64__
-#endif
-#ifndef __m68k__
-#undef __m68k__
-#endif
-#ifndef __mips__
-#undef __mips__
-#endif
-#ifndef __mipsn32__
-#undef __mipsn32__
-#endif
-#ifndef __mips64__
-#undef __mips64__
-#endif
-#ifndef __powerpc__
-#undef __powerpc__
-#endif
-#ifndef __powerpc64__
-#undef __powerpc64__
-#endif
-#ifndef __powerpc64_elfv2__
-#undef __powerpc64_elfv2__
-#endif
-#ifndef __riscv32__
-#undef __riscv32__
-#endif
-#ifndef __riscv64__
-#undef __riscv64__
-#endif
-#ifndef __riscv32_ilp32__
-#undef __riscv32_ilp32__
-#endif
-#ifndef __riscv32_ilp32f__
-#undef __riscv32_ilp32f__
-#endif
-#ifndef __riscv32_ilp32d__
-#undef __riscv32_ilp32d__
-#endif
-#ifndef __riscv64_ilp32__
-#undef __riscv64_ilp32__
-#endif
-#ifndef __riscv64_ilp32f__
-#undef __riscv64_ilp32f__
-#endif
-#ifndef __riscv64_ilp32d__
-#undef __riscv64_ilp32d__
-#endif
-#ifndef __riscv64_lp64__
-#undef __riscv64_lp64__
-#endif
-#ifndef __riscv64_lp64f__
-#undef __riscv64_lp64f__
-#endif
-#ifndef __riscv64_lp64d__
-#undef __riscv64_lp64d__
-#endif
-#ifndef __s390__
-#undef __s390__
-#endif
-#ifndef __s390x__
-#undef __s390x__
-#endif
-#ifndef __sh__
-#undef __sh__
-#endif
-#ifndef __sparc__
-#undef __sparc__
-#endif
-#ifndef __sparc64__
-#undef __sparc64__
-#endif
-])
-
-])
-
-
-dnl Sets the HOST_CPU_C_ABI_32BIT variable to 'yes' if the C language ABI
-dnl (application binary interface) is a 32-bit one, to 'no' if it is a 64-bit
-dnl one, or to 'unknown' if unknown.
-dnl This is a simplified variant of gl_HOST_CPU_C_ABI.
-AC_DEFUN([gl_HOST_CPU_C_ABI_32BIT],
-[
- AC_REQUIRE([AC_CANONICAL_HOST])
- AC_CACHE_CHECK([32-bit host C ABI], [gl_cv_host_cpu_c_abi_32bit],
- [if test -n "$gl_cv_host_cpu_c_abi"; then
- case "$gl_cv_host_cpu_c_abi" in
- i386 | x86_64-x32 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | riscv*-ilp32* | s390 | sparc)
- gl_cv_host_cpu_c_abi_32bit=yes ;;
- x86_64 | alpha | arm64 | hppa64 | ia64 | mips64 | powerpc64 | powerpc64-elfv2 | riscv*-lp64* | s390x | sparc64 )
- gl_cv_host_cpu_c_abi_32bit=no ;;
- *)
- gl_cv_host_cpu_c_abi_32bit=unknown ;;
- esac
- else
- case "$host_cpu" in
-
- # CPUs that only support a 32-bit ABI.
- arc \
- | bfin \
- | cris* \
- | csky \
- | epiphany \
- | ft32 \
- | h8300 \
- | m68k \
- | microblaze | microblazeel \
- | nds32 | nds32le | nds32be \
- | nios2 | nios2eb | nios2el \
- | or1k* \
- | or32 \
- | sh | sh[1234] | sh[1234]e[lb] \
- | tic6x \
- | xtensa* )
- gl_cv_host_cpu_c_abi_32bit=yes
- ;;
-
- # CPUs that only support a 64-bit ABI.
-changequote(,)dnl
- alpha | alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] \
- | mmix )
-changequote([,])dnl
- gl_cv_host_cpu_c_abi_32bit=no
- ;;
-
-changequote(,)dnl
- i[34567]86 )
-changequote([,])dnl
- gl_cv_host_cpu_c_abi_32bit=yes
- ;;
-
- x86_64 )
- # On x86_64 systems, the C compiler may be generating code in one of
- # these ABIs:
- # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64.
- # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64
- # with native Windows (mingw, MSVC).
- # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32.
- # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386.
- AC_COMPILE_IFELSE(
- [AC_LANG_SOURCE(
- [[#if (defined __x86_64__ || defined __amd64__ \
- || defined _M_X64 || defined _M_AMD64) \
- && !(defined __ILP32__ || defined _ILP32)
- int ok;
- #else
- error fail
- #endif
- ]])],
- [gl_cv_host_cpu_c_abi_32bit=no],
- [gl_cv_host_cpu_c_abi_32bit=yes])
- ;;
-
- arm* | aarch64 )
- # Assume arm with EABI.
- # On arm64 systems, the C compiler may be generating code in one of
- # these ABIs:
- # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64.
- # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32.
- # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf.
- AC_COMPILE_IFELSE(
- [AC_LANG_SOURCE(
- [[#if defined __aarch64__ && !(defined __ILP32__ || defined _ILP32)
- int ok;
- #else
- error fail
- #endif
- ]])],
- [gl_cv_host_cpu_c_abi_32bit=no],
- [gl_cv_host_cpu_c_abi_32bit=yes])
- ;;
-
- hppa1.0 | hppa1.1 | hppa2.0* | hppa64 )
- # On hppa, the C compiler may be generating 32-bit code or 64-bit
- # code. In the latter case, it defines _LP64 and __LP64__.
- AC_COMPILE_IFELSE(
- [AC_LANG_SOURCE(
- [[#ifdef __LP64__
- int ok;
- #else
- error fail
- #endif
- ]])],
- [gl_cv_host_cpu_c_abi_32bit=no],
- [gl_cv_host_cpu_c_abi_32bit=yes])
- ;;
-
- ia64* )
- # On ia64 on HP-UX, the C compiler may be generating 64-bit code or
- # 32-bit code. In the latter case, it defines _ILP32.
- AC_COMPILE_IFELSE(
- [AC_LANG_SOURCE(
- [[#ifdef _ILP32
- int ok;
- #else
- error fail
- #endif
- ]])],
- [gl_cv_host_cpu_c_abi_32bit=yes],
- [gl_cv_host_cpu_c_abi_32bit=no])
- ;;
-
- mips* )
- # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this
- # at 32.
- AC_COMPILE_IFELSE(
- [AC_LANG_SOURCE(
- [[#if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64)
- int ok;
- #else
- error fail
- #endif
- ]])],
- [gl_cv_host_cpu_c_abi_32bit=no],
- [gl_cv_host_cpu_c_abi_32bit=yes])
- ;;
-
- powerpc* )
- # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD.
- # No need to distinguish them here; the caller may distinguish
- # them based on the OS.
- # On powerpc64 systems, the C compiler may still be generating
- # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may
- # be generating 64-bit code.
- AC_COMPILE_IFELSE(
- [AC_LANG_SOURCE(
- [[#if defined __powerpc64__ || defined _ARCH_PPC64
- int ok;
- #else
- error fail
- #endif
- ]])],
- [gl_cv_host_cpu_c_abi_32bit=no],
- [gl_cv_host_cpu_c_abi_32bit=yes])
- ;;
-
- rs6000 )
- gl_cv_host_cpu_c_abi_32bit=yes
- ;;
-
- riscv32 | riscv64 )
- # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d.
- # Size of 'long' and 'void *':
- AC_COMPILE_IFELSE(
- [AC_LANG_SOURCE(
- [[#if defined __LP64__
- int ok;
- #else
- error fail
- #endif
- ]])],
- [gl_cv_host_cpu_c_abi_32bit=no],
- [gl_cv_host_cpu_c_abi_32bit=yes])
- ;;
-
- s390* )
- # On s390x, the C compiler may be generating 64-bit (= s390x) code
- # or 31-bit (= s390) code.
- AC_COMPILE_IFELSE(
- [AC_LANG_SOURCE(
- [[#if defined __LP64__ || defined __s390x__
- int ok;
- #else
- error fail
- #endif
- ]])],
- [gl_cv_host_cpu_c_abi_32bit=no],
- [gl_cv_host_cpu_c_abi_32bit=yes])
- ;;
-
- sparc | sparc64 )
- # UltraSPARCs running Linux have `uname -m` = "sparc64", but the
- # C compiler still generates 32-bit code.
- AC_COMPILE_IFELSE(
- [AC_LANG_SOURCE(
- [[#if defined __sparcv9 || defined __arch64__
- int ok;
- #else
- error fail
- #endif
- ]])],
- [gl_cv_host_cpu_c_abi_32bit=no],
- [gl_cv_host_cpu_c_abi_32bit=yes])
- ;;
-
- *)
- gl_cv_host_cpu_c_abi_32bit=unknown
- ;;
- esac
- fi
- ])
-
- HOST_CPU_C_ABI_32BIT="$gl_cv_host_cpu_c_abi_32bit"
-])
diff --git a/gnulib/import/m4/include_next.m4 b/gnulib/import/m4/include_next.m4
index 86eb2c9..9009e29 100644
--- a/gnulib/import/m4/include_next.m4
+++ b/gnulib/import/m4/include_next.m4
@@ -1,5 +1,5 @@
# include_next.m4 serial 24
-dnl Copyright (C) 2006-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/inet_ntop.m4 b/gnulib/import/m4/inet_ntop.m4
index d71246b..39a6a9b 100644
--- a/gnulib/import/m4/inet_ntop.m4
+++ b/gnulib/import/m4/inet_ntop.m4
@@ -1,5 +1,5 @@
# inet_ntop.m4 serial 21
-dnl Copyright (C) 2005-2006, 2008-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2006, 2008-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/inttypes-pri.m4 b/gnulib/import/m4/inttypes-pri.m4
index 38fe118..ac40a05 100644
--- a/gnulib/import/m4/inttypes-pri.m4
+++ b/gnulib/import/m4/inttypes-pri.m4
@@ -1,5 +1,5 @@
# inttypes-pri.m4 serial 7 (gettext-0.18.2)
-dnl Copyright (C) 1997-2002, 2006, 2008-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 1997-2002, 2006, 2008-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/inttypes.m4 b/gnulib/import/m4/inttypes.m4
index c58a1be..d0487d6 100644
--- a/gnulib/import/m4/inttypes.m4
+++ b/gnulib/import/m4/inttypes.m4
@@ -1,5 +1,5 @@
-# inttypes.m4 serial 27
-dnl Copyright (C) 2006-2019 Free Software Foundation, Inc.
+# inttypes.m4 serial 28
+dnl Copyright (C) 2006-2020 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.
@@ -113,10 +113,8 @@ AC_DEFUN([gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION],
#if $2
#define CONDITION ($3)
- #elif HAVE_LONG_LONG_INT
- #define CONDITION ($4)
#else
- #define CONDITION 0
+ #define CONDITION ($4)
#endif
int test[CONDITION ? 1 : -1];]])],
[gl_cv_test_$1=yes],
diff --git a/gnulib/import/m4/isnand.m4 b/gnulib/import/m4/isnand.m4
index 31af024..c74795e 100644
--- a/gnulib/import/m4/isnand.m4
+++ b/gnulib/import/m4/isnand.m4
@@ -1,5 +1,5 @@
# isnand.m4 serial 11
-dnl Copyright (C) 2007-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/isnanl.m4 b/gnulib/import/m4/isnanl.m4
index 3bef867..9874418 100644
--- a/gnulib/import/m4/isnanl.m4
+++ b/gnulib/import/m4/isnanl.m4
@@ -1,5 +1,5 @@
# isnanl.m4 serial 20
-dnl Copyright (C) 2007-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/largefile.m4 b/gnulib/import/m4/largefile.m4
index 65d5a15..e381339 100644
--- a/gnulib/import/m4/largefile.m4
+++ b/gnulib/import/m4/largefile.m4
@@ -1,6 +1,7 @@
# Enable large files on systems where this is not the default.
+# Enable support for files on Linux file systems with 64-bit inode numbers.
-# Copyright 1992-1996, 1998-2019 Free Software Foundation, Inc.
+# Copyright 1992-1996, 1998-2020 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.
@@ -73,6 +74,9 @@ rm -rf conftest*[]dnl
# one must use special compiler options to get large-file access to work.
# For more details about this brain damage please see:
# http://www.unix.org/version2/whatsnew/lfs20mar.html
+# Additionally, on Linux file systems with 64-bit inodes a file that happens
+# to have a 64-bit inode number cannot be accessed by 32-bit applications on
+# Linux x86/x86_64. This can occur with file systems such as XFS and NFS.
AC_DEFUN([AC_SYS_LARGEFILE],
[AC_ARG_ENABLE(largefile,
[ --disable-largefile omit support for large files])
diff --git a/gnulib/import/m4/lib-ld.m4 b/gnulib/import/m4/lib-ld.m4
deleted file mode 100644
index a187196..0000000
--- a/gnulib/import/m4/lib-ld.m4
+++ /dev/null
@@ -1,168 +0,0 @@
-# lib-ld.m4 serial 9
-dnl Copyright (C) 1996-2003, 2009-2019 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 Subroutines of libtool.m4,
-dnl with replacements s/_*LT_PATH/AC_LIB_PROG/ and s/lt_/acl_/ to avoid
-dnl collision with libtool.m4.
-
-dnl From libtool-2.4. Sets the variable with_gnu_ld to yes or no.
-AC_DEFUN([AC_LIB_PROG_LD_GNU],
-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld],
-[# I'd rather use --version here, but apparently some GNU lds only accept -v.
-case `$LD -v 2>&1 </dev/null` in
-*GNU* | *'with BFD'*)
- acl_cv_prog_gnu_ld=yes
- ;;
-*)
- acl_cv_prog_gnu_ld=no
- ;;
-esac])
-with_gnu_ld=$acl_cv_prog_gnu_ld
-])
-
-dnl From libtool-2.4. Sets the variable LD.
-AC_DEFUN([AC_LIB_PROG_LD],
-[AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-
-AC_ARG_WITH([gnu-ld],
- [AS_HELP_STRING([--with-gnu-ld],
- [assume the C compiler uses GNU ld [default=no]])],
- [test "$withval" = no || with_gnu_ld=yes],
- [with_gnu_ld=no])dnl
-
-# Prepare PATH_SEPARATOR.
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
- # contains only /bin. Note that ksh looks also at the FPATH variable,
- # so we have to set that as well for the test.
- PATH_SEPARATOR=:
- (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
- && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
- || PATH_SEPARATOR=';'
- }
-fi
-
-if test -n "$LD"; then
- AC_MSG_CHECKING([for ld])
-elif test "$GCC" = yes; then
- AC_MSG_CHECKING([for ld used by $CC])
-elif test "$with_gnu_ld" = yes; then
- AC_MSG_CHECKING([for GNU ld])
-else
- AC_MSG_CHECKING([for non-GNU ld])
-fi
-if test -n "$LD"; then
- # Let the user override the test with a path.
- :
-else
- AC_CACHE_VAL([acl_cv_path_LD],
- [
- acl_cv_path_LD= # Final result of this test
- ac_prog=ld # Program to search in $PATH
- if test "$GCC" = yes; then
- # Check if gcc -print-prog-name=ld gives a path.
- case $host in
- *-*-mingw*)
- # gcc leaves a trailing carriage return which upsets mingw
- acl_output=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
- *)
- acl_output=`($CC -print-prog-name=ld) 2>&5` ;;
- esac
- case $acl_output in
- # Accept absolute paths.
- [[\\/]]* | ?:[[\\/]]*)
- re_direlt='/[[^/]][[^/]]*/\.\./'
- # Canonicalize the pathname of ld
- acl_output=`echo "$acl_output" | sed 's%\\\\%/%g'`
- while echo "$acl_output" | grep "$re_direlt" > /dev/null 2>&1; do
- acl_output=`echo $acl_output | sed "s%$re_direlt%/%"`
- done
- # Got the pathname. No search in PATH is needed.
- acl_cv_path_LD="$acl_output"
- ac_prog=
- ;;
- "")
- # If it fails, then pretend we aren't using GCC.
- ;;
- *)
- # If it is relative, then search for the first ld in PATH.
- with_gnu_ld=unknown
- ;;
- esac
- fi
- if test -n "$ac_prog"; then
- # Search for $ac_prog in $PATH.
- acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for ac_dir in $PATH; do
- IFS="$acl_save_ifs"
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- acl_cv_path_LD="$ac_dir/$ac_prog"
- # Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some variants of GNU ld only accept -v.
- # Break only if it was the GNU/non-GNU ld that we prefer.
- case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
- *GNU* | *'with BFD'*)
- test "$with_gnu_ld" != no && break
- ;;
- *)
- test "$with_gnu_ld" != yes && break
- ;;
- esac
- fi
- done
- IFS="$acl_save_ifs"
- fi
- case $host in
- *-*-aix*)
- AC_COMPILE_IFELSE(
- [AC_LANG_SOURCE(
- [[#if defined __powerpc64__ || defined _ARCH_PPC64
- int ok;
- #else
- error fail
- #endif
- ]])],
- [# The compiler produces 64-bit code. Add option '-b64' so that the
- # linker groks 64-bit object files.
- case "$acl_cv_path_LD " in
- *" -b64 "*) ;;
- *) acl_cv_path_LD="$acl_cv_path_LD -b64" ;;
- esac
- ], [])
- ;;
- sparc64-*-netbsd*)
- AC_COMPILE_IFELSE(
- [AC_LANG_SOURCE(
- [[#if defined __sparcv9 || defined __arch64__
- int ok;
- #else
- error fail
- #endif
- ]])],
- [],
- [# The compiler produces 32-bit code. Add option '-m elf32_sparc'
- # so that the linker groks 32-bit object files.
- case "$acl_cv_path_LD " in
- *" -m elf32_sparc "*) ;;
- *) acl_cv_path_LD="$acl_cv_path_LD -m elf32_sparc" ;;
- esac
- ])
- ;;
- esac
- ])
- LD="$acl_cv_path_LD"
-fi
-if test -n "$LD"; then
- AC_MSG_RESULT([$LD])
-else
- AC_MSG_RESULT([no])
- AC_MSG_ERROR([no acceptable ld found in \$PATH])
-fi
-AC_LIB_PROG_LD_GNU
-])
diff --git a/gnulib/import/m4/lib-link.m4 b/gnulib/import/m4/lib-link.m4
deleted file mode 100644
index b9fa364..0000000
--- a/gnulib/import/m4/lib-link.m4
+++ /dev/null
@@ -1,800 +0,0 @@
-# lib-link.m4 serial 31
-dnl Copyright (C) 2001-2019 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Bruno Haible.
-
-AC_PREREQ([2.61])
-
-dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
-dnl the libraries corresponding to explicit and implicit dependencies.
-dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
-dnl augments the CPPFLAGS variable.
-dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
-dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
-AC_DEFUN([AC_LIB_LINKFLAGS],
-[
- AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
- AC_REQUIRE([AC_LIB_RPATH])
- pushdef([Name],[m4_translit([$1],[./+-], [____])])
- pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
- [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
- AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
- AC_LIB_LINKFLAGS_BODY([$1], [$2])
- ac_cv_lib[]Name[]_libs="$LIB[]NAME"
- ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
- ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
- ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
- ])
- LIB[]NAME="$ac_cv_lib[]Name[]_libs"
- LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
- INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
- LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
- AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
- AC_SUBST([LIB]NAME)
- AC_SUBST([LTLIB]NAME)
- AC_SUBST([LIB]NAME[_PREFIX])
- dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
- dnl results of this search when this library appears as a dependency.
- HAVE_LIB[]NAME=yes
- popdef([NAME])
- popdef([Name])
-])
-
-dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message])
-dnl searches for libname and the libraries corresponding to explicit and
-dnl implicit dependencies, together with the specified include files and
-dnl the ability to compile and link the specified testcode. The missing-message
-dnl defaults to 'no' and may contain additional hints for the user.
-dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME}
-dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and
-dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
-dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
-dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
-dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
-AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
-[
- AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
- AC_REQUIRE([AC_LIB_RPATH])
- pushdef([Name],[m4_translit([$1],[./+-], [____])])
- pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
- [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
-
- dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
- dnl accordingly.
- AC_LIB_LINKFLAGS_BODY([$1], [$2])
-
- dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
- dnl because if the user has installed lib[]Name and not disabled its use
- dnl via --without-lib[]Name-prefix, he wants to use it.
- ac_save_CPPFLAGS="$CPPFLAGS"
- AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
-
- AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
- ac_save_LIBS="$LIBS"
- dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS,
- dnl because these -l options might require -L options that are present in
- dnl LIBS. -l options benefit only from the -L options listed before it.
- dnl Otherwise, add it to the front of LIBS, because it may be a static
- dnl library that depends on another static library that is present in LIBS.
- dnl Static libraries benefit only from the static libraries listed after
- dnl it.
- case " $LIB[]NAME" in
- *" -l"*) LIBS="$LIBS $LIB[]NAME" ;;
- *) LIBS="$LIB[]NAME $LIBS" ;;
- esac
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM([[$3]], [[$4]])],
- [ac_cv_lib[]Name=yes],
- [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])'])
- LIBS="$ac_save_LIBS"
- ])
- if test "$ac_cv_lib[]Name" = yes; then
- HAVE_LIB[]NAME=yes
- AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.])
- AC_MSG_CHECKING([how to link with lib[]$1])
- AC_MSG_RESULT([$LIB[]NAME])
- else
- HAVE_LIB[]NAME=no
- dnl If $LIB[]NAME didn't lead to a usable library, we don't need
- dnl $INC[]NAME either.
- CPPFLAGS="$ac_save_CPPFLAGS"
- LIB[]NAME=
- LTLIB[]NAME=
- LIB[]NAME[]_PREFIX=
- fi
- AC_SUBST([HAVE_LIB]NAME)
- AC_SUBST([LIB]NAME)
- AC_SUBST([LTLIB]NAME)
- AC_SUBST([LIB]NAME[_PREFIX])
- popdef([NAME])
- popdef([Name])
-])
-
-dnl Determine the platform dependent parameters needed to use rpath:
-dnl acl_libext,
-dnl acl_shlibext,
-dnl acl_libname_spec,
-dnl acl_library_names_spec,
-dnl acl_hardcode_libdir_flag_spec,
-dnl acl_hardcode_libdir_separator,
-dnl acl_hardcode_direct,
-dnl acl_hardcode_minus_L.
-AC_DEFUN([AC_LIB_RPATH],
-[
- dnl Complain if config.rpath is missing.
- AC_REQUIRE_AUX_FILE([config.rpath])
- AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
- AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
- AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
- AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
- AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [
- CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
- ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
- . ./conftest.sh
- rm -f ./conftest.sh
- acl_cv_rpath=done
- ])
- wl="$acl_cv_wl"
- acl_libext="$acl_cv_libext"
- acl_shlibext="$acl_cv_shlibext"
- acl_libname_spec="$acl_cv_libname_spec"
- acl_library_names_spec="$acl_cv_library_names_spec"
- acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
- acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
- acl_hardcode_direct="$acl_cv_hardcode_direct"
- acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
- dnl Determine whether the user wants rpath handling at all.
- AC_ARG_ENABLE([rpath],
- [ --disable-rpath do not hardcode runtime library paths],
- :, enable_rpath=yes)
-])
-
-dnl AC_LIB_FROMPACKAGE(name, package)
-dnl declares that libname comes from the given package. The configure file
-dnl will then not have a --with-libname-prefix option but a
-dnl --with-package-prefix option. Several libraries can come from the same
-dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar
-dnl macro call that searches for libname.
-AC_DEFUN([AC_LIB_FROMPACKAGE],
-[
- pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
- [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
- define([acl_frompackage_]NAME, [$2])
- popdef([NAME])
- pushdef([PACK],[$2])
- pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
- [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
- define([acl_libsinpackage_]PACKUP,
- m4_ifdef([acl_libsinpackage_]PACKUP, [m4_defn([acl_libsinpackage_]PACKUP)[, ]],)[lib$1])
- popdef([PACKUP])
- popdef([PACK])
-])
-
-dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
-dnl the libraries corresponding to explicit and implicit dependencies.
-dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
-dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
-dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
-AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
-[
- AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
- pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
- [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
- pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])])
- pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
- [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
- pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])])
- dnl By default, look in $includedir and $libdir.
- use_additional=yes
- AC_LIB_WITH_FINAL_PREFIX([
- eval additional_includedir=\"$includedir\"
- eval additional_libdir=\"$libdir\"
- eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
- eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
- ])
- AC_ARG_WITH(PACK[-prefix],
-[[ --with-]]PACK[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib
- --without-]]PACK[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]],
-[
- if test "X$withval" = "Xno"; then
- use_additional=no
- else
- if test "X$withval" = "X"; then
- AC_LIB_WITH_FINAL_PREFIX([
- eval additional_includedir=\"$includedir\"
- eval additional_libdir=\"$libdir\"
- eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\"
- eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\"
- ])
- else
- additional_includedir="$withval/include"
- additional_libdir="$withval/$acl_libdirstem"
- additional_libdir2="$withval/$acl_libdirstem2"
- additional_libdir3="$withval/$acl_libdirstem3"
- fi
- fi
-])
- if test "X$additional_libdir2" = "X$additional_libdir"; then
- additional_libdir2=
- fi
- if test "X$additional_libdir3" = "X$additional_libdir"; then
- additional_libdir3=
- fi
- dnl Search the library and its dependencies in $additional_libdir and
- dnl $LDFLAGS. Using breadth-first-seach.
- LIB[]NAME=
- LTLIB[]NAME=
- INC[]NAME=
- LIB[]NAME[]_PREFIX=
- dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been
- dnl computed. So it has to be reset here.
- HAVE_LIB[]NAME=
- rpathdirs=
- ltrpathdirs=
- names_already_handled=
- names_next_round='$1 $2'
- while test -n "$names_next_round"; do
- names_this_round="$names_next_round"
- names_next_round=
- for name in $names_this_round; do
- already_handled=
- for n in $names_already_handled; do
- if test "$n" = "$name"; then
- already_handled=yes
- break
- fi
- done
- if test -z "$already_handled"; then
- names_already_handled="$names_already_handled $name"
- dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
- dnl or AC_LIB_HAVE_LINKFLAGS call.
- uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
- eval value=\"\$HAVE_LIB$uppername\"
- if test -n "$value"; then
- if test "$value" = yes; then
- eval value=\"\$LIB$uppername\"
- test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
- eval value=\"\$LTLIB$uppername\"
- test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
- else
- dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
- dnl that this library doesn't exist. So just drop it.
- :
- fi
- else
- dnl Search the library lib$name in $additional_libdir and $LDFLAGS
- dnl and the already constructed $LIBNAME/$LTLIBNAME.
- found_dir=
- found_la=
- found_so=
- found_a=
- eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
- if test -n "$acl_shlibext"; then
- shrext=".$acl_shlibext" # typically: shrext=.so
- else
- shrext=
- fi
- if test $use_additional = yes; then
- for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do
- if test "X$found_dir" = "X"; then
- eval dir=\$$additional_libdir_variable
- if test -n "$dir"; then
- dnl The same code as in the loop below:
- dnl First look for a shared library.
- if test -n "$acl_shlibext"; then
- if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
- found_dir="$dir"
- found_so="$dir/$libname$shrext"
- else
- if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
- ver=`(cd "$dir" && \
- for f in "$libname$shrext".*; do echo "$f"; done \
- | sed -e "s,^$libname$shrext\\\\.,," \
- | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
- | sed 1q ) 2>/dev/null`
- if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
- found_dir="$dir"
- found_so="$dir/$libname$shrext.$ver"
- fi
- else
- eval library_names=\"$acl_library_names_spec\"
- for f in $library_names; do
- if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
- found_dir="$dir"
- found_so="$dir/$f"
- break
- fi
- done
- fi
- fi
- fi
- dnl Then look for a static library.
- if test "X$found_dir" = "X"; then
- if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
- found_dir="$dir"
- found_a="$dir/$libname.$acl_libext"
- fi
- fi
- if test "X$found_dir" != "X"; then
- if test -f "$dir/$libname.la"; then
- found_la="$dir/$libname.la"
- fi
- fi
- fi
- fi
- done
- fi
- if test "X$found_dir" = "X"; then
- for x in $LDFLAGS $LTLIB[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- case "$x" in
- -L*)
- dir=`echo "X$x" | sed -e 's/^X-L//'`
- dnl First look for a shared library.
- if test -n "$acl_shlibext"; then
- if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then
- found_dir="$dir"
- found_so="$dir/$libname$shrext"
- else
- if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
- ver=`(cd "$dir" && \
- for f in "$libname$shrext".*; do echo "$f"; done \
- | sed -e "s,^$libname$shrext\\\\.,," \
- | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
- | sed 1q ) 2>/dev/null`
- if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then
- found_dir="$dir"
- found_so="$dir/$libname$shrext.$ver"
- fi
- else
- eval library_names=\"$acl_library_names_spec\"
- for f in $library_names; do
- if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then
- found_dir="$dir"
- found_so="$dir/$f"
- break
- fi
- done
- fi
- fi
- fi
- dnl Then look for a static library.
- if test "X$found_dir" = "X"; then
- if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then
- found_dir="$dir"
- found_a="$dir/$libname.$acl_libext"
- fi
- fi
- if test "X$found_dir" != "X"; then
- if test -f "$dir/$libname.la"; then
- found_la="$dir/$libname.la"
- fi
- fi
- ;;
- esac
- if test "X$found_dir" != "X"; then
- break
- fi
- done
- fi
- if test "X$found_dir" != "X"; then
- dnl Found the library.
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
- if test "X$found_so" != "X"; then
- dnl Linking with a shared library. We attempt to hardcode its
- dnl directory into the executable's runpath, unless it's the
- dnl standard /usr/lib.
- if test "$enable_rpath" = no \
- || test "X$found_dir" = "X/usr/$acl_libdirstem" \
- || test "X$found_dir" = "X/usr/$acl_libdirstem2" \
- || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then
- dnl No hardcoding is needed.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
- else
- dnl Use an explicit option to hardcode DIR into the resulting
- dnl binary.
- dnl Potentially add DIR to ltrpathdirs.
- dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
- haveit=
- for x in $ltrpathdirs; do
- if test "X$x" = "X$found_dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- ltrpathdirs="$ltrpathdirs $found_dir"
- fi
- dnl The hardcoding into $LIBNAME is system dependent.
- if test "$acl_hardcode_direct" = yes; then
- dnl Using DIR/libNAME.so during linking hardcodes DIR into the
- dnl resulting binary.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
- else
- if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
- dnl Use an explicit option to hardcode DIR into the resulting
- dnl binary.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
- dnl Potentially add DIR to rpathdirs.
- dnl The rpathdirs will be appended to $LIBNAME at the end.
- haveit=
- for x in $rpathdirs; do
- if test "X$x" = "X$found_dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- rpathdirs="$rpathdirs $found_dir"
- fi
- else
- dnl Rely on "-L$found_dir".
- dnl But don't add it if it's already contained in the LDFLAGS
- dnl or the already constructed $LIBNAME
- haveit=
- for x in $LDFLAGS $LIB[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-L$found_dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
- fi
- if test "$acl_hardcode_minus_L" != no; then
- dnl FIXME: Not sure whether we should use
- dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
- dnl here.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
- else
- dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
- dnl here, because this doesn't fit in flags passed to the
- dnl compiler. So give up. No hardcoding. This affects only
- dnl very old systems.
- dnl FIXME: Not sure whether we should use
- dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
- dnl here.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
- fi
- fi
- fi
- fi
- else
- if test "X$found_a" != "X"; then
- dnl Linking with a static library.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
- else
- dnl We shouldn't come here, but anyway it's good to have a
- dnl fallback.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
- fi
- fi
- dnl Assume the include files are nearby.
- additional_includedir=
- case "$found_dir" in
- */$acl_libdirstem | */$acl_libdirstem/)
- basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
- if test "$name" = '$1'; then
- LIB[]NAME[]_PREFIX="$basedir"
- fi
- additional_includedir="$basedir/include"
- ;;
- */$acl_libdirstem2 | */$acl_libdirstem2/)
- basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
- if test "$name" = '$1'; then
- LIB[]NAME[]_PREFIX="$basedir"
- fi
- additional_includedir="$basedir/include"
- ;;
- */$acl_libdirstem3 | */$acl_libdirstem3/)
- basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'`
- if test "$name" = '$1'; then
- LIB[]NAME[]_PREFIX="$basedir"
- fi
- additional_includedir="$basedir/include"
- ;;
- esac
- if test "X$additional_includedir" != "X"; then
- dnl Potentially add $additional_includedir to $INCNAME.
- dnl But don't add it
- dnl 1. if it's the standard /usr/include,
- dnl 2. if it's /usr/local/include and we are using GCC on Linux,
- dnl 3. if it's already present in $CPPFLAGS or the already
- dnl constructed $INCNAME,
- dnl 4. if it doesn't exist as a directory.
- if test "X$additional_includedir" != "X/usr/include"; then
- haveit=
- if test "X$additional_includedir" = "X/usr/local/include"; then
- if test -n "$GCC"; then
- case $host_os in
- linux* | gnu* | k*bsd*-gnu) haveit=yes;;
- esac
- fi
- fi
- if test -z "$haveit"; then
- for x in $CPPFLAGS $INC[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-I$additional_includedir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test -d "$additional_includedir"; then
- dnl Really add $additional_includedir to $INCNAME.
- INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
- fi
- fi
- fi
- fi
- fi
- dnl Look for dependencies.
- if test -n "$found_la"; then
- dnl Read the .la file. It defines the variables
- dnl dlname, library_names, old_library, dependency_libs, current,
- dnl age, revision, installed, dlopen, dlpreopen, libdir.
- save_libdir="$libdir"
- case "$found_la" in
- */* | *\\*) . "$found_la" ;;
- *) . "./$found_la" ;;
- esac
- libdir="$save_libdir"
- dnl We use only dependency_libs.
- for dep in $dependency_libs; do
- case "$dep" in
- -L*)
- dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
- dnl Potentially add $dependency_libdir to $LIBNAME and $LTLIBNAME.
- dnl But don't add it
- dnl 1. if it's the standard /usr/lib,
- dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
- dnl 3. if it's already present in $LDFLAGS or the already
- dnl constructed $LIBNAME,
- dnl 4. if it doesn't exist as a directory.
- if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \
- && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \
- && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then
- haveit=
- if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \
- || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \
- || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then
- if test -n "$GCC"; then
- case $host_os in
- linux* | gnu* | k*bsd*-gnu) haveit=yes;;
- esac
- fi
- fi
- if test -z "$haveit"; then
- haveit=
- for x in $LDFLAGS $LIB[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-L$dependency_libdir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test -d "$dependency_libdir"; then
- dnl Really add $dependency_libdir to $LIBNAME.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$dependency_libdir"
- fi
- fi
- haveit=
- for x in $LDFLAGS $LTLIB[]NAME; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-L$dependency_libdir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test -d "$dependency_libdir"; then
- dnl Really add $dependency_libdir to $LTLIBNAME.
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$dependency_libdir"
- fi
- fi
- fi
- fi
- ;;
- -R*)
- dir=`echo "X$dep" | sed -e 's/^X-R//'`
- if test "$enable_rpath" != no; then
- dnl Potentially add DIR to rpathdirs.
- dnl The rpathdirs will be appended to $LIBNAME at the end.
- haveit=
- for x in $rpathdirs; do
- if test "X$x" = "X$dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- rpathdirs="$rpathdirs $dir"
- fi
- dnl Potentially add DIR to ltrpathdirs.
- dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
- haveit=
- for x in $ltrpathdirs; do
- if test "X$x" = "X$dir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- ltrpathdirs="$ltrpathdirs $dir"
- fi
- fi
- ;;
- -l*)
- dnl Handle this in the next round.
- names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
- ;;
- *.la)
- dnl Handle this in the next round. Throw away the .la's
- dnl directory; it is already contained in a preceding -L
- dnl option.
- names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
- ;;
- *)
- dnl Most likely an immediate library name.
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
- ;;
- esac
- done
- fi
- else
- dnl Didn't find the library; assume it is in the system directories
- dnl known to the linker and runtime loader. (All the system
- dnl directories known to the linker should also be known to the
- dnl runtime loader, otherwise the system is severely misconfigured.)
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
- fi
- fi
- fi
- done
- done
- if test "X$rpathdirs" != "X"; then
- if test -n "$acl_hardcode_libdir_separator"; then
- dnl Weird platform: only the last -rpath option counts, the user must
- dnl pass all path elements in one option. We can arrange that for a
- dnl single library, but not when more than one $LIBNAMEs are used.
- alldirs=
- for found_dir in $rpathdirs; do
- alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
- done
- dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
- acl_save_libdir="$libdir"
- libdir="$alldirs"
- eval flag=\"$acl_hardcode_libdir_flag_spec\"
- libdir="$acl_save_libdir"
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
- else
- dnl The -rpath options are cumulative.
- for found_dir in $rpathdirs; do
- acl_save_libdir="$libdir"
- libdir="$found_dir"
- eval flag=\"$acl_hardcode_libdir_flag_spec\"
- libdir="$acl_save_libdir"
- LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
- done
- fi
- fi
- if test "X$ltrpathdirs" != "X"; then
- dnl When using libtool, the option that works for both libraries and
- dnl executables is -R. The -R options are cumulative.
- for found_dir in $ltrpathdirs; do
- LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
- done
- fi
- popdef([PACKLIBS])
- popdef([PACKUP])
- popdef([PACK])
- popdef([NAME])
-])
-
-dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
-dnl unless already present in VAR.
-dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
-dnl contains two or three consecutive elements that belong together.
-AC_DEFUN([AC_LIB_APPENDTOVAR],
-[
- for element in [$2]; do
- haveit=
- for x in $[$1]; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X$element"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- [$1]="${[$1]}${[$1]:+ }$element"
- fi
- done
-])
-
-dnl For those cases where a variable contains several -L and -l options
-dnl referring to unknown libraries and directories, this macro determines the
-dnl necessary additional linker options for the runtime path.
-dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
-dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
-dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
-dnl otherwise linking without libtool is assumed.
-AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
-[
- AC_REQUIRE([AC_LIB_RPATH])
- AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
- $1=
- if test "$enable_rpath" != no; then
- if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
- dnl Use an explicit option to hardcode directories into the resulting
- dnl binary.
- rpathdirs=
- next=
- for opt in $2; do
- if test -n "$next"; then
- dir="$next"
- dnl No need to hardcode the standard /usr/lib.
- if test "X$dir" != "X/usr/$acl_libdirstem" \
- && test "X$dir" != "X/usr/$acl_libdirstem2" \
- && test "X$dir" != "X/usr/$acl_libdirstem3"; then
- rpathdirs="$rpathdirs $dir"
- fi
- next=
- else
- case $opt in
- -L) next=yes ;;
- -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
- dnl No need to hardcode the standard /usr/lib.
- if test "X$dir" != "X/usr/$acl_libdirstem" \
- && test "X$dir" != "X/usr/$acl_libdirstem2" \
- && test "X$dir" != "X/usr/$acl_libdirstem3"; then
- rpathdirs="$rpathdirs $dir"
- fi
- next= ;;
- *) next= ;;
- esac
- fi
- done
- if test "X$rpathdirs" != "X"; then
- if test -n ""$3""; then
- dnl libtool is used for linking. Use -R options.
- for dir in $rpathdirs; do
- $1="${$1}${$1:+ }-R$dir"
- done
- else
- dnl The linker is used for linking directly.
- if test -n "$acl_hardcode_libdir_separator"; then
- dnl Weird platform: only the last -rpath option counts, the user
- dnl must pass all path elements in one option.
- alldirs=
- for dir in $rpathdirs; do
- alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
- done
- acl_save_libdir="$libdir"
- libdir="$alldirs"
- eval flag=\"$acl_hardcode_libdir_flag_spec\"
- libdir="$acl_save_libdir"
- $1="$flag"
- else
- dnl The -rpath options are cumulative.
- for dir in $rpathdirs; do
- acl_save_libdir="$libdir"
- libdir="$dir"
- eval flag=\"$acl_hardcode_libdir_flag_spec\"
- libdir="$acl_save_libdir"
- $1="${$1}${$1:+ }$flag"
- done
- fi
- fi
- fi
- fi
- fi
- AC_SUBST([$1])
-])
diff --git a/gnulib/import/m4/lib-prefix.m4 b/gnulib/import/m4/lib-prefix.m4
deleted file mode 100644
index 52ea5ae..0000000
--- a/gnulib/import/m4/lib-prefix.m4
+++ /dev/null
@@ -1,320 +0,0 @@
-# lib-prefix.m4 serial 17
-dnl Copyright (C) 2001-2005, 2008-2019 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Bruno Haible.
-
-dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
-dnl to access previously installed libraries. The basic assumption is that
-dnl a user will want packages to use other packages he previously installed
-dnl with the same --prefix option.
-dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
-dnl libraries, but is otherwise very convenient.
-AC_DEFUN([AC_LIB_PREFIX],
-[
- AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
- AC_REQUIRE([AC_PROG_CC])
- AC_REQUIRE([AC_CANONICAL_HOST])
- AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
- AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
- dnl By default, look in $includedir and $libdir.
- use_additional=yes
- AC_LIB_WITH_FINAL_PREFIX([
- eval additional_includedir=\"$includedir\"
- eval additional_libdir=\"$libdir\"
- ])
- AC_ARG_WITH([lib-prefix],
-[[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
- --without-lib-prefix don't search for libraries in includedir and libdir]],
-[
- if test "X$withval" = "Xno"; then
- use_additional=no
- else
- if test "X$withval" = "X"; then
- AC_LIB_WITH_FINAL_PREFIX([
- eval additional_includedir=\"$includedir\"
- eval additional_libdir=\"$libdir\"
- ])
- else
- additional_includedir="$withval/include"
- additional_libdir="$withval/$acl_libdirstem"
- fi
- fi
-])
- if test $use_additional = yes; then
- dnl Potentially add $additional_includedir to $CPPFLAGS.
- dnl But don't add it
- dnl 1. if it's the standard /usr/include,
- dnl 2. if it's already present in $CPPFLAGS,
- dnl 3. if it's /usr/local/include and we are using GCC on Linux,
- dnl 4. if it doesn't exist as a directory.
- if test "X$additional_includedir" != "X/usr/include"; then
- haveit=
- for x in $CPPFLAGS; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-I$additional_includedir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test "X$additional_includedir" = "X/usr/local/include"; then
- if test -n "$GCC"; then
- case $host_os in
- linux* | gnu* | k*bsd*-gnu) haveit=yes;;
- esac
- fi
- fi
- if test -z "$haveit"; then
- if test -d "$additional_includedir"; then
- dnl Really add $additional_includedir to $CPPFLAGS.
- CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
- fi
- fi
- fi
- fi
- dnl Potentially add $additional_libdir to $LDFLAGS.
- dnl But don't add it
- dnl 1. if it's the standard /usr/lib,
- dnl 2. if it's already present in $LDFLAGS,
- dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
- dnl 4. if it doesn't exist as a directory.
- if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
- haveit=
- for x in $LDFLAGS; do
- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
- if test "X$x" = "X-L$additional_libdir"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
- if test -n "$GCC"; then
- case $host_os in
- linux*) haveit=yes;;
- esac
- fi
- fi
- if test -z "$haveit"; then
- if test -d "$additional_libdir"; then
- dnl Really add $additional_libdir to $LDFLAGS.
- LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
- fi
- fi
- fi
- fi
- fi
-])
-
-dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
-dnl acl_final_exec_prefix, containing the values to which $prefix and
-dnl $exec_prefix will expand at the end of the configure script.
-AC_DEFUN([AC_LIB_PREPARE_PREFIX],
-[
- dnl Unfortunately, prefix and exec_prefix get only finally determined
- dnl at the end of configure.
- if test "X$prefix" = "XNONE"; then
- acl_final_prefix="$ac_default_prefix"
- else
- acl_final_prefix="$prefix"
- fi
- if test "X$exec_prefix" = "XNONE"; then
- acl_final_exec_prefix='${prefix}'
- else
- acl_final_exec_prefix="$exec_prefix"
- fi
- acl_save_prefix="$prefix"
- prefix="$acl_final_prefix"
- eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
- prefix="$acl_save_prefix"
-])
-
-dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
-dnl variables prefix and exec_prefix bound to the values they will have
-dnl at the end of the configure script.
-AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
-[
- acl_save_prefix="$prefix"
- prefix="$acl_final_prefix"
- acl_save_exec_prefix="$exec_prefix"
- exec_prefix="$acl_final_exec_prefix"
- $1
- exec_prefix="$acl_save_exec_prefix"
- prefix="$acl_save_prefix"
-])
-
-dnl AC_LIB_PREPARE_MULTILIB creates
-dnl - a function acl_is_expected_elfclass, that tests whether standard input
-dn; has a 32-bit or 64-bit ELF header, depending on the host CPU ABI,
-dnl - 3 variables acl_libdirstem, acl_libdirstem2, acl_libdirstem3, containing
-dnl the basename of the libdir to try in turn, either "lib" or "lib64" or
-dnl "lib/64" or "lib32" or "lib/sparcv9" or "lib/amd64" or similar.
-AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
-[
- dnl There is no formal standard regarding lib, lib32, and lib64.
- dnl On most glibc systems, the current practice is that on a system supporting
- dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
- dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. However, on
- dnl Arch Linux based distributions, it's the opposite: 32-bit libraries go
- dnl under $prefix/lib32 and 64-bit libraries go under $prefix/lib.
- dnl We determine the compiler's default mode by looking at the compiler's
- dnl library search path. If at least one of its elements ends in /lib64 or
- dnl points to a directory whose absolute pathname ends in /lib64, we use that
- dnl for 64-bit ABIs. Similarly for 32-bit ABIs. Otherwise we use the default,
- dnl namely "lib".
- dnl On Solaris systems, the current practice is that on a system supporting
- dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
- dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or
- dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib.
- AC_REQUIRE([AC_CANONICAL_HOST])
- AC_REQUIRE([gl_HOST_CPU_C_ABI_32BIT])
-
- AC_CACHE_CHECK([for ELF binary format], [gl_cv_elf],
- [AC_EGREP_CPP([Extensible Linking Format],
- [#ifdef __ELF__
- Extensible Linking Format
- #endif
- ],
- [gl_cv_elf=yes],
- [gl_cv_elf=no])
- ])
- if test $gl_cv_elf; then
- # Extract the ELF class of a file (5th byte) in decimal.
- # Cf. https://en.wikipedia.org/wiki/Executable_and_Linkable_Format#File_header
- if od -A x < /dev/null >/dev/null 2>/dev/null; then
- # Use POSIX od.
- func_elfclass ()
- {
- od -A n -t d1 -j 4 -N 1
- }
- else
- # Use BSD hexdump.
- func_elfclass ()
- {
- dd bs=1 count=1 skip=4 2>/dev/null | hexdump -e '1/1 "%3d "'
- echo
- }
- fi
-changequote(,)dnl
- case $HOST_CPU_C_ABI_32BIT in
- yes)
- # 32-bit ABI.
- acl_is_expected_elfclass ()
- {
- test "`func_elfclass | sed -e 's/[ ]//g'`" = 1
- }
- ;;
- no)
- # 64-bit ABI.
- acl_is_expected_elfclass ()
- {
- test "`func_elfclass | sed -e 's/[ ]//g'`" = 2
- }
- ;;
- *)
- # Unknown.
- acl_is_expected_elfclass ()
- {
- :
- }
- ;;
- esac
-changequote([,])dnl
- else
- acl_is_expected_elfclass ()
- {
- :
- }
- fi
-
- dnl Allow the user to override the result by setting acl_cv_libdirstems.
- AC_CACHE_CHECK([for the common suffixes of directories in the library search path],
- [acl_cv_libdirstems],
- [dnl Try 'lib' first, because that's the default for libdir in GNU, see
- dnl <https://www.gnu.org/prep/standards/html_node/Directory-Variables.html>.
- acl_libdirstem=lib
- acl_libdirstem2=
- acl_libdirstem3=
- case "$host_os" in
- solaris*)
- dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment
- dnl <https://docs.oracle.com/cd/E19253-01/816-5138/dev-env/index.html>.
- dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link."
- dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the
- dnl symlink is missing, so we set acl_libdirstem2 too.
- if test $HOST_CPU_C_ABI_32BIT = no; then
- acl_libdirstem2=lib/64
- case "$host_cpu" in
- sparc*) acl_libdirstem3=lib/sparcv9 ;;
- i*86 | x86_64) acl_libdirstem3=lib/amd64 ;;
- esac
- fi
- ;;
- *)
- dnl If $CC generates code for a 32-bit ABI, the libraries are
- dnl surely under $prefix/lib or $prefix/lib32, not $prefix/lib64.
- dnl Similarly, if $CC generates code for a 64-bit ABI, the libraries
- dnl are surely under $prefix/lib or $prefix/lib64, not $prefix/lib32.
- dnl Find the compiler's search path. However, non-system compilers
- dnl sometimes have odd library search paths. But we can't simply invoke
- dnl '/usr/bin/gcc -print-search-dirs' because that would not take into
- dnl account the -m32/-m31 or -m64 options from the $CC or $CFLAGS.
- searchpath=`(LC_ALL=C $CC $CPPFLAGS $CFLAGS -print-search-dirs) 2>/dev/null \
- | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
- if test $HOST_CPU_C_ABI_32BIT != no; then
- # 32-bit or unknown ABI.
- if test -d /usr/lib32; then
- acl_libdirstem2=lib32
- fi
- fi
- if test $HOST_CPU_C_ABI_32BIT != yes; then
- # 64-bit or unknown ABI.
- if test -d /usr/lib64; then
- acl_libdirstem3=lib64
- fi
- fi
- if test -n "$searchpath"; then
- acl_save_IFS="${IFS= }"; IFS=":"
- for searchdir in $searchpath; do
- if test -d "$searchdir"; then
- case "$searchdir" in
- */lib32/ | */lib32 ) acl_libdirstem2=lib32 ;;
- */lib64/ | */lib64 ) acl_libdirstem3=lib64 ;;
- */../ | */.. )
- # Better ignore directories of this form. They are misleading.
- ;;
- *) searchdir=`cd "$searchdir" && pwd`
- case "$searchdir" in
- */lib32 ) acl_libdirstem2=lib32 ;;
- */lib64 ) acl_libdirstem3=lib64 ;;
- esac ;;
- esac
- fi
- done
- IFS="$acl_save_IFS"
- if test $HOST_CPU_C_ABI_32BIT = yes; then
- # 32-bit ABI.
- acl_libdirstem3=
- fi
- if test $HOST_CPU_C_ABI_32BIT = no; then
- # 64-bit ABI.
- acl_libdirstem2=
- fi
- fi
- ;;
- esac
- test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
- test -n "$acl_libdirstem3" || acl_libdirstem3="$acl_libdirstem"
- acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2,$acl_libdirstem3"
- ])
- dnl Decompose acl_cv_libdirstems into acl_libdirstem, acl_libdirstem2, and
- dnl acl_libdirstem3.
-changequote(,)dnl
- acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'`
- acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,//' -e 's/,.*//'`
- acl_libdirstem3=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,[^,]*,//' -e 's/,.*//'`
-changequote([,])dnl
-])
diff --git a/gnulib/import/m4/limits-h.m4 b/gnulib/import/m4/limits-h.m4
index 68f724c..0b4f092 100644
--- a/gnulib/import/m4/limits-h.m4
+++ b/gnulib/import/m4/limits-h.m4
@@ -1,6 +1,6 @@
dnl Check whether limits.h has needed features.
-dnl Copyright 2016-2019 Free Software Foundation, Inc.
+dnl Copyright 2016-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/localcharset.m4 b/gnulib/import/m4/localcharset.m4
index 2a7f82d..9d21c4f 100644
--- a/gnulib/import/m4/localcharset.m4
+++ b/gnulib/import/m4/localcharset.m4
@@ -1,5 +1,5 @@
# localcharset.m4 serial 8
-dnl Copyright (C) 2002, 2004, 2006, 2009-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2004, 2006, 2009-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/locale-fr.m4 b/gnulib/import/m4/locale-fr.m4
index cfa068d..5abe052 100644
--- a/gnulib/import/m4/locale-fr.m4
+++ b/gnulib/import/m4/locale-fr.m4
@@ -1,5 +1,5 @@
# locale-fr.m4 serial 19
-dnl Copyright (C) 2003, 2005-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2005-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/locale-ja.m4 b/gnulib/import/m4/locale-ja.m4
index 487f68b..0982ab1 100644
--- a/gnulib/import/m4/locale-ja.m4
+++ b/gnulib/import/m4/locale-ja.m4
@@ -1,5 +1,5 @@
# locale-ja.m4 serial 14
-dnl Copyright (C) 2003, 2005-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2005-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/locale-zh.m4 b/gnulib/import/m4/locale-zh.m4
index 8b81326..cde5140 100644
--- a/gnulib/import/m4/locale-zh.m4
+++ b/gnulib/import/m4/locale-zh.m4
@@ -1,5 +1,5 @@
# locale-zh.m4 serial 14
-dnl Copyright (C) 2003, 2005-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2005-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/locale_h.m4 b/gnulib/import/m4/locale_h.m4
new file mode 100644
index 0000000..32494cf
--- /dev/null
+++ b/gnulib/import/m4/locale_h.m4
@@ -0,0 +1,158 @@
+# locale_h.m4 serial 24
+dnl Copyright (C) 2007, 2009-2020 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_LOCALE_H],
+[
+ dnl Use AC_REQUIRE here, so that the default behavior below is expanded
+ dnl once only, before all statements that occur in other macros.
+ AC_REQUIRE([gl_LOCALE_H_DEFAULTS])
+
+ dnl Persuade glibc <locale.h> to define locale_t and the int_p_*, int_n_*
+ dnl members of 'struct lconv'.
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+ dnl If <stddef.h> is replaced, then <locale.h> must also be replaced.
+ AC_REQUIRE([gl_STDDEF_H])
+
+ AC_REQUIRE([gl_LOCALE_T])
+
+ dnl Solaris 11.0 defines the int_p_*, int_n_* members of 'struct lconv'
+ dnl only if _LCONV_C99 is defined.
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ case "$host_os" in
+ solaris*)
+ AC_DEFINE([_LCONV_C99], [1], [Define to 1 on Solaris.])
+ ;;
+ esac
+
+ AC_CACHE_CHECK([whether locale.h conforms to POSIX:2001],
+ [gl_cv_header_locale_h_posix2001],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <locale.h>
+ int x = LC_MESSAGES;
+ int y = sizeof (((struct lconv *) 0)->decimal_point);]],
+ [[]])],
+ [gl_cv_header_locale_h_posix2001=yes],
+ [gl_cv_header_locale_h_posix2001=no])])
+
+ dnl Check whether 'struct lconv' is complete.
+ dnl Bionic libc's 'struct lconv' is just a dummy.
+ dnl On OpenBSD 4.9, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin 1.5.x,
+ dnl mingw, MSVC 9, it lacks the int_p_* and int_n_* members.
+ AC_CACHE_CHECK([whether struct lconv is properly defined],
+ [gl_cv_sys_struct_lconv_ok],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <locale.h>
+ struct lconv l;
+ int x = sizeof (l.decimal_point);
+ int y = sizeof (l.int_p_cs_precedes);]],
+ [[]])],
+ [gl_cv_sys_struct_lconv_ok=yes],
+ [gl_cv_sys_struct_lconv_ok=no])
+ ])
+ if test $gl_cv_sys_struct_lconv_ok = no; then
+ dnl On native Windows with MSVC, merely define these member names as macros.
+ dnl This avoids trouble in C++ mode.
+ case "$host_os" in
+ mingw*)
+ AC_EGREP_CPP([Special], [
+#ifdef _MSC_VER
+ Special
+#endif
+ ],
+ [],
+ [REPLACE_STRUCT_LCONV=1])
+ ;;
+ *) REPLACE_STRUCT_LCONV=1 ;;
+ esac
+ fi
+
+ dnl <locale.h> is always overridden, because of GNULIB_POSIXCHECK.
+ gl_NEXT_HEADERS([locale.h])
+
+ dnl Check for declarations of anything we want to poison if the
+ dnl corresponding gnulib module is not in use.
+ gl_WARN_ON_USE_PREPARE([[#include <locale.h>
+/* Some systems provide declarations in a non-standard header. */
+#if HAVE_XLOCALE_H
+# include <xlocale.h>
+#endif
+ ]],
+ [setlocale newlocale duplocale freelocale])
+])
+
+dnl Checks to determine whether the system has the locale_t type,
+dnl and how to obtain it.
+AC_DEFUN([gl_LOCALE_T],
+[
+ dnl Persuade glibc and Solaris <locale.h> to define locale_t.
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+ dnl Check whether use of locale_t requires inclusion of <xlocale.h>,
+ dnl e.g. on Mac OS X 10.5. If <locale.h> does not define locale_t by
+ dnl itself, we assume that <xlocale.h> will do so.
+ AC_CACHE_CHECK([whether locale.h defines locale_t],
+ [gl_cv_header_locale_has_locale_t],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <locale.h>
+ locale_t x;]],
+ [[]])],
+ [gl_cv_header_locale_has_locale_t=yes],
+ [gl_cv_header_locale_has_locale_t=no])
+ ])
+
+ dnl Check for <xlocale.h>.
+ AC_CHECK_HEADERS_ONCE([xlocale.h])
+ if test $ac_cv_header_xlocale_h = yes; then
+ HAVE_XLOCALE_H=1
+ if test $gl_cv_header_locale_has_locale_t = yes; then
+ gl_cv_header_locale_h_needs_xlocale_h=no
+ else
+ gl_cv_header_locale_h_needs_xlocale_h=yes
+ fi
+ HAVE_LOCALE_T=1
+ else
+ HAVE_XLOCALE_H=0
+ gl_cv_header_locale_h_needs_xlocale_h=no
+ if test $gl_cv_header_locale_has_locale_t = yes; then
+ HAVE_LOCALE_T=1
+ else
+ HAVE_LOCALE_T=0
+ fi
+ fi
+ AC_SUBST([HAVE_XLOCALE_H])
+])
+
+AC_DEFUN([gl_LOCALE_MODULE_INDICATOR],
+[
+ dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+ AC_REQUIRE([gl_LOCALE_H_DEFAULTS])
+ gl_MODULE_INDICATOR_SET_VARIABLE([$1])
+ dnl Define it also as a C macro, for the benefit of the unit tests.
+ gl_MODULE_INDICATOR_FOR_TESTS([$1])
+])
+
+AC_DEFUN([gl_LOCALE_H_DEFAULTS],
+[
+ GNULIB_LOCALECONV=0; AC_SUBST([GNULIB_LOCALECONV])
+ GNULIB_SETLOCALE=0; AC_SUBST([GNULIB_SETLOCALE])
+ GNULIB_SETLOCALE_NULL=0; AC_SUBST([GNULIB_SETLOCALE_NULL])
+ GNULIB_DUPLOCALE=0; AC_SUBST([GNULIB_DUPLOCALE])
+ GNULIB_LOCALENAME=0; AC_SUBST([GNULIB_LOCALENAME])
+ dnl Assume proper GNU behavior unless another module says otherwise.
+ HAVE_NEWLOCALE=1; AC_SUBST([HAVE_NEWLOCALE])
+ HAVE_DUPLOCALE=1; AC_SUBST([HAVE_DUPLOCALE])
+ HAVE_FREELOCALE=1; AC_SUBST([HAVE_FREELOCALE])
+ REPLACE_LOCALECONV=0; AC_SUBST([REPLACE_LOCALECONV])
+ REPLACE_SETLOCALE=0; AC_SUBST([REPLACE_SETLOCALE])
+ REPLACE_NEWLOCALE=0; AC_SUBST([REPLACE_NEWLOCALE])
+ REPLACE_DUPLOCALE=0; AC_SUBST([REPLACE_DUPLOCALE])
+ REPLACE_FREELOCALE=0; AC_SUBST([REPLACE_FREELOCALE])
+ REPLACE_STRUCT_LCONV=0; AC_SUBST([REPLACE_STRUCT_LCONV])
+])
diff --git a/gnulib/import/m4/localtime-buffer.m4 b/gnulib/import/m4/localtime-buffer.m4
index 6d99828..09df3c9 100644
--- a/gnulib/import/m4/localtime-buffer.m4
+++ b/gnulib/import/m4/localtime-buffer.m4
@@ -1,5 +1,5 @@
# localtime-buffer.m4 serial 1
-dnl Copyright (C) 2017-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2017-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/lock.m4 b/gnulib/import/m4/lock.m4
index 93b76fa..1c39591 100644
--- a/gnulib/import/m4/lock.m4
+++ b/gnulib/import/m4/lock.m4
@@ -1,5 +1,5 @@
# lock.m4 serial 14
-dnl Copyright (C) 2005-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/longlong.m4 b/gnulib/import/m4/longlong.m4
deleted file mode 100644
index 08d0e36..0000000
--- a/gnulib/import/m4/longlong.m4
+++ /dev/null
@@ -1,113 +0,0 @@
-# longlong.m4 serial 18
-dnl Copyright (C) 1999-2007, 2009-2019 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Paul Eggert.
-
-AC_PREREQ([2.62])
-
-# Define HAVE_LONG_LONG_INT if 'long long int' works.
-# This can be faster than what's in Autoconf 2.62 through 2.68.
-
-# Note: If the type 'long long int' exists but is only 32 bits large
-# (as on some very old compilers), HAVE_LONG_LONG_INT will not be
-# defined. In this case you can treat 'long long int' like 'long int'.
-
-AC_DEFUN([AC_TYPE_LONG_LONG_INT],
-[
- AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT])
- AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int],
- [ac_cv_type_long_long_int=yes
- if test "x${ac_cv_prog_cc_c99-no}" = xno; then
- ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
- if test $ac_cv_type_long_long_int = yes; then
- dnl Catch a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004.
- dnl If cross compiling, assume the bug is not important, since
- dnl nobody cross compiles for this platform as far as we know.
- AC_RUN_IFELSE(
- [AC_LANG_PROGRAM(
- [[@%:@include <limits.h>
- @%:@ifndef LLONG_MAX
- @%:@ define HALF \
- (1LL << (sizeof (long long int) * CHAR_BIT - 2))
- @%:@ define LLONG_MAX (HALF - 1 + HALF)
- @%:@endif]],
- [[long long int n = 1;
- int i;
- for (i = 0; ; i++)
- {
- long long int m = n << i;
- if (m >> i != n)
- return 1;
- if (LLONG_MAX / 2 < m)
- break;
- }
- return 0;]])],
- [],
- [ac_cv_type_long_long_int=no],
- [:])
- fi
- fi])
- if test $ac_cv_type_long_long_int = yes; then
- AC_DEFINE([HAVE_LONG_LONG_INT], [1],
- [Define to 1 if the system has the type 'long long int'.])
- fi
-])
-
-# Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works.
-# This can be faster than what's in Autoconf 2.62 through 2.68.
-
-# Note: If the type 'unsigned long long int' exists but is only 32 bits
-# large (as on some very old compilers), AC_TYPE_UNSIGNED_LONG_LONG_INT
-# will not be defined. In this case you can treat 'unsigned long long int'
-# like 'unsigned long int'.
-
-AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT],
-[
- AC_CACHE_CHECK([for unsigned long long int],
- [ac_cv_type_unsigned_long_long_int],
- [ac_cv_type_unsigned_long_long_int=yes
- if test "x${ac_cv_prog_cc_c99-no}" = xno; then
- AC_LINK_IFELSE(
- [_AC_TYPE_LONG_LONG_SNIPPET],
- [],
- [ac_cv_type_unsigned_long_long_int=no])
- fi])
- if test $ac_cv_type_unsigned_long_long_int = yes; then
- AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], [1],
- [Define to 1 if the system has the type 'unsigned long long int'.])
- fi
-])
-
-# Expands to a C program that can be used to test for simultaneous support
-# of 'long long' and 'unsigned long long'. We don't want to say that
-# 'long long' is available if 'unsigned long long' is not, or vice versa,
-# because too many programs rely on the symmetry between signed and unsigned
-# integer types (excluding 'bool').
-AC_DEFUN([_AC_TYPE_LONG_LONG_SNIPPET],
-[
- AC_LANG_PROGRAM(
- [[/* For now, do not test the preprocessor; as of 2007 there are too many
- implementations with broken preprocessors. Perhaps this can
- be revisited in 2012. In the meantime, code should not expect
- #if to work with literals wider than 32 bits. */
- /* Test literals. */
- long long int ll = 9223372036854775807ll;
- long long int nll = -9223372036854775807LL;
- unsigned long long int ull = 18446744073709551615ULL;
- /* Test constant expressions. */
- typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
- ? 1 : -1)];
- typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
- ? 1 : -1)];
- int i = 63;]],
- [[/* Test availability of runtime routines for shift and division. */
- long long int llmax = 9223372036854775807ll;
- unsigned long long int ullmax = 18446744073709551615ull;
- return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
- | (llmax / ll) | (llmax % ll)
- | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
- | (ullmax / ull) | (ullmax % ull));]])
-])
diff --git a/gnulib/import/m4/lstat.m4 b/gnulib/import/m4/lstat.m4
index be6d3f2..3c2b214 100644
--- a/gnulib/import/m4/lstat.m4
+++ b/gnulib/import/m4/lstat.m4
@@ -1,6 +1,6 @@
# serial 33
-# Copyright (C) 1997-2001, 2003-2019 Free Software Foundation, Inc.
+# Copyright (C) 1997-2001, 2003-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
diff --git a/gnulib/import/m4/malloc.m4 b/gnulib/import/m4/malloc.m4
index 6555dee..c1f8ea3 100644
--- a/gnulib/import/m4/malloc.m4
+++ b/gnulib/import/m4/malloc.m4
@@ -1,5 +1,5 @@
# malloc.m4 serial 20
-dnl Copyright (C) 2007, 2009-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/malloca.m4 b/gnulib/import/m4/malloca.m4
index 820f40a..930199d 100644
--- a/gnulib/import/m4/malloca.m4
+++ b/gnulib/import/m4/malloca.m4
@@ -1,5 +1,5 @@
-# malloca.m4 serial 1
-dnl Copyright (C) 2003-2004, 2006-2007, 2009-2019 Free Software Foundation,
+# malloca.m4 serial 2
+dnl Copyright (C) 2003-2004, 2006-2007, 2009-2020 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,
@@ -11,5 +11,4 @@ AC_DEFUN([gl_MALLOCA],
dnl @ALLOCA@ and @LTALLOCA@.
dnl gl_FUNC_ALLOCA dnl Already brought in by the module dependencies.
AC_REQUIRE([gl_EEMALLOC])
- AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
])
diff --git a/gnulib/import/m4/math_h.m4 b/gnulib/import/m4/math_h.m4
index 3d5af84..1d0169f 100644
--- a/gnulib/import/m4/math_h.m4
+++ b/gnulib/import/m4/math_h.m4
@@ -1,5 +1,5 @@
# math_h.m4 serial 119
-dnl Copyright (C) 2007-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/mbrtowc.m4 b/gnulib/import/m4/mbrtowc.m4
index 16e166b..755f8c9 100644
--- a/gnulib/import/m4/mbrtowc.m4
+++ b/gnulib/import/m4/mbrtowc.m4
@@ -1,5 +1,5 @@
-# mbrtowc.m4 serial 33 -*- coding: utf-8 -*-
-dnl Copyright (C) 2001-2002, 2004-2005, 2008-2019 Free Software Foundation,
+# mbrtowc.m4 serial 37 -*- coding: utf-8 -*-
+dnl Copyright (C) 2001-2002, 2004-2005, 2008-2020 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,
@@ -8,6 +8,8 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_MBRTOWC],
[
AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
+ AC_REQUIRE([gl_PTHREADLIB])
+ AC_CHECK_HEADERS_ONCE([threads.h])
AC_REQUIRE([AC_TYPE_MBSTATE_T])
gl_MBSTATE_T_BROKEN
@@ -39,6 +41,7 @@ AC_DEFUN([gl_FUNC_MBRTOWC],
gl_MBRTOWC_NULL_ARG2
gl_MBRTOWC_RETVAL
gl_MBRTOWC_NUL_RETVAL
+ gl_MBRTOWC_STORES_INCOMPLETE
gl_MBRTOWC_EMPTY_INPUT
gl_MBRTOWC_C_LOCALE
case "$gl_cv_func_mbrtowc_null_arg1" in
@@ -69,6 +72,13 @@ AC_DEFUN([gl_FUNC_MBRTOWC],
REPLACE_MBRTOWC=1
;;
esac
+ case "$gl_cv_func_mbrtowc_stores_incomplete" in
+ *no) ;;
+ *) AC_DEFINE([MBRTOWC_STORES_INCOMPLETE_BUG], [1],
+ [Define if the mbrtowc function stores a wide character when reporting incomplete input.])
+ REPLACE_MBRTOWC=1
+ ;;
+ esac
case "$gl_cv_func_mbrtowc_empty_input" in
*yes) ;;
*) AC_DEFINE([MBRTOWC_EMPTY_INPUT_BUG], [1],
@@ -77,15 +87,32 @@ AC_DEFUN([gl_FUNC_MBRTOWC],
REPLACE_MBRTOWC=1
;;
esac
- case $gl_cv_C_locale_sans_EILSEQ in
+ case "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" in
*yes) ;;
- *) AC_DEFINE([C_LOCALE_MAYBE_EILSEQ], [1],
- [Define to 1 if the C locale may have encoding errors.])
+ *) AC_DEFINE([MBRTOWC_IN_C_LOCALE_MAYBE_EILSEQ], [1],
+ [Define if the mbrtowc function may signal encoding errors in the C locale.])
REPLACE_MBRTOWC=1
;;
esac
fi
fi
+ if test $REPLACE_MBSTATE_T = 1; then
+ case "$host_os" in
+ mingw*) LIB_MBRTOWC= ;;
+ *)
+ gl_WEAK_SYMBOLS
+ case "$gl_cv_have_weak" in
+ *yes) LIB_MBRTOWC= ;;
+ *) LIB_MBRTOWC="$LIBPTHREAD" ;;
+ esac
+ ;;
+ esac
+ else
+ LIB_MBRTOWC=
+ fi
+ dnl LIB_MBRTOWC is expected to be '-pthread' or '-lpthread' on AIX
+ dnl with gcc or xlc, and empty otherwise.
+ AC_SUBST([LIB_MBRTOWC])
])
dnl Test whether mbsinit() and mbrtowc() need to be overridden in a way that
@@ -97,11 +124,19 @@ dnl avoid inconsistencies.
AC_DEFUN([gl_MBSTATE_T_BROKEN],
[
AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST])
AC_REQUIRE([AC_TYPE_MBSTATE_T])
AC_CHECK_FUNCS_ONCE([mbsinit])
AC_CHECK_FUNCS_ONCE([mbrtowc])
- if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
+ dnl On native Windows, we know exactly how mbsinit() behaves and don't need
+ dnl to override it, even if - like on MSVC - mbsinit() is only defined as
+ dnl an inline function, not as a global function.
+ if case "$host_os" in
+ mingw*) true ;;
+ *) test $ac_cv_func_mbsinit = yes ;;
+ esac \
+ && test $ac_cv_func_mbrtowc = yes; then
gl_MBRTOWC_INCOMPLETE_STATE
gl_MBRTOWC_SANITYCHECK
REPLACE_MBSTATE_T=0
@@ -584,6 +619,126 @@ int main ()
])
])
+dnl Test whether mbrtowc stores a wide character when reporting incomplete
+dnl input.
+
+AC_DEFUN([gl_MBRTOWC_STORES_INCOMPLETE],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether mbrtowc stores incomplete characters],
+ [gl_cv_func_mbrtowc_stores_incomplete],
+ [
+ dnl Initial guess, used when cross-compiling or when no suitable locale
+ dnl is present.
+changequote(,)dnl
+ case "$host_os" in
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_mbrtowc_stores_incomplete="guessing yes" ;;
+ *) gl_cv_func_mbrtowc_stores_incomplete="guessing no" ;;
+ esac
+changequote([,])dnl
+ case "$host_os" in
+ mingw*)
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+#include <locale.h>
+#include <string.h>
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+ <wchar.h>.
+ BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+int main ()
+{
+ int result = 0;
+ if (setlocale (LC_ALL, "French_France.65001") != NULL)
+ {
+ wchar_t wc = (wchar_t) 0xBADFACE;
+ mbstate_t state;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, "\303", 1, &state) == (size_t)(-2)
+ && wc != (wchar_t) 0xBADFACE)
+ result |= 1;
+ }
+ if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
+ {
+ wchar_t wc = (wchar_t) 0xBADFACE;
+ mbstate_t state;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, "\226", 1, &state) == (size_t)(-2)
+ && wc != (wchar_t) 0xBADFACE)
+ result |= 2;
+ }
+ if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
+ {
+ wchar_t wc = (wchar_t) 0xBADFACE;
+ mbstate_t state;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, "\245", 1, &state) == (size_t)(-2)
+ && wc != (wchar_t) 0xBADFACE)
+ result |= 4;
+ }
+ if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
+ {
+ wchar_t wc = (wchar_t) 0xBADFACE;
+ mbstate_t state;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, "\261", 1, &state) == (size_t)(-2)
+ && wc != (wchar_t) 0xBADFACE)
+ result |= 8;
+ }
+ return result;
+}]])],
+ [gl_cv_func_mbrtowc_stores_incomplete=no],
+ [gl_cv_func_mbrtowc_stores_incomplete=yes],
+ [:])
+ ;;
+ *)
+ AC_REQUIRE([gt_LOCALE_FR_UTF8])
+ if test $LOCALE_FR_UTF8 != none; then
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+#include <locale.h>
+#include <string.h>
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+ <wchar.h>.
+ BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+int main ()
+{
+ if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+ {
+ wchar_t wc = (wchar_t) 0xBADFACE;
+ mbstate_t state;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, "\303", 1, &state) == (size_t)(-2)
+ && wc != (wchar_t) 0xBADFACE)
+ return 1;
+ }
+ return 0;
+}]])],
+ [gl_cv_func_mbrtowc_stores_incomplete=no],
+ [gl_cv_func_mbrtowc_stores_incomplete=yes],
+ [:])
+ fi
+ ;;
+ esac
+ ])
+])
+
dnl Test whether mbrtowc returns the correct value on empty input.
AC_DEFUN([gl_MBRTOWC_EMPTY_INPUT],
@@ -629,11 +784,11 @@ AC_DEFUN([gl_MBRTOWC_C_LOCALE],
[
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([whether the C locale is free of encoding errors],
- [gl_cv_C_locale_sans_EILSEQ],
+ [gl_cv_func_mbrtowc_C_locale_sans_EILSEQ],
[
dnl Initial guess, used when cross-compiling or when no suitable locale
dnl is present.
- gl_cv_C_locale_sans_EILSEQ="$gl_cross_guess_normal"
+ gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="$gl_cross_guess_normal"
AC_RUN_IFELSE(
[AC_LANG_PROGRAM(
@@ -656,22 +811,28 @@ AC_DEFUN([gl_MBRTOWC_C_LOCALE],
}
return 0;
]])],
- [gl_cv_C_locale_sans_EILSEQ=yes],
- [gl_cv_C_locale_sans_EILSEQ=no],
+ [gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=yes],
+ [gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=no],
[case "$host_os" in
# Guess yes on native Windows.
- mingw*) gl_cv_C_locale_sans_EILSEQ="guessing yes" ;;
+ mingw*) gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="guessing yes" ;;
esac
])
])
])
-# Prerequisites of lib/mbrtowc.c.
+# Prerequisites of lib/mbrtowc.c and lib/lc-charset-dispatch.c.
AC_DEFUN([gl_PREREQ_MBRTOWC], [
AC_REQUIRE([AC_C_INLINE])
:
])
+# Prerequisites of lib/mbtowc-lock.c.
+AC_DEFUN([gl_PREREQ_MBTOWC_LOCK],
+[
+ gl_VISIBILITY
+])
+
dnl From Paul Eggert
diff --git a/gnulib/import/m4/mbsinit.m4 b/gnulib/import/m4/mbsinit.m4
index e2f45e7..8c26b6b 100644
--- a/gnulib/import/m4/mbsinit.m4
+++ b/gnulib/import/m4/mbsinit.m4
@@ -1,5 +1,5 @@
# mbsinit.m4 serial 8
-dnl Copyright (C) 2008, 2010-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2008, 2010-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/mbsrtowcs.m4 b/gnulib/import/m4/mbsrtowcs.m4
index cbdde2c..e0bc229 100644
--- a/gnulib/import/m4/mbsrtowcs.m4
+++ b/gnulib/import/m4/mbsrtowcs.m4
@@ -1,5 +1,5 @@
# mbsrtowcs.m4 serial 13
-dnl Copyright (C) 2008-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/mbstate_t.m4 b/gnulib/import/m4/mbstate_t.m4
index f669753..057ce12 100644
--- a/gnulib/import/m4/mbstate_t.m4
+++ b/gnulib/import/m4/mbstate_t.m4
@@ -1,5 +1,5 @@
# mbstate_t.m4 serial 13
-dnl Copyright (C) 2000-2002, 2008-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2000-2002, 2008-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/memchr.m4 b/gnulib/import/m4/memchr.m4
index c12d20a..91eec88 100644
--- a/gnulib/import/m4/memchr.m4
+++ b/gnulib/import/m4/memchr.m4
@@ -1,5 +1,5 @@
# memchr.m4 serial 15
-dnl Copyright (C) 2002-2004, 2009-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2004, 2009-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/memmem.m4 b/gnulib/import/m4/memmem.m4
index dcccefa..e034d7b 100644
--- a/gnulib/import/m4/memmem.m4
+++ b/gnulib/import/m4/memmem.m4
@@ -1,5 +1,5 @@
# memmem.m4 serial 26
-dnl Copyright (C) 2002-2004, 2007-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2004, 2007-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/mempcpy.m4 b/gnulib/import/m4/mempcpy.m4
index b6090ee..899f12a 100644
--- a/gnulib/import/m4/mempcpy.m4
+++ b/gnulib/import/m4/mempcpy.m4
@@ -1,5 +1,5 @@
# mempcpy.m4 serial 11
-dnl Copyright (C) 2003-2004, 2006-2007, 2009-2019 Free Software Foundation,
+dnl Copyright (C) 2003-2004, 2006-2007, 2009-2020 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/gnulib/import/m4/memrchr.m4 b/gnulib/import/m4/memrchr.m4
index e907590..95990ed 100644
--- a/gnulib/import/m4/memrchr.m4
+++ b/gnulib/import/m4/memrchr.m4
@@ -1,5 +1,5 @@
# memrchr.m4 serial 10
-dnl Copyright (C) 2002-2003, 2005-2007, 2009-2019 Free Software Foundation,
+dnl Copyright (C) 2002-2003, 2005-2007, 2009-2020 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/gnulib/import/m4/mkdir.m4 b/gnulib/import/m4/mkdir.m4
index 6451fb7..99212d9 100644
--- a/gnulib/import/m4/mkdir.m4
+++ b/gnulib/import/m4/mkdir.m4
@@ -1,6 +1,6 @@
# serial 16
-# Copyright (C) 2001, 2003-2004, 2006, 2008-2019 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003-2004, 2006, 2008-2020 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/mkdtemp.m4 b/gnulib/import/m4/mkdtemp.m4
index 412bb39..da7b2ac 100644
--- a/gnulib/import/m4/mkdtemp.m4
+++ b/gnulib/import/m4/mkdtemp.m4
@@ -1,5 +1,5 @@
# mkdtemp.m4 serial 8
-dnl Copyright (C) 2001-2003, 2006-2007, 2009-2019 Free Software Foundation,
+dnl Copyright (C) 2001-2003, 2006-2007, 2009-2020 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/gnulib/import/m4/mkostemp.m4 b/gnulib/import/m4/mkostemp.m4
index 56f566c..3e5b555 100644
--- a/gnulib/import/m4/mkostemp.m4
+++ b/gnulib/import/m4/mkostemp.m4
@@ -1,5 +1,5 @@
# mkostemp.m4 serial 2
-dnl Copyright (C) 2009-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/mmap-anon.m4 b/gnulib/import/m4/mmap-anon.m4
index 50c3808..d5c69df 100644
--- a/gnulib/import/m4/mmap-anon.m4
+++ b/gnulib/import/m4/mmap-anon.m4
@@ -1,5 +1,5 @@
# mmap-anon.m4 serial 10
-dnl Copyright (C) 2005, 2007, 2009-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2007, 2009-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/mode_t.m4 b/gnulib/import/m4/mode_t.m4
index ba840dc..f190951 100644
--- a/gnulib/import/m4/mode_t.m4
+++ b/gnulib/import/m4/mode_t.m4
@@ -1,5 +1,5 @@
# mode_t.m4 serial 2
-dnl Copyright (C) 2009-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/msvc-inval.m4 b/gnulib/import/m4/msvc-inval.m4
index 4b95876..dcf398d 100644
--- a/gnulib/import/m4/msvc-inval.m4
+++ b/gnulib/import/m4/msvc-inval.m4
@@ -1,5 +1,5 @@
# msvc-inval.m4 serial 1
-dnl Copyright (C) 2011-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/msvc-nothrow.m4 b/gnulib/import/m4/msvc-nothrow.m4
index 7e73b40..13198d8 100644
--- a/gnulib/import/m4/msvc-nothrow.m4
+++ b/gnulib/import/m4/msvc-nothrow.m4
@@ -1,5 +1,5 @@
# msvc-nothrow.m4 serial 1
-dnl Copyright (C) 2011-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/multiarch.m4 b/gnulib/import/m4/multiarch.m4
index d48316e..3c2034c 100644
--- a/gnulib/import/m4/multiarch.m4
+++ b/gnulib/import/m4/multiarch.m4
@@ -1,5 +1,5 @@
# multiarch.m4 serial 7
-dnl Copyright (C) 2008-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/netinet_in_h.m4 b/gnulib/import/m4/netinet_in_h.m4
index 0f96cae..df9f383 100644
--- a/gnulib/import/m4/netinet_in_h.m4
+++ b/gnulib/import/m4/netinet_in_h.m4
@@ -1,5 +1,5 @@
# netinet_in_h.m4 serial 5
-dnl Copyright (C) 2006-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/nocrash.m4 b/gnulib/import/m4/nocrash.m4
index 8577038..637a0ea 100644
--- a/gnulib/import/m4/nocrash.m4
+++ b/gnulib/import/m4/nocrash.m4
@@ -1,5 +1,5 @@
# nocrash.m4 serial 5
-dnl Copyright (C) 2005, 2009-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2009-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/off_t.m4 b/gnulib/import/m4/off_t.m4
index 711a2d4..6e19af8 100644
--- a/gnulib/import/m4/off_t.m4
+++ b/gnulib/import/m4/off_t.m4
@@ -1,5 +1,5 @@
# off_t.m4 serial 1
-dnl Copyright (C) 2012-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2012-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/open-cloexec.m4 b/gnulib/import/m4/open-cloexec.m4
index 52498d9..11652d5 100644
--- a/gnulib/import/m4/open-cloexec.m4
+++ b/gnulib/import/m4/open-cloexec.m4
@@ -1,6 +1,6 @@
# Test whether O_CLOEXEC is defined.
-dnl Copyright 2017-2019 Free Software Foundation, Inc.
+dnl Copyright 2017-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/open-slash.m4 b/gnulib/import/m4/open-slash.m4
index a8756ae..1e57c96 100644
--- a/gnulib/import/m4/open-slash.m4
+++ b/gnulib/import/m4/open-slash.m4
@@ -1,5 +1,5 @@
# open-slash.m4 serial 1
-dnl Copyright (C) 2007-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/open.m4 b/gnulib/import/m4/open.m4
index 6cf0beb..552eedf 100644
--- a/gnulib/import/m4/open.m4
+++ b/gnulib/import/m4/open.m4
@@ -1,5 +1,5 @@
# open.m4 serial 15
-dnl Copyright (C) 2007-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/openat.m4 b/gnulib/import/m4/openat.m4
index 005a2b4..cf9f717 100644
--- a/gnulib/import/m4/openat.m4
+++ b/gnulib/import/m4/openat.m4
@@ -1,7 +1,7 @@
# serial 46
# See if we need to use our replacement for Solaris' openat et al functions.
-dnl Copyright (C) 2004-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2004-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/opendir.m4 b/gnulib/import/m4/opendir.m4
index 8f0d804..fd3c1ec 100644
--- a/gnulib/import/m4/opendir.m4
+++ b/gnulib/import/m4/opendir.m4
@@ -1,5 +1,5 @@
# opendir.m4 serial 5
-dnl Copyright (C) 2011-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/pathmax.m4 b/gnulib/import/m4/pathmax.m4
index 0770aca..bb4fdeb 100644
--- a/gnulib/import/m4/pathmax.m4
+++ b/gnulib/import/m4/pathmax.m4
@@ -1,5 +1,5 @@
# pathmax.m4 serial 11
-dnl Copyright (C) 2002-2003, 2005-2006, 2009-2019 Free Software Foundation,
+dnl Copyright (C) 2002-2003, 2005-2006, 2009-2020 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/gnulib/import/m4/pthread_rwlock_rdlock.m4 b/gnulib/import/m4/pthread_rwlock_rdlock.m4
index 87886a3..049af50 100644
--- a/gnulib/import/m4/pthread_rwlock_rdlock.m4
+++ b/gnulib/import/m4/pthread_rwlock_rdlock.m4
@@ -1,5 +1,5 @@
# pthread_rwlock_rdlock.m4 serial 4
-dnl Copyright (C) 2017-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2017-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/rawmemchr.m4 b/gnulib/import/m4/rawmemchr.m4
index 03a8804..c5bf041 100644
--- a/gnulib/import/m4/rawmemchr.m4
+++ b/gnulib/import/m4/rawmemchr.m4
@@ -1,5 +1,5 @@
# rawmemchr.m4 serial 2
-dnl Copyright (C) 2003, 2007-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2007-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/readdir.m4 b/gnulib/import/m4/readdir.m4
index d09cb9f..ca4e741 100644
--- a/gnulib/import/m4/readdir.m4
+++ b/gnulib/import/m4/readdir.m4
@@ -1,5 +1,5 @@
# readdir.m4 serial 1
-dnl Copyright (C) 2011-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/readlink.m4 b/gnulib/import/m4/readlink.m4
index 7aa6ce0..9aa9e46 100644
--- a/gnulib/import/m4/readlink.m4
+++ b/gnulib/import/m4/readlink.m4
@@ -1,5 +1,5 @@
# readlink.m4 serial 15
-dnl Copyright (C) 2003, 2007, 2009-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2007, 2009-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/realloc.m4 b/gnulib/import/m4/realloc.m4
index 05e7243..85b8f87 100644
--- a/gnulib/import/m4/realloc.m4
+++ b/gnulib/import/m4/realloc.m4
@@ -1,5 +1,5 @@
# realloc.m4 serial 18
-dnl Copyright (C) 2007, 2009-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/rename.m4 b/gnulib/import/m4/rename.m4
index b453666..a1bd705 100644
--- a/gnulib/import/m4/rename.m4
+++ b/gnulib/import/m4/rename.m4
@@ -1,6 +1,6 @@
# serial 32
-# Copyright (C) 2001, 2003, 2005-2006, 2009-2019 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2005-2006, 2009-2020 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/rewinddir.m4 b/gnulib/import/m4/rewinddir.m4
index c14224c..51f476b 100644
--- a/gnulib/import/m4/rewinddir.m4
+++ b/gnulib/import/m4/rewinddir.m4
@@ -1,5 +1,5 @@
# rewinddir.m4 serial 1
-dnl Copyright (C) 2011-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/rmdir.m4 b/gnulib/import/m4/rmdir.m4
index bc01778..ad1b192 100644
--- a/gnulib/import/m4/rmdir.m4
+++ b/gnulib/import/m4/rmdir.m4
@@ -1,5 +1,5 @@
# rmdir.m4 serial 17
-dnl Copyright (C) 2002, 2005, 2009-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2005, 2009-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/save-cwd.m4 b/gnulib/import/m4/save-cwd.m4
index 816fd70..a401b1f 100644
--- a/gnulib/import/m4/save-cwd.m4
+++ b/gnulib/import/m4/save-cwd.m4
@@ -1,5 +1,5 @@
# serial 10
-dnl Copyright (C) 2002-2006, 2009-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2009-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/setenv.m4 b/gnulib/import/m4/setenv.m4
index 6755459..ef03673 100644
--- a/gnulib/import/m4/setenv.m4
+++ b/gnulib/import/m4/setenv.m4
@@ -1,5 +1,5 @@
# setenv.m4 serial 29
-dnl Copyright (C) 2001-2004, 2006-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2004, 2006-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/setlocale_null.m4 b/gnulib/import/m4/setlocale_null.m4
new file mode 100644
index 0000000..c1ee1f7
--- /dev/null
+++ b/gnulib/import/m4/setlocale_null.m4
@@ -0,0 +1,98 @@
+# setlocale_null.m4 serial 2
+dnl Copyright (C) 2019-2020 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_SETLOCALE_NULL],
+[
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([gl_PTHREADLIB])
+ AC_CHECK_HEADERS_ONCE([threads.h])
+
+ AC_CACHE_CHECK([whether setlocale (LC_ALL, NULL) is multithread-safe],
+ [gl_cv_func_setlocale_null_all_mtsafe],
+ [case "$host_os" in
+ # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin.
+ *-musl* | darwin* | freebsd* | netbsd* | openbsd* | aix* | haiku* | cygwin*)
+ gl_cv_func_setlocale_null_all_mtsafe=no ;;
+ # Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows.
+ *-gnu* | gnu* | hpux* | irix* | solaris* | mingw*)
+ gl_cv_func_setlocale_null_all_mtsafe=yes ;;
+ # If we don't know, obey --enable-cross-guesses.
+ *)
+ gl_cv_func_setlocale_null_all_mtsafe="$gl_cross_guess_normal" ;;
+ esac
+ ])
+ dnl On platforms without multithreading, there is no issue.
+ case "$host_os" in
+ mingw*) ;;
+ *)
+ if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
+ gl_cv_func_setlocale_null_all_mtsafe="trivially yes"
+ fi
+ ;;
+ esac
+ case "$gl_cv_func_setlocale_null_all_mtsafe" in
+ *yes) SETLOCALE_NULL_ALL_MTSAFE=1 ;;
+ *) SETLOCALE_NULL_ALL_MTSAFE=0 ;;
+ esac
+ AC_DEFINE_UNQUOTED([SETLOCALE_NULL_ALL_MTSAFE], [$SETLOCALE_NULL_ALL_MTSAFE],
+ [Define to 1 if setlocale (LC_ALL, NULL) is multithread-safe.])
+
+ dnl This is about a single category (not LC_ALL).
+ AC_CACHE_CHECK([whether setlocale (category, NULL) is multithread-safe],
+ [gl_cv_func_setlocale_null_one_mtsafe],
+ [case "$host_os" in
+ # Guess no on OpenBSD, AIX.
+ openbsd* | aix*)
+ gl_cv_func_setlocale_null_one_mtsafe=no ;;
+ # Guess yes on glibc, musl libc, macOS, FreeBSD, NetBSD, HP-UX, IRIX, Solaris, Haiku, Cygwin, native Windows.
+ *-gnu* | gnu* | *-musl* | darwin* | freebsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*)
+ gl_cv_func_setlocale_null_one_mtsafe=yes ;;
+ # If we don't know, obey --enable-cross-guesses.
+ *)
+ gl_cv_func_setlocale_null_one_mtsafe="$gl_cross_guess_normal" ;;
+ esac
+ ])
+ dnl On platforms without multithreading, there is no issue.
+ case "$host_os" in
+ mingw*) ;;
+ *)
+ if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
+ gl_cv_func_setlocale_null_one_mtsafe="trivially yes"
+ fi
+ ;;
+ esac
+ case "$gl_cv_func_setlocale_null_one_mtsafe" in
+ *yes) SETLOCALE_NULL_ONE_MTSAFE=1 ;;
+ *) SETLOCALE_NULL_ONE_MTSAFE=0 ;;
+ esac
+ AC_DEFINE_UNQUOTED([SETLOCALE_NULL_ONE_MTSAFE], [$SETLOCALE_NULL_ONE_MTSAFE],
+ [Define to 1 if setlocale (category, NULL) is multithread-safe.])
+
+ dnl Determine link dependencies of lib/setlocale_null.c and lib/setlocale-lock.c.
+ if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
+ case "$host_os" in
+ mingw*) LIB_SETLOCALE_NULL= ;;
+ *)
+ gl_WEAK_SYMBOLS
+ case "$gl_cv_have_weak" in
+ *yes) LIB_SETLOCALE_NULL= ;;
+ *) LIB_SETLOCALE_NULL="$LIBPTHREAD" ;;
+ esac
+ ;;
+ esac
+ else
+ LIB_SETLOCALE_NULL=
+ fi
+ dnl LIB_SETLOCALE_NULL is expected to be '-pthread' or '-lpthread' on AIX
+ dnl with gcc or xlc, and empty otherwise.
+ AC_SUBST([LIB_SETLOCALE_NULL])
+])
+
+# Prerequisites of lib/setlocale-lock.c.
+AC_DEFUN([gl_PREREQ_SETLOCALE_LOCK],
+[
+ gl_VISIBILITY
+])
diff --git a/gnulib/import/m4/signal_h.m4 b/gnulib/import/m4/signal_h.m4
index 3acec64..0868438 100644
--- a/gnulib/import/m4/signal_h.m4
+++ b/gnulib/import/m4/signal_h.m4
@@ -1,5 +1,5 @@
# signal_h.m4 serial 18
-dnl Copyright (C) 2007-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/socklen.m4 b/gnulib/import/m4/socklen.m4
index deb5135..251960b 100644
--- a/gnulib/import/m4/socklen.m4
+++ b/gnulib/import/m4/socklen.m4
@@ -1,5 +1,5 @@
# socklen.m4 serial 11
-dnl Copyright (C) 2005-2007, 2009-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2007, 2009-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/sockpfaf.m4 b/gnulib/import/m4/sockpfaf.m4
index 7b32982..495a355 100644
--- a/gnulib/import/m4/sockpfaf.m4
+++ b/gnulib/import/m4/sockpfaf.m4
@@ -1,5 +1,5 @@
# sockpfaf.m4 serial 9
-dnl Copyright (C) 2004, 2006, 2009-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2004, 2006, 2009-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/ssize_t.m4 b/gnulib/import/m4/ssize_t.m4
index 38bcee1..6c0a588 100644
--- a/gnulib/import/m4/ssize_t.m4
+++ b/gnulib/import/m4/ssize_t.m4
@@ -1,5 +1,5 @@
# ssize_t.m4 serial 5 (gettext-0.18.2)
-dnl Copyright (C) 2001-2003, 2006, 2010-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2003, 2006, 2010-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/stat-time.m4 b/gnulib/import/m4/stat-time.m4
index 1685788..0ac3f72 100644
--- a/gnulib/import/m4/stat-time.m4
+++ b/gnulib/import/m4/stat-time.m4
@@ -1,6 +1,6 @@
# Checks for stat-related time functions.
-# Copyright (C) 1998-1999, 2001, 2003, 2005-2007, 2009-2019 Free Software
+# Copyright (C) 1998-1999, 2001, 2003, 2005-2007, 2009-2020 Free Software
# Foundation, Inc.
# This file is free software; the Free Software Foundation
diff --git a/gnulib/import/m4/stat.m4 b/gnulib/import/m4/stat.m4
index 752661f..46e9abc 100644
--- a/gnulib/import/m4/stat.m4
+++ b/gnulib/import/m4/stat.m4
@@ -1,6 +1,6 @@
# serial 16
-# Copyright (C) 2009-2019 Free Software Foundation, Inc.
+# Copyright (C) 2009-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
diff --git a/gnulib/import/m4/std-gnu11.m4 b/gnulib/import/m4/std-gnu11.m4
index 23e7f75..c1ec624 100644
--- a/gnulib/import/m4/std-gnu11.m4
+++ b/gnulib/import/m4/std-gnu11.m4
@@ -7,7 +7,7 @@
# or later is installed everywhere a Gnulib program might be developed.
-# Copyright (C) 2001-2019 Free Software Foundation, Inc.
+# Copyright (C) 2001-2020 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/m4/stdalign.m4 b/gnulib/import/m4/stdalign.m4
index 601fd21..dcf778e 100644
--- a/gnulib/import/m4/stdalign.m4
+++ b/gnulib/import/m4/stdalign.m4
@@ -1,6 +1,6 @@
# Check for stdalign.h that conforms to C11.
-dnl Copyright 2011-2019 Free Software Foundation, Inc.
+dnl Copyright 2011-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/stdbool.m4 b/gnulib/import/m4/stdbool.m4
index b470b05..6bb087e 100644
--- a/gnulib/import/m4/stdbool.m4
+++ b/gnulib/import/m4/stdbool.m4
@@ -1,6 +1,6 @@
# Check for stdbool.h that conforms to C99.
-dnl Copyright (C) 2002-2006, 2009-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2009-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/stddef_h.m4 b/gnulib/import/m4/stddef_h.m4
index 979e3cf..6bcfadb 100644
--- a/gnulib/import/m4/stddef_h.m4
+++ b/gnulib/import/m4/stddef_h.m4
@@ -1,6 +1,6 @@
dnl A placeholder for <stddef.h>, for platforms that have issues.
# stddef_h.m4 serial 6
-dnl Copyright (C) 2009-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/stdint.m4 b/gnulib/import/m4/stdint.m4
index 11d8e8e..29ad826 100644
--- a/gnulib/import/m4/stdint.m4
+++ b/gnulib/import/m4/stdint.m4
@@ -1,5 +1,5 @@
-# stdint.m4 serial 53
-dnl Copyright (C) 2001-2019 Free Software Foundation, Inc.
+# stdint.m4 serial 54
+dnl Copyright (C) 2001-2020 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,21 +17,12 @@ AC_DEFUN_ONCE([gl_STDINT_H],
AC_REQUIRE([gl_LIMITS_H])
AC_REQUIRE([gt_TYPE_WINT_T])
- dnl Check for long long int and unsigned long long int.
- AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
- if test $ac_cv_type_long_long_int = yes; then
- HAVE_LONG_LONG_INT=1
- else
- HAVE_LONG_LONG_INT=0
- fi
- AC_SUBST([HAVE_LONG_LONG_INT])
- AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT])
- if test $ac_cv_type_unsigned_long_long_int = yes; then
- HAVE_UNSIGNED_LONG_LONG_INT=1
- else
- HAVE_UNSIGNED_LONG_LONG_INT=0
- fi
- AC_SUBST([HAVE_UNSIGNED_LONG_LONG_INT])
+ dnl For backward compatibility. Some packages may still be testing these
+ dnl macros.
+ AC_DEFINE([HAVE_LONG_LONG_INT], [1],
+ [Define to 1 if the system has the type 'long long int'.])
+ AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], [1],
+ [Define to 1 if the system has the type 'unsigned long long int'.])
dnl Check for <wchar.h>, in the same way as gl_WCHAR_H does.
AC_CHECK_HEADERS_ONCE([wchar.h])
diff --git a/gnulib/import/m4/stdio_h.m4 b/gnulib/import/m4/stdio_h.m4
index 6c9c104..c603b51 100644
--- a/gnulib/import/m4/stdio_h.m4
+++ b/gnulib/import/m4/stdio_h.m4
@@ -1,5 +1,5 @@
# stdio_h.m4 serial 49
-dnl Copyright (C) 2007-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/stdlib_h.m4 b/gnulib/import/m4/stdlib_h.m4
index 6121602..61a3e31 100644
--- a/gnulib/import/m4/stdlib_h.m4
+++ b/gnulib/import/m4/stdlib_h.m4
@@ -1,5 +1,5 @@
# stdlib_h.m4 serial 48
-dnl Copyright (C) 2007-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/strchrnul.m4 b/gnulib/import/m4/strchrnul.m4
index 93cf112..a18f093 100644
--- a/gnulib/import/m4/strchrnul.m4
+++ b/gnulib/import/m4/strchrnul.m4
@@ -1,5 +1,5 @@
# strchrnul.m4 serial 9
-dnl Copyright (C) 2003, 2007, 2009-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2007, 2009-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/strdup.m4 b/gnulib/import/m4/strdup.m4
index 82d7420..2d1fcc4 100644
--- a/gnulib/import/m4/strdup.m4
+++ b/gnulib/import/m4/strdup.m4
@@ -1,6 +1,6 @@
# strdup.m4 serial 13
-dnl Copyright (C) 2002-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/gnulib/import/m4/strerror.m4 b/gnulib/import/m4/strerror.m4
index fbfb4e1..fd84ce8 100644
--- a/gnulib/import/m4/strerror.m4
+++ b/gnulib/import/m4/strerror.m4
@@ -1,5 +1,5 @@
# strerror.m4 serial 21
-dnl Copyright (C) 2002, 2007-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2007-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/strerror_r.m4 b/gnulib/import/m4/strerror_r.m4
index 9907113..d431f23 100644
--- a/gnulib/import/m4/strerror_r.m4
+++ b/gnulib/import/m4/strerror_r.m4
@@ -1,5 +1,5 @@
# strerror_r.m4 serial 20
-dnl Copyright (C) 2002, 2007-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2007-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/string_h.m4 b/gnulib/import/m4/string_h.m4
index 0c0e3a7..4c1f685 100644
--- a/gnulib/import/m4/string_h.m4
+++ b/gnulib/import/m4/string_h.m4
@@ -1,6 +1,6 @@
# Configure a GNU-like replacement for <string.h>.
-# Copyright (C) 2007-2019 Free Software Foundation, Inc.
+# Copyright (C) 2007-2020 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/strstr.m4 b/gnulib/import/m4/strstr.m4
index 2363514..a2ec337 100644
--- a/gnulib/import/m4/strstr.m4
+++ b/gnulib/import/m4/strstr.m4
@@ -1,5 +1,5 @@
# strstr.m4 serial 21
-dnl Copyright (C) 2008-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/strtok_r.m4 b/gnulib/import/m4/strtok_r.m4
index e80daae..2da132c 100644
--- a/gnulib/import/m4/strtok_r.m4
+++ b/gnulib/import/m4/strtok_r.m4
@@ -1,5 +1,5 @@
# strtok_r.m4 serial 15
-dnl Copyright (C) 2002-2004, 2006-2007, 2009-2019 Free Software Foundation,
+dnl Copyright (C) 2002-2004, 2006-2007, 2009-2020 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/gnulib/import/m4/sys_socket_h.m4 b/gnulib/import/m4/sys_socket_h.m4
index d0a9020..1471aea 100644
--- a/gnulib/import/m4/sys_socket_h.m4
+++ b/gnulib/import/m4/sys_socket_h.m4
@@ -1,5 +1,5 @@
# sys_socket_h.m4 serial 24
-dnl Copyright (C) 2005-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/sys_stat_h.m4 b/gnulib/import/m4/sys_stat_h.m4
index 361ac3f..a5f35d4 100644
--- a/gnulib/import/m4/sys_stat_h.m4
+++ b/gnulib/import/m4/sys_stat_h.m4
@@ -1,5 +1,5 @@
-# sys_stat_h.m4 serial 31 -*- Autoconf -*-
-dnl Copyright (C) 2006-2019 Free Software Foundation, Inc.
+# sys_stat_h.m4 serial 32 -*- Autoconf -*-
+dnl Copyright (C) 2006-2020 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.
@@ -88,9 +88,11 @@ AC_DEFUN([gl_SYS_STAT_H_DEFAULTS],
HAVE_MKNOD=1; AC_SUBST([HAVE_MKNOD])
HAVE_MKNODAT=1; AC_SUBST([HAVE_MKNODAT])
HAVE_UTIMENSAT=1; AC_SUBST([HAVE_UTIMENSAT])
+ REPLACE_FCHMODAT=0; AC_SUBST([REPLACE_FCHMODAT])
REPLACE_FSTAT=0; AC_SUBST([REPLACE_FSTAT])
REPLACE_FSTATAT=0; AC_SUBST([REPLACE_FSTATAT])
REPLACE_FUTIMENS=0; AC_SUBST([REPLACE_FUTIMENS])
+ REPLACE_LCHMOD=0; AC_SUBST([REPLACE_LCHMOD])
REPLACE_LSTAT=0; AC_SUBST([REPLACE_LSTAT])
REPLACE_MKDIR=0; AC_SUBST([REPLACE_MKDIR])
REPLACE_MKFIFO=0; AC_SUBST([REPLACE_MKFIFO])
diff --git a/gnulib/import/m4/sys_time_h.m4 b/gnulib/import/m4/sys_time_h.m4
index 3d9233a..8fc8599 100644
--- a/gnulib/import/m4/sys_time_h.m4
+++ b/gnulib/import/m4/sys_time_h.m4
@@ -1,7 +1,7 @@
# Configure a replacement for <sys/time.h>.
# serial 9
-# Copyright (C) 2007, 2009-2019 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2009-2020 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/sys_types_h.m4 b/gnulib/import/m4/sys_types_h.m4
index be06559..be918dc 100644
--- a/gnulib/import/m4/sys_types_h.m4
+++ b/gnulib/import/m4/sys_types_h.m4
@@ -1,5 +1,5 @@
# sys_types_h.m4 serial 9
-dnl Copyright (C) 2011-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/sys_uio_h.m4 b/gnulib/import/m4/sys_uio_h.m4
index 8b8ba6d..a255dea 100644
--- a/gnulib/import/m4/sys_uio_h.m4
+++ b/gnulib/import/m4/sys_uio_h.m4
@@ -1,5 +1,5 @@
# sys_uio_h.m4 serial 1
-dnl Copyright (C) 2011-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/tempname.m4 b/gnulib/import/m4/tempname.m4
index 664a632..da439f0 100644
--- a/gnulib/import/m4/tempname.m4
+++ b/gnulib/import/m4/tempname.m4
@@ -1,6 +1,6 @@
#serial 5
-# Copyright (C) 2006-2007, 2009-2019 Free Software Foundation, Inc.
+# Copyright (C) 2006-2007, 2009-2020 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/threadlib.m4 b/gnulib/import/m4/threadlib.m4
index 96c74c1..94441f6 100644
--- a/gnulib/import/m4/threadlib.m4
+++ b/gnulib/import/m4/threadlib.m4
@@ -1,5 +1,5 @@
-# threadlib.m4 serial 24
-dnl Copyright (C) 2005-2019 Free Software Foundation, Inc.
+# threadlib.m4 serial 27
+dnl Copyright (C) 2005-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -8,46 +8,48 @@ dnl From Bruno Haible.
AC_PREREQ([2.60])
-dnl gl_PTHREADLIB
-dnl -------------
-dnl Tests for the libraries needs for using the POSIX threads API.
-dnl Sets the variable LIBPTHREAD to the linker options for use in a Makefile.
-dnl Sets the variable LIBPMULTITHREAD, for programs that really need
-dnl multithread functionality. The difference between LIBPTHREAD and
-dnl LIBPMULTITHREAD is that on platforms supporting weak symbols, typically
-dnl LIBPTHREAD is empty whereas LIBPMULTITHREAD is not.
-dnl Adds to CPPFLAGS the flag -D_REENTRANT or -D_THREAD_SAFE if needed for
-dnl multithread-safe programs.
-dnl Defines the C macro HAVE_PTHREAD_API if (at least parts of) the POSIX
-dnl threads API is available.
+dnl The general structure of the multithreading modules in gnulib is that we
+dnl have three set of modules:
+dnl
+dnl * POSIX API:
+dnl pthread, which combines
+dnl pthread-h
+dnl pthread-thread
+dnl pthread-once
+dnl pthread-mutex
+dnl pthread-rwlock
+dnl pthread-cond
+dnl pthread-tss
+dnl pthread-spin
+dnl sched_yield
+dnl
+dnl * ISO C API:
+dnl threads, which combines
+dnl threads-h
+dnl thrd
+dnl mtx
+dnl cnd
+dnl tss
+dnl
+dnl * Gnulib API, with an implementation that can be chosen at configure
+dnl time through the option --enable-threads=...
+dnl thread
+dnl lock
+dnl cond
+dnl tls
+dnl yield
+dnl
+dnl They are independent, except for the fact that
+dnl - the implementation of the ISO C API may use the POSIX (or some other
+dnl platform dependent) API,
+dnl - the implementation of the Gnulib API may use the POSIX or ISO C or
+dnl some other platform dependent API, depending on the --enable-threads
+dnl option.
+dnl
+dnl This file contains macros for all of these APIs!
-dnl gl_THREADLIB
-dnl ------------
-dnl Tests for a multithreading library to be used.
-dnl If the configure.ac contains a definition of the gl_THREADLIB_DEFAULT_NO
-dnl (it must be placed before the invocation of gl_THREADLIB_EARLY!), then the
-dnl default is 'no', otherwise it is system dependent. In both cases, the user
-dnl can change the choice through the options --enable-threads=choice or
-dnl --disable-threads.
-dnl Defines at most one of the macros USE_ISOC_THREADS, USE_POSIX_THREADS,
-dnl USE_ISOC_AND_POSIX_THREADS, USE_WINDOWS_THREADS.
-dnl The choice --enable-threads=isoc+posix is available only on platforms that
-dnl have both the ISO C and the POSIX threads APIs. It has the effect of using
-dnl the ISO C API for most things and the POSIX API only for creating and
-dnl controlling threads (because there is no equivalent to pthread_atfork in
-dnl the ISO C API).
-dnl Sets the variables LIBTHREAD and LTLIBTHREAD to the linker options for use
-dnl in a Makefile (LIBTHREAD for use without libtool, LTLIBTHREAD for use with
-dnl libtool).
-dnl Sets the variables LIBMULTITHREAD and LTLIBMULTITHREAD similarly, for
-dnl programs that really need multithread functionality. The difference
-dnl between LIBTHREAD and LIBMULTITHREAD is that on platforms supporting weak
-dnl symbols, typically LIBTHREAD is empty whereas LIBMULTITHREAD is not.
-dnl Adds to CPPFLAGS the flag -D_REENTRANT or -D_THREAD_SAFE if needed for
-dnl multithread-safe programs.
-dnl Since support for GNU pth was removed, $LTLIBTHREAD and $LIBTHREAD have the
-dnl same value, and similarly $LTLIBMULTITHREAD and $LIBMULTITHREAD have the
-dnl same value. Only system libraries are needed.
+dnl ============================================================================
+dnl Macros for all thread APIs
AC_DEFUN([gl_ANYTHREADLIB_EARLY],
[
@@ -75,77 +77,11 @@ AC_DEFUN([gl_ANYTHREADLIB_EARLY],
fi
])
-AC_DEFUN([gl_THREADLIB_EARLY],
-[
- AC_REQUIRE([gl_THREADLIB_EARLY_BODY])
-])
-
-dnl The guts of gl_THREADLIB_EARLY. Needs to be expanded only once.
-
-AC_DEFUN([gl_THREADLIB_EARLY_BODY],
-[
- dnl Ordering constraints: This macro modifies CPPFLAGS in a way that
- dnl influences the result of the autoconf tests that test for *_unlocked
- dnl declarations, on AIX 5 at least. Therefore it must come early.
- AC_BEFORE([$0], [gl_FUNC_GLIBC_UNLOCKED_IO])dnl
- AC_BEFORE([$0], [gl_ARGP])dnl
-
- AC_REQUIRE([AC_CANONICAL_HOST])
- dnl _GNU_SOURCE is needed for pthread_rwlock_t on glibc systems.
- AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
- dnl Check for multithreading.
- m4_ifdef([gl_THREADLIB_DEFAULT_NO],
- [m4_divert_text([DEFAULTS], [gl_use_threads_default=no])],
- [m4_divert_text([DEFAULTS], [gl_use_threads_default=])])
- m4_divert_text([DEFAULTS], [gl_use_winpthreads_default=])
- AC_ARG_ENABLE([threads],
-AC_HELP_STRING([--enable-threads={isoc|posix|isoc+posix|windows}], [specify multithreading API])m4_ifdef([gl_THREADLIB_DEFAULT_NO], [], [
-AC_HELP_STRING([--disable-threads], [build without multithread safety])]),
- [gl_use_threads=$enableval],
- [if test -n "$gl_use_threads_default"; then
- gl_use_threads="$gl_use_threads_default"
- else
-changequote(,)dnl
- case "$host_os" in
- dnl Disable multithreading by default on OSF/1, because it interferes
- dnl with fork()/exec(): When msgexec is linked with -lpthread, its
- dnl child process gets an endless segmentation fault inside execvp().
- osf*) gl_use_threads=no ;;
- dnl Disable multithreading by default on Cygwin 1.5.x, because it has
- dnl bugs that lead to endless loops or crashes. See
- dnl <https://cygwin.com/ml/cygwin/2009-08/msg00283.html>.
- cygwin*)
- case `uname -r` in
- 1.[0-5].*) gl_use_threads=no ;;
- *) gl_use_threads=yes ;;
- esac
- ;;
- dnl Obey gl_AVOID_WINPTHREAD on mingw.
- mingw*)
- case "$gl_use_winpthreads_default" in
- yes) gl_use_threads=posix ;;
- no) gl_use_threads=windows ;;
- *) gl_use_threads=yes ;;
- esac
- ;;
- *) gl_use_threads=yes ;;
- esac
-changequote([,])dnl
- fi
- ])
- if test "$gl_use_threads" = yes \
- || test "$gl_use_threads" = isoc \
- || test "$gl_use_threads" = posix \
- || test "$gl_use_threads" = isoc+posix; then
- # For using <threads.h> or <pthread.h>:
- gl_ANYTHREADLIB_EARLY
- fi
-])
-
dnl Checks whether the compiler and linker support weak declarations of symbols.
AC_DEFUN([gl_WEAK_SYMBOLS],
[
+ AC_REQUIRE([AC_CANONICAL_HOST])
AC_CACHE_CHECK([whether imported symbols can be declared weak],
[gl_cv_have_weak],
[gl_cv_have_weak=no
@@ -184,6 +120,30 @@ int main ()
case " $LDFLAGS " in
*" -static "*) gl_cv_have_weak=no ;;
esac
+ dnl Test for a bug in FreeBSD 11: A link error occurs when using a weak
+ dnl symbol and linking against a shared library that has a dependency on
+ dnl the shared library that defines the symbol.
+ case "$gl_cv_have_weak" in
+ *yes)
+ case "$host_os" in
+ freebsd* | dragonfly*)
+ : > conftest1.c
+ $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&AS_MESSAGE_LOG_FD 2>&1
+ cat <<EOF > conftest2.c
+#include <pthread.h>
+#pragma weak pthread_mutexattr_gettype
+int main ()
+{
+ return (pthread_mutexattr_gettype != NULL);
+}
+EOF
+ $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&AS_MESSAGE_LOG_FD 2>&1 \
+ || gl_cv_have_weak=no
+ rm -f conftest1.c libempty.so conftest2.c conftest
+ ;;
+ esac
+ ;;
+ esac
])
case "$gl_cv_have_weak" in
*yes)
@@ -193,12 +153,30 @@ int main ()
esac
])
+dnl ============================================================================
+dnl Macros for the POSIX API
+
+dnl gl_PTHREADLIB
+dnl -------------
+dnl Tests for the libraries needs for using the POSIX threads API.
+dnl Sets the variable LIBPTHREAD to the linker options for use in a Makefile.
+dnl Sets the variable LIBPMULTITHREAD, for programs that really need
+dnl multithread functionality. The difference between LIBPTHREAD and
+dnl LIBPMULTITHREAD is that on platforms supporting weak symbols, typically
+dnl LIBPTHREAD is empty whereas LIBPMULTITHREAD is not.
+dnl Sets the variable LIB_SCHED_YIELD to the linker options needed to use the
+dnl sched_yield() function.
+dnl Adds to CPPFLAGS the flag -D_REENTRANT or -D_THREAD_SAFE if needed for
+dnl multithread-safe programs.
+dnl Defines the C macro HAVE_PTHREAD_API if (at least parts of) the POSIX
+dnl threads API is available.
+
dnl The guts of gl_PTHREADLIB. Needs to be expanded only once.
AC_DEFUN([gl_PTHREADLIB_BODY],
[
AC_REQUIRE([gl_ANYTHREADLIB_EARLY])
- if test -z "$gl_threadlib_body_done"; then
+ if test -z "$gl_pthreadlib_body_done"; then
gl_pthread_api=no
LIBPTHREAD=
LIBPMULTITHREAD=
@@ -277,7 +255,189 @@ AC_DEFUN([gl_PTHREADLIB_BODY],
AC_DEFINE([HAVE_PTHREAD_API], [1],
[Define if you have the <pthread.h> header and the POSIX threads API.])
fi
- gl_threadlib_body_done=done
+
+ dnl On some systems, sched_yield is in librt, rather than in libpthread.
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <sched.h>]],
+ [[sched_yield ();]])],
+ [LIB_SCHED_YIELD=
+ ],
+ [dnl Solaris 7...10 has sched_yield in librt, not in libpthread or libc.
+ AC_CHECK_LIB([rt], [sched_yield], [LIB_SCHED_YIELD=-lrt],
+ [dnl Solaris 2.5.1, 2.6 has sched_yield in libposix4, not librt.
+ AC_CHECK_LIB([posix4], [sched_yield], [LIB_SCHED_YIELD=-lposix4])])
+ ])
+ AC_SUBST([LIB_SCHED_YIELD])
+
+ gl_pthreadlib_body_done=done
+ fi
+])
+
+AC_DEFUN([gl_PTHREADLIB],
+[
+ AC_REQUIRE([gl_ANYTHREADLIB_EARLY])
+ gl_PTHREADLIB_BODY
+])
+
+dnl ============================================================================
+dnl Macros for the ISO C API
+
+dnl gl_STDTHREADLIB
+dnl ---------------
+dnl Tests for the libraries needs for using the ISO C threads API.
+dnl Sets the variable LIBSTDTHREAD to the linker options for use in a Makefile.
+dnl Adds to CPPFLAGS the flag -D_REENTRANT or -D_THREAD_SAFE if needed for
+dnl multithread-safe programs.
+dnl Defines the C macro HAVE_THREADS_H if (at least parts of) the ISO C threads
+dnl API is available.
+
+dnl The guts of gl_STDTHREADLIB. Needs to be expanded only once.
+
+AC_DEFUN([gl_STDTHREADLIB_BODY],
+[
+ AC_REQUIRE([gl_ANYTHREADLIB_EARLY])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ if test -z "$gl_stdthreadlib_body_done"; then
+ AC_CHECK_HEADERS_ONCE([threads.h])
+
+ case "$host_os" in
+ mingw*)
+ LIBSTDTHREAD=
+ ;;
+ *)
+ gl_PTHREADLIB_BODY
+ if test $ac_cv_header_threads_h = yes; then
+ dnl glibc >= 2.29 has thrd_create in libpthread.
+ dnl FreeBSD >= 10 has thrd_create in libstdthreads; this library depends
+ dnl on libpthread (for the symbol 'pthread_mutexattr_gettype').
+ dnl AIX >= 7.1 and Solaris >= 11.4 have thrd_create in libc.
+ AC_CHECK_FUNCS([thrd_create])
+ if test $ac_cv_func_thrd_create = yes; then
+ LIBSTDTHREAD=
+ else
+ AC_CHECK_LIB([stdthreads], [thrd_create], [
+ LIBSTDTHREAD='-lstdthreads -lpthread'
+ ], [
+ dnl Guess that thrd_create is in libpthread.
+ LIBSTDTHREAD="$LIBPMULTITHREAD"
+ ])
+ fi
+ else
+ dnl Libraries needed by thrd.c, mtx.c, cnd.c, tss.c.
+ LIBSTDTHREAD="$LIBPMULTITHREAD $LIB_SCHED_YIELD"
+ fi
+ ;;
+ esac
+ AC_SUBST([LIBSTDTHREAD])
+
+ AC_MSG_CHECKING([whether ISO C threads API is available])
+ AC_MSG_RESULT([$ac_cv_header_threads_h])
+ gl_stdthreadlib_body_done=done
+ fi
+])
+
+AC_DEFUN([gl_STDTHREADLIB],
+[
+ AC_REQUIRE([gl_ANYTHREADLIB_EARLY])
+ gl_STDTHREADLIB_BODY
+])
+
+dnl ============================================================================
+dnl Macros for the Gnulib API
+
+dnl gl_THREADLIB
+dnl ------------
+dnl Tests for a multithreading library to be used.
+dnl If the configure.ac contains a definition of the gl_THREADLIB_DEFAULT_NO
+dnl (it must be placed before the invocation of gl_THREADLIB_EARLY!), then the
+dnl default is 'no', otherwise it is system dependent. In both cases, the user
+dnl can change the choice through the options --enable-threads=choice or
+dnl --disable-threads.
+dnl Defines at most one of the macros USE_ISOC_THREADS, USE_POSIX_THREADS,
+dnl USE_ISOC_AND_POSIX_THREADS, USE_WINDOWS_THREADS.
+dnl The choice --enable-threads=isoc+posix is available only on platforms that
+dnl have both the ISO C and the POSIX threads APIs. It has the effect of using
+dnl the ISO C API for most things and the POSIX API only for creating and
+dnl controlling threads (because there is no equivalent to pthread_atfork in
+dnl the ISO C API).
+dnl Sets the variables LIBTHREAD and LTLIBTHREAD to the linker options for use
+dnl in a Makefile (LIBTHREAD for use without libtool, LTLIBTHREAD for use with
+dnl libtool).
+dnl Sets the variables LIBMULTITHREAD and LTLIBMULTITHREAD similarly, for
+dnl programs that really need multithread functionality. The difference
+dnl between LIBTHREAD and LIBMULTITHREAD is that on platforms supporting weak
+dnl symbols, typically LIBTHREAD is empty whereas LIBMULTITHREAD is not.
+dnl Adds to CPPFLAGS the flag -D_REENTRANT or -D_THREAD_SAFE if needed for
+dnl multithread-safe programs.
+dnl Since support for GNU pth was removed, $LTLIBTHREAD and $LIBTHREAD have the
+dnl same value, and similarly $LTLIBMULTITHREAD and $LIBMULTITHREAD have the
+dnl same value. Only system libraries are needed.
+
+AC_DEFUN([gl_THREADLIB_EARLY],
+[
+ AC_REQUIRE([gl_THREADLIB_EARLY_BODY])
+])
+
+dnl The guts of gl_THREADLIB_EARLY. Needs to be expanded only once.
+
+AC_DEFUN([gl_THREADLIB_EARLY_BODY],
+[
+ dnl Ordering constraints: This macro modifies CPPFLAGS in a way that
+ dnl influences the result of the autoconf tests that test for *_unlocked
+ dnl declarations, on AIX 5 at least. Therefore it must come early.
+ AC_BEFORE([$0], [gl_FUNC_GLIBC_UNLOCKED_IO])dnl
+ AC_BEFORE([$0], [gl_ARGP])dnl
+
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ dnl _GNU_SOURCE is needed for pthread_rwlock_t on glibc systems.
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+ dnl Check for multithreading.
+ m4_ifdef([gl_THREADLIB_DEFAULT_NO],
+ [m4_divert_text([DEFAULTS], [gl_use_threads_default=no])],
+ [m4_divert_text([DEFAULTS], [gl_use_threads_default=])])
+ m4_divert_text([DEFAULTS], [gl_use_winpthreads_default=])
+ AC_ARG_ENABLE([threads],
+AC_HELP_STRING([--enable-threads={isoc|posix|isoc+posix|windows}], [specify multithreading API])m4_ifdef([gl_THREADLIB_DEFAULT_NO], [], [
+AC_HELP_STRING([--disable-threads], [build without multithread safety])]),
+ [gl_use_threads=$enableval],
+ [if test -n "$gl_use_threads_default"; then
+ gl_use_threads="$gl_use_threads_default"
+ else
+changequote(,)dnl
+ case "$host_os" in
+ dnl Disable multithreading by default on OSF/1, because it interferes
+ dnl with fork()/exec(): When msgexec is linked with -lpthread, its
+ dnl child process gets an endless segmentation fault inside execvp().
+ osf*) gl_use_threads=no ;;
+ dnl Disable multithreading by default on Cygwin 1.5.x, because it has
+ dnl bugs that lead to endless loops or crashes. See
+ dnl <https://cygwin.com/ml/cygwin/2009-08/msg00283.html>.
+ cygwin*)
+ case `uname -r` in
+ 1.[0-5].*) gl_use_threads=no ;;
+ *) gl_use_threads=yes ;;
+ esac
+ ;;
+ dnl Obey gl_AVOID_WINPTHREAD on mingw.
+ mingw*)
+ case "$gl_use_winpthreads_default" in
+ yes) gl_use_threads=posix ;;
+ no) gl_use_threads=windows ;;
+ *) gl_use_threads=yes ;;
+ esac
+ ;;
+ *) gl_use_threads=yes ;;
+ esac
+changequote([,])dnl
+ fi
+ ])
+ if test "$gl_use_threads" = yes \
+ || test "$gl_use_threads" = isoc \
+ || test "$gl_use_threads" = posix \
+ || test "$gl_use_threads" = isoc+posix; then
+ # For using <threads.h> or <pthread.h>:
+ gl_ANYTHREADLIB_EARLY
fi
])
@@ -303,20 +463,7 @@ AC_DEFUN([gl_THREADLIB_BODY],
fi
if test "$gl_use_threads" = isoc || test "$gl_use_threads" = isoc+posix; then
AC_CHECK_HEADERS_ONCE([threads.h])
- if test $ac_cv_header_threads_h = yes; then
- gl_have_isoc_threads=
- # Test whether both mtx_lock and cnd_timedwait exist in libc.
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM(
- [[#include <threads.h>
- #include <stddef.h>
- mtx_t m;
- cnd_t c;
- ]],
- [[mtx_lock (&m);
- cnd_timedwait (&c, &m, NULL);]])],
- [gl_have_isoc_threads=yes])
- fi
+ gl_have_isoc_threads="$ac_cv_header_threads_h"
fi
if test "$gl_use_threads" = yes \
|| test "$gl_use_threads" = posix \
@@ -346,6 +493,9 @@ AC_DEFUN([gl_THREADLIB_BODY],
fi
if test $gl_threads_api = none; then
if test "$gl_use_threads" = isoc && test "$gl_have_isoc_threads" = yes; then
+ gl_STDTHREADLIB_BODY
+ LIBTHREAD=$LIBSTDTHREAD LTLIBTHREAD=$LIBSTDTHREAD
+ LIBMULTITHREAD=$LIBSTDTHREAD LTLIBMULTITHREAD=$LIBSTDTHREAD
gl_threads_api=isoc
AC_DEFINE([USE_ISOC_THREADS], [1],
[Define if the ISO C multithreading library can be used.])
@@ -375,12 +525,6 @@ AC_DEFUN([gl_THREADLIB_BODY],
AC_SUBST([LTLIBMULTITHREAD])
])
-AC_DEFUN([gl_PTHREADLIB],
-[
- AC_REQUIRE([gl_ANYTHREADLIB_EARLY])
- gl_PTHREADLIB_BODY
-])
-
AC_DEFUN([gl_THREADLIB],
[
AC_REQUIRE([gl_THREADLIB_EARLY])
@@ -411,6 +555,9 @@ AC_DEFUN([gl_AVOID_WINPTHREAD], [
])
+dnl ============================================================================
+
+
dnl Survey of platforms:
dnl
dnl Platform Available Compiler Supports test-lock
diff --git a/gnulib/import/m4/time_h.m4 b/gnulib/import/m4/time_h.m4
index f08f29b..aae0ae2 100644
--- a/gnulib/import/m4/time_h.m4
+++ b/gnulib/import/m4/time_h.m4
@@ -1,6 +1,6 @@
# Configure a more-standard replacement for <time.h>.
-# Copyright (C) 2000-2001, 2003-2007, 2009-2019 Free Software Foundation, Inc.
+# Copyright (C) 2000-2001, 2003-2007, 2009-2020 Free Software Foundation, Inc.
# serial 11
diff --git a/gnulib/import/m4/time_r.m4 b/gnulib/import/m4/time_r.m4
index cc4b3e0..0e86d44 100644
--- a/gnulib/import/m4/time_r.m4
+++ b/gnulib/import/m4/time_r.m4
@@ -1,6 +1,6 @@
dnl Reentrant time functions: localtime_r, gmtime_r.
-dnl Copyright (C) 2003, 2006-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2006-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/unistd-safer.m4 b/gnulib/import/m4/unistd-safer.m4
index 5e2a1be..65dfdf2 100644
--- a/gnulib/import/m4/unistd-safer.m4
+++ b/gnulib/import/m4/unistd-safer.m4
@@ -1,5 +1,5 @@
#serial 9
-dnl Copyright (C) 2002, 2005-2006, 2009-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2005-2006, 2009-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/unistd_h.m4 b/gnulib/import/m4/unistd_h.m4
index 18b7140..ea2bb01 100644
--- a/gnulib/import/m4/unistd_h.m4
+++ b/gnulib/import/m4/unistd_h.m4
@@ -1,5 +1,5 @@
-# unistd_h.m4 serial 76
-dnl Copyright (C) 2006-2019 Free Software Foundation, Inc.
+# unistd_h.m4 serial 77
+dnl Copyright (C) 2006-2020 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.
@@ -84,6 +84,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
GNULIB_GETHOSTNAME=0; AC_SUBST([GNULIB_GETHOSTNAME])
GNULIB_GETLOGIN=0; AC_SUBST([GNULIB_GETLOGIN])
GNULIB_GETLOGIN_R=0; AC_SUBST([GNULIB_GETLOGIN_R])
+ GNULIB_GETOPT_POSIX=0; AC_SUBST([GNULIB_GETOPT_POSIX])
GNULIB_GETPAGESIZE=0; AC_SUBST([GNULIB_GETPAGESIZE])
GNULIB_GETPASS=0; AC_SUBST([GNULIB_GETPASS])
GNULIB_GETUSERSHELL=0; AC_SUBST([GNULIB_GETUSERSHELL])
diff --git a/gnulib/import/m4/visibility.m4 b/gnulib/import/m4/visibility.m4
new file mode 100644
index 0000000..9f493ba
--- /dev/null
+++ b/gnulib/import/m4/visibility.m4
@@ -0,0 +1,77 @@
+# visibility.m4 serial 6
+dnl Copyright (C) 2005, 2008, 2010-2020 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+dnl Tests whether the compiler supports the command-line option
+dnl -fvisibility=hidden and the function and variable attributes
+dnl __attribute__((__visibility__("hidden"))) and
+dnl __attribute__((__visibility__("default"))).
+dnl Does *not* test for __visibility__("protected") - which has tricky
+dnl semantics (see the 'vismain' test in glibc) and does not exist e.g. on
+dnl Mac OS X.
+dnl Does *not* test for __visibility__("internal") - which has processor
+dnl dependent semantics.
+dnl Does *not* test for #pragma GCC visibility push(hidden) - which is
+dnl "really only recommended for legacy code".
+dnl Set the variable CFLAG_VISIBILITY.
+dnl Defines and sets the variable HAVE_VISIBILITY.
+
+AC_DEFUN([gl_VISIBILITY],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ CFLAG_VISIBILITY=
+ HAVE_VISIBILITY=0
+ if test -n "$GCC"; then
+ dnl First, check whether -Werror can be added to the command line, or
+ dnl whether it leads to an error because of some other option that the
+ dnl user has put into $CC $CFLAGS $CPPFLAGS.
+ AC_CACHE_CHECK([whether the -Werror option is usable],
+ [gl_cv_cc_vis_werror],
+ [gl_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Werror"
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[]], [[]])],
+ [gl_cv_cc_vis_werror=yes],
+ [gl_cv_cc_vis_werror=no])
+ CFLAGS="$gl_save_CFLAGS"
+ ])
+ dnl Now check whether visibility declarations are supported.
+ AC_CACHE_CHECK([for simple visibility declarations],
+ [gl_cv_cc_visibility],
+ [gl_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -fvisibility=hidden"
+ dnl We use the option -Werror and a function dummyfunc, because on some
+ dnl platforms (Cygwin 1.7) the use of -fvisibility triggers a warning
+ dnl "visibility attribute not supported in this configuration; ignored"
+ dnl at the first function definition in every compilation unit, and we
+ dnl don't want to use the option in this case.
+ if test $gl_cv_cc_vis_werror = yes; then
+ CFLAGS="$CFLAGS -Werror"
+ fi
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[extern __attribute__((__visibility__("hidden"))) int hiddenvar;
+ extern __attribute__((__visibility__("default"))) int exportedvar;
+ extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
+ extern __attribute__((__visibility__("default"))) int exportedfunc (void);
+ void dummyfunc (void) {}
+ ]],
+ [[]])],
+ [gl_cv_cc_visibility=yes],
+ [gl_cv_cc_visibility=no])
+ CFLAGS="$gl_save_CFLAGS"
+ ])
+ if test $gl_cv_cc_visibility = yes; then
+ CFLAG_VISIBILITY="-fvisibility=hidden"
+ HAVE_VISIBILITY=1
+ fi
+ fi
+ AC_SUBST([CFLAG_VISIBILITY])
+ AC_SUBST([HAVE_VISIBILITY])
+ AC_DEFINE_UNQUOTED([HAVE_VISIBILITY], [$HAVE_VISIBILITY],
+ [Define to 1 or 0, depending whether the compiler supports simple visibility declarations.])
+])
diff --git a/gnulib/import/m4/warn-on-use.m4 b/gnulib/import/m4/warn-on-use.m4
index 7ebe2d3..5c8ee45 100644
--- a/gnulib/import/m4/warn-on-use.m4
+++ b/gnulib/import/m4/warn-on-use.m4
@@ -1,5 +1,5 @@
# warn-on-use.m4 serial 6
-dnl Copyright (C) 2010-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2010-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/wchar_h.m4 b/gnulib/import/m4/wchar_h.m4
index 8c6ebcc..d1b7228 100644
--- a/gnulib/import/m4/wchar_h.m4
+++ b/gnulib/import/m4/wchar_h.m4
@@ -1,6 +1,6 @@
dnl A placeholder for ISO C99 <wchar.h>, for platforms that have issues.
-dnl Copyright (C) 2007-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/wchar_t.m4 b/gnulib/import/m4/wchar_t.m4
index 5db5815..e48d464 100644
--- a/gnulib/import/m4/wchar_t.m4
+++ b/gnulib/import/m4/wchar_t.m4
@@ -1,5 +1,5 @@
# wchar_t.m4 serial 4 (gettext-0.18.2)
-dnl Copyright (C) 2002-2003, 2008-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2003, 2008-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/wctype_h.m4 b/gnulib/import/m4/wctype_h.m4
index d5acb72..5c844b6 100644
--- a/gnulib/import/m4/wctype_h.m4
+++ b/gnulib/import/m4/wctype_h.m4
@@ -1,8 +1,8 @@
-# wctype_h.m4 serial 22
+# wctype_h.m4 serial 24
dnl A placeholder for ISO C99 <wctype.h>, for platforms that lack it.
-dnl Copyright (C) 2006-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2020 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.
@@ -204,6 +204,8 @@ AC_DEFUN([gl_WCTYPE_MODULE_INDICATOR],
AC_DEFUN([gl_WCTYPE_H_DEFAULTS],
[
GNULIB_ISWBLANK=0; AC_SUBST([GNULIB_ISWBLANK])
+ GNULIB_ISWDIGIT=0; AC_SUBST([GNULIB_ISWDIGIT])
+ GNULIB_ISWXDIGIT=0; AC_SUBST([GNULIB_ISWXDIGIT])
GNULIB_WCTYPE=0; AC_SUBST([GNULIB_WCTYPE])
GNULIB_ISWCTYPE=0; AC_SUBST([GNULIB_ISWCTYPE])
GNULIB_WCTRANS=0; AC_SUBST([GNULIB_WCTRANS])
@@ -213,4 +215,6 @@ AC_DEFUN([gl_WCTYPE_H_DEFAULTS],
HAVE_WCTYPE_T=1; AC_SUBST([HAVE_WCTYPE_T])
HAVE_WCTRANS_T=1; AC_SUBST([HAVE_WCTRANS_T])
REPLACE_ISWBLANK=0; AC_SUBST([REPLACE_ISWBLANK])
+ REPLACE_ISWDIGIT=0; AC_SUBST([REPLACE_ISWDIGIT])
+ REPLACE_ISWXDIGIT=0; AC_SUBST([REPLACE_ISWXDIGIT])
])
diff --git a/gnulib/import/m4/wint_t.m4 b/gnulib/import/m4/wint_t.m4
index 61e8a23..877fd86 100644
--- a/gnulib/import/m4/wint_t.m4
+++ b/gnulib/import/m4/wint_t.m4
@@ -1,5 +1,5 @@
# wint_t.m4 serial 7
-dnl Copyright (C) 2003, 2007-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2007-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gnulib/import/m4/zzgnulib.m4 b/gnulib/import/m4/zzgnulib.m4
new file mode 100644
index 0000000..98fa68f
--- /dev/null
+++ b/gnulib/import/m4/zzgnulib.m4
@@ -0,0 +1,23 @@
+# zzgnulib.m4 serial 1
+dnl Copyright (C) 2020 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl This file must be named something that sorts after all other
+dnl package- or gnulib-provided .m4 files - at least for those packages
+dnl that redefine AC_PROG_CC.
+
+dnl Redefine AC_PROG_CC so that it ends with invocations of gl_COMPILER_CLANG
+dnl and gl_COMPILER_PREPARE_CHECK_DECL.
+m4_define([AC_PROG_CC],
+ m4_defn([AC_PROG_CC])[
+gl_COMPILER_CLANG
+gl_COMPILER_PREPARE_CHECK_DECL
+])
+
+# gl_ZZGNULIB
+# -----------
+# Witness macro that this file has been included. Needed to force
+# Automake to include this file after all other gnulib .m4 files.
+AC_DEFUN([gl_ZZGNULIB])
diff --git a/gnulib/import/malloc.c b/gnulib/import/malloc.c
index 76e6ff7..7232f1e 100644
--- a/gnulib/import/malloc.c
+++ b/gnulib/import/malloc.c
@@ -1,6 +1,6 @@
/* malloc() function that is glibc compatible.
- Copyright (C) 1997-1998, 2006-2007, 2009-2019 Free Software Foundation, Inc.
+ Copyright (C) 1997-1998, 2006-2007, 2009-2020 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/malloc/scratch_buffer.h b/gnulib/import/malloc/scratch_buffer.h
index 9863e9c..b404786 100644
--- a/gnulib/import/malloc/scratch_buffer.h
+++ b/gnulib/import/malloc/scratch_buffer.h
@@ -1,5 +1,5 @@
/* Variable-sized buffer with on-stack default allocation.
- Copyright (C) 2015-2019 Free Software Foundation, Inc.
+ Copyright (C) 2015-2020 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
diff --git a/gnulib/import/malloc/scratch_buffer_grow.c b/gnulib/import/malloc/scratch_buffer_grow.c
index baeac4a..41befe3 100644
--- a/gnulib/import/malloc/scratch_buffer_grow.c
+++ b/gnulib/import/malloc/scratch_buffer_grow.c
@@ -1,5 +1,5 @@
/* Variable-sized buffer with on-stack default allocation.
- Copyright (C) 2015-2019 Free Software Foundation, Inc.
+ Copyright (C) 2015-2020 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
diff --git a/gnulib/import/malloc/scratch_buffer_grow_preserve.c b/gnulib/import/malloc/scratch_buffer_grow_preserve.c
index 4da8fc1..aef2329 100644
--- a/gnulib/import/malloc/scratch_buffer_grow_preserve.c
+++ b/gnulib/import/malloc/scratch_buffer_grow_preserve.c
@@ -1,5 +1,5 @@
/* Variable-sized buffer with on-stack default allocation.
- Copyright (C) 2015-2019 Free Software Foundation, Inc.
+ Copyright (C) 2015-2020 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
diff --git a/gnulib/import/malloc/scratch_buffer_set_array_size.c b/gnulib/import/malloc/scratch_buffer_set_array_size.c
index 7ad188b..5f5e4c2 100644
--- a/gnulib/import/malloc/scratch_buffer_set_array_size.c
+++ b/gnulib/import/malloc/scratch_buffer_set_array_size.c
@@ -1,5 +1,5 @@
/* Variable-sized buffer with on-stack default allocation.
- Copyright (C) 2015-2019 Free Software Foundation, Inc.
+ Copyright (C) 2015-2020 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
diff --git a/gnulib/import/malloca.c b/gnulib/import/malloca.c
index f60c5fb..975b166 100644
--- a/gnulib/import/malloca.c
+++ b/gnulib/import/malloca.c
@@ -1,5 +1,5 @@
/* Safe automatic memory allocation.
- Copyright (C) 2003, 2006-2007, 2009-2019 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2006-2007, 2009-2020 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003, 2018.
This program is free software; you can redistribute it and/or modify
diff --git a/gnulib/import/malloca.h b/gnulib/import/malloca.h
index d80c316..cfcd4de 100644
--- a/gnulib/import/malloca.h
+++ b/gnulib/import/malloca.h
@@ -1,5 +1,5 @@
/* Safe automatic memory allocation.
- Copyright (C) 2003-2007, 2009-2019 Free Software Foundation, Inc.
+ Copyright (C) 2003-2007, 2009-2020 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software; you can redistribute it and/or modify
@@ -112,14 +112,10 @@ enum
among all elementary types. */
sa_alignment_long = sa_alignof (long),
sa_alignment_double = sa_alignof (double),
-#if HAVE_LONG_LONG_INT
sa_alignment_longlong = sa_alignof (long long),
-#endif
sa_alignment_longdouble = sa_alignof (long double),
sa_alignment_max = ((sa_alignment_long - 1) | (sa_alignment_double - 1)
-#if HAVE_LONG_LONG_INT
| (sa_alignment_longlong - 1)
-#endif
| (sa_alignment_longdouble - 1)
) + 1
};
diff --git a/gnulib/import/math.in.h b/gnulib/import/math.in.h
index 18f8ff3..e5e37d6 100644
--- a/gnulib/import/math.in.h
+++ b/gnulib/import/math.in.h
@@ -1,6 +1,6 @@
/* A GNU-like <math.h>.
- Copyright (C) 2002-2003, 2007-2019 Free Software Foundation, Inc.
+ Copyright (C) 2002-2003, 2007-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/mbrtowc-impl-utf8.h b/gnulib/import/mbrtowc-impl-utf8.h
new file mode 100644
index 0000000..a826b1b
--- /dev/null
+++ b/gnulib/import/mbrtowc-impl-utf8.h
@@ -0,0 +1,138 @@
+/* Convert multibyte character to wide character.
+ Copyright (C) 1999-2002, 2005-2020 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 Bruno Haible <bruno@clisp.org>, 2008. */
+
+/* This file contains the part of the body of the mbrtowc and mbrtoc32 functions
+ that handles the special case of the UTF-8 encoding. */
+
+ /* Cf. unistr/u8-mbtouc.c. */
+ unsigned char c = (unsigned char) p[0];
+
+ if (c < 0x80)
+ {
+ if (pwc != NULL)
+ *pwc = c;
+ res = (c == 0 ? 0 : 1);
+ goto success;
+ }
+ if (c >= 0xc2)
+ {
+ if (c < 0xe0)
+ {
+ if (m == 1)
+ goto incomplete;
+ else /* m >= 2 */
+ {
+ unsigned char c2 = (unsigned char) p[1];
+
+ if ((c2 ^ 0x80) < 0x40)
+ {
+ if (pwc != NULL)
+ *pwc = ((unsigned int) (c & 0x1f) << 6)
+ | (unsigned int) (c2 ^ 0x80);
+ res = 2;
+ goto success;
+ }
+ }
+ }
+ else if (c < 0xf0)
+ {
+ if (m == 1)
+ goto incomplete;
+ else
+ {
+ unsigned char c2 = (unsigned char) p[1];
+
+ if ((c2 ^ 0x80) < 0x40
+ && (c >= 0xe1 || c2 >= 0xa0)
+ && (c != 0xed || c2 < 0xa0))
+ {
+ if (m == 2)
+ goto incomplete;
+ else /* m >= 3 */
+ {
+ unsigned char c3 = (unsigned char) p[2];
+
+ if ((c3 ^ 0x80) < 0x40)
+ {
+ unsigned int wc =
+ (((unsigned int) (c & 0x0f) << 12)
+ | ((unsigned int) (c2 ^ 0x80) << 6)
+ | (unsigned int) (c3 ^ 0x80));
+
+ if (FITS_IN_CHAR_TYPE (wc))
+ {
+ if (pwc != NULL)
+ *pwc = wc;
+ res = 3;
+ goto success;
+ }
+ }
+ }
+ }
+ }
+ }
+ else if (c <= 0xf4)
+ {
+ if (m == 1)
+ goto incomplete;
+ else
+ {
+ unsigned char c2 = (unsigned char) p[1];
+
+ if ((c2 ^ 0x80) < 0x40
+ && (c >= 0xf1 || c2 >= 0x90)
+ && (c < 0xf4 || (c == 0xf4 && c2 < 0x90)))
+ {
+ if (m == 2)
+ goto incomplete;
+ else
+ {
+ unsigned char c3 = (unsigned char) p[2];
+
+ if ((c3 ^ 0x80) < 0x40)
+ {
+ if (m == 3)
+ goto incomplete;
+ else /* m >= 4 */
+ {
+ unsigned char c4 = (unsigned char) p[3];
+
+ if ((c4 ^ 0x80) < 0x40)
+ {
+ unsigned int wc =
+ (((unsigned int) (c & 0x07) << 18)
+ | ((unsigned int) (c2 ^ 0x80) << 12)
+ | ((unsigned int) (c3 ^ 0x80) << 6)
+ | (unsigned int) (c4 ^ 0x80));
+
+ if (FITS_IN_CHAR_TYPE (wc))
+ {
+ if (pwc != NULL)
+ *pwc = wc;
+ res = 4;
+ goto success;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ goto invalid;
diff --git a/gnulib/import/mbrtowc-impl.h b/gnulib/import/mbrtowc-impl.h
new file mode 100644
index 0000000..c970439
--- /dev/null
+++ b/gnulib/import/mbrtowc-impl.h
@@ -0,0 +1,262 @@
+/* Convert multibyte character to wide character.
+ Copyright (C) 1999-2002, 2005-2020 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 Bruno Haible <bruno@clisp.org>, 2008. */
+
+/* This file contains the body of the mbrtowc and mbrtoc32 functions,
+ when GNULIB_defined_mbstate_t is defined. */
+
+ char *pstate = (char *)ps;
+
+ if (s == NULL)
+ {
+ pwc = NULL;
+ s = "";
+ n = 1;
+ }
+
+ if (n == 0)
+ return (size_t)(-2);
+
+ /* Here n > 0. */
+
+ if (pstate == NULL)
+ pstate = internal_state;
+
+ {
+ size_t nstate = pstate[0];
+ char buf[4];
+ const char *p;
+ size_t m;
+ enc_t enc;
+ int res;
+
+ switch (nstate)
+ {
+ case 0:
+ p = s;
+ m = n;
+ break;
+ case 3:
+ buf[2] = pstate[3];
+ FALLTHROUGH;
+ case 2:
+ buf[1] = pstate[2];
+ FALLTHROUGH;
+ case 1:
+ buf[0] = pstate[1];
+ p = buf;
+ m = nstate;
+ buf[m++] = s[0];
+ if (n >= 2 && m < 4)
+ {
+ buf[m++] = s[1];
+ if (n >= 3 && m < 4)
+ buf[m++] = s[2];
+ }
+ break;
+ default:
+ errno = EINVAL;
+ return (size_t)(-1);
+ }
+
+ /* Here m > 0. */
+
+ enc = locale_encoding_classification ();
+
+ if (enc == enc_utf8) /* UTF-8 */
+ {
+ /* Achieve
+ - multi-thread safety and
+ - the ability to produce wide character values > WCHAR_MAX
+ by not calling mbtowc() at all. */
+#include "mbrtowc-impl-utf8.h"
+ }
+ else
+ {
+ /* The hidden internal state of mbtowc would make this function not
+ multi-thread safe. Achieve multi-thread safety through a lock. */
+ wchar_t wc;
+ res = mbtowc_with_lock (&wc, p, m);
+
+ if (res >= 0)
+ {
+ if ((wc == 0) != (res == 0))
+ abort ();
+ if (pwc != NULL)
+ *pwc = wc;
+ goto success;
+ }
+
+ /* mbtowc does not distinguish between invalid and incomplete multibyte
+ sequences. But mbrtowc needs to make this distinction.
+ There are two possible approaches:
+ - Use iconv() and its return value.
+ - Use built-in knowledge about the possible encodings.
+ Given the low quality of implementation of iconv() on the systems
+ that lack mbrtowc(), we use the second approach.
+ The possible encodings are:
+ - 8-bit encodings,
+ - EUC-JP, EUC-KR, GB2312, EUC-TW, BIG5, GB18030, SJIS,
+ - UTF-8 (already handled above).
+ Use specialized code for each. */
+ if (m >= 4 || m >= MB_CUR_MAX)
+ goto invalid;
+ /* Here MB_CUR_MAX > 1 and 0 < m < 4. */
+ switch (enc)
+ {
+ /* As a reference for this code, you can use the GNU libiconv
+ implementation. Look for uses of the RET_TOOFEW macro. */
+
+ case enc_eucjp: /* EUC-JP */
+ {
+ if (m == 1)
+ {
+ unsigned char c = (unsigned char) p[0];
+
+ if ((c >= 0xa1 && c < 0xff) || c == 0x8e || c == 0x8f)
+ goto incomplete;
+ }
+ if (m == 2)
+ {
+ unsigned char c = (unsigned char) p[0];
+
+ if (c == 0x8f)
+ {
+ unsigned char c2 = (unsigned char) p[1];
+
+ if (c2 >= 0xa1 && c2 < 0xff)
+ goto incomplete;
+ }
+ }
+ goto invalid;
+ }
+
+ case enc_94: /* EUC-KR, GB2312, BIG5 */
+ {
+ if (m == 1)
+ {
+ unsigned char c = (unsigned char) p[0];
+
+ if (c >= 0xa1 && c < 0xff)
+ goto incomplete;
+ }
+ goto invalid;
+ }
+
+ case enc_euctw: /* EUC-TW */
+ {
+ if (m == 1)
+ {
+ unsigned char c = (unsigned char) p[0];
+
+ if ((c >= 0xa1 && c < 0xff) || c == 0x8e)
+ goto incomplete;
+ }
+ else /* m == 2 || m == 3 */
+ {
+ unsigned char c = (unsigned char) p[0];
+
+ if (c == 0x8e)
+ goto incomplete;
+ }
+ goto invalid;
+ }
+
+ case enc_gb18030: /* GB18030 */
+ {
+ if (m == 1)
+ {
+ unsigned char c = (unsigned char) p[0];
+
+ if ((c >= 0x90 && c <= 0xe3) || (c >= 0xf8 && c <= 0xfe))
+ goto incomplete;
+ }
+ else /* m == 2 || m == 3 */
+ {
+ unsigned char c = (unsigned char) p[0];
+
+ if (c >= 0x90 && c <= 0xe3)
+ {
+ unsigned char c2 = (unsigned char) p[1];
+
+ if (c2 >= 0x30 && c2 <= 0x39)
+ {
+ if (m == 2)
+ goto incomplete;
+ else /* m == 3 */
+ {
+ unsigned char c3 = (unsigned char) p[2];
+
+ if (c3 >= 0x81 && c3 <= 0xfe)
+ goto incomplete;
+ }
+ }
+ }
+ }
+ goto invalid;
+ }
+
+ case enc_sjis: /* SJIS */
+ {
+ if (m == 1)
+ {
+ unsigned char c = (unsigned char) p[0];
+
+ if ((c >= 0x81 && c <= 0x9f) || (c >= 0xe0 && c <= 0xea)
+ || (c >= 0xf0 && c <= 0xf9))
+ goto incomplete;
+ }
+ goto invalid;
+ }
+
+ default:
+ /* An unknown multibyte encoding. */
+ goto incomplete;
+ }
+ }
+
+ success:
+ /* res >= 0 is the corrected return value of
+ mbtowc_with_lock (&wc, p, m). */
+ if (nstate >= (res > 0 ? res : 1))
+ abort ();
+ res -= nstate;
+ pstate[0] = 0;
+ return res;
+
+ incomplete:
+ {
+ size_t k = nstate;
+ /* Here 0 <= k < m < 4. */
+ pstate[++k] = s[0];
+ if (k < m)
+ {
+ pstate[++k] = s[1];
+ if (k < m)
+ pstate[++k] = s[2];
+ }
+ if (k != m)
+ abort ();
+ }
+ pstate[0] = m;
+ return (size_t)(-2);
+
+ invalid:
+ errno = EILSEQ;
+ /* The conversion state is undefined, says POSIX. */
+ return (size_t)(-1);
+ }
diff --git a/gnulib/import/mbrtowc.c b/gnulib/import/mbrtowc.c
index 1aad22c..6cb5267 100644
--- a/gnulib/import/mbrtowc.c
+++ b/gnulib/import/mbrtowc.c
@@ -1,5 +1,5 @@
/* Convert multibyte character to wide character.
- Copyright (C) 1999-2002, 2005-2019 Free Software Foundation, Inc.
+ Copyright (C) 1999-2002, 2005-2020 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This program is free software: you can redistribute it and/or modify
@@ -20,21 +20,39 @@
/* Specification. */
#include <wchar.h>
-#if C_LOCALE_MAYBE_EILSEQ
-# include "hard-locale.h"
-# include <locale.h>
-#endif
-
#if GNULIB_defined_mbstate_t
-/* Implement mbrtowc() on top of mbtowc(). */
+/* Implement mbrtowc() on top of mbtowc() for the non-UTF-8 locales
+ and directly for the UTF-8 locales. */
# include <errno.h>
+# include <stdint.h>
# include <stdlib.h>
-# include "localcharset.h"
-# include "streq.h"
+# if defined _WIN32 && !defined __CYGWIN__
+
+# define WIN32_LEAN_AND_MEAN /* avoid including junk */
+# include <windows.h>
+
+# elif HAVE_PTHREAD_API
+
+# include <pthread.h>
+# if HAVE_THREADS_H && HAVE_WEAK_SYMBOLS
+# include <threads.h>
+# pragma weak thrd_exit
+# define c11_threads_in_use() (thrd_exit != NULL)
+# else
+# define c11_threads_in_use() 0
+# endif
+
+# elif HAVE_THREADS_H
+
+# include <threads.h>
+
+# endif
+
# include "verify.h"
-# include "glthread/lock.h"
+# include "lc-charset-dispatch.h"
+# include "mbtowc-lock.h"
# ifndef FALLTHROUGH
# if __GNUC__ < 7
@@ -44,417 +62,24 @@
# endif
# endif
-/* Returns a classification of special values of the encoding of the current
- locale. */
-typedef enum {
- enc_other, /* other */
- enc_utf8, /* UTF-8 */
- enc_eucjp, /* EUC-JP */
- enc_94, /* EUC-KR, GB2312, BIG5 */
- enc_euctw, /* EUC-TW */
- enc_gb18030, /* GB18030 */
- enc_sjis /* SJIS */
-} enc_t;
-static inline enc_t
-locale_enc (void)
-{
- const char *encoding = locale_charset ();
- if (STREQ_OPT (encoding, "UTF-8", 'U', 'T', 'F', '-', '8', 0, 0, 0, 0))
- return enc_utf8;
- if (STREQ_OPT (encoding, "EUC-JP", 'E', 'U', 'C', '-', 'J', 'P', 0, 0, 0))
- return enc_eucjp;
- if (STREQ_OPT (encoding, "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0)
- || STREQ_OPT (encoding, "GB2312", 'G', 'B', '2', '3', '1', '2', 0, 0, 0)
- || STREQ_OPT (encoding, "BIG5", 'B', 'I', 'G', '5', 0, 0, 0, 0, 0))
- return enc_94;
- if (STREQ_OPT (encoding, "EUC-TW", 'E', 'U', 'C', '-', 'T', 'W', 0, 0, 0))
- return enc_euctw;
- if (STREQ_OPT (encoding, "GB18030", 'G', 'B', '1', '8', '0', '3', '0', 0, 0))
- return enc_gb18030;
- if (STREQ_OPT (encoding, "SJIS", 'S', 'J', 'I', 'S', 0, 0, 0, 0, 0))
- return enc_sjis;
- return enc_other;
-}
-
-# if GNULIB_WCHAR_SINGLE
-/* When we know that the locale does not change, provide a speedup by
- caching the value of locale_enc. */
-static int cached_locale_enc = -1;
-static inline enc_t
-locale_enc_cached (void)
-{
- if (cached_locale_enc < 0)
- cached_locale_enc = locale_enc ();
- return cached_locale_enc;
-}
-# else
-/* By default, don't make assumptions, hence no caching. */
-# define locale_enc_cached locale_enc
-# endif
-
-/* This lock protects the internal state of mbtowc against multiple simultaneous
- calls of mbrtowc. */
-gl_lock_define_initialized(static, mbtowc_lock)
-
verify (sizeof (mbstate_t) >= 4);
-
static char internal_state[4];
size_t
mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
{
- char *pstate = (char *)ps;
-
- if (s == NULL)
- {
- pwc = NULL;
- s = "";
- n = 1;
- }
-
- if (n == 0)
- return (size_t)(-2);
-
- /* Here n > 0. */
-
- if (pstate == NULL)
- pstate = internal_state;
-
- {
- size_t nstate = pstate[0];
- char buf[4];
- const char *p;
- size_t m;
- enc_t enc;
- int res;
-
- switch (nstate)
- {
- case 0:
- p = s;
- m = n;
- break;
- case 3:
- buf[2] = pstate[3];
- FALLTHROUGH;
- case 2:
- buf[1] = pstate[2];
- FALLTHROUGH;
- case 1:
- buf[0] = pstate[1];
- p = buf;
- m = nstate;
- buf[m++] = s[0];
- if (n >= 2 && m < 4)
- {
- buf[m++] = s[1];
- if (n >= 3 && m < 4)
- buf[m++] = s[2];
- }
- break;
- default:
- errno = EINVAL;
- return (size_t)(-1);
- }
-
- /* Here m > 0. */
-
- enc = locale_enc_cached ();
-
- if (enc == enc_utf8) /* UTF-8 */
- {
- /* Achieve multi-thread safety by not calling mbtowc() at all. */
- /* Cf. unistr/u8-mbtouc.c. */
- unsigned char c = (unsigned char) p[0];
-
- if (c < 0x80)
- {
- if (pwc != NULL)
- *pwc = c;
- res = (c == 0 ? 0 : 1);
- goto success;
- }
- if (c >= 0xc2)
- {
- if (c < 0xe0)
- {
- if (m == 1)
- goto incomplete;
- else /* m >= 2 */
- {
- unsigned char c2 = (unsigned char) p[1];
-
- if ((c2 ^ 0x80) < 0x40)
- {
- if (pwc != NULL)
- *pwc = ((unsigned int) (c & 0x1f) << 6)
- | (unsigned int) (c2 ^ 0x80);
- res = 2;
- goto success;
- }
- }
- }
- else if (c < 0xf0)
- {
- if (m == 1)
- goto incomplete;
- else
- {
- unsigned char c2 = (unsigned char) p[1];
-
- if ((c2 ^ 0x80) < 0x40
- && (c >= 0xe1 || c2 >= 0xa0)
- && (c != 0xed || c2 < 0xa0))
- {
- if (m == 2)
- goto incomplete;
- else /* m >= 3 */
- {
- unsigned char c3 = (unsigned char) p[2];
-
- if ((c3 ^ 0x80) < 0x40)
- {
- if (pwc != NULL)
- *pwc = ((unsigned int) (c & 0x0f) << 12)
- | ((unsigned int) (c2 ^ 0x80) << 6)
- | (unsigned int) (c3 ^ 0x80);
- res = 3;
- goto success;
- }
- }
- }
- }
- }
- else if (c <= 0xf4)
- {
- if (m == 1)
- goto incomplete;
- else
- {
- unsigned char c2 = (unsigned char) p[1];
-
- if ((c2 ^ 0x80) < 0x40
- && (c >= 0xf1 || c2 >= 0x90)
- && (c < 0xf4 || (c == 0xf4 && c2 < 0x90)))
- {
- if (m == 2)
- goto incomplete;
- else
- {
- unsigned char c3 = (unsigned char) p[2];
-
- if ((c3 ^ 0x80) < 0x40)
- {
- if (m == 3)
- goto incomplete;
- else /* m >= 4 */
- {
- unsigned char c4 = (unsigned char) p[3];
-
- if ((c4 ^ 0x80) < 0x40)
- {
- if (pwc != NULL)
- *pwc = ((unsigned int) (c & 0x07) << 18)
- | ((unsigned int) (c2 ^ 0x80) << 12)
- | ((unsigned int) (c3 ^ 0x80) << 6)
- | (unsigned int) (c4 ^ 0x80);
- res = 4;
- goto success;
- }
- }
- }
- }
- }
- }
- }
- }
- goto invalid;
- }
- else
- {
- /* The hidden internal state of mbtowc would make this function not
- multi-thread safe. Achieve multi-thread safety through a lock. */
- gl_lock_lock (mbtowc_lock);
-
- /* Put the hidden internal state of mbtowc into its initial state.
- This is needed at least with glibc, uClibc, and MSVC CRT.
- See <https://sourceware.org/bugzilla/show_bug.cgi?id=9674>. */
- mbtowc (NULL, NULL, 0);
-
- res = mbtowc (pwc, p, m);
-
- gl_lock_unlock (mbtowc_lock);
-
- if (res >= 0)
- {
- if (pwc != NULL && ((*pwc == 0) != (res == 0)))
- abort ();
- goto success;
- }
-
- /* mbtowc does not distinguish between invalid and incomplete multibyte
- sequences. But mbrtowc needs to make this distinction.
- There are two possible approaches:
- - Use iconv() and its return value.
- - Use built-in knowledge about the possible encodings.
- Given the low quality of implementation of iconv() on the systems
- that lack mbrtowc(), we use the second approach.
- The possible encodings are:
- - 8-bit encodings,
- - EUC-JP, EUC-KR, GB2312, EUC-TW, BIG5, GB18030, SJIS,
- - UTF-8 (already handled above).
- Use specialized code for each. */
- if (m >= 4 || m >= MB_CUR_MAX)
- goto invalid;
- /* Here MB_CUR_MAX > 1 and 0 < m < 4. */
- switch (enc)
- {
- /* As a reference for this code, you can use the GNU libiconv
- implementation. Look for uses of the RET_TOOFEW macro. */
-
- case enc_eucjp: /* EUC-JP */
- {
- if (m == 1)
- {
- unsigned char c = (unsigned char) p[0];
-
- if ((c >= 0xa1 && c < 0xff) || c == 0x8e || c == 0x8f)
- goto incomplete;
- }
- if (m == 2)
- {
- unsigned char c = (unsigned char) p[0];
-
- if (c == 0x8f)
- {
- unsigned char c2 = (unsigned char) p[1];
-
- if (c2 >= 0xa1 && c2 < 0xff)
- goto incomplete;
- }
- }
- goto invalid;
- }
-
- case enc_94: /* EUC-KR, GB2312, BIG5 */
- {
- if (m == 1)
- {
- unsigned char c = (unsigned char) p[0];
-
- if (c >= 0xa1 && c < 0xff)
- goto incomplete;
- }
- goto invalid;
- }
-
- case enc_euctw: /* EUC-TW */
- {
- if (m == 1)
- {
- unsigned char c = (unsigned char) p[0];
-
- if ((c >= 0xa1 && c < 0xff) || c == 0x8e)
- goto incomplete;
- }
- else /* m == 2 || m == 3 */
- {
- unsigned char c = (unsigned char) p[0];
-
- if (c == 0x8e)
- goto incomplete;
- }
- goto invalid;
- }
-
- case enc_gb18030: /* GB18030 */
- {
- if (m == 1)
- {
- unsigned char c = (unsigned char) p[0];
-
- if ((c >= 0x90 && c <= 0xe3) || (c >= 0xf8 && c <= 0xfe))
- goto incomplete;
- }
- else /* m == 2 || m == 3 */
- {
- unsigned char c = (unsigned char) p[0];
-
- if (c >= 0x90 && c <= 0xe3)
- {
- unsigned char c2 = (unsigned char) p[1];
-
- if (c2 >= 0x30 && c2 <= 0x39)
- {
- if (m == 2)
- goto incomplete;
- else /* m == 3 */
- {
- unsigned char c3 = (unsigned char) p[2];
-
- if (c3 >= 0x81 && c3 <= 0xfe)
- goto incomplete;
- }
- }
- }
- }
- goto invalid;
- }
-
- case enc_sjis: /* SJIS */
- {
- if (m == 1)
- {
- unsigned char c = (unsigned char) p[0];
-
- if ((c >= 0x81 && c <= 0x9f) || (c >= 0xe0 && c <= 0xea)
- || (c >= 0xf0 && c <= 0xf9))
- goto incomplete;
- }
- goto invalid;
- }
-
- default:
- /* An unknown multibyte encoding. */
- goto incomplete;
- }
- }
-
- success:
- /* res >= 0 is the corrected return value of mbtowc (pwc, p, m). */
- if (nstate >= (res > 0 ? res : 1))
- abort ();
- res -= nstate;
- pstate[0] = 0;
- return res;
-
- incomplete:
- {
- size_t k = nstate;
- /* Here 0 <= k < m < 4. */
- pstate[++k] = s[0];
- if (k < m)
- {
- pstate[++k] = s[1];
- if (k < m)
- pstate[++k] = s[2];
- }
- if (k != m)
- abort ();
- }
- pstate[0] = m;
- return (size_t)(-2);
-
- invalid:
- errno = EILSEQ;
- /* The conversion state is undefined, says POSIX. */
- return (size_t)(-1);
- }
+# define FITS_IN_CHAR_TYPE(wc) ((wc) <= WCHAR_MAX)
+# include "mbrtowc-impl.h"
}
#else
/* Override the system's mbrtowc() function. */
+# if MBRTOWC_IN_C_LOCALE_MAYBE_EILSEQ
+# include "hard-locale.h"
+# include <locale.h>
+# endif
+
# undef mbrtowc
size_t
@@ -512,14 +137,20 @@ rpl_mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
}
# endif
+# if MBRTOWC_STORES_INCOMPLETE_BUG
+ ret = mbrtowc (&wc, s, n, ps);
+ if (ret < (size_t) -2 && pwc != NULL)
+ *pwc = wc;
+# else
ret = mbrtowc (pwc, s, n, ps);
+# endif
# if MBRTOWC_NUL_RETVAL_BUG
if (ret < (size_t) -2 && !*pwc)
return 0;
# endif
-# if C_LOCALE_MAYBE_EILSEQ
+# if MBRTOWC_IN_C_LOCALE_MAYBE_EILSEQ
if ((size_t) -2 <= ret && n != 0 && ! hard_locale (LC_CTYPE))
{
unsigned char uc = *s;
diff --git a/gnulib/import/mbsinit.c b/gnulib/import/mbsinit.c
index 5ecaef7..981a894 100644
--- a/gnulib/import/mbsinit.c
+++ b/gnulib/import/mbsinit.c
@@ -1,5 +1,5 @@
/* Test for initial conversion state.
- Copyright (C) 2008-2019 Free Software Foundation, Inc.
+ Copyright (C) 2008-2020 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This program is free software: you can redistribute it and/or modify
@@ -56,13 +56,10 @@ mbsinit (const mbstate_t *ps)
{
# if defined _WIN32 && !defined __CYGWIN__
/* Native Windows. */
-# ifdef __MINGW32__
- /* On mingw, 'mbstate_t' is defined as 'int'. */
- return ps == NULL || *ps == 0;
-# else
- /* MSVC defines 'mbstate_t' as an 8-byte struct; the first 4-bytes matter. */
+ /* MSVC defines 'mbstate_t' as an 8-byte struct; the first 4 bytes matter.
+ On mingw, 'mbstate_t' is sometimes defined as 'int', sometimes defined as
+ an 8-byte struct, of which the first 4 bytes matter. */
return ps == NULL || *(const unsigned int *)ps == 0;
-# endif
# else
/* Minix, HP-UX 11.00, Solaris 2.6, Interix, ... */
/* Maybe this definition works, maybe not... */
diff --git a/gnulib/import/mbsrtowcs-impl.h b/gnulib/import/mbsrtowcs-impl.h
index 110d692..06ecec2 100644
--- a/gnulib/import/mbsrtowcs-impl.h
+++ b/gnulib/import/mbsrtowcs-impl.h
@@ -1,5 +1,5 @@
/* Convert string to wide string.
- Copyright (C) 2008-2019 Free Software Foundation, Inc.
+ Copyright (C) 2008-2020 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This program is free software: you can redistribute it and/or modify
@@ -16,16 +16,16 @@
along with this program. If not, see <https://www.gnu.org/licenses/>. */
size_t
-mbsrtowcs (wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps)
+FUNC (DCHAR_T *dest, const char **srcp, size_t len, mbstate_t *ps)
{
if (ps == NULL)
- ps = &_gl_mbsrtowcs_state;
+ ps = &INTERNAL_STATE;
{
const char *src = *srcp;
if (dest != NULL)
{
- wchar_t *destptr = dest;
+ DCHAR_T *destptr = dest;
for (; len > 0; destptr++, len--)
{
@@ -46,7 +46,7 @@ mbsrtowcs (wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps)
src_avail = 4 + strnlen1 (src + 4, MB_LEN_MAX - 4);
/* Parse the next multibyte character. */
- ret = mbrtowc (destptr, src, src_avail, ps);
+ ret = MBRTOWC (destptr, src, src_avail, ps);
if (ret == (size_t)(-2))
/* Encountered a multibyte character that extends past a '\0' byte
@@ -93,7 +93,7 @@ mbsrtowcs (wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps)
src_avail = 4 + strnlen1 (src + 4, MB_LEN_MAX - 4);
/* Parse the next multibyte character. */
- ret = mbrtowc (NULL, src, src_avail, &state);
+ ret = MBRTOWC (NULL, src, src_avail, &state);
if (ret == (size_t)(-2))
/* Encountered a multibyte character that extends past a '\0' byte
diff --git a/gnulib/import/mbsrtowcs-state.c b/gnulib/import/mbsrtowcs-state.c
index 59525e7..aca1ad8 100644
--- a/gnulib/import/mbsrtowcs-state.c
+++ b/gnulib/import/mbsrtowcs-state.c
@@ -1,5 +1,5 @@
/* Convert string to wide string.
- Copyright (C) 2008-2019 Free Software Foundation, Inc.
+ Copyright (C) 2008-2020 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This program is free software: you can redistribute it and/or modify
diff --git a/gnulib/import/mbsrtowcs.c b/gnulib/import/mbsrtowcs.c
index 14f241e..6d1c685 100644
--- a/gnulib/import/mbsrtowcs.c
+++ b/gnulib/import/mbsrtowcs.c
@@ -1,5 +1,5 @@
/* Convert string to wide string.
- Copyright (C) 2008-2019 Free Software Foundation, Inc.
+ Copyright (C) 2008-2020 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This program is free software: you can redistribute it and/or modify
@@ -29,4 +29,8 @@
extern mbstate_t _gl_mbsrtowcs_state;
+#define FUNC mbsrtowcs
+#define DCHAR_T wchar_t
+#define INTERNAL_STATE _gl_mbsrtowcs_state
+#define MBRTOWC mbrtowc
#include "mbsrtowcs-impl.h"
diff --git a/gnulib/import/mbtowc-lock.c b/gnulib/import/mbtowc-lock.c
new file mode 100644
index 0000000..85ad3c4
--- /dev/null
+++ b/gnulib/import/mbtowc-lock.c
@@ -0,0 +1,150 @@
+/* Return the internal lock used by mbrtowc and mbrtoc32.
+ Copyright (C) 2019-2020 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 Bruno Haible <bruno@clisp.org>, 2019-2020. */
+
+#include <config.h>
+
+/* When it is known that the gl_get_mbtowc_lock function is defined
+ by a dependency library, it should not be defined here. */
+#if OMIT_MBTOWC_LOCK
+
+/* This declaration is solely to ensure that after preprocessing
+ this file is never empty. */
+typedef int dummy;
+
+#else
+
+/* This file defines the internal lock used by mbrtowc and mbrtoc32.
+ It is a separate compilation unit, so that only one copy of it is
+ present when linking statically. */
+
+/* Prohibit renaming this symbol. */
+# undef gl_get_mbtowc_lock
+
+/* Macro for exporting a symbol (function, not variable) defined in this file,
+ when compiled into a shared library. */
+# ifndef DLL_EXPORTED
+# if HAVE_VISIBILITY
+ /* Override the effect of the compiler option '-fvisibility=hidden'. */
+# define DLL_EXPORTED __attribute__((__visibility__("default")))
+# elif defined _WIN32 || defined __CYGWIN__
+# define DLL_EXPORTED __declspec(dllexport)
+# else
+# define DLL_EXPORTED
+# endif
+# endif
+
+# if defined _WIN32 && !defined __CYGWIN__
+
+# define WIN32_LEAN_AND_MEAN /* avoid including junk */
+# include <windows.h>
+
+# include "windows-initguard.h"
+
+/* The return type is a 'CRITICAL_SECTION *', not a 'glwthread_mutex_t *',
+ because the latter is not guaranteed to be a stable ABI in the future. */
+
+/* Make sure the function gets exported from DLLs. */
+DLL_EXPORTED CRITICAL_SECTION *gl_get_mbtowc_lock (void);
+
+static glwthread_initguard_t guard = GLWTHREAD_INITGUARD_INIT;
+static CRITICAL_SECTION lock;
+
+/* Returns the internal lock used by mbrtowc and mbrtoc32. */
+CRITICAL_SECTION *
+gl_get_mbtowc_lock (void)
+{
+ if (!guard.done)
+ {
+ if (InterlockedIncrement (&guard.started) == 0)
+ {
+ /* This thread is the first one to need the lock. Initialize it. */
+ InitializeCriticalSection (&lock);
+ guard.done = 1;
+ }
+ else
+ {
+ /* Don't let guard.started grow and wrap around. */
+ InterlockedDecrement (&guard.started);
+ /* Yield the CPU while waiting for another thread to finish
+ initializing this mutex. */
+ while (!guard.done)
+ Sleep (0);
+ }
+ }
+ return &lock;
+}
+
+# elif HAVE_PTHREAD_API
+
+# include <pthread.h>
+
+static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
+
+/* Make sure the function gets exported from shared libraries. */
+DLL_EXPORTED pthread_mutex_t *gl_get_mbtowc_lock (void);
+
+/* Returns the internal lock used by mbrtowc and mbrtoc32. */
+pthread_mutex_t *
+gl_get_mbtowc_lock (void)
+{
+ return &mutex;
+}
+
+# elif HAVE_THREADS_H
+
+# include <threads.h>
+# include <stdlib.h>
+
+static int volatile init_needed = 1;
+static once_flag init_once = ONCE_FLAG_INIT;
+static mtx_t mutex;
+
+static void
+atomic_init (void)
+{
+ if (mtx_init (&mutex, mtx_plain) != thrd_success)
+ abort ();
+ init_needed = 0;
+}
+
+/* Make sure the function gets exported from shared libraries. */
+DLL_EXPORTED mtx_t *gl_get_mbtowc_lock (void);
+
+/* Returns the internal lock used by mbrtowc and mbrtoc32. */
+mtx_t *
+gl_get_mbtowc_lock (void)
+{
+ if (init_needed)
+ call_once (&init_once, atomic_init);
+ return &mutex;
+}
+
+# endif
+
+# if (defined _WIN32 || defined __CYGWIN__) && !defined _MSC_VER
+/* Make sure the '__declspec(dllimport)' in mbrtowc.c and mbrtoc32.c does not
+ cause a link failure when no DLLs are involved. */
+# if defined _WIN64 || defined _LP64
+# define IMP(x) __imp_##x
+# else
+# define IMP(x) _imp__##x
+# endif
+void * IMP(gl_get_mbtowc_lock) = &gl_get_mbtowc_lock;
+# endif
+
+#endif
diff --git a/gnulib/import/mbtowc-lock.h b/gnulib/import/mbtowc-lock.h
new file mode 100644
index 0000000..e101978
--- /dev/null
+++ b/gnulib/import/mbtowc-lock.h
@@ -0,0 +1,115 @@
+/* Use the internal lock used by mbrtowc and mbrtoc32.
+ Copyright (C) 2019-2020 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 Bruno Haible <bruno@clisp.org>, 2019-2020. */
+
+/* Use a lock, so that no two threads can invoke mbtowc at the same time. */
+
+static inline int
+mbtowc_unlocked (wchar_t *pwc, const char *p, size_t m)
+{
+ /* Put the hidden internal state of mbtowc into its initial state.
+ This is needed at least with glibc, uClibc, and MSVC CRT.
+ See <https://sourceware.org/bugzilla/show_bug.cgi?id=9674>. */
+ mbtowc (NULL, NULL, 0);
+
+ return mbtowc (pwc, p, m);
+}
+
+/* Prohibit renaming this symbol. */
+#undef gl_get_mbtowc_lock
+
+#if defined _WIN32 && !defined __CYGWIN__
+
+extern __declspec(dllimport) CRITICAL_SECTION *gl_get_mbtowc_lock (void);
+
+static int
+mbtowc_with_lock (wchar_t *pwc, const char *p, size_t m)
+{
+ CRITICAL_SECTION *lock = gl_get_mbtowc_lock ();
+ int ret;
+
+ EnterCriticalSection (lock);
+ ret = mbtowc_unlocked (pwc, p, m);
+ LeaveCriticalSection (lock);
+
+ return ret;
+}
+
+#elif HAVE_PTHREAD_API /* AIX, IRIX, Cygwin */
+
+extern
+# if defined _WIN32 || defined __CYGWIN__
+ __declspec(dllimport)
+# endif
+ pthread_mutex_t *gl_get_mbtowc_lock (void);
+
+# if HAVE_WEAK_SYMBOLS /* IRIX */
+
+ /* Avoid the need to link with '-lpthread'. */
+# pragma weak pthread_mutex_lock
+# pragma weak pthread_mutex_unlock
+
+ /* Determine whether libpthread is in use. */
+# pragma weak pthread_mutexattr_gettype
+ /* See the comments in lock.h. */
+# define pthread_in_use() \
+ (pthread_mutexattr_gettype != NULL || c11_threads_in_use ())
+
+# else
+# define pthread_in_use() 1
+# endif
+
+static int
+mbtowc_with_lock (wchar_t *pwc, const char *p, size_t m)
+{
+ if (pthread_in_use())
+ {
+ pthread_mutex_t *lock = gl_get_mbtowc_lock ();
+ int ret;
+
+ if (pthread_mutex_lock (lock))
+ abort ();
+ ret = mbtowc_unlocked (pwc, p, m);
+ if (pthread_mutex_unlock (lock))
+ abort ();
+
+ return ret;
+ }
+ else
+ return mbtowc_unlocked (pwc, p, m);
+}
+
+#elif HAVE_THREADS_H
+
+extern mtx_t *gl_get_mbtowc_lock (void);
+
+static int
+mbtowc_with_lock (wchar_t *pwc, const char *p, size_t m)
+{
+ mtx_t *lock = gl_get_mbtowc_lock ();
+ int ret;
+
+ if (mtx_lock (lock) != thrd_success)
+ abort ();
+ ret = mbtowc_unlocked (pwc, p, m);
+ if (mtx_unlock (lock) != thrd_success)
+ abort ();
+
+ return ret;
+}
+
+#endif
diff --git a/gnulib/import/memchr.c b/gnulib/import/memchr.c
index 4e0c5f9..bff63da 100644
--- a/gnulib/import/memchr.c
+++ b/gnulib/import/memchr.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2019
+/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2020
Free Software Foundation, Inc.
Based on strlen implementation by Torbjorn Granlund (tege@sics.se),
diff --git a/gnulib/import/memchr.valgrind b/gnulib/import/memchr.valgrind
index 1d60e29..f6dd209 100644
--- a/gnulib/import/memchr.valgrind
+++ b/gnulib/import/memchr.valgrind
@@ -1,6 +1,6 @@
# Suppress a valgrind message about use of uninitialized memory in memchr().
-# Copyright (C) 2009-2019 Free Software Foundation, Inc.
+# Copyright (C) 2009-2020 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/memmem.c b/gnulib/import/memmem.c
index 12ae24f..6f65742 100644
--- a/gnulib/import/memmem.c
+++ b/gnulib/import/memmem.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-1994, 1996-1998, 2000, 2004, 2007-2019 Free Software
+/* Copyright (C) 1991-1994, 1996-1998, 2000, 2004, 2007-2020 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/gnulib/import/mempcpy.c b/gnulib/import/mempcpy.c
index d0220e1..fe832d7 100644
--- a/gnulib/import/mempcpy.c
+++ b/gnulib/import/mempcpy.c
@@ -1,5 +1,5 @@
/* Copy memory area and return pointer after last written byte.
- Copyright (C) 2003, 2007, 2009-2019 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2007, 2009-2020 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/memrchr.c b/gnulib/import/memrchr.c
index 9602283..7ff32e1 100644
--- a/gnulib/import/memrchr.c
+++ b/gnulib/import/memrchr.c
@@ -1,6 +1,6 @@
/* memrchr -- find the last occurrence of a byte in a memory block
- Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2019 Free Software
+ Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2020 Free Software
Foundation, Inc.
Based on strlen implementation by Torbjorn Granlund (tege@sics.se),
diff --git a/gnulib/import/mkdir.c b/gnulib/import/mkdir.c
index b8320d0..c0d4b61 100644
--- a/gnulib/import/mkdir.c
+++ b/gnulib/import/mkdir.c
@@ -1,7 +1,7 @@
/* On some systems, mkdir ("foo/", 0700) fails because of the trailing
slash. On those systems, this wrapper removes the trailing slash.
- Copyright (C) 2001, 2003, 2006, 2008-2019 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2003, 2006, 2008-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/mkdtemp.c b/gnulib/import/mkdtemp.c
index b1dd28d..6aae798 100644
--- a/gnulib/import/mkdtemp.c
+++ b/gnulib/import/mkdtemp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2001-2003, 2006-2007, 2009-2019 Free Software
+/* Copyright (C) 1999, 2001-2003, 2006-2007, 2009-2020 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/gnulib/import/mkostemp.c b/gnulib/import/mkostemp.c
index bbfe9db..46b58e1 100644
--- a/gnulib/import/mkostemp.c
+++ b/gnulib/import/mkostemp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998-1999, 2001, 2005-2007, 2009-2019 Free Software
+/* Copyright (C) 1998-1999, 2001, 2005-2007, 2009-2020 Free Software
Foundation, Inc.
This file is derived from the one in the GNU C Library.
diff --git a/gnulib/import/msvc-inval.c b/gnulib/import/msvc-inval.c
index 75b5a07..8636688 100644
--- a/gnulib/import/msvc-inval.c
+++ b/gnulib/import/msvc-inval.c
@@ -1,5 +1,5 @@
/* Invalid parameter handler for MSVC runtime libraries.
- Copyright (C) 2011-2019 Free Software Foundation, Inc.
+ Copyright (C) 2011-2020 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/msvc-inval.h b/gnulib/import/msvc-inval.h
index 9d3aa1f..93ee785 100644
--- a/gnulib/import/msvc-inval.h
+++ b/gnulib/import/msvc-inval.h
@@ -1,5 +1,5 @@
/* Invalid parameter handler for MSVC runtime libraries.
- Copyright (C) 2011-2019 Free Software Foundation, Inc.
+ Copyright (C) 2011-2020 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/msvc-nothrow.c b/gnulib/import/msvc-nothrow.c
index 49b709c..bf93b88 100644
--- a/gnulib/import/msvc-nothrow.c
+++ b/gnulib/import/msvc-nothrow.c
@@ -1,6 +1,6 @@
/* Wrappers that don't throw invalid parameter notifications
with MSVC runtime libraries.
- Copyright (C) 2011-2019 Free Software Foundation, Inc.
+ Copyright (C) 2011-2020 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/msvc-nothrow.h b/gnulib/import/msvc-nothrow.h
index 8d3ca78..fca54157 100644
--- a/gnulib/import/msvc-nothrow.h
+++ b/gnulib/import/msvc-nothrow.h
@@ -1,6 +1,6 @@
/* Wrappers that don't throw invalid parameter notifications
with MSVC runtime libraries.
- Copyright (C) 2011-2019 Free Software Foundation, Inc.
+ Copyright (C) 2011-2020 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/netinet_in.in.h b/gnulib/import/netinet_in.in.h
index 98575b2..84ad215 100644
--- a/gnulib/import/netinet_in.in.h
+++ b/gnulib/import/netinet_in.in.h
@@ -1,5 +1,5 @@
/* Substitute for <netinet/in.h>.
- Copyright (C) 2007-2019 Free Software Foundation, Inc.
+ Copyright (C) 2007-2020 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/open.c b/gnulib/import/open.c
index 0c2742b..487194f 100644
--- a/gnulib/import/open.c
+++ b/gnulib/import/open.c
@@ -1,5 +1,5 @@
/* Open a descriptor to a file.
- Copyright (C) 2007-2019 Free Software Foundation, Inc.
+ Copyright (C) 2007-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/openat-die.c b/gnulib/import/openat-die.c
index 690c447..fd96dd7 100644
--- a/gnulib/import/openat-die.c
+++ b/gnulib/import/openat-die.c
@@ -1,6 +1,6 @@
/* Report a save- or restore-cwd failure in our openat replacement and then exit.
- Copyright (C) 2005-2006, 2008-2019 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2008-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/openat-priv.h b/gnulib/import/openat-priv.h
index 7b90eef..5b824f7 100644
--- a/gnulib/import/openat-priv.h
+++ b/gnulib/import/openat-priv.h
@@ -1,6 +1,6 @@
/* Internals for openat-like functions.
- Copyright (C) 2005-2006, 2009-2019 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2009-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/openat-proc.c b/gnulib/import/openat-proc.c
index da76e2b..9111cd3 100644
--- a/gnulib/import/openat-proc.c
+++ b/gnulib/import/openat-proc.c
@@ -1,6 +1,6 @@
/* Create /proc/self/fd-related names for subfiles of open directories.
- Copyright (C) 2006, 2009-2019 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/openat.c b/gnulib/import/openat.c
index 8aaee49..d2c84e8 100644
--- a/gnulib/import/openat.c
+++ b/gnulib/import/openat.c
@@ -1,5 +1,5 @@
/* provide a replacement openat function
- Copyright (C) 2004-2019 Free Software Foundation, Inc.
+ Copyright (C) 2004-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/openat.h b/gnulib/import/openat.h
index f23b371..7589150 100644
--- a/gnulib/import/openat.h
+++ b/gnulib/import/openat.h
@@ -1,5 +1,5 @@
/* provide a replacement openat function
- Copyright (C) 2004-2006, 2008-2019 Free Software Foundation, Inc.
+ Copyright (C) 2004-2006, 2008-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/opendir.c b/gnulib/import/opendir.c
index 2eb96c6..162ae4a 100644
--- a/gnulib/import/opendir.c
+++ b/gnulib/import/opendir.c
@@ -1,5 +1,5 @@
/* Start reading the entries of a directory.
- Copyright (C) 2006-2019 Free Software Foundation, Inc.
+ Copyright (C) 2006-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/pathmax.h b/gnulib/import/pathmax.h
index 4287d15..15a236f 100644
--- a/gnulib/import/pathmax.h
+++ b/gnulib/import/pathmax.h
@@ -1,5 +1,5 @@
/* Define PATH_MAX somehow. Requires sys/types.h.
- Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2019 Free Software
+ Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2020 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
diff --git a/gnulib/import/pipe-safer.c b/gnulib/import/pipe-safer.c
index 6201739..5a597c5 100644
--- a/gnulib/import/pipe-safer.c
+++ b/gnulib/import/pipe-safer.c
@@ -1,5 +1,5 @@
/* Invoke pipe, but avoid some glitches.
- Copyright (C) 2005-2006, 2009-2019 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2009-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/rawmemchr.c b/gnulib/import/rawmemchr.c
index 7df6151..04bf084 100644
--- a/gnulib/import/rawmemchr.c
+++ b/gnulib/import/rawmemchr.c
@@ -1,5 +1,5 @@
/* Searching in a string.
- Copyright (C) 2008-2019 Free Software Foundation, Inc.
+ Copyright (C) 2008-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/rawmemchr.valgrind b/gnulib/import/rawmemchr.valgrind
index 3d91a72..53c5b31 100644
--- a/gnulib/import/rawmemchr.valgrind
+++ b/gnulib/import/rawmemchr.valgrind
@@ -1,6 +1,6 @@
# Suppress a valgrind message about use of uninitialized memory in rawmemchr().
-# Copyright (C) 2008-2019 Free Software Foundation, Inc.
+# Copyright (C) 2008-2020 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/readdir.c b/gnulib/import/readdir.c
index 200b6e5..1a02ce4 100644
--- a/gnulib/import/readdir.c
+++ b/gnulib/import/readdir.c
@@ -1,5 +1,5 @@
/* Read the next entry of a directory.
- Copyright (C) 2011-2019 Free Software Foundation, Inc.
+ Copyright (C) 2011-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/readlink.c b/gnulib/import/readlink.c
index bf71109..4d392ef 100644
--- a/gnulib/import/readlink.c
+++ b/gnulib/import/readlink.c
@@ -1,5 +1,5 @@
/* Stub for readlink().
- Copyright (C) 2003-2007, 2009-2019 Free Software Foundation, Inc.
+ Copyright (C) 2003-2007, 2009-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/realloc.c b/gnulib/import/realloc.c
index a81ce3b..a24054d 100644
--- a/gnulib/import/realloc.c
+++ b/gnulib/import/realloc.c
@@ -1,6 +1,6 @@
/* realloc() function that is glibc compatible.
- Copyright (C) 1997, 2003-2004, 2006-2007, 2009-2019 Free Software
+ Copyright (C) 1997, 2003-2004, 2006-2007, 2009-2020 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
diff --git a/gnulib/import/rename.c b/gnulib/import/rename.c
index 9d88e5c..09881e8 100644
--- a/gnulib/import/rename.c
+++ b/gnulib/import/rename.c
@@ -1,6 +1,6 @@
/* Work around rename bugs in some systems.
- Copyright (C) 2001-2003, 2005-2006, 2009-2019 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2005-2006, 2009-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/rewinddir.c b/gnulib/import/rewinddir.c
index b58a47d..d8ae714 100644
--- a/gnulib/import/rewinddir.c
+++ b/gnulib/import/rewinddir.c
@@ -1,5 +1,5 @@
/* Restart reading the entries of a directory from the beginning.
- Copyright (C) 2011-2019 Free Software Foundation, Inc.
+ Copyright (C) 2011-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/rmdir.c b/gnulib/import/rmdir.c
index 1d08822..2f517cc 100644
--- a/gnulib/import/rmdir.c
+++ b/gnulib/import/rmdir.c
@@ -1,6 +1,6 @@
/* Work around rmdir bugs.
- Copyright (C) 1988, 1990, 1999, 2003-2006, 2009-2019 Free Software
+ Copyright (C) 1988, 1990, 1999, 2003-2006, 2009-2020 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
diff --git a/gnulib/import/same-inode.h b/gnulib/import/same-inode.h
index 06655b6..09c339a 100644
--- a/gnulib/import/same-inode.h
+++ b/gnulib/import/same-inode.h
@@ -1,6 +1,6 @@
/* Determine whether two stat buffers are known to refer to the same file.
- Copyright (C) 2006, 2009-2019 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/save-cwd.c b/gnulib/import/save-cwd.c
index a67d95d..c2608d5 100644
--- a/gnulib/import/save-cwd.c
+++ b/gnulib/import/save-cwd.c
@@ -1,6 +1,6 @@
/* save-cwd.c -- Save and restore current working directory.
- Copyright (C) 1995, 1997-1998, 2003-2006, 2009-2019 Free Software
+ Copyright (C) 1995, 1997-1998, 2003-2006, 2009-2020 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
diff --git a/gnulib/import/save-cwd.h b/gnulib/import/save-cwd.h
index 6a78070..db8bfd2 100644
--- a/gnulib/import/save-cwd.h
+++ b/gnulib/import/save-cwd.h
@@ -1,6 +1,6 @@
/* Save and restore current working directory.
- Copyright (C) 1995, 1997-1998, 2003, 2009-2019 Free Software Foundation,
+ Copyright (C) 1995, 1997-1998, 2003, 2009-2020 Free Software Foundation,
Inc.
This program is free software: you can redistribute it and/or modify
diff --git a/gnulib/import/setenv.c b/gnulib/import/setenv.c
index 733b257..d03bc5a 100644
--- a/gnulib/import/setenv.c
+++ b/gnulib/import/setenv.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995-2003, 2005-2019 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995-2003, 2005-2020 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
diff --git a/gnulib/import/setlocale-lock.c b/gnulib/import/setlocale-lock.c
new file mode 100644
index 0000000..7dde32d
--- /dev/null
+++ b/gnulib/import/setlocale-lock.c
@@ -0,0 +1,150 @@
+/* Return the internal lock used by setlocale_null_r.
+ Copyright (C) 2019-2020 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 Bruno Haible <bruno@clisp.org>, 2019. */
+
+#include <config.h>
+
+/* When it is known that the gl_get_setlocale_null_lock function is defined
+ by a dependency library, it should not be defined here. */
+#if OMIT_SETLOCALE_LOCK
+
+/* This declaration is solely to ensure that after preprocessing
+ this file is never empty. */
+typedef int dummy;
+
+#else
+
+/* This file defines the internal lock used by setlocale_null_r.
+ It is a separate compilation unit, so that only one copy of it is
+ present when linking statically. */
+
+/* Prohibit renaming this symbol. */
+# undef gl_get_setlocale_null_lock
+
+/* Macro for exporting a symbol (function, not variable) defined in this file,
+ when compiled into a shared library. */
+# ifndef DLL_EXPORTED
+# if HAVE_VISIBILITY
+ /* Override the effect of the compiler option '-fvisibility=hidden'. */
+# define DLL_EXPORTED __attribute__((__visibility__("default")))
+# elif defined _WIN32 || defined __CYGWIN__
+# define DLL_EXPORTED __declspec(dllexport)
+# else
+# define DLL_EXPORTED
+# endif
+# endif
+
+# if defined _WIN32 && !defined __CYGWIN__
+
+# define WIN32_LEAN_AND_MEAN /* avoid including junk */
+# include <windows.h>
+
+# include "windows-initguard.h"
+
+/* The return type is a 'CRITICAL_SECTION *', not a 'glwthread_mutex_t *',
+ because the latter is not guaranteed to be a stable ABI in the future. */
+
+/* Make sure the function gets exported from DLLs. */
+DLL_EXPORTED CRITICAL_SECTION *gl_get_setlocale_null_lock (void);
+
+static glwthread_initguard_t guard = GLWTHREAD_INITGUARD_INIT;
+static CRITICAL_SECTION lock;
+
+/* Returns the internal lock used by setlocale_null_r. */
+CRITICAL_SECTION *
+gl_get_setlocale_null_lock (void)
+{
+ if (!guard.done)
+ {
+ if (InterlockedIncrement (&guard.started) == 0)
+ {
+ /* This thread is the first one to need the lock. Initialize it. */
+ InitializeCriticalSection (&lock);
+ guard.done = 1;
+ }
+ else
+ {
+ /* Don't let guard.started grow and wrap around. */
+ InterlockedDecrement (&guard.started);
+ /* Yield the CPU while waiting for another thread to finish
+ initializing this mutex. */
+ while (!guard.done)
+ Sleep (0);
+ }
+ }
+ return &lock;
+}
+
+# elif HAVE_PTHREAD_API
+
+# include <pthread.h>
+
+static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
+
+/* Make sure the function gets exported from shared libraries. */
+DLL_EXPORTED pthread_mutex_t *gl_get_setlocale_null_lock (void);
+
+/* Returns the internal lock used by setlocale_null_r. */
+pthread_mutex_t *
+gl_get_setlocale_null_lock (void)
+{
+ return &mutex;
+}
+
+# elif HAVE_THREADS_H
+
+# include <threads.h>
+# include <stdlib.h>
+
+static int volatile init_needed = 1;
+static once_flag init_once = ONCE_FLAG_INIT;
+static mtx_t mutex;
+
+static void
+atomic_init (void)
+{
+ if (mtx_init (&mutex, mtx_plain) != thrd_success)
+ abort ();
+ init_needed = 0;
+}
+
+/* Make sure the function gets exported from shared libraries. */
+DLL_EXPORTED mtx_t *gl_get_setlocale_null_lock (void);
+
+/* Returns the internal lock used by setlocale_null_r. */
+mtx_t *
+gl_get_setlocale_null_lock (void)
+{
+ if (init_needed)
+ call_once (&init_once, atomic_init);
+ return &mutex;
+}
+
+# endif
+
+# if (defined _WIN32 || defined __CYGWIN__) && !defined _MSC_VER
+/* Make sure the '__declspec(dllimport)' in setlocale_null.c does not cause
+ a link failure when no DLLs are involved. */
+# if defined _WIN64 || defined _LP64
+# define IMP(x) __imp_##x
+# else
+# define IMP(x) _imp__##x
+# endif
+void * IMP(gl_get_setlocale_null_lock) = &gl_get_setlocale_null_lock;
+# endif
+
+#endif
diff --git a/gnulib/import/setlocale_null.c b/gnulib/import/setlocale_null.c
new file mode 100644
index 0000000..abe55b5
--- /dev/null
+++ b/gnulib/import/setlocale_null.c
@@ -0,0 +1,411 @@
+/* Query the name of the current global locale.
+ Copyright (C) 2019-2020 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 Bruno Haible <bruno@clisp.org>, 2019. */
+
+#include <config.h>
+
+/* Specification. */
+#include "setlocale_null.h"
+
+#include <errno.h>
+#include <locale.h>
+#include <stdlib.h>
+#include <string.h>
+#if defined _WIN32 && !defined __CYGWIN__
+# include <wchar.h>
+#endif
+
+#if !(SETLOCALE_NULL_ALL_MTSAFE && SETLOCALE_NULL_ONE_MTSAFE)
+# if defined _WIN32 && !defined __CYGWIN__
+
+# define WIN32_LEAN_AND_MEAN /* avoid including junk */
+# include <windows.h>
+
+# elif HAVE_PTHREAD_API
+
+# include <pthread.h>
+# if HAVE_THREADS_H && HAVE_WEAK_SYMBOLS
+# include <threads.h>
+# pragma weak thrd_exit
+# define c11_threads_in_use() (thrd_exit != NULL)
+# else
+# define c11_threads_in_use() 0
+# endif
+
+# elif HAVE_THREADS_H
+
+# include <threads.h>
+
+# endif
+#endif
+
+/* Use the system's setlocale() function, not the gnulib override, here. */
+#undef setlocale
+
+static const char *
+setlocale_null_androidfix (int category)
+{
+ const char *result = setlocale (category, NULL);
+
+#ifdef __ANDROID__
+ if (result == NULL)
+ switch (category)
+ {
+ case LC_CTYPE:
+ case LC_NUMERIC:
+ case LC_TIME:
+ case LC_COLLATE:
+ case LC_MONETARY:
+ case LC_MESSAGES:
+ case LC_ALL:
+ case LC_PAPER:
+ case LC_NAME:
+ case LC_ADDRESS:
+ case LC_TELEPHONE:
+ case LC_MEASUREMENT:
+ result = "C";
+ break;
+ default:
+ break;
+ }
+#endif
+
+ return result;
+}
+
+static int
+setlocale_null_unlocked (int category, char *buf, size_t bufsize)
+{
+#if defined _WIN32 && !defined __CYGWIN__ && defined _MSC_VER
+ /* On native Windows, nowadays, the setlocale() implementation is based
+ on _wsetlocale() and uses malloc() for the result. We are better off
+ using _wsetlocale() directly. */
+ const wchar_t *result = _wsetlocale (category, NULL);
+
+ if (result == NULL)
+ {
+ /* CATEGORY is invalid. */
+ if (bufsize > 0)
+ /* Return an empty string in BUF.
+ This is a convenience for callers that don't want to write explicit
+ code for handling EINVAL. */
+ buf[0] = '\0';
+ return EINVAL;
+ }
+ else
+ {
+ size_t length = wcslen (result);
+ if (length < bufsize)
+ {
+ size_t i;
+
+ /* Convert wchar_t[] -> char[], assuming plain ASCII. */
+ for (i = 0; i <= length; i++)
+ buf[i] = result[i];
+
+ return 0;
+ }
+ else
+ {
+ if (bufsize > 0)
+ {
+ /* Return a truncated result in BUF.
+ This is a convenience for callers that don't want to write
+ explicit code for handling ERANGE. */
+ size_t i;
+
+ /* Convert wchar_t[] -> char[], assuming plain ASCII. */
+ for (i = 0; i < bufsize; i++)
+ buf[i] = result[i];
+ buf[bufsize - 1] = '\0';
+ }
+ return ERANGE;
+ }
+ }
+#else
+ const char *result = setlocale_null_androidfix (category);
+
+ if (result == NULL)
+ {
+ /* CATEGORY is invalid. */
+ if (bufsize > 0)
+ /* Return an empty string in BUF.
+ This is a convenience for callers that don't want to write explicit
+ code for handling EINVAL. */
+ buf[0] = '\0';
+ return EINVAL;
+ }
+ else
+ {
+ size_t length = strlen (result);
+ if (length < bufsize)
+ {
+ memcpy (buf, result, length + 1);
+ return 0;
+ }
+ else
+ {
+ if (bufsize > 0)
+ {
+ /* Return a truncated result in BUF.
+ This is a convenience for callers that don't want to write
+ explicit code for handling ERANGE. */
+ memcpy (buf, result, bufsize - 1);
+ buf[bufsize - 1] = '\0';
+ }
+ return ERANGE;
+ }
+ }
+#endif
+}
+
+#if !(SETLOCALE_NULL_ALL_MTSAFE && SETLOCALE_NULL_ONE_MTSAFE) /* musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin */
+
+/* Use a lock, so that no two threads can invoke setlocale_null_unlocked
+ at the same time. */
+
+/* Prohibit renaming this symbol. */
+# undef gl_get_setlocale_null_lock
+
+# if defined _WIN32 && !defined __CYGWIN__
+
+extern __declspec(dllimport) CRITICAL_SECTION *gl_get_setlocale_null_lock (void);
+
+static int
+setlocale_null_with_lock (int category, char *buf, size_t bufsize)
+{
+ CRITICAL_SECTION *lock = gl_get_setlocale_null_lock ();
+ int ret;
+
+ EnterCriticalSection (lock);
+ ret = setlocale_null_unlocked (category, buf, bufsize);
+ LeaveCriticalSection (lock);
+
+ return ret;
+}
+
+# elif HAVE_PTHREAD_API /* musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin */
+
+extern
+# if defined _WIN32 || defined __CYGWIN__
+ __declspec(dllimport)
+# endif
+ pthread_mutex_t *gl_get_setlocale_null_lock (void);
+
+# if HAVE_WEAK_SYMBOLS /* musl libc, FreeBSD, NetBSD, OpenBSD, Haiku */
+
+ /* Avoid the need to link with '-lpthread'. */
+# pragma weak pthread_mutex_lock
+# pragma weak pthread_mutex_unlock
+
+ /* Determine whether libpthread is in use. */
+# pragma weak pthread_mutexattr_gettype
+ /* See the comments in lock.h. */
+# define pthread_in_use() \
+ (pthread_mutexattr_gettype != NULL || c11_threads_in_use ())
+
+# else
+# define pthread_in_use() 1
+# endif
+
+static int
+setlocale_null_with_lock (int category, char *buf, size_t bufsize)
+{
+ if (pthread_in_use())
+ {
+ pthread_mutex_t *lock = gl_get_setlocale_null_lock ();
+ int ret;
+
+ if (pthread_mutex_lock (lock))
+ abort ();
+ ret = setlocale_null_unlocked (category, buf, bufsize);
+ if (pthread_mutex_unlock (lock))
+ abort ();
+
+ return ret;
+ }
+ else
+ return setlocale_null_unlocked (category, buf, bufsize);
+}
+
+# elif HAVE_THREADS_H
+
+extern mtx_t *gl_get_setlocale_null_lock (void);
+
+static int
+setlocale_null_with_lock (int category, char *buf, size_t bufsize)
+{
+ mtx_t *lock = gl_get_setlocale_null_lock ();
+ int ret;
+
+ if (mtx_lock (lock) != thrd_success)
+ abort ();
+ ret = setlocale_null_unlocked (category, buf, bufsize);
+ if (mtx_unlock (lock) != thrd_success)
+ abort ();
+
+ return ret;
+}
+
+# endif
+
+#endif
+
+int
+setlocale_null_r (int category, char *buf, size_t bufsize)
+{
+#if SETLOCALE_NULL_ALL_MTSAFE
+# if SETLOCALE_NULL_ONE_MTSAFE
+
+ return setlocale_null_unlocked (category, buf, bufsize);
+
+# else
+
+ if (category == LC_ALL)
+ return setlocale_null_unlocked (category, buf, bufsize);
+ else
+ return setlocale_null_with_lock (category, buf, bufsize);
+
+# endif
+#else
+# if SETLOCALE_NULL_ONE_MTSAFE
+
+ if (category == LC_ALL)
+ return setlocale_null_with_lock (category, buf, bufsize);
+ else
+ return setlocale_null_unlocked (category, buf, bufsize);
+
+# else
+
+ return setlocale_null_with_lock (category, buf, bufsize);
+
+# endif
+#endif
+}
+
+const char *
+setlocale_null (int category)
+{
+#if SETLOCALE_NULL_ALL_MTSAFE && SETLOCALE_NULL_ONE_MTSAFE
+ return setlocale_null_androidfix (category);
+#else
+
+ /* This call must be multithread-safe. To achieve this without using
+ thread-local storage:
+ 1. We use a specific static buffer for each possible CATEGORY
+ argument. So that different threads can call setlocale_mtsafe
+ with different CATEGORY arguments, without interfering.
+ 2. We use a simple strcpy or memcpy to fill this static buffer.
+ Filling it through, for example, strcpy + strcat would not be
+ guaranteed to leave the buffer's contents intact if another thread
+ is currently accessing it. If necessary, the contents is first
+ assembled in a stack-allocated buffer. */
+ if (category == LC_ALL)
+ {
+# if SETLOCALE_NULL_ALL_MTSAFE
+ return setlocale_null_androidfix (LC_ALL);
+# else
+ char buf[SETLOCALE_NULL_ALL_MAX];
+ static char resultbuf[SETLOCALE_NULL_ALL_MAX];
+
+ if (setlocale_null_r (LC_ALL, buf, sizeof (buf)))
+ return "C";
+ strcpy (resultbuf, buf);
+ return resultbuf;
+# endif
+ }
+ else
+ {
+# if SETLOCALE_NULL_ONE_MTSAFE
+ return setlocale_null_androidfix (category);
+# else
+ enum
+ {
+ LC_CTYPE_INDEX,
+ LC_NUMERIC_INDEX,
+ LC_TIME_INDEX,
+ LC_COLLATE_INDEX,
+ LC_MONETARY_INDEX,
+ LC_MESSAGES_INDEX,
+# ifdef LC_PAPER
+ LC_PAPER_INDEX,
+# endif
+# ifdef LC_NAME
+ LC_NAME_INDEX,
+# endif
+# ifdef LC_ADDRESS
+ LC_ADDRESS_INDEX,
+# endif
+# ifdef LC_TELEPHONE
+ LC_TELEPHONE_INDEX,
+# endif
+# ifdef LC_MEASUREMENT
+ LC_MEASUREMENT_INDEX,
+# endif
+# ifdef LC_IDENTIFICATION
+ LC_IDENTIFICATION_INDEX,
+# endif
+ LC_INDICES_COUNT
+ }
+ i;
+ char buf[SETLOCALE_NULL_MAX];
+ static char resultbuf[LC_INDICES_COUNT][SETLOCALE_NULL_MAX];
+ int err;
+
+ err = setlocale_null_r (category, buf, sizeof (buf));
+ if (err == EINVAL)
+ return NULL;
+ if (err)
+ return "C";
+
+ switch (category)
+ {
+ case LC_CTYPE: i = LC_CTYPE_INDEX; break;
+ case LC_NUMERIC: i = LC_NUMERIC_INDEX; break;
+ case LC_TIME: i = LC_TIME_INDEX; break;
+ case LC_COLLATE: i = LC_COLLATE_INDEX; break;
+ case LC_MONETARY: i = LC_MONETARY_INDEX; break;
+ case LC_MESSAGES: i = LC_MESSAGES_INDEX; break;
+# ifdef LC_PAPER
+ case LC_PAPER: i = LC_PAPER_INDEX; break;
+# endif
+# ifdef LC_NAME
+ case LC_NAME: i = LC_NAME_INDEX; break;
+# endif
+# ifdef LC_ADDRESS
+ case LC_ADDRESS: i = LC_ADDRESS_INDEX; break;
+# endif
+# ifdef LC_TELEPHONE
+ case LC_TELEPHONE: i = LC_TELEPHONE_INDEX; break;
+# endif
+# ifdef LC_MEASUREMENT
+ case LC_MEASUREMENT: i = LC_MEASUREMENT_INDEX; break;
+# endif
+# ifdef LC_IDENTIFICATION
+ case LC_IDENTIFICATION: i = LC_IDENTIFICATION_INDEX; break;
+# endif
+ default:
+ /* If you get here, a #ifdef LC_xxx is missing. */
+ abort ();
+ }
+
+ strcpy (resultbuf[i], buf);
+ return resultbuf[i];
+# endif
+ }
+#endif
+}
diff --git a/gnulib/import/setlocale_null.h b/gnulib/import/setlocale_null.h
new file mode 100644
index 0000000..6844be5
--- /dev/null
+++ b/gnulib/import/setlocale_null.h
@@ -0,0 +1,82 @@
+/* Query the name of the current global locale.
+ Copyright (C) 2019-2020 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 Bruno Haible <bruno@clisp.org>, 2019. */
+
+#ifndef _SETLOCALE_NULL_H
+#define _SETLOCALE_NULL_H
+
+#include <stddef.h>
+
+#include "arg-nonnull.h"
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* Recommended size of a buffer for a locale name for a single category.
+ On glibc systems, you can have locale names that are relative file names;
+ assume a maximum length 256.
+ In native Windows, in 2018 the longest locale name was of length 58
+ ("FYRO Macedonian_Former Yugoslav Republic of Macedonia.1251"). */
+#define SETLOCALE_NULL_MAX (256+1)
+
+/* Recommended size of a buffer for a locale name with all categories.
+ On glibc systems, you can have locale names that are relative file names;
+ assume maximum length 256 for each. There are 12 categories; so, the
+ maximum total length is 148+12*256.
+ In native Windows, there are 5 categories, and the maximum total length is
+ 55+5*58. */
+#define SETLOCALE_NULL_ALL_MAX (148+12*256+1)
+
+/* setlocale_null_r (CATEGORY, BUF, BUFSIZE) is like setlocale (CATEGORY, NULL),
+ except that
+ - it is guaranteed to be multithread-safe,
+ - it returns the resulting locale category name or locale name in the
+ user-supplied buffer BUF, which must be BUFSIZE bytes long.
+ The recommended minimum buffer size is
+ - SETLOCALE_NULL_MAX for CATEGORY != LC_ALL, and
+ - SETLOCALE_NULL_ALL_MAX for CATEGORY == LC_ALL.
+ The return value is an error code: 0 if the call is successful, EINVAL if
+ CATEGORY is invalid, or ERANGE if BUFSIZE is smaller than the length needed
+ size (including the trailing NUL byte). In the latter case, a truncated
+ result is returned in BUF, but still NUL-terminated if BUFSIZE > 0.
+ For this call to be multithread-safe, *all* calls to
+ setlocale (CATEGORY, NULL) in all other threads must have been converted
+ to use setlocale_null_r or setlocale_null as well, and the other threads
+ must not make other setlocale invocations (since changing the global locale
+ has side effects on all threads). */
+extern int setlocale_null_r (int category, char *buf, size_t bufsize)
+ _GL_ARG_NONNULL ((2));
+
+/* setlocale_null (CATEGORY) is like setlocale (CATEGORY, NULL), except that
+ it is guaranteed to be multithread-safe.
+ The return value is NULL if CATEGORY is invalid.
+ For this call to be multithread-safe, *all* calls to
+ setlocale (CATEGORY, NULL) in all other threads must have been converted
+ to use setlocale_null_r or setlocale_null as well, and the other threads
+ must not make other setlocale invocations (since changing the global locale
+ has side effects on all threads). */
+extern const char *setlocale_null (int category);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _SETLOCALE_NULL_H */
diff --git a/gnulib/import/signal.in.h b/gnulib/import/signal.in.h
index 5b36c25..9fe9f60 100644
--- a/gnulib/import/signal.in.h
+++ b/gnulib/import/signal.in.h
@@ -1,6 +1,6 @@
/* A GNU-like <signal.h>.
- Copyright (C) 2006-2019 Free Software Foundation, Inc.
+ Copyright (C) 2006-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/stat-time.h b/gnulib/import/stat-time.h
index 38a1f55..884ffd8 100644
--- a/gnulib/import/stat-time.h
+++ b/gnulib/import/stat-time.h
@@ -1,6 +1,6 @@
/* stat-related time functions.
- Copyright (C) 2005, 2007, 2009-2019 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2007, 2009-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/stat-w32.c b/gnulib/import/stat-w32.c
index 60fe5f6..296ccf1 100644
--- a/gnulib/import/stat-w32.c
+++ b/gnulib/import/stat-w32.c
@@ -1,5 +1,5 @@
/* Core of implementation of fstat and stat for native Windows.
- Copyright (C) 2017-2019 Free Software Foundation, Inc.
+ Copyright (C) 2017-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/stat-w32.h b/gnulib/import/stat-w32.h
index 6b961d7..491a754 100644
--- a/gnulib/import/stat-w32.h
+++ b/gnulib/import/stat-w32.h
@@ -1,5 +1,5 @@
/* Core of implementation of fstat and stat for native Windows.
- Copyright (C) 2017-2019 Free Software Foundation, Inc.
+ Copyright (C) 2017-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/stat.c b/gnulib/import/stat.c
index e3248a8..e074e6a 100644
--- a/gnulib/import/stat.c
+++ b/gnulib/import/stat.c
@@ -1,5 +1,5 @@
/* Work around platform bugs in stat.
- Copyright (C) 2009-2019 Free Software Foundation, Inc.
+ Copyright (C) 2009-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/stdalign.in.h b/gnulib/import/stdalign.in.h
index c20cf02..cd786be 100644
--- a/gnulib/import/stdalign.in.h
+++ b/gnulib/import/stdalign.in.h
@@ -1,6 +1,6 @@
/* A substitute for ISO C11 <stdalign.h>.
- Copyright 2011-2019 Free Software Foundation, Inc.
+ Copyright 2011-2020 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/stdbool.in.h b/gnulib/import/stdbool.in.h
index 8158b00..baacf98 100644
--- a/gnulib/import/stdbool.in.h
+++ b/gnulib/import/stdbool.in.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2003, 2006-2019 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2003, 2006-2020 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2001.
This program is free software; you can redistribute it and/or modify
diff --git a/gnulib/import/stddef.in.h b/gnulib/import/stddef.in.h
index 6760561..2e50a1f 100644
--- a/gnulib/import/stddef.in.h
+++ b/gnulib/import/stddef.in.h
@@ -1,6 +1,6 @@
/* A substitute for POSIX 2008 <stddef.h>, for platforms that have issues.
- Copyright (C) 2009-2019 Free Software Foundation, Inc.
+ Copyright (C) 2009-2020 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/stdint.in.h b/gnulib/import/stdint.in.h
index 39b6a4f..994c0c7 100644
--- a/gnulib/import/stdint.in.h
+++ b/gnulib/import/stdint.in.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2002, 2004-2019 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2002, 2004-2020 Free Software Foundation, Inc.
Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood.
This file is part of gnulib.
@@ -188,7 +188,7 @@ typedef long int gl_int64_t;
typedef __int64 gl_int64_t;
# define int64_t gl_int64_t
# define GL_INT64_T
-# elif @HAVE_LONG_LONG_INT@
+# else
# undef int64_t
typedef long long int gl_int64_t;
# define int64_t gl_int64_t
@@ -209,7 +209,7 @@ typedef unsigned long int gl_uint64_t;
typedef unsigned __int64 gl_uint64_t;
# define uint64_t gl_uint64_t
# define GL_UINT64_T
-# elif @HAVE_UNSIGNED_LONG_LONG_INT@
+# else
# undef uint64_t
typedef unsigned long long int gl_uint64_t;
# define uint64_t gl_uint64_t
@@ -333,7 +333,7 @@ typedef unsigned long int gl_uintptr_t;
# ifndef INTMAX_MAX
# undef INTMAX_C
# undef intmax_t
-# if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
+# if LONG_MAX >> 30 == 1
typedef long long int gl_intmax_t;
# define intmax_t gl_intmax_t
# elif defined GL_INT64_T
@@ -347,7 +347,7 @@ typedef long int gl_intmax_t;
# ifndef UINTMAX_MAX
# undef UINTMAX_C
# undef uintmax_t
-# if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
+# if ULONG_MAX >> 31 == 1
typedef unsigned long long int gl_uintmax_t;
# define uintmax_t gl_uintmax_t
# elif defined GL_UINT64_T
@@ -647,21 +647,21 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t)
# define INT64_C(x) x##L
# elif defined _MSC_VER
# define INT64_C(x) x##i64
-# elif @HAVE_LONG_LONG_INT@
+# else
# define INT64_C(x) x##LL
# endif
# if ULONG_MAX >> 31 >> 31 >> 1 == 1
# define UINT64_C(x) x##UL
# elif defined _MSC_VER
# define UINT64_C(x) x##ui64
-# elif @HAVE_UNSIGNED_LONG_LONG_INT@
+# else
# define UINT64_C(x) x##ULL
# endif
/* 7.18.4.2. Macros for greatest-width integer constants */
# ifndef INTMAX_C
-# if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
+# if LONG_MAX >> 30 == 1
# define INTMAX_C(x) x##LL
# elif defined GL_INT64_T
# define INTMAX_C(x) INT64_C(x)
@@ -671,7 +671,7 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t)
# endif
# ifndef UINTMAX_C
-# if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
+# if ULONG_MAX >> 31 == 1
# define UINTMAX_C(x) x##ULL
# elif defined GL_UINT64_T
# define UINTMAX_C(x) UINT64_C(x)
diff --git a/gnulib/import/stdio.in.h b/gnulib/import/stdio.in.h
index 92328bf..ebcbfaf 100644
--- a/gnulib/import/stdio.in.h
+++ b/gnulib/import/stdio.in.h
@@ -1,6 +1,6 @@
/* A GNU-like <stdio.h>.
- Copyright (C) 2004, 2007-2019 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2007-2020 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/stdlib.in.h b/gnulib/import/stdlib.in.h
index 5edae2c..49bbf6f 100644
--- a/gnulib/import/stdlib.in.h
+++ b/gnulib/import/stdlib.in.h
@@ -1,6 +1,6 @@
/* A GNU-like <stdlib.h>.
- Copyright (C) 1995, 2001-2004, 2006-2019 Free Software Foundation, Inc.
+ Copyright (C) 1995, 2001-2004, 2006-2020 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
@@ -201,6 +201,10 @@ _GL_FUNCDECL_SYS (canonicalize_file_name, char *, (const char *name)
# endif
_GL_CXXALIAS_SYS (canonicalize_file_name, char *, (const char *name));
# endif
+# ifndef GNULIB_defined_canonicalize_file_name
+# define GNULIB_defined_canonicalize_file_name \
+ (!@HAVE_CANONICALIZE_FILE_NAME@ || @REPLACE_CANONICALIZE_FILE_NAME@)
+# endif
_GL_CXXALIASWARN (canonicalize_file_name);
#elif defined GNULIB_POSIXCHECK
# undef canonicalize_file_name
@@ -516,6 +520,9 @@ _GL_FUNCDECL_SYS (ptsname_r, int, (int fd, char *buf, size_t len));
# endif
_GL_CXXALIAS_SYS (ptsname_r, int, (int fd, char *buf, size_t len));
# endif
+# ifndef GNULIB_defined_ptsname_r
+# define GNULIB_defined_ptsname_r (!@HAVE_PTSNAME_R@ || @REPLACE_PTSNAME_R@)
+# endif
_GL_CXXALIASWARN (ptsname_r);
#elif defined GNULIB_POSIXCHECK
# undef ptsname_r
diff --git a/gnulib/import/str-two-way.h b/gnulib/import/str-two-way.h
index 30806d2..6ad0130 100644
--- a/gnulib/import/str-two-way.h
+++ b/gnulib/import/str-two-way.h
@@ -1,5 +1,5 @@
/* Byte-wise substring search, using the Two-Way algorithm.
- Copyright (C) 2008-2019 Free Software Foundation, Inc.
+ Copyright (C) 2008-2020 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Eric Blake <ebb9@byu.net>, 2008.
diff --git a/gnulib/import/strchrnul.c b/gnulib/import/strchrnul.c
index 0f5dd81..858d66f 100644
--- a/gnulib/import/strchrnul.c
+++ b/gnulib/import/strchrnul.c
@@ -1,5 +1,5 @@
/* Searching in a string.
- Copyright (C) 2003, 2007-2019 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2007-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/strchrnul.valgrind b/gnulib/import/strchrnul.valgrind
index 781d037..a85608a 100644
--- a/gnulib/import/strchrnul.valgrind
+++ b/gnulib/import/strchrnul.valgrind
@@ -1,6 +1,6 @@
# Suppress a valgrind message about use of uninitialized memory in strchrnul().
-# Copyright (C) 2008-2019 Free Software Foundation, Inc.
+# Copyright (C) 2008-2020 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/strdup.c b/gnulib/import/strdup.c
index 717cf65..4da6007 100644
--- a/gnulib/import/strdup.c
+++ b/gnulib/import/strdup.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1996-1998, 2002-2004, 2006-2007, 2009-2019 Free Software
+/* Copyright (C) 1991, 1996-1998, 2002-2004, 2006-2007, 2009-2020 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/gnulib/import/streq.h b/gnulib/import/streq.h
index 326537b..d06c272 100644
--- a/gnulib/import/streq.h
+++ b/gnulib/import/streq.h
@@ -1,5 +1,5 @@
/* Optimized string comparison.
- Copyright (C) 2001-2002, 2007, 2009-2019 Free Software Foundation, Inc.
+ Copyright (C) 2001-2002, 2007, 2009-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published
diff --git a/gnulib/import/strerror-override.c b/gnulib/import/strerror-override.c
index 558a010..61b7689 100644
--- a/gnulib/import/strerror-override.c
+++ b/gnulib/import/strerror-override.c
@@ -1,6 +1,6 @@
/* strerror-override.c --- POSIX compatible system error routine
- Copyright (C) 2010-2019 Free Software Foundation, Inc.
+ Copyright (C) 2010-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/strerror-override.h b/gnulib/import/strerror-override.h
index 255febc..062f51c 100644
--- a/gnulib/import/strerror-override.h
+++ b/gnulib/import/strerror-override.h
@@ -1,6 +1,6 @@
/* strerror-override.h --- POSIX compatible system error routine
- Copyright (C) 2010-2019 Free Software Foundation, Inc.
+ Copyright (C) 2010-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/strerror.c b/gnulib/import/strerror.c
index f5900fd..1a53a8b 100644
--- a/gnulib/import/strerror.c
+++ b/gnulib/import/strerror.c
@@ -1,6 +1,6 @@
/* strerror.c --- POSIX compatible system error routine
- Copyright (C) 2007-2019 Free Software Foundation, Inc.
+ Copyright (C) 2007-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/strerror_r.c b/gnulib/import/strerror_r.c
index 85b9c6b..9ccc6c3 100644
--- a/gnulib/import/strerror_r.c
+++ b/gnulib/import/strerror_r.c
@@ -1,6 +1,6 @@
/* strerror_r.c --- POSIX compatible system error routine
- Copyright (C) 2010-2019 Free Software Foundation, Inc.
+ Copyright (C) 2010-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/string.in.h b/gnulib/import/string.in.h
index 9b8ced2..2c04e5f 100644
--- a/gnulib/import/string.in.h
+++ b/gnulib/import/string.in.h
@@ -1,6 +1,6 @@
/* A GNU-like <string.h>.
- Copyright (C) 1995-1996, 2001-2019 Free Software Foundation, Inc.
+ Copyright (C) 1995-1996, 2001-2020 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/stripslash.c b/gnulib/import/stripslash.c
index dfc15b4..6818b30 100644
--- a/gnulib/import/stripslash.c
+++ b/gnulib/import/stripslash.c
@@ -1,6 +1,6 @@
/* stripslash.c -- remove redundant trailing slashes from a file name
- Copyright (C) 1990, 2001, 2003-2006, 2009-2019 Free Software Foundation,
+ Copyright (C) 1990, 2001, 2003-2006, 2009-2020 Free Software Foundation,
Inc.
This program is free software: you can redistribute it and/or modify
diff --git a/gnulib/import/strnlen1.c b/gnulib/import/strnlen1.c
index 666a557..88edc18 100644
--- a/gnulib/import/strnlen1.c
+++ b/gnulib/import/strnlen1.c
@@ -1,5 +1,5 @@
/* Find the length of STRING + 1, but scan at most MAXLEN bytes.
- Copyright (C) 2005-2006, 2009-2019 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2009-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/strnlen1.h b/gnulib/import/strnlen1.h
index 5d95244..2e21fea 100644
--- a/gnulib/import/strnlen1.h
+++ b/gnulib/import/strnlen1.h
@@ -1,5 +1,5 @@
/* Find the length of STRING + 1, but scan at most MAXLEN bytes.
- Copyright (C) 2005, 2009-2019 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2009-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/strstr.c b/gnulib/import/strstr.c
index df3fdd2..2f8ae46 100644
--- a/gnulib/import/strstr.c
+++ b/gnulib/import/strstr.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-1994, 1996-1998, 2000, 2004, 2007-2019 Free Software
+/* Copyright (C) 1991-1994, 1996-1998, 2000, 2004, 2007-2020 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/gnulib/import/strtok_r.c b/gnulib/import/strtok_r.c
index d043ec7..1870a0a 100644
--- a/gnulib/import/strtok_r.c
+++ b/gnulib/import/strtok_r.c
@@ -1,5 +1,5 @@
/* Reentrant string tokenizer. Generic version.
- Copyright (C) 1991, 1996-1999, 2001, 2004, 2007, 2009-2019 Free Software
+ Copyright (C) 1991, 1996-1999, 2001, 2004, 2007, 2009-2020 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/gnulib/import/sys_socket.in.h b/gnulib/import/sys_socket.in.h
index dbcc3ef..41f71f6 100644
--- a/gnulib/import/sys_socket.in.h
+++ b/gnulib/import/sys_socket.in.h
@@ -1,6 +1,6 @@
/* Provide a sys/socket header file for systems lacking it (read: MinGW)
and for systems where it is incomplete.
- Copyright (C) 2005-2019 Free Software Foundation, Inc.
+ Copyright (C) 2005-2020 Free Software Foundation, Inc.
Written by Simon Josefsson.
This program is free software; you can redistribute it and/or modify
diff --git a/gnulib/import/sys_stat.in.h b/gnulib/import/sys_stat.in.h
index 9ddd1a8..e3ab315 100644
--- a/gnulib/import/sys_stat.in.h
+++ b/gnulib/import/sys_stat.in.h
@@ -1,5 +1,5 @@
/* Provide a more complete sys/stat.h header file.
- Copyright (C) 2005-2019 Free Software Foundation, Inc.
+ Copyright (C) 2005-2020 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
@@ -392,13 +392,25 @@ struct stat
#if @GNULIB_FCHMODAT@
-# if !@HAVE_FCHMODAT@
+# if @REPLACE_FCHMODAT@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef fchmodat
+# define fchmodat rpl_fchmodat
+# endif
+_GL_FUNCDECL_RPL (fchmodat, int,
+ (int fd, char const *file, mode_t mode, int flag)
+ _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (fchmodat, int,
+ (int fd, char const *file, mode_t mode, int flag));
+# else
+# if !@HAVE_FCHMODAT@
_GL_FUNCDECL_SYS (fchmodat, int,
(int fd, char const *file, mode_t mode, int flag)
_GL_ARG_NONNULL ((2)));
-# endif
+# endif
_GL_CXXALIAS_SYS (fchmodat, int,
(int fd, char const *file, mode_t mode, int flag));
+# endif
_GL_CXXALIASWARN (fchmodat);
#elif defined GNULIB_POSIXCHECK
# undef fchmodat
@@ -502,31 +514,24 @@ _GL_WARN_ON_USE (futimens, "futimens is not portable - "
#if @GNULIB_LCHMOD@
/* Change the mode of FILENAME to MODE, without dereferencing it if FILENAME
denotes a symbolic link. */
-# if !@HAVE_LCHMOD@
-/* The lchmod replacement follows symbolic links. Callers should take
- this into account; lchmod should be applied only to arguments that
- are known to not be symbolic links. On hosts that lack lchmod,
- this can lead to race conditions between the check and the
- invocation of lchmod, but we know of no workarounds that are
- reliable in general. You might try requesting support for lchmod
- from your operating system supplier. */
+# if @REPLACE_LCHMOD@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-# define lchmod chmod
+# undef lchmod
+# define lchmod rpl_lchmod
# endif
-/* Need to cast, because on mingw, the second parameter of chmod is
- int mode. */
-_GL_CXXALIAS_RPL_CAST_1 (lchmod, chmod, int,
- (const char *filename, mode_t mode));
+_GL_FUNCDECL_RPL (lchmod, int,
+ (char const *filename, mode_t mode)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (lchmod, int,
+ (char const *filename, mode_t mode));
# else
-# if 0 /* assume already declared */
+# if !@HAVE_LCHMOD@ || defined __hpux
_GL_FUNCDECL_SYS (lchmod, int, (const char *filename, mode_t mode)
_GL_ARG_NONNULL ((1)));
# endif
_GL_CXXALIAS_SYS (lchmod, int, (const char *filename, mode_t mode));
# endif
-# if @HAVE_LCHMOD@
_GL_CXXALIASWARN (lchmod);
-# endif
#elif defined GNULIB_POSIXCHECK
# undef lchmod
# if HAVE_RAW_DECL_LCHMOD
diff --git a/gnulib/import/sys_time.in.h b/gnulib/import/sys_time.in.h
index d6c215e..d30b267 100644
--- a/gnulib/import/sys_time.in.h
+++ b/gnulib/import/sys_time.in.h
@@ -1,6 +1,6 @@
/* Provide a more complete sys/time.h.
- Copyright (C) 2007-2019 Free Software Foundation, Inc.
+ Copyright (C) 2007-2020 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/sys_types.in.h b/gnulib/import/sys_types.in.h
index 237e206..e7e1a22 100644
--- a/gnulib/import/sys_types.in.h
+++ b/gnulib/import/sys_types.in.h
@@ -1,6 +1,6 @@
/* Provide a more complete sys/types.h.
- Copyright (C) 2011-2019 Free Software Foundation, Inc.
+ Copyright (C) 2011-2020 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/sys_uio.in.h b/gnulib/import/sys_uio.in.h
index d040a50..8588d3c 100644
--- a/gnulib/import/sys_uio.in.h
+++ b/gnulib/import/sys_uio.in.h
@@ -1,5 +1,5 @@
/* Substitute for <sys/uio.h>.
- Copyright (C) 2011-2019 Free Software Foundation, Inc.
+ Copyright (C) 2011-2020 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/tempname.c b/gnulib/import/tempname.c
index be62ed9..0aad061 100644
--- a/gnulib/import/tempname.c
+++ b/gnulib/import/tempname.c
@@ -1,6 +1,6 @@
/* tempname.c - generate the name of a temporary file.
- Copyright (C) 1991-2003, 2005-2007, 2009-2019 Free Software Foundation, Inc.
+ Copyright (C) 1991-2003, 2005-2007, 2009-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/tempname.h b/gnulib/import/tempname.h
index fb203d3..abb9265 100644
--- a/gnulib/import/tempname.h
+++ b/gnulib/import/tempname.h
@@ -1,6 +1,6 @@
/* Create a temporary file or directory.
- Copyright (C) 2006, 2009-2019 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/time.in.h b/gnulib/import/time.in.h
index 1b3bf3e..3f942b7 100644
--- a/gnulib/import/time.in.h
+++ b/gnulib/import/time.in.h
@@ -1,6 +1,6 @@
/* A more-standard <time.h>.
- Copyright (C) 2007-2019 Free Software Foundation, Inc.
+ Copyright (C) 2007-2020 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/time_r.c b/gnulib/import/time_r.c
index a701ccc..e8fca2d 100644
--- a/gnulib/import/time_r.c
+++ b/gnulib/import/time_r.c
@@ -1,6 +1,6 @@
/* Reentrant time functions like localtime_r.
- Copyright (C) 2003, 2006-2007, 2010-2019 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2006-2007, 2010-2020 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/unistd--.h b/gnulib/import/unistd--.h
index 1268854..05f3740 100644
--- a/gnulib/import/unistd--.h
+++ b/gnulib/import/unistd--.h
@@ -1,6 +1,6 @@
/* Like unistd.h, but redefine some names to avoid glitches.
- Copyright (C) 2005, 2009-2019 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2009-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/unistd-safer.h b/gnulib/import/unistd-safer.h
index 8eebffc..3e83509 100644
--- a/gnulib/import/unistd-safer.h
+++ b/gnulib/import/unistd-safer.h
@@ -1,6 +1,6 @@
/* Invoke unistd-like functions, but avoid some glitches.
- Copyright (C) 2001, 2003, 2005, 2009-2019 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2003, 2005, 2009-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/unistd.in.h b/gnulib/import/unistd.in.h
index 48db46a..d6176ad 100644
--- a/gnulib/import/unistd.in.h
+++ b/gnulib/import/unistd.in.h
@@ -1,5 +1,5 @@
/* Substitute for and wrapper around <unistd.h>.
- Copyright (C) 2003-2019 Free Software Foundation, Inc.
+ Copyright (C) 2003-2020 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
@@ -141,7 +141,7 @@
/* Get getopt(), optarg, optind, opterr, optopt. */
-#if @GNULIB_UNISTD_H_GETOPT@ && !defined _GL_SYSTEM_GETOPT
+#if @GNULIB_GETOPT_POSIX@ && @GNULIB_UNISTD_H_GETOPT@ && !defined _GL_SYSTEM_GETOPT
# include <getopt-cdefs.h>
# include <getopt-pfx-core.h>
#endif
diff --git a/gnulib/import/unsetenv.c b/gnulib/import/unsetenv.c
index 0199280..766df35 100644
--- a/gnulib/import/unsetenv.c
+++ b/gnulib/import/unsetenv.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995-2002, 2005-2019 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995-2002, 2005-2020 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
diff --git a/gnulib/import/verify.h b/gnulib/import/verify.h
index a58005c..d9ab89a 100644
--- a/gnulib/import/verify.h
+++ b/gnulib/import/verify.h
@@ -1,6 +1,6 @@
/* Compile-time assert-like macros.
- Copyright (C) 2005-2006, 2009-2019 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2009-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/warn-on-use.h b/gnulib/import/warn-on-use.h
index 7d11a15..1be2cbb 100644
--- a/gnulib/import/warn-on-use.h
+++ b/gnulib/import/warn-on-use.h
@@ -1,5 +1,5 @@
/* A C macro for emitting warnings if a function is used.
- Copyright (C) 2010-2019 Free Software Foundation, Inc.
+ Copyright (C) 2010-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published
diff --git a/gnulib/import/wchar.in.h b/gnulib/import/wchar.in.h
index cc0594c..63a02a4 100644
--- a/gnulib/import/wchar.in.h
+++ b/gnulib/import/wchar.in.h
@@ -1,6 +1,6 @@
/* A substitute for ISO C99 <wchar.h>, for platforms that have issues.
- Copyright (C) 2007-2019 Free Software Foundation, Inc.
+ Copyright (C) 2007-2020 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
@@ -33,7 +33,8 @@
#if (((defined __need_mbstate_t || defined __need_wint_t) \
&& !defined __MINGW32__) \
|| (defined __hpux \
- && ((defined _INTTYPES_INCLUDED && !defined strtoimax) \
+ && ((defined _INTTYPES_INCLUDED \
+ && !defined _GL_FINISHED_INCLUDING_SYSTEM_INTTYPES_H) \
|| defined _GL_JUST_INCLUDE_SYSTEM_WCHAR_H)) \
|| (defined __MINGW32__ && defined __STRING_H_SOURCED__) \
|| defined _GL_ALREADY_INCLUDING_WCHAR_H)
@@ -140,12 +141,13 @@ typedef unsigned int rpl_wint_t;
implementing mbrtowc for encodings like UTF-8.
On AIX and MSVC, mbrtowc needs to be overridden, but mbstate_t exists and is
large enough and overriding it would cause problems in C++ mode. */
-#if (!(@HAVE_MBSINIT@ && @HAVE_MBRTOWC@) || @REPLACE_MBSTATE_T@) \
- && !(defined _AIX || defined _MSC_VER)
+#if !(((defined _WIN32 && !defined __CYGWIN__) || @HAVE_MBSINIT@) && @HAVE_MBRTOWC@) || @REPLACE_MBSTATE_T@
# if !GNULIB_defined_mbstate_t
+# if !(defined _AIX || defined _MSC_VER)
typedef int rpl_mbstate_t;
-# undef mbstate_t
-# define mbstate_t rpl_mbstate_t
+# undef mbstate_t
+# define mbstate_t rpl_mbstate_t
+# endif
# define GNULIB_defined_mbstate_t 1
# endif
#endif
diff --git a/gnulib/import/wctype.in.h b/gnulib/import/wctype.in.h
index 0cc7512..57b8692 100644
--- a/gnulib/import/wctype.in.h
+++ b/gnulib/import/wctype.in.h
@@ -1,6 +1,6 @@
/* A substitute for ISO C99 <wctype.h>, for platforms that lack it.
- Copyright (C) 2006-2019 Free Software Foundation, Inc.
+ Copyright (C) 2006-2020 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
@@ -168,7 +168,7 @@ rpl_iswcntrl (wint_t wc)
_GL_WCTYPE_INLINE int
rpl_iswdigit (wint_t wc)
{
- return ((wchar_t) wc == wc ? iswdigit ((wchar_t) wc) : 0);
+ return ((wchar_t) wc == wc ? wc >= '0' && wc <= '9' : 0);
}
_GL_WCTYPE_INLINE int
@@ -210,7 +210,10 @@ rpl_iswupper (wint_t wc)
_GL_WCTYPE_INLINE int
rpl_iswxdigit (wint_t wc)
{
- return ((wchar_t) wc == wc ? iswxdigit ((wchar_t) wc) : 0);
+ return ((wchar_t) wc == wc
+ ? (wc >= '0' && wc <= '9')
+ || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'F')
+ : 0);
}
_GL_WCTYPE_INLINE wint_t
@@ -348,7 +351,7 @@ iswcntrl
}
_GL_WCTYPE_INLINE int
-# if @REPLACE_ISWCNTRL@
+# if @REPLACE_ISWDIGIT@
rpl_iswdigit
# else
iswdigit
@@ -428,7 +431,7 @@ iswupper
}
_GL_WCTYPE_INLINE int
-# if @REPLACE_ISWCNTRL@
+# if @REPLACE_ISWXDIGIT@
rpl_iswxdigit
# else
iswxdigit
@@ -463,16 +466,39 @@ towupper
# endif
-# elif @GNULIB_ISWBLANK@ && (! @HAVE_ISWBLANK@ || @REPLACE_ISWBLANK@)
-/* Only the iswblank function is missing. */
+# else
+/* Only some of the functions are missing or broken. */
-# if @REPLACE_ISWBLANK@
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-# define iswblank rpl_iswblank
-# endif
+# if @GNULIB_ISWBLANK@ && (! @HAVE_ISWBLANK@ || @REPLACE_ISWBLANK@)
+/* Only the iswblank function is missing. */
+# if @REPLACE_ISWBLANK@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define iswblank rpl_iswblank
+# endif
_GL_FUNCDECL_RPL (iswblank, int, (wint_t wc));
-# else
+# else
_GL_FUNCDECL_SYS (iswblank, int, (wint_t wc));
+# endif
+# endif
+
+# if @GNULIB_ISWDIGIT@
+# if @REPLACE_ISWDIGIT@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef iswdigit
+# define iswdigit rpl_iswdigit
+# endif
+_GL_FUNCDECL_RPL (iswdigit, int, (wint_t wc));
+# endif
+# endif
+
+# if @GNULIB_ISWXDIGIT@
+# if @REPLACE_ISWXDIGIT@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef iswxdigit
+# define iswxdigit rpl_iswxdigit
+# endif
+_GL_FUNCDECL_RPL (iswxdigit, int, (wint_t wc));
+# endif
# endif
# endif
@@ -517,28 +543,62 @@ rpl_towupper (wint_t wc)
#if @REPLACE_ISWCNTRL@
_GL_CXXALIAS_RPL (iswalnum, int, (wint_t wc));
-_GL_CXXALIAS_RPL (iswalpha, int, (wint_t wc));
-_GL_CXXALIAS_RPL (iswcntrl, int, (wint_t wc));
-_GL_CXXALIAS_RPL (iswdigit, int, (wint_t wc));
-_GL_CXXALIAS_RPL (iswgraph, int, (wint_t wc));
-_GL_CXXALIAS_RPL (iswlower, int, (wint_t wc));
-_GL_CXXALIAS_RPL (iswprint, int, (wint_t wc));
-_GL_CXXALIAS_RPL (iswpunct, int, (wint_t wc));
-_GL_CXXALIAS_RPL (iswspace, int, (wint_t wc));
-_GL_CXXALIAS_RPL (iswupper, int, (wint_t wc));
-_GL_CXXALIAS_RPL (iswxdigit, int, (wint_t wc));
#else
_GL_CXXALIAS_SYS (iswalnum, int, (wint_t wc));
+#endif
+#if @REPLACE_ISWCNTRL@
+_GL_CXXALIAS_RPL (iswalpha, int, (wint_t wc));
+#else
_GL_CXXALIAS_SYS (iswalpha, int, (wint_t wc));
+#endif
+#if @REPLACE_ISWCNTRL@
+_GL_CXXALIAS_RPL (iswcntrl, int, (wint_t wc));
+#else
_GL_CXXALIAS_SYS (iswcntrl, int, (wint_t wc));
+#endif
+#if @GNULIB_ISWDIGIT@
+# if @REPLACE_ISWDIGIT@
+_GL_CXXALIAS_RPL (iswdigit, int, (wint_t wc));
+# else
_GL_CXXALIAS_SYS (iswdigit, int, (wint_t wc));
+# endif
+#endif
+#if @REPLACE_ISWCNTRL@
+_GL_CXXALIAS_RPL (iswgraph, int, (wint_t wc));
+#else
_GL_CXXALIAS_SYS (iswgraph, int, (wint_t wc));
+#endif
+#if @REPLACE_ISWCNTRL@
+_GL_CXXALIAS_RPL (iswlower, int, (wint_t wc));
+#else
_GL_CXXALIAS_SYS (iswlower, int, (wint_t wc));
+#endif
+#if @REPLACE_ISWCNTRL@
+_GL_CXXALIAS_RPL (iswprint, int, (wint_t wc));
+#else
_GL_CXXALIAS_SYS (iswprint, int, (wint_t wc));
+#endif
+#if @REPLACE_ISWCNTRL@
+_GL_CXXALIAS_RPL (iswpunct, int, (wint_t wc));
+#else
_GL_CXXALIAS_SYS (iswpunct, int, (wint_t wc));
+#endif
+#if @REPLACE_ISWCNTRL@
+_GL_CXXALIAS_RPL (iswspace, int, (wint_t wc));
+#else
_GL_CXXALIAS_SYS (iswspace, int, (wint_t wc));
+#endif
+#if @REPLACE_ISWCNTRL@
+_GL_CXXALIAS_RPL (iswupper, int, (wint_t wc));
+#else
_GL_CXXALIAS_SYS (iswupper, int, (wint_t wc));
+#endif
+#if @GNULIB_ISWXDIGIT@
+# if @REPLACE_ISWXDIGIT@
+_GL_CXXALIAS_RPL (iswxdigit, int, (wint_t wc));
+# else
_GL_CXXALIAS_SYS (iswxdigit, int, (wint_t wc));
+# endif
#endif
#if __GLIBC__ >= 2
_GL_CXXALIASWARN (iswalnum);
diff --git a/gnulib/import/windows-initguard.h b/gnulib/import/windows-initguard.h
index 8aefd0b..c4be45a 100644
--- a/gnulib/import/windows-initguard.h
+++ b/gnulib/import/windows-initguard.h
@@ -1,5 +1,5 @@
/* Init guards, somewhat like spinlocks (native Windows implementation).
- Copyright (C) 2005-2019 Free Software Foundation, Inc.
+ Copyright (C) 2005-2020 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/windows-mutex.c b/gnulib/import/windows-mutex.c
index 9433881..7eb38a2 100644
--- a/gnulib/import/windows-mutex.c
+++ b/gnulib/import/windows-mutex.c
@@ -1,5 +1,5 @@
/* Plain mutexes (native Windows implementation).
- Copyright (C) 2005-2019 Free Software Foundation, Inc.
+ Copyright (C) 2005-2020 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/windows-mutex.h b/gnulib/import/windows-mutex.h
index 5364f92..748b988 100644
--- a/gnulib/import/windows-mutex.h
+++ b/gnulib/import/windows-mutex.h
@@ -1,5 +1,5 @@
/* Plain mutexes (native Windows implementation).
- Copyright (C) 2005-2019 Free Software Foundation, Inc.
+ Copyright (C) 2005-2020 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/windows-once.c b/gnulib/import/windows-once.c
index 455c50e..c431bd6 100644
--- a/gnulib/import/windows-once.c
+++ b/gnulib/import/windows-once.c
@@ -1,5 +1,5 @@
/* Once-only control (native Windows implementation).
- Copyright (C) 2005-2019 Free Software Foundation, Inc.
+ Copyright (C) 2005-2020 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/windows-once.h b/gnulib/import/windows-once.h
index 1599983..d31717e 100644
--- a/gnulib/import/windows-once.h
+++ b/gnulib/import/windows-once.h
@@ -1,5 +1,5 @@
/* Once-only control (native Windows implementation).
- Copyright (C) 2005-2019 Free Software Foundation, Inc.
+ Copyright (C) 2005-2020 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/windows-recmutex.c b/gnulib/import/windows-recmutex.c
index 7e6e446..db3c40c 100644
--- a/gnulib/import/windows-recmutex.c
+++ b/gnulib/import/windows-recmutex.c
@@ -1,5 +1,5 @@
/* Plain recursive mutexes (native Windows implementation).
- Copyright (C) 2005-2019 Free Software Foundation, Inc.
+ Copyright (C) 2005-2020 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/windows-recmutex.h b/gnulib/import/windows-recmutex.h
index d143108..3b315e5 100644
--- a/gnulib/import/windows-recmutex.h
+++ b/gnulib/import/windows-recmutex.h
@@ -1,5 +1,5 @@
/* Plain recursive mutexes (native Windows implementation).
- Copyright (C) 2005-2019 Free Software Foundation, Inc.
+ Copyright (C) 2005-2020 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/windows-rwlock.c b/gnulib/import/windows-rwlock.c
index 9207d1b..aafc5dd 100644
--- a/gnulib/import/windows-rwlock.c
+++ b/gnulib/import/windows-rwlock.c
@@ -1,5 +1,5 @@
/* Read-write locks (native Windows implementation).
- Copyright (C) 2005-2019 Free Software Foundation, Inc.
+ Copyright (C) 2005-2020 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/windows-rwlock.h b/gnulib/import/windows-rwlock.h
index 9002040..ae5b82f 100644
--- a/gnulib/import/windows-rwlock.h
+++ b/gnulib/import/windows-rwlock.h
@@ -1,5 +1,5 @@
/* Read-write locks (native Windows implementation).
- Copyright (C) 2005-2019 Free Software Foundation, Inc.
+ Copyright (C) 2005-2020 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/import/xalloc-oversized.h b/gnulib/import/xalloc-oversized.h
index e3068c8..13ee230 100644
--- a/gnulib/import/xalloc-oversized.h
+++ b/gnulib/import/xalloc-oversized.h
@@ -1,6 +1,6 @@
/* xalloc-oversized.h -- memory allocation size checking
- Copyright (C) 1990-2000, 2003-2004, 2006-2019 Free Software Foundation, Inc.
+ Copyright (C) 1990-2000, 2003-2004, 2006-2020 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