summaryrefslogtreecommitdiff
path: root/gl
diff options
context:
space:
mode:
Diffstat (limited to 'gl')
-rw-r--r--gl/lib/Makefile.am360
-rw-r--r--gl/lib/Makefile.in1179
-rw-r--r--gl/lib/_Noreturn.h7
-rw-r--r--gl/lib/alloca.in.h2
-rw-r--r--gl/lib/arg-nonnull.h2
-rw-r--r--gl/lib/argp-ba.c2
-rw-r--r--gl/lib/argp-eexst.c2
-rw-r--r--gl/lib/argp-fmtstream.c2
-rw-r--r--gl/lib/argp-fmtstream.h11
-rw-r--r--gl/lib/argp-fs-xinl.c2
-rw-r--r--gl/lib/argp-help.c3
-rw-r--r--gl/lib/argp-namefrob.h2
-rw-r--r--gl/lib/argp-parse.c5
-rw-r--r--gl/lib/argp-pin.c2
-rw-r--r--gl/lib/argp-pv.c2
-rw-r--r--gl/lib/argp-pvh.c2
-rw-r--r--gl/lib/argp-xinl.c2
-rw-r--r--gl/lib/argp.h12
-rw-r--r--gl/lib/asnprintf.c2
-rw-r--r--gl/lib/asprintf.c2
-rw-r--r--gl/lib/assert.in.h27
-rw-r--r--gl/lib/assure.h2
-rw-r--r--gl/lib/at-func.c2
-rw-r--r--gl/lib/at-func2.c2
-rw-r--r--gl/lib/attribute.h19
-rw-r--r--gl/lib/basename-lgpl.c3
-rw-r--r--gl/lib/basename-lgpl.h7
-rw-r--r--gl/lib/basename.c2
-rw-r--r--gl/lib/bitrotate.c2
-rw-r--r--gl/lib/bitrotate.h10
-rw-r--r--gl/lib/btowc.c10
-rw-r--r--gl/lib/c++defs.h8
-rw-r--r--gl/lib/calloc.c2
-rw-r--r--gl/lib/canonicalize-lgpl.c125
-rw-r--r--gl/lib/canonicalize.c108
-rw-r--r--gl/lib/canonicalize.h7
-rw-r--r--gl/lib/cdefs.h42
-rw-r--r--gl/lib/chdir-long.c3
-rw-r--r--gl/lib/chdir-long.h2
-rw-r--r--gl/lib/chown.c3
-rw-r--r--gl/lib/cloexec.c2
-rw-r--r--gl/lib/cloexec.h4
-rw-r--r--gl/lib/close.c2
-rw-r--r--gl/lib/closedir.c30
-rw-r--r--gl/lib/ctype.in.h7
-rw-r--r--gl/lib/dirent-private.h33
-rw-r--r--gl/lib/dirent.in.h51
-rw-r--r--gl/lib/dirfd.c19
-rw-r--r--gl/lib/dirname-lgpl.c2
-rw-r--r--gl/lib/dirname.c2
-rw-r--r--gl/lib/dirname.h9
-rw-r--r--gl/lib/dup-safer-flag.c2
-rw-r--r--gl/lib/dup-safer.c2
-rw-r--r--gl/lib/dup.c2
-rw-r--r--gl/lib/dup2.c2
-rw-r--r--gl/lib/dynarray.h2
-rw-r--r--gl/lib/eloop-threshold.h7
-rw-r--r--gl/lib/errno.in.h2
-rw-r--r--gl/lib/error.c5
-rw-r--r--gl/lib/error.h66
-rw-r--r--gl/lib/error.in.h215
-rw-r--r--gl/lib/exitfail.c2
-rw-r--r--gl/lib/exitfail.h2
-rw-r--r--gl/lib/fchdir.c4
-rw-r--r--gl/lib/fchown-stub.c2
-rw-r--r--gl/lib/fcntl.c2
-rw-r--r--gl/lib/fcntl.in.h7
-rw-r--r--gl/lib/fd-hook.c2
-rw-r--r--gl/lib/fd-hook.h2
-rw-r--r--gl/lib/fd-safer-flag.c2
-rw-r--r--gl/lib/fd-safer.c2
-rw-r--r--gl/lib/fdopendir.c99
-rw-r--r--gl/lib/file-set.c2
-rw-r--r--gl/lib/file-set.h3
-rw-r--r--gl/lib/filename.h2
-rw-r--r--gl/lib/filenamecat-lgpl.c2
-rw-r--r--gl/lib/filenamecat.h7
-rw-r--r--gl/lib/flexmember.h20
-rw-r--r--gl/lib/float+.h2
-rw-r--r--gl/lib/float.c2
-rw-r--r--gl/lib/float.in.h2
-rw-r--r--gl/lib/flock.c2
-rw-r--r--gl/lib/fnmatch.c7
-rw-r--r--gl/lib/fnmatch.in.h7
-rw-r--r--gl/lib/fnmatch_loop.c6
-rw-r--r--gl/lib/free.c2
-rw-r--r--gl/lib/fstat.c2
-rw-r--r--gl/lib/fstatat.c2
-rw-r--r--gl/lib/getcwd-lgpl.c2
-rw-r--r--gl/lib/getcwd.c84
-rw-r--r--gl/lib/getdelim.c6
-rw-r--r--gl/lib/getdtablesize.c2
-rw-r--r--gl/lib/getline.c2
-rw-r--r--gl/lib/getlogin_r.c2
-rw-r--r--gl/lib/getopt-cdefs.in.h2
-rw-r--r--gl/lib/getopt-core.h2
-rw-r--r--gl/lib/getopt-ext.h2
-rw-r--r--gl/lib/getopt-pfx-core.h4
-rw-r--r--gl/lib/getopt-pfx-ext.h2
-rw-r--r--gl/lib/getopt.c2
-rw-r--r--gl/lib/getopt.in.h2
-rw-r--r--gl/lib/getopt1.c2
-rw-r--r--gl/lib/getopt_int.h2
-rw-r--r--gl/lib/getprogname.c24
-rw-r--r--gl/lib/getprogname.h20
-rw-r--r--gl/lib/getrandom.c3
-rw-r--r--gl/lib/gettext.h2
-rw-r--r--gl/lib/gettime.c6
-rw-r--r--gl/lib/gettimeofday.c16
-rw-r--r--gl/lib/gl_anyhash1.h2
-rw-r--r--gl/lib/gl_anyhash2.h2
-rw-r--r--gl/lib/gl_anyhash_primes.h2
-rw-r--r--gl/lib/gl_anylinked_list1.h2
-rw-r--r--gl/lib/gl_anylinked_list2.h2
-rw-r--r--gl/lib/gl_anyrbtree_list1.h2
-rw-r--r--gl/lib/gl_anyrbtree_list2.h2
-rw-r--r--gl/lib/gl_anytree_list1.h2
-rw-r--r--gl/lib/gl_anytree_list2.h2
-rw-r--r--gl/lib/gl_array_list.c2
-rw-r--r--gl/lib/gl_array_list.h2
-rw-r--r--gl/lib/gl_hash_map.c2
-rw-r--r--gl/lib/gl_hash_map.h2
-rw-r--r--gl/lib/gl_hash_set.c2
-rw-r--r--gl/lib/gl_hash_set.h2
-rw-r--r--gl/lib/gl_linkedhash_list.c2
-rw-r--r--gl/lib/gl_linkedhash_list.h2
-rw-r--r--gl/lib/gl_list.c2
-rw-r--r--gl/lib/gl_list.h12
-rw-r--r--gl/lib/gl_map.c2
-rw-r--r--gl/lib/gl_map.h12
-rw-r--r--gl/lib/gl_rbtree_list.c5
-rw-r--r--gl/lib/gl_rbtree_list.h2
-rw-r--r--gl/lib/gl_set.c2
-rw-r--r--gl/lib/gl_set.h12
-rw-r--r--gl/lib/gl_xlist.c2
-rw-r--r--gl/lib/gl_xlist.h11
-rw-r--r--gl/lib/gl_xmap.c2
-rw-r--r--gl/lib/gl_xmap.h11
-rw-r--r--gl/lib/gl_xset.c2
-rw-r--r--gl/lib/gl_xset.h11
-rw-r--r--gl/lib/glob-libc.h2
-rw-r--r--gl/lib/glob.c24
-rw-r--r--gl/lib/glob.in.h9
-rw-r--r--gl/lib/glob_internal.h2
-rw-r--r--gl/lib/glob_pattern_p.c2
-rw-r--r--gl/lib/globfree.c2
-rw-r--r--gl/lib/glthread/lock.c2
-rw-r--r--gl/lib/glthread/lock.h10
-rw-r--r--gl/lib/glthread/threadlib.c2
-rw-r--r--gl/lib/hard-locale.c16
-rw-r--r--gl/lib/hard-locale.h8
-rw-r--r--gl/lib/hash-pjw-bare.c2
-rw-r--r--gl/lib/hash-pjw-bare.h7
-rw-r--r--gl/lib/hash-pjw.c2
-rw-r--r--gl/lib/hash-pjw.h7
-rw-r--r--gl/lib/hash-triple-simple.c2
-rw-r--r--gl/lib/hash-triple.h8
-rw-r--r--gl/lib/hash.c2
-rw-r--r--gl/lib/hash.h12
-rw-r--r--gl/lib/ialloc.c2
-rw-r--r--gl/lib/ialloc.h25
-rw-r--r--gl/lib/idpriv-drop.c2
-rw-r--r--gl/lib/idpriv-droptemp.c2
-rw-r--r--gl/lib/idpriv.h2
-rw-r--r--gl/lib/idx.h2
-rw-r--r--gl/lib/intprops-internal.h392
-rw-r--r--gl/lib/intprops.h361
-rw-r--r--gl/lib/inttypes.in.h41
-rw-r--r--gl/lib/ioctl.c2
-rw-r--r--gl/lib/isblank.c2
-rw-r--r--gl/lib/itold.c2
-rw-r--r--gl/lib/langinfo.in.h9
-rw-r--r--gl/lib/lc-charset-dispatch.c2
-rw-r--r--gl/lib/lc-charset-dispatch.h2
-rw-r--r--gl/lib/lchown.c3
-rw-r--r--gl/lib/libc-config.h24
-rw-r--r--gl/lib/limits.in.h36
-rw-r--r--gl/lib/localcharset.c2
-rw-r--r--gl/lib/localcharset.h2
-rw-r--r--gl/lib/locale.in.h31
-rw-r--r--gl/lib/localeconv.c47
-rw-r--r--gl/lib/lstat.c2
-rw-r--r--gl/lib/malloc.c2
-rw-r--r--gl/lib/malloc/dynarray-skeleton.c2
-rw-r--r--gl/lib/malloc/dynarray.h3
-rw-r--r--gl/lib/malloc/dynarray_at_failure.c2
-rw-r--r--gl/lib/malloc/dynarray_emplace_enlarge.c6
-rw-r--r--gl/lib/malloc/dynarray_finalize.c2
-rw-r--r--gl/lib/malloc/dynarray_resize.c6
-rw-r--r--gl/lib/malloc/dynarray_resize_clear.c2
-rw-r--r--gl/lib/malloc/scratch_buffer.h18
-rw-r--r--gl/lib/malloc/scratch_buffer_dupfree.c41
-rw-r--r--gl/lib/malloc/scratch_buffer_grow.c2
-rw-r--r--gl/lib/malloc/scratch_buffer_grow_preserve.c2
-rw-r--r--gl/lib/malloc/scratch_buffer_set_array_size.c2
-rw-r--r--gl/lib/malloca.c15
-rw-r--r--gl/lib/malloca.h8
-rw-r--r--gl/lib/mbrtowc-impl-utf8.h2
-rw-r--r--gl/lib/mbrtowc-impl.h2
-rw-r--r--gl/lib/mbrtowc.c5
-rw-r--r--gl/lib/mbsinit.c5
-rw-r--r--gl/lib/mbsrtowcs-impl.h2
-rw-r--r--gl/lib/mbsrtowcs-state.c2
-rw-r--r--gl/lib/mbsrtowcs.c2
-rw-r--r--gl/lib/mbtowc-impl.h2
-rw-r--r--gl/lib/mbtowc-lock.c2
-rw-r--r--gl/lib/mbtowc-lock.h2
-rw-r--r--gl/lib/mbtowc.c2
-rw-r--r--gl/lib/memchr.c2
-rw-r--r--gl/lib/memchr.valgrind2
-rw-r--r--gl/lib/memmem.c2
-rw-r--r--gl/lib/mempcpy.c2
-rw-r--r--gl/lib/memrchr.c2
-rw-r--r--gl/lib/minmax.h7
-rw-r--r--gl/lib/mkdir.c2
-rw-r--r--gl/lib/mkdtemp.c2
-rw-r--r--gl/lib/mkstemp.c2
-rw-r--r--gl/lib/msvc-inval.c2
-rw-r--r--gl/lib/msvc-inval.h7
-rw-r--r--gl/lib/msvc-nothrow.c2
-rw-r--r--gl/lib/msvc-nothrow.h7
-rw-r--r--gl/lib/nanosleep.c9
-rw-r--r--gl/lib/nl_langinfo-lock.c2
-rw-r--r--gl/lib/nl_langinfo.c4
-rw-r--r--gl/lib/nonblocking.c2
-rw-r--r--gl/lib/nonblocking.h4
-rw-r--r--gl/lib/open.c2
-rw-r--r--gl/lib/openat-die.c2
-rw-r--r--gl/lib/openat-priv.h2
-rw-r--r--gl/lib/openat-proc.c29
-rw-r--r--gl/lib/openat.c3
-rw-r--r--gl/lib/openat.h12
-rw-r--r--gl/lib/opendir.c41
-rw-r--r--gl/lib/pathmax.h7
-rw-r--r--gl/lib/pipe-safer.c2
-rw-r--r--gl/lib/pipe.c2
-rw-r--r--gl/lib/printf-args.c125
-rw-r--r--gl/lib/printf-args.h61
-rw-r--r--gl/lib/printf-parse.c499
-rw-r--r--gl/lib/printf-parse.h10
-rw-r--r--gl/lib/progname.c2
-rw-r--r--gl/lib/progname.h2
-rw-r--r--gl/lib/pselect.c14
-rw-r--r--gl/lib/pthread_sigmask.c2
-rw-r--r--gl/lib/raise.c2
-rw-r--r--gl/lib/rawmemchr.c6
-rw-r--r--gl/lib/rawmemchr.valgrind2
-rw-r--r--gl/lib/readdir.c11
-rw-r--r--gl/lib/readlink.c2
-rw-r--r--gl/lib/readlinkat.c2
-rw-r--r--gl/lib/realloc.c2
-rw-r--r--gl/lib/reallocarray.c7
-rw-r--r--gl/lib/regcomp.c4
-rw-r--r--gl/lib/regex.c2
-rw-r--r--gl/lib/regex.h2
-rw-r--r--gl/lib/regex_internal.c2
-rw-r--r--gl/lib/regex_internal.h9
-rw-r--r--gl/lib/regexec.c4
-rw-r--r--gl/lib/rename.c5
-rw-r--r--gl/lib/renameat.c2
-rw-r--r--gl/lib/renameatu.c3
-rw-r--r--gl/lib/renameatu.h2
-rw-r--r--gl/lib/rewinddir.c11
-rw-r--r--gl/lib/rmdir.c2
-rw-r--r--gl/lib/same-inode.h2
-rw-r--r--gl/lib/save-cwd.c3
-rw-r--r--gl/lib/save-cwd.h2
-rw-r--r--gl/lib/scratch_buffer.h12
-rw-r--r--gl/lib/select.c9
-rw-r--r--gl/lib/setenv.c7
-rw-r--r--gl/lib/setlocale-lock.c2
-rw-r--r--gl/lib/setlocale_null.c6
-rw-r--r--gl/lib/setlocale_null.h2
-rw-r--r--gl/lib/sig-handler.c2
-rw-r--r--gl/lib/sig-handler.h10
-rw-r--r--gl/lib/sigaction.c2
-rw-r--r--gl/lib/signal.in.h21
-rw-r--r--gl/lib/sigprocmask.c2
-rw-r--r--gl/lib/size_max.h7
-rw-r--r--gl/lib/sleep.c6
-rw-r--r--gl/lib/sockets.c2
-rw-r--r--gl/lib/sockets.h7
-rw-r--r--gl/lib/stat-time.c2
-rw-r--r--gl/lib/stat-time.h50
-rw-r--r--gl/lib/stat-w32.c5
-rw-r--r--gl/lib/stat-w32.h2
-rw-r--r--gl/lib/stat.c4
-rw-r--r--gl/lib/stdalign.in.h127
-rw-r--r--gl/lib/stdarg.in.h7
-rw-r--r--gl/lib/stdbool.in.h132
-rw-r--r--gl/lib/stdckdint.in.h35
-rw-r--r--gl/lib/stddef.in.h54
-rw-r--r--gl/lib/stdint.in.h2
-rw-r--r--gl/lib/stdio-read.c2
-rw-r--r--gl/lib/stdio-write.c2
-rw-r--r--gl/lib/stdio.in.h111
-rw-r--r--gl/lib/stdlib.in.h208
-rw-r--r--gl/lib/stdopen.c2
-rw-r--r--gl/lib/stdopen.h2
-rw-r--r--gl/lib/stpcpy.c2
-rw-r--r--gl/lib/str-two-way.h2
-rw-r--r--gl/lib/strcasecmp.c2
-rw-r--r--gl/lib/strcasestr.c3
-rw-r--r--gl/lib/strchrnul.c2
-rw-r--r--gl/lib/strchrnul.valgrind2
-rw-r--r--gl/lib/strdup.c2
-rw-r--r--gl/lib/streq.h2
-rw-r--r--gl/lib/strerror-override.c2
-rw-r--r--gl/lib/strerror-override.h7
-rw-r--r--gl/lib/strerror.c5
-rw-r--r--gl/lib/string.in.h93
-rw-r--r--gl/lib/strings.in.h7
-rw-r--r--gl/lib/stripslash.c2
-rw-r--r--gl/lib/strncasecmp.c2
-rw-r--r--gl/lib/strndup.c2
-rw-r--r--gl/lib/strnlen.c2
-rw-r--r--gl/lib/strnlen1.c2
-rw-r--r--gl/lib/strnlen1.h7
-rw-r--r--gl/lib/strsep.c2
-rw-r--r--gl/lib/sys_file.in.h9
-rw-r--r--gl/lib/sys_ioctl.in.h9
-rw-r--r--gl/lib/sys_random.in.h9
-rw-r--r--gl/lib/sys_select.in.h23
-rw-r--r--gl/lib/sys_socket.c2
-rw-r--r--gl/lib/sys_socket.in.h8
-rw-r--r--gl/lib/sys_stat.in.h98
-rw-r--r--gl/lib/sys_time.in.h14
-rw-r--r--gl/lib/sys_types.in.h9
-rw-r--r--gl/lib/sys_uio.in.h2
-rw-r--r--gl/lib/sysexits.in.h2
-rw-r--r--gl/lib/tempname.c173
-rw-r--r--gl/lib/tempname.h4
-rw-r--r--gl/lib/termios.in.h7
-rw-r--r--gl/lib/time.in.h56
-rw-r--r--gl/lib/timespec.c2
-rw-r--r--gl/lib/timespec.h16
-rw-r--r--gl/lib/unistd--.h2
-rw-r--r--gl/lib/unistd-safer.h2
-rw-r--r--gl/lib/unistd.c2
-rw-r--r--gl/lib/unistd.in.h113
-rw-r--r--gl/lib/unlink.c2
-rw-r--r--gl/lib/unlinkat.c2
-rw-r--r--gl/lib/utime.c3
-rw-r--r--gl/lib/utime.in.h14
-rw-r--r--gl/lib/utimens.c23
-rw-r--r--gl/lib/utimens.h10
-rw-r--r--gl/lib/vasnprintf.c1578
-rw-r--r--gl/lib/vasnprintf.h7
-rw-r--r--gl/lib/vasprintf.c2
-rw-r--r--gl/lib/verify.h97
-rw-r--r--gl/lib/verror.c2
-rw-r--r--gl/lib/verror.h7
-rw-r--r--gl/lib/vsnprintf.c2
-rw-r--r--gl/lib/w32sock.h2
-rw-r--r--gl/lib/warn-on-use.h2
-rw-r--r--gl/lib/wchar.in.h138
-rw-r--r--gl/lib/wcrtomb.c2
-rw-r--r--gl/lib/wctype-h.c2
-rw-r--r--gl/lib/wctype.in.h11
-rw-r--r--gl/lib/windows-initguard.h2
-rw-r--r--gl/lib/windows-mutex.c2
-rw-r--r--gl/lib/windows-mutex.h2
-rw-r--r--gl/lib/windows-once.c2
-rw-r--r--gl/lib/windows-once.h2
-rw-r--r--gl/lib/windows-recmutex.c2
-rw-r--r--gl/lib/windows-recmutex.h2
-rw-r--r--gl/lib/windows-rwlock.c2
-rw-r--r--gl/lib/windows-rwlock.h2
-rw-r--r--gl/lib/wmemchr-impl.h2
-rw-r--r--gl/lib/wmemchr.c2
-rw-r--r--gl/lib/wmempcpy.c2
-rw-r--r--gl/lib/xalloc-die.c2
-rw-r--r--gl/lib/xalloc-oversized.h2
-rw-r--r--gl/lib/xalloc.h16
-rw-r--r--gl/lib/xasprintf.c2
-rw-r--r--gl/lib/xgetcwd.c2
-rw-r--r--gl/lib/xgetcwd.h7
-rw-r--r--gl/lib/xmalloc.c15
-rw-r--r--gl/lib/xsize.c2
-rw-r--r--gl/lib/xsize.h10
-rw-r--r--gl/lib/xstdopen.c2
-rw-r--r--gl/lib/xstdopen.h2
-rw-r--r--gl/lib/xstrndup.c2
-rw-r--r--gl/lib/xstrndup.h7
-rw-r--r--gl/lib/xvasprintf.c2
-rw-r--r--gl/lib/xvasprintf.h7
-rw-r--r--gl/m4/00gnulib.m42
-rw-r--r--gl/m4/__inline.m42
-rw-r--r--gl/m4/absolute-header.m42
-rw-r--r--gl/m4/alloca.m42
-rw-r--r--gl/m4/argp.m42
-rw-r--r--gl/m4/asm-underscore.m42
-rw-r--r--gl/m4/assert_h.m473
-rw-r--r--gl/m4/btowc.m459
-rw-r--r--gl/m4/builtin-expect.m42
-rw-r--r--gl/m4/c-bool.m451
-rw-r--r--gl/m4/calloc.m420
-rw-r--r--gl/m4/canonicalize.m410
-rw-r--r--gl/m4/chdir-long.m42
-rw-r--r--gl/m4/chown.m42
-rw-r--r--gl/m4/clock_time.m417
-rw-r--r--gl/m4/close.m46
-rw-r--r--gl/m4/closedir.m435
-rw-r--r--gl/m4/codeset.m42
-rw-r--r--gl/m4/ctype_h.m42
-rw-r--r--gl/m4/d-ino.m46
-rw-r--r--gl/m4/d-type.m42
-rw-r--r--gl/m4/dirent_h.m423
-rw-r--r--gl/m4/dirfd.m427
-rw-r--r--gl/m4/double-slash-root.m42
-rw-r--r--gl/m4/dup.m42
-rw-r--r--gl/m4/dup2.m42
-rw-r--r--gl/m4/eealloc.m42
-rw-r--r--gl/m4/environ.m42
-rw-r--r--gl/m4/errno_h.m42
-rw-r--r--gl/m4/error.m413
-rw-r--r--gl/m4/error_h.m4124
-rw-r--r--gl/m4/exponentd.m46
-rw-r--r--gl/m4/extensions.m413
-rw-r--r--gl/m4/extern-inline.m46
-rw-r--r--gl/m4/fchdir.m46
-rw-r--r--gl/m4/fcntl-o.m42
-rw-r--r--gl/m4/fcntl.m42
-rw-r--r--gl/m4/fcntl_h.m42
-rw-r--r--gl/m4/fdopendir.m416
-rw-r--r--gl/m4/filenamecat.m46
-rw-r--r--gl/m4/flexmember.m42
-rw-r--r--gl/m4/float_h.m42
-rw-r--r--gl/m4/flock.m42
-rw-r--r--gl/m4/fnmatch.m487
-rw-r--r--gl/m4/fnmatch_h.m42
-rw-r--r--gl/m4/free.m42
-rw-r--r--gl/m4/fstat.m42
-rw-r--r--gl/m4/fstatat.m42
-rw-r--r--gl/m4/getcwd-abort-bug.m42
-rw-r--r--gl/m4/getcwd-path-max.m42
-rw-r--r--gl/m4/getcwd.m46
-rw-r--r--gl/m4/getdelim.m455
-rw-r--r--gl/m4/getdtablesize.m42
-rw-r--r--gl/m4/getline.m422
-rw-r--r--gl/m4/getlogin.m411
-rw-r--r--gl/m4/getlogin_r.m49
-rw-r--r--gl/m4/getopt.m42
-rw-r--r--gl/m4/getpagesize.m42
-rw-r--r--gl/m4/getprogname.m423
-rw-r--r--gl/m4/getrandom.m424
-rw-r--r--gl/m4/gettime.m453
-rw-r--r--gl/m4/gettimeofday.m42
-rw-r--r--gl/m4/glob.m413
-rw-r--r--gl/m4/glob_h.m42
-rw-r--r--gl/m4/gnulib-common.m4623
-rw-r--r--gl/m4/gnulib-comp.m485
-rw-r--r--gl/m4/host-cpu-c-abi.m42
-rw-r--r--gl/m4/idpriv.m42
-rw-r--r--gl/m4/include_next.m42
-rw-r--r--gl/m4/intmax_t.m42
-rw-r--r--gl/m4/inttypes.m48
-rw-r--r--gl/m4/inttypes_h.m42
-rw-r--r--gl/m4/ioctl.m42
-rw-r--r--gl/m4/isblank.m42
-rw-r--r--gl/m4/langinfo_h.m42
-rw-r--r--gl/m4/largefile.m4344
-rw-r--r--gl/m4/lchown.m42
-rw-r--r--gl/m4/lib-ignore.m42
-rw-r--r--gl/m4/lib-ld.m46
-rw-r--r--gl/m4/lib-link.m44
-rw-r--r--gl/m4/lib-prefix.m42
-rw-r--r--gl/m4/limits-h.m425
-rw-r--r--gl/m4/localcharset.m42
-rw-r--r--gl/m4/locale-fr.m4125
-rw-r--r--gl/m4/locale-ja.m46
-rw-r--r--gl/m4/locale-zh.m46
-rw-r--r--gl/m4/locale_h.m42
-rw-r--r--gl/m4/localeconv.m441
-rw-r--r--gl/m4/lock.m42
-rw-r--r--gl/m4/lstat.m47
-rw-r--r--gl/m4/malloc.m46
-rw-r--r--gl/m4/malloca.m42
-rw-r--r--gl/m4/manywarnings.m4115
-rw-r--r--gl/m4/math_h.m42
-rw-r--r--gl/m4/mbrtowc.m498
-rw-r--r--gl/m4/mbsinit.m42
-rw-r--r--gl/m4/mbsrtowcs.m423
-rw-r--r--gl/m4/mbstate_t.m42
-rw-r--r--gl/m4/mbtowc.m49
-rw-r--r--gl/m4/memchr.m42
-rw-r--r--gl/m4/memmem.m42
-rw-r--r--gl/m4/mempcpy.m49
-rw-r--r--gl/m4/memrchr.m42
-rw-r--r--gl/m4/minmax.m42
-rw-r--r--gl/m4/mkdir.m48
-rw-r--r--gl/m4/mkdtemp.m42
-rw-r--r--gl/m4/mkstemp.m420
-rw-r--r--gl/m4/mmap-anon.m42
-rw-r--r--gl/m4/mode_t.m42
-rw-r--r--gl/m4/msvc-inval.m42
-rw-r--r--gl/m4/msvc-nothrow.m42
-rw-r--r--gl/m4/multiarch.m42
-rw-r--r--gl/m4/musl.m420
-rw-r--r--gl/m4/nanosleep.m429
-rw-r--r--gl/m4/nl_langinfo.m411
-rw-r--r--gl/m4/nocrash.m42
-rw-r--r--gl/m4/nonblocking.m42
-rw-r--r--gl/m4/off_t.m42
-rw-r--r--gl/m4/open-cloexec.m42
-rw-r--r--gl/m4/open-slash.m42
-rw-r--r--gl/m4/open.m42
-rw-r--r--gl/m4/openat.m42
-rw-r--r--gl/m4/opendir.m437
-rw-r--r--gl/m4/pathmax.m42
-rw-r--r--gl/m4/pipe.m42
-rw-r--r--gl/m4/printf.m4632
-rw-r--r--gl/m4/pselect.m46
-rw-r--r--gl/m4/pthread_rwlock_rdlock.m436
-rw-r--r--gl/m4/pthread_sigmask.m424
-rw-r--r--gl/m4/raise.m42
-rw-r--r--gl/m4/rawmemchr.m42
-rw-r--r--gl/m4/readdir.m410
-rw-r--r--gl/m4/readlink.m410
-rw-r--r--gl/m4/readlinkat.m49
-rw-r--r--gl/m4/realloc.m46
-rw-r--r--gl/m4/reallocarray.m49
-rw-r--r--gl/m4/regex.m46
-rw-r--r--gl/m4/rename.m410
-rw-r--r--gl/m4/renameat.m47
-rw-r--r--gl/m4/rewinddir.m410
-rw-r--r--gl/m4/rmdir.m44
-rw-r--r--gl/m4/save-cwd.m42
-rw-r--r--gl/m4/select.m413
-rw-r--r--gl/m4/setenv.m419
-rw-r--r--gl/m4/setlocale_null.m437
-rw-r--r--gl/m4/sigaction.m42
-rw-r--r--gl/m4/signal_h.m42
-rw-r--r--gl/m4/signalblocking.m42
-rw-r--r--gl/m4/sigpipe.m42
-rw-r--r--gl/m4/size_max.m42
-rw-r--r--gl/m4/sleep.m46
-rw-r--r--gl/m4/socketlib.m42
-rw-r--r--gl/m4/sockets.m42
-rw-r--r--gl/m4/socklen.m42
-rw-r--r--gl/m4/sockpfaf.m42
-rw-r--r--gl/m4/ssize_t.m430
-rw-r--r--gl/m4/stat-time.m42
-rw-r--r--gl/m4/stat.m46
-rw-r--r--gl/m4/stdalign.m4166
-rw-r--r--gl/m4/stdarg.m42
-rw-r--r--gl/m4/stdbool.m4117
-rw-r--r--gl/m4/stddef_h.m428
-rw-r--r--gl/m4/stdint.m42
-rw-r--r--gl/m4/stdint_h.m42
-rw-r--r--gl/m4/stdio_h.m438
-rw-r--r--gl/m4/stdlib_h.m466
-rw-r--r--gl/m4/stpcpy.m49
-rw-r--r--gl/m4/strcase.m42
-rw-r--r--gl/m4/strcasestr.m42
-rw-r--r--gl/m4/strchrnul.m49
-rw-r--r--gl/m4/strdup.m42
-rw-r--r--gl/m4/strerror.m432
-rw-r--r--gl/m4/string_h.m411
-rw-r--r--gl/m4/strings_h.m42
-rw-r--r--gl/m4/strndup.m42
-rw-r--r--gl/m4/strnlen.m42
-rw-r--r--gl/m4/strsep.m42
-rw-r--r--gl/m4/sys_file_h.m42
-rw-r--r--gl/m4/sys_ioctl_h.m42
-rw-r--r--gl/m4/sys_random_h.m42
-rw-r--r--gl/m4/sys_select_h.m42
-rw-r--r--gl/m4/sys_socket_h.m42
-rw-r--r--gl/m4/sys_stat_h.m42
-rw-r--r--gl/m4/sys_time_h.m42
-rw-r--r--gl/m4/sys_types_h.m42
-rw-r--r--gl/m4/sys_uio_h.m42
-rw-r--r--gl/m4/sysexits.m42
-rw-r--r--gl/m4/tempname.m42
-rw-r--r--gl/m4/termios_h.m42
-rw-r--r--gl/m4/threadlib.m441
-rw-r--r--gl/m4/time_h.m413
-rw-r--r--gl/m4/timespec.m42
-rw-r--r--gl/m4/unistd-safer.m42
-rw-r--r--gl/m4/unistd_h.m49
-rw-r--r--gl/m4/unlink.m46
-rw-r--r--gl/m4/unlinkat.m42
-rw-r--r--gl/m4/utime.m42
-rw-r--r--gl/m4/utime_h.m42
-rw-r--r--gl/m4/utimens.m410
-rw-r--r--gl/m4/utimes.m42
-rw-r--r--gl/m4/vasnprintf.m4188
-rw-r--r--gl/m4/vasprintf.m42
-rw-r--r--gl/m4/visibility.m42
-rw-r--r--gl/m4/vsnprintf.m42
-rw-r--r--gl/m4/warn-on-use.m423
-rw-r--r--gl/m4/warnings.m494
-rw-r--r--gl/m4/wchar_h.m49
-rw-r--r--gl/m4/wchar_t.m42
-rw-r--r--gl/m4/wcrtomb.m416
-rw-r--r--gl/m4/wctype_h.m42
-rw-r--r--gl/m4/wint_t.m42
-rw-r--r--gl/m4/wmemchr.m42
-rw-r--r--gl/m4/wmempcpy.m49
-rw-r--r--gl/m4/xalloc.m42
-rw-r--r--gl/m4/xgetcwd.m42
-rw-r--r--gl/m4/xsize.m42
-rw-r--r--gl/m4/xstrndup.m42
-rw-r--r--gl/m4/xvasprintf.m42
-rw-r--r--gl/m4/year2038.m4124
-rw-r--r--gl/m4/zzgnulib.m42
-rw-r--r--gl/po/Makevars3
-rw-r--r--gl/po/POTFILES.in10
-rw-r--r--gl/po/af.po44
-rw-r--r--gl/po/be.po44
-rw-r--r--gl/po/bg.gmobin6217 -> 6227 bytes
-rw-r--r--gl/po/bg.po60
-rw-r--r--gl/po/ca.po44
-rw-r--r--gl/po/cs.po44
-rw-r--r--gl/po/da.po44
-rw-r--r--gl/po/de.po44
-rw-r--r--gl/po/el.po44
-rw-r--r--gl/po/eo.po44
-rw-r--r--gl/po/es.po44
-rw-r--r--gl/po/et.po44
-rw-r--r--gl/po/eu.po44
-rw-r--r--gl/po/fi.po44
-rw-r--r--gl/po/fr.po44
-rw-r--r--gl/po/ga.po44
-rw-r--r--gl/po/gl.po44
-rw-r--r--gl/po/hu.po44
-rw-r--r--gl/po/it.po44
-rw-r--r--gl/po/ja.po44
-rw-r--r--gl/po/ka.po44
-rw-r--r--gl/po/ko.po44
-rw-r--r--gl/po/man-db-gnulib.pot46
-rw-r--r--gl/po/ms.po44
-rw-r--r--gl/po/nb.po44
-rw-r--r--gl/po/nl.po44
-rw-r--r--gl/po/pl.po44
-rw-r--r--gl/po/pt.po44
-rw-r--r--gl/po/pt_BR.po44
-rw-r--r--gl/po/ro.po44
-rw-r--r--gl/po/ru.gmobin6284 -> 6288 bytes
-rw-r--r--gl/po/ru.po52
-rw-r--r--gl/po/rw.po44
-rw-r--r--gl/po/sk.po44
-rw-r--r--gl/po/sl.po44
-rw-r--r--gl/po/sr.po44
-rw-r--r--gl/po/sv.po44
-rw-r--r--gl/po/tr.po44
-rw-r--r--gl/po/uk.po44
-rw-r--r--gl/po/vi.po44
-rw-r--r--gl/po/zh_CN.po44
-rw-r--r--gl/po/zh_TW.po44
650 files changed, 10060 insertions, 5137 deletions
diff --git a/gl/lib/Makefile.am b/gl/lib/Makefile.am
index a8e268e2..2c18ae1d 100644
--- a/gl/lib/Makefile.am
+++ b/gl/lib/Makefile.am
@@ -1,6 +1,6 @@
## DO NOT EDIT! GENERATED AUTOMATICALLY!
## Process this file with automake to produce Makefile.in.
-# Copyright (C) 2002-2022 Free Software Foundation, Inc.
+# Copyright (C) 2002-2023 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
@@ -104,7 +104,8 @@
# xset \
# xstdopen \
# xstrndup \
-# xvasprintf
+# xvasprintf \
+# year2038-recommended
AUTOMAKE_OPTIONS = 1.14 gnits subdir-objects
@@ -134,18 +135,18 @@ libgnu_la_DEPENDENCIES = $(gl_LTLIBOBJS)
EXTRA_libgnu_la_SOURCES =
libgnu_la_LDFLAGS = $(AM_LDFLAGS)
libgnu_la_LDFLAGS += -no-undefined
+libgnu_la_LDFLAGS += $(CLOCK_TIME_LIB)
+libgnu_la_LDFLAGS += $(GETLOGIN_LIB)
+libgnu_la_LDFLAGS += $(GETRANDOM_LIB)
+libgnu_la_LDFLAGS += $(HARD_LOCALE_LIB)
libgnu_la_LDFLAGS += $(LIBSOCKET)
libgnu_la_LDFLAGS += $(LIBTHREAD)
-libgnu_la_LDFLAGS += $(LIB_CLOCK_GETTIME)
-libgnu_la_LDFLAGS += $(LIB_GETLOGIN)
-libgnu_la_LDFLAGS += $(LIB_GETRANDOM)
-libgnu_la_LDFLAGS += $(LIB_HARD_LOCALE)
-libgnu_la_LDFLAGS += $(LIB_MBRTOWC)
-libgnu_la_LDFLAGS += $(LIB_NANOSLEEP)
-libgnu_la_LDFLAGS += $(LIB_PTHREAD_SIGMASK)
-libgnu_la_LDFLAGS += $(LIB_SELECT)
-libgnu_la_LDFLAGS += $(LIB_SETLOCALE_NULL)
libgnu_la_LDFLAGS += $(LTLIBINTL)
+libgnu_la_LDFLAGS += $(MBRTOWC_LIB)
+libgnu_la_LDFLAGS += $(NANOSLEEP_LIB)
+libgnu_la_LDFLAGS += $(PTHREAD_SIGMASK_LIB)
+libgnu_la_LDFLAGS += $(SELECT_LIB)
+libgnu_la_LDFLAGS += $(SETLOCALE_NULL_LIB)
AM_CPPFLAGS += -DDEFAULT_TEXT_DOMAIN=\"man-db-gnulib\"
@@ -203,6 +204,37 @@ libgnu_la_SOURCES += gl_array_list.h gl_array_list.c
## end gnulib module array-list
+## begin gnulib module assert-h
+
+BUILT_SOURCES += $(ASSERT_H)
+
+# We need the following in order to create <assert.h> when the system
+# doesn't have one that works with the given compiler.
+if GL_GENERATE_ASSERT_H
+assert.h: assert.in.h verify.h $(top_builddir)/config.status
+ $(gl_V_at){ $(SED_HEADER_STDOUT) \
+ -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_ASSERT_H''@|$(NEXT_ASSERT_H)|g' \
+ < $(srcdir)/assert.in.h && \
+ sed -e '/@assert.h omit start@/,/@assert.h omit end@/d' \
+ -e 's|_gl_verify|_gl_static_assert|g' \
+ -e 's|_GL_VERIFY|_GL_STATIC_ASSERT|g' \
+ -e 's|_GL\(_STATIC_ASSERT_H\)|_GL\1|g' \
+ < $(srcdir)/verify.h; \
+ } > $@-t
+ $(AM_V_at)mv $@-t $@
+else
+assert.h: $(top_builddir)/config.status
+ rm -f $@
+endif
+MOSTLYCLEANFILES += assert.h assert.h-t
+
+EXTRA_DIST += assert.in.h verify.h
+
+## end gnulib module assert-h
+
## begin gnulib module assure
@@ -365,6 +397,7 @@ dirent.h: dirent.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_DIRENT_H''@|$(NEXT_DIRENT_H)|g' \
+ -e 's/@''DIR_HAS_FD_MEMBER''@/$(DIR_HAS_FD_MEMBER)/g' \
-e 's/@''GNULIB_OPENDIR''@/$(GL_GNULIB_OPENDIR)/g' \
-e 's/@''GNULIB_READDIR''@/$(GL_GNULIB_READDIR)/g' \
-e 's/@''GNULIB_REWINDDIR''@/$(GL_GNULIB_REWINDDIR)/g' \
@@ -383,6 +416,8 @@ dirent.h: dirent.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e 's|@''HAVE_SCANDIR''@|$(HAVE_SCANDIR)|g' \
-e 's|@''HAVE_ALPHASORT''@|$(HAVE_ALPHASORT)|g' \
-e 's|@''REPLACE_OPENDIR''@|$(REPLACE_OPENDIR)|g' \
+ -e 's|@''REPLACE_READDIR''@|$(REPLACE_READDIR)|g' \
+ -e 's|@''REPLACE_REWINDDIR''@|$(REPLACE_REWINDDIR)|g' \
-e 's|@''REPLACE_CLOSEDIR''@|$(REPLACE_CLOSEDIR)|g' \
-e 's|@''REPLACE_DIRFD''@|$(REPLACE_DIRFD)|g' \
-e 's|@''REPLACE_FDOPENDIR''@|$(REPLACE_FDOPENDIR)|g' \
@@ -403,6 +438,8 @@ if GL_COND_OBJ_DIRFD
libgnu_la_SOURCES += dirfd.c
endif
+EXTRA_DIST += dirent-private.h
+
## end gnulib module dirfd
## begin gnulib module dirname
@@ -439,39 +476,6 @@ endif
## end gnulib module dup2
-## begin gnulib module dynarray
-
-BUILT_SOURCES += malloc/dynarray.gl.h malloc/dynarray-skeleton.gl.h
-
-malloc/dynarray.gl.h: malloc/dynarray.h
- $(AM_V_GEN)$(MKDIR_P) '%reldir%/malloc'
- $(AM_V_at)$(SED_HEADER_STDOUT) \
- -e '/libc_hidden_proto/d' \
- $(srcdir)/malloc/dynarray.h > $@-t
- $(AM_V_at)mv $@-t $@
-MOSTLYCLEANFILES += malloc/dynarray.gl.h malloc/dynarray.gl.h-t
-
-malloc/dynarray-skeleton.gl.h: malloc/dynarray-skeleton.c
- $(AM_V_GEN)$(MKDIR_P) '%reldir%/malloc'
- $(AM_V_at)$(SED_HEADER_STDOUT) \
- -e 's|<malloc/dynarray\.h>|<malloc/dynarray.gl.h>|g' \
- -e 's|__attribute_maybe_unused__|_GL_ATTRIBUTE_MAYBE_UNUSED|g' \
- -e 's|__attribute_nonnull__|_GL_ATTRIBUTE_NONNULL|g' \
- -e 's|__attribute_warn_unused_result__|_GL_ATTRIBUTE_NODISCARD|g' \
- -e 's|__glibc_likely|_GL_LIKELY|g' \
- -e 's|__glibc_unlikely|_GL_UNLIKELY|g' \
- $(srcdir)/malloc/dynarray-skeleton.c > $@-t
- $(AM_V_at)mv $@-t $@
-MOSTLYCLEANFILES += malloc/dynarray-skeleton.gl.h malloc/dynarray-skeleton.gl.h-t
-
-libgnu_la_SOURCES += malloc/dynarray_at_failure.c malloc/dynarray_emplace_enlarge.c malloc/dynarray_finalize.c malloc/dynarray_resize.c malloc/dynarray_resize_clear.c
-
-EXTRA_DIST += dynarray.h malloc/dynarray-skeleton.c malloc/dynarray.h
-
-EXTRA_libgnu_la_SOURCES += malloc/dynarray-skeleton.c
-
-## end gnulib module dynarray
-
## begin gnulib module eloop-threshold
@@ -517,10 +521,32 @@ if GL_COND_OBJ_ERROR
libgnu_la_SOURCES += error.c
endif
-EXTRA_DIST += error.h
-
## end gnulib module error
+## begin gnulib module error-h
+
+BUILT_SOURCES += error.h
+
+# We need the following in order to override <error.h>.
+error.h: error.in.h $(top_builddir)/config.status $(CXXDEFS_H)
+ $(gl_V_at)$(SED_HEADER_STDOUT) \
+ -e 's|@''GUARD_PREFIX''@|GL|g' \
+ -e 's|@''HAVE_ERROR_H''@|$(HAVE_ERROR_H)|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''NEXT_ERROR_H''@|$(NEXT_ERROR_H)|g' \
+ -e 's|@''HAVE_ERROR''@|$(HAVE_ERROR)|g' \
+ -e 's|@''HAVE_ERROR_AT_LINE''@|$(HAVE_ERROR_AT_LINE)|g' \
+ -e 's|@''REPLACE_ERROR''@|$(REPLACE_ERROR)|g' \
+ -e 's|@''REPLACE_ERROR_AT_LINE''@|$(REPLACE_ERROR_AT_LINE)|g' \
+ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+ $(srcdir)/error.in.h > $@-t
+ $(AM_V_at)mv $@-t $@
+MOSTLYCLEANFILES += error.h error.h-t
+
+EXTRA_DIST += error.in.h
+
+## end gnulib module error-h
+
## begin gnulib module exitfail
libgnu_la_SOURCES += exitfail.c
@@ -602,6 +628,8 @@ if GL_COND_OBJ_FDOPENDIR
libgnu_la_SOURCES += fdopendir.c
endif
+EXTRA_DIST += dirent-private.h
+
## end gnulib module fdopendir
## begin gnulib module file-set
@@ -871,7 +899,11 @@ EXTRA_DIST += getopt-cdefs.in.h getopt-core.h getopt-ext.h getopt-pfx-core.h get
## begin gnulib module getprogname
-libgnu_la_SOURCES += getprogname.h getprogname.c
+if GL_COND_OBJ_GETPROGNAME
+libgnu_la_SOURCES += getprogname.c
+endif
+
+EXTRA_DIST += getprogname.h
## end gnulib module getprogname
@@ -910,6 +942,60 @@ EXTRA_DIST += $(top_srcdir)/build-aux/gitlog-to-changelog
## end gnulib module gitlog-to-changelog
+## begin gnulib module glibc-internal/dynarray
+
+BUILT_SOURCES += malloc/dynarray.gl.h malloc/dynarray-skeleton.gl.h
+
+malloc/dynarray.gl.h: malloc/dynarray.h
+ $(AM_V_GEN)$(MKDIR_P) '%reldir%/malloc'
+ $(AM_V_at)$(SED_HEADER_STDOUT) \
+ -e '/libc_hidden_proto/d' \
+ $(srcdir)/malloc/dynarray.h > $@-t
+ $(AM_V_at)mv $@-t $@
+MOSTLYCLEANFILES += malloc/dynarray.gl.h malloc/dynarray.gl.h-t
+
+malloc/dynarray-skeleton.gl.h: malloc/dynarray-skeleton.c
+ $(AM_V_GEN)$(MKDIR_P) '%reldir%/malloc'
+ $(AM_V_at)$(SED_HEADER_STDOUT) \
+ -e 's|<malloc/dynarray\.h>|<malloc/dynarray.gl.h>|g' \
+ -e 's|__attribute_maybe_unused__|_GL_ATTRIBUTE_MAYBE_UNUSED|g' \
+ -e 's|__attribute_nonnull__|_GL_ATTRIBUTE_NONNULL|g' \
+ -e 's|__attribute_warn_unused_result__|_GL_ATTRIBUTE_NODISCARD|g' \
+ -e 's|__glibc_likely|_GL_LIKELY|g' \
+ -e 's|__glibc_unlikely|_GL_UNLIKELY|g' \
+ $(srcdir)/malloc/dynarray-skeleton.c > $@-t
+ $(AM_V_at)mv $@-t $@
+MOSTLYCLEANFILES += malloc/dynarray-skeleton.gl.h malloc/dynarray-skeleton.gl.h-t
+
+libgnu_la_SOURCES += malloc/dynarray_at_failure.c malloc/dynarray_emplace_enlarge.c malloc/dynarray_finalize.c malloc/dynarray_resize.c malloc/dynarray_resize_clear.c
+
+EXTRA_DIST += dynarray.h malloc/dynarray-skeleton.c malloc/dynarray.h
+
+EXTRA_libgnu_la_SOURCES += malloc/dynarray-skeleton.c
+
+## end gnulib module glibc-internal/dynarray
+
+## begin gnulib module glibc-internal/scratch_buffer
+
+BUILT_SOURCES += malloc/scratch_buffer.gl.h
+
+malloc/scratch_buffer.gl.h: malloc/scratch_buffer.h
+ $(AM_V_GEN)$(MKDIR_P) '%reldir%/malloc'
+ $(AM_V_at)$(SED_HEADER_STDOUT) \
+ -e 's|__always_inline|inline _GL_ATTRIBUTE_ALWAYS_INLINE|g' \
+ -e 's|__glibc_likely|_GL_LIKELY|g' \
+ -e 's|__glibc_unlikely|_GL_UNLIKELY|g' \
+ -e '/libc_hidden_proto/d' \
+ $(srcdir)/malloc/scratch_buffer.h > $@-t
+ $(AM_V_at)mv $@-t $@
+MOSTLYCLEANFILES += malloc/scratch_buffer.gl.h malloc/scratch_buffer.gl.h-t
+
+libgnu_la_SOURCES += malloc/scratch_buffer_grow.c malloc/scratch_buffer_grow_preserve.c malloc/scratch_buffer_set_array_size.c
+
+EXTRA_DIST += malloc/scratch_buffer.h scratch_buffer.h
+
+## end gnulib module glibc-internal/scratch_buffer
+
## begin gnulib module glob
if GL_COND_OBJ_GLOB
@@ -1069,7 +1155,7 @@ libgnu_la_SOURCES += idx.h
## begin gnulib module intprops
-EXTRA_DIST += intprops.h
+EXTRA_DIST += intprops-internal.h intprops.h
## end gnulib module intprops
@@ -1097,6 +1183,8 @@ inttypes.h: inttypes.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_U
-e 's/@''HAVE_DECL_STRTOIMAX''@/$(HAVE_DECL_STRTOIMAX)/g' \
-e 's/@''HAVE_DECL_STRTOUMAX''@/$(HAVE_DECL_STRTOUMAX)/g' \
-e 's/@''HAVE_IMAXDIV_T''@/$(HAVE_IMAXDIV_T)/g' \
+ -e 's/@''REPLACE_IMAXABS''@/$(REPLACE_IMAXABS)/g' \
+ -e 's/@''REPLACE_IMAXDIV''@/$(REPLACE_IMAXDIV)/g' \
-e 's/@''REPLACE_STRTOIMAX''@/$(REPLACE_STRTOIMAX)/g' \
-e 's/@''REPLACE_STRTOUMAX''@/$(REPLACE_STRTOUMAX)/g' \
-e 's/@''INT32_MAX_LT_INTMAX_MAX''@/$(INT32_MAX_LT_INTMAX_MAX)/g' \
@@ -1717,27 +1805,6 @@ EXTRA_DIST += save-cwd.h
## end gnulib module save-cwd
-## begin gnulib module scratch_buffer
-
-BUILT_SOURCES += malloc/scratch_buffer.gl.h
-
-malloc/scratch_buffer.gl.h: malloc/scratch_buffer.h
- $(AM_V_GEN)$(MKDIR_P) '%reldir%/malloc'
- $(AM_V_at)$(SED_HEADER_STDOUT) \
- -e 's|__always_inline|inline _GL_ATTRIBUTE_ALWAYS_INLINE|g' \
- -e 's|__glibc_likely|_GL_LIKELY|g' \
- -e 's|__glibc_unlikely|_GL_UNLIKELY|g' \
- -e '/libc_hidden_proto/d' \
- $(srcdir)/malloc/scratch_buffer.h > $@-t
- $(AM_V_at)mv $@-t $@
-MOSTLYCLEANFILES += malloc/scratch_buffer.gl.h malloc/scratch_buffer.gl.h-t
-
-libgnu_la_SOURCES += malloc/scratch_buffer_dupfree.c malloc/scratch_buffer_grow.c malloc/scratch_buffer_grow_preserve.c malloc/scratch_buffer_set_array_size.c
-
-EXTRA_DIST += malloc/scratch_buffer.h scratch_buffer.h
-
-## end gnulib module scratch_buffer
-
## begin gnulib module select
if GL_COND_OBJ_SELECT
@@ -1929,26 +1996,6 @@ EXTRA_DIST += stat-time.h
## end gnulib module stat-time
-## begin gnulib module stdalign
-
-BUILT_SOURCES += $(STDALIGN_H)
-
-# We need the following in order to create <stdalign.h> when the system
-# doesn't have one that works.
-if GL_GENERATE_STDALIGN_H
-stdalign.h: stdalign.in.h $(top_builddir)/config.status
- $(gl_V_at)$(SED_HEADER_TO_AT_t) $(srcdir)/stdalign.in.h
- $(AM_V_at)mv $@-t $@
-else
-stdalign.h: $(top_builddir)/config.status
- rm -f $@
-endif
-MOSTLYCLEANFILES += stdalign.h stdalign.h-t
-
-EXTRA_DIST += stdalign.in.h
-
-## end gnulib module stdalign
-
## begin gnulib module stdarg
BUILT_SOURCES += $(STDARG_H)
@@ -1975,27 +2022,26 @@ EXTRA_DIST += stdarg.in.h
## end gnulib module stdarg
-## begin gnulib module stdbool
+## begin gnulib module stdckdint
-BUILT_SOURCES += $(STDBOOL_H)
+BUILT_SOURCES += $(STDCKDINT_H)
-# We need the following in order to create <stdbool.h> when the system
-# doesn't have one that works.
-if GL_GENERATE_STDBOOL_H
-stdbool.h: stdbool.in.h $(top_builddir)/config.status
+# We need the following in order to create <stdckdint.h> when the system
+# doesn't have one that works with the given compiler.
+if GL_GENERATE_STDCKDINT_H
+stdckdint.h: stdckdint.in.h $(top_builddir)/config.status
$(gl_V_at)$(SED_HEADER_STDOUT) \
- -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' \
- $(srcdir)/stdbool.in.h > $@-t
+ $(srcdir)/stdckdint.in.h > $@-t
$(AM_V_at)mv $@-t $@
else
-stdbool.h: $(top_builddir)/config.status
+stdckdint.h: $(top_builddir)/config.status
rm -f $@
endif
-MOSTLYCLEANFILES += stdbool.h stdbool.h-t
+MOSTLYCLEANFILES += stdckdint.h stdckdint.h-t
-EXTRA_DIST += stdbool.in.h
+EXTRA_DIST += intprops-internal.h stdckdint.in.h
-## end gnulib module stdbool
+## end gnulib module stdckdint
## begin gnulib module stddef
@@ -2147,14 +2193,17 @@ stdio.h: stdio.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
-e 's/@''GNULIB_MDA_GETW''@/$(GL_GNULIB_MDA_GETW)/g' \
-e 's/@''GNULIB_MDA_PUTW''@/$(GL_GNULIB_MDA_PUTW)/g' \
-e 's/@''GNULIB_MDA_TEMPNAM''@/$(GL_GNULIB_MDA_TEMPNAM)/g' \
- < $(srcdir)/stdio.in.h | \
- sed -e 's|@''HAVE_DECL_FCLOSEALL''@|$(HAVE_DECL_FCLOSEALL)|g' \
+ < $(srcdir)/stdio.in.h > $@-t1
+ $(AM_V_at)sed \
+ -e 's|@''HAVE_DECL_FCLOSEALL''@|$(HAVE_DECL_FCLOSEALL)|g' \
-e 's|@''HAVE_DECL_FPURGE''@|$(HAVE_DECL_FPURGE)|g' \
-e 's|@''HAVE_DECL_FSEEKO''@|$(HAVE_DECL_FSEEKO)|g' \
-e 's|@''HAVE_DECL_FTELLO''@|$(HAVE_DECL_FTELLO)|g' \
-e 's|@''HAVE_DECL_GETDELIM''@|$(HAVE_DECL_GETDELIM)|g' \
-e 's|@''HAVE_DECL_GETLINE''@|$(HAVE_DECL_GETLINE)|g' \
+ -e 's|@''HAVE_DECL_GETW''@|$(HAVE_DECL_GETW)|g' \
-e 's|@''HAVE_DECL_OBSTACK_PRINTF''@|$(HAVE_DECL_OBSTACK_PRINTF)|g' \
+ -e 's|@''HAVE_DECL_PUTW''@|$(HAVE_DECL_PUTW)|g' \
-e 's|@''HAVE_DECL_SNPRINTF''@|$(HAVE_DECL_SNPRINTF)|g' \
-e 's|@''HAVE_DECL_VSNPRINTF''@|$(HAVE_DECL_VSNPRINTF)|g' \
-e 's|@''HAVE_DPRINTF''@|$(HAVE_DPRINTF)|g' \
@@ -2165,6 +2214,8 @@ stdio.h: stdio.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
-e 's|@''HAVE_RENAMEAT''@|$(HAVE_RENAMEAT)|g' \
-e 's|@''HAVE_VASPRINTF''@|$(HAVE_VASPRINTF)|g' \
-e 's|@''HAVE_VDPRINTF''@|$(HAVE_VDPRINTF)|g' \
+ < $@-t1 > $@-t2
+ $(AM_V_at)sed \
-e 's|@''REPLACE_DPRINTF''@|$(REPLACE_DPRINTF)|g' \
-e 's|@''REPLACE_FCLOSE''@|$(REPLACE_FCLOSE)|g' \
-e 's|@''REPLACE_FDOPEN''@|$(REPLACE_FDOPEN)|g' \
@@ -2202,9 +2253,10 @@ stdio.h: stdio.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
-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)' \
- > $@-t
- $(AM_V_at)mv $@-t $@
-MOSTLYCLEANFILES += stdio.h stdio.h-t
+ < $@-t2 > $@-t3
+ $(AM_V_at)rm -f $@-t1 $@-t2
+ $(AM_V_at)mv $@-t3 $@
+MOSTLYCLEANFILES += stdio.h stdio.h-t1 stdio.h-t2 stdio.h-t3
if GL_COND_OBJ_STDIO_READ
libgnu_la_SOURCES += stdio-read.c
@@ -2239,10 +2291,12 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
-e 's/@''GNULIB_CANONICALIZE_FILE_NAME''@/$(GL_GNULIB_CANONICALIZE_FILE_NAME)/g' \
-e 's/@''GNULIB_FREE_POSIX''@/$(GL_GNULIB_FREE_POSIX)/g' \
-e 's/@''GNULIB_GETLOADAVG''@/$(GL_GNULIB_GETLOADAVG)/g' \
+ -e 's/@''GNULIB_GETPROGNAME''@/$(GL_GNULIB_GETPROGNAME)/g' \
-e 's/@''GNULIB_GETSUBOPT''@/$(GL_GNULIB_GETSUBOPT)/g' \
-e 's/@''GNULIB_GRANTPT''@/$(GL_GNULIB_GRANTPT)/g' \
-e 's/@''GNULIB_MALLOC_GNU''@/$(GL_GNULIB_MALLOC_GNU)/g' \
-e 's/@''GNULIB_MALLOC_POSIX''@/$(GL_GNULIB_MALLOC_POSIX)/g' \
+ -e 's/@''GNULIB_MBSTOWCS''@/$(GL_GNULIB_MBSTOWCS)/g' \
-e 's/@''GNULIB_MBTOWC''@/$(GL_GNULIB_MBTOWC)/g' \
-e 's/@''GNULIB_MKDTEMP''@/$(GL_GNULIB_MKDTEMP)/g' \
-e 's/@''GNULIB_MKOSTEMP''@/$(GL_GNULIB_MKOSTEMP)/g' \
@@ -2279,8 +2333,9 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
-e 's/@''GNULIB_MDA_GCVT''@/$(GL_GNULIB_MDA_GCVT)/g' \
-e 's/@''GNULIB_MDA_MKTEMP''@/$(GL_GNULIB_MDA_MKTEMP)/g' \
-e 's/@''GNULIB_MDA_PUTENV''@/$(GL_GNULIB_MDA_PUTENV)/g' \
- < $(srcdir)/stdlib.in.h | \
- sed -e 's|@''HAVE__EXIT''@|$(HAVE__EXIT)|g' \
+ < $(srcdir)/stdlib.in.h > $@-t1
+ $(AM_V_at)sed \
+ -e 's|@''HAVE__EXIT''@|$(HAVE__EXIT)|g' \
-e 's|@''HAVE_ALIGNED_ALLOC''@|$(HAVE_ALIGNED_ALLOC)|g' \
-e 's|@''HAVE_ATOLL''@|$(HAVE_ATOLL)|g' \
-e 's|@''HAVE_CANONICALIZE_FILE_NAME''@|$(HAVE_CANONICALIZE_FILE_NAME)|g' \
@@ -2288,6 +2343,8 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
-e 's|@''HAVE_DECL_FCVT''@|$(HAVE_DECL_FCVT)|g' \
-e 's|@''HAVE_DECL_GCVT''@|$(HAVE_DECL_GCVT)|g' \
-e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \
+ -e 's|@''HAVE_DECL_PROGRAM_INVOCATION_NAME''@|$(HAVE_DECL_PROGRAM_INVOCATION_NAME)|g' \
+ -e 's|@''HAVE_GETPROGNAME''@|$(HAVE_GETPROGNAME)|g' \
-e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \
-e 's|@''HAVE_GRANTPT''@|$(HAVE_GRANTPT)|g' \
-e 's|@''HAVE_INITSTATE''@|$(HAVE_INITSTATE)|g' \
@@ -2323,17 +2380,28 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
-e 's|@''HAVE_SYS_LOADAVG_H''@|$(HAVE_SYS_LOADAVG_H)|g' \
-e 's|@''HAVE_UNLOCKPT''@|$(HAVE_UNLOCKPT)|g' \
-e 's|@''HAVE_DECL_UNSETENV''@|$(HAVE_DECL_UNSETENV)|g' \
+ < $@-t1 > $@-t2
+ $(AM_V_at)sed \
+ -e 's|@''REPLACE__EXIT''@|$(REPLACE__EXIT)|g' \
-e 's|@''REPLACE_ALIGNED_ALLOC''@|$(REPLACE_ALIGNED_ALLOC)|g' \
-e 's|@''REPLACE_CALLOC_FOR_CALLOC_GNU''@|$(REPLACE_CALLOC_FOR_CALLOC_GNU)|g' \
-e 's|@''REPLACE_CALLOC_FOR_CALLOC_POSIX''@|$(REPLACE_CALLOC_FOR_CALLOC_POSIX)|g' \
-e 's|@''REPLACE_CANONICALIZE_FILE_NAME''@|$(REPLACE_CANONICALIZE_FILE_NAME)|g' \
-e 's|@''REPLACE_FREE''@|$(REPLACE_FREE)|g' \
+ -e 's|@''REPLACE_GETLOADAVG''@|$(REPLACE_GETLOADAVG)|g' \
+ -e 's|@''REPLACE_GETPROGNAME''@|$(REPLACE_GETPROGNAME)|g' \
+ -e 's|@''REPLACE_GETSUBOPT''@|$(REPLACE_GETSUBOPT)|g' \
-e 's|@''REPLACE_INITSTATE''@|$(REPLACE_INITSTATE)|g' \
-e 's|@''REPLACE_MALLOC_FOR_MALLOC_GNU''@|$(REPLACE_MALLOC_FOR_MALLOC_GNU)|g' \
-e 's|@''REPLACE_MALLOC_FOR_MALLOC_POSIX''@|$(REPLACE_MALLOC_FOR_MALLOC_POSIX)|g' \
+ -e 's|@''REPLACE_MB_CUR_MAX''@|$(REPLACE_MB_CUR_MAX)|g' \
+ -e 's|@''REPLACE_MBSTOWCS''@|$(REPLACE_MBSTOWCS)|g' \
-e 's|@''REPLACE_MBTOWC''@|$(REPLACE_MBTOWC)|g' \
+ -e 's|@''REPLACE_MKOSTEMP''@|$(REPLACE_MKOSTEMP)|g' \
+ -e 's|@''REPLACE_MKOSTEMPS''@|$(REPLACE_MKOSTEMPS)|g' \
-e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \
-e 's|@''REPLACE_POSIX_MEMALIGN''@|$(REPLACE_POSIX_MEMALIGN)|g' \
+ -e 's|@''REPLACE_POSIX_OPENPT''@|$(REPLACE_POSIX_OPENPT)|g' \
-e 's|@''REPLACE_PTSNAME''@|$(REPLACE_PTSNAME)|g' \
-e 's|@''REPLACE_PTSNAME_R''@|$(REPLACE_PTSNAME_R)|g' \
-e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \
@@ -2358,9 +2426,10 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
-e '/definition of _Noreturn/r $(_NORETURN_H)' \
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
- > $@-t
- $(AM_V_at)mv $@-t $@
-MOSTLYCLEANFILES += stdlib.h stdlib.h-t
+ < $@-t2 > $@-t3
+ $(AM_V_at)rm -f $@-t1 $@-t2
+ $(AM_V_at)mv $@-t3 $@
+MOSTLYCLEANFILES += stdlib.h stdlib.h-t1 stdlib.h-t2 stdlib.h-t3
EXTRA_DIST += stdlib.in.h
@@ -2488,6 +2557,7 @@ string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e 's/@''GNULIB_MEMMEM''@/$(GL_GNULIB_MEMMEM)/g' \
-e 's/@''GNULIB_MEMPCPY''@/$(GL_GNULIB_MEMPCPY)/g' \
-e 's/@''GNULIB_MEMRCHR''@/$(GL_GNULIB_MEMRCHR)/g' \
+ -e 's/@''GNULIB_MEMSET_EXPLICIT''@/$(GL_GNULIB_MEMSET_EXPLICIT)/g' \
-e 's/@''GNULIB_RAWMEMCHR''@/$(GL_GNULIB_RAWMEMCHR)/g' \
-e 's/@''GNULIB_STPCPY''@/$(GL_GNULIB_STPCPY)/g' \
-e 's/@''GNULIB_STPNCPY''@/$(GL_GNULIB_STPNCPY)/g' \
@@ -2511,14 +2581,16 @@ string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e 's/@''GNULIB_MDA_MEMCCPY''@/$(GL_GNULIB_MDA_MEMCCPY)/g' \
-e 's/@''GNULIB_MDA_STRDUP''@/$(GL_GNULIB_MDA_STRDUP)/g' \
-e 's/@''GNULIB_FREE_POSIX''@/$(GL_GNULIB_FREE_POSIX)/g' \
- < $(srcdir)/string.in.h | \
- sed -e 's|@''HAVE_EXPLICIT_BZERO''@|$(HAVE_EXPLICIT_BZERO)|g' \
+ < $(srcdir)/string.in.h > $@-t1
+ $(AM_V_at)sed \
+ -e 's|@''HAVE_EXPLICIT_BZERO''@|$(HAVE_EXPLICIT_BZERO)|g' \
-e 's|@''HAVE_FFSL''@|$(HAVE_FFSL)|g' \
-e 's|@''HAVE_FFSLL''@|$(HAVE_FFSLL)|g' \
-e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \
-e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \
-e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \
-e 's|@''HAVE_DECL_MEMRCHR''@|$(HAVE_DECL_MEMRCHR)|g' \
+ -e 's|@''HAVE_MEMSET_EXPLICIT''@|$(HAVE_MEMSET_EXPLICIT)|g' \
-e 's|@''HAVE_RAWMEMCHR''@|$(HAVE_RAWMEMCHR)|g' \
-e 's|@''HAVE_STPCPY''@|$(HAVE_STPCPY)|g' \
-e 's|@''HAVE_STPNCPY''@|$(HAVE_STPNCPY)|g' \
@@ -2539,7 +2611,9 @@ string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e 's|@''REPLACE_FFSLL''@|$(REPLACE_FFSLL)|g' \
-e 's|@''REPLACE_MEMCHR''@|$(REPLACE_MEMCHR)|g' \
-e 's|@''REPLACE_MEMMEM''@|$(REPLACE_MEMMEM)|g' \
+ -e 's|@''REPLACE_MEMPCPY''@|$(REPLACE_MEMPCPY)|g' \
-e 's|@''REPLACE_FREE''@|$(REPLACE_FREE)|g' \
+ -e 's|@''REPLACE_STPCPY''@|$(REPLACE_STPCPY)|g' \
-e 's|@''REPLACE_STPNCPY''@|$(REPLACE_STPNCPY)|g' \
-e 's|@''REPLACE_STRCHRNUL''@|$(REPLACE_STRCHRNUL)|g' \
-e 's|@''REPLACE_STRDUP''@|$(REPLACE_STRDUP)|g' \
@@ -2557,9 +2631,10 @@ string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-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)' \
- > $@-t
- $(AM_V_at)mv $@-t $@
-MOSTLYCLEANFILES += string.h string.h-t
+ < $@-t1 > $@-t2
+ $(AM_V_at)rm -f $@-t1
+ $(AM_V_at)mv $@-t2 $@
+MOSTLYCLEANFILES += string.h string.h-t1 string.h-t2
EXTRA_DIST += string.in.h
@@ -3013,7 +3088,7 @@ libgnu_la_SOURCES += glthread/threadlib.c
## end gnulib module threadlib
-## begin gnulib module time
+## begin gnulib module time-h
BUILT_SOURCES += time.h
@@ -3032,6 +3107,7 @@ time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(
-e 's/@''GNULIB_NANOSLEEP''@/$(GL_GNULIB_NANOSLEEP)/g' \
-e 's/@''GNULIB_STRFTIME''@/$(GL_GNULIB_STRFTIME)/g' \
-e 's/@''GNULIB_STRPTIME''@/$(GL_GNULIB_STRPTIME)/g' \
+ -e 's/@''GNULIB_TIME''@/$(GL_GNULIB_TIME)/g' \
-e 's/@''GNULIB_TIMEGM''@/$(GL_GNULIB_TIMEGM)/g' \
-e 's/@''GNULIB_TIMESPEC_GET''@/$(GL_GNULIB_TIMESPEC_GET)/g' \
-e 's/@''GNULIB_TIMESPEC_GETRES''@/$(GL_GNULIB_TIMESPEC_GETRES)/g' \
@@ -3053,7 +3129,9 @@ time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(
-e 's|@''REPLACE_MKTIME''@|$(REPLACE_MKTIME)|g' \
-e 's|@''REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \
-e 's|@''REPLACE_STRFTIME''@|$(REPLACE_STRFTIME)|g' \
+ -e 's|@''REPLACE_TIME''@|$(REPLACE_TIME)|g' \
-e 's|@''REPLACE_TIMEGM''@|$(REPLACE_TIMEGM)|g' \
+ -e 's|@''REPLACE_TIMESPEC_GET''@|$(REPLACE_TIMESPEC_GET)|g' \
-e 's|@''REPLACE_TZSET''@|$(REPLACE_TZSET)|g' \
-e 's|@''PTHREAD_H_DEFINES_STRUCT_TIMESPEC''@|$(PTHREAD_H_DEFINES_STRUCT_TIMESPEC)|g' \
-e 's|@''SYS_TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(SYS_TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \
@@ -3069,7 +3147,7 @@ MOSTLYCLEANFILES += time.h time.h-t
EXTRA_DIST += time.in.h
-## end gnulib module time
+## end gnulib module time-h
## begin gnulib module timespec
@@ -3118,6 +3196,8 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e 's/@''GNULIB_FDATASYNC''@/$(GL_GNULIB_FDATASYNC)/g' \
-e 's/@''GNULIB_FSYNC''@/$(GL_GNULIB_FSYNC)/g' \
-e 's/@''GNULIB_FTRUNCATE''@/$(GL_GNULIB_FTRUNCATE)/g' \
+ < $(srcdir)/unistd.in.h > $@-t1
+ $(AM_V_at)sed \
-e 's/@''GNULIB_GETCWD''@/$(GL_GNULIB_GETCWD)/g' \
-e 's/@''GNULIB_GETDOMAINNAME''@/$(GL_GNULIB_GETDOMAINNAME)/g' \
-e 's/@''GNULIB_GETDTABLESIZE''@/$(GL_GNULIB_GETDTABLESIZE)/g' \
@@ -3179,8 +3259,9 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e 's/@''GNULIB_MDA_SWAB''@/$(GL_GNULIB_MDA_SWAB)/g' \
-e 's/@''GNULIB_MDA_UNLINK''@/$(GL_GNULIB_MDA_UNLINK)/g' \
-e 's/@''GNULIB_MDA_WRITE''@/$(GL_GNULIB_MDA_WRITE)/g' \
- < $(srcdir)/unistd.in.h | \
- sed -e 's|@''HAVE_CHOWN''@|$(HAVE_CHOWN)|g' \
+ < $@-t1 > $@-t2
+ $(AM_V_at)sed \
+ -e 's|@''HAVE_CHOWN''@|$(HAVE_CHOWN)|g' \
-e 's|@''HAVE_COPY_FILE_RANGE''@|$(HAVE_COPY_FILE_RANGE)|g' \
-e 's|@''HAVE_DUP3''@|$(HAVE_DUP3)|g' \
-e 's|@''HAVE_EUIDACCESS''@|$(HAVE_EUIDACCESS)|g' \
@@ -3227,13 +3308,15 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e 's|@''HAVE_DECL_TTYNAME_R''@|$(HAVE_DECL_TTYNAME_R)|g' \
-e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \
-e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \
- | \
- sed -e 's|@''REPLACE_ACCESS''@|$(REPLACE_ACCESS)|g' \
+ < $@-t2 > $@-t3
+ $(AM_V_at)sed \
+ -e 's|@''REPLACE_ACCESS''@|$(REPLACE_ACCESS)|g' \
-e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \
-e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \
-e 's|@''REPLACE_COPY_FILE_RANGE''@|$(REPLACE_COPY_FILE_RANGE)|g' \
-e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \
-e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \
+ -e 's|@''REPLACE_DUP3''@|$(REPLACE_DUP3)|g' \
-e 's|@''REPLACE_EXECL''@|$(REPLACE_EXECL)|g' \
-e 's|@''REPLACE_EXECLE''@|$(REPLACE_EXECLE)|g' \
-e 's|@''REPLACE_EXECLP''@|$(REPLACE_EXECLP)|g' \
@@ -3243,10 +3326,12 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e 's|@''REPLACE_EXECVPE''@|$(REPLACE_EXECVPE)|g' \
-e 's|@''REPLACE_FACCESSAT''@|$(REPLACE_FACCESSAT)|g' \
-e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \
+ -e 's|@''REPLACE_FDATASYNC''@|$(REPLACE_FDATASYNC)|g' \
-e 's|@''REPLACE_FTRUNCATE''@|$(REPLACE_FTRUNCATE)|g' \
-e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \
-e 's|@''REPLACE_GETDOMAINNAME''@|$(REPLACE_GETDOMAINNAME)|g' \
-e 's|@''REPLACE_GETDTABLESIZE''@|$(REPLACE_GETDTABLESIZE)|g' \
+ -e 's|@''REPLACE_GETENTROPY''@|$(REPLACE_GETENTROPY)|g' \
-e 's|@''REPLACE_GETLOGIN_R''@|$(REPLACE_GETLOGIN_R)|g' \
-e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \
-e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \
@@ -3257,12 +3342,14 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e 's|@''REPLACE_LINK''@|$(REPLACE_LINK)|g' \
-e 's|@''REPLACE_LINKAT''@|$(REPLACE_LINKAT)|g' \
-e 's|@''REPLACE_LSEEK''@|$(REPLACE_LSEEK)|g' \
+ -e 's|@''REPLACE_PIPE2''@|$(REPLACE_PIPE2)|g' \
-e 's|@''REPLACE_PREAD''@|$(REPLACE_PREAD)|g' \
-e 's|@''REPLACE_PWRITE''@|$(REPLACE_PWRITE)|g' \
-e 's|@''REPLACE_READ''@|$(REPLACE_READ)|g' \
-e 's|@''REPLACE_READLINK''@|$(REPLACE_READLINK)|g' \
-e 's|@''REPLACE_READLINKAT''@|$(REPLACE_READLINKAT)|g' \
-e 's|@''REPLACE_RMDIR''@|$(REPLACE_RMDIR)|g' \
+ -e 's|@''REPLACE_SETHOSTNAME''@|$(REPLACE_SETHOSTNAME)|g' \
-e 's|@''REPLACE_SLEEP''@|$(REPLACE_SLEEP)|g' \
-e 's|@''REPLACE_SYMLINK''@|$(REPLACE_SYMLINK)|g' \
-e 's|@''REPLACE_SYMLINKAT''@|$(REPLACE_SYMLINKAT)|g' \
@@ -3278,9 +3365,10 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-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)' \
- > $@-t
- $(AM_V_at)mv $@-t $@
-MOSTLYCLEANFILES += unistd.h unistd.h-t
+ < $@-t3 > $@-t4
+ $(AM_V_at)rm -f $@-t1 $@-t2 $@-t3
+ $(AM_V_at)mv $@-t4 $@
+MOSTLYCLEANFILES += unistd.h unistd.h-t1 unistd.h-t2 unistd.h-t3 unistd.h-t4
EXTRA_DIST += unistd.in.h
@@ -3459,8 +3547,9 @@ wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
-e 's/@''GNULIB_WCSFTIME''@/$(GL_GNULIB_WCSFTIME)/g' \
-e 's/@''GNULIB_MDA_WCSDUP''@/$(GL_GNULIB_MDA_WCSDUP)/g' \
-e 's/@''GNULIB_FREE_POSIX''@/$(GL_GNULIB_FREE_POSIX)/g' \
- < $(srcdir)/wchar.in.h | \
- sed -e 's|@''HAVE_WINT_T''@|$(HAVE_WINT_T)|g' \
+ < $(srcdir)/wchar.in.h > $@-t1
+ $(AM_V_at)sed \
+ -e 's|@''HAVE_WINT_T''@|$(HAVE_WINT_T)|g' \
-e 's|@''HAVE_BTOWC''@|$(HAVE_BTOWC)|g' \
-e 's|@''HAVE_MBSINIT''@|$(HAVE_MBSINIT)|g' \
-e 's|@''HAVE_MBRTOWC''@|$(HAVE_MBRTOWC)|g' \
@@ -3503,8 +3592,9 @@ wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
-e 's|@''HAVE_DECL_WCTOB''@|$(HAVE_DECL_WCTOB)|g' \
-e 's|@''HAVE_DECL_WCSDUP''@|$(HAVE_DECL_WCSDUP)|g' \
-e 's|@''HAVE_DECL_WCWIDTH''@|$(HAVE_DECL_WCWIDTH)|g' \
- | \
- sed -e 's|@''REPLACE_MBSTATE_T''@|$(REPLACE_MBSTATE_T)|g' \
+ < $@-t1 > $@-t2
+ $(AM_V_at)sed \
+ -e 's|@''REPLACE_MBSTATE_T''@|$(REPLACE_MBSTATE_T)|g' \
-e 's|@''REPLACE_BTOWC''@|$(REPLACE_BTOWC)|g' \
-e 's|@''REPLACE_WCTOB''@|$(REPLACE_WCTOB)|g' \
-e 's|@''REPLACE_FREE''@|$(REPLACE_FREE)|g' \
@@ -3519,13 +3609,19 @@ wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
-e 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \
-e 's|@''REPLACE_WCSWIDTH''@|$(REPLACE_WCSWIDTH)|g' \
-e 's|@''REPLACE_WCSFTIME''@|$(REPLACE_WCSFTIME)|g' \
+ -e 's|@''REPLACE_WCSCMP''@|$(REPLACE_WCSCMP)|g' \
+ -e 's|@''REPLACE_WCSNCMP''@|$(REPLACE_WCSNCMP)|g' \
+ -e 's|@''REPLACE_WCSSTR''@|$(REPLACE_WCSSTR)|g' \
-e 's|@''REPLACE_WCSTOK''@|$(REPLACE_WCSTOK)|g' \
+ -e 's|@''REPLACE_WMEMCMP''@|$(REPLACE_WMEMCMP)|g' \
+ -e 's|@''REPLACE_WMEMPCPY''@|$(REPLACE_WMEMPCPY)|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)' \
- > $@-t
- $(AM_V_at)mv $@-t $@
-MOSTLYCLEANFILES += wchar.h wchar.h-t
+ < $@-t2 > $@-t3
+ $(AM_V_at)rm -f $@-t1 $@-t2
+ $(AM_V_at)mv $@-t3 $@
+MOSTLYCLEANFILES += wchar.h wchar.h-t1 wchar.h-t2 wchar.h-t3
EXTRA_DIST += wchar.in.h
diff --git a/gl/lib/Makefile.in b/gl/lib/Makefile.in
index 3caa632f..50c172b5 100644
--- a/gl/lib/Makefile.in
+++ b/gl/lib/Makefile.in
@@ -14,7 +14,7 @@
@SET_MAKE@
-# Copyright (C) 2002-2022 Free Software Foundation, Inc.
+# Copyright (C) 2002-2023 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
@@ -118,7 +118,8 @@
# xset \
# xstdopen \
# xstrndup \
-# xvasprintf
+# xvasprintf \
+# year2038-recommended
@@ -223,76 +224,77 @@ host_triplet = @host@
@GL_COND_OBJ_GETLINE_TRUE@am__append_25 = getline.c
@GL_COND_OBJ_GETLOGIN_R_TRUE@am__append_26 = getlogin_r.c
@GL_COND_OBJ_GETOPT_TRUE@am__append_27 = getopt.c getopt1.c
-@GL_COND_OBJ_GETRANDOM_TRUE@am__append_28 = getrandom.c
-@GL_COND_OBJ_GETTIMEOFDAY_TRUE@am__append_29 = gettimeofday.c
-@GL_COND_OBJ_GLOB_TRUE@am__append_30 = glob.c globfree.c
-@GL_COND_OBJ_GLOB_PATTERN_P_TRUE@am__append_31 = glob_pattern_p.c
-@GL_COND_OBJ_IOCTL_TRUE@am__append_32 = ioctl.c
-@GL_COND_OBJ_ISBLANK_TRUE@am__append_33 = isblank.c
-@GL_COND_OBJ_LCHOWN_TRUE@am__append_34 = lchown.c
-@GL_COND_OBJ_LOCALECONV_TRUE@am__append_35 = localeconv.c
-@GL_COND_OBJ_LSTAT_TRUE@am__append_36 = lstat.c
-@GL_COND_OBJ_MBRTOWC_TRUE@am__append_37 = mbrtowc.c
-@GL_COND_OBJ_MBSINIT_TRUE@am__append_38 = mbsinit.c
-@GL_COND_OBJ_MBSRTOWCS_TRUE@am__append_39 = mbsrtowcs.c
-@GL_COND_OBJ_MBTOWC_TRUE@am__append_40 = mbtowc.c
-@GL_COND_OBJ_MEMCHR_TRUE@am__append_41 = memchr.c
-@GL_COND_OBJ_MEMPCPY_TRUE@am__append_42 = mempcpy.c
-@GL_COND_OBJ_MEMRCHR_TRUE@am__append_43 = memrchr.c
-@GL_COND_OBJ_MKDIR_TRUE@am__append_44 = mkdir.c
-@GL_COND_OBJ_MKDTEMP_TRUE@am__append_45 = mkdtemp.c
-@GL_COND_OBJ_MKSTEMP_TRUE@am__append_46 = mkstemp.c
-@GL_COND_OBJ_MSVC_INVAL_TRUE@am__append_47 = msvc-inval.c
-@GL_COND_OBJ_MSVC_NOTHROW_TRUE@am__append_48 = msvc-nothrow.c
-@GL_COND_OBJ_NANOSLEEP_TRUE@am__append_49 = nanosleep.c
-@GL_COND_OBJ_NL_LANGINFO_TRUE@am__append_50 = nl_langinfo.c
-@GL_COND_OBJ_NL_LANGINFO_LOCK_TRUE@am__append_51 = nl_langinfo-lock.c
-@GL_COND_OBJ_OPEN_TRUE@am__append_52 = open.c
-@GL_COND_OBJ_OPENAT_TRUE@am__append_53 = openat.c
-@GL_COND_OBJ_OPENDIR_TRUE@am__append_54 = opendir.c
-@GL_COND_OBJ_PIPE_TRUE@am__append_55 = pipe.c
-@GL_COND_OBJ_PSELECT_TRUE@am__append_56 = pselect.c
-@GL_COND_OBJ_PTHREAD_SIGMASK_TRUE@am__append_57 = pthread_sigmask.c
-@GL_COND_OBJ_RAISE_TRUE@am__append_58 = raise.c
-@GL_COND_OBJ_RAWMEMCHR_TRUE@am__append_59 = rawmemchr.c
-@GL_COND_OBJ_READDIR_TRUE@am__append_60 = readdir.c
-@GL_COND_OBJ_READLINK_TRUE@am__append_61 = readlink.c
-@GL_COND_OBJ_READLINKAT_TRUE@am__append_62 = readlinkat.c
-@GL_COND_OBJ_REALLOCARRAY_TRUE@am__append_63 = reallocarray.c
-@GL_COND_OBJ_REGEX_TRUE@am__append_64 = regex.c
-@GL_COND_OBJ_RENAME_TRUE@am__append_65 = rename.c
-@GL_COND_OBJ_RENAMEAT_TRUE@am__append_66 = renameat.c
-@GL_COND_OBJ_REWINDDIR_TRUE@am__append_67 = rewinddir.c
-@GL_COND_OBJ_RMDIR_TRUE@am__append_68 = rmdir.c
-@GL_COND_OBJ_SELECT_TRUE@am__append_69 = select.c
-@GL_COND_OBJ_SETENV_TRUE@am__append_70 = setenv.c
-@GL_COND_OBJ_SETLOCALE_LOCK_TRUE@am__append_71 = setlocale-lock.c
-@GL_COND_OBJ_SIGACTION_TRUE@am__append_72 = sigaction.c
-@GL_COND_OBJ_SIGPROCMASK_TRUE@am__append_73 = sigprocmask.c
-@GL_COND_OBJ_SLEEP_TRUE@am__append_74 = sleep.c
-@GL_COND_OBJ_STAT_TRUE@am__append_75 = stat.c
-@GL_COND_OBJ_STDIO_READ_TRUE@am__append_76 = stdio-read.c
-@GL_COND_OBJ_STDIO_WRITE_TRUE@am__append_77 = stdio-write.c
-@GL_COND_OBJ_STPCPY_TRUE@am__append_78 = stpcpy.c
-@GL_COND_OBJ_STRCASECMP_TRUE@am__append_79 = strcasecmp.c
-@GL_COND_OBJ_STRNCASECMP_TRUE@am__append_80 = strncasecmp.c
-@GL_COND_OBJ_STRCHRNUL_TRUE@am__append_81 = strchrnul.c
-@GL_COND_OBJ_STRDUP_TRUE@am__append_82 = strdup.c
-@GL_COND_OBJ_STRERROR_TRUE@am__append_83 = strerror.c
-@GL_COND_OBJ_STRERROR_OVERRIDE_TRUE@am__append_84 = strerror-override.c
-@GL_COND_OBJ_STRNDUP_TRUE@am__append_85 = strndup.c
-@GL_COND_OBJ_STRNLEN_TRUE@am__append_86 = strnlen.c
-@GL_COND_OBJ_STRSEP_TRUE@am__append_87 = strsep.c
-@GL_COND_OBJ_UNLINK_TRUE@am__append_88 = unlink.c
-@GL_COND_OBJ_UNLINKAT_TRUE@am__append_89 = unlinkat.c
-@GL_COND_OBJ_UTIME_TRUE@am__append_90 = utime.c
-@GL_COND_OBJ_WCRTOMB_TRUE@am__append_91 = wcrtomb.c
-@GL_COND_OBJ_WINDOWS_MUTEX_TRUE@am__append_92 = windows-mutex.c
-@GL_COND_OBJ_WINDOWS_ONCE_TRUE@am__append_93 = windows-once.c
-@GL_COND_OBJ_WINDOWS_RECMUTEX_TRUE@am__append_94 = windows-recmutex.c
-@GL_COND_OBJ_WINDOWS_RWLOCK_TRUE@am__append_95 = windows-rwlock.c
-@GL_COND_OBJ_WMEMCHR_TRUE@am__append_96 = wmemchr.c
-@GL_COND_OBJ_WMEMPCPY_TRUE@am__append_97 = wmempcpy.c
+@GL_COND_OBJ_GETPROGNAME_TRUE@am__append_28 = getprogname.c
+@GL_COND_OBJ_GETRANDOM_TRUE@am__append_29 = getrandom.c
+@GL_COND_OBJ_GETTIMEOFDAY_TRUE@am__append_30 = gettimeofday.c
+@GL_COND_OBJ_GLOB_TRUE@am__append_31 = glob.c globfree.c
+@GL_COND_OBJ_GLOB_PATTERN_P_TRUE@am__append_32 = glob_pattern_p.c
+@GL_COND_OBJ_IOCTL_TRUE@am__append_33 = ioctl.c
+@GL_COND_OBJ_ISBLANK_TRUE@am__append_34 = isblank.c
+@GL_COND_OBJ_LCHOWN_TRUE@am__append_35 = lchown.c
+@GL_COND_OBJ_LOCALECONV_TRUE@am__append_36 = localeconv.c
+@GL_COND_OBJ_LSTAT_TRUE@am__append_37 = lstat.c
+@GL_COND_OBJ_MBRTOWC_TRUE@am__append_38 = mbrtowc.c
+@GL_COND_OBJ_MBSINIT_TRUE@am__append_39 = mbsinit.c
+@GL_COND_OBJ_MBSRTOWCS_TRUE@am__append_40 = mbsrtowcs.c
+@GL_COND_OBJ_MBTOWC_TRUE@am__append_41 = mbtowc.c
+@GL_COND_OBJ_MEMCHR_TRUE@am__append_42 = memchr.c
+@GL_COND_OBJ_MEMPCPY_TRUE@am__append_43 = mempcpy.c
+@GL_COND_OBJ_MEMRCHR_TRUE@am__append_44 = memrchr.c
+@GL_COND_OBJ_MKDIR_TRUE@am__append_45 = mkdir.c
+@GL_COND_OBJ_MKDTEMP_TRUE@am__append_46 = mkdtemp.c
+@GL_COND_OBJ_MKSTEMP_TRUE@am__append_47 = mkstemp.c
+@GL_COND_OBJ_MSVC_INVAL_TRUE@am__append_48 = msvc-inval.c
+@GL_COND_OBJ_MSVC_NOTHROW_TRUE@am__append_49 = msvc-nothrow.c
+@GL_COND_OBJ_NANOSLEEP_TRUE@am__append_50 = nanosleep.c
+@GL_COND_OBJ_NL_LANGINFO_TRUE@am__append_51 = nl_langinfo.c
+@GL_COND_OBJ_NL_LANGINFO_LOCK_TRUE@am__append_52 = nl_langinfo-lock.c
+@GL_COND_OBJ_OPEN_TRUE@am__append_53 = open.c
+@GL_COND_OBJ_OPENAT_TRUE@am__append_54 = openat.c
+@GL_COND_OBJ_OPENDIR_TRUE@am__append_55 = opendir.c
+@GL_COND_OBJ_PIPE_TRUE@am__append_56 = pipe.c
+@GL_COND_OBJ_PSELECT_TRUE@am__append_57 = pselect.c
+@GL_COND_OBJ_PTHREAD_SIGMASK_TRUE@am__append_58 = pthread_sigmask.c
+@GL_COND_OBJ_RAISE_TRUE@am__append_59 = raise.c
+@GL_COND_OBJ_RAWMEMCHR_TRUE@am__append_60 = rawmemchr.c
+@GL_COND_OBJ_READDIR_TRUE@am__append_61 = readdir.c
+@GL_COND_OBJ_READLINK_TRUE@am__append_62 = readlink.c
+@GL_COND_OBJ_READLINKAT_TRUE@am__append_63 = readlinkat.c
+@GL_COND_OBJ_REALLOCARRAY_TRUE@am__append_64 = reallocarray.c
+@GL_COND_OBJ_REGEX_TRUE@am__append_65 = regex.c
+@GL_COND_OBJ_RENAME_TRUE@am__append_66 = rename.c
+@GL_COND_OBJ_RENAMEAT_TRUE@am__append_67 = renameat.c
+@GL_COND_OBJ_REWINDDIR_TRUE@am__append_68 = rewinddir.c
+@GL_COND_OBJ_RMDIR_TRUE@am__append_69 = rmdir.c
+@GL_COND_OBJ_SELECT_TRUE@am__append_70 = select.c
+@GL_COND_OBJ_SETENV_TRUE@am__append_71 = setenv.c
+@GL_COND_OBJ_SETLOCALE_LOCK_TRUE@am__append_72 = setlocale-lock.c
+@GL_COND_OBJ_SIGACTION_TRUE@am__append_73 = sigaction.c
+@GL_COND_OBJ_SIGPROCMASK_TRUE@am__append_74 = sigprocmask.c
+@GL_COND_OBJ_SLEEP_TRUE@am__append_75 = sleep.c
+@GL_COND_OBJ_STAT_TRUE@am__append_76 = stat.c
+@GL_COND_OBJ_STDIO_READ_TRUE@am__append_77 = stdio-read.c
+@GL_COND_OBJ_STDIO_WRITE_TRUE@am__append_78 = stdio-write.c
+@GL_COND_OBJ_STPCPY_TRUE@am__append_79 = stpcpy.c
+@GL_COND_OBJ_STRCASECMP_TRUE@am__append_80 = strcasecmp.c
+@GL_COND_OBJ_STRNCASECMP_TRUE@am__append_81 = strncasecmp.c
+@GL_COND_OBJ_STRCHRNUL_TRUE@am__append_82 = strchrnul.c
+@GL_COND_OBJ_STRDUP_TRUE@am__append_83 = strdup.c
+@GL_COND_OBJ_STRERROR_TRUE@am__append_84 = strerror.c
+@GL_COND_OBJ_STRERROR_OVERRIDE_TRUE@am__append_85 = strerror-override.c
+@GL_COND_OBJ_STRNDUP_TRUE@am__append_86 = strndup.c
+@GL_COND_OBJ_STRNLEN_TRUE@am__append_87 = strnlen.c
+@GL_COND_OBJ_STRSEP_TRUE@am__append_88 = strsep.c
+@GL_COND_OBJ_UNLINK_TRUE@am__append_89 = unlink.c
+@GL_COND_OBJ_UNLINKAT_TRUE@am__append_90 = unlinkat.c
+@GL_COND_OBJ_UTIME_TRUE@am__append_91 = utime.c
+@GL_COND_OBJ_WCRTOMB_TRUE@am__append_92 = wcrtomb.c
+@GL_COND_OBJ_WINDOWS_MUTEX_TRUE@am__append_93 = windows-mutex.c
+@GL_COND_OBJ_WINDOWS_ONCE_TRUE@am__append_94 = windows-once.c
+@GL_COND_OBJ_WINDOWS_RECMUTEX_TRUE@am__append_95 = windows-recmutex.c
+@GL_COND_OBJ_WINDOWS_RWLOCK_TRUE@am__append_96 = windows-rwlock.c
+@GL_COND_OBJ_WMEMCHR_TRUE@am__append_97 = wmemchr.c
+@GL_COND_OBJ_WMEMPCPY_TRUE@am__append_98 = wmempcpy.c
subdir = gl/lib
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/man-arg-automatic-create.m4 \
@@ -324,9 +326,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/man-arg-automatic-create.m4 \
$(top_srcdir)/gl/m4/absolute-header.m4 \
$(top_srcdir)/gl/m4/alloca.m4 $(top_srcdir)/gl/m4/argp.m4 \
$(top_srcdir)/gl/m4/asm-underscore.m4 \
- $(top_srcdir)/gl/m4/btowc.m4 \
+ $(top_srcdir)/gl/m4/assert_h.m4 $(top_srcdir)/gl/m4/btowc.m4 \
$(top_srcdir)/gl/m4/builtin-expect.m4 \
- $(top_srcdir)/gl/m4/calloc.m4 \
+ $(top_srcdir)/gl/m4/c-bool.m4 $(top_srcdir)/gl/m4/calloc.m4 \
$(top_srcdir)/gl/m4/canonicalize.m4 \
$(top_srcdir)/gl/m4/chdir-long.m4 $(top_srcdir)/gl/m4/chown.m4 \
$(top_srcdir)/gl/m4/clock_time.m4 $(top_srcdir)/gl/m4/close.m4 \
@@ -338,6 +340,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/man-arg-automatic-create.m4 \
$(top_srcdir)/gl/m4/dup.m4 $(top_srcdir)/gl/m4/dup2.m4 \
$(top_srcdir)/gl/m4/eealloc.m4 $(top_srcdir)/gl/m4/environ.m4 \
$(top_srcdir)/gl/m4/errno_h.m4 $(top_srcdir)/gl/m4/error.m4 \
+ $(top_srcdir)/gl/m4/error_h.m4 \
$(top_srcdir)/gl/m4/exponentd.m4 \
$(top_srcdir)/gl/m4/extensions.m4 \
$(top_srcdir)/gl/m4/extern-inline.m4 \
@@ -401,7 +404,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/man-arg-automatic-create.m4 \
$(top_srcdir)/gl/m4/mmap-anon.m4 $(top_srcdir)/gl/m4/mode_t.m4 \
$(top_srcdir)/gl/m4/msvc-inval.m4 \
$(top_srcdir)/gl/m4/msvc-nothrow.m4 \
- $(top_srcdir)/gl/m4/multiarch.m4 \
+ $(top_srcdir)/gl/m4/multiarch.m4 $(top_srcdir)/gl/m4/musl.m4 \
$(top_srcdir)/gl/m4/nanosleep.m4 \
$(top_srcdir)/gl/m4/nl_langinfo.m4 $(top_srcdir)/gl/m4/nls.m4 \
$(top_srcdir)/gl/m4/nocrash.m4 \
@@ -435,10 +438,10 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/man-arg-automatic-create.m4 \
$(top_srcdir)/gl/m4/ssize_t.m4 \
$(top_srcdir)/gl/m4/stat-time.m4 $(top_srcdir)/gl/m4/stat.m4 \
$(top_srcdir)/gl/m4/stdalign.m4 $(top_srcdir)/gl/m4/stdarg.m4 \
- $(top_srcdir)/gl/m4/stdbool.m4 $(top_srcdir)/gl/m4/stddef_h.m4 \
- $(top_srcdir)/gl/m4/stdint.m4 $(top_srcdir)/gl/m4/stdint_h.m4 \
- $(top_srcdir)/gl/m4/stdio_h.m4 $(top_srcdir)/gl/m4/stdlib_h.m4 \
- $(top_srcdir)/gl/m4/stpcpy.m4 $(top_srcdir)/gl/m4/strcase.m4 \
+ $(top_srcdir)/gl/m4/stddef_h.m4 $(top_srcdir)/gl/m4/stdint.m4 \
+ $(top_srcdir)/gl/m4/stdint_h.m4 $(top_srcdir)/gl/m4/stdio_h.m4 \
+ $(top_srcdir)/gl/m4/stdlib_h.m4 $(top_srcdir)/gl/m4/stpcpy.m4 \
+ $(top_srcdir)/gl/m4/strcase.m4 \
$(top_srcdir)/gl/m4/strcasestr.m4 \
$(top_srcdir)/gl/m4/strchrnul.m4 $(top_srcdir)/gl/m4/strdup.m4 \
$(top_srcdir)/gl/m4/strerror.m4 \
@@ -477,7 +480,6 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/man-arg-automatic-create.m4 \
$(top_srcdir)/gl/m4/xalloc.m4 $(top_srcdir)/gl/m4/xgetcwd.m4 \
$(top_srcdir)/gl/m4/xsize.m4 $(top_srcdir)/gl/m4/xstrndup.m4 \
$(top_srcdir)/gl/m4/xvasprintf.m4 \
- $(top_srcdir)/gl/m4/year2038.m4 \
$(top_srcdir)/gl/m4/zzgnulib.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
@@ -497,51 +499,51 @@ am__libgnu_la_SOURCES_DIST = argp.h argp-ba.c argp-eexst.c \
openat-proc.c basename-lgpl.c bitrotate.h bitrotate.c btowc.c \
canonicalize.c canonicalize-lgpl.c chdir-long.c chown.c \
fchown-stub.c cloexec.c close.c closedir.c dirfd.c dirname.c \
- basename.c dirname-lgpl.c stripslash.c dup.c dup2.c \
+ basename.c dirname-lgpl.c stripslash.c dup.c dup2.c error.c \
+ exitfail.c fchdir.c fcntl.c fd-hook.c fd-safer-flag.c \
+ dup-safer-flag.c fdopendir.c file-set.c filenamecat-lgpl.c \
+ float.c itold.c flock.c free.c fstat.c fstatat.c getcwd.c \
+ getcwd-lgpl.c getdelim.c getdtablesize.c getline.c \
+ getlogin_r.c getopt.c getopt1.c getprogname.c getrandom.c \
+ gettext.h gettime.c gettimeofday.c \
malloc/dynarray_at_failure.c malloc/dynarray_emplace_enlarge.c \
malloc/dynarray_finalize.c malloc/dynarray_resize.c \
- malloc/dynarray_resize_clear.c error.c exitfail.c fchdir.c \
- fcntl.c fd-hook.c fd-safer-flag.c dup-safer-flag.c fdopendir.c \
- file-set.c filenamecat-lgpl.c float.c itold.c flock.c free.c \
- fstat.c fstatat.c getcwd.c getcwd-lgpl.c getdelim.c \
- getdtablesize.c getline.c getlogin_r.c getopt.c getopt1.c \
- getprogname.h getprogname.c getrandom.c gettext.h gettime.c \
- gettimeofday.c glob.c globfree.c glob_pattern_p.c \
- hard-locale.c hash.c gl_hash_map.h gl_hash_map.c gl_anyhash1.h \
- gl_anyhash2.h gl_anyhash_primes.h hash-pjw.h hash-pjw.c \
- hash-pjw-bare.h hash-pjw-bare.c gl_hash_set.h gl_hash_set.c \
- hash-triple-simple.c ialloc.c idpriv-drop.c idpriv-droptemp.c \
- idx.h ioctl.c isblank.c lchown.c gl_linkedhash_list.h \
- gl_linkedhash_list.c gl_anylinked_list1.h gl_anylinked_list2.h \
- gl_list.h gl_list.c localcharset.c localeconv.c \
- glthread/lock.h glthread/lock.c lstat.c malloca.c gl_map.h \
- gl_map.c mbrtowc.c mbsinit.c mbsrtowcs.c mbtowc.c memchr.c \
- mempcpy.c memrchr.c minmax.h mkdir.c mkdtemp.c mkstemp.c \
- msvc-inval.c msvc-nothrow.c nanosleep.c nl_langinfo.c \
- nl_langinfo-lock.c nonblocking.c open.c openat.c openat-die.c \
- opendir.c pipe.c progname.h progname.c pselect.c \
- pthread_sigmask.c raise.c rawmemchr.c gl_rbtree_list.h \
- gl_rbtree_list.c gl_anyrbtree_list1.h gl_anyrbtree_list2.h \
- gl_anytree_list1.h gl_anytree_list2.h readdir.c readlink.c \
- readlinkat.c reallocarray.c regex.c rename.c renameat.c \
- renameatu.c rewinddir.c rmdir.c save-cwd.c \
- malloc/scratch_buffer_dupfree.c malloc/scratch_buffer_grow.c \
+ malloc/dynarray_resize_clear.c malloc/scratch_buffer_grow.c \
malloc/scratch_buffer_grow_preserve.c \
- malloc/scratch_buffer_set_array_size.c select.c gl_set.h \
- gl_set.c setenv.c setlocale_null.c setlocale-lock.c \
- sigaction.c sig-handler.c sigprocmask.c size_max.h sleep.c \
- sockets.h sockets.c stat.c stat-time.c stdio-read.c \
- stdio-write.c stdopen.c stpcpy.c strcasecmp.c strncasecmp.c \
- strchrnul.c strdup.c strerror.c strerror-override.c strndup.c \
- strnlen.c strnlen1.h strnlen1.c strsep.c sys_socket.c \
- tempname.c glthread/threadlib.c timespec.c unistd.c \
- dup-safer.c fd-safer.c pipe-safer.c unlink.c unlinkat.c \
- utime.c utimens.c verror.h verror.c wcrtomb.c wctype-h.c \
- windows-mutex.c windows-once.c windows-recmutex.c \
- windows-rwlock.c wmemchr.c wmempcpy.c xmalloc.c xalloc-die.c \
- xgetcwd.c gl_xlist.h gl_xlist.c gl_xmap.h gl_xmap.c gl_xset.h \
- gl_xset.c xsize.h xsize.c xstdopen.c xstrndup.h xstrndup.c \
- xvasprintf.h xvasprintf.c xasprintf.c
+ malloc/scratch_buffer_set_array_size.c glob.c globfree.c \
+ glob_pattern_p.c hard-locale.c hash.c gl_hash_map.h \
+ gl_hash_map.c gl_anyhash1.h gl_anyhash2.h gl_anyhash_primes.h \
+ hash-pjw.h hash-pjw.c hash-pjw-bare.h hash-pjw-bare.c \
+ gl_hash_set.h gl_hash_set.c hash-triple-simple.c ialloc.c \
+ idpriv-drop.c idpriv-droptemp.c idx.h ioctl.c isblank.c \
+ lchown.c gl_linkedhash_list.h gl_linkedhash_list.c \
+ gl_anylinked_list1.h gl_anylinked_list2.h gl_list.h gl_list.c \
+ localcharset.c localeconv.c glthread/lock.h glthread/lock.c \
+ lstat.c malloca.c gl_map.h gl_map.c mbrtowc.c mbsinit.c \
+ mbsrtowcs.c mbtowc.c memchr.c mempcpy.c memrchr.c minmax.h \
+ mkdir.c mkdtemp.c mkstemp.c msvc-inval.c msvc-nothrow.c \
+ nanosleep.c nl_langinfo.c nl_langinfo-lock.c nonblocking.c \
+ open.c openat.c openat-die.c opendir.c pipe.c progname.h \
+ progname.c pselect.c pthread_sigmask.c raise.c rawmemchr.c \
+ gl_rbtree_list.h gl_rbtree_list.c gl_anyrbtree_list1.h \
+ gl_anyrbtree_list2.h gl_anytree_list1.h gl_anytree_list2.h \
+ readdir.c readlink.c readlinkat.c reallocarray.c regex.c \
+ rename.c renameat.c renameatu.c rewinddir.c rmdir.c save-cwd.c \
+ select.c gl_set.h gl_set.c setenv.c setlocale_null.c \
+ setlocale-lock.c sigaction.c sig-handler.c sigprocmask.c \
+ size_max.h sleep.c sockets.h sockets.c stat.c stat-time.c \
+ stdio-read.c stdio-write.c stdopen.c stpcpy.c strcasecmp.c \
+ strncasecmp.c strchrnul.c strdup.c strerror.c \
+ strerror-override.c strndup.c strnlen.c strnlen1.h strnlen1.c \
+ strsep.c sys_socket.c tempname.c glthread/threadlib.c \
+ timespec.c unistd.c dup-safer.c fd-safer.c pipe-safer.c \
+ unlink.c unlinkat.c utime.c utimens.c verror.h verror.c \
+ wcrtomb.c wctype-h.c windows-mutex.c windows-once.c \
+ windows-recmutex.c windows-rwlock.c wmemchr.c wmempcpy.c \
+ xmalloc.c xalloc-die.c xgetcwd.c gl_xlist.h gl_xlist.c \
+ gl_xmap.h gl_xmap.c gl_xset.h gl_xset.c xsize.h xsize.c \
+ xstdopen.c xstrndup.h xstrndup.c xvasprintf.h xvasprintf.c \
+ xasprintf.c
@GL_COND_OBJ_BTOWC_TRUE@am__objects_1 = libgnu_la-btowc.lo
@GL_COND_OBJ_CANONICALIZE_LGPL_TRUE@am__objects_2 = libgnu_la-canonicalize-lgpl.lo
@GL_COND_OBJ_CHDIR_LONG_TRUE@am__objects_3 = libgnu_la-chdir-long.lo
@@ -553,7 +555,6 @@ am__libgnu_la_SOURCES_DIST = argp.h argp-ba.c argp-eexst.c \
@GL_COND_OBJ_DIRFD_TRUE@am__objects_8 = libgnu_la-dirfd.lo
@GL_COND_OBJ_DUP_TRUE@am__objects_9 = libgnu_la-dup.lo
@GL_COND_OBJ_DUP2_TRUE@am__objects_10 = libgnu_la-dup2.lo
-am__dirstamp = $(am__leading_dot)dirstamp
@GL_COND_OBJ_ERROR_TRUE@am__objects_11 = libgnu_la-error.lo
@GL_COND_OBJ_FCHDIR_TRUE@am__objects_12 = libgnu_la-fchdir.lo
@GL_COND_OBJ_FCNTL_TRUE@am__objects_13 = libgnu_la-fcntl.lo
@@ -574,89 +575,92 @@ am__dirstamp = $(am__leading_dot)dirstamp
@GL_COND_OBJ_GETLOGIN_R_TRUE@am__objects_26 = libgnu_la-getlogin_r.lo
@GL_COND_OBJ_GETOPT_TRUE@am__objects_27 = libgnu_la-getopt.lo \
@GL_COND_OBJ_GETOPT_TRUE@ libgnu_la-getopt1.lo
-@GL_COND_OBJ_GETRANDOM_TRUE@am__objects_28 = libgnu_la-getrandom.lo
-@GL_COND_OBJ_GETTIMEOFDAY_TRUE@am__objects_29 = \
+@GL_COND_OBJ_GETPROGNAME_TRUE@am__objects_28 = \
+@GL_COND_OBJ_GETPROGNAME_TRUE@ libgnu_la-getprogname.lo
+@GL_COND_OBJ_GETRANDOM_TRUE@am__objects_29 = libgnu_la-getrandom.lo
+@GL_COND_OBJ_GETTIMEOFDAY_TRUE@am__objects_30 = \
@GL_COND_OBJ_GETTIMEOFDAY_TRUE@ libgnu_la-gettimeofday.lo
-@GL_COND_OBJ_GLOB_TRUE@am__objects_30 = libgnu_la-glob.lo \
+am__dirstamp = $(am__leading_dot)dirstamp
+@GL_COND_OBJ_GLOB_TRUE@am__objects_31 = libgnu_la-glob.lo \
@GL_COND_OBJ_GLOB_TRUE@ libgnu_la-globfree.lo
-@GL_COND_OBJ_GLOB_PATTERN_P_TRUE@am__objects_31 = \
+@GL_COND_OBJ_GLOB_PATTERN_P_TRUE@am__objects_32 = \
@GL_COND_OBJ_GLOB_PATTERN_P_TRUE@ libgnu_la-glob_pattern_p.lo
-@GL_COND_OBJ_IOCTL_TRUE@am__objects_32 = libgnu_la-ioctl.lo
-@GL_COND_OBJ_ISBLANK_TRUE@am__objects_33 = libgnu_la-isblank.lo
-@GL_COND_OBJ_LCHOWN_TRUE@am__objects_34 = libgnu_la-lchown.lo
-@GL_COND_OBJ_LOCALECONV_TRUE@am__objects_35 = libgnu_la-localeconv.lo
-@GL_COND_OBJ_LSTAT_TRUE@am__objects_36 = libgnu_la-lstat.lo
-@GL_COND_OBJ_MBRTOWC_TRUE@am__objects_37 = libgnu_la-mbrtowc.lo
-@GL_COND_OBJ_MBSINIT_TRUE@am__objects_38 = libgnu_la-mbsinit.lo
-@GL_COND_OBJ_MBSRTOWCS_TRUE@am__objects_39 = libgnu_la-mbsrtowcs.lo
-@GL_COND_OBJ_MBTOWC_TRUE@am__objects_40 = libgnu_la-mbtowc.lo
-@GL_COND_OBJ_MEMCHR_TRUE@am__objects_41 = libgnu_la-memchr.lo
-@GL_COND_OBJ_MEMPCPY_TRUE@am__objects_42 = libgnu_la-mempcpy.lo
-@GL_COND_OBJ_MEMRCHR_TRUE@am__objects_43 = libgnu_la-memrchr.lo
-@GL_COND_OBJ_MKDIR_TRUE@am__objects_44 = libgnu_la-mkdir.lo
-@GL_COND_OBJ_MKDTEMP_TRUE@am__objects_45 = libgnu_la-mkdtemp.lo
-@GL_COND_OBJ_MKSTEMP_TRUE@am__objects_46 = libgnu_la-mkstemp.lo
-@GL_COND_OBJ_MSVC_INVAL_TRUE@am__objects_47 = libgnu_la-msvc-inval.lo
-@GL_COND_OBJ_MSVC_NOTHROW_TRUE@am__objects_48 = \
+@GL_COND_OBJ_IOCTL_TRUE@am__objects_33 = libgnu_la-ioctl.lo
+@GL_COND_OBJ_ISBLANK_TRUE@am__objects_34 = libgnu_la-isblank.lo
+@GL_COND_OBJ_LCHOWN_TRUE@am__objects_35 = libgnu_la-lchown.lo
+@GL_COND_OBJ_LOCALECONV_TRUE@am__objects_36 = libgnu_la-localeconv.lo
+@GL_COND_OBJ_LSTAT_TRUE@am__objects_37 = libgnu_la-lstat.lo
+@GL_COND_OBJ_MBRTOWC_TRUE@am__objects_38 = libgnu_la-mbrtowc.lo
+@GL_COND_OBJ_MBSINIT_TRUE@am__objects_39 = libgnu_la-mbsinit.lo
+@GL_COND_OBJ_MBSRTOWCS_TRUE@am__objects_40 = libgnu_la-mbsrtowcs.lo
+@GL_COND_OBJ_MBTOWC_TRUE@am__objects_41 = libgnu_la-mbtowc.lo
+@GL_COND_OBJ_MEMCHR_TRUE@am__objects_42 = libgnu_la-memchr.lo
+@GL_COND_OBJ_MEMPCPY_TRUE@am__objects_43 = libgnu_la-mempcpy.lo
+@GL_COND_OBJ_MEMRCHR_TRUE@am__objects_44 = libgnu_la-memrchr.lo
+@GL_COND_OBJ_MKDIR_TRUE@am__objects_45 = libgnu_la-mkdir.lo
+@GL_COND_OBJ_MKDTEMP_TRUE@am__objects_46 = libgnu_la-mkdtemp.lo
+@GL_COND_OBJ_MKSTEMP_TRUE@am__objects_47 = libgnu_la-mkstemp.lo
+@GL_COND_OBJ_MSVC_INVAL_TRUE@am__objects_48 = libgnu_la-msvc-inval.lo
+@GL_COND_OBJ_MSVC_NOTHROW_TRUE@am__objects_49 = \
@GL_COND_OBJ_MSVC_NOTHROW_TRUE@ libgnu_la-msvc-nothrow.lo
-@GL_COND_OBJ_NANOSLEEP_TRUE@am__objects_49 = libgnu_la-nanosleep.lo
-@GL_COND_OBJ_NL_LANGINFO_TRUE@am__objects_50 = \
+@GL_COND_OBJ_NANOSLEEP_TRUE@am__objects_50 = libgnu_la-nanosleep.lo
+@GL_COND_OBJ_NL_LANGINFO_TRUE@am__objects_51 = \
@GL_COND_OBJ_NL_LANGINFO_TRUE@ libgnu_la-nl_langinfo.lo
-@GL_COND_OBJ_NL_LANGINFO_LOCK_TRUE@am__objects_51 = libgnu_la-nl_langinfo-lock.lo
-@GL_COND_OBJ_OPEN_TRUE@am__objects_52 = libgnu_la-open.lo
-@GL_COND_OBJ_OPENAT_TRUE@am__objects_53 = libgnu_la-openat.lo
-@GL_COND_OBJ_OPENDIR_TRUE@am__objects_54 = libgnu_la-opendir.lo
-@GL_COND_OBJ_PIPE_TRUE@am__objects_55 = libgnu_la-pipe.lo
-@GL_COND_OBJ_PSELECT_TRUE@am__objects_56 = libgnu_la-pselect.lo
-@GL_COND_OBJ_PTHREAD_SIGMASK_TRUE@am__objects_57 = libgnu_la-pthread_sigmask.lo
-@GL_COND_OBJ_RAISE_TRUE@am__objects_58 = libgnu_la-raise.lo
-@GL_COND_OBJ_RAWMEMCHR_TRUE@am__objects_59 = libgnu_la-rawmemchr.lo
-@GL_COND_OBJ_READDIR_TRUE@am__objects_60 = libgnu_la-readdir.lo
-@GL_COND_OBJ_READLINK_TRUE@am__objects_61 = libgnu_la-readlink.lo
-@GL_COND_OBJ_READLINKAT_TRUE@am__objects_62 = libgnu_la-readlinkat.lo
-@GL_COND_OBJ_REALLOCARRAY_TRUE@am__objects_63 = \
+@GL_COND_OBJ_NL_LANGINFO_LOCK_TRUE@am__objects_52 = libgnu_la-nl_langinfo-lock.lo
+@GL_COND_OBJ_OPEN_TRUE@am__objects_53 = libgnu_la-open.lo
+@GL_COND_OBJ_OPENAT_TRUE@am__objects_54 = libgnu_la-openat.lo
+@GL_COND_OBJ_OPENDIR_TRUE@am__objects_55 = libgnu_la-opendir.lo
+@GL_COND_OBJ_PIPE_TRUE@am__objects_56 = libgnu_la-pipe.lo
+@GL_COND_OBJ_PSELECT_TRUE@am__objects_57 = libgnu_la-pselect.lo
+@GL_COND_OBJ_PTHREAD_SIGMASK_TRUE@am__objects_58 = libgnu_la-pthread_sigmask.lo
+@GL_COND_OBJ_RAISE_TRUE@am__objects_59 = libgnu_la-raise.lo
+@GL_COND_OBJ_RAWMEMCHR_TRUE@am__objects_60 = libgnu_la-rawmemchr.lo
+@GL_COND_OBJ_READDIR_TRUE@am__objects_61 = libgnu_la-readdir.lo
+@GL_COND_OBJ_READLINK_TRUE@am__objects_62 = libgnu_la-readlink.lo
+@GL_COND_OBJ_READLINKAT_TRUE@am__objects_63 = libgnu_la-readlinkat.lo
+@GL_COND_OBJ_REALLOCARRAY_TRUE@am__objects_64 = \
@GL_COND_OBJ_REALLOCARRAY_TRUE@ libgnu_la-reallocarray.lo
-@GL_COND_OBJ_REGEX_TRUE@am__objects_64 = libgnu_la-regex.lo
-@GL_COND_OBJ_RENAME_TRUE@am__objects_65 = libgnu_la-rename.lo
-@GL_COND_OBJ_RENAMEAT_TRUE@am__objects_66 = libgnu_la-renameat.lo
-@GL_COND_OBJ_REWINDDIR_TRUE@am__objects_67 = libgnu_la-rewinddir.lo
-@GL_COND_OBJ_RMDIR_TRUE@am__objects_68 = libgnu_la-rmdir.lo
-@GL_COND_OBJ_SELECT_TRUE@am__objects_69 = libgnu_la-select.lo
-@GL_COND_OBJ_SETENV_TRUE@am__objects_70 = libgnu_la-setenv.lo
-@GL_COND_OBJ_SETLOCALE_LOCK_TRUE@am__objects_71 = \
+@GL_COND_OBJ_REGEX_TRUE@am__objects_65 = libgnu_la-regex.lo
+@GL_COND_OBJ_RENAME_TRUE@am__objects_66 = libgnu_la-rename.lo
+@GL_COND_OBJ_RENAMEAT_TRUE@am__objects_67 = libgnu_la-renameat.lo
+@GL_COND_OBJ_REWINDDIR_TRUE@am__objects_68 = libgnu_la-rewinddir.lo
+@GL_COND_OBJ_RMDIR_TRUE@am__objects_69 = libgnu_la-rmdir.lo
+@GL_COND_OBJ_SELECT_TRUE@am__objects_70 = libgnu_la-select.lo
+@GL_COND_OBJ_SETENV_TRUE@am__objects_71 = libgnu_la-setenv.lo
+@GL_COND_OBJ_SETLOCALE_LOCK_TRUE@am__objects_72 = \
@GL_COND_OBJ_SETLOCALE_LOCK_TRUE@ libgnu_la-setlocale-lock.lo
-@GL_COND_OBJ_SIGACTION_TRUE@am__objects_72 = libgnu_la-sigaction.lo
-@GL_COND_OBJ_SIGPROCMASK_TRUE@am__objects_73 = \
+@GL_COND_OBJ_SIGACTION_TRUE@am__objects_73 = libgnu_la-sigaction.lo
+@GL_COND_OBJ_SIGPROCMASK_TRUE@am__objects_74 = \
@GL_COND_OBJ_SIGPROCMASK_TRUE@ libgnu_la-sigprocmask.lo
-@GL_COND_OBJ_SLEEP_TRUE@am__objects_74 = libgnu_la-sleep.lo
-@GL_COND_OBJ_STAT_TRUE@am__objects_75 = libgnu_la-stat.lo
-@GL_COND_OBJ_STDIO_READ_TRUE@am__objects_76 = libgnu_la-stdio-read.lo
-@GL_COND_OBJ_STDIO_WRITE_TRUE@am__objects_77 = \
+@GL_COND_OBJ_SLEEP_TRUE@am__objects_75 = libgnu_la-sleep.lo
+@GL_COND_OBJ_STAT_TRUE@am__objects_76 = libgnu_la-stat.lo
+@GL_COND_OBJ_STDIO_READ_TRUE@am__objects_77 = libgnu_la-stdio-read.lo
+@GL_COND_OBJ_STDIO_WRITE_TRUE@am__objects_78 = \
@GL_COND_OBJ_STDIO_WRITE_TRUE@ libgnu_la-stdio-write.lo
-@GL_COND_OBJ_STPCPY_TRUE@am__objects_78 = libgnu_la-stpcpy.lo
-@GL_COND_OBJ_STRCASECMP_TRUE@am__objects_79 = libgnu_la-strcasecmp.lo
-@GL_COND_OBJ_STRNCASECMP_TRUE@am__objects_80 = \
+@GL_COND_OBJ_STPCPY_TRUE@am__objects_79 = libgnu_la-stpcpy.lo
+@GL_COND_OBJ_STRCASECMP_TRUE@am__objects_80 = libgnu_la-strcasecmp.lo
+@GL_COND_OBJ_STRNCASECMP_TRUE@am__objects_81 = \
@GL_COND_OBJ_STRNCASECMP_TRUE@ libgnu_la-strncasecmp.lo
-@GL_COND_OBJ_STRCHRNUL_TRUE@am__objects_81 = libgnu_la-strchrnul.lo
-@GL_COND_OBJ_STRDUP_TRUE@am__objects_82 = libgnu_la-strdup.lo
-@GL_COND_OBJ_STRERROR_TRUE@am__objects_83 = libgnu_la-strerror.lo
-@GL_COND_OBJ_STRERROR_OVERRIDE_TRUE@am__objects_84 = libgnu_la-strerror-override.lo
-@GL_COND_OBJ_STRNDUP_TRUE@am__objects_85 = libgnu_la-strndup.lo
-@GL_COND_OBJ_STRNLEN_TRUE@am__objects_86 = libgnu_la-strnlen.lo
-@GL_COND_OBJ_STRSEP_TRUE@am__objects_87 = libgnu_la-strsep.lo
-@GL_COND_OBJ_UNLINK_TRUE@am__objects_88 = libgnu_la-unlink.lo
-@GL_COND_OBJ_UNLINKAT_TRUE@am__objects_89 = libgnu_la-unlinkat.lo
-@GL_COND_OBJ_UTIME_TRUE@am__objects_90 = libgnu_la-utime.lo
-@GL_COND_OBJ_WCRTOMB_TRUE@am__objects_91 = libgnu_la-wcrtomb.lo
-@GL_COND_OBJ_WINDOWS_MUTEX_TRUE@am__objects_92 = \
+@GL_COND_OBJ_STRCHRNUL_TRUE@am__objects_82 = libgnu_la-strchrnul.lo
+@GL_COND_OBJ_STRDUP_TRUE@am__objects_83 = libgnu_la-strdup.lo
+@GL_COND_OBJ_STRERROR_TRUE@am__objects_84 = libgnu_la-strerror.lo
+@GL_COND_OBJ_STRERROR_OVERRIDE_TRUE@am__objects_85 = libgnu_la-strerror-override.lo
+@GL_COND_OBJ_STRNDUP_TRUE@am__objects_86 = libgnu_la-strndup.lo
+@GL_COND_OBJ_STRNLEN_TRUE@am__objects_87 = libgnu_la-strnlen.lo
+@GL_COND_OBJ_STRSEP_TRUE@am__objects_88 = libgnu_la-strsep.lo
+@GL_COND_OBJ_UNLINK_TRUE@am__objects_89 = libgnu_la-unlink.lo
+@GL_COND_OBJ_UNLINKAT_TRUE@am__objects_90 = libgnu_la-unlinkat.lo
+@GL_COND_OBJ_UTIME_TRUE@am__objects_91 = libgnu_la-utime.lo
+@GL_COND_OBJ_WCRTOMB_TRUE@am__objects_92 = libgnu_la-wcrtomb.lo
+@GL_COND_OBJ_WINDOWS_MUTEX_TRUE@am__objects_93 = \
@GL_COND_OBJ_WINDOWS_MUTEX_TRUE@ libgnu_la-windows-mutex.lo
-@GL_COND_OBJ_WINDOWS_ONCE_TRUE@am__objects_93 = \
+@GL_COND_OBJ_WINDOWS_ONCE_TRUE@am__objects_94 = \
@GL_COND_OBJ_WINDOWS_ONCE_TRUE@ libgnu_la-windows-once.lo
-@GL_COND_OBJ_WINDOWS_RECMUTEX_TRUE@am__objects_94 = libgnu_la-windows-recmutex.lo
-@GL_COND_OBJ_WINDOWS_RWLOCK_TRUE@am__objects_95 = \
+@GL_COND_OBJ_WINDOWS_RECMUTEX_TRUE@am__objects_95 = libgnu_la-windows-recmutex.lo
+@GL_COND_OBJ_WINDOWS_RWLOCK_TRUE@am__objects_96 = \
@GL_COND_OBJ_WINDOWS_RWLOCK_TRUE@ libgnu_la-windows-rwlock.lo
-@GL_COND_OBJ_WMEMCHR_TRUE@am__objects_96 = libgnu_la-wmemchr.lo
-@GL_COND_OBJ_WMEMPCPY_TRUE@am__objects_97 = libgnu_la-wmempcpy.lo
+@GL_COND_OBJ_WMEMCHR_TRUE@am__objects_97 = libgnu_la-wmemchr.lo
+@GL_COND_OBJ_WMEMPCPY_TRUE@am__objects_98 = libgnu_la-wmempcpy.lo
am_libgnu_la_OBJECTS = libgnu_la-argp-ba.lo libgnu_la-argp-eexst.lo \
libgnu_la-argp-fmtstream.lo libgnu_la-argp-fs-xinl.lo \
libgnu_la-argp-help.lo libgnu_la-argp-parse.lo \
@@ -669,12 +673,7 @@ am_libgnu_la_OBJECTS = libgnu_la-argp-ba.lo libgnu_la-argp-eexst.lo \
libgnu_la-cloexec.lo $(am__objects_6) $(am__objects_7) \
$(am__objects_8) libgnu_la-dirname.lo libgnu_la-basename.lo \
libgnu_la-dirname-lgpl.lo libgnu_la-stripslash.lo \
- $(am__objects_9) $(am__objects_10) \
- malloc/libgnu_la-dynarray_at_failure.lo \
- malloc/libgnu_la-dynarray_emplace_enlarge.lo \
- malloc/libgnu_la-dynarray_finalize.lo \
- malloc/libgnu_la-dynarray_resize.lo \
- malloc/libgnu_la-dynarray_resize_clear.lo $(am__objects_11) \
+ $(am__objects_9) $(am__objects_10) $(am__objects_11) \
libgnu_la-exitfail.lo $(am__objects_12) $(am__objects_13) \
libgnu_la-fd-hook.lo libgnu_la-fd-safer-flag.lo \
libgnu_la-dup-safer-flag.lo $(am__objects_14) \
@@ -683,53 +682,58 @@ am_libgnu_la_OBJECTS = libgnu_la-argp-ba.lo libgnu_la-argp-eexst.lo \
$(am__objects_18) $(am__objects_19) $(am__objects_20) \
$(am__objects_21) $(am__objects_22) $(am__objects_23) \
$(am__objects_24) $(am__objects_25) $(am__objects_26) \
- $(am__objects_27) libgnu_la-getprogname.lo $(am__objects_28) \
- libgnu_la-gettime.lo $(am__objects_29) $(am__objects_30) \
- $(am__objects_31) libgnu_la-hard-locale.lo libgnu_la-hash.lo \
- libgnu_la-gl_hash_map.lo libgnu_la-hash-pjw.lo \
- libgnu_la-hash-pjw-bare.lo libgnu_la-gl_hash_set.lo \
- libgnu_la-hash-triple-simple.lo libgnu_la-ialloc.lo \
- libgnu_la-idpriv-drop.lo libgnu_la-idpriv-droptemp.lo \
- $(am__objects_32) $(am__objects_33) $(am__objects_34) \
- libgnu_la-gl_linkedhash_list.lo libgnu_la-gl_list.lo \
- libgnu_la-localcharset.lo $(am__objects_35) \
- glthread/libgnu_la-lock.lo $(am__objects_36) \
- libgnu_la-malloca.lo libgnu_la-gl_map.lo $(am__objects_37) \
- $(am__objects_38) $(am__objects_39) $(am__objects_40) \
- $(am__objects_41) $(am__objects_42) $(am__objects_43) \
- $(am__objects_44) $(am__objects_45) $(am__objects_46) \
- $(am__objects_47) $(am__objects_48) $(am__objects_49) \
- $(am__objects_50) $(am__objects_51) libgnu_la-nonblocking.lo \
- $(am__objects_52) $(am__objects_53) libgnu_la-openat-die.lo \
- $(am__objects_54) $(am__objects_55) libgnu_la-progname.lo \
- $(am__objects_56) $(am__objects_57) $(am__objects_58) \
- $(am__objects_59) libgnu_la-gl_rbtree_list.lo \
- $(am__objects_60) $(am__objects_61) $(am__objects_62) \
- $(am__objects_63) $(am__objects_64) $(am__objects_65) \
- $(am__objects_66) libgnu_la-renameatu.lo $(am__objects_67) \
- $(am__objects_68) libgnu_la-save-cwd.lo \
- malloc/libgnu_la-scratch_buffer_dupfree.lo \
+ $(am__objects_27) $(am__objects_28) $(am__objects_29) \
+ libgnu_la-gettime.lo $(am__objects_30) \
+ malloc/libgnu_la-dynarray_at_failure.lo \
+ malloc/libgnu_la-dynarray_emplace_enlarge.lo \
+ malloc/libgnu_la-dynarray_finalize.lo \
+ malloc/libgnu_la-dynarray_resize.lo \
+ malloc/libgnu_la-dynarray_resize_clear.lo \
malloc/libgnu_la-scratch_buffer_grow.lo \
malloc/libgnu_la-scratch_buffer_grow_preserve.lo \
malloc/libgnu_la-scratch_buffer_set_array_size.lo \
- $(am__objects_69) libgnu_la-gl_set.lo $(am__objects_70) \
- libgnu_la-setlocale_null.lo $(am__objects_71) \
- $(am__objects_72) libgnu_la-sig-handler.lo $(am__objects_73) \
- $(am__objects_74) libgnu_la-sockets.lo $(am__objects_75) \
- libgnu_la-stat-time.lo $(am__objects_76) $(am__objects_77) \
- libgnu_la-stdopen.lo $(am__objects_78) $(am__objects_79) \
- $(am__objects_80) $(am__objects_81) $(am__objects_82) \
- $(am__objects_83) $(am__objects_84) $(am__objects_85) \
- $(am__objects_86) libgnu_la-strnlen1.lo $(am__objects_87) \
+ $(am__objects_31) $(am__objects_32) libgnu_la-hard-locale.lo \
+ libgnu_la-hash.lo libgnu_la-gl_hash_map.lo \
+ libgnu_la-hash-pjw.lo libgnu_la-hash-pjw-bare.lo \
+ libgnu_la-gl_hash_set.lo libgnu_la-hash-triple-simple.lo \
+ libgnu_la-ialloc.lo libgnu_la-idpriv-drop.lo \
+ libgnu_la-idpriv-droptemp.lo $(am__objects_33) \
+ $(am__objects_34) $(am__objects_35) \
+ libgnu_la-gl_linkedhash_list.lo libgnu_la-gl_list.lo \
+ libgnu_la-localcharset.lo $(am__objects_36) \
+ glthread/libgnu_la-lock.lo $(am__objects_37) \
+ libgnu_la-malloca.lo libgnu_la-gl_map.lo $(am__objects_38) \
+ $(am__objects_39) $(am__objects_40) $(am__objects_41) \
+ $(am__objects_42) $(am__objects_43) $(am__objects_44) \
+ $(am__objects_45) $(am__objects_46) $(am__objects_47) \
+ $(am__objects_48) $(am__objects_49) $(am__objects_50) \
+ $(am__objects_51) $(am__objects_52) libgnu_la-nonblocking.lo \
+ $(am__objects_53) $(am__objects_54) libgnu_la-openat-die.lo \
+ $(am__objects_55) $(am__objects_56) libgnu_la-progname.lo \
+ $(am__objects_57) $(am__objects_58) $(am__objects_59) \
+ $(am__objects_60) libgnu_la-gl_rbtree_list.lo \
+ $(am__objects_61) $(am__objects_62) $(am__objects_63) \
+ $(am__objects_64) $(am__objects_65) $(am__objects_66) \
+ $(am__objects_67) libgnu_la-renameatu.lo $(am__objects_68) \
+ $(am__objects_69) libgnu_la-save-cwd.lo $(am__objects_70) \
+ libgnu_la-gl_set.lo $(am__objects_71) \
+ libgnu_la-setlocale_null.lo $(am__objects_72) \
+ $(am__objects_73) libgnu_la-sig-handler.lo $(am__objects_74) \
+ $(am__objects_75) libgnu_la-sockets.lo $(am__objects_76) \
+ libgnu_la-stat-time.lo $(am__objects_77) $(am__objects_78) \
+ libgnu_la-stdopen.lo $(am__objects_79) $(am__objects_80) \
+ $(am__objects_81) $(am__objects_82) $(am__objects_83) \
+ $(am__objects_84) $(am__objects_85) $(am__objects_86) \
+ $(am__objects_87) libgnu_la-strnlen1.lo $(am__objects_88) \
libgnu_la-sys_socket.lo libgnu_la-tempname.lo \
glthread/libgnu_la-threadlib.lo libgnu_la-timespec.lo \
libgnu_la-unistd.lo libgnu_la-dup-safer.lo \
libgnu_la-fd-safer.lo libgnu_la-pipe-safer.lo \
- $(am__objects_88) $(am__objects_89) $(am__objects_90) \
- libgnu_la-utimens.lo libgnu_la-verror.lo $(am__objects_91) \
- libgnu_la-wctype-h.lo $(am__objects_92) $(am__objects_93) \
- $(am__objects_94) $(am__objects_95) $(am__objects_96) \
- $(am__objects_97) libgnu_la-xmalloc.lo libgnu_la-xalloc-die.lo \
+ $(am__objects_89) $(am__objects_90) $(am__objects_91) \
+ libgnu_la-utimens.lo libgnu_la-verror.lo $(am__objects_92) \
+ libgnu_la-wctype-h.lo $(am__objects_93) $(am__objects_94) \
+ $(am__objects_95) $(am__objects_96) $(am__objects_97) \
+ $(am__objects_98) libgnu_la-xmalloc.lo libgnu_la-xalloc-die.lo \
libgnu_la-xgetcwd.lo libgnu_la-gl_xlist.lo \
libgnu_la-gl_xmap.lo libgnu_la-gl_xset.lo libgnu_la-xsize.lo \
libgnu_la-xstdopen.lo libgnu_la-xstrndup.lo \
@@ -964,7 +968,6 @@ am__depfiles_remade = ./$(DEPDIR)/alloca.Plo \
malloc/$(DEPDIR)/libgnu_la-dynarray_finalize.Plo \
malloc/$(DEPDIR)/libgnu_la-dynarray_resize.Plo \
malloc/$(DEPDIR)/libgnu_la-dynarray_resize_clear.Plo \
- malloc/$(DEPDIR)/libgnu_la-scratch_buffer_dupfree.Plo \
malloc/$(DEPDIR)/libgnu_la-scratch_buffer_grow.Plo \
malloc/$(DEPDIR)/libgnu_la-scratch_buffer_grow_preserve.Plo \
malloc/$(DEPDIR)/libgnu_la-scratch_buffer_set_array_size.Plo
@@ -1067,6 +1070,7 @@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@
AR = @AR@
ARFLAGS = @ARFLAGS@
ASM_SYMBOL_PREFIX = @ASM_SYMBOL_PREFIX@
+ASSERT_H = @ASSERT_H@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
@@ -1080,6 +1084,7 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CFLAG_VISIBILITY = @CFLAG_VISIBILITY@
+CLOCK_TIME_LIB = @CLOCK_TIME_LIB@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CSCOPE = @CSCOPE@
@@ -1089,6 +1094,7 @@ DBLIBS = @DBLIBS@
DBTYPE = @DBTYPE@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
+DIR_HAS_FD_MEMBER = @DIR_HAS_FD_MEMBER@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
@@ -1109,8 +1115,10 @@ FGREP = @FGREP@
FILECMD = @FILECMD@
FLOAT_H = @FLOAT_H@
FNMATCH_H = @FNMATCH_H@
+GETLOGIN_LIB = @GETLOGIN_LIB@
GETOPT_CDEFS_H = @GETOPT_CDEFS_H@
GETOPT_H = @GETOPT_H@
+GETRANDOM_LIB = @GETRANDOM_LIB@
GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
GLOB_H = @GLOB_H@
GL_CFLAG_ALLOW_WARNINGS = @GL_CFLAG_ALLOW_WARNINGS@
@@ -1207,6 +1215,7 @@ GL_GNULIB_GETPAGESIZE = @GL_GNULIB_GETPAGESIZE@
GL_GNULIB_GETPASS = @GL_GNULIB_GETPASS@
GL_GNULIB_GETPASS_GNU = @GL_GNULIB_GETPASS_GNU@
GL_GNULIB_GETPEERNAME = @GL_GNULIB_GETPEERNAME@
+GL_GNULIB_GETPROGNAME = @GL_GNULIB_GETPROGNAME@
GL_GNULIB_GETRANDOM = @GL_GNULIB_GETRANDOM@
GL_GNULIB_GETSOCKNAME = @GL_GNULIB_GETSOCKNAME@
GL_GNULIB_GETSOCKOPT = @GL_GNULIB_GETSOCKOPT@
@@ -1257,6 +1266,7 @@ GL_GNULIB_MBSSEP = @GL_GNULIB_MBSSEP@
GL_GNULIB_MBSSPN = @GL_GNULIB_MBSSPN@
GL_GNULIB_MBSSTR = @GL_GNULIB_MBSSTR@
GL_GNULIB_MBSTOK_R = @GL_GNULIB_MBSTOK_R@
+GL_GNULIB_MBSTOWCS = @GL_GNULIB_MBSTOWCS@
GL_GNULIB_MBTOWC = @GL_GNULIB_MBTOWC@
GL_GNULIB_MDA_ACCESS = @GL_GNULIB_MDA_ACCESS@
GL_GNULIB_MDA_CHDIR = @GL_GNULIB_MDA_CHDIR@
@@ -1304,6 +1314,7 @@ GL_GNULIB_MEMCHR = @GL_GNULIB_MEMCHR@
GL_GNULIB_MEMMEM = @GL_GNULIB_MEMMEM@
GL_GNULIB_MEMPCPY = @GL_GNULIB_MEMPCPY@
GL_GNULIB_MEMRCHR = @GL_GNULIB_MEMRCHR@
+GL_GNULIB_MEMSET_EXPLICIT = @GL_GNULIB_MEMSET_EXPLICIT@
GL_GNULIB_MKDIR = @GL_GNULIB_MKDIR@
GL_GNULIB_MKDIRAT = @GL_GNULIB_MKDIRAT@
GL_GNULIB_MKDTEMP = @GL_GNULIB_MKDTEMP@
@@ -1420,6 +1431,7 @@ GL_GNULIB_SYMLINK = @GL_GNULIB_SYMLINK@
GL_GNULIB_SYMLINKAT = @GL_GNULIB_SYMLINKAT@
GL_GNULIB_SYSTEM_POSIX = @GL_GNULIB_SYSTEM_POSIX@
GL_GNULIB_TCGETSID = @GL_GNULIB_TCGETSID@
+GL_GNULIB_TIME = @GL_GNULIB_TIME@
GL_GNULIB_TIMEGM = @GL_GNULIB_TIMEGM@
GL_GNULIB_TIMESPEC_GET = @GL_GNULIB_TIMESPEC_GET@
GL_GNULIB_TIMESPEC_GETRES = @GL_GNULIB_TIMESPEC_GETRES@
@@ -1495,6 +1507,7 @@ GMSGFMT_015 = @GMSGFMT_015@
GNULIBHEADERS_OVERRIDE_WINT_T = @GNULIBHEADERS_OVERRIDE_WINT_T@
GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@
GREP = @GREP@
+HARD_LOCALE_LIB = @HARD_LOCALE_LIB@
HAVE_ACCEPT4 = @HAVE_ACCEPT4@
HAVE_ALIGNED_ALLOC = @HAVE_ALIGNED_ALLOC@
HAVE_ALLOCA_H = @HAVE_ALLOCA_H@
@@ -1528,6 +1541,7 @@ HAVE_DECL_GETLOGIN = @HAVE_DECL_GETLOGIN@
HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@
HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@
+HAVE_DECL_GETW = @HAVE_DECL_GETW@
HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@
HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@
HAVE_DECL_INITSTATE = @HAVE_DECL_INITSTATE@
@@ -1535,6 +1549,8 @@ HAVE_DECL_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@
HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@
+HAVE_DECL_PROGRAM_INVOCATION_NAME = @HAVE_DECL_PROGRAM_INVOCATION_NAME@
+HAVE_DECL_PUTW = @HAVE_DECL_PUTW@
HAVE_DECL_SETENV = @HAVE_DECL_SETENV@
HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@
HAVE_DECL_SETSTATE = @HAVE_DECL_SETSTATE@
@@ -1560,6 +1576,9 @@ HAVE_DIRENT_H = @HAVE_DIRENT_H@
HAVE_DPRINTF = @HAVE_DPRINTF@
HAVE_DUP3 = @HAVE_DUP3@
HAVE_DUPLOCALE = @HAVE_DUPLOCALE@
+HAVE_ERROR = @HAVE_ERROR@
+HAVE_ERROR_AT_LINE = @HAVE_ERROR_AT_LINE@
+HAVE_ERROR_H = @HAVE_ERROR_H@
HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
HAVE_EXECVPE = @HAVE_EXECVPE@
HAVE_EXPLICIT_BZERO = @HAVE_EXPLICIT_BZERO@
@@ -1592,6 +1611,7 @@ HAVE_GETLOGIN = @HAVE_GETLOGIN@
HAVE_GETOPT_H = @HAVE_GETOPT_H@
HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
HAVE_GETPASS = @HAVE_GETPASS@
+HAVE_GETPROGNAME = @HAVE_GETPROGNAME@
HAVE_GETRANDOM = @HAVE_GETRANDOM@
HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@
@@ -1601,6 +1621,9 @@ HAVE_GLOB_H = @HAVE_GLOB_H@
HAVE_GLOB_PATTERN_P = @HAVE_GLOB_PATTERN_P@
HAVE_GRANTPT = @HAVE_GRANTPT@
HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@
+HAVE_ICONV = @HAVE_ICONV@
+HAVE_IMAXABS = @HAVE_IMAXABS@
+HAVE_IMAXDIV = @HAVE_IMAXDIV@
HAVE_IMAXDIV_T = @HAVE_IMAXDIV_T@
HAVE_INITSTATE = @HAVE_INITSTATE@
HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
@@ -1627,6 +1650,7 @@ HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@
HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@
HAVE_MBTOWC = @HAVE_MBTOWC@
HAVE_MEMPCPY = @HAVE_MEMPCPY@
+HAVE_MEMSET_EXPLICIT = @HAVE_MEMSET_EXPLICIT@
HAVE_MKDIRAT = @HAVE_MKDIRAT@
HAVE_MKDTEMP = @HAVE_MKDTEMP@
HAVE_MKFIFO = @HAVE_MKFIFO@
@@ -1784,7 +1808,6 @@ HAVE_WMEMPCPY = @HAVE_WMEMPCPY@
HAVE_WMEMSET = @HAVE_WMEMSET@
HAVE_WS2TCPIP_H = @HAVE_WS2TCPIP_H@
HAVE_XLOCALE_H = @HAVE_XLOCALE_H@
-HAVE__BOOL = @HAVE__BOOL@
HAVE__EXIT = @HAVE__EXIT@
IGNORE_UNUSED_LIBRARIES_CFLAGS = @IGNORE_UNUSED_LIBRARIES_CFLAGS@
INCLUDE_NEXT = @INCLUDE_NEXT@
@@ -1798,6 +1821,10 @@ INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@
INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@
INTLLIBS = @INTLLIBS@
INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+LC_COLLATE_IMPLEMENTED = @LC_COLLATE_IMPLEMENTED@
+LC_MONETARY_IMPLEMENTED = @LC_MONETARY_IMPLEMENTED@
+LC_NUMERIC_IMPLEMENTED = @LC_NUMERIC_IMPLEMENTED@
+LC_TIME_IMPLEMENTED = @LC_TIME_IMPLEMENTED@
LD = @LD@
LDFLAGS = @LDFLAGS@
LEX = @LEX@
@@ -1848,13 +1875,18 @@ MAKEINFO = @MAKEINFO@
MANDIR_LAYOUT = @MANDIR_LAYOUT@
MANIFEST_TOOL = @MANIFEST_TOOL@
MAN_SUBDIRS = @MAN_SUBDIRS@
+MBRTOWC_LIB = @MBRTOWC_LIB@
MKDIR_P = @MKDIR_P@
MSGFMT = @MSGFMT@
MSGFMT_015 = @MSGFMT_015@
MSGMERGE = @MSGMERGE@
+NANOSLEEP_LIB = @NANOSLEEP_LIB@
+NEXT_ASSERT_H = @NEXT_ASSERT_H@
+NEXT_AS_FIRST_DIRECTIVE_ASSERT_H = @NEXT_AS_FIRST_DIRECTIVE_ASSERT_H@
NEXT_AS_FIRST_DIRECTIVE_CTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_CTYPE_H@
NEXT_AS_FIRST_DIRECTIVE_DIRENT_H = @NEXT_AS_FIRST_DIRECTIVE_DIRENT_H@
NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@
+NEXT_AS_FIRST_DIRECTIVE_ERROR_H = @NEXT_AS_FIRST_DIRECTIVE_ERROR_H@
NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@
NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@
NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H = @NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H@
@@ -1891,6 +1923,7 @@ NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@
NEXT_CTYPE_H = @NEXT_CTYPE_H@
NEXT_DIRENT_H = @NEXT_DIRENT_H@
NEXT_ERRNO_H = @NEXT_ERRNO_H@
+NEXT_ERROR_H = @NEXT_ERROR_H@
NEXT_FCNTL_H = @NEXT_FCNTL_H@
NEXT_FLOAT_H = @NEXT_FLOAT_H@
NEXT_FNMATCH_H = @NEXT_FNMATCH_H@
@@ -1947,6 +1980,7 @@ PRAGMA_COLUMNS = @PRAGMA_COLUMNS@
PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
PRIPTR_PREFIX = @PRIPTR_PREFIX@
PTHREAD_H_DEFINES_STRUCT_TIMESPEC = @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@
+PTHREAD_SIGMASK_LIB = @PTHREAD_SIGMASK_LIB@
PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
RANLIB = @RANLIB@
REPLACE_ACCESS = @REPLACE_ACCESS@
@@ -1966,7 +2000,10 @@ REPLACE_DIRFD = @REPLACE_DIRFD@
REPLACE_DPRINTF = @REPLACE_DPRINTF@
REPLACE_DUP = @REPLACE_DUP@
REPLACE_DUP2 = @REPLACE_DUP2@
+REPLACE_DUP3 = @REPLACE_DUP3@
REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@
+REPLACE_ERROR = @REPLACE_ERROR@
+REPLACE_ERROR_AT_LINE = @REPLACE_ERROR_AT_LINE@
REPLACE_EXECL = @REPLACE_EXECL@
REPLACE_EXECLE = @REPLACE_EXECLE@
REPLACE_EXECLP = @REPLACE_EXECLP@
@@ -1979,6 +2016,7 @@ REPLACE_FCHMODAT = @REPLACE_FCHMODAT@
REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@
REPLACE_FCLOSE = @REPLACE_FCLOSE@
REPLACE_FCNTL = @REPLACE_FCNTL@
+REPLACE_FDATASYNC = @REPLACE_FDATASYNC@
REPLACE_FDOPEN = @REPLACE_FDOPEN@
REPLACE_FDOPENDIR = @REPLACE_FDOPENDIR@
REPLACE_FFLUSH = @REPLACE_FFLUSH@
@@ -2003,17 +2041,23 @@ REPLACE_GETCWD = @REPLACE_GETCWD@
REPLACE_GETDELIM = @REPLACE_GETDELIM@
REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@
REPLACE_GETDTABLESIZE = @REPLACE_GETDTABLESIZE@
+REPLACE_GETENTROPY = @REPLACE_GETENTROPY@
REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
REPLACE_GETLINE = @REPLACE_GETLINE@
+REPLACE_GETLOADAVG = @REPLACE_GETLOADAVG@
REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@
REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
REPLACE_GETPASS = @REPLACE_GETPASS@
REPLACE_GETPASS_FOR_GETPASS_GNU = @REPLACE_GETPASS_FOR_GETPASS_GNU@
+REPLACE_GETPROGNAME = @REPLACE_GETPROGNAME@
REPLACE_GETRANDOM = @REPLACE_GETRANDOM@
+REPLACE_GETSUBOPT = @REPLACE_GETSUBOPT@
REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
REPLACE_GLOB = @REPLACE_GLOB@
REPLACE_GLOB_PATTERN_P = @REPLACE_GLOB_PATTERN_P@
REPLACE_GMTIME = @REPLACE_GMTIME@
+REPLACE_IMAXABS = @REPLACE_IMAXABS@
+REPLACE_IMAXDIV = @REPLACE_IMAXDIV@
REPLACE_INITSTATE = @REPLACE_INITSTATE@
REPLACE_IOCTL = @REPLACE_IOCTL@
REPLACE_ISATTY = @REPLACE_ISATTY@
@@ -2038,14 +2082,19 @@ REPLACE_MBSINIT = @REPLACE_MBSINIT@
REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@
REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@
REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@
+REPLACE_MBSTOWCS = @REPLACE_MBSTOWCS@
REPLACE_MBTOWC = @REPLACE_MBTOWC@
+REPLACE_MB_CUR_MAX = @REPLACE_MB_CUR_MAX@
REPLACE_MEMCHR = @REPLACE_MEMCHR@
REPLACE_MEMMEM = @REPLACE_MEMMEM@
+REPLACE_MEMPCPY = @REPLACE_MEMPCPY@
REPLACE_MKDIR = @REPLACE_MKDIR@
REPLACE_MKFIFO = @REPLACE_MKFIFO@
REPLACE_MKFIFOAT = @REPLACE_MKFIFOAT@
REPLACE_MKNOD = @REPLACE_MKNOD@
REPLACE_MKNODAT = @REPLACE_MKNODAT@
+REPLACE_MKOSTEMP = @REPLACE_MKOSTEMP@
+REPLACE_MKOSTEMPS = @REPLACE_MKOSTEMPS@
REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
REPLACE_MKTIME = @REPLACE_MKTIME@
REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@
@@ -2057,8 +2106,10 @@ REPLACE_OPEN = @REPLACE_OPEN@
REPLACE_OPENAT = @REPLACE_OPENAT@
REPLACE_OPENDIR = @REPLACE_OPENDIR@
REPLACE_PERROR = @REPLACE_PERROR@
+REPLACE_PIPE2 = @REPLACE_PIPE2@
REPLACE_POPEN = @REPLACE_POPEN@
REPLACE_POSIX_MEMALIGN = @REPLACE_POSIX_MEMALIGN@
+REPLACE_POSIX_OPENPT = @REPLACE_POSIX_OPENPT@
REPLACE_PREAD = @REPLACE_PREAD@
REPLACE_PRINTF = @REPLACE_PRINTF@
REPLACE_PSELECT = @REPLACE_PSELECT@
@@ -2072,6 +2123,7 @@ REPLACE_RAISE = @REPLACE_RAISE@
REPLACE_RANDOM = @REPLACE_RANDOM@
REPLACE_RANDOM_R = @REPLACE_RANDOM_R@
REPLACE_READ = @REPLACE_READ@
+REPLACE_READDIR = @REPLACE_READDIR@
REPLACE_READLINK = @REPLACE_READLINK@
REPLACE_READLINKAT = @REPLACE_READLINKAT@
REPLACE_REALLOCARRAY = @REPLACE_REALLOCARRAY@
@@ -2081,9 +2133,11 @@ REPLACE_REALPATH = @REPLACE_REALPATH@
REPLACE_REMOVE = @REPLACE_REMOVE@
REPLACE_RENAME = @REPLACE_RENAME@
REPLACE_RENAMEAT = @REPLACE_RENAMEAT@
+REPLACE_REWINDDIR = @REPLACE_REWINDDIR@
REPLACE_RMDIR = @REPLACE_RMDIR@
REPLACE_SELECT = @REPLACE_SELECT@
REPLACE_SETENV = @REPLACE_SETENV@
+REPLACE_SETHOSTNAME = @REPLACE_SETHOSTNAME@
REPLACE_SETLOCALE = @REPLACE_SETLOCALE@
REPLACE_SETSTATE = @REPLACE_SETSTATE@
REPLACE_SLEEP = @REPLACE_SLEEP@
@@ -2092,6 +2146,7 @@ REPLACE_SPRINTF = @REPLACE_SPRINTF@
REPLACE_STAT = @REPLACE_STAT@
REPLACE_STDIO_READ_FUNCS = @REPLACE_STDIO_READ_FUNCS@
REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@
+REPLACE_STPCPY = @REPLACE_STPCPY@
REPLACE_STPNCPY = @REPLACE_STPNCPY@
REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
REPLACE_STRCHRNUL = @REPLACE_STRCHRNUL@
@@ -2118,7 +2173,9 @@ REPLACE_STRUCT_LCONV = @REPLACE_STRUCT_LCONV@
REPLACE_STRUCT_TIMEVAL = @REPLACE_STRUCT_TIMEVAL@
REPLACE_SYMLINK = @REPLACE_SYMLINK@
REPLACE_SYMLINKAT = @REPLACE_SYMLINKAT@
+REPLACE_TIME = @REPLACE_TIME@
REPLACE_TIMEGM = @REPLACE_TIMEGM@
+REPLACE_TIMESPEC_GET = @REPLACE_TIMESPEC_GET@
REPLACE_TMPFILE = @REPLACE_TMPFILE@
REPLACE_TOWLOWER = @REPLACE_TOWLOWER@
REPLACE_TRUNCATE = @REPLACE_TRUNCATE@
@@ -2137,23 +2194,31 @@ REPLACE_VPRINTF = @REPLACE_VPRINTF@
REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@
REPLACE_VSPRINTF = @REPLACE_VSPRINTF@
REPLACE_WCRTOMB = @REPLACE_WCRTOMB@
+REPLACE_WCSCMP = @REPLACE_WCSCMP@
REPLACE_WCSFTIME = @REPLACE_WCSFTIME@
+REPLACE_WCSNCMP = @REPLACE_WCSNCMP@
REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@
REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@
+REPLACE_WCSSTR = @REPLACE_WCSSTR@
REPLACE_WCSTOK = @REPLACE_WCSTOK@
REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@
REPLACE_WCTOB = @REPLACE_WCTOB@
REPLACE_WCTOMB = @REPLACE_WCTOMB@
REPLACE_WCWIDTH = @REPLACE_WCWIDTH@
+REPLACE_WMEMCMP = @REPLACE_WMEMCMP@
+REPLACE_WMEMPCPY = @REPLACE_WMEMPCPY@
REPLACE_WRITE = @REPLACE_WRITE@
+REPLACE__EXIT = @REPLACE__EXIT@
+SCHED_YIELD_LIB = @SCHED_YIELD_LIB@
SED = @SED@
+SELECT_LIB = @SELECT_LIB@
+SETLOCALE_NULL_LIB = @SETLOCALE_NULL_LIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
-STDALIGN_H = @STDALIGN_H@
STDARG_H = @STDARG_H@
-STDBOOL_H = @STDBOOL_H@
+STDCKDINT_H = @STDCKDINT_H@
STDDEF_H = @STDDEF_H@
STDINT_H = @STDINT_H@
STRIP = @STRIP@
@@ -2312,82 +2377,86 @@ SUBDIRS =
noinst_HEADERS =
noinst_LIBRARIES =
noinst_LTLIBRARIES = libgnu.la
-EXTRA_DIST = alloca.c alloca.in.h assure.h attribute.h basename-lgpl.h \
- calloc.c calloc.c canonicalize.h chdir-long.h cloexec.h \
- dirent-private.h ctype.in.h dirent.in.h stripslash.c dirname.h \
- dynarray.h malloc/dynarray-skeleton.c malloc/dynarray.h \
- eloop-threshold.h errno.in.h error.h exitfail.h fcntl.in.h \
- fd-hook.h file-set.h filename.h filenamecat.h flexmember.h \
- float.in.h fnmatch.c fnmatch_loop.c fnmatch.c fnmatch.in.h \
- stat-w32.c stat-w32.h at-func.c getopt-cdefs.in.h \
+EXTRA_DIST = alloca.c alloca.in.h assert.in.h verify.h assure.h \
+ attribute.h basename-lgpl.h calloc.c calloc.c canonicalize.h \
+ chdir-long.h cloexec.h dirent-private.h ctype.in.h dirent.in.h \
+ dirent-private.h stripslash.c dirname.h eloop-threshold.h \
+ errno.in.h error.in.h exitfail.h fcntl.in.h fd-hook.h \
+ dirent-private.h file-set.h filename.h filenamecat.h \
+ flexmember.h float.in.h fnmatch.c fnmatch_loop.c fnmatch.c \
+ fnmatch.in.h stat-w32.c stat-w32.h at-func.c getopt-cdefs.in.h \
getopt-core.h getopt-ext.h getopt-pfx-core.h getopt-pfx-ext.h \
- getopt.in.h getopt_int.h \
- $(top_srcdir)/build-aux/gitlog-to-changelog glob_internal.h \
+ getopt.in.h getopt_int.h getprogname.h \
+ $(top_srcdir)/build-aux/gitlog-to-changelog dynarray.h \
+ malloc/dynarray-skeleton.c malloc/dynarray.h \
+ malloc/scratch_buffer.h scratch_buffer.h glob_internal.h \
glob-libc.h glob.in.h $(top_srcdir)/build-aux/gnupload \
hard-locale.h hash.h hash-triple.h \
$(top_srcdir)/build-aux/config.rpath ialloc.h idpriv.h \
- idpriv.h intprops.h inttypes.in.h w32sock.h langinfo.in.h \
- cdefs.h libc-config.h limits.in.h localcharset.h locale.in.h \
- malloc.c malloc.c malloca.h lc-charset-dispatch.c \
- lc-charset-dispatch.h mbrtowc-impl-utf8.h mbrtowc-impl.h \
- mbtowc-lock.c mbtowc-lock.h windows-initguard.h \
- mbsrtowcs-impl.h mbsrtowcs-state.c mbtowc-impl.h \
- memchr.valgrind memmem.c memmem.c str-two-way.h msvc-inval.h \
- msvc-nothrow.h windows-initguard.h nonblocking.h stdio-read.c \
- stdio-write.c openat.h dirent-private.h pathmax.h \
+ idpriv.h intprops-internal.h intprops.h inttypes.in.h \
+ w32sock.h langinfo.in.h cdefs.h libc-config.h limits.in.h \
+ localcharset.h locale.in.h malloc.c malloc.c malloca.h \
+ lc-charset-dispatch.c lc-charset-dispatch.h \
+ mbrtowc-impl-utf8.h mbrtowc-impl.h mbtowc-lock.c mbtowc-lock.h \
+ windows-initguard.h mbsrtowcs-impl.h mbsrtowcs-state.c \
+ mbtowc-impl.h memchr.valgrind memmem.c memmem.c str-two-way.h \
+ msvc-inval.h msvc-nothrow.h windows-initguard.h nonblocking.h \
+ stdio-read.c stdio-write.c openat.h dirent-private.h pathmax.h \
rawmemchr.valgrind dirent-private.h at-func.c realloc.c \
realloc.c regcomp.c regex.h regex_internal.c regex_internal.h \
regexec.c at-func2.c at-func2.c renameatu.h dirent-private.h \
- same-inode.h save-cwd.h malloc/scratch_buffer.h \
- scratch_buffer.h setlocale_null.h windows-initguard.h \
+ same-inode.h save-cwd.h setlocale_null.h windows-initguard.h \
sig-handler.h signal.in.h stdio-write.c _Noreturn.h \
arg-nonnull.h c++defs.h warn-on-use.h w32sock.h stat-w32.c \
- stat-w32.h stat-time.h stdalign.in.h stdarg.in.h stdbool.in.h \
- stddef.in.h stdint.in.h stdio.in.h stdlib.in.h stdopen.h \
- strcasestr.c str-two-way.h strcasestr.c strchrnul.valgrind \
- streq.h strerror-override.h string.in.h strings.in.h \
- sys_file.in.h sys_ioctl.in.h sys_random.in.h sys_select.in.h \
- sys_socket.in.h sys_stat.in.h sys_time.in.h sys_types.in.h \
- sys_uio.in.h sysexits.in.h tempname.h termios.in.h time.in.h \
- timespec.h unistd.in.h unistd--.h unistd-safer.h at-func.c \
- utime.in.h utimens.h asnprintf.c float+.h printf-args.c \
- printf-args.h printf-parse.c printf-parse.h vasnprintf.c \
- vasnprintf.h asprintf.c vasprintf.c verify.h vsnprintf.c \
- wchar.in.h wctype.in.h windows-initguard.h windows-mutex.h \
- windows-once.h windows-initguard.h windows-recmutex.h \
- windows-initguard.h windows-rwlock.h wmemchr-impl.h xalloc.h \
- xalloc.h xalloc-oversized.h xgetcwd.h xstdopen.h xalloc.h
-BUILT_SOURCES = $(ALLOCA_H) ctype.h dirent.h malloc/dynarray.gl.h \
- malloc/dynarray-skeleton.gl.h $(ERRNO_H) fcntl.h $(FLOAT_H) \
- $(FNMATCH_H) $(GETOPT_H) $(GETOPT_CDEFS_H) $(GLOB_H) \
- glob-libc.gl.h inttypes.h langinfo.h $(LIMITS_H) locale.h \
- malloc/scratch_buffer.gl.h signal.h $(STDALIGN_H) $(STDARG_H) \
- $(STDBOOL_H) $(STDDEF_H) $(STDINT_H) stdio.h stdlib.h string.h \
- strings.h sys/file.h sys/ioctl.h sys/random.h sys/select.h \
- sys/socket.h sys/stat.h sys/time.h sys/types.h sys/uio.h \
- $(SYSEXITS_H) termios.h time.h unistd.h utime.h wchar.h \
- wctype.h
+ stat-w32.h stat-time.h stdarg.in.h intprops-internal.h \
+ stdckdint.in.h stddef.in.h stdint.in.h stdio.in.h stdlib.in.h \
+ stdopen.h strcasestr.c str-two-way.h strcasestr.c \
+ strchrnul.valgrind streq.h strerror-override.h string.in.h \
+ strings.in.h sys_file.in.h sys_ioctl.in.h sys_random.in.h \
+ sys_select.in.h sys_socket.in.h sys_stat.in.h sys_time.in.h \
+ sys_types.in.h sys_uio.in.h sysexits.in.h tempname.h \
+ termios.in.h time.in.h timespec.h unistd.in.h unistd--.h \
+ unistd-safer.h at-func.c utime.in.h utimens.h asnprintf.c \
+ float+.h printf-args.c printf-args.h printf-parse.c \
+ printf-parse.h vasnprintf.c vasnprintf.h asprintf.c \
+ vasprintf.c verify.h vsnprintf.c wchar.in.h wctype.in.h \
+ windows-initguard.h windows-mutex.h windows-once.h \
+ windows-initguard.h windows-recmutex.h windows-initguard.h \
+ windows-rwlock.h wmemchr-impl.h xalloc.h xalloc.h \
+ xalloc-oversized.h xgetcwd.h xstdopen.h xalloc.h
+BUILT_SOURCES = $(ALLOCA_H) $(ASSERT_H) ctype.h dirent.h $(ERRNO_H) \
+ error.h fcntl.h $(FLOAT_H) $(FNMATCH_H) $(GETOPT_H) \
+ $(GETOPT_CDEFS_H) malloc/dynarray.gl.h \
+ malloc/dynarray-skeleton.gl.h malloc/scratch_buffer.gl.h \
+ $(GLOB_H) glob-libc.gl.h inttypes.h langinfo.h $(LIMITS_H) \
+ locale.h signal.h $(STDARG_H) $(STDCKDINT_H) $(STDDEF_H) \
+ $(STDINT_H) stdio.h stdlib.h string.h strings.h sys/file.h \
+ sys/ioctl.h sys/random.h sys/select.h sys/socket.h sys/stat.h \
+ sys/time.h sys/types.h sys/uio.h $(SYSEXITS_H) termios.h \
+ time.h unistd.h utime.h wchar.h wctype.h
SUFFIXES =
-MOSTLYCLEANFILES = core *.stackdump alloca.h alloca.h-t ctype.h \
- ctype.h-t dirent.h dirent.h-t malloc/dynarray.gl.h \
+MOSTLYCLEANFILES = core *.stackdump alloca.h alloca.h-t assert.h \
+ assert.h-t ctype.h ctype.h-t dirent.h dirent.h-t errno.h \
+ errno.h-t error.h error.h-t fcntl.h fcntl.h-t float.h \
+ float.h-t fnmatch.h fnmatch.h-t getopt.h getopt.h-t \
+ getopt-cdefs.h getopt-cdefs.h-t malloc/dynarray.gl.h \
malloc/dynarray.gl.h-t malloc/dynarray-skeleton.gl.h \
- malloc/dynarray-skeleton.gl.h-t errno.h errno.h-t fcntl.h \
- fcntl.h-t float.h float.h-t fnmatch.h fnmatch.h-t getopt.h \
- getopt.h-t getopt-cdefs.h getopt-cdefs.h-t glob.h glob.h-t \
- glob-libc.gl.h glob-libc.gl.h-t inttypes.h inttypes.h-t \
- langinfo.h langinfo.h-t limits.h limits.h-t locale.h \
- locale.h-t malloc/scratch_buffer.gl.h \
- malloc/scratch_buffer.gl.h-t signal.h signal.h-t stdalign.h \
- stdalign.h-t stdarg.h stdarg.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 strings.h strings.h-t \
- sys/file.h sys/file.h-t sys/ioctl.h sys/ioctl.h-t sys/random.h \
- sys/random.h-t sys/select.h sys/select.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 sysexits.h \
- sysexits.h-t termios.h termios.h-t time.h time.h-t unistd.h \
- unistd.h-t utime.h utime.h-t wchar.h wchar.h-t wctype.h \
- wctype.h-t
+ malloc/dynarray-skeleton.gl.h-t malloc/scratch_buffer.gl.h \
+ malloc/scratch_buffer.gl.h-t glob.h glob.h-t glob-libc.gl.h \
+ glob-libc.gl.h-t inttypes.h inttypes.h-t langinfo.h \
+ langinfo.h-t limits.h limits.h-t locale.h locale.h-t signal.h \
+ signal.h-t stdarg.h stdarg.h-t stdckdint.h stdckdint.h-t \
+ stddef.h stddef.h-t stdint.h stdint.h-t stdio.h stdio.h-t1 \
+ stdio.h-t2 stdio.h-t3 stdlib.h stdlib.h-t1 stdlib.h-t2 \
+ stdlib.h-t3 string.h string.h-t1 string.h-t2 strings.h \
+ strings.h-t sys/file.h sys/file.h-t sys/ioctl.h sys/ioctl.h-t \
+ sys/random.h sys/random.h-t sys/select.h sys/select.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 \
+ sysexits.h sysexits.h-t termios.h termios.h-t time.h time.h-t \
+ unistd.h unistd.h-t1 unistd.h-t2 unistd.h-t3 unistd.h-t4 \
+ utime.h utime.h-t wchar.h wchar.h-t1 wchar.h-t2 wchar.h-t3 \
+ wctype.h wctype.h-t
MOSTLYCLEANDIRS = sys sys sys sys sys sys sys
CLEANFILES =
DISTCLEANFILES =
@@ -2403,81 +2472,79 @@ libgnu_la_SOURCES = argp.h argp-ba.c argp-eexst.c argp-fmtstream.c \
canonicalize.c $(am__append_2) $(am__append_3) $(am__append_4) \
$(am__append_5) cloexec.c $(am__append_6) $(am__append_7) \
$(am__append_8) dirname.c basename.c dirname-lgpl.c \
- stripslash.c $(am__append_9) $(am__append_10) \
- malloc/dynarray_at_failure.c malloc/dynarray_emplace_enlarge.c \
- malloc/dynarray_finalize.c malloc/dynarray_resize.c \
- malloc/dynarray_resize_clear.c $(am__append_11) exitfail.c \
- $(am__append_12) $(am__append_13) fd-hook.c fd-safer-flag.c \
- dup-safer-flag.c $(am__append_14) file-set.c \
+ stripslash.c $(am__append_9) $(am__append_10) $(am__append_11) \
+ exitfail.c $(am__append_12) $(am__append_13) fd-hook.c \
+ fd-safer-flag.c dup-safer-flag.c $(am__append_14) file-set.c \
filenamecat-lgpl.c $(am__append_15) $(am__append_16) \
$(am__append_17) $(am__append_18) $(am__append_19) \
$(am__append_20) $(am__append_21) $(am__append_22) \
$(am__append_23) $(am__append_24) $(am__append_25) \
- $(am__append_26) $(am__append_27) getprogname.h getprogname.c \
- $(am__append_28) gettext.h gettime.c $(am__append_29) \
- $(am__append_30) $(am__append_31) hard-locale.c hash.c \
- gl_hash_map.h gl_hash_map.c gl_anyhash1.h gl_anyhash2.h \
- gl_anyhash_primes.h hash-pjw.h hash-pjw.c hash-pjw-bare.h \
- hash-pjw-bare.c gl_hash_set.h gl_hash_set.c gl_anyhash1.h \
- gl_anyhash2.h gl_anyhash_primes.h hash-triple-simple.c \
- ialloc.c idpriv-drop.c idpriv-droptemp.c idx.h \
- $(am__append_32) $(am__append_33) $(am__append_34) \
- gl_linkedhash_list.h gl_linkedhash_list.c gl_anyhash1.h \
- gl_anyhash2.h gl_anyhash_primes.h gl_anylinked_list1.h \
- gl_anylinked_list2.h gl_list.h gl_list.c localcharset.c \
- $(am__append_35) glthread/lock.h glthread/lock.c \
- $(am__append_36) malloca.c gl_map.h gl_map.c $(am__append_37) \
- $(am__append_38) $(am__append_39) $(am__append_40) \
- $(am__append_41) $(am__append_42) $(am__append_43) minmax.h \
- $(am__append_44) $(am__append_45) $(am__append_46) \
- $(am__append_47) $(am__append_48) $(am__append_49) \
- $(am__append_50) $(am__append_51) nonblocking.c \
- $(am__append_52) $(am__append_53) openat-die.c \
- $(am__append_54) $(am__append_55) progname.h progname.c \
- $(am__append_56) $(am__append_57) $(am__append_58) \
- $(am__append_59) gl_rbtree_list.h gl_rbtree_list.c \
- gl_anyrbtree_list1.h gl_anyrbtree_list2.h gl_anytree_list1.h \
- gl_anytree_list2.h $(am__append_60) $(am__append_61) \
- $(am__append_62) $(am__append_63) $(am__append_64) \
- $(am__append_65) $(am__append_66) renameatu.c $(am__append_67) \
- $(am__append_68) save-cwd.c malloc/scratch_buffer_dupfree.c \
- malloc/scratch_buffer_grow.c \
+ $(am__append_26) $(am__append_27) $(am__append_28) \
+ $(am__append_29) gettext.h gettime.c $(am__append_30) \
+ malloc/dynarray_at_failure.c malloc/dynarray_emplace_enlarge.c \
+ malloc/dynarray_finalize.c malloc/dynarray_resize.c \
+ malloc/dynarray_resize_clear.c malloc/scratch_buffer_grow.c \
malloc/scratch_buffer_grow_preserve.c \
- malloc/scratch_buffer_set_array_size.c $(am__append_69) \
- gl_set.h gl_set.c $(am__append_70) setlocale_null.c \
- $(am__append_71) $(am__append_72) sig-handler.c \
- $(am__append_73) size_max.h $(am__append_74) sockets.h \
- sockets.c $(am__append_75) stat-time.c $(am__append_76) \
- $(am__append_77) stdopen.c $(am__append_78) $(am__append_79) \
+ malloc/scratch_buffer_set_array_size.c $(am__append_31) \
+ $(am__append_32) hard-locale.c hash.c gl_hash_map.h \
+ gl_hash_map.c gl_anyhash1.h gl_anyhash2.h gl_anyhash_primes.h \
+ hash-pjw.h hash-pjw.c hash-pjw-bare.h hash-pjw-bare.c \
+ gl_hash_set.h gl_hash_set.c gl_anyhash1.h gl_anyhash2.h \
+ gl_anyhash_primes.h hash-triple-simple.c ialloc.c \
+ idpriv-drop.c idpriv-droptemp.c idx.h $(am__append_33) \
+ $(am__append_34) $(am__append_35) gl_linkedhash_list.h \
+ gl_linkedhash_list.c gl_anyhash1.h gl_anyhash2.h \
+ gl_anyhash_primes.h gl_anylinked_list1.h gl_anylinked_list2.h \
+ gl_list.h gl_list.c localcharset.c $(am__append_36) \
+ glthread/lock.h glthread/lock.c $(am__append_37) malloca.c \
+ gl_map.h gl_map.c $(am__append_38) $(am__append_39) \
+ $(am__append_40) $(am__append_41) $(am__append_42) \
+ $(am__append_43) $(am__append_44) minmax.h $(am__append_45) \
+ $(am__append_46) $(am__append_47) $(am__append_48) \
+ $(am__append_49) $(am__append_50) $(am__append_51) \
+ $(am__append_52) nonblocking.c $(am__append_53) \
+ $(am__append_54) openat-die.c $(am__append_55) \
+ $(am__append_56) progname.h progname.c $(am__append_57) \
+ $(am__append_58) $(am__append_59) $(am__append_60) \
+ gl_rbtree_list.h gl_rbtree_list.c gl_anyrbtree_list1.h \
+ gl_anyrbtree_list2.h gl_anytree_list1.h gl_anytree_list2.h \
+ $(am__append_61) $(am__append_62) $(am__append_63) \
+ $(am__append_64) $(am__append_65) $(am__append_66) \
+ $(am__append_67) renameatu.c $(am__append_68) $(am__append_69) \
+ save-cwd.c $(am__append_70) gl_set.h gl_set.c $(am__append_71) \
+ setlocale_null.c $(am__append_72) $(am__append_73) \
+ sig-handler.c $(am__append_74) size_max.h $(am__append_75) \
+ sockets.h sockets.c $(am__append_76) stat-time.c \
+ $(am__append_77) $(am__append_78) stdopen.c $(am__append_79) \
$(am__append_80) $(am__append_81) $(am__append_82) \
$(am__append_83) $(am__append_84) $(am__append_85) \
- $(am__append_86) strnlen1.h strnlen1.c $(am__append_87) \
- sys_socket.c tempname.c glthread/threadlib.c timespec.c \
- unistd.c dup-safer.c fd-safer.c pipe-safer.c $(am__append_88) \
- $(am__append_89) $(am__append_90) utimens.c verror.h verror.c \
- $(am__append_91) wctype-h.c $(am__append_92) $(am__append_93) \
+ $(am__append_86) $(am__append_87) strnlen1.h strnlen1.c \
+ $(am__append_88) sys_socket.c tempname.c glthread/threadlib.c \
+ timespec.c unistd.c dup-safer.c fd-safer.c pipe-safer.c \
+ $(am__append_89) $(am__append_90) $(am__append_91) utimens.c \
+ verror.h verror.c $(am__append_92) wctype-h.c $(am__append_93) \
$(am__append_94) $(am__append_95) $(am__append_96) \
- $(am__append_97) xmalloc.c xalloc-die.c xgetcwd.c gl_xlist.h \
- gl_xlist.c gl_xmap.h gl_xmap.c gl_xset.h gl_xset.c xsize.h \
- xsize.c xstdopen.c xstrndup.h xstrndup.c xvasprintf.h \
- xvasprintf.c xasprintf.c
+ $(am__append_97) $(am__append_98) xmalloc.c xalloc-die.c \
+ xgetcwd.c gl_xlist.h gl_xlist.c gl_xmap.h gl_xmap.c gl_xset.h \
+ gl_xset.c xsize.h xsize.c xstdopen.c xstrndup.h xstrndup.c \
+ xvasprintf.h xvasprintf.c xasprintf.c
libgnu_la_CFLAGS = $(AM_CFLAGS) $(GL_CFLAG_GNULIB_WARNINGS)
libgnu_la_LIBADD = $(gl_LTLIBOBJS) @LTALLOCA@
libgnu_la_DEPENDENCIES = $(gl_LTLIBOBJS) @LTALLOCA@
EXTRA_libgnu_la_SOURCES = alloca.c calloc.c calloc.c stripslash.c \
- malloc/dynarray-skeleton.c fnmatch.c fnmatch_loop.c fnmatch.c \
- stat-w32.c at-func.c malloc.c malloc.c lc-charset-dispatch.c \
- mbtowc-lock.c mbsrtowcs-state.c memmem.c memmem.c stdio-read.c \
- stdio-write.c at-func.c realloc.c realloc.c regcomp.c \
- regex_internal.c regexec.c at-func2.c at-func2.c stdio-write.c \
- stat-w32.c strcasestr.c strcasestr.c at-func.c asnprintf.c \
- printf-args.c printf-parse.c vasnprintf.c asprintf.c \
- vasprintf.c vsnprintf.c
-libgnu_la_LDFLAGS = $(AM_LDFLAGS) -no-undefined $(LIBSOCKET) \
- $(LIBTHREAD) $(LIB_CLOCK_GETTIME) $(LIB_GETLOGIN) \
- $(LIB_GETRANDOM) $(LIB_HARD_LOCALE) $(LIB_MBRTOWC) \
- $(LIB_NANOSLEEP) $(LIB_PTHREAD_SIGMASK) $(LIB_SELECT) \
- $(LIB_SETLOCALE_NULL) $(LTLIBINTL)
+ fnmatch.c fnmatch_loop.c fnmatch.c stat-w32.c at-func.c \
+ malloc/dynarray-skeleton.c malloc.c malloc.c \
+ lc-charset-dispatch.c mbtowc-lock.c mbsrtowcs-state.c memmem.c \
+ memmem.c stdio-read.c stdio-write.c at-func.c realloc.c \
+ realloc.c regcomp.c regex_internal.c regexec.c at-func2.c \
+ at-func2.c stdio-write.c stat-w32.c strcasestr.c strcasestr.c \
+ at-func.c asnprintf.c printf-args.c printf-parse.c \
+ vasnprintf.c asprintf.c vasprintf.c vsnprintf.c
+libgnu_la_LDFLAGS = $(AM_LDFLAGS) -no-undefined $(CLOCK_TIME_LIB) \
+ $(GETLOGIN_LIB) $(GETRANDOM_LIB) $(HARD_LOCALE_LIB) \
+ $(LIBSOCKET) $(LIBTHREAD) $(LTLIBINTL) $(MBRTOWC_LIB) \
+ $(NANOSLEEP_LIB) $(PTHREAD_SIGMASK_LIB) $(SELECT_LIB) \
+ $(SETLOCALE_NULL_LIB)
# Use this preprocessor expression to decide whether #include_next works.
# Do not rely on a 'configure'-time test for this, since the expression
@@ -2582,6 +2649,12 @@ malloc/libgnu_la-dynarray_resize.lo: malloc/$(am__dirstamp) \
malloc/$(DEPDIR)/$(am__dirstamp)
malloc/libgnu_la-dynarray_resize_clear.lo: malloc/$(am__dirstamp) \
malloc/$(DEPDIR)/$(am__dirstamp)
+malloc/libgnu_la-scratch_buffer_grow.lo: malloc/$(am__dirstamp) \
+ malloc/$(DEPDIR)/$(am__dirstamp)
+malloc/libgnu_la-scratch_buffer_grow_preserve.lo: \
+ malloc/$(am__dirstamp) malloc/$(DEPDIR)/$(am__dirstamp)
+malloc/libgnu_la-scratch_buffer_set_array_size.lo: \
+ malloc/$(am__dirstamp) malloc/$(DEPDIR)/$(am__dirstamp)
glthread/$(am__dirstamp):
@$(MKDIR_P) glthread
@: > glthread/$(am__dirstamp)
@@ -2590,14 +2663,6 @@ glthread/$(DEPDIR)/$(am__dirstamp):
@: > glthread/$(DEPDIR)/$(am__dirstamp)
glthread/libgnu_la-lock.lo: glthread/$(am__dirstamp) \
glthread/$(DEPDIR)/$(am__dirstamp)
-malloc/libgnu_la-scratch_buffer_dupfree.lo: malloc/$(am__dirstamp) \
- malloc/$(DEPDIR)/$(am__dirstamp)
-malloc/libgnu_la-scratch_buffer_grow.lo: malloc/$(am__dirstamp) \
- malloc/$(DEPDIR)/$(am__dirstamp)
-malloc/libgnu_la-scratch_buffer_grow_preserve.lo: \
- malloc/$(am__dirstamp) malloc/$(DEPDIR)/$(am__dirstamp)
-malloc/libgnu_la-scratch_buffer_set_array_size.lo: \
- malloc/$(am__dirstamp) malloc/$(DEPDIR)/$(am__dirstamp)
glthread/libgnu_la-threadlib.lo: glthread/$(am__dirstamp) \
glthread/$(DEPDIR)/$(am__dirstamp)
malloc/libgnu_la-dynarray-skeleton.lo: malloc/$(am__dirstamp) \
@@ -2825,7 +2890,6 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@malloc/$(DEPDIR)/libgnu_la-dynarray_finalize.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@malloc/$(DEPDIR)/libgnu_la-dynarray_resize.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@malloc/$(DEPDIR)/libgnu_la-dynarray_resize_clear.Plo@am__quote@ # am--include-marker
-@AMDEP_TRUE@@am__include@ @am__quote@malloc/$(DEPDIR)/libgnu_la-scratch_buffer_dupfree.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@malloc/$(DEPDIR)/libgnu_la-scratch_buffer_grow.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@malloc/$(DEPDIR)/libgnu_la-scratch_buffer_grow_preserve.Plo@am__quote@ # am--include-marker
@AMDEP_TRUE@@am__include@ @am__quote@malloc/$(DEPDIR)/libgnu_la-scratch_buffer_set_array_size.Plo@am__quote@ # am--include-marker
@@ -3070,41 +3134,6 @@ libgnu_la-dup2.lo: dup2.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgnu_la_CFLAGS) $(CFLAGS) -c -o libgnu_la-dup2.lo `test -f 'dup2.c' || echo '$(srcdir)/'`dup2.c
-malloc/libgnu_la-dynarray_at_failure.lo: malloc/dynarray_at_failure.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgnu_la_CFLAGS) $(CFLAGS) -MT malloc/libgnu_la-dynarray_at_failure.lo -MD -MP -MF malloc/$(DEPDIR)/libgnu_la-dynarray_at_failure.Tpo -c -o malloc/libgnu_la-dynarray_at_failure.lo `test -f 'malloc/dynarray_at_failure.c' || echo '$(srcdir)/'`malloc/dynarray_at_failure.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) malloc/$(DEPDIR)/libgnu_la-dynarray_at_failure.Tpo malloc/$(DEPDIR)/libgnu_la-dynarray_at_failure.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='malloc/dynarray_at_failure.c' object='malloc/libgnu_la-dynarray_at_failure.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgnu_la_CFLAGS) $(CFLAGS) -c -o malloc/libgnu_la-dynarray_at_failure.lo `test -f 'malloc/dynarray_at_failure.c' || echo '$(srcdir)/'`malloc/dynarray_at_failure.c
-
-malloc/libgnu_la-dynarray_emplace_enlarge.lo: malloc/dynarray_emplace_enlarge.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgnu_la_CFLAGS) $(CFLAGS) -MT malloc/libgnu_la-dynarray_emplace_enlarge.lo -MD -MP -MF malloc/$(DEPDIR)/libgnu_la-dynarray_emplace_enlarge.Tpo -c -o malloc/libgnu_la-dynarray_emplace_enlarge.lo `test -f 'malloc/dynarray_emplace_enlarge.c' || echo '$(srcdir)/'`malloc/dynarray_emplace_enlarge.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) malloc/$(DEPDIR)/libgnu_la-dynarray_emplace_enlarge.Tpo malloc/$(DEPDIR)/libgnu_la-dynarray_emplace_enlarge.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='malloc/dynarray_emplace_enlarge.c' object='malloc/libgnu_la-dynarray_emplace_enlarge.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgnu_la_CFLAGS) $(CFLAGS) -c -o malloc/libgnu_la-dynarray_emplace_enlarge.lo `test -f 'malloc/dynarray_emplace_enlarge.c' || echo '$(srcdir)/'`malloc/dynarray_emplace_enlarge.c
-
-malloc/libgnu_la-dynarray_finalize.lo: malloc/dynarray_finalize.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgnu_la_CFLAGS) $(CFLAGS) -MT malloc/libgnu_la-dynarray_finalize.lo -MD -MP -MF malloc/$(DEPDIR)/libgnu_la-dynarray_finalize.Tpo -c -o malloc/libgnu_la-dynarray_finalize.lo `test -f 'malloc/dynarray_finalize.c' || echo '$(srcdir)/'`malloc/dynarray_finalize.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) malloc/$(DEPDIR)/libgnu_la-dynarray_finalize.Tpo malloc/$(DEPDIR)/libgnu_la-dynarray_finalize.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='malloc/dynarray_finalize.c' object='malloc/libgnu_la-dynarray_finalize.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgnu_la_CFLAGS) $(CFLAGS) -c -o malloc/libgnu_la-dynarray_finalize.lo `test -f 'malloc/dynarray_finalize.c' || echo '$(srcdir)/'`malloc/dynarray_finalize.c
-
-malloc/libgnu_la-dynarray_resize.lo: malloc/dynarray_resize.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgnu_la_CFLAGS) $(CFLAGS) -MT malloc/libgnu_la-dynarray_resize.lo -MD -MP -MF malloc/$(DEPDIR)/libgnu_la-dynarray_resize.Tpo -c -o malloc/libgnu_la-dynarray_resize.lo `test -f 'malloc/dynarray_resize.c' || echo '$(srcdir)/'`malloc/dynarray_resize.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) malloc/$(DEPDIR)/libgnu_la-dynarray_resize.Tpo malloc/$(DEPDIR)/libgnu_la-dynarray_resize.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='malloc/dynarray_resize.c' object='malloc/libgnu_la-dynarray_resize.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgnu_la_CFLAGS) $(CFLAGS) -c -o malloc/libgnu_la-dynarray_resize.lo `test -f 'malloc/dynarray_resize.c' || echo '$(srcdir)/'`malloc/dynarray_resize.c
-
-malloc/libgnu_la-dynarray_resize_clear.lo: malloc/dynarray_resize_clear.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgnu_la_CFLAGS) $(CFLAGS) -MT malloc/libgnu_la-dynarray_resize_clear.lo -MD -MP -MF malloc/$(DEPDIR)/libgnu_la-dynarray_resize_clear.Tpo -c -o malloc/libgnu_la-dynarray_resize_clear.lo `test -f 'malloc/dynarray_resize_clear.c' || echo '$(srcdir)/'`malloc/dynarray_resize_clear.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) malloc/$(DEPDIR)/libgnu_la-dynarray_resize_clear.Tpo malloc/$(DEPDIR)/libgnu_la-dynarray_resize_clear.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='malloc/dynarray_resize_clear.c' object='malloc/libgnu_la-dynarray_resize_clear.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgnu_la_CFLAGS) $(CFLAGS) -c -o malloc/libgnu_la-dynarray_resize_clear.lo `test -f 'malloc/dynarray_resize_clear.c' || echo '$(srcdir)/'`malloc/dynarray_resize_clear.c
-
libgnu_la-error.lo: error.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgnu_la_CFLAGS) $(CFLAGS) -MT libgnu_la-error.lo -MD -MP -MF $(DEPDIR)/libgnu_la-error.Tpo -c -o libgnu_la-error.lo `test -f 'error.c' || echo '$(srcdir)/'`error.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgnu_la-error.Tpo $(DEPDIR)/libgnu_la-error.Plo
@@ -3301,6 +3330,62 @@ libgnu_la-gettimeofday.lo: gettimeofday.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgnu_la_CFLAGS) $(CFLAGS) -c -o libgnu_la-gettimeofday.lo `test -f 'gettimeofday.c' || echo '$(srcdir)/'`gettimeofday.c
+malloc/libgnu_la-dynarray_at_failure.lo: malloc/dynarray_at_failure.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgnu_la_CFLAGS) $(CFLAGS) -MT malloc/libgnu_la-dynarray_at_failure.lo -MD -MP -MF malloc/$(DEPDIR)/libgnu_la-dynarray_at_failure.Tpo -c -o malloc/libgnu_la-dynarray_at_failure.lo `test -f 'malloc/dynarray_at_failure.c' || echo '$(srcdir)/'`malloc/dynarray_at_failure.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) malloc/$(DEPDIR)/libgnu_la-dynarray_at_failure.Tpo malloc/$(DEPDIR)/libgnu_la-dynarray_at_failure.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='malloc/dynarray_at_failure.c' object='malloc/libgnu_la-dynarray_at_failure.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgnu_la_CFLAGS) $(CFLAGS) -c -o malloc/libgnu_la-dynarray_at_failure.lo `test -f 'malloc/dynarray_at_failure.c' || echo '$(srcdir)/'`malloc/dynarray_at_failure.c
+
+malloc/libgnu_la-dynarray_emplace_enlarge.lo: malloc/dynarray_emplace_enlarge.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgnu_la_CFLAGS) $(CFLAGS) -MT malloc/libgnu_la-dynarray_emplace_enlarge.lo -MD -MP -MF malloc/$(DEPDIR)/libgnu_la-dynarray_emplace_enlarge.Tpo -c -o malloc/libgnu_la-dynarray_emplace_enlarge.lo `test -f 'malloc/dynarray_emplace_enlarge.c' || echo '$(srcdir)/'`malloc/dynarray_emplace_enlarge.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) malloc/$(DEPDIR)/libgnu_la-dynarray_emplace_enlarge.Tpo malloc/$(DEPDIR)/libgnu_la-dynarray_emplace_enlarge.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='malloc/dynarray_emplace_enlarge.c' object='malloc/libgnu_la-dynarray_emplace_enlarge.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgnu_la_CFLAGS) $(CFLAGS) -c -o malloc/libgnu_la-dynarray_emplace_enlarge.lo `test -f 'malloc/dynarray_emplace_enlarge.c' || echo '$(srcdir)/'`malloc/dynarray_emplace_enlarge.c
+
+malloc/libgnu_la-dynarray_finalize.lo: malloc/dynarray_finalize.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgnu_la_CFLAGS) $(CFLAGS) -MT malloc/libgnu_la-dynarray_finalize.lo -MD -MP -MF malloc/$(DEPDIR)/libgnu_la-dynarray_finalize.Tpo -c -o malloc/libgnu_la-dynarray_finalize.lo `test -f 'malloc/dynarray_finalize.c' || echo '$(srcdir)/'`malloc/dynarray_finalize.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) malloc/$(DEPDIR)/libgnu_la-dynarray_finalize.Tpo malloc/$(DEPDIR)/libgnu_la-dynarray_finalize.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='malloc/dynarray_finalize.c' object='malloc/libgnu_la-dynarray_finalize.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgnu_la_CFLAGS) $(CFLAGS) -c -o malloc/libgnu_la-dynarray_finalize.lo `test -f 'malloc/dynarray_finalize.c' || echo '$(srcdir)/'`malloc/dynarray_finalize.c
+
+malloc/libgnu_la-dynarray_resize.lo: malloc/dynarray_resize.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgnu_la_CFLAGS) $(CFLAGS) -MT malloc/libgnu_la-dynarray_resize.lo -MD -MP -MF malloc/$(DEPDIR)/libgnu_la-dynarray_resize.Tpo -c -o malloc/libgnu_la-dynarray_resize.lo `test -f 'malloc/dynarray_resize.c' || echo '$(srcdir)/'`malloc/dynarray_resize.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) malloc/$(DEPDIR)/libgnu_la-dynarray_resize.Tpo malloc/$(DEPDIR)/libgnu_la-dynarray_resize.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='malloc/dynarray_resize.c' object='malloc/libgnu_la-dynarray_resize.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgnu_la_CFLAGS) $(CFLAGS) -c -o malloc/libgnu_la-dynarray_resize.lo `test -f 'malloc/dynarray_resize.c' || echo '$(srcdir)/'`malloc/dynarray_resize.c
+
+malloc/libgnu_la-dynarray_resize_clear.lo: malloc/dynarray_resize_clear.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgnu_la_CFLAGS) $(CFLAGS) -MT malloc/libgnu_la-dynarray_resize_clear.lo -MD -MP -MF malloc/$(DEPDIR)/libgnu_la-dynarray_resize_clear.Tpo -c -o malloc/libgnu_la-dynarray_resize_clear.lo `test -f 'malloc/dynarray_resize_clear.c' || echo '$(srcdir)/'`malloc/dynarray_resize_clear.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) malloc/$(DEPDIR)/libgnu_la-dynarray_resize_clear.Tpo malloc/$(DEPDIR)/libgnu_la-dynarray_resize_clear.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='malloc/dynarray_resize_clear.c' object='malloc/libgnu_la-dynarray_resize_clear.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgnu_la_CFLAGS) $(CFLAGS) -c -o malloc/libgnu_la-dynarray_resize_clear.lo `test -f 'malloc/dynarray_resize_clear.c' || echo '$(srcdir)/'`malloc/dynarray_resize_clear.c
+
+malloc/libgnu_la-scratch_buffer_grow.lo: malloc/scratch_buffer_grow.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgnu_la_CFLAGS) $(CFLAGS) -MT malloc/libgnu_la-scratch_buffer_grow.lo -MD -MP -MF malloc/$(DEPDIR)/libgnu_la-scratch_buffer_grow.Tpo -c -o malloc/libgnu_la-scratch_buffer_grow.lo `test -f 'malloc/scratch_buffer_grow.c' || echo '$(srcdir)/'`malloc/scratch_buffer_grow.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) malloc/$(DEPDIR)/libgnu_la-scratch_buffer_grow.Tpo malloc/$(DEPDIR)/libgnu_la-scratch_buffer_grow.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='malloc/scratch_buffer_grow.c' object='malloc/libgnu_la-scratch_buffer_grow.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgnu_la_CFLAGS) $(CFLAGS) -c -o malloc/libgnu_la-scratch_buffer_grow.lo `test -f 'malloc/scratch_buffer_grow.c' || echo '$(srcdir)/'`malloc/scratch_buffer_grow.c
+
+malloc/libgnu_la-scratch_buffer_grow_preserve.lo: malloc/scratch_buffer_grow_preserve.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgnu_la_CFLAGS) $(CFLAGS) -MT malloc/libgnu_la-scratch_buffer_grow_preserve.lo -MD -MP -MF malloc/$(DEPDIR)/libgnu_la-scratch_buffer_grow_preserve.Tpo -c -o malloc/libgnu_la-scratch_buffer_grow_preserve.lo `test -f 'malloc/scratch_buffer_grow_preserve.c' || echo '$(srcdir)/'`malloc/scratch_buffer_grow_preserve.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) malloc/$(DEPDIR)/libgnu_la-scratch_buffer_grow_preserve.Tpo malloc/$(DEPDIR)/libgnu_la-scratch_buffer_grow_preserve.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='malloc/scratch_buffer_grow_preserve.c' object='malloc/libgnu_la-scratch_buffer_grow_preserve.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgnu_la_CFLAGS) $(CFLAGS) -c -o malloc/libgnu_la-scratch_buffer_grow_preserve.lo `test -f 'malloc/scratch_buffer_grow_preserve.c' || echo '$(srcdir)/'`malloc/scratch_buffer_grow_preserve.c
+
+malloc/libgnu_la-scratch_buffer_set_array_size.lo: malloc/scratch_buffer_set_array_size.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgnu_la_CFLAGS) $(CFLAGS) -MT malloc/libgnu_la-scratch_buffer_set_array_size.lo -MD -MP -MF malloc/$(DEPDIR)/libgnu_la-scratch_buffer_set_array_size.Tpo -c -o malloc/libgnu_la-scratch_buffer_set_array_size.lo `test -f 'malloc/scratch_buffer_set_array_size.c' || echo '$(srcdir)/'`malloc/scratch_buffer_set_array_size.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) malloc/$(DEPDIR)/libgnu_la-scratch_buffer_set_array_size.Tpo malloc/$(DEPDIR)/libgnu_la-scratch_buffer_set_array_size.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='malloc/scratch_buffer_set_array_size.c' object='malloc/libgnu_la-scratch_buffer_set_array_size.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgnu_la_CFLAGS) $(CFLAGS) -c -o malloc/libgnu_la-scratch_buffer_set_array_size.lo `test -f 'malloc/scratch_buffer_set_array_size.c' || echo '$(srcdir)/'`malloc/scratch_buffer_set_array_size.c
+
libgnu_la-glob.lo: glob.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgnu_la_CFLAGS) $(CFLAGS) -MT libgnu_la-glob.lo -MD -MP -MF $(DEPDIR)/libgnu_la-glob.Tpo -c -o libgnu_la-glob.lo `test -f 'glob.c' || echo '$(srcdir)/'`glob.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgnu_la-glob.Tpo $(DEPDIR)/libgnu_la-glob.Plo
@@ -3735,34 +3820,6 @@ libgnu_la-save-cwd.lo: save-cwd.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgnu_la_CFLAGS) $(CFLAGS) -c -o libgnu_la-save-cwd.lo `test -f 'save-cwd.c' || echo '$(srcdir)/'`save-cwd.c
-malloc/libgnu_la-scratch_buffer_dupfree.lo: malloc/scratch_buffer_dupfree.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgnu_la_CFLAGS) $(CFLAGS) -MT malloc/libgnu_la-scratch_buffer_dupfree.lo -MD -MP -MF malloc/$(DEPDIR)/libgnu_la-scratch_buffer_dupfree.Tpo -c -o malloc/libgnu_la-scratch_buffer_dupfree.lo `test -f 'malloc/scratch_buffer_dupfree.c' || echo '$(srcdir)/'`malloc/scratch_buffer_dupfree.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) malloc/$(DEPDIR)/libgnu_la-scratch_buffer_dupfree.Tpo malloc/$(DEPDIR)/libgnu_la-scratch_buffer_dupfree.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='malloc/scratch_buffer_dupfree.c' object='malloc/libgnu_la-scratch_buffer_dupfree.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgnu_la_CFLAGS) $(CFLAGS) -c -o malloc/libgnu_la-scratch_buffer_dupfree.lo `test -f 'malloc/scratch_buffer_dupfree.c' || echo '$(srcdir)/'`malloc/scratch_buffer_dupfree.c
-
-malloc/libgnu_la-scratch_buffer_grow.lo: malloc/scratch_buffer_grow.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgnu_la_CFLAGS) $(CFLAGS) -MT malloc/libgnu_la-scratch_buffer_grow.lo -MD -MP -MF malloc/$(DEPDIR)/libgnu_la-scratch_buffer_grow.Tpo -c -o malloc/libgnu_la-scratch_buffer_grow.lo `test -f 'malloc/scratch_buffer_grow.c' || echo '$(srcdir)/'`malloc/scratch_buffer_grow.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) malloc/$(DEPDIR)/libgnu_la-scratch_buffer_grow.Tpo malloc/$(DEPDIR)/libgnu_la-scratch_buffer_grow.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='malloc/scratch_buffer_grow.c' object='malloc/libgnu_la-scratch_buffer_grow.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgnu_la_CFLAGS) $(CFLAGS) -c -o malloc/libgnu_la-scratch_buffer_grow.lo `test -f 'malloc/scratch_buffer_grow.c' || echo '$(srcdir)/'`malloc/scratch_buffer_grow.c
-
-malloc/libgnu_la-scratch_buffer_grow_preserve.lo: malloc/scratch_buffer_grow_preserve.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgnu_la_CFLAGS) $(CFLAGS) -MT malloc/libgnu_la-scratch_buffer_grow_preserve.lo -MD -MP -MF malloc/$(DEPDIR)/libgnu_la-scratch_buffer_grow_preserve.Tpo -c -o malloc/libgnu_la-scratch_buffer_grow_preserve.lo `test -f 'malloc/scratch_buffer_grow_preserve.c' || echo '$(srcdir)/'`malloc/scratch_buffer_grow_preserve.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) malloc/$(DEPDIR)/libgnu_la-scratch_buffer_grow_preserve.Tpo malloc/$(DEPDIR)/libgnu_la-scratch_buffer_grow_preserve.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='malloc/scratch_buffer_grow_preserve.c' object='malloc/libgnu_la-scratch_buffer_grow_preserve.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgnu_la_CFLAGS) $(CFLAGS) -c -o malloc/libgnu_la-scratch_buffer_grow_preserve.lo `test -f 'malloc/scratch_buffer_grow_preserve.c' || echo '$(srcdir)/'`malloc/scratch_buffer_grow_preserve.c
-
-malloc/libgnu_la-scratch_buffer_set_array_size.lo: malloc/scratch_buffer_set_array_size.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgnu_la_CFLAGS) $(CFLAGS) -MT malloc/libgnu_la-scratch_buffer_set_array_size.lo -MD -MP -MF malloc/$(DEPDIR)/libgnu_la-scratch_buffer_set_array_size.Tpo -c -o malloc/libgnu_la-scratch_buffer_set_array_size.lo `test -f 'malloc/scratch_buffer_set_array_size.c' || echo '$(srcdir)/'`malloc/scratch_buffer_set_array_size.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) malloc/$(DEPDIR)/libgnu_la-scratch_buffer_set_array_size.Tpo malloc/$(DEPDIR)/libgnu_la-scratch_buffer_set_array_size.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='malloc/scratch_buffer_set_array_size.c' object='malloc/libgnu_la-scratch_buffer_set_array_size.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgnu_la_CFLAGS) $(CFLAGS) -c -o malloc/libgnu_la-scratch_buffer_set_array_size.lo `test -f 'malloc/scratch_buffer_set_array_size.c' || echo '$(srcdir)/'`malloc/scratch_buffer_set_array_size.c
-
libgnu_la-select.lo: select.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgnu_la_CFLAGS) $(CFLAGS) -MT libgnu_la-select.lo -MD -MP -MF $(DEPDIR)/libgnu_la-select.Tpo -c -o libgnu_la-select.lo `test -f 'select.c' || echo '$(srcdir)/'`select.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgnu_la-select.Tpo $(DEPDIR)/libgnu_la-select.Plo
@@ -4183,13 +4240,6 @@ libgnu_la-calloc.lo: calloc.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgnu_la_CFLAGS) $(CFLAGS) -c -o libgnu_la-calloc.lo `test -f 'calloc.c' || echo '$(srcdir)/'`calloc.c
-malloc/libgnu_la-dynarray-skeleton.lo: malloc/dynarray-skeleton.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgnu_la_CFLAGS) $(CFLAGS) -MT malloc/libgnu_la-dynarray-skeleton.lo -MD -MP -MF malloc/$(DEPDIR)/libgnu_la-dynarray-skeleton.Tpo -c -o malloc/libgnu_la-dynarray-skeleton.lo `test -f 'malloc/dynarray-skeleton.c' || echo '$(srcdir)/'`malloc/dynarray-skeleton.c
-@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) malloc/$(DEPDIR)/libgnu_la-dynarray-skeleton.Tpo malloc/$(DEPDIR)/libgnu_la-dynarray-skeleton.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='malloc/dynarray-skeleton.c' object='malloc/libgnu_la-dynarray-skeleton.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgnu_la_CFLAGS) $(CFLAGS) -c -o malloc/libgnu_la-dynarray-skeleton.lo `test -f 'malloc/dynarray-skeleton.c' || echo '$(srcdir)/'`malloc/dynarray-skeleton.c
-
libgnu_la-fnmatch.lo: fnmatch.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgnu_la_CFLAGS) $(CFLAGS) -MT libgnu_la-fnmatch.lo -MD -MP -MF $(DEPDIR)/libgnu_la-fnmatch.Tpo -c -o libgnu_la-fnmatch.lo `test -f 'fnmatch.c' || echo '$(srcdir)/'`fnmatch.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgnu_la-fnmatch.Tpo $(DEPDIR)/libgnu_la-fnmatch.Plo
@@ -4218,6 +4268,13 @@ libgnu_la-at-func.lo: at-func.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgnu_la_CFLAGS) $(CFLAGS) -c -o libgnu_la-at-func.lo `test -f 'at-func.c' || echo '$(srcdir)/'`at-func.c
+malloc/libgnu_la-dynarray-skeleton.lo: malloc/dynarray-skeleton.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgnu_la_CFLAGS) $(CFLAGS) -MT malloc/libgnu_la-dynarray-skeleton.lo -MD -MP -MF malloc/$(DEPDIR)/libgnu_la-dynarray-skeleton.Tpo -c -o malloc/libgnu_la-dynarray-skeleton.lo `test -f 'malloc/dynarray-skeleton.c' || echo '$(srcdir)/'`malloc/dynarray-skeleton.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) malloc/$(DEPDIR)/libgnu_la-dynarray-skeleton.Tpo malloc/$(DEPDIR)/libgnu_la-dynarray-skeleton.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='malloc/dynarray-skeleton.c' object='malloc/libgnu_la-dynarray-skeleton.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgnu_la_CFLAGS) $(CFLAGS) -c -o malloc/libgnu_la-dynarray-skeleton.lo `test -f 'malloc/dynarray-skeleton.c' || echo '$(srcdir)/'`malloc/dynarray-skeleton.c
+
libgnu_la-malloc.lo: malloc.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgnu_la_CFLAGS) $(CFLAGS) -MT libgnu_la-malloc.lo -MD -MP -MF $(DEPDIR)/libgnu_la-malloc.Tpo -c -o libgnu_la-malloc.lo `test -f 'malloc.c' || echo '$(srcdir)/'`malloc.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgnu_la-malloc.Tpo $(DEPDIR)/libgnu_la-malloc.Plo
@@ -4770,7 +4827,6 @@ distclean: distclean-recursive
-rm -f malloc/$(DEPDIR)/libgnu_la-dynarray_finalize.Plo
-rm -f malloc/$(DEPDIR)/libgnu_la-dynarray_resize.Plo
-rm -f malloc/$(DEPDIR)/libgnu_la-dynarray_resize_clear.Plo
- -rm -f malloc/$(DEPDIR)/libgnu_la-scratch_buffer_dupfree.Plo
-rm -f malloc/$(DEPDIR)/libgnu_la-scratch_buffer_grow.Plo
-rm -f malloc/$(DEPDIR)/libgnu_la-scratch_buffer_grow_preserve.Plo
-rm -f malloc/$(DEPDIR)/libgnu_la-scratch_buffer_set_array_size.Plo
@@ -5028,7 +5084,6 @@ maintainer-clean: maintainer-clean-recursive
-rm -f malloc/$(DEPDIR)/libgnu_la-dynarray_finalize.Plo
-rm -f malloc/$(DEPDIR)/libgnu_la-dynarray_resize.Plo
-rm -f malloc/$(DEPDIR)/libgnu_la-dynarray_resize_clear.Plo
- -rm -f malloc/$(DEPDIR)/libgnu_la-scratch_buffer_dupfree.Plo
-rm -f malloc/$(DEPDIR)/libgnu_la-scratch_buffer_grow.Plo
-rm -f malloc/$(DEPDIR)/libgnu_la-scratch_buffer_grow_preserve.Plo
-rm -f malloc/$(DEPDIR)/libgnu_la-scratch_buffer_set_array_size.Plo
@@ -5083,6 +5138,25 @@ uninstall-am:
@GL_GENERATE_ALLOCA_H_FALSE@alloca.h: $(top_builddir)/config.status
@GL_GENERATE_ALLOCA_H_FALSE@ rm -f $@
+# We need the following in order to create <assert.h> when the system
+# doesn't have one that works with the given compiler.
+@GL_GENERATE_ASSERT_H_TRUE@assert.h: assert.in.h verify.h $(top_builddir)/config.status
+@GL_GENERATE_ASSERT_H_TRUE@ $(gl_V_at){ $(SED_HEADER_STDOUT) \
+@GL_GENERATE_ASSERT_H_TRUE@ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+@GL_GENERATE_ASSERT_H_TRUE@ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+@GL_GENERATE_ASSERT_H_TRUE@ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+@GL_GENERATE_ASSERT_H_TRUE@ -e 's|@''NEXT_ASSERT_H''@|$(NEXT_ASSERT_H)|g' \
+@GL_GENERATE_ASSERT_H_TRUE@ < $(srcdir)/assert.in.h && \
+@GL_GENERATE_ASSERT_H_TRUE@ sed -e '/@assert.h omit start@/,/@assert.h omit end@/d' \
+@GL_GENERATE_ASSERT_H_TRUE@ -e 's|_gl_verify|_gl_static_assert|g' \
+@GL_GENERATE_ASSERT_H_TRUE@ -e 's|_GL_VERIFY|_GL_STATIC_ASSERT|g' \
+@GL_GENERATE_ASSERT_H_TRUE@ -e 's|_GL\(_STATIC_ASSERT_H\)|_GL\1|g' \
+@GL_GENERATE_ASSERT_H_TRUE@ < $(srcdir)/verify.h; \
+@GL_GENERATE_ASSERT_H_TRUE@ } > $@-t
+@GL_GENERATE_ASSERT_H_TRUE@ $(AM_V_at)mv $@-t $@
+@GL_GENERATE_ASSERT_H_FALSE@assert.h: $(top_builddir)/config.status
+@GL_GENERATE_ASSERT_H_FALSE@ rm -f $@
+
# We need the following in order to create <ctype.h> when the system
# doesn't have one that works with the given compiler.
ctype.h: ctype.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H)
@@ -5109,6 +5183,7 @@ dirent.h: dirent.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_DIRENT_H''@|$(NEXT_DIRENT_H)|g' \
+ -e 's/@''DIR_HAS_FD_MEMBER''@/$(DIR_HAS_FD_MEMBER)/g' \
-e 's/@''GNULIB_OPENDIR''@/$(GL_GNULIB_OPENDIR)/g' \
-e 's/@''GNULIB_READDIR''@/$(GL_GNULIB_READDIR)/g' \
-e 's/@''GNULIB_REWINDDIR''@/$(GL_GNULIB_REWINDDIR)/g' \
@@ -5127,6 +5202,8 @@ dirent.h: dirent.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e 's|@''HAVE_SCANDIR''@|$(HAVE_SCANDIR)|g' \
-e 's|@''HAVE_ALPHASORT''@|$(HAVE_ALPHASORT)|g' \
-e 's|@''REPLACE_OPENDIR''@|$(REPLACE_OPENDIR)|g' \
+ -e 's|@''REPLACE_READDIR''@|$(REPLACE_READDIR)|g' \
+ -e 's|@''REPLACE_REWINDDIR''@|$(REPLACE_REWINDDIR)|g' \
-e 's|@''REPLACE_CLOSEDIR''@|$(REPLACE_CLOSEDIR)|g' \
-e 's|@''REPLACE_DIRFD''@|$(REPLACE_DIRFD)|g' \
-e 's|@''REPLACE_FDOPENDIR''@|$(REPLACE_FDOPENDIR)|g' \
@@ -5136,25 +5213,6 @@ dirent.h: dirent.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
$(srcdir)/dirent.in.h > $@-t
$(AM_V_at)mv $@-t $@
-malloc/dynarray.gl.h: malloc/dynarray.h
- $(AM_V_GEN)$(MKDIR_P) 'malloc'
- $(AM_V_at)$(SED_HEADER_STDOUT) \
- -e '/libc_hidden_proto/d' \
- $(srcdir)/malloc/dynarray.h > $@-t
- $(AM_V_at)mv $@-t $@
-
-malloc/dynarray-skeleton.gl.h: malloc/dynarray-skeleton.c
- $(AM_V_GEN)$(MKDIR_P) 'malloc'
- $(AM_V_at)$(SED_HEADER_STDOUT) \
- -e 's|<malloc/dynarray\.h>|<malloc/dynarray.gl.h>|g' \
- -e 's|__attribute_maybe_unused__|_GL_ATTRIBUTE_MAYBE_UNUSED|g' \
- -e 's|__attribute_nonnull__|_GL_ATTRIBUTE_NONNULL|g' \
- -e 's|__attribute_warn_unused_result__|_GL_ATTRIBUTE_NODISCARD|g' \
- -e 's|__glibc_likely|_GL_LIKELY|g' \
- -e 's|__glibc_unlikely|_GL_UNLIKELY|g' \
- $(srcdir)/malloc/dynarray-skeleton.c > $@-t
- $(AM_V_at)mv $@-t $@
-
# We need the following in order to create <errno.h> when the system
# doesn't have one that is POSIX compliant.
@GL_GENERATE_ERRNO_H_TRUE@errno.h: errno.in.h $(top_builddir)/config.status
@@ -5175,6 +5233,21 @@ malloc/dynarray-skeleton.gl.h: malloc/dynarray-skeleton.c
@GL_GENERATE_ERRNO_H_FALSE@errno.h: $(top_builddir)/config.status
@GL_GENERATE_ERRNO_H_FALSE@ rm -f $@
+# We need the following in order to override <error.h>.
+error.h: error.in.h $(top_builddir)/config.status $(CXXDEFS_H)
+ $(gl_V_at)$(SED_HEADER_STDOUT) \
+ -e 's|@''GUARD_PREFIX''@|GL|g' \
+ -e 's|@''HAVE_ERROR_H''@|$(HAVE_ERROR_H)|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''NEXT_ERROR_H''@|$(NEXT_ERROR_H)|g' \
+ -e 's|@''HAVE_ERROR''@|$(HAVE_ERROR)|g' \
+ -e 's|@''HAVE_ERROR_AT_LINE''@|$(HAVE_ERROR_AT_LINE)|g' \
+ -e 's|@''REPLACE_ERROR''@|$(REPLACE_ERROR)|g' \
+ -e 's|@''REPLACE_ERROR_AT_LINE''@|$(REPLACE_ERROR_AT_LINE)|g' \
+ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+ $(srcdir)/error.in.h > $@-t
+ $(AM_V_at)mv $@-t $@
+
# We need the following in order to create <fcntl.h> when the system
# doesn't have one that works with the given compiler.
fcntl.h: fcntl.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
@@ -5262,6 +5335,35 @@ fcntl.h: fcntl.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
@GL_GENERATE_GETOPT_CDEFS_H_FALSE@getopt-cdefs.h: $(top_builddir)/config.status
@GL_GENERATE_GETOPT_CDEFS_H_FALSE@ rm -f $@
+malloc/dynarray.gl.h: malloc/dynarray.h
+ $(AM_V_GEN)$(MKDIR_P) 'malloc'
+ $(AM_V_at)$(SED_HEADER_STDOUT) \
+ -e '/libc_hidden_proto/d' \
+ $(srcdir)/malloc/dynarray.h > $@-t
+ $(AM_V_at)mv $@-t $@
+
+malloc/dynarray-skeleton.gl.h: malloc/dynarray-skeleton.c
+ $(AM_V_GEN)$(MKDIR_P) 'malloc'
+ $(AM_V_at)$(SED_HEADER_STDOUT) \
+ -e 's|<malloc/dynarray\.h>|<malloc/dynarray.gl.h>|g' \
+ -e 's|__attribute_maybe_unused__|_GL_ATTRIBUTE_MAYBE_UNUSED|g' \
+ -e 's|__attribute_nonnull__|_GL_ATTRIBUTE_NONNULL|g' \
+ -e 's|__attribute_warn_unused_result__|_GL_ATTRIBUTE_NODISCARD|g' \
+ -e 's|__glibc_likely|_GL_LIKELY|g' \
+ -e 's|__glibc_unlikely|_GL_UNLIKELY|g' \
+ $(srcdir)/malloc/dynarray-skeleton.c > $@-t
+ $(AM_V_at)mv $@-t $@
+
+malloc/scratch_buffer.gl.h: malloc/scratch_buffer.h
+ $(AM_V_GEN)$(MKDIR_P) 'malloc'
+ $(AM_V_at)$(SED_HEADER_STDOUT) \
+ -e 's|__always_inline|inline _GL_ATTRIBUTE_ALWAYS_INLINE|g' \
+ -e 's|__glibc_likely|_GL_LIKELY|g' \
+ -e 's|__glibc_unlikely|_GL_UNLIKELY|g' \
+ -e '/libc_hidden_proto/d' \
+ $(srcdir)/malloc/scratch_buffer.h > $@-t
+ $(AM_V_at)mv $@-t $@
+
# We need the following in order to create <glob.h>.
@GL_GENERATE_GLOB_H_TRUE@glob.h: glob.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
@GL_GENERATE_GLOB_H_TRUE@ $(gl_V_at)$(SED_HEADER_STDOUT) \
@@ -5317,6 +5419,8 @@ inttypes.h: inttypes.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_U
-e 's/@''HAVE_DECL_STRTOIMAX''@/$(HAVE_DECL_STRTOIMAX)/g' \
-e 's/@''HAVE_DECL_STRTOUMAX''@/$(HAVE_DECL_STRTOUMAX)/g' \
-e 's/@''HAVE_IMAXDIV_T''@/$(HAVE_IMAXDIV_T)/g' \
+ -e 's/@''REPLACE_IMAXABS''@/$(REPLACE_IMAXABS)/g' \
+ -e 's/@''REPLACE_IMAXDIV''@/$(REPLACE_IMAXDIV)/g' \
-e 's/@''REPLACE_STRTOIMAX''@/$(REPLACE_STRTOIMAX)/g' \
-e 's/@''REPLACE_STRTOUMAX''@/$(REPLACE_STRTOUMAX)/g' \
-e 's/@''INT32_MAX_LT_INTMAX_MAX''@/$(INT32_MAX_LT_INTMAX_MAX)/g' \
@@ -5397,16 +5501,6 @@ locale.h: locale.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
$(srcdir)/locale.in.h > $@-t
$(AM_V_at)mv $@-t $@
-malloc/scratch_buffer.gl.h: malloc/scratch_buffer.h
- $(AM_V_GEN)$(MKDIR_P) 'malloc'
- $(AM_V_at)$(SED_HEADER_STDOUT) \
- -e 's|__always_inline|inline _GL_ATTRIBUTE_ALWAYS_INLINE|g' \
- -e 's|__glibc_likely|_GL_LIKELY|g' \
- -e 's|__glibc_unlikely|_GL_UNLIKELY|g' \
- -e '/libc_hidden_proto/d' \
- $(srcdir)/malloc/scratch_buffer.h > $@-t
- $(AM_V_at)mv $@-t $@
-
# We need the following in order to create <signal.h> when the system
# doesn't have a complete one.
signal.h: signal.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
@@ -5438,14 +5532,6 @@ signal.h: signal.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
$(srcdir)/signal.in.h > $@-t
$(AM_V_at)mv $@-t $@
-# We need the following in order to create <stdalign.h> when the system
-# doesn't have one that works.
-@GL_GENERATE_STDALIGN_H_TRUE@stdalign.h: stdalign.in.h $(top_builddir)/config.status
-@GL_GENERATE_STDALIGN_H_TRUE@ $(gl_V_at)$(SED_HEADER_TO_AT_t) $(srcdir)/stdalign.in.h
-@GL_GENERATE_STDALIGN_H_TRUE@ $(AM_V_at)mv $@-t $@
-@GL_GENERATE_STDALIGN_H_FALSE@stdalign.h: $(top_builddir)/config.status
-@GL_GENERATE_STDALIGN_H_FALSE@ rm -f $@
-
# We need the following in order to create <stdarg.h> when the system
# doesn't have one that works with the given compiler.
@GL_GENERATE_STDARG_H_TRUE@stdarg.h: stdarg.in.h $(top_builddir)/config.status
@@ -5460,15 +5546,14 @@ signal.h: signal.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
@GL_GENERATE_STDARG_H_FALSE@stdarg.h: $(top_builddir)/config.status
@GL_GENERATE_STDARG_H_FALSE@ rm -f $@
-# We need the following in order to create <stdbool.h> when the system
-# doesn't have one that works.
-@GL_GENERATE_STDBOOL_H_TRUE@stdbool.h: stdbool.in.h $(top_builddir)/config.status
-@GL_GENERATE_STDBOOL_H_TRUE@ $(gl_V_at)$(SED_HEADER_STDOUT) \
-@GL_GENERATE_STDBOOL_H_TRUE@ -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' \
-@GL_GENERATE_STDBOOL_H_TRUE@ $(srcdir)/stdbool.in.h > $@-t
-@GL_GENERATE_STDBOOL_H_TRUE@ $(AM_V_at)mv $@-t $@
-@GL_GENERATE_STDBOOL_H_FALSE@stdbool.h: $(top_builddir)/config.status
-@GL_GENERATE_STDBOOL_H_FALSE@ rm -f $@
+# We need the following in order to create <stdckdint.h> when the system
+# doesn't have one that works with the given compiler.
+@GL_GENERATE_STDCKDINT_H_TRUE@stdckdint.h: stdckdint.in.h $(top_builddir)/config.status
+@GL_GENERATE_STDCKDINT_H_TRUE@ $(gl_V_at)$(SED_HEADER_STDOUT) \
+@GL_GENERATE_STDCKDINT_H_TRUE@ $(srcdir)/stdckdint.in.h > $@-t
+@GL_GENERATE_STDCKDINT_H_TRUE@ $(AM_V_at)mv $@-t $@
+@GL_GENERATE_STDCKDINT_H_FALSE@stdckdint.h: $(top_builddir)/config.status
+@GL_GENERATE_STDCKDINT_H_FALSE@ rm -f $@
# We need the following in order to create <stddef.h> when the system
# doesn't have one that works with the given compiler.
@@ -5592,14 +5677,17 @@ stdio.h: stdio.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
-e 's/@''GNULIB_MDA_GETW''@/$(GL_GNULIB_MDA_GETW)/g' \
-e 's/@''GNULIB_MDA_PUTW''@/$(GL_GNULIB_MDA_PUTW)/g' \
-e 's/@''GNULIB_MDA_TEMPNAM''@/$(GL_GNULIB_MDA_TEMPNAM)/g' \
- < $(srcdir)/stdio.in.h | \
- sed -e 's|@''HAVE_DECL_FCLOSEALL''@|$(HAVE_DECL_FCLOSEALL)|g' \
+ < $(srcdir)/stdio.in.h > $@-t1
+ $(AM_V_at)sed \
+ -e 's|@''HAVE_DECL_FCLOSEALL''@|$(HAVE_DECL_FCLOSEALL)|g' \
-e 's|@''HAVE_DECL_FPURGE''@|$(HAVE_DECL_FPURGE)|g' \
-e 's|@''HAVE_DECL_FSEEKO''@|$(HAVE_DECL_FSEEKO)|g' \
-e 's|@''HAVE_DECL_FTELLO''@|$(HAVE_DECL_FTELLO)|g' \
-e 's|@''HAVE_DECL_GETDELIM''@|$(HAVE_DECL_GETDELIM)|g' \
-e 's|@''HAVE_DECL_GETLINE''@|$(HAVE_DECL_GETLINE)|g' \
+ -e 's|@''HAVE_DECL_GETW''@|$(HAVE_DECL_GETW)|g' \
-e 's|@''HAVE_DECL_OBSTACK_PRINTF''@|$(HAVE_DECL_OBSTACK_PRINTF)|g' \
+ -e 's|@''HAVE_DECL_PUTW''@|$(HAVE_DECL_PUTW)|g' \
-e 's|@''HAVE_DECL_SNPRINTF''@|$(HAVE_DECL_SNPRINTF)|g' \
-e 's|@''HAVE_DECL_VSNPRINTF''@|$(HAVE_DECL_VSNPRINTF)|g' \
-e 's|@''HAVE_DPRINTF''@|$(HAVE_DPRINTF)|g' \
@@ -5610,6 +5698,8 @@ stdio.h: stdio.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
-e 's|@''HAVE_RENAMEAT''@|$(HAVE_RENAMEAT)|g' \
-e 's|@''HAVE_VASPRINTF''@|$(HAVE_VASPRINTF)|g' \
-e 's|@''HAVE_VDPRINTF''@|$(HAVE_VDPRINTF)|g' \
+ < $@-t1 > $@-t2
+ $(AM_V_at)sed \
-e 's|@''REPLACE_DPRINTF''@|$(REPLACE_DPRINTF)|g' \
-e 's|@''REPLACE_FCLOSE''@|$(REPLACE_FCLOSE)|g' \
-e 's|@''REPLACE_FDOPEN''@|$(REPLACE_FDOPEN)|g' \
@@ -5647,8 +5737,9 @@ stdio.h: stdio.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
-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)' \
- > $@-t
- $(AM_V_at)mv $@-t $@
+ < $@-t2 > $@-t3
+ $(AM_V_at)rm -f $@-t1 $@-t2
+ $(AM_V_at)mv $@-t3 $@
# We need the following in order to create <stdlib.h> when the system
# doesn't have one that works with the given compiler.
@@ -5668,10 +5759,12 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
-e 's/@''GNULIB_CANONICALIZE_FILE_NAME''@/$(GL_GNULIB_CANONICALIZE_FILE_NAME)/g' \
-e 's/@''GNULIB_FREE_POSIX''@/$(GL_GNULIB_FREE_POSIX)/g' \
-e 's/@''GNULIB_GETLOADAVG''@/$(GL_GNULIB_GETLOADAVG)/g' \
+ -e 's/@''GNULIB_GETPROGNAME''@/$(GL_GNULIB_GETPROGNAME)/g' \
-e 's/@''GNULIB_GETSUBOPT''@/$(GL_GNULIB_GETSUBOPT)/g' \
-e 's/@''GNULIB_GRANTPT''@/$(GL_GNULIB_GRANTPT)/g' \
-e 's/@''GNULIB_MALLOC_GNU''@/$(GL_GNULIB_MALLOC_GNU)/g' \
-e 's/@''GNULIB_MALLOC_POSIX''@/$(GL_GNULIB_MALLOC_POSIX)/g' \
+ -e 's/@''GNULIB_MBSTOWCS''@/$(GL_GNULIB_MBSTOWCS)/g' \
-e 's/@''GNULIB_MBTOWC''@/$(GL_GNULIB_MBTOWC)/g' \
-e 's/@''GNULIB_MKDTEMP''@/$(GL_GNULIB_MKDTEMP)/g' \
-e 's/@''GNULIB_MKOSTEMP''@/$(GL_GNULIB_MKOSTEMP)/g' \
@@ -5708,8 +5801,9 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
-e 's/@''GNULIB_MDA_GCVT''@/$(GL_GNULIB_MDA_GCVT)/g' \
-e 's/@''GNULIB_MDA_MKTEMP''@/$(GL_GNULIB_MDA_MKTEMP)/g' \
-e 's/@''GNULIB_MDA_PUTENV''@/$(GL_GNULIB_MDA_PUTENV)/g' \
- < $(srcdir)/stdlib.in.h | \
- sed -e 's|@''HAVE__EXIT''@|$(HAVE__EXIT)|g' \
+ < $(srcdir)/stdlib.in.h > $@-t1
+ $(AM_V_at)sed \
+ -e 's|@''HAVE__EXIT''@|$(HAVE__EXIT)|g' \
-e 's|@''HAVE_ALIGNED_ALLOC''@|$(HAVE_ALIGNED_ALLOC)|g' \
-e 's|@''HAVE_ATOLL''@|$(HAVE_ATOLL)|g' \
-e 's|@''HAVE_CANONICALIZE_FILE_NAME''@|$(HAVE_CANONICALIZE_FILE_NAME)|g' \
@@ -5717,6 +5811,8 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
-e 's|@''HAVE_DECL_FCVT''@|$(HAVE_DECL_FCVT)|g' \
-e 's|@''HAVE_DECL_GCVT''@|$(HAVE_DECL_GCVT)|g' \
-e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \
+ -e 's|@''HAVE_DECL_PROGRAM_INVOCATION_NAME''@|$(HAVE_DECL_PROGRAM_INVOCATION_NAME)|g' \
+ -e 's|@''HAVE_GETPROGNAME''@|$(HAVE_GETPROGNAME)|g' \
-e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \
-e 's|@''HAVE_GRANTPT''@|$(HAVE_GRANTPT)|g' \
-e 's|@''HAVE_INITSTATE''@|$(HAVE_INITSTATE)|g' \
@@ -5752,17 +5848,28 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
-e 's|@''HAVE_SYS_LOADAVG_H''@|$(HAVE_SYS_LOADAVG_H)|g' \
-e 's|@''HAVE_UNLOCKPT''@|$(HAVE_UNLOCKPT)|g' \
-e 's|@''HAVE_DECL_UNSETENV''@|$(HAVE_DECL_UNSETENV)|g' \
+ < $@-t1 > $@-t2
+ $(AM_V_at)sed \
+ -e 's|@''REPLACE__EXIT''@|$(REPLACE__EXIT)|g' \
-e 's|@''REPLACE_ALIGNED_ALLOC''@|$(REPLACE_ALIGNED_ALLOC)|g' \
-e 's|@''REPLACE_CALLOC_FOR_CALLOC_GNU''@|$(REPLACE_CALLOC_FOR_CALLOC_GNU)|g' \
-e 's|@''REPLACE_CALLOC_FOR_CALLOC_POSIX''@|$(REPLACE_CALLOC_FOR_CALLOC_POSIX)|g' \
-e 's|@''REPLACE_CANONICALIZE_FILE_NAME''@|$(REPLACE_CANONICALIZE_FILE_NAME)|g' \
-e 's|@''REPLACE_FREE''@|$(REPLACE_FREE)|g' \
+ -e 's|@''REPLACE_GETLOADAVG''@|$(REPLACE_GETLOADAVG)|g' \
+ -e 's|@''REPLACE_GETPROGNAME''@|$(REPLACE_GETPROGNAME)|g' \
+ -e 's|@''REPLACE_GETSUBOPT''@|$(REPLACE_GETSUBOPT)|g' \
-e 's|@''REPLACE_INITSTATE''@|$(REPLACE_INITSTATE)|g' \
-e 's|@''REPLACE_MALLOC_FOR_MALLOC_GNU''@|$(REPLACE_MALLOC_FOR_MALLOC_GNU)|g' \
-e 's|@''REPLACE_MALLOC_FOR_MALLOC_POSIX''@|$(REPLACE_MALLOC_FOR_MALLOC_POSIX)|g' \
+ -e 's|@''REPLACE_MB_CUR_MAX''@|$(REPLACE_MB_CUR_MAX)|g' \
+ -e 's|@''REPLACE_MBSTOWCS''@|$(REPLACE_MBSTOWCS)|g' \
-e 's|@''REPLACE_MBTOWC''@|$(REPLACE_MBTOWC)|g' \
+ -e 's|@''REPLACE_MKOSTEMP''@|$(REPLACE_MKOSTEMP)|g' \
+ -e 's|@''REPLACE_MKOSTEMPS''@|$(REPLACE_MKOSTEMPS)|g' \
-e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \
-e 's|@''REPLACE_POSIX_MEMALIGN''@|$(REPLACE_POSIX_MEMALIGN)|g' \
+ -e 's|@''REPLACE_POSIX_OPENPT''@|$(REPLACE_POSIX_OPENPT)|g' \
-e 's|@''REPLACE_PTSNAME''@|$(REPLACE_PTSNAME)|g' \
-e 's|@''REPLACE_PTSNAME_R''@|$(REPLACE_PTSNAME_R)|g' \
-e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \
@@ -5787,8 +5894,9 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
-e '/definition of _Noreturn/r $(_NORETURN_H)' \
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
- > $@-t
- $(AM_V_at)mv $@-t $@
+ < $@-t2 > $@-t3
+ $(AM_V_at)rm -f $@-t1 $@-t2
+ $(AM_V_at)mv $@-t3 $@
# We need the following in order to create <string.h> when the system
# doesn't have one that works with the given compiler.
@@ -5820,6 +5928,7 @@ string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e 's/@''GNULIB_MEMMEM''@/$(GL_GNULIB_MEMMEM)/g' \
-e 's/@''GNULIB_MEMPCPY''@/$(GL_GNULIB_MEMPCPY)/g' \
-e 's/@''GNULIB_MEMRCHR''@/$(GL_GNULIB_MEMRCHR)/g' \
+ -e 's/@''GNULIB_MEMSET_EXPLICIT''@/$(GL_GNULIB_MEMSET_EXPLICIT)/g' \
-e 's/@''GNULIB_RAWMEMCHR''@/$(GL_GNULIB_RAWMEMCHR)/g' \
-e 's/@''GNULIB_STPCPY''@/$(GL_GNULIB_STPCPY)/g' \
-e 's/@''GNULIB_STPNCPY''@/$(GL_GNULIB_STPNCPY)/g' \
@@ -5843,14 +5952,16 @@ string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e 's/@''GNULIB_MDA_MEMCCPY''@/$(GL_GNULIB_MDA_MEMCCPY)/g' \
-e 's/@''GNULIB_MDA_STRDUP''@/$(GL_GNULIB_MDA_STRDUP)/g' \
-e 's/@''GNULIB_FREE_POSIX''@/$(GL_GNULIB_FREE_POSIX)/g' \
- < $(srcdir)/string.in.h | \
- sed -e 's|@''HAVE_EXPLICIT_BZERO''@|$(HAVE_EXPLICIT_BZERO)|g' \
+ < $(srcdir)/string.in.h > $@-t1
+ $(AM_V_at)sed \
+ -e 's|@''HAVE_EXPLICIT_BZERO''@|$(HAVE_EXPLICIT_BZERO)|g' \
-e 's|@''HAVE_FFSL''@|$(HAVE_FFSL)|g' \
-e 's|@''HAVE_FFSLL''@|$(HAVE_FFSLL)|g' \
-e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \
-e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \
-e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \
-e 's|@''HAVE_DECL_MEMRCHR''@|$(HAVE_DECL_MEMRCHR)|g' \
+ -e 's|@''HAVE_MEMSET_EXPLICIT''@|$(HAVE_MEMSET_EXPLICIT)|g' \
-e 's|@''HAVE_RAWMEMCHR''@|$(HAVE_RAWMEMCHR)|g' \
-e 's|@''HAVE_STPCPY''@|$(HAVE_STPCPY)|g' \
-e 's|@''HAVE_STPNCPY''@|$(HAVE_STPNCPY)|g' \
@@ -5871,7 +5982,9 @@ string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e 's|@''REPLACE_FFSLL''@|$(REPLACE_FFSLL)|g' \
-e 's|@''REPLACE_MEMCHR''@|$(REPLACE_MEMCHR)|g' \
-e 's|@''REPLACE_MEMMEM''@|$(REPLACE_MEMMEM)|g' \
+ -e 's|@''REPLACE_MEMPCPY''@|$(REPLACE_MEMPCPY)|g' \
-e 's|@''REPLACE_FREE''@|$(REPLACE_FREE)|g' \
+ -e 's|@''REPLACE_STPCPY''@|$(REPLACE_STPCPY)|g' \
-e 's|@''REPLACE_STPNCPY''@|$(REPLACE_STPNCPY)|g' \
-e 's|@''REPLACE_STRCHRNUL''@|$(REPLACE_STRCHRNUL)|g' \
-e 's|@''REPLACE_STRDUP''@|$(REPLACE_STRDUP)|g' \
@@ -5889,8 +6002,9 @@ string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-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)' \
- > $@-t
- $(AM_V_at)mv $@-t $@
+ < $@-t1 > $@-t2
+ $(AM_V_at)rm -f $@-t1
+ $(AM_V_at)mv $@-t2 $@
# We need the following in order to create <strings.h> when the system
# doesn't have one that works with the given compiler.
@@ -6192,6 +6306,7 @@ time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(
-e 's/@''GNULIB_NANOSLEEP''@/$(GL_GNULIB_NANOSLEEP)/g' \
-e 's/@''GNULIB_STRFTIME''@/$(GL_GNULIB_STRFTIME)/g' \
-e 's/@''GNULIB_STRPTIME''@/$(GL_GNULIB_STRPTIME)/g' \
+ -e 's/@''GNULIB_TIME''@/$(GL_GNULIB_TIME)/g' \
-e 's/@''GNULIB_TIMEGM''@/$(GL_GNULIB_TIMEGM)/g' \
-e 's/@''GNULIB_TIMESPEC_GET''@/$(GL_GNULIB_TIMESPEC_GET)/g' \
-e 's/@''GNULIB_TIMESPEC_GETRES''@/$(GL_GNULIB_TIMESPEC_GETRES)/g' \
@@ -6213,7 +6328,9 @@ time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(
-e 's|@''REPLACE_MKTIME''@|$(REPLACE_MKTIME)|g' \
-e 's|@''REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \
-e 's|@''REPLACE_STRFTIME''@|$(REPLACE_STRFTIME)|g' \
+ -e 's|@''REPLACE_TIME''@|$(REPLACE_TIME)|g' \
-e 's|@''REPLACE_TIMEGM''@|$(REPLACE_TIMEGM)|g' \
+ -e 's|@''REPLACE_TIMESPEC_GET''@|$(REPLACE_TIMESPEC_GET)|g' \
-e 's|@''REPLACE_TZSET''@|$(REPLACE_TZSET)|g' \
-e 's|@''PTHREAD_H_DEFINES_STRUCT_TIMESPEC''@|$(PTHREAD_H_DEFINES_STRUCT_TIMESPEC)|g' \
-e 's|@''SYS_TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(SYS_TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \
@@ -6260,6 +6377,8 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e 's/@''GNULIB_FDATASYNC''@/$(GL_GNULIB_FDATASYNC)/g' \
-e 's/@''GNULIB_FSYNC''@/$(GL_GNULIB_FSYNC)/g' \
-e 's/@''GNULIB_FTRUNCATE''@/$(GL_GNULIB_FTRUNCATE)/g' \
+ < $(srcdir)/unistd.in.h > $@-t1
+ $(AM_V_at)sed \
-e 's/@''GNULIB_GETCWD''@/$(GL_GNULIB_GETCWD)/g' \
-e 's/@''GNULIB_GETDOMAINNAME''@/$(GL_GNULIB_GETDOMAINNAME)/g' \
-e 's/@''GNULIB_GETDTABLESIZE''@/$(GL_GNULIB_GETDTABLESIZE)/g' \
@@ -6321,8 +6440,9 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e 's/@''GNULIB_MDA_SWAB''@/$(GL_GNULIB_MDA_SWAB)/g' \
-e 's/@''GNULIB_MDA_UNLINK''@/$(GL_GNULIB_MDA_UNLINK)/g' \
-e 's/@''GNULIB_MDA_WRITE''@/$(GL_GNULIB_MDA_WRITE)/g' \
- < $(srcdir)/unistd.in.h | \
- sed -e 's|@''HAVE_CHOWN''@|$(HAVE_CHOWN)|g' \
+ < $@-t1 > $@-t2
+ $(AM_V_at)sed \
+ -e 's|@''HAVE_CHOWN''@|$(HAVE_CHOWN)|g' \
-e 's|@''HAVE_COPY_FILE_RANGE''@|$(HAVE_COPY_FILE_RANGE)|g' \
-e 's|@''HAVE_DUP3''@|$(HAVE_DUP3)|g' \
-e 's|@''HAVE_EUIDACCESS''@|$(HAVE_EUIDACCESS)|g' \
@@ -6369,13 +6489,15 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e 's|@''HAVE_DECL_TTYNAME_R''@|$(HAVE_DECL_TTYNAME_R)|g' \
-e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \
-e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \
- | \
- sed -e 's|@''REPLACE_ACCESS''@|$(REPLACE_ACCESS)|g' \
+ < $@-t2 > $@-t3
+ $(AM_V_at)sed \
+ -e 's|@''REPLACE_ACCESS''@|$(REPLACE_ACCESS)|g' \
-e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \
-e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \
-e 's|@''REPLACE_COPY_FILE_RANGE''@|$(REPLACE_COPY_FILE_RANGE)|g' \
-e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \
-e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \
+ -e 's|@''REPLACE_DUP3''@|$(REPLACE_DUP3)|g' \
-e 's|@''REPLACE_EXECL''@|$(REPLACE_EXECL)|g' \
-e 's|@''REPLACE_EXECLE''@|$(REPLACE_EXECLE)|g' \
-e 's|@''REPLACE_EXECLP''@|$(REPLACE_EXECLP)|g' \
@@ -6385,10 +6507,12 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e 's|@''REPLACE_EXECVPE''@|$(REPLACE_EXECVPE)|g' \
-e 's|@''REPLACE_FACCESSAT''@|$(REPLACE_FACCESSAT)|g' \
-e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \
+ -e 's|@''REPLACE_FDATASYNC''@|$(REPLACE_FDATASYNC)|g' \
-e 's|@''REPLACE_FTRUNCATE''@|$(REPLACE_FTRUNCATE)|g' \
-e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \
-e 's|@''REPLACE_GETDOMAINNAME''@|$(REPLACE_GETDOMAINNAME)|g' \
-e 's|@''REPLACE_GETDTABLESIZE''@|$(REPLACE_GETDTABLESIZE)|g' \
+ -e 's|@''REPLACE_GETENTROPY''@|$(REPLACE_GETENTROPY)|g' \
-e 's|@''REPLACE_GETLOGIN_R''@|$(REPLACE_GETLOGIN_R)|g' \
-e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \
-e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \
@@ -6399,12 +6523,14 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e 's|@''REPLACE_LINK''@|$(REPLACE_LINK)|g' \
-e 's|@''REPLACE_LINKAT''@|$(REPLACE_LINKAT)|g' \
-e 's|@''REPLACE_LSEEK''@|$(REPLACE_LSEEK)|g' \
+ -e 's|@''REPLACE_PIPE2''@|$(REPLACE_PIPE2)|g' \
-e 's|@''REPLACE_PREAD''@|$(REPLACE_PREAD)|g' \
-e 's|@''REPLACE_PWRITE''@|$(REPLACE_PWRITE)|g' \
-e 's|@''REPLACE_READ''@|$(REPLACE_READ)|g' \
-e 's|@''REPLACE_READLINK''@|$(REPLACE_READLINK)|g' \
-e 's|@''REPLACE_READLINKAT''@|$(REPLACE_READLINKAT)|g' \
-e 's|@''REPLACE_RMDIR''@|$(REPLACE_RMDIR)|g' \
+ -e 's|@''REPLACE_SETHOSTNAME''@|$(REPLACE_SETHOSTNAME)|g' \
-e 's|@''REPLACE_SLEEP''@|$(REPLACE_SLEEP)|g' \
-e 's|@''REPLACE_SYMLINK''@|$(REPLACE_SYMLINK)|g' \
-e 's|@''REPLACE_SYMLINKAT''@|$(REPLACE_SYMLINKAT)|g' \
@@ -6420,8 +6546,9 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-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)' \
- > $@-t
- $(AM_V_at)mv $@-t $@
+ < $@-t3 > $@-t4
+ $(AM_V_at)rm -f $@-t1 $@-t2 $@-t3
+ $(AM_V_at)mv $@-t4 $@
# We need the following in order to create <utime.h> when the system
# doesn't have one that works with the given compiler.
@@ -6499,8 +6626,9 @@ wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
-e 's/@''GNULIB_WCSFTIME''@/$(GL_GNULIB_WCSFTIME)/g' \
-e 's/@''GNULIB_MDA_WCSDUP''@/$(GL_GNULIB_MDA_WCSDUP)/g' \
-e 's/@''GNULIB_FREE_POSIX''@/$(GL_GNULIB_FREE_POSIX)/g' \
- < $(srcdir)/wchar.in.h | \
- sed -e 's|@''HAVE_WINT_T''@|$(HAVE_WINT_T)|g' \
+ < $(srcdir)/wchar.in.h > $@-t1
+ $(AM_V_at)sed \
+ -e 's|@''HAVE_WINT_T''@|$(HAVE_WINT_T)|g' \
-e 's|@''HAVE_BTOWC''@|$(HAVE_BTOWC)|g' \
-e 's|@''HAVE_MBSINIT''@|$(HAVE_MBSINIT)|g' \
-e 's|@''HAVE_MBRTOWC''@|$(HAVE_MBRTOWC)|g' \
@@ -6543,8 +6671,9 @@ wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
-e 's|@''HAVE_DECL_WCTOB''@|$(HAVE_DECL_WCTOB)|g' \
-e 's|@''HAVE_DECL_WCSDUP''@|$(HAVE_DECL_WCSDUP)|g' \
-e 's|@''HAVE_DECL_WCWIDTH''@|$(HAVE_DECL_WCWIDTH)|g' \
- | \
- sed -e 's|@''REPLACE_MBSTATE_T''@|$(REPLACE_MBSTATE_T)|g' \
+ < $@-t1 > $@-t2
+ $(AM_V_at)sed \
+ -e 's|@''REPLACE_MBSTATE_T''@|$(REPLACE_MBSTATE_T)|g' \
-e 's|@''REPLACE_BTOWC''@|$(REPLACE_BTOWC)|g' \
-e 's|@''REPLACE_WCTOB''@|$(REPLACE_WCTOB)|g' \
-e 's|@''REPLACE_FREE''@|$(REPLACE_FREE)|g' \
@@ -6559,12 +6688,18 @@ wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
-e 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \
-e 's|@''REPLACE_WCSWIDTH''@|$(REPLACE_WCSWIDTH)|g' \
-e 's|@''REPLACE_WCSFTIME''@|$(REPLACE_WCSFTIME)|g' \
+ -e 's|@''REPLACE_WCSCMP''@|$(REPLACE_WCSCMP)|g' \
+ -e 's|@''REPLACE_WCSNCMP''@|$(REPLACE_WCSNCMP)|g' \
+ -e 's|@''REPLACE_WCSSTR''@|$(REPLACE_WCSSTR)|g' \
-e 's|@''REPLACE_WCSTOK''@|$(REPLACE_WCSTOK)|g' \
+ -e 's|@''REPLACE_WMEMCMP''@|$(REPLACE_WMEMCMP)|g' \
+ -e 's|@''REPLACE_WMEMPCPY''@|$(REPLACE_WMEMPCPY)|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)' \
- > $@-t
- $(AM_V_at)mv $@-t $@
+ < $@-t2 > $@-t3
+ $(AM_V_at)rm -f $@-t1 $@-t2
+ $(AM_V_at)mv $@-t3 $@
# We need the following in order to create <wctype.h> when the system
# doesn't have one that works with the given compiler.
diff --git a/gl/lib/_Noreturn.h b/gl/lib/_Noreturn.h
index e914627a..6ecea98b 100644
--- a/gl/lib/_Noreturn.h
+++ b/gl/lib/_Noreturn.h
@@ -1,5 +1,5 @@
/* A C macro for declaring that a function does not return.
- Copyright (C) 2011-2022 Free Software Foundation, Inc.
+ Copyright (C) 2011-2023 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
@@ -26,6 +26,11 @@
AIX system header files and several gnulib header files use precisely
this syntax with 'extern'. */
# define _Noreturn [[noreturn]]
+# elif (defined __clang__ && __clang_major__ < 16 \
+ && defined _GL_WORK_AROUND_LLVM_BUG_59792)
+ /* Compile with -D_GL_WORK_AROUND_LLVM_BUG_59792 to work around
+ that rare LLVM bug, though you may get many false-alarm warnings. */
+# define _Noreturn
# elif ((!defined __cplusplus || defined __clang__) \
&& (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \
|| (!defined __STRICT_ANSI__ \
diff --git a/gl/lib/alloca.in.h b/gl/lib/alloca.in.h
index e2b14613..a1bb3d75 100644
--- a/gl/lib/alloca.in.h
+++ b/gl/lib/alloca.in.h
@@ -1,6 +1,6 @@
/* Memory allocation on the stack.
- Copyright (C) 1995, 1999, 2001-2004, 2006-2022 Free Software Foundation,
+ Copyright (C) 1995, 1999, 2001-2004, 2006-2023 Free Software Foundation,
Inc.
This file is free software: you can redistribute it and/or modify
diff --git a/gl/lib/arg-nonnull.h b/gl/lib/arg-nonnull.h
index e4513efe..9498ae1f 100644
--- a/gl/lib/arg-nonnull.h
+++ b/gl/lib/arg-nonnull.h
@@ -1,5 +1,5 @@
/* A C macro for declaring that specific arguments must not be NULL.
- Copyright (C) 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2009-2023 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
diff --git a/gl/lib/argp-ba.c b/gl/lib/argp-ba.c
index 5e43c75d..d0a9e98a 100644
--- a/gl/lib/argp-ba.c
+++ b/gl/lib/argp-ba.c
@@ -1,5 +1,5 @@
/* Default definition for ARGP_PROGRAM_BUG_ADDRESS.
- Copyright (C) 1996-2022 Free Software Foundation, Inc.
+ Copyright (C) 1996-2023 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
diff --git a/gl/lib/argp-eexst.c b/gl/lib/argp-eexst.c
index 2f565d90..305b1294 100644
--- a/gl/lib/argp-eexst.c
+++ b/gl/lib/argp-eexst.c
@@ -1,5 +1,5 @@
/* Default definition for ARGP_ERR_EXIT_STATUS
- Copyright (C) 1997, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2009-2023 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
diff --git a/gl/lib/argp-fmtstream.c b/gl/lib/argp-fmtstream.c
index 78c29e38..7febb76c 100644
--- a/gl/lib/argp-fmtstream.c
+++ b/gl/lib/argp-fmtstream.c
@@ -1,5 +1,5 @@
/* Word-wrapping and line-truncating streams
- Copyright (C) 1997-2022 Free Software Foundation, Inc.
+ Copyright (C) 1997-2023 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
diff --git a/gl/lib/argp-fmtstream.h b/gl/lib/argp-fmtstream.h
index 0540b563..57385512 100644
--- a/gl/lib/argp-fmtstream.h
+++ b/gl/lib/argp-fmtstream.h
@@ -1,5 +1,5 @@
/* Word-wrapping and line-truncating streams.
- Copyright (C) 1997-2022 Free Software Foundation, Inc.
+ Copyright (C) 1997-2023 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
@@ -24,6 +24,12 @@
#ifndef _ARGP_FMTSTREAM_H
#define _ARGP_FMTSTREAM_H
+/* This file uses _GL_INLINE_HEADER_BEGIN, __GL_INLINE, _GL_ATTRIBUTE_DEALLOC,
+ _GL_ATTRIBUTE_FORMAT. */
+#if !_LIBC && !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
#include <stdio.h>
#include <string.h>
#include <unistd.h>
@@ -187,9 +193,6 @@ extern int __argp_fmtstream_ensure (argp_fmtstream_t __fs, size_t __amount);
#define __argp_fmtstream_point argp_fmtstream_point
#define __argp_fmtstream_update _argp_fmtstream_update
#define __argp_fmtstream_ensure _argp_fmtstream_ensure
-#ifndef _GL_INLINE_HEADER_BEGIN
- #error "Please include config.h first."
-#endif
_GL_INLINE_HEADER_BEGIN
#ifndef ARGP_FS_EI
# define ARGP_FS_EI _GL_INLINE
diff --git a/gl/lib/argp-fs-xinl.c b/gl/lib/argp-fs-xinl.c
index ea037f6d..afa331fc 100644
--- a/gl/lib/argp-fs-xinl.c
+++ b/gl/lib/argp-fs-xinl.c
@@ -1,5 +1,5 @@
/* Real definitions for extern inline functions in argp-fmtstream.h
- Copyright (C) 1997-2022 Free Software Foundation, Inc.
+ Copyright (C) 1997-2023 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
diff --git a/gl/lib/argp-help.c b/gl/lib/argp-help.c
index 397017fc..c509c0c7 100644
--- a/gl/lib/argp-help.c
+++ b/gl/lib/argp-help.c
@@ -1,5 +1,5 @@
/* Hierarchical argument parsing help output
- Copyright (C) 1995-2022 Free Software Foundation, Inc.
+ Copyright (C) 1995-2023 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
@@ -26,7 +26,6 @@
#include <alloca.h>
#include <errno.h>
-#include <stdbool.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
diff --git a/gl/lib/argp-namefrob.h b/gl/lib/argp-namefrob.h
index 9c82ac79..d6ec2951 100644
--- a/gl/lib/argp-namefrob.h
+++ b/gl/lib/argp-namefrob.h
@@ -1,5 +1,5 @@
/* Name frobnication for compiling argp outside of glibc
- Copyright (C) 1997-2022 Free Software Foundation, Inc.
+ Copyright (C) 1997-2023 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
diff --git a/gl/lib/argp-parse.c b/gl/lib/argp-parse.c
index 42027bc1..fb349b06 100644
--- a/gl/lib/argp-parse.c
+++ b/gl/lib/argp-parse.c
@@ -1,5 +1,5 @@
/* Hierarchical argument parsing, layered over getopt
- Copyright (C) 1995-2022 Free Software Foundation, Inc.
+ Copyright (C) 1995-2023 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
@@ -21,7 +21,6 @@
#endif
#include <alloca.h>
-#include <stdalign.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
@@ -261,7 +260,7 @@ struct parser
/* LONG_OPTS is the array of getop long option structures for the union of
all the groups of options. */
struct option *long_opts;
- /* OPT_DATA is the getopt data used for the re-entrant getopt. */
+ /* OPT_DATA is the getopt data used for the reentrant getopt. */
struct _getopt_data opt_data;
/* States of the various parsing groups. */
diff --git a/gl/lib/argp-pin.c b/gl/lib/argp-pin.c
index f9cb45a9..76006cb7 100644
--- a/gl/lib/argp-pin.c
+++ b/gl/lib/argp-pin.c
@@ -1,5 +1,5 @@
/* Full and short program names for argp module
- Copyright (C) 2005, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2009-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/argp-pv.c b/gl/lib/argp-pv.c
index 8363032b..1ed7f116 100644
--- a/gl/lib/argp-pv.c
+++ b/gl/lib/argp-pv.c
@@ -1,5 +1,5 @@
/* Default definition for ARGP_PROGRAM_VERSION.
- Copyright (C) 1996-2022 Free Software Foundation, Inc.
+ Copyright (C) 1996-2023 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
diff --git a/gl/lib/argp-pvh.c b/gl/lib/argp-pvh.c
index 70017123..8833d635 100644
--- a/gl/lib/argp-pvh.c
+++ b/gl/lib/argp-pvh.c
@@ -1,5 +1,5 @@
/* Default definition for ARGP_PROGRAM_VERSION_HOOK.
- Copyright (C) 1996-2022 Free Software Foundation, Inc.
+ Copyright (C) 1996-2023 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
diff --git a/gl/lib/argp-xinl.c b/gl/lib/argp-xinl.c
index 90b7d17e..377f2636 100644
--- a/gl/lib/argp-xinl.c
+++ b/gl/lib/argp-xinl.c
@@ -1,5 +1,5 @@
/* Real definitions for extern inline functions in argp.h
- Copyright (C) 1997-2022 Free Software Foundation, Inc.
+ Copyright (C) 1997-2023 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
diff --git a/gl/lib/argp.h b/gl/lib/argp.h
index 8a28488d..241f8802 100644
--- a/gl/lib/argp.h
+++ b/gl/lib/argp.h
@@ -1,5 +1,5 @@
/* Hierarchical argument parsing, layered over getopt.
- Copyright (C) 1995-2022 Free Software Foundation, Inc.
+ Copyright (C) 1995-2023 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
@@ -19,6 +19,11 @@
#ifndef _ARGP_H
#define _ARGP_H
+/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE, _GL_ATTRIBUTE_FORMAT. */
+#if !_LIBC && !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
#include <stdio.h>
#include <ctype.h>
#include <getopt.h>
@@ -402,7 +407,7 @@ struct argp_state
unknown option is present, ARGP_ERR_UNKNOWN is returned; if some parser
routine returned a non-zero value, it is returned; otherwise 0 is
returned. This function may also call exit unless the ARGP_NO_HELP flag
- is set. INPUT is a pointer to a value to be passed in to the parser. */
+ is set. INPUT is a pointer to a value to be passed to the parser. */
extern error_t argp_parse (const struct argp *__restrict __argp,
int /*argc*/, char **__restrict /*argv*/,
unsigned __flags, int *__restrict __arg_index,
@@ -590,9 +595,6 @@ extern void *__argp_input (const struct argp *__restrict __argp,
# define __argp_state_help argp_state_help
# define __option_is_short _option_is_short
# define __option_is_end _option_is_end
-#ifndef _GL_INLINE_HEADER_BEGIN
- #error "Please include config.h first."
-#endif
_GL_INLINE_HEADER_BEGIN
# ifndef ARGP_EI
# define ARGP_EI _GL_INLINE
diff --git a/gl/lib/asnprintf.c b/gl/lib/asnprintf.c
index 0c5c76ea..f4861bf8 100644
--- a/gl/lib/asnprintf.c
+++ b/gl/lib/asnprintf.c
@@ -1,5 +1,5 @@
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2006, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/asprintf.c b/gl/lib/asprintf.c
index 9c163f38..ba58e064 100644
--- a/gl/lib/asprintf.c
+++ b/gl/lib/asprintf.c
@@ -1,5 +1,5 @@
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2006-2007, 2009-2022 Free Software Foundation,
+ Copyright (C) 1999, 2002, 2006-2007, 2009-2023 Free Software Foundation,
Inc.
This file is free software: you can redistribute it and/or modify
diff --git a/gl/lib/assert.in.h b/gl/lib/assert.in.h
new file mode 100644
index 00000000..b0ab99c7
--- /dev/null
+++ b/gl/lib/assert.in.h
@@ -0,0 +1,27 @@
+/* Substitute for and wrapper around <assert.h>
+ Copyright (C) 2011-2023 Free Software Foundation, Inc.
+
+ This file is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
+ License, or (at your option) any later version.
+
+ This file 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 Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
+
+/* Do not guard the include, since <assert.h> is supposed to define
+ the assert macro each time it is included. */
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+@PRAGMA_COLUMNS@
+
+#@INCLUDE_NEXT@ @NEXT_ASSERT_H@
+
+/* The definition of static_assert is copied here. */
diff --git a/gl/lib/assure.h b/gl/lib/assure.h
index 20e806aa..e31076d9 100644
--- a/gl/lib/assure.h
+++ b/gl/lib/assure.h
@@ -1,6 +1,6 @@
/* Run-time assert-like macros.
- Copyright (C) 2014-2022 Free Software Foundation, Inc.
+ Copyright (C) 2014-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/at-func.c b/gl/lib/at-func.c
index afcc819b..13e3fb32 100644
--- a/gl/lib/at-func.c
+++ b/gl/lib/at-func.c
@@ -1,5 +1,5 @@
/* Define at-style functions like fstatat, unlinkat, fchownat, etc.
- Copyright (C) 2006, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2023 Free Software Foundation, Inc.
This 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/gl/lib/at-func2.c b/gl/lib/at-func2.c
index 8a0882e2..bea7ea6c 100644
--- a/gl/lib/at-func2.c
+++ b/gl/lib/at-func2.c
@@ -1,5 +1,5 @@
/* Define 2-FD at-style functions like linkat or renameat.
- Copyright (C) 2006, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2023 Free Software Foundation, Inc.
This 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/gl/lib/attribute.h b/gl/lib/attribute.h
index 378d4f0a..9464fde0 100644
--- a/gl/lib/attribute.h
+++ b/gl/lib/attribute.h
@@ -1,6 +1,6 @@
/* ATTRIBUTE_* macros for using attributes in GCC and similar compilers
- Copyright 2020-2022 Free Software Foundation, Inc.
+ Copyright 2020-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -32,7 +32,7 @@
/* This file defines two types of attributes:
- * C2x standard attributes. These have macro names that do not begin with
+ * C23 standard attributes. These have macro names that do not begin with
'ATTRIBUTE_'.
* Selected GCC attributes; see:
https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html
@@ -41,6 +41,21 @@
These names begin with 'ATTRIBUTE_' to avoid name clashes. */
+/* This file uses _GL_ATTRIBUTE_ALLOC_SIZE, _GL_ATTRIBUTE_ALWAYS_INLINE,
+ _GL_ATTRIBUTE_ARTIFICIAL, _GL_ATTRIBUTE_COLD, _GL_ATTRIBUTE_CONST,
+ _GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_DEPRECATED, _GL_ATTRIBUTE_ERROR,
+ _GL_ATTRIBUTE_WARNING, _GL_ATTRIBUTE_EXTERNALLY_VISIBLE,
+ _GL_ATTRIBUTE_FALLTHROUGH, _GL_ATTRIBUTE_FORMAT, _GL_ATTRIBUTE_LEAF,
+ _GL_ATTRIBUTE_MALLOC, _GL_ATTRIBUTE_MAY_ALIAS, _GL_ATTRIBUTE_MAYBE_UNUSED,
+ _GL_ATTRIBUTE_NODISCARD, _GL_ATTRIBUTE_NOINLINE, _GL_ATTRIBUTE_NONNULL,
+ _GL_ATTRIBUTE_NONSTRING, _GL_ATTRIBUTE_NOTHROW, _GL_ATTRIBUTE_PACKED,
+ _GL_ATTRIBUTE_PURE, _GL_ATTRIBUTE_RETURNS_NONNULL,
+ _GL_ATTRIBUTE_SENTINEL. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
+
/* =============== Attributes for specific kinds of functions =============== */
/* Attributes for functions that should not be used. */
diff --git a/gl/lib/basename-lgpl.c b/gl/lib/basename-lgpl.c
index eb07e254..6de60aa6 100644
--- a/gl/lib/basename-lgpl.c
+++ b/gl/lib/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-2022 Free Software
+ Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2023 Free Software
Foundation, Inc.
This file is free software: you can redistribute it and/or modify
@@ -21,7 +21,6 @@
/* Specification. */
#include "basename-lgpl.h"
-#include <stdbool.h>
#include <string.h>
#include "filename.h"
diff --git a/gl/lib/basename-lgpl.h b/gl/lib/basename-lgpl.h
index 5569f219..c1982fa8 100644
--- a/gl/lib/basename-lgpl.h
+++ b/gl/lib/basename-lgpl.h
@@ -1,6 +1,6 @@
/* Extract the last component (base name) of a file name.
- Copyright (C) 1998, 2001, 2003-2006, 2009-2022 Free Software Foundation,
+ Copyright (C) 1998, 2001, 2003-2006, 2009-2023 Free Software Foundation,
Inc.
This file is free software: you can redistribute it and/or modify
@@ -19,6 +19,11 @@
#ifndef _BASENAME_LGPL_H
#define _BASENAME_LGPL_H
+/* This file uses _GL_ATTRIBUTE_PURE. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
#include <stddef.h>
#ifndef DOUBLE_SLASH_IS_DISTINCT_ROOT
diff --git a/gl/lib/basename.c b/gl/lib/basename.c
index 0e372ca5..21fab1ef 100644
--- a/gl/lib/basename.c
+++ b/gl/lib/basename.c
@@ -1,6 +1,6 @@
/* basename.c -- return the last element in a file name
- Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2022 Free Software
+ Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2023 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/lib/bitrotate.c b/gl/lib/bitrotate.c
index 101be6df..180ab15d 100644
--- a/gl/lib/bitrotate.c
+++ b/gl/lib/bitrotate.c
@@ -1,6 +1,6 @@
/* Rotate bits in integers.
- Copyright (C) 2012-2022 Free Software Foundation, Inc.
+ Copyright (C) 2012-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/bitrotate.h b/gl/lib/bitrotate.h
index ee6e61ed..6fb7b495 100644
--- a/gl/lib/bitrotate.h
+++ b/gl/lib/bitrotate.h
@@ -1,5 +1,5 @@
/* bitrotate.h - Rotate bits in integers
- Copyright (C) 2008-2022 Free Software Foundation, Inc.
+ Copyright (C) 2008-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -19,13 +19,15 @@
#ifndef _GL_BITROTATE_H
#define _GL_BITROTATE_H
+/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
#include <limits.h>
#include <stdint.h>
#include <sys/types.h>
-#ifndef _GL_INLINE_HEADER_BEGIN
- #error "Please include config.h first."
-#endif
_GL_INLINE_HEADER_BEGIN
#ifndef BITROTATE_INLINE
# define BITROTATE_INLINE _GL_INLINE
diff --git a/gl/lib/btowc.c b/gl/lib/btowc.c
index 4af58bb0..4defbdda 100644
--- a/gl/lib/btowc.c
+++ b/gl/lib/btowc.c
@@ -1,5 +1,5 @@
/* Convert unibyte character to wide character.
- Copyright (C) 2008, 2010-2022 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2010-2023 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This file is free software: you can redistribute it and/or modify
@@ -22,6 +22,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
wint_t
btowc (int c)
@@ -32,7 +33,14 @@ btowc (int c)
wchar_t wc;
buf[0] = c;
+#if HAVE_MBRTOWC
+ mbstate_t state;
+ memset (&state, 0, sizeof (mbstate_t));
+ size_t ret = mbrtowc (&wc, buf, 1, &state);
+ if (!(ret == (size_t)(-1) || ret == (size_t)(-2)))
+#else
if (mbtowc (&wc, buf, 1) >= 0)
+#endif
return wc;
}
return WEOF;
diff --git a/gl/lib/c++defs.h b/gl/lib/c++defs.h
index ad181558..458c014d 100644
--- a/gl/lib/c++defs.h
+++ b/gl/lib/c++defs.h
@@ -1,5 +1,5 @@
/* C++ compatible function declaration macros.
- Copyright (C) 2010-2022 Free Software Foundation, Inc.
+ Copyright (C) 2010-2023 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
@@ -99,6 +99,12 @@
Example:
_GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...)
_GL_ARG_NONNULL ((1)));
+
+ Note: Attributes, such as _GL_ATTRIBUTE_DEPRECATED, are supported in front
+ of a _GL_FUNCDECL_RPL invocation only in C mode, not in C++ mode. (That's
+ because
+ [[...]] extern "C" <declaration>;
+ is invalid syntax in C++.)
*/
#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \
_GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes)
diff --git a/gl/lib/calloc.c b/gl/lib/calloc.c
index 0a934b30..08843acd 100644
--- a/gl/lib/calloc.c
+++ b/gl/lib/calloc.c
@@ -1,6 +1,6 @@
/* calloc() function that is glibc compatible.
This wrapper function is required at least on Tru64 UNIX 5.1 and mingw.
- Copyright (C) 2004-2007, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2004-2007, 2009-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/canonicalize-lgpl.c b/gl/lib/canonicalize-lgpl.c
index a7fa7feb..e701297d 100644
--- a/gl/lib/canonicalize-lgpl.c
+++ b/gl/lib/canonicalize-lgpl.c
@@ -1,5 +1,5 @@
/* Return the canonical absolute name of a given file.
- Copyright (C) 1996-2022 Free Software Foundation, Inc.
+ Copyright (C) 1996-2023 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
@@ -30,7 +30,6 @@
#include <errno.h>
#include <fcntl.h>
#include <limits.h>
-#include <stdbool.h>
#include <string.h>
#include <sys/stat.h>
#include <unistd.h>
@@ -48,6 +47,7 @@
#else
# define __canonicalize_file_name canonicalize_file_name
# define __realpath realpath
+# define __strdup strdup
# include "pathmax.h"
# define __faccessat faccessat
# if defined _WIN32 && !defined __CYGWIN__
@@ -180,27 +180,16 @@ get_path_max (void)
return path_max < 0 ? 1024 : path_max <= IDX_MAX ? path_max : IDX_MAX;
}
-/* Act like __realpath (see below), with an additional argument
- rname_buf that can be used as temporary storage.
-
- If GCC_LINT is defined, do not inline this function with GCC 10.1
- and later, to avoid creating a pointer to the stack that GCC
- -Wreturn-local-addr incorrectly complains about. See:
- https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93644
- Although the noinline attribute can hurt performance a bit, no better way
- to pacify GCC is known; even an explicit #pragma does not pacify GCC.
- When the GCC bug is fixed this workaround should be limited to the
- broken GCC versions. */
-# if __GNUC_PREREQ (10, 1)
-# if defined GCC_LINT || defined lint
-__attribute__ ((__noinline__))
-# elif __OPTIMIZE__ && !__NO_INLINE__
-# define GCC_BOGUS_WRETURN_LOCAL_ADDR
-# endif
-# endif
+/* Scratch buffers used by realpath_stk and managed by __realpath. */
+struct realpath_bufs
+{
+ struct scratch_buffer rname;
+ struct scratch_buffer extra;
+ struct scratch_buffer link;
+};
+
static char *
-realpath_stk (const char *name, char *resolved,
- struct scratch_buffer *rname_buf)
+realpath_stk (const char *name, char *resolved, struct realpath_bufs *bufs)
{
char *dest;
char const *start;
@@ -225,12 +214,7 @@ realpath_stk (const char *name, char *resolved,
return NULL;
}
- struct scratch_buffer extra_buffer, link_buffer;
- scratch_buffer_init (&extra_buffer);
- scratch_buffer_init (&link_buffer);
- scratch_buffer_init (rname_buf);
- char *rname_on_stack = rname_buf->data;
- char *rname = rname_on_stack;
+ char *rname = bufs->rname.data;
bool end_in_extra_buffer = false;
bool failed = true;
@@ -240,16 +224,16 @@ realpath_stk (const char *name, char *resolved,
if (!IS_ABSOLUTE_FILE_NAME (name))
{
- while (!__getcwd (rname, rname_buf->length))
+ while (!__getcwd (bufs->rname.data, bufs->rname.length))
{
if (errno != ERANGE)
{
dest = rname;
goto error;
}
- if (!scratch_buffer_grow (rname_buf))
- goto error_nomem;
- rname = rname_buf->data;
+ if (!scratch_buffer_grow (&bufs->rname))
+ return NULL;
+ rname = bufs->rname.data;
}
dest = __rawmemchr (rname, '\0');
start = name;
@@ -303,13 +287,13 @@ realpath_stk (const char *name, char *resolved,
if (!ISSLASH (dest[-1]))
*dest++ = '/';
- while (rname + rname_buf->length - dest
+ while (rname + bufs->rname.length - dest
< startlen + sizeof dir_suffix)
{
idx_t dest_offset = dest - rname;
- if (!scratch_buffer_grow_preserve (rname_buf))
- goto error_nomem;
- rname = rname_buf->data;
+ if (!scratch_buffer_grow_preserve (&bufs->rname))
+ return NULL;
+ rname = bufs->rname.data;
dest = rname + dest_offset;
}
@@ -320,13 +304,13 @@ realpath_stk (const char *name, char *resolved,
ssize_t n;
while (true)
{
- buf = link_buffer.data;
- idx_t bufsize = link_buffer.length;
+ buf = bufs->link.data;
+ idx_t bufsize = bufs->link.length;
n = __readlink (rname, buf, bufsize - 1);
if (n < bufsize - 1)
break;
- if (!scratch_buffer_grow (&link_buffer))
- goto error_nomem;
+ if (!scratch_buffer_grow (&bufs->link))
+ return NULL;
}
if (0 <= n)
{
@@ -338,7 +322,7 @@ realpath_stk (const char *name, char *resolved,
buf[n] = '\0';
- char *extra_buf = extra_buffer.data;
+ char *extra_buf = bufs->extra.data;
idx_t end_idx IF_LINT (= 0);
if (end_in_extra_buffer)
end_idx = end - extra_buf;
@@ -346,13 +330,13 @@ realpath_stk (const char *name, char *resolved,
if (INT_ADD_OVERFLOW (len, n))
{
__set_errno (ENOMEM);
- goto error_nomem;
+ return NULL;
}
- while (extra_buffer.length <= len + n)
+ while (bufs->extra.length <= len + n)
{
- if (!scratch_buffer_grow_preserve (&extra_buffer))
- goto error_nomem;
- extra_buf = extra_buffer.data;
+ if (!scratch_buffer_grow_preserve (&bufs->extra))
+ return NULL;
+ extra_buf = bufs->extra.data;
}
if (end_in_extra_buffer)
end = extra_buf + end_idx;
@@ -404,20 +388,30 @@ realpath_stk (const char *name, char *resolved,
error:
*dest++ = '\0';
- if (resolved != NULL && dest - rname <= get_path_max ())
- rname = strcpy (resolved, rname);
-
-error_nomem:
- scratch_buffer_free (&extra_buffer);
- scratch_buffer_free (&link_buffer);
-
- if (failed || rname == resolved)
+ if (resolved != NULL)
+ {
+ /* Copy the full result on success or partial result if failure was due
+ to the path not existing or not being accessible. */
+ if ((!failed || errno == ENOENT || errno == EACCES)
+ && dest - rname <= get_path_max ())
+ {
+ strcpy (resolved, rname);
+ if (failed)
+ return NULL;
+ else
+ return resolved;
+ }
+ if (!failed)
+ __set_errno (ENAMETOOLONG);
+ return NULL;
+ }
+ else
{
- scratch_buffer_free (rname_buf);
- return failed ? NULL : resolved;
+ if (failed)
+ return NULL;
+ else
+ return __strdup (bufs->rname.data);
}
-
- return scratch_buffer_dupfree (rname_buf, dest - rname);
}
/* Return the canonical absolute name of file NAME. A canonical name
@@ -434,12 +428,15 @@ error_nomem:
char *
__realpath (const char *name, char *resolved)
{
- #ifdef GCC_BOGUS_WRETURN_LOCAL_ADDR
- #warning "GCC might issue a bogus -Wreturn-local-addr warning here."
- #warning "See <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93644>."
- #endif
- struct scratch_buffer rname_buffer;
- return realpath_stk (name, resolved, &rname_buffer);
+ struct realpath_bufs bufs;
+ scratch_buffer_init (&bufs.rname);
+ scratch_buffer_init (&bufs.extra);
+ scratch_buffer_init (&bufs.link);
+ char *result = realpath_stk (name, resolved, &bufs);
+ scratch_buffer_free (&bufs.link);
+ scratch_buffer_free (&bufs.extra);
+ scratch_buffer_free (&bufs.rname);
+ return result;
}
libc_hidden_def (__realpath)
versioned_symbol (libc, __realpath, realpath, GLIBC_2_3);
diff --git a/gl/lib/canonicalize.c b/gl/lib/canonicalize.c
index eaf18c6d..d73ee2c8 100644
--- a/gl/lib/canonicalize.c
+++ b/gl/lib/canonicalize.c
@@ -1,5 +1,5 @@
/* Return the canonical absolute name of a given file.
- Copyright (C) 1996-2022 Free Software Foundation, Inc.
+ Copyright (C) 1996-2023 Free Software Foundation, Inc.
This 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,7 +20,6 @@
#include <errno.h>
#include <fcntl.h>
-#include <stdbool.h>
#include <string.h>
#include <sys/stat.h>
#include <unistd.h>
@@ -35,13 +34,6 @@
#include "hash-triple.h"
#include "xalloc.h"
-/* Suppress bogus GCC -Wmaybe-uninitialized warnings. */
-#if defined GCC_LINT || defined lint
-# define IF_LINT(Code) Code
-#else
-# define IF_LINT(Code) /* empty */
-#endif
-
#ifndef DOUBLE_SLASH_IS_DISTINCT_ROOT
# define DOUBLE_SLASH_IS_DISTINCT_ROOT false
#endif
@@ -52,6 +44,11 @@
# define SLASHES "/"
#endif
+/* Avoid false GCC warning "'end_idx' may be used uninitialized". */
+#if __GNUC__ + (__GNUC_MINOR__ >= 7) > 4
+# pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
+#endif
+
/* Return true if FILE's existence can be shown, false (setting errno)
otherwise. Follow symbolic links. */
static bool
@@ -163,28 +160,18 @@ seen_triple (Hash_table **ht, char const *filename, struct stat const *st)
return false;
}
+/* Scratch buffers used by canonicalize_filename_mode_stk and managed
+ by __realpath. */
+struct realpath_bufs
+{
+ struct scratch_buffer rname;
+ struct scratch_buffer extra;
+ struct scratch_buffer link;
+};
-/* Act like canonicalize_filename_mode (see below), with an additional argument
- rname_buf that can be used as temporary storage.
-
- If GCC_LINT is defined, do not inline this function with GCC 10.1
- and later, to avoid creating a pointer to the stack that GCC
- -Wreturn-local-addr incorrectly complains about. See:
- https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93644
- Although the noinline attribute can hurt performance a bit, no better way
- to pacify GCC is known; even an explicit #pragma does not pacify GCC.
- When the GCC bug is fixed this workaround should be limited to the
- broken GCC versions. */
-#if _GL_GNUC_PREREQ (10, 1)
-# if defined GCC_LINT || defined lint
-__attribute__ ((__noinline__))
-# elif __OPTIMIZE__ && !__NO_INLINE__
-# define GCC_BOGUS_WRETURN_LOCAL_ADDR
-# endif
-#endif
static char *
canonicalize_filename_mode_stk (const char *name, canonicalize_mode_t can_mode,
- struct scratch_buffer *rname_buf)
+ struct realpath_bufs *bufs)
{
char *dest;
char const *start;
@@ -212,12 +199,7 @@ canonicalize_filename_mode_stk (const char *name, canonicalize_mode_t can_mode,
return NULL;
}
- struct scratch_buffer extra_buffer, link_buffer;
- scratch_buffer_init (&extra_buffer);
- scratch_buffer_init (&link_buffer);
- scratch_buffer_init (rname_buf);
- char *rname_on_stack = rname_buf->data;
- char *rname = rname_on_stack;
+ char *rname = bufs->rname.data;
bool end_in_extra_buffer = false;
bool failed = true;
@@ -227,12 +209,12 @@ canonicalize_filename_mode_stk (const char *name, canonicalize_mode_t can_mode,
if (!IS_ABSOLUTE_FILE_NAME (name))
{
- while (!getcwd (rname, rname_buf->length))
+ while (!getcwd (bufs->rname.data, bufs->rname.length))
{
switch (errno)
{
case ERANGE:
- if (scratch_buffer_grow (rname_buf))
+ if (scratch_buffer_grow (&bufs->rname))
break;
FALLTHROUGH;
case ENOMEM:
@@ -242,7 +224,7 @@ canonicalize_filename_mode_stk (const char *name, canonicalize_mode_t can_mode,
dest = rname;
goto error;
}
- rname = rname_buf->data;
+ rname = bufs->rname.data;
}
dest = rawmemchr (rname, '\0');
start = name;
@@ -266,7 +248,7 @@ canonicalize_filename_mode_stk (const char *name, canonicalize_mode_t can_mode,
for (i = 2; name[i] != '\0' && !ISSLASH (name[i]); )
i++;
if (name[i] != '\0' /* implies ISSLASH (name[i]) */
- && i + 1 < rname_buf->length)
+ && i + 1 < bufs->rname.length)
{
prefix_len = i;
memcpy (dest, name + 2, i - 2 + 1);
@@ -276,7 +258,7 @@ canonicalize_filename_mode_stk (const char *name, canonicalize_mode_t can_mode,
{
/* Either name = '\\server'; this is an invalid file name.
Or name = '\\server\...' and server is more than
- rname_buf->length - 4 bytes long. In either
+ bufs->rname.length - 4 bytes long. In either
case, stop the UNC processing. */
}
}
@@ -321,13 +303,13 @@ canonicalize_filename_mode_stk (const char *name, canonicalize_mode_t can_mode,
if (!ISSLASH (dest[-1]))
*dest++ = '/';
- while (rname + rname_buf->length - dest
+ while (rname + bufs->rname.length - dest
< startlen + sizeof dir_suffix)
{
idx_t dest_offset = dest - rname;
- if (!scratch_buffer_grow_preserve (rname_buf))
+ if (!scratch_buffer_grow_preserve (&bufs->rname))
xalloc_die ();
- rname = rname_buf->data;
+ rname = bufs->rname.data;
dest = rname + dest_offset;
}
@@ -340,12 +322,12 @@ canonicalize_filename_mode_stk (const char *name, canonicalize_mode_t can_mode,
{
while (true)
{
- buf = link_buffer.data;
- idx_t bufsize = link_buffer.length;
+ buf = bufs->link.data;
+ idx_t bufsize = bufs->link.length;
n = readlink (rname, buf, bufsize - 1);
if (n < bufsize - 1)
break;
- if (!scratch_buffer_grow (&link_buffer))
+ if (!scratch_buffer_grow (&bufs->link))
xalloc_die ();
}
}
@@ -384,18 +366,18 @@ canonicalize_filename_mode_stk (const char *name, canonicalize_mode_t can_mode,
buf[n] = '\0';
- char *extra_buf = extra_buffer.data;
- idx_t end_idx IF_LINT (= 0);
+ char *extra_buf = bufs->extra.data;
+ idx_t end_idx;
if (end_in_extra_buffer)
end_idx = end - extra_buf;
size_t len = strlen (end);
if (INT_ADD_OVERFLOW (len, n))
xalloc_die ();
- while (extra_buffer.length <= len + n)
+ while (bufs->extra.length <= len + n)
{
- if (!scratch_buffer_grow_preserve (&extra_buffer))
+ if (!scratch_buffer_grow_preserve (&bufs->extra))
xalloc_die ();
- extra_buf = extra_buffer.data;
+ extra_buf = bufs->extra.data;
}
if (end_in_extra_buffer)
end = extra_buf + end_idx;
@@ -454,20 +436,15 @@ canonicalize_filename_mode_stk (const char *name, canonicalize_mode_t can_mode,
error:
if (ht)
hash_free (ht);
- scratch_buffer_free (&extra_buffer);
- scratch_buffer_free (&link_buffer);
if (failed)
- {
- scratch_buffer_free (rname_buf);
- return NULL;
- }
+ return NULL;
*dest++ = '\0';
- char *result = scratch_buffer_dupfree (rname_buf, dest - rname);
+ char *result = malloc (dest - rname);
if (!result)
xalloc_die ();
- return result;
+ return memcpy (result, rname, dest - rname);
}
/* Return the canonical absolute name of file NAME, while treating
@@ -480,10 +457,13 @@ error:
char *
canonicalize_filename_mode (const char *name, canonicalize_mode_t can_mode)
{
- #ifdef GCC_BOGUS_WRETURN_LOCAL_ADDR
- #warning "GCC might issue a bogus -Wreturn-local-addr warning here."
- #warning "See <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93644>."
- #endif
- struct scratch_buffer rname_buffer;
- return canonicalize_filename_mode_stk (name, can_mode, &rname_buffer);
+ struct realpath_bufs bufs;
+ scratch_buffer_init (&bufs.rname);
+ scratch_buffer_init (&bufs.extra);
+ scratch_buffer_init (&bufs.link);
+ char *result = canonicalize_filename_mode_stk (name, can_mode, &bufs);
+ scratch_buffer_free (&bufs.link);
+ scratch_buffer_free (&bufs.extra);
+ scratch_buffer_free (&bufs.rname);
+ return result;
}
diff --git a/gl/lib/canonicalize.h b/gl/lib/canonicalize.h
index 817da1fd..ea09c666 100644
--- a/gl/lib/canonicalize.h
+++ b/gl/lib/canonicalize.h
@@ -1,5 +1,5 @@
/* Return the canonical absolute name of a given file.
- Copyright (C) 1996-2007, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 1996-2007, 2009-2023 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -17,6 +17,11 @@
#ifndef CANONICALIZE_H_
# define CANONICALIZE_H_
+/* This file uses _GL_ATTRIBUTE_MALLOC. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
#include <stdlib.h> /* for canonicalize_file_name */
#define CAN_MODE_MASK (CAN_EXISTING | CAN_ALL_BUT_LAST | CAN_MISSING)
diff --git a/gl/lib/cdefs.h b/gl/lib/cdefs.h
index 7b8ed5b3..412f036c 100644
--- a/gl/lib/cdefs.h
+++ b/gl/lib/cdefs.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2022 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2023 Free Software Foundation, Inc.
Copyright The GNU Toolchain Authors.
This file is part of the GNU C Library.
@@ -140,32 +140,37 @@
#endif
+/* Gnulib avoids these definitions, as they don't work on non-glibc platforms.
+ In particular, __bos and __bos0 are defined differently in the Android libc.
+ */
+#ifndef __GNULIB_CDEFS
+
/* Fortify support. */
-#define __bos(ptr) __builtin_object_size (ptr, __USE_FORTIFY_LEVEL > 1)
-#define __bos0(ptr) __builtin_object_size (ptr, 0)
+# define __bos(ptr) __builtin_object_size (ptr, __USE_FORTIFY_LEVEL > 1)
+# define __bos0(ptr) __builtin_object_size (ptr, 0)
/* Use __builtin_dynamic_object_size at _FORTIFY_SOURCE=3 when available. */
-#if __USE_FORTIFY_LEVEL == 3 && (__glibc_clang_prereq (9, 0) \
- || __GNUC_PREREQ (12, 0))
-# define __glibc_objsize0(__o) __builtin_dynamic_object_size (__o, 0)
-# define __glibc_objsize(__o) __builtin_dynamic_object_size (__o, 1)
-#else
-# define __glibc_objsize0(__o) __bos0 (__o)
-# define __glibc_objsize(__o) __bos (__o)
-#endif
+# if __USE_FORTIFY_LEVEL == 3 && (__glibc_clang_prereq (9, 0) \
+ || __GNUC_PREREQ (12, 0))
+# define __glibc_objsize0(__o) __builtin_dynamic_object_size (__o, 0)
+# define __glibc_objsize(__o) __builtin_dynamic_object_size (__o, 1)
+# else
+# define __glibc_objsize0(__o) __bos0 (__o)
+# define __glibc_objsize(__o) __bos (__o)
+# endif
/* Compile time conditions to choose between the regular, _chk and _chk_warn
variants. These conditions should get evaluated to constant and optimized
away. */
-#define __glibc_safe_len_cond(__l, __s, __osz) ((__l) <= (__osz) / (__s))
-#define __glibc_unsigned_or_positive(__l) \
+# define __glibc_safe_len_cond(__l, __s, __osz) ((__l) <= (__osz) / (__s))
+# define __glibc_unsigned_or_positive(__l) \
((__typeof (__l)) 0 < (__typeof (__l)) -1 \
|| (__builtin_constant_p (__l) && (__l) > 0))
/* Length is known to be safe at compile time if the __L * __S <= __OBJSZ
condition can be folded to a constant and if it is true, or unknown (-1) */
-#define __glibc_safe_or_unknown_len(__l, __s, __osz) \
+# define __glibc_safe_or_unknown_len(__l, __s, __osz) \
((__osz) == (__SIZE_TYPE__) -1 \
|| (__glibc_unsigned_or_positive (__l) \
&& __builtin_constant_p (__glibc_safe_len_cond ((__SIZE_TYPE__) (__l), \
@@ -175,7 +180,7 @@
/* Conversely, we know at compile time that the length is unsafe if the
__L * __S <= __OBJSZ condition can be folded to a constant and if it is
false. */
-#define __glibc_unsafe_len(__l, __s, __osz) \
+# define __glibc_unsafe_len(__l, __s, __osz) \
(__glibc_unsigned_or_positive (__l) \
&& __builtin_constant_p (__glibc_safe_len_cond ((__SIZE_TYPE__) (__l), \
__s, __osz)) \
@@ -184,7 +189,7 @@
/* Fortify function f. __f_alias, __f_chk and __f_chk_warn must be
declared. */
-#define __glibc_fortify(f, __l, __s, __osz, ...) \
+# define __glibc_fortify(f, __l, __s, __osz, ...) \
(__glibc_safe_or_unknown_len (__l, __s, __osz) \
? __ ## f ## _alias (__VA_ARGS__) \
: (__glibc_unsafe_len (__l, __s, __osz) \
@@ -194,13 +199,16 @@
/* Fortify function f, where object size argument passed to f is the number of
elements and not total size. */
-#define __glibc_fortify_n(f, __l, __s, __osz, ...) \
+# define __glibc_fortify_n(f, __l, __s, __osz, ...) \
(__glibc_safe_or_unknown_len (__l, __s, __osz) \
? __ ## f ## _alias (__VA_ARGS__) \
: (__glibc_unsafe_len (__l, __s, __osz) \
? __ ## f ## _chk_warn (__VA_ARGS__, (__osz) / (__s)) \
: __ ## f ## _chk (__VA_ARGS__, (__osz) / (__s)))) \
+#endif
+
+
#if __GNUC_PREREQ (4,3)
# define __warnattr(msg) __attribute__((__warning__ (msg)))
# define __errordecl(name, msg) \
diff --git a/gl/lib/chdir-long.c b/gl/lib/chdir-long.c
index f4efb209..8a25538b 100644
--- a/gl/lib/chdir-long.c
+++ b/gl/lib/chdir-long.c
@@ -1,5 +1,5 @@
/* provide a chdir function that tries not to fail due to ENAMETOOLONG
- Copyright (C) 2004-2022 Free Software Foundation, Inc.
+ Copyright (C) 2004-2023 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -23,7 +23,6 @@
#include <errno.h>
#include <fcntl.h>
#include <stdlib.h>
-#include <stdbool.h>
#include <string.h>
#include <stdio.h>
diff --git a/gl/lib/chdir-long.h b/gl/lib/chdir-long.h
index 84a72989..6f81fadf 100644
--- a/gl/lib/chdir-long.h
+++ b/gl/lib/chdir-long.h
@@ -1,5 +1,5 @@
/* provide a chdir function that tries not to fail due to ENAMETOOLONG
- Copyright (C) 2004-2005, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2004-2005, 2009-2023 Free Software Foundation, Inc.
This 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/gl/lib/chown.c b/gl/lib/chown.c
index 705ca858..d735818a 100644
--- a/gl/lib/chown.c
+++ b/gl/lib/chown.c
@@ -1,7 +1,7 @@
/* provide consistent interface to chown for systems that don't interpret
an ID of -1 as meaning "don't change the corresponding ID".
- Copyright (C) 1997, 2004-2007, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2004-2007, 2009-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -25,7 +25,6 @@
#include <errno.h>
#include <fcntl.h>
-#include <stdbool.h>
#include <string.h>
#include <sys/stat.h>
diff --git a/gl/lib/cloexec.c b/gl/lib/cloexec.c
index 812be01a..e4cecbd2 100644
--- a/gl/lib/cloexec.c
+++ b/gl/lib/cloexec.c
@@ -1,6 +1,6 @@
/* cloexec.c - set or clear the close-on-exec descriptor flag
- Copyright (C) 1991, 2004-2006, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 1991, 2004-2006, 2009-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/cloexec.h b/gl/lib/cloexec.h
index 7a22d775..057fd668 100644
--- a/gl/lib/cloexec.h
+++ b/gl/lib/cloexec.h
@@ -1,6 +1,6 @@
/* cloexec.c - set or clear the close-on-exec descriptor flag
- Copyright (C) 2004, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2009-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -15,8 +15,6 @@
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
-#include <stdbool.h>
-
/* Set the 'FD_CLOEXEC' flag of DESC if VALUE is true,
or clear the flag if VALUE is false.
Return 0 on success, or -1 on error with 'errno' set.
diff --git a/gl/lib/close.c b/gl/lib/close.c
index 44990ba7..3c1b09ea 100644
--- a/gl/lib/close.c
+++ b/gl/lib/close.c
@@ -1,5 +1,5 @@
/* close replacement.
- Copyright (C) 2008-2022 Free Software Foundation, Inc.
+ Copyright (C) 2008-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/closedir.c b/gl/lib/closedir.c
index a2731220..3777e9f7 100644
--- a/gl/lib/closedir.c
+++ b/gl/lib/closedir.c
@@ -1,5 +1,5 @@
/* Stop reading the entries of a directory.
- Copyright (C) 2006-2022 Free Software Foundation, Inc.
+ Copyright (C) 2006-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -23,31 +23,37 @@
# include <unistd.h>
#endif
+#include <stdlib.h>
+
#if HAVE_CLOSEDIR
/* Override closedir(), to keep track of the open file descriptors.
Needed because there is a function dirfd(). */
-#else
-
-# include <stdlib.h>
+#endif
+#if GNULIB_defined_DIR
# include "dirent-private.h"
-
#endif
int
closedir (DIR *dirp)
+#undef closedir
{
-# if REPLACE_FCHDIR || REPLACE_DIRFD
+#if GNULIB_defined_DIR || REPLACE_FCHDIR || defined __KLIBC__
int fd = dirfd (dirp);
-# endif
+#endif
int retval;
-#if HAVE_CLOSEDIR
-# undef closedir
+#if HAVE_DIRENT_H /* equivalent to HAVE_CLOSEDIR */
+# if GNULIB_defined_DIR
+ retval = closedir (dirp->real_dirp);
+ if (retval >= 0)
+ free (dirp);
+# else
retval = closedir (dirp);
+# endif
# ifdef __KLIBC__
if (!retval)
@@ -63,9 +69,13 @@ closedir (DIR *dirp)
#endif
-#if REPLACE_FCHDIR
+#if GNULIB_defined_DIR
+ if (retval >= 0)
+ close (fd);
+#elif REPLACE_FCHDIR
if (retval >= 0)
_gl_unregister_fd (fd);
#endif
+
return retval;
}
diff --git a/gl/lib/ctype.in.h b/gl/lib/ctype.in.h
index dc81170d..ec43126d 100644
--- a/gl/lib/ctype.in.h
+++ b/gl/lib/ctype.in.h
@@ -1,6 +1,6 @@
/* A substitute for ISO C99 <ctype.h>, for platforms on which it is incomplete.
- Copyright (C) 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2009-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -36,6 +36,11 @@
#ifndef _@GUARD_PREFIX@_CTYPE_H
#define _@GUARD_PREFIX@_CTYPE_H
+/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
/* The definition of _GL_WARN_ON_USE is copied here. */
diff --git a/gl/lib/dirent-private.h b/gl/lib/dirent-private.h
index 30cf5d90..012b6837 100644
--- a/gl/lib/dirent-private.h
+++ b/gl/lib/dirent-private.h
@@ -1,5 +1,5 @@
/* Private details of the DIR type.
- Copyright (C) 2011-2022 Free Software Foundation, Inc.
+ Copyright (C) 2011-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -17,15 +17,36 @@
#ifndef _DIRENT_PRIVATE_H
#define _DIRENT_PRIVATE_H 1
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
+#if HAVE_DIRENT_H /* mingw */
+
+# undef DIR
+
+struct gl_directory
+{
+ /* File descriptor to close during closedir().
+ Needed for implementing fdopendir(). */
+ int fd_to_close;
+ /* Pointer to the real DIR. */
+ DIR *real_dirp;
+};
+
+/* Restore definition from dirent.h. */
+# define DIR struct gl_directory
+
+#else /* MSVC */
+
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
/* Don't assume that UNICODE is not defined. */
-#undef WIN32_FIND_DATA
-#define WIN32_FIND_DATA WIN32_FIND_DATAA
+# undef WIN32_FIND_DATA
+# define WIN32_FIND_DATA WIN32_FIND_DATAA
struct gl_directory
{
+ /* File descriptor to close during closedir().
+ Needed for implementing fdopendir(). */
+ int fd_to_close;
/* Status, or error code to produce in next readdir() call.
-2 means the end of the directory is already reached,
-1 means the entry was already filled by FindFirstFile,
@@ -41,4 +62,6 @@ struct gl_directory
char dir_name_mask[1];
};
+#endif
+
#endif /* _DIRENT_PRIVATE_H */
diff --git a/gl/lib/dirent.in.h b/gl/lib/dirent.in.h
index f28288d1..d409a031 100644
--- a/gl/lib/dirent.in.h
+++ b/gl/lib/dirent.in.h
@@ -1,5 +1,5 @@
/* A GNU-like <dirent.h>.
- Copyright (C) 2006-2022 Free Software Foundation, Inc.
+ Copyright (C) 2006-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -29,6 +29,12 @@
#ifndef _@GUARD_PREFIX@_DIRENT_H
#define _@GUARD_PREFIX@_DIRENT_H
+/* This file uses _GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_MALLOC,
+ _GL_ATTRIBUTE_PURE, GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
/* Get ino_t. Needed on some systems, including glibc 2.8. */
#include <sys/types.h>
@@ -50,11 +56,24 @@ struct dirent
# define DT_LNK 10 /* symbolic link */
# define DT_SOCK 12 /* socket */
# define DT_WHT 14 /* whiteout */
-typedef struct gl_directory DIR;
# define GNULIB_defined_struct_dirent 1
# endif
#endif
+#if !@DIR_HAS_FD_MEMBER@
+# if !GNULIB_defined_DIR
+/* struct gl_directory is a type with a field 'int fd_to_close'.
+ It is needed for implementing fdopendir(). */
+struct gl_directory;
+# if @HAVE_DIRENT_H@
+# define DIR struct gl_directory
+# else
+typedef struct gl_directory DIR;
+# endif
+# define GNULIB_defined_DIR 1
+# endif
+#endif
+
/* _GL_ATTRIBUTE_DEALLOC (F, I) declares that the function returns pointers
that can be freed by passing them as the Ith argument to the
function F. */
@@ -143,7 +162,7 @@ _GL_CXXALIAS_SYS (opendir, DIR *, (const char *dir_name));
# endif
_GL_CXXALIASWARN (opendir);
#else
-# if @GNULIB_CLOSEDIR@ && __GNUC__ >= 11 && !defined opendir
+# if @GNULIB_CLOSEDIR@ && !GNULIB_defined_DIR && __GNUC__ >= 11 && !defined opendir
/* For -Wmismatched-dealloc: Associate opendir with closedir or
rpl_closedir. */
_GL_FUNCDECL_SYS (opendir, DIR *,
@@ -161,10 +180,19 @@ _GL_WARN_ON_USE (opendir, "opendir is not portable - "
#endif
#if @GNULIB_READDIR@
-# if !@HAVE_READDIR@
+# if @REPLACE_READDIR@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef readdir
+# define readdir rpl_readdir
+# endif
+_GL_FUNCDECL_RPL (readdir, struct dirent *, (DIR *dirp) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (readdir, struct dirent *, (DIR *dirp));
+# else
+# if !@HAVE_READDIR@
_GL_FUNCDECL_SYS (readdir, struct dirent *, (DIR *dirp) _GL_ARG_NONNULL ((1)));
-# endif
+# endif
_GL_CXXALIAS_SYS (readdir, struct dirent *, (DIR *dirp));
+# endif
_GL_CXXALIASWARN (readdir);
#elif defined GNULIB_POSIXCHECK
# undef readdir
@@ -175,10 +203,19 @@ _GL_WARN_ON_USE (readdir, "readdir is not portable - "
#endif
#if @GNULIB_REWINDDIR@
-# if !@HAVE_REWINDDIR@
+# if @REPLACE_REWINDDIR@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef rewinddir
+# define rewinddir rpl_rewinddir
+# endif
+_GL_FUNCDECL_RPL (rewinddir, void, (DIR *dirp) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (rewinddir, void, (DIR *dirp));
+# else
+# if !@HAVE_REWINDDIR@
_GL_FUNCDECL_SYS (rewinddir, void, (DIR *dirp) _GL_ARG_NONNULL ((1)));
-# endif
+# endif
_GL_CXXALIAS_SYS (rewinddir, void, (DIR *dirp));
+# endif
_GL_CXXALIASWARN (rewinddir);
#elif defined GNULIB_POSIXCHECK
# undef rewinddir
diff --git a/gl/lib/dirfd.c b/gl/lib/dirfd.c
index 4104683f..75b2163c 100644
--- a/gl/lib/dirfd.c
+++ b/gl/lib/dirfd.c
@@ -1,6 +1,6 @@
/* dirfd.c -- return the file descriptor associated with an open DIR*
- Copyright (C) 2001, 2006, 2008-2022 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2006, 2008-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -22,6 +22,10 @@
#include <dirent.h>
#include <errno.h>
+#if GNULIB_defined_DIR
+# include "dirent-private.h"
+#endif
+
#ifdef __KLIBC__
# include <stdlib.h>
# include <io.h>
@@ -78,11 +82,17 @@ _gl_unregister_dirp_fd (int fd)
int
dirfd (DIR *dir_p)
{
+#if GNULIB_defined_DIR
+ int fd = dir_p->fd_to_close;
+ if (fd == -1)
+ errno = EINVAL;
+ return fd;
+#else
int fd = DIR_TO_FD (dir_p);
if (fd == -1)
-#ifndef __KLIBC__
+# ifndef __KLIBC__
errno = ENOTSUP;
-#else
+# else
{
struct dirp_fd_list *dirp_fd;
@@ -92,7 +102,8 @@ dirfd (DIR *dir_p)
errno = EINVAL;
}
-#endif
+# endif
return fd;
+#endif
}
diff --git a/gl/lib/dirname-lgpl.c b/gl/lib/dirname-lgpl.c
index d54f6a91..e9454af3 100644
--- a/gl/lib/dirname-lgpl.c
+++ b/gl/lib/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-2022 Free Software
+ Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2023 Free Software
Foundation, Inc.
This file is free software: you can redistribute it and/or modify
diff --git a/gl/lib/dirname.c b/gl/lib/dirname.c
index 3d2aaf1e..e72f7130 100644
--- a/gl/lib/dirname.c
+++ b/gl/lib/dirname.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-2022 Free Software
+ Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2023 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/lib/dirname.h b/gl/lib/dirname.h
index e18a97ea..0344f1c4 100644
--- a/gl/lib/dirname.h
+++ b/gl/lib/dirname.h
@@ -1,6 +1,6 @@
/* Take file names apart into directory and base names.
- Copyright (C) 1998, 2001, 2003-2006, 2009-2022 Free Software Foundation,
+ Copyright (C) 1998, 2001, 2003-2006, 2009-2023 Free Software Foundation,
Inc.
This file is free software: you can redistribute it and/or modify
@@ -19,7 +19,12 @@
#ifndef DIRNAME_H_
# define DIRNAME_H_ 1
-# include <stdbool.h>
+/* This file uses _GL_ATTRIBUTE_MALLOC, _GL_ATTRIBUTE_PURE,
+ _GL_ATTRIBUTE_RETURNS_NONNULL. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
# include <stdlib.h>
# include "filename.h"
# include "basename-lgpl.h"
diff --git a/gl/lib/dup-safer-flag.c b/gl/lib/dup-safer-flag.c
index f87792a3..be1762b2 100644
--- a/gl/lib/dup-safer-flag.c
+++ b/gl/lib/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-2022 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2004-2006, 2009-2023 Free Software Foundation, Inc.
This 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/gl/lib/dup-safer.c b/gl/lib/dup-safer.c
index 38ff74cc..bb86a2e4 100644
--- a/gl/lib/dup-safer.c
+++ b/gl/lib/dup-safer.c
@@ -1,6 +1,6 @@
/* Invoke dup, but avoid some glitches.
- Copyright (C) 2001, 2004-2006, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2004-2006, 2009-2023 Free Software Foundation, Inc.
This 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/gl/lib/dup.c b/gl/lib/dup.c
index 17a9c582..21e9f1f0 100644
--- a/gl/lib/dup.c
+++ b/gl/lib/dup.c
@@ -1,6 +1,6 @@
/* Duplicate an open file descriptor.
- Copyright (C) 2011-2022 Free Software Foundation, Inc.
+ Copyright (C) 2011-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/dup2.c b/gl/lib/dup2.c
index 1c766ab3..7d197ca3 100644
--- a/gl/lib/dup2.c
+++ b/gl/lib/dup2.c
@@ -1,6 +1,6 @@
/* Duplicate an open file descriptor to a specified file descriptor.
- Copyright (C) 1999, 2004-2007, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2004-2007, 2009-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/dynarray.h b/gl/lib/dynarray.h
index ca6439d3..91559109 100644
--- a/gl/lib/dynarray.h
+++ b/gl/lib/dynarray.h
@@ -1,5 +1,5 @@
/* Type-safe arrays which grow dynamically.
- Copyright 2021-2022 Free Software Foundation, Inc.
+ Copyright 2021-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/eloop-threshold.h b/gl/lib/eloop-threshold.h
index 8b314571..d9b154e4 100644
--- a/gl/lib/eloop-threshold.h
+++ b/gl/lib/eloop-threshold.h
@@ -1,5 +1,5 @@
/* Threshold at which to diagnose ELOOP. Generic version.
- Copyright (C) 2012-2022 Free Software Foundation, Inc.
+ Copyright (C) 2012-2023 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
@@ -19,6 +19,11 @@
#ifndef _ELOOP_THRESHOLD_H
#define _ELOOP_THRESHOLD_H 1
+/* This file uses _GL_ATTRIBUTE_CONST. */
+#if !_LIBC && !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
#include <limits.h>
#ifdef _LIBC
# include <sys/param.h>
diff --git a/gl/lib/errno.in.h b/gl/lib/errno.in.h
index 3ec18456..3dda9c26 100644
--- a/gl/lib/errno.in.h
+++ b/gl/lib/errno.in.h
@@ -1,6 +1,6 @@
/* A POSIX-like <errno.h>.
- Copyright (C) 2008-2022 Free Software Foundation, Inc.
+ Copyright (C) 2008-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/error.c b/gl/lib/error.c
index 272d45e4..9e26391e 100644
--- a/gl/lib/error.c
+++ b/gl/lib/error.c
@@ -1,5 +1,5 @@
/* Error handler for noninteractive utilities
- Copyright (C) 1990-1998, 2000-2007, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 1990-1998, 2000-2007, 2009-2023 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This file is free software: you can redistribute it and/or modify
@@ -19,6 +19,7 @@
#if !_LIBC
# include <config.h>
+# define _GL_NO_INLINE_ERROR
#endif
#include "error.h"
@@ -42,8 +43,6 @@
# define USE_UNLOCKED_IO 0
# define _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD(a, b)
# define _GL_ARG_NONNULL(a)
-#else
-# include "getprogname.h"
#endif
#if USE_UNLOCKED_IO
diff --git a/gl/lib/error.h b/gl/lib/error.h
deleted file mode 100644
index 45ec2a5e..00000000
--- a/gl/lib/error.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/* Declaration for error-reporting function
- Copyright (C) 1995-1997, 2003, 2006, 2008-2022 Free Software Foundation,
- Inc.
- This file is part of the GNU C Library.
-
- This file is free software: you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation; either version 2.1 of the
- License, or (at your option) any later version.
-
- This file 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 Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public License
- along with this program. If not, see <https://www.gnu.org/licenses/>. */
-
-#ifndef _ERROR_H
-#define _ERROR_H 1
-
-/* Get _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD, _GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM. */
-#include <stdio.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Print a message with 'fprintf (stderr, FORMAT, ...)';
- if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM).
- If STATUS is nonzero, terminate the program with 'exit (STATUS)'. */
-
-extern void error (int __status, int __errnum, const char *__format, ...)
-#if GNULIB_VFPRINTF_POSIX
- _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_STANDARD, 3, 4))
-#else
- _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM, 3, 4))
-#endif
- ;
-
-extern void error_at_line (int __status, int __errnum, const char *__fname,
- unsigned int __lineno, const char *__format, ...)
-#if GNULIB_VFPRINTF_POSIX
- _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_STANDARD, 5, 6))
-#else
- _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM, 5, 6))
-#endif
- ;
-
-/* If NULL, error will flush stdout, then print on stderr the program
- name, a colon and a space. Otherwise, error will call this
- function without parameters instead. */
-extern void (*error_print_progname) (void);
-
-/* This variable is incremented each time 'error' is called. */
-extern unsigned int error_message_count;
-
-/* Sometimes we want to have at most one error per line. This
- variable controls whether this mode is selected or not. */
-extern int error_one_per_line;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* error.h */
diff --git a/gl/lib/error.in.h b/gl/lib/error.in.h
new file mode 100644
index 00000000..94477fde
--- /dev/null
+++ b/gl/lib/error.in.h
@@ -0,0 +1,215 @@
+/* Declarations for error-reporting functions.
+ Copyright (C) 1995-1997, 2003, 2006, 2008-2023 Free Software Foundation,
+ Inc.
+ This file is part of the GNU C Library.
+
+ This file is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
+ License, or (at your option) any later version.
+
+ This file 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 Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
+
+#ifndef _@GUARD_PREFIX@_ERROR_H
+
+/* No @PRAGMA_SYSTEM_HEADER@ here, because it would prevent
+ -Wimplicit-fallthrough warnings for missing FALLTHROUGH after error(...)
+ or error_at_line(...) invocations. */
+
+/* The include_next requires a split double-inclusion guard. */
+#if @HAVE_ERROR_H@
+# @INCLUDE_NEXT@ @NEXT_ERROR_H@
+#endif
+
+#ifndef _@GUARD_PREFIX@_ERROR_H
+#define _@GUARD_PREFIX@_ERROR_H
+
+/* This file uses _GL_ATTRIBUTE_ALWAYS_INLINE, _GL_ATTRIBUTE_FORMAT,
+ _GL_ATTRIBUTE_MAYBE_UNUSED. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
+/* Get 'unreachable'. */
+#include <stddef.h>
+
+/* Get _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD, _GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM. */
+#include <stdio.h>
+
+/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
+
+#if GNULIB_VFPRINTF_POSIX
+# define _GL_ATTRIBUTE_SPEC_PRINTF_ERROR _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD
+#else
+# define _GL_ATTRIBUTE_SPEC_PRINTF_ERROR _GL_ATTRIBUTE_SPEC_PRINTF_SYSTEM
+#endif
+
+/* Helper macro for supporting the compiler's control flow analysis better.
+ It evaluates its arguments only once.
+ Test case: Compile copy-file.c with "gcc -Wimplicit-fallthrough". */
+#ifdef __GNUC__
+/* Use 'unreachable' to tell the compiler when the function call does not
+ return. */
+# define __gl_error_call1(function, status, ...) \
+ ((function) (status, __VA_ARGS__), \
+ (status) != 0 ? unreachable () : (void) 0)
+/* If STATUS is a not a constant, the function call may or may not return;
+ therefore -Wimplicit-fallthrough will produce a warning. Use a compound
+ statement in order to evaluate STATUS only once.
+ If STATUS is a constant, we don't use a compound statement, because that
+ would trigger a -Wimplicit-fallthrough warning even when STATUS is != 0,
+ when not optimizing. This causes STATUS to be evaluated twice, but
+ that's OK since it does not have side effects. */
+# define __gl_error_call(function, status, ...) \
+ (__builtin_constant_p (status) \
+ ? __gl_error_call1 (function, status, __VA_ARGS__) \
+ : ({ \
+ int const __errstatus = status; \
+ __gl_error_call1 (function, __errstatus, __VA_ARGS__); \
+ }))
+#else
+# define __gl_error_call(function, status, ...) \
+ (function) (status, __VA_ARGS__)
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Print a message with 'fprintf (stderr, FORMAT, ...)';
+ if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM).
+ If STATUS is nonzero, terminate the program with 'exit (STATUS)'. */
+#if @REPLACE_ERROR@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef error
+# define error rpl_error
+# endif
+_GL_FUNCDECL_RPL (error, void,
+ (int __status, int __errnum, const char *__format, ...)
+ _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_ERROR, 3, 4)));
+_GL_CXXALIAS_RPL (error, void,
+ (int __status, int __errnum, const char *__format, ...));
+# ifndef _GL_NO_INLINE_ERROR
+# undef error
+# define error(status, ...) \
+ __gl_error_call (rpl_error, status, __VA_ARGS__)
+# endif
+#else
+# if ! @HAVE_ERROR@
+_GL_FUNCDECL_SYS (error, void,
+ (int __status, int __errnum, const char *__format, ...)
+ _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_ERROR, 3, 4)));
+# endif
+_GL_CXXALIAS_SYS (error, void,
+ (int __status, int __errnum, const char *__format, ...));
+# ifndef _GL_NO_INLINE_ERROR
+# ifdef error
+/* Only gcc ≥ 4.7 has __builtin_va_arg_pack. */
+# if _GL_GNUC_PREREQ (4, 7)
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wattributes"
+_GL_ATTRIBUTE_MAYBE_UNUSED
+static void
+_GL_ATTRIBUTE_ALWAYS_INLINE
+_GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_ERROR, 3, 4))
+_gl_inline_error (int __status, int __errnum, const char *__format, ...)
+{
+ return error (__status, __errnum, __format, __builtin_va_arg_pack ());
+}
+# pragma GCC diagnostic pop
+# undef error
+# define error(status, ...) \
+ __gl_error_call (_gl_inline_error, status, __VA_ARGS__)
+# endif
+# else
+# define error(status, ...) \
+ __gl_error_call (error, status, __VA_ARGS__)
+# endif
+# endif
+#endif
+#if __GLIBC__ >= 2
+_GL_CXXALIASWARN (error);
+#endif
+
+/* Likewise. If FILENAME is non-NULL, include FILENAME:LINENO: in the
+ message. */
+#if @REPLACE_ERROR_AT_LINE@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef error_at_line
+# define error_at_line rpl_error_at_line
+# endif
+_GL_FUNCDECL_RPL (error_at_line, void,
+ (int __status, int __errnum, const char *__filename,
+ unsigned int __lineno, const char *__format, ...)
+ _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_ERROR, 5, 6)));
+_GL_CXXALIAS_RPL (error_at_line, void,
+ (int __status, int __errnum, const char *__filename,
+ unsigned int __lineno, const char *__format, ...));
+# ifndef _GL_NO_INLINE_ERROR
+# undef error_at_line
+# define error_at_line(status, ...) \
+ __gl_error_call (rpl_error_at_line, status, __VA_ARGS__)
+# endif
+#else
+# if ! @HAVE_ERROR_AT_LINE@
+_GL_FUNCDECL_SYS (error_at_line, void,
+ (int __status, int __errnum, const char *__filename,
+ unsigned int __lineno, const char *__format, ...)
+ _GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_ERROR, 5, 6)));
+# endif
+_GL_CXXALIAS_SYS (error_at_line, void,
+ (int __status, int __errnum, const char *__filename,
+ unsigned int __lineno, const char *__format, ...));
+# ifndef _GL_NO_INLINE_ERROR
+# ifdef error_at_line
+/* Only gcc ≥ 4.7 has __builtin_va_arg_pack. */
+# if _GL_GNUC_PREREQ (4, 7)
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wattributes"
+_GL_ATTRIBUTE_MAYBE_UNUSED
+static void
+_GL_ATTRIBUTE_ALWAYS_INLINE
+_GL_ATTRIBUTE_FORMAT ((_GL_ATTRIBUTE_SPEC_PRINTF_ERROR, 5, 6))
+_gl_inline_error_at_line (int __status, int __errnum, const char *__filename,
+ unsigned int __lineno, const char *__format, ...)
+{
+ return error_at_line (__status, __errnum, __filename, __lineno, __format,
+ __builtin_va_arg_pack ());
+}
+# pragma GCC diagnostic pop
+# undef error_at_line
+# define error_at_line(status, ...) \
+ __gl_error_call (_gl_inline_error_at_line, status, __VA_ARGS__)
+# endif
+# else
+# define error_at_line(status, ...) \
+ __gl_error_call (error_at_line, status, __VA_ARGS__)
+# endif
+# endif
+#endif
+_GL_CXXALIASWARN (error_at_line);
+
+/* If NULL, error will flush stdout, then print on stderr the program
+ name, a colon and a space. Otherwise, error will call this
+ function without parameters instead. */
+extern void (*error_print_progname) (void);
+
+/* This variable is incremented each time 'error' is called. */
+extern unsigned int error_message_count;
+
+/* Sometimes we want to have at most one error per line. This
+ variable controls whether this mode is selected or not. */
+extern int error_one_per_line;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _@GUARD_PREFIX@_ERROR_H */
+#endif /* _@GUARD_PREFIX@_ERROR_H */
diff --git a/gl/lib/exitfail.c b/gl/lib/exitfail.c
index 84fb0eff..d67a130c 100644
--- a/gl/lib/exitfail.c
+++ b/gl/lib/exitfail.c
@@ -1,6 +1,6 @@
/* Failure exit status
- Copyright (C) 2002-2003, 2005-2007, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2002-2003, 2005-2007, 2009-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/exitfail.h b/gl/lib/exitfail.h
index 865f096a..85a6af64 100644
--- a/gl/lib/exitfail.h
+++ b/gl/lib/exitfail.h
@@ -1,6 +1,6 @@
/* Failure exit status
- Copyright (C) 2002, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2009-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/fchdir.c b/gl/lib/fchdir.c
index 99e4aa85..880b137e 100644
--- a/gl/lib/fchdir.c
+++ b/gl/lib/fchdir.c
@@ -1,5 +1,5 @@
/* fchdir replacement.
- Copyright (C) 2006-2022 Free Software Foundation, Inc.
+ Copyright (C) 2006-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -22,7 +22,6 @@
#include <dirent.h>
#include <errno.h>
#include <fcntl.h>
-#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
@@ -49,7 +48,6 @@
typedef struct
{
char *name; /* Absolute name of the directory, or NULL. */
- /* FIXME - add a DIR* member to make dirfd possible on mingw? */
} dir_info_t;
static dir_info_t *dirs;
static size_t dirs_allocated;
diff --git a/gl/lib/fchown-stub.c b/gl/lib/fchown-stub.c
index 74df86ae..05bfa428 100644
--- a/gl/lib/fchown-stub.c
+++ b/gl/lib/fchown-stub.c
@@ -1,5 +1,5 @@
/* Change ownership of a file.
- Copyright (C) 2004-2022 Free Software Foundation, Inc.
+ Copyright (C) 2004-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/fcntl.c b/gl/lib/fcntl.c
index f9753c40..e2208008 100644
--- a/gl/lib/fcntl.c
+++ b/gl/lib/fcntl.c
@@ -1,6 +1,6 @@
/* Provide file descriptor control.
- Copyright (C) 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2009-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/fcntl.in.h b/gl/lib/fcntl.in.h
index 9270ced8..d0bb85f3 100644
--- a/gl/lib/fcntl.in.h
+++ b/gl/lib/fcntl.in.h
@@ -1,6 +1,6 @@
/* Like <fcntl.h>, but with non-working flags defined to 0.
- Copyright (C) 2006-2022 Free Software Foundation, Inc.
+ Copyright (C) 2006-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -74,6 +74,11 @@
#ifndef _@GUARD_PREFIX@_FCNTL_H
#define _@GUARD_PREFIX@_FCNTL_H
+/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
#ifndef __GLIBC__ /* Avoid namespace pollution on glibc systems. */
# include <unistd.h>
#endif
diff --git a/gl/lib/fd-hook.c b/gl/lib/fd-hook.c
index 64a7a80c..36261150 100644
--- a/gl/lib/fd-hook.c
+++ b/gl/lib/fd-hook.c
@@ -1,5 +1,5 @@
/* Hook for making file descriptor functions close(), ioctl() extensible.
- Copyright (C) 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2009-2023 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2009.
This file is free software: you can redistribute it and/or modify
diff --git a/gl/lib/fd-hook.h b/gl/lib/fd-hook.h
index d6c4964d..6bf3c24d 100644
--- a/gl/lib/fd-hook.h
+++ b/gl/lib/fd-hook.h
@@ -1,5 +1,5 @@
/* Hook for making file descriptor functions close(), ioctl() extensible.
- Copyright (C) 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2009-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/fd-safer-flag.c b/gl/lib/fd-safer-flag.c
index 2e07cb9b..9aef2710 100644
--- a/gl/lib/fd-safer-flag.c
+++ b/gl/lib/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-2022 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2009-2023 Free Software Foundation, Inc.
This 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/gl/lib/fd-safer.c b/gl/lib/fd-safer.c
index e37b7b3a..9c40a5ae 100644
--- a/gl/lib/fd-safer.c
+++ b/gl/lib/fd-safer.c
@@ -1,6 +1,6 @@
/* Return a safer copy of a file descriptor.
- Copyright (C) 2005-2006, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2009-2023 Free Software Foundation, Inc.
This 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/gl/lib/fdopendir.c b/gl/lib/fdopendir.c
index c2b0e1ed..0f43d6ff 100644
--- a/gl/lib/fdopendir.c
+++ b/gl/lib/fdopendir.c
@@ -1,5 +1,5 @@
/* provide a replacement fdopendir function
- Copyright (C) 2004-2022 Free Software Foundation, Inc.
+ Copyright (C) 2004-2023 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -25,44 +25,27 @@
#if !HAVE_FDOPENDIR
-# include "openat.h"
-# include "openat-priv.h"
-# include "save-cwd.h"
+# if GNULIB_defined_DIR
+/* We are in control of the file descriptor of a DIR. */
-# if GNULIB_DIRENT_SAFER
-# include "dirent--.h"
-# endif
-
-# ifndef REPLACE_FCHDIR
-# define REPLACE_FCHDIR 0
-# endif
-
-static DIR *fdopendir_with_dup (int, int, struct saved_cwd const *);
-static DIR *fd_clone_opendir (int, struct saved_cwd const *);
-
-/* Replacement for POSIX fdopendir.
+# include "dirent-private.h"
- First, try to simulate it via opendir ("/proc/self/fd/..."). Failing
- that, simulate it by using fchdir metadata, or by doing
- save_cwd/fchdir/opendir(".")/restore_cwd.
- If either the save_cwd or the restore_cwd fails (relatively unlikely),
- then give a diagnostic and exit nonzero.
-
- If successful, the resulting stream is based on FD in
- implementations where streams are based on file descriptors and in
- applications where no other thread or signal handler allocates or
- frees file descriptors. In other cases, consult dirfd on the result
- to find out whether FD is still being used.
+# if !REPLACE_FCHDIR
+# error "unexpected configuration: GNULIB_defined_DIR but fchdir not replaced"
+# endif
- Otherwise, this function works just like POSIX fdopendir.
+DIR *
+fdopendir (int fd)
+{
+ char const *name = _gl_directory_name (fd);
+ DIR *dirp = name ? opendir (name) : NULL;
+ if (dirp != NULL)
+ dirp->fd_to_close = fd;
+ return dirp;
+}
- W A R N I N G:
+# elif defined __KLIBC__
- Unlike other fd-related functions, this one places constraints on FD.
- If this function returns successfully, FD is under control of the
- dirent.h system, and the caller should not close or modify the state of
- FD other than by the dirent.h functions. */
-# ifdef __KLIBC__
# include <InnoTekLIBC/backend.h>
DIR *
@@ -96,7 +79,48 @@ fdopendir (int fd)
return dirp;
}
+
# else
+/* We are not in control of the file descriptor of a DIR, and therefore have to
+ play tricks with file descriptors before and after a call to opendir(). */
+
+# include "openat.h"
+# include "openat-priv.h"
+# include "save-cwd.h"
+
+# if GNULIB_DIRENT_SAFER
+# include "dirent--.h"
+# endif
+
+# ifndef REPLACE_FCHDIR
+# define REPLACE_FCHDIR 0
+# endif
+
+static DIR *fdopendir_with_dup (int, int, struct saved_cwd const *);
+static DIR *fd_clone_opendir (int, struct saved_cwd const *);
+
+/* Replacement for POSIX fdopendir.
+
+ First, try to simulate it via opendir ("/proc/self/fd/..."). Failing
+ that, simulate it by using fchdir metadata, or by doing
+ save_cwd/fchdir/opendir(".")/restore_cwd.
+ If either the save_cwd or the restore_cwd fails (relatively unlikely),
+ then give a diagnostic and exit nonzero.
+
+ If successful, the resulting stream is based on FD in
+ implementations where streams are based on file descriptors and in
+ applications where no other thread or signal handler allocates or
+ frees file descriptors. In other cases, consult dirfd on the result
+ to find out whether FD is still being used.
+
+ Otherwise, this function works just like POSIX fdopendir.
+
+ W A R N I N G:
+
+ Unlike other fd-related functions, this one places constraints on FD.
+ If this function returns successfully, FD is under control of the
+ dirent.h system, and the caller should not close or modify the state of
+ FD other than by the dirent.h functions. */
DIR *
fdopendir (int fd)
{
@@ -119,7 +143,6 @@ fdopendir (int fd)
return dir;
}
-# endif
/* Like fdopendir, except that if OLDER_DUPFD is not -1, it is known
to be a dup of FD which is less than FD - 1 and which will be
@@ -188,7 +211,7 @@ fd_clone_opendir (int fd, struct saved_cwd const *cwd)
if (proc_file != buf)
free (proc_file);
}
-# if REPLACE_FCHDIR
+# if REPLACE_FCHDIR
if (! dir && EXPECTED_ERRNO (saved_errno))
{
char const *name = _gl_directory_name (fd);
@@ -203,7 +226,7 @@ fd_clone_opendir (int fd, struct saved_cwd const *cwd)
return dp;
}
-# endif
+# endif
errno = saved_errno;
return dir;
}
@@ -223,6 +246,8 @@ fd_clone_opendir (int fd, struct saved_cwd const *cwd)
}
}
+# endif
+
#else /* HAVE_FDOPENDIR */
# include <errno.h>
diff --git a/gl/lib/file-set.c b/gl/lib/file-set.c
index 3270551b..44cf6430 100644
--- a/gl/lib/file-set.c
+++ b/gl/lib/file-set.c
@@ -1,5 +1,5 @@
/* Specialized functions to manipulate a set of files.
- Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2023 Free Software Foundation, Inc.
This 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/gl/lib/file-set.h b/gl/lib/file-set.h
index dc9d0ae5..c2508b01 100644
--- a/gl/lib/file-set.h
+++ b/gl/lib/file-set.h
@@ -1,5 +1,5 @@
/* Very specialized set-of-files code.
- Copyright (C) 2007-2022 Free Software Foundation, Inc.
+ Copyright (C) 2007-2023 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -18,7 +18,6 @@
#include <sys/types.h>
#include <sys/stat.h>
-#include <stdbool.h>
#include "hash.h"
diff --git a/gl/lib/filename.h b/gl/lib/filename.h
index ab77ca2d..a2400a9d 100644
--- a/gl/lib/filename.h
+++ b/gl/lib/filename.h
@@ -1,5 +1,5 @@
/* Basic filename support macros.
- Copyright (C) 2001-2022 Free Software Foundation, Inc.
+ Copyright (C) 2001-2023 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/gl/lib/filenamecat-lgpl.c b/gl/lib/filenamecat-lgpl.c
index 56981aac..6d7ed848 100644
--- a/gl/lib/filenamecat-lgpl.c
+++ b/gl/lib/filenamecat-lgpl.c
@@ -1,6 +1,6 @@
/* Concatenate two arbitrary file names.
- Copyright (C) 1996-2007, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 1996-2007, 2009-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/filenamecat.h b/gl/lib/filenamecat.h
index f11bd289..29a4daaf 100644
--- a/gl/lib/filenamecat.h
+++ b/gl/lib/filenamecat.h
@@ -1,6 +1,6 @@
/* Concatenate two arbitrary file names.
- Copyright (C) 1996-1997, 2003, 2005, 2007, 2009-2022 Free Software
+ Copyright (C) 1996-1997, 2003, 2005, 2007, 2009-2023 Free Software
Foundation, Inc.
This file is free software: you can redistribute it and/or modify
@@ -18,6 +18,11 @@
/* Written by Jim Meyering. */
+/* This file uses _GL_ATTRIBUTE_MALLOC, _GL_ATTRIBUTE_RETURNS_NONNULL. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
#include <stdlib.h>
#if GNULIB_FILENAMECAT
diff --git a/gl/lib/flexmember.h b/gl/lib/flexmember.h
index 1545639f..8df44195 100644
--- a/gl/lib/flexmember.h
+++ b/gl/lib/flexmember.h
@@ -1,6 +1,6 @@
/* Sizes of structs with flexible array members.
- Copyright 2016-2022 Free Software Foundation, Inc.
+ Copyright 2016-2023 Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -20,6 +20,11 @@
Written by Paul Eggert. */
+/* This file uses _Alignof. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
#include <stddef.h>
/* Nonzero multiple of alignment of TYPE, suitable for FLEXSIZEOF below.
@@ -38,7 +43,7 @@
followed by N bytes of other data. The result is suitable as an
argument to malloc. For example:
- struct s { int n; char d[FLEXIBLE_ARRAY_MEMBER]; };
+ struct s { int a; char d[FLEXIBLE_ARRAY_MEMBER]; };
struct s *p = malloc (FLEXSIZEOF (struct s, d, n * sizeof (char)));
FLEXSIZEOF (TYPE, MEMBER, N) is not simply (sizeof (TYPE) + N),
@@ -58,3 +63,14 @@
#define FLEXSIZEOF(type, member, n) \
((offsetof (type, member) + FLEXALIGNOF (type) - 1 + (n)) \
& ~ (FLEXALIGNOF (type) - 1))
+
+/* Yield a properly aligned upper bound on the size of a struct of
+ type TYPE with a flexible array member named MEMBER that has N
+ elements. The result is suitable as an argument to malloc.
+ For example:
+
+ struct s { int a; double d[FLEXIBLE_ARRAY_MEMBER]; };
+ struct s *p = malloc (FLEXNSIZEOF (struct s, d, n));
+ */
+#define FLEXNSIZEOF(type, member, n) \
+ FLEXSIZEOF (type, member, (n) * sizeof (((type *) 0)->member[0]))
diff --git a/gl/lib/float+.h b/gl/lib/float+.h
index 9ab45208..e7531e46 100644
--- a/gl/lib/float+.h
+++ b/gl/lib/float+.h
@@ -1,5 +1,5 @@
/* Supplemental information about the floating-point formats.
- Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2023 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2007.
This file is free software: you can redistribute it and/or modify
diff --git a/gl/lib/float.c b/gl/lib/float.c
index de850645..f81ff33d 100644
--- a/gl/lib/float.c
+++ b/gl/lib/float.c
@@ -1,5 +1,5 @@
/* Auxiliary definitions for <float.h>.
- Copyright (C) 2011-2022 Free Software Foundation, Inc.
+ Copyright (C) 2011-2023 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2011.
This file is free software: you can redistribute it and/or modify
diff --git a/gl/lib/float.in.h b/gl/lib/float.in.h
index a4183765..bf2c502c 100644
--- a/gl/lib/float.in.h
+++ b/gl/lib/float.in.h
@@ -1,6 +1,6 @@
/* A correct <float.h>.
- Copyright (C) 2007-2022 Free Software Foundation, Inc.
+ Copyright (C) 2007-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/flock.c b/gl/lib/flock.c
index 28773d5c..85433e72 100644
--- a/gl/lib/flock.c
+++ b/gl/lib/flock.c
@@ -6,7 +6,7 @@
Written by Richard W.M. Jones <rjones.at.redhat.com>
- Copyright (C) 2008-2022 Free Software Foundation, Inc.
+ Copyright (C) 2008-2023 Free Software Foundation, Inc.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
diff --git a/gl/lib/fnmatch.c b/gl/lib/fnmatch.c
index b33a127d..32cfb48d 100644
--- a/gl/lib/fnmatch.c
+++ b/gl/lib/fnmatch.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2022 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2023 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
@@ -30,6 +30,7 @@
#include <errno.h>
#include <ctype.h>
#include <string.h>
+#include <stdckdint.h>
#include <stdlib.h>
#if defined _LIBC || HAVE_ALLOCA
# include <alloca.h>
@@ -37,7 +38,6 @@
#include <wchar.h>
#include <wctype.h>
#include <stddef.h>
-#include <stdbool.h>
/* We need some of the locale data (the collation sequence information)
but there is no interface to get this information in general. Therefore
@@ -64,7 +64,7 @@ extern int fnmatch (const char *pattern, const char *string, int flags);
#endif
#ifdef _LIBC
-# if __GNUC__ >= 7
+# if __glibc_has_attribute (__fallthrough__)
# define FALLTHROUGH __attribute__ ((__fallthrough__))
# else
# define FALLTHROUGH ((void) 0)
@@ -73,7 +73,6 @@ extern int fnmatch (const char *pattern, const char *string, int flags);
# include "attribute.h"
#endif
-#include <intprops.h>
#include <flexmember.h>
#ifdef _LIBC
diff --git a/gl/lib/fnmatch.in.h b/gl/lib/fnmatch.in.h
index a282c09f..144143b7 100644
--- a/gl/lib/fnmatch.in.h
+++ b/gl/lib/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-2022 Free
+ Copyright (C) 1991-1993, 1996-1999, 2001-2003, 2005, 2007, 2009-2023 Free
Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -32,6 +32,11 @@
#ifndef _@GUARD_PREFIX@_FNMATCH_H
#define _@GUARD_PREFIX@_FNMATCH_H
+/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
/* The definition of _GL_ARG_NONNULL is copied here. */
diff --git a/gl/lib/fnmatch_loop.c b/gl/lib/fnmatch_loop.c
index e6359537..68a3b7a5 100644
--- a/gl/lib/fnmatch_loop.c
+++ b/gl/lib/fnmatch_loop.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2022 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2023 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
@@ -1039,8 +1039,8 @@ EXT (INT opt, const CHAR *pattern, const CHAR *string, const CHAR *string_end,
idx_t slen = FLEXSIZEOF (struct patternlist, str, 0); \
idx_t new_used = alloca_used + slen; \
idx_t plensize; \
- if (INT_MULTIPLY_WRAPV (plen, sizeof (CHAR), &plensize) \
- || INT_ADD_WRAPV (new_used, plensize, &new_used)) \
+ if (ckd_mul (&plensize, plen, sizeof (CHAR)) \
+ || ckd_add (&new_used, new_used, plensize)) \
{ \
retval = -2; \
goto out; \
diff --git a/gl/lib/free.c b/gl/lib/free.c
index 86ebe6c6..372a6b0f 100644
--- a/gl/lib/free.c
+++ b/gl/lib/free.c
@@ -1,6 +1,6 @@
/* Make free() preserve errno.
- Copyright (C) 2003, 2006, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2006, 2009-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/fstat.c b/gl/lib/fstat.c
index 3928c860..6a235002 100644
--- a/gl/lib/fstat.c
+++ b/gl/lib/fstat.c
@@ -1,5 +1,5 @@
/* fstat() replacement.
- Copyright (C) 2011-2022 Free Software Foundation, Inc.
+ Copyright (C) 2011-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/fstatat.c b/gl/lib/fstatat.c
index 6e834496..372965ef 100644
--- a/gl/lib/fstatat.c
+++ b/gl/lib/fstatat.c
@@ -1,6 +1,6 @@
/* Work around an fstatat bug on Solaris 9.
- Copyright (C) 2006, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2023 Free Software Foundation, Inc.
This 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/gl/lib/getcwd-lgpl.c b/gl/lib/getcwd-lgpl.c
index f449ac85..8a5bde99 100644
--- a/gl/lib/getcwd-lgpl.c
+++ b/gl/lib/getcwd-lgpl.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2011-2022 Free Software Foundation, Inc.
+/* Copyright (C) 2011-2023 Free Software Foundation, Inc.
This file is part of gnulib.
This file is free software: you can redistribute it and/or modify
diff --git a/gl/lib/getcwd.c b/gl/lib/getcwd.c
index 113332f1..28f69133 100644
--- a/gl/lib/getcwd.c
+++ b/gl/lib/getcwd.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2022 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2023 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This file is free software: you can redistribute it and/or modify
@@ -16,6 +16,7 @@
#if !_LIBC
# include <config.h>
+# include <stdio.h>
# include <unistd.h>
# include "pathmax.h"
#else
@@ -28,7 +29,6 @@
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
-#include <stdbool.h>
#include <stddef.h>
#include <fcntl.h> /* For AT_FDCWD on Solaris 9. */
@@ -114,13 +114,21 @@
FIXME - if the kernel ever adds support for multi-thread safety for
avoiding standard fds, then we should use opendir_safer and
openat_safer. */
-#ifdef GNULIB_defined_opendir
+#ifdef GNULIB_defined_DIR
+# undef DIR
# undef opendir
-#endif
-#ifdef GNULIB_defined_closedir
# undef closedir
+# undef readdir
+# undef rewinddir
+#else
+# ifdef GNULIB_defined_opendir
+# undef opendir
+# endif
+# ifdef GNULIB_defined_closedir
+# undef closedir
+# endif
#endif
-
+
#if defined _WIN32 && !defined __CYGWIN__
# if HAVE_MSVC_INVALID_PARAMETER_HANDLER
static char *
@@ -173,6 +181,9 @@ __getcwd_generic (char *buf, size_t size)
#if HAVE_OPENAT_SUPPORT
int fd = AT_FDCWD;
bool fd_needs_closing = false;
+# if defined __linux__
+ bool proc_fs_not_mounted = false;
+# endif
#else
char dots[DEEP_NESTING * sizeof ".." + BIG_FILE_NAME_COMPONENT_LENGTH + 1];
char *dotlist = dots;
@@ -438,6 +449,67 @@ __getcwd_generic (char *buf, size_t size)
thisdev = dotdev;
thisino = dotino;
+
+#if HAVE_OPENAT_SUPPORT
+ /* On some platforms, a system call returns the directory that FD points
+ to. This is useful if some of the ancestor directories of the
+ directory are unreadable, because in this situation the loop that
+ climbs up the ancestor hierarchy runs into an EACCES error.
+ For example, in some Android app, /data/data/com.termux is readable,
+ but /data/data and /data are not. */
+# if defined __linux__
+ /* On Linux, in particular, if /proc is mounted,
+ readlink ("/proc/self/fd/<fd>")
+ returns the directory, if its length is < 4096. (If the length is
+ >= 4096, it fails with error ENAMETOOLONG, even if the buffer that we
+ pass to the readlink function would be large enough.) */
+ if (!proc_fs_not_mounted)
+ {
+ char namebuf[14 + 10 + 1];
+ sprintf (namebuf, "/proc/self/fd/%u", (unsigned int) fd);
+ char linkbuf[4096];
+ ssize_t linklen = readlink (namebuf, linkbuf, sizeof linkbuf);
+ if (linklen < 0)
+ {
+ if (errno != ENAMETOOLONG)
+ /* If this call was not successful, the next one will likely be
+ not successful either. */
+ proc_fs_not_mounted = true;
+ }
+ else
+ {
+ dirroom = dirp - dir;
+ if (dirroom < linklen)
+ {
+ if (size != 0)
+ {
+ __set_errno (ERANGE);
+ goto lose;
+ }
+ else
+ {
+ char *tmp;
+ size_t oldsize = allocated;
+
+ allocated += linklen - dirroom;
+ if (allocated < oldsize
+ || ! (tmp = realloc (dir, allocated)))
+ goto memory_exhausted;
+
+ /* Move current contents up to the end of the buffer. */
+ dirp = memmove (tmp + dirroom + (allocated - oldsize),
+ tmp + dirroom,
+ oldsize - dirroom);
+ dir = tmp;
+ }
+ }
+ dirp -= linklen;
+ memcpy (dirp, linkbuf, linklen);
+ break;
+ }
+ }
+# endif
+#endif
}
if (dirstream && __closedir (dirstream) != 0)
diff --git a/gl/lib/getdelim.c b/gl/lib/getdelim.c
index 9eb0483c..e414df64 100644
--- a/gl/lib/getdelim.c
+++ b/gl/lib/getdelim.c
@@ -1,5 +1,5 @@
/* getdelim.c --- Implementation of replacement getdelim function.
- Copyright (C) 1994, 1996-1998, 2001, 2003, 2005-2022 Free Software
+ Copyright (C) 1994, 1996-1998, 2001, 2003, 2005-2023 Free Software
Foundation, Inc.
This file is free software: you can redistribute it and/or modify
@@ -30,10 +30,6 @@
#include <stdlib.h>
#include <errno.h>
-#ifndef SSIZE_MAX
-# define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2))
-#endif
-
#if USE_UNLOCKED_IO
# include "unlocked-io.h"
# define getc_maybe_unlocked(fp) getc(fp)
diff --git a/gl/lib/getdtablesize.c b/gl/lib/getdtablesize.c
index 793e0f88..ac2d1753 100644
--- a/gl/lib/getdtablesize.c
+++ b/gl/lib/getdtablesize.c
@@ -1,5 +1,5 @@
/* getdtablesize() function: Return maximum possible file descriptor value + 1.
- Copyright (C) 2008-2022 Free Software Foundation, Inc.
+ Copyright (C) 2008-2023 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This file is free software: you can redistribute it and/or modify
diff --git a/gl/lib/getline.c b/gl/lib/getline.c
index 34b91177..85f16ab8 100644
--- a/gl/lib/getline.c
+++ b/gl/lib/getline.c
@@ -1,5 +1,5 @@
/* getline.c --- Implementation of replacement getline function.
- Copyright (C) 2005-2007, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2005-2007, 2009-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/getlogin_r.c b/gl/lib/getlogin_r.c
index 6bdf0585..06170106 100644
--- a/gl/lib/getlogin_r.c
+++ b/gl/lib/getlogin_r.c
@@ -1,6 +1,6 @@
/* Provide a working getlogin_r for systems which lack it.
- Copyright (C) 2005-2007, 2010-2022 Free Software Foundation, Inc.
+ Copyright (C) 2005-2007, 2010-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/getopt-cdefs.in.h b/gl/lib/getopt-cdefs.in.h
index b6dd913c..e76c78cb 100644
--- a/gl/lib/getopt-cdefs.in.h
+++ b/gl/lib/getopt-cdefs.in.h
@@ -1,5 +1,5 @@
/* getopt-on-non-glibc compatibility macros.
- Copyright (C) 1989-2022 Free Software Foundation, Inc.
+ Copyright (C) 1989-2023 Free Software Foundation, Inc.
This file is part of gnulib.
Unlike most of the getopt implementation, it is NOT shared
with the GNU C Library.
diff --git a/gl/lib/getopt-core.h b/gl/lib/getopt-core.h
index 1c40ecc8..c5dd4936 100644
--- a/gl/lib/getopt-core.h
+++ b/gl/lib/getopt-core.h
@@ -1,5 +1,5 @@
/* Declarations for getopt (basic, portable features only).
- Copyright (C) 1989-2022 Free Software Foundation, Inc.
+ Copyright (C) 1989-2023 Free Software Foundation, Inc.
This file is part of the GNU C Library and is also part of gnulib.
Patches to this file should be submitted to both projects.
diff --git a/gl/lib/getopt-ext.h b/gl/lib/getopt-ext.h
index d661fcc5..d37c2932 100644
--- a/gl/lib/getopt-ext.h
+++ b/gl/lib/getopt-ext.h
@@ -1,5 +1,5 @@
/* Declarations for getopt (GNU extensions).
- Copyright (C) 1989-2022 Free Software Foundation, Inc.
+ Copyright (C) 1989-2023 Free Software Foundation, Inc.
This file is part of the GNU C Library and is also part of gnulib.
Patches to this file should be submitted to both projects.
diff --git a/gl/lib/getopt-pfx-core.h b/gl/lib/getopt-pfx-core.h
index 3eead0e0..095e3930 100644
--- a/gl/lib/getopt-pfx-core.h
+++ b/gl/lib/getopt-pfx-core.h
@@ -1,5 +1,5 @@
/* getopt (basic, portable features) gnulib wrapper header.
- Copyright (C) 1989-2022 Free Software Foundation, Inc.
+ Copyright (C) 1989-2023 Free Software Foundation, Inc.
This file is part of gnulib.
Unlike most of the getopt implementation, it is NOT shared
with the GNU C Library.
@@ -47,7 +47,7 @@
# define optind __GETOPT_ID (optind)
# define optopt __GETOPT_ID (optopt)
-/* Work around a a problem on macOS, which declares getopt with a
+/* Work around a problem on macOS, which declares getopt with a
trailing __DARWIN_ALIAS(getopt) that would expand to something like
__asm("_" "rpl_getopt" "$UNIX2003") were it not for the following
hack to suppress the macOS declaration <https://bugs.gnu.org/40205>. */
diff --git a/gl/lib/getopt-pfx-ext.h b/gl/lib/getopt-pfx-ext.h
index 85a6cb5d..8578d725 100644
--- a/gl/lib/getopt-pfx-ext.h
+++ b/gl/lib/getopt-pfx-ext.h
@@ -1,5 +1,5 @@
/* getopt (GNU extensions) gnulib wrapper header.
- Copyright (C) 1989-2022 Free Software Foundation, Inc.
+ Copyright (C) 1989-2023 Free Software Foundation, Inc.
This file is part of gnulib.
Unlike most of the getopt implementation, it is NOT shared
with the GNU C Library.
diff --git a/gl/lib/getopt.c b/gl/lib/getopt.c
index 128dc7fc..1e2441c4 100644
--- a/gl/lib/getopt.c
+++ b/gl/lib/getopt.c
@@ -1,5 +1,5 @@
/* Getopt for GNU.
- Copyright (C) 1987-2022 Free Software Foundation, Inc.
+ Copyright (C) 1987-2023 Free Software Foundation, Inc.
This file is part of the GNU C Library and is also part of gnulib.
Patches to this file should be submitted to both projects.
diff --git a/gl/lib/getopt.in.h b/gl/lib/getopt.in.h
index 9bc50ee2..0867d365 100644
--- a/gl/lib/getopt.in.h
+++ b/gl/lib/getopt.in.h
@@ -1,5 +1,5 @@
/* Declarations for getopt.
- Copyright (C) 1989-2022 Free Software Foundation, Inc.
+ Copyright (C) 1989-2023 Free Software Foundation, Inc.
This file is part of gnulib.
Unlike most of the getopt implementation, it is NOT shared
with the GNU C Library, which supplies a different version of
diff --git a/gl/lib/getopt1.c b/gl/lib/getopt1.c
index 990eee1b..49323aa8 100644
--- a/gl/lib/getopt1.c
+++ b/gl/lib/getopt1.c
@@ -1,5 +1,5 @@
/* getopt_long and getopt_long_only entry points for GNU getopt.
- Copyright (C) 1987-2022 Free Software Foundation, Inc.
+ Copyright (C) 1987-2023 Free Software Foundation, Inc.
This file is part of the GNU C Library and is also part of gnulib.
Patches to this file should be submitted to both projects.
diff --git a/gl/lib/getopt_int.h b/gl/lib/getopt_int.h
index ccdbb973..4d9e24be 100644
--- a/gl/lib/getopt_int.h
+++ b/gl/lib/getopt_int.h
@@ -1,5 +1,5 @@
/* Internal declarations for getopt.
- Copyright (C) 1989-2022 Free Software Foundation, Inc.
+ Copyright (C) 1989-2023 Free Software Foundation, Inc.
This file is part of the GNU C Library and is also part of gnulib.
Patches to this file should be submitted to both projects.
diff --git a/gl/lib/getprogname.c b/gl/lib/getprogname.c
index 62a48004..204855a4 100644
--- a/gl/lib/getprogname.c
+++ b/gl/lib/getprogname.c
@@ -1,5 +1,5 @@
/* Program name management.
- Copyright (C) 2016-2022 Free Software Foundation, Inc.
+ Copyright (C) 2016-2023 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@@ -16,11 +16,10 @@
#include <config.h>
-/* Specification. */
-#include "getprogname.h"
+/* Specification. Also get __argv declaration. */
+#include <stdlib.h>
#include <errno.h> /* get program_invocation_name declaration */
-#include <stdlib.h> /* get __argv declaration */
#ifdef _AIX
# include <unistd.h>
@@ -53,13 +52,12 @@
#if defined __SCO_VERSION__ || defined __sysv5__
# include <fcntl.h>
-# include <stdlib.h>
# include <string.h>
#endif
#include "basename-lgpl.h"
-#ifndef HAVE_GETPROGNAME /* not Mac OS X, FreeBSD, NetBSD, OpenBSD >= 5.4, Cygwin */
+#ifndef HAVE_GETPROGNAME /* not Mac OS X, FreeBSD, NetBSD, OpenBSD >= 5.4, Solaris >= 11, Cygwin, Android API level >= 21 */
char const *
getprogname (void)
{
@@ -214,7 +212,19 @@ getprogname (void)
{
char *s = strdup (last_component (buf.ps_pathptr));
if (s)
- p = s;
+ {
+# if defined __XPLINK__ && __CHARSET_LIB == 1
+ /* The compiler option -qascii is in use.
+ https://makingdeveloperslivesbetter.wordpress.com/2022/01/07/is-z-os-ascii-or-ebcdic-yes/
+ https://www.ibm.com/docs/en/zos/2.5.0?topic=features-macros-related-compiler-option-settings
+ So, convert the result from EBCDIC to ASCII.
+ https://www.ibm.com/docs/en/zos/2.5.0?topic=functions-e2a-s-convert-string-from-ebcdic-ascii */
+ if (__e2a_s (s) == (size_t)-1)
+ free (s);
+ else
+# endif
+ p = s;
+ }
break;
}
}
diff --git a/gl/lib/getprogname.h b/gl/lib/getprogname.h
index 9a35e584..13314f21 100644
--- a/gl/lib/getprogname.h
+++ b/gl/lib/getprogname.h
@@ -1,5 +1,5 @@
/* Program name management.
- Copyright (C) 2016-2022 Free Software Foundation, Inc.
+ Copyright (C) 2016-2023 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@@ -19,22 +19,8 @@
#include <stdlib.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Return the base name of the executing program.
- On native Windows this will usually end in ".exe" or ".EXE". */
-#ifndef HAVE_GETPROGNAME
-extern char const *getprogname (void)
-# ifdef HAVE_DECL_PROGRAM_INVOCATION_NAME
- _GL_ATTRIBUTE_PURE
-# endif
- ;
-#endif
-
-#ifdef __cplusplus
-}
+#if __GNUC__ || (__clang_major__ >= 4)
+# warning "The include file getprogname.h is deprecated. Use <stdlib.h> instead."
#endif
#endif
diff --git a/gl/lib/getrandom.c b/gl/lib/getrandom.c
index e1468730..19bb3429 100644
--- a/gl/lib/getrandom.c
+++ b/gl/lib/getrandom.c
@@ -1,6 +1,6 @@
/* Obtain a series of random bytes.
- Copyright 2020-2022 Free Software Foundation, Inc.
+ Copyright 2020-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -23,7 +23,6 @@
#include <errno.h>
#include <fcntl.h>
-#include <stdbool.h>
#include <unistd.h>
#if defined _WIN32 && ! defined __CYGWIN__
diff --git a/gl/lib/gettext.h b/gl/lib/gettext.h
index b3577a04..d0462c47 100644
--- a/gl/lib/gettext.h
+++ b/gl/lib/gettext.h
@@ -1,5 +1,5 @@
/* Convenience header for conditional use of GNU <libintl.h>.
- Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2022 Free Software
+ Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2023 Free Software
Foundation, Inc.
This file is free software: you can redistribute it and/or modify
diff --git a/gl/lib/gettime.c b/gl/lib/gettime.c
index 541af18b..ec40ff90 100644
--- a/gl/lib/gettime.c
+++ b/gl/lib/gettime.c
@@ -1,6 +1,6 @@
/* gettime -- get the system clock
- Copyright (C) 2002, 2004-2007, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004-2007, 2009-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -35,8 +35,8 @@ gettime (struct timespec *ts)
#else
struct timeval tv;
gettimeofday (&tv, NULL);
- ts->tv_sec = tv.tv_sec;
- ts->tv_nsec = tv.tv_usec * 1000;
+ *ts = (struct timespec) { .tv_sec = tv.tv_sec,
+ .tv_nsec = tv.tv_usec * 1000 };
#endif
}
diff --git a/gl/lib/gettimeofday.c b/gl/lib/gettimeofday.c
index 36c7920a..c71629cb 100644
--- a/gl/lib/gettimeofday.c
+++ b/gl/lib/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-2022 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2005-2007, 2009-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -113,8 +113,10 @@ gettimeofday (struct timeval *restrict tv, void *restrict tz)
ULONGLONG since_1970 =
since_1601 - (ULONGLONG) 134774 * (ULONGLONG) 86400 * (ULONGLONG) 10000000;
ULONGLONG microseconds_since_1970 = since_1970 / (ULONGLONG) 10;
- tv->tv_sec = microseconds_since_1970 / (ULONGLONG) 1000000;
- tv->tv_usec = microseconds_since_1970 % (ULONGLONG) 1000000;
+ *tv = (struct timeval) {
+ .tv_sec = microseconds_since_1970 / (ULONGLONG) 1000000,
+ .tv_usec = microseconds_since_1970 % (ULONGLONG) 1000000
+ };
return 0;
@@ -127,10 +129,7 @@ gettimeofday (struct timeval *restrict tv, void *restrict tz)
struct timeval otv;
int result = gettimeofday (&otv, (struct timezone *) tz);
if (result == 0)
- {
- tv->tv_sec = otv.tv_sec;
- tv->tv_usec = otv.tv_usec;
- }
+ *tv = otv;
# else
int result = gettimeofday (tv, (struct timezone *) tz);
# endif
@@ -143,8 +142,7 @@ gettimeofday (struct timeval *restrict tv, void *restrict tz)
# error "Only 1-second nominal clock resolution found. Is that intended?" \
"If so, compile with the -DOK_TO_USE_1S_CLOCK option."
# endif
- tv->tv_sec = time (NULL);
- tv->tv_usec = 0;
+ *tv = (struct timeval) { .tv_sec = time (NULL), .tv_usec = 0 };
return 0;
diff --git a/gl/lib/gl_anyhash1.h b/gl/lib/gl_anyhash1.h
index c6c046ee..0e28fddc 100644
--- a/gl/lib/gl_anyhash1.h
+++ b/gl/lib/gl_anyhash1.h
@@ -1,5 +1,5 @@
/* Hash table for sequential list, set, and map data type.
- Copyright (C) 2006, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2023 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This file is free software: you can redistribute it and/or modify
diff --git a/gl/lib/gl_anyhash2.h b/gl/lib/gl_anyhash2.h
index 5ceba987..c1911512 100644
--- a/gl/lib/gl_anyhash2.h
+++ b/gl/lib/gl_anyhash2.h
@@ -1,5 +1,5 @@
/* Hash table for sequential list, set, and map data type.
- Copyright (C) 2006, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2023 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This file is free software: you can redistribute it and/or modify
diff --git a/gl/lib/gl_anyhash_primes.h b/gl/lib/gl_anyhash_primes.h
index b00a6062..7be9c3c6 100644
--- a/gl/lib/gl_anyhash_primes.h
+++ b/gl/lib/gl_anyhash_primes.h
@@ -1,5 +1,5 @@
/* Table of primes, for use by hash tables.
- Copyright (C) 2006, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2023 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This file is free software: you can redistribute it and/or modify
diff --git a/gl/lib/gl_anylinked_list1.h b/gl/lib/gl_anylinked_list1.h
index 709106a3..51dda533 100644
--- a/gl/lib/gl_anylinked_list1.h
+++ b/gl/lib/gl_anylinked_list1.h
@@ -1,5 +1,5 @@
/* Sequential list data type implemented by a linked list.
- Copyright (C) 2006, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2023 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This file is free software: you can redistribute it and/or modify
diff --git a/gl/lib/gl_anylinked_list2.h b/gl/lib/gl_anylinked_list2.h
index af83f0d3..e8219ef7 100644
--- a/gl/lib/gl_anylinked_list2.h
+++ b/gl/lib/gl_anylinked_list2.h
@@ -1,5 +1,5 @@
/* Sequential list data type implemented by a linked list.
- Copyright (C) 2006-2022 Free Software Foundation, Inc.
+ Copyright (C) 2006-2023 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This file is free software: you can redistribute it and/or modify
diff --git a/gl/lib/gl_anyrbtree_list1.h b/gl/lib/gl_anyrbtree_list1.h
index 750fd364..ba42ab8d 100644
--- a/gl/lib/gl_anyrbtree_list1.h
+++ b/gl/lib/gl_anyrbtree_list1.h
@@ -1,5 +1,5 @@
/* Sequential list data type implemented by a binary tree.
- Copyright (C) 2006, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2023 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This file is free software: you can redistribute it and/or modify
diff --git a/gl/lib/gl_anyrbtree_list2.h b/gl/lib/gl_anyrbtree_list2.h
index 95d193cd..cd4205a8 100644
--- a/gl/lib/gl_anyrbtree_list2.h
+++ b/gl/lib/gl_anyrbtree_list2.h
@@ -1,5 +1,5 @@
/* Sequential list data type implemented by a binary tree.
- Copyright (C) 2006-2007, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2006-2007, 2009-2023 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This file is free software: you can redistribute it and/or modify
diff --git a/gl/lib/gl_anytree_list1.h b/gl/lib/gl_anytree_list1.h
index 1f05430d..47076fd4 100644
--- a/gl/lib/gl_anytree_list1.h
+++ b/gl/lib/gl_anytree_list1.h
@@ -1,5 +1,5 @@
/* Sequential list data type implemented by a binary tree.
- Copyright (C) 2006, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2023 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This file is free software: you can redistribute it and/or modify
diff --git a/gl/lib/gl_anytree_list2.h b/gl/lib/gl_anytree_list2.h
index 165b7153..5105760e 100644
--- a/gl/lib/gl_anytree_list2.h
+++ b/gl/lib/gl_anytree_list2.h
@@ -1,5 +1,5 @@
/* Sequential list data type implemented by a binary tree.
- Copyright (C) 2006-2022 Free Software Foundation, Inc.
+ Copyright (C) 2006-2023 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This file is free software: you can redistribute it and/or modify
diff --git a/gl/lib/gl_array_list.c b/gl/lib/gl_array_list.c
index 30186326..ca5527fe 100644
--- a/gl/lib/gl_array_list.c
+++ b/gl/lib/gl_array_list.c
@@ -1,5 +1,5 @@
/* Sequential list data type implemented by an array.
- Copyright (C) 2006-2022 Free Software Foundation, Inc.
+ Copyright (C) 2006-2023 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This file is free software: you can redistribute it and/or modify
diff --git a/gl/lib/gl_array_list.h b/gl/lib/gl_array_list.h
index 3d5b9f94..1e9afd48 100644
--- a/gl/lib/gl_array_list.h
+++ b/gl/lib/gl_array_list.h
@@ -1,5 +1,5 @@
/* Sequential list data type implemented by an array.
- Copyright (C) 2006, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2023 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This file is free software: you can redistribute it and/or modify
diff --git a/gl/lib/gl_hash_map.c b/gl/lib/gl_hash_map.c
index 6042b60e..a79815ab 100644
--- a/gl/lib/gl_hash_map.c
+++ b/gl/lib/gl_hash_map.c
@@ -1,5 +1,5 @@
/* Map data type implemented by a hash table.
- Copyright (C) 2006, 2008-2022 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2008-2023 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2018.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/lib/gl_hash_map.h b/gl/lib/gl_hash_map.h
index 66927760..edcd9a24 100644
--- a/gl/lib/gl_hash_map.h
+++ b/gl/lib/gl_hash_map.h
@@ -1,5 +1,5 @@
/* Map data type implemented by a hash table.
- Copyright (C) 2006, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2023 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2018.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/lib/gl_hash_set.c b/gl/lib/gl_hash_set.c
index 75b2e997..025d1e17 100644
--- a/gl/lib/gl_hash_set.c
+++ b/gl/lib/gl_hash_set.c
@@ -1,5 +1,5 @@
/* Set data type implemented by a hash table.
- Copyright (C) 2006, 2008-2022 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2008-2023 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2018.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/lib/gl_hash_set.h b/gl/lib/gl_hash_set.h
index ea61eb46..507820df 100644
--- a/gl/lib/gl_hash_set.h
+++ b/gl/lib/gl_hash_set.h
@@ -1,5 +1,5 @@
/* Set data type implemented by a hash table.
- Copyright (C) 2006, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2023 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2018.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/lib/gl_linkedhash_list.c b/gl/lib/gl_linkedhash_list.c
index dbf43de7..dd755b10 100644
--- a/gl/lib/gl_linkedhash_list.c
+++ b/gl/lib/gl_linkedhash_list.c
@@ -1,5 +1,5 @@
/* Sequential list data type implemented by a hash table with a linked list.
- Copyright (C) 2006, 2008-2022 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2008-2023 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This file is free software: you can redistribute it and/or modify
diff --git a/gl/lib/gl_linkedhash_list.h b/gl/lib/gl_linkedhash_list.h
index 77ef8f46..589b7675 100644
--- a/gl/lib/gl_linkedhash_list.h
+++ b/gl/lib/gl_linkedhash_list.h
@@ -1,5 +1,5 @@
/* Sequential list data type implemented by a hash table with a linked list.
- Copyright (C) 2006, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2023 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This file is free software: you can redistribute it and/or modify
diff --git a/gl/lib/gl_list.c b/gl/lib/gl_list.c
index cccb39cc..6fd757c7 100644
--- a/gl/lib/gl_list.c
+++ b/gl/lib/gl_list.c
@@ -1,6 +1,6 @@
/* Abstract sequential list data type.
- Copyright (C) 2006-2022 Free Software Foundation, Inc.
+ Copyright (C) 2006-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/gl_list.h b/gl/lib/gl_list.h
index bf6a2ba4..b550db06 100644
--- a/gl/lib/gl_list.h
+++ b/gl/lib/gl_list.h
@@ -1,5 +1,5 @@
/* Abstract sequential list data type. -*- coding: utf-8 -*-
- Copyright (C) 2006-2022 Free Software Foundation, Inc.
+ Copyright (C) 2006-2023 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This file is free software: you can redistribute it and/or modify
@@ -18,12 +18,14 @@
#ifndef _GL_LIST_H
#define _GL_LIST_H
-#include <stdbool.h>
-#include <stddef.h>
-
-#ifndef _GL_INLINE_HEADER_BEGIN
+/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE,
+ _GL_ATTRIBUTE_NODISCARD. */
+#if !_GL_CONFIG_H_INCLUDED
#error "Please include config.h first."
#endif
+
+#include <stddef.h>
+
_GL_INLINE_HEADER_BEGIN
#ifndef GL_LIST_INLINE
# define GL_LIST_INLINE _GL_INLINE
diff --git a/gl/lib/gl_map.c b/gl/lib/gl_map.c
index 56043541..75e06747 100644
--- a/gl/lib/gl_map.c
+++ b/gl/lib/gl_map.c
@@ -1,6 +1,6 @@
/* Abstract map data type.
- Copyright (C) 2018-2022 Free Software Foundation, Inc.
+ Copyright (C) 2018-2023 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
diff --git a/gl/lib/gl_map.h b/gl/lib/gl_map.h
index a7a37643..12846f44 100644
--- a/gl/lib/gl_map.h
+++ b/gl/lib/gl_map.h
@@ -1,5 +1,5 @@
/* Abstract map data type.
- Copyright (C) 2006-2007, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2006-2007, 2009-2023 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2018.
This program is free software: you can redistribute it and/or modify
@@ -18,12 +18,14 @@
#ifndef _GL_MAP_H
#define _GL_MAP_H
-#include <stdbool.h>
-#include <stddef.h>
-
-#ifndef _GL_INLINE_HEADER_BEGIN
+/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE,
+ _GL_ATTRIBUTE_NODISCARD. */
+#if !_GL_CONFIG_H_INCLUDED
#error "Please include config.h first."
#endif
+
+#include <stddef.h>
+
_GL_INLINE_HEADER_BEGIN
#ifndef GL_MAP_INLINE
# define GL_MAP_INLINE _GL_INLINE
diff --git a/gl/lib/gl_rbtree_list.c b/gl/lib/gl_rbtree_list.c
index a7c35158..d395d684 100644
--- a/gl/lib/gl_rbtree_list.c
+++ b/gl/lib/gl_rbtree_list.c
@@ -1,5 +1,5 @@
/* Sequential list data type implemented by a binary tree.
- Copyright (C) 2006, 2008-2022 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2008-2023 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This file is free software: you can redistribute it and/or modify
@@ -37,8 +37,6 @@
#include "gl_anytree_list2.h"
/* For debugging. */
-extern void gl_rbtree_list_check_invariants (gl_list_t list);
-
static unsigned int
check_invariants (gl_list_node_t node, gl_list_node_t parent)
{
@@ -62,6 +60,7 @@ check_invariants (gl_list_node_t node, gl_list_node_t parent)
return left_blackheight + (node->color == BLACK ? 1 : 0);
}
+extern void gl_rbtree_list_check_invariants (gl_list_t list);
void
gl_rbtree_list_check_invariants (gl_list_t list)
{
diff --git a/gl/lib/gl_rbtree_list.h b/gl/lib/gl_rbtree_list.h
index 4ff4f1e9..4896644c 100644
--- a/gl/lib/gl_rbtree_list.h
+++ b/gl/lib/gl_rbtree_list.h
@@ -1,5 +1,5 @@
/* Sequential list data type implemented by a binary tree.
- Copyright (C) 2006, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2023 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This file is free software: you can redistribute it and/or modify
diff --git a/gl/lib/gl_set.c b/gl/lib/gl_set.c
index d8e53d64..233da73a 100644
--- a/gl/lib/gl_set.c
+++ b/gl/lib/gl_set.c
@@ -1,6 +1,6 @@
/* Abstract set data type.
- Copyright (C) 2018-2022 Free Software Foundation, Inc.
+ Copyright (C) 2018-2023 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
diff --git a/gl/lib/gl_set.h b/gl/lib/gl_set.h
index 14b3053e..e88e2552 100644
--- a/gl/lib/gl_set.h
+++ b/gl/lib/gl_set.h
@@ -1,5 +1,5 @@
/* Abstract set data type.
- Copyright (C) 2006-2007, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2006-2007, 2009-2023 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2018.
This program is free software: you can redistribute it and/or modify
@@ -18,12 +18,14 @@
#ifndef _GL_SET_H
#define _GL_SET_H
-#include <stdbool.h>
-#include <stddef.h>
-
-#ifndef _GL_INLINE_HEADER_BEGIN
+/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE,
+ _GL_ATTRIBUTE_NODISCARD. */
+#if !_GL_CONFIG_H_INCLUDED
#error "Please include config.h first."
#endif
+
+#include <stddef.h>
+
_GL_INLINE_HEADER_BEGIN
#ifndef GL_SET_INLINE
# define GL_SET_INLINE _GL_INLINE
diff --git a/gl/lib/gl_xlist.c b/gl/lib/gl_xlist.c
index 204698e7..5ca5a78b 100644
--- a/gl/lib/gl_xlist.c
+++ b/gl/lib/gl_xlist.c
@@ -1,6 +1,6 @@
/* Abstract sequential list data type, with out-of-memory checking.
- Copyright (C) 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2009-2023 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
diff --git a/gl/lib/gl_xlist.h b/gl/lib/gl_xlist.h
index abef3838..91ed804b 100644
--- a/gl/lib/gl_xlist.h
+++ b/gl/lib/gl_xlist.h
@@ -1,5 +1,5 @@
/* Abstract sequential list data type, with out-of-memory checking.
- Copyright (C) 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2009-2023 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2009.
This program is free software: you can redistribute it and/or modify
@@ -18,12 +18,15 @@
#ifndef _GL_XLIST_H
#define _GL_XLIST_H
+/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE,
+ _GL_ATTRIBUTE_RETURNS_NONNULL. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
#include "gl_list.h"
#include "xalloc.h"
-#ifndef _GL_INLINE_HEADER_BEGIN
- #error "Please include config.h first."
-#endif
_GL_INLINE_HEADER_BEGIN
#ifndef GL_XLIST_INLINE
# define GL_XLIST_INLINE _GL_INLINE
diff --git a/gl/lib/gl_xmap.c b/gl/lib/gl_xmap.c
index 3a9e886a..0787f6f2 100644
--- a/gl/lib/gl_xmap.c
+++ b/gl/lib/gl_xmap.c
@@ -1,6 +1,6 @@
/* Abstract map data type, with out-of-memory checking.
- Copyright (C) 2018-2022 Free Software Foundation, Inc.
+ Copyright (C) 2018-2023 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
diff --git a/gl/lib/gl_xmap.h b/gl/lib/gl_xmap.h
index 85dc1539..ad1edbfb 100644
--- a/gl/lib/gl_xmap.h
+++ b/gl/lib/gl_xmap.h
@@ -1,5 +1,5 @@
/* Abstract map data type, with out-of-memory checking.
- Copyright (C) 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2009-2023 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2018.
This program is free software: you can redistribute it and/or modify
@@ -18,12 +18,15 @@
#ifndef _GL_XMAP_H
#define _GL_XMAP_H
+/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE,
+ _GL_ATTRIBUTE_RETURNS_NONNULL. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
#include "gl_map.h"
#include "xalloc.h"
-#ifndef _GL_INLINE_HEADER_BEGIN
- #error "Please include config.h first."
-#endif
_GL_INLINE_HEADER_BEGIN
#ifndef GL_XMAP_INLINE
# define GL_XMAP_INLINE _GL_INLINE
diff --git a/gl/lib/gl_xset.c b/gl/lib/gl_xset.c
index fb7c1462..23589bd2 100644
--- a/gl/lib/gl_xset.c
+++ b/gl/lib/gl_xset.c
@@ -1,6 +1,6 @@
/* Abstract set data type, with out-of-memory checking.
- Copyright (C) 2018-2022 Free Software Foundation, Inc.
+ Copyright (C) 2018-2023 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
diff --git a/gl/lib/gl_xset.h b/gl/lib/gl_xset.h
index ad80a8c2..921e1f38 100644
--- a/gl/lib/gl_xset.h
+++ b/gl/lib/gl_xset.h
@@ -1,5 +1,5 @@
/* Abstract set data type, with out-of-memory checking.
- Copyright (C) 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2009-2023 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2009.
This program is free software: you can redistribute it and/or modify
@@ -18,12 +18,15 @@
#ifndef _GL_XSET_H
#define _GL_XSET_H
+/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE,
+ _GL_ATTRIBUTE_RETURNS_NONNULL. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
#include "gl_set.h"
#include "xalloc.h"
-#ifndef _GL_INLINE_HEADER_BEGIN
- #error "Please include config.h first."
-#endif
_GL_INLINE_HEADER_BEGIN
#ifndef GL_XSET_INLINE
# define GL_XSET_INLINE _GL_INLINE
diff --git a/gl/lib/glob-libc.h b/gl/lib/glob-libc.h
index efef63d3..09b251e5 100644
--- a/gl/lib/glob-libc.h
+++ b/gl/lib/glob-libc.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2022 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2023 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/gl/lib/glob.c b/gl/lib/glob.c
index 57cb3bd1..af0694ee 100644
--- a/gl/lib/glob.c
+++ b/gl/lib/glob.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2022 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2023 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
@@ -31,7 +31,6 @@
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
-#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <assert.h>
@@ -183,16 +182,17 @@ convert_dirent64 (const struct dirent64 *source)
#endif
#ifndef _LIBC
-/* The results of opendir() in this file are not used with dirfd and fchdir,
- and we do not leak fds to any single-threaded code that could use stdio,
- therefore save some unnecessary recursion in fchdir.c and opendir_safer.c.
- FIXME - if the kernel ever adds support for multi-thread safety for
- avoiding standard fds, then we should use opendir_safer. */
-# ifdef GNULIB_defined_opendir
-# undef opendir
-# endif
-# ifdef GNULIB_defined_closedir
-# undef closedir
+/* The results of opendir() in this file are used with dirfd. But they are
+ not used with fchdir, and we do not leak fds to any single-threaded code
+ that could use stdio, therefore save some unnecessary recursion in
+ fchdir.c and opendir_safer.c. */
+# ifndef GNULIB_defined_DIR
+# ifdef GNULIB_defined_opendir
+# undef opendir
+# endif
+# ifdef GNULIB_defined_closedir
+# undef closedir
+# endif
# endif
/* Just use malloc. */
diff --git a/gl/lib/glob.in.h b/gl/lib/glob.in.h
index a0a3156c..4a311f81 100644
--- a/gl/lib/glob.in.h
+++ b/gl/lib/glob.in.h
@@ -1,6 +1,6 @@
/* glob.h -- Find a path matching a pattern.
- Copyright (C) 2005-2007, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2005-2007, 2009-2023 Free Software Foundation, Inc.
Written by Derek Price <derek@ximbiot.com> & Paul Eggert <eggert@CS.UCLA.EDU>
@@ -32,6 +32,11 @@
#ifndef _@GUARD_PREFIX@_GLOB_H
#define _@GUARD_PREFIX@_GLOB_H
+/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
/* The definition of _GL_ARG_NONNULL is copied here. */
@@ -120,7 +125,9 @@ _GL_CXXALIAS_SYS (glob, int, (const char *_Restrict_ __pattern, int __flags,
_gl_glob_errfunc_fn __errfunc,
glob_t *_Restrict_ __pglob));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (glob);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef glob
# if HAVE_RAW_DECL_GLOB
diff --git a/gl/lib/glob_internal.h b/gl/lib/glob_internal.h
index bd023927..b85fa4ff 100644
--- a/gl/lib/glob_internal.h
+++ b/gl/lib/glob_internal.h
@@ -1,5 +1,5 @@
/* Shared definition for glob and glob_pattern_p.
- Copyright (C) 2017-2022 Free Software Foundation, Inc.
+ Copyright (C) 2017-2023 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/gl/lib/glob_pattern_p.c b/gl/lib/glob_pattern_p.c
index 4044a508..8ac0bc60 100644
--- a/gl/lib/glob_pattern_p.c
+++ b/gl/lib/glob_pattern_p.c
@@ -1,5 +1,5 @@
/* Return nonzero if PATTERN contains any metacharacters.
- Copyright (C) 2017-2022 Free Software Foundation, Inc.
+ Copyright (C) 2017-2023 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/gl/lib/globfree.c b/gl/lib/globfree.c
index f034becf..853f3bef 100644
--- a/gl/lib/globfree.c
+++ b/gl/lib/globfree.c
@@ -1,5 +1,5 @@
/* Frees the dynamically allocated storage from an earlier call to glob.
- Copyright (C) 2017-2022 Free Software Foundation, Inc.
+ Copyright (C) 2017-2023 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/gl/lib/glthread/lock.c b/gl/lib/glthread/lock.c
index b650c219..82fb7553 100644
--- a/gl/lib/glthread/lock.c
+++ b/gl/lib/glthread/lock.c
@@ -1,5 +1,5 @@
/* Locking in multithreaded situations.
- Copyright (C) 2005-2022 Free Software Foundation, Inc.
+ Copyright (C) 2005-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/glthread/lock.h b/gl/lib/glthread/lock.h
index 47eed8fe..805cd1cf 100644
--- a/gl/lib/glthread/lock.h
+++ b/gl/lib/glthread/lock.h
@@ -1,5 +1,5 @@
/* Locking in multithreaded situations.
- Copyright (C) 2005-2022 Free Software Foundation, Inc.
+ Copyright (C) 2005-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -77,6 +77,14 @@
#ifndef _LOCK_H
#define _LOCK_H
+/* This file uses HAVE_THREADS_H, HAVE_PTHREAD_RWLOCK,
+ HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER,
+ PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
+ HAVE_PTHREAD_MUTEX_RECURSIVE. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
#include <errno.h>
#include <stdlib.h>
diff --git a/gl/lib/glthread/threadlib.c b/gl/lib/glthread/threadlib.c
index 88a76bad..5ecf827f 100644
--- a/gl/lib/glthread/threadlib.c
+++ b/gl/lib/glthread/threadlib.c
@@ -1,5 +1,5 @@
/* Multithreading primitives.
- Copyright (C) 2005-2022 Free Software Foundation, Inc.
+ Copyright (C) 2005-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/hard-locale.c b/gl/lib/hard-locale.c
index f7fbc470..c01fce53 100644
--- a/gl/lib/hard-locale.c
+++ b/gl/lib/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-2022 Free Software
+ Copyright (C) 1997-1999, 2002-2004, 2006-2007, 2009-2023 Free Software
Foundation, Inc.
This file is free software: you can redistribute it and/or modify
@@ -21,6 +21,7 @@
#include "hard-locale.h"
#include <locale.h>
+#include <stdlib.h>
#include <string.h>
bool
@@ -31,5 +32,16 @@ hard_locale (int category)
if (setlocale_null_r (category, locale, sizeof (locale)))
return false;
- return !(strcmp (locale, "C") == 0 || strcmp (locale, "POSIX") == 0);
+ if (!(strcmp (locale, "C") == 0 || strcmp (locale, "POSIX") == 0))
+ return true;
+
+#if defined __ANDROID__
+ /* On Android 5.0 or newer, it is possible to set a locale that has the same
+ name as the "C" locale but in fact uses UTF-8 encoding. Cf. test case 2 in
+ <https://lists.gnu.org/archive/html/bug-gnulib/2023-01/msg00141.html>. */
+ if (MB_CUR_MAX > 1)
+ return true;
+#endif
+
+ return false;
}
diff --git a/gl/lib/hard-locale.h b/gl/lib/hard-locale.h
index 6066f4ed..5123d71d 100644
--- a/gl/lib/hard-locale.h
+++ b/gl/lib/hard-locale.h
@@ -1,6 +1,6 @@
/* Determine whether a locale is hard.
- Copyright (C) 1999, 2003-2004, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2003-2004, 2009-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -18,11 +18,11 @@
#ifndef HARD_LOCALE_H_
# define HARD_LOCALE_H_ 1
-# include <stdbool.h>
-
/* 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. */
+ CATEGORY must be one of the LC_* values, but not LC_ALL.
+ Note: This function uses the current global locale; it ignores the
+ per-thread locale. */
extern bool hard_locale (int category);
#endif /* HARD_LOCALE_H_ */
diff --git a/gl/lib/hash-pjw-bare.c b/gl/lib/hash-pjw-bare.c
index 31944a1d..e3ca5832 100644
--- a/gl/lib/hash-pjw-bare.c
+++ b/gl/lib/hash-pjw-bare.c
@@ -1,6 +1,6 @@
/* hash-pjw-bare.c -- compute a hash value from a provided buffer.
- Copyright (C) 2012-2022 Free Software Foundation, Inc.
+ Copyright (C) 2012-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/hash-pjw-bare.h b/gl/lib/hash-pjw-bare.h
index a18c7f1b..7498ca20 100644
--- a/gl/lib/hash-pjw-bare.h
+++ b/gl/lib/hash-pjw-bare.h
@@ -1,5 +1,5 @@
/* hash-pjw-bare.h -- declaration for a simple hash function
- Copyright (C) 2012-2022 Free Software Foundation, Inc.
+ Copyright (C) 2012-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -14,6 +14,11 @@
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
+/* This file uses _GL_ATTRIBUTE_PURE. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
#include <stddef.h>
/* Compute a hash code for a buffer starting at X and of size N,
diff --git a/gl/lib/hash-pjw.c b/gl/lib/hash-pjw.c
index 8ba139d5..74afac76 100644
--- a/gl/lib/hash-pjw.c
+++ b/gl/lib/hash-pjw.c
@@ -1,6 +1,6 @@
/* hash-pjw.c -- compute a hash value from a NUL-terminated string.
- Copyright (C) 2001, 2003, 2006, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2003, 2006, 2009-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/hash-pjw.h b/gl/lib/hash-pjw.h
index cdf4da27..69af02f2 100644
--- a/gl/lib/hash-pjw.h
+++ b/gl/lib/hash-pjw.h
@@ -1,5 +1,5 @@
/* hash-pjw.h -- declaration for a simple hash function
- Copyright (C) 2001, 2003, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2003, 2009-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -14,6 +14,11 @@
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
+/* This file uses _GL_ATTRIBUTE_PURE. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
#include <stddef.h>
/* Compute a hash code for a NUL-terminated string starting at X,
diff --git a/gl/lib/hash-triple-simple.c b/gl/lib/hash-triple-simple.c
index b021f348..b0fd31dc 100644
--- a/gl/lib/hash-triple-simple.c
+++ b/gl/lib/hash-triple-simple.c
@@ -1,5 +1,5 @@
/* Hash functions for file-related triples: name, device, inode.
- Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2023 Free Software Foundation, Inc.
This 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/gl/lib/hash-triple.h b/gl/lib/hash-triple.h
index 929995f2..f2cf38b1 100644
--- a/gl/lib/hash-triple.h
+++ b/gl/lib/hash-triple.h
@@ -1,5 +1,5 @@
/* Hash functions for file-related (name, device, inode) triples.
- Copyright (C) 2007-2022 Free Software Foundation, Inc.
+ Copyright (C) 2007-2023 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -19,9 +19,13 @@
#ifndef HASH_TRIPLE_H
#define HASH_TRIPLE_H
+/* This file uses _GL_ATTRIBUTE_PURE. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
#include <sys/types.h>
#include <sys/stat.h>
-#include <stdbool.h>
/* Describe a just-created or just-renamed destination file. */
struct F_triple
diff --git a/gl/lib/hash.c b/gl/lib/hash.c
index eb723416..918aa0d1 100644
--- a/gl/lib/hash.c
+++ b/gl/lib/hash.c
@@ -1,6 +1,6 @@
/* hash - hashing table processing.
- Copyright (C) 1998-2004, 2006-2007, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 1998-2004, 2006-2007, 2009-2023 Free Software Foundation, Inc.
Written by Jim Meyering, 1992.
diff --git a/gl/lib/hash.h b/gl/lib/hash.h
index ebfc7407..54d3f22f 100644
--- a/gl/lib/hash.h
+++ b/gl/lib/hash.h
@@ -1,5 +1,5 @@
/* hash - hashing table processing.
- Copyright (C) 1998-1999, 2001, 2003, 2009-2022 Free Software Foundation,
+ Copyright (C) 1998-1999, 2001, 2003, 2009-2023 Free Software Foundation,
Inc.
Written by Jim Meyering <meyering@ascend.com>, 1998.
@@ -24,8 +24,14 @@
#ifndef HASH_H_
# define HASH_H_
+/* This file uses _GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_DEPRECATED,
+ _GL_ATTRIBUTE_MALLOC, _GL_ATTRIBUTE_NODISCARD, _GL_ATTRIBUTE_PURE,
+ _GL_ATTRIBUTE_RETURNS_NONNULL. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
# include <stdio.h>
-# include <stdbool.h>
# ifdef __cplusplus
extern "C" {
@@ -198,7 +204,7 @@ extern Hash_table *hash_xinitialize (size_t candidate,
_GL_ATTRIBUTE_RETURNS_NONNULL;
/* Make all buckets empty, placing any chained entries on the free list.
- Apply the user-specified function data_freer (if any) to the datas of any
+ Apply the user-specified function data_freer (if any) to the data of any
affected entries. */
extern void hash_clear (Hash_table *table);
diff --git a/gl/lib/ialloc.c b/gl/lib/ialloc.c
index 43c10433..cd44d8ca 100644
--- a/gl/lib/ialloc.c
+++ b/gl/lib/ialloc.c
@@ -1,6 +1,6 @@
/* malloc with idx_t rather than size_t
- Copyright 2021-2022 Free Software Foundation, Inc.
+ Copyright 2021-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/ialloc.h b/gl/lib/ialloc.h
index 37cf4bfb..22f57a47 100644
--- a/gl/lib/ialloc.h
+++ b/gl/lib/ialloc.h
@@ -1,6 +1,6 @@
/* ialloc.h -- malloc with idx_t rather than size_t
- Copyright 2021-2022 Free Software Foundation, Inc.
+ Copyright 2021-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -18,15 +18,18 @@
#ifndef IALLOC_H_
#define IALLOC_H_
+/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE, _GL_ATTRIBUTE_COLD,
+ _GL_ATTRIBUTE_MALLOC. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
#include "idx.h"
#include <errno.h>
#include <stdint.h>
#include <stdlib.h>
-#ifndef _GL_INLINE_HEADER_BEGIN
- #error "Please include config.h first."
-#endif
_GL_INLINE_HEADER_BEGIN
#ifndef IALLOC_INLINE
# define IALLOC_INLINE _GL_INLINE
@@ -43,6 +46,9 @@ _gl_alloc_nomem (void)
return NULL;
}
+/* imalloc (size) is like malloc (size).
+ It returns a non-NULL pointer to size bytes of memory.
+ Upon failure, it returns NULL with errno set. */
IALLOC_INLINE
_GL_ATTRIBUTE_MALLOC /*_GL_ATTRIBUTE_DEALLOC_FREE*/
void *
@@ -51,6 +57,9 @@ imalloc (idx_t s)
return s <= SIZE_MAX ? malloc (s) : _gl_alloc_nomem ();
}
+/* irealloc (ptr, size) is like realloc (ptr, size).
+ It returns a non-NULL pointer to size bytes of memory.
+ Upon failure, it returns NULL with errno set. */
IALLOC_INLINE
/*_GL_ATTRIBUTE_DEALLOC_FREE*/
void *
@@ -61,6 +70,9 @@ irealloc (void *p, idx_t s)
return s <= SIZE_MAX ? realloc (p, s | !s) : _gl_alloc_nomem ();
}
+/* icalloc (num, size) is like calloc (num, size).
+ It returns a non-NULL pointer to num * size bytes of memory.
+ Upon failure, it returns NULL with errno set. */
IALLOC_INLINE
_GL_ATTRIBUTE_MALLOC /*_GL_ATTRIBUTE_DEALLOC_FREE*/
void *
@@ -81,6 +93,9 @@ icalloc (idx_t n, idx_t s)
return calloc (n, s);
}
+/* ireallocarray (ptr, num, size) is like reallocarray (ptr, num, size).
+ It returns a non-NULL pointer to num * size bytes of memory.
+ Upon failure, it returns NULL with errno set. */
IALLOC_INLINE void *
ireallocarray (void *p, idx_t n, idx_t s)
{
@@ -97,4 +112,6 @@ ireallocarray (void *p, idx_t n, idx_t s)
}
#endif
+_GL_INLINE_HEADER_END
+
#endif
diff --git a/gl/lib/idpriv-drop.c b/gl/lib/idpriv-drop.c
index e122cb08..b0599447 100644
--- a/gl/lib/idpriv-drop.c
+++ b/gl/lib/idpriv-drop.c
@@ -1,5 +1,5 @@
/* Dropping uid/gid privileges of the current process permanently.
- Copyright (C) 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2009-2023 Free Software Foundation, Inc.
This 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/gl/lib/idpriv-droptemp.c b/gl/lib/idpriv-droptemp.c
index f3272365..2a85431a 100644
--- a/gl/lib/idpriv-droptemp.c
+++ b/gl/lib/idpriv-droptemp.c
@@ -1,5 +1,5 @@
/* Dropping uid/gid privileges of the current process temporarily.
- Copyright (C) 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2009-2023 Free Software Foundation, Inc.
This 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/gl/lib/idpriv.h b/gl/lib/idpriv.h
index b97d1922..99f87c08 100644
--- a/gl/lib/idpriv.h
+++ b/gl/lib/idpriv.h
@@ -1,5 +1,5 @@
/* Dropping uid/gid privileges of the current process.
- Copyright (C) 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2009-2023 Free Software Foundation, Inc.
This 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/gl/lib/idx.h b/gl/lib/idx.h
index c3669dda..23020b7e 100644
--- a/gl/lib/idx.h
+++ b/gl/lib/idx.h
@@ -1,5 +1,5 @@
/* A type for indices and sizes.
- Copyright (C) 2020-2022 Free Software Foundation, Inc.
+ Copyright (C) 2020-2023 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/gl/lib/intprops-internal.h b/gl/lib/intprops-internal.h
new file mode 100644
index 00000000..0467a9ca
--- /dev/null
+++ b/gl/lib/intprops-internal.h
@@ -0,0 +1,392 @@
+/* intprops-internal.h -- properties of integer types not visible to users
+
+ Copyright (C) 2001-2023 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as published
+ by the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
+
+#ifndef _GL_INTPROPS_INTERNAL_H
+#define _GL_INTPROPS_INTERNAL_H
+
+#include <limits.h>
+
+/* Return a value with the common real type of E and V and the value of V.
+ Do not evaluate E. */
+#define _GL_INT_CONVERT(e, v) ((1 ? 0 : (e)) + (v))
+
+/* Act like _GL_INT_CONVERT (E, -V) but work around a bug in IRIX 6.5 cc; see
+ <https://lists.gnu.org/r/bug-gnulib/2011-05/msg00406.html>. */
+#define _GL_INT_NEGATE_CONVERT(e, v) ((1 ? 0 : (e)) - (v))
+
+/* The extra casts in the following macros work around compiler bugs,
+ e.g., in Cray C 5.0.3.0. */
+
+/* True if the real type T is signed. */
+#define _GL_TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
+
+/* Return 1 if the real expression E, after promotion, has a
+ signed or floating type. Do not evaluate E. */
+#define _GL_EXPR_SIGNED(e) (_GL_INT_NEGATE_CONVERT (e, 1) < 0)
+
+
+/* Minimum and maximum values for integer types and expressions. */
+
+/* The width in bits of the integer type or expression T.
+ Do not evaluate T. T must not be a bit-field expression.
+ Padding bits are not supported; this is checked at compile-time below. */
+#define _GL_TYPE_WIDTH(t) (sizeof (t) * CHAR_BIT)
+
+/* The maximum and minimum values for the type of the expression E,
+ after integer promotion. E is not evaluated. */
+#define _GL_INT_MINIMUM(e) \
+ (_GL_EXPR_SIGNED (e) \
+ ? ~ _GL_SIGNED_INT_MAXIMUM (e) \
+ : _GL_INT_CONVERT (e, 0))
+#define _GL_INT_MAXIMUM(e) \
+ (_GL_EXPR_SIGNED (e) \
+ ? _GL_SIGNED_INT_MAXIMUM (e) \
+ : _GL_INT_NEGATE_CONVERT (e, 1))
+#define _GL_SIGNED_INT_MAXIMUM(e) \
+ (((_GL_INT_CONVERT (e, 1) << (_GL_TYPE_WIDTH (+ (e)) - 2)) - 1) * 2 + 1)
+
+/* Work around OpenVMS incompatibility with C99. */
+#if !defined LLONG_MAX && defined __INT64_MAX
+# define LLONG_MAX __INT64_MAX
+# define LLONG_MIN __INT64_MIN
+#endif
+
+/* This include file assumes that signed types are two's complement without
+ padding bits; the above macros have undefined behavior otherwise.
+ If this is a problem for you, please let us know how to fix it for your host.
+ This assumption is tested by the intprops-tests module. */
+
+/* Does the __typeof__ keyword work? This could be done by
+ 'configure', but for now it's easier to do it by hand. */
+#if (2 <= __GNUC__ \
+ || (4 <= __clang_major__) \
+ || (1210 <= __IBMC__ && defined __IBM__TYPEOF__) \
+ || (0x5110 <= __SUNPRO_C && !__STDC__))
+# define _GL_HAVE___TYPEOF__ 1
+#else
+# define _GL_HAVE___TYPEOF__ 0
+#endif
+
+/* Return 1 if the integer type or expression T might be signed. Return 0
+ if it is definitely unsigned. T must not be a bit-field expression.
+ This macro does not evaluate its argument, and expands to an
+ integer constant expression. */
+#if _GL_HAVE___TYPEOF__
+# define _GL_SIGNED_TYPE_OR_EXPR(t) _GL_TYPE_SIGNED (__typeof__ (t))
+#else
+# define _GL_SIGNED_TYPE_OR_EXPR(t) 1
+#endif
+
+/* Return 1 if - A would overflow in [MIN,MAX] arithmetic.
+ A should not have side effects, and A's type should be an
+ integer with minimum value MIN and maximum MAX. */
+#define _GL_INT_NEGATE_RANGE_OVERFLOW(a, min, max) \
+ ((min) < 0 ? (a) < - (max) : 0 < (a))
+
+/* True if __builtin_add_overflow (A, B, P) and __builtin_sub_overflow
+ (A, B, P) work when P is non-null. */
+#ifdef __EDG__
+/* EDG-based compilers like nvc 22.1 cannot add 64-bit signed to unsigned
+ <https://bugs.gnu.org/53256>. */
+# define _GL_HAS_BUILTIN_ADD_OVERFLOW 0
+#elif defined __has_builtin
+# define _GL_HAS_BUILTIN_ADD_OVERFLOW __has_builtin (__builtin_add_overflow)
+/* __builtin_{add,sub}_overflow exists but is not reliable in GCC 5.x and 6.x,
+ see <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98269>. */
+#elif 7 <= __GNUC__
+# define _GL_HAS_BUILTIN_ADD_OVERFLOW 1
+#else
+# define _GL_HAS_BUILTIN_ADD_OVERFLOW 0
+#endif
+
+/* True if __builtin_mul_overflow (A, B, P) works when P is non-null. */
+#if defined __clang_major__ && __clang_major__ < 14
+/* Work around Clang bug <https://bugs.llvm.org/show_bug.cgi?id=16404>. */
+# define _GL_HAS_BUILTIN_MUL_OVERFLOW 0
+#else
+# define _GL_HAS_BUILTIN_MUL_OVERFLOW _GL_HAS_BUILTIN_ADD_OVERFLOW
+#endif
+
+/* True if __builtin_add_overflow_p (A, B, C) works, and similarly for
+ __builtin_sub_overflow_p and __builtin_mul_overflow_p. */
+#ifdef __EDG__
+/* In EDG-based compilers like ICC 2021.3 and earlier,
+ __builtin_add_overflow_p etc. are not treated as integral constant
+ expressions even when all arguments are. */
+# define _GL_HAS_BUILTIN_OVERFLOW_P 0
+#elif defined __has_builtin
+# define _GL_HAS_BUILTIN_OVERFLOW_P __has_builtin (__builtin_mul_overflow_p)
+#else
+# define _GL_HAS_BUILTIN_OVERFLOW_P (7 <= __GNUC__)
+#endif
+
+#if (!defined _GL_STDCKDINT_H && 202311 <= __STDC_VERSION__ \
+ && ! (_GL_HAS_BUILTIN_ADD_OVERFLOW && _GL_HAS_BUILTIN_MUL_OVERFLOW))
+# include <stdckdint.h>
+#endif
+
+/* Store the low-order bits of A + B, A - B, A * B, respectively, into *R.
+ Return 1 if the result overflows. Arguments should not have side
+ effects and A, B and *R can be of any integer type other than char,
+ bool, a bit-precise integer type, or an enumeration type. */
+#if _GL_HAS_BUILTIN_ADD_OVERFLOW
+# define _GL_INT_ADD_WRAPV(a, b, r) __builtin_add_overflow (a, b, r)
+# define _GL_INT_SUBTRACT_WRAPV(a, b, r) __builtin_sub_overflow (a, b, r)
+#elif defined ckd_add && defined ckd_sub && !defined _GL_STDCKDINT_H
+# define _GL_INT_ADD_WRAPV(a, b, r) ckd_add (r, + (a), + (b))
+# define _GL_INT_SUBTRACT_WRAPV(a, b, r) ckd_sub (r, + (a), + (b))
+#else
+# define _GL_INT_ADD_WRAPV(a, b, r) \
+ _GL_INT_OP_WRAPV (a, b, r, +, _GL_INT_ADD_RANGE_OVERFLOW)
+# define _GL_INT_SUBTRACT_WRAPV(a, b, r) \
+ _GL_INT_OP_WRAPV (a, b, r, -, _GL_INT_SUBTRACT_RANGE_OVERFLOW)
+#endif
+#if _GL_HAS_BUILTIN_MUL_OVERFLOW
+# if ((9 < __GNUC__ + (3 <= __GNUC_MINOR__) \
+ || (__GNUC__ == 8 && 4 <= __GNUC_MINOR__)) \
+ && !defined __EDG__)
+# define _GL_INT_MULTIPLY_WRAPV(a, b, r) __builtin_mul_overflow (a, b, r)
+# else
+ /* Work around GCC bug 91450. */
+# define _GL_INT_MULTIPLY_WRAPV(a, b, r) \
+ ((!_GL_SIGNED_TYPE_OR_EXPR (*(r)) && _GL_EXPR_SIGNED (a) && _GL_EXPR_SIGNED (b) \
+ && _GL_INT_MULTIPLY_RANGE_OVERFLOW (a, b, 0, (__typeof__ (*(r))) -1)) \
+ ? ((void) __builtin_mul_overflow (a, b, r), 1) \
+ : __builtin_mul_overflow (a, b, r))
+# endif
+#elif defined ckd_mul && !defined _GL_STDCKDINT_H
+# define _GL_INT_MULTIPLY_WRAPV(a, b, r) ckd_mul (r, + (a), + (b))
+#else
+# define _GL_INT_MULTIPLY_WRAPV(a, b, r) \
+ _GL_INT_OP_WRAPV (a, b, r, *, _GL_INT_MULTIPLY_RANGE_OVERFLOW)
+#endif
+
+/* Nonzero if this compiler has GCC bug 68193 or Clang bug 25390. See:
+ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68193
+ https://llvm.org/bugs/show_bug.cgi?id=25390
+ For now, assume all versions of GCC-like compilers generate bogus
+ warnings for _Generic. This matters only for compilers that
+ lack relevant builtins. */
+#if __GNUC__ || defined __clang__
+# define _GL__GENERIC_BOGUS 1
+#else
+# define _GL__GENERIC_BOGUS 0
+#endif
+
+/* Store the low-order bits of A <op> B into *R, where OP specifies
+ the operation and OVERFLOW the overflow predicate. Return 1 if the
+ result overflows. Arguments should not have side effects,
+ and A, B and *R can be of any integer type other than char, bool, a
+ bit-precise integer type, or an enumeration type. */
+#if 201112 <= __STDC_VERSION__ && !_GL__GENERIC_BOGUS
+# define _GL_INT_OP_WRAPV(a, b, r, op, overflow) \
+ (_Generic \
+ (*(r), \
+ signed char: \
+ _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
+ signed char, SCHAR_MIN, SCHAR_MAX), \
+ unsigned char: \
+ _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
+ unsigned char, 0, UCHAR_MAX), \
+ short int: \
+ _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
+ short int, SHRT_MIN, SHRT_MAX), \
+ unsigned short int: \
+ _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
+ unsigned short int, 0, USHRT_MAX), \
+ int: \
+ _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
+ int, INT_MIN, INT_MAX), \
+ unsigned int: \
+ _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
+ unsigned int, 0, UINT_MAX), \
+ long int: \
+ _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
+ long int, LONG_MIN, LONG_MAX), \
+ unsigned long int: \
+ _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
+ unsigned long int, 0, ULONG_MAX), \
+ long long int: \
+ _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \
+ long long int, LLONG_MIN, LLONG_MAX), \
+ unsigned long long int: \
+ _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \
+ unsigned long long int, 0, ULLONG_MAX)))
+#else
+/* Store the low-order bits of A <op> B into *R, where OP specifies
+ the operation and OVERFLOW the overflow predicate. If *R is
+ signed, its type is ST with bounds SMIN..SMAX; otherwise its type
+ is UT with bounds U..UMAX. ST and UT are narrower than int.
+ Return 1 if the result overflows. Arguments should not have side
+ effects, and A, B and *R can be of any integer type other than
+ char, bool, a bit-precise integer type, or an enumeration type. */
+# if _GL_HAVE___TYPEOF__
+# define _GL_INT_OP_WRAPV_SMALLISH(a,b,r,op,overflow,st,smin,smax,ut,umax) \
+ (_GL_TYPE_SIGNED (__typeof__ (*(r))) \
+ ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, st, smin, smax) \
+ : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, ut, 0, umax))
+# else
+# define _GL_INT_OP_WRAPV_SMALLISH(a,b,r,op,overflow,st,smin,smax,ut,umax) \
+ (overflow (a, b, smin, smax) \
+ ? (overflow (a, b, 0, umax) \
+ ? (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a,b,op,unsigned,st), 1) \
+ : (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a,b,op,unsigned,st)) < 0) \
+ : (overflow (a, b, 0, umax) \
+ ? (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a,b,op,unsigned,st)) >= 0 \
+ : (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a,b,op,unsigned,st), 0)))
+# endif
+
+# define _GL_INT_OP_WRAPV(a, b, r, op, overflow) \
+ (sizeof *(r) == sizeof (signed char) \
+ ? _GL_INT_OP_WRAPV_SMALLISH (a, b, r, op, overflow, \
+ signed char, SCHAR_MIN, SCHAR_MAX, \
+ unsigned char, UCHAR_MAX) \
+ : sizeof *(r) == sizeof (short int) \
+ ? _GL_INT_OP_WRAPV_SMALLISH (a, b, r, op, overflow, \
+ short int, SHRT_MIN, SHRT_MAX, \
+ unsigned short int, USHRT_MAX) \
+ : sizeof *(r) == sizeof (int) \
+ ? (_GL_EXPR_SIGNED (*(r)) \
+ ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
+ int, INT_MIN, INT_MAX) \
+ : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
+ unsigned int, 0, UINT_MAX)) \
+ : _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow))
+# ifdef LLONG_MAX
+# define _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow) \
+ (sizeof *(r) == sizeof (long int) \
+ ? (_GL_EXPR_SIGNED (*(r)) \
+ ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
+ long int, LONG_MIN, LONG_MAX) \
+ : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
+ unsigned long int, 0, ULONG_MAX)) \
+ : (_GL_EXPR_SIGNED (*(r)) \
+ ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \
+ long long int, LLONG_MIN, LLONG_MAX) \
+ : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \
+ unsigned long long int, 0, ULLONG_MAX)))
+# else
+# define _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow) \
+ (_GL_EXPR_SIGNED (*(r)) \
+ ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
+ long int, LONG_MIN, LONG_MAX) \
+ : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
+ unsigned long int, 0, ULONG_MAX))
+# endif
+#endif
+
+/* Store the low-order bits of A <op> B into *R, where the operation
+ is given by OP. Use the unsigned type UT for calculation to avoid
+ overflow problems. *R's type is T, with extrema TMIN and TMAX.
+ T can be any signed integer type other than char, bool, a
+ bit-precise integer type, or an enumeration type.
+ Return 1 if the result overflows. */
+#define _GL_INT_OP_CALC(a, b, r, op, overflow, ut, t, tmin, tmax) \
+ (overflow (a, b, tmin, tmax) \
+ ? (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t), 1) \
+ : (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t), 0))
+
+/* Return 1 if the integer expressions A - B and -A would overflow,
+ respectively. Arguments should not have side effects,
+ and can be any signed integer type other than char, bool, a
+ bit-precise integer type, or an enumeration type.
+ These macros are tuned for their last input argument being a constant. */
+
+#if _GL_HAS_BUILTIN_OVERFLOW_P
+# define _GL_INT_NEGATE_OVERFLOW(a) \
+ __builtin_sub_overflow_p (0, a, (__typeof__ (- (a))) 0)
+#else
+# define _GL_INT_NEGATE_OVERFLOW(a) \
+ _GL_INT_NEGATE_RANGE_OVERFLOW (a, _GL_INT_MINIMUM (a), _GL_INT_MAXIMUM (a))
+#endif
+
+/* Return the low-order bits of A <op> B, where the operation is given
+ by OP. Use the unsigned type UT for calculation to avoid undefined
+ behavior on signed integer overflow, and convert the result to type T.
+ UT is at least as wide as T and is no narrower than unsigned int,
+ T is two's complement, and there is no padding or trap representations.
+ Assume that converting UT to T yields the low-order bits, as is
+ done in all known two's-complement C compilers. E.g., see:
+ https://gcc.gnu.org/onlinedocs/gcc/Integers-implementation.html
+
+ According to the C standard, converting UT to T yields an
+ implementation-defined result or signal for values outside T's
+ range. However, code that works around this theoretical problem
+ runs afoul of a compiler bug in Oracle Studio 12.3 x86. See:
+ https://lists.gnu.org/r/bug-gnulib/2017-04/msg00049.html
+ As the compiler bug is real, don't try to work around the
+ theoretical problem. */
+
+#define _GL_INT_OP_WRAPV_VIA_UNSIGNED(a, b, op, ut, t) \
+ ((t) ((ut) (a) op (ut) (b)))
+
+/* Return true if the numeric values A + B, A - B, A * B fall outside
+ the range TMIN..TMAX. Arguments should not have side effects
+ and can be any integer type other than char, bool,
+ a bit-precise integer type, or an enumeration type.
+ TMIN should be signed and nonpositive.
+ TMAX should be positive, and should be signed unless TMIN is zero. */
+#define _GL_INT_ADD_RANGE_OVERFLOW(a, b, tmin, tmax) \
+ ((b) < 0 \
+ ? (((tmin) \
+ ? ((_GL_EXPR_SIGNED (_GL_INT_CONVERT (a, (tmin) - (b))) || (b) < (tmin)) \
+ && (a) < (tmin) - (b)) \
+ : (a) <= -1 - (b)) \
+ || ((_GL_EXPR_SIGNED (a) ? 0 <= (a) : (tmax) < (a)) && (tmax) < (a) + (b))) \
+ : (a) < 0 \
+ ? (((tmin) \
+ ? ((_GL_EXPR_SIGNED (_GL_INT_CONVERT (b, (tmin) - (a))) || (a) < (tmin)) \
+ && (b) < (tmin) - (a)) \
+ : (b) <= -1 - (a)) \
+ || ((_GL_EXPR_SIGNED (_GL_INT_CONVERT (a, b)) || (tmax) < (b)) \
+ && (tmax) < (a) + (b))) \
+ : (tmax) < (b) || (tmax) - (b) < (a))
+#define _GL_INT_SUBTRACT_RANGE_OVERFLOW(a, b, tmin, tmax) \
+ (((a) < 0) == ((b) < 0) \
+ ? ((a) < (b) \
+ ? !(tmin) || -1 - (tmin) < (b) - (a) - 1 \
+ : (tmax) < (a) - (b)) \
+ : (a) < 0 \
+ ? ((!_GL_EXPR_SIGNED (_GL_INT_CONVERT ((a) - (tmin), b)) && (a) - (tmin) < 0) \
+ || (a) - (tmin) < (b)) \
+ : ((! (_GL_EXPR_SIGNED (_GL_INT_CONVERT (tmax, b)) \
+ && _GL_EXPR_SIGNED (_GL_INT_CONVERT ((tmax) + (b), a))) \
+ && (tmax) <= -1 - (b)) \
+ || (tmax) + (b) < (a)))
+#define _GL_INT_MULTIPLY_RANGE_OVERFLOW(a, b, tmin, tmax) \
+ ((b) < 0 \
+ ? ((a) < 0 \
+ ? (_GL_EXPR_SIGNED (_GL_INT_CONVERT (tmax, b)) \
+ ? (a) < (tmax) / (b) \
+ : ((_GL_INT_NEGATE_OVERFLOW (b) \
+ ? _GL_INT_CONVERT (b, tmax) >> (_GL_TYPE_WIDTH (+ (b)) - 1) \
+ : (tmax) / -(b)) \
+ <= -1 - (a))) \
+ : _GL_INT_NEGATE_OVERFLOW (_GL_INT_CONVERT (b, tmin)) && (b) == -1 \
+ ? (_GL_EXPR_SIGNED (a) \
+ ? 0 < (a) + (tmin) \
+ : 0 < (a) && -1 - (tmin) < (a) - 1) \
+ : (tmin) / (b) < (a)) \
+ : (b) == 0 \
+ ? 0 \
+ : ((a) < 0 \
+ ? (_GL_INT_NEGATE_OVERFLOW (_GL_INT_CONVERT (a, tmin)) && (a) == -1 \
+ ? (_GL_EXPR_SIGNED (b) ? 0 < (b) + (tmin) : -1 - (tmin) < (b) - 1) \
+ : (tmin) / (a) < (b)) \
+ : (tmax) / (b) < (a)))
+
+#endif /* _GL_INTPROPS_INTERNAL_H */
diff --git a/gl/lib/intprops.h b/gl/lib/intprops.h
index d4a917f7..44b5e60f 100644
--- a/gl/lib/intprops.h
+++ b/gl/lib/intprops.h
@@ -1,6 +1,6 @@
/* intprops.h -- properties of integer types
- Copyright (C) 2001-2022 Free Software Foundation, Inc.
+ Copyright (C) 2001-2023 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
@@ -15,19 +15,10 @@
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
-
#ifndef _GL_INTPROPS_H
#define _GL_INTPROPS_H
-#include <limits.h>
-
-/* Return a value with the common real type of E and V and the value of V.
- Do not evaluate E. */
-#define _GL_INT_CONVERT(e, v) ((1 ? 0 : (e)) + (v))
-
-/* Act like _GL_INT_CONVERT (E, -V) but work around a bug in IRIX 6.5 cc; see
- <https://lists.gnu.org/r/bug-gnulib/2011-05/msg00406.html>. */
-#define _GL_INT_NEGATE_CONVERT(e, v) ((1 ? 0 : (e)) - (v))
+#include "intprops-internal.h"
/* The extra casts in the following macros work around compiler bugs,
e.g., in Cray C 5.0.3.0. */
@@ -37,11 +28,11 @@
#define TYPE_IS_INTEGER(t) ((t) 1.5 == 1)
/* True if the real type T is signed. */
-#define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
+#define TYPE_SIGNED(t) _GL_TYPE_SIGNED (t)
/* Return 1 if the real expression E, after promotion, has a
signed or floating type. Do not evaluate E. */
-#define EXPR_SIGNED(e) (_GL_INT_NEGATE_CONVERT (e, 1) < 0)
+#define EXPR_SIGNED(e) _GL_EXPR_SIGNED (e)
/* Minimum and maximum values for integer types and expressions. */
@@ -49,7 +40,7 @@
/* The width in bits of the integer type or expression T.
Do not evaluate T. T must not be a bit-field expression.
Padding bits are not supported; this is checked at compile-time below. */
-#define TYPE_WIDTH(t) (sizeof (t) * CHAR_BIT)
+#define TYPE_WIDTH(t) _GL_TYPE_WIDTH (t)
/* The maximum and minimum values for the integer type T. */
#define TYPE_MINIMUM(t) ((t) ~ TYPE_MAXIMUM (t))
@@ -58,51 +49,6 @@
? (t) -1 \
: ((((t) 1 << (TYPE_WIDTH (t) - 2)) - 1) * 2 + 1)))
-/* The maximum and minimum values for the type of the expression E,
- after integer promotion. E is not evaluated. */
-#define _GL_INT_MINIMUM(e) \
- (EXPR_SIGNED (e) \
- ? ~ _GL_SIGNED_INT_MAXIMUM (e) \
- : _GL_INT_CONVERT (e, 0))
-#define _GL_INT_MAXIMUM(e) \
- (EXPR_SIGNED (e) \
- ? _GL_SIGNED_INT_MAXIMUM (e) \
- : _GL_INT_NEGATE_CONVERT (e, 1))
-#define _GL_SIGNED_INT_MAXIMUM(e) \
- (((_GL_INT_CONVERT (e, 1) << (TYPE_WIDTH (+ (e)) - 2)) - 1) * 2 + 1)
-
-/* Work around OpenVMS incompatibility with C99. */
-#if !defined LLONG_MAX && defined __INT64_MAX
-# define LLONG_MAX __INT64_MAX
-# define LLONG_MIN __INT64_MIN
-#endif
-
-/* This include file assumes that signed types are two's complement without
- padding bits; the above macros have undefined behavior otherwise.
- If this is a problem for you, please let us know how to fix it for your host.
- This assumption is tested by the intprops-tests module. */
-
-/* Does the __typeof__ keyword work? This could be done by
- 'configure', but for now it's easier to do it by hand. */
-#if (2 <= __GNUC__ \
- || (4 <= __clang_major__) \
- || (1210 <= __IBMC__ && defined __IBM__TYPEOF__) \
- || (0x5110 <= __SUNPRO_C && !__STDC__))
-# define _GL_HAVE___TYPEOF__ 1
-#else
-# define _GL_HAVE___TYPEOF__ 0
-#endif
-
-/* Return 1 if the integer type or expression T might be signed. Return 0
- if it is definitely unsigned. T must not be a bit-field expression.
- This macro does not evaluate its argument, and expands to an
- integer constant expression. */
-#if _GL_HAVE___TYPEOF__
-# define _GL_SIGNED_TYPE_OR_EXPR(t) TYPE_SIGNED (__typeof__ (t))
-#else
-# define _GL_SIGNED_TYPE_OR_EXPR(t) 1
-#endif
-
/* Bound on length of the string representing an unsigned integer
value representable in B bits. log10 (2.0) < 146/485. The
smallest value of B where this bound is not tight is 2621. */
@@ -129,12 +75,11 @@
/* Range overflow checks.
The INT_<op>_RANGE_OVERFLOW macros return 1 if the corresponding C
- operators might not yield numerically correct answers due to
- arithmetic overflow. They do not rely on undefined or
- implementation-defined behavior. Their implementations are simple
- and straightforward, but they are harder to use and may be less
- efficient than the INT_<op>_WRAPV, INT_<op>_OK, and
- INT_<op>_OVERFLOW macros described below.
+ operators overflow arithmetically when given the same arguments.
+ These macros do not rely on undefined or implementation-defined behavior.
+ Although their implementations are simple and straightforward,
+ they are harder to use and may be less efficient than the
+ INT_<op>_WRAPV, INT_<op>_OK, and INT_<op>_OVERFLOW macros described below.
Example usage:
@@ -181,9 +126,7 @@
/* Return 1 if - A would overflow in [MIN,MAX] arithmetic.
See above for restrictions. */
#define INT_NEGATE_RANGE_OVERFLOW(a, min, max) \
- ((min) < 0 \
- ? (a) < - (max) \
- : 0 < (a))
+ _GL_INT_NEGATE_RANGE_OVERFLOW (a, min, max)
/* Return 1 if A * B would overflow in [MIN,MAX] arithmetic.
See above for restrictions. Avoid && and || as they tickle
@@ -227,43 +170,6 @@
? (a) < (min) >> (b) \
: (max) >> (b) < (a))
-/* True if __builtin_add_overflow (A, B, P) and __builtin_sub_overflow
- (A, B, P) work when P is non-null. */
-#ifdef __EDG__
-/* EDG-based compilers like nvc 22.1 cannot add 64-bit signed to unsigned
- <https://bugs.gnu.org/53256>. */
-# define _GL_HAS_BUILTIN_ADD_OVERFLOW 0
-#elif defined __has_builtin
-# define _GL_HAS_BUILTIN_ADD_OVERFLOW __has_builtin (__builtin_add_overflow)
-/* __builtin_{add,sub}_overflow exists but is not reliable in GCC 5.x and 6.x,
- see <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98269>. */
-#elif 7 <= __GNUC__
-# define _GL_HAS_BUILTIN_ADD_OVERFLOW 1
-#else
-# define _GL_HAS_BUILTIN_ADD_OVERFLOW 0
-#endif
-
-/* True if __builtin_mul_overflow (A, B, P) works when P is non-null. */
-#if defined __clang_major__ && __clang_major__ < 14
-/* Work around Clang bug <https://bugs.llvm.org/show_bug.cgi?id=16404>. */
-# define _GL_HAS_BUILTIN_MUL_OVERFLOW 0
-#else
-# define _GL_HAS_BUILTIN_MUL_OVERFLOW _GL_HAS_BUILTIN_ADD_OVERFLOW
-#endif
-
-/* True if __builtin_add_overflow_p (A, B, C) works, and similarly for
- __builtin_sub_overflow_p and __builtin_mul_overflow_p. */
-#ifdef __EDG__
-/* In EDG-based compilers like ICC 2021.3 and earlier,
- __builtin_add_overflow_p etc. are not treated as integral constant
- expressions even when all arguments are. */
-# define _GL_HAS_BUILTIN_OVERFLOW_P 0
-#elif defined __has_builtin
-# define _GL_HAS_BUILTIN_OVERFLOW_P __has_builtin (__builtin_mul_overflow_p)
-#else
-# define _GL_HAS_BUILTIN_OVERFLOW_P (7 <= __GNUC__)
-#endif
-
/* The _GL*_OVERFLOW macros have the same restrictions as the
*_RANGE_OVERFLOW macros, except that they do not assume that operands
(e.g., A and B) have the same type as MIN and MAX. Instead, they assume
@@ -350,13 +256,18 @@
Because the WRAPV macros convert the result, they report overflow
in different circumstances than the OVERFLOW macros do. For
example, in the typical case with 16-bit 'short' and 32-bit 'int',
- if A, B and R are all of type 'short' then INT_ADD_OVERFLOW (A, B)
+ if A, B and *R are all of type 'short' then INT_ADD_OVERFLOW (A, B)
returns false because the addition cannot overflow after A and B
- are converted to 'int', whereas INT_ADD_WRAPV (A, B, &R) returns
+ are converted to 'int', whereas INT_ADD_WRAPV (A, B, R) returns
true or false depending on whether the sum fits into 'short'.
These macros are tuned for their last input argument being a constant.
+ A, B, and *R should be integers; they need not be the same type,
+ and they need not be all signed or all unsigned.
+ However, none of the integer types should be bit-precise,
+ and *R's type should not be char, bool, or an enumeration type.
+
Return 1 if the integer expressions A * B, A - B, -A, A * B, A / B,
A % B, and A << B would overflow, respectively. */
@@ -364,12 +275,7 @@
_GL_BINARY_OP_OVERFLOW (a, b, _GL_ADD_OVERFLOW)
#define INT_SUBTRACT_OVERFLOW(a, b) \
_GL_BINARY_OP_OVERFLOW (a, b, _GL_SUBTRACT_OVERFLOW)
-#if _GL_HAS_BUILTIN_OVERFLOW_P
-# define INT_NEGATE_OVERFLOW(a) INT_SUBTRACT_OVERFLOW (0, a)
-#else
-# define INT_NEGATE_OVERFLOW(a) \
- INT_NEGATE_RANGE_OVERFLOW (a, _GL_INT_MINIMUM (a), _GL_INT_MAXIMUM (a))
-#endif
+#define INT_NEGATE_OVERFLOW(a) _GL_INT_NEGATE_OVERFLOW (a)
#define INT_MULTIPLY_OVERFLOW(a, b) \
_GL_BINARY_OP_OVERFLOW (a, b, _GL_MULTIPLY_OVERFLOW)
#define INT_DIVIDE_OVERFLOW(a, b) \
@@ -391,224 +297,9 @@
/* Store the low-order bits of A + B, A - B, A * B, respectively, into *R.
Return 1 if the result overflows. See above for restrictions. */
-#if _GL_HAS_BUILTIN_ADD_OVERFLOW
-# define INT_ADD_WRAPV(a, b, r) __builtin_add_overflow (a, b, r)
-# define INT_SUBTRACT_WRAPV(a, b, r) __builtin_sub_overflow (a, b, r)
-#else
-# define INT_ADD_WRAPV(a, b, r) \
- _GL_INT_OP_WRAPV (a, b, r, +, _GL_INT_ADD_RANGE_OVERFLOW)
-# define INT_SUBTRACT_WRAPV(a, b, r) \
- _GL_INT_OP_WRAPV (a, b, r, -, _GL_INT_SUBTRACT_RANGE_OVERFLOW)
-#endif
-#if _GL_HAS_BUILTIN_MUL_OVERFLOW
-# if ((9 < __GNUC__ + (3 <= __GNUC_MINOR__) \
- || (__GNUC__ == 8 && 4 <= __GNUC_MINOR__)) \
- && !defined __EDG__)
-# define INT_MULTIPLY_WRAPV(a, b, r) __builtin_mul_overflow (a, b, r)
-# else
- /* Work around GCC bug 91450. */
-# define INT_MULTIPLY_WRAPV(a, b, r) \
- ((!_GL_SIGNED_TYPE_OR_EXPR (*(r)) && EXPR_SIGNED (a) && EXPR_SIGNED (b) \
- && _GL_INT_MULTIPLY_RANGE_OVERFLOW (a, b, 0, (__typeof__ (*(r))) -1)) \
- ? ((void) __builtin_mul_overflow (a, b, r), 1) \
- : __builtin_mul_overflow (a, b, r))
-# endif
-#else
-# define INT_MULTIPLY_WRAPV(a, b, r) \
- _GL_INT_OP_WRAPV (a, b, r, *, _GL_INT_MULTIPLY_RANGE_OVERFLOW)
-#endif
-
-/* Nonzero if this compiler has GCC bug 68193 or Clang bug 25390. See:
- https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68193
- https://llvm.org/bugs/show_bug.cgi?id=25390
- For now, assume all versions of GCC-like compilers generate bogus
- warnings for _Generic. This matters only for compilers that
- lack relevant builtins. */
-#if __GNUC__ || defined __clang__
-# define _GL__GENERIC_BOGUS 1
-#else
-# define _GL__GENERIC_BOGUS 0
-#endif
-
-/* Store the low-order bits of A <op> B into *R, where OP specifies
- the operation and OVERFLOW the overflow predicate. Return 1 if the
- result overflows. See above for restrictions. */
-#if 201112 <= __STDC_VERSION__ && !_GL__GENERIC_BOGUS
-# define _GL_INT_OP_WRAPV(a, b, r, op, overflow) \
- (_Generic \
- (*(r), \
- signed char: \
- _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
- signed char, SCHAR_MIN, SCHAR_MAX), \
- unsigned char: \
- _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
- unsigned char, 0, UCHAR_MAX), \
- short int: \
- _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
- short int, SHRT_MIN, SHRT_MAX), \
- unsigned short int: \
- _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
- unsigned short int, 0, USHRT_MAX), \
- int: \
- _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
- int, INT_MIN, INT_MAX), \
- unsigned int: \
- _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
- unsigned int, 0, UINT_MAX), \
- long int: \
- _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
- long int, LONG_MIN, LONG_MAX), \
- unsigned long int: \
- _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
- unsigned long int, 0, ULONG_MAX), \
- long long int: \
- _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \
- long long int, LLONG_MIN, LLONG_MAX), \
- unsigned long long int: \
- _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \
- unsigned long long int, 0, ULLONG_MAX)))
-#else
-/* Store the low-order bits of A <op> B into *R, where OP specifies
- the operation and OVERFLOW the overflow predicate. If *R is
- signed, its type is ST with bounds SMIN..SMAX; otherwise its type
- is UT with bounds U..UMAX. ST and UT are narrower than int.
- Return 1 if the result overflows. See above for restrictions. */
-# if _GL_HAVE___TYPEOF__
-# define _GL_INT_OP_WRAPV_SMALLISH(a,b,r,op,overflow,st,smin,smax,ut,umax) \
- (TYPE_SIGNED (__typeof__ (*(r))) \
- ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, st, smin, smax) \
- : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, ut, 0, umax))
-# else
-# define _GL_INT_OP_WRAPV_SMALLISH(a,b,r,op,overflow,st,smin,smax,ut,umax) \
- (overflow (a, b, smin, smax) \
- ? (overflow (a, b, 0, umax) \
- ? (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a,b,op,unsigned,st), 1) \
- : (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a,b,op,unsigned,st)) < 0) \
- : (overflow (a, b, 0, umax) \
- ? (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a,b,op,unsigned,st)) >= 0 \
- : (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a,b,op,unsigned,st), 0)))
-# endif
-
-# define _GL_INT_OP_WRAPV(a, b, r, op, overflow) \
- (sizeof *(r) == sizeof (signed char) \
- ? _GL_INT_OP_WRAPV_SMALLISH (a, b, r, op, overflow, \
- signed char, SCHAR_MIN, SCHAR_MAX, \
- unsigned char, UCHAR_MAX) \
- : sizeof *(r) == sizeof (short int) \
- ? _GL_INT_OP_WRAPV_SMALLISH (a, b, r, op, overflow, \
- short int, SHRT_MIN, SHRT_MAX, \
- unsigned short int, USHRT_MAX) \
- : sizeof *(r) == sizeof (int) \
- ? (EXPR_SIGNED (*(r)) \
- ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
- int, INT_MIN, INT_MAX) \
- : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned int, \
- unsigned int, 0, UINT_MAX)) \
- : _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow))
-# ifdef LLONG_MAX
-# define _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow) \
- (sizeof *(r) == sizeof (long int) \
- ? (EXPR_SIGNED (*(r)) \
- ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
- long int, LONG_MIN, LONG_MAX) \
- : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
- unsigned long int, 0, ULONG_MAX)) \
- : (EXPR_SIGNED (*(r)) \
- ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \
- long long int, LLONG_MIN, LLONG_MAX) \
- : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long long int, \
- unsigned long long int, 0, ULLONG_MAX)))
-# else
-# define _GL_INT_OP_WRAPV_LONGISH(a, b, r, op, overflow) \
- (EXPR_SIGNED (*(r)) \
- ? _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
- long int, LONG_MIN, LONG_MAX) \
- : _GL_INT_OP_CALC (a, b, r, op, overflow, unsigned long int, \
- unsigned long int, 0, ULONG_MAX))
-# endif
-#endif
-
-/* Store the low-order bits of A <op> B into *R, where the operation
- is given by OP. Use the unsigned type UT for calculation to avoid
- overflow problems. *R's type is T, with extrema TMIN and TMAX.
- T must be a signed integer type. Return 1 if the result overflows. */
-#define _GL_INT_OP_CALC(a, b, r, op, overflow, ut, t, tmin, tmax) \
- (overflow (a, b, tmin, tmax) \
- ? (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t), 1) \
- : (*(r) = _GL_INT_OP_WRAPV_VIA_UNSIGNED (a, b, op, ut, t), 0))
-
-/* Return the low-order bits of A <op> B, where the operation is given
- by OP. Use the unsigned type UT for calculation to avoid undefined
- behavior on signed integer overflow, and convert the result to type T.
- UT is at least as wide as T and is no narrower than unsigned int,
- T is two's complement, and there is no padding or trap representations.
- Assume that converting UT to T yields the low-order bits, as is
- done in all known two's-complement C compilers. E.g., see:
- https://gcc.gnu.org/onlinedocs/gcc/Integers-implementation.html
-
- According to the C standard, converting UT to T yields an
- implementation-defined result or signal for values outside T's
- range. However, code that works around this theoretical problem
- runs afoul of a compiler bug in Oracle Studio 12.3 x86. See:
- https://lists.gnu.org/r/bug-gnulib/2017-04/msg00049.html
- As the compiler bug is real, don't try to work around the
- theoretical problem. */
-
-#define _GL_INT_OP_WRAPV_VIA_UNSIGNED(a, b, op, ut, t) \
- ((t) ((ut) (a) op (ut) (b)))
-
-/* Return true if the numeric values A + B, A - B, A * B fall outside
- the range TMIN..TMAX. Arguments should be integer expressions
- without side effects. TMIN should be signed and nonpositive.
- TMAX should be positive, and should be signed unless TMIN is zero. */
-#define _GL_INT_ADD_RANGE_OVERFLOW(a, b, tmin, tmax) \
- ((b) < 0 \
- ? (((tmin) \
- ? ((EXPR_SIGNED (_GL_INT_CONVERT (a, (tmin) - (b))) || (b) < (tmin)) \
- && (a) < (tmin) - (b)) \
- : (a) <= -1 - (b)) \
- || ((EXPR_SIGNED (a) ? 0 <= (a) : (tmax) < (a)) && (tmax) < (a) + (b))) \
- : (a) < 0 \
- ? (((tmin) \
- ? ((EXPR_SIGNED (_GL_INT_CONVERT (b, (tmin) - (a))) || (a) < (tmin)) \
- && (b) < (tmin) - (a)) \
- : (b) <= -1 - (a)) \
- || ((EXPR_SIGNED (_GL_INT_CONVERT (a, b)) || (tmax) < (b)) \
- && (tmax) < (a) + (b))) \
- : (tmax) < (b) || (tmax) - (b) < (a))
-#define _GL_INT_SUBTRACT_RANGE_OVERFLOW(a, b, tmin, tmax) \
- (((a) < 0) == ((b) < 0) \
- ? ((a) < (b) \
- ? !(tmin) || -1 - (tmin) < (b) - (a) - 1 \
- : (tmax) < (a) - (b)) \
- : (a) < 0 \
- ? ((!EXPR_SIGNED (_GL_INT_CONVERT ((a) - (tmin), b)) && (a) - (tmin) < 0) \
- || (a) - (tmin) < (b)) \
- : ((! (EXPR_SIGNED (_GL_INT_CONVERT (tmax, b)) \
- && EXPR_SIGNED (_GL_INT_CONVERT ((tmax) + (b), a))) \
- && (tmax) <= -1 - (b)) \
- || (tmax) + (b) < (a)))
-#define _GL_INT_MULTIPLY_RANGE_OVERFLOW(a, b, tmin, tmax) \
- ((b) < 0 \
- ? ((a) < 0 \
- ? (EXPR_SIGNED (_GL_INT_CONVERT (tmax, b)) \
- ? (a) < (tmax) / (b) \
- : ((INT_NEGATE_OVERFLOW (b) \
- ? _GL_INT_CONVERT (b, tmax) >> (TYPE_WIDTH (+ (b)) - 1) \
- : (tmax) / -(b)) \
- <= -1 - (a))) \
- : INT_NEGATE_OVERFLOW (_GL_INT_CONVERT (b, tmin)) && (b) == -1 \
- ? (EXPR_SIGNED (a) \
- ? 0 < (a) + (tmin) \
- : 0 < (a) && -1 - (tmin) < (a) - 1) \
- : (tmin) / (b) < (a)) \
- : (b) == 0 \
- ? 0 \
- : ((a) < 0 \
- ? (INT_NEGATE_OVERFLOW (_GL_INT_CONVERT (a, tmin)) && (a) == -1 \
- ? (EXPR_SIGNED (b) ? 0 < (b) + (tmin) : -1 - (tmin) < (b) - 1) \
- : (tmin) / (a) < (b)) \
- : (tmax) / (b) < (a)))
+#define INT_ADD_WRAPV(a, b, r) _GL_INT_ADD_WRAPV (a, b, r)
+#define INT_SUBTRACT_WRAPV(a, b, r) _GL_INT_SUBTRACT_WRAPV (a, b, r)
+#define INT_MULTIPLY_WRAPV(a, b, r) _GL_INT_MULTIPLY_WRAPV (a, b, r)
/* The following macros compute A + B, A - B, and A * B, respectively.
If no overflow occurs, they set *R to the result and return 1;
@@ -624,6 +315,8 @@
A, B, and *R should be integers; they need not be the same type,
and they need not be all signed or all unsigned.
+ However, none of the integer types should be bit-precise,
+ and *R's type should not be char, bool, or an enumeration type.
These macros work correctly on all known practical hosts, and do not rely
on undefined behavior due to signed arithmetic overflow.
@@ -635,8 +328,8 @@
These macros are tuned for B being a constant. */
-#define INT_ADD_OK(a, b, r) ! INT_ADD_WRAPV (a, b, r)
-#define INT_SUBTRACT_OK(a, b, r) ! INT_SUBTRACT_WRAPV (a, b, r)
-#define INT_MULTIPLY_OK(a, b, r) ! INT_MULTIPLY_WRAPV (a, b, r)
+#define INT_ADD_OK(a, b, r) (! INT_ADD_WRAPV (a, b, r))
+#define INT_SUBTRACT_OK(a, b, r) (! INT_SUBTRACT_WRAPV (a, b, r))
+#define INT_MULTIPLY_OK(a, b, r) (! INT_MULTIPLY_WRAPV (a, b, r))
#endif /* _GL_INTPROPS_H */
diff --git a/gl/lib/inttypes.in.h b/gl/lib/inttypes.in.h
index 853eca08..22643876 100644
--- a/gl/lib/inttypes.in.h
+++ b/gl/lib/inttypes.in.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2006-2022 Free Software Foundation, Inc.
+/* Copyright (C) 2006-2023 Free Software Foundation, Inc.
Written by Paul Eggert, Bruno Haible, Derek Price.
This file is part of gnulib.
@@ -46,6 +46,11 @@
#if ! defined INTTYPES_H && ! defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
#define INTTYPES_H
+/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
/* Include <stdint.h> or the gnulib replacement.
But avoid namespace pollution on glibc systems. */
#ifndef __GLIBC__
@@ -903,8 +908,21 @@ extern "C" {
#endif
#if @GNULIB_IMAXABS@
-# if !@HAVE_DECL_IMAXABS@
-extern intmax_t imaxabs (intmax_t);
+# if @REPLACE_IMAXABS@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef imaxabs
+# define imaxabs rpl_imaxabs
+# endif
+_GL_FUNCDECL_RPL (imaxabs, intmax_t, (intmax_t x));
+_GL_CXXALIAS_RPL (imaxabs, intmax_t, (intmax_t x));
+# else
+# if !@HAVE_DECL_IMAXABS@
+_GL_FUNCDECL_SYS (imaxabs, intmax_t, (intmax_t x));
+# endif
+_GL_CXXALIAS_SYS (imaxabs, intmax_t, (intmax_t x));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (imaxabs);
# endif
#elif defined GNULIB_POSIXCHECK
# undef imaxabs
@@ -921,8 +939,21 @@ typedef struct { intmax_t quot; intmax_t rem; } imaxdiv_t;
# define GNULIB_defined_imaxdiv_t 1
# endif
# endif
-# if !@HAVE_DECL_IMAXDIV@
-extern imaxdiv_t imaxdiv (intmax_t, intmax_t);
+# if @REPLACE_IMAXDIV@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef imaxdiv
+# define imaxdiv rpl_imaxdiv
+# endif
+_GL_FUNCDECL_RPL (imaxdiv, imaxdiv_t, (intmax_t numer, intmax_t denom));
+_GL_CXXALIAS_RPL (imaxdiv, imaxdiv_t, (intmax_t numer, intmax_t denom));
+# else
+# if !@HAVE_DECL_IMAXDIV@
+_GL_FUNCDECL_SYS (imaxdiv, imaxdiv_t, (intmax_t numer, intmax_t denom));
+# endif
+_GL_CXXALIAS_SYS (imaxdiv, imaxdiv_t, (intmax_t numer, intmax_t denom));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (imaxdiv);
# endif
#elif defined GNULIB_POSIXCHECK
# undef imaxdiv
diff --git a/gl/lib/ioctl.c b/gl/lib/ioctl.c
index b1c7b2ee..65cce137 100644
--- a/gl/lib/ioctl.c
+++ b/gl/lib/ioctl.c
@@ -1,6 +1,6 @@
/* ioctl.c --- wrappers for Windows ioctl function
- Copyright (C) 2008-2022 Free Software Foundation, Inc.
+ Copyright (C) 2008-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/isblank.c b/gl/lib/isblank.c
index e3545593..8aad6aff 100644
--- a/gl/lib/isblank.c
+++ b/gl/lib/isblank.c
@@ -1,6 +1,6 @@
/* Test whether a character is a blank.
- Copyright (C) 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2009-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/itold.c b/gl/lib/itold.c
index fe4a3842..0ef4464e 100644
--- a/gl/lib/itold.c
+++ b/gl/lib/itold.c
@@ -1,5 +1,5 @@
/* Replacement for 'int' to 'long double' conversion routine.
- Copyright (C) 2011-2022 Free Software Foundation, Inc.
+ Copyright (C) 2011-2023 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2011.
This file is free software: you can redistribute it and/or modify
diff --git a/gl/lib/langinfo.in.h b/gl/lib/langinfo.in.h
index 98aea6a8..4cf712eb 100644
--- a/gl/lib/langinfo.in.h
+++ b/gl/lib/langinfo.in.h
@@ -1,5 +1,5 @@
/* Substitute for and wrapper around <langinfo.h>.
- Copyright (C) 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2009-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -34,6 +34,11 @@
#ifndef _@GUARD_PREFIX@_LANGINFO_H
#define _@GUARD_PREFIX@_LANGINFO_H
+/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
#if !@HAVE_LANGINFO_H@
@@ -208,7 +213,9 @@ _GL_FUNCDECL_SYS (nl_langinfo, char *, (nl_item item));
# endif
_GL_CXXALIAS_SYS (nl_langinfo, char *, (nl_item item));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (nl_langinfo);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef nl_langinfo
# if HAVE_RAW_DECL_NL_LANGINFO
diff --git a/gl/lib/lc-charset-dispatch.c b/gl/lib/lc-charset-dispatch.c
index 66d78fd3..cd74466b 100644
--- a/gl/lib/lc-charset-dispatch.c
+++ b/gl/lib/lc-charset-dispatch.c
@@ -1,5 +1,5 @@
/* Dispatching based on the current locale's character encoding.
- Copyright (C) 2018-2022 Free Software Foundation, Inc.
+ Copyright (C) 2018-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/lc-charset-dispatch.h b/gl/lib/lc-charset-dispatch.h
index 3867c323..c82b6a60 100644
--- a/gl/lib/lc-charset-dispatch.h
+++ b/gl/lib/lc-charset-dispatch.h
@@ -1,5 +1,5 @@
/* Dispatching based on the current locale's character encoding.
- Copyright (C) 2018-2022 Free Software Foundation, Inc.
+ Copyright (C) 2018-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/lchown.c b/gl/lib/lchown.c
index 8b0d871a..19a68c05 100644
--- a/gl/lib/lchown.c
+++ b/gl/lib/lchown.c
@@ -1,6 +1,6 @@
/* Provide a stub lchown function for systems that lack it.
- Copyright (C) 1998-1999, 2002, 2004, 2006-2007, 2009-2022 Free Software
+ Copyright (C) 1998-1999, 2002, 2004, 2006-2007, 2009-2023 Free Software
Foundation, Inc.
This file is free software: you can redistribute it and/or modify
@@ -23,7 +23,6 @@
#include <unistd.h>
#include <errno.h>
-#include <stdbool.h>
#include <string.h>
#include <sys/stat.h>
diff --git a/gl/lib/libc-config.h b/gl/lib/libc-config.h
index a56665b1..5f5ad010 100644
--- a/gl/lib/libc-config.h
+++ b/gl/lib/libc-config.h
@@ -1,6 +1,6 @@
/* System definitions for code taken from the GNU C Library
- Copyright 2017-2022 Free Software Foundation, Inc.
+ Copyright 2017-2023 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -137,8 +137,6 @@
# undef __attribute_returns_twice__
# undef __attribute_used__
# undef __attribute_warn_unused_result__
-# undef __bos
-# undef __bos0
# undef __errordecl
# undef __extension__
# undef __extern_always_inline
@@ -147,21 +145,13 @@
# undef __fortified_attr_access
# undef __fortify_function
# undef __glibc_c99_flexarr_available
-# undef __glibc_fortify
-# undef __glibc_fortify_n
# undef __glibc_has_attribute
# undef __glibc_has_builtin
# undef __glibc_has_extension
# undef __glibc_likely
# undef __glibc_macro_warning
# undef __glibc_macro_warning1
-# undef __glibc_objsize
-# undef __glibc_objsize0
-# undef __glibc_safe_len_cond
-# undef __glibc_safe_or_unknown_len
# undef __glibc_unlikely
-# undef __glibc_unsafe_len
-# undef __glibc_unsigned_or_positive
# undef __inline
# undef __ptr_t
# undef __restrict
@@ -170,6 +160,18 @@
# undef __va_arg_pack_len
# undef __warnattr
# undef __wur
+# ifndef __GNULIB_CDEFS
+# undef __bos
+# undef __bos0
+# undef __glibc_fortify
+# undef __glibc_fortify_n
+# undef __glibc_objsize
+# undef __glibc_objsize0
+# undef __glibc_safe_len_cond
+# undef __glibc_safe_or_unknown_len
+# undef __glibc_unsafe_len
+# undef __glibc_unsigned_or_positive
+# endif
/* Include our copy of glibc <sys/cdefs.h>. */
# include <cdefs.h>
diff --git a/gl/lib/limits.in.h b/gl/lib/limits.in.h
index b77bf75c..e2e173eb 100644
--- a/gl/lib/limits.in.h
+++ b/gl/lib/limits.in.h
@@ -1,6 +1,6 @@
/* A GNU-like <limits.h>.
- Copyright 2016-2022 Free Software Foundation, Inc.
+ Copyright 2016-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -99,7 +99,12 @@
# endif
#endif
-/* Macros specified by C2x and by ISO/IEC TS 18661-1:2014. */
+/* Assume no multibyte character is longer than 16 bytes. */
+#ifndef MB_LEN_MAX
+# define MB_LEN_MAX 16
+#endif
+
+/* Macros specified by C23 and by ISO/IEC TS 18661-1:2014. */
#if (! defined ULLONG_WIDTH \
&& (defined _GNU_SOURCE || defined __STDC_WANT_IEC_60559_BFP_EXT__ \
@@ -117,13 +122,28 @@
# define ULLONG_WIDTH _GL_INTEGER_WIDTH (0, ULLONG_MAX)
#endif
-/* Macros specified by C2x. */
+/* Macros specified by C23. */
-#if (! defined BOOL_WIDTH \
- && (defined _GNU_SOURCE \
- || (defined __STDC_VERSION__ && 201710 < __STDC_VERSION__)))
-# define BOOL_MAX 1
-# define BOOL_WIDTH 1
+#if (defined _GNU_SOURCE \
+ || (defined __STDC_VERSION__ && 201710 < __STDC_VERSION__))
+# if ! defined BOOL_WIDTH
+# define BOOL_WIDTH 1
+# define BOOL_MAX 1
+# elif ! defined BOOL_MAX
+# define BOOL_MAX ((((1U << (BOOL_WIDTH - 1)) - 1) << 1) + 1)
+# endif
+#endif
+
+/* Macro specified by POSIX. */
+
+/* The maximum ssize_t value. Although it might not be of ssize_t type
+ as it should be, it's too much trouble to fix this minor detail. */
+#ifndef SSIZE_MAX
+# ifdef _WIN64
+# define SSIZE_MAX LLONG_MAX
+# else
+# define SSIZE_MAX LONG_MAX
+# endif
#endif
#endif /* _@GUARD_PREFIX@_LIMITS_H */
diff --git a/gl/lib/localcharset.c b/gl/lib/localcharset.c
index 17a4a1ef..7ed9c957 100644
--- a/gl/lib/localcharset.c
+++ b/gl/lib/localcharset.c
@@ -1,6 +1,6 @@
/* Determine a canonical name for the current locale's character encoding.
- Copyright (C) 2000-2006, 2008-2022 Free Software Foundation, Inc.
+ Copyright (C) 2000-2006, 2008-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/localcharset.h b/gl/lib/localcharset.h
index 62efbf32..29ee8dc0 100644
--- a/gl/lib/localcharset.h
+++ b/gl/lib/localcharset.h
@@ -1,5 +1,5 @@
/* Determine a canonical name for the current locale's character encoding.
- Copyright (C) 2000-2003, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2000-2003, 2009-2023 Free Software Foundation, Inc.
This file is part of the GNU CHARSET Library.
This file is free software: you can redistribute it and/or modify
diff --git a/gl/lib/locale.in.h b/gl/lib/locale.in.h
index 4aef74d4..41a93c1d 100644
--- a/gl/lib/locale.in.h
+++ b/gl/lib/locale.in.h
@@ -1,5 +1,5 @@
/* A POSIX <locale.h>.
- Copyright (C) 2007-2022 Free Software Foundation, Inc.
+ Copyright (C) 2007-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -44,6 +44,11 @@
#ifndef _@GUARD_PREFIX@_LOCALE_H
#define _@GUARD_PREFIX@_LOCALE_H
+/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
/* NetBSD 5.0 mis-defines NULL. */
#include <stddef.h>
@@ -229,7 +234,7 @@ _GL_CXXALIAS_SYS (newlocale, locale_t,
(int category_mask, const char *name, locale_t base));
# endif
# endif
-# if @HAVE_NEWLOCALE@
+# if __GLIBC__ >= 2 && @HAVE_NEWLOCALE@
_GL_CXXALIASWARN (newlocale);
# endif
# if @HAVE_NEWLOCALE@ || @REPLACE_NEWLOCALE@
@@ -245,23 +250,23 @@ _GL_WARN_ON_USE (newlocale, "newlocale is not portable");
#endif
#if @GNULIB_DUPLOCALE@ || (@GNULIB_LOCALENAME@ && @LOCALENAME_ENHANCE_LOCALE_FUNCS@ && @HAVE_DUPLOCALE@)
-# if @REPLACE_DUPLOCALE@
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-# undef duplocale
-# define duplocale rpl_duplocale
-# define GNULIB_defined_duplocale 1
-# endif
+# if @HAVE_DUPLOCALE@ /* locale_t may be undefined if !@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@
+# else
_GL_CXXALIAS_SYS (duplocale, locale_t, (locale_t locale));
# endif
# endif
-# if @HAVE_DUPLOCALE@
+# if __GLIBC__ >= 2 && @HAVE_DUPLOCALE@
_GL_CXXALIASWARN (duplocale);
# endif
-# if @HAVE_DUPLOCALE@ || @REPLACE_DUPLOCALE@
+# if @HAVE_DUPLOCALE@
# ifndef HAVE_WORKING_DUPLOCALE
# define HAVE_WORKING_DUPLOCALE 1
# endif
@@ -290,7 +295,7 @@ _GL_CXXALIAS_RPL (freelocale, void, (locale_t locale));
_GL_CXXALIAS_SYS_CAST (freelocale, void, (locale_t locale));
# endif
# endif
-# if @HAVE_FREELOCALE@
+# if __GLIBC__ >= 2 && @HAVE_FREELOCALE@
_GL_CXXALIASWARN (freelocale);
# endif
#elif defined GNULIB_POSIXCHECK
diff --git a/gl/lib/localeconv.c b/gl/lib/localeconv.c
index ef261205..c1a34baa 100644
--- a/gl/lib/localeconv.c
+++ b/gl/lib/localeconv.c
@@ -1,5 +1,5 @@
/* Query locale dependent information for formatting numbers.
- Copyright (C) 2012-2022 Free Software Foundation, Inc.
+ Copyright (C) 2012-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -19,10 +19,14 @@
/* Specification. */
#include <locale.h>
+#include <limits.h>
+
#if HAVE_STRUCT_LCONV_DECIMAL_POINT
+# define FIX_CHAR_VALUE(x) ((x) >= 0 ? (x) : CHAR_MAX)
+
/* Override for platforms where 'struct lconv' lacks the int_p_*, int_n_*
- members. */
+ members or where fields of type 'char' are set to -1 instead of CHAR_MAX. */
struct lconv *
localeconv (void)
@@ -41,21 +45,30 @@ localeconv (void)
result.positive_sign = sys_result->positive_sign;
result.negative_sign = sys_result->negative_sign;
result.currency_symbol = sys_result->currency_symbol;
- result.frac_digits = sys_result->frac_digits;
- result.p_cs_precedes = sys_result->p_cs_precedes;
- result.p_sign_posn = sys_result->p_sign_posn;
- result.p_sep_by_space = sys_result->p_sep_by_space;
- result.n_cs_precedes = sys_result->n_cs_precedes;
- result.n_sign_posn = sys_result->n_sign_posn;
- result.n_sep_by_space = sys_result->n_sep_by_space;
+ result.frac_digits = FIX_CHAR_VALUE (sys_result->frac_digits);
+ result.p_cs_precedes = FIX_CHAR_VALUE (sys_result->p_cs_precedes);
+ result.p_sign_posn = FIX_CHAR_VALUE (sys_result->p_sign_posn);
+ result.p_sep_by_space = FIX_CHAR_VALUE (sys_result->p_sep_by_space);
+ result.n_cs_precedes = FIX_CHAR_VALUE (sys_result->n_cs_precedes);
+ result.n_sign_posn = FIX_CHAR_VALUE (sys_result->n_sign_posn);
+ result.n_sep_by_space = FIX_CHAR_VALUE (sys_result->n_sep_by_space);
result.int_curr_symbol = sys_result->int_curr_symbol;
- result.int_frac_digits = sys_result->int_frac_digits;
- result.int_p_cs_precedes = sys_result->p_cs_precedes;
- result.int_p_sign_posn = sys_result->p_sign_posn;
- result.int_p_sep_by_space = sys_result->p_sep_by_space;
- result.int_n_cs_precedes = sys_result->n_cs_precedes;
- result.int_n_sign_posn = sys_result->n_sign_posn;
- result.int_n_sep_by_space = sys_result->n_sep_by_space;
+ result.int_frac_digits = FIX_CHAR_VALUE (sys_result->int_frac_digits);
+# if HAVE_STRUCT_LCONV_INT_P_CS_PRECEDES
+ result.int_p_cs_precedes = FIX_CHAR_VALUE (sys_result->int_p_cs_precedes);
+ result.int_p_sign_posn = FIX_CHAR_VALUE (sys_result->int_p_sign_posn);
+ result.int_p_sep_by_space = FIX_CHAR_VALUE (sys_result->int_p_sep_by_space);
+ result.int_n_cs_precedes = FIX_CHAR_VALUE (sys_result->int_n_cs_precedes);
+ result.int_n_sign_posn = FIX_CHAR_VALUE (sys_result->int_n_sign_posn);
+ result.int_n_sep_by_space = FIX_CHAR_VALUE (sys_result->int_n_sep_by_space);
+# else
+ result.int_p_cs_precedes = FIX_CHAR_VALUE (sys_result->p_cs_precedes);
+ result.int_p_sign_posn = FIX_CHAR_VALUE (sys_result->p_sign_posn);
+ result.int_p_sep_by_space = FIX_CHAR_VALUE (sys_result->p_sep_by_space);
+ result.int_n_cs_precedes = FIX_CHAR_VALUE (sys_result->n_cs_precedes);
+ result.int_n_sign_posn = FIX_CHAR_VALUE (sys_result->n_sign_posn);
+ result.int_n_sep_by_space = FIX_CHAR_VALUE (sys_result->n_sep_by_space);
+# endif
return &result;
}
@@ -64,8 +77,6 @@ localeconv (void)
/* Override for platforms where 'struct lconv' is a dummy. */
-# include <limits.h>
-
struct lconv *
localeconv (void)
{
diff --git a/gl/lib/lstat.c b/gl/lib/lstat.c
index 472bfbce..00a4ce2a 100644
--- a/gl/lib/lstat.c
+++ b/gl/lib/lstat.c
@@ -1,6 +1,6 @@
/* Work around a bug of lstat on some systems
- Copyright (C) 1997-2006, 2008-2022 Free Software Foundation, Inc.
+ Copyright (C) 1997-2006, 2008-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/malloc.c b/gl/lib/malloc.c
index f334dd6e..3ade35cb 100644
--- a/gl/lib/malloc.c
+++ b/gl/lib/malloc.c
@@ -1,6 +1,6 @@
/* malloc() function that is glibc compatible.
- Copyright (C) 1997-1998, 2006-2007, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 1997-1998, 2006-2007, 2009-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/malloc/dynarray-skeleton.c b/gl/lib/malloc/dynarray-skeleton.c
index bad548a4..580c278b 100644
--- a/gl/lib/malloc/dynarray-skeleton.c
+++ b/gl/lib/malloc/dynarray-skeleton.c
@@ -1,5 +1,5 @@
/* Type-safe arrays which grow dynamically.
- Copyright (C) 2017-2022 Free Software Foundation, Inc.
+ Copyright (C) 2017-2023 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/gl/lib/malloc/dynarray.h b/gl/lib/malloc/dynarray.h
index f16fd950..a9a3b085 100644
--- a/gl/lib/malloc/dynarray.h
+++ b/gl/lib/malloc/dynarray.h
@@ -1,5 +1,5 @@
/* Type-safe arrays which grow dynamically. Shared definitions.
- Copyright (C) 2017-2022 Free Software Foundation, Inc.
+ Copyright (C) 2017-2023 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
@@ -94,7 +94,6 @@
#ifndef _DYNARRAY_H
#define _DYNARRAY_H
-#include <stdbool.h>
#include <stddef.h>
#include <string.h>
diff --git a/gl/lib/malloc/dynarray_at_failure.c b/gl/lib/malloc/dynarray_at_failure.c
index 062ab706..ebc93109 100644
--- a/gl/lib/malloc/dynarray_at_failure.c
+++ b/gl/lib/malloc/dynarray_at_failure.c
@@ -1,5 +1,5 @@
/* Report an dynamic array index out of bounds condition.
- Copyright (C) 2017-2022 Free Software Foundation, Inc.
+ Copyright (C) 2017-2023 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/gl/lib/malloc/dynarray_emplace_enlarge.c b/gl/lib/malloc/dynarray_emplace_enlarge.c
index 0cff2e70..65aabb1e 100644
--- a/gl/lib/malloc/dynarray_emplace_enlarge.c
+++ b/gl/lib/malloc/dynarray_emplace_enlarge.c
@@ -1,5 +1,5 @@
/* Increase the size of a dynamic array in preparation of an emplace operation.
- Copyright (C) 2017-2022 Free Software Foundation, Inc.
+ Copyright (C) 2017-2023 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
@@ -22,7 +22,7 @@
#include <dynarray.h>
#include <errno.h>
-#include <intprops.h>
+#include <stdckdint.h>
#include <stdlib.h>
#include <string.h>
@@ -56,7 +56,7 @@ __libc_dynarray_emplace_enlarge (struct dynarray_header *list,
}
size_t new_size;
- if (INT_MULTIPLY_WRAPV (new_allocated, element_size, &new_size))
+ if (ckd_mul (&new_size, new_allocated, element_size))
return false;
void *new_array;
if (list->array == scratch)
diff --git a/gl/lib/malloc/dynarray_finalize.c b/gl/lib/malloc/dynarray_finalize.c
index 3f360c3a..673595a5 100644
--- a/gl/lib/malloc/dynarray_finalize.c
+++ b/gl/lib/malloc/dynarray_finalize.c
@@ -1,5 +1,5 @@
/* Copy the dynamically-allocated area to an explicitly-sized heap allocation.
- Copyright (C) 2017-2022 Free Software Foundation, Inc.
+ Copyright (C) 2017-2023 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/gl/lib/malloc/dynarray_resize.c b/gl/lib/malloc/dynarray_resize.c
index 8d1922e5..014f98c3 100644
--- a/gl/lib/malloc/dynarray_resize.c
+++ b/gl/lib/malloc/dynarray_resize.c
@@ -1,5 +1,5 @@
/* Increase the size of a dynamic array.
- Copyright (C) 2017-2022 Free Software Foundation, Inc.
+ Copyright (C) 2017-2023 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
@@ -22,7 +22,7 @@
#include <dynarray.h>
#include <errno.h>
-#include <intprops.h>
+#include <stdckdint.h>
#include <stdlib.h>
#include <string.h>
@@ -42,7 +42,7 @@ __libc_dynarray_resize (struct dynarray_header *list, size_t size,
over-allocation here. */
size_t new_size_bytes;
- if (INT_MULTIPLY_WRAPV (size, element_size, &new_size_bytes))
+ if (ckd_mul (&new_size_bytes, size, element_size))
{
/* Overflow. */
__set_errno (ENOMEM);
diff --git a/gl/lib/malloc/dynarray_resize_clear.c b/gl/lib/malloc/dynarray_resize_clear.c
index 8cf1b0d0..bb23c522 100644
--- a/gl/lib/malloc/dynarray_resize_clear.c
+++ b/gl/lib/malloc/dynarray_resize_clear.c
@@ -1,5 +1,5 @@
/* Increase the size of a dynamic array and clear the new part.
- Copyright (C) 2017-2022 Free Software Foundation, Inc.
+ Copyright (C) 2017-2023 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/gl/lib/malloc/scratch_buffer.h b/gl/lib/malloc/scratch_buffer.h
index e4c5c8a8..33fd2b29 100644
--- a/gl/lib/malloc/scratch_buffer.h
+++ b/gl/lib/malloc/scratch_buffer.h
@@ -1,5 +1,5 @@
/* Variable-sized buffer with on-stack default allocation.
- Copyright (C) 2015-2022 Free Software Foundation, Inc.
+ Copyright (C) 2015-2023 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
@@ -132,20 +132,4 @@ scratch_buffer_set_array_size (struct scratch_buffer *buffer,
(buffer, nelem, size));
}
-/* Return a copy of *BUFFER's first SIZE bytes as a heap-allocated block,
- deallocating *BUFFER if it was heap-allocated. SIZE must be at
- most *BUFFER's size. Return NULL (setting errno) on memory
- exhaustion. */
-void *__libc_scratch_buffer_dupfree (struct scratch_buffer *buffer,
- size_t size);
-libc_hidden_proto (__libc_scratch_buffer_dupfree)
-
-/* Alias for __libc_scratch_dupfree. */
-static __always_inline void *
-scratch_buffer_dupfree (struct scratch_buffer *buffer, size_t size)
-{
- void *r = __libc_scratch_buffer_dupfree (buffer, size);
- return __glibc_likely (r != NULL) ? r : NULL;
-}
-
#endif /* _SCRATCH_BUFFER_H */
diff --git a/gl/lib/malloc/scratch_buffer_dupfree.c b/gl/lib/malloc/scratch_buffer_dupfree.c
deleted file mode 100644
index eb3b95c1..00000000
--- a/gl/lib/malloc/scratch_buffer_dupfree.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/* Variable-sized buffer with on-stack default allocation.
- Copyright (C) 2020-2022 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <https://www.gnu.org/licenses/>. */
-
-#ifndef _LIBC
-# include <libc-config.h>
-#endif
-
-#include <scratch_buffer.h>
-#include <string.h>
-
-void *
-__libc_scratch_buffer_dupfree (struct scratch_buffer *buffer, size_t size)
-{
- void *data = buffer->data;
- if (data == buffer->__space.__c)
- {
- void *copy = malloc (size);
- return copy != NULL ? memcpy (copy, data, size) : NULL;
- }
- else
- {
- void *copy = realloc (data, size);
- return copy != NULL ? copy : data;
- }
-}
-libc_hidden_def (__libc_scratch_buffer_dupfree)
diff --git a/gl/lib/malloc/scratch_buffer_grow.c b/gl/lib/malloc/scratch_buffer_grow.c
index 9a5e4dbb..a5e8f2f7 100644
--- a/gl/lib/malloc/scratch_buffer_grow.c
+++ b/gl/lib/malloc/scratch_buffer_grow.c
@@ -1,5 +1,5 @@
/* Variable-sized buffer with on-stack default allocation.
- Copyright (C) 2015-2022 Free Software Foundation, Inc.
+ Copyright (C) 2015-2023 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/gl/lib/malloc/scratch_buffer_grow_preserve.c b/gl/lib/malloc/scratch_buffer_grow_preserve.c
index 3fe5a072..c0b5d87b 100644
--- a/gl/lib/malloc/scratch_buffer_grow_preserve.c
+++ b/gl/lib/malloc/scratch_buffer_grow_preserve.c
@@ -1,5 +1,5 @@
/* Variable-sized buffer with on-stack default allocation.
- Copyright (C) 2015-2022 Free Software Foundation, Inc.
+ Copyright (C) 2015-2023 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/gl/lib/malloc/scratch_buffer_set_array_size.c b/gl/lib/malloc/scratch_buffer_set_array_size.c
index 89c37a95..24c39350 100644
--- a/gl/lib/malloc/scratch_buffer_set_array_size.c
+++ b/gl/lib/malloc/scratch_buffer_set_array_size.c
@@ -1,5 +1,5 @@
/* Variable-sized buffer with on-stack default allocation.
- Copyright (C) 2015-2022 Free Software Foundation, Inc.
+ Copyright (C) 2015-2023 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/gl/lib/malloca.c b/gl/lib/malloca.c
index e7beaaf0..f055b1e5 100644
--- a/gl/lib/malloca.c
+++ b/gl/lib/malloca.c
@@ -1,5 +1,5 @@
/* Safe automatic memory allocation.
- Copyright (C) 2003, 2006-2007, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2006-2007, 2009-2023 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003, 2018.
This file is free software: you can redistribute it and/or modify
@@ -21,9 +21,9 @@
/* Specification. */
#include "malloca.h"
+#include <stdckdint.h>
+
#include "idx.h"
-#include "intprops.h"
-#include "verify.h"
/* The speed critical point in this file is freea() applied to an alloca()
result: it must be fast, to match the speed of alloca(). The speed of
@@ -39,7 +39,7 @@
/* Type for holding very small pointer differences. */
typedef unsigned char small_t;
/* Verify that it is wide enough. */
-verify (2 * sa_alignment_max - 1 <= (small_t) -1);
+static_assert (2 * sa_alignment_max - 1 <= (small_t) -1);
void *
mmalloca (size_t n)
@@ -50,17 +50,16 @@ mmalloca (size_t n)
uintptr_t alignment2_mask = 2 * sa_alignment_max - 1;
int plus = sizeof (small_t) + alignment2_mask;
idx_t nplus;
- if (!INT_ADD_WRAPV (n, plus, &nplus) && !xalloc_oversized (nplus, 1))
+ if (!ckd_add (&nplus, n, plus) && !xalloc_oversized (nplus, 1))
{
char *mem = (char *) malloc (nplus);
if (mem != NULL)
{
uintptr_t umem = (uintptr_t)mem, umemplus;
- /* The INT_ADD_WRAPV avoids signed integer overflow on
+ /* The ckd_add avoids signed integer overflow on
theoretical platforms where UINTPTR_MAX <= INT_MAX. */
- INT_ADD_WRAPV (umem, sizeof (small_t) + sa_alignment_max - 1,
- &umemplus);
+ ckd_add (&umemplus, umem, sizeof (small_t) + sa_alignment_max - 1);
idx_t offset = ((umemplus & ~alignment2_mask)
+ sa_alignment_max - umem);
void *vp = mem + offset;
diff --git a/gl/lib/malloca.h b/gl/lib/malloca.h
index 7ec235f3..f68ddfe0 100644
--- a/gl/lib/malloca.h
+++ b/gl/lib/malloca.h
@@ -1,5 +1,5 @@
/* Safe automatic memory allocation.
- Copyright (C) 2003-2007, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2003-2007, 2009-2023 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This file is free software: you can redistribute it and/or modify
@@ -18,6 +18,12 @@
#ifndef _MALLOCA_H
#define _MALLOCA_H
+/* This file uses _GL_ATTRIBUTE_ALLOC_SIZE, _GL_ATTRIBUTE_DEALLOC,
+ _GL_ATTRIBUTE_MALLOC, HAVE_ALLOCA. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
#include <alloca.h>
#include <stddef.h>
#include <stdlib.h>
diff --git a/gl/lib/mbrtowc-impl-utf8.h b/gl/lib/mbrtowc-impl-utf8.h
index 8e5ac14e..4fdd65d8 100644
--- a/gl/lib/mbrtowc-impl-utf8.h
+++ b/gl/lib/mbrtowc-impl-utf8.h
@@ -1,5 +1,5 @@
/* Convert multibyte character to wide character.
- Copyright (C) 1999-2002, 2005-2022 Free Software Foundation, Inc.
+ Copyright (C) 1999-2002, 2005-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/mbrtowc-impl.h b/gl/lib/mbrtowc-impl.h
index 65538e74..e9c04ed7 100644
--- a/gl/lib/mbrtowc-impl.h
+++ b/gl/lib/mbrtowc-impl.h
@@ -1,5 +1,5 @@
/* Convert multibyte character to wide character.
- Copyright (C) 1999-2002, 2005-2022 Free Software Foundation, Inc.
+ Copyright (C) 1999-2002, 2005-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/mbrtowc.c b/gl/lib/mbrtowc.c
index 4b164edd..c1a689a2 100644
--- a/gl/lib/mbrtowc.c
+++ b/gl/lib/mbrtowc.c
@@ -1,5 +1,5 @@
/* Convert multibyte character to wide character.
- Copyright (C) 1999-2002, 2005-2022 Free Software Foundation, Inc.
+ Copyright (C) 1999-2002, 2005-2023 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This file is free software: you can redistribute it and/or modify
@@ -51,11 +51,10 @@
# endif
# include "attribute.h"
-# include "verify.h"
# include "lc-charset-dispatch.h"
# include "mbtowc-lock.h"
-verify (sizeof (mbstate_t) >= 4);
+static_assert (sizeof (mbstate_t) >= 4);
static char internal_state[4];
size_t
diff --git a/gl/lib/mbsinit.c b/gl/lib/mbsinit.c
index 9621defc..6e600798 100644
--- a/gl/lib/mbsinit.c
+++ b/gl/lib/mbsinit.c
@@ -1,5 +1,5 @@
/* Test for initial conversion state.
- Copyright (C) 2008-2022 Free Software Foundation, Inc.
+ Copyright (C) 2008-2023 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This file is free software: you can redistribute it and/or modify
@@ -20,7 +20,6 @@
/* Specification. */
#include <wchar.h>
-#include "verify.h"
#if GNULIB_defined_mbstate_t
@@ -39,7 +38,7 @@
- In wc -> mb direction, mbstate_t contains no information. In other
words, it is always in the initial state. */
-verify (sizeof (mbstate_t) >= 4);
+static_assert (sizeof (mbstate_t) >= 4);
int
mbsinit (const mbstate_t *ps)
diff --git a/gl/lib/mbsrtowcs-impl.h b/gl/lib/mbsrtowcs-impl.h
index 55dafe38..bcf729dc 100644
--- a/gl/lib/mbsrtowcs-impl.h
+++ b/gl/lib/mbsrtowcs-impl.h
@@ -1,5 +1,5 @@
/* Convert string to wide string.
- Copyright (C) 2008-2022 Free Software Foundation, Inc.
+ Copyright (C) 2008-2023 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This file is free software: you can redistribute it and/or modify
diff --git a/gl/lib/mbsrtowcs-state.c b/gl/lib/mbsrtowcs-state.c
index 55160a20..0949a370 100644
--- a/gl/lib/mbsrtowcs-state.c
+++ b/gl/lib/mbsrtowcs-state.c
@@ -1,5 +1,5 @@
/* Convert string to wide string.
- Copyright (C) 2008-2022 Free Software Foundation, Inc.
+ Copyright (C) 2008-2023 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This file is free software: you can redistribute it and/or modify
diff --git a/gl/lib/mbsrtowcs.c b/gl/lib/mbsrtowcs.c
index 66019b04..c20fc416 100644
--- a/gl/lib/mbsrtowcs.c
+++ b/gl/lib/mbsrtowcs.c
@@ -1,5 +1,5 @@
/* Convert string to wide string.
- Copyright (C) 2008-2022 Free Software Foundation, Inc.
+ Copyright (C) 2008-2023 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This file is free software: you can redistribute it and/or modify
diff --git a/gl/lib/mbtowc-impl.h b/gl/lib/mbtowc-impl.h
index 2b27bafd..39b977be 100644
--- a/gl/lib/mbtowc-impl.h
+++ b/gl/lib/mbtowc-impl.h
@@ -1,5 +1,5 @@
/* Convert multibyte character to wide character.
- Copyright (C) 2011-2022 Free Software Foundation, Inc.
+ Copyright (C) 2011-2023 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2011.
This file is free software: you can redistribute it and/or modify
diff --git a/gl/lib/mbtowc-lock.c b/gl/lib/mbtowc-lock.c
index 06d32246..6ca6e10f 100644
--- a/gl/lib/mbtowc-lock.c
+++ b/gl/lib/mbtowc-lock.c
@@ -1,5 +1,5 @@
/* Return the internal lock used by mbrtowc and mbrtoc32.
- Copyright (C) 2019-2022 Free Software Foundation, Inc.
+ Copyright (C) 2019-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/mbtowc-lock.h b/gl/lib/mbtowc-lock.h
index ecfd44e8..2dc22ace 100644
--- a/gl/lib/mbtowc-lock.h
+++ b/gl/lib/mbtowc-lock.h
@@ -1,5 +1,5 @@
/* Use the internal lock used by mbrtowc and mbrtoc32.
- Copyright (C) 2019-2022 Free Software Foundation, Inc.
+ Copyright (C) 2019-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/mbtowc.c b/gl/lib/mbtowc.c
index a9a79951..8d9b06d2 100644
--- a/gl/lib/mbtowc.c
+++ b/gl/lib/mbtowc.c
@@ -1,5 +1,5 @@
/* Convert multibyte character to wide character.
- Copyright (C) 2011-2022 Free Software Foundation, Inc.
+ Copyright (C) 2011-2023 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2011.
This file is free software: you can redistribute it and/or modify
diff --git a/gl/lib/memchr.c b/gl/lib/memchr.c
index 0ca7b30a..8e955793 100644
--- a/gl/lib/memchr.c
+++ b/gl/lib/memchr.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2022
+/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2023
Free Software Foundation, Inc.
Based on strlen implementation by Torbjorn Granlund (tege@sics.se),
diff --git a/gl/lib/memchr.valgrind b/gl/lib/memchr.valgrind
index cb0f351c..97690f2c 100644
--- a/gl/lib/memchr.valgrind
+++ b/gl/lib/memchr.valgrind
@@ -1,6 +1,6 @@
# Suppress a valgrind message about use of uninitialized memory in memchr().
-# Copyright (C) 2009-2022 Free Software Foundation, Inc.
+# Copyright (C) 2009-2023 Free Software Foundation, Inc.
#
# This file is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/memmem.c b/gl/lib/memmem.c
index 5701052d..c0b48c1b 100644
--- a/gl/lib/memmem.c
+++ b/gl/lib/memmem.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-1994, 1996-1998, 2000, 2004, 2007-2022 Free Software
+/* Copyright (C) 1991-1994, 1996-1998, 2000, 2004, 2007-2023 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/gl/lib/mempcpy.c b/gl/lib/mempcpy.c
index 9aae418e..24a31359 100644
--- a/gl/lib/mempcpy.c
+++ b/gl/lib/mempcpy.c
@@ -1,5 +1,5 @@
/* Copy memory area and return pointer after last written byte.
- Copyright (C) 2003, 2007, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2007, 2009-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/memrchr.c b/gl/lib/memrchr.c
index 90fdb86f..c5b1fe8b 100644
--- a/gl/lib/memrchr.c
+++ b/gl/lib/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-2022 Free Software
+ Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2023 Free Software
Foundation, Inc.
Based on strlen implementation by Torbjorn Granlund (tege@sics.se),
diff --git a/gl/lib/minmax.h b/gl/lib/minmax.h
index b4b1345b..0ac40198 100644
--- a/gl/lib/minmax.h
+++ b/gl/lib/minmax.h
@@ -1,5 +1,5 @@
/* MIN, MAX macros.
- Copyright (C) 1995, 1998, 2001, 2003, 2005, 2009-2022 Free Software
+ Copyright (C) 1995, 1998, 2001, 2003, 2005, 2009-2023 Free Software
Foundation, Inc.
This file is free software: you can redistribute it and/or modify
@@ -23,6 +23,11 @@
MIN, MAX macro redefinitions on some systems; the workaround is to
#include this file as the last one among the #include list. */
+/* This file uses HAVE_MINMAX_IN_LIMITS_H, HAVE_MINMAX_IN_SYS_PARAM_H. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
/* Before we define the following symbols we get the <limits.h> file
since otherwise we get redefinitions on some systems if <limits.h> is
included after this file. Likewise for <sys/param.h>.
diff --git a/gl/lib/mkdir.c b/gl/lib/mkdir.c
index 49017018..f94aba17 100644
--- a/gl/lib/mkdir.c
+++ b/gl/lib/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-2022 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2003, 2006, 2008-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/mkdtemp.c b/gl/lib/mkdtemp.c
index 0577870d..115bb6bf 100644
--- a/gl/lib/mkdtemp.c
+++ b/gl/lib/mkdtemp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2001-2003, 2006-2007, 2009-2022 Free Software
+/* Copyright (C) 1999, 2001-2003, 2006-2007, 2009-2023 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/gl/lib/mkstemp.c b/gl/lib/mkstemp.c
index 7e0a214f..77aadbbd 100644
--- a/gl/lib/mkstemp.c
+++ b/gl/lib/mkstemp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998-1999, 2001, 2005-2007, 2009-2022 Free Software
+/* Copyright (C) 1998-1999, 2001, 2005-2007, 2009-2023 Free Software
Foundation, Inc.
This file is derived from the one in the GNU C Library.
diff --git a/gl/lib/msvc-inval.c b/gl/lib/msvc-inval.c
index d6651caa..c5149a8f 100644
--- a/gl/lib/msvc-inval.c
+++ b/gl/lib/msvc-inval.c
@@ -1,5 +1,5 @@
/* Invalid parameter handler for MSVC runtime libraries.
- Copyright (C) 2011-2022 Free Software Foundation, Inc.
+ Copyright (C) 2011-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/msvc-inval.h b/gl/lib/msvc-inval.h
index 1230b899..c16d8801 100644
--- a/gl/lib/msvc-inval.h
+++ b/gl/lib/msvc-inval.h
@@ -1,5 +1,5 @@
/* Invalid parameter handler for MSVC runtime libraries.
- Copyright (C) 2011-2022 Free Software Foundation, Inc.
+ Copyright (C) 2011-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -52,6 +52,11 @@
AC_DEFINE([MSVC_INVALID_PARAMETER_HANDLING], [SANE_LIBRARY_HANDLING])
*/
+/* This file uses HAVE_MSVC_INVALID_PARAMETER_HANDLER. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
#define DEFAULT_HANDLING 0
#define HAIRY_LIBRARY_HANDLING 1
#define SANE_LIBRARY_HANDLING 2
diff --git a/gl/lib/msvc-nothrow.c b/gl/lib/msvc-nothrow.c
index aa069643..f729fe66 100644
--- a/gl/lib/msvc-nothrow.c
+++ b/gl/lib/msvc-nothrow.c
@@ -1,6 +1,6 @@
/* Wrappers that don't throw invalid parameter notifications
with MSVC runtime libraries.
- Copyright (C) 2011-2022 Free Software Foundation, Inc.
+ Copyright (C) 2011-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/msvc-nothrow.h b/gl/lib/msvc-nothrow.h
index 53451557..0dd229fd 100644
--- a/gl/lib/msvc-nothrow.h
+++ b/gl/lib/msvc-nothrow.h
@@ -1,6 +1,6 @@
/* Wrappers that don't throw invalid parameter notifications
with MSVC runtime libraries.
- Copyright (C) 2011-2022 Free Software Foundation, Inc.
+ Copyright (C) 2011-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -25,6 +25,11 @@
This file defines wrappers that turn such an invalid parameter notification
into an error code. */
+/* This file uses HAVE_MSVC_INVALID_PARAMETER_HANDLER. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
#if defined _WIN32 && ! defined __CYGWIN__
/* Get original declaration of _get_osfhandle. */
diff --git a/gl/lib/nanosleep.c b/gl/lib/nanosleep.c
index 446794ed..10974df4 100644
--- a/gl/lib/nanosleep.c
+++ b/gl/lib/nanosleep.c
@@ -1,6 +1,6 @@
/* Provide a replacement for the POSIX nanosleep function.
- Copyright (C) 1999-2000, 2002, 2004-2022 Free Software Foundation, Inc.
+ Copyright (C) 1999-2000, 2002, 2004-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -23,9 +23,7 @@
#include <time.h>
#include "intprops.h"
-#include "verify.h"
-#include <stdbool.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/select.h>
@@ -59,11 +57,10 @@ nanosleep (const struct timespec *requested_delay,
{
/* Verify that time_t is large enough. */
- verify (TYPE_MAXIMUM (time_t) / 24 / 24 / 60 / 60);
+ static_assert (TYPE_MAXIMUM (time_t) / 24 / 24 / 60 / 60);
const time_t limit = 24 * 24 * 60 * 60;
time_t seconds = requested_delay->tv_sec;
- struct timespec intermediate;
- intermediate.tv_nsec = requested_delay->tv_nsec;
+ struct timespec intermediate = *requested_delay;
while (limit < seconds)
{
diff --git a/gl/lib/nl_langinfo-lock.c b/gl/lib/nl_langinfo-lock.c
index c36882d5..e5cdcd3e 100644
--- a/gl/lib/nl_langinfo-lock.c
+++ b/gl/lib/nl_langinfo-lock.c
@@ -1,5 +1,5 @@
/* Return the internal lock used by nl_langinfo.
- Copyright (C) 2019-2022 Free Software Foundation, Inc.
+ Copyright (C) 2019-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/nl_langinfo.c b/gl/lib/nl_langinfo.c
index 3fa47822..f872c6d5 100644
--- a/gl/lib/nl_langinfo.c
+++ b/gl/lib/nl_langinfo.c
@@ -1,6 +1,6 @@
/* nl_langinfo() replacement: query locale dependent information.
- Copyright (C) 2007-2022 Free Software Foundation, Inc.
+ Copyright (C) 2007-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -70,6 +70,8 @@
static char *
ctype_codeset (void)
{
+ /* This function is only used on platforms which don't have uselocale().
+ Therefore we don't need to look at the per-thread locale first, here. */
static char result[2 + 10 + 1];
char buf[2 + 10 + 1];
char locale[SETLOCALE_NULL_MAX];
diff --git a/gl/lib/nonblocking.c b/gl/lib/nonblocking.c
index 9ea31f7d..3a8bb2aa 100644
--- a/gl/lib/nonblocking.c
+++ b/gl/lib/nonblocking.c
@@ -1,5 +1,5 @@
/* Non-blocking I/O for pipe or socket descriptors.
- Copyright (C) 2011-2022 Free Software Foundation, Inc.
+ Copyright (C) 2011-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/nonblocking.h b/gl/lib/nonblocking.h
index 8e00fd74..2bb2c27f 100644
--- a/gl/lib/nonblocking.h
+++ b/gl/lib/nonblocking.h
@@ -1,5 +1,5 @@
/* Non-blocking I/O for pipe or socket descriptors.
- Copyright (C) 2011-2022 Free Software Foundation, Inc.
+ Copyright (C) 2011-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -17,8 +17,6 @@
#ifndef _NONBLOCKING_H
#define _NONBLOCKING_H
-#include <stdbool.h>
-
/* Non-blocking I/O is an I/O mode by which read(), write() calls avoid
blocking the current thread. When non-blocking is enabled:
- A read() call returns -1 with errno set to EAGAIN when no data or EOF
diff --git a/gl/lib/open.c b/gl/lib/open.c
index 170bff10..7ec8fdc3 100644
--- a/gl/lib/open.c
+++ b/gl/lib/open.c
@@ -1,5 +1,5 @@
/* Open a descriptor to a file.
- Copyright (C) 2007-2022 Free Software Foundation, Inc.
+ Copyright (C) 2007-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/openat-die.c b/gl/lib/openat-die.c
index 486d06c2..df3dbc9b 100644
--- a/gl/lib/openat-die.c
+++ b/gl/lib/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-2022 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2008-2023 Free Software Foundation, Inc.
This 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/gl/lib/openat-priv.h b/gl/lib/openat-priv.h
index 5d608107..1d31c4e8 100644
--- a/gl/lib/openat-priv.h
+++ b/gl/lib/openat-priv.h
@@ -1,6 +1,6 @@
/* Internals for openat-like functions.
- Copyright (C) 2005-2006, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2009-2023 Free Software Foundation, Inc.
This 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/gl/lib/openat-proc.c b/gl/lib/openat-proc.c
index 3bacf7db..88f70be4 100644
--- a/gl/lib/openat-proc.c
+++ b/gl/lib/openat-proc.c
@@ -1,6 +1,6 @@
/* Create /proc/self/fd-related names for subfiles of open directories.
- Copyright (C) 2006, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2023 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -30,9 +30,12 @@
#include <string.h>
#include <unistd.h>
-#ifdef __KLIBC__
+#ifdef __KLIBC__ /* OS/2 */
# include <InnoTekLIBC/backend.h>
#endif
+#ifdef __MVS__ /* z/OS */
+# include <termios.h>
+#endif
#include "intprops.h"
@@ -53,7 +56,8 @@ openat_proc_name (char buf[OPENAT_BUFFER_SIZE], int fd, char const *file)
return buf;
}
-#ifndef __KLIBC__
+#if !(defined __KLIBC__ || defined __MVS__)
+ /* Generic code for Linux, Solaris, and similar platforms. */
# define PROC_SELF_FD_FORMAT "/proc/self/fd/%d/"
{
enum {
@@ -107,14 +111,29 @@ openat_proc_name (char buf[OPENAT_BUFFER_SIZE], int fd, char const *file)
dirlen = sprintf (result, PROC_SELF_FD_FORMAT, fd);
}
}
-#else
+#else /* (defined __KLIBC__ || defined __MVS__), i.e. OS/2 or z/OS */
/* OS/2 kLIBC provides a function to retrieve a path from a fd. */
{
- char dir[_MAX_PATH];
size_t bufsize;
+# ifdef __KLIBC__
+ char dir[_MAX_PATH];
if (__libc_Back_ioFHToPath (fd, dir, sizeof dir))
return NULL;
+# endif
+# ifdef __MVS__
+ char dir[_XOPEN_PATH_MAX];
+ /* Documentation:
+ https://www.ibm.com/docs/en/zos/2.2.0?topic=functions-w-ioctl-w-pioctl-control-devices */
+ if (w_ioctl (fd, _IOCC_GPN, sizeof dir, dir) < 0)
+ return NULL;
+ /* Documentation:
+ https://www.ibm.com/docs/en/zos/2.2.0?topic=functions-e2a-l-convert-characters-from-ebcdic-ascii */
+ dirlen = __e2a_l (dir, strlen (dir));
+ if (dirlen < 0 || dirlen >= sizeof dir)
+ return NULL;
+ dir[dirlen] = '\0';
+# endif
dirlen = strlen (dir);
bufsize = dirlen + 1 + strlen (file) + 1; /* 1 for '/', 1 for null */
diff --git a/gl/lib/openat.c b/gl/lib/openat.c
index 52aab19d..f28b10e1 100644
--- a/gl/lib/openat.c
+++ b/gl/lib/openat.c
@@ -1,5 +1,5 @@
/* provide a replacement openat function
- Copyright (C) 2004-2022 Free Software Foundation, Inc.
+ Copyright (C) 2004-2023 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -44,7 +44,6 @@ orig_openat (int fd, char const *filename, int flags, mode_t mode)
#include "cloexec.h"
#include <stdarg.h>
-#include <stdbool.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
diff --git a/gl/lib/openat.h b/gl/lib/openat.h
index 56919ef8..97f066d1 100644
--- a/gl/lib/openat.h
+++ b/gl/lib/openat.h
@@ -1,5 +1,5 @@
/* provide a replacement openat function
- Copyright (C) 2004-2006, 2008-2022 Free Software Foundation, Inc.
+ Copyright (C) 2004-2006, 2008-2023 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -19,16 +19,18 @@
#ifndef _GL_HEADER_OPENAT
#define _GL_HEADER_OPENAT
+/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE, _Noreturn,
+ _GL_ATTRIBUTE_DEPRECATED, HAVE_OPENAT. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
-#include <stdbool.h>
-#ifndef _GL_INLINE_HEADER_BEGIN
- #error "Please include config.h first."
-#endif
_GL_INLINE_HEADER_BEGIN
#if !HAVE_OPENAT
diff --git a/gl/lib/opendir.c b/gl/lib/opendir.c
index fc6b455a..ceb0e282 100644
--- a/gl/lib/opendir.c
+++ b/gl/lib/opendir.c
@@ -1,5 +1,5 @@
/* Start reading the entries of a directory.
- Copyright (C) 2006-2022 Free Software Foundation, Inc.
+ Copyright (C) 2006-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -29,13 +29,17 @@
#else
-# include <stdlib.h>
-
-# include "dirent-private.h"
# include "filename.h"
#endif
+#include <stdlib.h>
+#include <string.h>
+
+#if GNULIB_defined_DIR
+# include "dirent-private.h"
+#endif
+
#if REPLACE_FCHDIR
# include <unistd.h>
#endif
@@ -57,14 +61,37 @@
DIR *
opendir (const char *dir_name)
+#undef opendir
{
-#if HAVE_OPENDIR
-# undef opendir
+#if HAVE_DIRENT_H /* equivalent to HAVE_OPENDIR */
DIR *dirp;
+# if GNULIB_defined_DIR
+# undef DIR
+
+ dirp = (struct gl_directory *) malloc (sizeof (struct gl_directory));
+ if (dirp == NULL)
+ {
+ errno = ENOMEM;
+ return NULL;
+ }
+
+ DIR *real_dirp = opendir (dir_name);
+ if (real_dirp == NULL)
+ {
+ int saved_errno = errno;
+ free (dirp);
+ errno = saved_errno;
+ return NULL;
+ }
+
+ dirp->fd_to_close = -1;
+ dirp->real_dirp = real_dirp;
+# else
dirp = opendir (dir_name);
if (dirp == NULL)
return NULL;
+# endif
# ifdef __KLIBC__
{
@@ -82,6 +109,7 @@ opendir (const char *dir_name)
}
}
# endif
+
#else
char dir_name_mask[MAX_PATH + 1 + 1 + 1];
@@ -154,6 +182,7 @@ opendir (const char *dir_name)
errno = ENOMEM;
return NULL;
}
+ dirp->fd_to_close = -1;
dirp->status = status;
dirp->current = current;
if (status == -1)
diff --git a/gl/lib/pathmax.h b/gl/lib/pathmax.h
index 19b93d7e..6930283b 100644
--- a/gl/lib/pathmax.h
+++ b/gl/lib/pathmax.h
@@ -1,5 +1,5 @@
/* Define PATH_MAX somehow. Requires sys/types.h.
- Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2022 Free Software
+ Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2023 Free Software
Foundation, Inc.
This file is free software: you can redistribute it and/or modify
@@ -39,6 +39,11 @@
#endif
*/
+/* This file uses HAVE_SYS_PARAM_H. */
+# if !_GL_CONFIG_H_INCLUDED
+# error "Please include config.h first."
+# endif
+
# include <unistd.h>
# include <limits.h>
diff --git a/gl/lib/pipe-safer.c b/gl/lib/pipe-safer.c
index 22f8695e..750d0970 100644
--- a/gl/lib/pipe-safer.c
+++ b/gl/lib/pipe-safer.c
@@ -1,5 +1,5 @@
/* Invoke pipe, but avoid some glitches.
- Copyright (C) 2005-2006, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2009-2023 Free Software Foundation, Inc.
This 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/gl/lib/pipe.c b/gl/lib/pipe.c
index ce909b9f..e8573ed9 100644
--- a/gl/lib/pipe.c
+++ b/gl/lib/pipe.c
@@ -1,5 +1,5 @@
/* Create a pipe.
- Copyright (C) 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2009-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/printf-args.c b/gl/lib/printf-args.c
index 669c24a4..b2b21aee 100644
--- a/gl/lib/printf-args.c
+++ b/gl/lib/printf-args.c
@@ -1,5 +1,5 @@
/* Decomposed printf argument list.
- Copyright (C) 1999, 2002-2003, 2005-2007, 2009-2022 Free Software
+ Copyright (C) 1999, 2002-2003, 2005-2007, 2009-2023 Free Software
Foundation, Inc.
This file is free software: you can redistribute it and/or modify
@@ -29,6 +29,9 @@
# include "printf-args.h"
#endif
+/* Get INT_WIDTH. */
+#include <limits.h>
+
#ifdef STATIC
STATIC
#endif
@@ -71,6 +74,102 @@ PRINTF_FETCHARGS (va_list args, arguments *a)
case TYPE_ULONGLONGINT:
ap->a.a_ulonglongint = va_arg (args, unsigned long long int);
break;
+ case TYPE_INT8_T:
+ #if INT8_WIDTH < INT_WIDTH
+ ap->a.a_int8_t = va_arg (args, /* int8_t */ int);
+ #else
+ ap->a.a_int8_t = va_arg (args, int8_t);
+ #endif
+ break;
+ case TYPE_UINT8_T:
+ #if UINT8_WIDTH < INT_WIDTH
+ ap->a.a_uint8_t = va_arg (args, /* uint8_t */ int);
+ #else
+ ap->a.a_uint8_t = va_arg (args, uint8_t);
+ #endif
+ break;
+ case TYPE_INT16_T:
+ #if INT16_WIDTH < INT_WIDTH
+ ap->a.a_int16_t = va_arg (args, /* int16_t */ int);
+ #else
+ ap->a.a_int16_t = va_arg (args, int16_t);
+ #endif
+ break;
+ case TYPE_UINT16_T:
+ #if UINT16_WIDTH < INT_WIDTH
+ ap->a.a_uint16_t = va_arg (args, /* uint16_t */ int);
+ #else
+ ap->a.a_uint16_t = va_arg (args, uint16_t);
+ #endif
+ break;
+ case TYPE_INT32_T:
+ #if INT32_WIDTH < INT_WIDTH
+ ap->a.a_int32_t = va_arg (args, /* int32_t */ int);
+ #else
+ ap->a.a_int32_t = va_arg (args, int32_t);
+ #endif
+ break;
+ case TYPE_UINT32_T:
+ #if UINT32_WIDTH < INT_WIDTH
+ ap->a.a_uint32_t = va_arg (args, /* uint32_t */ int);
+ #else
+ ap->a.a_uint32_t = va_arg (args, uint32_t);
+ #endif
+ break;
+ case TYPE_INT64_T:
+ ap->a.a_int64_t = va_arg (args, int64_t);
+ break;
+ case TYPE_UINT64_T:
+ ap->a.a_uint64_t = va_arg (args, uint64_t);
+ break;
+ case TYPE_INT_FAST8_T:
+ #if INT_FAST8_WIDTH < INT_WIDTH
+ ap->a.a_int_fast8_t = va_arg (args, /* int_fast8_t */ int);
+ #else
+ ap->a.a_int_fast8_t = va_arg (args, int_fast8_t);
+ #endif
+ break;
+ case TYPE_UINT_FAST8_T:
+ #if UINT_FAST8_WIDTH < INT_WIDTH
+ ap->a.a_uint_fast8_t = va_arg (args, /* uint_fast8_t */ int);
+ #else
+ ap->a.a_uint_fast8_t = va_arg (args, uint_fast8_t);
+ #endif
+ break;
+ case TYPE_INT_FAST16_T:
+ #if INT_FAST16_WIDTH < INT_WIDTH
+ ap->a.a_int_fast16_t = va_arg (args, /* int_fast16_t */ int);
+ #else
+ ap->a.a_int_fast16_t = va_arg (args, int_fast16_t);
+ #endif
+ break;
+ case TYPE_UINT_FAST16_T:
+ #if UINT_FAST16_WIDTH < INT_WIDTH
+ ap->a.a_uint_fast16_t = va_arg (args, /* uint_fast16_t */ int);
+ #else
+ ap->a.a_uint_fast16_t = va_arg (args, uint_fast16_t);
+ #endif
+ break;
+ case TYPE_INT_FAST32_T:
+ #if INT_FAST32_WIDTH < INT_WIDTH
+ ap->a.a_int_fast32_t = va_arg (args, /* int_fast32_t */ int);
+ #else
+ ap->a.a_int_fast32_t = va_arg (args, int_fast32_t);
+ #endif
+ break;
+ case TYPE_UINT_FAST32_T:
+ #if UINT_FAST32_WIDTH < INT_WIDTH
+ ap->a.a_uint_fast32_t = va_arg (args, /* uint_fast32_t */ int);
+ #else
+ ap->a.a_uint_fast32_t = va_arg (args, uint_fast32_t);
+ #endif
+ break;
+ case TYPE_INT_FAST64_T:
+ ap->a.a_int_fast64_t = va_arg (args, int_fast64_t);
+ break;
+ case TYPE_UINT_FAST64_T:
+ ap->a.a_uint_fast64_t = va_arg (args, uint_fast64_t);
+ break;
case TYPE_DOUBLE:
ap->a.a_double = va_arg (args, double);
break;
@@ -136,6 +235,30 @@ PRINTF_FETCHARGS (va_list args, arguments *a)
case TYPE_COUNT_LONGLONGINT_POINTER:
ap->a.a_count_longlongint_pointer = va_arg (args, long long int *);
break;
+ case TYPE_COUNT_INT8_T_POINTER:
+ ap->a.a_count_int8_t_pointer = va_arg (args, int8_t *);
+ break;
+ case TYPE_COUNT_INT16_T_POINTER:
+ ap->a.a_count_int16_t_pointer = va_arg (args, int16_t *);
+ break;
+ case TYPE_COUNT_INT32_T_POINTER:
+ ap->a.a_count_int32_t_pointer = va_arg (args, int32_t *);
+ break;
+ case TYPE_COUNT_INT64_T_POINTER:
+ ap->a.a_count_int64_t_pointer = va_arg (args, int64_t *);
+ break;
+ case TYPE_COUNT_INT_FAST8_T_POINTER:
+ ap->a.a_count_int_fast8_t_pointer = va_arg (args, int_fast8_t *);
+ break;
+ case TYPE_COUNT_INT_FAST16_T_POINTER:
+ ap->a.a_count_int_fast16_t_pointer = va_arg (args, int_fast16_t *);
+ break;
+ case TYPE_COUNT_INT_FAST32_T_POINTER:
+ ap->a.a_count_int_fast32_t_pointer = va_arg (args, int_fast32_t *);
+ break;
+ case TYPE_COUNT_INT_FAST64_T_POINTER:
+ ap->a.a_count_int_fast64_t_pointer = va_arg (args, int_fast64_t *);
+ break;
#if ENABLE_UNISTDIO
/* The unistdio extensions. */
case TYPE_U8_STRING:
diff --git a/gl/lib/printf-args.h b/gl/lib/printf-args.h
index 553fe961..11016102 100644
--- a/gl/lib/printf-args.h
+++ b/gl/lib/printf-args.h
@@ -1,5 +1,5 @@
/* Decomposed printf argument list.
- Copyright (C) 1999, 2002-2003, 2006-2007, 2011-2022 Free Software
+ Copyright (C) 1999, 2002-2003, 2006-2007, 2011-2023 Free Software
Foundation, Inc.
This file is free software: you can redistribute it and/or modify
@@ -41,6 +41,9 @@
# include <wchar.h>
#endif
+/* Get intN_t, uintN_t, intN_fast_t, uintN_fast_t. */
+#include <stdint.h>
+
/* Get va_list. */
#include <stdarg.h>
@@ -59,6 +62,26 @@ typedef enum
TYPE_ULONGINT,
TYPE_LONGLONGINT,
TYPE_ULONGLONGINT,
+ /* According to ISO C 23 § 7.23.6.1, "all exact-width integer types",
+ "all minimum-width integer types", and "all fastest minimum-width integer
+ types" defined in <stdint.h> should be supported. But for portability
+ between platforms, we support only those with N = 8, 16, 32, 64. */
+ TYPE_INT8_T,
+ TYPE_UINT8_T,
+ TYPE_INT16_T,
+ TYPE_UINT16_T,
+ TYPE_INT32_T,
+ TYPE_UINT32_T,
+ TYPE_INT64_T,
+ TYPE_UINT64_T,
+ TYPE_INT_FAST8_T,
+ TYPE_UINT_FAST8_T,
+ TYPE_INT_FAST16_T,
+ TYPE_UINT_FAST16_T,
+ TYPE_INT_FAST32_T,
+ TYPE_UINT_FAST32_T,
+ TYPE_INT_FAST64_T,
+ TYPE_UINT_FAST64_T,
TYPE_DOUBLE,
TYPE_LONGDOUBLE,
TYPE_CHAR,
@@ -74,7 +97,15 @@ typedef enum
TYPE_COUNT_SHORT_POINTER,
TYPE_COUNT_INT_POINTER,
TYPE_COUNT_LONGINT_POINTER,
- TYPE_COUNT_LONGLONGINT_POINTER
+ TYPE_COUNT_LONGLONGINT_POINTER,
+ TYPE_COUNT_INT8_T_POINTER,
+ TYPE_COUNT_INT16_T_POINTER,
+ TYPE_COUNT_INT32_T_POINTER,
+ TYPE_COUNT_INT64_T_POINTER,
+ TYPE_COUNT_INT_FAST8_T_POINTER,
+ TYPE_COUNT_INT_FAST16_T_POINTER,
+ TYPE_COUNT_INT_FAST32_T_POINTER,
+ TYPE_COUNT_INT_FAST64_T_POINTER
#if ENABLE_UNISTDIO
/* The unistdio extensions. */
, TYPE_U8_STRING
@@ -99,7 +130,23 @@ typedef struct
unsigned long int a_ulongint;
long long int a_longlongint;
unsigned long long int a_ulonglongint;
- float a_float;
+ int8_t a_int8_t;
+ uint8_t a_uint8_t;
+ int16_t a_int16_t;
+ uint16_t a_uint16_t;
+ int32_t a_int32_t;
+ uint32_t a_uint32_t;
+ int64_t a_int64_t;
+ uint64_t a_uint64_t;
+ int_fast8_t a_int_fast8_t;
+ uint_fast8_t a_uint_fast8_t;
+ int_fast16_t a_int_fast16_t;
+ uint_fast16_t a_uint_fast16_t;
+ int_fast32_t a_int_fast32_t;
+ uint_fast32_t a_uint_fast32_t;
+ int_fast64_t a_int_fast64_t;
+ uint_fast64_t a_uint_fast64_t;
+ float a_float; /* unused */
double a_double;
long double a_longdouble;
int a_char;
@@ -116,6 +163,14 @@ typedef struct
int * a_count_int_pointer;
long int * a_count_longint_pointer;
long long int * a_count_longlongint_pointer;
+ int8_t * a_count_int8_t_pointer;
+ int16_t * a_count_int16_t_pointer;
+ int32_t * a_count_int32_t_pointer;
+ int64_t * a_count_int64_t_pointer;
+ int_fast8_t * a_count_int_fast8_t_pointer;
+ int_fast16_t * a_count_int_fast16_t_pointer;
+ int_fast32_t * a_count_int_fast32_t_pointer;
+ int_fast64_t * a_count_int_fast64_t_pointer;
#if ENABLE_UNISTDIO
/* The unistdio extensions. */
const uint8_t * a_u8_string;
diff --git a/gl/lib/printf-parse.c b/gl/lib/printf-parse.c
index aab02dc5..d3f2c3cb 100644
--- a/gl/lib/printf-parse.c
+++ b/gl/lib/printf-parse.c
@@ -1,5 +1,5 @@
/* Formatted output to strings.
- Copyright (C) 1999-2000, 2002-2003, 2006-2022 Free Software Foundation, Inc.
+ Copyright (C) 1999-2000, 2002-2003, 2006-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -326,226 +326,317 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a)
arg_type type;
/* Parse argument type/size specifiers. */
- {
- int flags = 0;
-
- for (;;)
- {
- if (*cp == 'h')
- {
- flags |= (1 << (flags & 1));
- cp++;
- }
- else if (*cp == 'L')
- {
- flags |= 4;
- cp++;
- }
- else if (*cp == 'l')
- {
- flags += 8;
- cp++;
- }
- else if (*cp == 'j')
- {
- if (sizeof (intmax_t) > sizeof (long))
- {
- /* intmax_t = long long */
- flags += 16;
- }
- else if (sizeof (intmax_t) > sizeof (int))
- {
- /* intmax_t = long */
- flags += 8;
- }
- cp++;
- }
- else if (*cp == 'z' || *cp == 'Z')
- {
- /* 'z' is standardized in ISO C 99, but glibc uses 'Z'
- because the warning facility in gcc-2.95.2 understands
- only 'Z' (see gcc-2.95.2/gcc/c-common.c:1784). */
- if (sizeof (size_t) > sizeof (long))
- {
- /* size_t = long long */
- flags += 16;
- }
- else if (sizeof (size_t) > sizeof (int))
- {
- /* size_t = long */
- flags += 8;
- }
- cp++;
- }
- else if (*cp == 't')
- {
- if (sizeof (ptrdiff_t) > sizeof (long))
- {
- /* ptrdiff_t = long long */
- flags += 16;
- }
- else if (sizeof (ptrdiff_t) > sizeof (int))
- {
- /* ptrdiff_t = long */
- flags += 8;
- }
- cp++;
- }
+ /* Relevant for the conversion characters d, i. */
+ arg_type signed_type = TYPE_INT;
+ /* Relevant for the conversion characters b, o, u, x, X. */
+ arg_type unsigned_type = TYPE_UINT;
+ /* Relevant for the conversion characters n. */
+ arg_type pointer_type = TYPE_COUNT_INT_POINTER;
+ /* Relevant for the conversion characters a, A, e, E, f, F, g, G. */
+ arg_type floatingpoint_type = TYPE_DOUBLE;
+
+ if (*cp == 'h')
+ {
+ if (cp[1] == 'h')
+ {
+ signed_type = TYPE_SCHAR;
+ unsigned_type = TYPE_UCHAR;
+ pointer_type = TYPE_COUNT_SCHAR_POINTER;
+ cp += 2;
+ }
+ else
+ {
+ signed_type = TYPE_SHORT;
+ unsigned_type = TYPE_USHORT;
+ pointer_type = TYPE_COUNT_SHORT_POINTER;
+ cp++;
+ }
+ }
+ else if (*cp == 'l')
+ {
+ if (cp[1] == 'l')
+ {
+ signed_type = TYPE_LONGLONGINT;
+ unsigned_type = TYPE_ULONGLONGINT;
+ pointer_type = TYPE_COUNT_LONGLONGINT_POINTER;
+ /* For backward compatibility only. */
+ floatingpoint_type = TYPE_LONGDOUBLE;
+ cp += 2;
+ }
+ else
+ {
+ signed_type = TYPE_LONGINT;
+ unsigned_type = TYPE_ULONGINT;
+ pointer_type = TYPE_COUNT_LONGINT_POINTER;
+ cp++;
+ }
+ }
+ else if (*cp == 'j')
+ {
+ if (sizeof (intmax_t) > sizeof (long))
+ {
+ /* intmax_t = long long */
+ signed_type = TYPE_LONGLONGINT;
+ unsigned_type = TYPE_ULONGLONGINT;
+ pointer_type = TYPE_COUNT_LONGLONGINT_POINTER;
+ /* For backward compatibility only. */
+ floatingpoint_type = TYPE_LONGDOUBLE;
+ }
+ else if (sizeof (intmax_t) > sizeof (int))
+ {
+ /* intmax_t = long */
+ signed_type = TYPE_LONGINT;
+ unsigned_type = TYPE_ULONGINT;
+ pointer_type = TYPE_COUNT_LONGINT_POINTER;
+ }
+ cp++;
+ }
+ else if (*cp == 'z' || *cp == 'Z')
+ {
+ /* 'z' is standardized in ISO C 99, but glibc uses 'Z'
+ because the warning facility in gcc-2.95.2 understands
+ only 'Z' (see gcc-2.95.2/gcc/c-common.c:1784). */
+ if (sizeof (size_t) > sizeof (long))
+ {
+ /* size_t = unsigned long long */
+ signed_type = TYPE_LONGLONGINT;
+ unsigned_type = TYPE_ULONGLONGINT;
+ pointer_type = TYPE_COUNT_LONGLONGINT_POINTER;
+ /* For backward compatibility only. */
+ floatingpoint_type = TYPE_LONGDOUBLE;
+ }
+ else if (sizeof (size_t) > sizeof (int))
+ {
+ /* size_t = unsigned long */
+ signed_type = TYPE_LONGINT;
+ unsigned_type = TYPE_ULONGINT;
+ pointer_type = TYPE_COUNT_LONGINT_POINTER;
+ }
+ cp++;
+ }
+ else if (*cp == 't')
+ {
+ if (sizeof (ptrdiff_t) > sizeof (long))
+ {
+ /* ptrdiff_t = long long */
+ signed_type = TYPE_LONGLONGINT;
+ unsigned_type = TYPE_ULONGLONGINT;
+ pointer_type = TYPE_COUNT_LONGLONGINT_POINTER;
+ /* For backward compatibility only. */
+ floatingpoint_type = TYPE_LONGDOUBLE;
+ }
+ else if (sizeof (ptrdiff_t) > sizeof (int))
+ {
+ /* ptrdiff_t = long */
+ signed_type = TYPE_LONGINT;
+ unsigned_type = TYPE_ULONGINT;
+ pointer_type = TYPE_COUNT_LONGINT_POINTER;
+ }
+ cp++;
+ }
+ else if (*cp == 'w')
+ {
+ /* wN and wfN are standardized in ISO C 23. */
+ if (cp[1] == 'f')
+ {
+ if (cp[2] == '8')
+ {
+ signed_type = TYPE_INT_FAST8_T;
+ unsigned_type = TYPE_UINT_FAST8_T;
+ pointer_type = TYPE_COUNT_INT_FAST8_T_POINTER;
+ cp += 3;
+ }
+ else if (cp[2] == '1' && cp[3] == '6')
+ {
+ signed_type = TYPE_INT_FAST16_T;
+ unsigned_type = TYPE_UINT_FAST16_T;
+ pointer_type = TYPE_COUNT_INT_FAST16_T_POINTER;
+ cp += 4;
+ }
+ else if (cp[2] == '3' && cp[3] == '2')
+ {
+ signed_type = TYPE_INT_FAST32_T;
+ unsigned_type = TYPE_UINT_FAST32_T;
+ pointer_type = TYPE_COUNT_INT_FAST32_T_POINTER;
+ cp += 4;
+ }
+ else if (cp[2] == '6' && cp[3] == '4')
+ {
+ signed_type = TYPE_INT_FAST64_T;
+ unsigned_type = TYPE_UINT_FAST64_T;
+ pointer_type = TYPE_COUNT_INT_FAST64_T_POINTER;
+ cp += 4;
+ }
+ }
+ else
+ {
+ if (cp[1] == '8')
+ {
+ signed_type = TYPE_INT8_T;
+ unsigned_type = TYPE_UINT8_T;
+ pointer_type = TYPE_COUNT_INT8_T_POINTER;
+ cp += 2;
+ }
+ else if (cp[1] == '1' && cp[2] == '6')
+ {
+ signed_type = TYPE_INT16_T;
+ unsigned_type = TYPE_UINT16_T;
+ pointer_type = TYPE_COUNT_INT16_T_POINTER;
+ cp += 3;
+ }
+ else if (cp[1] == '3' && cp[2] == '2')
+ {
+ signed_type = TYPE_INT32_T;
+ unsigned_type = TYPE_UINT32_T;
+ pointer_type = TYPE_COUNT_INT32_T_POINTER;
+ cp += 3;
+ }
+ else if (cp[1] == '6' && cp[2] == '4')
+ {
+ signed_type = TYPE_INT64_T;
+ unsigned_type = TYPE_UINT64_T;
+ pointer_type = TYPE_COUNT_INT64_T_POINTER;
+ cp += 3;
+ }
+ }
+ }
+ else if (*cp == 'L')
+ {
+ signed_type = TYPE_LONGLONGINT;
+ unsigned_type = TYPE_ULONGLONGINT;
+ pointer_type = TYPE_COUNT_LONGLONGINT_POINTER;
+ floatingpoint_type = TYPE_LONGDOUBLE;
+ cp++;
+ }
#if defined __APPLE__ && defined __MACH__
- /* On Mac OS X 10.3, PRIdMAX is defined as "qd".
- We cannot change it to "lld" because PRIdMAX must also
- be understood by the system's printf routines. */
- else if (*cp == 'q')
- {
- if (64 / 8 > sizeof (long))
- {
- /* int64_t = long long */
- flags += 16;
- }
- else
- {
- /* int64_t = long */
- flags += 8;
- }
- cp++;
- }
+ /* On Mac OS X 10.3, PRIdMAX is defined as "qd".
+ We cannot change it to "lld" because PRIdMAX must also
+ be understood by the system's printf routines. */
+ else if (*cp == 'q')
+ {
+ if (64 / 8 > sizeof (long))
+ {
+ /* int64_t = long long */
+ signed_type = TYPE_LONGLONGINT;
+ unsigned_type = TYPE_ULONGLONGINT;
+ pointer_type = TYPE_COUNT_LONGLONGINT_POINTER;
+ /* For backward compatibility only. */
+ floatingpoint_type = TYPE_LONGDOUBLE;
+ }
+ else
+ {
+ /* int64_t = long */
+ signed_type = TYPE_LONGINT;
+ unsigned_type = TYPE_ULONGINT;
+ pointer_type = TYPE_COUNT_LONGINT_POINTER;
+ }
+ cp++;
+ }
#endif
#if defined _WIN32 && ! defined __CYGWIN__
- /* On native Windows, PRIdMAX is defined as "I64d".
- We cannot change it to "lld" because PRIdMAX must also
- be understood by the system's printf routines. */
- else if (*cp == 'I' && cp[1] == '6' && cp[2] == '4')
- {
- if (64 / 8 > sizeof (long))
- {
- /* __int64 = long long */
- flags += 16;
- }
- else
- {
- /* __int64 = long */
- flags += 8;
- }
- cp += 3;
- }
+ /* On native Windows, PRIdMAX is defined as "I64d".
+ We cannot change it to "lld" because PRIdMAX must also
+ be understood by the system's printf routines. */
+ else if (*cp == 'I' && cp[1] == '6' && cp[2] == '4')
+ {
+ if (64 / 8 > sizeof (long))
+ {
+ /* __int64_t = long long */
+ signed_type = TYPE_LONGLONGINT;
+ unsigned_type = TYPE_ULONGLONGINT;
+ pointer_type = TYPE_COUNT_LONGLONGINT_POINTER;
+ /* For backward compatibility only. */
+ floatingpoint_type = TYPE_LONGDOUBLE;
+ }
+ else
+ {
+ /* __int64_t = long */
+ signed_type = TYPE_LONGINT;
+ unsigned_type = TYPE_ULONGINT;
+ pointer_type = TYPE_COUNT_LONGINT_POINTER;
+ }
+ cp++;
+ }
#endif
- else
- break;
- }
- /* Read the conversion character. */
- c = *cp++;
- switch (c)
- {
- case 'd': case 'i':
- /* If 'long long' is larger than 'long': */
- if (flags >= 16 || (flags & 4))
- type = TYPE_LONGLONGINT;
- else
- /* If 'long long' is the same as 'long', we parse "lld" into
- TYPE_LONGINT. */
- if (flags >= 8)
- type = TYPE_LONGINT;
- else if (flags & 2)
- type = TYPE_SCHAR;
- else if (flags & 1)
- type = TYPE_SHORT;
- else
- type = TYPE_INT;
- break;
- case 'o': case 'u': case 'x': case 'X':
- /* If 'unsigned long long' is larger than 'unsigned long': */
- if (flags >= 16 || (flags & 4))
- type = TYPE_ULONGLONGINT;
- else
- /* If 'unsigned long long' is the same as 'unsigned long', we
- parse "llu" into TYPE_ULONGINT. */
- if (flags >= 8)
- type = TYPE_ULONGINT;
- else if (flags & 2)
- type = TYPE_UCHAR;
- else if (flags & 1)
- type = TYPE_USHORT;
- else
- type = TYPE_UINT;
- break;
- case 'f': case 'F': case 'e': case 'E': case 'g': case 'G':
- case 'a': case 'A':
- if (flags >= 16 || (flags & 4))
- type = TYPE_LONGDOUBLE;
- else
- type = TYPE_DOUBLE;
- break;
- case 'c':
- if (flags >= 8)
+ /* Read the conversion character. */
+ c = *cp++;
+ switch (c)
+ {
+ case 'd': case 'i':
+ type = signed_type;
+ break;
+ case 'b': case 'o': case 'u': case 'x': case 'X':
+ #if SUPPORT_GNU_PRINTF_DIRECTIVES \
+ || (__GLIBC__ + (__GLIBC_MINOR__ >= 35) > 2)
+ case 'B':
+ #endif
+ type = unsigned_type;
+ break;
+ case 'f': case 'F': case 'e': case 'E': case 'g': case 'G':
+ case 'a': case 'A':
+ type = floatingpoint_type;
+ break;
+ case 'c':
+ if (signed_type == TYPE_LONGINT
+ /* For backward compatibility only. */
+ || signed_type == TYPE_LONGLONGINT)
#if HAVE_WINT_T
- type = TYPE_WIDE_CHAR;
+ type = TYPE_WIDE_CHAR;
#else
- goto error;
+ goto error;
#endif
- else
- type = TYPE_CHAR;
- break;
+ else
+ type = TYPE_CHAR;
+ break;
#if HAVE_WINT_T
- case 'C':
- type = TYPE_WIDE_CHAR;
- c = 'c';
- break;
+ case 'C':
+ type = TYPE_WIDE_CHAR;
+ c = 'c';
+ break;
#endif
- case 's':
- if (flags >= 8)
+ case 's':
+ if (signed_type == TYPE_LONGINT
+ /* For backward compatibility only. */
+ || signed_type == TYPE_LONGLONGINT)
#if HAVE_WCHAR_T
- type = TYPE_WIDE_STRING;
+ type = TYPE_WIDE_STRING;
#else
- goto error;
+ goto error;
#endif
- else
- type = TYPE_STRING;
- break;
+ else
+ type = TYPE_STRING;
+ break;
#if HAVE_WCHAR_T
- case 'S':
- type = TYPE_WIDE_STRING;
- c = 's';
- break;
+ case 'S':
+ type = TYPE_WIDE_STRING;
+ c = 's';
+ break;
#endif
- case 'p':
- type = TYPE_POINTER;
- break;
- case 'n':
- /* If 'long long' is larger than 'long': */
- if (flags >= 16 || (flags & 4))
- type = TYPE_COUNT_LONGLONGINT_POINTER;
- else
- /* If 'long long' is the same as 'long', we parse "lln" into
- TYPE_COUNT_LONGINT_POINTER. */
- if (flags >= 8)
- type = TYPE_COUNT_LONGINT_POINTER;
- else if (flags & 2)
- type = TYPE_COUNT_SCHAR_POINTER;
- else if (flags & 1)
- type = TYPE_COUNT_SHORT_POINTER;
- else
- type = TYPE_COUNT_INT_POINTER;
- break;
+ case 'p':
+ type = TYPE_POINTER;
+ break;
+ case 'n':
+ type = pointer_type;
+ break;
#if ENABLE_UNISTDIO
- /* The unistdio extensions. */
- case 'U':
- if (flags >= 16)
- type = TYPE_U32_STRING;
- else if (flags >= 8)
- type = TYPE_U16_STRING;
- else
- type = TYPE_U8_STRING;
- break;
+ /* The unistdio extensions. */
+ case 'U':
+ if (signed_type == TYPE_LONGLONGINT)
+ type = TYPE_U32_STRING;
+ else if (signed_type == TYPE_LONGINT)
+ type = TYPE_U16_STRING;
+ else
+ type = TYPE_U8_STRING;
+ break;
#endif
- case '%':
- type = TYPE_NONE;
- break;
- default:
- /* Unknown conversion character. */
- goto error;
- }
- }
+ case '%':
+ type = TYPE_NONE;
+ break;
+ default:
+ /* Unknown conversion character. */
+ goto error;
+ }
if (type != TYPE_NONE)
{
diff --git a/gl/lib/printf-parse.h b/gl/lib/printf-parse.h
index b12ccea3..45febac1 100644
--- a/gl/lib/printf-parse.h
+++ b/gl/lib/printf-parse.h
@@ -1,5 +1,5 @@
/* Parse printf format string.
- Copyright (C) 1999, 2002-2003, 2005, 2007, 2010-2022 Free Software
+ Copyright (C) 1999, 2002-2003, 2005, 2007, 2010-2023 Free Software
Foundation, Inc.
This file is free software: you can redistribute it and/or modify
@@ -61,7 +61,7 @@ typedef struct
const char* precision_start;
const char* precision_end;
size_t precision_arg_index;
- char conversion; /* d i o u x X f F e E g G a A c s p n U % but not C S */
+ char conversion; /* d i b B o u x X f F e E g G a A c s p n U % but not C S */
size_t arg_index;
}
char_directive;
@@ -91,7 +91,7 @@ typedef struct
const uint8_t* precision_start;
const uint8_t* precision_end;
size_t precision_arg_index;
- uint8_t conversion; /* d i o u x X f F e E g G a A c s p n U % but not C S */
+ uint8_t conversion; /* d i b B o u x X f F e E g G a A c s p n U % but not C S */
size_t arg_index;
}
u8_directive;
@@ -119,7 +119,7 @@ typedef struct
const uint16_t* precision_start;
const uint16_t* precision_end;
size_t precision_arg_index;
- uint16_t conversion; /* d i o u x X f F e E g G a A c s p n U % but not C S */
+ uint16_t conversion; /* d i b B o u x X f F e E g G a A c s p n U % but not C S */
size_t arg_index;
}
u16_directive;
@@ -147,7 +147,7 @@ typedef struct
const uint32_t* precision_start;
const uint32_t* precision_end;
size_t precision_arg_index;
- uint32_t conversion; /* d i o u x X f F e E g G a A c s p n U % but not C S */
+ uint32_t conversion; /* d i b B o u x X f F e E g G a A c s p n U % but not C S */
size_t arg_index;
}
u32_directive;
diff --git a/gl/lib/progname.c b/gl/lib/progname.c
index 6f09c2b5..ed928e04 100644
--- a/gl/lib/progname.c
+++ b/gl/lib/progname.c
@@ -1,5 +1,5 @@
/* Program name management.
- Copyright (C) 2001-2003, 2005-2022 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2005-2023 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2001.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/lib/progname.h b/gl/lib/progname.h
index 05610896..945d1697 100644
--- a/gl/lib/progname.h
+++ b/gl/lib/progname.h
@@ -1,5 +1,5 @@
/* Program name management.
- Copyright (C) 2001-2004, 2006, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2001-2004, 2006, 2009-2023 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2001.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/lib/pselect.c b/gl/lib/pselect.c
index a1eca0c6..1b8c1913 100644
--- a/gl/lib/pselect.c
+++ b/gl/lib/pselect.c
@@ -1,6 +1,6 @@
/* pselect - synchronous I/O multiplexing
- Copyright 2011-2022 Free Software Foundation, Inc.
+ Copyright 2011-2023 Free Software Foundation, Inc.
This file is part of gnulib.
@@ -45,6 +45,12 @@ pselect (int nfds, fd_set *restrict rfds,
sigset_t origmask;
struct timeval tv, *tvp;
+ if (nfds < 0 || nfds > FD_SETSIZE)
+ {
+ errno = EINVAL;
+ return -1;
+ }
+
if (timeout)
{
if (! (0 <= timeout->tv_nsec && timeout->tv_nsec < 1000000000))
@@ -53,8 +59,10 @@ pselect (int nfds, fd_set *restrict rfds,
return -1;
}
- tv.tv_sec = timeout->tv_sec;
- tv.tv_usec = (timeout->tv_nsec + 999) / 1000;
+ tv = (struct timeval) {
+ .tv_sec = timeout->tv_sec,
+ .tv_usec = (timeout->tv_nsec + 999) / 1000
+ };
tvp = &tv;
}
else
diff --git a/gl/lib/pthread_sigmask.c b/gl/lib/pthread_sigmask.c
index cd4eb807..12810758 100644
--- a/gl/lib/pthread_sigmask.c
+++ b/gl/lib/pthread_sigmask.c
@@ -1,5 +1,5 @@
/* POSIX compatible signal blocking for threads.
- Copyright (C) 2011-2022 Free Software Foundation, Inc.
+ Copyright (C) 2011-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/raise.c b/gl/lib/raise.c
index 385ddd38..506e20b4 100644
--- a/gl/lib/raise.c
+++ b/gl/lib/raise.c
@@ -1,6 +1,6 @@
/* Provide a non-threads replacement for the POSIX raise function.
- Copyright (C) 2002-2003, 2005-2006, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2002-2003, 2005-2006, 2009-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/rawmemchr.c b/gl/lib/rawmemchr.c
index ea68c1bf..45c6cd35 100644
--- a/gl/lib/rawmemchr.c
+++ b/gl/lib/rawmemchr.c
@@ -1,5 +1,5 @@
/* Searching in a string.
- Copyright (C) 2008-2022 Free Software Foundation, Inc.
+ Copyright (C) 2008-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -23,10 +23,8 @@
#if !HAVE_RAWMEMCHR
# include <limits.h>
-# include <stdalign.h>
# include <stdint.h>
-# include "verify.h"
/* Find the first occurrence of C in S. */
void *
@@ -36,7 +34,7 @@ rawmemchr (const void *s, int c_in)
typedef uintptr_t longword;
/* If you change the "uintptr_t", you should change UINTPTR_WIDTH to match.
This verifies that the type does not have padding bits. */
- verify (UINTPTR_WIDTH == UCHAR_WIDTH * sizeof (longword));
+ static_assert (UINTPTR_WIDTH == UCHAR_WIDTH * sizeof (longword));
const unsigned char *char_ptr;
unsigned char c = c_in;
diff --git a/gl/lib/rawmemchr.valgrind b/gl/lib/rawmemchr.valgrind
index 64cf86c8..f3e4cb0f 100644
--- a/gl/lib/rawmemchr.valgrind
+++ b/gl/lib/rawmemchr.valgrind
@@ -1,6 +1,6 @@
# Suppress a valgrind message about use of uninitialized memory in rawmemchr().
-# Copyright (C) 2008-2022 Free Software Foundation, Inc.
+# Copyright (C) 2008-2023 Free Software Foundation, Inc.
#
# This file is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/readdir.c b/gl/lib/readdir.c
index 8e841df8..04dbba21 100644
--- a/gl/lib/readdir.c
+++ b/gl/lib/readdir.c
@@ -1,5 +1,5 @@
/* Read the next entry of a directory.
- Copyright (C) 2011-2022 Free Software Foundation, Inc.
+ Copyright (C) 2011-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -22,7 +22,9 @@
#include <errno.h>
#include <stddef.h>
-#include "dirent-private.h"
+#if GNULIB_defined_DIR
+# include "dirent-private.h"
+#endif
/* Don't assume that UNICODE is not defined. */
#undef FindNextFile
@@ -30,7 +32,11 @@
struct dirent *
readdir (DIR *dirp)
+#undef readdir
{
+#if HAVE_DIRENT_H /* equivalent to HAVE_READDIR */
+ return readdir (dirp->real_dirp);
+#else
char type;
struct dirent *result;
@@ -99,4 +105,5 @@ readdir (DIR *dirp)
result->d_type = type;
return result;
+#endif
}
diff --git a/gl/lib/readlink.c b/gl/lib/readlink.c
index ed03cc8d..14bbb7f1 100644
--- a/gl/lib/readlink.c
+++ b/gl/lib/readlink.c
@@ -1,5 +1,5 @@
/* Read the contents of a symbolic link.
- Copyright (C) 2003-2007, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2003-2007, 2009-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/readlinkat.c b/gl/lib/readlinkat.c
index ab45e140..7738ba8b 100644
--- a/gl/lib/readlinkat.c
+++ b/gl/lib/readlinkat.c
@@ -1,5 +1,5 @@
/* Read a symlink relative to an open directory.
- Copyright (C) 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2009-2023 Free Software Foundation, Inc.
This 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/gl/lib/realloc.c b/gl/lib/realloc.c
index c8783815..1063eb09 100644
--- a/gl/lib/realloc.c
+++ b/gl/lib/realloc.c
@@ -1,6 +1,6 @@
/* realloc() function that is glibc compatible.
- Copyright (C) 1997, 2003-2004, 2006-2007, 2009-2022 Free Software
+ Copyright (C) 1997, 2003-2004, 2006-2007, 2009-2023 Free Software
Foundation, Inc.
This file is free software: you can redistribute it and/or modify
diff --git a/gl/lib/reallocarray.c b/gl/lib/reallocarray.c
index bc4cba4b..8c99250f 100644
--- a/gl/lib/reallocarray.c
+++ b/gl/lib/reallocarray.c
@@ -1,6 +1,6 @@
/* reallocarray function that is glibc compatible.
- Copyright (C) 2017-2022 Free Software Foundation, Inc.
+ Copyright (C) 2017-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -19,16 +19,15 @@
#include <config.h>
+#include <stdckdint.h>
#include <stdlib.h>
#include <errno.h>
-#include "intprops.h"
-
void *
reallocarray (void *ptr, size_t nmemb, size_t size)
{
size_t nbytes;
- if (INT_MULTIPLY_WRAPV (nmemb, size, &nbytes))
+ if (ckd_mul (&nbytes, nmemb, size))
{
errno = ENOMEM;
return NULL;
diff --git a/gl/lib/regcomp.c b/gl/lib/regcomp.c
index 122c3de5..1f6a1311 100644
--- a/gl/lib/regcomp.c
+++ b/gl/lib/regcomp.c
@@ -1,5 +1,5 @@
/* Extended regular expression matching and search library.
- Copyright (C) 2002-2022 Free Software Foundation, Inc.
+ Copyright (C) 2002-2023 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
@@ -905,7 +905,7 @@ init_word_char (re_dfa_t *dfa)
bitset_word_t bits3 = 0x07fffffe;
if (BITSET_WORD_BITS == 64)
{
- /* Pacify gcc -Woverflow on 32-bit platformns. */
+ /* Pacify gcc -Woverflow on 32-bit platforms. */
dfa->word_char[0] = bits1 << 31 << 1 | bits0;
dfa->word_char[1] = bits3 << 31 << 1 | bits2;
i = 2;
diff --git a/gl/lib/regex.c b/gl/lib/regex.c
index ff117678..3beb0deb 100644
--- a/gl/lib/regex.c
+++ b/gl/lib/regex.c
@@ -1,5 +1,5 @@
/* Extended regular expression matching and search library.
- Copyright (C) 2002-2022 Free Software Foundation, Inc.
+ Copyright (C) 2002-2023 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
diff --git a/gl/lib/regex.h b/gl/lib/regex.h
index a7e0bd02..9ef0252f 100644
--- a/gl/lib/regex.h
+++ b/gl/lib/regex.h
@@ -1,6 +1,6 @@
/* Definitions for data structures and routines for the regular
expression library.
- Copyright (C) 1985, 1989-2022 Free Software Foundation, Inc.
+ Copyright (C) 1985, 1989-2023 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/gl/lib/regex_internal.c b/gl/lib/regex_internal.c
index 0e6919f3..998a19b7 100644
--- a/gl/lib/regex_internal.c
+++ b/gl/lib/regex_internal.c
@@ -1,5 +1,5 @@
/* Extended regular expression matching and search library.
- Copyright (C) 2002-2022 Free Software Foundation, Inc.
+ Copyright (C) 2002-2023 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
diff --git a/gl/lib/regex_internal.h b/gl/lib/regex_internal.h
index 57a455b1..7e35a112 100644
--- a/gl/lib/regex_internal.h
+++ b/gl/lib/regex_internal.h
@@ -1,5 +1,5 @@
/* Extended regular expression matching and search library.
- Copyright (C) 2002-2022 Free Software Foundation, Inc.
+ Copyright (C) 2002-2023 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
@@ -29,7 +29,7 @@
#include <locale.h>
#include <wchar.h>
#include <wctype.h>
-#include <stdbool.h>
+#include <stdckdint.h>
#include <stdint.h>
#ifndef _LIBC
@@ -151,9 +151,6 @@
as some non-GCC platforms lack them, an issue when this code is
used in Gnulib. */
-#ifndef SSIZE_MAX
-# define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2))
-#endif
#ifndef ULONG_WIDTH
# define ULONG_WIDTH REGEX_UINTEGER_WIDTH (ULONG_MAX)
/* The number of usable bits in an unsigned integer type with maximum
@@ -823,7 +820,7 @@ re_string_elem_size_at (const re_string_t *pstr, Idx idx)
}
#ifdef _LIBC
-# if __GNUC__ >= 7
+# if __glibc_has_attribute (__fallthrough__)
# define FALLTHROUGH __attribute__ ((__fallthrough__))
# else
# define FALLTHROUGH ((void) 0)
diff --git a/gl/lib/regexec.c b/gl/lib/regexec.c
index 521cb028..f05f38ae 100644
--- a/gl/lib/regexec.c
+++ b/gl/lib/regexec.c
@@ -1,5 +1,5 @@
/* Extended regular expression matching and search library.
- Copyright (C) 2002-2022 Free Software Foundation, Inc.
+ Copyright (C) 2002-2023 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
@@ -324,7 +324,7 @@ re_search_2_stub (struct re_pattern_buffer *bufp, const char *string1,
char *s = NULL;
if (__glibc_unlikely ((length1 < 0 || length2 < 0 || stop < 0
- || INT_ADD_WRAPV (length1, length2, &len))))
+ || ckd_add (&len, length1, length2))))
return -2;
/* Concatenate the strings. */
diff --git a/gl/lib/rename.c b/gl/lib/rename.c
index 119abe5c..aa3afd87 100644
--- a/gl/lib/rename.c
+++ b/gl/lib/rename.c
@@ -1,6 +1,6 @@
/* Work around rename bugs in some systems.
- Copyright (C) 2001-2003, 2005-2006, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2005-2006, 2009-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -29,7 +29,6 @@
existing files. */
# include <errno.h>
-# include <stdbool.h>
# include <stdlib.h>
# include <sys/stat.h>
# include <unistd.h>
@@ -361,7 +360,7 @@ rpl_rename (char const *src, char const *dst)
# if (RENAME_TRAILING_SLASH_SOURCE_BUG || RENAME_DEST_EXISTS_BUG \
|| RENAME_HARD_LINK_BUG)
/* If the only bug was that a trailing slash was allowed on a
- non-existing file destination, as in Solaris 10, then we've
+ nonexistent file destination, as in Solaris 10, then we've
already covered that situation. But if there is any problem with
a trailing slash on an existing source or destination, as in
Solaris 9, or if a directory can overwrite a symlink, as on
diff --git a/gl/lib/renameat.c b/gl/lib/renameat.c
index f08be7b2..e482b4b5 100644
--- a/gl/lib/renameat.c
+++ b/gl/lib/renameat.c
@@ -1,5 +1,5 @@
/* Rename a file relative to open directories.
- Copyright 2017-2022 Free Software Foundation, Inc.
+ Copyright 2017-2023 Free Software Foundation, Inc.
This 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/gl/lib/renameatu.c b/gl/lib/renameatu.c
index 7ba186ca..939e5896 100644
--- a/gl/lib/renameatu.c
+++ b/gl/lib/renameatu.c
@@ -1,5 +1,5 @@
/* Rename a file relative to open directories.
- Copyright (C) 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2009-2023 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -38,7 +38,6 @@ errno_fail (int e)
#if HAVE_RENAMEAT
-# include <stdbool.h>
# include <stdlib.h>
# include <string.h>
diff --git a/gl/lib/renameatu.h b/gl/lib/renameatu.h
index 239df4ce..86a7d2d1 100644
--- a/gl/lib/renameatu.h
+++ b/gl/lib/renameatu.h
@@ -1,5 +1,5 @@
/* Rename a file relative to open directories.
- Copyright 2017-2022 Free Software Foundation, Inc.
+ Copyright 2017-2023 Free Software Foundation, Inc.
This 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/gl/lib/rewinddir.c b/gl/lib/rewinddir.c
index b07aaf9c..f200cc53 100644
--- a/gl/lib/rewinddir.c
+++ b/gl/lib/rewinddir.c
@@ -1,5 +1,5 @@
/* Restart reading the entries of a directory from the beginning.
- Copyright (C) 2011-2022 Free Software Foundation, Inc.
+ Copyright (C) 2011-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -21,7 +21,9 @@
#include <errno.h>
-#include "dirent-private.h"
+#if GNULIB_defined_DIR
+# include "dirent-private.h"
+#endif
/* Don't assume that UNICODE is not defined. */
#undef FindFirstFile
@@ -29,7 +31,11 @@
void
rewinddir (DIR *dirp)
+#undef rewinddir
{
+#if HAVE_DIRENT_H /* equivalent to HAVE_REWINDDIR */
+ rewinddir (dirp->real_dirp);
+#else
/* Like in closedir(). */
if (dirp->current != INVALID_HANDLE_VALUE)
FindClose (dirp->current);
@@ -50,4 +56,5 @@ rewinddir (DIR *dirp)
break;
}
}
+#endif
}
diff --git a/gl/lib/rmdir.c b/gl/lib/rmdir.c
index 8c8b75e0..bd1d8197 100644
--- a/gl/lib/rmdir.c
+++ b/gl/lib/rmdir.c
@@ -1,6 +1,6 @@
/* Work around rmdir bugs.
- Copyright (C) 1988, 1990, 1999, 2003-2006, 2009-2022 Free Software
+ Copyright (C) 1988, 1990, 1999, 2003-2006, 2009-2023 Free Software
Foundation, Inc.
This file is free software: you can redistribute it and/or modify
diff --git a/gl/lib/same-inode.h b/gl/lib/same-inode.h
index f65f3d03..10964f00 100644
--- a/gl/lib/same-inode.h
+++ b/gl/lib/same-inode.h
@@ -1,6 +1,6 @@
/* Determine whether two stat buffers are known to refer to the same file.
- Copyright (C) 2006, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/save-cwd.c b/gl/lib/save-cwd.c
index ea487a40..3806084b 100644
--- a/gl/lib/save-cwd.c
+++ b/gl/lib/save-cwd.c
@@ -1,6 +1,6 @@
/* save-cwd.c -- Save and restore current working directory.
- Copyright (C) 1995, 1997-1998, 2003-2006, 2009-2022 Free Software
+ Copyright (C) 1995, 1997-1998, 2003-2006, 2009-2023 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
@@ -24,7 +24,6 @@
#include <errno.h>
#include <fcntl.h>
-#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/gl/lib/save-cwd.h b/gl/lib/save-cwd.h
index 90e8a074..d089b0e2 100644
--- a/gl/lib/save-cwd.h
+++ b/gl/lib/save-cwd.h
@@ -1,6 +1,6 @@
/* Save and restore current working directory.
- Copyright (C) 1995, 1997-1998, 2003, 2009-2022 Free Software Foundation,
+ Copyright (C) 1995, 1997-1998, 2003, 2009-2023 Free Software Foundation,
Inc.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/lib/scratch_buffer.h b/gl/lib/scratch_buffer.h
index f4fe5e8d..4cf60d23 100644
--- a/gl/lib/scratch_buffer.h
+++ b/gl/lib/scratch_buffer.h
@@ -1,5 +1,5 @@
/* Variable-sized buffer with on-stack default allocation.
- Copyright (C) 2017-2022 Free Software Foundation, Inc.
+ Copyright (C) 2017-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -98,20 +98,10 @@ extern bool scratch_buffer_set_array_size (struct scratch_buffer *buffer,
size_t nelem, size_t size);
#endif
-/* Return a copy of *BUFFER's first SIZE bytes as a heap-allocated block,
- deallocating *BUFFER if it was heap-allocated. SIZE must be at
- most *BUFFER's size. Return NULL (setting errno) on memory
- exhaustion. */
-#if 0
-extern void *scratch_buffer_dupfree (struct scratch_buffer *buffer,
- size_t size);
-#endif
-
/* The implementation is imported from glibc. */
/* Avoid possible conflicts with symbols exported by the GNU libc. */
-#define __libc_scratch_buffer_dupfree gl_scratch_buffer_dupfree
#define __libc_scratch_buffer_grow gl_scratch_buffer_grow
#define __libc_scratch_buffer_grow_preserve gl_scratch_buffer_grow_preserve
#define __libc_scratch_buffer_set_array_size gl_scratch_buffer_set_array_size
diff --git a/gl/lib/select.c b/gl/lib/select.c
index c2424982..6b6ca415 100644
--- a/gl/lib/select.c
+++ b/gl/lib/select.c
@@ -1,7 +1,7 @@
/* Emulation for select(2)
Contributed by Paolo Bonzini.
- Copyright 2008-2022 Free Software Foundation, Inc.
+ Copyright 2008-2023 Free Software Foundation, Inc.
This file is part of gnulib.
@@ -279,8 +279,11 @@ rpl_select (int nfds, fd_set *rfds, fd_set *wfds, fd_set *xfds,
int i, fd, rc;
clock_t tend;
- if (nfds > FD_SETSIZE)
- nfds = FD_SETSIZE;
+ if (nfds < 0 || nfds > FD_SETSIZE)
+ {
+ errno = EINVAL;
+ return -1;
+ }
if (!timeout)
wait_timeout = INFINITE;
diff --git a/gl/lib/setenv.c b/gl/lib/setenv.c
index ebfd4e55..22b12fd0 100644
--- a/gl/lib/setenv.c
+++ b/gl/lib/setenv.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995-2003, 2005-2022 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995-2003, 2005-2023 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This file is free software: you can redistribute it and/or modify
@@ -375,6 +375,11 @@ rpl_setenv (const char *name, const char *value, int replace)
int saved_errno;
size_t len = strlen (value);
tmp = malloca (len + 2);
+ if (tmp == NULL)
+ {
+ errno = ENOMEM;
+ return -1;
+ }
/* Since leading '=' is eaten, double it up. */
*tmp = '=';
memcpy (tmp + 1, value, len + 1);
diff --git a/gl/lib/setlocale-lock.c b/gl/lib/setlocale-lock.c
index 4e7540e1..b70ba09b 100644
--- a/gl/lib/setlocale-lock.c
+++ b/gl/lib/setlocale-lock.c
@@ -1,5 +1,5 @@
/* Return the internal lock used by setlocale_null_r.
- Copyright (C) 2019-2022 Free Software Foundation, Inc.
+ Copyright (C) 2019-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/setlocale_null.c b/gl/lib/setlocale_null.c
index 778429b9..89c8a065 100644
--- a/gl/lib/setlocale_null.c
+++ b/gl/lib/setlocale_null.c
@@ -1,5 +1,5 @@
/* Query the name of the current global locale.
- Copyright (C) 2019-2022 Free Software Foundation, Inc.
+ Copyright (C) 2019-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -173,7 +173,7 @@ setlocale_null_unlocked (int category, char *buf, size_t bufsize)
#endif
}
-#if !(SETLOCALE_NULL_ALL_MTSAFE && SETLOCALE_NULL_ONE_MTSAFE) /* musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin */
+#if !(SETLOCALE_NULL_ALL_MTSAFE && SETLOCALE_NULL_ONE_MTSAFE) /* musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin < 3.4.6 */
/* Use a lock, so that no two threads can invoke setlocale_null_unlocked
at the same time. */
@@ -198,7 +198,7 @@ setlocale_null_with_lock (int category, char *buf, size_t bufsize)
return ret;
}
-# elif HAVE_PTHREAD_API /* musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin */
+# elif HAVE_PTHREAD_API /* musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin < 3.4.6 */
extern
# if defined _WIN32 || defined __CYGWIN__
diff --git a/gl/lib/setlocale_null.h b/gl/lib/setlocale_null.h
index d1921b09..c740fa0f 100644
--- a/gl/lib/setlocale_null.h
+++ b/gl/lib/setlocale_null.h
@@ -1,5 +1,5 @@
/* Query the name of the current global locale.
- Copyright (C) 2019-2022 Free Software Foundation, Inc.
+ Copyright (C) 2019-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/sig-handler.c b/gl/lib/sig-handler.c
index 0ab63ec1..5ea345fc 100644
--- a/gl/lib/sig-handler.c
+++ b/gl/lib/sig-handler.c
@@ -1,6 +1,6 @@
/* Convenience declarations when working with <signal.h>.
- Copyright (C) 2012-2022 Free Software Foundation, Inc.
+ Copyright (C) 2012-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/sig-handler.h b/gl/lib/sig-handler.h
index 1ca8d542..e85d30b3 100644
--- a/gl/lib/sig-handler.h
+++ b/gl/lib/sig-handler.h
@@ -1,6 +1,6 @@
/* Convenience declarations when working with <signal.h>.
- Copyright (C) 2008-2022 Free Software Foundation, Inc.
+ Copyright (C) 2008-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -18,11 +18,13 @@
#ifndef _GL_SIG_HANDLER_H
#define _GL_SIG_HANDLER_H
-#include <signal.h>
-
-#ifndef _GL_INLINE_HEADER_BEGIN
+/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE, _GL_ATTRIBUTE_PURE. */
+#if !_GL_CONFIG_H_INCLUDED
#error "Please include config.h first."
#endif
+
+#include <signal.h>
+
_GL_INLINE_HEADER_BEGIN
#ifndef SIG_HANDLER_INLINE
# define SIG_HANDLER_INLINE _GL_INLINE
diff --git a/gl/lib/sigaction.c b/gl/lib/sigaction.c
index 953a6cae..19f76657 100644
--- a/gl/lib/sigaction.c
+++ b/gl/lib/sigaction.c
@@ -1,5 +1,5 @@
/* POSIX compatible signal blocking.
- Copyright (C) 2008-2022 Free Software Foundation, Inc.
+ Copyright (C) 2008-2023 Free Software Foundation, Inc.
Written by Eric Blake <ebb9@byu.net>, 2008.
This file is free software: you can redistribute it and/or modify
diff --git a/gl/lib/signal.in.h b/gl/lib/signal.in.h
index 640b5022..418d59c5 100644
--- a/gl/lib/signal.in.h
+++ b/gl/lib/signal.in.h
@@ -1,6 +1,6 @@
/* A GNU-like <signal.h>.
- Copyright (C) 2006-2022 Free Software Foundation, Inc.
+ Copyright (C) 2006-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -55,13 +55,26 @@
#ifndef _@GUARD_PREFIX@_SIGNAL_H
#define _@GUARD_PREFIX@_SIGNAL_H
-/* Mac OS X 10.3, FreeBSD 6.4, OpenBSD 3.8, OSF/1 4.0, Solaris 2.6, Android,
+/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
+/* For testing the OpenBSD version. */
+#if (@GNULIB_PTHREAD_SIGMASK@ || defined GNULIB_POSIXCHECK) \
+ && defined __OpenBSD__
+# include <sys/param.h>
+#endif
+
+/* Mac OS X 10.3, FreeBSD < 8.0, OpenBSD < 5.1, OSF/1 4.0, Solaris 2.6, Android,
OS/2 kLIBC declare pthread_sigmask in <pthread.h>, not in <signal.h>.
But avoid namespace pollution on glibc systems.*/
#if (@GNULIB_PTHREAD_SIGMASK@ || defined GNULIB_POSIXCHECK) \
&& ((defined __APPLE__ && defined __MACH__) \
- || defined __FreeBSD__ || defined __OpenBSD__ || defined __osf__ \
- || defined __sun || defined __ANDROID__ || defined __KLIBC__) \
+ || (defined __FreeBSD__ && __FreeBSD__ < 8) \
+ || (defined __OpenBSD__ && OpenBSD < 201205) \
+ || defined __osf__ || defined __sun || defined __ANDROID__ \
+ || defined __KLIBC__) \
&& ! defined __GLIBC__
# include <pthread.h>
#endif
diff --git a/gl/lib/sigprocmask.c b/gl/lib/sigprocmask.c
index a805da66..943383e2 100644
--- a/gl/lib/sigprocmask.c
+++ b/gl/lib/sigprocmask.c
@@ -1,5 +1,5 @@
/* POSIX compatible signal blocking.
- Copyright (C) 2006-2022 Free Software Foundation, Inc.
+ Copyright (C) 2006-2023 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2006.
This file is free software: you can redistribute it and/or modify
diff --git a/gl/lib/size_max.h b/gl/lib/size_max.h
index dee2b8ee..2cfd31a5 100644
--- a/gl/lib/size_max.h
+++ b/gl/lib/size_max.h
@@ -1,5 +1,5 @@
/* size_max.h -- declare SIZE_MAX through system headers
- Copyright (C) 2005-2006, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2009-2023 Free Software Foundation, Inc.
Written by Simon Josefsson.
This file is free software: you can redistribute it and/or modify
@@ -18,6 +18,11 @@
#ifndef GNULIB_SIZE_MAX_H
#define GNULIB_SIZE_MAX_H
+/* This file uses HAVE_STDINT_H. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
/* Get SIZE_MAX declaration on systems like Solaris 7/8/9. */
# include <limits.h>
/* Get SIZE_MAX declaration on systems like glibc 2. */
diff --git a/gl/lib/sleep.c b/gl/lib/sleep.c
index 7a6fb152..37c1213c 100644
--- a/gl/lib/sleep.c
+++ b/gl/lib/sleep.c
@@ -1,5 +1,5 @@
/* Pausing execution of the current thread.
- Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2023 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2007.
This file is free software: you can redistribute it and/or modify
@@ -22,8 +22,6 @@
#include <limits.h>
-#include "verify.h"
-
#if defined _WIN32 && ! defined __CYGWIN__
# define WIN32_LEAN_AND_MEAN /* avoid including junk */
@@ -56,7 +54,7 @@ unsigned int
rpl_sleep (unsigned int seconds)
{
/* This requires int larger than 16 bits. */
- verify (UINT_MAX / 24 / 24 / 60 / 60);
+ static_assert (UINT_MAX / 24 / 24 / 60 / 60);
const unsigned int limit = 24 * 24 * 60 * 60;
while (limit < seconds)
{
diff --git a/gl/lib/sockets.c b/gl/lib/sockets.c
index 31b43029..ca99db8b 100644
--- a/gl/lib/sockets.c
+++ b/gl/lib/sockets.c
@@ -1,6 +1,6 @@
/* sockets.c --- wrappers for Windows socket functions
- Copyright (C) 2008-2022 Free Software Foundation, Inc.
+ Copyright (C) 2008-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/sockets.h b/gl/lib/sockets.h
index 75e49fce..55d5e3a4 100644
--- a/gl/lib/sockets.h
+++ b/gl/lib/sockets.h
@@ -1,6 +1,6 @@
/* sockets.h - wrappers for Windows socket functions
- Copyright (C) 2008-2022 Free Software Foundation, Inc.
+ Copyright (C) 2008-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -20,6 +20,11 @@
#ifndef SOCKETS_H
#define SOCKETS_H 1
+/* This file uses _GL_ATTRIBUTE_CONST. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
#define SOCKETS_1_0 0x0001
#define SOCKETS_1_1 0x0101
#define SOCKETS_2_0 0x0002
diff --git a/gl/lib/stat-time.c b/gl/lib/stat-time.c
index 3d48a2b5..bc282232 100644
--- a/gl/lib/stat-time.c
+++ b/gl/lib/stat-time.c
@@ -1,6 +1,6 @@
/* stat-related time functions.
- Copyright (C) 2012-2022 Free Software Foundation, Inc.
+ Copyright (C) 2012-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/stat-time.h b/gl/lib/stat-time.h
index 6b0088e3..75eb27e5 100644
--- a/gl/lib/stat-time.h
+++ b/gl/lib/stat-time.h
@@ -1,6 +1,6 @@
/* stat-related time functions.
- Copyright (C) 2005, 2007, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2007, 2009-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -20,16 +20,18 @@
#ifndef STAT_TIME_H
#define STAT_TIME_H 1
-#include "intprops.h"
+/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE, _GL_UNUSED,
+ _GL_ATTRIBUTE_PURE, HAVE_STRUCT_STAT_*. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
#include <errno.h>
+#include <stdckdint.h>
#include <stddef.h>
#include <sys/stat.h>
#include <time.h>
-#ifndef _GL_INLINE_HEADER_BEGIN
- #error "Please include config.h first."
-#endif
_GL_INLINE_HEADER_BEGIN
#ifndef _GL_STAT_TIME_INLINE
# define _GL_STAT_TIME_INLINE _GL_INLINE
@@ -120,10 +122,8 @@ get_stat_atime (struct stat const *st)
#ifdef STAT_TIMESPEC
return STAT_TIMESPEC (st, st_atim);
#else
- struct timespec t;
- t.tv_sec = st->st_atime;
- t.tv_nsec = get_stat_atime_ns (st);
- return t;
+ return (struct timespec) { .tv_sec = st->st_atime,
+ .tv_nsec = get_stat_atime_ns (st) };
#endif
}
@@ -134,10 +134,8 @@ get_stat_ctime (struct stat const *st)
#ifdef STAT_TIMESPEC
return STAT_TIMESPEC (st, st_ctim);
#else
- struct timespec t;
- t.tv_sec = st->st_ctime;
- t.tv_nsec = get_stat_ctime_ns (st);
- return t;
+ return (struct timespec) { .tv_sec = st->st_ctime,
+ .tv_nsec = get_stat_ctime_ns (st) };
#endif
}
@@ -148,10 +146,8 @@ get_stat_mtime (struct stat const *st)
#ifdef STAT_TIMESPEC
return STAT_TIMESPEC (st, st_mtim);
#else
- struct timespec t;
- t.tv_sec = st->st_mtime;
- t.tv_nsec = get_stat_mtime_ns (st);
- return t;
+ return (struct timespec) { .tv_sec = st->st_mtime,
+ .tv_nsec = get_stat_mtime_ns (st) };
#endif
}
@@ -166,8 +162,8 @@ get_stat_birthtime (_GL_UNUSED struct stat const *st)
|| defined HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC)
t = STAT_TIMESPEC (st, st_birthtim);
#elif defined HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC
- t.tv_sec = st->st_birthtime;
- t.tv_nsec = st->st_birthtimensec;
+ t = (struct timespec) { .tv_sec = st->st_birthtime,
+ .tv_nsec = st->st_birthtimensec };
#elif defined _WIN32 && ! defined __CYGWIN__
/* Native Windows platforms (but not Cygwin) put the "file creation
time" in st_ctime (!). See
@@ -175,13 +171,11 @@ get_stat_birthtime (_GL_UNUSED struct stat const *st)
# if _GL_WINDOWS_STAT_TIMESPEC
t = st->st_ctim;
# else
- t.tv_sec = st->st_ctime;
- t.tv_nsec = 0;
+ t = (struct timespec) { .tv_sec = st->st_ctime };
# endif
#else
/* Birth time is not supported. */
- t.tv_sec = -1;
- t.tv_nsec = -1;
+ t = (struct timespec) { .tv_sec = -1, .tv_nsec = -1 };
#endif
#if (defined HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC \
@@ -193,10 +187,7 @@ get_stat_birthtime (_GL_UNUSED struct stat const *st)
sometimes returns junk in the birth time fields; work around this
bug if it is detected. */
if (! (t.tv_sec && 0 <= t.tv_nsec && t.tv_nsec < 1000000000))
- {
- t.tv_sec = -1;
- t.tv_nsec = -1;
- }
+ t = (struct timespec) { .tv_sec = -1, .tv_nsec = -1 };
#endif
return t;
@@ -230,9 +221,8 @@ stat_time_normalize (int result, _GL_UNUSED struct stat *st)
}
ts->tv_nsec = r;
/* Overflow is possible, as Solaris 11 stat can yield
- tv_sec == TYPE_MINIMUM (time_t) && tv_nsec == -1000000000.
- INT_ADD_WRAPV is OK, since time_t is signed on Solaris. */
- if (INT_ADD_WRAPV (q, ts->tv_sec, &ts->tv_sec))
+ tv_sec == TYPE_MINIMUM (time_t) && tv_nsec == -1000000000. */
+ if (ckd_add (&ts->tv_sec, q, ts->tv_sec))
{
errno = EOVERFLOW;
return -1;
diff --git a/gl/lib/stat-w32.c b/gl/lib/stat-w32.c
index c1a29239..2f011975 100644
--- a/gl/lib/stat-w32.c
+++ b/gl/lib/stat-w32.c
@@ -1,5 +1,5 @@
/* Core of implementation of fstat and stat for native Windows.
- Copyright (C) 2017-2022 Free Software Foundation, Inc.
+ Copyright (C) 2017-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -50,7 +50,6 @@
#include "stat-w32.h"
#include "pathmax.h"
-#include "verify.h"
/* Don't assume that UNICODE is not defined. */
#undef LoadLibrary
@@ -228,7 +227,7 @@ _gl_fstat_by_handle (HANDLE h, const char *path, struct stat *buf)
if (GetFileInformationByHandleExFunc (h, FileIdInfo, &id, sizeof (id)))
{
buf->st_dev = id.VolumeSerialNumber;
- verify (sizeof (ino_t) == sizeof (id.FileId));
+ static_assert (sizeof (ino_t) == sizeof (id.FileId));
memcpy (&buf->st_ino, &id.FileId, sizeof (ino_t));
goto ino_done;
}
diff --git a/gl/lib/stat-w32.h b/gl/lib/stat-w32.h
index 0f79d614..c6738749 100644
--- a/gl/lib/stat-w32.h
+++ b/gl/lib/stat-w32.h
@@ -1,5 +1,5 @@
/* Core of implementation of fstat and stat for native Windows.
- Copyright (C) 2017-2022 Free Software Foundation, Inc.
+ Copyright (C) 2017-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/stat.c b/gl/lib/stat.c
index 574489ac..7987e265 100644
--- a/gl/lib/stat.c
+++ b/gl/lib/stat.c
@@ -1,5 +1,5 @@
/* Work around platform bugs in stat.
- Copyright (C) 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2009-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -55,11 +55,9 @@ orig_stat (const char *filename, struct stat *buf)
#include <errno.h>
#include <limits.h>
-#include <stdbool.h>
#include <string.h>
#include "filename.h"
#include "malloca.h"
-#include "verify.h"
#ifdef WINDOWS_NATIVE
# define WIN32_LEAN_AND_MEAN
diff --git a/gl/lib/stdalign.in.h b/gl/lib/stdalign.in.h
deleted file mode 100644
index 3b117df1..00000000
--- a/gl/lib/stdalign.in.h
+++ /dev/null
@@ -1,127 +0,0 @@
-/* A substitute for ISO C11 <stdalign.h>.
-
- Copyright 2011-2022 Free Software Foundation, Inc.
-
- This file is free software: you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation; either version 2.1 of the
- License, or (at your option) any later version.
-
- This file 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 Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public License
- along with this program. If not, see <https://www.gnu.org/licenses/>. */
-
-/* Written by Paul Eggert and Bruno Haible. */
-
-#ifndef _GL_STDALIGN_H
-#define _GL_STDALIGN_H
-
-/* ISO C11 <stdalign.h> for platforms that lack it.
-
- References:
- ISO C11 (latest free draft
- <http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf>)
- sections 6.5.3.4, 6.7.5, 7.15.
- C++11 (latest free draft
- <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf>)
- section 18.10. */
-
-/* alignof (TYPE), also known as _Alignof (TYPE), yields the alignment
- requirement of a structure member (i.e., slot or field) that is of
- type TYPE, as an integer constant expression.
-
- This differs from GCC's and clang's __alignof__ operator, which can
- yield a better-performing alignment for an object of that type. For
- example, on x86 with GCC and on Linux/x86 with clang,
- __alignof__ (double) and __alignof__ (long long) are 8, whereas
- alignof (double) and alignof (long long) are 4 unless the option
- '-malign-double' is used.
-
- The result cannot be used as a value for an 'enum' constant, if you
- want to be portable to HP-UX 10.20 cc and AIX 3.2.5 xlc.
-
- Include <stddef.h> for offsetof. */
-#include <stddef.h>
-
-/* FreeBSD 9.1 <sys/cdefs.h>, included by <stddef.h> and lots of other
- standard headers, defines conflicting implementations of _Alignas
- and _Alignof that are no better than ours; override them. */
-#undef _Alignas
-#undef _Alignof
-
-/* GCC releases before GCC 4.9 had a bug in _Alignof. See GCC bug 52023
- <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>.
- clang versions < 8.0.0 have the same bug. */
-#if (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 \
- || (defined __GNUC__ && __GNUC__ < 4 + (__GNUC_MINOR__ < 9) \
- && !defined __clang__) \
- || (defined __clang__ && __clang_major__ < 8))
-# ifdef __cplusplus
-# if 201103 <= __cplusplus
-# define _Alignof(type) alignof (type)
-# else
- template <class __t> struct __alignof_helper { char __a; __t __b; };
-# define _Alignof(type) offsetof (__alignof_helper<type>, __b)
-# endif
-# else
-# define _Alignof(type) offsetof (struct { char __a; type __b; }, __b)
-# endif
-#endif
-#if ! (defined __cplusplus && 201103 <= __cplusplus)
-# define alignof _Alignof
-#endif
-#define __alignof_is_defined 1
-
-/* alignas (A), also known as _Alignas (A), aligns a variable or type
- to the alignment A, where A is an integer constant expression. For
- example:
-
- int alignas (8) foo;
- struct s { int a; int alignas (8) bar; };
-
- aligns the address of FOO and the offset of BAR to be multiples of 8.
-
- A should be a power of two that is at least the type's alignment
- and at most the implementation's alignment limit. This limit is
- 2**28 on typical GNUish hosts, and 2**13 on MSVC. To be portable
- to MSVC through at least version 10.0, A should be an integer
- constant, as MSVC does not support expressions such as 1 << 3.
- To be portable to Sun C 5.11, do not align auto variables to
- anything stricter than their default alignment.
-
- The following C11 requirements are not supported here:
-
- - If A is zero, alignas has no effect.
- - alignas can be used multiple times; the strictest one wins.
- - alignas (TYPE) is equivalent to alignas (alignof (TYPE)).
-
- */
-
-#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112
-# if defined __cplusplus && 201103 <= __cplusplus
-# define _Alignas(a) alignas (a)
-# elif (!defined __attribute__ \
- && ((defined __APPLE__ && defined __MACH__ \
- ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
- : __GNUC__ && !defined __ibmxl__) \
- || (4 <= __clang_major__) \
- || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \
- || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__))
-# define _Alignas(a) __attribute__ ((__aligned__ (a)))
-# elif 1300 <= _MSC_VER
-# define _Alignas(a) __declspec (align (a))
-# endif
-#endif
-#if ((defined _Alignas && ! (defined __cplusplus && 201103 <= __cplusplus)) \
- || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__))
-# define alignas _Alignas
-#endif
-#if defined alignas || (defined __cplusplus && 201103 <= __cplusplus)
-# define __alignas_is_defined 1
-#endif
-
-#endif /* _GL_STDALIGN_H */
diff --git a/gl/lib/stdarg.in.h b/gl/lib/stdarg.in.h
index 95306bfb..8145216e 100644
--- a/gl/lib/stdarg.in.h
+++ b/gl/lib/stdarg.in.h
@@ -1,5 +1,5 @@
/* Substitute for and wrapper around <stdarg.h>.
- Copyright (C) 2008-2022 Free Software Foundation, Inc.
+ Copyright (C) 2008-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -27,6 +27,11 @@
#ifndef _@GUARD_PREFIX@_STDARG_H
#define _@GUARD_PREFIX@_STDARG_H
+/* This file uses va_copy. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
#ifndef va_copy
# define va_copy(a,b) ((a) = (b))
#endif
diff --git a/gl/lib/stdbool.in.h b/gl/lib/stdbool.in.h
deleted file mode 100644
index 03840f10..00000000
--- a/gl/lib/stdbool.in.h
+++ /dev/null
@@ -1,132 +0,0 @@
-/* Copyright (C) 2001-2003, 2006-2022 Free Software Foundation, Inc.
- Written by Bruno Haible <haible@clisp.cons.org>, 2001.
-
- This file is free software: you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation; either version 2.1 of the
- License, or (at your option) any later version.
-
- This file 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 Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public License
- along with this program. If not, see <https://www.gnu.org/licenses/>. */
-
-#ifndef _GL_STDBOOL_H
-#define _GL_STDBOOL_H
-
-/* ISO C 99 <stdbool.h> for platforms that lack it. */
-
-/* Usage suggestions:
-
- Programs that use <stdbool.h> should be aware of some limitations
- and standards compliance issues.
-
- Standards compliance:
-
- - <stdbool.h> must be #included before 'bool', 'false', 'true'
- can be used.
-
- - You cannot assume that sizeof (bool) == 1.
-
- - Programs should not undefine the macros bool, true, and false,
- as C99 lists that as an "obsolescent feature".
-
- Limitations of this substitute, when used in a C89 environment:
-
- - <stdbool.h> must be #included before the '_Bool' type can be used.
-
- - You cannot assume that _Bool is a typedef; it might be a macro.
-
- - Bit-fields of type 'bool' are not supported. Portable code
- should use 'unsigned int foo : 1;' rather than 'bool foo : 1;'.
-
- - In C99, casts and automatic conversions to '_Bool' or 'bool' are
- performed in such a way that every nonzero value gets converted
- to 'true', and zero gets converted to 'false'. This doesn't work
- with this substitute. With this substitute, only the values 0 and 1
- give the expected result when converted to _Bool' or 'bool'.
-
- - C99 allows the use of (_Bool)0.0 in constant expressions, but
- this substitute cannot always provide this property.
-
- Also, it is suggested that programs use 'bool' rather than '_Bool';
- this isn't required, but 'bool' is more common. */
-
-
-/* 7.16. Boolean type and values */
-
-/* BeOS <sys/socket.h> already #defines false 0, true 1. We use the same
- definitions below, but temporarily we have to #undef them. */
-#if defined __BEOS__ && !defined __HAIKU__
-# include <OS.h> /* defines bool but not _Bool */
-# undef false
-# undef true
-#endif
-
-#ifdef __cplusplus
-# define _Bool bool
-# define bool bool
-#else
-# if defined __BEOS__ && !defined __HAIKU__
- /* A compiler known to have 'bool'. */
- /* If the compiler already has both 'bool' and '_Bool', we can assume they
- are the same types. */
-# if !@HAVE__BOOL@
-typedef bool _Bool;
-# endif
-# else
-# if !defined __GNUC__
- /* If @HAVE__BOOL@:
- Some HP-UX cc and AIX IBM C compiler versions have compiler bugs when
- the built-in _Bool type is used. See
- https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
- https://lists.gnu.org/r/bug-coreutils/2005-11/msg00161.html
- https://lists.gnu.org/r/bug-coreutils/2005-10/msg00086.html
- Similar bugs are likely with other compilers as well; this file
- wouldn't be used if <stdbool.h> was working.
- So we override the _Bool type.
- If !@HAVE__BOOL@:
- Need to define _Bool ourselves. As 'signed char' or as an enum type?
- Use of a typedef, with SunPRO C, leads to a stupid
- "warning: _Bool is a keyword in ISO C99".
- Use of an enum type, with IRIX cc, leads to a stupid
- "warning(1185): enumerated type mixed with another type".
- Even the existence of an enum type, without a typedef,
- "Invalid enumerator. (badenum)" with HP-UX cc on Tru64.
- The only benefit of the enum, debuggability, is not important
- with these compilers. So use 'signed char' and no enum. */
-# define _Bool signed char
-# else
- /* With this compiler, trust the _Bool type if the compiler has it. */
-# if !@HAVE__BOOL@
- /* For the sake of symbolic names in gdb, define true and false as
- enum constants, not only as macros.
- It is tempting to write
- typedef enum { false = 0, true = 1 } _Bool;
- so that gdb prints values of type 'bool' symbolically. But then
- values of type '_Bool' might promote to 'int' or 'unsigned int'
- (see ISO C 99 6.7.2.2.(4)); however, '_Bool' must promote to 'int'
- (see ISO C 99 6.3.1.1.(2)). So add a negative value to the
- enum; this ensures that '_Bool' promotes to 'int'. */
-typedef enum { _Bool_must_promote_to_int = -1, false = 0, true = 1 } _Bool;
-# endif
-# endif
-# endif
-# define bool _Bool
-#endif
-
-/* The other macros must be usable in preprocessor directives. */
-#ifdef __cplusplus
-# define false false
-# define true true
-#else
-# define false 0
-# define true 1
-#endif
-
-#define __bool_true_false_are_defined 1
-
-#endif /* _GL_STDBOOL_H */
diff --git a/gl/lib/stdckdint.in.h b/gl/lib/stdckdint.in.h
new file mode 100644
index 00000000..71bab5f0
--- /dev/null
+++ b/gl/lib/stdckdint.in.h
@@ -0,0 +1,35 @@
+/* stdckdint.h -- checked integer arithmetic
+
+ Copyright 2022-2023 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as published
+ by the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
+
+#ifndef _GL_STDCKDINT_H
+#define _GL_STDCKDINT_H
+
+#include "intprops-internal.h"
+
+/* Store into *R the low-order bits of A + B, A - B, A * B, respectively.
+ Return 1 if the result overflows, 0 otherwise.
+ A, B, and *R can have any integer type other than char, bool, a
+ bit-precise integer type, or an enumeration type.
+
+ These are like the standard macros introduced in C23, except that
+ arguments should not have side effects. */
+
+#define ckd_add(r, a, b) ((bool) _GL_INT_ADD_WRAPV (a, b, r))
+#define ckd_sub(r, a, b) ((bool) _GL_INT_SUBTRACT_WRAPV (a, b, r))
+#define ckd_mul(r, a, b) ((bool) _GL_INT_MULTIPLY_WRAPV (a, b, r))
+
+#endif /* _GL_STDCKDINT_H */
diff --git a/gl/lib/stddef.in.h b/gl/lib/stddef.in.h
index 5c9a747d..431e819b 100644
--- a/gl/lib/stddef.in.h
+++ b/gl/lib/stddef.in.h
@@ -1,6 +1,6 @@
/* A substitute for POSIX 2008 <stddef.h>, for platforms that have issues.
- Copyright (C) 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2009-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -18,7 +18,7 @@
/* Written by Eric Blake. */
/*
- * POSIX 2008 <stddef.h> for platforms that have issues.
+ * POSIX 2008 and ISO C 23 <stddef.h> for platforms that have issues.
* <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/stddef.h.html>
*/
@@ -37,9 +37,9 @@
remember if special invocation has ever been used to obtain wint_t,
in which case we need to clean up NULL yet again. */
-# if !(defined _@GUARD_PREFIX@_STDDEF_H && defined _GL_STDDEF_WINT_T)
+# if !(defined _@GUARD_PREFIX@_STDDEF_H && defined _@GUARD_PREFIX@_STDDEF_WINT_T)
# ifdef __need_wint_t
-# define _GL_STDDEF_WINT_T
+# define _@GUARD_PREFIX@_STDDEF_WINT_T
# endif
# @INCLUDE_NEXT@ @NEXT_STDDEF_H@
/* On TinyCC, make sure that the macros that indicate the special invocation
@@ -69,6 +69,7 @@ typedef long rpl_max_align_t;
typedef long max_align_t;
# define _MAX_ALIGN_T
# endif
+# define __CLANG_MAX_ALIGN_T_DEFINED
# define GNULIB_defined_max_align_t 1
# endif
# endif
@@ -79,7 +80,7 @@ typedef long max_align_t;
/* On NetBSD 5.0, the definition of NULL lacks proper parentheses. */
# if (@REPLACE_NULL@ \
- && (!defined _@GUARD_PREFIX@_STDDEF_H || defined _GL_STDDEF_WINT_T))
+ && (!defined _@GUARD_PREFIX@_STDDEF_H || defined _@GUARD_PREFIX@_STDDEF_WINT_T))
# undef NULL
# ifdef __cplusplus
/* ISO C++ says that the macro NULL must expand to an integer constant
@@ -100,6 +101,11 @@ typedef long max_align_t;
# ifndef _@GUARD_PREFIX@_STDDEF_H
# define _@GUARD_PREFIX@_STDDEF_H
+/* This file uses _Noreturn. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
/* Some platforms lack wchar_t. */
#if !@HAVE_WCHAR_T@
# define wchar_t int
@@ -137,11 +143,49 @@ typedef union
long int __i _GL_STDDEF_ALIGNAS (long int);
} rpl_max_align_t;
# define max_align_t rpl_max_align_t
+# define __CLANG_MAX_ALIGN_T_DEFINED
# define GNULIB_defined_max_align_t 1
# endif
# endif
#endif
+/* ISO C 23 § 7.21.1 The unreachable macro */
+#ifndef unreachable
+
+/* Code borrowed from verify.h. */
+# ifndef _GL_HAS_BUILTIN_UNREACHABLE
+# if defined __clang_major__ && __clang_major__ < 5
+# define _GL_HAS_BUILTIN_UNREACHABLE 0
+# elif 4 < __GNUC__ + (5 <= __GNUC_MINOR__)
+# define _GL_HAS_BUILTIN_UNREACHABLE 1
+# elif defined __has_builtin
+# define _GL_HAS_BUILTIN_UNREACHABLE __has_builtin (__builtin_unreachable)
+# else
+# define _GL_HAS_BUILTIN_UNREACHABLE 0
+# endif
+# endif
+
+# if _GL_HAS_BUILTIN_UNREACHABLE
+# define unreachable() __builtin_unreachable ()
+# elif 1200 <= _MSC_VER
+# define unreachable() __assume (0)
+# else
+/* Declare abort(), without including <stdlib.h>. */
+extern
+# if defined __cplusplus
+"C"
+# endif
+_Noreturn
+void abort (void)
+# if defined __cplusplus && (__GLIBC__ >= 2)
+throw ()
+# endif
+;
+# define unreachable() abort ()
+# endif
+
+#endif
+
# endif /* _@GUARD_PREFIX@_STDDEF_H */
# endif /* _@GUARD_PREFIX@_STDDEF_H */
#endif /* __need_XXX */
diff --git a/gl/lib/stdint.in.h b/gl/lib/stdint.in.h
index eaa7874f..5ddc644b 100644
--- a/gl/lib/stdint.in.h
+++ b/gl/lib/stdint.in.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2002, 2004-2022 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2002, 2004-2023 Free Software Foundation, Inc.
Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood.
This file is part of gnulib.
diff --git a/gl/lib/stdio-read.c b/gl/lib/stdio-read.c
index 85efa0d4..6e2984c5 100644
--- a/gl/lib/stdio-read.c
+++ b/gl/lib/stdio-read.c
@@ -1,5 +1,5 @@
/* POSIX compatible FILE stream read function.
- Copyright (C) 2008-2022 Free Software Foundation, Inc.
+ Copyright (C) 2008-2023 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2011.
This file is free software: you can redistribute it and/or modify
diff --git a/gl/lib/stdio-write.c b/gl/lib/stdio-write.c
index 82facf54..9cf36cca 100644
--- a/gl/lib/stdio-write.c
+++ b/gl/lib/stdio-write.c
@@ -1,5 +1,5 @@
/* POSIX compatible FILE stream write function.
- Copyright (C) 2008-2022 Free Software Foundation, Inc.
+ Copyright (C) 2008-2023 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This file is free software: you can redistribute it and/or modify
diff --git a/gl/lib/stdio.in.h b/gl/lib/stdio.in.h
index 7b36dac2..6be12c05 100644
--- a/gl/lib/stdio.in.h
+++ b/gl/lib/stdio.in.h
@@ -1,6 +1,6 @@
/* A GNU-like <stdio.h>.
- Copyright (C) 2004, 2007-2022 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2007-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -36,6 +36,12 @@
#ifndef _@GUARD_PREFIX@_STDIO_H
+/* Suppress macOS deprecation warnings for sprintf and vsprintf. */
+#if (defined __APPLE__ && defined __MACH__) && !defined _POSIX_C_SOURCE
+# define _POSIX_C_SOURCE 200809L
+# define _GL_DEFINED__POSIX_C_SOURCE
+#endif
+
#define _GL_ALREADY_INCLUDING_STDIO_H
/* The include_next requires a split double-inclusion guard. */
@@ -43,9 +49,20 @@
#undef _GL_ALREADY_INCLUDING_STDIO_H
+#ifdef _GL_DEFINED__POSIX_C_SOURCE
+# undef _GL_DEFINED__POSIX_C_SOURCE
+# undef _POSIX_C_SOURCE
+#endif
+
#ifndef _@GUARD_PREFIX@_STDIO_H
#define _@GUARD_PREFIX@_STDIO_H
+/* This file uses _GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_FORMAT,
+ _GL_ATTRIBUTE_MALLOC, GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
/* Get va_list. Needed on many systems, including glibc 2.8. */
#include <stdarg.h>
@@ -116,6 +133,16 @@
# endif
#endif
+/* _GL_ATTRIBUTE_MALLOC declares that the function returns a pointer to freshly
+ allocated memory. */
+#ifndef _GL_ATTRIBUTE_MALLOC
+# if __GNUC__ >= 3 || defined __clang__
+# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__))
+# else
+# define _GL_ATTRIBUTE_MALLOC
+# endif
+#endif
+
/* An __attribute__ __format__ specifier for a function that takes a format
string and arguments, where the format string directives are the ones
standardized by ISO C99 and POSIX.
@@ -193,6 +220,36 @@
# undef putc_unlocked
#endif
+
+/* Maximum number of characters produced by printing a NaN value. */
+#ifndef _PRINTF_NAN_LEN_MAX
+# if defined __FreeBSD__ || defined __DragonFly__ \
+ || defined __NetBSD__ \
+ || (defined __APPLE__ && defined __MACH__)
+/* On BSD systems, a NaN value prints as just "nan", without a sign. */
+# define _PRINTF_NAN_LEN_MAX 3
+# elif (__GLIBC__ >= 2) || MUSL_LIBC || defined __OpenBSD__ || defined __sun || defined __CYGWIN__
+/* glibc, musl libc, OpenBSD, Solaris libc, and Cygwin produce "[-]nan". */
+# define _PRINTF_NAN_LEN_MAX 4
+# elif defined _AIX
+/* AIX produces "[-]NaNQ". */
+# define _PRINTF_NAN_LEN_MAX 5
+# elif defined _WIN32 && !defined __CYGWIN__
+/* On native Windows, the output can be:
+ - with MSVC ucrt: "[-]nan" or "[-]nan(ind)" or "[-]nan(snan)",
+ - with mingw: "[-]1.#IND" or "[-]1.#QNAN". */
+# define _PRINTF_NAN_LEN_MAX 10
+# elif defined __sgi
+/* On IRIX, the output typically is "[-]nan0xNNNNNNNN" with 8 hexadecimal
+ digits. */
+# define _PRINTF_NAN_LEN_MAX 14
+# else
+/* We don't know, but 32 should be a safe maximum. */
+# define _PRINTF_NAN_LEN_MAX 32
+# endif
+#endif
+
+
#if @GNULIB_DPRINTF@
# if @REPLACE_DPRINTF@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
@@ -210,7 +267,9 @@ _GL_FUNCDECL_SYS (dprintf, int, (int fd, const char *restrict format, ...)
# endif
_GL_CXXALIAS_SYS (dprintf, int, (int fd, const char *restrict format, ...));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (dprintf);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef dprintf
# if HAVE_RAW_DECL_DPRINTF
@@ -273,7 +332,8 @@ _GL_CXXALIASWARN (fcloseall);
# endif
_GL_FUNCDECL_RPL (fdopen, FILE *,
(int fd, const char *mode)
- _GL_ARG_NONNULL ((2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1));
+ _GL_ARG_NONNULL ((2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1)
+ _GL_ATTRIBUTE_MALLOC);
_GL_CXXALIAS_RPL (fdopen, FILE *, (int fd, const char *mode));
# elif defined _WIN32 && !defined __CYGWIN__
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
@@ -286,7 +346,8 @@ _GL_CXXALIAS_MDA (fdopen, FILE *, (int fd, const char *mode));
/* For -Wmismatched-dealloc: Associate fdopen with fclose or rpl_fclose. */
_GL_FUNCDECL_SYS (fdopen, FILE *,
(int fd, const char *mode)
- _GL_ARG_NONNULL ((2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1));
+ _GL_ARG_NONNULL ((2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1)
+ _GL_ATTRIBUTE_MALLOC);
# endif
_GL_CXXALIAS_SYS (fdopen, FILE *, (int fd, const char *mode));
# endif
@@ -296,7 +357,8 @@ _GL_CXXALIASWARN (fdopen);
/* For -Wmismatched-dealloc: Associate fdopen with fclose or rpl_fclose. */
_GL_FUNCDECL_SYS (fdopen, FILE *,
(int fd, const char *mode)
- _GL_ARG_NONNULL ((2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1));
+ _GL_ARG_NONNULL ((2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1)
+ _GL_ATTRIBUTE_MALLOC);
# endif
# if defined GNULIB_POSIXCHECK
# undef fdopen
@@ -407,7 +469,8 @@ _GL_CXXALIASWARN (fileno);
# endif
_GL_FUNCDECL_RPL (fopen, FILE *,
(const char *restrict filename, const char *restrict mode)
- _GL_ARG_NONNULL ((1, 2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1));
+ _GL_ARG_NONNULL ((1, 2)) _GL_ATTRIBUTE_DEALLOC (fclose, 1)
+ _GL_ATTRIBUTE_MALLOC);
_GL_CXXALIAS_RPL (fopen, FILE *,
(const char *restrict filename, const char *restrict mode));
# else
@@ -882,7 +945,9 @@ _GL_CXXALIAS_SYS (getdelim, ssize_t,
int delimiter,
FILE *restrict stream));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (getdelim);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef getdelim
# if HAVE_RAW_DECL_GETDELIM
@@ -921,7 +986,7 @@ _GL_CXXALIAS_SYS (getline, ssize_t,
(char **restrict lineptr, size_t *restrict linesize,
FILE *restrict stream));
# endif
-# if @HAVE_DECL_GETLINE@
+# if __GLIBC__ >= 2 && @HAVE_DECL_GETLINE@
_GL_CXXALIASWARN (getline);
# endif
#elif defined GNULIB_POSIXCHECK
@@ -951,9 +1016,17 @@ _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
# endif
_GL_CXXALIAS_MDA (getw, int, (FILE *restrict stream));
# else
+# if @HAVE_DECL_GETW@
+# if defined __APPLE__ && defined __MACH__
+/* The presence of the declaration depends on _POSIX_C_SOURCE. */
+_GL_FUNCDECL_SYS (getw, int, (FILE *restrict stream));
+# endif
_GL_CXXALIAS_SYS (getw, int, (FILE *restrict stream));
+# endif
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (getw);
+# endif
#endif
#if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@
@@ -1052,13 +1125,15 @@ _GL_WARN_ON_USE (perror, "perror is not always POSIX compliant - "
# endif
_GL_FUNCDECL_RPL (popen, FILE *,
(const char *cmd, const char *mode)
- _GL_ARG_NONNULL ((1, 2)) _GL_ATTRIBUTE_DEALLOC (pclose, 1));
+ _GL_ARG_NONNULL ((1, 2)) _GL_ATTRIBUTE_DEALLOC (pclose, 1)
+ _GL_ATTRIBUTE_MALLOC);
_GL_CXXALIAS_RPL (popen, FILE *, (const char *cmd, const char *mode));
# else
# if !@HAVE_POPEN@ || __GNUC__ >= 11
_GL_FUNCDECL_SYS (popen, FILE *,
(const char *cmd, const char *mode)
- _GL_ARG_NONNULL ((1, 2)) _GL_ATTRIBUTE_DEALLOC (pclose, 1));
+ _GL_ARG_NONNULL ((1, 2)) _GL_ATTRIBUTE_DEALLOC (pclose, 1)
+ _GL_ATTRIBUTE_MALLOC);
# endif
_GL_CXXALIAS_SYS (popen, FILE *, (const char *cmd, const char *mode));
# endif
@@ -1068,7 +1143,8 @@ _GL_CXXALIASWARN (popen);
/* For -Wmismatched-dealloc: Associate popen with pclose or rpl_pclose. */
_GL_FUNCDECL_SYS (popen, FILE *,
(const char *cmd, const char *mode)
- _GL_ARG_NONNULL ((1, 2)) _GL_ATTRIBUTE_DEALLOC (pclose, 1));
+ _GL_ARG_NONNULL ((1, 2)) _GL_ATTRIBUTE_DEALLOC (pclose, 1)
+ _GL_ATTRIBUTE_MALLOC);
# endif
# if defined GNULIB_POSIXCHECK
# undef popen
@@ -1190,9 +1266,17 @@ _GL_CXXALIASWARN (puts);
# endif
_GL_CXXALIAS_MDA (putw, int, (int w, FILE *restrict stream));
# else
+# if @HAVE_DECL_PUTW@
+# if defined __APPLE__ && defined __MACH__
+/* The presence of the declaration depends on _POSIX_C_SOURCE. */
+_GL_FUNCDECL_SYS (putw, int, (int w, FILE *restrict stream));
+# endif
_GL_CXXALIAS_SYS (putw, int, (int w, FILE *restrict stream));
+# endif
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (putw);
+# endif
#endif
#if @GNULIB_REMOVE@
@@ -1398,13 +1482,15 @@ _GL_CXXALIASWARN (tempnam);
# define tmpfile rpl_tmpfile
# endif
_GL_FUNCDECL_RPL (tmpfile, FILE *, (void)
- _GL_ATTRIBUTE_DEALLOC (fclose, 1));
+ _GL_ATTRIBUTE_DEALLOC (fclose, 1)
+ _GL_ATTRIBUTE_MALLOC);
_GL_CXXALIAS_RPL (tmpfile, FILE *, (void));
# else
# if __GNUC__ >= 11
/* For -Wmismatched-dealloc: Associate tmpfile with fclose or rpl_fclose. */
_GL_FUNCDECL_SYS (tmpfile, FILE *, (void)
- _GL_ATTRIBUTE_DEALLOC (fclose, 1));
+ _GL_ATTRIBUTE_DEALLOC (fclose, 1)
+ _GL_ATTRIBUTE_MALLOC);
# endif
_GL_CXXALIAS_SYS (tmpfile, FILE *, (void));
# endif
@@ -1415,7 +1501,8 @@ _GL_CXXALIASWARN (tmpfile);
# if @GNULIB_FCLOSE@ && __GNUC__ >= 11 && !defined tmpfile
/* For -Wmismatched-dealloc: Associate tmpfile with fclose or rpl_fclose. */
_GL_FUNCDECL_SYS (tmpfile, FILE *, (void)
- _GL_ATTRIBUTE_DEALLOC (fclose, 1));
+ _GL_ATTRIBUTE_DEALLOC (fclose, 1)
+ _GL_ATTRIBUTE_MALLOC);
# endif
# if defined GNULIB_POSIXCHECK
# undef tmpfile
diff --git a/gl/lib/stdlib.in.h b/gl/lib/stdlib.in.h
index a86643c3..1479a2b2 100644
--- a/gl/lib/stdlib.in.h
+++ b/gl/lib/stdlib.in.h
@@ -1,6 +1,6 @@
/* A GNU-like <stdlib.h>.
- Copyright (C) 1995, 2001-2004, 2006-2022 Free Software Foundation, Inc.
+ Copyright (C) 1995, 2001-2004, 2006-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -37,6 +37,12 @@
#ifndef _@GUARD_PREFIX@_STDLIB_H
#define _@GUARD_PREFIX@_STDLIB_H
+/* This file uses _Noreturn, _GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_MALLOC,
+ _GL_ATTRIBUTE_PURE, GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
/* NetBSD 5.0 mis-defines NULL. */
#include <stddef.h>
@@ -67,9 +73,7 @@
# include <random.h>
# endif
-# if !@HAVE_STRUCT_RANDOM_DATA@ || @REPLACE_RANDOM_R@ || !@HAVE_RANDOM_R@
-# include <stdint.h>
-# endif
+# include <stdint.h>
# if !@HAVE_STRUCT_RANDOM_DATA@
/* Define 'struct random_data'.
@@ -164,11 +168,22 @@ struct random_data
#if @GNULIB__EXIT@
/* Terminate the current process with the given return code, without running
the 'atexit' handlers. */
-# if !@HAVE__EXIT@
+# if @REPLACE__EXIT@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef _Exit
+# define _Exit rpl__Exit
+# endif
+_GL_FUNCDECL_RPL (_Exit, _Noreturn void, (int status));
+_GL_CXXALIAS_RPL (_Exit, void, (int status));
+# else
+# if !@HAVE__EXIT@
_GL_FUNCDECL_SYS (_Exit, _Noreturn void, (int status));
-# endif
+# endif
_GL_CXXALIAS_SYS (_Exit, void, (int status));
+# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (_Exit);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef _Exit
# if HAVE_RAW_DECL__EXIT
@@ -226,7 +241,7 @@ _GL_FUNCDECL_SYS (aligned_alloc, void *,
_GL_CXXALIAS_SYS (aligned_alloc, void *, (size_t alignment, size_t size));
# endif
# endif
-# if @HAVE_ALIGNED_ALLOC@
+# if (__GLIBC__ >= 2) && @HAVE_ALIGNED_ALLOC@
_GL_CXXALIASWARN (aligned_alloc);
# endif
#else
@@ -416,12 +431,24 @@ _GL_CXXALIASWARN (gcvt);
The three numbers are the load average of the last 1 minute, the last 5
minutes, and the last 15 minutes, respectively.
LOADAVG is an array of NELEM numbers. */
-# if !@HAVE_DECL_GETLOADAVG@
+# if @REPLACE_GETLOADAVG@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef getloadavg
+# define getloadavg rpl_getloadavg
+# endif
+_GL_FUNCDECL_RPL (getloadavg, int, (double loadavg[], int nelem)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (getloadavg, int, (double loadavg[], int nelem));
+# else
+# if !@HAVE_DECL_GETLOADAVG@
_GL_FUNCDECL_SYS (getloadavg, int, (double loadavg[], int nelem)
_GL_ARG_NONNULL ((1)));
-# endif
+# endif
_GL_CXXALIAS_SYS (getloadavg, int, (double loadavg[], int nelem));
+# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (getloadavg);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef getloadavg
# if HAVE_RAW_DECL_GETLOADAVG
@@ -430,6 +457,41 @@ _GL_WARN_ON_USE (getloadavg, "getloadavg is not portable - "
# endif
#endif
+#if @GNULIB_GETPROGNAME@
+/* Return the base name of the executing program.
+ On native Windows this will usually end in ".exe" or ".EXE". */
+# if @REPLACE_GETPROGNAME@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef getprogname
+# define getprogname rpl_getprogname
+# endif
+# if @HAVE_DECL_PROGRAM_INVOCATION_NAME@
+_GL_FUNCDECL_RPL (getprogname, const char *, (void) _GL_ATTRIBUTE_PURE);
+# else
+_GL_FUNCDECL_RPL (getprogname, const char *, (void));
+# endif
+_GL_CXXALIAS_RPL (getprogname, const char *, (void));
+# else
+# if !@HAVE_GETPROGNAME@
+# if @HAVE_DECL_PROGRAM_INVOCATION_NAME@
+_GL_FUNCDECL_SYS (getprogname, const char *, (void) _GL_ATTRIBUTE_PURE);
+# else
+_GL_FUNCDECL_SYS (getprogname, const char *, (void));
+# endif
+# endif
+_GL_CXXALIAS_SYS (getprogname, const char *, (void));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (getprogname);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef getprogname
+# if HAVE_RAW_DECL_GETPROGNAME
+_GL_WARN_ON_USE (getprogname, "getprogname is unportable - "
+ "use gnulib module getprogname for portability");
+# endif
+#endif
+
#if @GNULIB_GETSUBOPT@
/* Assuming *OPTIONP is a comma separated list of elements of the form
"token" or "token=value", getsubopt parses the first of these elements.
@@ -442,14 +504,28 @@ _GL_WARN_ON_USE (getloadavg, "getloadavg is not portable - "
Otherwise it returns -1, and *OPTIONP and *VALUEP are undefined.
For more details see the POSIX specification.
https://pubs.opengroup.org/onlinepubs/9699919799/functions/getsubopt.html */
-# if !@HAVE_GETSUBOPT@
+# if @REPLACE_GETSUBOPT@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef getsubopt
+# define getsubopt rpl_getsubopt
+# endif
+_GL_FUNCDECL_RPL (getsubopt, int,
+ (char **optionp, char *const *tokens, char **valuep)
+ _GL_ARG_NONNULL ((1, 2, 3)));
+_GL_CXXALIAS_RPL (getsubopt, int,
+ (char **optionp, char *const *tokens, char **valuep));
+# else
+# if !@HAVE_GETSUBOPT@
_GL_FUNCDECL_SYS (getsubopt, int,
(char **optionp, char *const *tokens, char **valuep)
_GL_ARG_NONNULL ((1, 2, 3)));
-# endif
+# endif
_GL_CXXALIAS_SYS (getsubopt, int,
(char **optionp, char *const *tokens, char **valuep));
+# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (getsubopt);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef getsubopt
# if HAVE_RAW_DECL_GETSUBOPT
@@ -517,6 +593,51 @@ _GL_WARN_ON_USE (malloc, "malloc is not POSIX compliant everywhere - "
# endif
#endif
+/* Return maximum number of bytes of a multibyte character. */
+#if @REPLACE_MB_CUR_MAX@
+# if !GNULIB_defined_MB_CUR_MAX
+static inline
+int gl_MB_CUR_MAX (void)
+{
+ /* Turn the value 3 to the value 4, as needed for the UTF-8 encoding. */
+ return MB_CUR_MAX + (MB_CUR_MAX == 3);
+}
+# undef MB_CUR_MAX
+# define MB_CUR_MAX gl_MB_CUR_MAX ()
+# define GNULIB_defined_MB_CUR_MAX 1
+# endif
+#endif
+
+/* Convert a string to a wide string. */
+#if @GNULIB_MBSTOWCS@
+# if @REPLACE_MBSTOWCS@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef mbstowcs
+# define mbstowcs rpl_mbstowcs
+# endif
+_GL_FUNCDECL_RPL (mbstowcs, size_t,
+ (wchar_t *restrict dest, const char *restrict src,
+ size_t len)
+ _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (mbstowcs, size_t,
+ (wchar_t *restrict dest, const char *restrict src,
+ size_t len));
+# else
+_GL_CXXALIAS_SYS (mbstowcs, size_t,
+ (wchar_t *restrict dest, const char *restrict src,
+ size_t len));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (mbstowcs);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef mbstowcs
+# if HAVE_RAW_DECL_MBSTOWCS
+_GL_WARN_ON_USE (mbstowcs, "mbstowcs is unportable - "
+ "use gnulib module mbstowcs for portability");
+# endif
+#endif
+
/* Convert a multibyte character to a wide character. */
#if @GNULIB_MBTOWC@
# if @REPLACE_MBTOWC@
@@ -579,12 +700,24 @@ _GL_WARN_ON_USE (mkdtemp, "mkdtemp is unportable - "
implementation.
Returns the open file descriptor if successful, otherwise -1 and errno
set. */
-# if !@HAVE_MKOSTEMP@
+# if @REPLACE_MKOSTEMP@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef mkostemp
+# define mkostemp rpl_mkostemp
+# endif
+_GL_FUNCDECL_RPL (mkostemp, int, (char * /*template*/, int /*flags*/)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (mkostemp, int, (char * /*template*/, int /*flags*/));
+# else
+# if !@HAVE_MKOSTEMP@
_GL_FUNCDECL_SYS (mkostemp, int, (char * /*template*/, int /*flags*/)
_GL_ARG_NONNULL ((1)));
-# endif
+# endif
_GL_CXXALIAS_SYS (mkostemp, int, (char * /*template*/, int /*flags*/));
+# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (mkostemp);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef mkostemp
# if HAVE_RAW_DECL_MKOSTEMP
@@ -607,14 +740,28 @@ _GL_WARN_ON_USE (mkostemp, "mkostemp is unportable - "
implementation.
Returns the open file descriptor if successful, otherwise -1 and errno
set. */
-# if !@HAVE_MKOSTEMPS@
+# if @REPLACE_MKOSTEMPS@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef mkostemps
+# define mkostemps rpl_mkostemps
+# endif
+_GL_FUNCDECL_RPL (mkostemps, int,
+ (char * /*template*/, int /*suffixlen*/, int /*flags*/)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (mkostemps, int,
+ (char * /*template*/, int /*suffixlen*/, int /*flags*/));
+# else
+# if !@HAVE_MKOSTEMPS@
_GL_FUNCDECL_SYS (mkostemps, int,
(char * /*template*/, int /*suffixlen*/, int /*flags*/)
_GL_ARG_NONNULL ((1)));
-# endif
+# endif
_GL_CXXALIAS_SYS (mkostemps, int,
(char * /*template*/, int /*suffixlen*/, int /*flags*/));
+# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (mkostemps);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef mkostemps
# if HAVE_RAW_DECL_MKOSTEMPS
@@ -713,7 +860,7 @@ _GL_CXXALIAS_SYS (posix_memalign, int,
(void **memptr, size_t alignment, size_t size));
# endif
# endif
-# if @HAVE_POSIX_MEMALIGN@
+# if __GLIBC__ >= 2 && @HAVE_POSIX_MEMALIGN@
_GL_CXXALIASWARN (posix_memalign);
# endif
#elif defined GNULIB_POSIXCHECK
@@ -727,11 +874,22 @@ _GL_WARN_ON_USE (posix_memalign, "posix_memalign is not portable - "
#if @GNULIB_POSIX_OPENPT@
/* Return an FD open to the master side of a pseudo-terminal. Flags should
include O_RDWR, and may also include O_NOCTTY. */
-# if !@HAVE_POSIX_OPENPT@
+# if @REPLACE_POSIX_OPENPT@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef posix_openpt
+# define posix_openpt rpl_posix_openpt
+# endif
+_GL_FUNCDECL_RPL (posix_openpt, int, (int flags));
+_GL_CXXALIAS_RPL (posix_openpt, int, (int flags));
+# else
+# if !@HAVE_POSIX_OPENPT@
_GL_FUNCDECL_SYS (posix_openpt, int, (int flags));
-# endif
+# endif
_GL_CXXALIAS_SYS (posix_openpt, int, (int flags));
+# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (posix_openpt);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef posix_openpt
# if HAVE_RAW_DECL_POSIX_OPENPT
@@ -900,7 +1058,9 @@ _GL_FUNCDECL_SYS (random, long, (void));
int. */
_GL_CXXALIAS_SYS_CAST (random, long, (void));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (random);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef random
# if HAVE_RAW_DECL_RANDOM
@@ -925,7 +1085,9 @@ _GL_FUNCDECL_SYS (srandom, void, (unsigned int seed));
unsigned long seed. */
_GL_CXXALIAS_SYS_CAST (srandom, void, (unsigned int seed));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (srandom);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef srandom
# if HAVE_RAW_DECL_SRANDOM
@@ -956,7 +1118,9 @@ _GL_FUNCDECL_SYS (initstate, char *,
_GL_CXXALIAS_SYS_CAST (initstate, char *,
(unsigned int seed, char *buf, size_t buf_size));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (initstate);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef initstate
# if HAVE_RAW_DECL_INITSTATE
@@ -981,7 +1145,9 @@ _GL_FUNCDECL_SYS (setstate, char *, (char *arg_state) _GL_ARG_NONNULL ((1)));
is const char *arg_state. */
_GL_CXXALIAS_SYS_CAST (setstate, char *, (char *arg_state));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (setstate);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef setstate
# if HAVE_RAW_DECL_SETSTATE
@@ -1167,7 +1333,9 @@ _GL_FUNCDECL_SYS (reallocarray, void *,
_GL_CXXALIAS_SYS (reallocarray, void *,
(void *ptr, size_t nmemb, size_t size));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (reallocarray);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef reallocarray
# if HAVE_RAW_DECL_REALLOCARRAY
@@ -1363,7 +1531,9 @@ _GL_CXXALIAS_SYS (strtol, long,
(const char *restrict string, char **restrict endptr,
int base));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (strtol);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef strtol
# if HAVE_RAW_DECL_STRTOL
@@ -1444,7 +1614,9 @@ _GL_CXXALIAS_SYS (strtoul, unsigned long,
(const char *restrict string, char **restrict endptr,
int base));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (strtoul);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef strtoul
# if HAVE_RAW_DECL_STRTOUL
diff --git a/gl/lib/stdopen.c b/gl/lib/stdopen.c
index 841e410a..e9a8e49d 100644
--- a/gl/lib/stdopen.c
+++ b/gl/lib/stdopen.c
@@ -1,6 +1,6 @@
/* stdopen.c - ensure that the three standard file descriptors are in use
- Copyright (C) 2005-2006, 2019-2022 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2019-2023 Free Software Foundation, Inc.
This 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/gl/lib/stdopen.h b/gl/lib/stdopen.h
index 6a9d83c6..c6111fab 100644
--- a/gl/lib/stdopen.h
+++ b/gl/lib/stdopen.h
@@ -1,5 +1,5 @@
/* Arrange for stdin/stdout/stderr to be open.
- Copyright (C) 2005-2022 Free Software Foundation, Inc.
+ Copyright (C) 2005-2023 Free Software Foundation, Inc.
This 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/gl/lib/stpcpy.c b/gl/lib/stpcpy.c
index 434f84ae..73c1eb78 100644
--- a/gl/lib/stpcpy.c
+++ b/gl/lib/stpcpy.c
@@ -1,5 +1,5 @@
/* stpcpy.c -- copy a string and return pointer to end of new string
- Copyright (C) 1992, 1995, 1997-1998, 2006, 2009-2022 Free Software
+ Copyright (C) 1992, 1995, 1997-1998, 2006, 2009-2023 Free Software
Foundation, Inc.
NOTE: The canonical source of this file is maintained with the GNU C Library.
diff --git a/gl/lib/str-two-way.h b/gl/lib/str-two-way.h
index b00017c0..dfe70224 100644
--- a/gl/lib/str-two-way.h
+++ b/gl/lib/str-two-way.h
@@ -1,5 +1,5 @@
/* Byte-wise substring search, using the Two-Way algorithm.
- Copyright (C) 2008-2022 Free Software Foundation, Inc.
+ Copyright (C) 2008-2023 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Eric Blake <ebb9@byu.net>, 2008.
diff --git a/gl/lib/strcasecmp.c b/gl/lib/strcasecmp.c
index a85a2b10..3a5ce3e1 100644
--- a/gl/lib/strcasecmp.c
+++ b/gl/lib/strcasecmp.c
@@ -1,5 +1,5 @@
/* Case-insensitive string comparison function.
- Copyright (C) 1998-1999, 2005-2007, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 1998-1999, 2005-2007, 2009-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/strcasestr.c b/gl/lib/strcasestr.c
index b36f4091..8eea435c 100644
--- a/gl/lib/strcasestr.c
+++ b/gl/lib/strcasestr.c
@@ -1,5 +1,5 @@
/* Case-insensitive searching in a string.
- Copyright (C) 2005-2022 Free Software Foundation, Inc.
+ Copyright (C) 2005-2023 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2005.
This file is free software: you can redistribute it and/or modify
@@ -21,7 +21,6 @@
#include <string.h>
#include <ctype.h>
-#include <stdbool.h>
#include <strings.h>
#define TOLOWER(Ch) (isupper (Ch) ? tolower (Ch) : (Ch))
diff --git a/gl/lib/strchrnul.c b/gl/lib/strchrnul.c
index 2141b3e1..8724427b 100644
--- a/gl/lib/strchrnul.c
+++ b/gl/lib/strchrnul.c
@@ -1,5 +1,5 @@
/* Searching in a string.
- Copyright (C) 2003, 2007-2022 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2007-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/strchrnul.valgrind b/gl/lib/strchrnul.valgrind
index 1cf50ec8..d998366e 100644
--- a/gl/lib/strchrnul.valgrind
+++ b/gl/lib/strchrnul.valgrind
@@ -1,6 +1,6 @@
# Suppress a valgrind message about use of uninitialized memory in strchrnul().
-# Copyright (C) 2008-2022 Free Software Foundation, Inc.
+# Copyright (C) 2008-2023 Free Software Foundation, Inc.
#
# This file is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/strdup.c b/gl/lib/strdup.c
index 2a0df023..08c40d57 100644
--- a/gl/lib/strdup.c
+++ b/gl/lib/strdup.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1996-1998, 2002-2004, 2006-2007, 2009-2022 Free Software
+/* Copyright (C) 1991, 1996-1998, 2002-2004, 2006-2007, 2009-2023 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/gl/lib/streq.h b/gl/lib/streq.h
index 49f73c1b..712948eb 100644
--- a/gl/lib/streq.h
+++ b/gl/lib/streq.h
@@ -1,5 +1,5 @@
/* Optimized string comparison.
- Copyright (C) 2001-2002, 2007, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2001-2002, 2007, 2009-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/strerror-override.c b/gl/lib/strerror-override.c
index 6be1afdc..cddaa4a9 100644
--- a/gl/lib/strerror-override.c
+++ b/gl/lib/strerror-override.c
@@ -1,6 +1,6 @@
/* strerror-override.c --- POSIX compatible system error routine
- Copyright (C) 2010-2022 Free Software Foundation, Inc.
+ Copyright (C) 2010-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/strerror-override.h b/gl/lib/strerror-override.h
index d010d27c..c9b3ba8c 100644
--- a/gl/lib/strerror-override.h
+++ b/gl/lib/strerror-override.h
@@ -1,6 +1,6 @@
/* strerror-override.h --- POSIX compatible system error routine
- Copyright (C) 2010-2022 Free Software Foundation, Inc.
+ Copyright (C) 2010-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -18,6 +18,11 @@
#ifndef _GL_STRERROR_OVERRIDE_H
# define _GL_STRERROR_OVERRIDE_H
+/* This file uses _GL_ATTRIBUTE_CONST. */
+# if !_GL_CONFIG_H_INCLUDED
+# error "Please include config.h first."
+# endif
+
# include <errno.h>
# include <stddef.h>
diff --git a/gl/lib/strerror.c b/gl/lib/strerror.c
index 67c5216e..d754f601 100644
--- a/gl/lib/strerror.c
+++ b/gl/lib/strerror.c
@@ -1,6 +1,6 @@
/* strerror.c --- POSIX compatible system error routine
- Copyright (C) 2007-2022 Free Software Foundation, Inc.
+ Copyright (C) 2007-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -27,7 +27,6 @@
#include "intprops.h"
#include "strerror-override.h"
-#include "verify.h"
/* Use the system functions, not the gnulib overrides in this file. */
#undef sprintf
@@ -55,7 +54,7 @@ strerror (int n)
if (!msg || !*msg)
{
static char const fmt[] = "Unknown error %d";
- verify (sizeof buf >= sizeof (fmt) + INT_STRLEN_BOUND (n));
+ static_assert (sizeof buf >= sizeof (fmt) + INT_STRLEN_BOUND (n));
sprintf (buf, fmt, n);
errno = EINVAL;
return buf;
diff --git a/gl/lib/string.in.h b/gl/lib/string.in.h
index 3996da9f..912d0f7a 100644
--- a/gl/lib/string.in.h
+++ b/gl/lib/string.in.h
@@ -1,6 +1,6 @@
/* A GNU-like <string.h>.
- Copyright (C) 1995-1996, 2001-2022 Free Software Foundation, Inc.
+ Copyright (C) 1995-1996, 2001-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -44,6 +44,12 @@
#ifndef _@GUARD_PREFIX@_STRING_H
#define _@GUARD_PREFIX@_STRING_H
+/* This file uses _GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_MALLOC,
+ _GL_ATTRIBUTE_PURE, GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
/* NetBSD 5.0 mis-defines NULL. */
#include <stddef.h>
@@ -59,10 +65,11 @@
# include <unistd.h>
#endif
-/* AIX 7.2 declares ffsl and ffsll in <strings.h>, not in <string.h>. */
+/* AIX 7.2 and Android 13 declare ffsl and ffsll in <strings.h>, not in
+ <string.h>. */
/* But in any case avoid namespace pollution on glibc systems. */
#if ((@GNULIB_FFSL@ || @GNULIB_FFSLL@ || defined GNULIB_POSIXCHECK) \
- && defined _AIX) \
+ && (defined _AIX || defined __ANDROID__)) \
&& ! defined __GLIBC__
# include <strings.h>
#endif
@@ -82,7 +89,14 @@
can be freed via 'free'; it can be used only after declaring 'free'. */
/* Applies to: functions. Cannot be used on inline functions. */
#ifndef _GL_ATTRIBUTE_DEALLOC_FREE
-# define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (free, 1)
+# if defined __cplusplus && defined __GNUC__ && !defined __clang__
+/* Work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108231> */
+# define _GL_ATTRIBUTE_DEALLOC_FREE \
+ _GL_ATTRIBUTE_DEALLOC ((void (*) (void *)) free, 1)
+# else
+# define _GL_ATTRIBUTE_DEALLOC_FREE \
+ _GL_ATTRIBUTE_DEALLOC (free, 1)
+# endif
#endif
/* _GL_ATTRIBUTE_MALLOC declares that the function returns a pointer to freshly
@@ -118,7 +132,11 @@
# if (@REPLACE_FREE@ && !defined free \
&& !(defined __cplusplus && defined GNULIB_NAMESPACE))
/* We can't do '#define free rpl_free' here. */
+# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2)
+_GL_EXTERN_C void rpl_free (void *) throw ();
+# else
_GL_EXTERN_C void rpl_free (void *);
+# endif
# undef _GL_ATTRIBUTE_DEALLOC_FREE
# define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (rpl_free, 1)
# else
@@ -300,16 +318,32 @@ _GL_WARN_ON_USE (memmem, "memmem is unportable and often quadratic - "
/* Copy N bytes of SRC to DEST, return pointer to bytes after the
last written byte. */
#if @GNULIB_MEMPCPY@
-# if ! @HAVE_MEMPCPY@
+# if @REPLACE_MEMPCPY@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef mempcpy
+# define mempcpy rpl_mempcpy
+# endif
+_GL_FUNCDECL_RPL (mempcpy, void *,
+ (void *restrict __dest, void const *restrict __src,
+ size_t __n)
+ _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (mempcpy, void *,
+ (void *restrict __dest, void const *restrict __src,
+ size_t __n));
+# else
+# if !@HAVE_MEMPCPY@
_GL_FUNCDECL_SYS (mempcpy, void *,
(void *restrict __dest, void const *restrict __src,
size_t __n)
_GL_ARG_NONNULL ((1, 2)));
-# endif
+# endif
_GL_CXXALIAS_SYS (mempcpy, void *,
(void *restrict __dest, void const *restrict __src,
size_t __n));
+# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (mempcpy);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef mempcpy
# if HAVE_RAW_DECL_MEMPCPY
@@ -336,7 +370,7 @@ _GL_CXXALIAS_SYS_CAST2 (memrchr,
|| defined __clang__)
_GL_CXXALIASWARN1 (memrchr, void *, (void *, int, size_t) throw ());
_GL_CXXALIASWARN1 (memrchr, void const *, (void const *, int, size_t) throw ());
-# else
+# elif __GLIBC__ >= 2
_GL_CXXALIASWARN (memrchr);
# endif
#elif defined GNULIB_POSIXCHECK
@@ -347,6 +381,23 @@ _GL_WARN_ON_USE (memrchr, "memrchr is unportable - "
# endif
#endif
+/* Overwrite a block of memory. The compiler will not optimize
+ effects away, even if the block is dead after the call. */
+#if @GNULIB_MEMSET_EXPLICIT@
+# if ! @HAVE_MEMSET_EXPLICIT@
+_GL_FUNCDECL_SYS (memset_explicit, void *,
+ (void *__dest, int __c, size_t __n) _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (memset_explicit, void *, (void *__dest, int __c, size_t __n));
+_GL_CXXALIASWARN (memset_explicit);
+#elif defined GNULIB_POSIXCHECK
+# undef memset_explicit
+# if HAVE_RAW_DECL_MEMSET_EXPLICIT
+_GL_WARN_ON_USE (memset_explicit, "memset_explicit is unportable - "
+ "use gnulib module memset_explicit for portability");
+# endif
+#endif
+
/* Find the first occurrence of C in S. More efficient than
memchr(S,C,N), at the expense of undefined behavior if C does not
occur within N bytes. */
@@ -381,14 +432,28 @@ _GL_WARN_ON_USE (rawmemchr, "rawmemchr is unportable - "
/* Copy SRC to DST, returning the address of the terminating '\0' in DST. */
#if @GNULIB_STPCPY@
-# if ! @HAVE_STPCPY@
+# if @REPLACE_STPCPY@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef stpcpy
+# define stpcpy rpl_stpcpy
+# endif
+_GL_FUNCDECL_RPL (stpcpy, char *,
+ (char *restrict __dst, char const *restrict __src)
+ _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (stpcpy, char *,
+ (char *restrict __dst, char const *restrict __src));
+# else
+# if !@HAVE_STPCPY@
_GL_FUNCDECL_SYS (stpcpy, char *,
(char *restrict __dst, char const *restrict __src)
_GL_ARG_NONNULL ((1, 2)));
-# endif
+# endif
_GL_CXXALIAS_SYS (stpcpy, char *,
(char *restrict __dst, char const *restrict __src));
+# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (stpcpy);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef stpcpy
# if HAVE_RAW_DECL_STPCPY
@@ -423,7 +488,9 @@ _GL_CXXALIAS_SYS (stpncpy, char *,
(char *restrict __dst, char const *restrict __src,
size_t __n));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (stpncpy);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef stpncpy
# if HAVE_RAW_DECL_STPNCPY
@@ -474,7 +541,7 @@ _GL_CXXALIAS_SYS_CAST2 (strchrnul,
_GL_CXXALIASWARN1 (strchrnul, char *, (char *__s, int __c_in) throw ());
_GL_CXXALIASWARN1 (strchrnul, char const *,
(char const *__s, int __c_in) throw ());
-# else
+# elif __GLIBC__ >= 2
_GL_CXXALIASWARN (strchrnul);
# endif
#elif defined GNULIB_POSIXCHECK
@@ -839,7 +906,7 @@ _GL_CXXALIASWARN1 (strcasestr, char *,
(char *haystack, const char *needle) throw ());
_GL_CXXALIASWARN1 (strcasestr, const char *,
(const char *haystack, const char *needle) throw ());
-# else
+# elif __GLIBC__ >= 2
_GL_CXXALIASWARN (strcasestr);
# endif
#elif defined GNULIB_POSIXCHECK
@@ -943,7 +1010,9 @@ _GL_FUNCDECL_SYS (mbslen, size_t, (const char *string)
_GL_ARG_NONNULL ((1)));
_GL_CXXALIAS_SYS (mbslen, size_t, (const char *string));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (mbslen);
+# endif
#endif
#if @GNULIB_MBSNLEN@
@@ -1185,7 +1254,7 @@ _GL_FUNCDECL_SYS (strerror_r, int, (int errnum, char *buf, size_t buflen)
# endif
_GL_CXXALIAS_SYS (strerror_r, int, (int errnum, char *buf, size_t buflen));
# endif
-# if @HAVE_DECL_STRERROR_R@
+# if __GLIBC__ >= 2 && @HAVE_DECL_STRERROR_R@
_GL_CXXALIASWARN (strerror_r);
# endif
#elif defined GNULIB_POSIXCHECK
diff --git a/gl/lib/strings.in.h b/gl/lib/strings.in.h
index 2c31d2e1..929329d0 100644
--- a/gl/lib/strings.in.h
+++ b/gl/lib/strings.in.h
@@ -1,6 +1,6 @@
/* A substitute <strings.h>.
- Copyright (C) 2007-2022 Free Software Foundation, Inc.
+ Copyright (C) 2007-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -36,6 +36,11 @@
#ifndef _@GUARD_PREFIX@_STRINGS_H
#define _@GUARD_PREFIX@_STRINGS_H
+/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
#if ! @HAVE_DECL_STRNCASECMP@
/* Get size_t. */
# include <stddef.h>
diff --git a/gl/lib/stripslash.c b/gl/lib/stripslash.c
index aee89b78..fe46a9c1 100644
--- a/gl/lib/stripslash.c
+++ b/gl/lib/stripslash.c
@@ -1,6 +1,6 @@
/* stripslash.c -- remove redundant trailing slashes from a file name
- Copyright (C) 1990, 2001, 2003-2006, 2009-2022 Free Software Foundation,
+ Copyright (C) 1990, 2001, 2003-2006, 2009-2023 Free Software Foundation,
Inc.
This file is free software: you can redistribute it and/or modify
diff --git a/gl/lib/strncasecmp.c b/gl/lib/strncasecmp.c
index 35d215b9..c5c2cd35 100644
--- a/gl/lib/strncasecmp.c
+++ b/gl/lib/strncasecmp.c
@@ -1,5 +1,5 @@
/* strncasecmp.c -- case insensitive string comparator
- Copyright (C) 1998-1999, 2005-2007, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 1998-1999, 2005-2007, 2009-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/strndup.c b/gl/lib/strndup.c
index 72cbc57d..5c1f32ff 100644
--- a/gl/lib/strndup.c
+++ b/gl/lib/strndup.c
@@ -1,6 +1,6 @@
/* A replacement function, for systems that lack strndup.
- Copyright (C) 1996-1998, 2001-2003, 2005-2007, 2009-2022 Free Software
+ Copyright (C) 1996-1998, 2001-2003, 2005-2007, 2009-2023 Free Software
Foundation, Inc.
This file is free software: you can redistribute it and/or modify
diff --git a/gl/lib/strnlen.c b/gl/lib/strnlen.c
index c8fc69c6..09c010ea 100644
--- a/gl/lib/strnlen.c
+++ b/gl/lib/strnlen.c
@@ -1,5 +1,5 @@
/* Find the length of STRING, but scan at most MAXLEN characters.
- Copyright (C) 2005-2007, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2005-2007, 2009-2023 Free Software Foundation, Inc.
Written by Simon Josefsson.
This file is free software: you can redistribute it and/or modify
diff --git a/gl/lib/strnlen1.c b/gl/lib/strnlen1.c
index c22f96b6..25866c5e 100644
--- a/gl/lib/strnlen1.c
+++ b/gl/lib/strnlen1.c
@@ -1,5 +1,5 @@
/* Find the length of STRING + 1, but scan at most MAXLEN bytes.
- Copyright (C) 2005-2006, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2009-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/strnlen1.h b/gl/lib/strnlen1.h
index d45dd91e..02dcd4c4 100644
--- a/gl/lib/strnlen1.h
+++ b/gl/lib/strnlen1.h
@@ -1,5 +1,5 @@
/* Find the length of STRING + 1, but scan at most MAXLEN bytes.
- Copyright (C) 2005, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2009-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -17,6 +17,11 @@
#ifndef _STRNLEN1_H
#define _STRNLEN1_H
+/* This file uses _GL_ATTRIBUTE_PURE. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
#include <stddef.h>
diff --git a/gl/lib/strsep.c b/gl/lib/strsep.c
index c05d7ebe..8e9708a3 100644
--- a/gl/lib/strsep.c
+++ b/gl/lib/strsep.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004, 2007, 2009-2022 Free Software Foundation, Inc.
+/* Copyright (C) 2004, 2007, 2009-2023 Free Software Foundation, Inc.
Written by Yoann Vandoorselaere <yoann@prelude-ids.org>.
diff --git a/gl/lib/sys_file.in.h b/gl/lib/sys_file.in.h
index 1ae54f85..3919e576 100644
--- a/gl/lib/sys_file.in.h
+++ b/gl/lib/sys_file.in.h
@@ -1,6 +1,6 @@
/* Provide a more complete sys/file.h.
- Copyright (C) 2007-2022 Free Software Foundation, Inc.
+ Copyright (C) 2007-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -32,13 +32,18 @@
#ifndef _@GUARD_PREFIX@_SYS_FILE_H
#define _@GUARD_PREFIX@_SYS_FILE_H
+/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
#ifndef LOCK_SH
/* Operations for the 'flock' call (same as Linux kernel constants). */
# define LOCK_SH 1 /* Shared lock. */
# define LOCK_EX 2 /* Exclusive lock. */
# define LOCK_UN 8 /* Unlock. */
-/* Can be OR'd in to one of the above. */
+/* Can be OR'd into one of the above. */
# define LOCK_NB 4 /* Don't block when locking. */
#endif
diff --git a/gl/lib/sys_ioctl.in.h b/gl/lib/sys_ioctl.in.h
index 7f1cdc86..78a79036 100644
--- a/gl/lib/sys_ioctl.in.h
+++ b/gl/lib/sys_ioctl.in.h
@@ -1,5 +1,5 @@
/* Substitute for and wrapper around <sys/ioctl.h>.
- Copyright (C) 2008-2022 Free Software Foundation, Inc.
+ Copyright (C) 2008-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -29,6 +29,11 @@
#ifndef _@GUARD_PREFIX@_SYS_IOCTL_H
#define _@GUARD_PREFIX@_SYS_IOCTL_H
+/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
/* AIX 5.1 and Solaris 10 declare ioctl() in <unistd.h> and in <stropts.h>,
but not in <sys/ioctl.h>.
Haiku declares ioctl() in <unistd.h>, but not in <sys/ioctl.h>.
@@ -62,7 +67,9 @@ _GL_FUNCDECL_SYS (ioctl, int,
_GL_CXXALIAS_SYS (ioctl, int,
(int fd, int request, ... /* {void *,char *} arg */));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (ioctl);
+# endif
#elif @SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
# undef ioctl
# define ioctl ioctl_used_without_requesting_gnulib_module_ioctl
diff --git a/gl/lib/sys_random.in.h b/gl/lib/sys_random.in.h
index e730e613..b240033b 100644
--- a/gl/lib/sys_random.in.h
+++ b/gl/lib/sys_random.in.h
@@ -1,5 +1,5 @@
/* Substitute for <sys/random.h>.
- Copyright (C) 2020-2022 Free Software Foundation, Inc.
+ Copyright (C) 2020-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -45,6 +45,11 @@
#ifndef _@GUARD_PREFIX@_SYS_RANDOM_H
#define _@GUARD_PREFIX@_SYS_RANDOM_H
+/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
#include <sys/types.h>
/* Define the GRND_* constants. */
@@ -84,7 +89,9 @@ _GL_FUNCDECL_SYS (getrandom, ssize_t,
_GL_CXXALIAS_SYS (getrandom, ssize_t,
(void *buffer, size_t length, unsigned int flags));
# endif
+# if __GLIBC__ + (__GLIBC_MINOR__ >= 25) > 2
_GL_CXXALIASWARN (getrandom);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef getrandom
# if HAVE_RAW_DECL_GETRANDOM
diff --git a/gl/lib/sys_select.in.h b/gl/lib/sys_select.in.h
index 2bd0e0f7..3abfc48a 100644
--- a/gl/lib/sys_select.in.h
+++ b/gl/lib/sys_select.in.h
@@ -1,5 +1,5 @@
/* Substitute for <sys/select.h>.
- Copyright (C) 2007-2022 Free Software Foundation, Inc.
+ Copyright (C) 2007-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -19,6 +19,13 @@
# endif
@PRAGMA_COLUMNS@
+/* This file uses #include_next of a system file that defines time_t.
+ For the 'year2038' module to work right, <config.h> needs to have been
+ included before. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
/* On OSF/1 and Solaris 2.6, <sys/types.h> and <sys/time.h>
both include <sys/select.h>.
On Cygwin and OpenBSD, <sys/time.h> includes <sys/select.h>.
@@ -71,6 +78,11 @@
#ifndef _@GUARD_PREFIX@_SYS_SELECT_H
+/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
/* On many platforms, <sys/select.h> assumes prior inclusion of
<sys/types.h>. Also, mingw defines sigset_t there, instead of
in <signal.h> where it belongs. */
@@ -82,9 +94,10 @@
of 'struct timeval', and no definition of this type.
Also, Mac OS X, AIX, HP-UX, IRIX, Solaris, Interix declare select()
in <sys/time.h>.
- But avoid namespace pollution on glibc systems and "unknown type
- name" problems on Cygwin. */
-# if !(defined __GLIBC__ || defined __CYGWIN__)
+ But avoid namespace pollution on glibc systems, a circular include
+ <sys/select.h> -> <sys/time.h> -> <sys/select.h> on FreeBSD 13.1, and
+ "unknown type name" problems on Cygwin. */
+# if !(defined __GLIBC__ || defined __FreeBSD__ || defined __CYGWIN__)
# include <sys/time.h>
# endif
@@ -287,7 +300,9 @@ _GL_CXXALIAS_SYS_CAST (pselect, int,
struct timespec const *restrict,
const sigset_t *restrict));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (pselect);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef pselect
# if HAVE_RAW_DECL_PSELECT
diff --git a/gl/lib/sys_socket.c b/gl/lib/sys_socket.c
index 0bfd60f2..b7388cec 100644
--- a/gl/lib/sys_socket.c
+++ b/gl/lib/sys_socket.c
@@ -1,6 +1,6 @@
/* Inline functions for <sys/socket.h>.
- Copyright (C) 2012-2022 Free Software Foundation, Inc.
+ Copyright (C) 2012-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/sys_socket.in.h b/gl/lib/sys_socket.in.h
index acdf7eee..afeedf07 100644
--- a/gl/lib/sys_socket.in.h
+++ b/gl/lib/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-2022 Free Software Foundation, Inc.
+ Copyright (C) 2005-2023 Free Software Foundation, Inc.
Written by Simon Josefsson.
This file is free software: you can redistribute it and/or modify
@@ -63,9 +63,12 @@
#ifndef _@GUARD_PREFIX@_SYS_SOCKET_H
#define _@GUARD_PREFIX@_SYS_SOCKET_H
-#ifndef _GL_INLINE_HEADER_BEGIN
+/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE, GNULIB_POSIXCHECK,
+ HAVE_RAW_DECL_*, alignof. */
+#if !_GL_CONFIG_H_INCLUDED
#error "Please include config.h first."
#endif
+
_GL_INLINE_HEADER_BEGIN
#ifndef _GL_SYS_SOCKET_INLINE
# define _GL_SYS_SOCKET_INLINE _GL_INLINE
@@ -97,7 +100,6 @@ typedef unsigned char sa_family_t;
# endif
# endif
#else
-# include <stdalign.h>
/* Code taken from glibc sysdeps/unix/sysv/linux/bits/socket.h on
2009-05-08, licensed under LGPLv2.1+, plus portability fixes. */
# define __ss_aligntype unsigned long int
diff --git a/gl/lib/sys_stat.in.h b/gl/lib/sys_stat.in.h
index 714c3cb1..ad4da17f 100644
--- a/gl/lib/sys_stat.in.h
+++ b/gl/lib/sys_stat.in.h
@@ -1,5 +1,5 @@
/* Provide a more complete sys/stat.h header file.
- Copyright (C) 2005-2022 Free Software Foundation, Inc.
+ Copyright (C) 2005-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -25,6 +25,13 @@
#endif
@PRAGMA_COLUMNS@
+/* This file uses #include_next of a system file that defines time_t.
+ For the 'year2038' module to work right, <config.h> needs to have been
+ included before. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
#if defined __need_system_sys_stat_h
/* Special invocation convention. */
@@ -48,6 +55,11 @@
#ifndef _@GUARD_PREFIX@_SYS_STAT_H
#define _@GUARD_PREFIX@_SYS_STAT_H
+/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
/* The definition of _GL_ARG_NONNULL is copied here. */
@@ -549,7 +561,7 @@ _GL_FUNCDECL_SYS (futimens, int, (int fd, struct timespec const times[2]));
# endif
_GL_CXXALIAS_SYS (futimens, int, (int fd, struct timespec const times[2]));
# endif
-# if @HAVE_FUTIMENS@
+# if __GLIBC__ >= 2 && @HAVE_FUTIMENS@
_GL_CXXALIASWARN (futimens);
# endif
#elif defined GNULIB_POSIXCHECK
@@ -596,44 +608,6 @@ _GL_WARN_ON_USE (lchmod, "lchmod is unportable - "
#endif
-#if @GNULIB_LSTAT@
-# if ! @HAVE_LSTAT@
-/* mingw does not support symlinks, therefore it does not have lstat. But
- without links, stat does just fine. */
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-# define lstat stat
-# endif
-_GL_CXXALIAS_RPL_1 (lstat, stat, int,
- (const char *restrict name, struct stat *restrict buf));
-# elif @REPLACE_LSTAT@
-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
-# undef lstat
-# define lstat rpl_lstat
-# endif
-_GL_FUNCDECL_RPL (lstat, int,
- (const char *restrict name, struct stat *restrict buf)
- _GL_ARG_NONNULL ((1, 2)));
-_GL_CXXALIAS_RPL (lstat, int,
- (const char *restrict name, struct stat *restrict buf));
-# else
-_GL_CXXALIAS_SYS (lstat, int,
- (const char *restrict name, struct stat *restrict buf));
-# endif
-# if @HAVE_LSTAT@
-_GL_CXXALIASWARN (lstat);
-# endif
-#elif @GNULIB_OVERRIDES_STRUCT_STAT@
-# undef lstat
-# define lstat lstat_used_without_requesting_gnulib_module_lstat
-#elif defined GNULIB_POSIXCHECK
-# undef lstat
-# if HAVE_RAW_DECL_LSTAT
-_GL_WARN_ON_USE (lstat, "lstat is unportable - "
- "use gnulib module lstat for portability");
-# endif
-#endif
-
-
#if @GNULIB_MKDIR@
# if @REPLACE_MKDIR@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
@@ -754,7 +728,9 @@ _GL_FUNCDECL_SYS (mkfifoat, int, (int fd, char const *file, mode_t mode)
# endif
_GL_CXXALIAS_SYS (mkfifoat, int, (int fd, char const *file, mode_t mode));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (mkfifoat);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef mkfifoat
# if HAVE_RAW_DECL_MKFIFOAT
@@ -811,7 +787,9 @@ _GL_FUNCDECL_SYS (mknodat, int,
_GL_CXXALIAS_SYS (mknodat, int,
(int fd, char const *file, mode_t mode, dev_t dev));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (mknodat);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef mknodat
# if HAVE_RAW_DECL_MKNODAT
@@ -895,6 +873,44 @@ _GL_WARN_ON_USE (stat, "stat is unportable - "
#endif
+#if @GNULIB_LSTAT@
+# if ! @HAVE_LSTAT@
+/* mingw does not support symlinks, therefore it does not have lstat. But
+ without links, stat does just fine. */
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define lstat stat
+# endif
+_GL_CXXALIAS_RPL_1 (lstat, stat, int,
+ (const char *restrict name, struct stat *restrict buf));
+# elif @REPLACE_LSTAT@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef lstat
+# define lstat rpl_lstat
+# endif
+_GL_FUNCDECL_RPL (lstat, int,
+ (const char *restrict name, struct stat *restrict buf)
+ _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (lstat, int,
+ (const char *restrict name, struct stat *restrict buf));
+# else
+_GL_CXXALIAS_SYS (lstat, int,
+ (const char *restrict name, struct stat *restrict buf));
+# endif
+# if @HAVE_LSTAT@
+_GL_CXXALIASWARN (lstat);
+# endif
+#elif @GNULIB_OVERRIDES_STRUCT_STAT@
+# undef lstat
+# define lstat lstat_used_without_requesting_gnulib_module_lstat
+#elif defined GNULIB_POSIXCHECK
+# undef lstat
+# if HAVE_RAW_DECL_LSTAT
+_GL_WARN_ON_USE (lstat, "lstat is unportable - "
+ "use gnulib module lstat for portability");
+# endif
+#endif
+
+
#if @GNULIB_MDA_UMASK@
/* On native Windows, map 'umask' to '_umask', so that -loldnames is not
required. In C++ with GNULIB_NAMESPACE, avoid differences between
@@ -937,7 +953,7 @@ _GL_FUNCDECL_SYS (utimensat, int, (int fd, char const *name,
_GL_CXXALIAS_SYS (utimensat, int, (int fd, char const *name,
struct timespec const times[2], int flag));
# endif
-# if @HAVE_UTIMENSAT@
+# if __GLIBC__ >= 2 && @HAVE_UTIMENSAT@
_GL_CXXALIASWARN (utimensat);
# endif
#elif defined GNULIB_POSIXCHECK
diff --git a/gl/lib/sys_time.in.h b/gl/lib/sys_time.in.h
index 87db1a88..59cce144 100644
--- a/gl/lib/sys_time.in.h
+++ b/gl/lib/sys_time.in.h
@@ -1,6 +1,6 @@
/* Provide a more complete sys/time.h.
- Copyright (C) 2007-2022 Free Software Foundation, Inc.
+ Copyright (C) 2007-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -24,6 +24,13 @@
#endif
@PRAGMA_COLUMNS@
+/* This file uses #include_next of a system file that defines time_t.
+ For the 'year2038' module to work right, <config.h> needs to have been
+ included before. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
/* On Cygwin and on many BSDish systems, <sys/time.h> includes itself
recursively via <sys/select.h>.
Simply delegate to the system's header in this case; it is a no-op.
@@ -41,6 +48,11 @@
#ifndef _@GUARD_PREFIX@_SYS_TIME_H
#define _@GUARD_PREFIX@_SYS_TIME_H
+/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
#if ! @HAVE_SYS_TIME_H@
# include <time.h>
#endif
diff --git a/gl/lib/sys_types.in.h b/gl/lib/sys_types.in.h
index 698e88d6..ea77e140 100644
--- a/gl/lib/sys_types.in.h
+++ b/gl/lib/sys_types.in.h
@@ -1,6 +1,6 @@
/* Provide a more complete sys/types.h.
- Copyright (C) 2011-2022 Free Software Foundation, Inc.
+ Copyright (C) 2011-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -20,6 +20,13 @@
#endif
@PRAGMA_COLUMNS@
+/* This file uses #include_next of a system file that defines time_t.
+ For the 'year2038' module to work right, <config.h> needs to have been
+ included before. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
#if defined _WIN32 && !defined __CYGWIN__ \
&& (defined __need_off_t || defined __need___off64_t \
|| defined __need_ssize_t || defined __need_time_t)
diff --git a/gl/lib/sys_uio.in.h b/gl/lib/sys_uio.in.h
index 788d461f..64c4fb6d 100644
--- a/gl/lib/sys_uio.in.h
+++ b/gl/lib/sys_uio.in.h
@@ -1,5 +1,5 @@
/* Substitute for <sys/uio.h>.
- Copyright (C) 2011-2022 Free Software Foundation, Inc.
+ Copyright (C) 2011-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/sysexits.in.h b/gl/lib/sysexits.in.h
index 9a65060e..c19e5e27 100644
--- a/gl/lib/sysexits.in.h
+++ b/gl/lib/sysexits.in.h
@@ -1,5 +1,5 @@
/* exit() exit codes for some BSD system programs.
- Copyright (C) 2003, 2006-2022 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2006-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/tempname.c b/gl/lib/tempname.c
index 5fc5efe0..bf362db6 100644
--- a/gl/lib/tempname.c
+++ b/gl/lib/tempname.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2022 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2023 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
@@ -20,16 +20,9 @@
# include "tempname.h"
#endif
-#include <sys/types.h>
-#include <assert.h>
-#include <stdbool.h>
-
#include <errno.h>
#include <stdio.h>
-#ifndef P_tmpdir
-# define P_tmpdir "/tmp"
-#endif
#ifndef TMP_MAX
# define TMP_MAX 238328
#endif
@@ -43,27 +36,23 @@
# error report this to bug-gnulib@gnu.org
#endif
-#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
-#include <stdalign.h>
#include <stdint.h>
#include <sys/random.h>
#include <sys/stat.h>
#include <time.h>
#if _LIBC
-# define struct_stat64 struct stat64
-# define __secure_getenv __libc_secure_getenv
+# define struct_stat64 struct __stat64_t64
#else
# define struct_stat64 struct stat
# define __gen_tempname gen_tempname
# define __mkdir mkdir
# define __open open
-# define __lstat64(file, buf) lstat (file, buf)
-# define __stat64(file, buf) stat (file, buf)
+# define __lstat64_time64(file, buf) lstat (file, buf)
# define __getrandom getrandom
# define __clock_gettime64 clock_gettime
# define __timespec64 timespec
@@ -77,94 +66,56 @@ typedef uint_fast64_t random_value;
#define BASE_62_DIGITS 10 /* 62**10 < UINT_FAST64_MAX */
#define BASE_62_POWER (62LL * 62 * 62 * 62 * 62 * 62 * 62 * 62 * 62 * 62)
+/* Return the result of mixing the entropy from R and S.
+ Assume that R and S are not particularly random,
+ and that the result should look randomish to an untrained eye. */
+
static random_value
-random_bits (random_value var, bool use_getrandom)
+mix_random_values (random_value r, random_value s)
{
- random_value r;
- /* Without GRND_NONBLOCK it can be blocked for minutes on some systems. */
- if (use_getrandom && __getrandom (&r, sizeof r, GRND_NONBLOCK) == sizeof r)
- return r;
-#if _LIBC || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
- /* Add entropy if getrandom did not work. */
- struct __timespec64 tv;
- __clock_gettime64 (CLOCK_MONOTONIC, &tv);
- var ^= tv.tv_nsec;
-#endif
- return 2862933555777941757 * var + 3037000493;
+ /* As this code is used only when high-quality randomness is neither
+ available nor necessary, there is no need for fancier polynomials
+ such as those in the Linux kernel's 'random' driver. */
+ return (2862933555777941757 * r + 3037000493) ^ s;
}
-#if _LIBC
-/* Return nonzero if DIR is an existent directory. */
-static int
-direxists (const char *dir)
-{
- struct_stat64 buf;
- return __stat64 (dir, &buf) == 0 && S_ISDIR (buf.st_mode);
-}
+/* Set *R to a random value.
+ Return true if *R is set to high-quality value taken from getrandom.
+ Otherwise return false, falling back to a low-quality *R that might
+ depend on S.
-/* Path search algorithm, for tmpnam, tmpfile, etc. If DIR is
- non-null and exists, uses it; otherwise uses the first of $TMPDIR,
- P_tmpdir, /tmp that exists. Copies into TMPL a template suitable
- for use with mk[s]temp. Will fail (-1) if DIR is non-null and
- doesn't exist, none of the searched dirs exists, or there's not
- enough space in TMPL. */
-int
-__path_search (char *tmpl, size_t tmpl_len, const char *dir, const char *pfx,
- int try_tmpdir)
+ This function returns false only when getrandom fails.
+ On GNU systems this should happen only early in the boot process,
+ when the fallback should be good enough for programs using tempname
+ because any attacker likely has root privileges already. */
+
+static bool
+random_bits (random_value *r, random_value s)
{
- const char *d;
- size_t dlen, plen;
+ /* Without GRND_NONBLOCK it can be blocked for minutes on some systems. */
+ if (__getrandom (r, sizeof *r, GRND_NONBLOCK) == sizeof *r)
+ return true;
- if (!pfx || !pfx[0])
- {
- pfx = "file";
- plen = 4;
- }
- else
- {
- plen = strlen (pfx);
- if (plen > 5)
- plen = 5;
- }
+ /* If getrandom did not work, use ersatz entropy based on low-order
+ clock bits. On GNU systems getrandom should fail only
+ early in booting, when ersatz should be good enough.
+ Do not use ASLR-based entropy, as that would leak ASLR info into
+ the resulting file name which is typically public.
- if (try_tmpdir)
- {
- d = __secure_getenv ("TMPDIR");
- if (d != NULL && direxists (d))
- dir = d;
- else if (dir != NULL && direxists (dir))
- /* nothing */ ;
- else
- dir = NULL;
- }
- if (dir == NULL)
- {
- if (direxists (P_tmpdir))
- dir = P_tmpdir;
- else if (strcmp (P_tmpdir, "/tmp") != 0 && direxists ("/tmp"))
- dir = "/tmp";
- else
- {
- __set_errno (ENOENT);
- return -1;
- }
- }
+ Of course we are in a state of sin here. */
- dlen = strlen (dir);
- while (dlen > 1 && dir[dlen - 1] == '/')
- dlen--; /* remove trailing slashes */
+ random_value v = s;
- /* check we have room for "${dir}/${pfx}XXXXXX\0" */
- if (tmpl_len < dlen + 1 + plen + 6 + 1)
- {
- __set_errno (EINVAL);
- return -1;
- }
+#if _LIBC || (defined CLOCK_REALTIME && HAVE_CLOCK_GETTIME)
+ struct __timespec64 tv;
+ __clock_gettime64 (CLOCK_REALTIME, &tv);
+ v = mix_random_values (v, tv.tv_sec);
+ v = mix_random_values (v, tv.tv_nsec);
+#endif
- sprintf (tmpl, "%.*s/%.*sXXXXXX", (int) dlen, dir, (int) plen, pfx);
- return 0;
+ *r = mix_random_values (v, clock ());
+ return false;
}
-#endif /* _LIBC */
#if _LIBC
static int try_tempname_len (char *, int, void *, int (*) (char *, void *),
@@ -191,7 +142,7 @@ try_nocreate (char *tmpl, _GL_UNUSED void *flags)
{
struct_stat64 st;
- if (__lstat64 (tmpl, &st) == 0 || errno == EOVERFLOW)
+ if (__lstat64_time64 (tmpl, &st) == 0 || errno == EOVERFLOW)
__set_errno (EEXIST);
return errno == ENOENT ? 0 : -1;
}
@@ -213,7 +164,7 @@ static const char letters[] =
and return a read-write fd. The file is mode 0600.
__GT_DIR: create a directory, which will be mode 0700.
- We use a clever algorithm to get hard-to-predict names. */
+ */
#ifdef _LIBC
static
#endif
@@ -261,25 +212,17 @@ try_tempname_len (char *tmpl, int suffixlen, void *args,
unsigned int attempts = ATTEMPTS_MIN;
#endif
- /* A random variable. The initial value is used only the for fallback path
- on 'random_bits' on 'getrandom' failure. Its initial value tries to use
- some entropy from the ASLR and ignore possible bits from the stack
- alignment. */
- random_value v = ((uintptr_t) &v) / alignof (max_align_t);
+ /* A random variable. */
+ random_value v = 0;
- /* How many random base-62 digits can currently be extracted from V. */
+ /* A value derived from the random variable, and how many random
+ base-62 digits can currently be extracted from VDIGBUF. */
+ random_value vdigbuf;
int vdigits = 0;
- /* Whether to consume entropy when acquiring random bits. On the
- first try it's worth the entropy cost with __GT_NOCREATE, which
- is inherently insecure and can use the entropy to make it a bit
- less secure. On the (rare) second and later attempts it might
- help against DoS attacks. */
- bool use_getrandom = tryfunc == try_nocreate;
-
- /* Least unfair value for V. If V is less than this, V can generate
- BASE_62_DIGITS digits fairly. Otherwise it might be biased. */
- random_value const unfair_min
+ /* Least biased value for V. If V is less than this, V can generate
+ BASE_62_DIGITS unbiased digits. Otherwise the digits are biased. */
+ random_value const biased_min
= RANDOM_VALUE_MAX - RANDOM_VALUE_MAX % BASE_62_POWER;
len = strlen (tmpl);
@@ -299,18 +242,16 @@ try_tempname_len (char *tmpl, int suffixlen, void *args,
{
if (vdigits == 0)
{
- do
- {
- v = random_bits (v, use_getrandom);
- use_getrandom = true;
- }
- while (unfair_min <= v);
+ /* Worry about bias only if the bits are high quality. */
+ while (random_bits (&v, v) && biased_min <= v)
+ continue;
+ vdigbuf = v;
vdigits = BASE_62_DIGITS;
}
- XXXXXX[i] = letters[v % 62];
- v /= 62;
+ XXXXXX[i] = letters[vdigbuf % 62];
+ vdigbuf /= 62;
vdigits--;
}
diff --git a/gl/lib/tempname.h b/gl/lib/tempname.h
index c172820f..36a51381 100644
--- a/gl/lib/tempname.h
+++ b/gl/lib/tempname.h
@@ -1,6 +1,6 @@
/* Create a temporary file or directory.
- Copyright (C) 2006, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -48,7 +48,7 @@ extern "C" {
and return a read-write fd. The file is mode 0600.
GT_DIR: create a directory, which will be mode 0700.
- We use a clever algorithm to get hard-to-predict names. */
+ */
extern int gen_tempname (char *tmpl, int suffixlen, int flags, int kind);
/* Similar, except X_SUFFIX_LEN gives the number of Xs. */
extern int gen_tempname_len (char *tmpl, int suffixlen, int flags, int kind,
diff --git a/gl/lib/termios.in.h b/gl/lib/termios.in.h
index 32b7c5b3..0036cbac 100644
--- a/gl/lib/termios.in.h
+++ b/gl/lib/termios.in.h
@@ -1,5 +1,5 @@
/* Substitute for and wrapper around <termios.h>.
- Copyright (C) 2010-2022 Free Software Foundation, Inc.
+ Copyright (C) 2010-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -40,6 +40,11 @@ extern "C" {
#ifndef _@GUARD_PREFIX@_TERMIOS_H
#define _@GUARD_PREFIX@_TERMIOS_H
+/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
/* Get pid_t. */
#include <sys/types.h>
diff --git a/gl/lib/time.in.h b/gl/lib/time.in.h
index 6d4c7719..06428adb 100644
--- a/gl/lib/time.in.h
+++ b/gl/lib/time.in.h
@@ -1,6 +1,6 @@
/* A more-standard <time.h>.
- Copyright (C) 2007-2022 Free Software Foundation, Inc.
+ Copyright (C) 2007-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -20,6 +20,13 @@
#endif
@PRAGMA_COLUMNS@
+/* This file uses #include_next of a system file that defines time_t.
+ For the 'year2038' module to work right, <config.h> needs to have been
+ included before. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
/* Don't get in the way of glibc when it includes time.h merely to
declare a few standard symbols, rather than to declare all the
symbols. (However, skip this for MinGW as it treats __need_time_t
@@ -45,6 +52,12 @@
# @INCLUDE_NEXT@ @NEXT_TIME_H@
+/* This file uses _GL_ATTRIBUTE_DEPRECATED, GNULIB_POSIXCHECK,
+ HAVE_RAW_DECL_*. */
+# if !_GL_CONFIG_H_INCLUDED
+# error "Please include config.h first."
+# endif
+
/* NetBSD 5.0 mis-defines NULL. */
# include <stddef.h>
@@ -112,12 +125,24 @@ struct __time_t_must_be_integral {
/* Set *TS to the current time, and return BASE.
Upon failure, return 0. */
# if @GNULIB_TIMESPEC_GET@
-# if ! @HAVE_TIMESPEC_GET@
+# if @REPLACE_TIMESPEC_GET@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef timespec_get
+# define timespec_get rpl_timespec_get
+# endif
+_GL_FUNCDECL_RPL (timespec_get, int, (struct timespec *ts, int base)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (timespec_get, int, (struct timespec *ts, int base));
+# else
+# if !@HAVE_TIMESPEC_GET@
_GL_FUNCDECL_SYS (timespec_get, int, (struct timespec *ts, int base)
_GL_ARG_NONNULL ((1)));
-# endif
+# endif
_GL_CXXALIAS_SYS (timespec_get, int, (struct timespec *ts, int base));
+# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (timespec_get);
+# endif
# endif
/* Set *TS to the current time resolution, and return BASE.
@@ -131,6 +156,22 @@ _GL_CXXALIAS_SYS (timespec_getres, int, (struct timespec *ts, int base));
_GL_CXXALIASWARN (timespec_getres);
# endif
+/* Return the number of seconds that have elapsed since the Epoch. */
+# if @GNULIB_TIME@
+# if @REPLACE_TIME@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define time rpl_time
+# endif
+_GL_FUNCDECL_RPL (time, time_t, (time_t *__tp));
+_GL_CXXALIAS_RPL (time, time_t, (time_t *__tp));
+# else
+_GL_CXXALIAS_SYS (time, time_t, (time_t *__tp));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (time);
+# endif
+# endif
+
/* Sleep for at least RQTP seconds unless interrupted, If interrupted,
return -1 and store the remaining time into RMTP. See
<https://pubs.opengroup.org/onlinepubs/9699919799/functions/nanosleep.html>. */
@@ -315,6 +356,9 @@ _GL_CXXALIASWARN (strptime);
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# define ctime rpl_ctime
# endif
+# ifndef __cplusplus
+_GL_ATTRIBUTE_DEPRECATED
+# endif
_GL_FUNCDECL_RPL (ctime, char *, (time_t const *__tp)
_GL_ARG_NONNULL ((1)));
_GL_CXXALIAS_RPL (ctime, char *, (time_t const *__tp));
@@ -422,7 +466,9 @@ _GL_FUNCDECL_SYS (timegm, time_t, (struct tm *__tm) _GL_ARG_NONNULL ((1)));
# endif
_GL_CXXALIAS_SYS (timegm, time_t, (struct tm *__tm));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (timegm);
+# endif
# endif
/* Encourage applications to avoid unsafe functions that can overrun
@@ -435,8 +481,10 @@ _GL_WARN_ON_USE (asctime, "asctime can overrun buffers in some cases - "
# endif
# if defined GNULIB_POSIXCHECK
# undef asctime_r
+# if HAVE_RAW_DECL_ASCTIME_R
_GL_WARN_ON_USE (asctime_r, "asctime_r can overrun buffers in some cases - "
"better use strftime (or even sprintf) instead");
+# endif
# endif
# if defined GNULIB_POSIXCHECK
# undef ctime
@@ -445,8 +493,10 @@ _GL_WARN_ON_USE (ctime, "ctime can overrun buffers in some cases - "
# endif
# if defined GNULIB_POSIXCHECK
# undef ctime_r
+# if HAVE_RAW_DECL_CTIME_R
_GL_WARN_ON_USE (ctime_r, "ctime_r can overrun buffers in some cases - "
"better use strftime (or even sprintf) instead");
+# endif
# endif
#endif
diff --git a/gl/lib/timespec.c b/gl/lib/timespec.c
index 9d136cb8..5f7ffbdd 100644
--- a/gl/lib/timespec.c
+++ b/gl/lib/timespec.c
@@ -1,6 +1,6 @@
/* Inline functions for <timespec.h>.
- Copyright (C) 2012-2022 Free Software Foundation, Inc.
+ Copyright (C) 2012-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/timespec.h b/gl/lib/timespec.h
index 9e358289..e94da75d 100644
--- a/gl/lib/timespec.h
+++ b/gl/lib/timespec.h
@@ -1,6 +1,6 @@
/* timespec -- System time interface
- Copyright (C) 2000, 2002, 2004-2005, 2007, 2009-2022 Free Software
+ Copyright (C) 2000, 2002, 2004-2005, 2007, 2009-2023 Free Software
Foundation, Inc.
This file is free software: you can redistribute it and/or modify
@@ -19,11 +19,14 @@
#if ! defined TIMESPEC_H
#define TIMESPEC_H
-#include <time.h>
-
-#ifndef _GL_INLINE_HEADER_BEGIN
+/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE, _GL_ATTRIBUTE_CONST,
+ _GL_ATTRIBUTE_PURE, _GL_CMP. */
+#if !_GL_CONFIG_H_INCLUDED
#error "Please include config.h first."
#endif
+
+#include <time.h>
+
_GL_INLINE_HEADER_BEGIN
#ifndef _GL_TIMESPEC_INLINE
# define _GL_TIMESPEC_INLINE _GL_INLINE
@@ -52,10 +55,7 @@ enum { LOG10_TIMESPEC_RESOLUTION = LOG10_TIMESPEC_HZ };
_GL_TIMESPEC_INLINE struct timespec
make_timespec (time_t s, long int ns)
{
- struct timespec r;
- r.tv_sec = s;
- r.tv_nsec = ns;
- return r;
+ return (struct timespec) { .tv_sec = s, .tv_nsec = ns };
}
/* Return negative, zero, positive if A < B, A == B, A > B, respectively. */
diff --git a/gl/lib/unistd--.h b/gl/lib/unistd--.h
index d395f7e0..ae4fb680 100644
--- a/gl/lib/unistd--.h
+++ b/gl/lib/unistd--.h
@@ -1,6 +1,6 @@
/* Like unistd.h, but redefine some names to avoid glitches.
- Copyright (C) 2005, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2009-2023 Free Software Foundation, Inc.
This 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/gl/lib/unistd-safer.h b/gl/lib/unistd-safer.h
index db82c854..32686e71 100644
--- a/gl/lib/unistd-safer.h
+++ b/gl/lib/unistd-safer.h
@@ -1,6 +1,6 @@
/* Invoke unistd-like functions, but avoid some glitches.
- Copyright (C) 2001, 2003, 2005, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2003, 2005, 2009-2023 Free Software Foundation, Inc.
This 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/gl/lib/unistd.c b/gl/lib/unistd.c
index 95978e6a..be7a8255 100644
--- a/gl/lib/unistd.c
+++ b/gl/lib/unistd.c
@@ -1,6 +1,6 @@
/* Inline functions for <unistd.h>.
- Copyright (C) 2012-2022 Free Software Foundation, Inc.
+ Copyright (C) 2012-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/unistd.in.h b/gl/lib/unistd.in.h
index 57df09ec..2ae040a7 100644
--- a/gl/lib/unistd.in.h
+++ b/gl/lib/unistd.in.h
@@ -1,5 +1,5 @@
/* Substitute for and wrapper around <unistd.h>.
- Copyright (C) 2003-2022 Free Software Foundation, Inc.
+ Copyright (C) 2003-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -40,6 +40,24 @@
# undef _GL_INCLUDING_UNISTD_H
#endif
+/* Avoid lseek bugs in FreeBSD, macOS <https://bugs.gnu.org/61386>.
+ This bug is fixed after FreeBSD 13; see <https://bugs.freebsd.org/256205>.
+ Use macOS "9999" to stand for a future fixed macOS version. */
+#if defined __FreeBSD__ && __FreeBSD__ < 14
+# undef SEEK_DATA
+# undef SEEK_HOLE
+#elif defined __APPLE__ && defined __MACH__ && defined SEEK_DATA
+# ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
+# include <AvailabilityMacros.h>
+# endif
+# if (!defined MAC_OS_X_VERSION_MIN_REQUIRED \
+ || MAC_OS_X_VERSION_MIN_REQUIRED < 99990000)
+# include <sys/fcntl.h> /* It also defines the two macros. */
+# undef SEEK_DATA
+# undef SEEK_HOLE
+# endif
+#endif
+
/* Get all possible declarations of gethostname(). */
#if @GNULIB_GETHOSTNAME@ && @UNISTD_H_HAVE_WINSOCK2_H@ \
&& !defined _GL_INCLUDING_WINSOCK2_H
@@ -51,6 +69,12 @@
#if !defined _@GUARD_PREFIX@_UNISTD_H && !defined _GL_INCLUDING_WINSOCK2_H
#define _@GUARD_PREFIX@_UNISTD_H
+/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE, GNULIB_POSIXCHECK,
+ HAVE_RAW_DECL_*. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
/* NetBSD 5.0 mis-defines NULL. Also get size_t. */
/* But avoid namespace pollution on glibc systems. */
#ifndef __GLIBC__
@@ -152,9 +176,6 @@
# include <getopt-pfx-core.h>
#endif
-#ifndef _GL_INLINE_HEADER_BEGIN
- #error "Please include config.h first."
-#endif
_GL_INLINE_HEADER_BEGIN
#ifndef _GL_UNISTD_INLINE
# define _GL_UNISTD_INLINE _GL_INLINE
@@ -541,17 +562,22 @@ _GL_CXXALIASWARN (dup2);
Return newfd if successful, otherwise -1 and errno set.
See the Linux man page at
<https://www.kernel.org/doc/man-pages/online/pages/man2/dup3.2.html>. */
-# if @HAVE_DUP3@
+# if @REPLACE_DUP3@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef dup3
# define dup3 rpl_dup3
# endif
_GL_FUNCDECL_RPL (dup3, int, (int oldfd, int newfd, int flags));
_GL_CXXALIAS_RPL (dup3, int, (int oldfd, int newfd, int flags));
# else
+# if !@HAVE_DUP3@
_GL_FUNCDECL_SYS (dup3, int, (int oldfd, int newfd, int flags));
+# endif
_GL_CXXALIAS_SYS (dup3, int, (int oldfd, int newfd, int flags));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (dup3);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef dup3
# if HAVE_RAW_DECL_DUP3
@@ -870,7 +896,9 @@ _GL_FUNCDECL_SYS (execvpe, int,
_GL_CXXALIAS_SYS (execvpe, int,
(const char *program, char * const *argv, char * const *env));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (execvpe);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef execvpe
# if HAVE_RAW_DECL_EXECVPE
@@ -925,7 +953,9 @@ _GL_FUNCDECL_SYS (faccessat, int,
_GL_CXXALIAS_SYS (faccessat, int,
(int fd, char const *file, int mode, int flag));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (faccessat);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef faccessat
# if HAVE_RAW_DECL_FACCESSAT
@@ -1002,11 +1032,22 @@ _GL_WARN_ON_USE (fchownat, "fchownat is not portable - "
Return 0 if successful, otherwise -1 and errno set.
See POSIX:2008 specification
<https://pubs.opengroup.org/onlinepubs/9699919799/functions/fdatasync.html>. */
-# if !@HAVE_FDATASYNC@ || !@HAVE_DECL_FDATASYNC@
+# if @REPLACE_FDATASYNC@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef fdatasync
+# define fdatasync rpl_fdatasync
+# endif
+_GL_FUNCDECL_RPL (fdatasync, int, (int fd));
+_GL_CXXALIAS_RPL (fdatasync, int, (int fd));
+# else
+# if !@HAVE_FDATASYNC@|| !@HAVE_DECL_FDATASYNC@
_GL_FUNCDECL_SYS (fdatasync, int, (int fd));
-# endif
+# endif
_GL_CXXALIAS_SYS (fdatasync, int, (int fd));
+# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (fdatasync);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef fdatasync
# if HAVE_RAW_DECL_FDATASYNC
@@ -1053,7 +1094,9 @@ _GL_FUNCDECL_SYS (ftruncate, int, (int fd, off_t length));
# endif
_GL_CXXALIAS_SYS (ftruncate, int, (int fd, off_t length));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (ftruncate);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef ftruncate
# if HAVE_RAW_DECL_FTRUNCATE
@@ -1143,7 +1186,9 @@ _GL_FUNCDECL_SYS (getdomainname, int, (char *name, size_t len)
# endif
_GL_CXXALIAS_SYS (getdomainname, int, (char *name, size_t len));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (getdomainname);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef getdomainname
# if HAVE_RAW_DECL_GETDOMAINNAME
@@ -1183,11 +1228,22 @@ _GL_WARN_ON_USE (getdtablesize, "getdtablesize is unportable - "
#if @GNULIB_GETENTROPY@
/* Fill a buffer with random bytes. */
-# if !@HAVE_GETENTROPY@
+# if @REPLACE_GETENTROPY@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef getentropy
+# define getentropy rpl_getentropy
+# endif
+_GL_FUNCDECL_RPL (getentropy, int, (void *buffer, size_t length));
+_GL_CXXALIAS_RPL (getentropy, int, (void *buffer, size_t length));
+# else
+# if !@HAVE_GETENTROPY@
_GL_FUNCDECL_SYS (getentropy, int, (void *buffer, size_t length));
-# endif
+# endif
_GL_CXXALIAS_SYS (getentropy, int, (void *buffer, size_t length));
+# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (getentropy);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef getentropy
# if HAVE_RAW_DECL_GETENTROPY
@@ -1321,7 +1377,9 @@ _GL_FUNCDECL_SYS (getlogin_r, int, (char *name, size_t size)
int size. */
_GL_CXXALIAS_SYS_CAST (getlogin_r, int, (char *name, size_t size));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (getlogin_r);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef getlogin_r
# if HAVE_RAW_DECL_GETLOGIN_R
@@ -1659,7 +1717,9 @@ _GL_CXXALIAS_SYS (linkat, int,
(int fd1, const char *path1, int fd2, const char *path2,
int flag));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (linkat);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef linkat
# if HAVE_RAW_DECL_LINKAT
@@ -1740,8 +1800,9 @@ _GL_WARN_ON_USE (pipe, "pipe is unportable - "
Return 0 upon success, or -1 with errno set upon failure.
See also the Linux man page at
<https://www.kernel.org/doc/man-pages/online/pages/man2/pipe2.2.html>. */
-# if @HAVE_PIPE2@
+# if @REPLACE_PIPE2@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef pipe2
# define pipe2 rpl_pipe2
# endif
_GL_FUNCDECL_RPL (pipe2, int, (int fd[2], int flags) _GL_ARG_NONNULL ((1)));
@@ -1750,7 +1811,9 @@ _GL_CXXALIAS_RPL (pipe2, int, (int fd[2], int flags));
_GL_FUNCDECL_SYS (pipe2, int, (int fd[2], int flags) _GL_ARG_NONNULL ((1)));
_GL_CXXALIAS_SYS (pipe2, int, (int fd[2], int flags));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (pipe2);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef pipe2
# if HAVE_RAW_DECL_PIPE2
@@ -1785,7 +1848,9 @@ _GL_FUNCDECL_SYS (pread, ssize_t,
_GL_CXXALIAS_SYS (pread, ssize_t,
(int fd, void *buf, size_t bufsize, off_t offset));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (pread);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef pread
# if HAVE_RAW_DECL_PREAD
@@ -1820,7 +1885,9 @@ _GL_FUNCDECL_SYS (pwrite, ssize_t,
_GL_CXXALIAS_SYS (pwrite, ssize_t,
(int fd, const void *buf, size_t bufsize, off_t offset));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (pwrite);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef pwrite
# if HAVE_RAW_DECL_PWRITE
@@ -1934,7 +2001,9 @@ _GL_CXXALIAS_SYS (readlinkat, ssize_t,
(int fd, char const *restrict file,
char *restrict buf, size_t len));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (readlinkat);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef readlinkat
# if HAVE_RAW_DECL_READLINKAT
@@ -1994,15 +2063,27 @@ _GL_CXXALIASWARN (rmdir);
Platforms with no ability to set the hostname return -1 and set
errno = ENOSYS. */
-# if !@HAVE_SETHOSTNAME@ || !@HAVE_DECL_SETHOSTNAME@
+# if @REPLACE_SETHOSTNAME@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef sethostname
+# define sethostname rpl_sethostname
+# endif
+_GL_FUNCDECL_RPL (sethostname, int, (const char *name, size_t len)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (sethostname, int, (const char *name, size_t len));
+# else
+# if !@HAVE_SETHOSTNAME@ || !@HAVE_DECL_SETHOSTNAME@
_GL_FUNCDECL_SYS (sethostname, int, (const char *name, size_t len)
_GL_ARG_NONNULL ((1)));
-# endif
+# endif
/* Need to cast, because on Solaris 11 2011-10, Mac OS X 10.5, IRIX 6.5
and FreeBSD 6.4 the second parameter is int. On Solaris 11
2011-10, the first parameter is not const. */
_GL_CXXALIAS_SYS_CAST (sethostname, int, (const char *name, size_t len));
+# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (sethostname);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef sethostname
# if HAVE_RAW_DECL_SETHOSTNAME
@@ -2055,7 +2136,7 @@ _GL_CXXALIAS_MDA_CAST (swab, void, (char *from, char *to, int n));
# else
# if defined __hpux /* HP-UX */
_GL_CXXALIAS_SYS (swab, void, (const char *from, char *to, int n));
-# elif defined __sun && !defined _XPG4 /* Solaris */
+# elif defined __sun && (defined __SunOS_5_10 || defined __XOPEN_OR_POSIX) && !defined _XPG4 /* Solaris */
_GL_CXXALIAS_SYS (swab, void, (const char *from, char *to, ssize_t n));
# else
_GL_CXXALIAS_SYS (swab, void, (const void *from, void *to, ssize_t n));
@@ -2111,7 +2192,9 @@ _GL_FUNCDECL_SYS (symlinkat, int,
_GL_CXXALIAS_SYS (symlinkat, int,
(char const *contents, int fd, char const *file));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (symlinkat);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef symlinkat
# if HAVE_RAW_DECL_SYMLINKAT
@@ -2141,7 +2224,9 @@ _GL_FUNCDECL_SYS (truncate, int, (const char *filename, off_t length)
# endif
_GL_CXXALIAS_SYS (truncate, int, (const char *filename, off_t length));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (truncate);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef truncate
# if HAVE_RAW_DECL_TRUNCATE
@@ -2171,7 +2256,9 @@ _GL_FUNCDECL_SYS (ttyname_r, int,
_GL_CXXALIAS_SYS (ttyname_r, int,
(int fd, char *buf, size_t buflen));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (ttyname_r);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef ttyname_r
# if HAVE_RAW_DECL_TTYNAME_R
diff --git a/gl/lib/unlink.c b/gl/lib/unlink.c
index b549dd4a..d77d2629 100644
--- a/gl/lib/unlink.c
+++ b/gl/lib/unlink.c
@@ -1,6 +1,6 @@
/* Work around unlink bugs.
- Copyright (C) 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2009-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/unlinkat.c b/gl/lib/unlinkat.c
index c9ff3ab2..ea3d5ea5 100644
--- a/gl/lib/unlinkat.c
+++ b/gl/lib/unlinkat.c
@@ -1,6 +1,6 @@
/* Work around unlinkat bugs on Solaris 9 and Hurd.
- Copyright (C) 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2009-2023 Free Software Foundation, Inc.
This 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/gl/lib/utime.c b/gl/lib/utime.c
index 799be0fa..3cf1840f 100644
--- a/gl/lib/utime.c
+++ b/gl/lib/utime.c
@@ -1,5 +1,5 @@
/* Work around platform bugs in utime.
- Copyright (C) 2017-2022 Free Software Foundation, Inc.
+ Copyright (C) 2017-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -24,7 +24,6 @@
#if defined _WIN32 && ! defined __CYGWIN__
# include <errno.h>
-# include <stdbool.h>
# include <windows.h>
# include "filename.h"
# include "malloca.h"
diff --git a/gl/lib/utime.in.h b/gl/lib/utime.in.h
index 6cf17b67..da491697 100644
--- a/gl/lib/utime.in.h
+++ b/gl/lib/utime.in.h
@@ -1,5 +1,5 @@
/* Substitute for and wrapper around <utime.h>.
- Copyright (C) 2017-2022 Free Software Foundation, Inc.
+ Copyright (C) 2017-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -21,6 +21,13 @@
#endif
@PRAGMA_COLUMNS@
+/* This file uses #include_next of a system file that defines time_t.
+ For the 'year2038' module to work right, <config.h> needs to have been
+ included before. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
/* The include_next requires a split double-inclusion guard. */
#if @HAVE_UTIME_H@
# @INCLUDE_NEXT@ @NEXT_UTIME_H@
@@ -29,6 +36,11 @@
#ifndef _@GUARD_PREFIX@_UTIME_H
#define _@GUARD_PREFIX@_UTIME_H
+/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
#if !@HAVE_UTIME_H@
# include <sys/utime.h>
#endif
diff --git a/gl/lib/utimens.c b/gl/lib/utimens.c
index 2fa12518..faa197e6 100644
--- a/gl/lib/utimens.c
+++ b/gl/lib/utimens.c
@@ -1,6 +1,6 @@
/* Set file access and modification times.
- Copyright (C) 2003-2022 Free Software Foundation, Inc.
+ Copyright (C) 2003-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -26,7 +26,6 @@
#include <errno.h>
#include <fcntl.h>
-#include <stdbool.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/time.h>
@@ -406,10 +405,10 @@ fdutimens (int fd, char const *file, struct timespec const timespec[2])
struct timeval *t;
if (ts)
{
- timeval[0].tv_sec = ts[0].tv_sec;
- timeval[0].tv_usec = ts[0].tv_nsec / 1000;
- timeval[1].tv_sec = ts[1].tv_sec;
- timeval[1].tv_usec = ts[1].tv_nsec / 1000;
+ timeval[0] = (struct timeval) { .tv_sec = ts[0].tv_sec,
+ .tv_usec = ts[0].tv_nsec / 1000 };
+ timeval[1] = (struct timeval) { .tv_sec = ts[1].tv_sec,
+ .tv_usec = ts[1].tv_nsec / 1000 };
t = timeval;
}
else
@@ -503,8 +502,8 @@ fdutimens (int fd, char const *file, struct timespec const timespec[2])
struct utimbuf *ut;
if (ts)
{
- utimbuf.actime = ts[0].tv_sec;
- utimbuf.modtime = ts[1].tv_sec;
+ utimbuf = (struct utimbuf) { .actime = ts[0].tv_sec,
+ .modtime = ts[1].tv_sec };
ut = &utimbuf;
}
else
@@ -622,10 +621,10 @@ lutimens (char const *file, struct timespec const timespec[2])
int result;
if (ts)
{
- timeval[0].tv_sec = ts[0].tv_sec;
- timeval[0].tv_usec = ts[0].tv_nsec / 1000;
- timeval[1].tv_sec = ts[1].tv_sec;
- timeval[1].tv_usec = ts[1].tv_nsec / 1000;
+ timeval[0] = (struct timeval) { .tv_sec = ts[0].tv_sec,
+ .tv_usec = ts[0].tv_nsec / 1000 };
+ timeval[1] = (struct timeval) { .tv_sec = ts[1].tv_sec,
+ .tv_usec = ts[1].tv_nsec / 1000 };
t = timeval;
}
else
diff --git a/gl/lib/utimens.h b/gl/lib/utimens.h
index 2ccc06e5..4a21792a 100644
--- a/gl/lib/utimens.h
+++ b/gl/lib/utimens.h
@@ -1,6 +1,6 @@
/* Set file access and modification times.
- Copyright 2012-2022 Free Software Foundation, Inc.
+ Copyright 2012-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -17,6 +17,11 @@
/* Written by Paul Eggert. */
+/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
#include <time.h>
int fdutimens (int, char const *, struct timespec const [2]);
int utimens (char const *, struct timespec const [2]);
@@ -26,9 +31,6 @@ int lutimens (char const *, struct timespec const [2]);
# include <fcntl.h>
# include <sys/stat.h>
-#ifndef _GL_INLINE_HEADER_BEGIN
- #error "Please include config.h first."
-#endif
_GL_INLINE_HEADER_BEGIN
#ifndef _GL_UTIMENS_INLINE
# define _GL_UTIMENS_INLINE _GL_INLINE
diff --git a/gl/lib/vasnprintf.c b/gl/lib/vasnprintf.c
index 285c674b..9ad31b2a 100644
--- a/gl/lib/vasnprintf.c
+++ b/gl/lib/vasnprintf.c
@@ -1,5 +1,5 @@
/* vsprintf with automatic memory allocation.
- Copyright (C) 1999, 2002-2022 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -83,8 +83,9 @@
#include <stdio.h> /* snprintf(), sprintf() */
#include <stdlib.h> /* abort(), malloc(), realloc(), free() */
#include <string.h> /* memcpy(), strlen() */
+#include <wchar.h> /* mbstate_t, mbrtowc(), mbrlen(), wcrtomb() */
#include <errno.h> /* errno */
-#include <limits.h> /* CHAR_BIT */
+#include <limits.h> /* CHAR_BIT, INT_WIDTH, LONG_WIDTH */
#include <float.h> /* DBL_MAX_EXP, LDBL_MAX_EXP */
#if HAVE_NL_LANGINFO
# include <langinfo.h>
@@ -101,31 +102,30 @@
#include "xsize.h"
#include "attribute.h"
-#include "verify.h"
-#if (NEED_PRINTF_DOUBLE || NEED_PRINTF_LONG_DOUBLE) && !defined IN_LIBINTL
+#if NEED_PRINTF_DOUBLE || NEED_PRINTF_LONG_DOUBLE || (NEED_WPRINTF_DIRECTIVE_LA && WIDE_CHAR_VERSION)
# include <math.h>
# include "float+.h"
#endif
-#if (NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE) && !defined IN_LIBINTL
+#if NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE
# include <math.h>
# include "isnand-nolibm.h"
#endif
-#if (NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE) && !defined IN_LIBINTL
+#if NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE || (NEED_WPRINTF_DIRECTIVE_LA && WIDE_CHAR_VERSION)
# include <math.h>
# include "isnanl-nolibm.h"
# include "fpucw.h"
#endif
-#if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_DOUBLE) && !defined IN_LIBINTL
+#if NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_DOUBLE
# include <math.h>
# include "isnand-nolibm.h"
# include "printf-frexp.h"
#endif
-#if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE) && !defined IN_LIBINTL
+#if NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE || (NEED_WPRINTF_DIRECTIVE_LA && WIDE_CHAR_VERSION)
# include <math.h>
# include "isnanl-nolibm.h"
# include "printf-frexpl.h"
@@ -138,8 +138,6 @@
# define VASNPRINTF vasnwprintf
# define FCHAR_T wchar_t
# define DCHAR_T wchar_t
-# define TCHAR_T wchar_t
-# define DCHAR_IS_TCHAR 1
# define DIRECTIVE wchar_t_directive
# define DIRECTIVES wchar_t_directives
# define PRINTF_PARSE wprintf_parse
@@ -159,24 +157,32 @@
# endif
#endif
#if WIDE_CHAR_VERSION
- /* TCHAR_T is wchar_t. */
-# define USE_SNPRINTF 1
-# if HAVE_DECL__SNWPRINTF
- /* On Windows, the function swprintf() has a different signature than
- on Unix; we use the function _snwprintf() or - on mingw - snwprintf()
- instead. The mingw function snwprintf() has fewer bugs than the
- MSVCRT function _snwprintf(), so prefer that. */
-# if defined __MINGW32__
-# define SNPRINTF snwprintf
+ /* DCHAR_T is wchar_t. */
+# if HAVE_DECL__SNWPRINTF || (HAVE_SWPRINTF && HAVE_WORKING_SWPRINTF)
+# define TCHAR_T wchar_t
+# define DCHAR_IS_TCHAR 1
+# define USE_SNPRINTF 1
+# if HAVE_DECL__SNWPRINTF
+ /* On Windows, the function swprintf() has a different signature than
+ on Unix; we use the function _snwprintf() or - on mingw - snwprintf()
+ instead. The mingw function snwprintf() has fewer bugs than the
+ MSVCRT function _snwprintf(), so prefer that. */
+# if defined __MINGW32__
+# define SNPRINTF snwprintf
+# else
+# define SNPRINTF _snwprintf
+# define USE_MSVC__SNPRINTF 1
+# endif
# else
-# define SNPRINTF _snwprintf
-# define USE_MSVC__SNPRINTF 1
+ /* Unix. */
+# define SNPRINTF swprintf
# endif
# else
- /* Unix. */
-# define SNPRINTF swprintf
+ /* Old platforms such as NetBSD 3.0, OpenBSD 3.8, HP-UX 11.00, IRIX 6.5. */
+# define TCHAR_T char
# endif
-#else
+#endif
+#if !WIDE_CHAR_VERSION || !DCHAR_IS_TCHAR
/* TCHAR_T is char. */
/* Use snprintf if it exists under the name 'snprintf' or '_snprintf'.
But don't use it on BeOS, since BeOS snprintf produces no output if the
@@ -241,7 +247,7 @@ local_strnlen (const char *string, size_t maxlen)
# endif
#endif
-#if (((!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF) && WIDE_CHAR_VERSION) || ((!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || (NEED_PRINTF_DIRECTIVE_LS && !defined IN_LIBINTL)) && !WIDE_CHAR_VERSION && DCHAR_IS_TCHAR)) && HAVE_WCHAR_T
+#if (((!USE_SNPRINTF || WIDE_CHAR_VERSION || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || NEED_WPRINTF_DIRECTIVE_LC) && WIDE_CHAR_VERSION) || ((!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || NEED_PRINTF_DIRECTIVE_LS) && !WIDE_CHAR_VERSION && DCHAR_IS_TCHAR)) && HAVE_WCHAR_T
# if HAVE_WCSLEN
# define local_wcslen wcslen
# else
@@ -264,8 +270,8 @@ local_wcslen (const wchar_t *s)
# endif
#endif
-#if (!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF) && HAVE_WCHAR_T && WIDE_CHAR_VERSION
-# if HAVE_WCSNLEN
+#if (!USE_SNPRINTF || (WIDE_CHAR_VERSION && DCHAR_IS_TCHAR) || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF) && HAVE_WCHAR_T && WIDE_CHAR_VERSION
+# if HAVE_WCSNLEN && HAVE_DECL_WCSNLEN
# define local_wcsnlen wcsnlen
# else
# ifndef local_wcsnlen_defined
@@ -283,7 +289,7 @@ local_wcsnlen (const wchar_t *s, size_t maxlen)
# endif
#endif
-#if (((!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || (NEED_PRINTF_DIRECTIVE_LS && !defined IN_LIBINTL) || ENABLE_WCHAR_FALLBACK) && HAVE_WCHAR_T) || (ENABLE_WCHAR_FALLBACK && HAVE_WINT_T)) && !WIDE_CHAR_VERSION
+#if (((!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || NEED_PRINTF_DIRECTIVE_LS || ENABLE_WCHAR_FALLBACK) && HAVE_WCHAR_T) || ((NEED_PRINTF_DIRECTIVE_LC || ENABLE_WCHAR_FALLBACK) && HAVE_WINT_T)) && !WIDE_CHAR_VERSION
# if ENABLE_WCHAR_FALLBACK
static size_t
wctomb_fallback (char *s, wchar_t wc)
@@ -351,7 +357,7 @@ local_wctomb (char *s, wchar_t wc)
# endif
#endif
-#if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE || NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE) && !defined IN_LIBINTL
+#if NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE || NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE || (NEED_WPRINTF_DIRECTIVE_LA && WIDE_CHAR_VERSION)
/* Determine the decimal-point character according to the current locale. */
# ifndef decimal_point_char_defined
# define decimal_point_char_defined 1
@@ -378,7 +384,7 @@ decimal_point_char (void)
# endif
#endif
-#if NEED_PRINTF_INFINITE_DOUBLE && !NEED_PRINTF_DOUBLE && !defined IN_LIBINTL
+#if NEED_PRINTF_INFINITE_DOUBLE && !NEED_PRINTF_DOUBLE
/* Equivalent to !isfinite(x) || x == 0, but does not require libm. */
static int
@@ -389,7 +395,7 @@ is_infinite_or_zero (double x)
#endif
-#if NEED_PRINTF_INFINITE_LONG_DOUBLE && !NEED_PRINTF_LONG_DOUBLE && !defined IN_LIBINTL
+#if NEED_PRINTF_INFINITE_LONG_DOUBLE && !NEED_PRINTF_LONG_DOUBLE
/* Equivalent to !isfinite(x) || x == 0, but does not require libm. */
static int
@@ -400,7 +406,7 @@ is_infinite_or_zerol (long double x)
#endif
-#if (NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_DOUBLE) && !defined IN_LIBINTL
+#if NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_DOUBLE
/* Converting 'long double' to decimal without rare rounding bugs requires
real bignums. We use the naming conventions of GNU gmp, but vastly simpler
@@ -408,11 +414,11 @@ is_infinite_or_zerol (long double x)
typedef unsigned int mp_limb_t;
# define GMP_LIMB_BITS 32
-verify (sizeof (mp_limb_t) * CHAR_BIT == GMP_LIMB_BITS);
+static_assert (sizeof (mp_limb_t) * CHAR_BIT == GMP_LIMB_BITS);
typedef unsigned long long mp_twolimb_t;
# define GMP_TWOLIMB_BITS 64
-verify (sizeof (mp_twolimb_t) * CHAR_BIT == GMP_TWOLIMB_BITS);
+static_assert (sizeof (mp_twolimb_t) * CHAR_BIT == GMP_TWOLIMB_BITS);
/* Representation of a bignum >= 0. */
typedef struct
@@ -921,6 +927,14 @@ divide (mpn_t a, mpn_t b, mpn_t *q)
return roomptr;
}
+/* Avoid pointless GCC warning "argument 1 value '18446744073709551615' exceeds
+ maximum object size 9223372036854775807", triggered by the use of xsum as
+ argument of malloc. */
+# if __GNUC__ >= 7
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Walloc-size-larger-than="
+# endif
+
/* Convert a bignum a >= 0, multiplied with 10^extra_zeroes, to decimal
representation.
Destroys the contents of a.
@@ -977,6 +991,10 @@ convert_to_decimal (mpn_t a, size_t extra_zeroes)
return c_ptr;
}
+# if __GNUC__ >= 7
+# pragma GCC diagnostic pop
+# endif
+
# if NEED_PRINTF_LONG_DOUBLE
/* Assuming x is finite and >= 0:
@@ -1171,8 +1189,6 @@ scale10_round_decimal_decoded (int e, mpn_t m, void *memory, int n)
void *z_memory;
char *digits;
- if (memory == NULL)
- return NULL;
/* x = 2^e * m, hence
y = round (2^e * 10^n * m) = round (2^(e+n) * 5^n * m)
= round (2^s * 5^n * m). */
@@ -1380,10 +1396,13 @@ scale10_round_decimal_decoded (int e, mpn_t m, void *memory, int n)
static char *
scale10_round_decimal_long_double (long double x, int n)
{
- int e IF_LINT(= 0);
+ int e;
mpn_t m;
void *memory = decode_long_double (x, &e, &m);
- return scale10_round_decimal_decoded (e, m, memory, n);
+ if (memory != NULL)
+ return scale10_round_decimal_decoded (e, m, memory, n);
+ else
+ return NULL;
}
# endif
@@ -1398,10 +1417,13 @@ scale10_round_decimal_long_double (long double x, int n)
static char *
scale10_round_decimal_double (double x, int n)
{
- int e IF_LINT(= 0);
+ int e;
mpn_t m;
void *memory = decode_double (x, &e, &m);
- return scale10_round_decimal_decoded (e, m, memory, n);
+ if (memory != NULL)
+ return scale10_round_decimal_decoded (e, m, memory, n);
+ else
+ return NULL;
}
# endif
@@ -1604,7 +1626,7 @@ is_borderline (const char *digits, size_t precision)
#endif
-#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF
+#if !USE_SNPRINTF || (WIDE_CHAR_VERSION && DCHAR_IS_TCHAR) || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF
/* Use a different function name, to make it possible that the 'wchar_t'
parametrization and the 'char' parametrization get compiled in the same
@@ -1627,24 +1649,156 @@ MAX_ROOM_NEEDED (const arguments *ap, size_t arg_index, FCHAR_T conversion,
switch (conversion)
{
case 'd': case 'i': case 'u':
- if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT)
- tmp_length =
- (unsigned int) (sizeof (unsigned long long) * CHAR_BIT
- * 0.30103 /* binary -> decimal */
- )
- + 1; /* turn floor into ceil */
- else if (type == TYPE_LONGINT || type == TYPE_ULONGINT)
- tmp_length =
- (unsigned int) (sizeof (unsigned long) * CHAR_BIT
- * 0.30103 /* binary -> decimal */
- )
- + 1; /* turn floor into ceil */
- else
- tmp_length =
- (unsigned int) (sizeof (unsigned int) * CHAR_BIT
- * 0.30103 /* binary -> decimal */
- )
- + 1; /* turn floor into ceil */
+ switch (type)
+ {
+ default:
+ tmp_length =
+ (unsigned int) (sizeof (unsigned int) * CHAR_BIT
+ * 0.30103 /* binary -> decimal */
+ )
+ + 1; /* turn floor into ceil */
+ break;
+ case TYPE_LONGINT:
+ tmp_length =
+ (unsigned int) (sizeof (long int) * CHAR_BIT
+ * 0.30103 /* binary -> decimal */
+ )
+ + 1; /* turn floor into ceil */
+ break;
+ case TYPE_ULONGINT:
+ tmp_length =
+ (unsigned int) (sizeof (unsigned long int) * CHAR_BIT
+ * 0.30103 /* binary -> decimal */
+ )
+ + 1; /* turn floor into ceil */
+ break;
+ case TYPE_LONGLONGINT:
+ tmp_length =
+ (unsigned int) (sizeof (long long int) * CHAR_BIT
+ * 0.30103 /* binary -> decimal */
+ )
+ + 1; /* turn floor into ceil */
+ break;
+ case TYPE_ULONGLONGINT:
+ tmp_length =
+ (unsigned int) (sizeof (unsigned long long int) * CHAR_BIT
+ * 0.30103 /* binary -> decimal */
+ )
+ + 1; /* turn floor into ceil */
+ break;
+ case TYPE_INT8_T:
+ tmp_length =
+ (unsigned int) (sizeof (int8_t) * CHAR_BIT
+ * 0.30103 /* binary -> decimal */
+ )
+ + 1; /* turn floor into ceil */
+ break;
+ case TYPE_UINT8_T:
+ tmp_length =
+ (unsigned int) (sizeof (uint8_t) * CHAR_BIT
+ * 0.30103 /* binary -> decimal */
+ )
+ + 1; /* turn floor into ceil */
+ break;
+ case TYPE_INT16_T:
+ tmp_length =
+ (unsigned int) (sizeof (int16_t) * CHAR_BIT
+ * 0.30103 /* binary -> decimal */
+ )
+ + 1; /* turn floor into ceil */
+ break;
+ case TYPE_UINT16_T:
+ tmp_length =
+ (unsigned int) (sizeof (uint16_t) * CHAR_BIT
+ * 0.30103 /* binary -> decimal */
+ )
+ + 1; /* turn floor into ceil */
+ break;
+ case TYPE_INT32_T:
+ tmp_length =
+ (unsigned int) (sizeof (int32_t) * CHAR_BIT
+ * 0.30103 /* binary -> decimal */
+ )
+ + 1; /* turn floor into ceil */
+ break;
+ case TYPE_UINT32_T:
+ tmp_length =
+ (unsigned int) (sizeof (uint32_t) * CHAR_BIT
+ * 0.30103 /* binary -> decimal */
+ )
+ + 1; /* turn floor into ceil */
+ break;
+ case TYPE_INT64_T:
+ tmp_length =
+ (unsigned int) (sizeof (int64_t) * CHAR_BIT
+ * 0.30103 /* binary -> decimal */
+ )
+ + 1; /* turn floor into ceil */
+ break;
+ case TYPE_UINT64_T:
+ tmp_length =
+ (unsigned int) (sizeof (uint64_t) * CHAR_BIT
+ * 0.30103 /* binary -> decimal */
+ )
+ + 1; /* turn floor into ceil */
+ break;
+ case TYPE_INT_FAST8_T:
+ tmp_length =
+ (unsigned int) (sizeof (int_fast8_t) * CHAR_BIT
+ * 0.30103 /* binary -> decimal */
+ )
+ + 1; /* turn floor into ceil */
+ break;
+ case TYPE_UINT_FAST8_T:
+ tmp_length =
+ (unsigned int) (sizeof (uint_fast8_t) * CHAR_BIT
+ * 0.30103 /* binary -> decimal */
+ )
+ + 1; /* turn floor into ceil */
+ break;
+ case TYPE_INT_FAST16_T:
+ tmp_length =
+ (unsigned int) (sizeof (int_fast16_t) * CHAR_BIT
+ * 0.30103 /* binary -> decimal */
+ )
+ + 1; /* turn floor into ceil */
+ break;
+ case TYPE_UINT_FAST16_T:
+ tmp_length =
+ (unsigned int) (sizeof (uint_fast16_t) * CHAR_BIT
+ * 0.30103 /* binary -> decimal */
+ )
+ + 1; /* turn floor into ceil */
+ break;
+ case TYPE_INT_FAST32_T:
+ tmp_length =
+ (unsigned int) (sizeof (int_fast32_t) * CHAR_BIT
+ * 0.30103 /* binary -> decimal */
+ )
+ + 1; /* turn floor into ceil */
+ break;
+ case TYPE_UINT_FAST32_T:
+ tmp_length =
+ (unsigned int) (sizeof (uint_fast32_t) * CHAR_BIT
+ * 0.30103 /* binary -> decimal */
+ )
+ + 1; /* turn floor into ceil */
+ break;
+ case TYPE_INT_FAST64_T:
+ tmp_length =
+ (unsigned int) (sizeof (int_fast64_t) * CHAR_BIT
+ * 0.30103 /* binary -> decimal */
+ )
+ + 1; /* turn floor into ceil */
+ break;
+ case TYPE_UINT_FAST64_T:
+ tmp_length =
+ (unsigned int) (sizeof (uint_fast64_t) * CHAR_BIT
+ * 0.30103 /* binary -> decimal */
+ )
+ + 1; /* turn floor into ceil */
+ break;
+ }
if (tmp_length < precision)
tmp_length = precision;
/* Multiply by 2, as an estimate for FLAG_GROUP. */
@@ -1653,25 +1807,156 @@ MAX_ROOM_NEEDED (const arguments *ap, size_t arg_index, FCHAR_T conversion,
tmp_length = xsum (tmp_length, 1);
break;
+ case 'b':
+ #if SUPPORT_GNU_PRINTF_DIRECTIVES \
+ || (__GLIBC__ + (__GLIBC_MINOR__ >= 35) > 2)
+ case 'B':
+ #endif
+ switch (type)
+ {
+ default:
+ tmp_length =
+ (unsigned int) (sizeof (unsigned int) * CHAR_BIT)
+ + 1; /* turn floor into ceil */
+ break;
+ case TYPE_ULONGINT:
+ tmp_length =
+ (unsigned int) (sizeof (unsigned long int) * CHAR_BIT)
+ + 1; /* turn floor into ceil */
+ break;
+ case TYPE_ULONGLONGINT:
+ tmp_length =
+ (unsigned int) (sizeof (unsigned long long int) * CHAR_BIT)
+ + 1; /* turn floor into ceil */
+ break;
+ case TYPE_UINT8_T:
+ tmp_length =
+ (unsigned int) (sizeof (uint8_t) * CHAR_BIT)
+ + 1; /* turn floor into ceil */
+ break;
+ case TYPE_UINT16_T:
+ tmp_length =
+ (unsigned int) (sizeof (uint16_t) * CHAR_BIT)
+ + 1; /* turn floor into ceil */
+ break;
+ case TYPE_UINT32_T:
+ tmp_length =
+ (unsigned int) (sizeof (uint32_t) * CHAR_BIT)
+ + 1; /* turn floor into ceil */
+ break;
+ case TYPE_UINT64_T:
+ tmp_length =
+ (unsigned int) (sizeof (uint64_t) * CHAR_BIT)
+ + 1; /* turn floor into ceil */
+ break;
+ case TYPE_UINT_FAST8_T:
+ tmp_length =
+ (unsigned int) (sizeof (uint_fast8_t) * CHAR_BIT)
+ + 1; /* turn floor into ceil */
+ break;
+ case TYPE_UINT_FAST16_T:
+ tmp_length =
+ (unsigned int) (sizeof (uint_fast16_t) * CHAR_BIT)
+ + 1; /* turn floor into ceil */
+ break;
+ case TYPE_UINT_FAST32_T:
+ tmp_length =
+ (unsigned int) (sizeof (uint_fast32_t) * CHAR_BIT)
+ + 1; /* turn floor into ceil */
+ break;
+ case TYPE_UINT_FAST64_T:
+ tmp_length =
+ (unsigned int) (sizeof (uint_fast64_t) * CHAR_BIT)
+ + 1; /* turn floor into ceil */
+ break;
+ }
+ if (tmp_length < precision)
+ tmp_length = precision;
+ /* Add 2, to account for a prefix from the alternate form. */
+ tmp_length = xsum (tmp_length, 2);
+ break;
+
case 'o':
- if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT)
- tmp_length =
- (unsigned int) (sizeof (unsigned long long) * CHAR_BIT
- * 0.333334 /* binary -> octal */
- )
- + 1; /* turn floor into ceil */
- else if (type == TYPE_LONGINT || type == TYPE_ULONGINT)
- tmp_length =
- (unsigned int) (sizeof (unsigned long) * CHAR_BIT
- * 0.333334 /* binary -> octal */
- )
- + 1; /* turn floor into ceil */
- else
- tmp_length =
- (unsigned int) (sizeof (unsigned int) * CHAR_BIT
- * 0.333334 /* binary -> octal */
- )
- + 1; /* turn floor into ceil */
+ switch (type)
+ {
+ default:
+ tmp_length =
+ (unsigned int) (sizeof (unsigned int) * CHAR_BIT
+ * 0.333334 /* binary -> octal */
+ )
+ + 1; /* turn floor into ceil */
+ break;
+ case TYPE_ULONGINT:
+ tmp_length =
+ (unsigned int) (sizeof (unsigned long int) * CHAR_BIT
+ * 0.333334 /* binary -> octal */
+ )
+ + 1; /* turn floor into ceil */
+ break;
+ case TYPE_ULONGLONGINT:
+ tmp_length =
+ (unsigned int) (sizeof (unsigned long long int) * CHAR_BIT
+ * 0.333334 /* binary -> octal */
+ )
+ + 1; /* turn floor into ceil */
+ break;
+ case TYPE_UINT8_T:
+ tmp_length =
+ (unsigned int) (sizeof (uint8_t) * CHAR_BIT
+ * 0.333334 /* binary -> octal */
+ )
+ + 1; /* turn floor into ceil */
+ break;
+ case TYPE_UINT16_T:
+ tmp_length =
+ (unsigned int) (sizeof (uint16_t) * CHAR_BIT
+ * 0.333334 /* binary -> octal */
+ )
+ + 1; /* turn floor into ceil */
+ break;
+ case TYPE_UINT32_T:
+ tmp_length =
+ (unsigned int) (sizeof (uint32_t) * CHAR_BIT
+ * 0.333334 /* binary -> octal */
+ )
+ + 1; /* turn floor into ceil */
+ break;
+ case TYPE_UINT64_T:
+ tmp_length =
+ (unsigned int) (sizeof (uint64_t) * CHAR_BIT
+ * 0.333334 /* binary -> octal */
+ )
+ + 1; /* turn floor into ceil */
+ break;
+ case TYPE_UINT_FAST8_T:
+ tmp_length =
+ (unsigned int) (sizeof (uint_fast8_t) * CHAR_BIT
+ * 0.333334 /* binary -> octal */
+ )
+ + 1; /* turn floor into ceil */
+ break;
+ case TYPE_UINT_FAST16_T:
+ tmp_length =
+ (unsigned int) (sizeof (uint_fast16_t) * CHAR_BIT
+ * 0.333334 /* binary -> octal */
+ )
+ + 1; /* turn floor into ceil */
+ break;
+ case TYPE_UINT_FAST32_T:
+ tmp_length =
+ (unsigned int) (sizeof (uint_fast32_t) * CHAR_BIT
+ * 0.333334 /* binary -> octal */
+ )
+ + 1; /* turn floor into ceil */
+ break;
+ case TYPE_UINT_FAST64_T:
+ tmp_length =
+ (unsigned int) (sizeof (uint_fast64_t) * CHAR_BIT
+ * 0.333334 /* binary -> octal */
+ )
+ + 1; /* turn floor into ceil */
+ break;
+ }
if (tmp_length < precision)
tmp_length = precision;
/* Add 1, to account for a leading sign. */
@@ -1679,27 +1964,89 @@ MAX_ROOM_NEEDED (const arguments *ap, size_t arg_index, FCHAR_T conversion,
break;
case 'x': case 'X':
- if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT)
- tmp_length =
- (unsigned int) (sizeof (unsigned long long) * CHAR_BIT
- * 0.25 /* binary -> hexadecimal */
- )
- + 1; /* turn floor into ceil */
- else if (type == TYPE_LONGINT || type == TYPE_ULONGINT)
- tmp_length =
- (unsigned int) (sizeof (unsigned long) * CHAR_BIT
- * 0.25 /* binary -> hexadecimal */
- )
- + 1; /* turn floor into ceil */
- else
- tmp_length =
- (unsigned int) (sizeof (unsigned int) * CHAR_BIT
- * 0.25 /* binary -> hexadecimal */
- )
- + 1; /* turn floor into ceil */
+ switch (type)
+ {
+ default:
+ tmp_length =
+ (unsigned int) (sizeof (unsigned int) * CHAR_BIT
+ * 0.25 /* binary -> hexadecimal */
+ )
+ + 1; /* turn floor into ceil */
+ break;
+ case TYPE_ULONGINT:
+ tmp_length =
+ (unsigned int) (sizeof (unsigned long int) * CHAR_BIT
+ * 0.25 /* binary -> hexadecimal */
+ )
+ + 1; /* turn floor into ceil */
+ break;
+ case TYPE_ULONGLONGINT:
+ tmp_length =
+ (unsigned int) (sizeof (unsigned long long int) * CHAR_BIT
+ * 0.25 /* binary -> hexadecimal */
+ )
+ + 1; /* turn floor into ceil */
+ break;
+ case TYPE_UINT8_T:
+ tmp_length =
+ (unsigned int) (sizeof (uint8_t) * CHAR_BIT
+ * 0.25 /* binary -> hexadecimal */
+ )
+ + 1; /* turn floor into ceil */
+ break;
+ case TYPE_UINT16_T:
+ tmp_length =
+ (unsigned int) (sizeof (uint16_t) * CHAR_BIT
+ * 0.25 /* binary -> hexadecimal */
+ )
+ + 1; /* turn floor into ceil */
+ break;
+ case TYPE_UINT32_T:
+ tmp_length =
+ (unsigned int) (sizeof (uint32_t) * CHAR_BIT
+ * 0.25 /* binary -> hexadecimal */
+ )
+ + 1; /* turn floor into ceil */
+ break;
+ case TYPE_UINT64_T:
+ tmp_length =
+ (unsigned int) (sizeof (uint64_t) * CHAR_BIT
+ * 0.25 /* binary -> hexadecimal */
+ )
+ + 1; /* turn floor into ceil */
+ break;
+ case TYPE_UINT_FAST8_T:
+ tmp_length =
+ (unsigned int) (sizeof (uint_fast8_t) * CHAR_BIT
+ * 0.25 /* binary -> hexadecimal */
+ )
+ + 1; /* turn floor into ceil */
+ break;
+ case TYPE_UINT_FAST16_T:
+ tmp_length =
+ (unsigned int) (sizeof (uint_fast16_t) * CHAR_BIT
+ * 0.25 /* binary -> hexadecimal */
+ )
+ + 1; /* turn floor into ceil */
+ break;
+ case TYPE_UINT_FAST32_T:
+ tmp_length =
+ (unsigned int) (sizeof (uint_fast32_t) * CHAR_BIT
+ * 0.25 /* binary -> hexadecimal */
+ )
+ + 1; /* turn floor into ceil */
+ break;
+ case TYPE_UINT_FAST64_T:
+ tmp_length =
+ (unsigned int) (sizeof (uint_fast64_t) * CHAR_BIT
+ * 0.25 /* binary -> hexadecimal */
+ )
+ + 1; /* turn floor into ceil */
+ break;
+ }
if (tmp_length < precision)
tmp_length = precision;
- /* Add 2, to account for a leading sign or alternate form. */
+ /* Add 2, to account for a prefix from the alternate form. */
tmp_length = xsum (tmp_length, 2);
break;
@@ -2005,6 +2352,30 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
case TYPE_COUNT_LONGLONGINT_POINTER:
*a.arg[dp->arg_index].a.a_count_longlongint_pointer = length;
break;
+ case TYPE_COUNT_INT8_T_POINTER:
+ *a.arg[dp->arg_index].a.a_count_int8_t_pointer = length;
+ break;
+ case TYPE_COUNT_INT16_T_POINTER:
+ *a.arg[dp->arg_index].a.a_count_int16_t_pointer = length;
+ break;
+ case TYPE_COUNT_INT32_T_POINTER:
+ *a.arg[dp->arg_index].a.a_count_int32_t_pointer = length;
+ break;
+ case TYPE_COUNT_INT64_T_POINTER:
+ *a.arg[dp->arg_index].a.a_count_int64_t_pointer = length;
+ break;
+ case TYPE_COUNT_INT_FAST8_T_POINTER:
+ *a.arg[dp->arg_index].a.a_count_int_fast8_t_pointer = length;
+ break;
+ case TYPE_COUNT_INT_FAST16_T_POINTER:
+ *a.arg[dp->arg_index].a.a_count_int_fast16_t_pointer = length;
+ break;
+ case TYPE_COUNT_INT_FAST32_T_POINTER:
+ *a.arg[dp->arg_index].a.a_count_int_fast32_t_pointer = length;
+ break;
+ case TYPE_COUNT_INT_FAST64_T_POINTER:
+ *a.arg[dp->arg_index].a.a_count_int_fast64_t_pointer = length;
+ break;
default:
abort ();
}
@@ -2130,7 +2501,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
characters = 0;
}
- if (characters < width && !(dp->flags & FLAG_LEFT))
+ if (characters < width && !(flags & FLAG_LEFT))
{
size_t n = width - characters;
ENSURE_ALLOCATION (xsum (length, n));
@@ -2175,7 +2546,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
}
# endif
- if (characters < width && (dp->flags & FLAG_LEFT))
+ if (characters < width && (flags & FLAG_LEFT))
{
size_t n = width - characters;
ENSURE_ALLOCATION (xsum (length, n));
@@ -2232,7 +2603,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
characters = 0;
}
- if (characters < width && !(dp->flags & FLAG_LEFT))
+ if (characters < width && !(flags & FLAG_LEFT))
{
size_t n = width - characters;
ENSURE_ALLOCATION (xsum (length, n));
@@ -2277,7 +2648,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
}
# endif
- if (characters < width && (dp->flags & FLAG_LEFT))
+ if (characters < width && (flags & FLAG_LEFT))
{
size_t n = width - characters;
ENSURE_ALLOCATION (xsum (length, n));
@@ -2334,7 +2705,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
characters = 0;
}
- if (characters < width && !(dp->flags & FLAG_LEFT))
+ if (characters < width && !(flags & FLAG_LEFT))
{
size_t n = width - characters;
ENSURE_ALLOCATION (xsum (length, n));
@@ -2379,7 +2750,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
}
# endif
- if (characters < width && (dp->flags & FLAG_LEFT))
+ if (characters < width && (flags & FLAG_LEFT))
{
size_t n = width - characters;
ENSURE_ALLOCATION (xsum (length, n));
@@ -2394,7 +2765,150 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
}
}
#endif
-#if (!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || (NEED_PRINTF_DIRECTIVE_LS && !defined IN_LIBINTL) || ENABLE_WCHAR_FALLBACK) && HAVE_WCHAR_T
+#if WIDE_CHAR_VERSION && (!DCHAR_IS_TCHAR || NEED_WPRINTF_DIRECTIVE_LC)
+ else if ((dp->conversion == 's'
+ && a.arg[dp->arg_index].type == TYPE_WIDE_STRING)
+ || (dp->conversion == 'c'
+ && a.arg[dp->arg_index].type == TYPE_WIDE_CHAR))
+ {
+ /* %ls or %lc in vasnwprintf. See the specification of
+ fwprintf. */
+ /* It would be silly to use snprintf ("%ls", ...) and then
+ convert back the result from a char[] to a wchar_t[].
+ Instead, just copy the argument wchar_t[] to the result. */
+ int flags = dp->flags;
+ size_t width;
+
+ width = 0;
+ if (dp->width_start != dp->width_end)
+ {
+ if (dp->width_arg_index != ARG_NONE)
+ {
+ int arg;
+
+ if (!(a.arg[dp->width_arg_index].type == TYPE_INT))
+ abort ();
+ arg = a.arg[dp->width_arg_index].a.a_int;
+ width = arg;
+ if (arg < 0)
+ {
+ /* "A negative field width is taken as a '-' flag
+ followed by a positive field width." */
+ flags |= FLAG_LEFT;
+ width = -width;
+ }
+ }
+ else
+ {
+ const FCHAR_T *digitp = dp->width_start;
+
+ do
+ width = xsum (xtimes (width, 10), *digitp++ - '0');
+ while (digitp != dp->width_end);
+ }
+ }
+
+ {
+ const wchar_t *ls_arg;
+ wchar_t lc_arg[1];
+ size_t characters;
+
+ if (dp->conversion == 's')
+ {
+ int has_precision;
+ size_t precision;
+
+ has_precision = 0;
+ precision = 6;
+ if (dp->precision_start != dp->precision_end)
+ {
+ if (dp->precision_arg_index != ARG_NONE)
+ {
+ int arg;
+
+ if (!(a.arg[dp->precision_arg_index].type == TYPE_INT))
+ abort ();
+ arg = a.arg[dp->precision_arg_index].a.a_int;
+ /* "A negative precision is taken as if the precision
+ were omitted." */
+ if (arg >= 0)
+ {
+ precision = arg;
+ has_precision = 1;
+ }
+ }
+ else
+ {
+ const FCHAR_T *digitp = dp->precision_start + 1;
+
+ precision = 0;
+ while (digitp != dp->precision_end)
+ precision = xsum (xtimes (precision, 10), *digitp++ - '0');
+ has_precision = 1;
+ }
+ }
+
+ ls_arg = a.arg[dp->arg_index].a.a_wide_string;
+
+ if (has_precision)
+ {
+ /* Use only at most PRECISION wide characters, from
+ the left. */
+ const wchar_t *ls_arg_end;
+
+ ls_arg_end = ls_arg;
+ characters = 0;
+ for (; precision > 0; precision--)
+ {
+ if (*ls_arg_end == 0)
+ /* Found the terminating null wide character. */
+ break;
+ ls_arg_end++;
+ characters++;
+ }
+ }
+ else
+ {
+ /* Use the entire string, and count the number of wide
+ characters. */
+ characters = local_wcslen (ls_arg);
+ }
+ }
+ else /* dp->conversion == 'c' */
+ {
+ lc_arg[0] = (wchar_t) a.arg[dp->arg_index].a.a_wide_char;
+ ls_arg = lc_arg;
+ characters = 1;
+ }
+
+ {
+ size_t total = (characters < width ? width : characters);
+ ENSURE_ALLOCATION (xsum (length, total));
+
+ if (characters < width && !(flags & FLAG_LEFT))
+ {
+ size_t n = width - characters;
+ DCHAR_SET (result + length, ' ', n);
+ length += n;
+ }
+
+ if (characters > 0)
+ {
+ DCHAR_CPY (result + length, ls_arg, characters);
+ length += characters;
+ }
+
+ if (characters < width && (flags & FLAG_LEFT))
+ {
+ size_t n = width - characters;
+ DCHAR_SET (result + length, ' ', n);
+ length += n;
+ }
+ }
+ }
+ }
+#endif
+#if (!USE_SNPRINTF || WIDE_CHAR_VERSION || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || NEED_PRINTF_DIRECTIVE_LS || ENABLE_WCHAR_FALLBACK) && HAVE_WCHAR_T
else if (dp->conversion == 's'
# if WIDE_CHAR_VERSION
&& a.arg[dp->arg_index].type != TYPE_WIDE_STRING
@@ -2551,7 +3065,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
characters = 0;
}
- if (characters < width && !(dp->flags & FLAG_LEFT))
+ if (characters < width && !(flags & FLAG_LEFT))
{
size_t n = width - characters;
ENSURE_ALLOCATION (xsum (length, n));
@@ -2602,17 +3116,19 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
# else
count = mbtowc (&wc, arg, arg_end - arg);
# endif
- if (count <= 0)
- /* mbrtowc not consistent with mbrlen, or mbtowc
- not consistent with mblen. */
+ if (count == 0)
+ /* mbrtowc not consistent with strlen. */
abort ();
+ if (count < 0)
+ /* Invalid or incomplete multibyte character. */
+ goto fail_with_EILSEQ;
ENSURE_ALLOCATION (xsum (length, 1));
result[length++] = wc;
arg += count;
}
}
- if (characters < width && (dp->flags & FLAG_LEFT))
+ if (characters < width && (flags & FLAG_LEFT))
{
size_t n = width - characters;
ENSURE_ALLOCATION (xsum (length, n));
@@ -2628,7 +3144,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
size_t characters;
# if !DCHAR_IS_TCHAR
/* This code assumes that TCHAR_T is 'char'. */
- verify (sizeof (TCHAR_T) == 1);
+ static_assert (sizeof (TCHAR_T) == 1);
TCHAR_T *tmpsrc;
DCHAR_T *tmpdst;
size_t tmpdst_len;
@@ -2768,7 +3284,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
/* w doesn't matter. */
w = 0;
- if (w < width && !(dp->flags & FLAG_LEFT))
+ if (w < width && !(flags & FLAG_LEFT))
{
size_t n = width - w;
ENSURE_ALLOCATION (xsum (length, n));
@@ -2836,7 +3352,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
length += tmpdst_len;
# endif
- if (w < width && (dp->flags & FLAG_LEFT))
+ if (w < width && (flags & FLAG_LEFT))
{
size_t n = width - w;
ENSURE_ALLOCATION (xsum (length, n));
@@ -2847,12 +3363,13 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
# endif
}
#endif
-#if ENABLE_WCHAR_FALLBACK && HAVE_WINT_T && !WIDE_CHAR_VERSION
+#if (NEED_PRINTF_DIRECTIVE_LC || ENABLE_WCHAR_FALLBACK) && HAVE_WINT_T && !WIDE_CHAR_VERSION
else if (dp->conversion == 'c'
&& a.arg[dp->arg_index].type == TYPE_WIDE_CHAR)
{
/* Implement the 'lc' directive ourselves, in order to provide
- the fallback that avoids EILSEQ. */
+ a correct behaviour for the null wint_t argument and/or the
+ fallback that avoids EILSEQ. */
int flags = dp->flags;
int has_width;
size_t width;
@@ -2894,7 +3411,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
size_t characters;
# if !DCHAR_IS_TCHAR
/* This code assumes that TCHAR_T is 'char'. */
- verify (sizeof (TCHAR_T) == 1);
+ static_assert (sizeof (TCHAR_T) == 1);
TCHAR_T tmpsrc[64]; /* Assume MB_CUR_MAX <= 64. */
DCHAR_T *tmpdst;
size_t tmpdst_len;
@@ -2918,8 +3435,8 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
count = local_wcrtomb (cbuf, arg, &state);
if (count < 0)
- /* Inconsistency. */
- abort ();
+ /* Cannot convert. */
+ goto fail_with_EILSEQ;
characters = count;
}
}
@@ -2977,7 +3494,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
/* w doesn't matter. */
w = 0;
- if (w < width && !(dp->flags & FLAG_LEFT))
+ if (w < width && !(flags & FLAG_LEFT))
{
size_t n = width - w;
ENSURE_ALLOCATION (xsum (length, n));
@@ -3017,9 +3534,9 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
# endif
count = local_wcrtomb (cbuf, arg, &state);
- if (count <= 0)
- /* Inconsistency. */
- abort ();
+ if (count < 0)
+ /* Cannot convert. */
+ goto fail_with_EILSEQ;
ENSURE_ALLOCATION (xsum (length, count));
memcpy (result + length, cbuf, count);
length += count;
@@ -3033,7 +3550,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
length += tmpdst_len;
# endif
- if (w < width && (dp->flags & FLAG_LEFT))
+ if (w < width && (flags & FLAG_LEFT))
{
size_t n = width - w;
ENSURE_ALLOCATION (xsum (length, n));
@@ -3043,14 +3560,399 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
}
}
#endif
-#if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_DOUBLE) && !defined IN_LIBINTL
+#if NEED_WPRINTF_DIRECTIVE_C && WIDE_CHAR_VERSION
+ else if (dp->conversion == 'c'
+ && a.arg[dp->arg_index].type != TYPE_WIDE_CHAR)
+ {
+ /* Implement the 'c' directive ourselves, in order to avoid
+ EILSEQ in the "C" locale. */
+ int flags = dp->flags;
+ size_t width;
+
+ width = 0;
+ if (dp->width_start != dp->width_end)
+ {
+ if (dp->width_arg_index != ARG_NONE)
+ {
+ int arg;
+
+ if (!(a.arg[dp->width_arg_index].type == TYPE_INT))
+ abort ();
+ arg = a.arg[dp->width_arg_index].a.a_int;
+ width = arg;
+ if (arg < 0)
+ {
+ /* "A negative field width is taken as a '-' flag
+ followed by a positive field width." */
+ flags |= FLAG_LEFT;
+ width = -width;
+ }
+ }
+ else
+ {
+ const FCHAR_T *digitp = dp->width_start;
+
+ do
+ width = xsum (xtimes (width, 10), *digitp++ - '0');
+ while (digitp != dp->width_end);
+ }
+ }
+
+ /* %c in vasnwprintf. See the specification of fwprintf. */
+ {
+ char arg = (char) a.arg[dp->arg_index].a.a_char;
+ mbstate_t state;
+ wchar_t wc;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ int count = mbrtowc (&wc, &arg, 1, &state);
+ if (count < 0)
+ /* Invalid or incomplete multibyte character. */
+ goto fail_with_EILSEQ;
+
+ if (1 < width && !(flags & FLAG_LEFT))
+ {
+ size_t n = width - 1;
+ ENSURE_ALLOCATION (xsum (length, n));
+ DCHAR_SET (result + length, ' ', n);
+ length += n;
+ }
+
+ ENSURE_ALLOCATION (xsum (length, 1));
+ result[length++] = wc;
+
+ if (1 < width && (flags & FLAG_LEFT))
+ {
+ size_t n = width - 1;
+ ENSURE_ALLOCATION (xsum (length, n));
+ DCHAR_SET (result + length, ' ', n);
+ length += n;
+ }
+ }
+ }
+#endif
+#if NEED_PRINTF_DIRECTIVE_B || NEED_PRINTF_DIRECTIVE_UPPERCASE_B
+ else if (0
+# if NEED_PRINTF_DIRECTIVE_B
+ || (dp->conversion == 'b')
+# endif
+# if NEED_PRINTF_DIRECTIVE_UPPERCASE_B
+ || (dp->conversion == 'B')
+# endif
+ )
+ {
+ arg_type type = a.arg[dp->arg_index].type;
+ int flags = dp->flags;
+ int has_width;
+ size_t width;
+ int has_precision;
+ size_t precision;
+ size_t tmp_length;
+ size_t count;
+ DCHAR_T tmpbuf[700];
+ DCHAR_T *tmp;
+ DCHAR_T *tmp_end;
+ DCHAR_T *tmp_start;
+ DCHAR_T *pad_ptr;
+ DCHAR_T *p;
+
+ has_width = 0;
+ width = 0;
+ if (dp->width_start != dp->width_end)
+ {
+ if (dp->width_arg_index != ARG_NONE)
+ {
+ int arg;
+
+ if (!(a.arg[dp->width_arg_index].type == TYPE_INT))
+ abort ();
+ arg = a.arg[dp->width_arg_index].a.a_int;
+ width = arg;
+ if (arg < 0)
+ {
+ /* "A negative field width is taken as a '-' flag
+ followed by a positive field width." */
+ flags |= FLAG_LEFT;
+ width = -width;
+ }
+ }
+ else
+ {
+ const FCHAR_T *digitp = dp->width_start;
+
+ do
+ width = xsum (xtimes (width, 10), *digitp++ - '0');
+ while (digitp != dp->width_end);
+ }
+ has_width = 1;
+ }
+
+ has_precision = 0;
+ precision = 1;
+ if (dp->precision_start != dp->precision_end)
+ {
+ if (dp->precision_arg_index != ARG_NONE)
+ {
+ int arg;
+
+ if (!(a.arg[dp->precision_arg_index].type == TYPE_INT))
+ abort ();
+ arg = a.arg[dp->precision_arg_index].a.a_int;
+ /* "A negative precision is taken as if the precision
+ were omitted." */
+ if (arg >= 0)
+ {
+ precision = arg;
+ has_precision = 1;
+ }
+ }
+ else
+ {
+ const FCHAR_T *digitp = dp->precision_start + 1;
+
+ precision = 0;
+ while (digitp != dp->precision_end)
+ precision = xsum (xtimes (precision, 10), *digitp++ - '0');
+ has_precision = 1;
+ }
+ }
+
+ /* Allocate a temporary buffer of sufficient size. */
+ switch (type)
+ {
+ default:
+ tmp_length =
+ (unsigned int) (sizeof (unsigned int) * CHAR_BIT)
+ + 1; /* turn floor into ceil */
+ break;
+ case TYPE_ULONGINT:
+ tmp_length =
+ (unsigned int) (sizeof (unsigned long int) * CHAR_BIT)
+ + 1; /* turn floor into ceil */
+ break;
+ case TYPE_ULONGLONGINT:
+ tmp_length =
+ (unsigned int) (sizeof (unsigned long long int) * CHAR_BIT)
+ + 1; /* turn floor into ceil */
+ break;
+ case TYPE_UINT8_T:
+ tmp_length =
+ (unsigned int) (sizeof (uint8_t) * CHAR_BIT)
+ + 1; /* turn floor into ceil */
+ break;
+ case TYPE_UINT16_T:
+ tmp_length =
+ (unsigned int) (sizeof (uint16_t) * CHAR_BIT)
+ + 1; /* turn floor into ceil */
+ break;
+ case TYPE_UINT32_T:
+ tmp_length =
+ (unsigned int) (sizeof (uint32_t) * CHAR_BIT)
+ + 1; /* turn floor into ceil */
+ break;
+ case TYPE_UINT64_T:
+ tmp_length =
+ (unsigned int) (sizeof (uint64_t) * CHAR_BIT)
+ + 1; /* turn floor into ceil */
+ break;
+ case TYPE_UINT_FAST8_T:
+ tmp_length =
+ (unsigned int) (sizeof (uint_fast8_t) * CHAR_BIT)
+ + 1; /* turn floor into ceil */
+ break;
+ case TYPE_UINT_FAST16_T:
+ tmp_length =
+ (unsigned int) (sizeof (uint_fast16_t) * CHAR_BIT)
+ + 1; /* turn floor into ceil */
+ break;
+ case TYPE_UINT_FAST32_T:
+ tmp_length =
+ (unsigned int) (sizeof (uint_fast32_t) * CHAR_BIT)
+ + 1; /* turn floor into ceil */
+ break;
+ case TYPE_UINT_FAST64_T:
+ tmp_length =
+ (unsigned int) (sizeof (uint_fast64_t) * CHAR_BIT)
+ + 1; /* turn floor into ceil */
+ break;
+ }
+ if (tmp_length < precision)
+ tmp_length = precision;
+ /* Add 2, to account for a prefix from the alternate form. */
+ tmp_length = xsum (tmp_length, 2);
+
+ if (tmp_length < width)
+ tmp_length = width;
+
+ if (tmp_length <= sizeof (tmpbuf) / sizeof (DCHAR_T))
+ tmp = tmpbuf;
+ else
+ {
+ size_t tmp_memsize = xtimes (tmp_length, sizeof (DCHAR_T));
+
+ if (size_overflow_p (tmp_memsize))
+ /* Overflow, would lead to out of memory. */
+ goto out_of_memory;
+ tmp = (DCHAR_T *) malloc (tmp_memsize);
+ if (tmp == NULL)
+ /* Out of memory. */
+ goto out_of_memory;
+ }
+
+ tmp_end = tmp + tmp_length;
+
+ unsigned long long arg;
+ switch (type)
+ {
+ case TYPE_UCHAR:
+ arg = a.arg[dp->arg_index].a.a_uchar;
+ break;
+ case TYPE_USHORT:
+ arg = a.arg[dp->arg_index].a.a_ushort;
+ break;
+ case TYPE_UINT:
+ arg = a.arg[dp->arg_index].a.a_uint;
+ break;
+ case TYPE_ULONGINT:
+ arg = a.arg[dp->arg_index].a.a_ulongint;
+ break;
+ case TYPE_ULONGLONGINT:
+ arg = a.arg[dp->arg_index].a.a_ulonglongint;
+ break;
+ case TYPE_UINT8_T:
+ arg = a.arg[dp->arg_index].a.a_uint8_t;
+ break;
+ case TYPE_UINT16_T:
+ arg = a.arg[dp->arg_index].a.a_uint16_t;
+ break;
+ case TYPE_UINT32_T:
+ arg = a.arg[dp->arg_index].a.a_uint32_t;
+ break;
+ case TYPE_UINT64_T:
+ arg = a.arg[dp->arg_index].a.a_uint64_t;
+ break;
+ case TYPE_UINT_FAST8_T:
+ arg = a.arg[dp->arg_index].a.a_uint_fast8_t;
+ break;
+ case TYPE_UINT_FAST16_T:
+ arg = a.arg[dp->arg_index].a.a_uint_fast16_t;
+ break;
+ case TYPE_UINT_FAST32_T:
+ arg = a.arg[dp->arg_index].a.a_uint_fast32_t;
+ break;
+ case TYPE_UINT_FAST64_T:
+ arg = a.arg[dp->arg_index].a.a_uint_fast64_t;
+ break;
+ default:
+ abort ();
+ }
+ int need_prefix = ((flags & FLAG_ALT) && arg != 0);
+
+ p = tmp_end;
+ /* "The result of converting a zero value with a precision
+ of zero is no characters." */
+ if (!(has_precision && precision == 0 && arg == 0))
+ {
+ do
+ {
+ *--p = '0' + (arg & 1);
+ arg = arg >> 1;
+ }
+ while (arg != 0);
+ }
+
+ if (has_precision)
+ {
+ DCHAR_T *digits_start = tmp_end - precision;
+ while (p > digits_start)
+ *--p = '0';
+ }
+
+ pad_ptr = p;
+
+ if (need_prefix)
+ {
+# if NEED_PRINTF_DIRECTIVE_B && !NEED_PRINTF_DIRECTIVE_UPPERCASE_B
+ *--p = 'b';
+# elif NEED_PRINTF_DIRECTIVE_UPPERCASE_B && !NEED_PRINTF_DIRECTIVE_B
+ *--p = 'B';
+# else
+ *--p = dp->conversion;
+# endif
+ *--p = '0';
+ }
+ tmp_start = p;
+
+ /* The generated string now extends from tmp_start to tmp_end,
+ with the zero padding insertion point being at pad_ptr,
+ tmp_start <= pad_ptr <= tmp_end. */
+ count = tmp_end - tmp_start;
+
+ if (count < width)
+ {
+ size_t pad = width - count;
+
+ if (flags & FLAG_LEFT)
+ {
+ /* Pad with spaces on the right. */
+ for (p = tmp_start; p < tmp_end; p++)
+ *(p - pad) = *p;
+ for (p = tmp_end - pad; p < tmp_end; p++)
+ *p = ' ';
+ }
+ else if ((flags & FLAG_ZERO)
+ /* Neither ISO C nor POSIX specify that the '0'
+ flag is ignored when a width and a precision
+ are both present. But most implementations
+ do so. */
+ && !(has_width && has_precision))
+ {
+ /* Pad with zeroes. */
+ for (p = tmp_start; p < pad_ptr; p++)
+ *(p - pad) = *p;
+ for (p = pad_ptr - pad; p < pad_ptr; p++)
+ *p = '0';
+ }
+ else
+ {
+ /* Pad with spaces on the left. */
+ for (p = tmp_start - pad; p < tmp_start; p++)
+ *p = ' ';
+ }
+
+ tmp_start = tmp_start - pad;
+ }
+
+ count = tmp_end - tmp_start;
+
+ if (count > tmp_length)
+ /* tmp_length was incorrectly calculated - fix the
+ code above! */
+ abort ();
+
+ /* Make room for the result. */
+ if (count >= allocated - length)
+ {
+ size_t n = xsum (length, count);
+
+ ENSURE_ALLOCATION (n);
+ }
+
+ /* Append the result. */
+ memcpy (result + length, tmp_start, count * sizeof (DCHAR_T));
+ if (tmp != tmpbuf)
+ free (tmp);
+ length += count;
+ }
+#endif
+#if NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_DOUBLE || (NEED_WPRINTF_DIRECTIVE_LA && WIDE_CHAR_VERSION)
else if ((dp->conversion == 'a' || dp->conversion == 'A')
# if !(NEED_PRINTF_DIRECTIVE_A || (NEED_PRINTF_LONG_DOUBLE && NEED_PRINTF_DOUBLE))
&& (0
# if NEED_PRINTF_DOUBLE
|| a.arg[dp->arg_index].type == TYPE_DOUBLE
# endif
-# if NEED_PRINTF_LONG_DOUBLE
+# if NEED_PRINTF_LONG_DOUBLE || (NEED_WPRINTF_DIRECTIVE_LA && WIDE_CHAR_VERSION)
|| a.arg[dp->arg_index].type == TYPE_LONGDOUBLE
# endif
)
@@ -3170,7 +4072,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
p = tmp;
if (type == TYPE_LONGDOUBLE)
{
-# if NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE
+# if NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE || (NEED_WPRINTF_DIRECTIVE_LA && WIDE_CHAR_VERSION)
long double arg = a.arg[dp->arg_index].a.a_longdouble;
if (isnanl (arg))
@@ -3290,7 +4192,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
}
}
*p++ = dp->conversion - 'A' + 'P';
-# if WIDE_CHAR_VERSION
+# if WIDE_CHAR_VERSION && DCHAR_IS_TCHAR
{
static const wchar_t decimal_format[] =
{ '%', '+', 'd', '\0' };
@@ -3441,7 +4343,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
}
}
*p++ = dp->conversion - 'A' + 'P';
-# if WIDE_CHAR_VERSION
+# if WIDE_CHAR_VERSION && DCHAR_IS_TCHAR
{
static const wchar_t decimal_format[] =
{ '%', '+', 'd', '\0' };
@@ -3533,7 +4435,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
length += count;
}
#endif
-#if (NEED_PRINTF_INFINITE_DOUBLE || NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE || NEED_PRINTF_LONG_DOUBLE) && !defined IN_LIBINTL
+#if NEED_PRINTF_INFINITE_DOUBLE || NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE || NEED_PRINTF_LONG_DOUBLE
else if ((dp->conversion == 'f' || dp->conversion == 'F'
|| dp->conversion == 'e' || dp->conversion == 'E'
|| dp->conversion == 'g' || dp->conversion == 'G'
@@ -3901,7 +4803,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
}
*p++ = dp->conversion; /* 'e' or 'E' */
-# if WIDE_CHAR_VERSION
+# if WIDE_CHAR_VERSION && DCHAR_IS_TCHAR
{
static const wchar_t decimal_format[] =
{ '%', '+', '.', '2', 'd', '\0' };
@@ -4082,7 +4984,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
}
}
*p++ = dp->conversion - 'G' + 'E'; /* 'e' or 'E' */
-# if WIDE_CHAR_VERSION
+# if WIDE_CHAR_VERSION && DCHAR_IS_TCHAR
{
static const wchar_t decimal_format[] =
{ '%', '+', '.', '2', 'd', '\0' };
@@ -4359,7 +5261,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
}
*p++ = dp->conversion; /* 'e' or 'E' */
-# if WIDE_CHAR_VERSION
+# if WIDE_CHAR_VERSION && DCHAR_IS_TCHAR
{
static const wchar_t decimal_format[] =
/* Produce the same number of exponent digits
@@ -4552,7 +5454,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
}
}
*p++ = dp->conversion - 'G' + 'E'; /* 'e' or 'E' */
-# if WIDE_CHAR_VERSION
+# if WIDE_CHAR_VERSION && DCHAR_IS_TCHAR
{
static const wchar_t decimal_format[] =
/* Produce the same number of exponent digits
@@ -4720,13 +5622,13 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
{
arg_type type = a.arg[dp->arg_index].type;
int flags = dp->flags;
-#if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
+#if (WIDE_CHAR_VERSION && MUSL_LIBC) || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
int has_width;
#endif
-#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
+#if !USE_SNPRINTF || WIDE_CHAR_VERSION || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
size_t width;
#endif
-#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || NEED_PRINTF_UNBOUNDED_PRECISION
+#if !USE_SNPRINTF || (WIDE_CHAR_VERSION && DCHAR_IS_TCHAR) || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || (WIDE_CHAR_VERSION && MUSL_LIBC) || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
int has_precision;
size_t precision;
#endif
@@ -4735,7 +5637,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
#else
# define prec_ourselves 0
#endif
-#if NEED_PRINTF_FLAG_LEFTADJUST
+#if (WIDE_CHAR_VERSION && MUSL_LIBC) || NEED_PRINTF_FLAG_LEFTADJUST
# define pad_ourselves 1
#elif !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
int pad_ourselves;
@@ -4752,10 +5654,10 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
TCHAR_T *tmp;
#endif
-#if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
+#if (WIDE_CHAR_VERSION && MUSL_LIBC) || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
has_width = 0;
#endif
-#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
+#if !USE_SNPRINTF || WIDE_CHAR_VERSION || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
width = 0;
if (dp->width_start != dp->width_end)
{
@@ -4783,13 +5685,13 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
width = xsum (xtimes (width, 10), *digitp++ - '0');
while (digitp != dp->width_end);
}
-#if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
+# if (WIDE_CHAR_VERSION && MUSL_LIBC) || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
has_width = 1;
-#endif
+# endif
}
#endif
-#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || NEED_PRINTF_UNBOUNDED_PRECISION
+#if !USE_SNPRINTF || (WIDE_CHAR_VERSION && DCHAR_IS_TCHAR) || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || (WIDE_CHAR_VERSION && MUSL_LIBC) || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
has_precision = 0;
precision = 6;
if (dp->precision_start != dp->precision_end)
@@ -4826,6 +5728,11 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
switch (dp->conversion)
{
case 'd': case 'i': case 'u':
+ case 'b':
+ #if SUPPORT_GNU_PRINTF_DIRECTIVES \
+ || (__GLIBC__ + (__GLIBC_MINOR__ >= 35) > 2)
+ case 'B':
+ #endif
case 'o':
case 'x': case 'X': case 'p':
prec_ourselves = has_precision && (precision > 0);
@@ -4837,7 +5744,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
#endif
/* Decide whether to perform the padding ourselves. */
-#if !NEED_PRINTF_FLAG_LEFTADJUST && (!DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION)
+#if !((WIDE_CHAR_VERSION && MUSL_LIBC) || NEED_PRINTF_FLAG_LEFTADJUST) && (!DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION)
switch (dp->conversion)
{
# if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO
@@ -4956,6 +5863,54 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
{
case TYPE_LONGLONGINT:
case TYPE_ULONGLONGINT:
+ #if INT8_WIDTH > LONG_WIDTH
+ case TYPE_INT8_T:
+ #endif
+ #if UINT8_WIDTH > LONG_WIDTH
+ case TYPE_UINT8_T:
+ #endif
+ #if INT16_WIDTH > LONG_WIDTH
+ case TYPE_INT16_T:
+ #endif
+ #if UINT16_WIDTH > LONG_WIDTH
+ case TYPE_UINT16_T:
+ #endif
+ #if INT32_WIDTH > LONG_WIDTH
+ case TYPE_INT32_T:
+ #endif
+ #if UINT32_WIDTH > LONG_WIDTH
+ case TYPE_UINT32_T:
+ #endif
+ #if INT64_WIDTH > LONG_WIDTH
+ case TYPE_INT64_T:
+ #endif
+ #if UINT64_WIDTH > LONG_WIDTH
+ case TYPE_UINT64_T:
+ #endif
+ #if INT_FAST8_WIDTH > LONG_WIDTH
+ case TYPE_INT_FAST8_T:
+ #endif
+ #if UINT_FAST8_WIDTH > LONG_WIDTH
+ case TYPE_UINT_FAST8_T:
+ #endif
+ #if INT_FAST16_WIDTH > LONG_WIDTH
+ case TYPE_INT_FAST16_T:
+ #endif
+ #if UINT_FAST16_WIDTH > LONG_WIDTH
+ case TYPE_UINT_FAST16_T:
+ #endif
+ #if INT_FAST32_WIDTH > LONG_WIDTH
+ case TYPE_INT3_FAST2_T:
+ #endif
+ #if UINT_FAST32_WIDTH > LONG_WIDTH
+ case TYPE_UINT_FAST32_T:
+ #endif
+ #if INT_FAST64_WIDTH > LONG_WIDTH
+ case TYPE_INT_FAST64_T:
+ #endif
+ #if UINT_FAST64_WIDTH > LONG_WIDTH
+ case TYPE_UINT_FAST64_T:
+ #endif
#if defined _WIN32 && ! defined __CYGWIN__
*fbp++ = 'I';
*fbp++ = '6';
@@ -4967,12 +5922,60 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
FALLTHROUGH;
case TYPE_LONGINT:
case TYPE_ULONGINT:
-#if HAVE_WINT_T
+ #if INT8_WIDTH > INT_WIDTH && INT8_WIDTH <= LONG_WIDTH
+ case TYPE_INT8_T:
+ #endif
+ #if UINT8_WIDTH > INT_WIDTH && UINT8_WIDTH <= LONG_WIDTH
+ case TYPE_UINT8_T:
+ #endif
+ #if INT16_WIDTH > INT_WIDTH && INT16_WIDTH <= LONG_WIDTH
+ case TYPE_INT16_T:
+ #endif
+ #if UINT16_WIDTH > INT_WIDTH && UINT16_WIDTH <= LONG_WIDTH
+ case TYPE_UINT16_T:
+ #endif
+ #if INT32_WIDTH > INT_WIDTH && INT32_WIDTH <= LONG_WIDTH
+ case TYPE_INT32_T:
+ #endif
+ #if UINT32_WIDTH > INT_WIDTH && UINT32_WIDTH <= LONG_WIDTH
+ case TYPE_UINT32_T:
+ #endif
+ #if INT64_WIDTH > INT_WIDTH && INT64_WIDTH <= LONG_WIDTH
+ case TYPE_INT64_T:
+ #endif
+ #if UINT64_WIDTH > INT_WIDTH && UINT64_WIDTH <= LONG_WIDTH
+ case TYPE_UINT64_T:
+ #endif
+ #if INT_FAST8_WIDTH > INT_WIDTH && INT_FAST8_WIDTH <= LONG_WIDTH
+ case TYPE_INT_FAST8_T:
+ #endif
+ #if UINT_FAST8_WIDTH > INT_WIDTH && UINT_FAST8_WIDTH <= LONG_WIDTH
+ case TYPE_UINT_FAST8_T:
+ #endif
+ #if INT_FAST16_WIDTH > INT_WIDTH && INT_FAST16_WIDTH <= LONG_WIDTH
+ case TYPE_INT_FAST16_T:
+ #endif
+ #if UINT_FAST16_WIDTH > INT_WIDTH && UINT_FAST16_WIDTH <= LONG_WIDTH
+ case TYPE_UINT_FAST16_T:
+ #endif
+ #if INT_FAST32_WIDTH > INT_WIDTH && INT_FAST32_WIDTH <= LONG_WIDTH
+ case TYPE_INT_FAST32_T:
+ #endif
+ #if UINT_FAST32_WIDTH > INT_WIDTH && UINT_FAST32_WIDTH <= LONG_WIDTH
+ case TYPE_UINT_FAST32_T:
+ #endif
+ #if INT_FAST64_WIDTH > INT_WIDTH && INT_FAST64_WIDTH <= LONG_WIDTH
+ case TYPE_INT_FAST64_T:
+ #endif
+ #if UINT_FAST64_WIDTH > INT_WIDTH && UINT_FAST64_WIDTH <= LONG_WIDTH
+ case TYPE_UINT_FAST64_T:
+ #endif
+ #if HAVE_WINT_T
case TYPE_WIDE_CHAR:
-#endif
-#if HAVE_WCHAR_T
+ #endif
+ #if HAVE_WCHAR_T
case TYPE_WIDE_STRING:
-#endif
+ #endif
*fbp++ = 'l';
break;
case TYPE_LONGDOUBLE:
@@ -4988,47 +5991,74 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
#endif
*fbp = dp->conversion;
#if USE_SNPRINTF
-# if ((HAVE_SNPRINTF_RETVAL_C99 && HAVE_SNPRINTF_TRUNCATION_C99) \
+ /* Decide whether to pass %n in the format string
+ to SNPRINTF. */
+# if (((!WIDE_CHAR_VERSION || !DCHAR_IS_TCHAR) \
+ && (HAVE_SNPRINTF_RETVAL_C99 && HAVE_SNPRINTF_TRUNCATION_C99)) \
|| ((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) \
&& !defined __UCLIBC__) \
|| (defined __APPLE__ && defined __MACH__) \
+ || defined __OpenBSD__ \
|| defined __ANDROID__ \
- || (defined _WIN32 && ! defined __CYGWIN__))
- /* On systems where we know that snprintf's return value
- conforms to ISO C 99 (HAVE_SNPRINTF_RETVAL_C99) and that
- snprintf always produces NUL-terminated strings
- (HAVE_SNPRINTF_TRUNCATION_C99), it is possible to avoid
- using %n. And it is desirable to do so, because more and
- more platforms no longer support %n, for "security reasons".
- In particular, the following platforms:
+ || (defined _WIN32 && ! defined __CYGWIN__)) \
+ || (WIDE_CHAR_VERSION && MUSL_LIBC)
+ /* We can avoid passing %n and instead rely on SNPRINTF's
+ return value if
+ - !WIDE_CHAR_VERSION || !DCHAR_IS_TCHAR, because otherwise,
+ when WIDE_CHAR_VERSION && DCHAR_IS_TCHAR,
+ snwprintf()/_snwprintf() (Windows) and swprintf() (Unix)
+ don't return the needed buffer size,
+ and
+ - we're compiling for a system where we know
+ - that snprintf's return value conforms to ISO C 99
+ (HAVE_SNPRINTF_RETVAL_C99) and
+ - that snprintf always produces NUL-terminated strings
+ (HAVE_SNPRINTF_TRUNCATION_C99).
+ And it is desirable to do so, because more and more platforms
+ no longer support %n, for "security reasons". */
+ /* On specific platforms, listed below, we *must* avoid %n.
+ In the case
+ !WIDE_CHAR_VERSION && HAVE_SNPRINTF_RETVAL_C99 && !USE_MSVC__SNPRINTF
+ we can rely on the return value of snprintf instead. Whereas
+ in the opposite case
+ WIDE_CHAR_VERSION || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF
+ we need to make room based on an estimation, computed by
+ MAX_ROOM_NEEDED. */
+ /* The following platforms forbid %n:
- On glibc2 systems from 2004-10-18 or newer, the use of
%n in format strings in writable memory may crash the
program (if compiled with _FORTIFY_SOURCE=2).
- - On Mac OS X 10.13 or newer, the use of %n in format
+ - On macOS 10.13 or newer, the use of %n in format
strings in writable memory by default crashes the
program.
+ - On OpenBSD, since 2021-08-30, the use of %n in format
+ strings produces an abort (see
+ <https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/lib/libc/stdio/vfprintf.c.diff?r1=1.79&r2=1.80&f=h>,
+ <https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/lib/libc/stdio/vfwprintf.c.diff?r1=1.20&r2=1.21&f=h>).
- On Android, starting on 2018-03-07, the use of %n in
format strings produces a fatal error (see
<https://android.googlesource.com/platform/bionic/+/41398d03b7e8e0dfb951660ae713e682e9fc0336>).
- On these platforms, HAVE_SNPRINTF_RETVAL_C99 and
- HAVE_SNPRINTF_TRUNCATION_C99 are 1. We have listed them
- explicitly in the condition above, in case of cross-
- compilation (just to be sure). */
- /* On native Windows systems (such as mingw), we can avoid using
- %n because:
+ - On native Windows systems (such as mingw) where the OS is
+ Windows Vista, the use of %n in format strings by default
+ crashes the program. See
+ <https://gcc.gnu.org/ml/gcc/2007-06/msg00122.html> and
+ <https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/set-printf-count-output>
+ On the first four of these platforms, if !WIDE_CHAR_VERSION,
+ it is not a big deal to avoid %n, because on these platforms,
+ HAVE_SNPRINTF_RETVAL_C99 and HAVE_SNPRINTF_TRUNCATION_C99 are
+ 1.
+ On native Windows, if !WIDE_CHAR_VERSION, it's not a big deal
+ either because:
- Although the gl_SNPRINTF_TRUNCATION_C99 test fails,
snprintf does not write more than the specified number
of bytes. (snprintf (buf, 3, "%d %d", 4567, 89) writes
'4', '5', '6' into buf, not '4', '5', '\0'.)
- Although the gl_SNPRINTF_RETVAL_C99 test fails, snprintf
allows us to recognize the case of an insufficient
- buffer size: it returns -1 in this case.
- On native Windows systems (such as mingw) where the OS is
- Windows Vista, the use of %n in format strings by default
- crashes the program. See
- <https://gcc.gnu.org/ml/gcc/2007-06/msg00122.html> and
- <https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/set-printf-count-output>
- So we should avoid %n in this situation. */
+ buffer size: it returns -1 in this case. */
+ /* Additionally, in the WIDE_CHAR_VERSION case, we cannot use %n
+ on musl libc because we would run into an swprintf() bug.
+ See <https://www.openwall.com/lists/musl/2023/03/19/1>. */
fbp[1] = '\0';
# else /* AIX <= 5.1, HP-UX, IRIX, OSF/1, Solaris <= 9, BeOS */
fbp[1] = '%';
@@ -5189,6 +6219,102 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
SNPRINTF_BUF (arg);
}
break;
+ case TYPE_INT8_T:
+ {
+ int8_t arg = a.arg[dp->arg_index].a.a_int8_t;
+ SNPRINTF_BUF (arg);
+ }
+ break;
+ case TYPE_UINT8_T:
+ {
+ uint8_t arg = a.arg[dp->arg_index].a.a_uint8_t;
+ SNPRINTF_BUF (arg);
+ }
+ break;
+ case TYPE_INT16_T:
+ {
+ int16_t arg = a.arg[dp->arg_index].a.a_int16_t;
+ SNPRINTF_BUF (arg);
+ }
+ break;
+ case TYPE_UINT16_T:
+ {
+ uint16_t arg = a.arg[dp->arg_index].a.a_uint16_t;
+ SNPRINTF_BUF (arg);
+ }
+ break;
+ case TYPE_INT32_T:
+ {
+ int32_t arg = a.arg[dp->arg_index].a.a_int32_t;
+ SNPRINTF_BUF (arg);
+ }
+ break;
+ case TYPE_UINT32_T:
+ {
+ uint32_t arg = a.arg[dp->arg_index].a.a_uint32_t;
+ SNPRINTF_BUF (arg);
+ }
+ break;
+ case TYPE_INT64_T:
+ {
+ int64_t arg = a.arg[dp->arg_index].a.a_int64_t;
+ SNPRINTF_BUF (arg);
+ }
+ break;
+ case TYPE_UINT64_T:
+ {
+ uint64_t arg = a.arg[dp->arg_index].a.a_uint64_t;
+ SNPRINTF_BUF (arg);
+ }
+ break;
+ case TYPE_INT_FAST8_T:
+ {
+ int_fast8_t arg = a.arg[dp->arg_index].a.a_int_fast8_t;
+ SNPRINTF_BUF (arg);
+ }
+ break;
+ case TYPE_UINT_FAST8_T:
+ {
+ uint_fast8_t arg = a.arg[dp->arg_index].a.a_uint_fast8_t;
+ SNPRINTF_BUF (arg);
+ }
+ break;
+ case TYPE_INT_FAST16_T:
+ {
+ int_fast16_t arg = a.arg[dp->arg_index].a.a_int_fast16_t;
+ SNPRINTF_BUF (arg);
+ }
+ break;
+ case TYPE_UINT_FAST16_T:
+ {
+ uint_fast16_t arg = a.arg[dp->arg_index].a.a_uint_fast16_t;
+ SNPRINTF_BUF (arg);
+ }
+ break;
+ case TYPE_INT_FAST32_T:
+ {
+ int_fast32_t arg = a.arg[dp->arg_index].a.a_int_fast32_t;
+ SNPRINTF_BUF (arg);
+ }
+ break;
+ case TYPE_UINT_FAST32_T:
+ {
+ uint_fast32_t arg = a.arg[dp->arg_index].a.a_uint_fast32_t;
+ SNPRINTF_BUF (arg);
+ }
+ break;
+ case TYPE_INT_FAST64_T:
+ {
+ int_fast64_t arg = a.arg[dp->arg_index].a.a_int_fast64_t;
+ SNPRINTF_BUF (arg);
+ }
+ break;
+ case TYPE_UINT_FAST64_T:
+ {
+ uint_fast64_t arg = a.arg[dp->arg_index].a.a_uint_fast64_t;
+ SNPRINTF_BUF (arg);
+ }
+ break;
case TYPE_DOUBLE:
{
double arg = a.arg[dp->arg_index].a.a_double;
@@ -5271,12 +6397,16 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
/* Look at the snprintf() return value. */
if (retcount < 0)
{
-# if !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF
+# if (WIDE_CHAR_VERSION && DCHAR_IS_TCHAR) || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF
/* HP-UX 10.20 snprintf() is doubly deficient:
It doesn't understand the '%n' directive,
*and* it returns -1 (rather than the length
that would have been required) when the
buffer is too small.
+ Likewise, in case of
+ WIDE_CHAR_VERSION && DCHAR_IS_TCHAR, the
+ functions snwprintf()/_snwprintf() (Windows)
+ or swprintf() (Unix).
But a failure at this point can also come
from other reasons than a too small buffer,
such as an invalid wide string argument to
@@ -5312,7 +6442,15 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
# endif
}
else
- count = retcount;
+ {
+ count = retcount;
+# if WIDE_CHAR_VERSION && defined __MINGW32__
+ if (count == 0 && dp->conversion == 'c')
+ /* snwprintf returned 0 instead of 1. But it
+ wrote a null wide character. */
+ count = 1;
+# endif
+ }
}
}
#endif
@@ -5442,21 +6580,73 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
#if !DCHAR_IS_TCHAR
/* Convert from TCHAR_T[] to DCHAR_T[]. */
- if (dp->conversion == 'c' || dp->conversion == 's')
+ if (dp->conversion == 'c' || dp->conversion == 's'
+# if __GLIBC__ >= 2 && !defined __UCLIBC__
+ || (flags & FLAG_LOCALIZED)
+# endif
+ )
{
- /* type = TYPE_CHAR or TYPE_WIDE_CHAR or TYPE_STRING
- TYPE_WIDE_STRING.
- The result string is not certainly ASCII. */
+ /* The result string is not guaranteed to be ASCII. */
const TCHAR_T *tmpsrc;
DCHAR_T *tmpdst;
size_t tmpdst_len;
/* This code assumes that TCHAR_T is 'char'. */
- verify (sizeof (TCHAR_T) == 1);
+ static_assert (sizeof (TCHAR_T) == 1);
# if USE_SNPRINTF
tmpsrc = (TCHAR_T *) (result + length);
# else
tmpsrc = tmp;
# endif
+# if WIDE_CHAR_VERSION
+ /* Convert tmpsrc[0..count-1] to a freshly allocated
+ wide character array. */
+ mbstate_t state;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ tmpdst_len = 0;
+ {
+ const TCHAR_T *src = tmpsrc;
+ size_t srclen = count;
+
+ for (; srclen > 0; tmpdst_len++)
+ {
+ /* Parse the next multibyte character. */
+ size_t ret = mbrtowc (NULL, src, srclen, &state);
+ if (ret == (size_t)(-2) || ret == (size_t)(-1))
+ goto fail_with_EILSEQ;
+ if (ret == 0)
+ ret = 1;
+ src += ret;
+ srclen -= ret;
+ }
+ }
+
+ tmpdst =
+ (wchar_t *) malloc ((tmpdst_len + 1) * sizeof (wchar_t));
+ if (tmpdst == NULL)
+ goto out_of_memory;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ {
+ DCHAR_T *destptr = tmpdst;
+ const TCHAR_T *src = tmpsrc;
+ size_t srclen = count;
+
+ for (; srclen > 0; destptr++)
+ {
+ /* Parse the next multibyte character. */
+ size_t ret = mbrtowc (destptr, src, srclen, &state);
+ if (ret == (size_t)(-2) || ret == (size_t)(-1))
+ /* Should already have been caught in the first
+ loop, above. */
+ abort ();
+ if (ret == 0)
+ ret = 1;
+ src += ret;
+ srclen -= ret;
+ }
+ }
+# else
tmpdst =
DCHAR_CONV_FROM_ENCODING (locale_charset (),
iconveh_question_mark,
@@ -5465,6 +6655,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
NULL, &tmpdst_len);
if (tmpdst == NULL)
goto fail_with_errno;
+# endif
ENSURE_ALLOCATION_ELSE (xsum (length, tmpdst_len),
{ free (tmpdst); goto out_of_memory; });
DCHAR_CPY (result + length, tmpdst, tmpdst_len);
@@ -5531,7 +6722,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
/* Here count <= allocated - length. */
/* Perform padding. */
-#if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
+#if (WIDE_CHAR_VERSION && MUSL_LIBC) || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
if (pad_ourselves && has_width)
{
size_t w;
@@ -5590,6 +6781,22 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
if ((*pad_ptr >= 'A' && *pad_ptr <= 'Z')
|| (*pad_ptr >= 'a' && *pad_ptr <= 'z'))
pad_ptr = NULL;
+ else
+ /* Do the zero-padding after the "0x" or
+ "0b" prefix, not before. */
+ if (p - rp >= 2
+ && *rp == '0'
+ && (((dp->conversion == 'a'
+ || dp->conversion == 'x')
+ && rp[1] == 'x')
+ || ((dp->conversion == 'A'
+ || dp->conversion == 'X')
+ && rp[1] == 'X')
+ || (dp->conversion == 'b'
+ && rp[1] == 'b')
+ || (dp->conversion == 'B'
+ && rp[1] == 'B')))
+ pad_ptr += 2;
}
/* The generated string now extends from rp to p,
with the zero padding insertion point being at
@@ -5603,7 +6810,22 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
for (; pad > 0; pad--)
*p++ = ' ';
}
- else if ((flags & FLAG_ZERO) && pad_ptr != NULL)
+ else if ((flags & FLAG_ZERO) && pad_ptr != NULL
+ /* ISO C says: "For d, i, o, u, x, and X
+ conversions, if a precision is
+ specified, the 0 flag is ignored. */
+ && !(has_precision
+ && (dp->conversion == 'd'
+ || dp->conversion == 'i'
+ || dp->conversion == 'o'
+ || dp->conversion == 'u'
+ || dp->conversion == 'x'
+ || dp->conversion == 'X'
+ /* Although ISO C does not
+ require it, treat 'b' and 'B'
+ like 'x' and 'X'. */
+ || dp->conversion == 'b'
+ || dp->conversion == 'B')))
{
/* Pad with zeroes. */
DCHAR_T *q = end;
@@ -5697,7 +6919,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
errno = ENOMEM;
goto fail_with_errno;
-#if ENABLE_UNISTDIO || ((!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || (NEED_PRINTF_DIRECTIVE_LS && !defined IN_LIBINTL) || ENABLE_WCHAR_FALLBACK) && HAVE_WCHAR_T)
+#if ENABLE_UNISTDIO || ((!USE_SNPRINTF || WIDE_CHAR_VERSION || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || NEED_PRINTF_DIRECTIVE_LS || ENABLE_WCHAR_FALLBACK) && HAVE_WCHAR_T) || ((NEED_PRINTF_DIRECTIVE_LC || ENABLE_WCHAR_FALLBACK) && HAVE_WINT_T && !WIDE_CHAR_VERSION) || (NEED_WPRINTF_DIRECTIVE_C && WIDE_CHAR_VERSION)
fail_with_EILSEQ:
errno = EILSEQ;
goto fail_with_errno;
diff --git a/gl/lib/vasnprintf.h b/gl/lib/vasnprintf.h
index 27cf54c5..2d134070 100644
--- a/gl/lib/vasnprintf.h
+++ b/gl/lib/vasnprintf.h
@@ -1,5 +1,5 @@
/* vsprintf with automatic memory allocation.
- Copyright (C) 2002-2004, 2007-2022 Free Software Foundation, Inc.
+ Copyright (C) 2002-2004, 2007-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -17,6 +17,11 @@
#ifndef _VASNPRINTF_H
#define _VASNPRINTF_H
+/* This file uses _GL_ATTRIBUTE_FORMAT. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
/* Get va_list. */
#include <stdarg.h>
diff --git a/gl/lib/vasprintf.c b/gl/lib/vasprintf.c
index 218275f2..d2878cd9 100644
--- a/gl/lib/vasprintf.c
+++ b/gl/lib/vasprintf.c
@@ -1,5 +1,5 @@
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2006-2022 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/verify.h b/gl/lib/verify.h
index c5c63ae9..e4af9151 100644
--- a/gl/lib/verify.h
+++ b/gl/lib/verify.h
@@ -1,6 +1,6 @@
/* Compile-time assert-like macros.
- Copyright (C) 2005-2006, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2009-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -25,19 +25,19 @@
works as per C11. This is supported by GCC 4.6.0+ and by clang 4+.
Define _GL_HAVE__STATIC_ASSERT1 to 1 if _Static_assert (R) works as
- per C2x. This is supported by GCC 9.1+.
+ per C23. This is supported by GCC 9.1+.
Support compilers claiming conformance to the relevant standard,
and also support GCC when not pedantic. If we were willing to slow
'configure' down we could also use it with other compilers, but
since this affects only the quality of diagnostics, why bother? */
#ifndef __cplusplus
-# if (201112L <= __STDC_VERSION__ \
+# if (201112 <= __STDC_VERSION__ \
|| (!defined __STRICT_ANSI__ \
&& (4 < __GNUC__ + (6 <= __GNUC_MINOR__) || 5 <= __clang_major__)))
# define _GL_HAVE__STATIC_ASSERT 1
# endif
-# if (202000L <= __STDC_VERSION__ \
+# if (202311 <= __STDC_VERSION__ \
|| (!defined __STRICT_ANSI__ && 9 <= __GNUC__))
# define _GL_HAVE__STATIC_ASSERT1 1
# endif
@@ -202,12 +202,12 @@ template <int w>
This macro requires three or more arguments but uses at most the first
two, so that the _Static_assert macro optionally defined below supports
- both the C11 two-argument syntax and the C2x one-argument syntax.
+ both the C11 two-argument syntax and the C23 one-argument syntax.
Unfortunately, unlike C11, this implementation must appear as an
ordinary declaration, and cannot appear inside struct { ... }. */
-#if 200410 <= __cpp_static_assert
+#if 202311 <= __STDC_VERSION__ || 200410 <= __cpp_static_assert
# define _GL_VERIFY(R, DIAGNOSTIC, ...) static_assert (R, DIAGNOSTIC)
#elif defined _GL_HAVE__STATIC_ASSERT
# define _GL_VERIFY(R, DIAGNOSTIC, ...) _Static_assert (R, DIAGNOSTIC)
@@ -222,18 +222,68 @@ template <int w>
/* _GL_STATIC_ASSERT_H is defined if this code is copied into assert.h. */
#ifdef _GL_STATIC_ASSERT_H
-# if !defined _GL_HAVE__STATIC_ASSERT1 && !defined _Static_assert
-# define _Static_assert(...) \
- _GL_VERIFY (__VA_ARGS__, "static assertion failed", -)
+/* Define _Static_assert if needed. */
+/* With clang ≥ 3.8.0 in C++ mode, _Static_assert already works and accepts
+ 1 or 2 arguments. We better don't override it, because clang's standard
+ C++ library uses static_assert inside classes in several places, and our
+ replacement via _GL_VERIFY does not work in these contexts. */
+# if (defined __cplusplus && defined __clang__ \
+ && (4 <= __clang_major__ + (8 <= __clang_minor__)))
+# if 5 <= __clang_major__
+/* Avoid "warning: 'static_assert' with no message is a C++17 extension". */
+# pragma clang diagnostic ignored "-Wc++17-extensions"
+# else
+/* Avoid "warning: static_assert with no message is a C++1z extension". */
+# pragma clang diagnostic ignored "-Wc++1z-extensions"
+# endif
+# elif !defined _GL_HAVE__STATIC_ASSERT1 && !defined _Static_assert
+# if !defined _MSC_VER || defined __clang__
+# define _Static_assert(...) \
+ _GL_VERIFY (__VA_ARGS__, "static assertion failed", -)
+# else
+# if defined __cplusplus && _MSC_VER >= 1910
+ /* In MSVC 14.1 or newer, static_assert accepts one or two arguments,
+ but _Static_assert is not defined. */
+# define _Static_assert static_assert
+# else
+ /* Work around MSVC preprocessor incompatibility with ISO C; see
+ <https://stackoverflow.com/questions/5134523/>. */
+# define _Static_assert(R, ...) \
+ _GL_VERIFY ((R), "static assertion failed", -)
+# endif
+# endif
# endif
-# if __cpp_static_assert < 201411 && !defined static_assert
-# define static_assert _Static_assert /* C11 requires this #define. */
+/* Define static_assert if needed. */
+# if (!defined static_assert \
+ && __STDC_VERSION__ < 202311 \
+ && (!defined __cplusplus \
+ || (__cpp_static_assert < 201411 \
+ && __GNUG__ < 6 && __clang_major__ < 6 && _MSC_VER < 1910)))
+# if defined __cplusplus && _MSC_VER >= 1900 && !defined __clang__
+/* MSVC 14 in C++ mode supports the two-arguments static_assert but not
+ the one-argument static_assert, and it does not support _Static_assert.
+ We have to play preprocessor tricks to distinguish the two cases.
+ Since the MSVC preprocessor is not ISO C compliant (see above),.
+ the solution is specific to MSVC. */
+# define _GL_EXPAND(x) x
+# define _GL_SA1(a1) static_assert ((a1), "static assertion failed")
+# define _GL_SA2 static_assert
+# define _GL_SA3 static_assert
+# define _GL_SA_PICK(x1,x2,x3,x4,...) x4
+# define static_assert(...) _GL_EXPAND(_GL_SA_PICK(__VA_ARGS__,_GL_SA3,_GL_SA2,_GL_SA1)) (__VA_ARGS__)
+/* Avoid "fatal error C1189: #error: The C++ Standard Library forbids macroizing keywords." */
+# define _ALLOW_KEYWORD_MACROS 1
+# else
+# define static_assert _Static_assert /* C11 requires this #define. */
+# endif
# endif
#endif
/* @assert.h omit start@ */
-#if 3 < __GNUC__ + (3 < __GNUC_MINOR__ + (4 <= __GNUC_PATCHLEVEL__))
+#if defined __clang_major__ && __clang_major__ < 5
+# define _GL_HAS_BUILTIN_TRAP 0
+#elif 3 < __GNUC__ + (3 < __GNUC_MINOR__ + (4 <= __GNUC_PATCHLEVEL__))
# define _GL_HAS_BUILTIN_TRAP 1
#elif defined __has_builtin
# define _GL_HAS_BUILTIN_TRAP __has_builtin (__builtin_trap)
@@ -241,12 +291,16 @@ template <int w>
# define _GL_HAS_BUILTIN_TRAP 0
#endif
-#if 4 < __GNUC__ + (5 <= __GNUC_MINOR__)
-# define _GL_HAS_BUILTIN_UNREACHABLE 1
-#elif defined __has_builtin
-# define _GL_HAS_BUILTIN_UNREACHABLE __has_builtin (__builtin_unreachable)
-#else
-# define _GL_HAS_BUILTIN_UNREACHABLE 0
+#ifndef _GL_HAS_BUILTIN_UNREACHABLE
+# if defined __clang_major__ && __clang_major__ < 5
+# define _GL_HAS_BUILTIN_UNREACHABLE 0
+# elif 4 < __GNUC__ + (5 <= __GNUC_MINOR__)
+# define _GL_HAS_BUILTIN_UNREACHABLE 1
+# elif defined __has_builtin
+# define _GL_HAS_BUILTIN_UNREACHABLE __has_builtin (__builtin_unreachable)
+# else
+# define _GL_HAS_BUILTIN_UNREACHABLE 0
+# endif
#endif
/* Each of these macros verifies that its argument R is nonzero. To
@@ -303,13 +357,16 @@ template <int w>
# define assume(R) ((R) ? (void) 0 : __builtin_unreachable ())
#elif 1200 <= _MSC_VER
# define assume(R) __assume (R)
+#elif 202311 <= __STDC_VERSION__
+# include <stddef.h>
+# define assume(R) ((R) ? (void) 0 : unreachable ())
#elif (defined GCC_LINT || defined lint) && _GL_HAS_BUILTIN_TRAP
/* Doing it this way helps various packages when configured with
--enable-gcc-warnings, which compiles with -Dlint. It's nicer
- when 'assume' silences warnings even with older GCCs. */
+ if 'assume' silences warnings with GCC 3.4 through GCC 4.4.7 (2012). */
# define assume(R) ((R) ? (void) 0 : __builtin_trap ())
#else
- /* Some tools grok NOTREACHED, e.g., Oracle Studio 12.6. */
+ /* Some older tools grok NOTREACHED, e.g., Oracle Studio 12.6 (2017). */
# define assume(R) ((R) ? (void) 0 : /*NOTREACHED*/ (void) 0)
#endif
diff --git a/gl/lib/verror.c b/gl/lib/verror.c
index 3b08b31d..46bb2304 100644
--- a/gl/lib/verror.c
+++ b/gl/lib/verror.c
@@ -1,5 +1,5 @@
/* va_list error handler for noninteractive utilities
- Copyright (C) 2006-2007, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2006-2007, 2009-2023 Free Software Foundation, Inc.
This 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/gl/lib/verror.h b/gl/lib/verror.h
index e52562cb..bd385e1e 100644
--- a/gl/lib/verror.h
+++ b/gl/lib/verror.h
@@ -1,5 +1,5 @@
/* Declaration for va_list error-reporting function
- Copyright (C) 2006-2007, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2006-2007, 2009-2023 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -17,6 +17,11 @@
#ifndef _VERROR_H
#define _VERROR_H 1
+/* This file uses _GL_ATTRIBUTE_FORMAT. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
#include <stdarg.h>
/* Get _GL_ATTRIBUTE_SPEC_PRINTF_STANDARD. */
diff --git a/gl/lib/vsnprintf.c b/gl/lib/vsnprintf.c
index 80999e9b..acd4e2d4 100644
--- a/gl/lib/vsnprintf.c
+++ b/gl/lib/vsnprintf.c
@@ -1,5 +1,5 @@
/* Formatted output to strings.
- Copyright (C) 2004, 2006-2022 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2006-2023 Free Software Foundation, Inc.
Written by Simon Josefsson and Yoann Vandoorselaere <yoann@prelude-ids.org>.
This file is free software: you can redistribute it and/or modify
diff --git a/gl/lib/w32sock.h b/gl/lib/w32sock.h
index 17db3f12..84e46e33 100644
--- a/gl/lib/w32sock.h
+++ b/gl/lib/w32sock.h
@@ -1,6 +1,6 @@
/* w32sock.h --- internal auxiliary functions for Windows socket functions
- Copyright (C) 2008-2022 Free Software Foundation, Inc.
+ Copyright (C) 2008-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/warn-on-use.h b/gl/lib/warn-on-use.h
index 94f5b920..30756034 100644
--- a/gl/lib/warn-on-use.h
+++ b/gl/lib/warn-on-use.h
@@ -1,5 +1,5 @@
/* A C macro for emitting warnings if a function is used.
- Copyright (C) 2010-2022 Free Software Foundation, Inc.
+ Copyright (C) 2010-2023 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
diff --git a/gl/lib/wchar.in.h b/gl/lib/wchar.in.h
index 835ddbe6..75f3ed21 100644
--- a/gl/lib/wchar.in.h
+++ b/gl/lib/wchar.in.h
@@ -1,6 +1,6 @@
/* A substitute for ISO C99 <wchar.h>, for platforms that have issues.
- Copyright (C) 2007-2022 Free Software Foundation, Inc.
+ Copyright (C) 2007-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -84,6 +84,12 @@
#ifndef _@GUARD_PREFIX@_WCHAR_H
#define _@GUARD_PREFIX@_WCHAR_H
+/* This file uses _GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_MALLOC,
+ _GL_ATTRIBUTE_PURE, GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
/* _GL_ATTRIBUTE_DEALLOC (F, I) declares that the function returns pointers
that can be freed by passing them as the Ith argument to the
function F. */
@@ -99,7 +105,14 @@
can be freed via 'free'; it can be used only after declaring 'free'. */
/* Applies to: functions. Cannot be used on inline functions. */
#ifndef _GL_ATTRIBUTE_DEALLOC_FREE
-# define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (free, 1)
+# if defined __cplusplus && defined __GNUC__ && !defined __clang__
+/* Work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108231> */
+# define _GL_ATTRIBUTE_DEALLOC_FREE \
+ _GL_ATTRIBUTE_DEALLOC ((void (*) (void *)) free, 1)
+# else
+# define _GL_ATTRIBUTE_DEALLOC_FREE \
+ _GL_ATTRIBUTE_DEALLOC (free, 1)
+# endif
#endif
/* _GL_ATTRIBUTE_MALLOC declares that the function returns a pointer to freshly
@@ -181,7 +194,11 @@ typedef int rpl_mbstate_t;
# if (@REPLACE_FREE@ && !defined free \
&& !(defined __cplusplus && defined GNULIB_NAMESPACE))
/* We can't do '#define free rpl_free' here. */
+# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2)
+_GL_EXTERN_C void rpl_free (void *) throw ();
+# else
_GL_EXTERN_C void rpl_free (void *);
+# endif
# undef _GL_ATTRIBUTE_DEALLOC_FREE
# define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (rpl_free, 1)
# else
@@ -434,7 +451,9 @@ _GL_CXXALIAS_SYS (mbsnrtowcs, size_t,
const char **restrict srcp, size_t srclen, size_t len,
mbstate_t *restrict ps));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (mbsnrtowcs);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef mbsnrtowcs
# if HAVE_RAW_DECL_MBSNRTOWCS
@@ -622,13 +641,25 @@ _GL_WARN_ON_USE (wmemchr, "wmemchr is unportable - "
/* Compare N wide characters of S1 and S2. */
#if @GNULIB_WMEMCMP@
-# if !@HAVE_WMEMCMP@
+# if @REPLACE_WMEMCMP@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef wmemcmp
+# define wmemcmp rpl_wmemcmp
+# endif
+_GL_FUNCDECL_RPL (wmemcmp, int,
+ (const wchar_t *s1, const wchar_t *s2, size_t n)
+ _GL_ATTRIBUTE_PURE);
+_GL_CXXALIAS_RPL (wmemcmp, int,
+ (const wchar_t *s1, const wchar_t *s2, size_t n));
+# else
+# if !@HAVE_WMEMCMP@
_GL_FUNCDECL_SYS (wmemcmp, int,
(const wchar_t *s1, const wchar_t *s2, size_t n)
_GL_ATTRIBUTE_PURE);
-# endif
+# endif
_GL_CXXALIAS_SYS (wmemcmp, int,
(const wchar_t *s1, const wchar_t *s2, size_t n));
+# endif
# if __GLIBC__ >= 2
_GL_CXXALIASWARN (wmemcmp);
# endif
@@ -687,14 +718,27 @@ _GL_WARN_ON_USE (wmemmove, "wmemmove is unportable - "
/* Copy N wide characters of SRC to DEST.
Return pointer to wide characters after the last written wide character. */
#if @GNULIB_WMEMPCPY@
-# if !@HAVE_WMEMPCPY@
+# if @REPLACE_WMEMPCPY@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef wmempcpy
+# define wmempcpy rpl_wmempcpy
+# endif
+_GL_FUNCDECL_RPL (wmempcpy, wchar_t *,
+ (wchar_t *restrict dest,
+ const wchar_t *restrict src, size_t n));
+_GL_CXXALIAS_RPL (wmempcpy, wchar_t *,
+ (wchar_t *restrict dest,
+ const wchar_t *restrict src, size_t n));
+# else
+# if !@HAVE_WMEMPCPY@
_GL_FUNCDECL_SYS (wmempcpy, wchar_t *,
(wchar_t *restrict dest,
const wchar_t *restrict src, size_t n));
-# endif
+# endif
_GL_CXXALIAS_SYS (wmempcpy, wchar_t *,
(wchar_t *restrict dest,
const wchar_t *restrict src, size_t n));
+# endif
# if __GLIBC__ >= 2
_GL_CXXALIASWARN (wmempcpy);
# endif
@@ -745,7 +789,10 @@ _GL_WARN_ON_USE (wcslen, "wcslen is unportable - "
/* Return the number of wide characters in S, but at most MAXLEN. */
#if @GNULIB_WCSNLEN@
-# if !@HAVE_WCSNLEN@
+/* On Solaris 11.3, the header files declare the function in the std::
+ namespace, not in the global namespace. So, force a declaration in
+ the global namespace. */
+# if !@HAVE_WCSNLEN@ || (defined __sun && defined __cplusplus)
_GL_FUNCDECL_SYS (wcsnlen, size_t, (const wchar_t *s, size_t maxlen)
_GL_ATTRIBUTE_PURE);
# endif
@@ -782,7 +829,10 @@ _GL_WARN_ON_USE (wcscpy, "wcscpy is unportable - "
/* Copy SRC to DEST, returning the address of the terminating L'\0' in DEST. */
#if @GNULIB_WCPCPY@
-# if !@HAVE_WCPCPY@
+/* On Solaris 11.3, the header files declare the function in the std::
+ namespace, not in the global namespace. So, force a declaration in
+ the global namespace. */
+# if !@HAVE_WCPCPY@ || (defined __sun && defined __cplusplus)
_GL_FUNCDECL_SYS (wcpcpy, wchar_t *,
(wchar_t *restrict dest, const wchar_t *restrict src));
# endif
@@ -823,7 +873,10 @@ _GL_WARN_ON_USE (wcsncpy, "wcsncpy is unportable - "
/* Copy no more than N characters of SRC to DEST, returning the address of
the last character written into DEST. */
#if @GNULIB_WCPNCPY@
-# if !@HAVE_WCPNCPY@
+/* On Solaris 11.3, the header files declare the function in the std::
+ namespace, not in the global namespace. So, force a declaration in
+ the global namespace. */
+# if !@HAVE_WCPNCPY@ || (defined __sun && defined __cplusplus)
_GL_FUNCDECL_SYS (wcpncpy, wchar_t *,
(wchar_t *restrict dest,
const wchar_t *restrict src, size_t n));
@@ -885,11 +938,21 @@ _GL_WARN_ON_USE (wcsncat, "wcsncat is unportable - "
/* Compare S1 and S2. */
#if @GNULIB_WCSCMP@
-# if !@HAVE_WCSCMP@
+# if @REPLACE_WCSCMP@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef wcscmp
+# define wcscmp rpl_wcscmp
+# endif
+_GL_FUNCDECL_RPL (wcscmp, int, (const wchar_t *s1, const wchar_t *s2)
+ _GL_ATTRIBUTE_PURE);
+_GL_CXXALIAS_RPL (wcscmp, int, (const wchar_t *s1, const wchar_t *s2));
+# else
+# if !@HAVE_WCSCMP@
_GL_FUNCDECL_SYS (wcscmp, int, (const wchar_t *s1, const wchar_t *s2)
_GL_ATTRIBUTE_PURE);
-# endif
+# endif
_GL_CXXALIAS_SYS (wcscmp, int, (const wchar_t *s1, const wchar_t *s2));
+# endif
# if __GLIBC__ >= 2
_GL_CXXALIASWARN (wcscmp);
# endif
@@ -904,13 +967,25 @@ _GL_WARN_ON_USE (wcscmp, "wcscmp is unportable - "
/* Compare no more than N wide characters of S1 and S2. */
#if @GNULIB_WCSNCMP@
-# if !@HAVE_WCSNCMP@
+# if @REPLACE_WCSNCMP@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef wcsncmp
+# define wcsncmp rpl_wcsncmp
+# endif
+_GL_FUNCDECL_RPL (wcsncmp, int,
+ (const wchar_t *s1, const wchar_t *s2, size_t n)
+ _GL_ATTRIBUTE_PURE);
+_GL_CXXALIAS_RPL (wcsncmp, int,
+ (const wchar_t *s1, const wchar_t *s2, size_t n));
+# else
+# if !@HAVE_WCSNCMP@
_GL_FUNCDECL_SYS (wcsncmp, int,
(const wchar_t *s1, const wchar_t *s2, size_t n)
_GL_ATTRIBUTE_PURE);
-# endif
+# endif
_GL_CXXALIAS_SYS (wcsncmp, int,
(const wchar_t *s1, const wchar_t *s2, size_t n));
+# endif
# if __GLIBC__ >= 2
_GL_CXXALIASWARN (wcsncmp);
# endif
@@ -925,7 +1000,10 @@ _GL_WARN_ON_USE (wcsncmp, "wcsncmp is unportable - "
/* Compare S1 and S2, ignoring case. */
#if @GNULIB_WCSCASECMP@
-# if !@HAVE_WCSCASECMP@
+/* On Solaris 11.3, the header files declare the function in the std::
+ namespace, not in the global namespace. So, force a declaration in
+ the global namespace. */
+# if !@HAVE_WCSCASECMP@ || (defined __sun && defined __cplusplus)
_GL_FUNCDECL_SYS (wcscasecmp, int, (const wchar_t *s1, const wchar_t *s2)
_GL_ATTRIBUTE_PURE);
# endif
@@ -942,7 +1020,10 @@ _GL_WARN_ON_USE (wcscasecmp, "wcscasecmp is unportable - "
/* Compare no more than N chars of S1 and S2, ignoring case. */
#if @GNULIB_WCSNCASECMP@
-# if !@HAVE_WCSNCASECMP@
+/* On Solaris 11.3, the header files declare the function in the std::
+ namespace, not in the global namespace. So, force a declaration in
+ the global namespace. */
+# if !@HAVE_WCSNCASECMP@ || (defined __sun && defined __cplusplus)
_GL_FUNCDECL_SYS (wcsncasecmp, int,
(const wchar_t *s1, const wchar_t *s2, size_t n)
_GL_ATTRIBUTE_PURE);
@@ -1009,7 +1090,10 @@ _GL_WARN_ON_USE (wcsxfrm, "wcsxfrm is unportable - "
# endif
_GL_CXXALIAS_MDA (wcsdup, wchar_t *, (const wchar_t *s));
# else
-# if !@HAVE_WCSDUP@ || __GNUC__ >= 11
+/* On Solaris 11.3, the header files declare the function in the std::
+ namespace, not in the global namespace. So, force a declaration in
+ the global namespace. */
+# if !@HAVE_WCSDUP@ || (defined __sun && defined __cplusplus) || __GNUC__ >= 11
_GL_FUNCDECL_SYS (wcsdup, wchar_t *,
(const wchar_t *s)
_GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
@@ -1115,7 +1199,7 @@ _GL_WARN_ON_USE (wcsrchr, "wcsrchr is unportable - "
#endif
-/* Return the length of the initial segmet of WCS which consists entirely
+/* Return the length of the initial segment of WCS which consists entirely
of wide characters not in REJECT. */
#if @GNULIB_WCSCSPN@
# if !@HAVE_WCSCSPN@
@@ -1135,7 +1219,7 @@ _GL_WARN_ON_USE (wcscspn, "wcscspn is unportable - "
#endif
-/* Return the length of the initial segmet of WCS which consists entirely
+/* Return the length of the initial segment of WCS which consists entirely
of wide characters in ACCEPT. */
#if @GNULIB_WCSSPN@
# if !@HAVE_WCSSPN@
@@ -1190,12 +1274,25 @@ _GL_WARN_ON_USE (wcspbrk, "wcspbrk is unportable - "
/* Find the first occurrence of NEEDLE in HAYSTACK. */
#if @GNULIB_WCSSTR@
-# if !@HAVE_WCSSTR@
+# if @REPLACE_WCSSTR@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef wcsstr
+# define wcsstr rpl_wcsstr
+# endif
+_GL_FUNCDECL_RPL (wcsstr, wchar_t *,
+ (const wchar_t *restrict haystack,
+ const wchar_t *restrict needle)
+ _GL_ATTRIBUTE_PURE);
+_GL_CXXALIAS_RPL (wcsstr, wchar_t *,
+ (const wchar_t *restrict haystack,
+ const wchar_t *restrict needle));
+# else
+# if !@HAVE_WCSSTR@
_GL_FUNCDECL_SYS (wcsstr, wchar_t *,
(const wchar_t *restrict haystack,
const wchar_t *restrict needle)
_GL_ATTRIBUTE_PURE);
-# endif
+# endif
/* On some systems, this function is defined as an overloaded function:
extern "C++" {
const wchar_t * std::wcsstr (const wchar_t *, const wchar_t *);
@@ -1206,6 +1303,7 @@ _GL_CXXALIAS_SYS_CAST2 (wcsstr,
(const wchar_t *restrict, const wchar_t *restrict),
const wchar_t *,
(const wchar_t *restrict, const wchar_t *restrict));
+# endif
# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
&& (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
_GL_CXXALIASWARN1 (wcsstr, wchar_t *,
diff --git a/gl/lib/wcrtomb.c b/gl/lib/wcrtomb.c
index e14d8022..48a6c8eb 100644
--- a/gl/lib/wcrtomb.c
+++ b/gl/lib/wcrtomb.c
@@ -1,5 +1,5 @@
/* Convert wide character to multibyte character.
- Copyright (C) 2008-2022 Free Software Foundation, Inc.
+ Copyright (C) 2008-2023 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This file is free software: you can redistribute it and/or modify
diff --git a/gl/lib/wctype-h.c b/gl/lib/wctype-h.c
index 12781433..7d3e14a6 100644
--- a/gl/lib/wctype-h.c
+++ b/gl/lib/wctype-h.c
@@ -1,6 +1,6 @@
/* Inline functions for <wctype.h>.
- Copyright (C) 2012-2022 Free Software Foundation, Inc.
+ Copyright (C) 2012-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/wctype.in.h b/gl/lib/wctype.in.h
index 98cafee7..227fdac2 100644
--- a/gl/lib/wctype.in.h
+++ b/gl/lib/wctype.in.h
@@ -1,6 +1,6 @@
/* A substitute for ISO C99 <wctype.h>, for platforms that lack it.
- Copyright (C) 2006-2022 Free Software Foundation, Inc.
+ Copyright (C) 2006-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -44,6 +44,12 @@
#ifndef _@GUARD_PREFIX@_WCTYPE_H
+/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE, GNULIB_POSIXCHECK,
+ HAVE_RAW_DECL_*. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
#if @HAVE_WINT_T@
/* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>. */
# include <wchar.h>
@@ -68,9 +74,6 @@
#ifndef _@GUARD_PREFIX@_WCTYPE_H
#define _@GUARD_PREFIX@_WCTYPE_H
-#ifndef _GL_INLINE_HEADER_BEGIN
- #error "Please include config.h first."
-#endif
_GL_INLINE_HEADER_BEGIN
#ifndef _GL_WCTYPE_INLINE
# define _GL_WCTYPE_INLINE _GL_INLINE
diff --git a/gl/lib/windows-initguard.h b/gl/lib/windows-initguard.h
index a29d7e97..9d36f53c 100644
--- a/gl/lib/windows-initguard.h
+++ b/gl/lib/windows-initguard.h
@@ -1,5 +1,5 @@
/* Init guards, somewhat like spinlocks (native Windows implementation).
- Copyright (C) 2005-2022 Free Software Foundation, Inc.
+ Copyright (C) 2005-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/windows-mutex.c b/gl/lib/windows-mutex.c
index 28e429c1..ab7258c9 100644
--- a/gl/lib/windows-mutex.c
+++ b/gl/lib/windows-mutex.c
@@ -1,5 +1,5 @@
/* Plain mutexes (native Windows implementation).
- Copyright (C) 2005-2022 Free Software Foundation, Inc.
+ Copyright (C) 2005-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/windows-mutex.h b/gl/lib/windows-mutex.h
index 7aedfdf6..039eb707 100644
--- a/gl/lib/windows-mutex.h
+++ b/gl/lib/windows-mutex.h
@@ -1,5 +1,5 @@
/* Plain mutexes (native Windows implementation).
- Copyright (C) 2005-2022 Free Software Foundation, Inc.
+ Copyright (C) 2005-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/windows-once.c b/gl/lib/windows-once.c
index deea5487..0d28281f 100644
--- a/gl/lib/windows-once.c
+++ b/gl/lib/windows-once.c
@@ -1,5 +1,5 @@
/* Once-only control (native Windows implementation).
- Copyright (C) 2005-2022 Free Software Foundation, Inc.
+ Copyright (C) 2005-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/windows-once.h b/gl/lib/windows-once.h
index 85534c99..54885680 100644
--- a/gl/lib/windows-once.h
+++ b/gl/lib/windows-once.h
@@ -1,5 +1,5 @@
/* Once-only control (native Windows implementation).
- Copyright (C) 2005-2022 Free Software Foundation, Inc.
+ Copyright (C) 2005-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/windows-recmutex.c b/gl/lib/windows-recmutex.c
index d8087ac1..a8ce9a04 100644
--- a/gl/lib/windows-recmutex.c
+++ b/gl/lib/windows-recmutex.c
@@ -1,5 +1,5 @@
/* Plain recursive mutexes (native Windows implementation).
- Copyright (C) 2005-2022 Free Software Foundation, Inc.
+ Copyright (C) 2005-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/windows-recmutex.h b/gl/lib/windows-recmutex.h
index 746e75c0..08ff4597 100644
--- a/gl/lib/windows-recmutex.h
+++ b/gl/lib/windows-recmutex.h
@@ -1,5 +1,5 @@
/* Plain recursive mutexes (native Windows implementation).
- Copyright (C) 2005-2022 Free Software Foundation, Inc.
+ Copyright (C) 2005-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/windows-rwlock.c b/gl/lib/windows-rwlock.c
index d186e037..7cbd7bb1 100644
--- a/gl/lib/windows-rwlock.c
+++ b/gl/lib/windows-rwlock.c
@@ -1,5 +1,5 @@
/* Read-write locks (native Windows implementation).
- Copyright (C) 2005-2022 Free Software Foundation, Inc.
+ Copyright (C) 2005-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/windows-rwlock.h b/gl/lib/windows-rwlock.h
index 65c5ab49..fe8381e8 100644
--- a/gl/lib/windows-rwlock.h
+++ b/gl/lib/windows-rwlock.h
@@ -1,5 +1,5 @@
/* Read-write locks (native Windows implementation).
- Copyright (C) 2005-2022 Free Software Foundation, Inc.
+ Copyright (C) 2005-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/wmemchr-impl.h b/gl/lib/wmemchr-impl.h
index f92a362e..96b9ad3a 100644
--- a/gl/lib/wmemchr-impl.h
+++ b/gl/lib/wmemchr-impl.h
@@ -1,5 +1,5 @@
/* Search wide character array for a wide character.
- Copyright (C) 1999, 2011-2022 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2011-2023 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 1999.
This file is free software: you can redistribute it and/or modify
diff --git a/gl/lib/wmemchr.c b/gl/lib/wmemchr.c
index 127e1a52..5d282473 100644
--- a/gl/lib/wmemchr.c
+++ b/gl/lib/wmemchr.c
@@ -1,5 +1,5 @@
/* Search wide character array for a wide character.
- Copyright (C) 2011-2022 Free Software Foundation, Inc.
+ Copyright (C) 2011-2023 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2011.
This file is free software: you can redistribute it and/or modify
diff --git a/gl/lib/wmempcpy.c b/gl/lib/wmempcpy.c
index cdfa9133..6803ecb4 100644
--- a/gl/lib/wmempcpy.c
+++ b/gl/lib/wmempcpy.c
@@ -1,5 +1,5 @@
/* Copy wide character array, return pointer after last written wide character.
- Copyright (C) 2020-2022 Free Software Foundation, Inc.
+ Copyright (C) 2020-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/xalloc-die.c b/gl/lib/xalloc-die.c
index 5b947f10..7605eee1 100644
--- a/gl/lib/xalloc-die.c
+++ b/gl/lib/xalloc-die.c
@@ -1,6 +1,6 @@
/* Report a memory allocation failure and exit.
- Copyright (C) 1997-2000, 2002-2004, 2006, 2009-2022 Free Software
+ Copyright (C) 1997-2000, 2002-2004, 2006, 2009-2023 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/lib/xalloc-oversized.h b/gl/lib/xalloc-oversized.h
index aefa6fd8..5dbdfb55 100644
--- a/gl/lib/xalloc-oversized.h
+++ b/gl/lib/xalloc-oversized.h
@@ -1,6 +1,6 @@
/* xalloc-oversized.h -- memory allocation size checking
- Copyright (C) 1990-2000, 2003-2004, 2006-2022 Free Software Foundation, Inc.
+ Copyright (C) 1990-2000, 2003-2004, 2006-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/xalloc.h b/gl/lib/xalloc.h
index 9f4bf8d4..fb44f420 100644
--- a/gl/lib/xalloc.h
+++ b/gl/lib/xalloc.h
@@ -1,6 +1,6 @@
/* xalloc.h -- malloc with out-of-memory checking
- Copyright (C) 1990-2000, 2003-2004, 2006-2022 Free Software Foundation, Inc.
+ Copyright (C) 1990-2000, 2003-2004, 2006-2023 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -18,18 +18,20 @@
#ifndef XALLOC_H_
#define XALLOC_H_
+/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE, _Noreturn,
+ _GL_ATTRIBUTE_ALLOC_SIZE, _GL_ATTRIBUTE_MALLOC,
+ _GL_ATTRIBUTE_RETURNS_NONNULL. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
#include <stddef.h>
#include <stdlib.h>
-#include <stdint.h>
#if GNULIB_XALLOC
# include "idx.h"
-# include "intprops.h"
#endif
-#ifndef _GL_INLINE_HEADER_BEGIN
- #error "Please include config.h first."
-#endif
_GL_INLINE_HEADER_BEGIN
#ifndef XALLOC_INLINE
# define XALLOC_INLINE _GL_INLINE
@@ -48,7 +50,7 @@ extern "C" {
or by using gnulib's xalloc-die module. This is the
function to call when one wants the program to die because of a
memory allocation failure. */
-/*extern*/ _Noreturn void xalloc_die (void);
+_Noreturn void xalloc_die (void);
#endif /* GNULIB_XALLOC_DIE */
diff --git a/gl/lib/xasprintf.c b/gl/lib/xasprintf.c
index 01ad8785..5bd8684e 100644
--- a/gl/lib/xasprintf.c
+++ b/gl/lib/xasprintf.c
@@ -1,5 +1,5 @@
/* vasprintf and asprintf with out-of-memory checking.
- Copyright (C) 1999, 2002-2004, 2006, 2009-2022 Free Software Foundation,
+ Copyright (C) 1999, 2002-2004, 2006, 2009-2023 Free Software Foundation,
Inc.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/lib/xgetcwd.c b/gl/lib/xgetcwd.c
index 619c7703..6c7c3d31 100644
--- a/gl/lib/xgetcwd.c
+++ b/gl/lib/xgetcwd.c
@@ -1,6 +1,6 @@
/* xgetcwd.c -- return current directory with unlimited length
- Copyright (C) 2001, 2003-2004, 2006-2007, 2009-2022 Free Software
+ Copyright (C) 2001, 2003-2004, 2006-2007, 2009-2023 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/lib/xgetcwd.h b/gl/lib/xgetcwd.h
index 65f16352..59d225e6 100644
--- a/gl/lib/xgetcwd.h
+++ b/gl/lib/xgetcwd.h
@@ -1,5 +1,5 @@
/* prototype for xgetcwd
- Copyright (C) 1995, 2001, 2003, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 1995, 2001, 2003, 2009-2023 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -14,6 +14,11 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
+/* This file uses _GL_ATTRIBUTE_MALLOC. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
#include <stdlib.h>
extern char *xgetcwd (void)
diff --git a/gl/lib/xmalloc.c b/gl/lib/xmalloc.c
index 993c1eeb..289cbd05 100644
--- a/gl/lib/xmalloc.c
+++ b/gl/lib/xmalloc.c
@@ -1,6 +1,6 @@
/* xmalloc.c -- malloc with out of memory checking
- Copyright (C) 1990-2000, 2002-2006, 2008-2022 Free Software Foundation, Inc.
+ Copyright (C) 1990-2000, 2002-2006, 2008-2023 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -22,10 +22,11 @@
#include "xalloc.h"
#include "ialloc.h"
-#include "intprops.h"
#include "minmax.h"
+#include <stdckdint.h>
#include <stdlib.h>
+#include <stdint.h>
#include <string.h>
static void * _GL_ATTRIBUTE_PURE
@@ -195,7 +196,7 @@ x2nrealloc (void *p, size_t *pn, size_t s)
else
{
/* Set N = floor (1.5 * N) + 1 to make progress even if N == 0. */
- if (INT_ADD_WRAPV (n, (n >> 1) + 1, &n))
+ if (ckd_add (&n, n, (n >> 1) + 1))
xalloc_die ();
}
@@ -236,7 +237,7 @@ xpalloc (void *pa, idx_t *pn, idx_t n_incr_min, ptrdiff_t n_max, idx_t s)
N_MAX, and what the C language can represent safely. */
idx_t n;
- if (INT_ADD_WRAPV (n0, n0 >> 1, &n))
+ if (ckd_add (&n, n0, n0 >> 1))
n = IDX_MAX;
if (0 <= n_max && n_max < n)
n = n_max;
@@ -251,7 +252,7 @@ xpalloc (void *pa, idx_t *pn, idx_t n_incr_min, ptrdiff_t n_max, idx_t s)
size_t nbytes;
#endif
idx_t adjusted_nbytes
- = (INT_MULTIPLY_WRAPV (n, s, &nbytes)
+ = (ckd_mul (&nbytes, n, s)
? MIN (IDX_MAX, SIZE_MAX)
: nbytes < DEFAULT_MXFAST ? DEFAULT_MXFAST : 0);
if (adjusted_nbytes)
@@ -263,9 +264,9 @@ xpalloc (void *pa, idx_t *pn, idx_t n_incr_min, ptrdiff_t n_max, idx_t s)
if (! pa)
*pn = 0;
if (n - n0 < n_incr_min
- && (INT_ADD_WRAPV (n0, n_incr_min, &n)
+ && (ckd_add (&n, n0, n_incr_min)
|| (0 <= n_max && n_max < n)
- || INT_MULTIPLY_WRAPV (n, s, &nbytes)))
+ || ckd_mul (&nbytes, n, s)))
xalloc_die ();
pa = xrealloc (pa, nbytes);
*pn = n;
diff --git a/gl/lib/xsize.c b/gl/lib/xsize.c
index 761e3434..279ae824 100644
--- a/gl/lib/xsize.c
+++ b/gl/lib/xsize.c
@@ -1,6 +1,6 @@
/* Checked size_t computations.
- Copyright (C) 2012-2022 Free Software Foundation, Inc.
+ Copyright (C) 2012-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lib/xsize.h b/gl/lib/xsize.h
index 0bfa4c88..5b08d61f 100644
--- a/gl/lib/xsize.h
+++ b/gl/lib/xsize.h
@@ -1,6 +1,6 @@
/* xsize.h -- Checked size_t computations.
- Copyright (C) 2003, 2008-2022 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2008-2023 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -18,6 +18,11 @@
#ifndef _XSIZE_H
#define _XSIZE_H
+/* This file uses _GL_INLINE_HEADER_BEGIN, _GL_INLINE, HAVE_STDINT_H. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
/* Get size_t. */
#include <stddef.h>
@@ -30,9 +35,6 @@
/* Get ATTRIBUTE_PURE. */
#include "attribute.h"
-#ifndef _GL_INLINE_HEADER_BEGIN
- #error "Please include config.h first."
-#endif
_GL_INLINE_HEADER_BEGIN
#ifndef XSIZE_INLINE
# define XSIZE_INLINE _GL_INLINE
diff --git a/gl/lib/xstdopen.c b/gl/lib/xstdopen.c
index 844512a3..76d47815 100644
--- a/gl/lib/xstdopen.c
+++ b/gl/lib/xstdopen.c
@@ -1,5 +1,5 @@
/* Ensure that stdin, stdout, stderr are open.
- Copyright (C) 2019-2022 Free Software Foundation, Inc.
+ Copyright (C) 2019-2023 Free Software Foundation, Inc.
This 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/gl/lib/xstdopen.h b/gl/lib/xstdopen.h
index 0c18209e..c317bff6 100644
--- a/gl/lib/xstdopen.h
+++ b/gl/lib/xstdopen.h
@@ -1,5 +1,5 @@
/* Ensure that stdin, stdout, stderr are open.
- Copyright (C) 2019-2022 Free Software Foundation, Inc.
+ Copyright (C) 2019-2023 Free Software Foundation, Inc.
This 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/gl/lib/xstrndup.c b/gl/lib/xstrndup.c
index a420212d..2c3796e7 100644
--- a/gl/lib/xstrndup.c
+++ b/gl/lib/xstrndup.c
@@ -1,6 +1,6 @@
/* Duplicate a bounded initial segment of a string, with out-of-memory
checking.
- Copyright (C) 2003, 2006-2007, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2006-2007, 2009-2023 Free Software Foundation, Inc.
This 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/gl/lib/xstrndup.h b/gl/lib/xstrndup.h
index fdd65736..58447310 100644
--- a/gl/lib/xstrndup.h
+++ b/gl/lib/xstrndup.h
@@ -1,6 +1,6 @@
/* Duplicate a bounded initial segment of a string, with out-of-memory
checking.
- Copyright (C) 2003, 2009-2022 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2009-2023 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -15,6 +15,11 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
+/* This file uses _GL_ATTRIBUTE_MALLOC, _GL_ATTRIBUTE_RETURNS_NONNULL. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
#include <stdlib.h>
/* Return a newly allocated copy of at most N bytes of STRING.
diff --git a/gl/lib/xvasprintf.c b/gl/lib/xvasprintf.c
index faca818e..1cedfbf1 100644
--- a/gl/lib/xvasprintf.c
+++ b/gl/lib/xvasprintf.c
@@ -1,5 +1,5 @@
/* vasprintf and asprintf with out-of-memory checking.
- Copyright (C) 1999, 2002-2004, 2006-2022 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002-2004, 2006-2023 Free Software Foundation, Inc.
This 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/gl/lib/xvasprintf.h b/gl/lib/xvasprintf.h
index e5d76fd6..6a5952fa 100644
--- a/gl/lib/xvasprintf.h
+++ b/gl/lib/xvasprintf.h
@@ -1,5 +1,5 @@
/* vasprintf and asprintf with out-of-memory checking.
- Copyright (C) 2002-2004, 2006-2022 Free Software Foundation, Inc.
+ Copyright (C) 2002-2004, 2006-2023 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -17,6 +17,11 @@
#ifndef _XVASPRINTF_H
#define _XVASPRINTF_H
+/* This file uses _GL_ATTRIBUTE_FORMAT, _GL_ATTRIBUTE_MALLOC. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
/* Get va_list. */
#include <stdarg.h>
diff --git a/gl/m4/00gnulib.m4 b/gl/m4/00gnulib.m4
index dea34e83..7fe03e0b 100644
--- a/gl/m4/00gnulib.m4
+++ b/gl/m4/00gnulib.m4
@@ -1,5 +1,5 @@
# 00gnulib.m4 serial 8
-dnl Copyright (C) 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/__inline.m4 b/gl/m4/__inline.m4
index fbe2098e..acf8668b 100644
--- a/gl/m4/__inline.m4
+++ b/gl/m4/__inline.m4
@@ -1,5 +1,5 @@
# Test for __inline keyword
-dnl Copyright 2017-2022 Free Software Foundation, Inc.
+dnl Copyright 2017-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/absolute-header.m4 b/gl/m4/absolute-header.m4
index 67d6507c..e7947648 100644
--- a/gl/m4/absolute-header.m4
+++ b/gl/m4/absolute-header.m4
@@ -1,5 +1,5 @@
# absolute-header.m4 serial 17
-dnl Copyright (C) 2006-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/alloca.m4 b/gl/m4/alloca.m4
index dc6f47e3..c685fac9 100644
--- a/gl/m4/alloca.m4
+++ b/gl/m4/alloca.m4
@@ -1,5 +1,5 @@
# alloca.m4 serial 21
-dnl Copyright (C) 2002-2004, 2006-2007, 2009-2022 Free Software Foundation,
+dnl Copyright (C) 2002-2004, 2006-2007, 2009-2023 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/gl/m4/argp.m4 b/gl/m4/argp.m4
index a6f7b8ef..1f8578bd 100644
--- a/gl/m4/argp.m4
+++ b/gl/m4/argp.m4
@@ -1,5 +1,5 @@
# argp.m4 serial 16
-dnl Copyright (C) 2003-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2003-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/asm-underscore.m4 b/gl/m4/asm-underscore.m4
index 950aa8d2..65ae55a7 100644
--- a/gl/m4/asm-underscore.m4
+++ b/gl/m4/asm-underscore.m4
@@ -1,5 +1,5 @@
# asm-underscore.m4 serial 5
-dnl Copyright (C) 2010-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2010-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/assert_h.m4 b/gl/m4/assert_h.m4
new file mode 100644
index 00000000..d255855d
--- /dev/null
+++ b/gl/m4/assert_h.m4
@@ -0,0 +1,73 @@
+# assert-h.m4
+dnl Copyright (C) 2011-2023 Free Software Foundation, Inc.
+dnl This file is free software; the Free 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_DEFUN([gl_ASSERT_H],
+[
+ AC_CACHE_CHECK([for static_assert], [gl_cv_static_assert],
+ [gl_save_CFLAGS=$CFLAGS
+ for gl_working in "yes, a keyword" "yes, an <assert.h> macro"; do
+ AS_CASE([$gl_working],
+ [*assert.h*], [CFLAGS="$gl_save_CFLAGS -DINCLUDE_ASSERT_H"])
+
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#if defined __clang__ && __STDC_VERSION__ < 202311
+ #pragma clang diagnostic error "-Wc2x-extensions"
+ #pragma clang diagnostic error "-Wc++1z-extensions"
+ #endif
+ #ifdef INCLUDE_ASSERT_H
+ #include <assert.h>
+ #endif
+ static_assert (2 + 2 == 4, "arithmetic does not work");
+ static_assert (2 + 2 == 4);
+ ]],
+ [[
+ static_assert (sizeof (char) == 1, "sizeof does not work");
+ static_assert (sizeof (char) == 1);
+ ]])],
+ [gl_cv_static_assert=$gl_working],
+ [gl_cv_static_assert=no])
+ CFLAGS=$gl_save_CFLAGS
+ test "$gl_cv_static_assert" != no && break
+ done])
+
+ GL_GENERATE_ASSERT_H=false
+ AS_CASE([$gl_cv_static_assert],
+ [yes*keyword*],
+ [AC_DEFINE([HAVE_C_STATIC_ASSERT], [1],
+ [Define to 1 if the static_assert keyword works.])],
+ [no],
+ [GL_GENERATE_ASSERT_H=true
+ gl_NEXT_HEADERS([assert.h])])
+
+ dnl The "zz" puts this toward config.h's end, to avoid potential
+ dnl collisions with other definitions.
+ dnl #undef assert so that programs are not tempted to use it without
+ dnl specifically including assert.h.
+ dnl #undef __ASSERT_H__ so that on IRIX, when programs later include
+ dnl <assert.h>, this include actually defines assert.
+ dnl Break the #undef_s apart with a comment so that 'configure' does
+ dnl not comment them out.
+ AH_VERBATIM([zzstatic_assert],
+[#if (!defined HAVE_C_STATIC_ASSERT && !defined assert \
+ && (!defined __cplusplus \
+ || (__cpp_static_assert < 201411 \
+ && __GNUG__ < 6 && __clang_major__ < 6)))
+ #include <assert.h>
+ #undef/**/assert
+ #ifdef __sgi
+ #undef/**/__ASSERT_H__
+ #endif
+ /* Solaris 11.4 <assert.h> defines static_assert as a macro with 2 arguments.
+ We need it also to be invocable with a single argument. */
+ #if defined __sun && (__STDC_VERSION__ - 0 >= 201112L) && !defined __cplusplus
+ #undef/**/static_assert
+ #define static_assert _Static_assert
+ #endif
+#endif])
+])
diff --git a/gl/m4/btowc.m4 b/gl/m4/btowc.m4
index 45a61f5e..1cd100a2 100644
--- a/gl/m4/btowc.m4
+++ b/gl/m4/btowc.m4
@@ -1,5 +1,5 @@
-# btowc.m4 serial 12
-dnl Copyright (C) 2008-2022 Free Software Foundation, Inc.
+# btowc.m4 serial 13
+dnl Copyright (C) 2008-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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,6 +88,49 @@ int main ()
fi
])
+ dnl On mingw, in the C locale, btowc is inconsistent with mbrtowc:
+ dnl mbrtowc avoids calling MultiByteToWideChar when MB_CUR_MAX is 1 and
+ dnl ___lc_codepage_func() is 0, but btowc is lacking this special case.
+ AC_CHECK_FUNCS_ONCE([mbrtowc])
+ AC_CACHE_CHECK([whether btowc is consistent with mbrtowc in the C locale],
+ [gl_cv_func_btowc_consistent],
+ [
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+#include <stdlib.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+#if HAVE_MBRTOWC
+ wint_t wc1 = btowc (0x80);
+ wchar_t wc2 = (wchar_t) 0xbadface;
+ char buf[1] = { 0x80 };
+ mbstate_t state;
+ memset (&state, 0, sizeof (mbstate_t));
+ if (mbrtowc (&wc2, buf, 1, &state) != 1 || wc1 != wc2)
+ return 1;
+#endif
+ return 0;
+}]])],
+ [gl_cv_func_btowc_consistent=yes],
+ [gl_cv_func_btowc_consistent=no],
+ [case "$host_os" in
+ # Guess no on mingw.
+ mingw*) AC_EGREP_CPP([Problem], [
+#ifdef __MINGW32__
+ Problem
+#endif
+ ],
+ [gl_cv_func_btowc_consistent="guessing no"],
+ [gl_cv_func_btowc_consistent="guessing yes"])
+ ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_btowc_consistent="guessing yes" ;;
+ esac
+ ])
+ ])
+
case "$gl_cv_func_btowc_nul" in
*yes) ;;
*) REPLACE_BTOWC=1 ;;
@@ -96,10 +139,22 @@ int main ()
*yes) ;;
*) REPLACE_BTOWC=1 ;;
esac
+ case "$gl_cv_func_btowc_consistent" in
+ *yes) ;;
+ *) REPLACE_BTOWC=1 ;;
+ esac
+ if test $REPLACE_BTOWC = 0; then
+ gl_MBRTOWC_C_LOCALE
+ case "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" in
+ *yes) ;;
+ *) REPLACE_BTOWC=1 ;;
+ esac
+ fi
fi
])
# Prerequisites of lib/btowc.c.
AC_DEFUN([gl_PREREQ_BTOWC], [
:
+ AC_CHECK_FUNCS_ONCE([mbrtowc])
])
diff --git a/gl/m4/builtin-expect.m4 b/gl/m4/builtin-expect.m4
index b1fb12a3..531ed48a 100644
--- a/gl/m4/builtin-expect.m4
+++ b/gl/m4/builtin-expect.m4
@@ -1,6 +1,6 @@
dnl Check for __builtin_expect.
-dnl Copyright 2016-2022 Free Software Foundation, Inc.
+dnl Copyright 2016-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/c-bool.m4 b/gl/m4/c-bool.m4
new file mode 100644
index 00000000..f614371b
--- /dev/null
+++ b/gl/m4/c-bool.m4
@@ -0,0 +1,51 @@
+# Check for bool that conforms to C2023.
+
+dnl Copyright 2022-2023 Free Software Foundation, Inc.
+dnl This file is free software; the Free 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_C_BOOL],
+[
+ AC_CACHE_CHECK([for bool, true, false], [gl_cv_c_bool],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE([[
+ #if true == false
+ #error "true == false"
+ #endif
+ extern bool b;
+ bool b = true == false;]])],
+ [gl_cv_c_bool=yes],
+ [gl_cv_c_bool=no])])
+ if test "$gl_cv_c_bool" = yes; then
+ AC_DEFINE([HAVE_C_BOOL], [1],
+ [Define to 1 if bool, true and false work as per C2023.])
+ fi
+
+ AC_CHECK_HEADERS_ONCE([stdbool.h])
+
+ dnl The "zz" puts this toward config.h's end, to avoid potential
+ dnl collisions with other definitions.
+ dnl If 'bool', 'true' and 'false' do not work, arrange for them to work.
+ dnl In C, this means including <stdbool.h> if it is not already included.
+ dnl However, if the preprocessor mistakenly treats 'true' as 0,
+ dnl define it to a bool expression equal to 1; this is needed in
+ dnl Sun C++ 5.11 (Oracle Solaris Studio 12.2, 2010) and older.
+ AH_VERBATIM([zzbool],
+[#ifndef HAVE_C_BOOL
+# if !defined __cplusplus && !defined __bool_true_false_are_defined
+# if HAVE_STDBOOL_H
+# include <stdbool.h>
+# else
+# if defined __SUNPRO_C
+# error "<stdbool.h> is not usable with this configuration. To make it usable, add -D_STDC_C99= to $CC."
+# else
+# error "<stdbool.h> does not exist on this platform. Use gnulib module 'stdbool-c99' instead of gnulib module 'stdbool'."
+# endif
+# endif
+# endif
+# if !true
+# define true (!false)
+# endif
+#endif])
+])
diff --git a/gl/m4/calloc.m4 b/gl/m4/calloc.m4
index c01520e5..3789cbff 100644
--- a/gl/m4/calloc.m4
+++ b/gl/m4/calloc.m4
@@ -1,6 +1,6 @@
-# calloc.m4 serial 29
+# calloc.m4 serial 30
-# Copyright (C) 2004-2022 Free Software Foundation, Inc.
+# Copyright (C) 2004-2023 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.
@@ -36,14 +36,14 @@ AC_DEFUN([_AC_FUNC_CALLOC_IF],
[ac_cv_func_calloc_0_nonnull=no])
else
case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu* | gnu*) ac_cv_func_calloc_0_nonnull="guessing yes" ;;
- # Guess yes on musl systems.
- *-musl*) ac_cv_func_calloc_0_nonnull="guessing yes" ;;
- # Guess yes on native Windows.
- mingw*) ac_cv_func_calloc_0_nonnull="guessing yes" ;;
- # If we don't know, obey --enable-cross-guesses.
- *) ac_cv_func_calloc_0_nonnull="$gl_cross_guess_normal" ;;
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) ac_cv_func_calloc_0_nonnull="guessing yes" ;;
+ # Guess yes on musl systems.
+ *-musl* | midipix*) ac_cv_func_calloc_0_nonnull="guessing yes" ;;
+ # Guess yes on native Windows.
+ mingw*) ac_cv_func_calloc_0_nonnull="guessing yes" ;;
+ # If we don't know, obey --enable-cross-guesses.
+ *) ac_cv_func_calloc_0_nonnull="$gl_cross_guess_normal" ;;
esac
fi
])
diff --git a/gl/m4/canonicalize.m4 b/gl/m4/canonicalize.m4
index b55d5c06..d319645f 100644
--- a/gl/m4/canonicalize.m4
+++ b/gl/m4/canonicalize.m4
@@ -1,6 +1,6 @@
-# canonicalize.m4 serial 37
+# canonicalize.m4 serial 38
-dnl Copyright (C) 2003-2007, 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2003-2007, 2009-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -12,7 +12,8 @@ AC_DEFUN([gl_FUNC_CANONICALIZE_FILENAME_MODE],
[
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
AC_REQUIRE([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK])
- AC_CHECK_FUNCS_ONCE([canonicalize_file_name faccessat])
+ AC_CHECK_FUNCS_ONCE([canonicalize_file_name])
+ gl_CHECK_FUNCS_ANDROID([faccessat], [[#include <unistd.h>]])
AC_REQUIRE([gl_DOUBLE_SLASH_ROOT])
AC_REQUIRE([gl_FUNC_REALPATH_WORKS])
if test $ac_cv_func_canonicalize_file_name = no; then
@@ -58,7 +59,8 @@ AC_DEFUN([gl_CANONICALIZE_LGPL_SEPARATE],
[
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
AC_REQUIRE([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK])
- AC_CHECK_FUNCS_ONCE([canonicalize_file_name faccessat])
+ AC_CHECK_FUNCS_ONCE([canonicalize_file_name])
+ gl_CHECK_FUNCS_ANDROID([faccessat], [[#include <unistd.h>]])
dnl On native Windows, we use _getcwd(), regardless whether getcwd() is
dnl available through the linker option '-loldnames'.
diff --git a/gl/m4/chdir-long.m4 b/gl/m4/chdir-long.m4
index 4cadc3ff..4a92b30e 100644
--- a/gl/m4/chdir-long.m4
+++ b/gl/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-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2004-2007, 2009-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/chown.m4 b/gl/m4/chown.m4
index 56dda0a6..3e05f85a 100644
--- a/gl/m4/chown.m4
+++ b/gl/m4/chown.m4
@@ -1,7 +1,7 @@
# serial 35
# Determine whether we need the chown wrapper.
-dnl Copyright (C) 1997-2001, 2003-2005, 2007, 2009-2022 Free Software
+dnl Copyright (C) 1997-2001, 2003-2005, 2007, 2009-2023 Free Software
dnl Foundation, Inc.
dnl This file is free software; the Free Software Foundation
diff --git a/gl/m4/clock_time.m4 b/gl/m4/clock_time.m4
index 22535533..d624a73d 100644
--- a/gl/m4/clock_time.m4
+++ b/gl/m4/clock_time.m4
@@ -1,14 +1,14 @@
-# clock_time.m4 serial 11
-dnl Copyright (C) 2002-2006, 2009-2022 Free Software Foundation, Inc.
+# clock_time.m4 serial 12
+dnl Copyright (C) 2002-2006, 2009-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
# Check for clock_getres, clock_gettime and clock_settime,
-# and set LIB_CLOCK_GETTIME.
+# and set CLOCK_TIME_LIB.
# For a program named, say foo, you should add a line like the following
# in the corresponding Makefile.am file:
-# foo_LDADD = $(LDADD) $(LIB_CLOCK_GETTIME)
+# foo_LDADD = $(LDADD) $(CLOCK_TIME_LIB)
AC_DEFUN([gl_CLOCK_TIME],
[
@@ -21,12 +21,15 @@ AC_DEFUN([gl_CLOCK_TIME],
# Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all*
# programs in the package would end up linked with that potentially-shared
# library, inducing unnecessary run-time overhead.
- LIB_CLOCK_GETTIME=
- AC_SUBST([LIB_CLOCK_GETTIME])
+ CLOCK_TIME_LIB=
+ AC_SUBST([CLOCK_TIME_LIB])
gl_saved_libs=$LIBS
AC_SEARCH_LIBS([clock_gettime], [rt posix4],
[test "$ac_cv_search_clock_gettime" = "none required" ||
- LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime])
+ CLOCK_TIME_LIB=$ac_cv_search_clock_gettime])
AC_CHECK_FUNCS([clock_getres clock_gettime clock_settime])
LIBS=$gl_saved_libs
+ # For backward compatibility.
+ LIB_CLOCK_GETTIME="$CLOCK_TIME_LIB"
+ AC_SUBST([LIB_CLOCK_GETTIME])
])
diff --git a/gl/m4/close.m4 b/gl/m4/close.m4
index f95dbc9d..0feabd69 100644
--- a/gl/m4/close.m4
+++ b/gl/m4/close.m4
@@ -1,10 +1,10 @@
-# close.m4 serial 9
-dnl Copyright (C) 2008-2022 Free Software Foundation, Inc.
+# close.m4 serial 10
+dnl Copyright (C) 2008-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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_CLOSE],
+AC_DEFUN_ONCE([gl_FUNC_CLOSE],
[
AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
m4_ifdef([gl_MSVC_INVAL], [
diff --git a/gl/m4/closedir.m4 b/gl/m4/closedir.m4
index cac29d6d..7e702def 100644
--- a/gl/m4/closedir.m4
+++ b/gl/m4/closedir.m4
@@ -1,5 +1,5 @@
-# closedir.m4 serial 6
-dnl Copyright (C) 2011-2022 Free Software Foundation, Inc.
+# closedir.m4 serial 7
+dnl Copyright (C) 2011-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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,20 +12,23 @@ AC_DEFUN([gl_FUNC_CLOSEDIR],
AC_CHECK_FUNCS([closedir])
if test $ac_cv_func_closedir = no; then
HAVE_CLOSEDIR=0
- fi
- dnl Replace closedir() for supporting the gnulib-defined fchdir() function,
- dnl to keep fchdir's bookkeeping up-to-date.
- m4_ifdef([gl_FUNC_FCHDIR], [
- gl_TEST_FCHDIR
- if test $HAVE_FCHDIR = 0; then
- if test $HAVE_CLOSEDIR = 1; then
+ else
+ dnl Replace closedir() on native Windows, to support fdopendir().
+ AC_REQUIRE([gl_DIRENT_DIR])
+ if test $DIR_HAS_FD_MEMBER = 0; then
+ REPLACE_CLOSEDIR=1
+ fi
+ dnl Replace closedir() for supporting the gnulib-defined dirfd() function.
+ case $host_os in
+ os2*) REPLACE_CLOSEDIR=1 ;;
+ esac
+ dnl Replace closedir() for supporting the gnulib-defined fchdir() function,
+ dnl to keep fchdir's bookkeeping up-to-date.
+ m4_ifdef([gl_FUNC_FCHDIR], [
+ gl_TEST_FCHDIR
+ if test $HAVE_FCHDIR = 0; then
REPLACE_CLOSEDIR=1
fi
- fi
- ])
- dnl Replace closedir() for supporting the gnulib-defined dirfd() function.
- case $host_os,$HAVE_CLOSEDIR in
- os2*,1)
- REPLACE_CLOSEDIR=1;;
- esac
+ ])
+ fi
])
diff --git a/gl/m4/codeset.m4 b/gl/m4/codeset.m4
index eb732601..5804f472 100644
--- a/gl/m4/codeset.m4
+++ b/gl/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-2022 Free Software
+dnl Copyright (C) 2000-2002, 2006, 2008-2014, 2016, 2019-2023 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/gl/m4/ctype_h.m4 b/gl/m4/ctype_h.m4
index 6f420de3..219f2ed0 100644
--- a/gl/m4/ctype_h.m4
+++ b/gl/m4/ctype_h.m4
@@ -1,5 +1,5 @@
# ctype_h.m4 serial 9
-dnl Copyright (C) 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/d-ino.m4 b/gl/m4/d-ino.m4
index daefce9e..58f33115 100644
--- a/gl/m4/d-ino.m4
+++ b/gl/m4/d-ino.m4
@@ -1,11 +1,11 @@
-# serial 20
+# serial 21
dnl From Jim Meyering.
dnl
dnl Check whether struct dirent has a member named d_ino.
dnl
-# Copyright (C) 1997, 1999-2001, 2003-2004, 2006-2007, 2009-2022 Free Software
+# Copyright (C) 1997, 1999-2001, 2003-2004, 2006-2007, 2009-2023 Free Software
# Foundation, Inc.
# This file is free software; the Free Software Foundation
@@ -44,6 +44,8 @@ AC_DEFUN([gl_CHECK_TYPE_STRUCT_DIRENT_D_INO],
linux*-gnu*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
# Guess yes on musl systems with Linux kernel.
linux*-musl*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
+ # Guess yes on systems that emulate the Linux system calls.
+ midipix*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
# Guess no on native Windows.
mingw*) gl_cv_struct_dirent_d_ino="guessing no" ;;
# If we don't know, obey --enable-cross-guesses.
diff --git a/gl/m4/d-type.m4 b/gl/m4/d-type.m4
index b8858b19..3f63bbe7 100644
--- a/gl/m4/d-type.m4
+++ b/gl/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-2022 Free Software Foundation, Inc.
+# Copyright (C) 1997, 1999-2004, 2006, 2009-2023 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/gl/m4/dirent_h.m4 b/gl/m4/dirent_h.m4
index ddaca168..b6c189c0 100644
--- a/gl/m4/dirent_h.m4
+++ b/gl/m4/dirent_h.m4
@@ -1,5 +1,5 @@
-# dirent_h.m4 serial 19
-dnl Copyright (C) 2008-2022 Free Software Foundation, Inc.
+# dirent_h.m4 serial 20
+dnl Copyright (C) 2008-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -21,12 +21,29 @@ AC_DEFUN_ONCE([gl_DIRENT_H],
fi
AC_SUBST([HAVE_DIRENT_H])
+ gl_DIRENT_DIR
+
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 <dirent.h>
]], [alphasort closedir dirfd fdopendir opendir readdir rewinddir scandir])
])
+dnl Determine whether <dirent.h> needs to override the DIR type.
+AC_DEFUN_ONCE([gl_DIRENT_DIR],
+[
+ dnl Set DIR_HAS_FD_MEMBER if dirfd() works, i.e. not always returns -1,
+ dnl or has the __KLIBC__ workaround as in lib/dirfd.c.
+ dnl We could use the findings from gl_FUNC_DIRFD and gl_PREREQ_DIRFD, but
+ dnl it's simpler since we know the affected platforms.
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ case "$host_os" in
+ mingw*) DIR_HAS_FD_MEMBER=0 ;;
+ *) DIR_HAS_FD_MEMBER=1 ;;
+ esac
+ AC_SUBST([DIR_HAS_FD_MEMBER])
+])
+
# gl_DIRENT_MODULE_INDICATOR([modulename])
# sets the shell variable that indicates the presence of the given module
# to a C preprocessor expression that will evaluate to 1.
@@ -73,6 +90,8 @@ AC_DEFUN([gl_DIRENT_H_DEFAULTS],
HAVE_SCANDIR=1; AC_SUBST([HAVE_SCANDIR])
HAVE_ALPHASORT=1; AC_SUBST([HAVE_ALPHASORT])
REPLACE_OPENDIR=0; AC_SUBST([REPLACE_OPENDIR])
+ REPLACE_READDIR=0; AC_SUBST([REPLACE_READDIR])
+ REPLACE_REWINDDIR=0; AC_SUBST([REPLACE_REWINDDIR])
REPLACE_CLOSEDIR=0; AC_SUBST([REPLACE_CLOSEDIR])
REPLACE_DIRFD=0; AC_SUBST([REPLACE_DIRFD])
REPLACE_FDOPENDIR=0; AC_SUBST([REPLACE_FDOPENDIR])
diff --git a/gl/m4/dirfd.m4 b/gl/m4/dirfd.m4
index 92001700..7968b128 100644
--- a/gl/m4/dirfd.m4
+++ b/gl/m4/dirfd.m4
@@ -1,8 +1,8 @@
-# serial 26 -*- Autoconf -*-
+# serial 28 -*- Autoconf -*-
dnl Find out how to get the file descriptor associated with an open DIR*.
-# Copyright (C) 2001-2006, 2008-2022 Free Software Foundation, Inc.
+# Copyright (C) 2001-2006, 2008-2023 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -12,7 +12,7 @@ dnl From Jim Meyering
AC_DEFUN([gl_FUNC_DIRFD],
[
AC_REQUIRE([gl_DIRENT_H_DEFAULTS])
- AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_REQUIRE([AC_CANONICAL_HOST])
dnl Persuade glibc <dirent.h> to declare dirfd().
AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
@@ -36,15 +36,20 @@ AC_DEFUN([gl_FUNC_DIRFD],
[gl_cv_func_dirfd_macro=yes],
[gl_cv_func_dirfd_macro=no])])
- # Use the replacement if we have no function or macro with that name,
- # or if OS/2 kLIBC whose dirfd() does not work.
- # Replace only if the system declares dirfd already.
- case $ac_cv_func_dirfd,$gl_cv_func_dirfd_macro,$host_os,$ac_cv_have_decl_dirfd in
- no,no,*,yes | *,*,os2*,yes)
+ if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no; then
+ HAVE_DIRFD=0
+ else
+ HAVE_DIRFD=1
+ dnl Replace dirfd() on native Windows, to support fdopendir().
+ AC_REQUIRE([gl_DIRENT_DIR])
+ if test $DIR_HAS_FD_MEMBER = 0; then
REPLACE_DIRFD=1
- AC_DEFINE([REPLACE_DIRFD], [1],
- [Define to 1 if gnulib's dirfd() replacement is used.]);;
- esac
+ fi
+ dnl OS/2 kLIBC dirfd() does not work.
+ case "$host_os" in
+ os2*) REPLACE_DIRFD=1 ;;
+ esac
+ fi
])
dnl Prerequisites of lib/dirfd.c.
diff --git a/gl/m4/double-slash-root.m4 b/gl/m4/double-slash-root.m4
index 09ff5f0d..1776e5eb 100644
--- a/gl/m4/double-slash-root.m4
+++ b/gl/m4/double-slash-root.m4
@@ -1,5 +1,5 @@
# double-slash-root.m4 serial 4 -*- Autoconf -*-
-dnl Copyright (C) 2006, 2008-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2008-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/dup.m4 b/gl/m4/dup.m4
index 3109a651..fc41c99c 100644
--- a/gl/m4/dup.m4
+++ b/gl/m4/dup.m4
@@ -1,5 +1,5 @@
# dup.m4 serial 7
-dnl Copyright (C) 2011-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/dup2.m4 b/gl/m4/dup2.m4
index 7e777cde..e1cc73e1 100644
--- a/gl/m4/dup2.m4
+++ b/gl/m4/dup2.m4
@@ -1,5 +1,5 @@
#serial 27
-dnl Copyright (C) 2002, 2005, 2007, 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2005, 2007, 2009-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/eealloc.m4 b/gl/m4/eealloc.m4
index a6aa2f88..cb3e08fe 100644
--- a/gl/m4/eealloc.m4
+++ b/gl/m4/eealloc.m4
@@ -1,5 +1,5 @@
# eealloc.m4 serial 3
-dnl Copyright (C) 2003, 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2009-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/environ.m4 b/gl/m4/environ.m4
index 583dac39..741dfc56 100644
--- a/gl/m4/environ.m4
+++ b/gl/m4/environ.m4
@@ -1,5 +1,5 @@
# environ.m4 serial 8
-dnl Copyright (C) 2001-2004, 2006-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2004, 2006-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/errno_h.m4 b/gl/m4/errno_h.m4
index 4be9780a..4c70d225 100644
--- a/gl/m4/errno_h.m4
+++ b/gl/m4/errno_h.m4
@@ -1,5 +1,5 @@
# errno_h.m4 serial 14
-dnl Copyright (C) 2004, 2006, 2008-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2004, 2006, 2008-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/error.m4 b/gl/m4/error.m4
index 7a103446..93a7558b 100644
--- a/gl/m4/error.m4
+++ b/gl/m4/error.m4
@@ -1,6 +1,6 @@
-#serial 15
+#serial 16
-# Copyright (C) 1996-1998, 2001-2004, 2009-2022 Free Software Foundation, Inc.
+# Copyright (C) 1996-1998, 2001-2004, 2009-2023 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -8,15 +8,6 @@
AC_DEFUN([gl_ERROR],
[
- dnl We don't use AC_FUNC_ERROR_AT_LINE any more, because it is no longer
- dnl maintained in Autoconf and because it invokes AC_LIBOBJ.
- AC_CACHE_CHECK([for error_at_line], [ac_cv_lib_error_at_line],
- [AC_LINK_IFELSE(
- [AC_LANG_PROGRAM(
- [[#include <error.h>]],
- [[error_at_line (0, 0, "", 0, "an error occurred");]])],
- [ac_cv_lib_error_at_line=yes],
- [ac_cv_lib_error_at_line=no])])
])
# Prerequisites of lib/error.c.
diff --git a/gl/m4/error_h.m4 b/gl/m4/error_h.m4
new file mode 100644
index 00000000..e8a58f6f
--- /dev/null
+++ b/gl/m4/error_h.m4
@@ -0,0 +1,124 @@
+# error_h.m4 serial 4
+dnl Copyright (C) 1996-2023 Free Software Foundation, Inc.
+dnl This file is free software; the Free 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 Provide a working "error.h".
+
+AC_DEFUN_ONCE([gl_ERROR_H],
+[
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+
+ gl_CHECK_NEXT_HEADERS([error.h])
+ if test $ac_cv_header_error_h = yes; then
+ HAVE_ERROR_H=1
+ else
+ HAVE_ERROR_H=0
+ fi
+ AC_SUBST([HAVE_ERROR_H])
+
+ REPLACE_ERROR=0
+
+ gl_CHECK_FUNCS_ANDROID([error], [[#include <error.h>]])
+ if test $ac_cv_func_error = yes; then
+ HAVE_ERROR=1
+ else
+ HAVE_ERROR=0
+ case "$gl_cv_onwards_func_error" in
+ future*) REPLACE_ERROR=1 ;;
+ esac
+ fi
+
+ dnl We don't use AC_FUNC_ERROR_AT_LINE any more, because it is no longer
+ dnl maintained in Autoconf and because it invokes AC_LIBOBJ.
+ dnl We need to notice a missing declaration, like gl_CHECK_FUNCS_ANDROID does.
+ AC_CHECK_DECL([error_at_line], , , [[#include <error.h>]])
+ if test $ac_cv_have_decl_error_at_line = yes; then
+ AC_CACHE_CHECK([for error_at_line], [ac_cv_lib_error_at_line],
+ [AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <error.h>]],
+ [[error_at_line (0, 0, "", 0, "an error occurred");]])],
+ [ac_cv_lib_error_at_line=yes],
+ [ac_cv_lib_error_at_line=no])])
+ else
+ ac_cv_lib_error_at_line=no
+ fi
+ if test $ac_cv_lib_error_at_line = yes; then
+ HAVE_ERROR_AT_LINE=1
+ else
+ HAVE_ERROR_AT_LINE=0
+ fi
+ REPLACE_ERROR_AT_LINE=0
+
+ if test $ac_cv_func_error = yes && test $ac_cv_lib_error_at_line = yes; then
+ dnl On Android 11, when error_print_progname is set, the output of the
+ dnl error() function contains an extra space.
+ AC_CACHE_CHECK([for working error function],
+ [gl_cv_func_working_error],
+ [if test $cross_compiling != yes; then
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([[
+ #include <error.h>
+ static void print_no_progname (void) {}
+ ]], [[
+ error_print_progname = print_no_progname;
+ error (0, 0, "foo");
+ ]])
+ ],
+ [rm -f conftest.out
+ if test -s conftest$ac_exeext \
+ && ./conftest$ac_exeext 2> conftest.out; then
+ if grep ' ' conftest.out >/dev/null; then
+ gl_cv_func_working_error=no
+ else
+ gl_cv_func_working_error=yes
+ fi
+ else
+ gl_cv_func_working_error=no
+ fi
+ rm -f conftest.out
+ ],
+ [gl_cv_func_working_error=no])
+ else
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[
+ #include <error.h>
+ ]], [[
+ error (0, 0, "foo");
+ ]])
+ ],
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_working_error="guessing yes" ;;
+ # Guess no on Android.
+ linux*-android*) gl_cv_func_working_error="guessing no" ;;
+ # If we don't know, obey --enable-cross-guesses.
+ *) gl_cv_func_working_error="$gl_cross_guess_normal" ;;
+ esac
+ ],
+ [gl_cv_func_working_error=no])
+ fi
+ ])
+ case "$gl_cv_func_working_error" in
+ *no)
+ REPLACE_ERROR=1
+ REPLACE_ERROR_AT_LINE=1
+ ;;
+ esac
+ fi
+
+ if test $HAVE_ERROR = 0 || test $REPLACE_ERROR = 1 \
+ || test $HAVE_ERROR_AT_LINE = 0 || test $REPLACE_ERROR_AT_LINE = 1; then
+ COMPILE_ERROR_C=1
+ else
+ COMPILE_ERROR_C=0
+ fi
+
+ AC_SUBST([HAVE_ERROR])
+ AC_SUBST([HAVE_ERROR_AT_LINE])
+ AC_SUBST([REPLACE_ERROR])
+ AC_SUBST([REPLACE_ERROR_AT_LINE])
+])
diff --git a/gl/m4/exponentd.m4 b/gl/m4/exponentd.m4
index 83ac08bf..163114b8 100644
--- a/gl/m4/exponentd.m4
+++ b/gl/m4/exponentd.m4
@@ -1,9 +1,9 @@
-# exponentd.m4 serial 3
-dnl Copyright (C) 2007-2008, 2010-2022 Free Software Foundation, Inc.
+# exponentd.m4 serial 4
+dnl Copyright (C) 2007-2008, 2010-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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_DOUBLE_EXPONENT_LOCATION],
+AC_DEFUN_ONCE([gl_DOUBLE_EXPONENT_LOCATION],
[
AC_CACHE_CHECK([where to find the exponent in a 'double'],
[gl_cv_cc_double_expbit0],
diff --git a/gl/m4/extensions.m4 b/gl/m4/extensions.m4
index 0b3e4b5a..5336b8da 100644
--- a/gl/m4/extensions.m4
+++ b/gl/m4/extensions.m4
@@ -1,7 +1,7 @@
-# serial 22 -*- Autoconf -*-
+# serial 23 -*- Autoconf -*-
# Enable extensions on systems that normally disable them.
-# Copyright (C) 2003, 2006-2022 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006-2023 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.
@@ -31,7 +31,7 @@ m4_ifndef([AC_CHECK_INCLUDES_DEFAULT],
# its dependencies. This will ensure that the gl_USE_SYSTEM_EXTENSIONS
# invocation occurs in gl_EARLY, not in gl_INIT.
-m4_version_prereq([2.70.1], [], [
+m4_version_prereq([2.72], [], [
# AC_USE_SYSTEM_EXTENSIONS
# ------------------------
@@ -113,11 +113,15 @@ AH_VERBATIM([USE_SYSTEM_EXTENSIONS],
#ifndef __STDC_WANT_IEC_60559_DFP_EXT__
# undef __STDC_WANT_IEC_60559_DFP_EXT__
#endif
+/* Enable extensions specified by C23 Annex F. */
+#ifndef __STDC_WANT_IEC_60559_EXT__
+# undef __STDC_WANT_IEC_60559_EXT__
+#endif
/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */
#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__
# undef __STDC_WANT_IEC_60559_FUNCS_EXT__
#endif
-/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */
+/* Enable extensions specified by C23 Annex H and ISO/IEC TS 18661-3:2015. */
#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__
# undef __STDC_WANT_IEC_60559_TYPES_EXT__
#endif
@@ -187,6 +191,7 @@ dnl it should only be defined when necessary.
AC_DEFINE([__STDC_WANT_IEC_60559_ATTRIBS_EXT__])
AC_DEFINE([__STDC_WANT_IEC_60559_BFP_EXT__])
AC_DEFINE([__STDC_WANT_IEC_60559_DFP_EXT__])
+ AC_DEFINE([__STDC_WANT_IEC_60559_EXT__])
AC_DEFINE([__STDC_WANT_IEC_60559_FUNCS_EXT__])
AC_DEFINE([__STDC_WANT_IEC_60559_TYPES_EXT__])
AC_DEFINE([__STDC_WANT_LIB_EXT2__])
diff --git a/gl/m4/extern-inline.m4 b/gl/m4/extern-inline.m4
index 8a12bddd..f9894d7f 100644
--- a/gl/m4/extern-inline.m4
+++ b/gl/m4/extern-inline.m4
@@ -1,6 +1,6 @@
dnl 'extern inline' a la ISO C99.
-dnl Copyright 2012-2022 Free Software Foundation, Inc.
+dnl Copyright 2012-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -79,7 +79,8 @@ AC_DEFUN([gl_EXTERN_INLINE],
# define _GL_EXTERN_INLINE_STDHEADER_BUG
#endif
#if ((__GNUC__ \
- ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \
+ ? (defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \
+ && !defined __PCC__) \
: (199901L <= __STDC_VERSION__ \
&& !defined __HP_cc \
&& !defined __PGI \
@@ -89,6 +90,7 @@ AC_DEFUN([gl_EXTERN_INLINE],
# define _GL_EXTERN_INLINE extern inline
# define _GL_EXTERN_INLINE_IN_USE
#elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \
+ && !defined __PCC__ \
&& !defined _GL_EXTERN_INLINE_STDHEADER_BUG)
# if defined __GNUC_GNU_INLINE__ && __GNUC_GNU_INLINE__
/* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */
diff --git a/gl/m4/fchdir.m4 b/gl/m4/fchdir.m4
index f85549a3..b587e0ea 100644
--- a/gl/m4/fchdir.m4
+++ b/gl/m4/fchdir.m4
@@ -1,5 +1,5 @@
-# fchdir.m4 serial 27
-dnl Copyright (C) 2006-2022 Free Software Foundation, Inc.
+# fchdir.m4 serial 28
+dnl Copyright (C) 2006-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -34,6 +34,8 @@ AC_DEFUN([gl_FUNC_FCHDIR],
[case "$host_os" in
# Guess yes on Linux systems.
linux-* | linux) gl_cv_func_open_directory_works="guessing yes" ;;
+ # Guess yes on systems that emulate the Linux system calls.
+ midipix*) gl_cv_func_open_directory_works="guessing yes" ;;
# Guess yes on glibc systems.
*-gnu* | gnu*) gl_cv_func_open_directory_works="guessing yes" ;;
# Guess no on native Windows.
diff --git a/gl/m4/fcntl-o.m4 b/gl/m4/fcntl-o.m4
index 4dcde9e0..59d558bd 100644
--- a/gl/m4/fcntl-o.m4
+++ b/gl/m4/fcntl-o.m4
@@ -1,5 +1,5 @@
# fcntl-o.m4 serial 7
-dnl Copyright (C) 2006, 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2009-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/fcntl.m4 b/gl/m4/fcntl.m4
index 428e5709..524a99af 100644
--- a/gl/m4/fcntl.m4
+++ b/gl/m4/fcntl.m4
@@ -1,5 +1,5 @@
# fcntl.m4 serial 11
-dnl Copyright (C) 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/fcntl_h.m4 b/gl/m4/fcntl_h.m4
index 267f98bf..68f4e648 100644
--- a/gl/m4/fcntl_h.m4
+++ b/gl/m4/fcntl_h.m4
@@ -1,6 +1,6 @@
# serial 20
# Configure fcntl.h.
-dnl Copyright (C) 2006-2007, 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2007, 2009-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/fdopendir.m4 b/gl/m4/fdopendir.m4
index 30016084..dfcc46c0 100644
--- a/gl/m4/fdopendir.m4
+++ b/gl/m4/fdopendir.m4
@@ -1,7 +1,7 @@
-# serial 14
+# serial 15
# See if we need to provide fdopendir.
-dnl Copyright (C) 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -49,12 +49,12 @@ DIR *fdopendir (int);
[gl_cv_func_fdopendir_works=yes],
[gl_cv_func_fdopendir_works=no],
[case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;;
- # Guess yes on musl systems.
- *-musl*) gl_cv_func_fdopendir_works="guessing yes" ;;
- # If we don't know, obey --enable-cross-guesses.
- *) gl_cv_func_fdopendir_works="$gl_cross_guess_normal" ;;
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;;
+ # Guess yes on musl systems.
+ *-musl* | midipix*) gl_cv_func_fdopendir_works="guessing yes" ;;
+ # If we don't know, obey --enable-cross-guesses.
+ *) gl_cv_func_fdopendir_works="$gl_cross_guess_normal" ;;
esac
])])
case "$gl_cv_func_fdopendir_works" in
diff --git a/gl/m4/filenamecat.m4 b/gl/m4/filenamecat.m4
index 4546b832..3dab236d 100644
--- a/gl/m4/filenamecat.m4
+++ b/gl/m4/filenamecat.m4
@@ -1,5 +1,5 @@
-# filenamecat.m4 serial 11
-dnl Copyright (C) 2002-2006, 2009-2022 Free Software Foundation, Inc.
+# filenamecat.m4 serial 12
+dnl Copyright (C) 2002-2006, 2009-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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,5 +12,5 @@ AC_DEFUN([gl_FILE_NAME_CONCAT],
AC_DEFUN([gl_FILE_NAME_CONCAT_LGPL],
[
dnl Prerequisites of lib/filenamecat-lgpl.c.
- AC_CHECK_FUNCS_ONCE([mempcpy])
+ gl_CHECK_FUNCS_ANDROID([mempcpy], [[#include <string.h>]])
])
diff --git a/gl/m4/flexmember.m4 b/gl/m4/flexmember.m4
index 3b4237e9..13f7e870 100644
--- a/gl/m4/flexmember.m4
+++ b/gl/m4/flexmember.m4
@@ -1,7 +1,7 @@
# serial 5
# Check for flexible array member support.
-# Copyright (C) 2006, 2009-2022 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2009-2023 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/gl/m4/float_h.m4 b/gl/m4/float_h.m4
index 0e845726..2f0c9c4e 100644
--- a/gl/m4/float_h.m4
+++ b/gl/m4/float_h.m4
@@ -1,5 +1,5 @@
# float_h.m4 serial 13
-dnl Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/flock.m4 b/gl/m4/flock.m4
index 655395e9..e5478766 100644
--- a/gl/m4/flock.m4
+++ b/gl/m4/flock.m4
@@ -1,5 +1,5 @@
# flock.m4 serial 4
-dnl Copyright (C) 2008-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/fnmatch.m4 b/gl/m4/fnmatch.m4
index 9c605595..eba70de2 100644
--- a/gl/m4/fnmatch.m4
+++ b/gl/m4/fnmatch.m4
@@ -1,6 +1,6 @@
-# Check for fnmatch - serial 15. -*- coding: utf-8 -*-
+# Check for fnmatch - serial 17 -*- coding: utf-8 -*-
-# Copyright (C) 2000-2007, 2009-2022 Free Software Foundation, Inc.
+# Copyright (C) 2000-2007, 2009-2023 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.
@@ -40,6 +40,8 @@ AC_DEFUN([gl_FUNC_FNMATCH_POSIX],
AC_RUN_IFELSE(
[AC_LANG_PROGRAM(
[[#include <fnmatch.h>
+ #include <locale.h>
+ #include <stddef.h>
static int
y (char const *pattern, char const *string, int flags)
{
@@ -60,69 +62,94 @@ AC_DEFUN([gl_FUNC_FNMATCH_POSIX],
static char const bs_1[] = { '\\\\' - 1, 0 };
static char const bs01[] = { '\\\\' + 1, 0 };
int result = 0;
+ /* ==== Start of tests in the "C" locale ==== */
+ /* These are sanity checks. They all succeed on current platforms. */
if (!n ("a*", "", 0))
return 1;
if (!y ("a*", "abc", 0))
return 1;
- if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */
- return 1;
if (!n ("d*/*1", "d/s/1", FNM_PATHNAME))
- return 2;
+ return 1;
if (!y ("a\\\\bc", "abc", 0))
- return 3;
+ return 1;
if (!n ("a\\\\bc", "abc", FNM_NOESCAPE))
- return 3;
+ return 1;
if (!y ("*x", ".x", 0))
- return 4;
+ return 1;
if (!n ("*x", ".x", FNM_PERIOD))
- return 4;
+ return 1;
+ /* glibc bug <https://sourceware.org/bugzilla/show_bug.cgi?id=361>
+ exists in glibc 2.3.3, fixed in glibc 2.5. */
if (!y (Apat, "\\\\", 0))
- return 5;
+ result |= 2;
if (!y (Apat, "A", 0))
- return 5;
+ result |= 2;
if (!y (apat, "\\\\", 0))
- return 5;
+ result |= 2;
if (!y (apat, "a", 0))
- return 5;
+ result |= 2;
if (!(n (Apat, A_1, 0) == ('A' < '\\\\')))
- return 5;
+ result |= 2;
if (!(n (apat, a_1, 0) == ('a' < '\\\\')))
- return 5;
+ result |= 2;
if (!(y (Apat, A01, 0) == ('A' < '\\\\')))
- return 5;
+ result |= 2;
if (!(y (apat, a01, 0) == ('a' < '\\\\')))
- return 5;
+ result |= 2;
if (!(y (Apat, bs_1, 0) == ('A' < '\\\\')))
- return 5;
+ result |= 2;
if (!(y (apat, bs_1, 0) == ('a' < '\\\\')))
- return 5;
+ result |= 2;
if (!(n (Apat, bs01, 0) == ('A' < '\\\\')))
- return 5;
+ result |= 2;
if (!(n (apat, bs01, 0) == ('a' < '\\\\')))
- return 5;
- $gl_fnmatch_gnu_start
- if (!y ("xxXX", "xXxX", FNM_CASEFOLD))
+ result |= 2;
+ /* glibc bug <https://sourceware.org/bugzilla/show_bug.cgi?id=12378>
+ exists in glibc 2.12, fixed in glibc 2.13. */
+ if (!y ("[/b", "[/b", 0)) /*"]]"*/
+ result |= 4;
+ /* This test fails on FreeBSD 13.2, NetBSD 9.3, Cygwin 3.4.6. */
+ if (!y ("[[:alnum:]]", "a", 0))
result |= 8;
+ $gl_fnmatch_gnu_start /* ==== Start of GNU extensions tests ==== */
+ /* Sanity checks, mainly to check the presence of the FNM_* macros. */
+ if (!y ("xxXX", "xXxX", FNM_CASEFOLD))
+ result |= 64;
if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH))
- result |= 16;
+ result |= 64;
if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME))
- result |= 32;
+ result |= 64;
if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR))
result |= 64;
if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR))
result |= 64;
if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR))
result |= 64;
- $gl_fnmatch_gnu_end
+ $gl_fnmatch_gnu_end /* ==== End of GNU extensions tests ==== */
+ /* ==== End of tests in the "C" locale ==== */
+ /* ==== Start of tests that require a specific locale ==== */
+ /* This test fails on Solaris 11.4. */
+ if (setlocale (LC_ALL, "en_US.UTF-8") != NULL)
+ {
+ if (!n ("[!a-z]", "", 0))
+ result |= 16;
+ }
+ /* This test fails on NetBSD 9.3, Android 13. */
+ if (setlocale (LC_ALL, "C.UTF-8") != NULL)
+ {
+ if (!y ("x?y", "x\\303\\274y", 0))
+ result |= 32;
+ }
+ /* ==== End of tests that require a specific locale ==== */
return result;
]])],
[eval "$gl_fnmatch_cache_var=yes"],
[eval "$gl_fnmatch_cache_var=no"],
[case "$host_os" in
- # Guess yes on musl systems.
- *-musl*) eval "$gl_fnmatch_cache_var=\"guessing yes\"" ;;
- # Guess no otherwise, even on glibc systems.
- *) eval "$gl_fnmatch_cache_var=\"guessing no\"" ;;
+ # Guess yes on musl systems.
+ *-musl* | midipix*) eval "$gl_fnmatch_cache_var=\"guessing yes\"" ;;
+ # Guess no otherwise, even on glibc systems.
+ *) eval "$gl_fnmatch_cache_var=\"guessing no\"" ;;
esac
])
])
diff --git a/gl/m4/fnmatch_h.m4 b/gl/m4/fnmatch_h.m4
index ae5cd869..40a62b6a 100644
--- a/gl/m4/fnmatch_h.m4
+++ b/gl/m4/fnmatch_h.m4
@@ -1,5 +1,5 @@
# fnmatch_h.m4 serial 8
-dnl Copyright (C) 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/free.m4 b/gl/m4/free.m4
index dfeecd2b..0389dea3 100644
--- a/gl/m4/free.m4
+++ b/gl/m4/free.m4
@@ -1,5 +1,5 @@
# free.m4 serial 6
-# Copyright (C) 2003-2005, 2009-2022 Free Software Foundation, Inc.
+# Copyright (C) 2003-2005, 2009-2023 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/gl/m4/fstat.m4 b/gl/m4/fstat.m4
index 9e61bcce..7cb2edb0 100644
--- a/gl/m4/fstat.m4
+++ b/gl/m4/fstat.m4
@@ -1,5 +1,5 @@
# fstat.m4 serial 8
-dnl Copyright (C) 2011-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/fstatat.m4 b/gl/m4/fstatat.m4
index e8604a6a..08307691 100644
--- a/gl/m4/fstatat.m4
+++ b/gl/m4/fstatat.m4
@@ -1,5 +1,5 @@
# fstatat.m4 serial 4
-dnl Copyright (C) 2004-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2004-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/getcwd-abort-bug.m4 b/gl/m4/getcwd-abort-bug.m4
index 2174e3f9..cd1240c7 100644
--- a/gl/m4/getcwd-abort-bug.m4
+++ b/gl/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-2022 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2009-2023 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/gl/m4/getcwd-path-max.m4 b/gl/m4/getcwd-path-max.m4
index e1204559..516c0789 100644
--- a/gl/m4/getcwd-path-max.m4
+++ b/gl/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-2022 Free Software Foundation, Inc.
+# Copyright (C) 2003-2007, 2009-2023 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/gl/m4/getcwd.m4 b/gl/m4/getcwd.m4
index 076ca314..e95db056 100644
--- a/gl/m4/getcwd.m4
+++ b/gl/m4/getcwd.m4
@@ -1,12 +1,12 @@
# getcwd.m4 - check for working getcwd that is compatible with glibc
-# Copyright (C) 2001, 2003-2007, 2009-2022 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003-2007, 2009-2023 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# Written by Paul Eggert.
-# serial 19
+# serial 20
AC_DEFUN([gl_FUNC_GETCWD_NULL],
[
@@ -53,6 +53,8 @@ AC_DEFUN([gl_FUNC_GETCWD_NULL],
*-gnu* | gnu*) gl_cv_func_getcwd_null="guessing yes";;
# Guess yes on musl systems.
*-musl*) gl_cv_func_getcwd_null="guessing yes";;
+ # Guess yes on systems that emulate the Linux system calls.
+ midipix*) gl_cv_func_getcwd_null="guessing yes";;
# Guess yes on Cygwin.
cygwin*) gl_cv_func_getcwd_null="guessing yes";;
# If we don't know, obey --enable-cross-guesses.
diff --git a/gl/m4/getdelim.m4 b/gl/m4/getdelim.m4
index 0b63b553..60555b97 100644
--- a/gl/m4/getdelim.m4
+++ b/gl/m4/getdelim.m4
@@ -1,6 +1,6 @@
-# getdelim.m4 serial 15
+# getdelim.m4 serial 19
-dnl Copyright (C) 2005-2007, 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2007, 2009-2023 Free Software Foundation, Inc.
dnl
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -11,21 +11,31 @@ AC_PREREQ([2.59])
AC_DEFUN([gl_FUNC_GETDELIM],
[
AC_REQUIRE([gl_STDIO_H_DEFAULTS])
- AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_REQUIRE([AC_CANONICAL_HOST])
dnl Persuade glibc <stdio.h> to declare getdelim().
AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
AC_CHECK_DECLS_ONCE([getdelim])
- AC_CHECK_FUNCS_ONCE([getdelim])
+ gl_CHECK_FUNCS_ANDROID([getdelim], [[#include <stdio.h>]])
if test $ac_cv_func_getdelim = yes; then
HAVE_GETDELIM=1
dnl Found it in some library. Verify that it works.
AC_CACHE_CHECK([for working getdelim function],
[gl_cv_func_working_getdelim],
- [echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data
- AC_RUN_IFELSE([AC_LANG_SOURCE([[
+ [case "$host_os" in
+ darwin*)
+ dnl On macOS 10.13, valgrind detected an out-of-bounds read during
+ dnl the GNU sed test suite:
+ dnl Invalid read of size 16
+ dnl at 0x100EE6A05: _platform_memchr$VARIANT$Base (in /usr/lib/system/libsystem_platform.dylib)
+ dnl by 0x100B7B0BD: getdelim (in /usr/lib/system/libsystem_c.dylib)
+ dnl by 0x10000B0BE: ck_getdelim (utils.c:254)
+ gl_cv_func_working_getdelim=no ;;
+ *)
+ echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
# include <stdio.h>
# include <stdlib.h>
# include <string.h>
@@ -57,26 +67,28 @@ AC_DEFUN([gl_FUNC_GETDELIM],
return 0;
}
]])],
- [gl_cv_func_working_getdelim=yes],
- [gl_cv_func_working_getdelim=no],
- [dnl We're cross compiling.
- dnl Guess it works on glibc2 systems and musl systems.
- AC_EGREP_CPP([Lucky GNU user],
- [
+ [gl_cv_func_working_getdelim=yes],
+ [gl_cv_func_working_getdelim=no],
+ [dnl We're cross compiling.
+ dnl Guess it works on glibc2 systems and musl systems.
+ AC_EGREP_CPP([Lucky GNU user],
+ [
#include <features.h>
#ifdef __GNU_LIBRARY__
#if (__GLIBC__ >= 2) && !defined __UCLIBC__
Lucky GNU user
#endif
#endif
- ],
- [gl_cv_func_working_getdelim="guessing yes"],
- [case "$host_os" in
- *-musl*) gl_cv_func_working_getdelim="guessing yes" ;;
- *) gl_cv_func_working_getdelim="$gl_cross_guess_normal" ;;
- esac
- ])
- ])
+ ],
+ [gl_cv_func_working_getdelim="guessing yes"],
+ [case "$host_os" in
+ *-musl* | midipix*) gl_cv_func_working_getdelim="guessing yes" ;;
+ *) gl_cv_func_working_getdelim="$gl_cross_guess_normal" ;;
+ esac
+ ])
+ ])
+ ;;
+ esac
])
case "$gl_cv_func_working_getdelim" in
*yes) ;;
@@ -84,6 +96,9 @@ AC_DEFUN([gl_FUNC_GETDELIM],
esac
else
HAVE_GETDELIM=0
+ case "$gl_cv_onwards_func_getdelim" in
+ future*) REPLACE_GETDELIM=1 ;;
+ esac
fi
if test $ac_cv_have_decl_getdelim = no; then
diff --git a/gl/m4/getdtablesize.m4 b/gl/m4/getdtablesize.m4
index 6134eaac..8bcda905 100644
--- a/gl/m4/getdtablesize.m4
+++ b/gl/m4/getdtablesize.m4
@@ -1,5 +1,5 @@
# getdtablesize.m4 serial 8
-dnl Copyright (C) 2008-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/getline.m4 b/gl/m4/getline.m4
index ca0301d2..83e7e931 100644
--- a/gl/m4/getline.m4
+++ b/gl/m4/getline.m4
@@ -1,6 +1,6 @@
-# getline.m4 serial 30
+# getline.m4 serial 33
-dnl Copyright (C) 1998-2003, 2005-2007, 2009-2022 Free Software Foundation,
+dnl Copyright (C) 1998-2003, 2005-2007, 2009-2023 Free Software Foundation,
dnl Inc.
dnl
dnl This file is free software; the Free Software Foundation
@@ -23,12 +23,9 @@ AC_DEFUN([gl_FUNC_GETLINE],
AC_CHECK_DECLS_ONCE([getline])
- gl_getline_needs_run_time_check=no
- AC_CHECK_FUNC([getline],
- [dnl Found it in some library. Verify that it works.
- gl_getline_needs_run_time_check=yes],
- [am_cv_func_working_getline=no])
- if test $gl_getline_needs_run_time_check = yes; then
+ gl_CHECK_FUNCS_ANDROID([getline], [[#include <stdio.h>]])
+ if test $ac_cv_func_getline = yes; then
+ dnl Found it in some library. Verify that it works.
AC_CACHE_CHECK([for working getline function],
[am_cv_func_working_getline],
[echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data
@@ -79,12 +76,17 @@ AC_DEFUN([gl_FUNC_GETLINE],
],
[am_cv_func_working_getline="guessing yes"],
[case "$host_os" in
- *-musl*) am_cv_func_working_getline="guessing yes" ;;
- *) am_cv_func_working_getline="$gl_cross_guess_normal" ;;
+ *-musl* | midipix*) am_cv_func_working_getline="guessing yes" ;;
+ *) am_cv_func_working_getline="$gl_cross_guess_normal" ;;
esac
])
])
])
+ else
+ am_cv_func_working_getline=no
+ case "$gl_cv_onwards_func_getline" in
+ future*) REPLACE_GETLINE=1 ;;
+ esac
fi
if test $ac_cv_have_decl_getline = no; then
diff --git a/gl/m4/getlogin.m4 b/gl/m4/getlogin.m4
index d51d6cfd..0686b5f0 100644
--- a/gl/m4/getlogin.m4
+++ b/gl/m4/getlogin.m4
@@ -1,5 +1,5 @@
-# getlogin.m4 serial 5
-dnl Copyright (C) 2010-2022 Free Software Foundation, Inc.
+# getlogin.m4 serial 6
+dnl Copyright (C) 2010-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -24,9 +24,12 @@ AC_DEFUN([gl_LIB_GETLOGIN],
AC_REQUIRE([AC_CANONICAL_HOST])
case $host_os in
mingw*)
- LIB_GETLOGIN='-ladvapi32' ;;
+ GETLOGIN_LIB='-ladvapi32' ;;
*)
- LIB_GETLOGIN= ;;
+ GETLOGIN_LIB= ;;
esac
+ AC_SUBST([GETLOGIN_LIB])
+ dnl For backward compatibility.
+ LIB_GETLOGIN="$GETLOGIN_LIB"
AC_SUBST([LIB_GETLOGIN])
])
diff --git a/gl/m4/getlogin_r.m4 b/gl/m4/getlogin_r.m4
index c60ef34d..4383ea6a 100644
--- a/gl/m4/getlogin_r.m4
+++ b/gl/m4/getlogin_r.m4
@@ -1,6 +1,6 @@
-#serial 13
+#serial 15
-# Copyright (C) 2005-2007, 2009-2022 Free Software Foundation, Inc.
+# Copyright (C) 2005-2007, 2009-2023 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -25,9 +25,12 @@ AC_DEFUN([gl_FUNC_GETLOGIN_R],
HAVE_DECL_GETLOGIN_R=0
fi
- AC_CHECK_FUNCS_ONCE([getlogin_r])
+ gl_CHECK_FUNCS_ANDROID([getlogin_r], [[#include <unistd.h>]])
if test $ac_cv_func_getlogin_r = no; then
HAVE_GETLOGIN_R=0
+ case "$gl_cv_onwards_func_getlogin_r" in
+ future*) REPLACE_GETLOGIN_R=1 ;;
+ esac
else
HAVE_GETLOGIN_R=1
dnl On Mac OS X 10.13 and OSF/1 5.1, getlogin_r returns a truncated result
diff --git a/gl/m4/getopt.m4 b/gl/m4/getopt.m4
index ff78ed53..7981a095 100644
--- a/gl/m4/getopt.m4
+++ b/gl/m4/getopt.m4
@@ -1,5 +1,5 @@
# getopt.m4 serial 48
-dnl Copyright (C) 2002-2006, 2008-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2008-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/getpagesize.m4 b/gl/m4/getpagesize.m4
index 19f894ca..79925a73 100644
--- a/gl/m4/getpagesize.m4
+++ b/gl/m4/getpagesize.m4
@@ -1,5 +1,5 @@
# getpagesize.m4 serial 10
-dnl Copyright (C) 2002, 2004-2005, 2007, 2009-2022 Free Software Foundation,
+dnl Copyright (C) 2002, 2004-2005, 2007, 2009-2023 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/gl/m4/getprogname.m4 b/gl/m4/getprogname.m4
index b26146e9..2b741f50 100644
--- a/gl/m4/getprogname.m4
+++ b/gl/m4/getprogname.m4
@@ -1,16 +1,33 @@
# getprogname.m4 - check for getprogname or replacements for it
-# Copyright (C) 2016-2022 Free Software Foundation, Inc.
+# Copyright (C) 2016-2023 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 4
+# serial 8
AC_DEFUN([gl_FUNC_GETPROGNAME],
[
- AC_CHECK_FUNCS_ONCE([getprogname getexecname])
+ AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+ gl_CHECK_FUNCS_ANDROID([getprogname], [[#include <stdlib.h>]])
+ if test $ac_cv_func_getprogname = no; then
+ HAVE_GETPROGNAME=0
+ case "$gl_cv_onwards_func_getprogname" in
+ future*) REPLACE_GETPROGNAME=1 ;;
+ esac
+ fi
+ AC_CHECK_DECLS([program_invocation_name],
+ [],
+ [HAVE_DECL_PROGRAM_INVOCATION_NAME=0],
+ [[#include <errno.h>]])
+])
+
+AC_DEFUN([gl_PREREQ_GETPROGNAME],
+[
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+ AC_CHECK_FUNCS_ONCE([getexecname])
ac_found=0
AC_CHECK_DECLS([program_invocation_name], [ac_found=1], [],
[#include <errno.h>])
diff --git a/gl/m4/getrandom.m4 b/gl/m4/getrandom.m4
index 6ca71500..7b7f9ce2 100644
--- a/gl/m4/getrandom.m4
+++ b/gl/m4/getrandom.m4
@@ -1,5 +1,5 @@
-# getrandom.m4 serial 8
-dnl Copyright 2020-2022 Free Software Foundation, Inc.
+# getrandom.m4 serial 11
+dnl Copyright 2020-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -9,9 +9,18 @@ dnl Written by Paul Eggert.
AC_DEFUN([gl_FUNC_GETRANDOM],
[
AC_REQUIRE([gl_SYS_RANDOM_H_DEFAULTS])
- AC_CHECK_FUNCS_ONCE([getrandom])
+ gl_CHECK_FUNCS_ANDROID([getrandom],
+ [[/* Additional includes are needed before <sys/random.h> on uClibc
+ and Mac OS X. */
+ #include <sys/types.h>
+ #include <stdlib.h>
+ #include <sys/random.h>
+ ]])
if test "$ac_cv_func_getrandom" != yes; then
HAVE_GETRANDOM=0
+ case "$gl_cv_onwards_func_getrandom" in
+ future*) REPLACE_GETRANDOM=1 ;;
+ esac
else
dnl On Solaris 11.4 the return type is 'int', not 'ssize_t'.
AC_CACHE_CHECK([whether getrandom is compatible with its GNU+BSD signature],
@@ -56,13 +65,16 @@ AC_DEFUN([gl_FUNC_GETRANDOM],
if test $gl_cv_lib_assume_bcrypt = yes; then
AC_DEFINE([HAVE_LIB_BCRYPT], [1],
[Define to 1 if the bcrypt library is guaranteed to be present.])
- LIB_GETRANDOM='-lbcrypt'
+ GETRANDOM_LIB='-lbcrypt'
else
- LIB_GETRANDOM='-ladvapi32'
+ GETRANDOM_LIB='-ladvapi32'
fi
;;
*)
- LIB_GETRANDOM= ;;
+ GETRANDOM_LIB= ;;
esac
+ AC_SUBST([GETRANDOM_LIB])
+ dnl For backward compatibility.
+ LIB_GETRANDOM="$GETRANDOM_LIB"
AC_SUBST([LIB_GETRANDOM])
])
diff --git a/gl/m4/gettime.m4 b/gl/m4/gettime.m4
index f0aeb4d0..ec1f97ee 100644
--- a/gl/m4/gettime.m4
+++ b/gl/m4/gettime.m4
@@ -1,5 +1,5 @@
-# gettime.m4 serial 11
-dnl Copyright (C) 2002, 2004-2006, 2009-2022 Free Software Foundation, Inc.
+# gettime.m4 serial 14
+dnl Copyright (C) 2002, 2004-2006, 2009-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -9,7 +9,54 @@ AC_DEFUN([gl_GETTIME],
dnl Prerequisites of lib/gettime.c.
AC_REQUIRE([gl_CLOCK_TIME])
AC_REQUIRE([gl_TIMESPEC])
- AC_CHECK_FUNCS_ONCE([timespec_get])
+
+ AC_REQUIRE([gl_CHECK_FUNC_TIMESPEC_GET])
+ if test $gl_cv_func_timespec_get = yes; then
+ AC_DEFINE([HAVE_TIMESPEC_GET], [1],
+ [Define if you have the timespec_get function.])
+ fi
+])
+
+dnl Tests whether the function timespec_get exists.
+dnl Sets gl_cv_func_timespec_get and gl_cv_onwards_func_timespec_get.
+AC_DEFUN([gl_CHECK_FUNC_TIMESPEC_GET],
+[
+ AC_REQUIRE([AC_CANONICAL_HOST])
+
+ dnl Persuade OpenBSD <time.h> to declare timespec_get().
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+ dnl We can't use AC_CHECK_FUNC here, because timespec_get() is defined as a
+ dnl static inline function in <time.h> on MSVC 14.
+ dnl But at the same time, we need to notice a missing declaration, like
+ dnl gl_CHECK_FUNCS_ANDROID does.
+ AC_CHECK_DECL([timespec_get], , , [[#include <time.h>]])
+ AC_CACHE_CHECK([for timespec_get], [gl_cv_onwards_func_timespec_get],
+ [if test $ac_cv_have_decl_timespec_get = yes; then
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <time.h>
+ struct timespec ts;
+ ]],
+ [[return timespec_get (&ts, 0);]])
+ ],
+ [gl_cv_onwards_func_timespec_get=yes],
+ [gl_cv_onwards_func_timespec_get=no])
+ else
+ gl_cv_onwards_func_timespec_get=no
+ fi
+ case "$host_os" in
+ linux*-android*)
+ if test $gl_cv_onwards_func_timespec_get = no; then
+ gl_cv_onwards_func_timespec_get='future OS version'
+ fi
+ ;;
+ esac
+ ])
+ case "$gl_cv_onwards_func_timespec_get" in
+ future*) gl_cv_func_timespec_get=no ;;
+ *) gl_cv_func_timespec_get=$gl_cv_onwards_func_timespec_get ;;
+ esac
])
AC_DEFUN([gl_GETTIME_RES],
diff --git a/gl/m4/gettimeofday.m4 b/gl/m4/gettimeofday.m4
index f729601b..5051d61c 100644
--- a/gl/m4/gettimeofday.m4
+++ b/gl/m4/gettimeofday.m4
@@ -1,6 +1,6 @@
# serial 29
-# Copyright (C) 2001-2003, 2005, 2007, 2009-2022 Free Software Foundation, Inc.
+# Copyright (C) 2001-2003, 2005, 2007, 2009-2023 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/gl/m4/glob.m4 b/gl/m4/glob.m4
index f59b84ff..62be6a33 100644
--- a/gl/m4/glob.m4
+++ b/gl/m4/glob.m4
@@ -1,5 +1,5 @@
-# glob.m4 serial 26
-dnl Copyright (C) 2005-2007, 2009-2022 Free Software Foundation, Inc.
+# glob.m4 serial 30
+dnl Copyright (C) 2005-2007, 2009-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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,9 +12,13 @@ AC_DEFUN([gl_GLOB],
[
AC_REQUIRE([gl_GLOB_H])
- AC_CHECK_FUNCS_ONCE([glob glob_pattern_p])
+ AC_CHECK_FUNCS_ONCE([glob_pattern_p])
+ gl_CHECK_FUNCS_ANDROID([glob], [[#include <glob.h>]])
if test $ac_cv_func_glob = no; then
HAVE_GLOB=0
+ case "$gl_cv_onwards_func_glob" in
+ future*) REPLACE_GLOB=1 ;;
+ esac
else
AC_CACHE_CHECK([for GNU glob interface version 1 or 2],
@@ -125,5 +129,6 @@ AC_DEFUN([gl_PREREQ_GLOB],
[
AC_REQUIRE([gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE])
AC_CHECK_HEADERS_ONCE([unistd.h])
- AC_CHECK_FUNCS_ONCE([getlogin_r getpwnam_r])
+ gl_CHECK_FUNCS_ANDROID([getlogin_r], [[#include <unistd.h>]])
+ gl_CHECK_FUNCS_ANDROID([getpwnam_r], [[#include <pwd.h>]])
])
diff --git a/gl/m4/glob_h.m4 b/gl/m4/glob_h.m4
index 41ffde23..3ab5031c 100644
--- a/gl/m4/glob_h.m4
+++ b/gl/m4/glob_h.m4
@@ -1,5 +1,5 @@
# glob_h.m4 serial 9
-dnl Copyright (C) 2018-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2018-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/gnulib-common.m4 b/gl/m4/gnulib-common.m4
index 30911d15..2426eb63 100644
--- a/gl/m4/gnulib-common.m4
+++ b/gl/m4/gnulib-common.m4
@@ -1,5 +1,5 @@
-# gnulib-common.m4 serial 73
-dnl Copyright (C) 2007-2022 Free Software Foundation, Inc.
+# gnulib-common.m4 serial 87
+dnl Copyright (C) 2007-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -15,6 +15,10 @@ AC_DEFUN([gl_COMMON], [
AC_REQUIRE([gl_ZZGNULIB])
])
AC_DEFUN([gl_COMMON_BODY], [
+ AH_VERBATIM([0witness],
+[/* Witness that <config.h> has been included. */
+#define _GL_CONFIG_H_INCLUDED 1
+])
AH_VERBATIM([_GL_GNUC_PREREQ],
[/* True if the compiler says it groks GNU C version MAJOR.MINOR. */
#if defined __GNUC__ && defined __GNUC_MINOR__
@@ -38,6 +42,11 @@ AC_DEFUN([gl_COMMON_BODY], [
AIX system header files and several gnulib header files use precisely
this syntax with 'extern'. */
# define _Noreturn [[noreturn]]
+# elif (defined __clang__ && __clang_major__ < 16 \
+ && defined _GL_WORK_AROUND_LLVM_BUG_59792)
+ /* Compile with -D_GL_WORK_AROUND_LLVM_BUG_59792 to work around
+ that rare LLVM bug, though you may get many false-alarm warnings. */
+# define _Noreturn
# elif ((!defined __cplusplus || defined __clang__) \
&& (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \
|| (!defined __STRICT_ANSI__ \
@@ -71,7 +80,7 @@ AC_DEFUN([gl_COMMON_BODY], [
&& (!defined __clang_minor__ \
|| (defined __apple_build_version__ \
? 6000000 <= __apple_build_version__ \
- : 3 < __clang_major__ + (5 <= __clang_minor__))))
+ : 5 <= __clang_major__)))
# define _GL_HAS_ATTRIBUTE(attr) __has_attribute (__##attr##__)
#else
# define _GL_HAS_ATTRIBUTE(attr) _GL_ATTR_##attr
@@ -105,17 +114,27 @@ AC_DEFUN([gl_COMMON_BODY], [
# define _GL_ATTR_warn_unused_result _GL_GNUC_PREREQ (3, 4)
#endif
-#ifdef __has_c_attribute
-# if ((defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) <= 201710 \
- && _GL_GNUC_PREREQ (4, 6))
-# pragma GCC diagnostic ignored "-Wpedantic"
+/* Disable GCC -Wpedantic if using __has_c_attribute and this is not C23+. */
+#if (defined __has_c_attribute && _GL_GNUC_PREREQ (4, 6) \
+ && (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) <= 201710)
+# pragma GCC diagnostic ignored "-Wpedantic"
+#endif
+
+/* Define if, in a function declaration, the attributes in bracket syntax
+ [[...]] must come before the attributes in __attribute__((...)) syntax.
+ If this is defined, it is best to avoid the bracket syntax, so that the
+ various _GL_ATTRIBUTE_* can be cumulated on the same declaration in any
+ order. */
+#ifdef __cplusplus
+# if defined __clang__
+# define _GL_BRACKET_BEFORE_ATTRIBUTE 1
# endif
-# define _GL_HAS_C_ATTRIBUTE(attr) __has_c_attribute (__##attr##__)
#else
-# define _GL_HAS_C_ATTRIBUTE(attr) 0
+# if defined __GNUC__ && !defined __clang__
+# define _GL_BRACKET_BEFORE_ATTRIBUTE 1
+# endif
#endif
-
-]dnl There is no _GL_ATTRIBUTE_ALIGNED; use stdalign's _Alignas instead.
+]dnl There is no _GL_ATTRIBUTE_ALIGNED; use stdalign's alignas instead.
[
/* _GL_ATTRIBUTE_ALLOC_SIZE ((N)) declares that the Nth argument of the function
is the size of the returned memory block.
@@ -123,29 +142,35 @@ AC_DEFUN([gl_COMMON_BODY], [
by the Nth argument of the function is the size of the returned memory block.
*/
/* Applies to: function, pointer to function, function types. */
-#if _GL_HAS_ATTRIBUTE (alloc_size)
-# define _GL_ATTRIBUTE_ALLOC_SIZE(args) __attribute__ ((__alloc_size__ args))
-#else
-# define _GL_ATTRIBUTE_ALLOC_SIZE(args)
+#ifndef _GL_ATTRIBUTE_ALLOC_SIZE
+# if _GL_HAS_ATTRIBUTE (alloc_size)
+# define _GL_ATTRIBUTE_ALLOC_SIZE(args) __attribute__ ((__alloc_size__ args))
+# else
+# define _GL_ATTRIBUTE_ALLOC_SIZE(args)
+# endif
#endif
/* _GL_ATTRIBUTE_ALWAYS_INLINE tells that the compiler should always inline the
function and report an error if it cannot do so. */
/* Applies to: function. */
-#if _GL_HAS_ATTRIBUTE (always_inline)
-# define _GL_ATTRIBUTE_ALWAYS_INLINE __attribute__ ((__always_inline__))
-#else
-# define _GL_ATTRIBUTE_ALWAYS_INLINE
+#ifndef _GL_ATTRIBUTE_ALWAYS_INLINE
+# if _GL_HAS_ATTRIBUTE (always_inline)
+# define _GL_ATTRIBUTE_ALWAYS_INLINE __attribute__ ((__always_inline__))
+# else
+# define _GL_ATTRIBUTE_ALWAYS_INLINE
+# endif
#endif
/* _GL_ATTRIBUTE_ARTIFICIAL declares that the function is not important to show
in stack traces when debugging. The compiler should omit the function from
stack traces. */
/* Applies to: function. */
-#if _GL_HAS_ATTRIBUTE (artificial)
-# define _GL_ATTRIBUTE_ARTIFICIAL __attribute__ ((__artificial__))
-#else
-# define _GL_ATTRIBUTE_ARTIFICIAL
+#ifndef _GL_ATTRIBUTE_ARTIFICIAL
+# if _GL_HAS_ATTRIBUTE (artificial)
+# define _GL_ATTRIBUTE_ARTIFICIAL __attribute__ ((__artificial__))
+# else
+# define _GL_ATTRIBUTE_ARTIFICIAL
+# endif
#endif
/* _GL_ATTRIBUTE_COLD declares that the function is rarely executed. */
@@ -153,14 +178,16 @@ AC_DEFUN([gl_COMMON_BODY], [
/* Avoid __attribute__ ((cold)) on MinGW; see thread starting at
<https://lists.gnu.org/r/emacs-devel/2019-04/msg01152.html>.
Also, Oracle Studio 12.6 requires 'cold' not '__cold__'. */
-#if _GL_HAS_ATTRIBUTE (cold) && !defined __MINGW32__
-# ifndef __SUNPRO_C
-# define _GL_ATTRIBUTE_COLD __attribute__ ((__cold__))
+#ifndef _GL_ATTRIBUTE_COLD
+# if _GL_HAS_ATTRIBUTE (cold) && !defined __MINGW32__
+# ifndef __SUNPRO_C
+# define _GL_ATTRIBUTE_COLD __attribute__ ((__cold__))
+# else
+# define _GL_ATTRIBUTE_COLD __attribute__ ((cold))
+# endif
# else
-# define _GL_ATTRIBUTE_COLD __attribute__ ((cold))
+# define _GL_ATTRIBUTE_COLD
# endif
-#else
-# define _GL_ATTRIBUTE_COLD
#endif
/* _GL_ATTRIBUTE_CONST declares that it is OK for a compiler to omit duplicate
@@ -170,10 +197,12 @@ AC_DEFUN([gl_COMMON_BODY], [
forever, and does not call longjmp.
(This attribute is stricter than _GL_ATTRIBUTE_PURE.) */
/* Applies to: functions. */
-#if _GL_HAS_ATTRIBUTE (const)
-# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__))
-#else
-# define _GL_ATTRIBUTE_CONST
+#ifndef _GL_ATTRIBUTE_CONST
+# if _GL_HAS_ATTRIBUTE (const)
+# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__))
+# else
+# define _GL_ATTRIBUTE_CONST
+# endif
#endif
/* _GL_ATTRIBUTE_DEALLOC (F, I) declares that the function returns pointers
@@ -182,16 +211,25 @@ AC_DEFUN([gl_COMMON_BODY], [
_GL_ATTRIBUTE_DEALLOC_FREE declares that the function returns pointers that
can be freed via 'free'; it can be used only after declaring 'free'. */
/* Applies to: functions. Cannot be used on inline functions. */
-#if _GL_GNUC_PREREQ (11, 0)
-# define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i)))
-#else
-# define _GL_ATTRIBUTE_DEALLOC(f, i)
+#ifndef _GL_ATTRIBUTE_DEALLOC
+# if _GL_GNUC_PREREQ (11, 0)
+# define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i)))
+# else
+# define _GL_ATTRIBUTE_DEALLOC(f, i)
+# endif
#endif
/* If gnulib's <string.h> or <wchar.h> has already defined this macro, continue
to use this earlier definition, since <stdlib.h> may not have been included
yet. */
#ifndef _GL_ATTRIBUTE_DEALLOC_FREE
-# define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (free, 1)
+# if defined __cplusplus && defined __GNUC__ && !defined __clang__
+/* Work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108231> */
+# define _GL_ATTRIBUTE_DEALLOC_FREE \
+ _GL_ATTRIBUTE_DEALLOC ((void (*) (void *)) free, 1)
+# else
+# define _GL_ATTRIBUTE_DEALLOC_FREE \
+ _GL_ATTRIBUTE_DEALLOC (free, 1)
+# endif
#endif
/* _GL_ATTRIBUTE_DEPRECATED: Declares that an entity is deprecated.
@@ -202,12 +240,20 @@ AC_DEFUN([gl_COMMON_BODY], [
- enumeration, enumeration item,
- typedef,
in C++ also: namespace, class, template specialization. */
-#if _GL_HAS_C_ATTRIBUTE (deprecated)
-# define _GL_ATTRIBUTE_DEPRECATED [[__deprecated__]]
-#elif _GL_HAS_ATTRIBUTE (deprecated)
-# define _GL_ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__))
-#else
-# define _GL_ATTRIBUTE_DEPRECATED
+#ifndef _GL_ATTRIBUTE_DEPRECATED
+# ifndef _GL_BRACKET_BEFORE_ATTRIBUTE
+# ifdef __has_c_attribute
+# if __has_c_attribute (__deprecated__)
+# define _GL_ATTRIBUTE_DEPRECATED [[__deprecated__]]
+# endif
+# endif
+# endif
+# if !defined _GL_ATTRIBUTE_DEPRECATED && _GL_HAS_ATTRIBUTE (deprecated)
+# define _GL_ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__))
+# endif
+# ifndef _GL_ATTRIBUTE_DEPRECATED
+# define _GL_ATTRIBUTE_DEPRECATED
+# endif
#endif
/* _GL_ATTRIBUTE_ERROR(msg) requests an error if a function is called and
@@ -215,24 +261,28 @@ AC_DEFUN([gl_COMMON_BODY], [
_GL_ATTRIBUTE_WARNING(msg) requests a warning if a function is called and
the function call is not optimized away. */
/* Applies to: functions. */
-#if _GL_HAS_ATTRIBUTE (error)
-# define _GL_ATTRIBUTE_ERROR(msg) __attribute__ ((__error__ (msg)))
-# define _GL_ATTRIBUTE_WARNING(msg) __attribute__ ((__warning__ (msg)))
-#elif _GL_HAS_ATTRIBUTE (diagnose_if)
-# define _GL_ATTRIBUTE_ERROR(msg) __attribute__ ((__diagnose_if__ (1, msg, "error")))
-# define _GL_ATTRIBUTE_WARNING(msg) __attribute__ ((__diagnose_if__ (1, msg, "warning")))
-#else
-# define _GL_ATTRIBUTE_ERROR(msg)
-# define _GL_ATTRIBUTE_WARNING(msg)
+#if !(defined _GL_ATTRIBUTE_ERROR && defined _GL_ATTRIBUTE_WARNING)
+# if _GL_HAS_ATTRIBUTE (error)
+# define _GL_ATTRIBUTE_ERROR(msg) __attribute__ ((__error__ (msg)))
+# define _GL_ATTRIBUTE_WARNING(msg) __attribute__ ((__warning__ (msg)))
+# elif _GL_HAS_ATTRIBUTE (diagnose_if)
+# define _GL_ATTRIBUTE_ERROR(msg) __attribute__ ((__diagnose_if__ (1, msg, "error")))
+# define _GL_ATTRIBUTE_WARNING(msg) __attribute__ ((__diagnose_if__ (1, msg, "warning")))
+# else
+# define _GL_ATTRIBUTE_ERROR(msg)
+# define _GL_ATTRIBUTE_WARNING(msg)
+# endif
#endif
/* _GL_ATTRIBUTE_EXTERNALLY_VISIBLE declares that the entity should remain
visible to debuggers etc., even with '-fwhole-program'. */
/* Applies to: functions, variables. */
-#if _GL_HAS_ATTRIBUTE (externally_visible)
-# define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE __attribute__ ((externally_visible))
-#else
-# define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE
+#ifndef _GL_ATTRIBUTE_EXTERNALLY_VISIBLE
+# if _GL_HAS_ATTRIBUTE (externally_visible)
+# define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE __attribute__ ((externally_visible))
+# else
+# define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE
+# endif
#endif
/* _GL_ATTRIBUTE_FALLTHROUGH declares that it is not a programming mistake if
@@ -240,12 +290,18 @@ AC_DEFUN([gl_COMMON_BODY], [
'default' label. The compiler should not warn in this case. */
/* Applies to: Empty statement (;), inside a 'switch' statement. */
/* Always expands to something. */
-#if _GL_HAS_C_ATTRIBUTE (fallthrough)
-# define _GL_ATTRIBUTE_FALLTHROUGH [[__fallthrough__]]
-#elif _GL_HAS_ATTRIBUTE (fallthrough)
-# define _GL_ATTRIBUTE_FALLTHROUGH __attribute__ ((__fallthrough__))
-#else
-# define _GL_ATTRIBUTE_FALLTHROUGH ((void) 0)
+#ifndef _GL_ATTRIBUTE_FALLTHROUGH
+# ifdef __has_c_attribute
+# if __has_c_attribute (__fallthrough__)
+# define _GL_ATTRIBUTE_FALLTHROUGH [[__fallthrough__]]
+# endif
+# endif
+# if !defined _GL_ATTRIBUTE_FALLTHROUGH && _GL_HAS_ATTRIBUTE (fallthrough)
+# define _GL_ATTRIBUTE_FALLTHROUGH __attribute__ ((__fallthrough__))
+# endif
+# ifndef _GL_ATTRIBUTE_FALLTHROUGH
+# define _GL_ATTRIBUTE_FALLTHROUGH ((void) 0)
+# endif
#endif
/* _GL_ATTRIBUTE_FORMAT ((ARCHETYPE, STRING-INDEX, FIRST-TO-CHECK))
@@ -259,10 +315,12 @@ AC_DEFUN([gl_COMMON_BODY], [
If FIRST-TO-CHECK is not 0, arguments starting at FIRST-TO_CHECK
are suitable for the format string. */
/* Applies to: functions. */
-#if _GL_HAS_ATTRIBUTE (format)
-# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec))
-#else
-# define _GL_ATTRIBUTE_FORMAT(spec)
+#ifndef _GL_ATTRIBUTE_FORMAT
+# if _GL_HAS_ATTRIBUTE (format)
+# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec))
+# else
+# define _GL_ATTRIBUTE_FORMAT(spec)
+# endif
#endif
/* _GL_ATTRIBUTE_LEAF declares that if the function is called from some other
@@ -270,19 +328,23 @@ AC_DEFUN([gl_COMMON_BODY], [
exception handling. This declaration lets the compiler optimize that unit
more aggressively. */
/* Applies to: functions. */
-#if _GL_HAS_ATTRIBUTE (leaf)
-# define _GL_ATTRIBUTE_LEAF __attribute__ ((__leaf__))
-#else
-# define _GL_ATTRIBUTE_LEAF
+#ifndef _GL_ATTRIBUTE_LEAF
+# if _GL_HAS_ATTRIBUTE (leaf)
+# define _GL_ATTRIBUTE_LEAF __attribute__ ((__leaf__))
+# else
+# define _GL_ATTRIBUTE_LEAF
+# endif
#endif
/* _GL_ATTRIBUTE_MALLOC declares that the function returns a pointer to freshly
allocated memory. */
/* Applies to: functions. */
-#if _GL_HAS_ATTRIBUTE (malloc)
-# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__))
-#else
-# define _GL_ATTRIBUTE_MALLOC
+#ifndef _GL_ATTRIBUTE_MALLOC
+# if _GL_HAS_ATTRIBUTE (malloc)
+# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__))
+# else
+# define _GL_ATTRIBUTE_MALLOC
+# endif
#endif
/* _GL_ATTRIBUTE_MAY_ALIAS declares that pointers to the type may point to the
@@ -290,10 +352,12 @@ AC_DEFUN([gl_COMMON_BODY], [
strict aliasing optimization. */
/* Applies to: types. */
/* Oracle Studio 12.6 mishandles may_alias despite __has_attribute OK. */
-#if _GL_HAS_ATTRIBUTE (may_alias) && !defined __SUNPRO_C
-# define _GL_ATTRIBUTE_MAY_ALIAS __attribute__ ((__may_alias__))
-#else
-# define _GL_ATTRIBUTE_MAY_ALIAS
+#ifndef _GL_ATTRIBUTE_MAY_ALIAS
+# if _GL_HAS_ATTRIBUTE (may_alias) && !defined __SUNPRO_C
+# define _GL_ATTRIBUTE_MAY_ALIAS __attribute__ ((__may_alias__))
+# else
+# define _GL_ATTRIBUTE_MAY_ALIAS
+# endif
#endif
/* _GL_ATTRIBUTE_MAYBE_UNUSED declares that it is not a programming mistake if
@@ -305,15 +369,29 @@ AC_DEFUN([gl_COMMON_BODY], [
- enumeration, enumeration item,
- typedef,
in C++ also: class. */
-/* In C++ and C2x, this is spelled [[__maybe_unused__]].
+/* In C++ and C23, this is spelled [[__maybe_unused__]].
GCC's syntax is __attribute__ ((__unused__)).
- clang supports both syntaxes. */
-#if _GL_HAS_C_ATTRIBUTE (maybe_unused)
-# define _GL_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]]
-#else
-# define _GL_ATTRIBUTE_MAYBE_UNUSED _GL_ATTRIBUTE_UNUSED
+ clang supports both syntaxes. Except that with clang ≥ 6, < 10, in C++ mode,
+ __has_c_attribute (__maybe_unused__) yields true but the use of
+ [[__maybe_unused__]] nevertheless produces a warning. */
+#ifndef _GL_ATTRIBUTE_MAYBE_UNUSED
+# ifndef _GL_BRACKET_BEFORE_ATTRIBUTE
+# if defined __clang__ && defined __cplusplus
+# if !defined __apple_build_version__ && __clang_major__ >= 10
+# define _GL_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]]
+# endif
+# elif defined __has_c_attribute
+# if __has_c_attribute (__maybe_unused__)
+# define _GL_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]]
+# endif
+# endif
+# endif
+# ifndef _GL_ATTRIBUTE_MAYBE_UNUSED
+# define _GL_ATTRIBUTE_MAYBE_UNUSED _GL_ATTRIBUTE_UNUSED
+# endif
#endif
-/* Alternative spelling of this macro, for convenience. */
+/* Alternative spelling of this macro, for convenience and for
+ compatibility with glibc/include/libc-symbols.h. */
#define _GL_UNUSED _GL_ATTRIBUTE_MAYBE_UNUSED
/* Earlier spellings of this macro. */
#define _UNUSED_PARAMETER_ _GL_ATTRIBUTE_MAYBE_UNUSED
@@ -322,21 +400,40 @@ AC_DEFUN([gl_COMMON_BODY], [
discard the return value. The compiler may warn if the caller does not use
the return value, unless the caller uses something like ignore_value. */
/* Applies to: function, enumeration, class. */
-#if _GL_HAS_C_ATTRIBUTE (nodiscard)
-# define _GL_ATTRIBUTE_NODISCARD [[__nodiscard__]]
-#elif _GL_HAS_ATTRIBUTE (warn_unused_result)
-# define _GL_ATTRIBUTE_NODISCARD __attribute__ ((__warn_unused_result__))
-#else
-# define _GL_ATTRIBUTE_NODISCARD
+#ifndef _GL_ATTRIBUTE_NODISCARD
+# ifndef _GL_BRACKET_BEFORE_ATTRIBUTE
+# if defined __clang__ && defined __cplusplus
+ /* With clang up to 15.0.6 (at least), in C++ mode, [[__nodiscard__]] produces
+ a warning.
+ The 1000 below means a yet unknown threshold. When clang++ version X
+ starts supporting [[__nodiscard__]] without warning about it, you can
+ replace the 1000 with X. */
+# if __clang_major__ >= 1000
+# define _GL_ATTRIBUTE_NODISCARD [[__nodiscard__]]
+# endif
+# elif defined __has_c_attribute
+# if __has_c_attribute (__nodiscard__)
+# define _GL_ATTRIBUTE_NODISCARD [[__nodiscard__]]
+# endif
+# endif
+# endif
+# if !defined _GL_ATTRIBUTE_NODISCARD && _GL_HAS_ATTRIBUTE (warn_unused_result)
+# define _GL_ATTRIBUTE_NODISCARD __attribute__ ((__warn_unused_result__))
+# endif
+# ifndef _GL_ATTRIBUTE_NODISCARD
+# define _GL_ATTRIBUTE_NODISCARD
+# endif
#endif
/* _GL_ATTRIBUTE_NOINLINE tells that the compiler should not inline the
function. */
/* Applies to: functions. */
-#if _GL_HAS_ATTRIBUTE (noinline)
-# define _GL_ATTRIBUTE_NOINLINE __attribute__ ((__noinline__))
-#else
-# define _GL_ATTRIBUTE_NOINLINE
+#ifndef _GL_ATTRIBUTE_NOINLINE
+# if _GL_HAS_ATTRIBUTE (noinline)
+# define _GL_ATTRIBUTE_NOINLINE __attribute__ ((__noinline__))
+# else
+# define _GL_ATTRIBUTE_NOINLINE
+# endif
#endif
/* _GL_ATTRIBUTE_NONNULL ((N1, N2,...)) declares that the arguments N1, N2,...
@@ -344,20 +441,24 @@ AC_DEFUN([gl_COMMON_BODY], [
_GL_ATTRIBUTE_NONNULL () declares that all pointer arguments must not be
null. */
/* Applies to: functions. */
-#if _GL_HAS_ATTRIBUTE (nonnull)
-# define _GL_ATTRIBUTE_NONNULL(args) __attribute__ ((__nonnull__ args))
-#else
-# define _GL_ATTRIBUTE_NONNULL(args)
+#ifndef _GL_ATTRIBUTE_NONNULL
+# if _GL_HAS_ATTRIBUTE (nonnull)
+# define _GL_ATTRIBUTE_NONNULL(args) __attribute__ ((__nonnull__ args))
+# else
+# define _GL_ATTRIBUTE_NONNULL(args)
+# endif
#endif
/* _GL_ATTRIBUTE_NONSTRING declares that the contents of a character array is
not meant to be NUL-terminated. */
/* Applies to: struct/union members and variables that are arrays of element
type '[[un]signed] char'. */
-#if _GL_HAS_ATTRIBUTE (nonstring)
-# define _GL_ATTRIBUTE_NONSTRING __attribute__ ((__nonstring__))
-#else
-# define _GL_ATTRIBUTE_NONSTRING
+#ifndef _GL_ATTRIBUTE_NONSTRING
+# if _GL_HAS_ATTRIBUTE (nonstring)
+# define _GL_ATTRIBUTE_NONSTRING __attribute__ ((__nonstring__))
+# else
+# define _GL_ATTRIBUTE_NONSTRING
+# endif
#endif
/* There is no _GL_ATTRIBUTE_NORETURN; use _Noreturn instead. */
@@ -365,10 +466,12 @@ AC_DEFUN([gl_COMMON_BODY], [
/* _GL_ATTRIBUTE_NOTHROW declares that the function does not throw exceptions.
*/
/* Applies to: functions. */
-#if _GL_HAS_ATTRIBUTE (nothrow) && !defined __cplusplus
-# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__))
-#else
-# define _GL_ATTRIBUTE_NOTHROW
+#ifndef _GL_ATTRIBUTE_NOTHROW
+# if _GL_HAS_ATTRIBUTE (nothrow) && !defined __cplusplus
+# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__))
+# else
+# define _GL_ATTRIBUTE_NOTHROW
+# endif
#endif
/* _GL_ATTRIBUTE_PACKED declares:
@@ -377,10 +480,12 @@ AC_DEFUN([gl_COMMON_BODY], [
minimizing the memory required. */
/* Applies to: struct members, struct, union,
in C++ also: class. */
-#if _GL_HAS_ATTRIBUTE (packed)
-# define _GL_ATTRIBUTE_PACKED __attribute__ ((__packed__))
-#else
-# define _GL_ATTRIBUTE_PACKED
+#ifndef _GL_ATTRIBUTE_PACKED
+# if _GL_HAS_ATTRIBUTE (packed)
+# define _GL_ATTRIBUTE_PACKED __attribute__ ((__packed__))
+# else
+# define _GL_ATTRIBUTE_PACKED
+# endif
#endif
/* _GL_ATTRIBUTE_PURE declares that It is OK for a compiler to omit duplicate
@@ -390,19 +495,23 @@ AC_DEFUN([gl_COMMON_BODY], [
observable state, and always returns exactly once.
(This attribute is looser than _GL_ATTRIBUTE_CONST.) */
/* Applies to: functions. */
-#if _GL_HAS_ATTRIBUTE (pure)
-# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
-#else
-# define _GL_ATTRIBUTE_PURE
+#ifndef _GL_ATTRIBUTE_PURE
+# if _GL_HAS_ATTRIBUTE (pure)
+# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
+# else
+# define _GL_ATTRIBUTE_PURE
+# endif
#endif
/* _GL_ATTRIBUTE_RETURNS_NONNULL declares that the function's return value is
a non-NULL pointer. */
/* Applies to: functions. */
-#if _GL_HAS_ATTRIBUTE (returns_nonnull)
-# define _GL_ATTRIBUTE_RETURNS_NONNULL __attribute__ ((__returns_nonnull__))
-#else
-# define _GL_ATTRIBUTE_RETURNS_NONNULL
+#ifndef _GL_ATTRIBUTE_RETURNS_NONNULL
+# if _GL_HAS_ATTRIBUTE (returns_nonnull)
+# define _GL_ATTRIBUTE_RETURNS_NONNULL __attribute__ ((__returns_nonnull__))
+# else
+# define _GL_ATTRIBUTE_RETURNS_NONNULL
+# endif
#endif
/* _GL_ATTRIBUTE_SENTINEL(pos) declares that the variadic function expects a
@@ -410,17 +519,21 @@ AC_DEFUN([gl_COMMON_BODY], [
_GL_ATTRIBUTE_SENTINEL () - The last argument is NULL (requires C99).
_GL_ATTRIBUTE_SENTINEL ((N)) - The (N+1)st argument from the end is NULL. */
/* Applies to: functions. */
-#if _GL_HAS_ATTRIBUTE (sentinel)
-# define _GL_ATTRIBUTE_SENTINEL(pos) __attribute__ ((__sentinel__ pos))
-#else
-# define _GL_ATTRIBUTE_SENTINEL(pos)
+#ifndef _GL_ATTRIBUTE_SENTINEL
+# if _GL_HAS_ATTRIBUTE (sentinel)
+# define _GL_ATTRIBUTE_SENTINEL(pos) __attribute__ ((__sentinel__ pos))
+# else
+# define _GL_ATTRIBUTE_SENTINEL(pos)
+# endif
#endif
/* A helper macro. Don't use it directly. */
-#if _GL_HAS_ATTRIBUTE (unused)
-# define _GL_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
-#else
-# define _GL_ATTRIBUTE_UNUSED
+#ifndef _GL_ATTRIBUTE_UNUSED
+# if _GL_HAS_ATTRIBUTE (unused)
+# define _GL_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
+# else
+# define _GL_ATTRIBUTE_UNUSED
+# endif
#endif
]dnl There is no _GL_ATTRIBUTE_VISIBILITY; see m4/visibility.m4 instead.
@@ -431,10 +544,24 @@ AC_DEFUN([gl_COMMON_BODY], [
/* Applies to: label (both in C and C++). */
/* Note that g++ < 4.5 does not support the '__attribute__ ((__unused__)) ;'
syntax. But clang does. */
-#if !(defined __cplusplus && !_GL_GNUC_PREREQ (4, 5)) || defined __clang__
-# define _GL_UNUSED_LABEL _GL_ATTRIBUTE_UNUSED
+#ifndef _GL_UNUSED_LABEL
+# if !(defined __cplusplus && !_GL_GNUC_PREREQ (4, 5)) || defined __clang__
+# define _GL_UNUSED_LABEL _GL_ATTRIBUTE_UNUSED
+# else
+# define _GL_UNUSED_LABEL
+# endif
+#endif
+])
+ AH_VERBATIM([c_linkage],
+[/* In C++, there is the concept of "language linkage", that encompasses
+ name mangling and function calling conventions.
+ The following macros start and end a block of "C" linkage. */
+#ifdef __cplusplus
+# define _GL_BEGIN_C_LINKAGE extern "C" {
+# define _GL_END_C_LINKAGE }
#else
-# define _GL_UNUSED_LABEL
+# define _GL_BEGIN_C_LINKAGE
+# define _GL_END_C_LINKAGE
#endif
])
AH_VERBATIM([async_safe],
@@ -492,7 +619,7 @@ AC_DEFUN([gl_COMMON_BODY], [
dnl gl_cross_guess_normal (to be used when 'yes' is good and 'no' is bad),
dnl gl_cross_guess_inverted (to be used when 'no' is good and 'yes' is bad).
AC_ARG_ENABLE([cross-guesses],
- [AS_HELP_STRING([--enable-cross-guesses={conservative|risky}],
+ [AS_HELP_STRING([[--enable-cross-guesses={conservative|risky}]],
[specify policy for cross-compilation guesses])],
[if test "x$enableval" != xconservative && test "x$enableval" != xrisky; then
AC_MSG_WARN([invalid argument supplied to --enable-cross-guesses])
@@ -1004,6 +1131,238 @@ AC_DEFUN([gl_CONDITIONAL_HEADER],
m4_popdef([gl_header_name])
])
+dnl Preparations for gl_CHECK_FUNCS_MACOS.
+AC_DEFUN([gl_PREPARE_CHECK_FUNCS_MACOS],
+[
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([gl_COMPILER_CLANG])
+ AC_CACHE_CHECK([for compiler option needed when checking for future declarations],
+ [gl_cv_compiler_check_future_option],
+ [case "$host_os" in
+ dnl This is only needed on macOS.
+ darwin*)
+ if test $gl_cv_compiler_clang = yes; then
+ dnl Test whether the compiler supports the option
+ dnl '-Werror=unguarded-availability-new'.
+ save_ac_compile="$ac_compile"
+ ac_compile="$ac_compile -Werror=unguarded-availability-new"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],[[]])],
+ [gl_cv_compiler_check_future_option='-Werror=unguarded-availability-new'],
+ [gl_cv_compiler_check_future_option=none])
+ ac_compile="$save_ac_compile"
+ else
+ gl_cv_compiler_check_future_option=none
+ fi
+ ;;
+ *) gl_cv_compiler_check_future_option=none ;;
+ esac
+ ])
+])
+
+dnl Pieces of the expansion of
+dnl gl_CHECK_FUNCS_ANDROID
+dnl gl_CHECK_FUNCS_MACOS
+dnl gl_CHECK_FUNCS_ANDROID_MACOS
+
+AC_DEFUN([gl_CHECK_FUNCS_DEFAULT_CASE],
+[
+ *)
+ AC_CHECK_FUNC([$1])
+ [gl_cv_onwards_func_][$1]=$[ac_cv_func_][$1]
+ ;;
+])
+
+AC_DEFUN([gl_CHECK_FUNCS_CASE_FOR_ANDROID],
+[
+ linux*-android*)
+ AC_CHECK_DECL([$1], , , [$2])
+ if test $[ac_cv_have_decl_][$1] = yes; then
+ AC_CHECK_FUNC([[$1]])
+ if test $[ac_cv_func_][$1] = yes; then
+ [gl_cv_onwards_func_][$1]=yes
+ else
+ dnl The function is declared but does not exist. This should not
+ dnl happen normally. But anyway, we know that a future version
+ dnl of Android will have the function.
+ [gl_cv_onwards_func_][$1]='future OS version'
+ fi
+ else
+ [gl_cv_onwards_func_][$1]='future OS version'
+ fi
+ ;;
+])
+
+AC_DEFUN([gl_CHECK_FUNCS_CASE_FOR_MACOS],
+[
+ darwin*)
+ if test "x$gl_cv_compiler_check_future_option" != "xnone"; then
+ dnl Use a compile test, not a link test.
+ save_ac_compile="$ac_compile"
+ ac_compile="$ac_compile $gl_cv_compiler_check_future_option"
+ save_ac_compile_for_check_decl="$ac_compile_for_check_decl"
+ ac_compile_for_check_decl="$ac_compile_for_check_decl $gl_cv_compiler_check_future_option"
+ unset [ac_cv_have_decl_][$1]
+ AC_CHECK_DECL([$1], , , [$2])
+ ac_compile="$save_ac_compile"
+ ac_compile_for_check_decl="$save_ac_compile_for_check_decl"
+ [ac_cv_func_][$1]="$[ac_cv_have_decl_][$1]"
+ if test $[ac_cv_func_][$1] = yes; then
+ [gl_cv_onwards_func_][$1]=yes
+ else
+ unset [ac_cv_have_decl_][$1]
+ AC_CHECK_DECL([$1], , , [$2])
+ if test $[ac_cv_have_decl_][$1] = yes; then
+ [gl_cv_onwards_func_][$1]='future OS version'
+ else
+ [gl_cv_onwards_func_][$1]=no
+ fi
+ fi
+ else
+ AC_CHECK_FUNC([$1])
+ [gl_cv_onwards_func_][$1]=$[ac_cv_func_][$1]
+ fi
+ ;;
+])
+
+AC_DEFUN([gl_CHECK_FUNCS_SET_RESULTS],
+[
+ case "$[gl_cv_onwards_func_][$1]" in
+ future*) [ac_cv_func_][$1]=no ;;
+ *) [ac_cv_func_][$1]=$[gl_cv_onwards_func_][$1] ;;
+ esac
+ if test $[ac_cv_func_][$1] = yes; then
+ AC_DEFINE([HAVE_]m4_translit([[$1]],
+ [abcdefghijklmnopqrstuvwxyz],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ]),
+ [1], [Define to 1 if you have the `$1' function.])
+ fi
+])
+
+dnl gl_CHECK_FUNCS_ANDROID([func], [[#include <foo.h>]])
+dnl is like AC_CHECK_FUNCS([func]), taking into account a portability problem
+dnl on Android.
+dnl
+dnl When code is compiled on Android, it is in the context of a certain
+dnl "Android API level", which indicates the minimum version of Android on
+dnl which the app can be installed. In other words, you don't compile for a
+dnl specific version of Android. You compile for all versions of Android,
+dnl onwards from the given API level.
+dnl Thus, the question "does the OS have the function func" has three possible
+dnl answers:
+dnl - yes, in all versions starting from the given API level,
+dnl - no, in no version,
+dnl - not in the given API level, but in a later version of Android.
+dnl
+dnl In detail, this works as follows:
+dnl If func was added to Android API level, say, 28, then the libc.so has the
+dnl symbol func always, whereas the header file <foo.h> declares func
+dnl conditionally:
+dnl #if __ANDROID_API__ >= 28
+dnl ... func (...) __INTRODUCED_IN(28);
+dnl #endif
+dnl Thus, when compiling with "clang -target armv7a-unknown-linux-android28",
+dnl the function func is declared and exists in libc.
+dnl Whereas when compiling with "clang -target armv7a-unknown-linux-android27",
+dnl the function func is not declared but exists in libc.
+dnl
+dnl This macro sets two variables:
+dnl - gl_cv_onwards_func_<func> to yes / no / "future OS version"
+dnl - ac_cv_func_<func> to yes / no / no
+dnl The first variable allows to distinguish all three cases.
+dnl The second variable is set, so that an invocation
+dnl gl_CHECK_FUNCS_ANDROID([func], [[#include <foo.h>]])
+dnl can be used as a drop-in replacement for
+dnl AC_CHECK_FUNCS([func]).
+AC_DEFUN([gl_CHECK_FUNCS_ANDROID],
+[
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_CACHE_CHECK([for [$1]],
+ [[gl_cv_onwards_func_][$1]],
+ [gl_SILENT([
+ case "$host_os" in
+ gl_CHECK_FUNCS_CASE_FOR_ANDROID([$1], [$2])
+ gl_CHECK_FUNCS_DEFAULT_CASE([$1])
+ esac
+ ])
+ ])
+ gl_CHECK_FUNCS_SET_RESULTS([$1])
+])
+
+dnl gl_CHECK_FUNCS_MACOS([func], [[#include <foo.h>]])
+dnl is like AC_CHECK_FUNCS([func]), taking into account a portability problem
+dnl on macOS.
+dnl
+dnl When code is compiled on macOS, it is in the context of a certain minimum
+dnl macOS version, that can be set through the option '-mmacosx-version-min='.
+dnl In other words, you don't compile for a specific version of macOS. You
+dnl compile for all versions of macOS, onwards from the given version.
+dnl Thus, the question "does the OS have the function func" has three possible
+dnl answers:
+dnl - yes, in all versions starting from the given version,
+dnl - no, in no version,
+dnl - not in the given version, but in a later version of macOS.
+dnl
+dnl In detail, this works as follows:
+dnl If func was added to, say, macOS version 13, then the libc has the
+dnl symbol func always, whereas the header file <foo.h> declares func
+dnl conditionally with a special availability attribute:
+dnl ... func (...) __attribute__((availability(macos,introduced=13.0)));
+dnl Thus, when compiling with "clang mmacosx-version-min=13", there is no
+dnl warning about the use of func, and the resulting binary
+dnl - runs fine on macOS 13,
+dnl - aborts with a dyld "Symbol not found" message on macOS 12.
+dnl Whereas, when compiling with "clang mmacosx-version-min=12", there is a
+dnl warning: 'func' is only available on macOS 13.0 or newer
+dnl [-Wunguarded-availability-new],
+dnl and the resulting binary
+dnl - runs fine on macOS 13,
+dnl - crashes with a SIGSEGV (signal 11) on macOS 12.
+dnl
+dnl This macro sets two variables:
+dnl - gl_cv_onwards_func_<func> to yes / no / "future OS version"
+dnl - ac_cv_func_<func> to yes / no / no
+dnl The first variable allows to distinguish all three cases.
+dnl The second variable is set, so that an invocation
+dnl gl_CHECK_FUNCS_MACOS([func], [[#include <foo.h>]])
+dnl can be used as a drop-in replacement for
+dnl AC_CHECK_FUNCS([func]).
+AC_DEFUN([gl_CHECK_FUNCS_MACOS],
+[
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([gl_PREPARE_CHECK_FUNCS_MACOS])
+ AC_CACHE_CHECK([for [$1]],
+ [[gl_cv_onwards_func_][$1]],
+ [gl_SILENT([
+ case "$host_os" in
+ gl_CHECK_FUNCS_CASE_FOR_MACOS([$1], [$2])
+ gl_CHECK_FUNCS_DEFAULT_CASE([$1])
+ esac
+ ])
+ ])
+ gl_CHECK_FUNCS_SET_RESULTS([$1])
+])
+
+dnl gl_CHECK_FUNCS_ANDROID_MACOS([func], [[#include <foo.h>]])
+dnl is like AC_CHECK_FUNCS([func]), taking into account a portability problem
+dnl on Android and on macOS.
+dnl It is the combination of gl_CHECK_FUNCS_ANDROID and gl_CHECK_FUNCS_MACOS.
+AC_DEFUN([gl_CHECK_FUNCS_ANDROID_MACOS],
+[
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([gl_PREPARE_CHECK_FUNCS_MACOS])
+ AC_CACHE_CHECK([for [$1]],
+ [[gl_cv_onwards_func_][$1]],
+ [gl_SILENT([
+ case "$host_os" in
+ gl_CHECK_FUNCS_CASE_FOR_ANDROID([$1], [$2])
+ gl_CHECK_FUNCS_CASE_FOR_MACOS([$1], [$2])
+ gl_CHECK_FUNCS_DEFAULT_CASE([$1])
+ esac
+ ])
+ ])
+ gl_CHECK_FUNCS_SET_RESULTS([$1])
+])
+
dnl Expands to some code for use in .c programs that, on native Windows, defines
dnl the Microsoft deprecated alias function names to the underscore-prefixed
dnl actual function names. With this macro, these function names are available
diff --git a/gl/m4/gnulib-comp.m4 b/gl/m4/gnulib-comp.m4
index 55a0a2c1..37a3a78b 100644
--- a/gl/m4/gnulib-comp.m4
+++ b/gl/m4/gnulib-comp.m4
@@ -1,5 +1,5 @@
# DO NOT EDIT! GENERATED AUTOMATICALLY!
-# Copyright (C) 2002-2022 Free Software Foundation, Inc.
+# Copyright (C) 2002-2023 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
@@ -43,10 +43,12 @@ AC_DEFUN([gl_EARLY],
AC_REQUIRE([gl_PROG_AR_RANLIB])
# Code from module absolute-header:
+ # Code from module alignasof:
# Code from module alloca:
# Code from module alloca-opt:
# Code from module argp:
# Code from module array-list:
+ # Code from module assert-h:
# Code from module assure:
# Code from module at-internal:
# Code from module attribute:
@@ -76,11 +78,11 @@ AC_DEFUN([gl_EARLY],
# Code from module double-slash-root:
# Code from module dup:
# Code from module dup2:
- # Code from module dynarray:
# Code from module eloop-threshold:
# Code from module environ:
# Code from module errno:
# Code from module error:
+ # Code from module error-h:
# Code from module exitfail:
# Code from module extensions:
# Code from module extern-inline:
@@ -117,6 +119,8 @@ AC_DEFUN([gl_EARLY],
# Code from module gettime:
# Code from module gettimeofday:
# Code from module gitlog-to-changelog:
+ # Code from module glibc-internal/dynarray:
+ # Code from module glibc-internal/scratch_buffer:
# Code from module glob:
# Code from module glob-h:
# Code from module gnupload:
@@ -140,7 +144,6 @@ AC_DEFUN([gl_EARLY],
# Code from module langinfo:
# Code from module largefile:
AC_REQUIRE([AC_SYS_LARGEFILE])
- AC_REQUIRE([gl_YEAR2038_EARLY])
# Code from module lchown:
# Code from module lib-ignore:
# Code from module libc-config:
@@ -204,7 +207,6 @@ AC_DEFUN([gl_EARLY],
# Code from module rmdir:
# Code from module same-inode:
# Code from module save-cwd:
- # Code from module scratch_buffer:
# Code from module select:
# Code from module set:
# Code from module setenv:
@@ -226,15 +228,16 @@ AC_DEFUN([gl_EARLY],
# Code from module stat:
# Code from module stat-time:
# Code from module std-gnu11:
- # Code from module stdalign:
# Code from module stdarg:
dnl Some compilers (e.g., AIX 5.3 cc) need to be in c99 mode
dnl for the builtin va_copy to work. gl_PROG_CC_C99 arranges for this.
gl_PROG_CC_C99
# Code from module stdbool:
+ # Code from module stdckdint:
# Code from module stddef:
# Code from module stdint:
# Code from module stdio:
+ gl_STDIO_H_EARLY
# Code from module stdlib:
# Code from module stdopen:
# Code from module stpcpy:
@@ -266,7 +269,7 @@ AC_DEFUN([gl_EARLY],
# Code from module termios:
# Code from module threadlib:
gl_THREADLIB_EARLY
- # Code from module time:
+ # Code from module time-h:
# Code from module timespec:
# Code from module unistd:
# Code from module unistd-safer:
@@ -302,6 +305,8 @@ AC_DEFUN([gl_EARLY],
# Code from module xstdopen:
# Code from module xstrndup:
# Code from module xvasprintf:
+ # Code from module year2038-recommended:
+ AC_REQUIRE([AC_SYS_YEAR2038_RECOMMENDED])
])
# This macro should be invoked from ./configure.ac, in the section
@@ -322,6 +327,7 @@ AC_DEFUN([gl_INIT],
gl_COMMON
gl_source_base='gl/lib'
gl_source_base_prefix=
+ gl_ALIGNASOF
changequote(,)dnl
LTALLOCA=`echo "$ALLOCA" | sed -e 's/\.[^.]* /.lo /g;s/\.[^.]*$/.lo/'`
changequote([, ])dnl
@@ -333,6 +339,9 @@ AC_SUBST([LTALLOCA])
m4_ifdef([AM_XGETTEXT_OPTION],
[AM_][XGETTEXT_OPTION([--flag=argp_error:2:c-format])
AM_][XGETTEXT_OPTION([--flag=argp_failure:4:c-format])])
+ gl_ASSERT_H
+ gl_CONDITIONAL_HEADER([assert.h])
+ AC_PROG_MKDIR_P
AC_REQUIRE([AC_CANONICAL_HOST])
gl_FUNC_BTOWC
gl_CONDITIONAL([GL_COND_OBJ_BTOWC],
@@ -394,7 +403,7 @@ AC_SUBST([LTALLOCA])
AC_PROG_MKDIR_P
gl_FUNC_DIRFD
gl_CONDITIONAL([GL_COND_OBJ_DIRFD],
- [test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no || test $REPLACE_DIRFD = 1])
+ [test $HAVE_DIRFD = 0 || test $REPLACE_DIRFD = 1])
AM_COND_IF([GL_COND_OBJ_DIRFD], [
gl_PREREQ_DIRFD
])
@@ -413,20 +422,22 @@ AC_SUBST([LTALLOCA])
gl_PREREQ_DUP2
])
gl_UNISTD_MODULE_INDICATOR([dup2])
- AC_PROG_MKDIR_P
gl_ENVIRON
gl_UNISTD_MODULE_INDICATOR([environ])
gl_HEADER_ERRNO_H
gl_CONDITIONAL_HEADER([errno.h])
AC_PROG_MKDIR_P
+ AC_REQUIRE([gl_ERROR_H])
gl_ERROR
- gl_CONDITIONAL([GL_COND_OBJ_ERROR], [test "$ac_cv_lib_error_at_line" = no])
+ gl_CONDITIONAL([GL_COND_OBJ_ERROR], [test $COMPILE_ERROR_C = 1])
AM_COND_IF([GL_COND_OBJ_ERROR], [
gl_PREREQ_ERROR
])
m4_ifdef([AM_XGETTEXT_OPTION],
[AM_][XGETTEXT_OPTION([--flag=error:3:c-format])
AM_][XGETTEXT_OPTION([--flag=error_at_line:5:c-format])])
+ gl_ERROR_H
+ AC_PROG_MKDIR_P
AC_REQUIRE([gl_EXTERN_INLINE])
gl_FUNC_FCHDIR
gl_CONDITIONAL([GL_COND_OBJ_FCHDIR], [test $HAVE_FCHDIR = 0])
@@ -553,6 +564,12 @@ AC_SUBST([LTALLOCA])
])
gl_UNISTD_MODULE_INDICATOR([getopt-posix])
gl_FUNC_GETPROGNAME
+ gl_CONDITIONAL([GL_COND_OBJ_GETPROGNAME],
+ [test $HAVE_GETPROGNAME = 0 || test $REPLACE_GETPROGNAME = 1])
+ AM_COND_IF([GL_COND_OBJ_GETPROGNAME], [
+ gl_PREREQ_GETPROGNAME
+ ])
+ gl_STDLIB_MODULE_INDICATOR([getprogname])
AC_REQUIRE([AC_CANONICAL_HOST])
gl_FUNC_GETRANDOM
gl_CONDITIONAL([GL_COND_OBJ_GETRANDOM],
@@ -568,6 +585,8 @@ AC_SUBST([LTALLOCA])
gl_PREREQ_GETTIMEOFDAY
])
gl_SYS_TIME_MODULE_INDICATOR([gettimeofday])
+ AC_PROG_MKDIR_P
+ AC_PROG_MKDIR_P
gl_GLOB
dnl Because of gl_REPLACE_GLOB_H:
gl_CONDITIONAL_HEADER([glob.h])
@@ -584,7 +603,10 @@ AC_SUBST([LTALLOCA])
gl_CONDITIONAL_HEADER([glob.h])
AC_PROG_MKDIR_P
AC_REQUIRE([gl_FUNC_SETLOCALE_NULL])
- LIB_HARD_LOCALE="$LIB_SETLOCALE_NULL"
+ HARD_LOCALE_LIB="$SETLOCALE_NULL_LIB"
+ AC_SUBST([HARD_LOCALE_LIB])
+ dnl For backward compatibility.
+ LIB_HARD_LOCALE="$HARD_LOCALE_LIB"
AC_SUBST([LIB_HARD_LOCALE])
AC_DEFUN([gl_HAVE_MODULE_HAVELIB])
gl_IDPRIV
@@ -695,7 +717,8 @@ AC_SUBST([LTALLOCA])
fi
gl_STRING_MODULE_INDICATOR([memmem])
gl_FUNC_MEMPCPY
- gl_CONDITIONAL([GL_COND_OBJ_MEMPCPY], [test $HAVE_MEMPCPY = 0])
+ gl_CONDITIONAL([GL_COND_OBJ_MEMPCPY],
+ [test $HAVE_MEMPCPY = 0 || test $REPLACE_MEMPCPY = 1])
AM_COND_IF([GL_COND_OBJ_MEMPCPY], [
gl_PREREQ_MEMPCPY
])
@@ -804,7 +827,8 @@ AC_SUBST([LTALLOCA])
])
gl_STRING_MODULE_INDICATOR([rawmemchr])
gl_FUNC_READDIR
- gl_CONDITIONAL([GL_COND_OBJ_READDIR], [test $HAVE_READDIR = 0])
+ gl_CONDITIONAL([GL_COND_OBJ_READDIR],
+ [test $HAVE_READDIR = 0 || test $REPLACE_READDIR = 1])
gl_DIRENT_MODULE_INDICATOR([readdir])
gl_FUNC_READLINK
gl_CONDITIONAL([GL_COND_OBJ_READLINK],
@@ -855,13 +879,13 @@ AC_SUBST([LTALLOCA])
AC_LIBOBJ([at-func2])
fi
gl_FUNC_REWINDDIR
- gl_CONDITIONAL([GL_COND_OBJ_REWINDDIR], [test $HAVE_REWINDDIR = 0])
+ gl_CONDITIONAL([GL_COND_OBJ_REWINDDIR],
+ [test $HAVE_REWINDDIR = 0 || test $REPLACE_REWINDDIR = 1])
gl_DIRENT_MODULE_INDICATOR([rewinddir])
gl_FUNC_RMDIR
gl_CONDITIONAL([GL_COND_OBJ_RMDIR], [test $REPLACE_RMDIR = 1])
gl_UNISTD_MODULE_INDICATOR([rmdir])
gl_SAVE_CWD
- AC_PROG_MKDIR_P
gl_FUNC_SELECT
gl_CONDITIONAL([GL_COND_OBJ_SELECT], [test $REPLACE_SELECT = 1])
gl_SYS_SELECT_MODULE_INDICATOR([select])
@@ -926,14 +950,17 @@ AC_SUBST([LTALLOCA])
gl_SYS_STAT_MODULE_INDICATOR([stat])
gl_STAT_TIME
gl_STAT_BIRTHTIME
- gl_STDALIGN_H
- gl_CONDITIONAL_HEADER([stdalign.h])
- AC_PROG_MKDIR_P
gl_STDARG_H
gl_CONDITIONAL_HEADER([stdarg.h])
AC_PROG_MKDIR_P
- gl_STDBOOL_H
- gl_CONDITIONAL_HEADER([stdbool.h])
+ gl_C_BOOL
+ AC_CHECK_HEADERS_ONCE([stdckdint.h])
+ if test $ac_cv_header_stdckdint_h = yes; then
+ GL_GENERATE_STDCKDINT_H=false
+ else
+ GL_GENERATE_STDCKDINT_H=true
+ fi
+ gl_CONDITIONAL_HEADER([stdckdint.h])
AC_PROG_MKDIR_P
gl_STDDEF_H
gl_STDDEF_H_REQUIRE_DEFAULTS
@@ -976,7 +1003,8 @@ AC_SUBST([LTALLOCA])
gl_STDLIB_H_REQUIRE_DEFAULTS
AC_PROG_MKDIR_P
gl_FUNC_STPCPY
- gl_CONDITIONAL([GL_COND_OBJ_STPCPY], [test $HAVE_STPCPY = 0])
+ gl_CONDITIONAL([GL_COND_OBJ_STPCPY],
+ [test $HAVE_STPCPY = 0 || test $REPLACE_STPCPY = 1])
AM_COND_IF([GL_COND_OBJ_STPCPY], [
gl_PREREQ_STPCPY
])
@@ -1152,7 +1180,8 @@ AC_SUBST([LTALLOCA])
gl_CONDITIONAL([GL_COND_OBJ_WMEMCHR], [test $HAVE_WMEMCHR = 0])
gl_WCHAR_MODULE_INDICATOR([wmemchr])
gl_FUNC_WMEMPCPY
- gl_CONDITIONAL([GL_COND_OBJ_WMEMPCPY], [test $HAVE_WMEMPCPY = 0])
+ gl_CONDITIONAL([GL_COND_OBJ_WMEMPCPY],
+ [test $HAVE_WMEMPCPY = 0 || test $REPLACE_WMEMPCPY = 1])
gl_WCHAR_MODULE_INDICATOR([wmempcpy])
gl_XALLOC
gl_MODULE_INDICATOR([xalloc])
@@ -1353,6 +1382,7 @@ AC_DEFUN([gl_FILE_LIST], [
lib/argp.h
lib/asnprintf.c
lib/asprintf.c
+ lib/assert.in.h
lib/assure.h
lib/at-func.c
lib/at-func2.c
@@ -1391,7 +1421,7 @@ AC_DEFUN([gl_FILE_LIST], [
lib/eloop-threshold.h
lib/errno.in.h
lib/error.c
- lib/error.h
+ lib/error.in.h
lib/exitfail.c
lib/exitfail.h
lib/fchdir.c
@@ -1496,6 +1526,7 @@ AC_DEFUN([gl_FILE_LIST], [
lib/idpriv-droptemp.c
lib/idpriv.h
lib/idx.h
+ lib/intprops-internal.h
lib/intprops.h
lib/inttypes.in.h
lib/ioctl.c
@@ -1521,7 +1552,6 @@ AC_DEFUN([gl_FILE_LIST], [
lib/malloc/dynarray_resize.c
lib/malloc/dynarray_resize_clear.c
lib/malloc/scratch_buffer.h
- lib/malloc/scratch_buffer_dupfree.c
lib/malloc/scratch_buffer_grow.c
lib/malloc/scratch_buffer_grow_preserve.c
lib/malloc/scratch_buffer_set_array_size.c
@@ -1617,9 +1647,8 @@ AC_DEFUN([gl_FILE_LIST], [
lib/stat-w32.c
lib/stat-w32.h
lib/stat.c
- lib/stdalign.in.h
lib/stdarg.in.h
- lib/stdbool.in.h
+ lib/stdckdint.in.h
lib/stddef.in.h
lib/stdint.in.h
lib/stdio-read.c
@@ -1721,8 +1750,10 @@ AC_DEFUN([gl_FILE_LIST], [
m4/alloca.m4
m4/argp.m4
m4/asm-underscore.m4
+ m4/assert_h.m4
m4/btowc.m4
m4/builtin-expect.m4
+ m4/c-bool.m4
m4/calloc.m4
m4/canonicalize.m4
m4/chdir-long.m4
@@ -1743,6 +1774,7 @@ AC_DEFUN([gl_FILE_LIST], [
m4/environ.m4
m4/errno_h.m4
m4/error.m4
+ m4/error_h.m4
m4/exponentd.m4
m4/extensions.m4
m4/extern-inline.m4
@@ -1824,6 +1856,7 @@ AC_DEFUN([gl_FILE_LIST], [
m4/msvc-inval.m4
m4/msvc-nothrow.m4
m4/multiarch.m4
+ m4/musl.m4
m4/nanosleep.m4
m4/nl_langinfo.m4
m4/nocrash.m4
@@ -1873,7 +1906,6 @@ AC_DEFUN([gl_FILE_LIST], [
m4/std-gnu11.m4
m4/stdalign.m4
m4/stdarg.m4
- m4/stdbool.m4
m4/stddef_h.m4
m4/stdint.m4
m4/stdint_h.m4
@@ -1932,6 +1964,5 @@ AC_DEFUN([gl_FILE_LIST], [
m4/xsize.m4
m4/xstrndup.m4
m4/xvasprintf.m4
- m4/year2038.m4
m4/zzgnulib.m4
])
diff --git a/gl/m4/host-cpu-c-abi.m4 b/gl/m4/host-cpu-c-abi.m4
index b9223241..134f2283 100644
--- a/gl/m4/host-cpu-c-abi.m4
+++ b/gl/m4/host-cpu-c-abi.m4
@@ -1,5 +1,5 @@
# host-cpu-c-abi.m4 serial 15
-dnl Copyright (C) 2002-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/idpriv.m4 b/gl/m4/idpriv.m4
index b3b1c7b4..fc3dd17d 100644
--- a/gl/m4/idpriv.m4
+++ b/gl/m4/idpriv.m4
@@ -1,5 +1,5 @@
# idpriv.m4 serial 1
-dnl Copyright (C) 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/include_next.m4 b/gl/m4/include_next.m4
index a9247f6f..9f19215e 100644
--- a/gl/m4/include_next.m4
+++ b/gl/m4/include_next.m4
@@ -1,5 +1,5 @@
# include_next.m4 serial 26
-dnl Copyright (C) 2006-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/intmax_t.m4 b/gl/m4/intmax_t.m4
index 8a15dabd..ef32e1b9 100644
--- a/gl/m4/intmax_t.m4
+++ b/gl/m4/intmax_t.m4
@@ -1,5 +1,5 @@
# intmax_t.m4 serial 9
-dnl Copyright (C) 1997-2004, 2006-2007, 2009-2022 Free Software Foundation,
+dnl Copyright (C) 1997-2004, 2006-2007, 2009-2023 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/gl/m4/inttypes.m4 b/gl/m4/inttypes.m4
index df25a21e..e7efbe94 100644
--- a/gl/m4/inttypes.m4
+++ b/gl/m4/inttypes.m4
@@ -1,5 +1,5 @@
-# inttypes.m4 serial 36
-dnl Copyright (C) 2006-2022 Free Software Foundation, Inc.
+# inttypes.m4 serial 37
+dnl Copyright (C) 2006-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -170,6 +170,10 @@ AC_DEFUN([gl_INTTYPES_H_DEFAULTS],
HAVE_DECL_STRTOIMAX=1; AC_SUBST([HAVE_DECL_STRTOIMAX])
HAVE_DECL_STRTOUMAX=1; AC_SUBST([HAVE_DECL_STRTOUMAX])
HAVE_IMAXDIV_T=1; AC_SUBST([HAVE_IMAXDIV_T])
+ HAVE_IMAXABS=1; AC_SUBST([HAVE_IMAXABS])
+ HAVE_IMAXDIV=1; AC_SUBST([HAVE_IMAXDIV])
+ REPLACE_IMAXABS=0; AC_SUBST([REPLACE_IMAXABS])
+ REPLACE_IMAXDIV=0; AC_SUBST([REPLACE_IMAXDIV])
REPLACE_STRTOIMAX=0; AC_SUBST([REPLACE_STRTOIMAX])
REPLACE_STRTOUMAX=0; AC_SUBST([REPLACE_STRTOUMAX])
INT32_MAX_LT_INTMAX_MAX=1; AC_SUBST([INT32_MAX_LT_INTMAX_MAX])
diff --git a/gl/m4/inttypes_h.m4 b/gl/m4/inttypes_h.m4
index 6e9eebf1..68c60e9d 100644
--- a/gl/m4/inttypes_h.m4
+++ b/gl/m4/inttypes_h.m4
@@ -1,5 +1,5 @@
# inttypes_h.m4 serial 10
-dnl Copyright (C) 1997-2004, 2006, 2008-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 1997-2004, 2006, 2008-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/ioctl.m4 b/gl/m4/ioctl.m4
index 7c721345..83036c3a 100644
--- a/gl/m4/ioctl.m4
+++ b/gl/m4/ioctl.m4
@@ -1,5 +1,5 @@
# ioctl.m4 serial 6
-dnl Copyright (C) 2008-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/isblank.m4 b/gl/m4/isblank.m4
index 1d0ed6ce..809eab46 100644
--- a/gl/m4/isblank.m4
+++ b/gl/m4/isblank.m4
@@ -1,5 +1,5 @@
# isblank.m4 serial 3
-dnl Copyright (C) 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/langinfo_h.m4 b/gl/m4/langinfo_h.m4
index 563c8c43..b17a526a 100644
--- a/gl/m4/langinfo_h.m4
+++ b/gl/m4/langinfo_h.m4
@@ -1,5 +1,5 @@
# langinfo_h.m4 serial 12
-dnl Copyright (C) 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/largefile.m4 b/gl/m4/largefile.m4
index 3e8b5e39..8b051c00 100644
--- a/gl/m4/largefile.m4
+++ b/gl/m4/largefile.m4
@@ -1,7 +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-2022 Free Software Foundation, Inc.
+# Copyright 1992-1996, 1998-2023 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.
@@ -10,8 +10,9 @@
# It does not set _LARGEFILE_SOURCE=1 on HP-UX/ia64 32-bit, although this
# setting of _LARGEFILE_SOURCE is needed so that <stdio.h> declares fseeko
# and ftello in C++ mode as well.
+# This problem occurs in Autoconf 2.71 and earlier, which lack AC_SYS_YEAR2038.
AC_DEFUN([gl_SET_LARGEFILE_SOURCE],
-[
+ m4_ifndef([AC_SYS_YEAR2038], [[
AC_REQUIRE([AC_CANONICAL_HOST])
AC_FUNC_FSEEKO
case "$host_os" in
@@ -20,56 +21,264 @@ AC_DEFUN([gl_SET_LARGEFILE_SOURCE],
[Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2).])
;;
esac
+ ]])
+)
+
+m4_ifndef([AC_SYS_YEAR2038_RECOMMENDED], [
+# Support AC_SYS_YEAR2038_RECOMMENDED and related macros, even if
+# Autoconf 2.71 or earlier. This code is taken from Autoconf master.
+
+# _AC_SYS_YEAR2038_TEST_CODE
+# --------------------------
+# C code used to probe for time_t that can represent time points more
+# than 2**31 - 1 seconds after the epoch. With the usual Unix epoch,
+# these correspond to dates after 2038-01-18 22:14:07 +0000 (Gregorian),
+# hence the name.
+AC_DEFUN([_AC_SYS_YEAR2038_TEST_CODE],
+[[
+ #include <time.h>
+ /* Check that time_t can represent 2**32 - 1 correctly. */
+ #define LARGE_TIME_T \\
+ ((time_t) (((time_t) 1 << 30) - 1 + 3 * ((time_t) 1 << 30)))
+ int verify_time_t_range[(LARGE_TIME_T / 65537 == 65535
+ && LARGE_TIME_T % 65537 == 0)
+ ? 1 : -1];
+]])
+
+# _AC_SYS_YEAR2038_OPTIONS
+# ------------------------
+# List of known ways to enable support for large time_t. If you change
+# this list you probably also need to change the AS_CASE at the end of
+# _AC_SYS_YEAR2038_PROBE.
+m4_define([_AC_SYS_YEAR2038_OPTIONS], m4_normalize(
+ ["none needed"] dnl 64-bit and newer 32-bit Unix
+ ["-D_TIME_BITS=64"] dnl glibc 2.34 with some 32-bit ABIs
+ ["-D__MINGW_USE_VC2005_COMPAT"] dnl 32-bit MinGW
+ ["-U_USE_32_BIT_TIME_T -D__MINGW_USE_VC2005_COMPAT"]
+ dnl 32-bit MinGW (misconfiguration)
+))
+
+# _AC_SYS_YEAR2038_PROBE
+# ----------------------
+# Subroutine of AC_SYS_YEAR2038. Probe for time_t that can represent
+# time points more than 2**31 - 1 seconds after the epoch (dates after
+# 2038-01-18, see above) and set the cache variable ac_cv_sys_year2038_opts
+# to one of the values in the _AC_SYS_YEAR2038_OPTIONS list, or to
+# "support not detected" if none of them worked. Then, set compilation
+# options and #defines as necessary to enable large time_t support.
+#
+# Note that we do not test whether mktime, localtime, etc. handle
+# large values of time_t correctly, as that would require use of
+# AC_TRY_RUN. Note also that some systems only support large time_t
+# together with large off_t.
+#
+# If you change this macro you may also need to change
+# _AC_SYS_YEAR2038_OPTIONS.
+AC_DEFUN([_AC_SYS_YEAR2038_PROBE],
+[AC_CACHE_CHECK([for $CC option for timestamps after 2038],
+ [ac_cv_sys_year2038_opts],
+ [ac_save_CPPFLAGS="$CPPFLAGS"
+ ac_opt_found=no
+ for ac_opt in _AC_SYS_YEAR2038_OPTIONS; do
+ AS_IF([test x"$ac_opt" != x"none needed"],
+ [CPPFLAGS="$ac_save_CPPFLAGS $ac_opt"])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([_AC_SYS_YEAR2038_TEST_CODE])],
+ [ac_cv_sys_year2038_opts="$ac_opt"
+ ac_opt_found=yes])
+ test $ac_opt_found = no || break
+ done
+ CPPFLAGS="$ac_save_CPPFLAGS"
+ test $ac_opt_found = yes || ac_cv_sys_year2038_opts="support not detected"])
+
+ac_have_year2038=yes
+AS_CASE([$ac_cv_sys_year2038_opts],
+ ["none needed"], [],
+ ["support not detected"],
+ [ac_have_year2038=no],
+
+ ["-D_TIME_BITS=64"],
+ [AC_DEFINE([_TIME_BITS], [64],
+ [Number of bits in time_t, on hosts where this is settable.])],
+
+ ["-D__MINGW_USE_VC2005_COMPAT"],
+ [AC_DEFINE([__MINGW_USE_VC2005_COMPAT], [1],
+ [Define to 1 on platforms where this makes time_t a 64-bit type.])],
+
+ ["-U_USE_32_BIT_TIME_T"*],
+ [AC_MSG_FAILURE(m4_text_wrap(
+ [the 'time_t' type is currently forced to be 32-bit.
+ It will stop working after mid-January 2038.
+ Remove _USE_32BIT_TIME_T from the compiler flags.],
+ [], [], [55]))],
+
+ [AC_MSG_ERROR(
+ [internal error: bad value for \$ac_cv_sys_year2038_opts])])
])
-# Work around a problem in Autoconf through at least 2.71 on glibc 2.34+
-# with _TIME_BITS. Also, work around a problem in autoconf <= 2.69:
-# AC_SYS_LARGEFILE does not configure for large inodes on Mac OS X 10.5,
-# or configures them incorrectly in some cases.
-m4_version_prereq([2.70], [], [
-
-# _AC_SYS_LARGEFILE_TEST_INCLUDES
-# -------------------------------
-m4_define([_AC_SYS_LARGEFILE_TEST_INCLUDES],
-[#include <sys/types.h>
- /* Check that off_t can represent 2**63 - 1 correctly.
- We can't simply define LARGE_OFF_T to be 9223372036854775807,
+# _AC_SYS_YEAR2038_ENABLE
+# -----------------------
+# Depending on which of the YEAR2038 macros was used, add either an
+# --enable-year2038 or a --disable-year2038 to
+# the configure script. This is expanded very late and
+# therefore there cannot be any code in the AC_ARG_ENABLE. The
+# default value for 'enable_year2038' is emitted unconditionally
+# because the generated code always looks at this variable.
+m4_define([_AC_SYS_YEAR2038_ENABLE],
+[m4_divert_text([DEFAULTS],
+ m4_provide_if([AC_SYS_YEAR2038],
+ [enable_year2038=yes],
+ [enable_year2038=no]))]dnl
+[AC_ARG_ENABLE([year2038],
+ m4_provide_if([AC_SYS_YEAR2038],
+ [AS_HELP_STRING([--disable-year2038],
+ [don't support timestamps after 2038])],
+ [AS_HELP_STRING([--enable-year2038],
+ [support timestamps after 2038])]))])
+
+# AC_SYS_YEAR2038
+# ---------------
+# Attempt to detect and activate support for large time_t.
+# On systems where time_t is not always 64 bits, this probe can be
+# skipped by passing the --disable-year2038 option to configure.
+AC_DEFUN([AC_SYS_YEAR2038],
+[AC_REQUIRE([AC_SYS_LARGEFILE])dnl
+AS_IF([test "$enable_year2038,$ac_have_year2038,$cross_compiling" = yes,no,no],
+ [# If we're not cross compiling and 'touch' works with a large
+ # timestamp, then we can presume the system supports wider time_t
+ # *somehow* and we just weren't able to detect it. One common
+ # case that we deliberately *don't* probe for is a system that
+ # supports both 32- and 64-bit ABIs but only the 64-bit ABI offers
+ # wide time_t. (It would be inappropriate for us to override an
+ # intentional use of -m32.) Error out, demanding use of
+ # --disable-year2038 if this is intentional.
+ AS_IF([TZ=UTC0 touch -t 210602070628.15 conftest.time 2>/dev/null],
+ [AS_CASE([`TZ=UTC0 LC_ALL=C ls -l conftest.time 2>/dev/null`],
+ [*'Feb 7 2106'* | *'Feb 7 17:10'*],
+ [AC_MSG_FAILURE(m4_text_wrap(
+ [this system appears to support timestamps after mid-January 2038,
+ but no mechanism for enabling wide 'time_t' was detected.
+ Did you mean to build a 64-bit binary? (E.g., 'CC="${CC} -m64"'.)
+ To proceed with 32-bit time_t, configure with '--disable-year2038'.],
+ [], [], [55]))])])])])
+
+# AC_SYS_YEAR2038_RECOMMENDED
+# ---------------------------
+# Same as AC_SYS_YEAR2038, but recommend support for large time_t.
+# If we cannot find any way to make time_t capable of representing
+# values larger than 2**31 - 1, error out unless --disable-year2038 is given.
+AC_DEFUN([AC_SYS_YEAR2038_RECOMMENDED],
+[AC_REQUIRE([AC_SYS_YEAR2038])dnl
+AS_IF([test "$enable_year2038,$ac_have_year2038" = yes,no],
+ [AC_MSG_FAILURE(m4_text_wrap(
+ [could not enable timestamps after mid-January 2038.
+ This package recommends support for these later timestamps.
+ However, to proceed with signed 32-bit time_t even though it
+ will fail then, configure with '--disable-year2038'.],
+ [], [], [55]))])])
+
+# _AC_SYS_LARGEFILE_TEST_CODE
+# ---------------------------
+# C code used to probe for large file support.
+m4_define([_AC_SYS_LARGEFILE_TEST_CODE],
+[@%:@include <sys/types.h>
+@%:@ifndef FTYPE
+@%:@ define FTYPE off_t
+@%:@endif
+ /* Check that FTYPE can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_FTYPE to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
- int off_t_is_large[[(LARGE_OFF_T % 2147483629 == 721
- && LARGE_OFF_T % 2147483647 == 1)
- ? 1 : -1]];[]dnl
+@%:@define LARGE_FTYPE (((FTYPE) 1 << 31 << 31) - 1 + ((FTYPE) 1 << 31 << 31))
+ int FTYPE_is_large[[(LARGE_FTYPE % 2147483629 == 721
+ && LARGE_FTYPE % 2147483647 == 1)
+ ? 1 : -1]];[]dnl
])
-])# m4_version_prereq 2.70
-
-
-# _AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, VALUE,
-# CACHE-VAR,
-# DESCRIPTION,
-# PROLOGUE, [FUNCTION-BODY])
-# --------------------------------------------------------
-m4_define([_AC_SYS_LARGEFILE_MACRO_VALUE],
-[AC_CACHE_CHECK([for $1 value needed for large files], [$3],
-[while :; do
- m4_ifval([$6], [AC_LINK_IFELSE], [AC_COMPILE_IFELSE])(
- [AC_LANG_PROGRAM([$5], [$6])],
- [$3=no; break])
- m4_ifval([$6], [AC_LINK_IFELSE], [AC_COMPILE_IFELSE])(
- [AC_LANG_PROGRAM([#undef $1
-#define $1 $2
-$5], [$6])],
- [$3=$2; break])
- $3=unknown
- break
-done])
-case $$3 in #(
- no | unknown) ;;
- *) AC_DEFINE_UNQUOTED([$1], [$$3], [$4]);;
-esac
-rm -rf conftest*[]dnl
-])# _AC_SYS_LARGEFILE_MACRO_VALUE
+# Defined by Autoconf 2.71 and circa 2022 Gnulib unwisely depended on it.
+m4_define([_AC_SYS_LARGEFILE_TEST_INCLUDES], [_AC_SYS_LARGEFILE_TEST_CODE])
+
+# _AC_SYS_LARGEFILE_OPTIONS
+# -------------------------
+# List of known ways to enable support for large files. If you change
+# this list you probably also need to change the AS_CASE at the end of
+# _AC_SYS_LARGEFILE_PROBE.
+m4_define([_AC_SYS_LARGEFILE_OPTIONS], m4_normalize(
+ ["none needed"] dnl Most current systems
+ ["-D_FILE_OFFSET_BITS=64"] dnl X/Open LFS spec
+ ["-D_LARGE_FILES=1"] dnl 32-bit AIX 4.2.1+, 32-bit z/OS
+ ["-n32"] dnl 32-bit IRIX 6, SGI cc (obsolete)
+))
+
+# _AC_SYS_LARGEFILE_PROBE
+# -----------------------
+# Subroutine of AC_SYS_LARGEFILE. Probe for large file support and set
+# the cache variable ac_cv_sys_largefile_opts to one of the values in
+# the _AC_SYS_LARGEFILE_OPTIONS list, or to "support not detected" if
+# none of the options in that list worked. Then, set compilation
+# options and #defines as necessary to enable large file support.
+#
+# If large file support is not detected, the behavior depends on which of
+# the top-level AC_SYS_LARGEFILE macros was used (see below).
+#
+# If you change this macro you may also need to change
+# _AC_SYS_LARGEFILE_OPTIONS.
+AC_DEFUN([_AC_SYS_LARGEFILE_PROBE],
+[AC_CACHE_CHECK([for $CC option to enable large file support],
+ [ac_cv_sys_largefile_opts],
+ [ac_save_CC="$CC"
+ ac_opt_found=no
+ for ac_opt in _AC_SYS_LARGEFILE_OPTIONS; do
+ AS_IF([test x"$ac_opt" != x"none needed"],
+ [CC="$ac_save_CC $ac_opt"])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([_AC_SYS_LARGEFILE_TEST_CODE])],
+ [AS_IF([test x"$ac_opt" = x"none needed"],
+ [# GNU/Linux s390x and alpha need _FILE_OFFSET_BITS=64 for wide ino_t.
+ CC="$CC -DFTYPE=ino_t"
+ AC_COMPILE_IFELSE([], [],
+ [CC="$CC -D_FILE_OFFSET_BITS=64"
+ AC_COMPILE_IFELSE([], [ac_opt='-D_FILE_OFFSET_BITS=64'])])])
+ ac_cv_sys_largefile_opts=$ac_opt
+ ac_opt_found=yes])
+ test $ac_opt_found = no || break
+ done
+ CC="$ac_save_CC"
+ dnl Gnulib implements large file support for native Windows, based on the
+ dnl variables WINDOWS_64_BIT_OFF_T, WINDOWS_64_BIT_ST_SIZE.
+ m4_ifdef([gl_LARGEFILE], [
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ if test $ac_opt_found != yes; then
+ AS_CASE([$host_os],
+ [mingw*],
+ [ac_cv_sys_largefile_opts="supported through gnulib"
+ ac_opt_found=yes]
+ )
+ fi
+ ])
+ test $ac_opt_found = yes || ac_cv_sys_largefile_opts="support not detected"])
+
+ac_have_largefile=yes
+AS_CASE([$ac_cv_sys_largefile_opts],
+ ["none needed"], [],
+ ["supported through gnulib"], [],
+ ["support not detected"],
+ [ac_have_largefile=no],
+
+ ["-D_FILE_OFFSET_BITS=64"],
+ [AC_DEFINE([_FILE_OFFSET_BITS], [64],
+ [Number of bits in a file offset, on hosts where this is settable.])],
+
+ ["-D_LARGE_FILES=1"],
+ [AC_DEFINE([_LARGE_FILES], [1],
+ [Define to 1 on platforms where this makes off_t a 64-bit type.])],
+
+ ["-n32"],
+ [CC="$CC -n32"],
+
+ [AC_MSG_ERROR(
+ [internal error: bad value for \$ac_cv_sys_largefile_opts])])
+AS_IF([test "$enable_year2038" != no],
+ [_AC_SYS_YEAR2038_PROBE])
+AC_CONFIG_COMMANDS_PRE([_AC_SYS_YEAR2038_ENABLE])])
# AC_SYS_LARGEFILE
# ----------------
@@ -81,43 +290,12 @@ rm -rf conftest*[]dnl
# 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])
-AS_IF([test "$enable_largefile" != no],
- [AC_CACHE_CHECK([for special C compiler options needed for large files],
- ac_cv_sys_largefile_CC,
- [ac_cv_sys_largefile_CC=no
- if test "$GCC" != yes; then
- ac_save_CC=$CC
- while :; do
- # IRIX 6.2 and later do not support large files by default,
- # so use the C compiler's -n32 option if that helps.
- AC_LANG_CONFTEST([AC_LANG_PROGRAM([_AC_SYS_LARGEFILE_TEST_INCLUDES])])
- AC_COMPILE_IFELSE([], [break])
- CC="$CC -n32"
- AC_COMPILE_IFELSE([], [ac_cv_sys_largefile_CC=' -n32'; break])
- break
- done
- CC=$ac_save_CC
- rm -f conftest.$ac_ext
- fi])
- if test "$ac_cv_sys_largefile_CC" != no; then
- CC=$CC$ac_cv_sys_largefile_CC
- fi
-
- _AC_SYS_LARGEFILE_MACRO_VALUE(_FILE_OFFSET_BITS, 64,
- ac_cv_sys_file_offset_bits,
- [Number of bits in a file offset, on hosts where this is settable.],
- [_AC_SYS_LARGEFILE_TEST_INCLUDES])
- AS_CASE([$ac_cv_sys_file_offset_bits],
- [unknown],
- [_AC_SYS_LARGEFILE_MACRO_VALUE([_LARGE_FILES], [1],
- [ac_cv_sys_large_files],
- [Define for large files, on AIX-style hosts.],
- [_AC_SYS_LARGEFILE_TEST_INCLUDES])],
- [64],
- [gl_YEAR2038_BODY([])])])
-])# AC_SYS_LARGEFILE
+[AC_ARG_ENABLE([largefile],
+ [AS_HELP_STRING([--disable-largefile],
+ [omit support for large files])])dnl
+AS_IF([test "$enable_largefile,$enable_year2038" != no,no],
+ [_AC_SYS_LARGEFILE_PROBE])])
+])# m4_ifndef AC_SYS_YEAR2038_RECOMMENDED
# Enable large files on systems where this is implemented by Gnulib, not by the
# system headers.
diff --git a/gl/m4/lchown.m4 b/gl/m4/lchown.m4
index 9f9cd427..c3e6c11f 100644
--- a/gl/m4/lchown.m4
+++ b/gl/m4/lchown.m4
@@ -1,7 +1,7 @@
# serial 17
# Determine whether we need the lchown wrapper.
-dnl Copyright (C) 1998, 2001, 2003-2007, 2009-2022 Free Software Foundation,
+dnl Copyright (C) 1998, 2001, 2003-2007, 2009-2023 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
diff --git a/gl/m4/lib-ignore.m4 b/gl/m4/lib-ignore.m4
index 4928e67c..c4d02173 100644
--- a/gl/m4/lib-ignore.m4
+++ b/gl/m4/lib-ignore.m4
@@ -1,6 +1,6 @@
# If possible, ignore libraries that are not depended on.
-dnl Copyright (C) 2006, 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2009-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/lib-ld.m4 b/gl/m4/lib-ld.m4
index 934207a7..acc61274 100644
--- a/gl/m4/lib-ld.m4
+++ b/gl/m4/lib-ld.m4
@@ -1,5 +1,5 @@
-# lib-ld.m4 serial 10
-dnl Copyright (C) 1996-2003, 2009-2022 Free Software Foundation, Inc.
+# lib-ld.m4 serial 11
+dnl Copyright (C) 1996-2003, 2009-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -29,7 +29,7 @@ AC_DEFUN([AC_LIB_PROG_LD],
AC_REQUIRE([AC_CANONICAL_HOST])dnl
AC_ARG_WITH([gnu-ld],
- [AS_HELP_STRING([--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
diff --git a/gl/m4/lib-link.m4 b/gl/m4/lib-link.m4
index 3b75bcd0..5f8afae6 100644
--- a/gl/m4/lib-link.m4
+++ b/gl/m4/lib-link.m4
@@ -1,5 +1,5 @@
# lib-link.m4 serial 33
-dnl Copyright (C) 2001-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -224,7 +224,7 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
additional_libdir3=
fi
dnl Search the library and its dependencies in $additional_libdir and
- dnl $LDFLAGS. Using breadth-first-seach.
+ dnl $LDFLAGS. Use breadth-first search.
LIB[]NAME=
LTLIB[]NAME=
INC[]NAME=
diff --git a/gl/m4/lib-prefix.m4 b/gl/m4/lib-prefix.m4
index 999f712f..aefe7f71 100644
--- a/gl/m4/lib-prefix.m4
+++ b/gl/m4/lib-prefix.m4
@@ -1,5 +1,5 @@
# lib-prefix.m4 serial 20
-dnl Copyright (C) 2001-2005, 2008-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2005, 2008-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/limits-h.m4 b/gl/m4/limits-h.m4
index 5d5a5bf5..6a5983eb 100644
--- a/gl/m4/limits-h.m4
+++ b/gl/m4/limits-h.m4
@@ -1,6 +1,6 @@
dnl Check whether limits.h has needed features.
-dnl Copyright 2016-2022 Free Software Foundation, Inc.
+dnl Copyright 2016-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -23,14 +23,27 @@ AC_DEFUN_ONCE([gl_LIMITS_H],
int wb = WORD_BIT;
int ullw = ULLONG_WIDTH;
int bw = BOOL_WIDTH;
+ int bm = BOOL_MAX;
+ int mblm = MB_LEN_MAX;
]])],
[gl_cv_header_limits_width=yes],
[gl_cv_header_limits_width=no])])
- if test "$gl_cv_header_limits_width" = yes; then
- GL_GENERATE_LIMITS_H=false
- else
- GL_GENERATE_LIMITS_H=true
- fi
+ GL_GENERATE_LIMITS_H=true
+ AS_IF([test "$gl_cv_header_limits_width" = yes],
+ [AC_CACHE_CHECK([whether limits.h has SSIZE_MAX],
+ [gl_cv_header_limits_ssize_max],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#include <limits.h>
+ #ifndef SSIZE_MAX
+ #error "SSIZE_MAX is not defined"
+ #endif
+ ]])],
+ [gl_cv_header_limits_ssize_max=yes],
+ [gl_cv_header_limits_ssize_max=no])])
+ if test "$gl_cv_header_limits_ssize_max" = yes; then
+ GL_GENERATE_LIMITS_H=false
+ fi])
])
dnl Unconditionally enables the replacement of <limits.h>.
diff --git a/gl/m4/localcharset.m4 b/gl/m4/localcharset.m4
index f5dbbd4f..15b6b2a5 100644
--- a/gl/m4/localcharset.m4
+++ b/gl/m4/localcharset.m4
@@ -1,5 +1,5 @@
# localcharset.m4 serial 8
-dnl Copyright (C) 2002, 2004, 2006, 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2004, 2006, 2009-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/locale-fr.m4 b/gl/m4/locale-fr.m4
index 3753891f..107ab931 100644
--- a/gl/m4/locale-fr.m4
+++ b/gl/m4/locale-fr.m4
@@ -1,5 +1,5 @@
-# locale-fr.m4 serial 20
-dnl Copyright (C) 2003, 2005-2022 Free Software Foundation, Inc.
+# locale-fr.m4 serial 21
+dnl Copyright (C) 2003, 2005-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -7,7 +7,7 @@ dnl with or without modifications, as long as this notice is preserved.
dnl From Bruno Haible.
dnl Determine the name of a french locale with traditional encoding.
-AC_DEFUN([gt_LOCALE_FR],
+AC_DEFUN_ONCE([gt_LOCALE_FR],
[
AC_REQUIRE([AC_CANONICAL_HOST])
AC_REQUIRE([AM_LANGINFO_CODESET])
@@ -137,11 +137,21 @@ int main () {
])
dnl Determine the name of a french locale with UTF-8 encoding.
-AC_DEFUN([gt_LOCALE_FR_UTF8],
+AC_DEFUN_ONCE([gt_LOCALE_FR_UTF8],
[
+ AC_REQUIRE([AC_CANONICAL_HOST])
AC_REQUIRE([AM_LANGINFO_CODESET])
AC_CACHE_CHECK([for a french Unicode locale], [gt_cv_locale_fr_utf8], [
- AC_LANG_CONFTEST([AC_LANG_SOURCE([[
+ case "$host_os" in
+ *-musl* | midipix*)
+ dnl On musl libc, all kinds of ll_CC.UTF-8 locales exist, even without
+ dnl any locale file on disk. But they are effectively equivalent to the
+ dnl C.UTF-8 locale, except for locale categories (such as LC_MESSSAGES)
+ dnl for which localizations (.mo files) have been installed.
+ gt_cv_locale_fr_utf8=fr_FR.UTF-8
+ ;;
+ *)
+ AC_LANG_CONFTEST([AC_LANG_SOURCE([[
#include <locale.h>
#include <time.h>
#if HAVE_LANGINFO_CODESET
@@ -203,51 +213,76 @@ int main () {
#endif
return 0;
}
- ]])])
- if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
- case "$host_os" in
- # Handle native Windows specially, because there setlocale() interprets
- # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
- # "fr" or "fra" as "French" or "French_France.1252",
- # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
- # "ja" as "Japanese" or "Japanese_Japan.932",
- # and similar.
- mingw*)
- # Test for the hypothetical native Windows locale name.
- if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
- gt_cv_locale_fr_utf8=French_France.65001
- else
- # None found.
- gt_cv_locale_fr_utf8=none
- fi
- ;;
- *)
- # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
- # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
- # configure script would override the LC_ALL setting. Likewise for
- # LC_CTYPE, which is also set at the beginning of the configure script.
- # Test for the usual locale name.
- if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
- gt_cv_locale_fr_utf8=fr_FR
- else
- # Test for the locale name with explicit encoding suffix.
- if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
- gt_cv_locale_fr_utf8=fr_FR.UTF-8
- else
- # Test for the Solaris 7 locale name.
- if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
- gt_cv_locale_fr_utf8=fr.UTF-8
+ ]])])
+ if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
+ case "$host_os" in
+ # Handle native Windows specially, because there setlocale() interprets
+ # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+ # "fr" or "fra" as "French" or "French_France.1252",
+ # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+ # "ja" as "Japanese" or "Japanese_Japan.932",
+ # and similar.
+ mingw*)
+ # Test for the hypothetical native Windows locale name.
+ if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=French_France.65001
else
# None found.
gt_cv_locale_fr_utf8=none
fi
- fi
- fi
- ;;
- esac
- fi
- rm -fr conftest*
+ ;;
+ *)
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR.UTF-8
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr.UTF-8
+ else
+ # None found.
+ gt_cv_locale_fr_utf8=none
+ fi
+ fi
+ fi
+ ;;
+ esac
+ fi
+ rm -fr conftest*
+ ;;
+ esac
])
LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
AC_SUBST([LOCALE_FR_UTF8])
+
+ dnl Users of $LOCALE_FR_UTF8 need to know which of the locale categories they
+ dnl can rely on.
+ case "$host_os" in
+ *-musl* | midipix*)
+ dnl On musl libc, locale categories other than LC_CTYPE and LC_MESSAGES
+ dnl are effectively unimplemented.
+ LC_COLLATE_IMPLEMENTED=false
+ LC_NUMERIC_IMPLEMENTED=false
+ LC_TIME_IMPLEMENTED=false
+ LC_MONETARY_IMPLEMENTED=false
+ ;;
+ *)
+ LC_COLLATE_IMPLEMENTED=true
+ LC_NUMERIC_IMPLEMENTED=true
+ LC_TIME_IMPLEMENTED=true
+ LC_MONETARY_IMPLEMENTED=true
+ ;;
+ esac
+ AC_SUBST([LC_COLLATE_IMPLEMENTED])
+ AC_SUBST([LC_NUMERIC_IMPLEMENTED])
+ AC_SUBST([LC_TIME_IMPLEMENTED])
+ AC_SUBST([LC_MONETARY_IMPLEMENTED])
])
diff --git a/gl/m4/locale-ja.m4 b/gl/m4/locale-ja.m4
index 73a5d1ae..f6ca327b 100644
--- a/gl/m4/locale-ja.m4
+++ b/gl/m4/locale-ja.m4
@@ -1,5 +1,5 @@
-# locale-ja.m4 serial 15
-dnl Copyright (C) 2003, 2005-2022 Free Software Foundation, Inc.
+# locale-ja.m4 serial 16
+dnl Copyright (C) 2003, 2005-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -7,7 +7,7 @@ dnl with or without modifications, as long as this notice is preserved.
dnl From Bruno Haible.
dnl Determine the name of a japanese locale with EUC-JP encoding.
-AC_DEFUN([gt_LOCALE_JA],
+AC_DEFUN_ONCE([gt_LOCALE_JA],
[
AC_REQUIRE([AC_CANONICAL_HOST])
AC_REQUIRE([AM_LANGINFO_CODESET])
diff --git a/gl/m4/locale-zh.m4 b/gl/m4/locale-zh.m4
index c997971f..94c54590 100644
--- a/gl/m4/locale-zh.m4
+++ b/gl/m4/locale-zh.m4
@@ -1,5 +1,5 @@
-# locale-zh.m4 serial 15
-dnl Copyright (C) 2003, 2005-2022 Free Software Foundation, Inc.
+# locale-zh.m4 serial 16
+dnl Copyright (C) 2003, 2005-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -7,7 +7,7 @@ dnl with or without modifications, as long as this notice is preserved.
dnl From Bruno Haible.
dnl Determine the name of a chinese locale with GB18030 encoding.
-AC_DEFUN([gt_LOCALE_ZH_CN],
+AC_DEFUN_ONCE([gt_LOCALE_ZH_CN],
[
AC_REQUIRE([AC_CANONICAL_HOST])
AC_REQUIRE([AM_LANGINFO_CODESET])
diff --git a/gl/m4/locale_h.m4 b/gl/m4/locale_h.m4
index ca5d0d0f..a33a0a46 100644
--- a/gl/m4/locale_h.m4
+++ b/gl/m4/locale_h.m4
@@ -1,5 +1,5 @@
# locale_h.m4 serial 28
-dnl Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/localeconv.m4 b/gl/m4/localeconv.m4
index 09c1a1ac..374dcbf5 100644
--- a/gl/m4/localeconv.m4
+++ b/gl/m4/localeconv.m4
@@ -1,5 +1,5 @@
-# localeconv.m4 serial 1
-dnl Copyright (C) 2012-2022 Free Software Foundation, Inc.
+# localeconv.m4 serial 2
+dnl Copyright (C) 2012-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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,10 +8,45 @@ AC_DEFUN([gl_FUNC_LOCALECONV],
[
AC_REQUIRE([gl_LOCALE_H_DEFAULTS])
AC_REQUIRE([gl_LOCALE_H])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
if test $REPLACE_STRUCT_LCONV = 1; then
REPLACE_LOCALECONV=1
fi
+ if test $REPLACE_LOCALECONV = 0; then
+ dnl Test whether fields of type 'char' are filled correctly.
+ dnl This test fails on mingw 5.0.3.
+ AC_CACHE_CHECK([whether localeconv works],
+ [gl_cv_func_localeconv_works],
+ [AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+ #include <locale.h>
+ #include <limits.h>
+ int main ()
+ {
+ struct lconv *l = localeconv ();
+ return l->frac_digits != CHAR_MAX && l->frac_digits < 0;
+ }
+ ]])],
+ [gl_cv_func_localeconv_works=yes],
+ [gl_cv_func_localeconv_works=no],
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_localeconv_works="guessing yes" ;;
+ # Guess yes on musl systems.
+ *-musl* | midipix*) gl_cv_func_localeconv_works="guessing yes" ;;
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_localeconv_works="guessing no" ;;
+ # If we don't know, obey --enable-cross-guesses.
+ *) gl_cv_func_localeconv_works="$gl_cross_guess_normal" ;;
+ esac
+ ])
+ ])
+ case "$gl_cv_func_localeconv_works" in
+ *yes) ;;
+ *) REPLACE_LOCALECONV=1 ;;
+ esac
+ fi
])
# Prerequisites of lib/localeconv.c.
@@ -19,4 +54,6 @@ AC_DEFUN([gl_PREREQ_LOCALECONV],
[
AC_CHECK_MEMBERS([struct lconv.decimal_point], [], [],
[[#include <locale.h>]])
+ AC_CHECK_MEMBERS([struct lconv.int_p_cs_precedes], [], [],
+ [[#include <locale.h>]])
])
diff --git a/gl/m4/lock.m4 b/gl/m4/lock.m4
index c4cbf07b..88cf5575 100644
--- a/gl/m4/lock.m4
+++ b/gl/m4/lock.m4
@@ -1,5 +1,5 @@
# lock.m4 serial 14
-dnl Copyright (C) 2005-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/lstat.m4 b/gl/m4/lstat.m4
index d987060b..2bc46697 100644
--- a/gl/m4/lstat.m4
+++ b/gl/m4/lstat.m4
@@ -1,6 +1,6 @@
-# serial 33
+# serial 34
-# Copyright (C) 1997-2001, 2003-2022 Free Software Foundation, Inc.
+# Copyright (C) 1997-2001, 2003-2023 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -56,6 +56,9 @@ AC_DEFUN([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK],
linux-* | linux)
# Guess yes on Linux systems.
gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
+ midipix*)
+ # Guess yes on systems that emulate the Linux system calls.
+ gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
*-gnu* | gnu*)
# Guess yes on glibc systems.
gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
diff --git a/gl/m4/malloc.m4 b/gl/m4/malloc.m4
index 6b76c1e6..bc580176 100644
--- a/gl/m4/malloc.m4
+++ b/gl/m4/malloc.m4
@@ -1,5 +1,5 @@
-# malloc.m4 serial 28
-dnl Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc.
+# malloc.m4 serial 29
+dnl Copyright (C) 2007, 2009-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -25,7 +25,7 @@ AC_DEFUN([_AC_FUNC_MALLOC_IF],
[case "$host_os" in
# Guess yes on platforms where we know the result.
*-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \
- | gnu* | *-musl* | midnightbsd* \
+ | gnu* | *-musl* | midipix* | midnightbsd* \
| hpux* | solaris* | cygwin* | mingw* | msys* )
ac_cv_func_malloc_0_nonnull="guessing yes" ;;
# If we don't know, obey --enable-cross-guesses.
diff --git a/gl/m4/malloca.m4 b/gl/m4/malloca.m4
index 77eb96a0..1d777ebe 100644
--- a/gl/m4/malloca.m4
+++ b/gl/m4/malloca.m4
@@ -1,5 +1,5 @@
# malloca.m4 serial 2
-dnl Copyright (C) 2003-2004, 2006-2007, 2009-2022 Free Software Foundation,
+dnl Copyright (C) 2003-2004, 2006-2007, 2009-2023 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/gl/m4/manywarnings.m4 b/gl/m4/manywarnings.m4
index f4b5853f..a06f26f6 100644
--- a/gl/m4/manywarnings.m4
+++ b/gl/m4/manywarnings.m4
@@ -1,11 +1,13 @@
-# manywarnings.m4 serial 23
-dnl Copyright (C) 2008-2022 Free Software Foundation, Inc.
+# manywarnings.m4 serial 24
+dnl Copyright (C) 2008-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl From Simon Josefsson
+AC_PREREQ([2.64])
+
# gl_MANYWARN_COMPLEMENT(OUTVAR, LISTVAR, REMOVEVAR)
# --------------------------------------------------
# Copy LISTVAR to OUTVAR except for the entries in REMOVEVAR.
@@ -21,7 +23,7 @@ AC_DEFUN([gl_MANYWARN_COMPLEMENT],
*" $gl_warn_item "*)
;;
*)
- gl_AS_VAR_APPEND([gl_warn_set], [" $gl_warn_item"])
+ AS_VAR_APPEND([gl_warn_set], [" $gl_warn_item"])
;;
esac
done
@@ -46,43 +48,31 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC(C)],
dnl First, check for some issues that only occur when combining multiple
dnl gcc warning categories.
AC_REQUIRE([AC_PROG_CC])
- if test -n "$GCC"; then
-
- dnl Check if -Wextra -Werror -Wno-missing-field-initializers is supported
- dnl with the current $CC $CFLAGS $CPPFLAGS.
- AC_CACHE_CHECK([whether -Wno-missing-field-initializers is supported],
- [gl_cv_cc_nomfi_supported],
- [gl_save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -Wextra -Werror -Wno-missing-field-initializers"
+ AS_IF([test -n "$GCC"], [
+ AC_CACHE_CHECK([whether -Wno-missing-field-initializers is needed],
+ [gl_cv_cc_nomfi_needed],
+ [gl_cv_cc_nomfi_needed=no
+ gl_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Wextra -Werror"
AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([[]], [[]])],
- [gl_cv_cc_nomfi_supported=yes],
- [gl_cv_cc_nomfi_supported=no])
+ [AC_LANG_PROGRAM(
+ [[struct file_data { int desc, name; };
+ struct cmp { struct file_data file[1]; };
+ void f (struct cmp *r)
+ {
+ typedef struct { int a; int b; } s_t;
+ s_t s1 = { 0, };
+ struct cmp cmp = { .file[0].desc = r->file[0].desc + s1.a };
+ *r = cmp;
+ }
+ ]],
+ [[]])],
+ [],
+ [CFLAGS="$CFLAGS -Wno-missing-field-initializers"
+ AC_COMPILE_IFELSE([],
+ [gl_cv_cc_nomfi_needed=yes])])
CFLAGS="$gl_save_CFLAGS"
- ])
-
- if test "$gl_cv_cc_nomfi_supported" = yes; then
- dnl Now check whether -Wno-missing-field-initializers is needed
- dnl for the { 0, } construct.
- AC_CACHE_CHECK([whether -Wno-missing-field-initializers is needed],
- [gl_cv_cc_nomfi_needed],
- [gl_save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -Wextra -Werror"
- AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[int f (void)
- {
- typedef struct { int a; int b; } s_t;
- s_t s1 = { 0, };
- return s1.b;
- }
- ]],
- [[]])],
- [gl_cv_cc_nomfi_needed=no],
- [gl_cv_cc_nomfi_needed=yes])
- CFLAGS="$gl_save_CFLAGS"
- ])
- fi
+ ])
dnl Next, check if -Werror -Wuninitialized is useful with the
dnl user's choice of $CFLAGS; some versions of gcc warn that it
@@ -97,8 +87,7 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC(C)],
[gl_cv_cc_uninitialized_supported=no])
CFLAGS="$gl_save_CFLAGS"
])
-
- fi
+ ])
# List all gcc warning categories.
# To compare this list to your installed GCC's, run this Bash command:
@@ -109,7 +98,7 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC(C)],
# <(LC_ALL=C gcc --help=warnings | sed -n 's/^ \(-[^ ]*\) .*/\1/p' | sort)
$1=
- for gl_manywarn_item in -fanalyzer -fno-common \
+ for gl_manywarn_item in -fanalyzer -fstrict-flex-arrays \
-Wall \
-Warith-conversion \
-Wbad-function-cast \
@@ -137,6 +126,7 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC(C)],
-Wpointer-arith \
-Wshadow \
-Wstack-protector \
+ -Wstrict-flex-arrays \
-Wstrict-overflow \
-Wstrict-prototypes \
-Wsuggest-attribute=cold \
@@ -160,46 +150,51 @@ AC_DEFUN([gl_MANYWARN_ALL_GCC(C)],
-Wwrite-strings \
\
; do
- gl_AS_VAR_APPEND([$1], [" $gl_manywarn_item"])
+ AS_VAR_APPEND([$1], [" $gl_manywarn_item"])
done
# gcc --help=warnings outputs an unusual form for these options; list
# them here so that the above 'comm' command doesn't report a false match.
- gl_AS_VAR_APPEND([$1], [' -Warray-bounds=2'])
- gl_AS_VAR_APPEND([$1], [' -Wattribute-alias=2'])
- gl_AS_VAR_APPEND([$1], [' -Wbidi-chars=any,ucn'])
- gl_AS_VAR_APPEND([$1], [' -Wformat-overflow=2'])
- gl_AS_VAR_APPEND([$1], [' -Wformat=2'])
- gl_AS_VAR_APPEND([$1], [' -Wformat-truncation=2'])
- gl_AS_VAR_APPEND([$1], [' -Wimplicit-fallthrough=5'])
- gl_AS_VAR_APPEND([$1], [' -Wshift-overflow=2'])
- gl_AS_VAR_APPEND([$1], [' -Wuse-after-free=3'])
- gl_AS_VAR_APPEND([$1], [' -Wunused-const-variable=2'])
- gl_AS_VAR_APPEND([$1], [' -Wvla-larger-than=4031'])
+ AS_VAR_APPEND([$1], [' -Warray-bounds=2'])
+ AS_VAR_APPEND([$1], [' -Wattribute-alias=2'])
+ AS_VAR_APPEND([$1], [' -Wbidi-chars=any,ucn'])
+ AS_VAR_APPEND([$1], [' -Wformat-overflow=2'])
+ AS_VAR_APPEND([$1], [' -Wformat=2'])
+ AS_VAR_APPEND([$1], [' -Wformat-truncation=2'])
+ AS_VAR_APPEND([$1], [' -Wimplicit-fallthrough=5'])
+ AS_VAR_APPEND([$1], [' -Wshift-overflow=2'])
+ AS_VAR_APPEND([$1], [' -Wuse-after-free=3'])
+ AS_VAR_APPEND([$1], [' -Wunused-const-variable=2'])
+ AS_VAR_APPEND([$1], [' -Wvla-larger-than=4031'])
# These are needed for older GCC versions.
- if test -n "$GCC"; then
- case `($CC --version) 2>/dev/null` in
+ if test -n "$GCC" && gl_gcc_version=`($CC --version) 2>/dev/null`; then
+ case $gl_gcc_version in
'gcc (GCC) '[[0-3]].* | \
'gcc (GCC) '4.[[0-7]].*)
- gl_AS_VAR_APPEND([$1], [' -fdiagnostics-show-option'])
- gl_AS_VAR_APPEND([$1], [' -funit-at-a-time'])
+ AS_VAR_APPEND([$1], [' -fdiagnostics-show-option'])
+ AS_VAR_APPEND([$1], [' -funit-at-a-time'])
+ ;;
+ esac
+ case $gl_gcc_version in
+ 'gcc (GCC) '[[0-9]].*)
+ AS_VAR_APPEND([$1], [' -fno-common'])
;;
esac
fi
# Disable specific options as needed.
if test "$gl_cv_cc_nomfi_needed" = yes; then
- gl_AS_VAR_APPEND([$1], [' -Wno-missing-field-initializers'])
+ AS_VAR_APPEND([$1], [' -Wno-missing-field-initializers'])
fi
if test "$gl_cv_cc_uninitialized_supported" = no; then
- gl_AS_VAR_APPEND([$1], [' -Wno-uninitialized'])
+ AS_VAR_APPEND([$1], [' -Wno-uninitialized'])
fi
# This warning have too many false alarms in GCC 11.2.1.
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101713
- gl_AS_VAR_APPEND([$1], [' -Wno-analyzer-malloc-leak'])
+ AS_VAR_APPEND([$1], [' -Wno-analyzer-malloc-leak'])
AC_LANG_POP([C])
])
diff --git a/gl/m4/math_h.m4 b/gl/m4/math_h.m4
index a08526a7..d2e90ff1 100644
--- a/gl/m4/math_h.m4
+++ b/gl/m4/math_h.m4
@@ -1,5 +1,5 @@
# math_h.m4 serial 125
-dnl Copyright (C) 2007-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/mbrtowc.m4 b/gl/m4/mbrtowc.m4
index ec8716b5..430e9ad8 100644
--- a/gl/m4/mbrtowc.m4
+++ b/gl/m4/mbrtowc.m4
@@ -1,5 +1,5 @@
-# mbrtowc.m4 serial 38 -*- coding: utf-8 -*-
-dnl Copyright (C) 2001-2002, 2004-2005, 2008-2022 Free Software Foundation,
+# mbrtowc.m4 serial 43 -*- coding: utf-8 -*-
+dnl Copyright (C) 2001-2002, 2004-2005, 2008-2023 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,
@@ -91,20 +91,23 @@ AC_DEFUN([gl_FUNC_MBRTOWC],
fi
if test $REPLACE_MBSTATE_T = 1; then
case "$host_os" in
- mingw*) LIB_MBRTOWC= ;;
+ mingw*) MBRTOWC_LIB= ;;
*)
gl_WEAK_SYMBOLS
case "$gl_cv_have_weak" in
- *yes) LIB_MBRTOWC= ;;
- *) LIB_MBRTOWC="$LIBPTHREAD" ;;
+ *yes) MBRTOWC_LIB= ;;
+ *) MBRTOWC_LIB="$LIBPTHREAD" ;;
esac
;;
esac
else
- LIB_MBRTOWC=
+ MBRTOWC_LIB=
fi
- dnl LIB_MBRTOWC is expected to be '-pthread' or '-lpthread' on AIX
+ dnl MBRTOWC_LIB is expected to be '-pthread' or '-lpthread' on AIX
dnl with gcc or xlc, and empty otherwise.
+ AC_SUBST([MBRTOWC_LIB])
+ dnl For backward compatibility.
+ LIB_MBRTOWC="$MBRTOWC_LIB"
AC_SUBST([LIB_MBRTOWC])
])
@@ -114,7 +117,7 @@ dnl Result is REPLACE_MBSTATE_T.
dnl When this is set to 1, we replace both mbsinit() and mbrtowc(), in order to
dnl avoid inconsistencies.
-AC_DEFUN([gl_MBSTATE_T_BROKEN],
+AC_DEFUN_ONCE([gl_MBSTATE_T_BROKEN],
[
AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
AC_REQUIRE([AC_CANONICAL_HOST])
@@ -426,7 +429,8 @@ int main ()
int result = 0;
int found_some_locale = 0;
/* This fails on Solaris. */
- if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+ if (strcmp ("$LOCALE_FR_UTF8", "none") != 0
+ && setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
{
char input[] = "B\303\274\303\237er"; /* "Büßer" */
mbstate_t state;
@@ -442,7 +446,8 @@ int main ()
found_some_locale = 1;
}
/* This fails on HP-UX 11.11. */
- if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+ if (strcmp ("$LOCALE_JA", "none") != 0
+ && setlocale (LC_ALL, "$LOCALE_JA") != NULL)
{
char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
mbstate_t state;
@@ -677,31 +682,28 @@ AC_DEFUN([gl_MBRTOWC_EMPTY_INPUT],
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([whether mbrtowc works on empty input],
[gl_cv_func_mbrtowc_empty_input],
- [
- dnl Initial guess, used when cross-compiling or when no suitable locale
- dnl is present.
-changequote(,)dnl
- case "$host_os" in
- # Guess no on AIX and glibc systems.
- aix* | *-gnu* | gnu*) gl_cv_func_mbrtowc_empty_input="guessing no" ;;
- # Guess yes on native Windows.
- mingw*) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
- *) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
- esac
-changequote([,])dnl
- AC_RUN_IFELSE(
- [AC_LANG_SOURCE([[
- #include <wchar.h>
- static wchar_t wc;
- static mbstate_t mbs;
- int
- main (void)
- {
- return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2;
- }]])],
- [gl_cv_func_mbrtowc_empty_input=yes],
- [gl_cv_func_mbrtowc_empty_input=no],
- [:])
+ [AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+ #include <wchar.h>
+ static wchar_t wc;
+ static mbstate_t mbs;
+ int
+ main (void)
+ {
+ return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2;
+ }]])],
+ [gl_cv_func_mbrtowc_empty_input=yes],
+ [gl_cv_func_mbrtowc_empty_input=no],
+ [case "$host_os" in
+ # Guess no on AIX and glibc systems.
+ aix* | *-gnu* | gnu*) gl_cv_func_mbrtowc_empty_input="guessing no" ;;
+ # Guess no on Android.
+ linux*-android*) gl_cv_func_mbrtowc_empty_input="guessing no" ;;
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_mbrtowc_empty_input="guessing no" ;;
+ *) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
+ esac
+ ])
])
])
@@ -709,18 +711,17 @@ dnl Test whether mbrtowc reports encoding errors in the C locale.
dnl Although POSIX was never intended to allow this, the GNU C Library
dnl and other implementations do it. See:
dnl https://sourceware.org/bugzilla/show_bug.cgi?id=19932
+dnl POSIX has now clarified it:
+dnl <https://pubs.opengroup.org/onlinepubs/9699919799/functions/mbrtowc.html>
+dnl says: "In the POSIX locale an [EILSEQ] error cannot occur since all byte
+dnl values are valid characters."
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_func_mbrtowc_C_locale_sans_EILSEQ],
- [
- dnl Initial guess, used when cross-compiling or when no suitable locale
- dnl is present.
- gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="$gl_cross_guess_normal"
-
- AC_RUN_IFELSE(
+ [AC_RUN_IFELSE(
[AC_LANG_PROGRAM(
[[#include <limits.h>
#include <locale.h>
@@ -741,13 +742,14 @@ AC_DEFUN([gl_MBRTOWC_C_LOCALE],
}
return 0;
]])],
- [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_func_mbrtowc_C_locale_sans_EILSEQ="guessing yes" ;;
- esac
- ])
+ [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_func_mbrtowc_C_locale_sans_EILSEQ="guessing yes" ;;
+ *) gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="$gl_cross_guess_normal" ;;
+ esac
+ ])
])
])
diff --git a/gl/m4/mbsinit.m4 b/gl/m4/mbsinit.m4
index ebd2d4ff..c388a8b9 100644
--- a/gl/m4/mbsinit.m4
+++ b/gl/m4/mbsinit.m4
@@ -1,5 +1,5 @@
# mbsinit.m4 serial 9
-dnl Copyright (C) 2008, 2010-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2008, 2010-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/mbsrtowcs.m4 b/gl/m4/mbsrtowcs.m4
index f672fa52..720f727f 100644
--- a/gl/m4/mbsrtowcs.m4
+++ b/gl/m4/mbsrtowcs.m4
@@ -1,5 +1,5 @@
-# mbsrtowcs.m4 serial 14
-dnl Copyright (C) 2008-2022 Free Software Foundation, Inc.
+# mbsrtowcs.m4 serial 16
+dnl Copyright (C) 2008-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -32,6 +32,13 @@ AC_DEFUN([gl_FUNC_MBSRTOWCS],
*yes) ;;
*) REPLACE_MBSRTOWCS=1 ;;
esac
+ if test $REPLACE_MBSRTOWCS = 0; then
+ gl_MBRTOWC_C_LOCALE
+ case "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" in
+ *yes) ;;
+ *) REPLACE_MBSRTOWCS=1 ;;
+ esac
+ fi
fi
fi
])
@@ -71,7 +78,8 @@ int main ()
int result = 0;
/* Test whether the function supports a NULL destination argument.
This fails on native Windows. */
- if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
+ if (strcmp ("$LOCALE_FR", "none") != 0
+ && setlocale (LC_ALL, "$LOCALE_FR") != NULL)
{
const char input[] = "\337er";
const char *src = input;
@@ -84,7 +92,8 @@ int main ()
}
/* Test whether the function works when started with a conversion state
in non-initial state. This fails on HP-UX 11.11 and Solaris 10. */
- if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+ if (strcmp ("$LOCALE_FR_UTF8", "none") != 0
+ && setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
{
const char input[] = "B\303\274\303\237er";
mbstate_t state;
@@ -98,7 +107,8 @@ int main ()
result |= 2;
}
}
- if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+ if (strcmp ("$LOCALE_JA", "none") != 0
+ && setlocale (LC_ALL, "$LOCALE_JA") != NULL)
{
const char input[] = "<\306\374\313\334\270\354>";
mbstate_t state;
@@ -112,7 +122,8 @@ int main ()
result |= 4;
}
}
- if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+ if (strcmp ("$LOCALE_ZH_CN", "none") != 0
+ && setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
{
const char input[] = "B\250\271\201\060\211\070er";
mbstate_t state;
diff --git a/gl/m4/mbstate_t.m4 b/gl/m4/mbstate_t.m4
index a6eba1bc..dcd66b96 100644
--- a/gl/m4/mbstate_t.m4
+++ b/gl/m4/mbstate_t.m4
@@ -1,5 +1,5 @@
# mbstate_t.m4 serial 14
-dnl Copyright (C) 2000-2002, 2008-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2000-2002, 2008-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/mbtowc.m4 b/gl/m4/mbtowc.m4
index 2827e833..02ed6ebb 100644
--- a/gl/m4/mbtowc.m4
+++ b/gl/m4/mbtowc.m4
@@ -1,5 +1,5 @@
-# mbtowc.m4 serial 3
-dnl Copyright (C) 2011-2022 Free Software Foundation, Inc.
+# mbtowc.m4 serial 5
+dnl Copyright (C) 2011-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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,9 +8,12 @@ AC_DEFUN([gl_FUNC_MBTOWC],
[
AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
- AC_CHECK_FUNCS([mbtowc])
+ gl_CHECK_FUNCS_ANDROID([mbtowc], [[#include <stdlib.h>]])
if test $ac_cv_func_mbtowc = no; then
HAVE_MBTOWC=0
+ case "$gl_cv_onwards_func_mbtowc" in
+ future*) REPLACE_MBTOWC=1 ;;
+ esac
else
if false; then
REPLACE_MBTOWC=1
diff --git a/gl/m4/memchr.m4 b/gl/m4/memchr.m4
index c7489d87..4f1aed01 100644
--- a/gl/m4/memchr.m4
+++ b/gl/m4/memchr.m4
@@ -1,5 +1,5 @@
# memchr.m4 serial 18
-dnl Copyright (C) 2002-2004, 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2004, 2009-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/memmem.m4 b/gl/m4/memmem.m4
index e01aa5c7..3cf46bc2 100644
--- a/gl/m4/memmem.m4
+++ b/gl/m4/memmem.m4
@@ -1,5 +1,5 @@
# memmem.m4 serial 29
-dnl Copyright (C) 2002-2004, 2007-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2004, 2007-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/mempcpy.m4 b/gl/m4/mempcpy.m4
index 1107eb4a..612b77b3 100644
--- a/gl/m4/mempcpy.m4
+++ b/gl/m4/mempcpy.m4
@@ -1,5 +1,5 @@
-# mempcpy.m4 serial 12
-dnl Copyright (C) 2003-2004, 2006-2007, 2009-2022 Free Software Foundation,
+# mempcpy.m4 serial 14
+dnl Copyright (C) 2003-2004, 2006-2007, 2009-2023 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,
@@ -14,9 +14,12 @@ AC_DEFUN([gl_FUNC_MEMPCPY],
AC_REQUIRE([AC_C_RESTRICT])
AC_REQUIRE([gl_STRING_H_DEFAULTS])
- AC_CHECK_FUNCS([mempcpy])
+ gl_CHECK_FUNCS_ANDROID([mempcpy], [[#include <string.h>]])
if test $ac_cv_func_mempcpy = no; then
HAVE_MEMPCPY=0
+ case "$gl_cv_onwards_func_mempcpy" in
+ future*) REPLACE_MEMPCPY=1 ;;
+ esac
fi
])
diff --git a/gl/m4/memrchr.m4 b/gl/m4/memrchr.m4
index ec5e2083..7611ac7e 100644
--- a/gl/m4/memrchr.m4
+++ b/gl/m4/memrchr.m4
@@ -1,5 +1,5 @@
# memrchr.m4 serial 11
-dnl Copyright (C) 2002-2003, 2005-2007, 2009-2022 Free Software Foundation,
+dnl Copyright (C) 2002-2003, 2005-2007, 2009-2023 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/gl/m4/minmax.m4 b/gl/m4/minmax.m4
index b9767397..fd09846f 100644
--- a/gl/m4/minmax.m4
+++ b/gl/m4/minmax.m4
@@ -1,5 +1,5 @@
# minmax.m4 serial 4
-dnl Copyright (C) 2005, 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2009-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/mkdir.m4 b/gl/m4/mkdir.m4
index 8b78ce96..c2bc4da7 100644
--- a/gl/m4/mkdir.m4
+++ b/gl/m4/mkdir.m4
@@ -1,6 +1,6 @@
-# serial 17
+# serial 18
-# Copyright (C) 2001, 2003-2004, 2006, 2008-2022 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003-2004, 2006, 2008-2023 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.
@@ -27,6 +27,8 @@ AC_DEFUN([gl_FUNC_MKDIR],
[case "$host_os" in
# Guess yes on Linux systems.
linux-* | linux) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
+ # Guess yes on systems that emulate the Linux system calls.
+ midipix*) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
# Guess yes on glibc systems.
*-gnu* | gnu*) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
# Guess yes on MSVC, no on mingw.
@@ -67,6 +69,8 @@ AC_DEFUN([gl_FUNC_MKDIR],
*-gnu* | gnu*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
# Guess yes on musl systems.
*-musl*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
+ # Guess yes on systems that emulate the Linux system calls.
+ midipix*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
# Guess no on native Windows.
mingw*) gl_cv_func_mkdir_trailing_dot_works="guessing no" ;;
# If we don't know, obey --enable-cross-guesses.
diff --git a/gl/m4/mkdtemp.m4 b/gl/m4/mkdtemp.m4
index b616a9a7..f5dd4a88 100644
--- a/gl/m4/mkdtemp.m4
+++ b/gl/m4/mkdtemp.m4
@@ -1,5 +1,5 @@
# mkdtemp.m4 serial 8
-dnl Copyright (C) 2001-2003, 2006-2007, 2009-2022 Free Software Foundation,
+dnl Copyright (C) 2001-2003, 2006-2007, 2009-2023 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/gl/m4/mkstemp.m4 b/gl/m4/mkstemp.m4
index 322f4bcd..d4a15ead 100644
--- a/gl/m4/mkstemp.m4
+++ b/gl/m4/mkstemp.m4
@@ -1,6 +1,6 @@
-#serial 28
+#serial 29
-# Copyright (C) 2001, 2003-2007, 2009-2022 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003-2007, 2009-2023 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.
@@ -58,14 +58,14 @@ AC_DEFUN([gl_FUNC_MKSTEMP],
[gl_cv_func_working_mkstemp=yes],
[gl_cv_func_working_mkstemp=no],
[case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu* | gnu*) gl_cv_func_working_mkstemp="guessing yes" ;;
- # Guess yes on musl systems.
- *-musl*) gl_cv_func_working_mkstemp="guessing yes" ;;
- # Guess no on native Windows.
- mingw*) gl_cv_func_working_mkstemp="guessing no" ;;
- # If we don't know, obey --enable-cross-guesses.
- *) gl_cv_func_working_mkstemp="$gl_cross_guess_normal" ;;
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_working_mkstemp="guessing yes" ;;
+ # Guess yes on musl systems.
+ *-musl* | midipix*) gl_cv_func_working_mkstemp="guessing yes" ;;
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_working_mkstemp="guessing no" ;;
+ # If we don't know, obey --enable-cross-guesses.
+ *) gl_cv_func_working_mkstemp="$gl_cross_guess_normal" ;;
esac
])
rm -rf conftest.mkstemp
diff --git a/gl/m4/mmap-anon.m4 b/gl/m4/mmap-anon.m4
index a4580ff9..d07d26e4 100644
--- a/gl/m4/mmap-anon.m4
+++ b/gl/m4/mmap-anon.m4
@@ -1,5 +1,5 @@
# mmap-anon.m4 serial 12
-dnl Copyright (C) 2005, 2007, 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2007, 2009-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/mode_t.m4 b/gl/m4/mode_t.m4
index e08d27a7..82197c02 100644
--- a/gl/m4/mode_t.m4
+++ b/gl/m4/mode_t.m4
@@ -1,5 +1,5 @@
# mode_t.m4 serial 2
-dnl Copyright (C) 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/msvc-inval.m4 b/gl/m4/msvc-inval.m4
index b32cf6eb..8d9d21b5 100644
--- a/gl/m4/msvc-inval.m4
+++ b/gl/m4/msvc-inval.m4
@@ -1,5 +1,5 @@
# msvc-inval.m4 serial 1
-dnl Copyright (C) 2011-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/msvc-nothrow.m4 b/gl/m4/msvc-nothrow.m4
index 16ceb1f1..0263e490 100644
--- a/gl/m4/msvc-nothrow.m4
+++ b/gl/m4/msvc-nothrow.m4
@@ -1,5 +1,5 @@
# msvc-nothrow.m4 serial 1
-dnl Copyright (C) 2011-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/multiarch.m4 b/gl/m4/multiarch.m4
index 5d942765..3ba5b0f7 100644
--- a/gl/m4/multiarch.m4
+++ b/gl/m4/multiarch.m4
@@ -1,5 +1,5 @@
# multiarch.m4 serial 9
-dnl Copyright (C) 2008-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/musl.m4 b/gl/m4/musl.m4
new file mode 100644
index 00000000..e28a3fed
--- /dev/null
+++ b/gl/m4/musl.m4
@@ -0,0 +1,20 @@
+# musl.m4 serial 4
+dnl Copyright (C) 2019-2023 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+# Test for musl libc, despite the musl libc authors don't like it
+# <https://wiki.musl-libc.org/faq.html>
+# <https://lists.gnu.org/archive/html/bug-gnulib/2018-02/msg00079.html>.
+# From Bruno Haible.
+
+AC_DEFUN_ONCE([gl_MUSL_LIBC],
+[
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ case "$host_os" in
+ *-musl* | midipix*)
+ AC_DEFINE([MUSL_LIBC], [1], [Define to 1 on musl libc.])
+ ;;
+ esac
+])
diff --git a/gl/m4/nanosleep.m4 b/gl/m4/nanosleep.m4
index 1964b1ea..e21a3e34 100644
--- a/gl/m4/nanosleep.m4
+++ b/gl/m4/nanosleep.m4
@@ -1,11 +1,11 @@
-# serial 41
+# serial 43
dnl From Jim Meyering.
dnl Check for the nanosleep function.
dnl If not found, use the supplied replacement.
dnl
-# Copyright (C) 1999-2001, 2003-2022 Free Software Foundation, Inc.
+# Copyright (C) 1999-2001, 2003-2023 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -25,11 +25,11 @@ AC_DEFUN([gl_FUNC_NANOSLEEP],
# Solaris 2.5.1 needs -lposix4 to get the nanosleep function.
# Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
- LIB_NANOSLEEP=
- AC_SUBST([LIB_NANOSLEEP])
+ NANOSLEEP_LIB=
+ AC_SUBST([NANOSLEEP_LIB])
AC_SEARCH_LIBS([nanosleep], [rt posix4],
[test "$ac_cv_search_nanosleep" = "none required" ||
- LIB_NANOSLEEP=$ac_cv_search_nanosleep])
+ NANOSLEEP_LIB=$ac_cv_search_nanosleep])
if test "x$ac_cv_search_nanosleep" != xno; then
dnl The system has a nanosleep function.
@@ -100,15 +100,22 @@ AC_DEFUN([gl_FUNC_NANOSLEEP],
#else /* A simpler test for native Windows. */
if (nanosleep (&ts_sleep, &ts_remaining) < 0)
return 3;
+ /* Test for 32-bit mingw bug: negative nanosecond values do not
+ cause failure. */
+ ts_sleep.tv_sec = 1;
+ ts_sleep.tv_nsec = -1;
+ if (nanosleep (&ts_sleep, &ts_remaining) != -1)
+ return 7;
#endif
return 0;
}]])],
[gl_cv_func_nanosleep=yes],
- [case $? in dnl (
- 4|5|6) gl_cv_func_nanosleep='no (mishandles large arguments)';; dnl (
- *) gl_cv_func_nanosleep=no;;
+ [case $? in
+ 4|5|6) gl_cv_func_nanosleep='no (mishandles large arguments)' ;;
+ 7) gl_cv_func_nanosleep='no (mishandles negative tv_nsec)' ;;
+ *) gl_cv_func_nanosleep=no ;;
esac],
- [case "$host_os" in dnl ((
+ [case "$host_os" in
linux*) # Guess it halfway works when the kernel is Linux.
gl_cv_func_nanosleep='guessing no (mishandles large arguments)' ;;
mingw*) # Guess no on native Windows.
@@ -136,4 +143,8 @@ AC_DEFUN([gl_FUNC_NANOSLEEP],
HAVE_NANOSLEEP=0
fi
LIBS=$nanosleep_save_libs
+
+ # For backward compatibility.
+ LIB_NANOSLEEP="$NANOSLEEP_LIB"
+ AC_SUBST([LIB_NANOSLEEP])
])
diff --git a/gl/m4/nl_langinfo.m4 b/gl/m4/nl_langinfo.m4
index d20a09cf..7648d524 100644
--- a/gl/m4/nl_langinfo.m4
+++ b/gl/m4/nl_langinfo.m4
@@ -1,5 +1,5 @@
-# nl_langinfo.m4 serial 8
-dnl Copyright (C) 2009-2022 Free Software Foundation, Inc.
+# nl_langinfo.m4 serial 11
+dnl Copyright (C) 2009-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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,7 +8,7 @@ AC_DEFUN([gl_FUNC_NL_LANGINFO],
[
AC_REQUIRE([gl_LANGINFO_H_DEFAULTS])
AC_REQUIRE([gl_LANGINFO_H])
- AC_CHECK_FUNCS_ONCE([nl_langinfo])
+ gl_CHECK_FUNCS_ANDROID([nl_langinfo], [[#include <langinfo.h>]])
AC_REQUIRE([AC_CANONICAL_HOST])
AC_REQUIRE([gl_FUNC_SETLOCALE_NULL])
AC_REQUIRE([gl_PTHREADLIB])
@@ -60,9 +60,12 @@ AC_DEFUN([gl_FUNC_NL_LANGINFO],
fi
else
HAVE_NL_LANGINFO=0
+ case "$gl_cv_onwards_func_nl_langinfo" in
+ future*) REPLACE_NL_LANGINFO=1 ;;
+ esac
fi
if test $HAVE_NL_LANGINFO = 0 || test $HAVE_LANGINFO_CODESET = 0; then
- LIB_NL_LANGINFO="$LIB_SETLOCALE_NULL"
+ LIB_NL_LANGINFO="$SETLOCALE_NULL_LIB"
else
LIB_NL_LANGINFO=
fi
diff --git a/gl/m4/nocrash.m4 b/gl/m4/nocrash.m4
index 91f00c1b..6a766387 100644
--- a/gl/m4/nocrash.m4
+++ b/gl/m4/nocrash.m4
@@ -1,5 +1,5 @@
# nocrash.m4 serial 5
-dnl Copyright (C) 2005, 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2009-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/nonblocking.m4 b/gl/m4/nonblocking.m4
index b9d23251..f63d2aef 100644
--- a/gl/m4/nonblocking.m4
+++ b/gl/m4/nonblocking.m4
@@ -1,5 +1,5 @@
# nonblocking.m4 serial 3
-dnl Copyright (C) 2011-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/off_t.m4 b/gl/m4/off_t.m4
index 0890adaf..880f3472 100644
--- a/gl/m4/off_t.m4
+++ b/gl/m4/off_t.m4
@@ -1,5 +1,5 @@
# off_t.m4 serial 1
-dnl Copyright (C) 2012-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2012-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/open-cloexec.m4 b/gl/m4/open-cloexec.m4
index 16cd5ec4..fd572fcd 100644
--- a/gl/m4/open-cloexec.m4
+++ b/gl/m4/open-cloexec.m4
@@ -1,6 +1,6 @@
# Test whether O_CLOEXEC is defined.
-dnl Copyright 2017-2022 Free Software Foundation, Inc.
+dnl Copyright 2017-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/open-slash.m4 b/gl/m4/open-slash.m4
index 4fbf491a..1f731f8a 100644
--- a/gl/m4/open-slash.m4
+++ b/gl/m4/open-slash.m4
@@ -1,5 +1,5 @@
# open-slash.m4 serial 2
-dnl Copyright (C) 2007-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/open.m4 b/gl/m4/open.m4
index f82fd6ca..94fa2bb7 100644
--- a/gl/m4/open.m4
+++ b/gl/m4/open.m4
@@ -1,5 +1,5 @@
# open.m4 serial 15
-dnl Copyright (C) 2007-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/openat.m4 b/gl/m4/openat.m4
index de747994..bbbcad85 100644
--- a/gl/m4/openat.m4
+++ b/gl/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-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2004-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/opendir.m4 b/gl/m4/opendir.m4
index 7816dc54..2e9be769 100644
--- a/gl/m4/opendir.m4
+++ b/gl/m4/opendir.m4
@@ -1,5 +1,5 @@
-# opendir.m4 serial 5
-dnl Copyright (C) 2011-2022 Free Software Foundation, Inc.
+# opendir.m4 serial 6
+dnl Copyright (C) 2011-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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,21 +12,24 @@ AC_DEFUN([gl_FUNC_OPENDIR],
AC_CHECK_FUNCS([opendir])
if test $ac_cv_func_opendir = no; then
HAVE_OPENDIR=0
- fi
- dnl Replace opendir() for supporting the gnulib-defined fchdir() function,
- dnl to keep fchdir's bookkeeping up-to-date.
- m4_ifdef([gl_FUNC_FCHDIR], [
- gl_TEST_FCHDIR
- if test $HAVE_FCHDIR = 0; then
- if test $HAVE_OPENDIR = 1; then
+ else
+ dnl Replace opendir() on native Windows, to support fdopendir().
+ AC_REQUIRE([gl_DIRENT_DIR])
+ if test $DIR_HAS_FD_MEMBER = 0; then
+ REPLACE_OPENDIR=1
+ fi
+ dnl Replace opendir() on OS/2 kLIBC to support dirfd() function replaced
+ dnl by gnulib.
+ case $host_os in
+ os2*) REPLACE_OPENDIR=1 ;;
+ esac
+ dnl Replace opendir() for supporting the gnulib-defined fchdir() function,
+ dnl to keep fchdir's bookkeeping up-to-date.
+ m4_ifdef([gl_FUNC_FCHDIR], [
+ gl_TEST_FCHDIR
+ if test $HAVE_FCHDIR = 0; then
REPLACE_OPENDIR=1
fi
- fi
- ])
- dnl Replace opendir() on OS/2 kLIBC to support dirfd() function replaced
- dnl by gnulib.
- case $host_os,$HAVE_OPENDIR in
- os2*,1)
- REPLACE_OPENDIR=1;;
- esac
+ ])
+ fi
])
diff --git a/gl/m4/pathmax.m4 b/gl/m4/pathmax.m4
index 44add990..6d47d2c0 100644
--- a/gl/m4/pathmax.m4
+++ b/gl/m4/pathmax.m4
@@ -1,5 +1,5 @@
# pathmax.m4 serial 11
-dnl Copyright (C) 2002-2003, 2005-2006, 2009-2022 Free Software Foundation,
+dnl Copyright (C) 2002-2003, 2005-2006, 2009-2023 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/gl/m4/pipe.m4 b/gl/m4/pipe.m4
index 62871c6d..1ad6688f 100644
--- a/gl/m4/pipe.m4
+++ b/gl/m4/pipe.m4
@@ -1,5 +1,5 @@
# pipe.m4 serial 2
-dnl Copyright (C) 2010-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2010-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/printf.m4 b/gl/m4/printf.m4
index 667452e3..8b8f0106 100644
--- a/gl/m4/printf.m4
+++ b/gl/m4/printf.m4
@@ -1,5 +1,5 @@
-# printf.m4 serial 73
-dnl Copyright (C) 2003, 2007-2022 Free Software Foundation, Inc.
+# printf.m4 serial 84
+dnl Copyright (C) 2003, 2007-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -63,7 +63,7 @@ changequote(,)dnl
# Guess yes on glibc systems.
*-gnu* | gnu*) gl_cv_func_printf_sizes_c99="guessing yes";;
# Guess yes on musl systems.
- *-musl*) gl_cv_func_printf_sizes_c99="guessing yes";;
+ *-musl* | midipix*) gl_cv_func_printf_sizes_c99="guessing yes";;
# Guess yes on FreeBSD >= 5.
freebsd[1-4].*) gl_cv_func_printf_sizes_c99="guessing no";;
freebsd* | kfreebsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
@@ -101,6 +101,92 @@ changequote([,])dnl
])
])
+dnl Test whether the *printf family of functions supports the 'w8', 'w16',
+dnl 'w32', 'w64', 'wf8', 'wf16', 'wf32', 'wf64' size specifiers. (ISO C23)
+dnl Result is gl_cv_func_printf_sizes_c23.
+
+AC_DEFUN([gl_PRINTF_SIZES_C23],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([gl_AC_HEADER_STDINT_H])
+ AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether printf supports size specifiers as in C23],
+ [gl_cv_func_printf_sizes_c23],
+ [
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+#include <stddef.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/types.h>
+#if HAVE_STDINT_H_WITH_UINTMAX
+# include <stdint.h>
+#endif
+#if HAVE_INTTYPES_H_WITH_UINTMAX
+# include <inttypes.h>
+#endif
+static char buf[100];
+int main ()
+{
+ int result = 0;
+ buf[0] = '\0';
+ if (sprintf (buf, "%w8u %d", (uint8_t) 123, 33, 44, 55) < 0
+ || strcmp (buf, "123 33") != 0)
+ result |= 1;
+ buf[0] = '\0';
+ if (sprintf (buf, "%wf8u %d", (uint_fast8_t) 123, 33, 44, 55) < 0
+ || strcmp (buf, "123 33") != 0)
+ result |= 1;
+ buf[0] = '\0';
+ if (sprintf (buf, "%w16u %d", (uint16_t) 12345, 33, 44, 55) < 0
+ || strcmp (buf, "12345 33") != 0)
+ result |= 2;
+ buf[0] = '\0';
+ if (sprintf (buf, "%wf16u %d", (uint_fast16_t) 12345, 33, 44, 55) < 0
+ || strcmp (buf, "12345 33") != 0)
+ result |= 2;
+ buf[0] = '\0';
+ if (sprintf (buf, "%w32u %d", (uint32_t) 12345671, 33, 44, 55) < 0
+ || strcmp (buf, "12345671 33") != 0)
+ result |= 4;
+ buf[0] = '\0';
+ if (sprintf (buf, "%wf32u %d", (uint_fast32_t) 12345671, 33, 44, 55) < 0
+ || strcmp (buf, "12345671 33") != 0)
+ result |= 4;
+#if HAVE_STDINT_H_WITH_UINTMAX || HAVE_INTTYPES_H_WITH_UINTMAX
+ buf[0] = '\0';
+ if (sprintf (buf, "%w64u %d", (uint64_t) 12345671, 33, 44, 55) < 0
+ || strcmp (buf, "12345671 33") != 0)
+ result |= 8;
+ buf[0] = '\0';
+ if (sprintf (buf, "%wf64u %d", (uint_fast64_t) 12345671, 33, 44, 55) < 0
+ || strcmp (buf, "12345671 33") != 0)
+ result |= 8;
+#else
+ result |= 8;
+#endif
+ return result;
+}]])],
+ [gl_cv_func_printf_sizes_c23=yes],
+ [gl_cv_func_printf_sizes_c23=no],
+ [
+ case "$host_os" in
+ # Guess no on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_printf_sizes_c23="guessing no";;
+ # Guess no on musl systems.
+ *-musl* | midipix*) gl_cv_func_printf_sizes_c23="guessing no";;
+ # Guess no on Android.
+ linux*-android*) gl_cv_func_printf_sizes_c23="guessing no";;
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_printf_sizes_c23="guessing no";;
+ # If we don't know, obey --enable-cross-guesses.
+ *) gl_cv_func_printf_sizes_c23="$gl_cross_guess_normal";;
+ esac
+ ])
+ ])
+])
+
dnl Test whether the *printf family of functions supports 'long double'
dnl arguments together with the 'L' size specifier. (ISO C99, POSIX:2001)
dnl Result is gl_cv_func_printf_long_double.
@@ -244,7 +330,7 @@ changequote(,)dnl
# Guess yes on glibc systems.
*-gnu* | gnu*) gl_cv_func_printf_infinite="guessing yes";;
# Guess yes on musl systems.
- *-musl*) gl_cv_func_printf_infinite="guessing yes";;
+ *-musl* | midipix*) gl_cv_func_printf_infinite="guessing yes";;
# Guess yes on FreeBSD >= 6.
freebsd[1-5].*) gl_cv_func_printf_infinite="guessing no";;
freebsd* | kfreebsd*) gl_cv_func_printf_infinite="guessing yes";;
@@ -467,7 +553,7 @@ changequote(,)dnl
# Guess yes on glibc systems.
*-gnu* | gnu*) gl_cv_func_printf_infinite_long_double="guessing yes";;
# Guess yes on musl systems.
- *-musl*) gl_cv_func_printf_infinite_long_double="guessing yes";;
+ *-musl* | midipix*) gl_cv_func_printf_infinite_long_double="guessing yes";;
# Guess yes on FreeBSD >= 6.
freebsd[1-5].*) gl_cv_func_printf_infinite_long_double="guessing no";;
freebsd* | kfreebsd*) gl_cv_func_printf_infinite_long_double="guessing yes";;
@@ -591,7 +677,7 @@ int main ()
[gl_cv_func_printf_directive_a="guessing no"])
;;
# Guess yes on musl systems.
- *-musl*) gl_cv_func_printf_directive_a="guessing yes";;
+ *-musl* | midipix*) gl_cv_func_printf_directive_a="guessing yes";;
# Guess no on Android.
linux*-android*) gl_cv_func_printf_directive_a="guessing no";;
# Guess no on native Windows.
@@ -603,6 +689,116 @@ int main ()
])
])
+dnl Test whether the *printf family of functions supports the 'b' conversion
+dnl specifier for binary output of integers.
+dnl (ISO C23)
+dnl Result is gl_cv_func_printf_directive_b.
+
+AC_DEFUN([gl_PRINTF_DIRECTIVE_B],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether printf supports the 'b' directive],
+ [gl_cv_func_printf_directive_b],
+ [
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+#include <stdio.h>
+#include <string.h>
+static char buf[100];
+int main ()
+{
+ int result = 0;
+ if (sprintf (buf, "%b %d", 12345, 33, 44, 55) < 0
+ || strcmp (buf, "11000000111001 33") != 0)
+ result |= 1;
+ return result;
+}]])],
+ [gl_cv_func_printf_directive_b=yes],
+ [gl_cv_func_printf_directive_b=no],
+ [
+ case "$host_os" in
+ # Guess yes on glibc >= 2.35 systems.
+ *-gnu* | gnu*)
+ AC_EGREP_CPP([Lucky], [
+ #include <features.h>
+ #ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 35) || (__GLIBC__ > 2)
+ Lucky user
+ #endif
+ #endif
+ ],
+ [gl_cv_func_printf_directive_uppercase_b="guessing yes"],
+ [gl_cv_func_printf_directive_uppercase_b="guessing no"])
+ ;;
+ # Guess no on musl systems.
+ *-musl* | midipix*) gl_cv_func_printf_directive_b="guessing no";;
+ # Guess no on Android.
+ linux*-android*) gl_cv_func_printf_directive_b="guessing no";;
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_printf_directive_b="guessing no";;
+ # If we don't know, obey --enable-cross-guesses.
+ *) gl_cv_func_printf_directive_b="$gl_cross_guess_normal";;
+ esac
+ ])
+ ])
+])
+
+dnl Test whether the *printf family of functions supports the 'B' conversion
+dnl specifier for binary output of integers.
+dnl (GNU, encouraged by ISO C23 § 7.23.6.1)
+dnl Result is gl_cv_func_printf_directive_uppercase_b.
+
+AC_DEFUN([gl_PRINTF_DIRECTIVE_UPPERCASE_B],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether printf supports the 'B' directive],
+ [gl_cv_func_printf_directive_uppercase_b],
+ [
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+#include <stdio.h>
+#include <string.h>
+static char buf[100];
+int main ()
+{
+ int result = 0;
+ if (sprintf (buf, "%#B %d", 12345, 33, 44, 55) < 0
+ || strcmp (buf, "0B11000000111001 33") != 0)
+ result |= 1;
+ return result;
+}]])],
+ [gl_cv_func_printf_directive_uppercase_b=yes],
+ [gl_cv_func_printf_directive_uppercase_b=no],
+ [
+ case "$host_os" in
+ # Guess yes on glibc >= 2.35 systems.
+ *-gnu* | gnu*)
+ AC_EGREP_CPP([Lucky], [
+ #include <features.h>
+ #ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 35) || (__GLIBC__ > 2)
+ Lucky user
+ #endif
+ #endif
+ ],
+ [gl_cv_func_printf_directive_uppercase_b="guessing yes"],
+ [gl_cv_func_printf_directive_uppercase_b="guessing no"])
+ ;;
+ # Guess no on musl systems.
+ *-musl* | midipix*) gl_cv_func_printf_directive_uppercase_b="guessing no";;
+ # Guess no on Android.
+ linux*-android*) gl_cv_func_printf_directive_uppercase_b="guessing no";;
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_printf_directive_uppercase_b="guessing no";;
+ # If we don't know, obey --enable-cross-guesses.
+ *) gl_cv_func_printf_directive_uppercase_b="$gl_cross_guess_normal";;
+ esac
+ ])
+ ])
+])
+
dnl Test whether the *printf family of functions supports the %F format
dnl directive. (ISO C99, POSIX:2001)
dnl Result is gl_cv_func_printf_directive_f.
@@ -643,7 +839,7 @@ changequote(,)dnl
# Guess yes on glibc systems.
*-gnu* | gnu*) gl_cv_func_printf_directive_f="guessing yes";;
# Guess yes on musl systems.
- *-musl*) gl_cv_func_printf_directive_f="guessing yes";;
+ *-musl* | midipix*) gl_cv_func_printf_directive_f="guessing yes";;
# Guess yes on FreeBSD >= 6.
freebsd[1-5].*) gl_cv_func_printf_directive_f="guessing no";;
freebsd* | kfreebsd*) gl_cv_func_printf_directive_f="guessing yes";;
@@ -829,11 +1025,58 @@ changequote([,])dnl
])
])
+dnl Test whether the *printf family of functions supports the %lc format
+dnl directive and in particular, when the argument is a null wide character,
+dnl whether the functions don't produce a NUL byte.
+dnl Result is gl_cv_func_printf_directive_lc.
+
+AC_DEFUN([gl_PRINTF_DIRECTIVE_LC],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether printf supports the 'lc' directive correctly],
+ [gl_cv_func_printf_directive_lc],
+ [
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+#include <stdio.h>
+#include <wchar.h>
+#include <string.h>
+int main ()
+{
+ int result = 0;
+ char buf[100];
+ /* This test fails on glibc 2.35, FreeBSD 13.1, NetBSD 9.0, OpenBSD 7.2,
+ macOS 12.5, AIX 7.2, Solaris 11.4.
+ glibc 2.35 bug: <https://sourceware.org/bugzilla/show_bug.cgi?id=30257> */
+ {
+ buf[0] = '\0';
+ if (sprintf (buf, "%lc%lc%lc", (wint_t) 'a', (wint_t) 0, (wint_t) 'z') < 0
+ || strcmp (buf, "az") != 0)
+ result |= 1;
+ }
+ return result;
+}]])],
+ [gl_cv_func_printf_directive_lc=yes],
+ [gl_cv_func_printf_directive_lc=no],
+ [
+changequote(,)dnl
+ case "$host_os" in
+ # Guess yes on musl libc.
+ *-musl* | midipix*) gl_cv_func_printf_directive_lc="guessing yes";;
+ # Guess no otherwise.
+ *) gl_cv_func_printf_directive_lc="guessing no";;
+ esac
+changequote([,])dnl
+ ])
+ ])
+])
+
dnl Test whether the *printf family of functions supports POSIX/XSI format
dnl strings with positions. (POSIX:2001)
dnl Result is gl_cv_func_printf_positions.
-AC_DEFUN([gl_PRINTF_POSITIONS],
+AC_DEFUN_ONCE([gl_PRINTF_POSITIONS],
[
AC_REQUIRE([AC_PROG_CC])
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
@@ -990,18 +1233,18 @@ int main ()
[
changequote(,)dnl
case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu* | gnu*) gl_cv_func_printf_flag_zero="guessing yes";;
- # Guess yes on musl systems.
- *-musl*) gl_cv_func_printf_flag_zero="guessing yes";;
- # Guess yes on BeOS.
- beos*) gl_cv_func_printf_flag_zero="guessing yes";;
- # Guess no on Android.
- linux*-android*) gl_cv_func_printf_flag_zero="guessing no";;
- # Guess no on native Windows.
- mingw*) gl_cv_func_printf_flag_zero="guessing no";;
- # If we don't know, obey --enable-cross-guesses.
- *) gl_cv_func_printf_flag_zero="$gl_cross_guess_normal";;
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_printf_flag_zero="guessing yes";;
+ # Guess yes on musl systems.
+ *-musl* | midipix*) gl_cv_func_printf_flag_zero="guessing yes";;
+ # Guess yes on BeOS.
+ beos*) gl_cv_func_printf_flag_zero="guessing yes";;
+ # Guess no on Android.
+ linux*-android*) gl_cv_func_printf_flag_zero="guessing no";;
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_printf_flag_zero="guessing no";;
+ # If we don't know, obey --enable-cross-guesses.
+ *) gl_cv_func_printf_flag_zero="$gl_cross_guess_normal";;
esac
changequote([,])dnl
])
@@ -1239,7 +1482,7 @@ changequote(,)dnl
# Guess yes on glibc systems.
*-gnu* | gnu*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
# Guess yes on musl systems.
- *-musl*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
+ *-musl* | midipix*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
# Guess yes on FreeBSD >= 5.
freebsd[1-4].*) gl_cv_func_snprintf_truncation_c99="guessing no";;
freebsd* | kfreebsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
@@ -1344,7 +1587,7 @@ changequote(,)dnl
# Guess yes on glibc systems.
*-gnu* | gnu*) gl_cv_func_snprintf_retval_c99="guessing yes";;
# Guess yes on musl systems.
- *-musl*) gl_cv_func_snprintf_retval_c99="guessing yes";;
+ *-musl* | midipix*) gl_cv_func_snprintf_retval_c99="guessing yes";;
# Guess yes on FreeBSD >= 5.
freebsd[1-4].*) gl_cv_func_snprintf_retval_c99="guessing no";;
freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
@@ -1447,7 +1690,7 @@ int main ()
;;
changequote(,)dnl
# Guess yes on musl systems.
- *-musl*) gl_cv_func_snprintf_directive_n="guessing yes";;
+ *-musl* | midipix*) gl_cv_func_snprintf_directive_n="guessing yes";;
# Guess yes on FreeBSD >= 5.
freebsd[1-4].*) gl_cv_func_snprintf_directive_n="guessing no";;
freebsd* | kfreebsd*) gl_cv_func_snprintf_directive_n="guessing yes";;
@@ -1604,7 +1847,7 @@ changequote(,)dnl
# Guess yes on glibc systems.
*-gnu* | gnu*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
# Guess yes on musl systems.
- *-musl*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+ *-musl* | midipix*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
# Guess yes on FreeBSD >= 5.
freebsd[1-4].*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
freebsd* | kfreebsd*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
@@ -1641,88 +1884,275 @@ changequote([,])dnl
])
])
+dnl Test whether the swprintf function works correctly when it produces output
+dnl that contains null wide characters.
+dnl Result is gl_cv_func_swprintf_works.
+
+AC_DEFUN([gl_SWPRINTF_WORKS],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CHECK_FUNCS_ONCE([swprintf])
+ AC_CACHE_CHECK([whether swprintf works],
+ [gl_cv_func_swprintf_works],
+ [
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+#ifndef __USE_MINGW_ANSI_STDIO
+# define __USE_MINGW_ANSI_STDIO 1
+#endif
+#include <stdio.h>
+#include <wchar.h>
+int main()
+{
+ int result = 0;
+ { /* This test fails on musl libc 1.2.3, FreeBSD, NetBSD, OpenBSD, macOS, AIX. */
+ wchar_t buf[5] = { 0xBEEF, 0xBEEF, 0xBEEF, 0xBEEF, 0xBEEF };
+ int ret = swprintf (buf, 4, L"%cz", '\0');
+ /* Expected result:
+ ret = 2, buf[0] = 0x0, buf[1] = 0x7a, buf[2] = 0x0, buf[3] = 0xbeef
+ musl libc 1.2.3:
+ ret = 2, buf[0] = 0x0, buf[1] = 0x0, buf[2] = 0x0, buf[3] = 0x0
+ Reported at <https://www.openwall.com/lists/musl/2023/03/22/9>.
+ FreeBSD 13.1, NetBSD 9.0, OpenBSD 7.2, macOS 12.5, AIX 7.2:
+ ret = 2, buf[0] = 0x0, buf[1] = 0xbeef, buf[2] = 0xbeef, buf[3] = 0xbeef
+ */
+ if (ret < 0 || buf[1] != 'z')
+ result |= 1;
+ }
+ { /* This test fails on mingw. */
+ wchar_t buf[2];
+ int ret = swprintf (buf, 2, L"%lc", (wint_t)0);
+ /* Expected: ret = 1
+ mingw: ret = 0
+ */
+ if (ret != 1)
+ result |= 2;
+ }
+ return result;
+}]])],
+ [gl_cv_func_swprintf_works=yes],
+ [gl_cv_func_swprintf_works=no],
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_swprintf_works="guessing yes";;
+ # Guess no on musl systems.
+ *-musl* | midipix*) gl_cv_func_swprintf_works="guessing no";;
+ # Guess no on FreeBSD, NetBSD, OpenBSD, macOS, AIX.
+ freebsd* | midnightbsd* | netbsd* | openbsd* | darwin* | aix*)
+ gl_cv_func_swprintf_works="guessing no";;
+ # Guess no on native Windows.
+ mingw* | pw*) gl_cv_func_swprintf_works="guessing no";;
+ # If we don't know, obey --enable-cross-guesses.
+ *) gl_cv_func_swprintf_works="$gl_cross_guess_normal";;
+ esac
+ ])
+ ])
+])
+
+dnl Test whether the *wprintf family of functions supports the 'a' and 'A'
+dnl conversion specifier for hexadecimal output of 'long double' numbers.
+dnl (ISO C99, POSIX:2001)
+dnl Result is gl_cv_func_swprintf_directive_la.
+
+AC_DEFUN([gl_SWPRINTF_DIRECTIVE_LA],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether swprintf supports the 'La' and 'LA' directives],
+ [gl_cv_func_swprintf_directive_la],
+ [
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+#include <stdio.h>
+#include <wchar.h>
+static wchar_t buf[100];
+int main ()
+{
+ int result = 0;
+ /* This catches a glibc 2.15 and Haiku 2022 bug. */
+ if (swprintf (buf, sizeof (buf) / sizeof (wchar_t),
+ L"%La %d", 3.1416015625L, 33, 44, 55) < 0
+ || (wcscmp (buf, L"0x1.922p+1 33") != 0
+ && wcscmp (buf, L"0x3.244p+0 33") != 0
+ && wcscmp (buf, L"0x6.488p-1 33") != 0
+ && wcscmp (buf, L"0xc.91p-2 33") != 0))
+ result |= 1;
+ return result;
+}]])],
+ [gl_cv_func_swprintf_directive_la=yes],
+ [gl_cv_func_swprintf_directive_la=no],
+ [case "$host_os" in
+ # Guess yes on glibc >= 2.17 systems.
+ *-gnu* | gnu*)
+ AC_EGREP_CPP([Unlucky], [
+ #include <features.h>
+ #ifdef __GNU_LIBRARY__
+ #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 16) || (__GLIBC__ > 2)) && !defined __UCLIBC__
+ Unlucky
+ #endif
+ #endif
+ ],
+ [gl_cv_func_swprintf_directive_la="guessing yes"],
+ [gl_cv_func_swprintf_directive_la="guessing no"])
+ ;;
+ # Guess yes on musl systems.
+ *-musl* | midipix*) gl_cv_func_swprintf_directive_la="guessing yes";;
+ # Guess yes on Android.
+ linux*-android*) gl_cv_func_swprintf_directive_la="guessing yes";;
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_swprintf_directive_la="guessing no";;
+ # If we don't know, obey --enable-cross-guesses.
+ *) gl_cv_func_swprintf_directive_la="$gl_cross_guess_normal";;
+ esac
+ ])
+ ])
+])
+
+dnl Test whether the *wprintf family of functions supports the 'lc' conversion
+dnl specifier for all wide characters.
+dnl (ISO C11, POSIX:2001)
+dnl Result is gl_cv_func_swprintf_directive_lc.
+
+AC_DEFUN([gl_SWPRINTF_DIRECTIVE_LC],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether swprintf supports the 'lc' directive],
+ [gl_cv_func_swprintf_directive_lc],
+ [
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+#include <stdio.h>
+#include <wchar.h>
+static wchar_t buf[100];
+static wint_t L_invalid = (wchar_t) 0x76543210;
+int main ()
+{
+ int result = 0;
+ /* This catches a musl libc 1.2.4, Android bug.
+ Reported at <https://www.openwall.com/lists/musl/2023/06/12/3>. */
+ if (swprintf (buf, sizeof (buf) / sizeof (wchar_t),
+ L"%lc %d", L_invalid, 33, 44, 55) < 0)
+ result |= 1;
+ return result;
+}]])],
+ [gl_cv_func_swprintf_directive_lc=yes],
+ [gl_cv_func_swprintf_directive_lc=no],
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_swprintf_directive_lc="guessing yes";;
+ # Guess no on musl systems.
+ *-musl* | midipix*) gl_cv_func_swprintf_directive_lc="guessing no";;
+ # Guess no on Android.
+ linux*-android*) gl_cv_func_swprintf_directive_lc="guessing no";;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_swprintf_directive_lc="guessing yes";;
+ # If we don't know, obey --enable-cross-guesses.
+ *) gl_cv_func_swprintf_directive_lc="$gl_cross_guess_normal";;
+ esac
+ ])
+ ])
+])
+
dnl The results of these tests on various platforms are:
dnl
dnl 1 = gl_PRINTF_SIZES_C99
-dnl 2 = gl_PRINTF_LONG_DOUBLE
-dnl 3 = gl_PRINTF_INFINITE
-dnl 4 = gl_PRINTF_INFINITE_LONG_DOUBLE
-dnl 5 = gl_PRINTF_DIRECTIVE_A
-dnl 6 = gl_PRINTF_DIRECTIVE_F
-dnl 7 = gl_PRINTF_DIRECTIVE_N
-dnl 8 = gl_PRINTF_DIRECTIVE_LS
-dnl 9 = gl_PRINTF_POSITIONS
-dnl 10 = gl_PRINTF_FLAG_GROUPING
-dnl 11 = gl_PRINTF_FLAG_LEFTADJUST
-dnl 12 = gl_PRINTF_FLAG_ZERO
-dnl 13 = gl_PRINTF_PRECISION
-dnl 14 = gl_PRINTF_ENOMEM
-dnl 15 = gl_SNPRINTF_PRESENCE
-dnl 16 = gl_SNPRINTF_TRUNCATION_C99
-dnl 17 = gl_SNPRINTF_RETVAL_C99
-dnl 18 = gl_SNPRINTF_DIRECTIVE_N
-dnl 19 = gl_SNPRINTF_SIZE1
-dnl 20 = gl_VSNPRINTF_ZEROSIZE_C99
+dnl 2 = gl_PRINTF_SIZES_C23
+dnl 3 = gl_PRINTF_LONG_DOUBLE
+dnl 4 = gl_PRINTF_INFINITE
+dnl 5 = gl_PRINTF_INFINITE_LONG_DOUBLE
+dnl 6 = gl_PRINTF_DIRECTIVE_A
+dnl 7 = gl_PRINTF_DIRECTIVE_B
+dnl 8 = gl_PRINTF_DIRECTIVE_UPPERCASE_B
+dnl 9 = gl_PRINTF_DIRECTIVE_F
+dnl 10 = gl_PRINTF_DIRECTIVE_N
+dnl 11 = gl_PRINTF_DIRECTIVE_LS
+dnl 12 = gl_PRINTF_DIRECTIVE_LC
+dnl 13 = gl_PRINTF_POSITIONS
+dnl 14 = gl_PRINTF_FLAG_GROUPING
+dnl 15 = gl_PRINTF_FLAG_LEFTADJUST
+dnl 16 = gl_PRINTF_FLAG_ZERO
+dnl 17 = gl_PRINTF_PRECISION
+dnl 18 = gl_PRINTF_ENOMEM
+dnl 19 = gl_SNPRINTF_PRESENCE
+dnl 20 = gl_SNPRINTF_TRUNCATION_C99
+dnl 21 = gl_SNPRINTF_RETVAL_C99
+dnl 22 = gl_SNPRINTF_DIRECTIVE_N
+dnl 23 = gl_SNPRINTF_SIZE1
+dnl 24 = gl_VSNPRINTF_ZEROSIZE_C99
+dnl 25 = gl_SWPRINTF_WORKS
+dnl 26 = gl_SWPRINTF_DIRECTIVE_LA
+dnl 27 = gl_SWPRINTF_DIRECTIVE_LC
dnl
dnl 1 = checking whether printf supports size specifiers as in C99...
-dnl 2 = checking whether printf supports 'long double' arguments...
-dnl 3 = checking whether printf supports infinite 'double' arguments...
-dnl 4 = checking whether printf supports infinite 'long double' arguments...
-dnl 5 = checking whether printf supports the 'a' and 'A' directives...
-dnl 6 = checking whether printf supports the 'F' directive...
-dnl 7 = checking whether printf supports the 'n' directive...
-dnl 8 = checking whether printf supports the 'ls' directive...
-dnl 9 = checking whether printf supports POSIX/XSI format strings with positions...
-dnl 10 = checking whether printf supports the grouping flag...
-dnl 11 = checking whether printf supports the left-adjust flag correctly...
-dnl 12 = checking whether printf supports the zero flag correctly...
-dnl 13 = checking whether printf supports large precisions...
-dnl 14 = checking whether printf survives out-of-memory conditions...
-dnl 15 = checking for snprintf...
-dnl 16 = checking whether snprintf truncates the result as in C99...
-dnl 17 = checking whether snprintf returns a byte count as in C99...
-dnl 18 = checking whether snprintf fully supports the 'n' directive...
-dnl 19 = checking whether snprintf respects a size of 1...
-dnl 20 = checking whether vsnprintf respects a zero size as in C99...
+dnl 2 = checking whether printf supports size specifiers as in C23...
+dnl 3 = checking whether printf supports 'long double' arguments...
+dnl 4 = checking whether printf supports infinite 'double' arguments...
+dnl 5 = checking whether printf supports infinite 'long double' arguments...
+dnl 6 = checking whether printf supports the 'a' and 'A' directives...
+dnl 7 = checking whether printf supports the 'b' directive...
+dnl 8 = checking whether printf supports the 'B' directive...
+dnl 9 = checking whether printf supports the 'F' directive...
+dnl 10 = checking whether printf supports the 'n' directive...
+dnl 11 = checking whether printf supports the 'ls' directive...
+dnl 12 = checking whether printf supports the 'lc' directive correctly...
+dnl 13 = checking whether printf supports POSIX/XSI format strings with positions...
+dnl 14 = checking whether printf supports the grouping flag...
+dnl 15 = checking whether printf supports the left-adjust flag correctly...
+dnl 16 = checking whether printf supports the zero flag correctly...
+dnl 17 = checking whether printf supports large precisions...
+dnl 18 = checking whether printf survives out-of-memory conditions...
+dnl 19 = checking for snprintf...
+dnl 20 = checking whether snprintf truncates the result as in C99...
+dnl 21 = checking whether snprintf returns a byte count as in C99...
+dnl 22 = checking whether snprintf fully supports the 'n' directive...
+dnl 23 = checking whether snprintf respects a size of 1...
+dnl 24 = checking whether vsnprintf respects a zero size as in C99...
+dnl 25 = checking whether swprintf works...
+dnl 26 = checking whether swprintf supports the 'La' and 'LA' directives...
+dnl 27 = checking whether swprintf supports the 'lc' directive...
dnl
dnl . = yes, # = no.
dnl
-dnl 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
-dnl glibc 2.5 . . . . . . . . . . . . . . . . . . . .
-dnl glibc 2.3.6 . . . . # . . . . . . . . . . . . . . .
-dnl FreeBSD 13.0 . . . . # . . . . . . . . # . . . . . .
-dnl FreeBSD 5.4, 6.1 . . . . # . . . . . . # . # . . . . . .
-dnl Mac OS X 10.13.5 . . . # # . # . . . . . . . . . . # . .
-dnl Mac OS X 10.5.8 . . . # # . . . . . . # . . . . . . . .
-dnl Mac OS X 10.3.9 . . . . # . . . . . . # . # . . . . . .
-dnl OpenBSD 6.0, 6.7 . . . . # . . . . . . . . # . . . . . .
-dnl OpenBSD 3.9, 4.0 . . # # # # . # . # . # . # . . . . . .
-dnl Cygwin 1.7.0 (2009) . . . # . . . ? . . . . . ? . . . . . .
-dnl Cygwin 1.5.25 (2008) . . . # # . . # . . . . . # . . . . . .
-dnl Cygwin 1.5.19 (2006) # . . # # # . # . # . # # # . . . . . .
-dnl Solaris 11.4 . . # # # . . # . . . # . . . . . . . .
-dnl Solaris 11.3 . . . . # . . # . . . . . . . . . . . .
-dnl Solaris 11.0 . . # # # . . # . . . # . . . . . . . .
-dnl Solaris 10 . . # # # . . # . . . # # . . . . . . .
-dnl Solaris 2.6 ... 9 # . # # # # . # . . . # # . . . # . . .
-dnl Solaris 2.5.1 # . # # # # . # . . . # . . # # # # # #
-dnl AIX 7.1 . . # # # . . . . . . # # . . . . . . .
-dnl AIX 5.2 . . # # # . . . . . . # . . . . . . . .
-dnl AIX 4.3.2, 5.1 # . # # # # . . . . . # . . . . # . . .
-dnl HP-UX 11.31 . . . . # . . . . . . # . . . . # # . .
-dnl HP-UX 11.{00,11,23} # . . . # # . . . . . # . . . . # # . #
-dnl HP-UX 10.20 # . # . # # . ? . . # # . . . . # # ? #
-dnl IRIX 6.5 # . # # # # . # . . . # . . . . # . . .
-dnl OSF/1 5.1 # . # # # # . . . . . # . . . . # . . #
-dnl OSF/1 4.0d # . # # # # . . . . . # . . # # # # # #
-dnl NetBSD 9.0 . . . . # . . . . . . . . . . . . . . .
-dnl NetBSD 5.0 . . . # # . . . . . . # . # . . . . . .
-dnl NetBSD 4.0 . ? ? ? ? ? . ? . ? ? ? ? ? . . . ? ? ?
-dnl NetBSD 3.0 . . . . # # . ? # # ? # . # . . . . . .
-dnl Haiku . . . # # # . # . . . . . ? . . ? . . .
-dnl BeOS # # . # # # . ? # . ? . # ? . . ? . . .
-dnl Android 4.3 . . # # # # # # . # . # . # . . . # . .
-dnl old mingw / msvcrt # # # # # # . . # # . # # ? . # # # . .
-dnl MSVC 9 # # # # # # # . # # . # # ? # # # # . .
-dnl mingw 2009-2011 . # . # . . . . # # . . . ? . . . . . .
-dnl mingw-w64 2011 # # # # # # . . # # . # # ? . # # # . .
+dnl 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
+dnl musl libc 1.2.3 . # . . . . # # . . . . . . . . . . . . . . . . # . #
+dnl glibc 2.35 . # . . . . . . . . . # . . . . . . . . . . . . . . .
+dnl glibc 2.5 . # . . . . # # . . . # . . . . . . . . . . . . . # .
+dnl glibc 2.3.6 . # . . . # # # . . . # . . . . . . . . . . . . . # .
+dnl FreeBSD 13.0 . # . . . # # # . . . # . . . . . # . . . . . . # . #
+dnl FreeBSD 5.4, 6.1 . # . . . # # # . . . # . . . # . # . . . . . . # ? ?
+dnl Mac OS X 10.13.5 . # . . # # # # . # . # . . . . . . . . . # . . # ? ?
+dnl Mac OS X 10.5.8 . # . . # # # # . . . # . . . # . . . . . . . . # ? ?
+dnl Mac OS X 10.3.9 . # . . . # # # . . . # . . . # . # . . . . . . # ? ?
+dnl OpenBSD 6.0, 6.7 . # . . . # # # . . . # . . . . . # . . . . . . # . #
+dnl OpenBSD 3.9, 4.0 . # . # # # # # # . # # . # . # . # . . . . . . # ? ?
+dnl Cygwin 1.7.0 (2009) . # . . # . # # . . ? ? . . . . . ? . . . . . . ? ? ?
+dnl Cygwin 1.5.25 (2008) . # . . # # # # . . # ? . . . . . # . . . . . . ? ? ?
+dnl Cygwin 1.5.19 (2006) # # . . # # # # # . # ? . # . # # # . . . . . . ? ? ?
+dnl Solaris 11.4 . # . # # # # # . . # # . . . # . . . . . . . . . # .
+dnl Solaris 11.3 . # . . . # # # . . # # . . . . . . . . . . . . . # .
+dnl Solaris 11.0 . # . # # # # # . . # # . . . # . . . . . . . . ? ? ?
+dnl Solaris 10 . # . # # # # # . . # # . . . # # . . . . . . . . # .
+dnl Solaris 2.6 ... 9 # # . # # # # # # . # # . . . # # . . . # . . . ? ? ?
+dnl Solaris 2.5.1 # # . # # # # # # . # # . . . # . . # # # # # # ? ? ?
+dnl AIX 7.1 . # . # # # # # . . . # . . . # # . . . . . . . # . .
+dnl AIX 5.2 . # . # # # # # . . . # . . . # . . . . . . . . # ? ?
+dnl AIX 4.3.2, 5.1 # # . # # # # # # . . # . . . # . . . . # . . . # ? ?
+dnl HP-UX 11.31 . # . . . # # # . . . ? . . . # . . . . # # . . ? ? ?
+dnl HP-UX 11.{00,11,23} # # . . . # # # # . . ? . . . # . . . . # # . # ? ? ?
+dnl HP-UX 10.20 # # . # . # # # # . ? ? . . # # . . . . # # ? # ? ? ?
+dnl IRIX 6.5 # # . # # # # # # . # # . . . # . . . . # . . . # ? ?
+dnl OSF/1 5.1 # # . # # # # # # . . ? . . . # . . . . # . . # ? ? ?
+dnl OSF/1 4.0d # # . # # # # # # . . ? . . . # . . # # # # # # ? ? ?
+dnl NetBSD 9.0 . # . . . # # # . . . # . . . . . . . . . . . . # . #
+dnl NetBSD 5.0 . # . . # # # # . . . # . . . # . # . . . . . . # ? ?
+dnl NetBSD 4.0 . # ? ? ? ? # # ? . ? # . ? ? ? ? ? . . . ? ? ? # ? ?
+dnl NetBSD 3.0 . # . . . # # # # . ? # # # ? # . # . . . . . . # ? ?
+dnl Haiku . # . . # # # # # . # ? . . . . . ? . . ? . . . . # .
+dnl BeOS # # # . # # # # # . ? ? # . ? . # ? . . ? . . . ? ? ?
+dnl Android 4.3 . # . # # # # # # # # ? . # . # . # . . . # . . ? ? ?
+dnl old mingw / msvcrt # # # # # # # # # . . ? # # . # # ? . # # # . . # ? ?
+dnl MSVC 9 # # # # # # # # # # . ? # # . # # ? # # # # . . # ? ?
+dnl mingw 2009-2011 . # # . # . # # . . . ? # # . . . ? . . . . . . # ? ?
+dnl mingw-w64 2011 # # # # # # # # # . . ? # # . # # ? . # # # . . # ? ?
diff --git a/gl/m4/pselect.m4 b/gl/m4/pselect.m4
index 86114416..6c3d1b8f 100644
--- a/gl/m4/pselect.m4
+++ b/gl/m4/pselect.m4
@@ -1,5 +1,5 @@
-# pselect.m4 serial 10
-dnl Copyright (C) 2011-2022 Free Software Foundation, Inc.
+# pselect.m4 serial 11
+dnl Copyright (C) 2011-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -54,6 +54,8 @@ AC_DEFUN([gl_FUNC_PSELECT],
case "$host_os" in
# Guess yes on Linux systems.
linux-* | linux) gl_cv_func_pselect_detects_ebadf="guessing yes" ;;
+ # Guess yes on systems that emulate the Linux system calls.
+ midipix*) gl_cv_func_pselect_detects_ebadf="guessing yes" ;;
# Guess yes on glibc systems.
*-gnu* | gnu*) gl_cv_func_pselect_detects_ebadf="guessing yes" ;;
# If we don't know, obey --enable-cross-guesses.
diff --git a/gl/m4/pthread_rwlock_rdlock.m4 b/gl/m4/pthread_rwlock_rdlock.m4
index 8ad78392..66b29f89 100644
--- a/gl/m4/pthread_rwlock_rdlock.m4
+++ b/gl/m4/pthread_rwlock_rdlock.m4
@@ -1,5 +1,5 @@
-# pthread_rwlock_rdlock.m4 serial 4
-dnl Copyright (C) 2017-2022 Free Software Foundation, Inc.
+# pthread_rwlock_rdlock.m4 serial 5
+dnl Copyright (C) 2017-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -156,22 +156,22 @@ main ()
[gl_cv_pthread_rwlock_rdlock_prefer_writer=yes],
[gl_cv_pthread_rwlock_rdlock_prefer_writer=no],
[case "$host_os" in
- # Guess no on glibc systems.
- *-gnu* | gnu*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
- # Guess no on musl systems.
- *-musl*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
- # Guess no on bionic systems.
- *-android*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
- # Guess yes on native Windows with the mingw-w64 winpthreads library.
- # Guess no on native Windows with the gnulib windows-rwlock module.
- mingw*) if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
- gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing yes"
- else
- gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no"
- fi
- ;;
- # If we don't know, obey --enable-cross-guesses.
- *) gl_cv_pthread_rwlock_rdlock_prefer_writer="$gl_cross_guess_normal" ;;
+ # Guess no on glibc systems.
+ *-gnu* | gnu*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
+ # Guess no on musl systems.
+ *-musl* | midipix*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
+ # Guess no on bionic systems.
+ *-android*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
+ # Guess yes on native Windows with the mingw-w64 winpthreads library.
+ # Guess no on native Windows with the gnulib windows-rwlock module.
+ mingw*) if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
+ gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing yes"
+ else
+ gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no"
+ fi
+ ;;
+ # If we don't know, obey --enable-cross-guesses.
+ *) gl_cv_pthread_rwlock_rdlock_prefer_writer="$gl_cross_guess_normal" ;;
esac
])
LIBS="$save_LIBS"
diff --git a/gl/m4/pthread_sigmask.m4 b/gl/m4/pthread_sigmask.m4
index 0aa8c53f..27795282 100644
--- a/gl/m4/pthread_sigmask.m4
+++ b/gl/m4/pthread_sigmask.m4
@@ -1,5 +1,5 @@
-# pthread_sigmask.m4 serial 21
-dnl Copyright (C) 2011-2022 Free Software Foundation, Inc.
+# pthread_sigmask.m4 serial 22
+dnl Copyright (C) 2011-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -24,7 +24,7 @@ AC_DEFUN([gl_FUNC_PTHREAD_SIGMASK],
[gl_cv_func_pthread_sigmask_macro=no])
])
- LIB_PTHREAD_SIGMASK=
+ PTHREAD_SIGMASK_LIB=
if test $gl_cv_func_pthread_sigmask_macro = yes; then
dnl pthread_sigmask is a dummy macro.
@@ -62,7 +62,7 @@ AC_DEFUN([gl_FUNC_PTHREAD_SIGMASK],
])
if test $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD = yes; then
dnl pthread_sigmask is available with -pthread or -lpthread.
- LIB_PTHREAD_SIGMASK="$LIBMULTITHREAD"
+ PTHREAD_SIGMASK_LIB="$LIBMULTITHREAD"
else
dnl pthread_sigmask is not available at all.
HAVE_PTHREAD_SIGMASK=0
@@ -101,6 +101,9 @@ AC_DEFUN([gl_FUNC_PTHREAD_SIGMASK],
])
fi
+ AC_SUBST([PTHREAD_SIGMASK_LIB])
+ dnl For backward compatibility.
+ LIB_PTHREAD_SIGMASK="$PTHREAD_SIGMASK_LIB"
AC_SUBST([LIB_PTHREAD_SIGMASK])
dnl We don't need a variable LTLIB_PTHREAD_SIGMASK, because when
dnl "$gl_threads_api" = posix, $LTLIBMULTITHREAD and $LIBMULTITHREAD are the
@@ -114,7 +117,7 @@ AC_DEFUN([gl_FUNC_PTHREAD_SIGMASK],
dnl On FreeBSD 13.0, MidnightBSD 1.1, HP-UX 11.31, Solaris 9, in programs
dnl that are not linked with -lpthread, the pthread_sigmask() function
dnl always returns 0 and has no effect.
- if test -z "$LIB_PTHREAD_SIGMASK"; then
+ if test -z "$PTHREAD_SIGMASK_LIB"; then
case " $LIBS " in
*' -pthread '*) ;;
*' -lpthread '*) ;;
@@ -162,7 +165,7 @@ AC_DEFUN([gl_FUNC_PTHREAD_SIGMASK],
[gl_cv_func_pthread_sigmask_return_works],
[
gl_save_LIBS="$LIBS"
- LIBS="$LIBS $LIB_PTHREAD_SIGMASK"
+ LIBS="$LIBS $PTHREAD_SIGMASK_LIB"
AC_RUN_IFELSE(
[AC_LANG_SOURCE([[
#include <pthread.h>
@@ -208,13 +211,14 @@ int main ()
gl_cv_func_pthread_sigmask_unblock_works="guessing yes";;
esac
m4_ifdef([gl_][THREADLIB],
- [dnl Link against $LIBMULTITHREAD, not only $LIB_PTHREAD_SIGMASK.
+ [dnl Link against $LIBMULTITHREAD, not only $PTHREAD_SIGMASK_LIB.
dnl Otherwise we get a false positive on those platforms where
dnl $gl_cv_func_pthread_sigmask_in_libc_works is "no".
gl_save_LIBS=$LIBS
LIBS="$LIBS $LIBMULTITHREAD"])
AC_RUN_IFELSE(
[AC_LANG_SOURCE([[
+#include <limits.h>
#include <pthread.h>
#include <signal.h>
#include <stdio.h>
@@ -230,14 +234,16 @@ sigint_handler (int sig)
int main ()
{
sigset_t set;
- int pid = getpid ();
+ pid_t pid = getpid ();
char command[80];
+ if (LONG_MAX < pid)
+ return 6;
signal (SIGINT, sigint_handler);
sigemptyset (&set);
sigaddset (&set, SIGINT);
if (!(pthread_sigmask (SIG_BLOCK, &set, NULL) == 0))
return 1;
- sprintf (command, "sh -c 'sleep 1; kill -%d %d' &", SIGINT, pid);
+ sprintf (command, "sh -c 'sleep 1; kill -INT %ld' &", (long) pid);
if (!(system (command) == 0))
return 2;
sleep (2);
diff --git a/gl/m4/raise.m4 b/gl/m4/raise.m4
index 0c78d095..f20c439f 100644
--- a/gl/m4/raise.m4
+++ b/gl/m4/raise.m4
@@ -1,5 +1,5 @@
# raise.m4 serial 4
-dnl Copyright (C) 2011-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/rawmemchr.m4 b/gl/m4/rawmemchr.m4
index dae41935..a48d8295 100644
--- a/gl/m4/rawmemchr.m4
+++ b/gl/m4/rawmemchr.m4
@@ -1,5 +1,5 @@
# rawmemchr.m4 serial 3
-dnl Copyright (C) 2003, 2007-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2007-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/readdir.m4 b/gl/m4/readdir.m4
index ff3d2ab7..81337e2f 100644
--- a/gl/m4/readdir.m4
+++ b/gl/m4/readdir.m4
@@ -1,5 +1,5 @@
-# readdir.m4 serial 1
-dnl Copyright (C) 2011-2022 Free Software Foundation, Inc.
+# readdir.m4 serial 2
+dnl Copyright (C) 2011-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -11,5 +11,11 @@ AC_DEFUN([gl_FUNC_READDIR],
AC_CHECK_FUNCS([readdir])
if test $ac_cv_func_readdir = no; then
HAVE_READDIR=0
+ else
+ dnl Replace readdir() on native Windows, to support fdopendir().
+ AC_REQUIRE([gl_DIRENT_DIR])
+ if test $DIR_HAS_FD_MEMBER = 0; then
+ REPLACE_READDIR=1
+ fi
fi
])
diff --git a/gl/m4/readlink.m4 b/gl/m4/readlink.m4
index d1dd5212..f1d41d2b 100644
--- a/gl/m4/readlink.m4
+++ b/gl/m4/readlink.m4
@@ -1,5 +1,5 @@
-# readlink.m4 serial 16
-dnl Copyright (C) 2003, 2007, 2009-2022 Free Software Foundation, Inc.
+# readlink.m4 serial 17
+dnl Copyright (C) 2003, 2007, 2009-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -38,6 +38,9 @@ AC_DEFUN([gl_FUNC_READLINK],
# Guess yes on Linux or glibc systems.
linux-* | linux | *-gnu* | gnu*)
gl_cv_func_readlink_trailing_slash="guessing yes" ;;
+ # Guess yes on systems that emulate the Linux system calls.
+ midipix*)
+ gl_cv_func_readlink_trailing_slash="guessing yes" ;;
# Guess no on AIX or HP-UX.
aix* | hpux*)
gl_cv_func_readlink_trailing_slash="guessing no" ;;
@@ -75,6 +78,9 @@ AC_DEFUN([gl_FUNC_READLINK],
# Guess yes on Linux or glibc systems.
linux-* | linux | *-gnu* | gnu*)
gl_cv_func_readlink_truncate="guessing yes" ;;
+ # Guess yes on systems that emulate the Linux system calls.
+ midipix*)
+ gl_cv_func_readlink_truncate="guessing yes" ;;
# Guess no on AIX or HP-UX.
aix* | hpux*)
gl_cv_func_readlink_truncate="guessing no" ;;
diff --git a/gl/m4/readlinkat.m4 b/gl/m4/readlinkat.m4
index 63c5205e..5c513562 100644
--- a/gl/m4/readlinkat.m4
+++ b/gl/m4/readlinkat.m4
@@ -1,7 +1,7 @@
-# serial 6
+# serial 8
# See if we need to provide readlinkat replacement.
-dnl Copyright (C) 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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,10 +12,13 @@ AC_DEFUN([gl_FUNC_READLINKAT],
[
AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
- AC_CHECK_FUNCS_ONCE([readlinkat])
+ gl_CHECK_FUNCS_ANDROID([readlinkat], [[#include <unistd.h>]])
AC_REQUIRE([gl_FUNC_READLINK])
if test $ac_cv_func_readlinkat = no; then
HAVE_READLINKAT=0
+ case "$gl_cv_onwards_func_readlinkat" in
+ future*) REPLACE_READLINKAT=1 ;;
+ esac
else
AC_CACHE_CHECK([whether readlinkat signature is correct],
[gl_cv_decl_readlinkat_works],
diff --git a/gl/m4/realloc.m4 b/gl/m4/realloc.m4
index 86e57c25..26053914 100644
--- a/gl/m4/realloc.m4
+++ b/gl/m4/realloc.m4
@@ -1,5 +1,5 @@
-# realloc.m4 serial 26
-dnl Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc.
+# realloc.m4 serial 27
+dnl Copyright (C) 2007, 2009-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -25,7 +25,7 @@ AC_DEFUN([_AC_FUNC_REALLOC_IF],
[case "$host_os" in
# Guess yes on platforms where we know the result.
*-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \
- | gnu* | *-musl* | midnightbsd* \
+ | gnu* | *-musl* | midipix* | midnightbsd* \
| hpux* | solaris* | cygwin* | mingw* | msys* )
ac_cv_func_realloc_0_nonnull="guessing yes" ;;
# If we don't know, obey --enable-cross-guesses.
diff --git a/gl/m4/reallocarray.m4 b/gl/m4/reallocarray.m4
index f39ab6ea..6a5b5ab3 100644
--- a/gl/m4/reallocarray.m4
+++ b/gl/m4/reallocarray.m4
@@ -1,5 +1,5 @@
-# reallocarray.m4 serial 3
-dnl Copyright (C) 2017-2022 Free Software Foundation, Inc.
+# reallocarray.m4 serial 5
+dnl Copyright (C) 2017-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -11,9 +11,12 @@ AC_DEFUN([gl_FUNC_REALLOCARRAY],
AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
AC_REQUIRE([gl_CHECK_MALLOC_PTRDIFF])
- AC_CHECK_FUNCS([reallocarray])
+ gl_CHECK_FUNCS_ANDROID([reallocarray], [[#include <stdlib.h>]])
if test "$ac_cv_func_reallocarray" = no; then
HAVE_REALLOCARRAY=0
+ case "$gl_cv_onwards_func_reallocarray" in
+ future*) REPLACE_REALLOCARRAY=1 ;;
+ esac
elif test "$gl_cv_malloc_ptrdiff" = no; then
REPLACE_REALLOCARRAY=1
fi
diff --git a/gl/m4/regex.m4 b/gl/m4/regex.m4
index 47342986..7acadc48 100644
--- a/gl/m4/regex.m4
+++ b/gl/m4/regex.m4
@@ -1,6 +1,6 @@
-# serial 73
+# serial 74
-# Copyright (C) 1996-2001, 2003-2022 Free Software Foundation, Inc.
+# Copyright (C) 1996-2001, 2003-2023 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -15,7 +15,7 @@ AC_DEFUN([gl_REGEX],
[
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_ARG_WITH([included-regex],
- [AS_HELP_STRING([--without-included-regex],
+ [AS_HELP_STRING([[--without-included-regex]],
[don't compile regex; this is the default on systems
with recent-enough versions of the GNU C Library
(use with caution on other systems).])])
diff --git a/gl/m4/rename.m4 b/gl/m4/rename.m4
index 9f1a5654..efabf1a2 100644
--- a/gl/m4/rename.m4
+++ b/gl/m4/rename.m4
@@ -1,6 +1,6 @@
-# serial 33
+# serial 34
-# Copyright (C) 2001, 2003, 2005-2006, 2009-2022 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2005-2006, 2009-2023 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -57,6 +57,8 @@ AC_DEFUN([gl_FUNC_RENAME],
[case "$host_os" in
# Guess yes on Linux systems.
linux-* | linux) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
+ # Guess yes on systems that emulate the Linux system calls.
+ midipix*) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
# Guess no on native Windows.
@@ -113,6 +115,8 @@ AC_DEFUN([gl_FUNC_RENAME],
[case "$host_os" in
# Guess yes on Linux systems.
linux-* | linux) gl_cv_func_rename_slash_src_works="guessing yes" ;;
+ # Guess yes on systems that emulate the Linux system calls.
+ midipix*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
# Guess yes on native Windows.
@@ -184,6 +188,8 @@ AC_DEFUN([gl_FUNC_RENAME],
case "$host_os" in
# Guess yes on Linux systems.
linux-* | linux) gl_cv_func_rename_link_works="guessing yes" ;;
+ # Guess yes on systems that emulate the Linux system calls.
+ midipix*) gl_cv_func_rename_link_works="guessing yes" ;;
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_rename_link_works="guessing yes" ;;
# Guess yes on native Windows.
diff --git a/gl/m4/renameat.m4 b/gl/m4/renameat.m4
index e8f40d56..37805786 100644
--- a/gl/m4/renameat.m4
+++ b/gl/m4/renameat.m4
@@ -1,7 +1,7 @@
-# serial 3
+# serial 4
# See if we need to provide renameat replacement.
-dnl Copyright (C) 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -15,11 +15,12 @@ AC_DEFUN([gl_FUNC_RENAMEAT],
AC_REQUIRE([gl_STDIO_H_DEFAULTS])
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
AC_CHECK_HEADERS([linux/fs.h])
- AC_CHECK_FUNCS_ONCE([renameat renameat2])
+ AC_CHECK_FUNCS_ONCE([renameat])
if test $ac_cv_func_renameat = no; then
HAVE_RENAMEAT=0
elif test $REPLACE_RENAME = 1; then
dnl Solaris 9 and 10 have the same bugs in renameat as in rename.
REPLACE_RENAMEAT=1
fi
+ gl_CHECK_FUNCS_ANDROID([renameat2], [[#include <stdio.h>]])
])
diff --git a/gl/m4/rewinddir.m4 b/gl/m4/rewinddir.m4
index 87c050f6..d0d24de8 100644
--- a/gl/m4/rewinddir.m4
+++ b/gl/m4/rewinddir.m4
@@ -1,5 +1,5 @@
-# rewinddir.m4 serial 1
-dnl Copyright (C) 2011-2022 Free Software Foundation, Inc.
+# rewinddir.m4 serial 2
+dnl Copyright (C) 2011-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -11,5 +11,11 @@ AC_DEFUN([gl_FUNC_REWINDDIR],
AC_CHECK_FUNCS([rewinddir])
if test $ac_cv_func_rewinddir = no; then
HAVE_REWINDDIR=0
+ else
+ dnl Replace rewinddir() on native Windows, to support fdopendir().
+ AC_REQUIRE([gl_DIRENT_DIR])
+ if test $DIR_HAS_FD_MEMBER = 0; then
+ REPLACE_REWINDDIR=1
+ fi
fi
])
diff --git a/gl/m4/rmdir.m4 b/gl/m4/rmdir.m4
index 54880278..b19c8901 100644
--- a/gl/m4/rmdir.m4
+++ b/gl/m4/rmdir.m4
@@ -1,5 +1,5 @@
# rmdir.m4 serial 18
-dnl Copyright (C) 2002, 2005, 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2005, 2009-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -36,6 +36,8 @@ AC_DEFUN([gl_FUNC_RMDIR],
[case "$host_os" in
# Guess yes on Linux systems.
linux-* | linux) gl_cv_func_rmdir_works="guessing yes" ;;
+ # Guess yes on systems that emulate the Linux system calls.
+ midipix*) gl_cv_func_rmdir_works="guessing yes" ;;
# Guess yes on glibc systems.
*-gnu* | gnu*) gl_cv_func_rmdir_works="guessing yes" ;;
# Guess no on native Windows.
diff --git a/gl/m4/save-cwd.m4 b/gl/m4/save-cwd.m4
index 90073eeb..2e6cf58e 100644
--- a/gl/m4/save-cwd.m4
+++ b/gl/m4/save-cwd.m4
@@ -1,5 +1,5 @@
# serial 10
-dnl Copyright (C) 2002-2006, 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2009-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/select.m4 b/gl/m4/select.m4
index 163f8fbf..88861af4 100644
--- a/gl/m4/select.m4
+++ b/gl/m4/select.m4
@@ -1,5 +1,5 @@
-# select.m4 serial 13
-dnl Copyright (C) 2009-2022 Free Software Foundation, Inc.
+# select.m4 serial 15
+dnl Copyright (C) 2009-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -77,6 +77,8 @@ changequote([,])dnl
case "$host_os" in
# Guess yes on Linux systems.
linux-* | linux) gl_cv_func_select_detects_ebadf="guessing yes" ;;
+ # Guess yes on systems that emulate the Linux system calls.
+ midipix*) gl_cv_func_select_detects_ebadf="guessing yes" ;;
# Guess yes on glibc systems.
*-gnu* | gnu*) gl_cv_func_select_detects_ebadf="guessing yes" ;;
# If we don't know, obey --enable-cross-guesses.
@@ -91,7 +93,7 @@ changequote([,])dnl
fi
dnl Determine the needed libraries.
- LIB_SELECT="$LIBSOCKET"
+ SELECT_LIB="$LIBSOCKET"
if test $REPLACE_SELECT = 1; then
case "$host_os" in
mingw*)
@@ -109,9 +111,12 @@ main ()
return 0;
}]])],
[],
- [LIB_SELECT="$LIB_SELECT -luser32"])
+ [SELECT_LIB="$SELECT_LIB -luser32"])
;;
esac
fi
+ AC_SUBST([SELECT_LIB])
+ dnl For backward compatibility.
+ LIB_SELECT="$LIB_SELECT"
AC_SUBST([LIB_SELECT])
])
diff --git a/gl/m4/setenv.m4 b/gl/m4/setenv.m4
index 2000039a..a30523d6 100644
--- a/gl/m4/setenv.m4
+++ b/gl/m4/setenv.m4
@@ -1,5 +1,5 @@
-# setenv.m4 serial 30
-dnl Copyright (C) 2001-2004, 2006-2022 Free Software Foundation, Inc.
+# setenv.m4 serial 33
+dnl Copyright (C) 2001-2004, 2006-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -35,12 +35,12 @@ AC_DEFUN([gl_FUNC_SETENV],
]])],
[gl_cv_func_setenv_works=yes], [gl_cv_func_setenv_works=no],
[case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu* | gnu*) gl_cv_func_setenv_works="guessing yes" ;;
- # Guess yes on musl systems.
- *-musl*) gl_cv_func_setenv_works="guessing yes" ;;
- # If we don't know, obey --enable-cross-guesses.
- *) gl_cv_func_setenv_works="$gl_cross_guess_normal" ;;
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_setenv_works="guessing yes" ;;
+ # Guess yes on musl systems.
+ *-musl* | midipix*) gl_cv_func_setenv_works="guessing yes" ;;
+ # If we don't know, obey --enable-cross-guesses.
+ *) gl_cv_func_setenv_works="$gl_cross_guess_normal" ;;
esac
])])
case "$gl_cv_func_setenv_works" in
@@ -151,11 +151,10 @@ int unsetenv (const char *name);
# Prerequisites of lib/setenv.c.
AC_DEFUN([gl_PREREQ_SETENV],
[
- AC_REQUIRE([AC_FUNC_ALLOCA])
AC_REQUIRE([gl_ENVIRON])
AC_CHECK_HEADERS_ONCE([unistd.h])
AC_CHECK_HEADERS([search.h])
- AC_CHECK_FUNCS([tsearch])
+ gl_CHECK_FUNCS_ANDROID([tsearch], [[#include <search.h>]])
])
# Prerequisites of lib/unsetenv.c.
diff --git a/gl/m4/setlocale_null.m4 b/gl/m4/setlocale_null.m4
index 09ea50ea..1105d693 100644
--- a/gl/m4/setlocale_null.m4
+++ b/gl/m4/setlocale_null.m4
@@ -1,5 +1,5 @@
-# setlocale_null.m4 serial 5
-dnl Copyright (C) 2019-2022 Free Software Foundation, Inc.
+# setlocale_null.m4 serial 8
+dnl Copyright (C) 2019-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -13,9 +13,23 @@ AC_DEFUN([gl_FUNC_SETLOCALE_NULL],
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* | midnightbsd* | netbsd* | openbsd* | aix* | haiku* | cygwin*)
+ # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku.
+ *-musl* | midipix* | darwin* | freebsd* | midnightbsd* | netbsd* | openbsd* | aix* | haiku*)
gl_cv_func_setlocale_null_all_mtsafe=no ;;
+ # Guess no on Cygwin < 3.4.6.
+ cygwin*)
+ AC_EGREP_CPP([Lucky user],
+ [
+#if defined __CYGWIN__
+ #include <cygwin/version.h>
+ #if CYGWIN_VERSION_DLL_COMBINED >= CYGWIN_VERSION_DLL_MAKE_COMBINED (3004, 6)
+ Lucky user
+ #endif
+#endif
+ ],
+ [gl_cv_func_setlocale_null_all_mtsafe=yes],
+ [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 ;;
@@ -48,7 +62,7 @@ AC_DEFUN([gl_FUNC_SETLOCALE_NULL],
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* | midnightbsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*)
+ *-gnu* | gnu* | *-musl* | midipix* | darwin* | freebsd* | midnightbsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*)
gl_cv_func_setlocale_null_one_mtsafe=yes ;;
# If we don't know, obey --enable-cross-guesses.
*)
@@ -74,20 +88,23 @@ AC_DEFUN([gl_FUNC_SETLOCALE_NULL],
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= ;;
+ mingw*) SETLOCALE_NULL_LIB= ;;
*)
gl_WEAK_SYMBOLS
case "$gl_cv_have_weak" in
- *yes) LIB_SETLOCALE_NULL= ;;
- *) LIB_SETLOCALE_NULL="$LIBPTHREAD" ;;
+ *yes) SETLOCALE_NULL_LIB= ;;
+ *) SETLOCALE_NULL_LIB="$LIBPTHREAD" ;;
esac
;;
esac
else
- LIB_SETLOCALE_NULL=
+ SETLOCALE_NULL_LIB=
fi
- dnl LIB_SETLOCALE_NULL is expected to be '-pthread' or '-lpthread' on AIX
+ dnl SETLOCALE_NULL_LIB is expected to be '-pthread' or '-lpthread' on AIX
dnl with gcc or xlc, and empty otherwise.
+ AC_SUBST([SETLOCALE_NULL_LIB])
+ dnl For backward compatibility.
+ LIB_SETLOCALE_NULL="$SETLOCALE_NULL_LIB"
AC_SUBST([LIB_SETLOCALE_NULL])
])
diff --git a/gl/m4/sigaction.m4 b/gl/m4/sigaction.m4
index 62c83e03..e981a744 100644
--- a/gl/m4/sigaction.m4
+++ b/gl/m4/sigaction.m4
@@ -1,5 +1,5 @@
# sigaction.m4 serial 7
-dnl Copyright (C) 2008-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/signal_h.m4 b/gl/m4/signal_h.m4
index 4c05c627..cdd6812f 100644
--- a/gl/m4/signal_h.m4
+++ b/gl/m4/signal_h.m4
@@ -1,5 +1,5 @@
# signal_h.m4 serial 22
-dnl Copyright (C) 2007-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/signalblocking.m4 b/gl/m4/signalblocking.m4
index b586ef53..81cc91a9 100644
--- a/gl/m4/signalblocking.m4
+++ b/gl/m4/signalblocking.m4
@@ -1,5 +1,5 @@
# signalblocking.m4 serial 17
-dnl Copyright (C) 2001-2002, 2006-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2002, 2006-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/sigpipe.m4 b/gl/m4/sigpipe.m4
index e0524443..1b6ec427 100644
--- a/gl/m4/sigpipe.m4
+++ b/gl/m4/sigpipe.m4
@@ -1,5 +1,5 @@
# sigpipe.m4 serial 3
-dnl Copyright (C) 2008-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/size_max.m4 b/gl/m4/size_max.m4
index 1d6abaea..0763366d 100644
--- a/gl/m4/size_max.m4
+++ b/gl/m4/size_max.m4
@@ -1,5 +1,5 @@
# size_max.m4 serial 12
-dnl Copyright (C) 2003, 2005-2006, 2008-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2005-2006, 2008-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/sleep.m4 b/gl/m4/sleep.m4
index e73651f5..269b73b9 100644
--- a/gl/m4/sleep.m4
+++ b/gl/m4/sleep.m4
@@ -1,5 +1,5 @@
-# sleep.m4 serial 11
-dnl Copyright (C) 2007-2022 Free Software Foundation, Inc.
+# sleep.m4 serial 12
+dnl Copyright (C) 2007-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -50,6 +50,8 @@ handle_alarm (int sig)
*-gnu* | gnu*) gl_cv_func_sleep_works="guessing yes" ;;
# Guess yes on musl systems.
*-musl*) gl_cv_func_sleep_works="guessing yes" ;;
+ # Guess yes on systems that emulate the Linux system calls.
+ midipix*) gl_cv_func_sleep_works="guessing yes" ;;
# Guess no on native Windows.
mingw*) gl_cv_func_sleep_works="guessing no" ;;
# If we don't know, obey --enable-cross-guesses.
diff --git a/gl/m4/socketlib.m4 b/gl/m4/socketlib.m4
index b8bd0afa..a556af1e 100644
--- a/gl/m4/socketlib.m4
+++ b/gl/m4/socketlib.m4
@@ -1,5 +1,5 @@
# socketlib.m4 serial 3
-dnl Copyright (C) 2008-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/sockets.m4 b/gl/m4/sockets.m4
index aa04acc3..ed9cb873 100644
--- a/gl/m4/sockets.m4
+++ b/gl/m4/sockets.m4
@@ -1,5 +1,5 @@
# sockets.m4 serial 7
-dnl Copyright (C) 2008-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/socklen.m4 b/gl/m4/socklen.m4
index 1390ac41..1c63a853 100644
--- a/gl/m4/socklen.m4
+++ b/gl/m4/socklen.m4
@@ -1,5 +1,5 @@
# socklen.m4 serial 11
-dnl Copyright (C) 2005-2007, 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2007, 2009-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/sockpfaf.m4 b/gl/m4/sockpfaf.m4
index b1c4068a..6c6dc2f7 100644
--- a/gl/m4/sockpfaf.m4
+++ b/gl/m4/sockpfaf.m4
@@ -1,5 +1,5 @@
# sockpfaf.m4 serial 10
-dnl Copyright (C) 2004, 2006, 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2004, 2006, 2009-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/ssize_t.m4 b/gl/m4/ssize_t.m4
index 03b2b895..52bd77d2 100644
--- a/gl/m4/ssize_t.m4
+++ b/gl/m4/ssize_t.m4
@@ -1,23 +1,37 @@
-# ssize_t.m4 serial 5 (gettext-0.18.2)
-dnl Copyright (C) 2001-2003, 2006, 2010-2022 Free Software Foundation, Inc.
+# ssize_t.m4 serial 6
+dnl Copyright (C) 2001-2003, 2006, 2010-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl From Bruno Haible.
-dnl Test whether ssize_t is defined.
+dnl Define ssize_t if it does not already exist.
AC_DEFUN([gt_TYPE_SSIZE_T],
[
- AC_CACHE_CHECK([for ssize_t], [gt_cv_ssize_t],
+ AC_CACHE_CHECK([for ssize_t], [gl_cv_ssize_t],
[AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[#include <sys/types.h>]],
[[int x = sizeof (ssize_t *) + sizeof (ssize_t);
return !x;]])],
- [gt_cv_ssize_t=yes], [gt_cv_ssize_t=no])])
- if test $gt_cv_ssize_t = no; then
- AC_DEFINE([ssize_t], [int],
- [Define as a signed type of the same size as size_t.])
+ [gl_cv_ssize_t=yes], [gl_cv_ssize_t=no])])
+ if test $gl_cv_ssize_t = no; then
+ dnl On 64-bit native Windows, ssize_t needs to be defined as 'long long',
+ dnl for consistency with the 64-bit size_t.
+ AC_CACHE_CHECK([whether size_t is wider than 'long'], [gl_cv_size_t_large],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <sys/types.h>
+ typedef int array [2 * (sizeof (size_t) > sizeof (long)) - 1];
+ ]])],
+ [gl_cv_size_t_large=yes], [gl_cv_size_t_large=no])])
+ if test $gl_cv_size_t_large = yes; then
+ gl_def_ssize_t='long long'
+ else
+ gl_def_ssize_t='long'
+ fi
+ AC_DEFINE_UNQUOTED([ssize_t], [$gl_def_ssize_t],
+ [Define as a signed type of the same size as size_t.])
fi
])
diff --git a/gl/m4/stat-time.m4 b/gl/m4/stat-time.m4
index 342857d3..40993d57 100644
--- a/gl/m4/stat-time.m4
+++ b/gl/m4/stat-time.m4
@@ -1,6 +1,6 @@
# Checks for stat-related time functions.
-# Copyright (C) 1998-1999, 2001, 2003, 2005-2007, 2009-2022 Free Software
+# Copyright (C) 1998-1999, 2001, 2003, 2005-2007, 2009-2023 Free Software
# Foundation, Inc.
# This file is free software; the Free Software Foundation
diff --git a/gl/m4/stat.m4 b/gl/m4/stat.m4
index 916eb886..6d1628c2 100644
--- a/gl/m4/stat.m4
+++ b/gl/m4/stat.m4
@@ -1,6 +1,6 @@
-# serial 18
+# serial 19
-# Copyright (C) 2009-2022 Free Software Foundation, Inc.
+# Copyright (C) 2009-2023 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -45,6 +45,8 @@ AC_DEFUN([gl_FUNC_STAT],
[case "$host_os" in
# Guess yes on Linux systems.
linux-* | linux) gl_cv_func_stat_file_slash="guessing yes" ;;
+ # Guess yes on systems that emulate the Linux system calls.
+ midipix*) gl_cv_func_stat_file_slash="guessing yes" ;;
# Guess yes on glibc systems.
*-gnu* | gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
# If we don't know, obey --enable-cross-guesses.
diff --git a/gl/m4/stdalign.m4 b/gl/m4/stdalign.m4
index 78577cb2..1a236d66 100644
--- a/gl/m4/stdalign.m4
+++ b/gl/m4/stdalign.m4
@@ -1,20 +1,28 @@
-# Check for stdalign.h that conforms to C11.
+# Check for alignas and alignof that conform to C23.
-dnl Copyright 2011-2022 Free Software Foundation, Inc.
+dnl Copyright 2011-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
+dnl Written by Paul Eggert and Bruno Haible.
+
# Prepare for substituting <stdalign.h> if it is not supported.
-AC_DEFUN([gl_STDALIGN_H],
+AC_DEFUN([gl_ALIGNASOF],
[
- AC_CACHE_CHECK([for working stdalign.h],
+ AC_CACHE_CHECK([for alignas and alignof],
[gl_cv_header_working_stdalign_h],
- [AC_COMPILE_IFELSE(
+ [gl_save_CFLAGS=$CFLAGS
+ for gl_working in "yes, keywords" "yes, <stdalign.h> macros"; do
+ AS_CASE([$gl_working],
+ [*stdalign.h*], [CFLAGS="$gl_save_CFLAGS -DINCLUDE_STDALIGN_H"])
+ AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[#include <stdint.h>
- #include <stdalign.h>
+ #ifdef INCLUDE_STDALIGN_H
+ #include <stdalign.h>
+ #endif
#include <stddef.h>
/* Test that alignof yields a result consistent with offsetof.
@@ -30,7 +38,7 @@ AC_DEFUN([gl_STDALIGN_H],
char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
- /* Test _Alignas only on platforms where gnulib can help. */
+ /* Test alignas only on platforms where gnulib can help. */
#if \
((defined __cplusplus && 201103 <= __cplusplus) \
|| (__TINYC__ && defined __attribute__) \
@@ -45,12 +53,148 @@ AC_DEFUN([gl_STDALIGN_H],
? 1 : -1];
#endif
]])],
- [gl_cv_header_working_stdalign_h=yes],
- [gl_cv_header_working_stdalign_h=no])])
+ [gl_cv_header_working_stdalign_h=$gl_working],
+ [gl_cv_header_working_stdalign_h=no])
+
+ CFLAGS=$gl_save_CFLAGS
+ test "$gl_cv_header_working_stdalign_h" != no && break
+ done])
+
+ AS_CASE([$gl_cv_header_working_stdalign_h],
+ [yes*keyword*],
+ [AC_DEFINE([HAVE_C_ALIGNASOF], [1],
+ [Define to 1 if the alignas and alignof keywords work.])])
+
+ dnl The "zz" puts this toward config.h's end, to avoid potential
+ dnl collisions with other definitions.
+ AH_VERBATIM([zzalignas],
+[#if !defined HAVE_C_ALIGNASOF && __cplusplus < 201103 && !defined alignof
+# if HAVE_STDALIGN_H
+# include <stdalign.h>
+# endif
+
+/* ISO C23 alignas and alignof for platforms that lack it.
+
+ References:
+ ISO C23 (latest free draft
+ <http://www.open-std.org/jtc1/sc22/wg14/www/docs/n3047.pdf>)
+ sections 6.5.3.4, 6.7.5, 7.15.
+ C++11 (latest free draft
+ <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf>)
+ section 18.10. */
+
+/* alignof (TYPE), also known as _Alignof (TYPE), yields the alignment
+ requirement of a structure member (i.e., slot or field) that is of
+ type TYPE, as an integer constant expression.
+
+ This differs from GCC's and clang's __alignof__ operator, which can
+ yield a better-performing alignment for an object of that type. For
+ example, on x86 with GCC and on Linux/x86 with clang,
+ __alignof__ (double) and __alignof__ (long long) are 8, whereas
+ alignof (double) and alignof (long long) are 4 unless the option
+ '-malign-double' is used.
+
+ The result cannot be used as a value for an 'enum' constant, if you
+ want to be portable to HP-UX 10.20 cc and AIX 3.2.5 xlc. */
+
+/* GCC releases before GCC 4.9 had a bug in _Alignof. See GCC bug 52023
+ <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>.
+ clang versions < 8.0.0 have the same bug. */
+# if (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 \
+ || (defined __GNUC__ && __GNUC__ < 4 + (__GNUC_MINOR__ < 9) \
+ && !defined __clang__) \
+ || (defined __clang__ && __clang_major__ < 8))
+# undef/**/_Alignof
+# ifdef __cplusplus
+# if (201103 <= __cplusplus || defined _MSC_VER)
+# define _Alignof(type) alignof (type)
+# else
+ template <class __t> struct __alignof_helper { char __a; __t __b; };
+# define _Alignof(type) offsetof (__alignof_helper<type>, __b)
+# define _GL_STDALIGN_NEEDS_STDDEF 1
+# endif
+# else
+# if (defined __GNUC__ && 4 <= __GNUC__) || defined __clang__
+# define _Alignof(type) __builtin_offsetof (struct { char __a; type __b; }, __b)
+# else
+# define _Alignof(type) offsetof (struct { char __a; type __b; }, __b)
+# define _GL_STDALIGN_NEEDS_STDDEF 1
+# endif
+# endif
+# endif
+# if ! (defined __cplusplus && (201103 <= __cplusplus || defined _MSC_VER))
+# undef/**/alignof
+# define alignof _Alignof
+# endif
+
+/* alignas (A), also known as _Alignas (A), aligns a variable or type
+ to the alignment A, where A is an integer constant expression. For
+ example:
+
+ int alignas (8) foo;
+ struct s { int a; int alignas (8) bar; };
- if test $gl_cv_header_working_stdalign_h = yes; then
+ aligns the address of FOO and the offset of BAR to be multiples of 8.
+
+ A should be a power of two that is at least the type's alignment
+ and at most the implementation's alignment limit. This limit is
+ 2**28 on typical GNUish hosts, and 2**13 on MSVC. To be portable
+ to MSVC through at least version 10.0, A should be an integer
+ constant, as MSVC does not support expressions such as 1 << 3.
+ To be portable to Sun C 5.11, do not align auto variables to
+ anything stricter than their default alignment.
+
+ The following C23 requirements are not supported here:
+
+ - If A is zero, alignas has no effect.
+ - alignas can be used multiple times; the strictest one wins.
+ - alignas (TYPE) is equivalent to alignas (alignof (TYPE)).
+
+ */
+# if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112
+# if defined __cplusplus && (201103 <= __cplusplus || defined _MSC_VER)
+# define _Alignas(a) alignas (a)
+# elif (!defined __attribute__ \
+ && ((defined __APPLE__ && defined __MACH__ \
+ ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
+ : __GNUC__ && !defined __ibmxl__) \
+ || (4 <= __clang_major__) \
+ || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \
+ || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__))
+# define _Alignas(a) __attribute__ ((__aligned__ (a)))
+# elif 1300 <= _MSC_VER
+# define _Alignas(a) __declspec (align (a))
+# endif
+# endif
+# if !HAVE_STDALIGN_H
+# if ((defined _Alignas \
+ && !(defined __cplusplus \
+ && (201103 <= __cplusplus || defined _MSC_VER))) \
+ || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__))
+# define alignas _Alignas
+# endif
+# endif
+
+# if _GL_STDALIGN_NEEDS_STDDEF
+# include <stddef.h>
+# endif
+#endif])
+])
+
+AC_DEFUN([gl_STDALIGN_H],
+[
+ AC_REQUIRE([gl_ALIGNASOF])
+ if test "$gl_cv_header_working_stdalign_h" = no; then
+ GL_GENERATE_STDALIGN_H=true
+ else
GL_GENERATE_STDALIGN_H=false
+ fi
+
+ gl_CHECK_NEXT_HEADERS([stdalign.h])
+ if test $ac_cv_header_stdalign_h = yes; then
+ HAVE_STDALIGN_H=1
else
- GL_GENERATE_STDALIGN_H=true
+ HAVE_STDALIGN_H=0
fi
+ AC_SUBST([HAVE_STDALIGN_H])
])
diff --git a/gl/m4/stdarg.m4 b/gl/m4/stdarg.m4
index eafa86cb..94787ccc 100644
--- a/gl/m4/stdarg.m4
+++ b/gl/m4/stdarg.m4
@@ -1,5 +1,5 @@
# stdarg.m4 serial 8
-dnl Copyright (C) 2006, 2008-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2008-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/stdbool.m4 b/gl/m4/stdbool.m4
deleted file mode 100644
index 3e6c4005..00000000
--- a/gl/m4/stdbool.m4
+++ /dev/null
@@ -1,117 +0,0 @@
-# Check for stdbool.h that conforms to C99.
-
-dnl Copyright (C) 2002-2006, 2009-2022 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-#serial 9
-
-# Prepare for substituting <stdbool.h> if it is not supported.
-
-AC_DEFUN([gl_STDBOOL_H],
-[
- AC_REQUIRE([AC_CHECK_HEADER_STDBOOL])
- AC_REQUIRE([AC_CANONICAL_HOST])
-
- dnl On some platforms, <stdbool.h> does not exist or does not conform to C99.
- dnl On Solaris 10 with CC=cc CXX=CC, <stdbool.h> exists but is not usable
- dnl in C++ mode (and no <cstdbool> exists). In this case, we use our
- dnl replacement, also in C mode (for binary compatibility between C and C++).
- if test "$ac_cv_header_stdbool_h" = yes; then
- case "$host_os" in
- solaris*)
- if test -z "$GCC"; then
- GL_GENERATE_STDBOOL_H=true
- else
- GL_GENERATE_STDBOOL_H=false
- fi
- ;;
- *)
- GL_GENERATE_STDBOOL_H=false
- ;;
- esac
- else
- GL_GENERATE_STDBOOL_H=true
- fi
-
- if test "$ac_cv_type__Bool" = yes; then
- HAVE__BOOL=1
- else
- HAVE__BOOL=0
- fi
- AC_SUBST([HAVE__BOOL])
-])
-
-# This version of the macro is needed in autoconf <= 2.68.
-
-AC_DEFUN([AC_CHECK_HEADER_STDBOOL],
- [AC_CACHE_CHECK([for stdbool.h that conforms to C99],
- [ac_cv_header_stdbool_h],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[
- #include <stdbool.h>
-
- #ifdef __cplusplus
- typedef bool Bool;
- #else
- typedef _Bool Bool;
- #ifndef bool
- "error: bool is not defined"
- #endif
- #ifndef false
- "error: false is not defined"
- #endif
- #if false
- "error: false is not 0"
- #endif
- #ifndef true
- "error: true is not defined"
- #endif
- #if true != 1
- "error: true is not 1"
- #endif
- #endif
-
- #ifndef __bool_true_false_are_defined
- "error: __bool_true_false_are_defined is not defined"
- #endif
-
- struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s;
-
- char a[true == 1 ? 1 : -1];
- char b[false == 0 ? 1 : -1];
- char c[__bool_true_false_are_defined == 1 ? 1 : -1];
- char d[(bool) 0.5 == true ? 1 : -1];
- /* See body of main program for 'e'. */
- char f[(Bool) 0.0 == false ? 1 : -1];
- char g[true];
- char h[sizeof (Bool)];
- char i[sizeof s.t];
- enum { j = false, k = true, l = false * true, m = true * 256 };
- /* The following fails for
- HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
- Bool n[m];
- char o[sizeof n == m * sizeof n[0] ? 1 : -1];
- char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
- /* Catch a bug in an HP-UX C compiler. See
- https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
- https://lists.gnu.org/r/bug-coreutils/2005-11/msg00161.html
- */
- Bool q = true;
- Bool *pq = &q;
- bool *qq = &q;
- ]],
- [[
- bool e = &s;
- *pq |= q; *pq |= ! q;
- *qq |= q; *qq |= ! q;
- /* Refer to every declared value, to avoid compiler optimizations. */
- return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
- + !m + !n + !o + !p + !q + !pq + !qq);
- ]])],
- [ac_cv_header_stdbool_h=yes],
- [ac_cv_header_stdbool_h=no])])
- AC_CHECK_TYPES([_Bool])
-])
diff --git a/gl/m4/stddef_h.m4 b/gl/m4/stddef_h.m4
index abfd2030..aa012219 100644
--- a/gl/m4/stddef_h.m4
+++ b/gl/m4/stddef_h.m4
@@ -1,5 +1,5 @@
-# stddef_h.m4 serial 12
-dnl Copyright (C) 2009-2022 Free Software Foundation, Inc.
+# stddef_h.m4 serial 14
+dnl Copyright (C) 2009-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -22,7 +22,14 @@ AC_DEFUN_ONCE([gl_STDDEF_H],
[gl_cv_type_max_align_t],
[AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
- [[#include <stddef.h>
+ [[/* On FreeBSD 12.0/x86, max_align_t defined by <stddef.h> has
+ the correct alignment with the default (wrong) definition of
+ _Alignof, but a wrong alignment as soon as we activate an
+ ISO C compliant _Alignof definition. */
+ #if ((defined __GNUC__ && 4 <= __GNUC__) || defined __clang__) && !defined __cplusplus
+ #define _Alignof(type) __builtin_offsetof (struct { char __a; type __b; }, __b)
+ #endif
+ #include <stddef.h>
unsigned int s = sizeof (max_align_t);
#if defined __GNUC__ || defined __clang__ || defined __IBM__ALIGNOF__
int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1];
@@ -61,6 +68,21 @@ AC_DEFUN_ONCE([gl_STDDEF_H],
GL_GENERATE_STDDEF_H=true
fi
+ AC_CACHE_CHECK([for unreachable],
+ [gl_cv_func_unreachable],
+ [AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <stddef.h>
+ ]],
+ [[unreachable ();
+ ]])],
+ [gl_cv_func_unreachable=yes],
+ [gl_cv_func_unreachable=no])
+ ])
+ if test $gl_cv_func_unreachable = no; then
+ GL_GENERATE_STDDEF_H=true
+ fi
+
if $GL_GENERATE_STDDEF_H; then
gl_NEXT_HEADERS([stddef.h])
fi
diff --git a/gl/m4/stdint.m4 b/gl/m4/stdint.m4
index c3f08942..d6961b09 100644
--- a/gl/m4/stdint.m4
+++ b/gl/m4/stdint.m4
@@ -1,5 +1,5 @@
# stdint.m4 serial 61
-dnl Copyright (C) 2001-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/stdint_h.m4 b/gl/m4/stdint_h.m4
index b8684b61..70349f6c 100644
--- a/gl/m4/stdint_h.m4
+++ b/gl/m4/stdint_h.m4
@@ -1,5 +1,5 @@
# stdint_h.m4 serial 9
-dnl Copyright (C) 1997-2004, 2006, 2008-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 1997-2004, 2006, 2008-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/stdio_h.m4 b/gl/m4/stdio_h.m4
index 42e96071..dbfa0d5d 100644
--- a/gl/m4/stdio_h.m4
+++ b/gl/m4/stdio_h.m4
@@ -1,12 +1,22 @@
-# stdio_h.m4 serial 59
-dnl Copyright (C) 2007-2022 Free Software Foundation, Inc.
+# stdio_h.m4 serial 63
+dnl Copyright (C) 2007-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
-AC_DEFUN_ONCE([gl_STDIO_H],
+AC_DEFUN([gl_STDIO_H_EARLY],
[
- AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+ dnl Defining __USE_MINGW_ANSI_STDIO to 1 must be done early, because
+ dnl the results of several configure tests depend on it: The tests
+ dnl - checking whether snprintf returns a byte count as in C99...
+ dnl - checking whether snprintf truncates the result as in C99...
+ dnl - checking whether printf supports the 'F' directive...
+ dnl - checking whether printf supports the grouping flag...
+ dnl - checking whether printf supports the zero flag correctly...
+ dnl - checking whether printf supports infinite 'double' arguments...
+ dnl - checking whether printf supports large precisions...
+ dnl report 'yes' if __USE_MINGW_ANSI_STDIO is 1 but 'no' if
+ dnl __USE_MINGW_ANSI_STDIO is not set.
AH_VERBATIM([MINGW_ANSI_STDIO],
[/* Use GNU style printf and scanf. */
#ifndef __USE_MINGW_ANSI_STDIO
@@ -14,6 +24,11 @@ AC_DEFUN_ONCE([gl_STDIO_H],
#endif
])
AC_DEFINE([__USE_MINGW_ANSI_STDIO])
+])
+
+AC_DEFUN_ONCE([gl_STDIO_H],
+[
+ AC_REQUIRE([gl_STDIO_H_DEFAULTS])
gl_NEXT_HEADERS([stdio.h])
dnl Determine whether __USE_MINGW_ANSI_STDIO makes printf and
@@ -40,6 +55,9 @@ AC_DEFUN_ONCE([gl_STDIO_H],
attribute "__gnu_printf__" instead of "__printf__"])
fi
+ dnl For defining _PRINTF_NAN_LEN_MAX.
+ gl_MUSL_LIBC
+
dnl This ifdef is an optimization, to avoid performing a configure check whose
dnl result is not used. But it does not make the test of
dnl GNULIB_STDIO_H_NONBLOCKING or GNULIB_NONBLOCKING redundant.
@@ -82,6 +100,16 @@ AC_DEFUN_ONCE([gl_STDIO_H],
if test $ac_cv_have_decl_fcloseall = no; then
HAVE_DECL_FCLOSEALL=0
fi
+
+ AC_CHECK_DECLS_ONCE([getw])
+ if test $ac_cv_have_decl_getw = no; then
+ HAVE_DECL_GETW=0
+ fi
+
+ AC_CHECK_DECLS_ONCE([putw])
+ if test $ac_cv_have_decl_putw = no; then
+ HAVE_DECL_PUTW=0
+ fi
])
# gl_STDIO_MODULE_INDICATOR([modulename])
@@ -178,7 +206,9 @@ AC_DEFUN([gl_STDIO_H_DEFAULTS],
HAVE_DECL_FTELLO=1; AC_SUBST([HAVE_DECL_FTELLO])
HAVE_DECL_GETDELIM=1; AC_SUBST([HAVE_DECL_GETDELIM])
HAVE_DECL_GETLINE=1; AC_SUBST([HAVE_DECL_GETLINE])
+ HAVE_DECL_GETW=1; AC_SUBST([HAVE_DECL_GETW])
HAVE_DECL_OBSTACK_PRINTF=1; AC_SUBST([HAVE_DECL_OBSTACK_PRINTF])
+ HAVE_DECL_PUTW=1; AC_SUBST([HAVE_DECL_PUTW])
HAVE_DECL_SNPRINTF=1; AC_SUBST([HAVE_DECL_SNPRINTF])
HAVE_DECL_VSNPRINTF=1; AC_SUBST([HAVE_DECL_VSNPRINTF])
HAVE_DPRINTF=1; AC_SUBST([HAVE_DPRINTF])
diff --git a/gl/m4/stdlib_h.m4 b/gl/m4/stdlib_h.m4
index 9e209697..f47c1eb3 100644
--- a/gl/m4/stdlib_h.m4
+++ b/gl/m4/stdlib_h.m4
@@ -1,5 +1,5 @@
-# stdlib_h.m4 serial 66
-dnl Copyright (C) 2007-2022 Free Software Foundation, Inc.
+# stdlib_h.m4 serial 75
+dnl Copyright (C) 2007-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -23,15 +23,58 @@ AC_DEFUN_ONCE([gl_STDLIB_H],
# include <random.h>
#endif
]], [_Exit aligned_alloc atoll canonicalize_file_name free
- getloadavg getsubopt grantpt
- initstate initstate_r mbtowc mkdtemp mkostemp mkostemps mkstemp mkstemps
- posix_memalign posix_openpt ptsname ptsname_r qsort_r
+ getloadavg getprogname getsubopt grantpt
+ initstate initstate_r mbstowcs mbtowc mkdtemp mkostemp mkostemps mkstemp
+ mkstemps posix_memalign posix_openpt ptsname ptsname_r qsort_r
random random_r reallocarray realpath rpmatch secure_getenv setenv
setstate setstate_r srandom srandom_r
strtod strtol strtold strtoll strtoul strtoull unlockpt unsetenv])
AC_REQUIRE([AC_C_RESTRICT])
+ dnl Test whether MB_CUR_MAX needs to be overridden.
+ dnl On Solaris 10, in UTF-8 locales, its value is 3 but needs to be 4.
+ dnl Fortunately, we can do this because on this platform MB_LEN_MAX is 5.
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([gt_LOCALE_FR_UTF8])
+ AC_CACHE_CHECK([whether MB_CUR_MAX is correct],
+ [gl_cv_macro_MB_CUR_MAX_good],
+ [
+ dnl Initial guess, used when cross-compiling or when no suitable locale
+ dnl is present.
+changequote(,)dnl
+ case "$host_os" in
+ # Guess no on Solaris.
+ solaris*) gl_cv_macro_MB_CUR_MAX_good="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_macro_MB_CUR_MAX_good="guessing yes" ;;
+ esac
+changequote([,])dnl
+ if test $LOCALE_FR_UTF8 != none; then
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+#include <locale.h>
+#include <stdlib.h>
+int main ()
+{
+ int result = 0;
+ if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+ {
+ if (MB_CUR_MAX < 4)
+ result |= 1;
+ }
+ return result;
+}]])],
+ [gl_cv_macro_MB_CUR_MAX_good=yes],
+ [gl_cv_macro_MB_CUR_MAX_good=no],
+ [:])
+ fi
+ ])
+ case "$gl_cv_macro_MB_CUR_MAX_good" in
+ *yes) ;;
+ *) REPLACE_MB_CUR_MAX=1 ;;
+ esac
+
AC_CHECK_DECLS_ONCE([ecvt])
if test $ac_cv_have_decl_ecvt = no; then
HAVE_DECL_ECVT=0
@@ -73,10 +116,12 @@ AC_DEFUN([gl_STDLIB_H_REQUIRE_DEFAULTS],
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CANONICALIZE_FILE_NAME])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FREE_POSIX])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETLOADAVG])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETPROGNAME])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETSUBOPT])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GRANTPT])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MALLOC_GNU])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MALLOC_POSIX])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSTOWCS])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBTOWC])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKDTEMP])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKOSTEMP])
@@ -130,6 +175,8 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
HAVE_DECL_FCVT=1; AC_SUBST([HAVE_DECL_FCVT])
HAVE_DECL_GCVT=1; AC_SUBST([HAVE_DECL_GCVT])
HAVE_DECL_GETLOADAVG=1; AC_SUBST([HAVE_DECL_GETLOADAVG])
+ HAVE_DECL_PROGRAM_INVOCATION_NAME=1; AC_SUBST([HAVE_DECL_PROGRAM_INVOCATION_NAME])
+ HAVE_GETPROGNAME=1; AC_SUBST([HAVE_GETPROGNAME])
HAVE_GETSUBOPT=1; AC_SUBST([HAVE_GETSUBOPT])
HAVE_GRANTPT=1; AC_SUBST([HAVE_GRANTPT])
HAVE_INITSTATE=1; AC_SUBST([HAVE_INITSTATE])
@@ -166,17 +213,26 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
HAVE_SYS_LOADAVG_H=0; AC_SUBST([HAVE_SYS_LOADAVG_H])
HAVE_UNLOCKPT=1; AC_SUBST([HAVE_UNLOCKPT])
HAVE_DECL_UNSETENV=1; AC_SUBST([HAVE_DECL_UNSETENV])
+ REPLACE__EXIT=0; AC_SUBST([REPLACE__EXIT])
REPLACE_ALIGNED_ALLOC=0; AC_SUBST([REPLACE_ALIGNED_ALLOC])
REPLACE_CALLOC_FOR_CALLOC_GNU=0; AC_SUBST([REPLACE_CALLOC_FOR_CALLOC_GNU])
REPLACE_CALLOC_FOR_CALLOC_POSIX=0; AC_SUBST([REPLACE_CALLOC_FOR_CALLOC_POSIX])
REPLACE_CANONICALIZE_FILE_NAME=0; AC_SUBST([REPLACE_CANONICALIZE_FILE_NAME])
REPLACE_FREE=0; AC_SUBST([REPLACE_FREE])
+ REPLACE_GETLOADAVG=0; AC_SUBST([REPLACE_GETLOADAVG])
+ REPLACE_GETPROGNAME=0; AC_SUBST([REPLACE_GETPROGNAME])
+ REPLACE_GETSUBOPT=0; AC_SUBST([REPLACE_GETSUBOPT])
REPLACE_INITSTATE=0; AC_SUBST([REPLACE_INITSTATE])
REPLACE_MALLOC_FOR_MALLOC_GNU=0; AC_SUBST([REPLACE_MALLOC_FOR_MALLOC_GNU])
REPLACE_MALLOC_FOR_MALLOC_POSIX=0; AC_SUBST([REPLACE_MALLOC_FOR_MALLOC_POSIX])
+ REPLACE_MB_CUR_MAX=0; AC_SUBST([REPLACE_MB_CUR_MAX])
+ REPLACE_MBSTOWCS=0; AC_SUBST([REPLACE_MBSTOWCS])
REPLACE_MBTOWC=0; AC_SUBST([REPLACE_MBTOWC])
+ REPLACE_MKOSTEMP=0; AC_SUBST([REPLACE_MKOSTEMP])
+ REPLACE_MKOSTEMPS=0; AC_SUBST([REPLACE_MKOSTEMPS])
REPLACE_MKSTEMP=0; AC_SUBST([REPLACE_MKSTEMP])
REPLACE_POSIX_MEMALIGN=0; AC_SUBST([REPLACE_POSIX_MEMALIGN])
+ REPLACE_POSIX_OPENPT=0; AC_SUBST([REPLACE_POSIX_OPENPT])
REPLACE_PTSNAME=0; AC_SUBST([REPLACE_PTSNAME])
REPLACE_PTSNAME_R=0; AC_SUBST([REPLACE_PTSNAME_R])
REPLACE_PUTENV=0; AC_SUBST([REPLACE_PUTENV])
diff --git a/gl/m4/stpcpy.m4 b/gl/m4/stpcpy.m4
index 241e68c8..f3acbee7 100644
--- a/gl/m4/stpcpy.m4
+++ b/gl/m4/stpcpy.m4
@@ -1,5 +1,5 @@
-# stpcpy.m4 serial 9
-dnl Copyright (C) 2002, 2007, 2009-2022 Free Software Foundation, Inc.
+# stpcpy.m4 serial 11
+dnl Copyright (C) 2002, 2007, 2009-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -13,9 +13,12 @@ AC_DEFUN([gl_FUNC_STPCPY],
AC_REQUIRE([AC_C_RESTRICT])
AC_REQUIRE([gl_STRING_H_DEFAULTS])
- AC_CHECK_FUNCS([stpcpy])
+ gl_CHECK_FUNCS_ANDROID([stpcpy], [[#include <string.h>]])
if test $ac_cv_func_stpcpy = no; then
HAVE_STPCPY=0
+ case "$gl_cv_onwards_func_stpcpy" in
+ future*) REPLACE_STPCPY=1 ;;
+ esac
fi
])
diff --git a/gl/m4/strcase.m4 b/gl/m4/strcase.m4
index d1ffaba3..3cf740d2 100644
--- a/gl/m4/strcase.m4
+++ b/gl/m4/strcase.m4
@@ -1,5 +1,5 @@
# strcase.m4 serial 12
-dnl Copyright (C) 2002, 2005-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2005-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/strcasestr.m4 b/gl/m4/strcasestr.m4
index 6344b7e5..971e0b23 100644
--- a/gl/m4/strcasestr.m4
+++ b/gl/m4/strcasestr.m4
@@ -1,5 +1,5 @@
# strcasestr.m4 serial 28
-dnl Copyright (C) 2005, 2007-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2007-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/strchrnul.m4 b/gl/m4/strchrnul.m4
index 630699b8..9b9ab11a 100644
--- a/gl/m4/strchrnul.m4
+++ b/gl/m4/strchrnul.m4
@@ -1,5 +1,5 @@
-# strchrnul.m4 serial 10
-dnl Copyright (C) 2003, 2007, 2009-2022 Free Software Foundation, Inc.
+# strchrnul.m4 serial 12
+dnl Copyright (C) 2003, 2007, 2009-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -10,9 +10,12 @@ AC_DEFUN([gl_FUNC_STRCHRNUL],
AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
AC_REQUIRE([gl_STRING_H_DEFAULTS])
- AC_CHECK_FUNCS([strchrnul])
+ gl_CHECK_FUNCS_ANDROID([strchrnul], [[#include <string.h>]])
if test $ac_cv_func_strchrnul = no; then
HAVE_STRCHRNUL=0
+ case "$gl_cv_onwards_func_strchrnul" in
+ future*) REPLACE_STRCHRNUL=1 ;;
+ esac
else
AC_CACHE_CHECK([whether strchrnul works],
[gl_cv_func_strchrnul_works],
diff --git a/gl/m4/strdup.m4 b/gl/m4/strdup.m4
index da8899d1..ecfcdd01 100644
--- a/gl/m4/strdup.m4
+++ b/gl/m4/strdup.m4
@@ -1,6 +1,6 @@
# strdup.m4 serial 15
-dnl Copyright (C) 2002-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2023 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/gl/m4/strerror.m4 b/gl/m4/strerror.m4
index 4716649b..9f1dddd5 100644
--- a/gl/m4/strerror.m4
+++ b/gl/m4/strerror.m4
@@ -1,5 +1,5 @@
-# strerror.m4 serial 23
-dnl Copyright (C) 2002, 2007-2022 Free Software Foundation, Inc.
+# strerror.m4 serial 24
+dnl Copyright (C) 2002, 2007-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -24,12 +24,12 @@ AC_DEFUN([gl_FUNC_STRERROR],
[gl_cv_func_working_strerror=yes],
[gl_cv_func_working_strerror=no],
[case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu* | gnu*) gl_cv_func_working_strerror="guessing yes" ;;
- # Guess yes on musl systems.
- *-musl*) gl_cv_func_working_strerror="guessing yes" ;;
- # If we don't know, obey --enable-cross-guesses.
- *) gl_cv_func_working_strerror="$gl_cross_guess_normal" ;;
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_working_strerror="guessing yes" ;;
+ # Guess yes on musl systems.
+ *-musl* | midipix*) gl_cv_func_working_strerror="guessing yes" ;;
+ # If we don't know, obey --enable-cross-guesses.
+ *) gl_cv_func_working_strerror="$gl_cross_guess_normal" ;;
esac
])
])
@@ -80,14 +80,14 @@ AC_DEFUN([gl_FUNC_STRERROR_0],
[gl_cv_func_strerror_0_works=yes],
[gl_cv_func_strerror_0_works=no],
[case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu* | gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
- # Guess yes on musl systems.
- *-musl*) gl_cv_func_strerror_0_works="guessing yes" ;;
- # Guess yes on native Windows.
- mingw*) gl_cv_func_strerror_0_works="guessing yes" ;;
- # If we don't know, obey --enable-cross-guesses.
- *) gl_cv_func_strerror_0_works="$gl_cross_guess_normal" ;;
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
+ # Guess yes on musl systems.
+ *-musl* | midipix*) gl_cv_func_strerror_0_works="guessing yes" ;;
+ # Guess yes on native Windows.
+ mingw*) gl_cv_func_strerror_0_works="guessing yes" ;;
+ # If we don't know, obey --enable-cross-guesses.
+ *) gl_cv_func_strerror_0_works="$gl_cross_guess_normal" ;;
esac
])
])
diff --git a/gl/m4/string_h.m4 b/gl/m4/string_h.m4
index 9e09b96e..7f51391c 100644
--- a/gl/m4/string_h.m4
+++ b/gl/m4/string_h.m4
@@ -1,11 +1,11 @@
# Configure a GNU-like replacement for <string.h>.
-# Copyright (C) 2007-2022 Free Software Foundation, Inc.
+# Copyright (C) 2007-2023 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 34
+# serial 37
# Written by Paul Eggert.
@@ -21,7 +21,8 @@ AC_DEFUN_ONCE([gl_STRING_H],
dnl guaranteed by C89.
gl_WARN_ON_USE_PREPARE([[#include <string.h>
]],
- [ffsl ffsll memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul
+ [explicit_bzero ffsl ffsll memmem mempcpy memrchr memset_explicit
+ rawmemchr stpcpy stpncpy strchrnul
strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r
strerror_r strerrorname_np sigabbrev_np sigdescr_np strsignal strverscmp])
@@ -54,6 +55,7 @@ AC_DEFUN([gl_STRING_H_REQUIRE_DEFAULTS],
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MEMMEM])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MEMPCPY])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MEMRCHR])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MEMSET_EXPLICIT])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RAWMEMCHR])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STPCPY])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STPNCPY])
@@ -107,6 +109,7 @@ AC_DEFUN([gl_STRING_H_DEFAULTS],
HAVE_FFSLL=1; AC_SUBST([HAVE_FFSLL])
HAVE_DECL_MEMMEM=1; AC_SUBST([HAVE_DECL_MEMMEM])
HAVE_MEMPCPY=1; AC_SUBST([HAVE_MEMPCPY])
+ HAVE_MEMSET_EXPLICIT=1; AC_SUBST([HAVE_MEMSET_EXPLICIT])
HAVE_DECL_MEMRCHR=1; AC_SUBST([HAVE_DECL_MEMRCHR])
HAVE_RAWMEMCHR=1; AC_SUBST([HAVE_RAWMEMCHR])
HAVE_STPCPY=1; AC_SUBST([HAVE_STPCPY])
@@ -128,6 +131,8 @@ AC_DEFUN([gl_STRING_H_DEFAULTS],
REPLACE_FFSLL=0; AC_SUBST([REPLACE_FFSLL])
REPLACE_MEMCHR=0; AC_SUBST([REPLACE_MEMCHR])
REPLACE_MEMMEM=0; AC_SUBST([REPLACE_MEMMEM])
+ REPLACE_MEMPCPY=0; AC_SUBST([REPLACE_MEMPCPY])
+ REPLACE_STPCPY=0; AC_SUBST([REPLACE_STPCPY])
REPLACE_STPNCPY=0; AC_SUBST([REPLACE_STPNCPY])
REPLACE_STRCHRNUL=0; AC_SUBST([REPLACE_STRCHRNUL])
REPLACE_STRDUP=0; AC_SUBST([REPLACE_STRDUP])
diff --git a/gl/m4/strings_h.m4 b/gl/m4/strings_h.m4
index 6965b7c1..4c41221b 100644
--- a/gl/m4/strings_h.m4
+++ b/gl/m4/strings_h.m4
@@ -1,7 +1,7 @@
# Configure a replacement for <strings.h>.
# serial 9
-# Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2009-2023 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/gl/m4/strndup.m4 b/gl/m4/strndup.m4
index a239d45a..9ec9715c 100644
--- a/gl/m4/strndup.m4
+++ b/gl/m4/strndup.m4
@@ -1,5 +1,5 @@
# strndup.m4 serial 23
-dnl Copyright (C) 2002-2003, 2005-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2003, 2005-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/strnlen.m4 b/gl/m4/strnlen.m4
index 0934274d..d2cac59b 100644
--- a/gl/m4/strnlen.m4
+++ b/gl/m4/strnlen.m4
@@ -1,5 +1,5 @@
# strnlen.m4 serial 14
-dnl Copyright (C) 2002-2003, 2005-2007, 2009-2022 Free Software Foundation,
+dnl Copyright (C) 2002-2003, 2005-2007, 2009-2023 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/gl/m4/strsep.m4 b/gl/m4/strsep.m4
index 602f96ab..e0da09a3 100644
--- a/gl/m4/strsep.m4
+++ b/gl/m4/strsep.m4
@@ -1,5 +1,5 @@
# strsep.m4 serial 11
-dnl Copyright (C) 2002-2004, 2007, 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2004, 2007, 2009-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/sys_file_h.m4 b/gl/m4/sys_file_h.m4
index 61bd733e..60d4e305 100644
--- a/gl/m4/sys_file_h.m4
+++ b/gl/m4/sys_file_h.m4
@@ -1,7 +1,7 @@
# Configure a replacement for <sys/file.h>.
# serial 9
-# Copyright (C) 2008-2022 Free Software Foundation, Inc.
+# Copyright (C) 2008-2023 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/gl/m4/sys_ioctl_h.m4 b/gl/m4/sys_ioctl_h.m4
index be653643..80f0510e 100644
--- a/gl/m4/sys_ioctl_h.m4
+++ b/gl/m4/sys_ioctl_h.m4
@@ -1,5 +1,5 @@
# sys_ioctl_h.m4 serial 15
-dnl Copyright (C) 2008-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/sys_random_h.m4 b/gl/m4/sys_random_h.m4
index a5ba85c6..01d5feeb 100644
--- a/gl/m4/sys_random_h.m4
+++ b/gl/m4/sys_random_h.m4
@@ -1,5 +1,5 @@
# sys_random_h.m4 serial 8
-dnl Copyright (C) 2020-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2020-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/sys_select_h.m4 b/gl/m4/sys_select_h.m4
index 2743cd17..4ec5ed7a 100644
--- a/gl/m4/sys_select_h.m4
+++ b/gl/m4/sys_select_h.m4
@@ -1,5 +1,5 @@
# sys_select_h.m4 serial 23
-dnl Copyright (C) 2006-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/sys_socket_h.m4 b/gl/m4/sys_socket_h.m4
index ba3ae68e..98a10416 100644
--- a/gl/m4/sys_socket_h.m4
+++ b/gl/m4/sys_socket_h.m4
@@ -1,5 +1,5 @@
# sys_socket_h.m4 serial 29
-dnl Copyright (C) 2005-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/sys_stat_h.m4 b/gl/m4/sys_stat_h.m4
index 2adbfdee..ca57398a 100644
--- a/gl/m4/sys_stat_h.m4
+++ b/gl/m4/sys_stat_h.m4
@@ -1,5 +1,5 @@
# sys_stat_h.m4 serial 42 -*- Autoconf -*-
-dnl Copyright (C) 2006-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/sys_time_h.m4 b/gl/m4/sys_time_h.m4
index bc5e2b13..45a1f8b0 100644
--- a/gl/m4/sys_time_h.m4
+++ b/gl/m4/sys_time_h.m4
@@ -1,7 +1,7 @@
# Configure a replacement for <sys/time.h>.
# serial 12
-# Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2009-2023 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/gl/m4/sys_types_h.m4 b/gl/m4/sys_types_h.m4
index a5bef220..627671fb 100644
--- a/gl/m4/sys_types_h.m4
+++ b/gl/m4/sys_types_h.m4
@@ -1,5 +1,5 @@
# sys_types_h.m4 serial 13
-dnl Copyright (C) 2011-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/sys_uio_h.m4 b/gl/m4/sys_uio_h.m4
index 36f55ead..93a65d26 100644
--- a/gl/m4/sys_uio_h.m4
+++ b/gl/m4/sys_uio_h.m4
@@ -1,5 +1,5 @@
# sys_uio_h.m4 serial 3
-dnl Copyright (C) 2011-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/sysexits.m4 b/gl/m4/sysexits.m4
index fe590b3a..5dfc193a 100644
--- a/gl/m4/sysexits.m4
+++ b/gl/m4/sysexits.m4
@@ -1,5 +1,5 @@
# sysexits.m4 serial 7
-dnl Copyright (C) 2003, 2005, 2007, 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2005, 2007, 2009-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/tempname.m4 b/gl/m4/tempname.m4
index 22ccec1f..abed7991 100644
--- a/gl/m4/tempname.m4
+++ b/gl/m4/tempname.m4
@@ -1,6 +1,6 @@
#serial 5
-# Copyright (C) 2006-2007, 2009-2022 Free Software Foundation, Inc.
+# Copyright (C) 2006-2007, 2009-2023 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/gl/m4/termios_h.m4 b/gl/m4/termios_h.m4
index 6c835388..4a690033 100644
--- a/gl/m4/termios_h.m4
+++ b/gl/m4/termios_h.m4
@@ -1,5 +1,5 @@
# termios_h.m4 serial 7
-dnl Copyright (C) 2010-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2010-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/threadlib.m4 b/gl/m4/threadlib.m4
index ecb4970a..1fc5777e 100644
--- a/gl/m4/threadlib.m4
+++ b/gl/m4/threadlib.m4
@@ -1,5 +1,5 @@
-# threadlib.m4 serial 32
-dnl Copyright (C) 2005-2022 Free Software Foundation, Inc.
+# threadlib.m4 serial 38
+dnl Copyright (C) 2005-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -85,10 +85,11 @@ AC_DEFUN([gl_WEAK_SYMBOLS],
AC_CACHE_CHECK([whether imported symbols can be declared weak],
[gl_cv_have_weak],
[case "$host_os" in
- cygwin*)
- dnl On Cygwin 3.2.0 with gcc 10.2, the test below would succeed, but
- dnl programs that use pthread_in_use() with weak symbol references
- dnl crash miserably at runtime.
+ cygwin* | mingw*)
+ dnl On Cygwin 3.2.0 with gcc 10.2, and likewise on mingw 10.0.0 with
+ dnl gcc 11.3, the test below would succeed, but programs that use
+ dnl pthread_in_use() with weak symbol references crash miserably at
+ dnl runtime.
gl_cv_have_weak="guessing no"
;;
*)
@@ -174,7 +175,7 @@ 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 Sets the variable SCHED_YIELD_LIB 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.
@@ -261,7 +262,9 @@ AC_DEFUN([gl_PTHREADLIB_BODY],
# On Solaris 10 or newer, this test is no longer needed, because
# libc contains the fully functional pthread functions.
case "$host_os" in
+changequote(,)dnl
solaris | solaris2.[1-9] | solaris2.[1-9].* | hpux*)
+changequote([,])dnl
AC_DEFINE([PTHREAD_IN_USE_DETECTION_HARD], [1],
[Define if the pthread_in_use() detection is hard.])
esac
@@ -297,13 +300,16 @@ AC_DEFUN([gl_PTHREADLIB_BODY],
[AC_LANG_PROGRAM(
[[#include <sched.h>]],
[[sched_yield ();]])],
- [LIB_SCHED_YIELD=
+ [SCHED_YIELD_LIB=
],
[dnl Solaris 7...10 has sched_yield in librt, not in libpthread or libc.
- AC_CHECK_LIB([rt], [sched_yield], [LIB_SCHED_YIELD=-lrt],
+ AC_CHECK_LIB([rt], [sched_yield], [SCHED_YIELD_LIB=-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_CHECK_LIB([posix4], [sched_yield], [SCHED_YIELD_LIB=-lposix4])])
])
+ AC_SUBST([SCHED_YIELD_LIB])
+ dnl For backward compatibility.
+ LIB_SCHED_YIELD="$SCHED_YIELD_LIB"
AC_SUBST([LIB_SCHED_YIELD])
gl_pthreadlib_body_done=done
@@ -349,7 +355,7 @@ AC_DEFUN([gl_STDTHREADLIB_BODY],
dnl on libpthread (for the symbol 'pthread_mutexattr_gettype').
dnl glibc >= 2.34, AIX >= 7.1, and Solaris >= 11.4 have thrd_create in
dnl libc.
- AC_CHECK_FUNCS([thrd_create])
+ gl_CHECK_FUNCS_ANDROID([thrd_create], [[#include <threads.h>]])
if test $ac_cv_func_thrd_create = yes; then
LIBSTDTHREAD=
else
@@ -362,7 +368,7 @@ AC_DEFUN([gl_STDTHREADLIB_BODY],
fi
else
dnl Libraries needed by thrd.c, mtx.c, cnd.c, tss.c.
- LIBSTDTHREAD="$LIBPMULTITHREAD $LIB_SCHED_YIELD"
+ LIBSTDTHREAD="$LIBPMULTITHREAD $SCHED_YIELD_LIB"
fi
;;
esac
@@ -433,10 +439,12 @@ AC_DEFUN([gl_THREADLIB_EARLY_BODY],
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=])
+ dnl gl_use_winpthreads_default defaults to 'no', because in mingw 10, like
+ dnl in mingw 5, the use of libwinpthread still makes test-pthread-tss crash.
+ m4_divert_text([DEFAULTS], [gl_use_winpthreads_default=no])
AC_ARG_ENABLE([threads],
-AS_HELP_STRING([--enable-threads={isoc|posix|isoc+posix|windows}], [specify multithreading API])m4_ifdef([gl_THREADLIB_DEFAULT_NO], [], [
-AS_HELP_STRING([--disable-threads], [build without multithread safety])]),
+AS_HELP_STRING([[--enable-threads={isoc|posix|isoc+posix|windows}]], [specify multithreading API])m4_ifdef([gl_THREADLIB_DEFAULT_NO], [], [
+AS_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"
@@ -599,7 +607,8 @@ dnl -------------------
dnl Sets the gl_THREADLIB default so that on mingw, a dependency to the
dnl libwinpthread DLL (mingw-w64 winpthreads library) is avoided.
dnl The user can still override it at installation time, by using the
-dnl configure option '--enable-threads'.
+dnl configure option '--enable-threads=posix'.
+dnl As of 2023, this is now the default.
AC_DEFUN([gl_AVOID_WINPTHREAD], [
m4_divert_text([INIT_PREPARE], [gl_use_winpthreads_default=no])
diff --git a/gl/m4/time_h.m4 b/gl/m4/time_h.m4
index 98d7b6e0..51d553a2 100644
--- a/gl/m4/time_h.m4
+++ b/gl/m4/time_h.m4
@@ -1,8 +1,8 @@
# Configure a more-standard replacement for <time.h>.
-# Copyright (C) 2000-2001, 2003-2007, 2009-2022 Free Software Foundation, Inc.
+# Copyright (C) 2000-2001, 2003-2007, 2009-2023 Free Software Foundation, Inc.
-# serial 19
+# serial 22
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -19,6 +19,12 @@ AC_DEFUN_ONCE([gl_TIME_H],
gl_NEXT_HEADERS([time.h])
AC_REQUIRE([gl_CHECK_TYPE_STRUCT_TIMESPEC])
+ 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 <time.h>
+ ]], [asctime_r ctime_r])
+
AC_REQUIRE([AC_C_RESTRICT])
AC_CACHE_CHECK([for TIME_UTC in <time.h>],
@@ -131,6 +137,7 @@ AC_DEFUN([gl_TIME_H_REQUIRE_DEFAULTS],
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_NANOSLEEP])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRFTIME])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRPTIME])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TIME])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TIMEGM])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TIMESPEC_GET])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TIMESPEC_GETRES])
@@ -163,7 +170,9 @@ AC_DEFUN([gl_TIME_H_DEFAULTS],
REPLACE_MKTIME=GNULIB_PORTCHECK; AC_SUBST([REPLACE_MKTIME])
REPLACE_NANOSLEEP=GNULIB_PORTCHECK; AC_SUBST([REPLACE_NANOSLEEP])
REPLACE_STRFTIME=GNULIB_PORTCHECK; AC_SUBST([REPLACE_STRFTIME])
+ REPLACE_TIME=0; AC_SUBST([REPLACE_TIME])
REPLACE_TIMEGM=GNULIB_PORTCHECK; AC_SUBST([REPLACE_TIMEGM])
+ REPLACE_TIMESPEC_GET=GNULIB_PORTCHECK; AC_SUBST([REPLACE_TIMESPEC_GET])
REPLACE_TZSET=GNULIB_PORTCHECK; AC_SUBST([REPLACE_TZSET])
dnl Hack so that the time module doesn't depend on the sys_time module.
diff --git a/gl/m4/timespec.m4 b/gl/m4/timespec.m4
index 6a1afef0..95f475f2 100644
--- a/gl/m4/timespec.m4
+++ b/gl/m4/timespec.m4
@@ -1,6 +1,6 @@
#serial 15
-# Copyright (C) 2000-2001, 2003-2007, 2009-2022 Free Software Foundation, Inc.
+# Copyright (C) 2000-2001, 2003-2007, 2009-2023 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/gl/m4/unistd-safer.m4 b/gl/m4/unistd-safer.m4
index 33158a48..ced03b01 100644
--- a/gl/m4/unistd-safer.m4
+++ b/gl/m4/unistd-safer.m4
@@ -1,5 +1,5 @@
#serial 9
-dnl Copyright (C) 2002, 2005-2006, 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2005-2006, 2009-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/unistd_h.m4 b/gl/m4/unistd_h.m4
index 4c66ccc0..1c961581 100644
--- a/gl/m4/unistd_h.m4
+++ b/gl/m4/unistd_h.m4
@@ -1,5 +1,5 @@
-# unistd_h.m4 serial 90
-dnl Copyright (C) 2006-2022 Free Software Foundation, Inc.
+# unistd_h.m4 serial 94
+dnl Copyright (C) 2006-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -225,6 +225,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
REPLACE_COPY_FILE_RANGE=0; AC_SUBST([REPLACE_COPY_FILE_RANGE])
REPLACE_DUP=0; AC_SUBST([REPLACE_DUP])
REPLACE_DUP2=0; AC_SUBST([REPLACE_DUP2])
+ REPLACE_DUP3=0; AC_SUBST([REPLACE_DUP3])
REPLACE_EXECL=0; AC_SUBST([REPLACE_EXECL])
REPLACE_EXECLE=0; AC_SUBST([REPLACE_EXECLE])
REPLACE_EXECLP=0; AC_SUBST([REPLACE_EXECLP])
@@ -234,10 +235,12 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
REPLACE_EXECVPE=0; AC_SUBST([REPLACE_EXECVPE])
REPLACE_FACCESSAT=0; AC_SUBST([REPLACE_FACCESSAT])
REPLACE_FCHOWNAT=0; AC_SUBST([REPLACE_FCHOWNAT])
+ REPLACE_FDATASYNC=0; AC_SUBST([REPLACE_FDATASYNC])
REPLACE_FTRUNCATE=0; AC_SUBST([REPLACE_FTRUNCATE])
REPLACE_GETCWD=0; AC_SUBST([REPLACE_GETCWD])
REPLACE_GETDOMAINNAME=0; AC_SUBST([REPLACE_GETDOMAINNAME])
REPLACE_GETDTABLESIZE=0; AC_SUBST([REPLACE_GETDTABLESIZE])
+ REPLACE_GETENTROPY=0; AC_SUBST([REPLACE_GETENTROPY])
REPLACE_GETLOGIN_R=0; AC_SUBST([REPLACE_GETLOGIN_R])
REPLACE_GETGROUPS=0; AC_SUBST([REPLACE_GETGROUPS])
REPLACE_GETPAGESIZE=0; AC_SUBST([REPLACE_GETPAGESIZE])
@@ -248,12 +251,14 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
REPLACE_LINK=0; AC_SUBST([REPLACE_LINK])
REPLACE_LINKAT=0; AC_SUBST([REPLACE_LINKAT])
REPLACE_LSEEK=0; AC_SUBST([REPLACE_LSEEK])
+ REPLACE_PIPE2=0; AC_SUBST([REPLACE_PIPE2])
REPLACE_PREAD=0; AC_SUBST([REPLACE_PREAD])
REPLACE_PWRITE=0; AC_SUBST([REPLACE_PWRITE])
REPLACE_READ=0; AC_SUBST([REPLACE_READ])
REPLACE_READLINK=0; AC_SUBST([REPLACE_READLINK])
REPLACE_READLINKAT=0; AC_SUBST([REPLACE_READLINKAT])
REPLACE_RMDIR=0; AC_SUBST([REPLACE_RMDIR])
+ REPLACE_SETHOSTNAME=0; AC_SUBST([REPLACE_SETHOSTNAME])
REPLACE_SLEEP=0; AC_SUBST([REPLACE_SLEEP])
REPLACE_SYMLINK=0; AC_SUBST([REPLACE_SYMLINK])
REPLACE_SYMLINKAT=0; AC_SUBST([REPLACE_SYMLINKAT])
diff --git a/gl/m4/unlink.m4 b/gl/m4/unlink.m4
index e25b5679..1fecaac5 100644
--- a/gl/m4/unlink.m4
+++ b/gl/m4/unlink.m4
@@ -1,5 +1,5 @@
-# unlink.m4 serial 15
-dnl Copyright (C) 2009-2022 Free Software Foundation, Inc.
+# unlink.m4 serial 16
+dnl Copyright (C) 2009-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -45,6 +45,8 @@ AC_DEFUN([gl_FUNC_UNLINK],
[case "$host_os" in
# Guess yes on Linux systems.
linux-* | linux) gl_cv_func_unlink_honors_slashes="guessing yes" ;;
+ # Guess yes on systems that emulate the Linux system calls.
+ midipix*) gl_cv_func_unlink_honors_slashes="guessing yes" ;;
# Guess yes on glibc systems.
*-gnu*) gl_cv_func_unlink_honors_slashes="guessing yes" ;;
# Guess no on native Windows.
diff --git a/gl/m4/unlinkat.m4 b/gl/m4/unlinkat.m4
index 55af07d2..55cdb2a0 100644
--- a/gl/m4/unlinkat.m4
+++ b/gl/m4/unlinkat.m4
@@ -1,5 +1,5 @@
# unlinkat.m4 serial 2
-dnl Copyright (C) 2004-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2004-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/utime.m4 b/gl/m4/utime.m4
index d73e8aaf..4c0443ae 100644
--- a/gl/m4/utime.m4
+++ b/gl/m4/utime.m4
@@ -1,5 +1,5 @@
# utime.m4 serial 4
-dnl Copyright (C) 2017-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2017-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/utime_h.m4 b/gl/m4/utime_h.m4
index 739ef118..6b6403e2 100644
--- a/gl/m4/utime_h.m4
+++ b/gl/m4/utime_h.m4
@@ -1,5 +1,5 @@
# utime_h.m4 serial 8
-dnl Copyright (C) 2017-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2017-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/utimens.m4 b/gl/m4/utimens.m4
index 62aec78a..5f860616 100644
--- a/gl/m4/utimens.m4
+++ b/gl/m4/utimens.m4
@@ -1,9 +1,9 @@
-dnl Copyright (C) 2003-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2003-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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 serial 11
+dnl serial 15
AC_DEFUN([gl_UTIMENS],
[
@@ -11,7 +11,11 @@ AC_DEFUN([gl_UTIMENS],
AC_REQUIRE([gl_FUNC_UTIMES])
AC_REQUIRE([gl_CHECK_TYPE_STRUCT_TIMESPEC])
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
- AC_CHECK_FUNCS_ONCE([futimes futimesat futimens utimensat lutimes])
+ gl_CHECK_FUNCS_ANDROID([futimes], [[#include <sys/time.h>]])
+ gl_CHECK_FUNCS_ANDROID([futimesat], [[#include <sys/time.h>]])
+ gl_CHECK_FUNCS_ANDROID([lutimes], [[#include <sys/time.h>]])
+ gl_CHECK_FUNCS_ANDROID([futimens], [[#include <sys/stat.h>]])
+ gl_CHECK_FUNCS_ANDROID([utimensat], [[#include <sys/stat.h>]])
if test $ac_cv_func_futimens = no && test $ac_cv_func_futimesat = yes; then
dnl FreeBSD 8.0-rc2 mishandles futimesat(fd,NULL,time). It is not
diff --git a/gl/m4/utimes.m4 b/gl/m4/utimes.m4
index bf221614..73b9a2da 100644
--- a/gl/m4/utimes.m4
+++ b/gl/m4/utimes.m4
@@ -1,7 +1,7 @@
# Detect some bugs in glibc's implementation of utimes.
# serial 8
-dnl Copyright (C) 2003-2005, 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2003-2005, 2009-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/vasnprintf.m4 b/gl/m4/vasnprintf.m4
index afdece71..df87b9e7 100644
--- a/gl/m4/vasnprintf.m4
+++ b/gl/m4/vasnprintf.m4
@@ -1,5 +1,5 @@
-# vasnprintf.m4 serial 38
-dnl Copyright (C) 2002-2004, 2006-2022 Free Software Foundation, Inc.
+# vasnprintf.m4 serial 50
+dnl Copyright (C) 2002-2004, 2006-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -29,6 +29,15 @@ AC_DEFUN([gl_REPLACE_VASNPRINTF],
gl_PREREQ_ASNPRINTF
])
+AC_DEFUN([gl_FUNC_VASNWPRINTF],
+[
+ AC_LIBOBJ([printf-args])
+ gl_PREREQ_PRINTF_ARGS
+ gl_PREREQ_PRINTF_PARSE
+ gl_PREREQ_VASNWPRINTF
+ gl_PREREQ_ASNPRINTF
+])
+
# Prerequisites of lib/printf-args.h, lib/printf-args.c.
AC_DEFUN([gl_PREREQ_PRINTF_ARGS],
[
@@ -37,6 +46,7 @@ AC_DEFUN([gl_PREREQ_PRINTF_ARGS],
])
# Prerequisites of lib/printf-parse.h, lib/printf-parse.c.
+# Prerequisites of lib/wprintf-parse.h, lib/wprintf-parse.c.
AC_DEFUN([gl_PREREQ_PRINTF_PARSE],
[
AC_REQUIRE([gl_FEATURES_H])
@@ -50,19 +60,13 @@ AC_DEFUN([gl_PREREQ_PRINTF_PARSE],
AC_REQUIRE([gt_AC_TYPE_INTMAX_T])
])
-# Prerequisites of lib/vasnprintf.c.
+# Prerequisites of lib/vasnprintf.c if !WIDE_CHAR_VERSION.
AC_DEFUN_ONCE([gl_PREREQ_VASNPRINTF],
[
- AC_REQUIRE([AC_FUNC_ALLOCA])
- AC_REQUIRE([gt_TYPE_WCHAR_T])
- AC_REQUIRE([gt_TYPE_WINT_T])
- AC_CHECK_FUNCS([snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb])
+ AC_CHECK_FUNCS([snprintf strnlen wcrtomb])
dnl Use the _snprintf function only if it is declared (because on NetBSD it
dnl is defined as a weak alias of snprintf; we prefer to use the latter).
AC_CHECK_DECLS([_snprintf], , , [[#include <stdio.h>]])
- dnl Knowing DBL_EXPBIT0_WORD and DBL_EXPBIT0_BIT enables an optimization
- dnl in the code for NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_DOUBLE.
- AC_REQUIRE([gl_DOUBLE_EXPONENT_LOCATION])
dnl We can avoid a lot of code by assuming that snprintf's return value
dnl conforms to ISO C99. So check that.
AC_REQUIRE([gl_SNPRINTF_RETVAL_C99])
@@ -84,6 +88,107 @@ AC_DEFUN_ONCE([gl_PREREQ_VASNPRINTF],
terminated.])
;;
esac
+ gl_PREREQ_VASNXPRINTF
+])
+
+# Prerequisites of lib/vasnwprintf.c.
+AC_DEFUN_ONCE([gl_PREREQ_VASNWPRINTF],
+[
+ AC_CHECK_FUNCS_ONCE([swprintf wcsnlen mbrtowc])
+ AC_CHECK_DECLS([_snwprintf], , , [[#include <stdio.h>]])
+ AC_CHECK_DECLS([wcsnlen], , , [[#include <wchar.h>]])
+ gl_SWPRINTF_WORKS
+ case "$gl_cv_func_swprintf_works" in
+ *yes)
+ AC_DEFINE([HAVE_WORKING_SWPRINTF], [1],
+ [Define if the swprintf function works correctly when it produces output
+ that contains null wide characters.])
+ ;;
+ esac
+ gl_MBRTOWC_C_LOCALE
+ case "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" in
+ *yes)
+ AC_CACHE_CHECK([whether swprintf in the C locale is free of encoding errors],
+ [gl_cv_func_swprintf_C_locale_sans_EILSEQ],
+ [
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+#ifndef __USE_MINGW_ANSI_STDIO
+# define __USE_MINGW_ANSI_STDIO 1
+#endif
+#include <stdio.h>
+#include <wchar.h>
+int main()
+{
+ int result = 0;
+ { /* This test fails on glibc 2.35, musl libc 1.2.4, FreeBSD 13.2, NetBSD 9.3,
+ OpenBSD 7.2, Cygwin 2.9.0.
+ Reported at <https://www.openwall.com/lists/musl/2023/06/12/2>. */
+ wchar_t buf[12];
+ int ret = swprintf (buf, 12, L"%c", '\377');
+ if (ret < 0)
+ result |= 1;
+ }
+ return result;
+}]])],
+ [gl_cv_func_swprintf_C_locale_sans_EILSEQ=yes],
+ [gl_cv_func_swprintf_C_locale_sans_EILSEQ=no],
+ [case "$host_os" in
+ # Guess no on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_swprintf_C_locale_sans_EILSEQ="guessing yes";;
+ # Guess no on musl systems.
+ *-musl* | midipix*) gl_cv_func_swprintf_C_locale_sans_EILSEQ="guessing no";;
+ # If we don't know, obey --enable-cross-guesses.
+ *) gl_cv_func_swprintf_C_locale_sans_EILSEQ="$gl_cross_guess_normal";;
+ esac
+ ])
+ ])
+ ;;
+ esac
+ if case "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" in
+ *yes) false ;;
+ *) true ;;
+ esac \
+ || case "$gl_cv_func_swprintf_C_locale_sans_EILSEQ" in
+ *yes) false ;;
+ *) true ;;
+ esac; then
+ AC_DEFINE([NEED_WPRINTF_DIRECTIVE_C], [1],
+ [Define if the vasnwprintf implementation needs special code for
+ the 'c' directive.])
+ fi
+ gl_SWPRINTF_DIRECTIVE_LA
+ case "$gl_cv_func_swprintf_directive_la" in
+ *yes) ;;
+ *)
+ AC_DEFINE([NEED_WPRINTF_DIRECTIVE_LA], [1],
+ [Define if the vasnwprintf implementation needs special code for
+ the 'a' directive with 'long double' arguments.])
+ ;;
+ esac
+ gl_SWPRINTF_DIRECTIVE_LC
+ case "$gl_cv_func_swprintf_directive_lc" in
+ *yes) ;;
+ *)
+ AC_DEFINE([NEED_WPRINTF_DIRECTIVE_LC], [1],
+ [Define if the vasnwprintf implementation needs special code for
+ the 'lc' directive.])
+ ;;
+ esac
+ gl_MUSL_LIBC
+ gl_PREREQ_VASNXPRINTF
+])
+
+# Common prerequisites of lib/vasnprintf.c and lib/vasnwprintf.c.
+AC_DEFUN_ONCE([gl_PREREQ_VASNXPRINTF],
+[
+ AC_REQUIRE([AC_FUNC_ALLOCA])
+ AC_REQUIRE([gt_TYPE_WCHAR_T])
+ AC_REQUIRE([gt_TYPE_WINT_T])
+ AC_CHECK_FUNCS([wcslen])
+ dnl Knowing DBL_EXPBIT0_WORD and DBL_EXPBIT0_BIT enables an optimization
+ dnl in the code for NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_DOUBLE.
+ AC_REQUIRE([gl_DOUBLE_EXPONENT_LOCATION])
])
# Extra prerequisites of lib/vasnprintf.c for supporting 'long double'
@@ -152,7 +257,22 @@ AC_DEFUN([gl_PREREQ_VASNPRINTF_DIRECTIVE_A],
AC_DEFINE([NEED_PRINTF_DIRECTIVE_A], [1],
[Define if the vasnprintf implementation needs special code for
the 'a' and 'A' directives.])
- AC_CHECK_FUNCS([nl_langinfo])
+ gl_CHECK_FUNCS_ANDROID([nl_langinfo], [[#include <langinfo.h>]])
+ ;;
+ esac
+])
+
+# Extra prerequisites of lib/vasnprintf.c for supporting the 'b' directive.
+AC_DEFUN([gl_PREREQ_VASNPRINTF_DIRECTIVE_B],
+[
+ AC_REQUIRE([gl_PRINTF_DIRECTIVE_B])
+ case "$gl_cv_func_printf_directive_b" in
+ *yes)
+ ;;
+ *)
+ AC_DEFINE([NEED_PRINTF_DIRECTIVE_B], [1],
+ [Define if the vasnprintf implementation needs special code for
+ the 'b' directive.])
;;
esac
])
@@ -187,6 +307,21 @@ AC_DEFUN([gl_PREREQ_VASNPRINTF_DIRECTIVE_LS],
esac
])
+# Extra prerequisites of lib/vasnprintf.c for supporting the 'lc' directive.
+AC_DEFUN([gl_PREREQ_VASNPRINTF_DIRECTIVE_LC],
+[
+ AC_REQUIRE([gl_PRINTF_DIRECTIVE_LC])
+ case "$gl_cv_func_printf_directive_lc" in
+ *yes)
+ ;;
+ *)
+ AC_DEFINE([NEED_PRINTF_DIRECTIVE_LC], [1],
+ [Define if the vasnprintf implementation needs special code for
+ the 'lc' directive.])
+ ;;
+ esac
+])
+
# Extra prerequisites of lib/vasnprintf.c for supporting the ' flag.
AC_DEFUN([gl_PREREQ_VASNPRINTF_FLAG_GROUPING],
[
@@ -276,15 +411,17 @@ AC_DEFUN([gl_PREREQ_VASNPRINTF_ENOMEM],
])
# Prerequisites of lib/vasnprintf.c including all extras for POSIX compliance.
-AC_DEFUN([gl_PREREQ_VASNPRINTF_WITH_EXTRAS],
+AC_DEFUN([gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS],
[
AC_REQUIRE([gl_PREREQ_VASNPRINTF])
gl_PREREQ_VASNPRINTF_LONG_DOUBLE
gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE
gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE
gl_PREREQ_VASNPRINTF_DIRECTIVE_A
+ gl_PREREQ_VASNPRINTF_DIRECTIVE_B
gl_PREREQ_VASNPRINTF_DIRECTIVE_F
gl_PREREQ_VASNPRINTF_DIRECTIVE_LS
+ gl_PREREQ_VASNPRINTF_DIRECTIVE_LC
gl_PREREQ_VASNPRINTF_FLAG_GROUPING
gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST
gl_PREREQ_VASNPRINTF_FLAG_ZERO
@@ -292,7 +429,34 @@ AC_DEFUN([gl_PREREQ_VASNPRINTF_WITH_EXTRAS],
gl_PREREQ_VASNPRINTF_ENOMEM
])
+# Extra prerequisites of lib/vasnprintf.c for supporting the 'B' directive.
+AC_DEFUN([gl_PREREQ_VASNPRINTF_DIRECTIVE_UPPERCASE_B],
+[
+ AC_REQUIRE([gl_PRINTF_DIRECTIVE_UPPERCASE_B])
+ case "$gl_cv_func_printf_directive_uppercase_b" in
+ *yes)
+ ;;
+ *)
+ AC_DEFINE([NEED_PRINTF_DIRECTIVE_UPPERCASE_B], [1],
+ [Define if the vasnprintf implementation needs special code for
+ the 'B' directive.])
+ ;;
+ esac
+])
+
+# Prerequisites of lib/vasnprintf.c including all extras for POSIX compliance
+# and GNU compatibility.
+AC_DEFUN([gl_PREREQ_VASNPRINTF_WITH_GNU_EXTRAS],
+[
+ gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS
+ AC_DEFINE([SUPPORT_GNU_PRINTF_DIRECTIVES], [1],
+ [Define if the vasnprintf implementation should support GNU compatible
+ printf directives.])
+ gl_PREREQ_VASNPRINTF_DIRECTIVE_UPPERCASE_B
+])
+
# Prerequisites of lib/asnprintf.c.
+# Prerequisites of lib/asnwprintf.c.
AC_DEFUN([gl_PREREQ_ASNPRINTF],
[
])
diff --git a/gl/m4/vasprintf.m4 b/gl/m4/vasprintf.m4
index b92977b6..6e6156a7 100644
--- a/gl/m4/vasprintf.m4
+++ b/gl/m4/vasprintf.m4
@@ -1,5 +1,5 @@
# vasprintf.m4 serial 6
-dnl Copyright (C) 2002-2003, 2006-2007, 2009-2022 Free Software Foundation,
+dnl Copyright (C) 2002-2003, 2006-2007, 2009-2023 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/gl/m4/visibility.m4 b/gl/m4/visibility.m4
index 4a212a4e..f0468e89 100644
--- a/gl/m4/visibility.m4
+++ b/gl/m4/visibility.m4
@@ -1,5 +1,5 @@
# visibility.m4 serial 8
-dnl Copyright (C) 2005, 2008, 2010-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2008, 2010-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/vsnprintf.m4 b/gl/m4/vsnprintf.m4
index 02b448f3..7fbb11c4 100644
--- a/gl/m4/vsnprintf.m4
+++ b/gl/m4/vsnprintf.m4
@@ -1,5 +1,5 @@
# vsnprintf.m4 serial 7
-dnl Copyright (C) 2002-2004, 2007-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2004, 2007-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/warn-on-use.m4 b/gl/m4/warn-on-use.m4
index d43355ab..10649c5c 100644
--- a/gl/m4/warn-on-use.m4
+++ b/gl/m4/warn-on-use.m4
@@ -1,5 +1,5 @@
-# warn-on-use.m4 serial 9
-dnl Copyright (C) 2010-2022 Free Software Foundation, Inc.
+# warn-on-use.m4 serial 10
+dnl Copyright (C) 2010-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -32,17 +32,30 @@ AC_DEFUN([gl_WARN_ON_USE_PREPARE],
undefining macros.])])dnl
for gl_func in m4_flatten([$2]); do
AS_VAR_PUSHDEF([gl_Symbol], [gl_cv_have_raw_decl_$gl_func])dnl
+ dnl As a workaround to implicit built-in function declarations in
+ dnl clang (e.g. strndup), reference ac_compile_for_check_decl instead
+ dnl of ac_compile. If, for whatever reason, the override of AC_PROG_CC
+ dnl in zzgnulib.m4 is inactive, use the original ac_compile.
+ ac_save_ac_compile="$ac_compile"
+ if test -n "$ac_compile_for_check_decl"; then
+ ac_compile="$ac_compile_for_check_decl"
+ fi
AC_CACHE_CHECK([whether $gl_func is declared without a macro],
[gl_Symbol],
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([$1],
[[#undef $gl_func
(void) $gl_func;]])],
[AS_VAR_SET([gl_Symbol], [yes])], [AS_VAR_SET([gl_Symbol], [no])])])
+ ac_compile="$ac_save_ac_compile"
AS_VAR_IF([gl_Symbol], [yes],
[AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_RAW_DECL_$gl_func]), [1])
- dnl shortcut - if the raw declaration exists, then set a cache
- dnl variable to allow skipping any later AC_CHECK_DECL efforts
- eval ac_cv_have_decl_$gl_func=yes])
+ dnl Shortcut for an AC_CHECK_DECL invocation that may come later:
+ dnl If the raw declaration exists with the given includes, then
+ dnl AC_CHECK_DECL with its many includes would see it as well.
+ dnl So, set a cache variable to allow skipping any later
+ dnl AC_CHECK_DECL invocation for $gl_func.
+ eval "ac_cv_have_decl_$gl_func=yes"
+ ])
AS_VAR_POPDEF([gl_Symbol])dnl
done
])
diff --git a/gl/m4/warnings.m4 b/gl/m4/warnings.m4
index 60088f93..9433cb52 100644
--- a/gl/m4/warnings.m4
+++ b/gl/m4/warnings.m4
@@ -1,19 +1,12 @@
-# warnings.m4 serial 16
-dnl Copyright (C) 2008-2022 Free Software Foundation, Inc.
+# warnings.m4 serial 19
+dnl Copyright (C) 2008-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl From Simon Josefsson
-# gl_AS_VAR_APPEND(VAR, VALUE)
-# ----------------------------
-# Provide the functionality of AS_VAR_APPEND if Autoconf does not have it.
-m4_ifdef([AS_VAR_APPEND],
-[m4_copy([AS_VAR_APPEND], [gl_AS_VAR_APPEND])],
-[m4_define([gl_AS_VAR_APPEND],
-[AS_VAR_SET([$1], [AS_VAR_GET([$1])$2])])])
-
+AC_PREREQ([2.64])
# gl_COMPILER_OPTION_IF(OPTION, [IF-SUPPORTED], [IF-NOT-SUPPORTED],
# [PROGRAM = AC_LANG_PROGRAM()])
@@ -34,7 +27,7 @@ esac
m4_pushdef([gl_Positive], [$gl_positive])])dnl
AC_CACHE_CHECK([whether _AC_LANG compiler handles $1], [gl_Warn], [
gl_save_compiler_FLAGS="$gl_Flags"
- gl_AS_VAR_APPEND(m4_defn([gl_Flags]),
+ AS_VAR_APPEND(m4_defn([gl_Flags]),
[" $gl_unknown_warnings_are_errors ]m4_defn([gl_Positive])["])
AC_LINK_IFELSE([m4_default([$4], [AC_LANG_PROGRAM([[]])])],
[AS_VAR_SET([gl_Warn], [yes])],
@@ -88,16 +81,18 @@ AC_DEFUN([gl_UNKNOWN_WARNINGS_ARE_ERRORS_IMPL],
# gl_WARN_ADD(OPTION, [VARIABLE = WARN_CFLAGS/WARN_CXXFLAGS],
# [PROGRAM = AC_LANG_PROGRAM()])
# -----------------------------------------------------------
-# Adds parameter to WARN_CFLAGS/WARN_CXXFLAGS if the compiler supports it
-# when compiling PROGRAM. For example, gl_WARN_ADD([-Wparentheses]).
+# Adds OPTION to VARIABLE (which defaults to WARN_CFLAGS or WARN_CXXFLAGS)
+# if the compiler supports it when compiling PROGRAM.
#
# If VARIABLE is a variable name, AC_SUBST it.
#
# The effects of this macro depend on the current language (_AC_LANG).
+#
+# Example: gl_WARN_ADD([-Wparentheses]).
AC_DEFUN([gl_WARN_ADD],
[AC_REQUIRE([gl_UNKNOWN_WARNINGS_ARE_ERRORS(]_AC_LANG[)])
gl_COMPILER_OPTION_IF([$1],
- [gl_AS_VAR_APPEND(m4_if([$2], [], [[WARN_]_AC_LANG_PREFIX[FLAGS]], [[$2]]), [" $1"])],
+ [AS_VAR_APPEND(m4_if([$2], [], [[WARN_]_AC_LANG_PREFIX[FLAGS]], [[$2]]), [" $1"])],
[],
[$3])
m4_ifval([$2],
@@ -105,6 +100,77 @@ m4_ifval([$2],
[AC_SUBST([WARN_]_AC_LANG_PREFIX[FLAGS])])dnl
])
+
+# gl_CC_INHIBIT_WARNINGS
+# sets and substitutes a variable GL_CFLAG_INHIBIT_WARNINGS, to a $(CC) option
+# that reverts all preceding -W* options, if available.
+# This is expected to be '-w' at least on gcc, clang, AIX xlc, xlclang, Sun cc,
+# "compile cl" (MSVC), "compile clang-cl" (MSVC-compatible clang). Or it can be
+# empty.
+AC_DEFUN([gl_CC_INHIBIT_WARNINGS],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_CACHE_CHECK([for C compiler option to inhibit all warnings],
+ [gl_cv_cc_winhibit],
+ [rm -f conftest*
+ echo 'int dummy;' > conftest.c
+ AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS -c conftest.c 2>conftest1.err]) >/dev/null
+ AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS -w -c conftest.c 2>conftest2.err]) >/dev/null
+ if test $? = 0 && test `wc -l < conftest1.err` = `wc -l < conftest2.err`; then
+ gl_cv_cc_winhibit='-w'
+ else
+ gl_cv_cc_winhibit=none
+ fi
+ rm -f conftest*
+ ])
+ case "$gl_cv_cc_winhibit" in
+ none) GL_CFLAG_INHIBIT_WARNINGS='' ;;
+ *)
+ GL_CFLAG_INHIBIT_WARNINGS="$gl_cv_cc_winhibit"
+ dnl If all warnings are inhibited, there's no point in having the GCC
+ dnl analyzer enabled. This saves RAM requirements and CPU consumption.
+ gl_WARN_ADD([-fno-analyzer], [GL_CFLAG_INHIBIT_WARNINGS])
+ ;;
+ esac
+ AC_SUBST([GL_CFLAG_INHIBIT_WARNINGS])
+])
+
+# gl_CXX_INHIBIT_WARNINGS
+# sets and substitutes a variable GL_CXXFLAG_INHIBIT_WARNINGS, to a $(CC) option
+# that reverts all preceding -W* options, if available.
+AC_DEFUN([gl_CXX_INHIBIT_WARNINGS],
+[
+ dnl Requires AC_PROG_CXX or gl_PROG_ANSI_CXX.
+ if test -n "$CXX" && test "$CXX" != no; then
+ AC_CACHE_CHECK([for C++ compiler option to inhibit all warnings],
+ [gl_cv_cxx_winhibit],
+ [rm -f conftest*
+ echo 'int dummy;' > conftest.cc
+ AC_TRY_COMMAND([${CXX-c++} $CXXFLAGS $CPPFLAGS -c conftest.cc 2>conftest1.err]) >/dev/null
+ AC_TRY_COMMAND([${CXX-c++} $CXXFLAGS $CPPFLAGS -w -c conftest.cc 2>conftest2.err]) >/dev/null
+ if test $? = 0 && test `wc -l < conftest1.err` = `wc -l < conftest2.err`; then
+ gl_cv_cxx_winhibit='-w'
+ else
+ gl_cv_cxx_winhibit=none
+ fi
+ rm -f conftest*
+ ])
+ case "$gl_cv_cxx_winhibit" in
+ none) GL_CXXFLAG_INHIBIT_WARNINGS='' ;;
+ *)
+ GL_CXXFLAG_INHIBIT_WARNINGS="$gl_cv_cxx_winhibit"
+ dnl If all warnings are inhibited, there's no point in having the GCC
+ dnl analyzer enabled. This saves RAM requirements and CPU consumption.
+ gl_WARN_ADD([-fno-analyzer], [GL_CXXFLAG_INHIBIT_WARNINGS])
+ ;;
+ esac
+ else
+ GL_CXXFLAG_INHIBIT_WARNINGS=''
+ fi
+ AC_SUBST([GL_CXXFLAG_INHIBIT_WARNINGS])
+])
+
+
# Local Variables:
# mode: autoconf
# End:
diff --git a/gl/m4/wchar_h.m4 b/gl/m4/wchar_h.m4
index 4baba1af..442932be 100644
--- a/gl/m4/wchar_h.m4
+++ b/gl/m4/wchar_h.m4
@@ -1,13 +1,13 @@
dnl A placeholder for ISO C99 <wchar.h>, for platforms that have issues.
-dnl Copyright (C) 2007-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl Written by Eric Blake.
-# wchar_h.m4 serial 55
+# wchar_h.m4 serial 60
AC_DEFUN_ONCE([gl_WCHAR_H],
[
@@ -253,5 +253,10 @@ AC_DEFUN([gl_WCHAR_H_DEFAULTS],
REPLACE_WCWIDTH=0; AC_SUBST([REPLACE_WCWIDTH])
REPLACE_WCSWIDTH=0; AC_SUBST([REPLACE_WCSWIDTH])
REPLACE_WCSFTIME=0; AC_SUBST([REPLACE_WCSFTIME])
+ REPLACE_WCSCMP=0; AC_SUBST([REPLACE_WCSCMP])
+ REPLACE_WCSNCMP=0; AC_SUBST([REPLACE_WCSNCMP])
+ REPLACE_WCSSTR=0; AC_SUBST([REPLACE_WCSSTR])
REPLACE_WCSTOK=0; AC_SUBST([REPLACE_WCSTOK])
+ REPLACE_WMEMCMP=0; AC_SUBST([REPLACE_WMEMCMP])
+ REPLACE_WMEMPCPY=0; AC_SUBST([REPLACE_WMEMPCPY])
])
diff --git a/gl/m4/wchar_t.m4 b/gl/m4/wchar_t.m4
index 268e3e51..50bde08a 100644
--- a/gl/m4/wchar_t.m4
+++ b/gl/m4/wchar_t.m4
@@ -1,5 +1,5 @@
# wchar_t.m4 serial 4 (gettext-0.18.2)
-dnl Copyright (C) 2002-2003, 2008-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2003, 2008-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/wcrtomb.m4 b/gl/m4/wcrtomb.m4
index fee21d7e..fa503b53 100644
--- a/gl/m4/wcrtomb.m4
+++ b/gl/m4/wcrtomb.m4
@@ -1,5 +1,5 @@
-# wcrtomb.m4 serial 17
-dnl Copyright (C) 2008-2022 Free Software Foundation, Inc.
+# wcrtomb.m4 serial 18
+dnl Copyright (C) 2008-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -97,12 +97,14 @@ changequote([,])dnl
int main ()
{
int result = 0;
- if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
+ if (strcmp ("$LOCALE_FR", "none") != 0
+ && setlocale (LC_ALL, "$LOCALE_FR") != NULL)
{
if (wcrtomb (NULL, 0, NULL) != 1)
result |= 1;
}
- if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+ if (strcmp ("$LOCALE_FR_UTF8", "none") != 0
+ && setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
{
if (wcrtomb (NULL, 0, NULL) != 1)
result |= 2;
@@ -113,12 +115,14 @@ int main ()
result |= 2;
}
}
- if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+ if (strcmp ("$LOCALE_JA", "none") != 0
+ && setlocale (LC_ALL, "$LOCALE_JA") != NULL)
{
if (wcrtomb (NULL, 0, NULL) != 1)
result |= 4;
}
- if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+ if (strcmp ("$LOCALE_ZH_CN", "none") != 0
+ && setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
{
if (wcrtomb (NULL, 0, NULL) != 1)
result |= 8;
diff --git a/gl/m4/wctype_h.m4 b/gl/m4/wctype_h.m4
index 702cb39c..6856a735 100644
--- a/gl/m4/wctype_h.m4
+++ b/gl/m4/wctype_h.m4
@@ -2,7 +2,7 @@
dnl A placeholder for ISO C99 <wctype.h>, for platforms that lack it.
-dnl Copyright (C) 2006-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/wint_t.m4 b/gl/m4/wint_t.m4
index adc58661..dfd743b3 100644
--- a/gl/m4/wint_t.m4
+++ b/gl/m4/wint_t.m4
@@ -1,5 +1,5 @@
# wint_t.m4 serial 11
-dnl Copyright (C) 2003, 2007-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2007-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/wmemchr.m4 b/gl/m4/wmemchr.m4
index e75b5519..ac414fbc 100644
--- a/gl/m4/wmemchr.m4
+++ b/gl/m4/wmemchr.m4
@@ -1,5 +1,5 @@
# wmemchr.m4 serial 5
-dnl Copyright (C) 2011-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/wmempcpy.m4 b/gl/m4/wmempcpy.m4
index 9765039b..abf1df34 100644
--- a/gl/m4/wmempcpy.m4
+++ b/gl/m4/wmempcpy.m4
@@ -1,5 +1,5 @@
-# wmempcpy.m4 serial 1
-dnl Copyright (C) 2020-2022 Free Software Foundation, Inc.
+# wmempcpy.m4 serial 3
+dnl Copyright (C) 2020-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -14,8 +14,11 @@ AC_DEFUN([gl_FUNC_WMEMPCPY],
dnl The wmempcpy() declaration in lib/wchar.in.h uses 'restrict'.
AC_REQUIRE([AC_C_RESTRICT])
- AC_CHECK_FUNCS_ONCE([wmempcpy])
+ gl_CHECK_FUNCS_ANDROID([wmempcpy], [[#include <wchar.h>]])
if test $ac_cv_func_wmempcpy = no; then
HAVE_WMEMPCPY=0
+ case "$gl_cv_onwards_func_wmempcpy" in
+ future*) REPLACE_WMEMPCPY=1 ;;
+ esac
fi
])
diff --git a/gl/m4/xalloc.m4 b/gl/m4/xalloc.m4
index 17a9c06d..fc56f59a 100644
--- a/gl/m4/xalloc.m4
+++ b/gl/m4/xalloc.m4
@@ -1,5 +1,5 @@
# xalloc.m4 serial 18
-dnl Copyright (C) 2002-2006, 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2009-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/xgetcwd.m4 b/gl/m4/xgetcwd.m4
index 8b48535d..9695d999 100644
--- a/gl/m4/xgetcwd.m4
+++ b/gl/m4/xgetcwd.m4
@@ -1,5 +1,5 @@
#serial 8
-dnl Copyright (C) 2002-2006, 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2009-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/xsize.m4 b/gl/m4/xsize.m4
index 0109049e..649db9c5 100644
--- a/gl/m4/xsize.m4
+++ b/gl/m4/xsize.m4
@@ -1,5 +1,5 @@
# xsize.m4 serial 5
-dnl Copyright (C) 2003-2004, 2008-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2003-2004, 2008-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/xstrndup.m4 b/gl/m4/xstrndup.m4
index 41eabd3e..1fb6a7dd 100644
--- a/gl/m4/xstrndup.m4
+++ b/gl/m4/xstrndup.m4
@@ -1,5 +1,5 @@
# xstrndup.m4 serial 2
-dnl Copyright (C) 2003, 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2009-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/xvasprintf.m4 b/gl/m4/xvasprintf.m4
index 10480a23..b7e0701c 100644
--- a/gl/m4/xvasprintf.m4
+++ b/gl/m4/xvasprintf.m4
@@ -1,5 +1,5 @@
# xvasprintf.m4 serial 2
-dnl Copyright (C) 2006, 2009-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2009-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/m4/year2038.m4 b/gl/m4/year2038.m4
deleted file mode 100644
index 06db589b..00000000
--- a/gl/m4/year2038.m4
+++ /dev/null
@@ -1,124 +0,0 @@
-# year2038.m4 serial 7
-dnl Copyright (C) 2017-2022 Free Software Foundation, Inc.
-dnl This file is free software; the Free 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 Attempt to ensure that 'time_t' can go past the year 2038 and that
-dnl the functions 'time', 'stat', etc. work with post-2038 timestamps.
-
-AC_DEFUN([gl_YEAR2038_EARLY],
-[
- AC_REQUIRE([AC_CANONICAL_HOST])
- case "$host_os" in
- mingw*)
- AC_DEFINE([__MINGW_USE_VC2005_COMPAT], [1],
- [For 64-bit time_t on 32-bit mingw.])
- ;;
- esac
-])
-
-# gl_YEAR2038_TEST_INCLUDES
-# -------------------------
-AC_DEFUN([gl_YEAR2038_TEST_INCLUDES],
-[[
- #include <time.h>
- /* Check that time_t can represent 2**32 - 1 correctly. */
- #define LARGE_TIME_T \\
- ((time_t) (((time_t) 1 << 30) - 1 + 3 * ((time_t) 1 << 30)))
- int verify_time_t_range[(LARGE_TIME_T / 65537 == 65535
- && LARGE_TIME_T % 65537 == 0)
- ? 1 : -1];
-]])
-
-# gl_YEAR2038_BODY(REQUIRE-YEAR2038-SAFE)
------------------------------------------
-AC_DEFUN([gl_YEAR2038_BODY],
-[
- AC_ARG_ENABLE([year2038],
- [ --disable-year2038 omit support for timestamps past the year 2038])
- AS_IF([test "$enable_year2038" != no],
- [
- dnl On many systems, time_t is already a 64-bit type.
- dnl On those systems where time_t is still 32-bit, it requires kernel
- dnl and libc support to make it 64-bit. For glibc 2.34 and later on Linux,
- dnl defining _TIME_BITS=64 and _FILE_OFFSET_BITS=64 is needed on x86 and ARM.
- dnl
- dnl On native Windows, the system include files define types __time32_t
- dnl and __time64_t. By default, time_t is an alias of
- dnl - __time32_t on 32-bit mingw,
- dnl - __time64_t on 64-bit mingw and on MSVC (since MSVC 8).
- dnl But when compiling with -D__MINGW_USE_VC2005_COMPAT, time_t is an
- dnl alias of __time64_t.
- dnl And when compiling with -D_USE_32BIT_TIME_T, time_t is an alias of
- dnl __time32_t.
- AC_CACHE_CHECK([for time_t past the year 2038], [gl_cv_type_time_t_y2038],
- [AC_COMPILE_IFELSE(
- [AC_LANG_SOURCE([gl_YEAR2038_TEST_INCLUDES])],
- [gl_cv_type_time_t_y2038=yes], [gl_cv_type_time_t_y2038=no])
- ])
- if test "$gl_cv_type_time_t_y2038" = no; then
- AC_CACHE_CHECK([for 64-bit time_t with _TIME_BITS=64],
- [gl_cv_type_time_t_bits_macro],
- [AC_COMPILE_IFELSE(
- [AC_LANG_SOURCE([[#define _TIME_BITS 64
- #define _FILE_OFFSET_BITS 64
- ]gl_YEAR2038_TEST_INCLUDES])],
- [gl_cv_type_time_t_bits_macro=yes],
- [gl_cv_type_time_t_bits_macro=no])
- ])
- if test "$gl_cv_type_time_t_bits_macro" = yes; then
- AC_DEFINE([_TIME_BITS], [64],
- [Number of bits in a timestamp, on hosts where this is settable.])
- dnl AC_SYS_LARGFILE also defines this; it's OK if we do too.
- AC_DEFINE([_FILE_OFFSET_BITS], [64],
- [Number of bits in a file offset, on hosts where this is settable.])
- gl_cv_type_time_t_y2038=yes
- fi
- fi
- if test $gl_cv_type_time_t_y2038 = no; then
- AC_COMPILE_IFELSE(
- [AC_LANG_SOURCE(
- [[#ifdef _USE_32BIT_TIME_T
- int ok;
- #else
- error fail
- #endif
- ]])],
- [AC_MSG_FAILURE(
- [The 'time_t' type stops working after January 2038.
- Remove _USE_32BIT_TIME_T from the compiler flags.])],
- [# If not cross-compiling and $1 says we should check,
- # and 'touch' works with a large timestamp, then evidently wider time_t
- # is desired and supported, so fail and ask the builder to fix the
- # problem. Otherwise, just warn the builder.
- m4_ifval([$1],
- [if test $cross_compiling = no \
- && TZ=UTC0 touch -t 210602070628.15 conftest.time 2>/dev/null; then
- case `TZ=UTC0 LC_ALL=C ls -l conftest.time 2>/dev/null` in
- *'Feb 7 2106'* | *'Feb 7 17:10'*)
- AC_MSG_FAILURE(
- [The 'time_t' type stops working after January 2038,
- and your system appears to support a wider 'time_t'.
- Try configuring with 'CC="${CC} -m64"'.
- To build with a 32-bit time_t anyway (not recommended),
- configure with '--disable-year2038'.]);;
- esac
- rm -f conftest.time
- fi])
- if test "$gl_warned_about_y2038" != yes; then
- AC_MSG_WARN(
- [The 'time_t' type stops working after January 2038,
- and this package needs a wider 'time_t' type
- if there is any way to access timestamps after that.
- Configure with 'CC="${CC} -m64"' perhaps?])
- gl_warned_about_y2038=yes
- fi
- ])
- fi])
-])
-
-AC_DEFUN([gl_YEAR2038],
-[
- gl_YEAR2038_BODY([require-year2038-safe])
-])
diff --git a/gl/m4/zzgnulib.m4 b/gl/m4/zzgnulib.m4
index fd73a201..362102b6 100644
--- a/gl/m4/zzgnulib.m4
+++ b/gl/m4/zzgnulib.m4
@@ -1,5 +1,5 @@
# zzgnulib.m4 serial 1
-dnl Copyright (C) 2020-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2020-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free 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/gl/po/Makevars b/gl/po/Makevars
index 6447e830..efcb6462 100644
--- a/gl/po/Makevars
+++ b/gl/po/Makevars
@@ -1,5 +1,5 @@
## DO NOT EDIT! GENERATED AUTOMATICALLY!
-# Copyright (C) 2002-2022 Free Software Foundation, Inc.
+# Copyright (C) 2002-2023 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
@@ -34,6 +34,7 @@ XGETTEXT_OPTIONS = \
--keyword=_ --flag=_:1:pass-c-format \
--keyword=N_ --flag=N_:1:pass-c-format \
--keyword='proper_name:1,"This is a proper name. See the gettext manual, section Names."' \
+ --keyword='proper_name_lite:1,"This is a proper name. See the gettext manual, section Names."' \
--keyword='proper_name_utf8:1,"This is a proper name. See the gettext manual, section Names."' \
--flag=error:3:c-format --flag=error_at_line:5:c-format
diff --git a/gl/po/POTFILES.in b/gl/po/POTFILES.in
index d168187f..e218cd3b 100644
--- a/gl/po/POTFILES.in
+++ b/gl/po/POTFILES.in
@@ -1,5 +1,5 @@
## DO NOT EDIT! GENERATED AUTOMATICALLY!
-# Copyright (C) 2002-2022 Free Software Foundation, Inc.
+# Copyright (C) 2002-2023 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
@@ -41,6 +41,7 @@ gl/lib/argp-xinl.c
gl/lib/argp.h
gl/lib/asnprintf.c
gl/lib/asprintf.c
+gl/lib/assert.in.h
gl/lib/assure.h
gl/lib/at-func.c
gl/lib/at-func2.c
@@ -79,7 +80,7 @@ gl/lib/dynarray.h
gl/lib/eloop-threshold.h
gl/lib/errno.in.h
gl/lib/error.c
-gl/lib/error.h
+gl/lib/error.in.h
gl/lib/exitfail.c
gl/lib/exitfail.h
gl/lib/fchdir.c
@@ -184,6 +185,7 @@ gl/lib/idpriv-drop.c
gl/lib/idpriv-droptemp.c
gl/lib/idpriv.h
gl/lib/idx.h
+gl/lib/intprops-internal.h
gl/lib/intprops.h
gl/lib/inttypes.in.h
gl/lib/ioctl.c
@@ -209,7 +211,6 @@ gl/lib/malloc/dynarray_finalize.c
gl/lib/malloc/dynarray_resize.c
gl/lib/malloc/dynarray_resize_clear.c
gl/lib/malloc/scratch_buffer.h
-gl/lib/malloc/scratch_buffer_dupfree.c
gl/lib/malloc/scratch_buffer_grow.c
gl/lib/malloc/scratch_buffer_grow_preserve.c
gl/lib/malloc/scratch_buffer_set_array_size.c
@@ -305,9 +306,8 @@ gl/lib/stat-time.h
gl/lib/stat-w32.c
gl/lib/stat-w32.h
gl/lib/stat.c
-gl/lib/stdalign.in.h
gl/lib/stdarg.in.h
-gl/lib/stdbool.in.h
+gl/lib/stdckdint.in.h
gl/lib/stddef.in.h
gl/lib/stdint.in.h
gl/lib/stdio-read.c
diff --git a/gl/po/af.po b/gl/po/af.po
index 9498c8da..b0510913 100644
--- a/gl/po/af.po
+++ b/gl/po/af.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: coreutils 5.2.1\n"
"Report-Msgid-Bugs-To: bug-gnulib@gnu.org\n"
-"POT-Creation-Date: 2023-01-08 22:04+0000\n"
+"POT-Creation-Date: 2023-09-23 21:04+0000\n"
"PO-Revision-Date: 2004-03-17 11:58+0200\n"
"Last-Translator: Petri Jooste <rkwjpj@puk.ac.za>\n"
"Language-Team: Afrikaans <i18n@af.org.za>\n"
@@ -17,27 +17,27 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"X-Bugs: Report translation errors to the Language-Team address.\n"
-#: gl/lib/argp-help.c:162
+#: gl/lib/argp-help.c:161
#, c-format
msgid "ARGP_HELP_FMT: %s value is less than or equal to %s"
msgstr ""
-#: gl/lib/argp-help.c:238
+#: gl/lib/argp-help.c:237
#, c-format
msgid "%.*s: ARGP_HELP_FMT parameter requires a value"
msgstr ""
-#: gl/lib/argp-help.c:248
+#: gl/lib/argp-help.c:247
#, c-format
msgid "%.*s: Unknown ARGP_HELP_FMT parameter"
msgstr ""
-#: gl/lib/argp-help.c:261
+#: gl/lib/argp-help.c:260
#, c-format
msgid "Garbage in ARGP_HELP_FMT: %s"
msgstr ""
-#: gl/lib/argp-help.c:1374
+#: gl/lib/argp-help.c:1373
#, fuzzy
msgid ""
"Mandatory or optional arguments to long options are also mandatory or "
@@ -46,74 +46,74 @@ msgstr ""
"Verpligte parameters vir langformaat opsies is ook verpligtend vir "
"kortformaat opsies.\n"
-#: gl/lib/argp-help.c:1740
+#: gl/lib/argp-help.c:1739
msgid "Usage:"
msgstr ""
-#: gl/lib/argp-help.c:1744
+#: gl/lib/argp-help.c:1743
msgid " or: "
msgstr ""
-#: gl/lib/argp-help.c:1756
+#: gl/lib/argp-help.c:1755
#, fuzzy
msgid " [OPTION...]"
msgstr "Gebruik so: %s [OPSIE]...\n"
-#: gl/lib/argp-help.c:1783
+#: gl/lib/argp-help.c:1782
#, fuzzy, c-format
msgid "Try '%s --help' or '%s --usage' for more information.\n"
msgstr "Probeer `%s --help' vir meer inligting.\n"
-#: gl/lib/argp-help.c:1811
+#: gl/lib/argp-help.c:1810
#, fuzzy, c-format
msgid "Report bugs to %s.\n"
msgstr ""
"\n"
"Rapporteer foute aan <%s>.\n"
-#: gl/lib/argp-help.c:2011 gl/lib/error.c:195
+#: gl/lib/argp-help.c:2010 gl/lib/error.c:194
msgid "Unknown system error"
msgstr "Onbekende stelselfout"
-#: gl/lib/argp-parse.c:91
+#: gl/lib/argp-parse.c:90
msgid "give this help list"
msgstr ""
-#: gl/lib/argp-parse.c:92
+#: gl/lib/argp-parse.c:91
msgid "give a short usage message"
msgstr ""
-#: gl/lib/argp-parse.c:93
+#: gl/lib/argp-parse.c:92
msgid "NAME"
msgstr "NAAM"
-#: gl/lib/argp-parse.c:94
+#: gl/lib/argp-parse.c:93
msgid "set the program name"
msgstr ""
-#: gl/lib/argp-parse.c:95
+#: gl/lib/argp-parse.c:94
msgid "SECS"
msgstr ""
-#: gl/lib/argp-parse.c:96
+#: gl/lib/argp-parse.c:95
msgid "hang for SECS seconds (default 3600)"
msgstr ""
-#: gl/lib/argp-parse.c:154
+#: gl/lib/argp-parse.c:153
#, fuzzy
msgid "print program version"
msgstr "leesfout"
-#: gl/lib/argp-parse.c:171
+#: gl/lib/argp-parse.c:170
msgid "(PROGRAM ERROR) No version known!?"
msgstr ""
-#: gl/lib/argp-parse.c:624
+#: gl/lib/argp-parse.c:623
#, fuzzy, c-format
msgid "%s: Too many arguments\n"
msgstr "te veel parameters\n"
-#: gl/lib/argp-parse.c:770
+#: gl/lib/argp-parse.c:769
msgid "(PROGRAM ERROR) Option should have been recognized!?"
msgstr ""
diff --git a/gl/po/be.po b/gl/po/be.po
index 20dda41e..7e46185e 100644
--- a/gl/po/be.po
+++ b/gl/po/be.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: coreutils 5.0.91\n"
"Report-Msgid-Bugs-To: bug-gnulib@gnu.org\n"
-"POT-Creation-Date: 2023-01-08 22:04+0000\n"
+"POT-Creation-Date: 2023-09-23 21:04+0000\n"
"PO-Revision-Date: 2003-10-30 01:10+0200\n"
"Last-Translator: Ales Nyakhaychyk <nab@mail.by>\n"
"Language-Team: Belarusian <i18n@mova.org>\n"
@@ -20,101 +20,101 @@ msgstr ""
"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
"X-Generator: KBabel 1.0.2\n"
-#: gl/lib/argp-help.c:162
+#: gl/lib/argp-help.c:161
#, c-format
msgid "ARGP_HELP_FMT: %s value is less than or equal to %s"
msgstr ""
-#: gl/lib/argp-help.c:238
+#: gl/lib/argp-help.c:237
#, c-format
msgid "%.*s: ARGP_HELP_FMT parameter requires a value"
msgstr ""
-#: gl/lib/argp-help.c:248
+#: gl/lib/argp-help.c:247
#, c-format
msgid "%.*s: Unknown ARGP_HELP_FMT parameter"
msgstr ""
-#: gl/lib/argp-help.c:261
+#: gl/lib/argp-help.c:260
#, c-format
msgid "Garbage in ARGP_HELP_FMT: %s"
msgstr ""
-#: gl/lib/argp-help.c:1374
+#: gl/lib/argp-help.c:1373
#, fuzzy
msgid ""
"Mandatory or optional arguments to long options are also mandatory or "
"optional for any corresponding short options."
msgstr "Довады, абавязковыя для доўгіх выбараў, абавязковыя й для кароткіх.\n"
-#: gl/lib/argp-help.c:1740
+#: gl/lib/argp-help.c:1739
msgid "Usage:"
msgstr ""
-#: gl/lib/argp-help.c:1744
+#: gl/lib/argp-help.c:1743
msgid " or: "
msgstr ""
-#: gl/lib/argp-help.c:1756
+#: gl/lib/argp-help.c:1755
#, fuzzy
msgid " [OPTION...]"
msgstr "Выкарыстаньне: %s [ВЫБАР]...\n"
-#: gl/lib/argp-help.c:1783
+#: gl/lib/argp-help.c:1782
#, fuzzy, c-format
msgid "Try '%s --help' or '%s --usage' for more information.\n"
msgstr "Паспрабуйце \"%s --help\" для больш падрабязных зьвестак.\n"
-#: gl/lib/argp-help.c:1811
+#: gl/lib/argp-help.c:1810
#, fuzzy, c-format
msgid "Report bugs to %s.\n"
msgstr ""
"\n"
"Паведамляйце пра памылкі на <%s>.\n"
-#: gl/lib/argp-help.c:2011 gl/lib/error.c:195
+#: gl/lib/argp-help.c:2010 gl/lib/error.c:194
msgid "Unknown system error"
msgstr "Невядомая сыстэмная памылка"
-#: gl/lib/argp-parse.c:91
+#: gl/lib/argp-parse.c:90
msgid "give this help list"
msgstr ""
-#: gl/lib/argp-parse.c:92
+#: gl/lib/argp-parse.c:91
msgid "give a short usage message"
msgstr ""
-#: gl/lib/argp-parse.c:93
+#: gl/lib/argp-parse.c:92
msgid "NAME"
msgstr "НАЗВА"
-#: gl/lib/argp-parse.c:94
+#: gl/lib/argp-parse.c:93
msgid "set the program name"
msgstr ""
-#: gl/lib/argp-parse.c:95
+#: gl/lib/argp-parse.c:94
msgid "SECS"
msgstr ""
-#: gl/lib/argp-parse.c:96
+#: gl/lib/argp-parse.c:95
msgid "hang for SECS seconds (default 3600)"
msgstr ""
-#: gl/lib/argp-parse.c:154
+#: gl/lib/argp-parse.c:153
#, fuzzy
msgid "print program version"
msgstr "памылка чытаньня"
-#: gl/lib/argp-parse.c:171
+#: gl/lib/argp-parse.c:170
msgid "(PROGRAM ERROR) No version known!?"
msgstr ""
-#: gl/lib/argp-parse.c:624
+#: gl/lib/argp-parse.c:623
#, fuzzy, c-format
msgid "%s: Too many arguments\n"
msgstr "зашмат довадаў\n"
-#: gl/lib/argp-parse.c:770
+#: gl/lib/argp-parse.c:769
msgid "(PROGRAM ERROR) Option should have been recognized!?"
msgstr ""
diff --git a/gl/po/bg.gmo b/gl/po/bg.gmo
index 7d76d532..b6c003d5 100644
--- a/gl/po/bg.gmo
+++ b/gl/po/bg.gmo
Binary files differ
diff --git a/gl/po/bg.po b/gl/po/bg.po
index d3884258..a1c86c3c 100644
--- a/gl/po/bg.po
+++ b/gl/po/bg.po
@@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: gnulib 4.0.0.2567\n"
"Report-Msgid-Bugs-To: bug-gnulib@gnu.org\n"
-"POT-Creation-Date: 2023-01-08 22:04+0000\n"
-"PO-Revision-Date: 2020-03-10 09:45+0100\n"
+"POT-Creation-Date: 2023-09-23 21:04+0000\n"
+"PO-Revision-Date: 2023-06-18 17:55+0300\n"
"Last-Translator: Alexander Shopov <ash@kambanaria.org>\n"
"Language-Team: Bulgarian <dict@ludost.net>\n"
"Language: bg\n"
@@ -17,27 +17,27 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Bugs: Report translation errors to the Language-Team address.\n"
-#: gl/lib/argp-help.c:162
+#: gl/lib/argp-help.c:161
#, c-format
msgid "ARGP_HELP_FMT: %s value is less than or equal to %s"
msgstr "„ARGP_HELP_FMT“: стойността %s е по-малка или равна на %s"
-#: gl/lib/argp-help.c:238
+#: gl/lib/argp-help.c:237
#, c-format
msgid "%.*s: ARGP_HELP_FMT parameter requires a value"
msgstr "%.*s: параметърът „ARGP_HELP_FMT“ изисква стойност"
-#: gl/lib/argp-help.c:248
+#: gl/lib/argp-help.c:247
#, c-format
msgid "%.*s: Unknown ARGP_HELP_FMT parameter"
msgstr "%.*s: непознат параметър „ARGP_HELP_FMT“"
-#: gl/lib/argp-help.c:261
+#: gl/lib/argp-help.c:260
#, c-format
msgid "Garbage in ARGP_HELP_FMT: %s"
msgstr "Грешки в „ARGP_HELP_FMT“: %s"
-#: gl/lib/argp-help.c:1374
+#: gl/lib/argp-help.c:1373
msgid ""
"Mandatory or optional arguments to long options are also mandatory or "
"optional for any corresponding short options."
@@ -45,72 +45,72 @@ msgstr ""
"Аргументите, задължителните или незадължителни за дългите опции, са "
"съответно задължителни или незадължителни и за кратките опции."
-#: gl/lib/argp-help.c:1740
+#: gl/lib/argp-help.c:1739
msgid "Usage:"
msgstr "Използване:"
-#: gl/lib/argp-help.c:1744
+#: gl/lib/argp-help.c:1743
msgid " or: "
msgstr " или: "
-#: gl/lib/argp-help.c:1756
+#: gl/lib/argp-help.c:1755
msgid " [OPTION...]"
msgstr " [ОПЦИЯ…]"
-#: gl/lib/argp-help.c:1783
+#: gl/lib/argp-help.c:1782
#, c-format
msgid "Try '%s --help' or '%s --usage' for more information.\n"
msgstr "За повече информация използвайте „%s --help“ или „%s --usage“.\n"
-#: gl/lib/argp-help.c:1811
+#: gl/lib/argp-help.c:1810
#, c-format
msgid "Report bugs to %s.\n"
msgstr ""
"Съобщавайте за програмни грешки на %s.\n"
"За грешки в българския превод на <dict@fsa-bg.org>.\n"
-#: gl/lib/argp-help.c:2011 gl/lib/error.c:195
+#: gl/lib/argp-help.c:2010 gl/lib/error.c:194
msgid "Unknown system error"
msgstr "Неизвестна системна грешка"
-#: gl/lib/argp-parse.c:91
+#: gl/lib/argp-parse.c:90
msgid "give this help list"
msgstr "извеждане на тази справка"
-#: gl/lib/argp-parse.c:92
+#: gl/lib/argp-parse.c:91
msgid "give a short usage message"
msgstr "извеждане на кратко съобщение за използването"
-#: gl/lib/argp-parse.c:93
+#: gl/lib/argp-parse.c:92
msgid "NAME"
msgstr "ИМЕ"
-#: gl/lib/argp-parse.c:94
+#: gl/lib/argp-parse.c:93
msgid "set the program name"
msgstr "задаване на името на програмата"
-#: gl/lib/argp-parse.c:95
+#: gl/lib/argp-parse.c:94
msgid "SECS"
msgstr "СЕКУНДИ"
-#: gl/lib/argp-parse.c:96
+#: gl/lib/argp-parse.c:95
msgid "hang for SECS seconds (default 3600)"
msgstr "спиране за толкова СЕКУНДИ (стандартно е 3600)"
-#: gl/lib/argp-parse.c:154
+#: gl/lib/argp-parse.c:153
msgid "print program version"
msgstr "извеждане на версията на програмата"
-#: gl/lib/argp-parse.c:171
+#: gl/lib/argp-parse.c:170
msgid "(PROGRAM ERROR) No version known!?"
msgstr "(ДЕФЕКТ В ПРОГРАМАТА) Неизвестна версия!"
-#: gl/lib/argp-parse.c:624
+#: gl/lib/argp-parse.c:623
#, c-format
msgid "%s: Too many arguments\n"
msgstr "%s: Твърде много аргументи\n"
-#: gl/lib/argp-parse.c:770
+#: gl/lib/argp-parse.c:769
msgid "(PROGRAM ERROR) Option should have been recognized!?"
msgstr "(ДЕФЕКТ В ПРОГРАМАТА) Опцията би трябвало да е била разпозната!"
@@ -152,7 +152,7 @@ msgstr "%s: опцията изисква аргумент — „%c“\n"
#: gl/lib/openat-die.c:38
#, c-format
msgid "unable to record current working directory"
-msgstr "текущата работна директория не може да се запише"
+msgstr "не може да се запише коя е текущата работна директория"
#: gl/lib/openat-die.c:57
#, c-format
@@ -431,7 +431,7 @@ msgstr "стандартни файлови дескриптори"
#~ msgstr "блоков специален файл"
#~ msgid "character special file"
-#~ msgstr "знаков специален сайт"
+#~ msgstr "знаков специален файл"
#~ msgid "contiguous data"
#~ msgstr "последователни данни"
@@ -799,13 +799,9 @@ msgstr "стандартни файлови дескриптори"
#~ "This is free software: you are free to change and redistribute it.\n"
#~ "There is NO WARRANTY, to the extent permitted by law.\n"
#~ msgstr ""
-#~ "Лиценз — Общ публичен лиценз на GNU (GNU GPL), както е публикуван от "
-#~ "Фондацията\n"
-#~ "за свободен софтуер — версия 3 на лиценза или (по ваше решение) по-късна "
-#~ "версия.\n"
-#~ "<%s>\n"
-#~ "Тази програма е свободен софтуер. Можете да я разпространявате и/или "
-#~ "променяте.\n"
+#~ "Лиценз GPLv3+: GNU GPL — версия 3 или по-късна версия <%s>.\n"
+#~ "Тази програма е свободен софтуер. Може да я променяте и/или "
+#~ "разпространявате.\n"
#~ "Тя се разпространява БЕЗ НИКАКВИ ГАРАНЦИИ доколкото е позволено от "
#~ "закона.\n"
diff --git a/gl/po/ca.po b/gl/po/ca.po
index fd995d5e..c4757894 100644
--- a/gl/po/ca.po
+++ b/gl/po/ca.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: mailutils 0.6.90\n"
"Report-Msgid-Bugs-To: bug-gnulib@gnu.org\n"
-"POT-Creation-Date: 2023-01-08 22:04+0000\n"
+"POT-Creation-Date: 2023-09-23 21:04+0000\n"
"PO-Revision-Date: 2005-05-21 04:10+0200\n"
"Last-Translator: Jordi Mallach <jordi@gnu.org>\n"
"Language-Team: Catalan <ca@dodds.net>\n"
@@ -18,28 +18,28 @@ msgstr ""
"X-Bugs: Report translation errors to the Language-Team address.\n"
"Plural-Forms: nplurals=2; plural=n!=1;\n"
-#: gl/lib/argp-help.c:162
+#: gl/lib/argp-help.c:161
#, c-format
msgid "ARGP_HELP_FMT: %s value is less than or equal to %s"
msgstr ""
-#: gl/lib/argp-help.c:238
+#: gl/lib/argp-help.c:237
#, c-format
msgid "%.*s: ARGP_HELP_FMT parameter requires a value"
msgstr "%.*s: El paràmetre ARGP_HELP_FMT requereix un valor"
-#: gl/lib/argp-help.c:248
+#: gl/lib/argp-help.c:247
#, c-format
msgid "%.*s: Unknown ARGP_HELP_FMT parameter"
msgstr "%.*s: El paràmetre d'ARGP_HELP_FMT és desconegut"
# pfft, escombraries... jm
-#: gl/lib/argp-help.c:261
+#: gl/lib/argp-help.c:260
#, c-format
msgid "Garbage in ARGP_HELP_FMT: %s"
msgstr "Hi ha escombraries en ARGP_HELP_FMT: %s"
-#: gl/lib/argp-help.c:1374
+#: gl/lib/argp-help.c:1373
msgid ""
"Mandatory or optional arguments to long options are also mandatory or "
"optional for any corresponding short options."
@@ -47,76 +47,76 @@ msgstr ""
"Els arguments necessaris o opcionals per a les opcions llargues també són "
"necessaris o opcionals per a qualsevol opció curta corresponent."
-#: gl/lib/argp-help.c:1740
+#: gl/lib/argp-help.c:1739
msgid "Usage:"
msgstr "Forma d'ús:"
-#: gl/lib/argp-help.c:1744
+#: gl/lib/argp-help.c:1743
msgid " or: "
msgstr " ó: "
-#: gl/lib/argp-help.c:1756
+#: gl/lib/argp-help.c:1755
msgid " [OPTION...]"
msgstr " [OPCIÓ...]"
-#: gl/lib/argp-help.c:1783
+#: gl/lib/argp-help.c:1782
#, fuzzy, c-format
msgid "Try '%s --help' or '%s --usage' for more information.\n"
msgstr "Proveu «%s --help» o «%s --usage» per a obtindre més informació.\n"
-#: gl/lib/argp-help.c:1811
+#: gl/lib/argp-help.c:1810
#, c-format
msgid "Report bugs to %s.\n"
msgstr "Informeu dels errors a %s.\n"
-#: gl/lib/argp-help.c:2011 gl/lib/error.c:195
+#: gl/lib/argp-help.c:2010 gl/lib/error.c:194
msgid "Unknown system error"
msgstr "S'ha produït un error desconegut del sistema"
-#: gl/lib/argp-parse.c:91
+#: gl/lib/argp-parse.c:90
#, fuzzy
msgid "give this help list"
msgstr "Mostra aquesta llista d'ajuda"
-#: gl/lib/argp-parse.c:92
+#: gl/lib/argp-parse.c:91
#, fuzzy
msgid "give a short usage message"
msgstr "Mostra un curt missatge sobre l'ús"
-#: gl/lib/argp-parse.c:93
+#: gl/lib/argp-parse.c:92
msgid "NAME"
msgstr "NOM"
-#: gl/lib/argp-parse.c:94
+#: gl/lib/argp-parse.c:93
#, fuzzy
msgid "set the program name"
msgstr "Estableix el nom del programa"
-#: gl/lib/argp-parse.c:95
+#: gl/lib/argp-parse.c:94
#, fuzzy
msgid "SECS"
msgstr "SEGONS"
-#: gl/lib/argp-parse.c:96
+#: gl/lib/argp-parse.c:95
#, fuzzy
msgid "hang for SECS seconds (default 3600)"
msgstr "Penja durant SEGS segons (per defecte 3600)"
-#: gl/lib/argp-parse.c:154
+#: gl/lib/argp-parse.c:153
#, fuzzy
msgid "print program version"
msgstr "Mostra la versió del programa"
-#: gl/lib/argp-parse.c:171
+#: gl/lib/argp-parse.c:170
msgid "(PROGRAM ERROR) No version known!?"
msgstr "(ERROR DEL PROGRAMA) Cap versió coneguda!?"
-#: gl/lib/argp-parse.c:624
+#: gl/lib/argp-parse.c:623
#, c-format
msgid "%s: Too many arguments\n"
msgstr "%s: Massa arguments\n"
-#: gl/lib/argp-parse.c:770
+#: gl/lib/argp-parse.c:769
msgid "(PROGRAM ERROR) Option should have been recognized!?"
msgstr "(ERROR DEL PROGRAMA) L'opció s'hauria d'haver reconegut!?"
diff --git a/gl/po/cs.po b/gl/po/cs.po
index cb722103..e2a9b4c3 100644
--- a/gl/po/cs.po
+++ b/gl/po/cs.po
@@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gnulib 3.0.0.6062.a6b16\n"
"Report-Msgid-Bugs-To: bug-gnulib@gnu.org\n"
-"POT-Creation-Date: 2023-01-08 22:04+0000\n"
+"POT-Creation-Date: 2023-09-23 21:04+0000\n"
"PO-Revision-Date: 2011-12-04 08:50+0100\n"
"Last-Translator: Marek Černocký <marek@manet.cz>\n"
"Language-Team: Czech <translation-team-cs@lists.sourceforge.net>\n"
@@ -20,27 +20,27 @@ msgstr ""
"X-Bugs: Report translation errors to the Language-Team address.\n"
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
-#: gl/lib/argp-help.c:162
+#: gl/lib/argp-help.c:161
#, c-format
msgid "ARGP_HELP_FMT: %s value is less than or equal to %s"
msgstr "ARGP_HELP_FMT: hodnota %s je menší nebo rovna %s"
-#: gl/lib/argp-help.c:238
+#: gl/lib/argp-help.c:237
#, c-format
msgid "%.*s: ARGP_HELP_FMT parameter requires a value"
msgstr "%.*s: Parametr ARGP_HELP_FMT vyžaduje hodnotu"
-#: gl/lib/argp-help.c:248
+#: gl/lib/argp-help.c:247
#, c-format
msgid "%.*s: Unknown ARGP_HELP_FMT parameter"
msgstr "%.*s: Neznámý parametr ARGP_HELP_FMT"
-#: gl/lib/argp-help.c:261
+#: gl/lib/argp-help.c:260
#, c-format
msgid "Garbage in ARGP_HELP_FMT: %s"
msgstr "Nesmysly v ARGP_HELP_FMT: %s"
-#: gl/lib/argp-help.c:1374
+#: gl/lib/argp-help.c:1373
msgid ""
"Mandatory or optional arguments to long options are also mandatory or "
"optional for any corresponding short options."
@@ -48,70 +48,70 @@ msgstr ""
"Povinné či volitelné, argumenty pro dlouhé přepínače jsou povinné či "
"volitelné, i pro případné odpovídající krátké přepínače."
-#: gl/lib/argp-help.c:1740
+#: gl/lib/argp-help.c:1739
msgid "Usage:"
msgstr "Použití:"
-#: gl/lib/argp-help.c:1744
+#: gl/lib/argp-help.c:1743
msgid " or: "
msgstr " nebo:"
-#: gl/lib/argp-help.c:1756
+#: gl/lib/argp-help.c:1755
msgid " [OPTION...]"
msgstr " [PŘEPÍNAČ…]"
-#: gl/lib/argp-help.c:1783
+#: gl/lib/argp-help.c:1782
#, fuzzy, c-format
msgid "Try '%s --help' or '%s --usage' for more information.\n"
msgstr "Více informací získáte příkazem „%s --help“ nebo „%s --usage“.\n"
-#: gl/lib/argp-help.c:1811
+#: gl/lib/argp-help.c:1810
#, c-format
msgid "Report bugs to %s.\n"
msgstr "Chyby hlaste na %s.\n"
-#: gl/lib/argp-help.c:2011 gl/lib/error.c:195
+#: gl/lib/argp-help.c:2010 gl/lib/error.c:194
msgid "Unknown system error"
msgstr "Neznámá chyba systému"
-#: gl/lib/argp-parse.c:91
+#: gl/lib/argp-parse.c:90
msgid "give this help list"
msgstr "poskytne tuto přehledovou nápovědu"
-#: gl/lib/argp-parse.c:92
+#: gl/lib/argp-parse.c:91
msgid "give a short usage message"
msgstr "poskytne stručnou informaci o používání"
-#: gl/lib/argp-parse.c:93
+#: gl/lib/argp-parse.c:92
msgid "NAME"
msgstr "NÁZEV"
-#: gl/lib/argp-parse.c:94
+#: gl/lib/argp-parse.c:93
msgid "set the program name"
msgstr "nastavit název programu"
-#: gl/lib/argp-parse.c:95
+#: gl/lib/argp-parse.c:94
msgid "SECS"
msgstr "SEK"
-#: gl/lib/argp-parse.c:96
+#: gl/lib/argp-parse.c:95
msgid "hang for SECS seconds (default 3600)"
msgstr "zastavit na SEK sekund (výchozí je 3600)"
-#: gl/lib/argp-parse.c:154
+#: gl/lib/argp-parse.c:153
msgid "print program version"
msgstr "vypsat verzi programu"
-#: gl/lib/argp-parse.c:171
+#: gl/lib/argp-parse.c:170
msgid "(PROGRAM ERROR) No version known!?"
msgstr "(CHYBA PROGRAMU) Neznámá verze!?"
-#: gl/lib/argp-parse.c:624
+#: gl/lib/argp-parse.c:623
#, c-format
msgid "%s: Too many arguments\n"
msgstr "%s: Příliš mnoho argumentů\n"
-#: gl/lib/argp-parse.c:770
+#: gl/lib/argp-parse.c:769
msgid "(PROGRAM ERROR) Option should have been recognized!?"
msgstr "(CHYBA PROGRAMU) Měl by být rozpoznán přepínač!?"
diff --git a/gl/po/da.po b/gl/po/da.po
index 23424123..b1c8ebb6 100644
--- a/gl/po/da.po
+++ b/gl/po/da.po
@@ -13,7 +13,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gnulib 2.0.0.3462.e9796\n"
"Report-Msgid-Bugs-To: bug-gnulib@gnu.org\n"
-"POT-Creation-Date: 2023-01-08 22:04+0000\n"
+"POT-Creation-Date: 2023-09-23 21:04+0000\n"
"PO-Revision-Date: 2011-01-20 22:11+0100\n"
"Last-Translator: Keld Simonsen <keld@keldix.com>\n"
"Language-Team: Danish <dansk@dansk-gruppen.dk>\n"
@@ -24,27 +24,27 @@ msgstr ""
"X-Bugs: Report translation errors to the Language-Team address.\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-#: gl/lib/argp-help.c:162
+#: gl/lib/argp-help.c:161
#, c-format
msgid "ARGP_HELP_FMT: %s value is less than or equal to %s"
msgstr "ARGP_HELP_FMT: vrdien p %s er mindre end eller lig med %s"
-#: gl/lib/argp-help.c:238
+#: gl/lib/argp-help.c:237
#, c-format
msgid "%.*s: ARGP_HELP_FMT parameter requires a value"
msgstr "%.*s: ARGP_HELP_FMT-parameteren krver en vrdi"
-#: gl/lib/argp-help.c:248
+#: gl/lib/argp-help.c:247
#, c-format
msgid "%.*s: Unknown ARGP_HELP_FMT parameter"
msgstr "%.*s: Ukendt ARGP_HELP_FMT-parameter"
-#: gl/lib/argp-help.c:261
+#: gl/lib/argp-help.c:260
#, c-format
msgid "Garbage in ARGP_HELP_FMT: %s"
msgstr "Snavs i ARGP_HELP_FMT: %s"
-#: gl/lib/argp-help.c:1374
+#: gl/lib/argp-help.c:1373
msgid ""
"Mandatory or optional arguments to long options are also mandatory or "
"optional for any corresponding short options."
@@ -52,72 +52,72 @@ msgstr ""
"Obligatoriske eller valgfrie argumenter til lange flag er ogs obligatoriske "
"eller valgfrie for tilsvarende korte flag."
-#: gl/lib/argp-help.c:1740
+#: gl/lib/argp-help.c:1739
msgid "Usage:"
msgstr "Brug:"
-#: gl/lib/argp-help.c:1744
+#: gl/lib/argp-help.c:1743
msgid " or: "
msgstr " eller: "
-#: gl/lib/argp-help.c:1756
+#: gl/lib/argp-help.c:1755
msgid " [OPTION...]"
msgstr " [FLAG...]"
-#: gl/lib/argp-help.c:1783
+#: gl/lib/argp-help.c:1782
#, fuzzy, c-format
msgid "Try '%s --help' or '%s --usage' for more information.\n"
msgstr "Forsg med '%s --help' eller '%s --usage' for mere information.\n"
-#: gl/lib/argp-help.c:1811
+#: gl/lib/argp-help.c:1810
#, c-format
msgid "Report bugs to %s.\n"
msgstr ""
"Rapportr fejl til %s.\n"
"Send synspunkter p oversttelsen til <dansk@dansk-gruppen.dk>\n"
-#: gl/lib/argp-help.c:2011 gl/lib/error.c:195
+#: gl/lib/argp-help.c:2010 gl/lib/error.c:194
msgid "Unknown system error"
msgstr "Ukendt systemfejl"
-#: gl/lib/argp-parse.c:91
+#: gl/lib/argp-parse.c:90
msgid "give this help list"
msgstr "giv denne hjlpeliste"
-#: gl/lib/argp-parse.c:92
+#: gl/lib/argp-parse.c:91
msgid "give a short usage message"
msgstr "giv en kort meddelelse om brug"
-#: gl/lib/argp-parse.c:93
+#: gl/lib/argp-parse.c:92
msgid "NAME"
msgstr "NAVN"
-#: gl/lib/argp-parse.c:94
+#: gl/lib/argp-parse.c:93
msgid "set the program name"
msgstr "angiv progravnavnet"
-#: gl/lib/argp-parse.c:95
+#: gl/lib/argp-parse.c:94
msgid "SECS"
msgstr "S"
-#: gl/lib/argp-parse.c:96
+#: gl/lib/argp-parse.c:95
msgid "hang for SECS seconds (default 3600)"
msgstr "hng i S sekunder (som standard 3600)"
-#: gl/lib/argp-parse.c:154
+#: gl/lib/argp-parse.c:153
msgid "print program version"
msgstr "udskriv programversion"
-#: gl/lib/argp-parse.c:171
+#: gl/lib/argp-parse.c:170
msgid "(PROGRAM ERROR) No version known!?"
msgstr "(PROGRAMFEJL) Ingen version kendt!?"
-#: gl/lib/argp-parse.c:624
+#: gl/lib/argp-parse.c:623
#, c-format
msgid "%s: Too many arguments\n"
msgstr "%s: For mange argumenter\n"
-#: gl/lib/argp-parse.c:770
+#: gl/lib/argp-parse.c:769
msgid "(PROGRAM ERROR) Option should have been recognized!?"
msgstr "(PROGRAMFEJL) Flaget burde vre blevet genkendt!?"
diff --git a/gl/po/de.po b/gl/po/de.po
index 80d01ab2..f418f1b5 100644
--- a/gl/po/de.po
+++ b/gl/po/de.po
@@ -35,7 +35,7 @@ msgid ""
msgstr ""
"Project-Id-Version: GNU gnulib-4.0.0.2567\n"
"Report-Msgid-Bugs-To: bug-gnulib@gnu.org\n"
-"POT-Creation-Date: 2023-01-08 22:04+0000\n"
+"POT-Creation-Date: 2023-09-23 21:04+0000\n"
"PO-Revision-Date: 2019-05-22 20:00+0200\n"
"Last-Translator: Roland Illig <roland.illig@gmx.de>\n"
"Language-Team: German <translation-team-de@lists.sourceforge.net>\n"
@@ -47,27 +47,27 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 2.2.3\n"
-#: gl/lib/argp-help.c:162
+#: gl/lib/argp-help.c:161
#, c-format
msgid "ARGP_HELP_FMT: %s value is less than or equal to %s"
msgstr "ARGP_HELP_FMT: Der Wert %s ist kleiner oder gleich %s"
-#: gl/lib/argp-help.c:238
+#: gl/lib/argp-help.c:237
#, c-format
msgid "%.*s: ARGP_HELP_FMT parameter requires a value"
msgstr "%.*s: ARGP_HELP_FMT Parameter benötigt einen Wert"
-#: gl/lib/argp-help.c:248
+#: gl/lib/argp-help.c:247
#, c-format
msgid "%.*s: Unknown ARGP_HELP_FMT parameter"
msgstr "%.*s: Unbekannter Parameter für ARGP_HELP_FMT"
-#: gl/lib/argp-help.c:261
+#: gl/lib/argp-help.c:260
#, c-format
msgid "Garbage in ARGP_HELP_FMT: %s"
msgstr "Müll in ARGP_HELP_FMT: %s"
-#: gl/lib/argp-help.c:1374
+#: gl/lib/argp-help.c:1373
msgid ""
"Mandatory or optional arguments to long options are also mandatory or "
"optional for any corresponding short options."
@@ -75,70 +75,70 @@ msgstr ""
"Erforderliche oder optionale Argumente für lange Optionen sind auch für "
"kurze erforderlich bzw. optional."
-#: gl/lib/argp-help.c:1740
+#: gl/lib/argp-help.c:1739
msgid "Usage:"
msgstr "Aufruf:"
-#: gl/lib/argp-help.c:1744
+#: gl/lib/argp-help.c:1743
msgid " or: "
msgstr " oder: "
-#: gl/lib/argp-help.c:1756
+#: gl/lib/argp-help.c:1755
msgid " [OPTION...]"
msgstr " [OPTION…]"
-#: gl/lib/argp-help.c:1783
+#: gl/lib/argp-help.c:1782
#, c-format
msgid "Try '%s --help' or '%s --usage' for more information.\n"
msgstr "»%s --help« oder »%s --usage« liefert weitere Informationen.\n"
-#: gl/lib/argp-help.c:1811
+#: gl/lib/argp-help.c:1810
#, c-format
msgid "Report bugs to %s.\n"
msgstr "Melden Sie Fehler (auf Englisch, mit LC_ALL=C) an <%s>.\n"
-#: gl/lib/argp-help.c:2011 gl/lib/error.c:195
+#: gl/lib/argp-help.c:2010 gl/lib/error.c:194
msgid "Unknown system error"
msgstr "Unbekannter Systemfehler"
-#: gl/lib/argp-parse.c:91
+#: gl/lib/argp-parse.c:90
msgid "give this help list"
msgstr "diese Hilfeliste anzeigen"
-#: gl/lib/argp-parse.c:92
+#: gl/lib/argp-parse.c:91
msgid "give a short usage message"
msgstr "eine Kurzfassung des Aufrufs anzeigen"
-#: gl/lib/argp-parse.c:93
+#: gl/lib/argp-parse.c:92
msgid "NAME"
msgstr "NAME"
-#: gl/lib/argp-parse.c:94
+#: gl/lib/argp-parse.c:93
msgid "set the program name"
msgstr "den Programmnamen festlegen"
-#: gl/lib/argp-parse.c:95
+#: gl/lib/argp-parse.c:94
msgid "SECS"
msgstr "SEK"
-#: gl/lib/argp-parse.c:96
+#: gl/lib/argp-parse.c:95
msgid "hang for SECS seconds (default 3600)"
msgstr "SEK Sekunden warten (Standardwert 3600)"
-#: gl/lib/argp-parse.c:154
+#: gl/lib/argp-parse.c:153
msgid "print program version"
msgstr "Programmversion anzeigen"
-#: gl/lib/argp-parse.c:171
+#: gl/lib/argp-parse.c:170
msgid "(PROGRAM ERROR) No version known!?"
msgstr "(PROGRAMMFEHLER) Keine Version bekannt!?"
-#: gl/lib/argp-parse.c:624
+#: gl/lib/argp-parse.c:623
#, c-format
msgid "%s: Too many arguments\n"
msgstr "%s: zu viele Argumente\n"
-#: gl/lib/argp-parse.c:770
+#: gl/lib/argp-parse.c:769
msgid "(PROGRAM ERROR) Option should have been recognized!?"
msgstr "(PROGRAMMFEHLER) Option hätte erkannt werden müssen!?"
diff --git a/gl/po/el.po b/gl/po/el.po
index 3a6ffa5a..f8d043fb 100644
--- a/gl/po/el.po
+++ b/gl/po/el.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gnulib 3.0.0.6062.a6b16\n"
"Report-Msgid-Bugs-To: bug-gnulib@gnu.org\n"
-"POT-Creation-Date: 2023-01-08 22:04+0000\n"
+"POT-Creation-Date: 2023-09-23 21:04+0000\n"
"PO-Revision-Date: 2012-03-11 11:25+0100\n"
"Last-Translator: Simos Xenitellis <simos.lists@googlemail.com>\n"
"Language-Team: Greek <team@lists.gnome.gr>\n"
@@ -17,53 +17,53 @@ msgstr ""
"Content-Transfer-Encoding: 8-bit\n"
"X-Bugs: Report translation errors to the Language-Team address.\n"
-#: gl/lib/argp-help.c:162
+#: gl/lib/argp-help.c:161
#, c-format
msgid "ARGP_HELP_FMT: %s value is less than or equal to %s"
msgstr ""
-#: gl/lib/argp-help.c:238
+#: gl/lib/argp-help.c:237
#, c-format
msgid "%.*s: ARGP_HELP_FMT parameter requires a value"
msgstr ""
-#: gl/lib/argp-help.c:248
+#: gl/lib/argp-help.c:247
#, c-format
msgid "%.*s: Unknown ARGP_HELP_FMT parameter"
msgstr ""
-#: gl/lib/argp-help.c:261
+#: gl/lib/argp-help.c:260
#, c-format
msgid "Garbage in ARGP_HELP_FMT: %s"
msgstr ""
-#: gl/lib/argp-help.c:1374
+#: gl/lib/argp-help.c:1373
msgid ""
"Mandatory or optional arguments to long options are also mandatory or "
"optional for any corresponding short options."
msgstr ""
-#: gl/lib/argp-help.c:1740
+#: gl/lib/argp-help.c:1739
msgid "Usage:"
msgstr ""
-#: gl/lib/argp-help.c:1744
+#: gl/lib/argp-help.c:1743
msgid " or: "
msgstr ""
#
-#: gl/lib/argp-help.c:1756
+#: gl/lib/argp-help.c:1755
msgid " [OPTION...]"
msgstr " [ΕΠΙΛΟΓΗ...]"
#
-#: gl/lib/argp-help.c:1783
+#: gl/lib/argp-help.c:1782
#, fuzzy, c-format
msgid "Try '%s --help' or '%s --usage' for more information.\n"
msgstr "Δοκιμάστε `%s --help' για περισσότερη βοήθεια.\n"
#
-#: gl/lib/argp-help.c:1811
+#: gl/lib/argp-help.c:1810
#, fuzzy, c-format
msgid "Report bugs to %s.\n"
msgstr ""
@@ -71,51 +71,51 @@ msgstr ""
"Αναφέρατε σφάλματα στο <%s>.\n"
#
-#: gl/lib/argp-help.c:2011 gl/lib/error.c:195
+#: gl/lib/argp-help.c:2010 gl/lib/error.c:194
msgid "Unknown system error"
msgstr "Άγνωστο σφάλμα συστήματος"
-#: gl/lib/argp-parse.c:91
+#: gl/lib/argp-parse.c:90
msgid "give this help list"
msgstr ""
-#: gl/lib/argp-parse.c:92
+#: gl/lib/argp-parse.c:91
msgid "give a short usage message"
msgstr ""
-#: gl/lib/argp-parse.c:93
+#: gl/lib/argp-parse.c:92
msgid "NAME"
msgstr ""
-#: gl/lib/argp-parse.c:94
+#: gl/lib/argp-parse.c:93
msgid "set the program name"
msgstr ""
-#: gl/lib/argp-parse.c:95
+#: gl/lib/argp-parse.c:94
msgid "SECS"
msgstr ""
-#: gl/lib/argp-parse.c:96
+#: gl/lib/argp-parse.c:95
msgid "hang for SECS seconds (default 3600)"
msgstr ""
#
-#: gl/lib/argp-parse.c:154
+#: gl/lib/argp-parse.c:153
#, fuzzy
msgid "print program version"
msgstr "σφάλμα προγράμματος"
-#: gl/lib/argp-parse.c:171
+#: gl/lib/argp-parse.c:170
msgid "(PROGRAM ERROR) No version known!?"
msgstr ""
#
-#: gl/lib/argp-parse.c:624
+#: gl/lib/argp-parse.c:623
#, fuzzy, c-format
msgid "%s: Too many arguments\n"
msgstr "πάρα πολλά ορίσματα"
-#: gl/lib/argp-parse.c:770
+#: gl/lib/argp-parse.c:769
msgid "(PROGRAM ERROR) Option should have been recognized!?"
msgstr ""
diff --git a/gl/po/eo.po b/gl/po/eo.po
index 4668c9ef..320b93a4 100644
--- a/gl/po/eo.po
+++ b/gl/po/eo.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gnulib 4.0.0.2567\n"
"Report-Msgid-Bugs-To: bug-gnulib@gnu.org\n"
-"POT-Creation-Date: 2023-01-08 22:04+0000\n"
+"POT-Creation-Date: 2023-09-23 21:04+0000\n"
"PO-Revision-Date: 2019-05-19 18:26-0300\n"
"Last-Translator: Felipe Castro <fefcas@gmail.com>\n"
"Language-Team: Esperanto <translation-team-eo@lists.sourceforge.net>\n"
@@ -18,27 +18,27 @@ msgstr ""
"X-Bugs: Report translation errors to the Language-Team address.\n"
"X-Generator: Poedit 1.8.11\n"
-#: gl/lib/argp-help.c:162
+#: gl/lib/argp-help.c:161
#, c-format
msgid "ARGP_HELP_FMT: %s value is less than or equal to %s"
msgstr "ARGP_HELP_FMT: valoro de %s estas malpli aŭ egala al %s"
-#: gl/lib/argp-help.c:238
+#: gl/lib/argp-help.c:237
#, c-format
msgid "%.*s: ARGP_HELP_FMT parameter requires a value"
msgstr "%.*s: parametro ARGP_HELP_FMT postulas valoron"
-#: gl/lib/argp-help.c:248
+#: gl/lib/argp-help.c:247
#, c-format
msgid "%.*s: Unknown ARGP_HELP_FMT parameter"
msgstr "%.*s: Nekonata parametro ARGP_HELP_FMT"
-#: gl/lib/argp-help.c:261
+#: gl/lib/argp-help.c:260
#, c-format
msgid "Garbage in ARGP_HELP_FMT: %s"
msgstr "Rubaĵo en ARGP_HELP_FMT: %s"
-#: gl/lib/argp-help.c:1374
+#: gl/lib/argp-help.c:1373
msgid ""
"Mandatory or optional arguments to long options are also mandatory or "
"optional for any corresponding short options."
@@ -46,70 +46,70 @@ msgstr ""
"Devigaj aŭ nedevigaj argumentoj por longaj modifiloj ankaŭ estas devigaj aŭ "
"nedevigaj por iu ajn korespondanta mallonga modifilo."
-#: gl/lib/argp-help.c:1740
+#: gl/lib/argp-help.c:1739
msgid "Usage:"
msgstr "Uzmaniero:"
-#: gl/lib/argp-help.c:1744
+#: gl/lib/argp-help.c:1743
msgid " or: "
msgstr " aŭ: "
-#: gl/lib/argp-help.c:1756
+#: gl/lib/argp-help.c:1755
msgid " [OPTION...]"
msgstr " [MODIFILO...]"
-#: gl/lib/argp-help.c:1783
+#: gl/lib/argp-help.c:1782
#, c-format
msgid "Try '%s --help' or '%s --usage' for more information.\n"
msgstr "Provu '%s --help' aŭ '%s --usage' por pli da informo.\n"
-#: gl/lib/argp-help.c:1811
+#: gl/lib/argp-help.c:1810
#, c-format
msgid "Report bugs to %s.\n"
msgstr "Raportu program-misojn al %s.\n"
-#: gl/lib/argp-help.c:2011 gl/lib/error.c:195
+#: gl/lib/argp-help.c:2010 gl/lib/error.c:194
msgid "Unknown system error"
msgstr "Nekonata sistem-eraro"
-#: gl/lib/argp-parse.c:91
+#: gl/lib/argp-parse.c:90
msgid "give this help list"
msgstr "montri tiun ĉi help-liston"
-#: gl/lib/argp-parse.c:92
+#: gl/lib/argp-parse.c:91
msgid "give a short usage message"
msgstr "montri mallongan mesaĝon pri la uzmaniero"
-#: gl/lib/argp-parse.c:93
+#: gl/lib/argp-parse.c:92
msgid "NAME"
msgstr "NOMO"
-#: gl/lib/argp-parse.c:94
+#: gl/lib/argp-parse.c:93
msgid "set the program name"
msgstr "difini la program-nomon"
-#: gl/lib/argp-parse.c:95
+#: gl/lib/argp-parse.c:94
msgid "SECS"
msgstr "SEK"
-#: gl/lib/argp-parse.c:96
+#: gl/lib/argp-parse.c:95
msgid "hang for SECS seconds (default 3600)"
msgstr "halti dum SEK sekundoj (apriore 3600)"
-#: gl/lib/argp-parse.c:154
+#: gl/lib/argp-parse.c:153
msgid "print program version"
msgstr "montri program-version"
-#: gl/lib/argp-parse.c:171
+#: gl/lib/argp-parse.c:170
msgid "(PROGRAM ERROR) No version known!?"
msgstr "(PROGRAM-ERARO) Neniu versio estas konata!?"
-#: gl/lib/argp-parse.c:624
+#: gl/lib/argp-parse.c:623
#, c-format
msgid "%s: Too many arguments\n"
msgstr "%s: tro da argumentoj\n"
-#: gl/lib/argp-parse.c:770
+#: gl/lib/argp-parse.c:769
msgid "(PROGRAM ERROR) Option should have been recognized!?"
msgstr "(PROGRAM-ERARO) Modifilo devus esti rekonita!?"
diff --git a/gl/po/es.po b/gl/po/es.po
index 5995186a..8f1d29f0 100644
--- a/gl/po/es.po
+++ b/gl/po/es.po
@@ -13,7 +13,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gnulib 4.0.0.2567\n"
"Report-Msgid-Bugs-To: bug-gnulib@gnu.org\n"
-"POT-Creation-Date: 2023-01-08 22:04+0000\n"
+"POT-Creation-Date: 2023-09-23 21:04+0000\n"
"PO-Revision-Date: 2022-04-06 18:22-0500\n"
"Last-Translator: Cristian Othón Martínez Vera <cfuga@cfuga.mx>\n"
"Language-Team: Spanish <es@tp.org.es>\n"
@@ -24,27 +24,27 @@ msgstr ""
"X-Bugs: Report translation errors to the Language-Team address.\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-#: gl/lib/argp-help.c:162
+#: gl/lib/argp-help.c:161
#, c-format
msgid "ARGP_HELP_FMT: %s value is less than or equal to %s"
msgstr "ARGP_HELP_FMT: el valor %s es menor o igual a %s"
-#: gl/lib/argp-help.c:238
+#: gl/lib/argp-help.c:237
#, c-format
msgid "%.*s: ARGP_HELP_FMT parameter requires a value"
msgstr "%.*s: El parámetro ARGP_HELP_FMT requiere de un valor"
-#: gl/lib/argp-help.c:248
+#: gl/lib/argp-help.c:247
#, c-format
msgid "%.*s: Unknown ARGP_HELP_FMT parameter"
msgstr "%.*s: Parámetro de ARGP_HELP_FMT desconocido"
-#: gl/lib/argp-help.c:261
+#: gl/lib/argp-help.c:260
#, c-format
msgid "Garbage in ARGP_HELP_FMT: %s"
msgstr "Basura en ARGP_HELP_FMT: %s"
-#: gl/lib/argp-help.c:1374
+#: gl/lib/argp-help.c:1373
msgid ""
"Mandatory or optional arguments to long options are also mandatory or "
"optional for any corresponding short options."
@@ -52,70 +52,70 @@ msgstr ""
"Los argumentos obligatorios u opcionales para las opciones largas también "
"son obligatorios u opcionales para cualquier opción corta correspondiente."
-#: gl/lib/argp-help.c:1740
+#: gl/lib/argp-help.c:1739
msgid "Usage:"
msgstr "Modo de empleo:"
-#: gl/lib/argp-help.c:1744
+#: gl/lib/argp-help.c:1743
msgid " or: "
msgstr " o:"
-#: gl/lib/argp-help.c:1756
+#: gl/lib/argp-help.c:1755
msgid " [OPTION...]"
msgstr " [OPCIÓN...]"
-#: gl/lib/argp-help.c:1783
+#: gl/lib/argp-help.c:1782
#, c-format
msgid "Try '%s --help' or '%s --usage' for more information.\n"
msgstr "Pruebe '%s --help' ó `%s --usage' para más información.\n"
-#: gl/lib/argp-help.c:1811
+#: gl/lib/argp-help.c:1810
#, c-format
msgid "Report bugs to %s.\n"
msgstr "Reporte bichos a %s.\n"
-#: gl/lib/argp-help.c:2011 gl/lib/error.c:195
+#: gl/lib/argp-help.c:2010 gl/lib/error.c:194
msgid "Unknown system error"
msgstr "Error desconocido de sistema"
-#: gl/lib/argp-parse.c:91
+#: gl/lib/argp-parse.c:90
msgid "give this help list"
msgstr "da esta lista de ayuda"
-#: gl/lib/argp-parse.c:92
+#: gl/lib/argp-parse.c:91
msgid "give a short usage message"
msgstr "da un mensaje corto de modo de empleo"
-#: gl/lib/argp-parse.c:93
+#: gl/lib/argp-parse.c:92
msgid "NAME"
msgstr "NOMBRE"
-#: gl/lib/argp-parse.c:94
+#: gl/lib/argp-parse.c:93
msgid "set the program name"
msgstr "establece el nombre del programa"
-#: gl/lib/argp-parse.c:95
+#: gl/lib/argp-parse.c:94
msgid "SECS"
msgstr "SEGUNDOS"
-#: gl/lib/argp-parse.c:96
+#: gl/lib/argp-parse.c:95
msgid "hang for SECS seconds (default 3600)"
msgstr "espera por SECS segundos (3600 por defecto)"
-#: gl/lib/argp-parse.c:154
+#: gl/lib/argp-parse.c:153
msgid "print program version"
msgstr "muestra la versión del programa"
-#: gl/lib/argp-parse.c:171
+#: gl/lib/argp-parse.c:170
msgid "(PROGRAM ERROR) No version known!?"
msgstr "(ERROR DEL PROGRAMA) ¿¡Sin versión conocida!?"
-#: gl/lib/argp-parse.c:624
+#: gl/lib/argp-parse.c:623
#, c-format
msgid "%s: Too many arguments\n"
msgstr "%s: Demasiados argumentos\n"
-#: gl/lib/argp-parse.c:770
+#: gl/lib/argp-parse.c:769
msgid "(PROGRAM ERROR) Option should have been recognized!?"
msgstr "(ERROR DEL PROGRAMA) ¿¡La opción debería reconocerse!?"
diff --git a/gl/po/et.po b/gl/po/et.po
index 508abe19..d846d349 100644
--- a/gl/po/et.po
+++ b/gl/po/et.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gnulib 2.0.0.3462.e9796\n"
"Report-Msgid-Bugs-To: bug-gnulib@gnu.org\n"
-"POT-Creation-Date: 2023-01-08 22:04+0000\n"
+"POT-Creation-Date: 2023-09-23 21:04+0000\n"
"PO-Revision-Date: 2011-05-19 15:10+0300\n"
"Last-Translator: Toomas Soome <Toomas.Soome@microlink.ee>\n"
"Language-Team: Estonian <linux-ee@lists.eenet.ee>\n"
@@ -18,97 +18,97 @@ msgstr ""
"X-Bugs: Report translation errors to the Language-Team address.\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-#: gl/lib/argp-help.c:162
+#: gl/lib/argp-help.c:161
#, c-format
msgid "ARGP_HELP_FMT: %s value is less than or equal to %s"
msgstr "ARGP_HELP_FMT: %s vrtus on viksem vi vrdne kui %s"
-#: gl/lib/argp-help.c:238
+#: gl/lib/argp-help.c:237
#, c-format
msgid "%.*s: ARGP_HELP_FMT parameter requires a value"
msgstr "%.*s: ARGP_HELP_FMT parameeter nuab vrtust"
-#: gl/lib/argp-help.c:248
+#: gl/lib/argp-help.c:247
#, c-format
msgid "%.*s: Unknown ARGP_HELP_FMT parameter"
msgstr "%.*s: Tundmatu ARGP_HELP_FMT parameeter"
-#: gl/lib/argp-help.c:261
+#: gl/lib/argp-help.c:260
#, c-format
msgid "Garbage in ARGP_HELP_FMT: %s"
msgstr "Prgi ARGP_HELP_FMT sees: %s"
-#: gl/lib/argp-help.c:1374
+#: gl/lib/argp-help.c:1373
msgid ""
"Mandatory or optional arguments to long options are also mandatory or "
"optional for any corresponding short options."
msgstr ""
"Kohustuslikud argumendid pikkadele vtmetele on kohustuslikud ka lhikestele."
-#: gl/lib/argp-help.c:1740
+#: gl/lib/argp-help.c:1739
msgid "Usage:"
msgstr "Kasutamine:"
-#: gl/lib/argp-help.c:1744
+#: gl/lib/argp-help.c:1743
msgid " or: "
msgstr " vi: "
-#: gl/lib/argp-help.c:1756
+#: gl/lib/argp-help.c:1755
msgid " [OPTION...]"
msgstr " [VTI]..."
-#: gl/lib/argp-help.c:1783
+#: gl/lib/argp-help.c:1782
#, fuzzy, c-format
msgid "Try '%s --help' or '%s --usage' for more information.\n"
msgstr "Lisainfo saamiseks proovige `%s --help' vi `%s --usage'.\n"
-#: gl/lib/argp-help.c:1811
+#: gl/lib/argp-help.c:1810
#, c-format
msgid "Report bugs to %s.\n"
msgstr "Vigadest teatage palun aadressil %s.\n"
-#: gl/lib/argp-help.c:2011 gl/lib/error.c:195
+#: gl/lib/argp-help.c:2010 gl/lib/error.c:194
msgid "Unknown system error"
msgstr "Tundmatu ssteemne viga"
-#: gl/lib/argp-parse.c:91
+#: gl/lib/argp-parse.c:90
msgid "give this help list"
msgstr "anna see abiinfo"
-#: gl/lib/argp-parse.c:92
+#: gl/lib/argp-parse.c:91
msgid "give a short usage message"
msgstr "anna kasutamise lhikirjeldus"
-#: gl/lib/argp-parse.c:93
+#: gl/lib/argp-parse.c:92
msgid "NAME"
msgstr "NIMI"
-#: gl/lib/argp-parse.c:94
+#: gl/lib/argp-parse.c:93
msgid "set the program name"
msgstr "sea programmi nimi"
-#: gl/lib/argp-parse.c:95
+#: gl/lib/argp-parse.c:94
msgid "SECS"
msgstr "SEK"
-#: gl/lib/argp-parse.c:96
+#: gl/lib/argp-parse.c:95
msgid "hang for SECS seconds (default 3600)"
msgstr "oota SEK sekundit (vaikimisi 3600)"
-#: gl/lib/argp-parse.c:154
+#: gl/lib/argp-parse.c:153
msgid "print program version"
msgstr "vljasta programmi versioon"
-#: gl/lib/argp-parse.c:171
+#: gl/lib/argp-parse.c:170
msgid "(PROGRAM ERROR) No version known!?"
msgstr "(PROGRAMMI VIGA) Versioon ei ole teada!?"
-#: gl/lib/argp-parse.c:624
+#: gl/lib/argp-parse.c:623
#, c-format
msgid "%s: Too many arguments\n"
msgstr "%s: Liiga palju argumente\n"
-#: gl/lib/argp-parse.c:770
+#: gl/lib/argp-parse.c:769
msgid "(PROGRAM ERROR) Option should have been recognized!?"
msgstr "(PROGRAMMI VIGA) Vti pidanuks olema teada!?"
diff --git a/gl/po/eu.po b/gl/po/eu.po
index cdeb58e6..1183775e 100644
--- a/gl/po/eu.po
+++ b/gl/po/eu.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: coreutils-5.2.1\n"
"Report-Msgid-Bugs-To: bug-gnulib@gnu.org\n"
-"POT-Creation-Date: 2023-01-08 22:04+0000\n"
+"POT-Creation-Date: 2023-09-23 21:04+0000\n"
"PO-Revision-Date: 2005-01-04 20:27+0100\n"
"Last-Translator: Mikel Olasagasti <hey_neken@mundurat.net>\n"
"Language-Team: Basque <translation-team-eu@lists.sourceforge.net>\n"
@@ -19,27 +19,27 @@ msgstr ""
"X-Bugs: Report translation errors to the Language-Team address.\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-#: gl/lib/argp-help.c:162
+#: gl/lib/argp-help.c:161
#, c-format
msgid "ARGP_HELP_FMT: %s value is less than or equal to %s"
msgstr ""
-#: gl/lib/argp-help.c:238
+#: gl/lib/argp-help.c:237
#, c-format
msgid "%.*s: ARGP_HELP_FMT parameter requires a value"
msgstr ""
-#: gl/lib/argp-help.c:248
+#: gl/lib/argp-help.c:247
#, c-format
msgid "%.*s: Unknown ARGP_HELP_FMT parameter"
msgstr ""
-#: gl/lib/argp-help.c:261
+#: gl/lib/argp-help.c:260
#, c-format
msgid "Garbage in ARGP_HELP_FMT: %s"
msgstr ""
-#: gl/lib/argp-help.c:1374
+#: gl/lib/argp-help.c:1373
#, fuzzy
msgid ""
"Mandatory or optional arguments to long options are also mandatory or "
@@ -48,74 +48,74 @@ msgstr ""
"Beharrezkoak diren argumentuak aukera luzeetan, beharrezkoak dira aukera "
"txikietan ere.\n"
-#: gl/lib/argp-help.c:1740
+#: gl/lib/argp-help.c:1739
msgid "Usage:"
msgstr ""
-#: gl/lib/argp-help.c:1744
+#: gl/lib/argp-help.c:1743
msgid " or: "
msgstr ""
-#: gl/lib/argp-help.c:1756
+#: gl/lib/argp-help.c:1755
#, fuzzy
msgid " [OPTION...]"
msgstr "Erabilera: %s [AUKERA]...\n"
-#: gl/lib/argp-help.c:1783
+#: gl/lib/argp-help.c:1782
#, fuzzy, c-format
msgid "Try '%s --help' or '%s --usage' for more information.\n"
msgstr "Saiatu `%s --help' erabiltzen informazio gehiagorako.\n"
-#: gl/lib/argp-help.c:1811
+#: gl/lib/argp-help.c:1810
#, fuzzy, c-format
msgid "Report bugs to %s.\n"
msgstr ""
"\n"
"Programa-erroreen berri emateko idatzi hona: <%s>.\n"
-#: gl/lib/argp-help.c:2011 gl/lib/error.c:195
+#: gl/lib/argp-help.c:2010 gl/lib/error.c:194
msgid "Unknown system error"
msgstr "Sistema-errore ezezaguna"
-#: gl/lib/argp-parse.c:91
+#: gl/lib/argp-parse.c:90
msgid "give this help list"
msgstr ""
-#: gl/lib/argp-parse.c:92
+#: gl/lib/argp-parse.c:91
msgid "give a short usage message"
msgstr ""
-#: gl/lib/argp-parse.c:93
+#: gl/lib/argp-parse.c:92
msgid "NAME"
msgstr "IZENA"
-#: gl/lib/argp-parse.c:94
+#: gl/lib/argp-parse.c:93
msgid "set the program name"
msgstr ""
-#: gl/lib/argp-parse.c:95
+#: gl/lib/argp-parse.c:94
msgid "SECS"
msgstr ""
-#: gl/lib/argp-parse.c:96
+#: gl/lib/argp-parse.c:95
msgid "hang for SECS seconds (default 3600)"
msgstr ""
-#: gl/lib/argp-parse.c:154
+#: gl/lib/argp-parse.c:153
#, fuzzy
msgid "print program version"
msgstr "irakurketa errorea"
-#: gl/lib/argp-parse.c:171
+#: gl/lib/argp-parse.c:170
msgid "(PROGRAM ERROR) No version known!?"
msgstr ""
-#: gl/lib/argp-parse.c:624
+#: gl/lib/argp-parse.c:623
#, fuzzy, c-format
msgid "%s: Too many arguments\n"
msgstr "e"
-#: gl/lib/argp-parse.c:770
+#: gl/lib/argp-parse.c:769
msgid "(PROGRAM ERROR) Option should have been recognized!?"
msgstr ""
diff --git a/gl/po/fi.po b/gl/po/fi.po
index 60588b2a..df4cbad7 100644
--- a/gl/po/fi.po
+++ b/gl/po/fi.po
@@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gnulib 4.0.0.2567\n"
"Report-Msgid-Bugs-To: bug-gnulib@gnu.org\n"
-"POT-Creation-Date: 2023-01-08 22:04+0000\n"
+"POT-Creation-Date: 2023-09-23 21:04+0000\n"
"PO-Revision-Date: 2019-12-26 12:28+0200\n"
"Last-Translator: Lauri Nurmi <lanurmi@iki.fi>\n"
"Language-Team: Finnish <translation-team-fi@lists.sourceforge.net>\n"
@@ -21,27 +21,27 @@ msgstr ""
"Plural-Forms: nplurals=2; plural= ( n!=1) ;\n"
"X-Generator: Poedit 2.2.4\n"
-#: gl/lib/argp-help.c:162
+#: gl/lib/argp-help.c:161
#, c-format
msgid "ARGP_HELP_FMT: %s value is less than or equal to %s"
msgstr "ARGP_HELP_FMT: %s-arvo on pienempi tai yhtäsuuri kuin %s"
-#: gl/lib/argp-help.c:238
+#: gl/lib/argp-help.c:237
#, c-format
msgid "%.*s: ARGP_HELP_FMT parameter requires a value"
msgstr "%.*s: ARGP_HELP_FMT-parametri vaatii arvon"
-#: gl/lib/argp-help.c:248
+#: gl/lib/argp-help.c:247
#, c-format
msgid "%.*s: Unknown ARGP_HELP_FMT parameter"
msgstr "%.*s: Tuntematon ARGP_HELP_FMT-parametri"
-#: gl/lib/argp-help.c:261
+#: gl/lib/argp-help.c:260
#, c-format
msgid "Garbage in ARGP_HELP_FMT: %s"
msgstr "Roskaa ARGP_HELP_FMT:ssä: %s"
-#: gl/lib/argp-help.c:1374
+#: gl/lib/argp-help.c:1373
msgid ""
"Mandatory or optional arguments to long options are also mandatory or "
"optional for any corresponding short options."
@@ -49,70 +49,70 @@ msgstr ""
"Pitkien valitsinten pakolliset tai valinnaiset argumentit ovat pakollisia "
"tai valinnaisia myös vastaaville lyhyille."
-#: gl/lib/argp-help.c:1740
+#: gl/lib/argp-help.c:1739
msgid "Usage:"
msgstr "Käyttö:"
-#: gl/lib/argp-help.c:1744
+#: gl/lib/argp-help.c:1743
msgid " or: "
msgstr " tai: "
-#: gl/lib/argp-help.c:1756
+#: gl/lib/argp-help.c:1755
msgid " [OPTION...]"
msgstr " [VALITSIN...]"
-#: gl/lib/argp-help.c:1783
+#: gl/lib/argp-help.c:1782
#, c-format
msgid "Try '%s --help' or '%s --usage' for more information.\n"
msgstr "Lisätietoja komennolla ”%s --help” tai ”%s --usage”.\n"
-#: gl/lib/argp-help.c:1811
+#: gl/lib/argp-help.c:1810
#, c-format
msgid "Report bugs to %s.\n"
msgstr "Lähetä raportit ohjelmistovioista (englanniksi) osoitteeseen %s.\n"
-#: gl/lib/argp-help.c:2011 gl/lib/error.c:195
+#: gl/lib/argp-help.c:2010 gl/lib/error.c:194
msgid "Unknown system error"
msgstr "Tuntematon järjestelmävirhe"
-#: gl/lib/argp-parse.c:91
+#: gl/lib/argp-parse.c:90
msgid "give this help list"
msgstr "anna tämä opasteluettelo"
-#: gl/lib/argp-parse.c:92
+#: gl/lib/argp-parse.c:91
msgid "give a short usage message"
msgstr "anna lyhyt käyttöohje"
-#: gl/lib/argp-parse.c:93
+#: gl/lib/argp-parse.c:92
msgid "NAME"
msgstr "NIMI"
-#: gl/lib/argp-parse.c:94
+#: gl/lib/argp-parse.c:93
msgid "set the program name"
msgstr "aseta ohjelman nimi"
-#: gl/lib/argp-parse.c:95
+#: gl/lib/argp-parse.c:94
msgid "SECS"
msgstr "S"
-#: gl/lib/argp-parse.c:96
+#: gl/lib/argp-parse.c:95
msgid "hang for SECS seconds (default 3600)"
msgstr "odota S sekuntia (oletus 3600)"
-#: gl/lib/argp-parse.c:154
+#: gl/lib/argp-parse.c:153
msgid "print program version"
msgstr "tulosta ohjelman versio"
-#: gl/lib/argp-parse.c:171
+#: gl/lib/argp-parse.c:170
msgid "(PROGRAM ERROR) No version known!?"
msgstr "(OHJELMAVIRHE) Versiota ei tiedetä!?"
-#: gl/lib/argp-parse.c:624
+#: gl/lib/argp-parse.c:623
#, c-format
msgid "%s: Too many arguments\n"
msgstr "%s: Liian monta argumenttia\n"
-#: gl/lib/argp-parse.c:770
+#: gl/lib/argp-parse.c:769
msgid "(PROGRAM ERROR) Option should have been recognized!?"
msgstr "(OHJELMAVIRHE) Valitsin olisi pitänyt tunnistaa‽"
diff --git a/gl/po/fr.po b/gl/po/fr.po
index 637de76c..060ec525 100644
--- a/gl/po/fr.po
+++ b/gl/po/fr.po
@@ -11,7 +11,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gnulib-4.0.0.2567\n"
"Report-Msgid-Bugs-To: bug-gnulib@gnu.org\n"
-"POT-Creation-Date: 2023-01-08 22:04+0000\n"
+"POT-Creation-Date: 2023-09-23 21:04+0000\n"
"PO-Revision-Date: 2019-05-21 20:15+0200\n"
"Last-Translator: Stéphane Aulery <lkppo@free.fr>\n"
"Language-Team: French <traduc@traduc.org>\n"
@@ -23,27 +23,27 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
"X-Generator: Lokalize 1.2\n"
-#: gl/lib/argp-help.c:162
+#: gl/lib/argp-help.c:161
#, c-format
msgid "ARGP_HELP_FMT: %s value is less than or equal to %s"
msgstr "ARGP_HELP_FMT : la valeur %s est inférieure ou égale à %s"
-#: gl/lib/argp-help.c:238
+#: gl/lib/argp-help.c:237
#, c-format
msgid "%.*s: ARGP_HELP_FMT parameter requires a value"
msgstr "%.*s : le paramètre ARGP_HELP_FMT nécessite une valeur"
-#: gl/lib/argp-help.c:248
+#: gl/lib/argp-help.c:247
#, c-format
msgid "%.*s: Unknown ARGP_HELP_FMT parameter"
msgstr "%.*s : paramètre ARGP_HELP_FMT inconnu"
-#: gl/lib/argp-help.c:261
+#: gl/lib/argp-help.c:260
#, c-format
msgid "Garbage in ARGP_HELP_FMT: %s"
msgstr "Problème dans ARGP_HELP_FMT : %s"
-#: gl/lib/argp-help.c:1374
+#: gl/lib/argp-help.c:1373
msgid ""
"Mandatory or optional arguments to long options are also mandatory or "
"optional for any corresponding short options."
@@ -51,72 +51,72 @@ msgstr ""
"Les arguments obligatoires pour la forme longue des options le sont aussi "
"pour les formes courtes associées."
-#: gl/lib/argp-help.c:1740
+#: gl/lib/argp-help.c:1739
msgid "Usage:"
msgstr "Utilisation :"
-#: gl/lib/argp-help.c:1744
+#: gl/lib/argp-help.c:1743
msgid " or: "
msgstr " ou : "
-#: gl/lib/argp-help.c:1756
+#: gl/lib/argp-help.c:1755
msgid " [OPTION...]"
msgstr " [OPTION...]"
-#: gl/lib/argp-help.c:1783
+#: gl/lib/argp-help.c:1782
#, c-format
msgid "Try '%s --help' or '%s --usage' for more information.\n"
msgstr ""
"Essayez « %s --help » ou « %s --usage » pour obtenir plus de "
"renseignements.\n"
-#: gl/lib/argp-help.c:1811
+#: gl/lib/argp-help.c:1810
#, c-format
msgid "Report bugs to %s.\n"
msgstr "Signalez toute anomalie à %s.\n"
-#: gl/lib/argp-help.c:2011 gl/lib/error.c:195
+#: gl/lib/argp-help.c:2010 gl/lib/error.c:194
msgid "Unknown system error"
msgstr "Erreur système inconnue"
-#: gl/lib/argp-parse.c:91
+#: gl/lib/argp-parse.c:90
msgid "give this help list"
msgstr "affiche cette aide"
-#: gl/lib/argp-parse.c:92
+#: gl/lib/argp-parse.c:91
msgid "give a short usage message"
msgstr "donne un court message d'utilisation"
-#: gl/lib/argp-parse.c:93
+#: gl/lib/argp-parse.c:92
msgid "NAME"
msgstr "NOM"
-#: gl/lib/argp-parse.c:94
+#: gl/lib/argp-parse.c:93
msgid "set the program name"
msgstr "définit le nom du programme"
-#: gl/lib/argp-parse.c:95
+#: gl/lib/argp-parse.c:94
msgid "SECS"
msgstr "SECS"
-#: gl/lib/argp-parse.c:96
+#: gl/lib/argp-parse.c:95
msgid "hang for SECS seconds (default 3600)"
msgstr "suspension pendant SECS secondes (par défaut 3600)"
-#: gl/lib/argp-parse.c:154
+#: gl/lib/argp-parse.c:153
msgid "print program version"
msgstr "affiche la version du programme"
-#: gl/lib/argp-parse.c:171
+#: gl/lib/argp-parse.c:170
msgid "(PROGRAM ERROR) No version known!?"
msgstr "(Erreur du programme) pas de version connue !"
-#: gl/lib/argp-parse.c:624
+#: gl/lib/argp-parse.c:623
#, c-format
msgid "%s: Too many arguments\n"
msgstr "%s : trop d'arguments\n"
-#: gl/lib/argp-parse.c:770
+#: gl/lib/argp-parse.c:769
msgid "(PROGRAM ERROR) Option should have been recognized!?"
msgstr "(Erreur du programme) l'option aurait dû être reconnue !"
diff --git a/gl/po/ga.po b/gl/po/ga.po
index 9e23cec2..11335b6d 100644
--- a/gl/po/ga.po
+++ b/gl/po/ga.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gnulib 1.1\n"
"Report-Msgid-Bugs-To: bug-gnulib@gnu.org\n"
-"POT-Creation-Date: 2023-01-08 22:04+0000\n"
+"POT-Creation-Date: 2023-09-23 21:04+0000\n"
"PO-Revision-Date: 2007-07-20 12:24-0600\n"
"Last-Translator: Kevin Scannell <kscanne@gmail.com>\n"
"Language-Team: Irish <gaeilge-gnulinux@lists.sourceforge.net>\n"
@@ -19,27 +19,27 @@ msgstr ""
"Plural-Forms: nplurals=5; plural=n==1 ? 0 : n==2 ? 1 : (n>2 && n<7) ? 2 :"
"(n>6 && n<11) ? 3 : 4;\n"
-#: gl/lib/argp-help.c:162
+#: gl/lib/argp-help.c:161
#, c-format
msgid "ARGP_HELP_FMT: %s value is less than or equal to %s"
msgstr "ARGP_HELP_FMT: luach %s nos l n n cothrom le %s"
-#: gl/lib/argp-help.c:238
+#: gl/lib/argp-help.c:237
#, c-format
msgid "%.*s: ARGP_HELP_FMT parameter requires a value"
msgstr "%.*s: luach de dhth ar pharaimadar ARGP_HELP_FMT"
-#: gl/lib/argp-help.c:248
+#: gl/lib/argp-help.c:247
#, c-format
msgid "%.*s: Unknown ARGP_HELP_FMT parameter"
msgstr "%.*s: Paraimadar anaithnid ARGP_HELP_FMT"
-#: gl/lib/argp-help.c:261
+#: gl/lib/argp-help.c:260
#, c-format
msgid "Garbage in ARGP_HELP_FMT: %s"
msgstr "Truflais i ARGP_HELP_FMT: %s"
-#: gl/lib/argp-help.c:1374
+#: gl/lib/argp-help.c:1373
msgid ""
"Mandatory or optional arguments to long options are also mandatory or "
"optional for any corresponding short options."
@@ -47,71 +47,71 @@ msgstr ""
"Is riachtanach/roghnach le rogha ghearr aon argint at riachtanach/roghnach "
"leis an rogha fhada."
-#: gl/lib/argp-help.c:1740
+#: gl/lib/argp-help.c:1739
msgid "Usage:"
msgstr "sid:"
-#: gl/lib/argp-help.c:1744
+#: gl/lib/argp-help.c:1743
msgid " or: "
msgstr " n: "
-#: gl/lib/argp-help.c:1756
+#: gl/lib/argp-help.c:1755
msgid " [OPTION...]"
msgstr " [ROGHA...]"
-#: gl/lib/argp-help.c:1783
+#: gl/lib/argp-help.c:1782
#, fuzzy, c-format
msgid "Try '%s --help' or '%s --usage' for more information.\n"
msgstr ""
"Bain triail as `%s --help' n `%s --usage' chun tuilleadh eolais a fhil.\n"
-#: gl/lib/argp-help.c:1811
+#: gl/lib/argp-help.c:1810
#, c-format
msgid "Report bugs to %s.\n"
msgstr "Seol tuairisc fabhtanna chuig %s.\n"
-#: gl/lib/argp-help.c:2011 gl/lib/error.c:195
+#: gl/lib/argp-help.c:2010 gl/lib/error.c:194
msgid "Unknown system error"
msgstr "Earrid chrais anaithnid"
-#: gl/lib/argp-parse.c:91
+#: gl/lib/argp-parse.c:90
msgid "give this help list"
msgstr "taispein an chabhair seo"
-#: gl/lib/argp-parse.c:92
+#: gl/lib/argp-parse.c:91
msgid "give a short usage message"
msgstr "tabhair teachtaireacht bheag side"
-#: gl/lib/argp-parse.c:93
+#: gl/lib/argp-parse.c:92
msgid "NAME"
msgstr "AINM"
-#: gl/lib/argp-parse.c:94
+#: gl/lib/argp-parse.c:93
msgid "set the program name"
msgstr "socraigh ainm an chlir"
-#: gl/lib/argp-parse.c:95
+#: gl/lib/argp-parse.c:94
msgid "SECS"
msgstr "SOIC"
-#: gl/lib/argp-parse.c:96
+#: gl/lib/argp-parse.c:95
msgid "hang for SECS seconds (default 3600)"
msgstr "dan moill SOIC soicind (ramhshocr: 3600)"
-#: gl/lib/argp-parse.c:154
+#: gl/lib/argp-parse.c:153
msgid "print program version"
msgstr "taispein leagan an chlir"
-#: gl/lib/argp-parse.c:171
+#: gl/lib/argp-parse.c:170
msgid "(PROGRAM ERROR) No version known!?"
msgstr "(EARRID CHLIR) Leagan anaithnid!?"
-#: gl/lib/argp-parse.c:624
+#: gl/lib/argp-parse.c:623
#, c-format
msgid "%s: Too many arguments\n"
msgstr "%s: An iomarca argint\n"
-#: gl/lib/argp-parse.c:770
+#: gl/lib/argp-parse.c:769
msgid "(PROGRAM ERROR) Option should have been recognized!?"
msgstr "(EARRID CHLIR) Ba chir an rogha a aithint!?"
diff --git a/gl/po/gl.po b/gl/po/gl.po
index a8e97954..e8d464a0 100644
--- a/gl/po/gl.po
+++ b/gl/po/gl.po
@@ -13,7 +13,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gnulib 3.0.0.6062.a6b16\n"
"Report-Msgid-Bugs-To: bug-gnulib@gnu.org\n"
-"POT-Creation-Date: 2023-01-08 22:04+0000\n"
+"POT-Creation-Date: 2023-09-23 21:04+0000\n"
"PO-Revision-Date: 2012-11-11 13:26+0200\n"
"Last-Translator: Leandro Regueiro <leandro.regueiro@gmail.com>\n"
"Language-Team: Galician <proxecto@trasno.net>\n"
@@ -24,27 +24,27 @@ msgstr ""
"X-Bugs: Report translation errors to the Language-Team address.\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-#: gl/lib/argp-help.c:162
+#: gl/lib/argp-help.c:161
#, c-format
msgid "ARGP_HELP_FMT: %s value is less than or equal to %s"
msgstr ""
-#: gl/lib/argp-help.c:238
+#: gl/lib/argp-help.c:237
#, c-format
msgid "%.*s: ARGP_HELP_FMT parameter requires a value"
msgstr ""
-#: gl/lib/argp-help.c:248
+#: gl/lib/argp-help.c:247
#, c-format
msgid "%.*s: Unknown ARGP_HELP_FMT parameter"
msgstr ""
-#: gl/lib/argp-help.c:261
+#: gl/lib/argp-help.c:260
#, c-format
msgid "Garbage in ARGP_HELP_FMT: %s"
msgstr ""
-#: gl/lib/argp-help.c:1374
+#: gl/lib/argp-help.c:1373
msgid ""
"Mandatory or optional arguments to long options are also mandatory or "
"optional for any corresponding short options."
@@ -52,70 +52,70 @@ msgstr ""
"Os argumentos obrigatorios ou opcionais das opcións longas son tamén "
"obrigatorios ou opcionais para calquera opción curta que se corresponda."
-#: gl/lib/argp-help.c:1740
+#: gl/lib/argp-help.c:1739
msgid "Usage:"
msgstr "Uso:"
-#: gl/lib/argp-help.c:1744
+#: gl/lib/argp-help.c:1743
msgid " or: "
msgstr " ou: "
-#: gl/lib/argp-help.c:1756
+#: gl/lib/argp-help.c:1755
msgid " [OPTION...]"
msgstr " [OPCIÓN...]"
-#: gl/lib/argp-help.c:1783
+#: gl/lib/argp-help.c:1782
#, fuzzy, c-format
msgid "Try '%s --help' or '%s --usage' for more information.\n"
msgstr "Execute «%s --help» ou «%s --usage» para obter máis información.\n"
-#: gl/lib/argp-help.c:1811
+#: gl/lib/argp-help.c:1810
#, c-format
msgid "Report bugs to %s.\n"
msgstr "Envíe os informes de fallo a %s.\n"
-#: gl/lib/argp-help.c:2011 gl/lib/error.c:195
+#: gl/lib/argp-help.c:2010 gl/lib/error.c:194
msgid "Unknown system error"
msgstr "Erro do sistema descoñecido"
-#: gl/lib/argp-parse.c:91
+#: gl/lib/argp-parse.c:90
msgid "give this help list"
msgstr "devolve esta lista de axuda"
-#: gl/lib/argp-parse.c:92
+#: gl/lib/argp-parse.c:91
msgid "give a short usage message"
msgstr "devolve unha mensaxe curta sobre o uso"
-#: gl/lib/argp-parse.c:93
+#: gl/lib/argp-parse.c:92
msgid "NAME"
msgstr "NOME"
-#: gl/lib/argp-parse.c:94
+#: gl/lib/argp-parse.c:93
msgid "set the program name"
msgstr "define o nome do programa"
-#: gl/lib/argp-parse.c:95
+#: gl/lib/argp-parse.c:94
msgid "SECS"
msgstr "SECS"
-#: gl/lib/argp-parse.c:96
+#: gl/lib/argp-parse.c:95
msgid "hang for SECS seconds (default 3600)"
msgstr ""
-#: gl/lib/argp-parse.c:154
+#: gl/lib/argp-parse.c:153
msgid "print program version"
msgstr "mostra a versión do programa"
-#: gl/lib/argp-parse.c:171
+#: gl/lib/argp-parse.c:170
msgid "(PROGRAM ERROR) No version known!?"
msgstr ""
-#: gl/lib/argp-parse.c:624
+#: gl/lib/argp-parse.c:623
#, c-format
msgid "%s: Too many arguments\n"
msgstr "%s: Demasiados argumentos\n"
-#: gl/lib/argp-parse.c:770
+#: gl/lib/argp-parse.c:769
msgid "(PROGRAM ERROR) Option should have been recognized!?"
msgstr ""
diff --git a/gl/po/hu.po b/gl/po/hu.po
index f1a6e6b5..0d740d4a 100644
--- a/gl/po/hu.po
+++ b/gl/po/hu.po
@@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gnulib 3.0.0.6062.a6b16\n"
"Report-Msgid-Bugs-To: bug-gnulib@gnu.org\n"
-"POT-Creation-Date: 2023-01-08 22:04+0000\n"
+"POT-Creation-Date: 2023-09-23 21:04+0000\n"
"PO-Revision-Date: 2014-06-25 19:51+0200\n"
"Last-Translator: Balázs Úr <urbalazs@gmail.com>\n"
"Language-Team: Hungarian <translation-team-hu@lists.sourceforge.net>\n"
@@ -21,27 +21,27 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Lokalize 1.5\n"
-#: gl/lib/argp-help.c:162
+#: gl/lib/argp-help.c:161
#, c-format
msgid "ARGP_HELP_FMT: %s value is less than or equal to %s"
msgstr "ARGP_HELP_FMT: %s értéke nem nagyobb, mint %s"
-#: gl/lib/argp-help.c:238
+#: gl/lib/argp-help.c:237
#, c-format
msgid "%.*s: ARGP_HELP_FMT parameter requires a value"
msgstr "%.*s: Az ARGP_HELP_FMT paraméter értéket igényel"
-#: gl/lib/argp-help.c:248
+#: gl/lib/argp-help.c:247
#, c-format
msgid "%.*s: Unknown ARGP_HELP_FMT parameter"
msgstr "%.*s: Ismeretlen ARGP_HELP_FMT paraméter"
-#: gl/lib/argp-help.c:261
+#: gl/lib/argp-help.c:260
#, c-format
msgid "Garbage in ARGP_HELP_FMT: %s"
msgstr "Szemét az ARGP_HELP_FMT-ben: %s"
-#: gl/lib/argp-help.c:1374
+#: gl/lib/argp-help.c:1373
msgid ""
"Mandatory or optional arguments to long options are also mandatory or "
"optional for any corresponding short options."
@@ -49,71 +49,71 @@ msgstr ""
"Ha egy hosszú kapcsolóhoz kötelező vagy opcionális argumentumot megadni, "
"akkor ez a megfelelő rövid kapcsolónál is kötelező vagy opcionális."
-#: gl/lib/argp-help.c:1740
+#: gl/lib/argp-help.c:1739
msgid "Usage:"
msgstr "Használat:"
-#: gl/lib/argp-help.c:1744
+#: gl/lib/argp-help.c:1743
msgid " or: "
msgstr " vagy: "
-#: gl/lib/argp-help.c:1756
+#: gl/lib/argp-help.c:1755
msgid " [OPTION...]"
msgstr " [KAPCSOLÓ…]"
-#: gl/lib/argp-help.c:1783
+#: gl/lib/argp-help.c:1782
#, fuzzy, c-format
msgid "Try '%s --help' or '%s --usage' for more information.\n"
msgstr ""
"További információkért lásd a(z) „%s --help” vagy „%s --usage” kimenetét.\n"
-#: gl/lib/argp-help.c:1811
+#: gl/lib/argp-help.c:1810
#, c-format
msgid "Report bugs to %s.\n"
msgstr "A hibák itt jelenthetők: %s.\n"
-#: gl/lib/argp-help.c:2011 gl/lib/error.c:195
+#: gl/lib/argp-help.c:2010 gl/lib/error.c:194
msgid "Unknown system error"
msgstr "Ismeretlen rendszerhiba"
-#: gl/lib/argp-parse.c:91
+#: gl/lib/argp-parse.c:90
msgid "give this help list"
msgstr "ezen súgószöveg megjelenítése"
-#: gl/lib/argp-parse.c:92
+#: gl/lib/argp-parse.c:91
msgid "give a short usage message"
msgstr "rövid használati utasítás megjelenítése"
-#: gl/lib/argp-parse.c:93
+#: gl/lib/argp-parse.c:92
msgid "NAME"
msgstr "NÉV"
-#: gl/lib/argp-parse.c:94
+#: gl/lib/argp-parse.c:93
msgid "set the program name"
msgstr "a program nevének beállítása"
-#: gl/lib/argp-parse.c:95
+#: gl/lib/argp-parse.c:94
msgid "SECS"
msgstr "MÁSODPERC"
-#: gl/lib/argp-parse.c:96
+#: gl/lib/argp-parse.c:95
msgid "hang for SECS seconds (default 3600)"
msgstr "szünet MP másodpercre (alapértelmezetten 3600)"
-#: gl/lib/argp-parse.c:154
+#: gl/lib/argp-parse.c:153
msgid "print program version"
msgstr "a programverzió kiírása"
-#: gl/lib/argp-parse.c:171
+#: gl/lib/argp-parse.c:170
msgid "(PROGRAM ERROR) No version known!?"
msgstr "(PROGRAMHIBA) A verzió nem ismert!"
-#: gl/lib/argp-parse.c:624
+#: gl/lib/argp-parse.c:623
#, c-format
msgid "%s: Too many arguments\n"
msgstr "%s: Túl sok argumentum\n"
-#: gl/lib/argp-parse.c:770
+#: gl/lib/argp-parse.c:769
msgid "(PROGRAM ERROR) Option should have been recognized!?"
msgstr "(PROGRAMHIBA) A kapcsolót ismerni kellene?"
diff --git a/gl/po/it.po b/gl/po/it.po
index fe5cc28c..1c634a53 100644
--- a/gl/po/it.po
+++ b/gl/po/it.po
@@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gnulib-4.0.0.2567\n"
"Report-Msgid-Bugs-To: bug-gnulib@gnu.org\n"
-"POT-Creation-Date: 2023-01-08 22:04+0000\n"
+"POT-Creation-Date: 2023-09-23 21:04+0000\n"
"PO-Revision-Date: 2019-05-21 14:07+0200\n"
"Last-Translator: Milo Casagrande <milo@milo.name>\n"
"Language-Team: Italian <tp@lists.linux.it>\n"
@@ -21,27 +21,27 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 2.2.1\n"
-#: gl/lib/argp-help.c:162
+#: gl/lib/argp-help.c:161
#, c-format
msgid "ARGP_HELP_FMT: %s value is less than or equal to %s"
msgstr "ARGP_HELP_FMT: il valore %s è minore o uguale a %s"
-#: gl/lib/argp-help.c:238
+#: gl/lib/argp-help.c:237
#, c-format
msgid "%.*s: ARGP_HELP_FMT parameter requires a value"
msgstr "%.*s: il parametro ARGP_HELP_FMT richiede un valore"
-#: gl/lib/argp-help.c:248
+#: gl/lib/argp-help.c:247
#, c-format
msgid "%.*s: Unknown ARGP_HELP_FMT parameter"
msgstr "%.*s: parametro ARGP_HELP_FMT sconosciuto"
-#: gl/lib/argp-help.c:261
+#: gl/lib/argp-help.c:260
#, c-format
msgid "Garbage in ARGP_HELP_FMT: %s"
msgstr "Spazzatura in ARGP_HELP_FMT: %s"
-#: gl/lib/argp-help.c:1374
+#: gl/lib/argp-help.c:1373
msgid ""
"Mandatory or optional arguments to long options are also mandatory or "
"optional for any corresponding short options."
@@ -49,70 +49,70 @@ msgstr ""
"Gli argomenti obbligatori o facoltativi per le opzioni estese lo sono anche "
"per le corrispondenti opzioni brevi."
-#: gl/lib/argp-help.c:1740
+#: gl/lib/argp-help.c:1739
msgid "Usage:"
msgstr "Uso:"
-#: gl/lib/argp-help.c:1744
+#: gl/lib/argp-help.c:1743
msgid " or: "
msgstr " o: "
-#: gl/lib/argp-help.c:1756
+#: gl/lib/argp-help.c:1755
msgid " [OPTION...]"
msgstr " [OPZIONE...]"
-#: gl/lib/argp-help.c:1783
+#: gl/lib/argp-help.c:1782
#, c-format
msgid "Try '%s --help' or '%s --usage' for more information.\n"
msgstr "Provare «%s --help» o «%s --usage» per ulteriori informazioni.\n"
-#: gl/lib/argp-help.c:1811
+#: gl/lib/argp-help.c:1810
#, c-format
msgid "Report bugs to %s.\n"
msgstr "Segnalare i bug a %s.\n"
-#: gl/lib/argp-help.c:2011 gl/lib/error.c:195
+#: gl/lib/argp-help.c:2010 gl/lib/error.c:194
msgid "Unknown system error"
msgstr "Errore di sistema sconosciuto"
-#: gl/lib/argp-parse.c:91
+#: gl/lib/argp-parse.c:90
msgid "give this help list"
msgstr "Mostra questo aiuto"
-#: gl/lib/argp-parse.c:92
+#: gl/lib/argp-parse.c:91
msgid "give a short usage message"
msgstr "Mostra un breve messaggio sull'uso"
-#: gl/lib/argp-parse.c:93
+#: gl/lib/argp-parse.c:92
msgid "NAME"
msgstr "NOME"
-#: gl/lib/argp-parse.c:94
+#: gl/lib/argp-parse.c:93
msgid "set the program name"
msgstr "Imposta il nome del programma"
-#: gl/lib/argp-parse.c:95
+#: gl/lib/argp-parse.c:94
msgid "SECS"
msgstr "SEC"
-#: gl/lib/argp-parse.c:96
+#: gl/lib/argp-parse.c:95
msgid "hang for SECS seconds (default 3600)"
msgstr "Resta in attesa per SEC secondi (predefinito 3600)"
-#: gl/lib/argp-parse.c:154
+#: gl/lib/argp-parse.c:153
msgid "print program version"
msgstr "Stampa la versione del programma"
-#: gl/lib/argp-parse.c:171
+#: gl/lib/argp-parse.c:170
msgid "(PROGRAM ERROR) No version known!?"
msgstr "(ERRORE DEL PROGRAMMA) Nessuna versione conosciuta."
-#: gl/lib/argp-parse.c:624
+#: gl/lib/argp-parse.c:623
#, c-format
msgid "%s: Too many arguments\n"
msgstr "%s: troppi argomenti\n"
-#: gl/lib/argp-parse.c:770
+#: gl/lib/argp-parse.c:769
msgid "(PROGRAM ERROR) Option should have been recognized!?"
msgstr "(ERRORE DEL PROGRAMMA) L'opzione dovrebbe essere stata riconosciuta."
diff --git a/gl/po/ja.po b/gl/po/ja.po
index 04ae2c88..11069b97 100644
--- a/gl/po/ja.po
+++ b/gl/po/ja.po
@@ -11,7 +11,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gnulib 3.0.0.6062.a6b16\n"
"Report-Msgid-Bugs-To: bug-gnulib@gnu.org\n"
-"POT-Creation-Date: 2023-01-08 22:04+0000\n"
+"POT-Creation-Date: 2023-09-23 21:04+0000\n"
"PO-Revision-Date: 2011-09-02 18:39+0900\n"
"Last-Translator: Yasuaki Taniguchi <yasuakit@gmail.com>\n"
"Language-Team: Japanese <translation-team-ja@lists.sourceforge.net>\n"
@@ -22,27 +22,27 @@ msgstr ""
"X-Bugs: Report translation errors to the Language-Team address.\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-#: gl/lib/argp-help.c:162
+#: gl/lib/argp-help.c:161
#, c-format
msgid "ARGP_HELP_FMT: %s value is less than or equal to %s"
msgstr "ARGP_HELP_FMT: %s の値は %s の値以下です"
-#: gl/lib/argp-help.c:238
+#: gl/lib/argp-help.c:237
#, c-format
msgid "%.*s: ARGP_HELP_FMT parameter requires a value"
msgstr "%.*s: ARGP_HELP_FMT パラメータには値が必要です"
-#: gl/lib/argp-help.c:248
+#: gl/lib/argp-help.c:247
#, c-format
msgid "%.*s: Unknown ARGP_HELP_FMT parameter"
msgstr "%.*s: 不明な ARGP_HELP_FMT パラメータ"
-#: gl/lib/argp-help.c:261
+#: gl/lib/argp-help.c:260
#, c-format
msgid "Garbage in ARGP_HELP_FMT: %s"
msgstr "ARGP_HELP_FMT 中にごみがあります: %s"
-#: gl/lib/argp-help.c:1374
+#: gl/lib/argp-help.c:1373
msgid ""
"Mandatory or optional arguments to long options are also mandatory or "
"optional for any corresponding short options."
@@ -50,24 +50,24 @@ msgstr ""
"長い形式のオプションで必須または任意の引数は、それに対応する短い形式のオプ"
"ションでも同様に必須または任意です。"
-#: gl/lib/argp-help.c:1740
+#: gl/lib/argp-help.c:1739
msgid "Usage:"
msgstr "使用法:"
-#: gl/lib/argp-help.c:1744
+#: gl/lib/argp-help.c:1743
msgid " or: "
msgstr "または: "
-#: gl/lib/argp-help.c:1756
+#: gl/lib/argp-help.c:1755
msgid " [OPTION...]"
msgstr " [OPTION...]"
-#: gl/lib/argp-help.c:1783
+#: gl/lib/argp-help.c:1782
#, fuzzy, c-format
msgid "Try '%s --help' or '%s --usage' for more information.\n"
msgstr "詳細は `%s --help' または `%s --usage' を実行して下さい。\n"
-#: gl/lib/argp-help.c:1811
+#: gl/lib/argp-help.c:1810
#, c-format
msgid "Report bugs to %s.\n"
msgstr ""
@@ -75,48 +75,48 @@ msgstr ""
"翻訳に関するバグは<translation-team-ja@lists.sourceforge.net>に報告してくださ"
"い。\n"
-#: gl/lib/argp-help.c:2011 gl/lib/error.c:195
+#: gl/lib/argp-help.c:2010 gl/lib/error.c:194
msgid "Unknown system error"
msgstr "不明なシステムエラー"
-#: gl/lib/argp-parse.c:91
+#: gl/lib/argp-parse.c:90
msgid "give this help list"
msgstr "このヘルプを表示する"
-#: gl/lib/argp-parse.c:92
+#: gl/lib/argp-parse.c:91
msgid "give a short usage message"
msgstr "短い使用方法を表示する"
-#: gl/lib/argp-parse.c:93
+#: gl/lib/argp-parse.c:92
msgid "NAME"
msgstr "名前"
-#: gl/lib/argp-parse.c:94
+#: gl/lib/argp-parse.c:93
msgid "set the program name"
msgstr "プログラム名を設定する"
-#: gl/lib/argp-parse.c:95
+#: gl/lib/argp-parse.c:94
msgid "SECS"
msgstr "SECS"
-#: gl/lib/argp-parse.c:96
+#: gl/lib/argp-parse.c:95
msgid "hang for SECS seconds (default 3600)"
msgstr "SECS 秒でハング (デフォルト 3600)"
-#: gl/lib/argp-parse.c:154
+#: gl/lib/argp-parse.c:153
msgid "print program version"
msgstr "プログラムのバージョンを表示する"
-#: gl/lib/argp-parse.c:171
+#: gl/lib/argp-parse.c:170
msgid "(PROGRAM ERROR) No version known!?"
msgstr "(プログラムエラー) 不明なバージョン!?"
-#: gl/lib/argp-parse.c:624
+#: gl/lib/argp-parse.c:623
#, c-format
msgid "%s: Too many arguments\n"
msgstr "%s: 引数が多すぎます\n"
-#: gl/lib/argp-parse.c:770
+#: gl/lib/argp-parse.c:769
msgid "(PROGRAM ERROR) Option should have been recognized!?"
msgstr "(プログラムエラー) オプションは認識されているべきです!?"
diff --git a/gl/po/ka.po b/gl/po/ka.po
index 7cdb92dd..4a2e0725 100644
--- a/gl/po/ka.po
+++ b/gl/po/ka.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gnulib 4.0.0.2567\n"
"Report-Msgid-Bugs-To: bug-gnulib@gnu.org\n"
-"POT-Creation-Date: 2023-01-08 22:04+0000\n"
+"POT-Creation-Date: 2023-09-23 21:04+0000\n"
"PO-Revision-Date: 2022-12-23 14:32+0100\n"
"Last-Translator: Temuri Doghonadze <temuri.doghonadze@gmail.com>\n"
"Language-Team: Georgian <(nothing)>\n"
@@ -19,27 +19,27 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 3.2.2\n"
-#: gl/lib/argp-help.c:162
+#: gl/lib/argp-help.c:161
#, c-format
msgid "ARGP_HELP_FMT: %s value is less than or equal to %s"
msgstr "ARGP_HELP_FMT: %s-ის მნიშვნელობა %s-ზე ნაკლები ან ტოლია"
-#: gl/lib/argp-help.c:238
+#: gl/lib/argp-help.c:237
#, c-format
msgid "%.*s: ARGP_HELP_FMT parameter requires a value"
msgstr "%.*s: ARGP_HELP_FMT საჭიროა პარამეტრის მნიშვნელობა"
-#: gl/lib/argp-help.c:248
+#: gl/lib/argp-help.c:247
#, c-format
msgid "%.*s: Unknown ARGP_HELP_FMT parameter"
msgstr "%.*s: ARGP_HELP_FMT-ის უცნობი პარამეტრი"
-#: gl/lib/argp-help.c:261
+#: gl/lib/argp-help.c:260
#, c-format
msgid "Garbage in ARGP_HELP_FMT: %s"
msgstr "ნაგავი ARGP_HELP_FMT-ში: %s"
-#: gl/lib/argp-help.c:1374
+#: gl/lib/argp-help.c:1373
msgid ""
"Mandatory or optional arguments to long options are also mandatory or "
"optional for any corresponding short options."
@@ -47,71 +47,71 @@ msgstr ""
"გრძელი პარამეტრების აუცილებელი ან არასავალდებულო არგუმენტები ასევე "
"აუცილებელი ან არასავალდებულოა მათი მოკლე ვარიანტებისთვისაც."
-#: gl/lib/argp-help.c:1740
+#: gl/lib/argp-help.c:1739
msgid "Usage:"
msgstr "გამოყენება:"
-#: gl/lib/argp-help.c:1744
+#: gl/lib/argp-help.c:1743
msgid " or: "
msgstr " ან: "
-#: gl/lib/argp-help.c:1756
+#: gl/lib/argp-help.c:1755
msgid " [OPTION...]"
msgstr " [პარამეტრი..]"
-#: gl/lib/argp-help.c:1783
+#: gl/lib/argp-help.c:1782
#, c-format
msgid "Try '%s --help' or '%s --usage' for more information.\n"
msgstr "მეტი ინფორმაციისთვის სცადეთ '%s --help' ან '%s --usage'.\n"
-#: gl/lib/argp-help.c:1811
+#: gl/lib/argp-help.c:1810
#, c-format
msgid "Report bugs to %s.\n"
msgstr "შეცდომების შესახებ მიწერეთ: %s\n"
-#: gl/lib/argp-help.c:2011 gl/lib/error.c:195
+#: gl/lib/argp-help.c:2010 gl/lib/error.c:194
msgid "Unknown system error"
msgstr "სისტემის უცნობი შეცდომა"
-#: gl/lib/argp-parse.c:91
+#: gl/lib/argp-parse.c:90
msgid "give this help list"
msgstr "ამ დახმარების სიის მიღება"
-#: gl/lib/argp-parse.c:92
+#: gl/lib/argp-parse.c:91
msgid "give a short usage message"
msgstr "გამოყენების მოკლე შეტყობინების მიღება"
-#: gl/lib/argp-parse.c:93
+#: gl/lib/argp-parse.c:92
msgid "NAME"
msgstr "სახელი"
-#: gl/lib/argp-parse.c:94
+#: gl/lib/argp-parse.c:93
msgid "set the program name"
msgstr "პროგრამის სახელის დაყენება"
-#: gl/lib/argp-parse.c:95
+#: gl/lib/argp-parse.c:94
msgid "SECS"
msgstr "წამი"
-#: gl/lib/argp-parse.c:96
+#: gl/lib/argp-parse.c:95
msgid "hang for SECS seconds (default 3600)"
msgstr ""
"დაეკიდება მითითებული წამების რაოდენობის განმავლობაში (ნაგულისხმები: 3600)"
-#: gl/lib/argp-parse.c:154
+#: gl/lib/argp-parse.c:153
msgid "print program version"
msgstr "პროგრამის ვერსიის დაბეჭდვა"
-#: gl/lib/argp-parse.c:171
+#: gl/lib/argp-parse.c:170
msgid "(PROGRAM ERROR) No version known!?"
msgstr "(PROGRAM ERROR) ვერსია უცნობია!?"
-#: gl/lib/argp-parse.c:624
+#: gl/lib/argp-parse.c:623
#, c-format
msgid "%s: Too many arguments\n"
msgstr "%s: მეტისმეტად ბევრი არგუმენტი\n"
-#: gl/lib/argp-parse.c:770
+#: gl/lib/argp-parse.c:769
msgid "(PROGRAM ERROR) Option should have been recognized!?"
msgstr "(PROGRAM ERROR) პარამეტრი ნაცნობი უნდა ყოფილიყო!?"
diff --git a/gl/po/ko.po b/gl/po/ko.po
index e2000b70..adf3d9ec 100644
--- a/gl/po/ko.po
+++ b/gl/po/ko.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: GNU textutils 2.0.22\n"
"Report-Msgid-Bugs-To: bug-gnulib@gnu.org\n"
-"POT-Creation-Date: 2023-01-08 22:04+0000\n"
+"POT-Creation-Date: 2023-09-23 21:04+0000\n"
"PO-Revision-Date: 2002-07-22 20:02+0900\n"
"Last-Translator: Changwoo Ryu <cwryu@debian.org>\n"
"Language-Team: Korean <translation-team-ko@lists.sourceforge.net>\n"
@@ -17,101 +17,101 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"X-Bugs: Report translation errors to the Language-Team address.\n"
-#: gl/lib/argp-help.c:162
+#: gl/lib/argp-help.c:161
#, c-format
msgid "ARGP_HELP_FMT: %s value is less than or equal to %s"
msgstr ""
-#: gl/lib/argp-help.c:238
+#: gl/lib/argp-help.c:237
#, c-format
msgid "%.*s: ARGP_HELP_FMT parameter requires a value"
msgstr ""
-#: gl/lib/argp-help.c:248
+#: gl/lib/argp-help.c:247
#, c-format
msgid "%.*s: Unknown ARGP_HELP_FMT parameter"
msgstr ""
-#: gl/lib/argp-help.c:261
+#: gl/lib/argp-help.c:260
#, c-format
msgid "Garbage in ARGP_HELP_FMT: %s"
msgstr ""
-#: gl/lib/argp-help.c:1374
+#: gl/lib/argp-help.c:1373
#, fuzzy
msgid ""
"Mandatory or optional arguments to long options are also mandatory or "
"optional for any corresponding short options."
msgstr " ɼǿ ʿ μ ª ɼǿ ʿմϴ.\n"
-#: gl/lib/argp-help.c:1740
+#: gl/lib/argp-help.c:1739
msgid "Usage:"
msgstr ""
-#: gl/lib/argp-help.c:1744
+#: gl/lib/argp-help.c:1743
msgid " or: "
msgstr ""
-#: gl/lib/argp-help.c:1756
+#: gl/lib/argp-help.c:1755
#, fuzzy
msgid " [OPTION...]"
msgstr ": %s [<ɼ>] [<>]...\n"
-#: gl/lib/argp-help.c:1783
+#: gl/lib/argp-help.c:1782
#, fuzzy, c-format
msgid "Try '%s --help' or '%s --usage' for more information.\n"
msgstr " `%s --help' Ͻʽÿ.\n"
-#: gl/lib/argp-help.c:1811
+#: gl/lib/argp-help.c:1810
#, fuzzy, c-format
msgid "Report bugs to %s.\n"
msgstr ""
"\n"
"<%s>() ׸ ˷ ֽʽÿ.\n"
-#: gl/lib/argp-help.c:2011 gl/lib/error.c:195
+#: gl/lib/argp-help.c:2010 gl/lib/error.c:194
msgid "Unknown system error"
msgstr " ý "
-#: gl/lib/argp-parse.c:91
+#: gl/lib/argp-parse.c:90
msgid "give this help list"
msgstr ""
-#: gl/lib/argp-parse.c:92
+#: gl/lib/argp-parse.c:91
msgid "give a short usage message"
msgstr ""
-#: gl/lib/argp-parse.c:93
+#: gl/lib/argp-parse.c:92
msgid "NAME"
msgstr ""
-#: gl/lib/argp-parse.c:94
+#: gl/lib/argp-parse.c:93
msgid "set the program name"
msgstr ""
-#: gl/lib/argp-parse.c:95
+#: gl/lib/argp-parse.c:94
msgid "SECS"
msgstr ""
-#: gl/lib/argp-parse.c:96
+#: gl/lib/argp-parse.c:95
msgid "hang for SECS seconds (default 3600)"
msgstr ""
-#: gl/lib/argp-parse.c:154
+#: gl/lib/argp-parse.c:153
#, fuzzy
msgid "print program version"
msgstr "α׷ "
-#: gl/lib/argp-parse.c:171
+#: gl/lib/argp-parse.c:170
msgid "(PROGRAM ERROR) No version known!?"
msgstr ""
-#: gl/lib/argp-parse.c:624
+#: gl/lib/argp-parse.c:623
#, fuzzy, c-format
msgid "%s: Too many arguments\n"
msgstr "μ ʹ "
-#: gl/lib/argp-parse.c:770
+#: gl/lib/argp-parse.c:769
msgid "(PROGRAM ERROR) Option should have been recognized!?"
msgstr ""
diff --git a/gl/po/man-db-gnulib.pot b/gl/po/man-db-gnulib.pot
index 3516e6aa..2249c5c6 100644
--- a/gl/po/man-db-gnulib.pot
+++ b/gl/po/man-db-gnulib.pot
@@ -6,9 +6,9 @@
#, fuzzy
msgid ""
msgstr ""
-"Project-Id-Version: man-db 2.11.2\n"
+"Project-Id-Version: man-db 2.12.0\n"
"Report-Msgid-Bugs-To: bug-gnulib@gnu.org\n"
-"POT-Creation-Date: 2023-01-08 22:04+0000\n"
+"POT-Creation-Date: 2023-09-23 21:04+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -17,96 +17,96 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
-#: gl/lib/argp-help.c:162
+#: gl/lib/argp-help.c:161
#, c-format
msgid "ARGP_HELP_FMT: %s value is less than or equal to %s"
msgstr ""
-#: gl/lib/argp-help.c:238
+#: gl/lib/argp-help.c:237
#, c-format
msgid "%.*s: ARGP_HELP_FMT parameter requires a value"
msgstr ""
-#: gl/lib/argp-help.c:248
+#: gl/lib/argp-help.c:247
#, c-format
msgid "%.*s: Unknown ARGP_HELP_FMT parameter"
msgstr ""
-#: gl/lib/argp-help.c:261
+#: gl/lib/argp-help.c:260
#, c-format
msgid "Garbage in ARGP_HELP_FMT: %s"
msgstr ""
-#: gl/lib/argp-help.c:1374
+#: gl/lib/argp-help.c:1373
msgid ""
"Mandatory or optional arguments to long options are also mandatory or "
"optional for any corresponding short options."
msgstr ""
-#: gl/lib/argp-help.c:1740
+#: gl/lib/argp-help.c:1739
msgid "Usage:"
msgstr ""
-#: gl/lib/argp-help.c:1744
+#: gl/lib/argp-help.c:1743
msgid " or: "
msgstr ""
-#: gl/lib/argp-help.c:1756
+#: gl/lib/argp-help.c:1755
msgid " [OPTION...]"
msgstr ""
-#: gl/lib/argp-help.c:1783
+#: gl/lib/argp-help.c:1782
#, c-format
msgid "Try '%s --help' or '%s --usage' for more information.\n"
msgstr ""
-#: gl/lib/argp-help.c:1811
+#: gl/lib/argp-help.c:1810
#, c-format
msgid "Report bugs to %s.\n"
msgstr ""
-#: gl/lib/argp-help.c:2011 gl/lib/error.c:195
+#: gl/lib/argp-help.c:2010 gl/lib/error.c:194
msgid "Unknown system error"
msgstr ""
-#: gl/lib/argp-parse.c:91
+#: gl/lib/argp-parse.c:90
msgid "give this help list"
msgstr ""
-#: gl/lib/argp-parse.c:92
+#: gl/lib/argp-parse.c:91
msgid "give a short usage message"
msgstr ""
-#: gl/lib/argp-parse.c:93
+#: gl/lib/argp-parse.c:92
msgid "NAME"
msgstr ""
-#: gl/lib/argp-parse.c:94
+#: gl/lib/argp-parse.c:93
msgid "set the program name"
msgstr ""
-#: gl/lib/argp-parse.c:95
+#: gl/lib/argp-parse.c:94
msgid "SECS"
msgstr ""
-#: gl/lib/argp-parse.c:96
+#: gl/lib/argp-parse.c:95
msgid "hang for SECS seconds (default 3600)"
msgstr ""
-#: gl/lib/argp-parse.c:154
+#: gl/lib/argp-parse.c:153
msgid "print program version"
msgstr ""
-#: gl/lib/argp-parse.c:171
+#: gl/lib/argp-parse.c:170
msgid "(PROGRAM ERROR) No version known!?"
msgstr ""
-#: gl/lib/argp-parse.c:624
+#: gl/lib/argp-parse.c:623
#, c-format
msgid "%s: Too many arguments\n"
msgstr ""
-#: gl/lib/argp-parse.c:770
+#: gl/lib/argp-parse.c:769
msgid "(PROGRAM ERROR) Option should have been recognized!?"
msgstr ""
diff --git a/gl/po/ms.po b/gl/po/ms.po
index 1ba8b2c8..059e76e0 100644
--- a/gl/po/ms.po
+++ b/gl/po/ms.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: coreutils 5.0.90\n"
"Report-Msgid-Bugs-To: bug-gnulib@gnu.org\n"
-"POT-Creation-Date: 2023-01-08 22:04+0000\n"
+"POT-Creation-Date: 2023-09-23 21:04+0000\n"
"PO-Revision-Date: 2003-08-10 16:00+0800\n"
"Last-Translator: Hasbullah Bin Pit <sebol@ikhlas.com>\n"
"Language-Team: Malay <translation-team-ms@lists.sourceforge.net>\n"
@@ -16,27 +16,27 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"X-Bugs: Report translation errors to the Language-Team address.\n"
-#: gl/lib/argp-help.c:162
+#: gl/lib/argp-help.c:161
#, c-format
msgid "ARGP_HELP_FMT: %s value is less than or equal to %s"
msgstr ""
-#: gl/lib/argp-help.c:238
+#: gl/lib/argp-help.c:237
#, c-format
msgid "%.*s: ARGP_HELP_FMT parameter requires a value"
msgstr ""
-#: gl/lib/argp-help.c:248
+#: gl/lib/argp-help.c:247
#, c-format
msgid "%.*s: Unknown ARGP_HELP_FMT parameter"
msgstr ""
-#: gl/lib/argp-help.c:261
+#: gl/lib/argp-help.c:260
#, c-format
msgid "Garbage in ARGP_HELP_FMT: %s"
msgstr ""
-#: gl/lib/argp-help.c:1374
+#: gl/lib/argp-help.c:1373
#, fuzzy
msgid ""
"Mandatory or optional arguments to long options are also mandatory or "
@@ -45,74 +45,74 @@ msgstr ""
"Hujah mandatori kepada opsyen panjang andalah mandatori bagi opsyen pendek "
"juga.\n"
-#: gl/lib/argp-help.c:1740
+#: gl/lib/argp-help.c:1739
msgid "Usage:"
msgstr ""
-#: gl/lib/argp-help.c:1744
+#: gl/lib/argp-help.c:1743
msgid " or: "
msgstr ""
-#: gl/lib/argp-help.c:1756
+#: gl/lib/argp-help.c:1755
#, fuzzy
msgid " [OPTION...]"
msgstr "Pengunaan: %s [OPSYEN]...\n"
-#: gl/lib/argp-help.c:1783
+#: gl/lib/argp-help.c:1782
#, fuzzy, c-format
msgid "Try '%s --help' or '%s --usage' for more information.\n"
msgstr "Cuba `%s --help' untuk maklumat lanjut .\n"
-#: gl/lib/argp-help.c:1811
+#: gl/lib/argp-help.c:1810
#, fuzzy, c-format
msgid "Report bugs to %s.\n"
msgstr ""
"\n"
"Lapor pepijat ke <%s>.\n"
-#: gl/lib/argp-help.c:2011 gl/lib/error.c:195
+#: gl/lib/argp-help.c:2010 gl/lib/error.c:194
msgid "Unknown system error"
msgstr "Ralat sistem yang tidak diketahui"
-#: gl/lib/argp-parse.c:91
+#: gl/lib/argp-parse.c:90
msgid "give this help list"
msgstr ""
-#: gl/lib/argp-parse.c:92
+#: gl/lib/argp-parse.c:91
msgid "give a short usage message"
msgstr ""
-#: gl/lib/argp-parse.c:93
+#: gl/lib/argp-parse.c:92
msgid "NAME"
msgstr "NAMA"
-#: gl/lib/argp-parse.c:94
+#: gl/lib/argp-parse.c:93
msgid "set the program name"
msgstr ""
-#: gl/lib/argp-parse.c:95
+#: gl/lib/argp-parse.c:94
msgid "SECS"
msgstr ""
-#: gl/lib/argp-parse.c:96
+#: gl/lib/argp-parse.c:95
msgid "hang for SECS seconds (default 3600)"
msgstr ""
-#: gl/lib/argp-parse.c:154
+#: gl/lib/argp-parse.c:153
#, fuzzy
msgid "print program version"
msgstr "ralat membaca"
-#: gl/lib/argp-parse.c:171
+#: gl/lib/argp-parse.c:170
msgid "(PROGRAM ERROR) No version known!?"
msgstr ""
-#: gl/lib/argp-parse.c:624
+#: gl/lib/argp-parse.c:623
#, fuzzy, c-format
msgid "%s: Too many arguments\n"
msgstr "terlalu banyak hujah"
-#: gl/lib/argp-parse.c:770
+#: gl/lib/argp-parse.c:769
msgid "(PROGRAM ERROR) Option should have been recognized!?"
msgstr ""
diff --git a/gl/po/nb.po b/gl/po/nb.po
index dd126169..1033c284 100644
--- a/gl/po/nb.po
+++ b/gl/po/nb.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: GNU textutils 2.0.20\n"
"Report-Msgid-Bugs-To: bug-gnulib@gnu.org\n"
-"POT-Creation-Date: 2023-01-08 22:04+0000\n"
+"POT-Creation-Date: 2023-09-23 21:04+0000\n"
"PO-Revision-Date: 2002-01-27 21:35+0100\n"
"Last-Translator: Eivind Tagseth <eivindt@multinet.no>\n"
"Language-Team: Norwegian <i18n-nb@lister.ping.uio.no>\n"
@@ -16,27 +16,27 @@ msgstr ""
"Content-Transfer-Encoding: 8-bit\n"
"X-Bugs: Report translation errors to the Language-Team address.\n"
-#: gl/lib/argp-help.c:162
+#: gl/lib/argp-help.c:161
#, c-format
msgid "ARGP_HELP_FMT: %s value is less than or equal to %s"
msgstr ""
-#: gl/lib/argp-help.c:238
+#: gl/lib/argp-help.c:237
#, c-format
msgid "%.*s: ARGP_HELP_FMT parameter requires a value"
msgstr ""
-#: gl/lib/argp-help.c:248
+#: gl/lib/argp-help.c:247
#, c-format
msgid "%.*s: Unknown ARGP_HELP_FMT parameter"
msgstr ""
-#: gl/lib/argp-help.c:261
+#: gl/lib/argp-help.c:260
#, c-format
msgid "Garbage in ARGP_HELP_FMT: %s"
msgstr ""
-#: gl/lib/argp-help.c:1374
+#: gl/lib/argp-help.c:1373
#, fuzzy
msgid ""
"Mandatory or optional arguments to long options are also mandatory or "
@@ -44,74 +44,74 @@ msgid ""
msgstr ""
"Obligatoriske argmenter til lange flagg er obligatoriske ogs for korte.\n"
-#: gl/lib/argp-help.c:1740
+#: gl/lib/argp-help.c:1739
msgid "Usage:"
msgstr ""
-#: gl/lib/argp-help.c:1744
+#: gl/lib/argp-help.c:1743
msgid " or: "
msgstr ""
-#: gl/lib/argp-help.c:1756
+#: gl/lib/argp-help.c:1755
#, fuzzy
msgid " [OPTION...]"
msgstr "Bruk: %s [FLAGG] [FIL]...\n"
-#: gl/lib/argp-help.c:1783
+#: gl/lib/argp-help.c:1782
#, fuzzy, c-format
msgid "Try '%s --help' or '%s --usage' for more information.\n"
msgstr "Prv med %s --help for mer informasjon.\n"
-#: gl/lib/argp-help.c:1811
+#: gl/lib/argp-help.c:1810
#, fuzzy, c-format
msgid "Report bugs to %s.\n"
msgstr ""
"\n"
"Rapportr feil til <bug-textutils@gnu.org>."
-#: gl/lib/argp-help.c:2011 gl/lib/error.c:195
+#: gl/lib/argp-help.c:2010 gl/lib/error.c:194
msgid "Unknown system error"
msgstr "Ukjent systemfeil"
-#: gl/lib/argp-parse.c:91
+#: gl/lib/argp-parse.c:90
msgid "give this help list"
msgstr ""
-#: gl/lib/argp-parse.c:92
+#: gl/lib/argp-parse.c:91
msgid "give a short usage message"
msgstr ""
-#: gl/lib/argp-parse.c:93
+#: gl/lib/argp-parse.c:92
msgid "NAME"
msgstr ""
-#: gl/lib/argp-parse.c:94
+#: gl/lib/argp-parse.c:93
msgid "set the program name"
msgstr ""
-#: gl/lib/argp-parse.c:95
+#: gl/lib/argp-parse.c:94
msgid "SECS"
msgstr ""
-#: gl/lib/argp-parse.c:96
+#: gl/lib/argp-parse.c:95
msgid "hang for SECS seconds (default 3600)"
msgstr ""
-#: gl/lib/argp-parse.c:154
+#: gl/lib/argp-parse.c:153
#, fuzzy
msgid "print program version"
msgstr "lesefeil"
-#: gl/lib/argp-parse.c:171
+#: gl/lib/argp-parse.c:170
msgid "(PROGRAM ERROR) No version known!?"
msgstr ""
-#: gl/lib/argp-parse.c:624
+#: gl/lib/argp-parse.c:623
#, fuzzy, c-format
msgid "%s: Too many arguments\n"
msgstr "for mange argumenter"
-#: gl/lib/argp-parse.c:770
+#: gl/lib/argp-parse.c:769
msgid "(PROGRAM ERROR) Option should have been recognized!?"
msgstr ""
diff --git a/gl/po/nl.po b/gl/po/nl.po
index a5be3551..83ee22fe 100644
--- a/gl/po/nl.po
+++ b/gl/po/nl.po
@@ -11,7 +11,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gnulib-4.0.0.2567\n"
"Report-Msgid-Bugs-To: bug-gnulib@gnu.org\n"
-"POT-Creation-Date: 2023-01-08 22:04+0000\n"
+"POT-Creation-Date: 2023-09-23 21:04+0000\n"
"PO-Revision-Date: 2019-05-29 13:31+0200\n"
"Last-Translator: Benno Schulenberg <vertaling@coevern.nl>\n"
"Language-Team: Dutch <vertaling@vrijschrift.org>\n"
@@ -22,27 +22,27 @@ msgstr ""
"X-Bugs: Report translation errors to the Language-Team address.\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-#: gl/lib/argp-help.c:162
+#: gl/lib/argp-help.c:161
#, c-format
msgid "ARGP_HELP_FMT: %s value is less than or equal to %s"
msgstr "ARGP_HELP_FMT: waarde voor '%s' is kleiner of gelijk aan %s"
-#: gl/lib/argp-help.c:238
+#: gl/lib/argp-help.c:237
#, c-format
msgid "%.*s: ARGP_HELP_FMT parameter requires a value"
msgstr "%.*s: Parameter in ARGP_HELP_FMT vereist een waarde"
-#: gl/lib/argp-help.c:248
+#: gl/lib/argp-help.c:247
#, c-format
msgid "%.*s: Unknown ARGP_HELP_FMT parameter"
msgstr "%.*s: Onbekende parameter in ARGP_HELP_FMT"
-#: gl/lib/argp-help.c:261
+#: gl/lib/argp-help.c:260
#, c-format
msgid "Garbage in ARGP_HELP_FMT: %s"
msgstr "Rommel in ARGP_HELP_FMT: %s"
-#: gl/lib/argp-help.c:1374
+#: gl/lib/argp-help.c:1373
msgid ""
"Mandatory or optional arguments to long options are also mandatory or "
"optional for any corresponding short options."
@@ -50,72 +50,72 @@ msgstr ""
"Een argument dat verplicht of optioneel is voor een lange optie, is dat\n"
"ook voor de overeenkomstige korte optie."
-#: gl/lib/argp-help.c:1740
+#: gl/lib/argp-help.c:1739
msgid "Usage:"
msgstr "Gebruik: "
-#: gl/lib/argp-help.c:1744
+#: gl/lib/argp-help.c:1743
msgid " or: "
msgstr " of: "
-#: gl/lib/argp-help.c:1756
+#: gl/lib/argp-help.c:1755
msgid " [OPTION...]"
msgstr " [OPTIE...]"
-#: gl/lib/argp-help.c:1783
+#: gl/lib/argp-help.c:1782
#, c-format
msgid "Try '%s --help' or '%s --usage' for more information.\n"
msgstr "Typ '%s --help' of '%s --usage' voor meer informatie.\n"
-#: gl/lib/argp-help.c:1811
+#: gl/lib/argp-help.c:1810
#, c-format
msgid "Report bugs to %s.\n"
msgstr ""
"Rapporteer gebreken in het programma aan %s;\n"
"meld fouten in de vertaling aan <vertaling@vrijschrift.org>.\n"
-#: gl/lib/argp-help.c:2011 gl/lib/error.c:195
+#: gl/lib/argp-help.c:2010 gl/lib/error.c:194
msgid "Unknown system error"
msgstr "Onbekende systeemfout"
-#: gl/lib/argp-parse.c:91
+#: gl/lib/argp-parse.c:90
msgid "give this help list"
msgstr "deze hulptekst tonen"
-#: gl/lib/argp-parse.c:92
+#: gl/lib/argp-parse.c:91
msgid "give a short usage message"
msgstr "een korte gebruikssamenvatting tonen"
-#: gl/lib/argp-parse.c:93
+#: gl/lib/argp-parse.c:92
msgid "NAME"
msgstr "NAAM"
-#: gl/lib/argp-parse.c:94
+#: gl/lib/argp-parse.c:93
msgid "set the program name"
msgstr "de programmanaam instellen"
-#: gl/lib/argp-parse.c:95
+#: gl/lib/argp-parse.c:94
msgid "SECS"
msgstr "SECONDEN"
-#: gl/lib/argp-parse.c:96
+#: gl/lib/argp-parse.c:95
msgid "hang for SECS seconds (default 3600)"
msgstr "dit aantal seconden pauzeren (standaard 3600)"
-#: gl/lib/argp-parse.c:154
+#: gl/lib/argp-parse.c:153
msgid "print program version"
msgstr "programmaversie tonen"
-#: gl/lib/argp-parse.c:171
+#: gl/lib/argp-parse.c:170
msgid "(PROGRAM ERROR) No version known!?"
msgstr "**Interne programmafout**: geen versie bekend!?"
-#: gl/lib/argp-parse.c:624
+#: gl/lib/argp-parse.c:623
#, c-format
msgid "%s: Too many arguments\n"
msgstr "%s: Te veel argumenten\n"
-#: gl/lib/argp-parse.c:770
+#: gl/lib/argp-parse.c:769
msgid "(PROGRAM ERROR) Option should have been recognized!?"
msgstr "**Interne programmafout**: optie had herkend moeten worden!?"
diff --git a/gl/po/pl.po b/gl/po/pl.po
index 33888966..2c37a359 100644
--- a/gl/po/pl.po
+++ b/gl/po/pl.po
@@ -11,7 +11,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gnulib 4.0.0.2567\n"
"Report-Msgid-Bugs-To: bug-gnulib@gnu.org\n"
-"POT-Creation-Date: 2023-01-08 22:04+0000\n"
+"POT-Creation-Date: 2023-09-23 21:04+0000\n"
"PO-Revision-Date: 2019-05-19 20:02+0200\n"
"Last-Translator: Jakub Bogusz <qboosh@pld-linux.org>\n"
"Language-Team: Polish <translation-team-pl@lists.sourceforge.net>\n"
@@ -23,27 +23,27 @@ msgstr ""
"Plural-Forms: nplurals=3; plural=n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
"|| n%100>=20) ? 1 : 2;\n"
-#: gl/lib/argp-help.c:162
+#: gl/lib/argp-help.c:161
#, c-format
msgid "ARGP_HELP_FMT: %s value is less than or equal to %s"
msgstr "ARGP_HELP_FMT: wartość %s jest mniejsza lub równa %s"
-#: gl/lib/argp-help.c:238
+#: gl/lib/argp-help.c:237
#, c-format
msgid "%.*s: ARGP_HELP_FMT parameter requires a value"
msgstr "%.*s: Parametr ARGP_HELP_FMT wymaga podania wartości"
-#: gl/lib/argp-help.c:248
+#: gl/lib/argp-help.c:247
#, c-format
msgid "%.*s: Unknown ARGP_HELP_FMT parameter"
msgstr "%.*s: Nieznany parametr ARGP_HELP_FMT"
-#: gl/lib/argp-help.c:261
+#: gl/lib/argp-help.c:260
#, c-format
msgid "Garbage in ARGP_HELP_FMT: %s"
msgstr "Błędne dane w ARGP_HELP_FMT: %s"
-#: gl/lib/argp-help.c:1374
+#: gl/lib/argp-help.c:1373
msgid ""
"Mandatory or optional arguments to long options are also mandatory or "
"optional for any corresponding short options."
@@ -51,71 +51,71 @@ msgstr ""
"Argumenty obowiązkowe lub opcjonalne dla długich opcji są również "
"obowiązkowe lub opcjonalne dla odpowiednich krótkich opcji."
-#: gl/lib/argp-help.c:1740
+#: gl/lib/argp-help.c:1739
msgid "Usage:"
msgstr "Składnia:"
-#: gl/lib/argp-help.c:1744
+#: gl/lib/argp-help.c:1743
msgid " or: "
msgstr " lub: "
-#: gl/lib/argp-help.c:1756
+#: gl/lib/argp-help.c:1755
msgid " [OPTION...]"
msgstr " [OPCJA...]"
-#: gl/lib/argp-help.c:1783
+#: gl/lib/argp-help.c:1782
#, c-format
msgid "Try '%s --help' or '%s --usage' for more information.\n"
msgstr ""
"Polecenie '%s --help' lub '%s --usage' pozwoli uzyskać więcej informacji.\n"
-#: gl/lib/argp-help.c:1811
+#: gl/lib/argp-help.c:1810
#, c-format
msgid "Report bugs to %s.\n"
msgstr "Prosimy zgłaszać błędy na adres %s.\n"
-#: gl/lib/argp-help.c:2011 gl/lib/error.c:195
+#: gl/lib/argp-help.c:2010 gl/lib/error.c:194
msgid "Unknown system error"
msgstr "Nieznany błąd systemowy"
-#: gl/lib/argp-parse.c:91
+#: gl/lib/argp-parse.c:90
msgid "give this help list"
msgstr "wyświetlenie tego tekstu pomocy"
-#: gl/lib/argp-parse.c:92
+#: gl/lib/argp-parse.c:91
msgid "give a short usage message"
msgstr "wyświetlenie krótkiej informacji o składni polecenia"
-#: gl/lib/argp-parse.c:93
+#: gl/lib/argp-parse.c:92
msgid "NAME"
msgstr "NAZWA"
-#: gl/lib/argp-parse.c:94
+#: gl/lib/argp-parse.c:93
msgid "set the program name"
msgstr "określenie nazwy programu"
-#: gl/lib/argp-parse.c:95
+#: gl/lib/argp-parse.c:94
msgid "SECS"
msgstr "SEK"
-#: gl/lib/argp-parse.c:96
+#: gl/lib/argp-parse.c:95
msgid "hang for SECS seconds (default 3600)"
msgstr "zatrzymanie na SEK sekund (domyślnie 3600)"
-#: gl/lib/argp-parse.c:154
+#: gl/lib/argp-parse.c:153
msgid "print program version"
msgstr "wyświetlenie wersji programu"
-#: gl/lib/argp-parse.c:171
+#: gl/lib/argp-parse.c:170
msgid "(PROGRAM ERROR) No version known!?"
msgstr "(BŁĄD PROGRAMU) Nieznana wersja!?"
-#: gl/lib/argp-parse.c:624
+#: gl/lib/argp-parse.c:623
#, c-format
msgid "%s: Too many arguments\n"
msgstr "%s: Za dużo argumentów\n"
-#: gl/lib/argp-parse.c:770
+#: gl/lib/argp-parse.c:769
msgid "(PROGRAM ERROR) Option should have been recognized!?"
msgstr "(BŁĄD PROGRAMU) Opcja powinna zostać rozpoznana!?"
diff --git a/gl/po/pt.po b/gl/po/pt.po
index 666c79c5..a8a2dba4 100644
--- a/gl/po/pt.po
+++ b/gl/po/pt.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gnulib 4.0.0.2567\n"
"Report-Msgid-Bugs-To: bug-gnulib@gnu.org\n"
-"POT-Creation-Date: 2023-01-08 22:04+0000\n"
+"POT-Creation-Date: 2023-09-23 21:04+0000\n"
"PO-Revision-Date: 2019-05-26 10:40+0100\n"
"Last-Translator: Pedro Albuquerque <palbuquerque73@gmail.com>\n"
"Language-Team: Portuguese <translation-team-pt@lists.sourceforge.net>\n"
@@ -19,27 +19,27 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Gtranslator 2.91.7\n"
-#: gl/lib/argp-help.c:162
+#: gl/lib/argp-help.c:161
#, c-format
msgid "ARGP_HELP_FMT: %s value is less than or equal to %s"
msgstr "ARGP_HELP_FMT: valor %s é menor ou igual que %s"
-#: gl/lib/argp-help.c:238
+#: gl/lib/argp-help.c:237
#, c-format
msgid "%.*s: ARGP_HELP_FMT parameter requires a value"
msgstr "%.*s: o parâmetro ARGP_HELP_FMT requer um valor"
-#: gl/lib/argp-help.c:248
+#: gl/lib/argp-help.c:247
#, c-format
msgid "%.*s: Unknown ARGP_HELP_FMT parameter"
msgstr "%.*s: parâmetro ARGP_HELP_FMT desconhecido"
-#: gl/lib/argp-help.c:261
+#: gl/lib/argp-help.c:260
#, c-format
msgid "Garbage in ARGP_HELP_FMT: %s"
msgstr "Lixo em ARGP_HELP_FMT: %s"
-#: gl/lib/argp-help.c:1374
+#: gl/lib/argp-help.c:1373
msgid ""
"Mandatory or optional arguments to long options are also mandatory or "
"optional for any corresponding short options."
@@ -47,70 +47,70 @@ msgstr ""
"Argumentos obrigatórios ou opcionais para opções longas são igualmente "
"obrigatórios ou opcionais para opções curtas correspondentes."
-#: gl/lib/argp-help.c:1740
+#: gl/lib/argp-help.c:1739
msgid "Usage:"
msgstr "Uso:"
-#: gl/lib/argp-help.c:1744
+#: gl/lib/argp-help.c:1743
msgid " or: "
msgstr " ou: "
-#: gl/lib/argp-help.c:1756
+#: gl/lib/argp-help.c:1755
msgid " [OPTION...]"
msgstr " [OPÇÃO...]"
-#: gl/lib/argp-help.c:1783
+#: gl/lib/argp-help.c:1782
#, c-format
msgid "Try '%s --help' or '%s --usage' for more information.\n"
msgstr "Tente \"%s --help\" ou \"%s --usage\" para mais informação.\n"
-#: gl/lib/argp-help.c:1811
+#: gl/lib/argp-help.c:1810
#, c-format
msgid "Report bugs to %s.\n"
msgstr "Reportar erros a %s.\n"
-#: gl/lib/argp-help.c:2011 gl/lib/error.c:195
+#: gl/lib/argp-help.c:2010 gl/lib/error.c:194
msgid "Unknown system error"
msgstr "Erro de sistema desconhecido"
-#: gl/lib/argp-parse.c:91
+#: gl/lib/argp-parse.c:90
msgid "give this help list"
msgstr "mostra esta lista de ajuda"
-#: gl/lib/argp-parse.c:92
+#: gl/lib/argp-parse.c:91
msgid "give a short usage message"
msgstr "mostrar mensagem curta de uso"
-#: gl/lib/argp-parse.c:93
+#: gl/lib/argp-parse.c:92
msgid "NAME"
msgstr "NOME"
-#: gl/lib/argp-parse.c:94
+#: gl/lib/argp-parse.c:93
msgid "set the program name"
msgstr "define o nome do programa"
-#: gl/lib/argp-parse.c:95
+#: gl/lib/argp-parse.c:94
msgid "SECS"
msgstr "SEGS"
-#: gl/lib/argp-parse.c:96
+#: gl/lib/argp-parse.c:95
msgid "hang for SECS seconds (default 3600)"
msgstr "espera SEGS segundos (predefinição 3600)"
-#: gl/lib/argp-parse.c:154
+#: gl/lib/argp-parse.c:153
msgid "print program version"
msgstr "mostra versão do programa"
-#: gl/lib/argp-parse.c:171
+#: gl/lib/argp-parse.c:170
msgid "(PROGRAM ERROR) No version known!?"
msgstr "(ERRO DO PROGRAMA) Sem versão conhecida!?"
-#: gl/lib/argp-parse.c:624
+#: gl/lib/argp-parse.c:623
#, c-format
msgid "%s: Too many arguments\n"
msgstr "%s: demasiados argumentos\n"
-#: gl/lib/argp-parse.c:770
+#: gl/lib/argp-parse.c:769
msgid "(PROGRAM ERROR) Option should have been recognized!?"
msgstr "(ERRO DO PROGRAMA) A opção devia ter sido reconhecida!?"
diff --git a/gl/po/pt_BR.po b/gl/po/pt_BR.po
index 9a8cce22..6c0f9047 100644
--- a/gl/po/pt_BR.po
+++ b/gl/po/pt_BR.po
@@ -10,7 +10,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gnulib 4.0.0.2567\n"
"Report-Msgid-Bugs-To: bug-gnulib@gnu.org\n"
-"POT-Creation-Date: 2023-01-08 22:04+0000\n"
+"POT-Creation-Date: 2023-09-23 21:04+0000\n"
"PO-Revision-Date: 2019-08-28 15:29-0300\n"
"Last-Translator: Rafael Fontenelle <rafaelff@gnome.org>\n"
"Language-Team: Brazilian Portuguese <ldpbr-translation@lists.sourceforge."
@@ -23,27 +23,27 @@ msgstr ""
"X-Generator: Virtaal 1.0.0-beta1\n"
"X-Bugs: Report translation errors to the Language-Team address.\n"
-#: gl/lib/argp-help.c:162
+#: gl/lib/argp-help.c:161
#, c-format
msgid "ARGP_HELP_FMT: %s value is less than or equal to %s"
msgstr "ARGP_HELP_FMT: O valor %s é menor do que ou igual a %s"
-#: gl/lib/argp-help.c:238
+#: gl/lib/argp-help.c:237
#, c-format
msgid "%.*s: ARGP_HELP_FMT parameter requires a value"
msgstr "%.*s: O parâmetro ARGP_HELP_FMT exige um valor"
-#: gl/lib/argp-help.c:248
+#: gl/lib/argp-help.c:247
#, c-format
msgid "%.*s: Unknown ARGP_HELP_FMT parameter"
msgstr "%.*s: Parâmetro ARGP_HELP_FMT desconhecido"
-#: gl/lib/argp-help.c:261
+#: gl/lib/argp-help.c:260
#, c-format
msgid "Garbage in ARGP_HELP_FMT: %s"
msgstr "Lixo em ARGP_HELP_FMT: %s"
-#: gl/lib/argp-help.c:1374
+#: gl/lib/argp-help.c:1373
msgid ""
"Mandatory or optional arguments to long options are also mandatory or "
"optional for any corresponding short options."
@@ -51,72 +51,72 @@ msgstr ""
"Argumentos obrigatórios ou opcionais para opções longas também o são para "
"quaisquer opções curtas correspondentes."
-#: gl/lib/argp-help.c:1740
+#: gl/lib/argp-help.c:1739
msgid "Usage:"
msgstr "Uso:"
-#: gl/lib/argp-help.c:1744
+#: gl/lib/argp-help.c:1743
msgid " or: "
msgstr " ou: "
# , c-format
-#: gl/lib/argp-help.c:1756
+#: gl/lib/argp-help.c:1755
msgid " [OPTION...]"
msgstr " [OPÇÃO...]"
# , c-format
-#: gl/lib/argp-help.c:1783
+#: gl/lib/argp-help.c:1782
#, c-format
msgid "Try '%s --help' or '%s --usage' for more information.\n"
msgstr "Tente \"%s --help\" ou \"%s --usage\" para mais informação.\n"
-#: gl/lib/argp-help.c:1811
+#: gl/lib/argp-help.c:1810
#, c-format
msgid "Report bugs to %s.\n"
msgstr "Relate erros para %s.\n"
-#: gl/lib/argp-help.c:2011 gl/lib/error.c:195
+#: gl/lib/argp-help.c:2010 gl/lib/error.c:194
msgid "Unknown system error"
msgstr "Erro desconhecido de sistema"
-#: gl/lib/argp-parse.c:91
+#: gl/lib/argp-parse.c:90
msgid "give this help list"
msgstr "fornece esta lista de ajuda"
-#: gl/lib/argp-parse.c:92
+#: gl/lib/argp-parse.c:91
msgid "give a short usage message"
msgstr "fornece uma mensagem de uso curta"
-#: gl/lib/argp-parse.c:93
+#: gl/lib/argp-parse.c:92
msgid "NAME"
msgstr "NOME"
-#: gl/lib/argp-parse.c:94
+#: gl/lib/argp-parse.c:93
msgid "set the program name"
msgstr "define o nome do programa"
-#: gl/lib/argp-parse.c:95
+#: gl/lib/argp-parse.c:94
msgid "SECS"
msgstr "SEGS"
-#: gl/lib/argp-parse.c:96
+#: gl/lib/argp-parse.c:95
msgid "hang for SECS seconds (default 3600)"
msgstr "segura por SEGS segundos (padrão 3600)"
-#: gl/lib/argp-parse.c:154
+#: gl/lib/argp-parse.c:153
msgid "print program version"
msgstr "mostra a versão do programa"
-#: gl/lib/argp-parse.c:171
+#: gl/lib/argp-parse.c:170
msgid "(PROGRAM ERROR) No version known!?"
msgstr "(ERRO NO PROGRAMA) Nenhuma versão conhecida!?"
-#: gl/lib/argp-parse.c:624
+#: gl/lib/argp-parse.c:623
#, c-format
msgid "%s: Too many arguments\n"
msgstr "%s: Número excessivo de argumentos\n"
-#: gl/lib/argp-parse.c:770
+#: gl/lib/argp-parse.c:769
msgid "(PROGRAM ERROR) Option should have been recognized!?"
msgstr "(ERRO NO PROGRAMA) A opção deveria ter sido reconhecida!?"
diff --git a/gl/po/ro.po b/gl/po/ro.po
index 20bc8428..7cfb6ccc 100644
--- a/gl/po/ro.po
+++ b/gl/po/ro.po
@@ -19,7 +19,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gnulib-4.0.0.2567\n"
"Report-Msgid-Bugs-To: bug-gnulib@gnu.org\n"
-"POT-Creation-Date: 2023-01-08 22:04+0000\n"
+"POT-Creation-Date: 2023-09-23 21:04+0000\n"
"PO-Revision-Date: 2022-02-19 23:11+0100\n"
"Last-Translator: Remus-Gabriel Chelu <remusgabriel.chelu@disroot.org>\n"
"Language-Team: Romanian <translation-team-ro@lists.sourceforge.net>\n"
@@ -32,27 +32,27 @@ msgstr ""
"X-Bugs: Report translation errors to the Language-Team address.\n"
"X-Generator: Poedit 3.0.1\n"
-#: gl/lib/argp-help.c:162
+#: gl/lib/argp-help.c:161
#, c-format
msgid "ARGP_HELP_FMT: %s value is less than or equal to %s"
msgstr "ARGP_HELP_FMT: valoarea %s este mai mică sau egală cu %s"
-#: gl/lib/argp-help.c:238
+#: gl/lib/argp-help.c:237
#, c-format
msgid "%.*s: ARGP_HELP_FMT parameter requires a value"
msgstr "%.*s: parametrul ARGP_HELP_FMT necesită o valoare"
-#: gl/lib/argp-help.c:248
+#: gl/lib/argp-help.c:247
#, c-format
msgid "%.*s: Unknown ARGP_HELP_FMT parameter"
msgstr "%.*s: Parametru ARGP_HELP_FMT necunoscut"
-#: gl/lib/argp-help.c:261
+#: gl/lib/argp-help.c:260
#, c-format
msgid "Garbage in ARGP_HELP_FMT: %s"
msgstr "Gunoi(garbage) în ARGP_HELP_FMT: %s"
-#: gl/lib/argp-help.c:1374
+#: gl/lib/argp-help.c:1373
msgid ""
"Mandatory or optional arguments to long options are also mandatory or "
"optional for any corresponding short options."
@@ -61,70 +61,70 @@ msgstr ""
"asemenea, obligatorii sau opționale pentru oricare dintre opțiunile scurte "
"corespunzătoare."
-#: gl/lib/argp-help.c:1740
+#: gl/lib/argp-help.c:1739
msgid "Usage:"
msgstr "Utilizare:"
-#: gl/lib/argp-help.c:1744
+#: gl/lib/argp-help.c:1743
msgid " or: "
msgstr " sau: "
-#: gl/lib/argp-help.c:1756
+#: gl/lib/argp-help.c:1755
msgid " [OPTION...]"
msgstr " [OPȚIUNE...]"
-#: gl/lib/argp-help.c:1783
+#: gl/lib/argp-help.c:1782
#, c-format
msgid "Try '%s --help' or '%s --usage' for more information.\n"
msgstr "Încercați «%s --help» sau «%s --usage» pentru mai multe informații.\n"
-#: gl/lib/argp-help.c:1811
+#: gl/lib/argp-help.c:1810
#, c-format
msgid "Report bugs to %s.\n"
msgstr "Raportați erorile la %s.\n"
-#: gl/lib/argp-help.c:2011 gl/lib/error.c:195
+#: gl/lib/argp-help.c:2010 gl/lib/error.c:194
msgid "Unknown system error"
msgstr "Eroare de sistem necunoscută"
-#: gl/lib/argp-parse.c:91
+#: gl/lib/argp-parse.c:90
msgid "give this help list"
msgstr "afișează această listă de ajutor"
-#: gl/lib/argp-parse.c:92
+#: gl/lib/argp-parse.c:91
msgid "give a short usage message"
msgstr "afișează un mesaj scurt de utlizare"
-#: gl/lib/argp-parse.c:93
+#: gl/lib/argp-parse.c:92
msgid "NAME"
msgstr "NUME"
-#: gl/lib/argp-parse.c:94
+#: gl/lib/argp-parse.c:93
msgid "set the program name"
msgstr "stabilește numele programului"
-#: gl/lib/argp-parse.c:95
+#: gl/lib/argp-parse.c:94
msgid "SECS"
msgstr "SECUNDE"
-#: gl/lib/argp-parse.c:96
+#: gl/lib/argp-parse.c:95
msgid "hang for SECS seconds (default 3600)"
msgstr "întrerupe(hang) pentru acest număr de secunde (implicit 3600)"
-#: gl/lib/argp-parse.c:154
+#: gl/lib/argp-parse.c:153
msgid "print program version"
msgstr "imprimă versiunea programului"
-#: gl/lib/argp-parse.c:171
+#: gl/lib/argp-parse.c:170
msgid "(PROGRAM ERROR) No version known!?"
msgstr "(EROARE DE PROGRAM) Nici o versiune cunoscută!?"
-#: gl/lib/argp-parse.c:624
+#: gl/lib/argp-parse.c:623
#, c-format
msgid "%s: Too many arguments\n"
msgstr "%s: Prea multe argumente\n"
-#: gl/lib/argp-parse.c:770
+#: gl/lib/argp-parse.c:769
msgid "(PROGRAM ERROR) Option should have been recognized!?"
msgstr "(EROARE DE PROGRAM) Opțiunea ar fi trebuit recunoscută!?"
diff --git a/gl/po/ru.gmo b/gl/po/ru.gmo
index dd6c32b1..84e25c95 100644
--- a/gl/po/ru.gmo
+++ b/gl/po/ru.gmo
Binary files differ
diff --git a/gl/po/ru.po b/gl/po/ru.po
index fd220673..5fe97901 100644
--- a/gl/po/ru.po
+++ b/gl/po/ru.po
@@ -3,13 +3,13 @@
# This file is distributed under the same license as the gnulib package.
#
# Sergey Poznyakoff <gray@gnu.org>, 2003,2004,2005.
-# Yuri Kozlov <yuray@komyakino.ru>, 2010, 2011, 2019.
+# Yuri Kozlov <yuray@komyakino.ru>, 2010, 2011, 2019, 2023.
msgid ""
msgstr ""
"Project-Id-Version: gnulib 4.0.0.2567\n"
"Report-Msgid-Bugs-To: bug-gnulib@gnu.org\n"
-"POT-Creation-Date: 2023-01-08 22:04+0000\n"
-"PO-Revision-Date: 2019-05-21 18:46+0300\n"
+"POT-Creation-Date: 2023-09-23 21:04+0000\n"
+"PO-Revision-Date: 2023-07-07 05:18+0300\n"
"Last-Translator: Yuri Kozlov <yuray@komyakino.ru>\n"
"Language-Team: Russian <gnu@d07.ru>\n"
"Language: ru\n"
@@ -19,29 +19,29 @@ msgstr ""
"X-Bugs: Report translation errors to the Language-Team address.\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
-"X-Generator: Lokalize 2.0\n"
+"X-Generator: Lokalize 22.12.3\n"
-#: gl/lib/argp-help.c:162
+#: gl/lib/argp-help.c:161
#, c-format
msgid "ARGP_HELP_FMT: %s value is less than or equal to %s"
msgstr "ARGP_HELP_FMT: значение %s меньше или равно %s"
-#: gl/lib/argp-help.c:238
+#: gl/lib/argp-help.c:237
#, c-format
msgid "%.*s: ARGP_HELP_FMT parameter requires a value"
msgstr "%.*s: параметр ARGP_HELP_FMT требует значения"
-#: gl/lib/argp-help.c:248
+#: gl/lib/argp-help.c:247
#, c-format
msgid "%.*s: Unknown ARGP_HELP_FMT parameter"
msgstr "%.*s: неизвестный параметр ARGP_HELP_FMT"
-#: gl/lib/argp-help.c:261
+#: gl/lib/argp-help.c:260
#, c-format
msgid "Garbage in ARGP_HELP_FMT: %s"
msgstr "Мусор в ARGP_HELP_FMT: %s"
-#: gl/lib/argp-help.c:1374
+#: gl/lib/argp-help.c:1373
msgid ""
"Mandatory or optional arguments to long options are also mandatory or "
"optional for any corresponding short options."
@@ -49,72 +49,72 @@ msgstr ""
"Обязательные или необязательные аргументы к длинным именам параметров "
"остаются таковыми и к соответствующим коротким параметрам."
-#: gl/lib/argp-help.c:1740
+#: gl/lib/argp-help.c:1739
msgid "Usage:"
msgstr "Использование:"
-#: gl/lib/argp-help.c:1744
+#: gl/lib/argp-help.c:1743
msgid " or: "
msgstr " или: "
-#: gl/lib/argp-help.c:1756
+#: gl/lib/argp-help.c:1755
msgid " [OPTION...]"
msgstr " [ПАРАМЕТР...]"
-#: gl/lib/argp-help.c:1783
+#: gl/lib/argp-help.c:1782
#, c-format
msgid "Try '%s --help' or '%s --usage' for more information.\n"
msgstr ""
"Попробуйте «%s --help» или «%s --usage» для получения более подробного "
"описания.\n"
-#: gl/lib/argp-help.c:1811
+#: gl/lib/argp-help.c:1810
#, c-format
msgid "Report bugs to %s.\n"
msgstr "Об ошибках сообщай по адресу %s.\n"
-#: gl/lib/argp-help.c:2011 gl/lib/error.c:195
+#: gl/lib/argp-help.c:2010 gl/lib/error.c:194
msgid "Unknown system error"
msgstr "Неизвестная системная ошибка"
-#: gl/lib/argp-parse.c:91
+#: gl/lib/argp-parse.c:90
msgid "give this help list"
msgstr "показать эту справку"
-#: gl/lib/argp-parse.c:92
+#: gl/lib/argp-parse.c:91
msgid "give a short usage message"
msgstr "показать короткую справку по использованию"
-#: gl/lib/argp-parse.c:93
+#: gl/lib/argp-parse.c:92
msgid "NAME"
msgstr "ИМЯ"
-#: gl/lib/argp-parse.c:94
+#: gl/lib/argp-parse.c:93
msgid "set the program name"
msgstr "задать имя программы"
-#: gl/lib/argp-parse.c:95
+#: gl/lib/argp-parse.c:94
msgid "SECS"
msgstr "СЕКУНД"
-#: gl/lib/argp-parse.c:96
+#: gl/lib/argp-parse.c:95
msgid "hang for SECS seconds (default 3600)"
msgstr "остановиться на заданное число СЕКУНД (по умолчанию 3600)"
-#: gl/lib/argp-parse.c:154
+#: gl/lib/argp-parse.c:153
msgid "print program version"
msgstr "показать номер версии программы"
-#: gl/lib/argp-parse.c:171
+#: gl/lib/argp-parse.c:170
msgid "(PROGRAM ERROR) No version known!?"
msgstr "(ОШИБКА ПРОГРАММЫ) Версия неизвестна!?"
-#: gl/lib/argp-parse.c:624
+#: gl/lib/argp-parse.c:623
#, c-format
msgid "%s: Too many arguments\n"
msgstr "%s: слишком много аргументов\n"
-#: gl/lib/argp-parse.c:770
+#: gl/lib/argp-parse.c:769
msgid "(PROGRAM ERROR) Option should have been recognized!?"
msgstr "(ОШИБКА ПРОГРАММЫ) Параметр должен был быть распознан!?"
@@ -511,7 +511,7 @@ msgstr "стандартные файловые дескрипторы"
#~ msgstr "Системная ошибка"
#~ msgid "Argument buffer too small"
-#~ msgstr "Слишком маленький буфер, указанный в аргументе"
+#~ msgstr "Буфер аргументов слишком мал"
#~ msgid "Processing request in progress"
#~ msgstr "Выполняется обработка запроса"
diff --git a/gl/po/rw.po b/gl/po/rw.po
index fbdda986..3074e791 100644
--- a/gl/po/rw.po
+++ b/gl/po/rw.po
@@ -16,7 +16,7 @@ msgid ""
msgstr ""
"Project-Id-Version: mailutils 0.6\n"
"Report-Msgid-Bugs-To: bug-gnulib@gnu.org\n"
-"POT-Creation-Date: 2023-01-08 22:04+0000\n"
+"POT-Creation-Date: 2023-09-23 21:04+0000\n"
"PO-Revision-Date: 2005-04-04 10:55-0700\n"
"Last-Translator: Steven Michael Murphy <murf@e-tools.com>\n"
"Language-Team: Kinyarwanda <translation-team-rw@lists.sourceforge.net>\n"
@@ -27,12 +27,12 @@ msgstr ""
"X-Bugs: Report translation errors to the Language-Team address.\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-#: gl/lib/argp-help.c:162
+#: gl/lib/argp-help.c:161
#, c-format
msgid "ARGP_HELP_FMT: %s value is less than or equal to %s"
msgstr ""
-#: gl/lib/argp-help.c:238
+#: gl/lib/argp-help.c:237
#, fuzzy, c-format
msgid "%.*s: ARGP_HELP_FMT parameter requires a value"
msgstr ""
@@ -45,7 +45,7 @@ msgstr ""
"X- Generator: KBabel 1. 0\n"
"."
-#: gl/lib/argp-help.c:248
+#: gl/lib/argp-help.c:247
#, fuzzy, c-format
msgid "%.*s: Unknown ARGP_HELP_FMT parameter"
msgstr ""
@@ -58,12 +58,12 @@ msgstr ""
"X- Generator: KBabel 1. 0\n"
"."
-#: gl/lib/argp-help.c:261
+#: gl/lib/argp-help.c:260
#, fuzzy, c-format
msgid "Garbage in ARGP_HELP_FMT: %s"
msgstr "in"
-#: gl/lib/argp-help.c:1374
+#: gl/lib/argp-help.c:1373
#, fuzzy
msgid ""
"Mandatory or optional arguments to long options are also mandatory or "
@@ -72,81 +72,81 @@ msgstr ""
"Cyangwa Bitari ngombwa ingingo Kuri Amahitamo Cyangwa Bitari ngombwa "
"kugirango Amahitamo"
-#: gl/lib/argp-help.c:1740
+#: gl/lib/argp-help.c:1739
msgid "Usage:"
msgstr "Ikoresha:"
-#: gl/lib/argp-help.c:1744
+#: gl/lib/argp-help.c:1743
#, fuzzy
msgid " or: "
msgstr "Cyangwa"
-#: gl/lib/argp-help.c:1756
+#: gl/lib/argp-help.c:1755
msgid " [OPTION...]"
msgstr ""
-#: gl/lib/argp-help.c:1783
+#: gl/lib/argp-help.c:1782
#, fuzzy, c-format
msgid "Try '%s --help' or '%s --usage' for more information.\n"
msgstr "Cyangwa kugirango Birenzeho Ibisobanuro"
-#: gl/lib/argp-help.c:1811
+#: gl/lib/argp-help.c:1810
#, fuzzy, c-format
msgid "Report bugs to %s.\n"
msgstr "Kuri"
-#: gl/lib/argp-help.c:2011 gl/lib/error.c:195
+#: gl/lib/argp-help.c:2010 gl/lib/error.c:194
#, fuzzy
msgid "Unknown system error"
msgstr "Sisitemu Ikosa"
-#: gl/lib/argp-parse.c:91
+#: gl/lib/argp-parse.c:90
#, fuzzy
msgid "give this help list"
msgstr "iyi Ifashayobora Urutonde"
-#: gl/lib/argp-parse.c:92
+#: gl/lib/argp-parse.c:91
#, fuzzy
msgid "give a short usage message"
msgstr "a Ikoresha: Ubutumwa"
-#: gl/lib/argp-parse.c:93
+#: gl/lib/argp-parse.c:92
#, fuzzy
msgid "NAME"
msgstr "Izina"
-#: gl/lib/argp-parse.c:94
+#: gl/lib/argp-parse.c:93
#, fuzzy
msgid "set the program name"
msgstr "i Porogaramu Izina:"
# offmgr/source\offapp\dialog\optgdlg.src:OFA_TP_MISC.FT_HELPAGENT_TIME_UNIT.text
-#: gl/lib/argp-parse.c:95
+#: gl/lib/argp-parse.c:94
#, fuzzy
msgid "SECS"
msgstr "amasogonda"
-#: gl/lib/argp-parse.c:96
+#: gl/lib/argp-parse.c:95
#, fuzzy
msgid "hang for SECS seconds (default 3600)"
msgstr "kugirango amasogonda Mburabuzi"
-#: gl/lib/argp-parse.c:154
+#: gl/lib/argp-parse.c:153
#, fuzzy
msgid "print program version"
msgstr "Porogaramu Verisiyo"
-#: gl/lib/argp-parse.c:171
+#: gl/lib/argp-parse.c:170
#, fuzzy
msgid "(PROGRAM ERROR) No version known!?"
msgstr "(Verisiyo"
-#: gl/lib/argp-parse.c:624
+#: gl/lib/argp-parse.c:623
#, fuzzy, c-format
msgid "%s: Too many arguments\n"
msgstr "ingingo"
-#: gl/lib/argp-parse.c:770
+#: gl/lib/argp-parse.c:769
#, fuzzy
msgid "(PROGRAM ERROR) Option should have been recognized!?"
msgstr "(Verisiyo"
diff --git a/gl/po/sk.po b/gl/po/sk.po
index 081095a5..331a213d 100644
--- a/gl/po/sk.po
+++ b/gl/po/sk.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: textutils 2.0.14\n"
"Report-Msgid-Bugs-To: bug-gnulib@gnu.org\n"
-"POT-Creation-Date: 2023-01-08 22:04+0000\n"
+"POT-Creation-Date: 2023-09-23 21:04+0000\n"
"PO-Revision-Date: 2001-06-08 22:10 +02:00\n"
"Last-Translator: Stanislav Meduna <stano@trillian.eunet.sk>\n"
"Language-Team: Slovak <sk-i18n@rak.isternet.sk>\n"
@@ -16,51 +16,51 @@ msgstr ""
"Content-Transfer-Encoding: 8-bit\n"
"X-Bugs: Report translation errors to the Language-Team address.\n"
-#: gl/lib/argp-help.c:162
+#: gl/lib/argp-help.c:161
#, c-format
msgid "ARGP_HELP_FMT: %s value is less than or equal to %s"
msgstr ""
-#: gl/lib/argp-help.c:238
+#: gl/lib/argp-help.c:237
#, c-format
msgid "%.*s: ARGP_HELP_FMT parameter requires a value"
msgstr ""
-#: gl/lib/argp-help.c:248
+#: gl/lib/argp-help.c:247
#, c-format
msgid "%.*s: Unknown ARGP_HELP_FMT parameter"
msgstr ""
-#: gl/lib/argp-help.c:261
+#: gl/lib/argp-help.c:260
#, c-format
msgid "Garbage in ARGP_HELP_FMT: %s"
msgstr ""
-#: gl/lib/argp-help.c:1374
+#: gl/lib/argp-help.c:1373
msgid ""
"Mandatory or optional arguments to long options are also mandatory or "
"optional for any corresponding short options."
msgstr ""
-#: gl/lib/argp-help.c:1740
+#: gl/lib/argp-help.c:1739
msgid "Usage:"
msgstr ""
-#: gl/lib/argp-help.c:1744
+#: gl/lib/argp-help.c:1743
msgid " or: "
msgstr ""
-#: gl/lib/argp-help.c:1756
+#: gl/lib/argp-help.c:1755
#, fuzzy
msgid " [OPTION...]"
msgstr "Pouitie: %s [PREPNA] [SBOR]...\n"
-#: gl/lib/argp-help.c:1783
+#: gl/lib/argp-help.c:1782
#, fuzzy, c-format
msgid "Try '%s --help' or '%s --usage' for more information.\n"
msgstr "Viac informci zskate prkazom `%s --help'.\n"
-#: gl/lib/argp-help.c:1811
+#: gl/lib/argp-help.c:1810
#, fuzzy, c-format
msgid "Report bugs to %s.\n"
msgstr ""
@@ -69,49 +69,49 @@ msgstr ""
"anglicky), pripomienky k prekladu zasielajte na adresu <sk@li.org> "
"(slovensky)."
-#: gl/lib/argp-help.c:2011 gl/lib/error.c:195
+#: gl/lib/argp-help.c:2010 gl/lib/error.c:194
msgid "Unknown system error"
msgstr "Neznma systmov chyba"
-#: gl/lib/argp-parse.c:91
+#: gl/lib/argp-parse.c:90
msgid "give this help list"
msgstr ""
-#: gl/lib/argp-parse.c:92
+#: gl/lib/argp-parse.c:91
msgid "give a short usage message"
msgstr ""
-#: gl/lib/argp-parse.c:93
+#: gl/lib/argp-parse.c:92
msgid "NAME"
msgstr ""
-#: gl/lib/argp-parse.c:94
+#: gl/lib/argp-parse.c:93
msgid "set the program name"
msgstr ""
-#: gl/lib/argp-parse.c:95
+#: gl/lib/argp-parse.c:94
msgid "SECS"
msgstr ""
-#: gl/lib/argp-parse.c:96
+#: gl/lib/argp-parse.c:95
msgid "hang for SECS seconds (default 3600)"
msgstr ""
-#: gl/lib/argp-parse.c:154
+#: gl/lib/argp-parse.c:153
#, fuzzy
msgid "print program version"
msgstr "chyba pri tan"
-#: gl/lib/argp-parse.c:171
+#: gl/lib/argp-parse.c:170
msgid "(PROGRAM ERROR) No version known!?"
msgstr ""
-#: gl/lib/argp-parse.c:624
+#: gl/lib/argp-parse.c:623
#, fuzzy, c-format
msgid "%s: Too many arguments\n"
msgstr "prli vea argumentov"
-#: gl/lib/argp-parse.c:770
+#: gl/lib/argp-parse.c:769
msgid "(PROGRAM ERROR) Option should have been recognized!?"
msgstr ""
diff --git a/gl/po/sl.po b/gl/po/sl.po
index 37acfd34..27bcd7dc 100644
--- a/gl/po/sl.po
+++ b/gl/po/sl.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gnulib 3.0.0.6062.a6b16\n"
"Report-Msgid-Bugs-To: bug-gnulib@gnu.org\n"
-"POT-Creation-Date: 2023-01-08 22:04+0000\n"
+"POT-Creation-Date: 2023-09-23 21:04+0000\n"
"PO-Revision-Date: 2012-05-20 13:08+0200\n"
"Last-Translator: Primož Peterlin <primozz.peterlin@gmail.com>\n"
"Language-Team: Slovenian <translation-team-sl@lists.sourceforge.net>\n"
@@ -20,27 +20,27 @@ msgstr ""
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 1 : n%100==2 ? 2 : n%100==3 || "
"n%100==4 ? 3 : 0);\n"
-#: gl/lib/argp-help.c:162
+#: gl/lib/argp-help.c:161
#, c-format
msgid "ARGP_HELP_FMT: %s value is less than or equal to %s"
msgstr "ARGP_HELP_FMT: vrednost %s je manjša ali enaka %s"
-#: gl/lib/argp-help.c:238
+#: gl/lib/argp-help.c:237
#, c-format
msgid "%.*s: ARGP_HELP_FMT parameter requires a value"
msgstr "%.*s: ARGP_HELP_FMT parameter zahteva vrednost"
-#: gl/lib/argp-help.c:248
+#: gl/lib/argp-help.c:247
#, c-format
msgid "%.*s: Unknown ARGP_HELP_FMT parameter"
msgstr "%.*s: Neznan parameter ARGP_HELP_FMT"
-#: gl/lib/argp-help.c:261
+#: gl/lib/argp-help.c:260
#, c-format
msgid "Garbage in ARGP_HELP_FMT: %s"
msgstr "Smetje v ARGP_HELP_FMT: %s"
-#: gl/lib/argp-help.c:1374
+#: gl/lib/argp-help.c:1373
msgid ""
"Mandatory or optional arguments to long options are also mandatory or "
"optional for any corresponding short options."
@@ -48,70 +48,70 @@ msgstr ""
"Argumenti, navedeni kot obvezni ali neobvezni pri dolgi obliki izbire, so "
"obvezni ali neobvezni tudi pri vseh odgovarjajočih kratkih oblikah."
-#: gl/lib/argp-help.c:1740
+#: gl/lib/argp-help.c:1739
msgid "Usage:"
msgstr "Uporaba:"
-#: gl/lib/argp-help.c:1744
+#: gl/lib/argp-help.c:1743
msgid " or: "
msgstr " ali: "
-#: gl/lib/argp-help.c:1756
+#: gl/lib/argp-help.c:1755
msgid " [OPTION...]"
msgstr " [IZBIRA...]"
-#: gl/lib/argp-help.c:1783
+#: gl/lib/argp-help.c:1782
#, fuzzy, c-format
msgid "Try '%s --help' or '%s --usage' for more information.\n"
msgstr "Poskusite »%s --help« ali »%s --usage« za izčrpnejša navodila.\n"
-#: gl/lib/argp-help.c:1811
+#: gl/lib/argp-help.c:1810
#, c-format
msgid "Report bugs to %s.\n"
msgstr "Poročila o napakah: %s\n"
-#: gl/lib/argp-help.c:2011 gl/lib/error.c:195
+#: gl/lib/argp-help.c:2010 gl/lib/error.c:194
msgid "Unknown system error"
msgstr "Neznana sistemska napaka"
-#: gl/lib/argp-parse.c:91
+#: gl/lib/argp-parse.c:90
msgid "give this help list"
msgstr "poda ta seznam pomoči"
-#: gl/lib/argp-parse.c:92
+#: gl/lib/argp-parse.c:91
msgid "give a short usage message"
msgstr "poda kratka navodila"
-#: gl/lib/argp-parse.c:93
+#: gl/lib/argp-parse.c:92
msgid "NAME"
msgstr "IME"
-#: gl/lib/argp-parse.c:94
+#: gl/lib/argp-parse.c:93
msgid "set the program name"
msgstr "nastavi ime programa"
-#: gl/lib/argp-parse.c:95
+#: gl/lib/argp-parse.c:94
msgid "SECS"
msgstr "SEK"
-#: gl/lib/argp-parse.c:96
+#: gl/lib/argp-parse.c:95
msgid "hang for SECS seconds (default 3600)"
msgstr "zastane za SEK sekund (privzeto 3600)"
-#: gl/lib/argp-parse.c:154
+#: gl/lib/argp-parse.c:153
msgid "print program version"
msgstr "izpiše različico programa"
-#: gl/lib/argp-parse.c:171
+#: gl/lib/argp-parse.c:170
msgid "(PROGRAM ERROR) No version known!?"
msgstr "(PROGRAMSKA NAPAKA) Različice ni moč ugotoviti?!"
-#: gl/lib/argp-parse.c:624
+#: gl/lib/argp-parse.c:623
#, c-format
msgid "%s: Too many arguments\n"
msgstr "%s: Preveč argumentov\n"
-#: gl/lib/argp-parse.c:770
+#: gl/lib/argp-parse.c:769
msgid "(PROGRAM ERROR) Option should have been recognized!?"
msgstr "(PROGRAMSKA NAPAKA) Izbire bi morali prepoznati?!"
diff --git a/gl/po/sr.po b/gl/po/sr.po
index 7a8ec63a..2a3b5c6d 100644
--- a/gl/po/sr.po
+++ b/gl/po/sr.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gnulib-4.0.0.2567\n"
"Report-Msgid-Bugs-To: bug-gnulib@gnu.org\n"
-"POT-Creation-Date: 2023-01-08 22:04+0000\n"
+"POT-Creation-Date: 2023-09-23 21:04+0000\n"
"PO-Revision-Date: 2020-04-20 09:38+0200\n"
"Last-Translator: Мирослав Николић <miroslavnikolic@rocketmail.com>\n"
"Language-Team: Serbian <(nothing)>\n"
@@ -19,27 +19,27 @@ msgstr ""
"X-Generator: Virtaal 0.7.1\n"
"X-Bugs: Report translation errors to the Language-Team address.\n"
-#: gl/lib/argp-help.c:162
+#: gl/lib/argp-help.c:161
#, c-format
msgid "ARGP_HELP_FMT: %s value is less than or equal to %s"
msgstr "ARGP_HELP_FMT: %s вредност је мања од или једнака са %s"
-#: gl/lib/argp-help.c:238
+#: gl/lib/argp-help.c:237
#, c-format
msgid "%.*s: ARGP_HELP_FMT parameter requires a value"
msgstr "%.*s: „ARGP_HELP_FMT“ параметар захтева вредност"
-#: gl/lib/argp-help.c:248
+#: gl/lib/argp-help.c:247
#, c-format
msgid "%.*s: Unknown ARGP_HELP_FMT parameter"
msgstr "%.*s: Непознат параметар „ARGP_HELP_FMT“"
-#: gl/lib/argp-help.c:261
+#: gl/lib/argp-help.c:260
#, c-format
msgid "Garbage in ARGP_HELP_FMT: %s"
msgstr "Ђубре у „ARGP_HELP_FMT“-у: %s"
-#: gl/lib/argp-help.c:1374
+#: gl/lib/argp-help.c:1373
msgid ""
"Mandatory or optional arguments to long options are also mandatory or "
"optional for any corresponding short options."
@@ -47,70 +47,70 @@ msgstr ""
"Обавезни или опционални аргументи за дуге опције су такође обавезни или "
"опционални за све одговарајуће кратке опције."
-#: gl/lib/argp-help.c:1740
+#: gl/lib/argp-help.c:1739
msgid "Usage:"
msgstr "Употреба:"
-#: gl/lib/argp-help.c:1744
+#: gl/lib/argp-help.c:1743
msgid " or: "
msgstr " или: "
-#: gl/lib/argp-help.c:1756
+#: gl/lib/argp-help.c:1755
msgid " [OPTION...]"
msgstr " [ОПЦИЈА...]"
-#: gl/lib/argp-help.c:1783
+#: gl/lib/argp-help.c:1782
#, c-format
msgid "Try '%s --help' or '%s --usage' for more information.\n"
msgstr "Покушајте „%s --help“ или „%s --usage“ за више података.\n"
-#: gl/lib/argp-help.c:1811
+#: gl/lib/argp-help.c:1810
#, c-format
msgid "Report bugs to %s.\n"
msgstr "Грешке пријавите на %s.\n"
-#: gl/lib/argp-help.c:2011 gl/lib/error.c:195
+#: gl/lib/argp-help.c:2010 gl/lib/error.c:194
msgid "Unknown system error"
msgstr "Непозната грешка система"
-#: gl/lib/argp-parse.c:91
+#: gl/lib/argp-parse.c:90
msgid "give this help list"
msgstr "приказује овај списак помоћи"
-#: gl/lib/argp-parse.c:92
+#: gl/lib/argp-parse.c:91
msgid "give a short usage message"
msgstr "приказује кратку поруку коришћења"
-#: gl/lib/argp-parse.c:93
+#: gl/lib/argp-parse.c:92
msgid "NAME"
msgstr "НАЗИВ"
-#: gl/lib/argp-parse.c:94
+#: gl/lib/argp-parse.c:93
msgid "set the program name"
msgstr "поставља назив програма"
-#: gl/lib/argp-parse.c:95
+#: gl/lib/argp-parse.c:94
msgid "SECS"
msgstr "СЕКУНДЕ"
-#: gl/lib/argp-parse.c:96
+#: gl/lib/argp-parse.c:95
msgid "hang for SECS seconds (default 3600)"
msgstr "стаје за СЕКУНДЕ секунде (основно је 3600)"
-#: gl/lib/argp-parse.c:154
+#: gl/lib/argp-parse.c:153
msgid "print program version"
msgstr "исписује издање програма"
-#: gl/lib/argp-parse.c:171
+#: gl/lib/argp-parse.c:170
msgid "(PROGRAM ERROR) No version known!?"
msgstr "(ГРЕШКА ПРОГРАМА) Није познато издање!?"
-#: gl/lib/argp-parse.c:624
+#: gl/lib/argp-parse.c:623
#, c-format
msgid "%s: Too many arguments\n"
msgstr "%s: Превише аргумената\n"
-#: gl/lib/argp-parse.c:770
+#: gl/lib/argp-parse.c:769
msgid "(PROGRAM ERROR) Option should have been recognized!?"
msgstr "(ГРЕШКА ПРОГРАМА) Опција треба да буде препозната!?"
diff --git a/gl/po/sv.po b/gl/po/sv.po
index 403da157..e248d2cc 100644
--- a/gl/po/sv.po
+++ b/gl/po/sv.po
@@ -12,7 +12,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gnulib 4.0.0.2567\n"
"Report-Msgid-Bugs-To: bug-gnulib@gnu.org\n"
-"POT-Creation-Date: 2023-01-08 22:04+0000\n"
+"POT-Creation-Date: 2023-09-23 21:04+0000\n"
"PO-Revision-Date: 2020-05-28 21:40+0200\n"
"Last-Translator: Göran Uddeborg <goeran@uddeborg.se>\n"
"Language-Team: Swedish <tp-sv-list@lists.sourceforge.net>\n"
@@ -23,27 +23,27 @@ msgstr ""
"X-Bugs: Report translation errors to the Language-Team address.\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-#: gl/lib/argp-help.c:162
+#: gl/lib/argp-help.c:161
#, c-format
msgid "ARGP_HELP_FMT: %s value is less than or equal to %s"
msgstr "ARGP_HELP_FMT: värdet på %s är mindre än eller lika med %s"
-#: gl/lib/argp-help.c:238
+#: gl/lib/argp-help.c:237
#, c-format
msgid "%.*s: ARGP_HELP_FMT parameter requires a value"
msgstr "%.*s: ARGP_HELP_FMT-parametern kräver ett värde"
-#: gl/lib/argp-help.c:248
+#: gl/lib/argp-help.c:247
#, c-format
msgid "%.*s: Unknown ARGP_HELP_FMT parameter"
msgstr "%.*s: Okänd ARGP_HELP_FMT-parameter"
-#: gl/lib/argp-help.c:261
+#: gl/lib/argp-help.c:260
#, c-format
msgid "Garbage in ARGP_HELP_FMT: %s"
msgstr "Skräp i ARGP_HELP_FMT: %s"
-#: gl/lib/argp-help.c:1374
+#: gl/lib/argp-help.c:1373
msgid ""
"Mandatory or optional arguments to long options are also mandatory or "
"optional for any corresponding short options."
@@ -51,24 +51,24 @@ msgstr ""
"Obligatoriska eller valfria argument till långa flaggor är obligatoriska "
"eller valfria även för motsvarande korta flaggor."
-#: gl/lib/argp-help.c:1740
+#: gl/lib/argp-help.c:1739
msgid "Usage:"
msgstr "Användning:"
-#: gl/lib/argp-help.c:1744
+#: gl/lib/argp-help.c:1743
msgid " or: "
msgstr " eller: "
-#: gl/lib/argp-help.c:1756
+#: gl/lib/argp-help.c:1755
msgid " [OPTION...]"
msgstr " [FLAGGA...]"
-#: gl/lib/argp-help.c:1783
+#: gl/lib/argp-help.c:1782
#, c-format
msgid "Try '%s --help' or '%s --usage' for more information.\n"
msgstr "Försök med ”%s --help” eller ”%s --usage” för mer information.\n"
-#: gl/lib/argp-help.c:1811
+#: gl/lib/argp-help.c:1810
#, c-format
msgid "Report bugs to %s.\n"
msgstr ""
@@ -76,48 +76,48 @@ msgstr ""
"Skicka synpunkter på översättningen till <tp-sv-list@lists.sourceforge."
"net>.\n"
-#: gl/lib/argp-help.c:2011 gl/lib/error.c:195
+#: gl/lib/argp-help.c:2010 gl/lib/error.c:194
msgid "Unknown system error"
msgstr "Okänt systemfel"
-#: gl/lib/argp-parse.c:91
+#: gl/lib/argp-parse.c:90
msgid "give this help list"
msgstr "ge denna hjälplista"
-#: gl/lib/argp-parse.c:92
+#: gl/lib/argp-parse.c:91
msgid "give a short usage message"
msgstr "ge ett kort användningsmeddelande"
-#: gl/lib/argp-parse.c:93
+#: gl/lib/argp-parse.c:92
msgid "NAME"
msgstr "NAMN"
-#: gl/lib/argp-parse.c:94
+#: gl/lib/argp-parse.c:93
msgid "set the program name"
msgstr "ange programnamnet"
-#: gl/lib/argp-parse.c:95
+#: gl/lib/argp-parse.c:94
msgid "SECS"
msgstr "S"
-#: gl/lib/argp-parse.c:96
+#: gl/lib/argp-parse.c:95
msgid "hang for SECS seconds (default 3600)"
msgstr "häng i S sekunder (3600 som standard)"
-#: gl/lib/argp-parse.c:154
+#: gl/lib/argp-parse.c:153
msgid "print program version"
msgstr "skriv ut programversion"
-#: gl/lib/argp-parse.c:171
+#: gl/lib/argp-parse.c:170
msgid "(PROGRAM ERROR) No version known!?"
msgstr "(PROGRAMFEL) Ingen version känd!?"
-#: gl/lib/argp-parse.c:624
+#: gl/lib/argp-parse.c:623
#, c-format
msgid "%s: Too many arguments\n"
msgstr "%s: För många argument\n"
-#: gl/lib/argp-parse.c:770
+#: gl/lib/argp-parse.c:769
msgid "(PROGRAM ERROR) Option should have been recognized!?"
msgstr "(PROGRAMFEL) Flaggan borde ha känts igen!?"
diff --git a/gl/po/tr.po b/gl/po/tr.po
index 26522c4a..67792ea6 100644
--- a/gl/po/tr.po
+++ b/gl/po/tr.po
@@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: coreutils 5.3.0\n"
"Report-Msgid-Bugs-To: bug-gnulib@gnu.org\n"
-"POT-Creation-Date: 2023-01-08 22:04+0000\n"
+"POT-Creation-Date: 2023-09-23 21:04+0000\n"
"PO-Revision-Date: 2005-03-14 04:17+0200\n"
"Last-Translator: Deniz Akkus Kanca <deniz@arayan.com>\n"
"Language-Team: Turkish <gnu-tr-u12a@lists.sourceforge.net>\n"
@@ -21,28 +21,28 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: KBabel 1.9.1\n"
-#: gl/lib/argp-help.c:162
+#: gl/lib/argp-help.c:161
#, c-format
msgid "ARGP_HELP_FMT: %s value is less than or equal to %s"
msgstr ""
-#: gl/lib/argp-help.c:238
+#: gl/lib/argp-help.c:237
#, c-format
msgid "%.*s: ARGP_HELP_FMT parameter requires a value"
msgstr ""
-#: gl/lib/argp-help.c:248
+#: gl/lib/argp-help.c:247
#, c-format
msgid "%.*s: Unknown ARGP_HELP_FMT parameter"
msgstr ""
-#: gl/lib/argp-help.c:261
+#: gl/lib/argp-help.c:260
#, c-format
msgid "Garbage in ARGP_HELP_FMT: %s"
msgstr ""
#
-#: gl/lib/argp-help.c:1374
+#: gl/lib/argp-help.c:1373
#, fuzzy
msgid ""
"Mandatory or optional arguments to long options are also mandatory or "
@@ -51,25 +51,25 @@ msgstr ""
"Uzun seçenekler için zorunlu olan argümanlar kısa seçenekler için de "
"zorunludur.\n"
-#: gl/lib/argp-help.c:1740
+#: gl/lib/argp-help.c:1739
msgid "Usage:"
msgstr ""
-#: gl/lib/argp-help.c:1744
+#: gl/lib/argp-help.c:1743
msgid " or: "
msgstr ""
-#: gl/lib/argp-help.c:1756
+#: gl/lib/argp-help.c:1755
#, fuzzy
msgid " [OPTION...]"
msgstr "Kullanım: %s [SEÇENEK]...\n"
-#: gl/lib/argp-help.c:1783
+#: gl/lib/argp-help.c:1782
#, fuzzy, c-format
msgid "Try '%s --help' or '%s --usage' for more information.\n"
msgstr "Daha fazla bilgi için `%s --help' yazın.\n"
-#: gl/lib/argp-help.c:1811
+#: gl/lib/argp-help.c:1810
#, fuzzy, c-format
msgid "Report bugs to %s.\n"
msgstr ""
@@ -77,49 +77,49 @@ msgstr ""
"Yazılım hatalarını <%s> adresine,\n"
"çeviri hatalarını <gnu-tr@belgeler.org> adresine bildirin.\n"
-#: gl/lib/argp-help.c:2011 gl/lib/error.c:195
+#: gl/lib/argp-help.c:2010 gl/lib/error.c:194
msgid "Unknown system error"
msgstr "Bilinmeyen sistem hatası"
-#: gl/lib/argp-parse.c:91
+#: gl/lib/argp-parse.c:90
msgid "give this help list"
msgstr ""
-#: gl/lib/argp-parse.c:92
+#: gl/lib/argp-parse.c:91
msgid "give a short usage message"
msgstr ""
-#: gl/lib/argp-parse.c:93
+#: gl/lib/argp-parse.c:92
msgid "NAME"
msgstr "İSİM"
-#: gl/lib/argp-parse.c:94
+#: gl/lib/argp-parse.c:93
msgid "set the program name"
msgstr ""
-#: gl/lib/argp-parse.c:95
+#: gl/lib/argp-parse.c:94
msgid "SECS"
msgstr ""
-#: gl/lib/argp-parse.c:96
+#: gl/lib/argp-parse.c:95
msgid "hang for SECS seconds (default 3600)"
msgstr ""
-#: gl/lib/argp-parse.c:154
+#: gl/lib/argp-parse.c:153
#, fuzzy
msgid "print program version"
msgstr "okuma hatası"
-#: gl/lib/argp-parse.c:171
+#: gl/lib/argp-parse.c:170
msgid "(PROGRAM ERROR) No version known!?"
msgstr ""
-#: gl/lib/argp-parse.c:624
+#: gl/lib/argp-parse.c:623
#, fuzzy, c-format
msgid "%s: Too many arguments\n"
msgstr "%s: çok fazla sağlama satırı"
-#: gl/lib/argp-parse.c:770
+#: gl/lib/argp-parse.c:769
msgid "(PROGRAM ERROR) Option should have been recognized!?"
msgstr ""
diff --git a/gl/po/uk.po b/gl/po/uk.po
index 355adaa4..bac95e2a 100644
--- a/gl/po/uk.po
+++ b/gl/po/uk.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gnulib 4.0.0.2567\n"
"Report-Msgid-Bugs-To: bug-gnulib@gnu.org\n"
-"POT-Creation-Date: 2023-01-08 22:04+0000\n"
+"POT-Creation-Date: 2023-09-23 21:04+0000\n"
"PO-Revision-Date: 2019-05-19 14:26+0300\n"
"Last-Translator: Yuri Chornoivan <yurchor@ukr.net>\n"
"Language-Team: Ukrainian <trans-uk@lists.fedoraproject.org>\n"
@@ -21,97 +21,97 @@ msgstr ""
"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
"X-Generator: Lokalize 19.03.70\n"
-#: gl/lib/argp-help.c:162
+#: gl/lib/argp-help.c:161
#, c-format
msgid "ARGP_HELP_FMT: %s value is less than or equal to %s"
msgstr "ARGP_HELP_FMT: значення %s є менше ніж або дорівнює %s"
-#: gl/lib/argp-help.c:238
+#: gl/lib/argp-help.c:237
#, c-format
msgid "%.*s: ARGP_HELP_FMT parameter requires a value"
msgstr "%.*s: параметр ARGP_HELP_FMT вимагає значення"
-#: gl/lib/argp-help.c:248
+#: gl/lib/argp-help.c:247
#, c-format
msgid "%.*s: Unknown ARGP_HELP_FMT parameter"
msgstr "%.*s: Невідомий параметр ARGP_HELP_FMT"
-#: gl/lib/argp-help.c:261
+#: gl/lib/argp-help.c:260
#, c-format
msgid "Garbage in ARGP_HELP_FMT: %s"
msgstr "Хибні дані в ARGP_HELP_FMT: %s"
-#: gl/lib/argp-help.c:1374
+#: gl/lib/argp-help.c:1373
msgid ""
"Mandatory or optional arguments to long options are also mandatory or "
"optional for any corresponding short options."
msgstr ""
"Аргументи, обов'язкові для довгих ключів, є обов'язковими й для коротких."
-#: gl/lib/argp-help.c:1740
+#: gl/lib/argp-help.c:1739
msgid "Usage:"
msgstr "Використання:"
-#: gl/lib/argp-help.c:1744
+#: gl/lib/argp-help.c:1743
msgid " or: "
msgstr " чи: "
-#: gl/lib/argp-help.c:1756
+#: gl/lib/argp-help.c:1755
msgid " [OPTION...]"
msgstr " [ПАРАМЕТР...]"
-#: gl/lib/argp-help.c:1783
+#: gl/lib/argp-help.c:1782
#, c-format
msgid "Try '%s --help' or '%s --usage' for more information.\n"
msgstr "Віддайте команду «%s --help» або «%s --usage», щоб дізнатися більше.\n"
-#: gl/lib/argp-help.c:1811
+#: gl/lib/argp-help.c:1810
#, c-format
msgid "Report bugs to %s.\n"
msgstr "Про помилки звітуйте на <%s>.\n"
-#: gl/lib/argp-help.c:2011 gl/lib/error.c:195
+#: gl/lib/argp-help.c:2010 gl/lib/error.c:194
msgid "Unknown system error"
msgstr "Невідома системна помилка"
-#: gl/lib/argp-parse.c:91
+#: gl/lib/argp-parse.c:90
msgid "give this help list"
msgstr "вивести цю довідку"
-#: gl/lib/argp-parse.c:92
+#: gl/lib/argp-parse.c:91
msgid "give a short usage message"
msgstr "вивести коротке повідомлення про використання"
-#: gl/lib/argp-parse.c:93
+#: gl/lib/argp-parse.c:92
msgid "NAME"
msgstr "НАЗВА"
-#: gl/lib/argp-parse.c:94
+#: gl/lib/argp-parse.c:93
msgid "set the program name"
msgstr "встановити назву програми"
-#: gl/lib/argp-parse.c:95
+#: gl/lib/argp-parse.c:94
msgid "SECS"
msgstr "СЕКУНДИ"
-#: gl/lib/argp-parse.c:96
+#: gl/lib/argp-parse.c:95
msgid "hang for SECS seconds (default 3600)"
msgstr "зачекати вказану кількість секунд (типово 3600)"
-#: gl/lib/argp-parse.c:154
+#: gl/lib/argp-parse.c:153
msgid "print program version"
msgstr "вивести версію програми"
-#: gl/lib/argp-parse.c:171
+#: gl/lib/argp-parse.c:170
msgid "(PROGRAM ERROR) No version known!?"
msgstr "(ПОМИЛКА ПРОГРАМУВАННЯ) Невідома версія!?"
-#: gl/lib/argp-parse.c:624
+#: gl/lib/argp-parse.c:623
#, c-format
msgid "%s: Too many arguments\n"
msgstr "%s: забагато аргументів\n"
-#: gl/lib/argp-parse.c:770
+#: gl/lib/argp-parse.c:769
msgid "(PROGRAM ERROR) Option should have been recognized!?"
msgstr "(ПОМИЛКА ПРОГРАМУВАННЯ) Параметр мала бути розпізнана!?"
diff --git a/gl/po/vi.po b/gl/po/vi.po
index dad61c2e..4a126ee5 100644
--- a/gl/po/vi.po
+++ b/gl/po/vi.po
@@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gnulib-3.0.0.6062.a6b16\n"
"Report-Msgid-Bugs-To: bug-gnulib@gnu.org\n"
-"POT-Creation-Date: 2023-01-08 22:04+0000\n"
+"POT-Creation-Date: 2023-09-23 21:04+0000\n"
"PO-Revision-Date: 2014-01-13 08:31+0700\n"
"Last-Translator: Trần Ngọc Quân <vnwildman@gmail.com>\n"
"Language-Team: Vietnamese <translation-team-vi@lists.sourceforge.net>\n"
@@ -22,27 +22,27 @@ msgstr ""
"X-Generator: Poedit 1.5.5\n"
"X-Poedit-SourceCharset: utf-8\n"
-#: gl/lib/argp-help.c:162
+#: gl/lib/argp-help.c:161
#, c-format
msgid "ARGP_HELP_FMT: %s value is less than or equal to %s"
msgstr "ARGP_HELP_FMT: giá trị %s nhỏ hơn hoặc bằng %s"
-#: gl/lib/argp-help.c:238
+#: gl/lib/argp-help.c:237
#, c-format
msgid "%.*s: ARGP_HELP_FMT parameter requires a value"
msgstr "%.*s: tham số “ARGP_HELP_FMT” cần được gán giá trị"
-#: gl/lib/argp-help.c:248
+#: gl/lib/argp-help.c:247
#, c-format
msgid "%.*s: Unknown ARGP_HELP_FMT parameter"
msgstr "%.*s: Không biết tham số “ARGP_HELP_FMT”"
-#: gl/lib/argp-help.c:261
+#: gl/lib/argp-help.c:260
#, c-format
msgid "Garbage in ARGP_HELP_FMT: %s"
msgstr "Gặp rác trong “ARGP_HELP_FMT”: %s"
-#: gl/lib/argp-help.c:1374
+#: gl/lib/argp-help.c:1373
msgid ""
"Mandatory or optional arguments to long options are also mandatory or "
"optional for any corresponding short options."
@@ -50,72 +50,72 @@ msgstr ""
"Các đối số là bắt buộc hay chỉ là tùy chọn khi dùng với tùy chọn dài thì tùy "
"chọn ngắn tương ứng cũng vậy."
-#: gl/lib/argp-help.c:1740
+#: gl/lib/argp-help.c:1739
msgid "Usage:"
msgstr "Cách dùng:"
-#: gl/lib/argp-help.c:1744
+#: gl/lib/argp-help.c:1743
msgid " or: "
msgstr " hoặc:"
-#: gl/lib/argp-help.c:1756
+#: gl/lib/argp-help.c:1755
msgid " [OPTION...]"
msgstr " [TÙY_CHỌN...]"
-#: gl/lib/argp-help.c:1783
+#: gl/lib/argp-help.c:1782
#, fuzzy, c-format
msgid "Try '%s --help' or '%s --usage' for more information.\n"
msgstr ""
"Hãy chạy “%s --help” (trợ giúp) hay “%s --usage” (cách dùng) để xem thông "
"tin thêm.\n"
-#: gl/lib/argp-help.c:1811
+#: gl/lib/argp-help.c:1810
#, c-format
msgid "Report bugs to %s.\n"
msgstr "Hãy thông báo lỗi cho %s.\n"
-#: gl/lib/argp-help.c:2011 gl/lib/error.c:195
+#: gl/lib/argp-help.c:2010 gl/lib/error.c:194
msgid "Unknown system error"
msgstr "Gặp lỗi hệ thống chưa biết"
-#: gl/lib/argp-parse.c:91
+#: gl/lib/argp-parse.c:90
msgid "give this help list"
msgstr "hiển thị trợ giúp này"
-#: gl/lib/argp-parse.c:92
+#: gl/lib/argp-parse.c:91
msgid "give a short usage message"
msgstr "hiển thị cách dùng dạng ngắn gọn"
-#: gl/lib/argp-parse.c:93
+#: gl/lib/argp-parse.c:92
msgid "NAME"
msgstr "TÊN"
-#: gl/lib/argp-parse.c:94
+#: gl/lib/argp-parse.c:93
msgid "set the program name"
msgstr "đặt tên chương trình"
-#: gl/lib/argp-parse.c:95
+#: gl/lib/argp-parse.c:94
msgid "SECS"
msgstr "GIÂY"
-#: gl/lib/argp-parse.c:96
+#: gl/lib/argp-parse.c:95
msgid "hang for SECS seconds (default 3600)"
msgstr "treo trong vòng GIÂY giây (mặc định là 3600)"
-#: gl/lib/argp-parse.c:154
+#: gl/lib/argp-parse.c:153
msgid "print program version"
msgstr "in ra phiên bản chương trình"
-#: gl/lib/argp-parse.c:171
+#: gl/lib/argp-parse.c:170
msgid "(PROGRAM ERROR) No version known!?"
msgstr "(LỖI CHƯƠNG TRÌNH) Không có phiên bản đã biết ?"
-#: gl/lib/argp-parse.c:624
+#: gl/lib/argp-parse.c:623
#, c-format
msgid "%s: Too many arguments\n"
msgstr "%s: Quá nhiều đối số\n"
-#: gl/lib/argp-parse.c:770
+#: gl/lib/argp-parse.c:769
msgid "(PROGRAM ERROR) Option should have been recognized!?"
msgstr "(LỖI CHƯƠNG TRÌNH) Tùy chọn đáng ra nên được nhận diện!?"
diff --git a/gl/po/zh_CN.po b/gl/po/zh_CN.po
index 06640b1c..8b35758d 100644
--- a/gl/po/zh_CN.po
+++ b/gl/po/zh_CN.po
@@ -10,7 +10,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gnulib 2.0.0.3462.e9796\n"
"Report-Msgid-Bugs-To: bug-gnulib@gnu.org\n"
-"POT-Creation-Date: 2023-01-08 22:04+0000\n"
+"POT-Creation-Date: 2023-09-23 21:04+0000\n"
"PO-Revision-Date: 2010-02-26 09:54+0800\n"
"Last-Translator: Ji ZhengYu <zhengyuji@gmail.com>\n"
"Language-Team: Chinese (simplified) <i18n-zh@googlegroups.com>\n"
@@ -21,27 +21,27 @@ msgstr ""
"X-Bugs: Report translation errors to the Language-Team address.\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-#: gl/lib/argp-help.c:162
+#: gl/lib/argp-help.c:161
#, c-format
msgid "ARGP_HELP_FMT: %s value is less than or equal to %s"
msgstr "ARGP_HELP_FMT: %s 的值小于或等于 %s"
-#: gl/lib/argp-help.c:238
+#: gl/lib/argp-help.c:237
#, c-format
msgid "%.*s: ARGP_HELP_FMT parameter requires a value"
msgstr "%.*s: ARGP_HELP_FMT 参数需要一个值"
-#: gl/lib/argp-help.c:248
+#: gl/lib/argp-help.c:247
#, c-format
msgid "%.*s: Unknown ARGP_HELP_FMT parameter"
msgstr "%.*s: 未知的 ARGP_HELP_FMT 参数"
-#: gl/lib/argp-help.c:261
+#: gl/lib/argp-help.c:260
#, c-format
msgid "Garbage in ARGP_HELP_FMT: %s"
msgstr "ARGP_HELP_FMT 中的无效参数: %s"
-#: gl/lib/argp-help.c:1374
+#: gl/lib/argp-help.c:1373
msgid ""
"Mandatory or optional arguments to long options are also mandatory or "
"optional for any corresponding short options."
@@ -49,70 +49,70 @@ msgstr ""
"选项完整形式所必须用的或是可选的参数,在使用选项缩写形式时也是必须的或是可选"
"的。"
-#: gl/lib/argp-help.c:1740
+#: gl/lib/argp-help.c:1739
msgid "Usage:"
msgstr "用法:"
-#: gl/lib/argp-help.c:1744
+#: gl/lib/argp-help.c:1743
msgid " or: "
msgstr " 或者: "
-#: gl/lib/argp-help.c:1756
+#: gl/lib/argp-help.c:1755
msgid " [OPTION...]"
msgstr "[选项...]"
-#: gl/lib/argp-help.c:1783
+#: gl/lib/argp-help.c:1782
#, fuzzy, c-format
msgid "Try '%s --help' or '%s --usage' for more information.\n"
msgstr "请尝试执行“%s --help”或“%s --usage”来获取更多信息。\n"
-#: gl/lib/argp-help.c:1811
+#: gl/lib/argp-help.c:1810
#, c-format
msgid "Report bugs to %s.\n"
msgstr "请向 %s 报告错误。\n"
-#: gl/lib/argp-help.c:2011 gl/lib/error.c:195
+#: gl/lib/argp-help.c:2010 gl/lib/error.c:194
msgid "Unknown system error"
msgstr "未知的系统错误"
-#: gl/lib/argp-parse.c:91
+#: gl/lib/argp-parse.c:90
msgid "give this help list"
msgstr "显示此帮助列表"
-#: gl/lib/argp-parse.c:92
+#: gl/lib/argp-parse.c:91
msgid "give a short usage message"
msgstr "显示一份简洁的用法信息"
-#: gl/lib/argp-parse.c:93
+#: gl/lib/argp-parse.c:92
msgid "NAME"
msgstr "NAME"
-#: gl/lib/argp-parse.c:94
+#: gl/lib/argp-parse.c:93
msgid "set the program name"
msgstr "设定程序名称"
-#: gl/lib/argp-parse.c:95
+#: gl/lib/argp-parse.c:94
msgid "SECS"
msgstr "SECS"
-#: gl/lib/argp-parse.c:96
+#: gl/lib/argp-parse.c:95
msgid "hang for SECS seconds (default 3600)"
msgstr "挂起 SECS 秒(默认 3600 秒)"
-#: gl/lib/argp-parse.c:154
+#: gl/lib/argp-parse.c:153
msgid "print program version"
msgstr "打印程序版本"
-#: gl/lib/argp-parse.c:171
+#: gl/lib/argp-parse.c:170
msgid "(PROGRAM ERROR) No version known!?"
msgstr "(程序错误)未知版本!?"
-#: gl/lib/argp-parse.c:624
+#: gl/lib/argp-parse.c:623
#, c-format
msgid "%s: Too many arguments\n"
msgstr "%s:参数太多\n"
-#: gl/lib/argp-parse.c:770
+#: gl/lib/argp-parse.c:769
msgid "(PROGRAM ERROR) Option should have been recognized!?"
msgstr "(程序错误)未知的选项!?"
diff --git a/gl/po/zh_TW.po b/gl/po/zh_TW.po
index 373b36c3..d24e96c0 100644
--- a/gl/po/zh_TW.po
+++ b/gl/po/zh_TW.po
@@ -14,7 +14,7 @@ msgid ""
msgstr ""
"Project-Id-Version: gnulib 4.0.0.2567\n"
"Report-Msgid-Bugs-To: bug-gnulib@gnu.org\n"
-"POT-Creation-Date: 2023-01-08 22:04+0000\n"
+"POT-Creation-Date: 2023-09-23 21:04+0000\n"
"PO-Revision-Date: 2019-12-15 13:01+0800\n"
"Last-Translator: pan93412 <pan93412@gmail.com>\n"
"Language-Team: Chinese (traditional) <zh-l10n@lists.linux.org.tw>\n"
@@ -26,96 +26,96 @@ msgstr ""
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Lokalize 19.12.0\n"
-#: gl/lib/argp-help.c:162
+#: gl/lib/argp-help.c:161
#, c-format
msgid "ARGP_HELP_FMT: %s value is less than or equal to %s"
msgstr "ARGP_HELP_FMT:%s 值小於或等於 %s"
-#: gl/lib/argp-help.c:238
+#: gl/lib/argp-help.c:237
#, c-format
msgid "%.*s: ARGP_HELP_FMT parameter requires a value"
msgstr "%.*s:ARGP_HELP_FMT 參數需要一個值"
-#: gl/lib/argp-help.c:248
+#: gl/lib/argp-help.c:247
#, c-format
msgid "%.*s: Unknown ARGP_HELP_FMT parameter"
msgstr "%.*s:未知 ARGP_HELP_FMT 參數"
-#: gl/lib/argp-help.c:261
+#: gl/lib/argp-help.c:260
#, c-format
msgid "Garbage in ARGP_HELP_FMT: %s"
msgstr "ARGP_HELP_FMT 中的廢棄內容:%s"
-#: gl/lib/argp-help.c:1374
+#: gl/lib/argp-help.c:1373
msgid ""
"Mandatory or optional arguments to long options are also mandatory or "
"optional for any corresponding short options."
msgstr "長選項所使用的參數,在相對應的短選項也必須使用。"
-#: gl/lib/argp-help.c:1740
+#: gl/lib/argp-help.c:1739
msgid "Usage:"
msgstr "用法:"
-#: gl/lib/argp-help.c:1744
+#: gl/lib/argp-help.c:1743
msgid " or: "
msgstr " 或:"
-#: gl/lib/argp-help.c:1756
+#: gl/lib/argp-help.c:1755
msgid " [OPTION...]"
msgstr " [選項…]"
-#: gl/lib/argp-help.c:1783
+#: gl/lib/argp-help.c:1782
#, c-format
msgid "Try '%s --help' or '%s --usage' for more information.\n"
msgstr "嘗試「%s --help」或「%s --usage」取得更多資訊。\n"
-#: gl/lib/argp-help.c:1811
+#: gl/lib/argp-help.c:1810
#, c-format
msgid "Report bugs to %s.\n"
msgstr "請向 %s 匯報錯誤。\n"
-#: gl/lib/argp-help.c:2011 gl/lib/error.c:195
+#: gl/lib/argp-help.c:2010 gl/lib/error.c:194
msgid "Unknown system error"
msgstr "未知系統錯誤"
-#: gl/lib/argp-parse.c:91
+#: gl/lib/argp-parse.c:90
msgid "give this help list"
msgstr "提供此說明清單"
-#: gl/lib/argp-parse.c:92
+#: gl/lib/argp-parse.c:91
msgid "give a short usage message"
msgstr "提供短用法訊息"
-#: gl/lib/argp-parse.c:93
+#: gl/lib/argp-parse.c:92
msgid "NAME"
msgstr "名稱"
-#: gl/lib/argp-parse.c:94
+#: gl/lib/argp-parse.c:93
msgid "set the program name"
msgstr "設定程式名稱"
-#: gl/lib/argp-parse.c:95
+#: gl/lib/argp-parse.c:94
msgid "SECS"
msgstr "秒"
-#: gl/lib/argp-parse.c:96
+#: gl/lib/argp-parse.c:95
msgid "hang for SECS seconds (default 3600)"
msgstr "掛斷秒數(預設 3600)"
-#: gl/lib/argp-parse.c:154
+#: gl/lib/argp-parse.c:153
msgid "print program version"
msgstr "輸出程式版本"
-#: gl/lib/argp-parse.c:171
+#: gl/lib/argp-parse.c:170
msgid "(PROGRAM ERROR) No version known!?"
msgstr "(程式錯誤)沒有已知版本?!"
-#: gl/lib/argp-parse.c:624
+#: gl/lib/argp-parse.c:623
#, c-format
msgid "%s: Too many arguments\n"
msgstr "%s:過多參數\n"
-#: gl/lib/argp-parse.c:770
+#: gl/lib/argp-parse.c:769
msgid "(PROGRAM ERROR) Option should have been recognized!?"
msgstr "(程式錯誤)選項應該已被識別?!"