2022-01-28 Pádraig Brady
maintainer-makefile: fix sc_error_message_uppercase false failure
* top/maint.mk (sc_error_message_uppercase): Don't trigger for
any of the PRI... defines.
2022-01-27 Paul Eggert
alignalloc: work around AddressSanitizer bug
* doc/posix-functions/aligned_alloc.texi (aligned_alloc):
Mention AddressSanitizer bug.
* lib/alignalloc.h (ALIGNALLOC_VIA_ALIGNED_ALLOC):
Define to 0 if AddressSanitizer is in use.
* tests/test-alignalloc.c (test_alignalloc): New function,
which tests for non-aligned sizes too.
(main): Use it. Don’t bother checking for alignments
greater than 16 MiB, as this flummoxes AddressSanitizer
and there seems little point to testing them.
doc: use UTF-8 encoding
* doc/gnulib.texi: Use ‘@documentencoding UTF-8’.
Partly this is because there are a few UTF-8 characters
in the .texi files and there seems little point nowadays
to @U-ifiying them. And partly it is so that the .info
output uses nicer UTF-8 characters, e.g., it single-quotes
‘like this’ instead of 'like this'.
maint: Update copyright notices
* build-aux/announce-gen, build-aux/declared.sh:
* build-aux/git-version-gen, build-aux/gitlog-to-changelog:
* build-aux/gnu-web-doc-update, build-aux/gnupload:
* build-aux/increment-serial, build-aux/libtool-next-version:
* build-aux/useless-if-before-free:
Update some copyright notices by hand, that were not
updated automatically.
2022-01-26 Paul Eggert
calloc-gnu: fix misspelling in 2022-01-03 patch
Problem reported by Thien-Thi Nguyen in:
https://lists.gnu.org/r/bug-gnulib/2022-01/msg00170.html
* modules/calloc-gnu (Depends-on):
* modules/calloc-posix (Depends-on):
Fix misspelling of REPLACE_CALLOC_FOR_CALLOC_POSIX.
close-stream: avoid crash on MSVC Debug mode
Problem reported by Julien Marrec in:
https://lists.gnu.org/r/bug-m4/2022-01/msg00000.html
* modules/close-stream (Depends-on): Depend on fclose.
2022-01-23 Paul Eggert
xstrtoimax, xstrtoumax: depend on inttypes-incomplete
This fixes a call to strtoimax without declaring it,
and similarly for strtoumax.
* lib/xstrtoimax.c, lib/xstrtoumax.c (XSTRTOL_INCLUDE_INTTYPES_H):
Define, so that strtoimax and strtoumax are declared.
* lib/xstrtol.c [XSTRTOL_INCLUDE_INTTYPES_H]: Include inttypes.h.
* modules/xstrtoimax, modules/xstrtoumax (Depends-on):
Add inttypes-incomplete.
alignalloc, xalignalloc: new modules
* lib/alignalloc.c, lib/alignalloc.h, lib/xalignalloc.c:
* m4/alignalloc.m4, modules/alignalloc, modules/alignalloc-tests:
* modules/xalignalloc, tests/test-alignalloc.c:
New files.
2022-01-17 Paul Eggert
extern-inline: improve macOS port
* m4/extern-inline.m4 (gl_EXTERN_INLINE):
Define HAVE___HEADER_INLINE at configure-time, so that config.h
knows the workaround is not needed even though ctype.h has not yet
been included. This lets the compiler use extern inline functions
on newer macOS platforms, instead of static inline.
Problem reported by Reuben Thomas in:
https://lists.gnu.org/r/bug-gnulib/2022-01/msg00130.html
2022-01-17 Bruno Haible
xstrtol: Trim dependencies.
* lib/xstrtol.h: Include , not .
* modules/xstrtol (Depends-on): Add stdint. Remove inttypes-incomplete.
2022-01-17 Bruno Haible
xstrtol: Fix compilation error (regression 2022-01-16).
* modules/xstrtol (Depends-on): Add intprops.
2022-01-17 Jim Meyering
xstrtol: remove unnecessary else after return
* lib/xstrtol.c (bkm_scale): Drop "else" after return.
2022-01-16 Paul Eggert
xstrtol: simplify integer overflow checking
* lib/xstrtol.c: Include intprops.h.
(TYPE_SIGNED): Remove, as intprops.h defines that for us now.
(bkm_scale): Use INT_MULTIPLY_WRAPV instead of checking for
overflow by hand.
xstrtoll-tests: use %lld for long long
* tests/test-xstrtoll.c, tests/test-xstrtoull.c (__spec):
Do not assume long long is 64 bits, or that exact-width
64-bit types exist. Although these assumptions are true
on current Gnulib platforms they are not true in general.
Also, GCC warns if PRId64 is "ld" but intmax_t is long long
even when long and long long are both 64 bits.
2022-01-15 Bruno Haible
Don't pass unknown warning option to clang.
Reported by Assaf Gordon via Paul Eggert in
.
* m4/gnulib-common.m4 (gl_CC_GNULIB_WARNINGS): Don't use
-Wno-unsuffixed-float-constants with clang.
2022-01-15 Bruno Haible
log tests: Avoid test failure with nvc 22.1.
* tests/test-log.h (test_function): With nvc, expect up to 4 ulps error.
2022-01-15 Bruno Haible
havelib: Recognize ELF platform despite nvc 22.1.
* m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): Recognize Linux as an ELF
platform, even with a compiler that does not define __ELF__.
2022-01-15 Bruno Haible
oset-c++: Avoid compilation error with nvc++ 22.1.
* lib/gl_oset.hh: With EDG C++ compilers, avoid 'friend'.
2022-01-14 Paul Eggert
nstrftime: pacify nvc 22.1 unreachable statement
* lib/nstrftime.c (__strftime_internal):
Omit unreachable ‘break;’.
tests: pacify nvc 22.1 unreachable statement
* tests/test-sys_wait.h (test_sys_wait_macros):
Widen scope of ‘#if 0’ so that there is not an unreachable ‘break;’.
tests: pacify nvc 22.1 set-but-not-used
* tests/test-fnmatch.c (main): Don’t set a var without using it.
* tests/test-sched.c (f1): Now extern.
intprops: work around nvc 22.1 bug
Problem reported by Olivier Cessenat (Bug#53256).
* lib/intprops.h (_GL_HAS_BUILTIN_ADD_OVERFLOW) [__EDG__]:
Define to 0, since __builtin_add_overflow doesn’t work
on NVIDIA HPC SDK 22.1.
copy-file-range: work around Linux kernel bug
This workaround is adapted from Coreutils.
* lib/copy-file-range.c [__linux__ && HAVE_COPY_FILE_RANGE]:
Include .
(copy_file_range): Use a stub to replace the copy_file_range of
Linux kernel versions 4.5 through 5.2.
* lib/unistd.in.h (copy_file_range):
* m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS):
* modules/copy-file-range (configure.ac):
* modules/unistd (unistd.h):
Support replacement of copy_file_range.
* m4/copy-file-range.m4 (gl_FUNC_COPY_FILE_RANGE):
Define HAVE_COPY_FILE_RANGE if the system has copy_file_range,
and on Linux check whether the system’s is known to work.
2022-01-14 Bruno Haible
Avoid error "conditional LIBUNISTRING_COMPILE_... was never defined"
when option --conditional-dependencies is used (regression 2022-01-09).
Reported by Gavin Smith in
.
* m4/libunistring-base.m4 (gl_LIBUNISTRING_MODULE): Use gl_CONDITIONAL
instead of AM_CONDITIONAL.
2022-01-13 Bruno Haible
Avoid warning "_GL_ATTRIBUTE_DEALLOC_FREE redefined" (regr. 2022-01-04).
Reported by Werner Lemberg in
.
* m4/gnulib-common.m4 (gl_COMMON_BODY): Avoid redefining
_GL_ATTRIBUTE_DEALLOC_FREE.
2022-01-10 Paul Eggert
backupfile: fix bug when renaming not from wd
* lib/backupfile.c (backupfile_internal): Fix bug when DIR_FD
does not specify the working directory, and when RENAME.
Without the bug fix, FILE is treated as relative to the working
directory, not relative to DIR_FD, when renaming FILE.
This bug was introduced when DIR_FD and RENAME were introduced,
in 2018-10-24T02:10:21Z!eggert@cs.ucla.edu.
While we’re at it, when SDIR is nonnegative improve performance a
bit by passing an SDIR-relative old name to renameatu.
2022-01-09 Bruno Haible
host-cpu-c-abi: Add support for LoongArch64 CPU.
* m4/host-cpu-c-abi.m4 (gl_HOST_CPU_C_ABI): Define __loongarch64__. (GCC
and clang predefine only __loongarch__, __loongarch64.)
2022-01-09 Bruno Haible
stdio: Fix "missing file" errors (regression from today).
* modules/stdio (Files): Add stdio-read.c, stdio-write.c.
* m4/stdio_h.m4 (gl_STDIO_H): Update comments.
2022-01-09 Bruno Haible
Use the GL_CFLAG_GNULIB_WARNINGS for most AC_LIBOBJ compilation units.
* modules/_Exit (configure.ac): Define an Automake conditional. Remove
the AC_LIBOBJ invocation.
(Makefile.am): Augment lib_SOURCES, guarded by that Automake
conditional.
* modules/accept: Likewise.
* modules/access: Likewise.
* modules/acosf: Likewise.
* modules/acosl: Likewise.
* modules/aligned_alloc: Likewise.
* modules/alphasort: Likewise.
* modules/argz: Likewise.
* modules/asinf: Likewise.
* modules/asinl: Likewise.
* modules/atan2f: Likewise.
* modules/atanf: Likewise.
* modules/atanl: Likewise.
* modules/atexit: Likewise.
* modules/atoll: Likewise.
* modules/bind: Likewise.
* modules/btowc: Likewise.
* modules/c32rtomb: Likewise.
* modules/canonicalize-lgpl: Likewise.
* modules/cbrt: Likewise.
* modules/cbrtf: Likewise.
* modules/cbrtl: Likewise.
* modules/ceil: Likewise.
* modules/ceilf: Likewise.
* modules/ceill: Likewise.
* modules/chdir-long: Likewise.
* modules/chown: Likewise.
* modules/close: Likewise.
* modules/closedir: Likewise.
* modules/cnd: Likewise.
* modules/connect: Likewise.
* modules/copy-file-range: Likewise.
* modules/copysign: Likewise.
* modules/copysignf: Likewise.
* modules/copysignl: Likewise.
* modules/cosf: Likewise.
* modules/coshf: Likewise.
* modules/cosl: Likewise.
* modules/creat: Likewise.
* modules/crypto/gc: Likewise.
* modules/ctime: Likewise.
* modules/dirfd: Likewise.
* modules/dup: Likewise.
* modules/dup2: Likewise.
* modules/duplocale: Likewise.
* modules/error: Likewise.
* modules/euidaccess: Likewise.
* modules/execinfo: Likewise.
* modules/execl: Likewise.
* modules/execle: Likewise.
* modules/execlp: Likewise.
* modules/execv: Likewise.
* modules/execve: Likewise.
* modules/execvp: Likewise.
* modules/execvpe: Likewise.
* modules/exp2: Likewise.
* modules/exp2f: Likewise.
* modules/exp2l: Likewise.
* modules/expf: Likewise.
* modules/expl: Likewise.
* modules/explicit_bzero: Likewise.
* modules/expm1: Likewise.
* modules/expm1f: Likewise.
* modules/expm1l: Likewise.
* modules/fabsf: Likewise.
* modules/fabsl: Likewise.
* modules/faccessat: Likewise.
* modules/fchdir: Likewise.
* modules/fchmodat: Likewise.
* modules/fchownat: Likewise.
* modules/fclose: Likewise.
* modules/fcntl: Likewise.
* modules/fdatasync: Likewise.
* modules/fdopen: Likewise.
* modules/fdopendir: Likewise.
* modules/fflush: Likewise.
* modules/ffs: Likewise.
* modules/ffsl: Likewise.
* modules/ffsll: Likewise.
* modules/fileblocks: Likewise.
* modules/float: Likewise.
* modules/flock: Likewise.
* modules/floor: Likewise.
* modules/floorf: Likewise.
* modules/floorl: Likewise.
* modules/fma: Likewise.
* modules/fmaf: Likewise.
* modules/fmal: Likewise.
* modules/fmod: Likewise.
* modules/fmodf: Likewise.
* modules/fmodl: Likewise.
* modules/forkpty: Likewise.
* modules/fpending: Likewise.
* modules/fpurge: Likewise.
* modules/freadable: Likewise.
* modules/freadahead: Likewise.
* modules/freadptr: Likewise.
* modules/free-posix: Likewise.
* modules/freopen: Likewise.
* modules/frexpf: Likewise.
* modules/fseek: Likewise.
* modules/fseeko: Likewise.
* modules/fseterr: Likewise.
* modules/fstat: Likewise.
* modules/fstatat: Likewise.
* modules/fsusage: Likewise.
* modules/fsync: Likewise.
* modules/ftell: Likewise.
* modules/ftello: Likewise.
* modules/ftruncate: Likewise.
* modules/fts: Likewise.
* modules/futimens: Likewise.
* modules/fwritable: Likewise.
* modules/fwriting: Likewise.
* modules/getaddrinfo: Likewise.
* modules/getcwd: Likewise.
* modules/getcwd-lgpl: Likewise.
* modules/getdelim: Likewise.
* modules/getdomainname: Likewise.
* modules/getdtablesize: Likewise.
* modules/getentropy: Likewise.
* modules/getgroups: Likewise.
* modules/gethostname: Likewise.
* modules/getline: Likewise.
* modules/getloadavg: Likewise.
* modules/getlogin: Likewise.
* modules/getlogin_r: Likewise.
* modules/getopt-posix: Likewise.
* modules/getpagesize: Likewise.
* modules/getpeername: Likewise.
* modules/getrandom: Likewise.
* modules/getrusage: Likewise.
* modules/getsockname: Likewise.
* modules/getsockopt: Likewise.
* modules/getsubopt: Likewise.
* modules/gettimeofday: Likewise.
* modules/getumask: Likewise.
* modules/getusershell: Likewise.
* modules/glob: Likewise.
* modules/grantpt: Likewise.
* modules/group-member: Likewise.
* modules/hypot: Likewise.
* modules/hypotf: Likewise.
* modules/hypotl: Likewise.
* modules/iconv_open: Likewise.
* modules/ilogb: Likewise.
* modules/ilogbf: Likewise.
* modules/ilogbl: Likewise.
* modules/imaxabs: Likewise.
* modules/imaxdiv: Likewise.
* modules/inet_ntop: Likewise.
* modules/inet_pton: Likewise.
* modules/ioctl: Likewise.
* modules/isapipe: Likewise.
* modules/isatty: Likewise.
* modules/isblank: Likewise.
* modules/isfinite: Likewise.
* modules/isinf: Likewise.
* modules/iswblank: Likewise.
* modules/iswctype: Likewise.
* modules/iswdigit: Likewise.
* modules/iswxdigit: Likewise.
* modules/lchmod: Likewise.
* modules/lchown: Likewise.
* modules/ldexpf: Likewise.
* modules/ldexpl: Likewise.
* modules/libgmp: Likewise.
* modules/link: Likewise.
* modules/linkat: Likewise.
* modules/listen: Likewise.
* modules/localeconv: Likewise.
* modules/localtime: Likewise.
* modules/log: Likewise.
* modules/log10: Likewise.
* modules/log10f: Likewise.
* modules/log10l: Likewise.
* modules/log1p: Likewise.
* modules/log1pf: Likewise.
* modules/log1pl: Likewise.
* modules/log2: Likewise.
* modules/log2f: Likewise.
* modules/log2l: Likewise.
* modules/logb: Likewise.
* modules/logbf: Likewise.
* modules/logbl: Likewise.
* modules/logf: Likewise.
* modules/login_tty: Likewise.
* modules/logl: Likewise.
* modules/lseek: Likewise.
* modules/lstat: Likewise.
* modules/mbrlen: Likewise.
* modules/mbrtoc32: Likewise.
* modules/mbrtowc: Likewise.
* modules/mbsinit: Likewise.
* modules/mbsnrtowcs: Likewise.
* modules/mbsrtowcs: Likewise.
* modules/mbtowc: Likewise.
* modules/memalign: Likewise.
* modules/memchr: Likewise.
* modules/memcmp: Likewise.
* modules/memcpy: Likewise.
* modules/memmove: Likewise.
* modules/mempcpy: Likewise.
* modules/memrchr: Likewise.
* modules/memset: Likewise.
* modules/mkdir: Likewise.
* modules/mkdirat: Likewise.
* modules/mkdtemp: Likewise.
* modules/mkfifo: Likewise.
* modules/mkfifoat: Likewise.
* modules/mknod: Likewise.
* modules/mkostemp: Likewise.
* modules/mkostemps: Likewise.
* modules/mkstemp: Likewise.
* modules/mkstemps: Likewise.
* modules/modf: Likewise.
* modules/modff: Likewise.
* modules/modfl: Likewise.
* modules/mountlist: Likewise.
* modules/msvc-inval: Likewise.
* modules/msvc-nothrow: Likewise.
* modules/mtx: Likewise.
* modules/nanosleep: Likewise.
* modules/nl_langinfo: Likewise.
* modules/obstack: Likewise.
* modules/open: Likewise.
* modules/openat: Likewise.
* modules/opendir: Likewise.
* modules/openpty: Likewise.
* modules/pclose: Likewise.
* modules/perror: Likewise.
* modules/pipe-posix: Likewise.
* modules/poll: Likewise.
* modules/popen: Likewise.
* modules/posix_memalign: Likewise.
* modules/posix_openpt: Likewise.
* modules/posix_spawn: Likewise.
* modules/posix_spawn-internal: Likewise.
* modules/posix_spawn_file_actions_addchdir: Likewise.
* modules/posix_spawn_file_actions_addclose: Likewise.
* modules/posix_spawn_file_actions_adddup2: Likewise.
* modules/posix_spawn_file_actions_addfchdir: Likewise.
* modules/posix_spawn_file_actions_addopen: Likewise.
* modules/posix_spawn_file_actions_destroy: Likewise.
* modules/posix_spawn_file_actions_init: Likewise.
* modules/posix_spawnattr_destroy: Likewise.
* modules/posix_spawnattr_getflags: Likewise.
* modules/posix_spawnattr_getpgroup: Likewise.
* modules/posix_spawnattr_getschedparam: Likewise.
* modules/posix_spawnattr_getschedpolicy: Likewise.
* modules/posix_spawnattr_getsigdefault: Likewise.
* modules/posix_spawnattr_getsigmask: Likewise.
* modules/posix_spawnattr_init: Likewise.
* modules/posix_spawnattr_setflags: Likewise.
* modules/posix_spawnattr_setpgroup: Likewise.
* modules/posix_spawnattr_setschedparam: Likewise.
* modules/posix_spawnattr_setschedpolicy: Likewise.
* modules/posix_spawnattr_setsigdefault: Likewise.
* modules/posix_spawnattr_setsigmask: Likewise.
* modules/posix_spawnp: Likewise.
* modules/powf: Likewise.
* modules/pread: Likewise.
* modules/pselect: Likewise.
* modules/pthread-cond: Likewise.
* modules/pthread-mutex: Likewise.
* modules/pthread-once: Likewise.
* modules/pthread-rwlock: Likewise.
* modules/pthread-spin: Likewise.
* modules/pthread-thread: Likewise.
* modules/pthread-tss: Likewise.
* modules/pthread_mutex_timedlock: Likewise.
* modules/pthread_sigmask: Likewise.
* modules/ptsname: Likewise.
* modules/ptsname_r: Likewise.
* modules/putenv: Likewise.
* modules/pwrite: Likewise.
* modules/qsort_r: Likewise.
* modules/raise: Likewise.
* modules/random: Likewise.
* modules/random_r: Likewise.
* modules/rawmemchr: Likewise.
* modules/read: Likewise.
* modules/readdir: Likewise.
* modules/readline: Likewise.
* modules/readlink: Likewise.
* modules/readlinkat: Likewise.
* modules/readutmp: Likewise.
* modules/reallocarray: Likewise.
* modules/recv: Likewise.
* modules/recvfrom: Likewise.
* modules/regex: Likewise.
* modules/relocatable-prog: Likewise.
* modules/remainder: Likewise.
* modules/remainderf: Likewise.
* modules/remainderl: Likewise.
* modules/remove: Likewise.
* modules/rename: Likewise.
* modules/renameat: Likewise.
* modules/rewinddir: Likewise.
* modules/rint: Likewise.
* modules/rintf: Likewise.
* modules/rintl: Likewise.
* modules/rmdir: Likewise.
* modules/round: Likewise.
* modules/roundf: Likewise.
* modules/roundl: Likewise.
* modules/rpmatch: Likewise.
* modules/scandir: Likewise.
* modules/sched_yield: Likewise.
* modules/secure_getenv: Likewise.
* modules/select: Likewise.
* modules/selinux-h: Likewise.
* modules/send: Likewise.
* modules/sendto: Likewise.
* modules/setenv: Likewise.
* modules/sethostname: Likewise.
* modules/setlocale: Likewise.
* modules/setlocale-null: Likewise.
* modules/setsockopt: Likewise.
* modules/shutdown: Likewise.
* modules/sig2str: Likewise.
* modules/sigabbrev_np: Likewise.
* modules/sigaction: Likewise.
* modules/sigdescr_np: Likewise.
* modules/signbit: Likewise.
* modules/sigprocmask: Likewise.
* modules/sinf: Likewise.
* modules/sinhf: Likewise.
* modules/sinl: Likewise.
* modules/sleep: Likewise.
* modules/socket: Likewise.
* modules/spawn-pipe: Likewise.
* modules/sqrtf: Likewise.
* modules/sqrtl: Likewise.
* modules/stat: Likewise.
* modules/stdio: Likewise.
* modules/stpcpy: Likewise.
* modules/stpncpy: Likewise.
* modules/strcase: Likewise.
* modules/strchrnul: Likewise.
* modules/strcspn: Likewise.
* modules/strdup-posix: Likewise.
* modules/strerror: Likewise.
* modules/strerror-override: Likewise.
* modules/strerrorname_np: Likewise.
* modules/strfmon_l: Likewise.
* modules/strftime-fixes: Likewise.
* modules/strncat: Likewise.
* modules/strndup: Likewise.
* modules/strnlen: Likewise.
* modules/strpbrk: Likewise.
* modules/strptime: Likewise.
* modules/strsep: Likewise.
* modules/strsignal: Likewise.
* modules/strtod: Likewise.
* modules/strtoimax: Likewise.
* modules/strtok_r: Likewise.
* modules/strtol: Likewise.
* modules/strtold: Likewise.
* modules/strtoll: Likewise.
* modules/strtoul: Likewise.
* modules/strtoull: Likewise.
* modules/strtoumax: Likewise.
* modules/strverscmp: Likewise.
* modules/symlink: Likewise.
* modules/symlinkat: Likewise.
* modules/tanf: Likewise.
* modules/tanhf: Likewise.
* modules/tanl: Likewise.
* modules/tcgetsid: Likewise.
* modules/thrd: Likewise.
* modules/time_r: Likewise.
* modules/time_rz: Likewise.
* modules/timegm: Likewise.
* modules/times: Likewise.
* modules/timespec_get: Likewise.
* modules/timespec_getres: Likewise.
* modules/tmpfile: Likewise.
* modules/towctrans: Likewise.
* modules/trunc: Likewise.
* modules/truncate: Likewise.
* modules/truncf: Likewise.
* modules/truncl: Likewise.
* modules/tsearch: Likewise.
* modules/tss: Likewise.
* modules/ttyname_r: Likewise.
* modules/tzset: Likewise.
* modules/uname: Likewise.
* modules/unlink: Likewise.
* modules/unlinkat: Likewise.
* modules/unlockpt: Likewise.
* modules/unsetenv: Likewise.
* modules/usleep: Likewise.
* modules/utime: Likewise.
* modules/utimensat: Likewise.
* modules/waitpid: Likewise.
* modules/wcpcpy: Likewise.
* modules/wcpncpy: Likewise.
* modules/wcrtomb: Likewise.
* modules/wcscasecmp: Likewise.
* modules/wcscat: Likewise.
* modules/wcschr: Likewise.
* modules/wcscmp: Likewise.
* modules/wcscoll: Likewise.
* modules/wcscpy: Likewise.
* modules/wcscspn: Likewise.
* modules/wcsdup: Likewise.
* modules/wcsftime: Likewise.
* modules/wcslen: Likewise.
* modules/wcsncasecmp: Likewise.
* modules/wcsncat: Likewise.
* modules/wcsncmp: Likewise.
* modules/wcsncpy: Likewise.
* modules/wcsnlen: Likewise.
* modules/wcsnrtombs: Likewise.
* modules/wcspbrk: Likewise.
* modules/wcsrchr: Likewise.
* modules/wcsrtombs: Likewise.
* modules/wcsspn: Likewise.
* modules/wcsstr: Likewise.
* modules/wcstok: Likewise.
* modules/wcswidth: Likewise.
* modules/wcsxfrm: Likewise.
* modules/wctob: Likewise.
* modules/wctomb: Likewise.
* modules/wctrans: Likewise.
* modules/wctype: Likewise.
* modules/wcwidth: Likewise.
* modules/windows-cond: Likewise.
* modules/windows-mutex: Likewise.
* modules/windows-once: Likewise.
* modules/windows-recmutex: Likewise.
* modules/windows-rwlock: Likewise.
* modules/windows-spawn: Likewise.
* modules/windows-spin: Likewise.
* modules/windows-thread: Likewise.
* modules/windows-timedmutex: Likewise.
* modules/windows-timedrecmutex: Likewise.
* modules/windows-timedrwlock: Likewise.
* modules/windows-tls: Likewise.
* modules/wmemchr: Likewise.
* modules/wmemcmp: Likewise.
* modules/wmemcpy: Likewise.
* modules/wmemmove: Likewise.
* modules/wmempcpy: Likewise.
* modules/wmemset: Likewise.
* modules/write: Likewise.
2022-01-09 Bruno Haible
obstack: Move AC_LIBOBJ invocation to the module description.
* m4/obstack.m4 (gl_FUNC_OBSTACK): Renamed from AC_FUNC_OBSTACK. Don't
invoke AC_LIBSOURCES nor AC_LIBOBJ.
* modules/obstack (configure.ac): Update. Invoke AC_LIBOBJ here.
2022-01-09 Bruno Haible
stdio: Move AC_LIBOBJ invocations to the module description.
* m4/stdio_h.m4 (gl_STDIO_H): Don't invoke AC_LIBOBJ.
* modules/stdio (configure.ac): Invoke AC_LIBOBJ here.
2022-01-09 Bruno Haible
fchdir: Move AC_LIBOBJ invocation to the module description.
* m4/fchdir.m4 (gl_FUNC_FCHDIR): Don't invoke AC_LIBOBJ and
gl_PREREQ_FCHDIR.
* modules/fchdir (configure.ac): Invoke AC_LIBOBJ and gl_PREREQ_FCHDIR.
2022-01-09 Bruno Haible
Remove influence of Automake conditionals on conditional dependencies.
* m4/gnulib-common.m4 (gl_CONDITIONAL): New macro.
(gl_CONDITIONAL_HEADER): Use it instead of AM_CONDITIONAL.
* m4/libgmp.m4 (gl_LIBGMP): Likewise.
* modules/posix_spawn_file_actions_addfchdir-tests (configure.ac):
Likewise.
* modules/uchar-c++-tests (configure.ac): Likewise.
* gnulib-tool (func_modules_transitive_closure): Don't inhibit
conditional dependencies processing on a module that uses an Automake
conditional.
2022-01-08 Bruno Haible
gnulib-tool: Fix "Don't forget" messages (regression 2021-12-12).
* gnulib-tool (func_import): Fix variable references in "Don't forget"
messages.
2022-01-08 Bruno Haible
gnulib-tool: Remove all *.Po files upon distclean (regr. 2022-01-05).
Reported by Mohammad Akhlaghi in
.
* gnulib-tool (func_emit_initmacro_end): Collect the *.Po or *.Plo files
to remove into an AC_SUBSTed variable gl_LIBOBJDEPS.
(func_emit_lib_Makefile_am): Extend the distclean and maintainer-clean
rules.
2022-01-08 Bruno Haible
Add another example.
* examples/hello-c-gnulib-conddeps: New directory.
2022-01-08 Marc Nieper-Wißkirchen
c-stack: Adapt header file for use in C++ applications.
* lib/c-stack.h: Add extern "C" block.
2022-01-08 Marc Nieper-Wißkirchen
version-etc: Adapt header file for use in C++ applications.
* lib/version-etc.h: Add extern "C" block.
2022-01-07 Bruno Haible
sigsegv: Improve support for Linux/LoongArch64.
* lib/sigsegv.c (SIGSEGV_FAULT_STACKPOINTER): Add special case for
Linux/LoongArch.
2022-01-05 Glenn Washburn
bootstrap: When a commit is specified, do a shallow fetch if possible.
Rationale and explanation:
.
* bootstrap: When a commit hash is specified, ask for this specific
commit on fetch, and fallback to fetching the entire repository if
fetching by commit hash fails.
2022-01-05 Paul Eggert
stack: pacify gcc -Wsign-compare
* lib/stack.h (_GL_STACK_TYPE): Use idx_t for size too.
Suggested by Bruno Haible in:
https://lists.gnu.org/r/bug-gnulib/2022-01/msg00035.html
(_GL_STACK_PREFIX (size)): Return idx_t, not size_t.
2022-01-05 Bruno Haible
Fix last commit.
Based on a patch by José E. Marchesi , reported in
.
* m4/gnulib-common.m4 (gl_CC_GNULIB_WARNINGS): Don't enable
-Wimplicit-fallthrough for GCC < 7.
2022-01-05 Bruno Haible
gnulib-tool: Avoid known warnings that reflect Gnulib's coding style.
* m4/gnulib-common.m4 (gl_CC_GNULIB_WARNINGS): New macro.
* gnulib-tool (func_emit_lib_Makefile_am): Add the
GL_CFLAG_GNULIB_WARNINGS to the CFLAGS of all the compilation units of
the library.
(func_emit_tests_Makefile_am): Add the GL_CFLAG_GNULIB_WARNINGS to the
CFLAGS.
(func_import): Emit an invocation of gl_CC_GNULIB_WARNINGS.
2022-01-04 Bernhard Voelker
license: fix GPLv3 texts to use a comma instead of semicolon.
See: https://www.gnu.org/licenses/gpl-3.0.html#howto
Run:
$ git grep -l 'Foundation; either version 3' \
| xargs sed -i '/Foundation; either version 3/ s/n; e/n, e/'
* All files using GPLv3: Adjust via the above command.
2022-01-04 Bruno Haible
string, wchar: Fix compilation error on MSVC (regression 2021-09-07).
* lib/string.in.h (free): Don't redeclare as rpl_free. Instead, redefine
_GL_ATTRIBUTE_DEALLOC_FREE to reference rpl_free directly.
* lib/wchar.in.h (free): Likewise.
2022-01-03 Bruno Haible
getpass-gnu: Allow use as dependency from test modules.
* m4/getpass.m4 (gl_FUNC_GETPASS_GNU): Set
REPLACE_GETPASS_FOR_GETPASS_GNU instead of REPLACE_GETPASS.
* m4/unistd_h.m4 (gl_UNISTD_H_REQUIRE_DEFAULTS): Initialize the
getpass-gnu module indicator.
(gl_UNISTD_H_DEFAULTS): Initialize REPLACE_GETPASS_FOR_GETPASS_GNU.
* modules/unistd (Makefile.am): Substitute GNULIB_GETPASS_GNU,
REPLACE_GETPASS_FOR_GETPASS_GNU.
* modules/getpass-gnu (configure.ac): Test
REPLACE_GETPASS_FOR_GETPASS_GNU instead of REPLACE_GETPASS. Set a module
indicator.
* lib/unistd.in.h (getpass): Test REPLACE_GETPASS,
REPLACE_GETPASS_FOR_GETPASS_GNU, and the respective module indicators
instead of just REPLACE_GETPASS.
2022-01-03 Bruno Haible
fopen-gnu: Allow use as dependency from test modules.
* m4/fopen.m4 (gl_FUNC_FOPEN_GNU): Set REPLACE_FOPEN_FOR_FOPEN_GNU
instead of REPLACE_FOPEN.
* m4/stdio_h.m4 (gl_STDIO_H_REQUIRE_DEFAULTS): Initialize the fopen-gnu
module indicator.
(gl_STDIO_H_DEFAULTS): Initialize REPLACE_FOPEN_FOR_FOPEN_GNU.
* modules/stdio (Makefile.am): Substitute GNULIB_FOPEN_GNU,
REPLACE_FOPEN_FOR_FOPEN_GNU.
* modules/fopen-gnu (Depends-on): Add more dependencies.
(configure.ac): Test REPLACE_FOPEN_FOR_FOPEN_GNU instead of
REPLACE_FOPEN.
* lib/stdio.in.h (fopen): Test REPLACE_FOPEN,
REPLACE_FOPEN_FOR_FOPEN_GNU, and the respective module indicators
instead of just REPLACE_FOPEN.
2022-01-03 Bruno Haible
realloc-gnu: Allow use as dependency from test modules.
* m4/realloc.m4 (gl_FUNC_REALLOC_GNU): Set
REPLACE_REALLOC_FOR_REALLOC_GNU instead of REPLACE_REALLOC.
(gl_FUNC_REALLOC_POSIX): Set REPLACE_REALLOC_FOR_REALLOC_POSIX instead
of REPLACE_REALLOC.
* m4/stdlib_h.m4 (gl_STDLIB_H_REQUIRE_DEFAULTS): Initialize the
realloc-gnu module indicator.
(gl_STDLIB_H_DEFAULTS): Initialize REPLACE_REALLOC_FOR_REALLOC_GNU,
REPLACE_REALLOC_FOR_REALLOC_POSIX, not REPLACE_REALLOC.
* modules/stdlib (Makefile.am): Substitute GNULIB_REALLOC_GNU,
REPLACE_REALLOC_FOR_REALLOC_GNU, REPLACE_REALLOC_FOR_REALLOC_POSIX, not
REPLACE_REALLOC.
* modules/realloc-posix (Depends-on, configure.ac): Test
REPLACE_REALLOC_FOR_REALLOC_POSIX instead of REPLACE_REALLOC.
* modules/realloc-gnu (Comment): Remove section.
(Depends-on): Add free-posix, malloc-gnu, xalloc-oversized.
(configure.ac): Test REPLACE_REALLOC_FOR_REALLOC_GNU instead of
REPLACE_REALLOC. Set a module indicator.
* lib/stdlib.in.h (realloc): Test REPLACE_REALLOC_FOR_REALLOC_POSIX,
REPLACE_REALLOC_FOR_REALLOC_GNU, and the respective module indicators
instead of just REPLACE_REALLOC.
2022-01-03 Bruno Haible
calloc-gnu: Allow use as dependency from test modules.
* m4/calloc.m4 (gl_FUNC_CALLOC_GNU): Set REPLACE_CALLOC_FOR_CALLOC_GNU
instead of REPLACE_CALLOC.
(gl_FUNC_CALLOC_POSIX): Set REPLACE_CALLOC_FOR_CALLOC_POSIX instead of
REPLACE_CALLOC.
* m4/stdlib_h.m4 (gl_STDLIB_H_REQUIRE_DEFAULTS): Initialize the
calloc-gnu module indicator.
(gl_STDLIB_H_DEFAULTS): Initialize REPLACE_CALLOC_FOR_CALLOC_GNU,
REPLACE_CALLOC_FOR_CALLOC_POSIX, not REPLACE_CALLOC.
* modules/stdlib (Makefile.am): Substitute GNULIB_CALLOC_GNU,
REPLACE_CALLOC_FOR_CALLOC_GNU, REPLACE_CALLOC_FOR_CALLOC_POSIX, not
REPLACE_CALLOC.
* modules/calloc-posix (Depends-on, configure.ac): Test
REPLACE_CALLOC_FOR_CALLOC_POSIX instead of REPLACE_CALLOC.
* modules/calloc-gnu (Depends-on): Add xalloc-oversized.
(configure.ac): Test REPLACE_CALLOC_FOR_CALLOC_GNU instead of
REPLACE_CALLOC. Set a module indicator.
* lib/stdlib.in.h (calloc): Test REPLACE_CALLOC_FOR_CALLOC_POSIX,
REPLACE_CALLOC_FOR_CALLOC_GNU, and the respective module indicators
instead of just REPLACE_CALLOC.
2022-01-03 Bruno Haible
malloc-gnu: Allow use as dependency from test modules.
* m4/malloc.m4 (gl_FUNC_MALLOC_GNU): Set REPLACE_MALLOC_FOR_MALLOC_GNU
instead of REPLACE_MALLOC.
(gl_FUNC_MALLOC_PTRDIFF, gl_FUNC_MALLOC_POSIX): Set
REPLACE_MALLOC_FOR_MALLOC_POSIX instead of REPLACE_MALLOC.
* m4/calloc.m4 (gl_FUNC_CALLOC_POSIX): Test
REPLACE_MALLOC_FOR_MALLOC_POSIX instead of REPLACE_MALLOC.
* m4/realloc.m4 (gl_FUNC_REALLOC_POSIX): Likewise.
* m4/stdlib_h.m4 (gl_STDLIB_H_REQUIRE_DEFAULTS): Initialize the
malloc-gnu module indicator.
(gl_STDLIB_H_DEFAULTS): Initialize REPLACE_MALLOC_FOR_MALLOC_GNU,
REPLACE_MALLOC_FOR_MALLOC_POSIX, not REPLACE_MALLOC.
* modules/stdlib (Makefile.am): Substitute GNULIB_MALLOC_GNU,
REPLACE_MALLOC_FOR_MALLOC_GNU, REPLACE_MALLOC_FOR_MALLOC_POSIX, not
REPLACE_MALLOC.
* modules/malloc-posix (Depends-on, configure.ac): Test
REPLACE_MALLOC_FOR_MALLOC_POSIX instead of REPLACE_MALLOC.
* modules/malloc-gnu (Comment): Remove section.
(Depends-on): Add xalloc-oversized.
(configure.ac): Test REPLACE_MALLOC_FOR_MALLOC_GNU instead of
REPLACE_MALLOC. Set a module indicator.
* lib/stdlib.in.h (malloc): Test REPLACE_MALLOC_FOR_MALLOC_POSIX,
REPLACE_MALLOC_FOR_MALLOC_GNU, and the respective module indicators
instead of just REPLACE_MALLOC.
2022-01-02 Bruno Haible
striconveh: Make the last change also work on Solaris 11.
* lib/striconveh.c (mem_cd_iconveh_internal): Tweak last commit.
striconveh: Make the last change also work on musl libc.
* lib/striconveh.c (mem_cd_iconveh_internal): Make the U+FFFD conversion
also work with non-GNU iconv() implementations.
2022-01-01 Paul Eggert
gen-header: port to BusyBox ‘sed’
Problem reported by Tim Rühsen in:
https://lists.gnu.org/r/bug-gnulib/2022-01/msg00004.html
* modules/gen-header (SED_HEADER_NOEDIT): Replace instead of prepend.
(SED_HEADER_STDOUT, SED_HEADER_TO_AT_t): Adjust to that change.
Do not use ‘w foo’ twice in the same script, as BusyBox ‘sed’
mistakenly opens ‘foo’ for output twice, thus losing some output.
2022-01-01 Bruno Haible
striconveh: Support an error handler that produces a Unicode U+FFFD.
Suggested by Marc Nieper-Wißkirchen in
.
* lib/iconveh.h (iconveh_replacement_character): New enum value.
* lib/striconveh.c (mem_cd_iconveh_internal): When the handler is
iconveh_replacement_character, try to produce U+FFFD when possible,
instead of '?'.
* tests/test-striconveh.c (main): Add GB18030 tests. Test also
iconveh_replacement_character.
2022-01-01 Bruno Haible
maint: Update copyright notices.
* build-aux/declared.sh (func_version): Bump year.
2022-01-01 Bruno Haible
maint: Update copyright notices in code generating programs.
* lib/gen-uni-tables.c (output_predicate_test, output_predicate,
output_category, output_combclass, output_bidi_category,
output_decimal_digit_test, output_decimal_digit, output_digit_test,
output_digit, output_numeric_test, output_numeric, output_mirror,
output_joining_type_test, output_joining_type,
output_joining_group_test, output_joining_group, output_scripts,
output_scripts_byname, output_blocks, output_ident_category,
output_nonspacing_property, output_lbrk_tables,
output_lbrk_rules_as_tables, output_wbrk_tables, output_gbp_test,
output_gbp_table, output_decomposition_tables,
output_composition_tables, output_simple_mapping_test,
output_simple_mapping, output_casing_rules): Extend copyright year of
generated file to 2022.
* lib/uniname/gen-uninames.lisp (main): Likewise. Produce license notice
that is consistent with the gnulib/etc/license-notices/ files.
* All files regenerated.
2022-01-01 Paul Eggert
maint: fix ‘make update-copyright’ on symlinks
After running ‘make update-copyright’ I noticed that it
incorrectly replaced a couple of symlinks with their contents.
* Makefile (update-copyright): Do not update symlinks.
* etc/license-notices/GPL, etc/license-notices/LGPL:
Change these back to symlinks.
2021-12-31 Bruno Haible
unistdio: Prefer newer version to older, buggy one.
* modules/unistdio/ulc-vasnprintf (configure.ac): Bump required
libunistring version. This is needed because of the heap overrun fix
(2018-09-23) and the need to avoid %n on more platforms (2020-10-04).
* modules/unistdio/ulc-asnprintf (configure.ac): Likewise.
* modules/unistdio/ulc-asprintf (configure.ac): Likewise.
* modules/unistdio/ulc-fprintf (configure.ac): Likewise.
* modules/unistdio/ulc-snprintf (configure.ac): Likewise.
* modules/unistdio/ulc-sprintf (configure.ac): Likewise.
* modules/unistdio/ulc-vasprintf (configure.ac): Likewise.
* modules/unistdio/ulc-vfprintf (configure.ac): Likewise.
* modules/unistdio/ulc-vsnprintf (configure.ac): Likewise.
* modules/unistdio/ulc-vsprintf (configure.ac): Likewise.
2021-12-31 Bruno Haible
uniwidth: Optimize.
* lib/gen-uni-tables.c (output_nonspacing_property): Add version
parameter. Emit the usual boilerplate header for generated files.
(is_width2): New function, based on lib/uniwidth/width.c.
(output_width2_property): New function.
(main): Create uniwidth/width0.h instead of uniwidth/width.c.part.
Create uniwidth/width2.h.
* lib/uniwidth/width.c: Include width0.h, width2.h, bitmap.h.
(nonspacing_table_data, nonspacing_table_ind): Remove here.
(uc_width): Replace the double-width character with an u_width2 bitmap
lookup.
* modules/uniwidth/width (Files): Add lib/uniwidth/width0.h,
lib/uniwidth/width2.h, lib/unictype/bitmap.h.
2021-12-31 Bruno Haible
Update to Unicode 14.0.0.
* lib/gen-uni-tables.c (UC_JOINING_GROUP_THIN_YEH,
UC_JOINING_GROUP_VERTICAL_TAIL): New enum values.
(fill_arabicshaping, joining_group_as_c_identifier): Recognize these
joining groups.
* lib/unictype.in.h (UC_JOINING_GROUP_THIN_YEH,
UC_JOINING_GROUP_VERTICAL_TAIL): New enum values.
* lib/unictype/joininggroup_name.h: Add the THIN_YEH, VERTICAL_TAIL
joining groups.
* lib/unictype/joininggroup_byname.gperf: Likewise.
* lib/gen-uni-tables.c (LBP_ID1, LBP_ID2): New enum values.
(LBP_ID): Assign artificial value.
(get_lbp): Use the extended_pictographic property to assign LBP_ID1,
LBP_ID2 instead of LBP_ID. Update such that unilbrk/lbrkprop.txt comes
out as expected.
(debug_output_lbp): Print either LBP_ID1 or LBP_ID2 as LBP_ID.
(lbp_value_to_string): Handle LBP_ID1, LBP_ID2 instead of LBP_ID.
(output_lbrk_rules_as_tables): Treat LBP_ID as macro that maps to two
table rows/columns. In rule LB30b, use LBP_ID2 in addition to LBP_EB.
Remove redundant part of rule LB27.
* lib/unilbrk/lbrktables.h (LBP_ID1, LBP_ID2): New enum values.
(LBP_ID): Remove enum value.
(unilbrk_table): Update declaration.
* lib/unilbrk/u8-possible-linebreaks.c (u8_possible_linebreaks_loop):
Use LBP_ID1 instead of LBP_ID.
* lib/unilbrk/u16-possible-linebreaks.c (u16_possible_linebreaks_loop):
Likewise.
* lib/unilbrk/u32-possible-linebreaks.c (u32_possible_linebreaks_loop):
Likewise.
* tests/unilbrk/test-u8-possible-linebreaks.c (test_function): Add a
test of potential future emoji.
* tests/unilbrk/test-u16-possible-linebreaks.c (test_function):
Likewise.
* tests/unilbrk/test-u32-possible-linebreaks.c (test_function):
Likewise.
* lib/uniwidth/width.c (nonspacing_table_data, nonspacing_table_ind):
Update.
(uc_width): Assign width 2 to the characters 0x1AFF0..0x1AFF3,
0x1AFF5..0x1AFFB, 0x1AFFD..0x1AFFE, 0x1B120..0x1B122, 0x1F6DD..0x1F6DF,
0x1F7F0, 0x1FA7B..0x1FA7C, 0x1FAA9..0x1FAAC, 0x1FAB7..0x1FABA,
0x1FAC3..0x1FAC5, 0x1FAD7..0x1FAD9, 0x1FAE0..0x1FAE7, 0x1FAF0..0x1FAF6.
* tests/uniwidth/test-uc_width2.sh: Expect width 0 for the characters
0x0890..0x0891, 0x0898..0x089F, 0x08CA..0x0902, 0x0C3C, 0x180F,
0x1AC1..0x1ACE, 0x1DFA, 0x10F82..0x10F85, 0x11070, 0x11073..0x11074,
0x110C2, 0x1CF00..0x1CF2D, 0x1CF30..0x1CF46, 0x1E2AE. Expect ambiguous
width for the character 0x1734. Expect width 2 for the characters
0x1AFF0..0x1AFF3, 0x1AFF5..0x1AFFB, 0x1AFFD..0x1AFFE, 0x1B120..0x1B122,
0x1F6DD..0x1F6DF, 0x1F7F0, 0x1FA7B..0x1FA7C, 0x1FAA9..0x1FAAC,
0x1FAB7..0x1FABA, 0x1FAC3..0x1FAC5, 0x1FAD7..0x1FAD9, 0x1FAE0..0x1FAE7,
0x1FAF0..0x1FAF6.
* All generated files under lib/uni* and tests/uni*: Regenerate.
* tests/uniname/NameAliases.txt: Update.
* tests/uniname/UnicodeData.txt: Update.
* tests/uninorm/NormalizationTest.txt: Update.
* tests/unigbrk/GraphemeBreakTest.txt: Update.
* tests/uniwbrk/WordBreakTest.txt: Update.
* All the affected modules: Bump required libunistring version.
2021-12-31 Bruno Haible
Update to Unicode 13.0.0.
* lib/gen-uni-tables.c (is_WBP_MIDLETTER): Add character 0x055F.
(get_wbp): Assign value WBP_ALETTER to the characters 0x02E5..0x02EB,
0x055A, 0x058A, 0xA708..0xA716.
* lib/gen-uni-tables.c (LBP_CP1, LBP_CP2, LBP_OP1, LBP_OP2): New enum
values.
(LBP_OP, LBP_CP): Assign artificial values.
(get_lbp): Use the unicode_width[] table to assign LBP_CP1, LBP_CP2
instead of LBP_CP, and LBP_OP1, LBP_OP2 instead of LBP_OP. Update such
that unilbrk/lbrkprop.txt comes out as expected.
(debug_output_lbp): Print either LBP_CP1 or LBP_CP2 as LBP_CP. Print
either LBP_OP1 or LBP_OP2 as LBP_OP.
(lbp_value_to_string): Handle LBP_CP1, LBP_CP2, LBP_OP1, LBP_OP2 instead
of LBP_CP, LBP_OP.
(output_lbrk_rules_as_tables): Treat LBP_CP and LBP_OP as macros that
map to two table rows/columns. In rule LB30, use only LBP_OP1 instead of
LBP_OP, and only LBP_CP1 instead of LBP_CP. Simplify rule LB22.
* lib/unilbrk/lbrktables.h (LBP_CP1, LBP_CP2, LBP_OP1, LBP_OP2): New
enum values.
(LBP_OP, LBP_CP): Remove enum values.
(unilbrk_table): Update declaration.
* tests/unilbrk/test-u8-possible-linebreaks.c (test_function): Add a
test for East Asian opening parenthesis.
* tests/unilbrk/test-u16-possible-linebreaks.c (test_function):
Likewise.
* tests/unilbrk/test-u32-possible-linebreaks.c (test_function):
Likewise.
* lib/uniwidth/width.c (nonspacing_table_data, nonspacing_table_ind):
Update.
(uc_width): Assign width 2 to the characters 0x16FF0..0x16FF1,
0x18AF3..0x18CD5, 0x18D00..0x18D08, 0x1F6D6..0x1F6D7, 0x1F6FB..0x1F6FC,
0x1F90C, 0x1FA74, 0x1FA83..0x1FA86, 0x1FA96..0x1FAA8, 0x1FAB0..0x1FAB6,
0x1FAC0..0x1FAC2, 0x1FAD0..0x1FAD6.
Assign width 1 to the characters 0x1F93B, 0x1F946.
* tests/uniwidth/test-uc_width2.sh: Expect width 0 for the characters
0x0B55, 0x0D81, 0x1ABF..0x1AC0, 0xA82C, 0x10EAB..0x10EAC, 0x111CF,
0x1193B..0x1193C, 0x1193E, 0x11943, 0x16FE4. Expect width 2 for the
characters 0x16FF0..0x16FF1, 0x18AF3..0x18CD5, 0x18D00..0x18D08,
0x1F6D6..0x1F6D7, 0x1F6FB..0x1F6FC, 0x1F90C, 0x1FA74, 0x1FA83..0x1FA86,
0x1FA96..0x1FAA8, 0x1FAB0..0x1FAB6, 0x1FAC0..0x1FAC2, 0x1FAD0..0x1FAD6.
Expect width 1 for the characters 0x1F93B, 0x1F946.
* All generated files under lib/uni* and tests/uni*: Regenerate.
* tests/uniname/NameAliases.txt: Update.
* tests/uniname/UnicodeData.txt: Update.
* tests/uninorm/NormalizationTest.txt: Update.
* tests/unigbrk/GraphemeBreakTest.txt: Update.
* tests/uniwbrk/WordBreakTest.txt: Update.
* All the affected modules: Bump required libunistring version.
2021-12-30 Bruno Haible
uniwbrk: Correction of Unicode 10.0.0 support.
* lib/gen-uni-tables.c (is_WBP_MIDLETTER): Remove character 0x02D7.
The generated files are not affected.
2021-12-30 Bruno Haible
Update to Unicode 12.1.0.
* lib/gen-uni-tables.c: Update comments.
* All generated files under lib/uni* and tests/uni*: Regenerate.
* tests/uniname/NameAliases.txt: Update.
* tests/uniname/UnicodeData.txt: Update.
* tests/uninorm/NormalizationTest.txt: Update.
* tests/unigbrk/GraphemeBreakTest.txt: Update.
* tests/uniwbrk/WordBreakTest.txt: Update.
* All the affected modules: Bump required libunistring version.
2021-12-30 Bruno Haible
Update to Unicode 12.0.0.
* lib/gen-uni-tables.c (is_property_default_ignorable_code_point):
Exclude 0x13430..0x13438.
(get_lbp): Update such that unilbrk/lbrkprop.txt comes out as expected.
(get_wbp): Map 0xFF10..0xFF19 to WBP_NUMERIC.
* lib/uniwidth/width.c (nonspacing_table_data, nonspacing_table_ind):
Update.
(uc_width): Assign width 2 to the characters 0x16FE2..0x16FE3,
0x187F2..0x187F7, 0x1B150..0x1B152, 0x1B164..0x1B167, 0x1F6D5, 0x1F6FA,
0x1F7E0..0x1F7EB, 0x1F90D..0x1F90F, 0x1FA70..0x1FA73, 0x1FA78..0x1FA7A,
0x1FA80..0x1FA82, 0x1FA90..0x1FA95.
* tests/uniwidth/test-uc_width2.sh: Expect width 0 for the characters
0x0EBA, 0xA9BD, 0x119D4..0x119D7, 0x119DA..0x119DB, 0x119E0,
0x13430..0x13438, 0x16F4F, 0x1E130..0x1E136, 0x1E2EC..0x1E2EF. Expect
width 2 for the characters 0x16FE2..0x16FE3, 0x187F2..0x187F7,
0x1B150..0x1B152, 0x1B164..0x1B167, 0x1F6D5, 0x1F6FA, 0x1F7E0..0x1F7EB,
0x1F90D..0x1F90F, 0x1FA70..0x1FA73, 0x1FA78..0x1FA7A, 0x1FA80..0x1FA82,
0x1FA90..0x1FA95.
* All generated files under lib/uni* and tests/uni*: Regenerate.
* tests/uniname/NameAliases.txt: Update.
* tests/uniname/UnicodeData.txt: Update.
* tests/uninorm/NormalizationTest.txt: Update.
* tests/unigbrk/GraphemeBreakTest.txt: Update.
* tests/uniwbrk/WordBreakTest.txt: Update.
* All the affected modules: Bump required libunistring version.
2021-12-30 Paul Eggert
crypto/sm3-buffer: fix C99 conformance bug
* lib/sm3.c (sm3_process_block): Call varargs macro with enough
arguments. Problem found by IBM XL/C 12.1.0.0 for AIX.
2021-12-30 Bruno Haible
Update to Unicode 11.0.0.
* lib/gen-uni-tables.c (is_property_default_ignorable_code_point):
Simplify by use of PROP_PREPENDED_CONCATENATION_MARK.
(UC_JOINING_GROUP_HANIFI_ROHINGYA_PA,
UC_JOINING_GROUP_HANIFI_ROHINGYA_KINNA_YA): New enum values.
(fill_arabicshaping, joining_group_as_c_identifier): Recognize these
joining groups.
(get_lbp): Update such that unilbrk/lbrkprop.txt comes out as expected.
(WBP_EB, WBP_EM, WBP_GAZ, WBP_EBG): Remove enum values.
(WBP_WSS): New enum value.
(get_wbp): Update such that uniwbrk/wbrkprop.txt comes out as expected.
(debug_output_wbp, fill_org_wbp, debug_output_org_wbp, output_wbp):
Update for changed enum values.
* lib/unictype.in.h (UC_JOINING_GROUP_HANIFI_ROHINGYA_*): New enum
values.
* lib/unictype/joininggroup_name.h: Add the HANIFI_ROHINGYA_* joining
groups.
* lib/unictype/joininggroup_byname.gperf: Likewise.
* lib/unigbrk.in.h: Mark 4 enum values as obsolete.
* lib/unigbrk/u-grapheme-breaks.h (FUNC): Handle emoji modifier sequence
according to Unicode 11.0.0.
* lib/unigbrk/u8-grapheme-breaks.c: Include , unictype.h.
* lib/unigbrk/u16-grapheme-breaks.c: Likewise.
* lib/unigbrk/u32-grapheme-breaks.c: Likewise.
* lib/unigbrk/uc-grapheme-breaks.c: Likewise.
* modules/unigbrk/u8-grapheme-breaks (Depends-on): Add
unictype/property-extended-pictographic, stdbool.
* modules/unigbrk/u16-grapheme-breaks (Depends-on): Likewise.
* modules/unigbrk/u32-grapheme-breaks (Depends-on): Likewise.
* modules/unigbrk/uc-grapheme-breaks (Depends-on): Likewise.
* tests/unigbrk/test-u8-grapheme-breaks.c (main): Add test for emoji
modifier / ZWJ sequence.
* tests/unigbrk/test-u16-grapheme-breaks.c (main): Likewise.
* tests/unigbrk/test-u32-grapheme-breaks.c (main): Likewise.
* tests/unigbrk/test-uc-is-grapheme-break.c: Include ,
unictype.h.
(main): Update workaround logic to match the one in
lib/unigbrk/u-grapheme-breaks.h.
* modules/unigbrk/uc-is-grapheme-break-tests (Depends-on): Add
unictype/property-extended-pictographic, stdbool.
* lib/uniwbrk.in.h: Mark 4 enum values as obsolete.
(WBP_WSS): New enum value.
* lib/uniwbrk/u-wordbreaks.h (FUNC): Handle emoji ZWJ sequences and
horizontal whitespace according to Unicode 11.0.0.
* lib/uniwbrk/u8-wordbreaks.c: Include unictype.h.
* lib/uniwbrk/u16-wordbreaks.c: Likewise.
* lib/uniwbrk/u32-wordbreaks.c: Likewise.
* lib/uniwbrk/wbrktable.c (uniwbrk_prop_index, uniwbrk_table): Add a row
and column for WBP_WSS.
* lib/uniwbrk/wbrktable.h (uniwbrk_prop_index, uniwbrk_table): Update
declarations.
* modules/uniwbrk/u8-wordbreaks (Depends-on): Add
unictype/property-extended-pictographic.
* modules/uniwbrk/u16-wordbreaks (Depends-on): Likewise.
* modules/uniwbrk/u32-wordbreaks (Depends-on): Likewise.
* tests/uniwbrk/test-u8-wordbreaks.c (main): Update expected results.
* tests/uniwbrk/test-u16-wordbreaks.c (main): Likewise.
* tests/uniwbrk/test-u32-wordbreaks.c (main): Likewise.
* tests/uniwbrk/test-uc-wordbreaks.c (wordbreakproperty_to_string):
Update.
* lib/unilbrk/u8-possible-linebreaks.c (u8_possible_linebreaks_loop):
Handle ZWJ according to Unicode 11.0.0.
* lib/unilbrk/u16-possible-linebreaks.c (u16_possible_linebreaks_loop):
Likewise.
* lib/unilbrk/u32-possible-linebreaks.c (u32_possible_linebreaks_loop):
Likewise.
* lib/uniwidth/width.c (nonspacing_table_data, nonspacing_table_ind):
Update.
(uc_width): Assign width 2 to the characters 0x187ED..0x187F1, 0x1F6F9,
0x1F9E7..0x1F9FF.
* tests/uniwidth/test-uc_width2.sh: Expect width 0 for the characters
0x07FD, 0x08D3, 0x09FE, 0x0C04, 0xA8FF, 0x10D24..0x10D27,
0x10F46..0x10F50, 0x110CD, 0x111C9, 0x1133B, 0x1145E, 0x1182F..0x11837,
0x11839..0x1183A, 0x11D90..0x11D91, 0x11D95, 0x11D97, 0x11EF3..0x11EF4.
Expect width 2 for the characters 0x187ED..0x187F1, 0x1F6F9,
0x1F9E7..0x1F9FF.
* All generated files under lib/uni* and tests/uni*: Regenerate.
* tests/uniname/NameAliases.txt: Update.
* tests/uniname/UnicodeData.txt: Update.
* tests/uninorm/NormalizationTest.txt: Update.
* tests/unigbrk/GraphemeBreakTest.txt: Update.
* tests/uniwbrk/WordBreakTest.txt: Update.
* All the affected modules: Bump required libunistring version.
2021-12-30 Bruno Haible
unictype: Add Emoji properties from Unicode 11.0.0.
* lib/gen-uni-tables.c (PROP_EMOJI*, PROP_EXTENDED_PICTOGRAPHIC): New
enum values.
(fill_properties): Don't require a space between the property name and
the comment. Handle the property names from emoji-data.txt.
(is_property_emoji, is_property_emoji_presentation,
is_property_emoji_modifier, is_property_emoji_modifier_base,
is_property_emoji_component, is_property_extended_pictographic): New
declarations.
(output_properties): Emit the properties emoji, emoji_presentation,
emoji_modifier, emoji_modifier_base, emoji_component,
extended_pictographic.
(get_lbp): Use the emoji_modifier property.
(main): Expect one more argument, for the emoji-data.txt file.
* lib/unictype.in.h (UC_PROPERTY_EMOJI, UC_PROPERTY_EMOJI_PRESENTATION,
UC_PROPERTY_EMOJI_MODIFIER, UC_PROPERTY_EMOJI_MODIFIER_BASE,
UC_PROPERTY_EMOJI_COMPONENT, UC_PROPERTY_EXTENDED_PICTOGRAPHIC,
uc_is_property_emoji, uc_is_property_emoji_presentation,
uc_is_property_emoji_modifier, uc_is_property_emoji_modifier_base,
uc_is_property_emoji_component, uc_is_property_extended_pictographic):
New declarations.
* lib/unictype/pr_emoji.c: New file.
* lib/unictype/pr_emoji_presentation.c: New file.
* lib/unictype/pr_emoji_modifier.c: New file.
* lib/unictype/pr_emoji_modifier_base.c: New file.
* lib/unictype/pr_emoji_component.c: New file.
* lib/unictype/pr_extended_pictographic.c: New file.
* modules/unictype/property-emoji: New file.
* modules/unictype/property-emoji-tests: New file.
* modules/unictype/property-emoji-presentation: New file.
* modules/unictype/property-emoji-presentation-tests: New file.
* modules/unictype/property-emoji-modifier: New file.
* modules/unictype/property-emoji-modifier-tests: New file.
* modules/unictype/property-emoji-modifier-base: New file.
* modules/unictype/property-emoji-modifier-base-tests: New file.
* modules/unictype/property-emoji-component: New file.
* modules/unictype/property-emoji-component-tests: New file.
* modules/unictype/property-extended-pictographic: New file.
* modules/unictype/property-extended-pictographic-tests: New file.
* modules/unictype/property-all (Depends-on): Depend on the new modules.
2021-12-29 Bruno Haible
uniwidth: Give width 0 to conjoining Hangul Jamo jungseong, jongseong.
Reported by Luis Javier Merino in
.
* lib/gen-uni-tables.c (is_nonspacing): Return true for the conjoining
Hangul Jamo jungseong and jongseong characters.
* lib/uniwidth/width.c (nonspacing_table_data, nonspacing_table_ind):
Regenerated.
* tests/uniwidth/test-uc_width2.sh: Expect width 0 for the characters
0x1160..0x11FF, 0xD7B0..0xD7C6, 0xD7CB..0xD7FB.
2021-12-29 Bruno Haible
uniwidth: Update to Unicode 10.0.0.
* lib/uniwidth/width.c (uc_width): Assign width 2 to the characters
0x231A..0x231B, 0x23E9..0x23EC, 0x23F0, 0x23F3, 0x25FD..0x25FE,
0x2614..0x2615, 0x2648..0x2653, 0x267F, 0x2693, 0x26A1, 0x26AA..0x26AB,
0x26BD..0x26BE, 0x26C4..0x26C5, 0x26CE, 0x26D4, 0x26EA, 0x26F2..0x26F3,
0x26F5, 0x26FA, 0x26FD, 0x2705, 0x270A..0x270B, 0x2728, 0x274C, 0x274E,
0x2753..0x2755, 0x2757, 0x2795..0x2797, 0x27B0, 0x27BF, 0x2B1B..0x2B1C,
0x2B50, 0x2B55, 0xA960..0xA97C, 0x16FE0..0x16FE1, 0x17000..0x187EC,
0x18800..0x18AF2, 0x1B000..0x1B11F, 0x1B170..0x1B2FB, 0x1F004, 0x1F0CF,
0x1F18E, 0x1F191..0x1F19A, 0x1F200..0x1F320, 0x1F32D..0x1F335,
0x1F337..0x1F37C, 0x1F37E..0x1F393, 0x1F3A0..0x1F3CA, 0x1F3CF..0x1F3D3,
0x1F3E0..0x1F3F0, 0x1F3F4, 0x1F3F8..0x1F43E, 0x1F440, 0x1F442..0x1F4FC,
0x1F4FF..0x1F53D, 0x1F54B..0x1F54E, 0x1F550..0x1F567, 0x1F57A,
0x1F595..0x1F596, 0x1F5A4, 0x1F5FB..0x1F64F, 0x1F680..0x1F6C5, 0x1F6CC,
0x1F6D0..0x1F6D2, 0x1F6EB..0x1F6EC, 0x1F6F4..0x1F6F8, 0x1F910..0x1F9E6.
Assign ambiguous width to the characters 0x3248..0x324F.
* tests/uniwidth/test-uc_width2.sh: Expect these changes.
2021-12-29 Bruno Haible
unilbrk: Improve support for strings that contain CR-LF sequences.
* lib/gen-uni-tables.c (LBP_CR, LBP_LF): New enum values.
(get_lbp): For '\r' and '\n', return LBP_CR and LBP_LF, respectively,
instead of LBP_BK.
(debug_output_lbp, fill_org_lbp, debug_output_org_lbp,
lbp_value_to_string): Handle LBP_CR, LBP_LF.
* lib/unilbrk/lbrkprop2.h: Regenerated.
* lib/unilbrk/lbrktables.h (LBP_CR, LBP_LF): New enum values.
* lib/unilbrk.in.h (UC_BREAK_CR_BEFORE_LF): New enum value.
(u8_possible_linebreaks, u16_possible_linebreaks,
u32_possible_linebreaks, ulc_possible_linebreaks, u8_width_linebreaks,
u16_width_linebreaks, u32_width_linebreaks, ulc_width_linebreaks):
Declare also a _v2 variant, and use a C macro to activate it by default.
* lib/unilbrk/internal.h: New file.
* lib/unilbrk/u8-possible-linebreaks.c: Include unilbrk/internal.h.
(u8_possible_linebreaks_loop): Renamed from u8_possible_linebreaks. Add
'cr' parameter.
(u8_possible_linebreaks, u8_possible_linebreaks_v2): New functions.
(main): Update.
* lib/unilbrk/u16-possible-linebreaks.c: Include unilbrk/internal.h.
(u16_possible_linebreaks_loop): Renamed from u16_possible_linebreaks.
Add 'cr' parameter.
(u16_possible_linebreaks, u16_possible_linebreaks_v2): New functions.
* lib/unilbrk/u32-possible-linebreaks.c: Include unilbrk/internal.h.
(u32_possible_linebreaks_loop): Renamed from u32_possible_linebreaks.
Add 'cr' parameter.
(u32_possible_linebreaks, u32_possible_linebreaks_v2): New functions.
* lib/unilbrk/ulc-possible-linebreaks.c: Include unilbrk/internal.h,
unilbrk/lbrktables.h.
(ulc_possible_linebreaks_internal): Renamed from
ulc_possible_linebreaks. Add 'cr' parameter.
(ulc_possible_linebreaks, ulc_possible_linebreaks_v2): New functions.
(main): Update.
* lib/unilbrk/u8-width-linebreaks.c: Include unilbrk/internal.h,
unilbrk/lbrktables.h.
(u8_width_linebreaks_internal): Renamed from u8_width_linebreaks. Add
'cr' parameter.
(u8_width_linebreaks, u8_width_linebreaks_v2): New functions.
(main): Update.
* lib/unilbrk/u16-width-linebreaks.c: Include unilbrk/internal.h,
unilbrk/lbrktables.h.
(u16_width_linebreaks_internal): Renamed from u16_width_linebreaks. Add
'cr' parameter.
(u16_width_linebreaks, u16_width_linebreaks_v2): New functions.
* lib/unilbrk/u32-width-linebreaks.c: Include unilbrk/internal.h,
unilbrk/lbrktables.h.
(u32_width_linebreaks_internal): Renamed from u32_width_linebreaks. Add
'cr' parameter.
(u32_width_linebreaks, u32_width_linebreaks_v2): New functions.
* lib/unilbrk/ulc-width-linebreaks.c: Include unilbrk/internal.h,
unilbrk/lbrktables.h.
(ulc_width_linebreaks_internal): Renamed from ulc_width_linebreaks. Add
'cr' parameter.
(ulc_width_linebreaks, ulc_width_linebreaks_v2): New functions.
(main): Update.
* modules/unilbrk/u8-possible-linebreaks (Files): Add
lib/unilbrk/internal.h.
* modules/unilbrk/u16-possible-linebreaks (Files): Likewise.
* modules/unilbrk/u32-possible-linebreaks (Files): Likewise.
* modules/unilbrk/u8-width-linebreaks (Files): Likewise.
* tests/unilbrk/test-u8-possible-linebreaks.c (test_function): New
function, extracted from main. Add a test of CR-LF handling.
(main): Invoke it twice.
* tests/unilbrk/test-u16-possible-linebreaks.c (test_function): New
function, extracted from main. Add a test of CR-LF handling.
(main): Invoke it twice.
* tests/unilbrk/test-u32-possible-linebreaks.c (test_function): New
function, extracted from main. Add a test of CR-LF handling.
(main): Invoke it twice.
* tests/unilbrk/test-ulc-possible-linebreaks.c (test_function): New
function, extracted from main.
(main): Invoke it twice.
* tests/unilbrk/test-u8-width-linebreaks.c (test_function): New
function, extracted from main.
(main): Invoke it twice.
* tests/unilbrk/test-u16-width-linebreaks.c (test_function): New
function, extracted from main.
(main): Invoke it twice.
* tests/unilbrk/test-u32-width-linebreaks.c (test_function): New
function, extracted from main.
(main): Invoke it twice.
* tests/unilbrk/test-ulc-width-linebreaks.c (test_function): New
function, extracted from main.
(main): Invoke it twice.
2021-12-29 Bruno Haible
uniwbrk: Add unit tests of CR-LF sequences.
* tests/uniwbrk/test-u8-wordbreaks.c (main): Add test of a string with
CR-LF.
* tests/uniwbrk/test-u16-wordbreaks.c (main): Likewise.
* tests/uniwbrk/test-u32-wordbreaks.c (main): Likewise.
2021-12-29 Bruno Haible
unigbrk: Add unit tests of CR-LF sequences.
* tests/unigbrk/test-u8-grapheme-breaks.c (main): Add test of a string
with CR-LF.
* tests/unigbrk/test-u16-grapheme-breaks.c (main): Likewise.
* tests/unigbrk/test-u32-grapheme-breaks.c (main): Likewise.
2021-12-29 Bruno Haible
unilbrk: Update handling of Hebrew letter + hyphen for Unicode 10.0.0.
* lib/unilbrk/lbrktables.h (LBP_HL_BA): New enum value.
* lib/unilbrk/u8-possible-linebreaks.c (u8_possible_linebreaks): Add
code for handling break-after character after Hebrew letter.
* lib/unilbrk/u16-possible-linebreaks.c (u16_possible_linebreaks):
Likewise.
* lib/unilbrk/u32-possible-linebreaks.c (u32_possible_linebreaks):
Likewise.
* tests/unilbrk/test-u8-possible-linebreaks.c (main): Add a test
regarding break-after character after Hebrew letter.
* tests/unilbrk/test-u16-possible-linebreaks.c (main): Likewise.
* tests/unilbrk/test-u32-possible-linebreaks.c (main): Likewise.
2021-12-28 Paul Eggert
nstrftime: improve handling of invalid formats
* lib/nstrftime.c (__strftime_internal): Without this change,
‘date +'%0_-+^#1%A'’ would output ‘%A’; with it, it outputs
something like ‘%0_-+^#1Tuesday’ which is easier to debug and to
write wrappers for (such as the nstrftime/fprintftime usage in GNU
‘date’).
2021-12-28 Bruno Haible
unilbrk: Update handling of regional indicators for Unicode 10.0.0.
* lib/unilbrk/u8-possible-linebreaks.c (u8_possible_linebreaks): Add
code for handling regional indicators.
* lib/unilbrk/u16-possible-linebreaks.c (u16_possible_linebreaks):
Likewise.
* lib/unilbrk/u32-possible-linebreaks.c (u32_possible_linebreaks):
Likewise.
* tests/unilbrk/test-u8-possible-linebreaks.c (main): Add a test
regarding regional indicators.
* tests/unilbrk/test-u16-possible-linebreaks.c (main): Likewise.
* tests/unilbrk/test-u32-possible-linebreaks.c (main): Likewise.
2021-12-28 Bruno Haible
unilbrk: Update handling of zero-width joiner for Unicode 10.0.0.
* lib/unilbrk/u8-possible-linebreaks.c (u8_possible_linebreaks): Update
code for zero-width joiner handling to match UAX #14 for Unicode 10.0.0.
* lib/unilbrk/u16-possible-linebreaks.c (u16_possible_linebreaks):
Likewise.
* lib/unilbrk/u32-possible-linebreaks.c (u32_possible_linebreaks):
Likewise.
* tests/unilbrk/test-u8-possible-linebreaks.c (main): Add a test
regarding zero-width joiner.
* tests/unilbrk/test-u16-possible-linebreaks.c (main): Likewise.
* tests/unilbrk/test-u32-possible-linebreaks.c (main): Likewise.
2021-12-28 Bruno Haible
unilbrk: Update handling of combining marks for Unicode 10.0.0.
* lib/unilbrk/u8-possible-linebreaks.c (u8_possible_linebreaks): Update
code for combining characters to match UAX #14 for Unicode 10.0.0.
Remove legacy support for space + combining mark.
* lib/unilbrk/u16-possible-linebreaks.c (u16_possible_linebreaks):
Likewise.
* lib/unilbrk/u32-possible-linebreaks.c (u32_possible_linebreaks):
Likewise.
* tests/unilbrk/test-u8-possible-linebreaks.c (main): Add a test
regarding combining characters.
* tests/unilbrk/test-u16-possible-linebreaks.c (main): Likewise.
* tests/unilbrk/test-u32-possible-linebreaks.c (main): Likewise.
2021-12-28 Bruno Haible
unilbrk: Restore deviation for (IS,AL) pair.
* lib/gen-uni-tables.c (output_lbrk_rules_as_tables): Disable rule LB29.
* lib/unilbrk/lbrktables.c: Regenerated.
* tests/unilbrk/test-u8-possible-linebreaks.c (main): Add test case with
HTML markup.
* tests/unilbrk/test-u16-possible-linebreaks.c (main): Likewise.
* tests/unilbrk/test-u32-possible-linebreaks.c (main): Likewise.
* tests/unilbrk/test-ulc-possible-linebreaks.c (main): Likewise.
2021-12-28 Bruno Haible
unilbrk: Change algorithm to be closer to Unicode Standard Annex #14.
* lib/gen-uni-tables.c (lbp_value_to_string): New function, extracted
from output_lbp.
(output_lbp): Invoke it.
(output_lbrk_rules_as_tables): New function.
(main): Invoke it.
* lib/unilbrk/lbrktables.c: Now automatically generated.
* tests/unilbrk/test-u8-possible-linebreaks.c (main): Update expected
result.
* tests/unilbrk/test-u16-possible-linebreaks.c (main): Likewise.
* tests/unilbrk/test-u32-possible-linebreaks.c (main): Likewise.
* tests/unilbrk/test-ulc-possible-linebreaks.c (main): Likewise.
* tests/unilbrk/test-ulc-width-linebreaks.c (main): Likewise.
2021-12-28 Bruno Haible
uniwbrk: Add unit tests of regional indicators.
* tests/uniwbrk/test-u8-wordbreaks.c (main): Add test of regional
indicators.
* tests/uniwbrk/test-u16-wordbreaks.c (main): Likewise.
* tests/uniwbrk/test-u32-wordbreaks.c (main): Likewise.
2021-12-28 Bruno Haible
unigbrk: Simplify code for regional indicators.
* lib/unigbrk/u-grapheme-breaks.h (FUNC): Make code for regional
indicators more future-proof.
* tests/unigbrk/test-u8-grapheme-breaks.c (main): Add test of regional
indicators.
* tests/unigbrk/test-u16-grapheme-breaks.c (main): Likewise.
* tests/unigbrk/test-u32-grapheme-breaks.c (main): Likewise.
2021-12-28 Paul Eggert
clock_getres: document portability issues better
* doc/posix-functions/clock_getres.texi:
* doc/posix-functions/timespec_getres.texi:
Document problems with timestamp resolution.
timespec_getres: new module
* lib/time.in.h (timespec_getres): New decl.
* lib/timespec_getres.c, m4/timespec_getres.m4:
* modules/timespec_getres, modules/timespec_getres-tests:
* tests/test-timespec_getres.c:
New files.
* m4/time_h.m4 (gl_TIME_H_REQUIRE_DEFAULTS, gl_TIME_H_DEFAULTS):
* modules/time (time.h):
Support timespec_getres.
gettime-res: new module
* lib/gettime-res.c, modules/gettime-res: New files.
* lib/timespec.h (gettime_res): New decl.
* m4/clock_time.m4 (gl_CLOCK_TIME): Also check for clock_getres.
* m4/gettime.m4 (gl_GETTIME_RES): New macro.
gettime: port better to non-POSIX C2x
C2x requires a function timespec_get; prefer that to
gettimeofday, since it has better resolution.
* lib/gettime.c (gettime): Prefer timespec_get to gettimeofday.
* m4/gettime.m4 (gl_GETTIME): Check for timespec_get.
Omit a check for gettimeofday; not needed because
the gettime module depends on the gettimeofday module.
2021-12-28 Bruno Haible
gen-uni-tables: Produce license notices suitable for Gnulib.
* lib/gen-uni-tables.c (output_library_license, output_tests_license):
Produce license notices that are consistent with the
gnulib/etc/license-notices/ files.
* All generated files under lib/uni* and tests/uni*: Regenerate.
2021-12-28 Bruno Haible
unigbrk, uniwbrk: No-op tweaks.
* lib/unigbrk/u-grapheme-breaks.h: Comment tweaks.
* lib/uniwbrk/u-wordbreaks.h: Coding style and comment tweaks.
* lib/uniwbrk/wbrktable.c: Comment tweaks.
2021-12-28 Paul Eggert
perl: let caller see whether perl was found
Problem reported for coreutils by Serge Belyshev (Bug#52844).
* m4/perl.m4 (gl_PERL): Use AC_CACHE_CHECK, so that
an invoker of gl_PERL can later inspect gl_cv_prog_perl
to see whether perl was found.
2021-12-28 Bruno Haible
Fix --automake-subdir breakage (regression 2021-12-24).
Reported by Bjarni Ingi Gislason in
.
* build-aux/prefix-gnulib-mk (prefix_assignment): Don't change
SED_HEADER_* variables.
2021-12-26 Bruno Haible
Update to Unicode 10.0.0.
* lib/gen-uni-tables.c (PROP_REGIONAL_INDICATOR): New enum value.
(fill_properties): Recognize property "Regional_Indicator".
(is_property_regional_indicator): New function.
(output_properties): Also output the data for regional_indicator.
(get_lbp): Update such that unilbrk/lbrkprop.txt comes out as expected.
Use is_property_regional_indicator.
(get_wbp): Update such that uniwbrk/wbrkprop.txt comes out as expected.
Use is_property_regional_indicator.
(UC_JOINING_GROUP_MALAYALAM_*): New enum values.
(fill_arabicshaping, joining_group_as_c_identifier): Recognize these
joining groups.
* lib/uniname/gen-uninames.lisp (main): Ignore empty lines and comment
lines in the aliases file. Needed because since 2015-06-20, we use the
unmodified Unicode NameAliases.txt file. Remove reference to undefined
variable. Correct indentation.
* lib/unictype.in.h (UC_PROPERTY_REGIONAL_INDICATOR,
uc_is_property_regional_indicator): New declarations.
* lib/unictype/pr_regional_indicator.c: New file.
* modules/unictype/property-regional-indicator: New file.
* modules/unictype/property-regional-indicator-tests: New file.
* modules/unictype/property-all (Depends-on): Add
unictype/property-regional-indicator.
* lib/unictype.in.h (UC_JOINING_GROUP_MALAYALAM_*): New enum values.
* lib/unictype/joininggroup_name.h: Add the MALAYALAM_* joining groups.
* lib/unictype/joininggroup_byname.gperf: Likewise.
* lib/uniwidth/width.c (nonspacing_table_data, nonspacing_table_ind):
Update.
* tests/uniwidth/test-uc_width2.sh: Expect width 0 for the characters
0x0AFA..0x0AFF, 0x0D00, 0x0D3B..0x0D3C, 0x1DF6..0x1DF9,
0x11A01..0x11A06, 0x11A09..0x11A0A, 0x11A33..0x11A38, 0x11A3B..0x11A3E,
0x11A47, 0x11A51..0x11A56, 0x11A59..0x11A5B, 0x11A8A..0x11A96,
0x11A98..0x11A99, 0x11D31..0x11D36, 0x11D3A, 0x11D3C..0x11D3D,
0x11D3F..0x11D45, 0x11D47.
* All generated files under lib/uni* and tests/uni*: Regenerate.
* tests/uniname/NameAliases.txt: Update.
* tests/uniname/UnicodeData.txt: Update.
* tests/uninorm/NormalizationTest.txt: Update.
* tests/unigbrk/GraphemeBreakTest.txt: Update.
* tests/uniwbrk/WordBreakTest.txt: Update.
* All the affected modules: Bump required libunistring version.
2021-12-26 Bruno Haible
pselect: Fix compilation error in C++ mode on AIX 7.
* lib/sys_select.in.h (pselect): Use _GL_CXXALIAS_SYS_CAST instead of
_GL_CXXALIAS_SYS.
* doc/posix-functions/pselect.texi: Mention the AIX problem.
2021-12-25 Bruno Haible
gnulib-tool: Fix handling of module libtextstyle-optional.
Reported by Paul Eggert in
.
* gnulib-tool (func_repeat_module_in_tests): New function.
(func_emit_tests_Makefile_am, func_create_testdir): Use it for the file
list and when creating tests/Makefile.am.
2021-12-25 Bruno Haible
gnulib-tool: Respect applicability 'all' without --single-configure.
* gnulib-tool (func_verify_tests_module): Treat modules with
applicability 'all' like 'tests' modules, not like 'main' modules.
2021-12-24 Paul Eggert
maint: avoid empty lines in recipes
AIX 7.2 ‘make’ complains about recipe lines that are empty after
macro expansion, and I suppose there’s a good chance some
non-POSIX ‘make’ would prohibit them. Rework macros so
that we can avoid them.
* gnulib-tool (func_emit_lib_Makefile_am)
(func_emit_tests_Makefile_am): Support @!NMD@ too.
* modules/gen-header (@gl_V_at): New macro.
* modules/alloca-opt, modules/argz, modules/assert-h:
* modules/byteswap, modules/configmake, modules/ctype:
* modules/dirent, modules/errno, modules/execinfo, modules/fcntl-h:
* modules/float, modules/fnmatch-h, modules/getopt-posix:
* modules/glob-h, modules/iconv-h, modules/ieee754-h:
* modules/inttypes-incomplete, modules/langinfo:
* modules/libtextstyle-optional, modules/limits-h, modules/locale:
* modules/malloc-h, modules/math, modules/monetary, modules/netdb:
* modules/openmp-init, modules/poll-h, modules/posix-shell:
* modules/pthread-h, modules/pty, modules/sched, modules/search:
* modules/signal-h, modules/sigsegv, modules/snippet/link-warning:
* modules/spawn, modules/stdalign, modules/stdarg, modules/stdbool:
* modules/stddef, modules/stdint, modules/stdio, modules/stdlib:
* modules/stdnoreturn, modules/string, modules/strings:
* modules/sysexits, modules/termios, modules/threads-h:
* modules/time, modules/uchar, modules/unicase/base:
* modules/uniconv/base, modules/unictype/base, modules/unigbrk/base:
* modules/unilbrk/base, modules/uniname/base, modules/uninorm/base:
* modules/unistd, modules/unistdio/base, modules/unistr/base:
* modules/unitypes, modules/uniwbrk/base, modules/uniwidth/base:
* modules/utime-h, modules/wchar, modules/wctype-h:
Use it.
maint: tight-scope.mk need not be read-only
* top/maint.mk (tight-scope.mk): Don’t bother to make
tight-scope.mk read-only either.
maint: break out '&& mv $@-t $@'
* build-aux/git-version-gen, config/argz.mk, modules/configmake:
* modules/posix_spawnp-tests, modules/snippet/link-warning:
* top/maint.mk:
Break out '&& mv $@-t $@' to a separate line in the Make recipe,
as this makes things a bit easier to debug.
gen-header: new module
Simplify header generation by using Makefile variables
defined by a new gen-header module.
* modules/gen-header: New module.
* modules/alloca-opt, modules/argz, modules/arpa_inet:
* modules/assert-h, modules/byteswap:
* modules/ctype, modules/dirent, modules/dynarray, modules/errno:
* modules/execinfo, modules/fcntl-h, modules/float:
* modules/fnmatch-h, modules/getopt-posix, modules/glob-h:
* modules/iconv-h, modules/ieee754-h, modules/inttypes-incomplete:
* modules/langinfo, modules/libtextstyle-optional, modules/limits-h:
* modules/locale, modules/malloc-h, modules/math, modules/monetary:
* modules/net_if, modules/netdb, modules/netinet_in:
* modules/openmp-init, modules/poll-h:
* modules/pthread-h, modules/pty, modules/sched:
* modules/scratch_buffer, modules/search, modules/selinux-h:
* modules/signal-h, modules/sigsegv:
* modules/spawn, modules/stdalign, modules/stdarg, modules/stdbool:
* modules/stddef, modules/stdint, modules/stdio, modules/stdlib:
* modules/stdnoreturn, modules/string, modules/strings:
* modules/sys_file, modules/sys_ioctl, modules/sys_random:
* modules/sys_resource, modules/sys_select, modules/sys_socket:
* modules/sys_stat, modules/sys_time, modules/sys_times:
* modules/sys_types, modules/sys_uio, modules/sys_utsname:
* modules/sys_wait, modules/sysexits, modules/termios:
* modules/threads-h, modules/time, modules/uchar:
* modules/unicase/base, modules/unicase/special-casing:
* modules/uniconv/base, modules/unictype/base, modules/unigbrk/base:
* modules/unilbrk/base, modules/uniname/base, modules/uninorm/base:
* modules/unistd, modules/unistdio/base, modules/unistr/base:
* modules/unitypes, modules/uniwbrk/base, modules/uniwidth/base:
* modules/utime-h, modules/wchar, modules/wctype-h:
Depend on gen-header, and use its macros to simplify
header generation.
2021-12-24 Bruno Haible
passfd: Fix compilation error on IRIX.
* lib/passfd.c (sendfd): On IRIX, ignore CMSG_FIRSTHDR.
(recvfd): Likewise. Produce a fake error ENOTCONN.
2021-12-24 Bruno Haible
tests: Fix link errors on AIX.
* modules/fnmatch-h-c++-tests (Makefile.am): Link test-fnmatch-h-c++
with $(LIB_MBRTOWC).
* modules/glob-h-c++-tests (Makefile.am): Link test-glob-h-c++ with
$(LIB_MBRTOWC).
* modules/stdlib-c++-tests (Makefile.am): Link test-stdlib-c++ with
$(GETLOADAVG_LIBS).
* modules/sys_stat-c++-tests (Makefile.am): Link test-sys_stat-c++ with
$(LIB_MBRTOWC).
* modules/uchar-c++-tests (Makefile.am): Link test-uchar-c++ with
$(LIBUNISTRING).
2021-12-24 Bruno Haible
hamt tests: Fix compilation error with AIX xlc.
* tests/test-hamt.c (test_iterator): Don't use compound initializer.
2021-12-24 Bruno Haible
strerrorname_np: Fix compilation error on IRIX.
* lib/strerrorname_np.c (strerrorname_np): Handle conflict between
EDIRCORRUPTED and EFSCORRUPTED.
* tests/test-strerrorname_np.c (main): Likewise.
2021-12-24 Bruno Haible
hamt: Fix compilation error on NetBSD 7.
* lib/hamt.h (GL_HAMT_THREAD_SAFE): Define to 0 if the compiler is a
GCC version < 4.9.
2021-12-24 Bruno Haible
search: Fix compilation errors with SunPRO C++ on Solaris 10.
* lib/search.in.h (_gl_lsearch_compar_fn): New type.
(lfind, lsearch): Use it.
2021-12-24 Bruno Haible
qsort_r: Fix compilation error with SunPRO C++ on Solaris 10.
* lib/stdlib.in.h (_gl_qsort_r_compar_fn): New type.
(qsort_r): Use it.
* tests/test-stdlib-c++.cc (qsort_r): Don't test with SunPRO C++.
2021-12-24 Bruno Haible
threads-h tests: Avoid clang warnings.
* tests/test-threads.c (main): Add 'default' to switch statements.
2021-12-24 Bruno Haible
doc: Small updates.
* doc/glibc-functions/ptsname_r.texi: Update info regarding Mac OS X.
* doc/posix-functions/getlogin_r.texi: Update info regarding FreeBSD.
2021-12-22 Paul Eggert
libgmp: omit redundant 'mkdir -p .'
* modules/libgmp: Mark $(MKDIR) with @NMD@; this was missed
in a previous pass.
maint: omit unnecessary ‘rm -f $@-t $@’
* modules/alloca-opt, modules/argz, modules/arpa_inet:
* modules/assert-h, modules/byteswap, modules/configmake:
* modules/ctype, modules/dirent, modules/dynarray, modules/errno:
* modules/execinfo, modules/fcntl-h, modules/float:
* modules/fnmatch-h, modules/getopt-posix, modules/glob-h:
* modules/iconv-h, modules/ieee754-h, modules/inttypes-incomplete:
* modules/langinfo, modules/libtextstyle-optional:
* modules/limits-h, modules/langinfo, modules/libgmp, modules/limits-h:
* modules/locale, modules/malloc-h, modules/math, modules/monetary:
* modules/net_if, modules/netdb, modules/netinet_in:
* modules/openmp-init, modules/poll-h, modules/posix-shell:
* modules/posix_spawnp-tests, modules/pthread-h, modules/pty:
* modules/sched, modules/scratch_buffer, modules/search:
* modules/selinux-h, modules/signal-h, modules/sigsegv:
* modules/snippet/link-warning, modules/spawn, modules/stdalign:
* modules/stdarg, modules/stdbool, modules/stddef, modules/stdint:
* modules/stdio, modules/stdlib, modules/stdnoreturn:
* modules/string, modules/strings, modules/sys_file:
* modules/sys_ioctl, modules/sys_random, modules/sys_resource:
* modules/sys_select, modules/sys_socket, modules/sys_stat:
* modules/sys_time, modules/sys_times, modules/sys_types:
* modules/sys_uio, modules/sys_utsname, modules/sys_wait:
* modules/sysexits, modules/termios, modules/threads-h:
* modules/time, modules/uchar, modules/unicase/base:
* modules/unicase/special-casing, modules/uniconv/base:
* modules/unictype/base, modules/unigbrk/base, modules/unilbrk/base:
* modules/uniname/base, modules/uninorm/base, modules/unistd:
* modules/unistdio/base, modules/unistr/base, modules/unitypes:
* modules/uniwbrk/base, modules/uniwidth/base, modules/utime-h:
* modules/wchar, modules/wctype-h:
Don’t bother to do a ‘rm -f $@-t $@’ at the start of recipes that
create .h and similar files. This is a revenant of a style in
which the files were created read-only. Also, consistently use
use plain ‘mv $@-t $@’ afterwards, instead of usually using
‘mv -f’ but sometimes plain ‘mv’.
2021-12-21 Paul Eggert
maint: fix __clang_major__ misspellings
The intprops.h typo fix should fix a bug in Emacs on Debian testing
with clang .
* lib/asyncsafe-spin.c, lib/intprops.h, lib/pthread-spin.c:
Fix some misspellings of ‘__clang_major__’.
I left one misspelling alone, in lib/cdefs.h,
and instead reported that bug upstream here:
https://sourceware.org/pipermail/libc-alpha/2021-December/134512.html
2021-12-21 Bruno Haible
get_ppid_of, get_progname_of: Fix runtime error on Mac OS X < 10.5.
Reported by Evan Miller
.
* lib/get_ppid_of.c (proc_pidinfo): Declare with WEAK_IMPORT_ATTRIBUTE.
(get_ppid_of): Test whether the symbol declared weak evaluates to
non-NULL before invoking it.
* lib/get_progname_of (proc_pidinfo): Declare with
WEAK_IMPORT_ATTRIBUTE.
(get_progname_of): Test whether the symbol declared weak evaluates to
non-NULL before invoking it.
2021-12-21 Paul Eggert
Move AM_V_GEN to recipe start
This is especially needed when building Emacs, as it uses
‘AM_V_GEN=@$(info GEN $@)', which means the GEN line is output by
GNU make just before the recipe runs, regardless of where AM_V_GEN
appears in the recipe. And it’s also good practice even if the
default Automake ‘AM_V_GEN=@echo GEN $@;’ is used, as it’s better
to output the GEN line consistently at the start of every recipe,
even if this precedes a preparatory command that almost always
works silently.
* modules/arpa_inet, modules/dynarray, modules/net_if:
* modules/netinet_in, modules/scratch_buffer, modules/selinux-h:
* modules/sys_file, modules/sys_ioctl, modules/sys_random:
* modules/sys_resource, modules/sys_select, modules/sys_socket:
* modules/sys_stat, modules/sys_time, modules/sys_times:
* modules/sys_types, modules/sys_uio, modules/sys_utsname:
* modules/sys_wait, modules/unicase/special-casing, top/maint.mk:
Use AM_V_GEN only at the start of each recipe.
2021-12-21 Bruno Haible
c-xvasprintf: Fix declarations (regression 2021-08-07).
* lib/c-xvasprintf.h (c_xasprintf, c_xvasprintf): Remove
_GL_ATTRIBUTE_RETURNS_NONNULL attribute.
2021-12-21 Bruno Haible
snippet/warn-on-use: Fix compilation error in C++ mode on OpenBSD 7.0.
* lib/warn-on-use.h (_GL_WARN_ON_USE): In C++ mode, declare function
with "C" linkage.
2021-12-21 Bruno Haible
Optimize redundant 'mkdir -p .' invocations.
Reported by Paul Eggert.
* gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
Eliminate @NMD@ tokens.
* modules/alloca-opt (Makefile.am): Prefix the "$(MKDIR_P) '%reldir%'"
line with @NMD@.
* modules/argz (Makefile.am): Likewise.
* modules/assert-h (Makefile.am): Likewise.
* modules/byteswap (Makefile.am): Likewise.
* modules/configmake (Makefile.am): Likewise.
* modules/ctype (Makefile.am): Likewise.
* modules/dirent (Makefile.am): Likewise.
* modules/errno (Makefile.am): Likewise.
* modules/execinfo (Makefile.am): Likewise.
* modules/fcntl-h (Makefile.am): Likewise.
* modules/float (Makefile.am): Likewise.
* modules/fnmatch-h (Makefile.am): Likewise.
* modules/getopt-posix (Makefile.am): Likewise.
* modules/glob-h (Makefile.am): Likewise.
* modules/iconv-h (Makefile.am): Likewise.
* modules/ieee754-h (Makefile.am): Likewise.
* modules/inttypes-incomplete (Makefile.am): Likewise.
* modules/langinfo (Makefile.am): Likewise.
* modules/libtextstyle-optional (Makefile.am): Likewise.
* modules/limits-h (Makefile.am): Likewise.
* modules/locale (Makefile.am): Likewise.
* modules/malloc-h (Makefile.am): Likewise.
* modules/math (Makefile.am): Likewise.
* modules/monetary (Makefile.am): Likewise.
* modules/netdb (Makefile.am): Likewise.
* modules/openmp-init (Makefile.am): Likewise.
* modules/poll-h (Makefile.am): Likewise.
* modules/posix-shell (Makefile.am): Likewise.
* modules/pthread-h (Makefile.am): Likewise.
* modules/pty (Makefile.am): Likewise.
* modules/sched (Makefile.am): Likewise.
* modules/search (Makefile.am): Likewise.
* modules/signal-h (Makefile.am): Likewise.
* modules/sigsegv (Makefile.am): Likewise.
* modules/snippet/link-warning (Makefile.am): Likewise.
* modules/spawn (Makefile.am): Likewise.
* modules/stdalign (Makefile.am): Likewise.
* modules/stdarg (Makefile.am): Likewise.
* modules/stdbool (Makefile.am): Likewise.
* modules/stddef (Makefile.am): Likewise.
* modules/stdint (Makefile.am): Likewise.
* modules/stdio (Makefile.am): Likewise.
* modules/stdlib (Makefile.am): Likewise.
* modules/stdnoreturn (Makefile.am): Likewise.
* modules/string (Makefile.am): Likewise.
* modules/strings (Makefile.am): Likewise.
* modules/sysexits (Makefile.am): Likewise.
* modules/termios (Makefile.am): Likewise.
* modules/threads-h (Makefile.am): Likewise.
* modules/time (Makefile.am): Likewise.
* modules/uchar (Makefile.am): Likewise.
* modules/unicase/base (Makefile.am): Likewise.
* modules/uniconv/base (Makefile.am): Likewise.
* modules/unictype/base (Makefile.am): Likewise.
* modules/unigbrk/base (Makefile.am): Likewise.
* modules/unilbrk/base (Makefile.am): Likewise.
* modules/uniname/base (Makefile.am): Likewise.
* modules/uninorm/base (Makefile.am): Likewise.
* modules/unistd (Makefile.am): Likewise.
* modules/unistdio/base (Makefile.am): Likewise.
* modules/unistr/base (Makefile.am): Likewise.
* modules/unitypes (Makefile.am): Likewise.
* modules/uniwbrk/base (Makefile.am): Likewise.
* modules/uniwidth/base (Makefile.am): Likewise.
* modules/utime-h (Makefile.am): Likewise.
* modules/wchar (Makefile.am): Likewise.
* modules/wctype-h (Makefile.am): Likewise.
2021-12-19 Bruno Haible
non-recursive-gnulib-prefix-hack: Deprecate module.
* modules/non-recursive-gnulib-prefix-hack (Status, Notice): New
sections.
2021-12-19 Bruno Haible
gnulib-tool: Don't insist on ACLOCAL_AMFLAGS.
Reported by Bjarni Ingi Gislason in
.
* gnulib-tool (func_import): Mention an AC_CONFIG_MACRO_DIRS invocation
as an alternative to augmenting ACLOCAL_AMFLAGS.
(--import, --add-import, --remove-import, --update): To find the m4
directories, look also for AC_CONFIG_MACRO_DIR and AC_CONFIG_MACRO_DIRS
invocations in configure.ac.
2021-12-18 Bruno Haible
nstrftime: Update meta info.
* config/srclist.txt: Fix typo from 2017-07-23.
2021-12-18 Bruno Haible
stdint: Fix handling of limits.h (regression 2021-12-16).
* modules/stdint (configure.ac): Revert last change.
* gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
If --gnu-make is used, assume that AC_SUBSTed variables for conditionals
are constructed by appending the suffix '_CONDITION'.
2021-12-18 Paul Eggert
nstrftime: simplify by using libc-config.h.
* lib/nstrftime.c [!_LIBC]: Include libc-config.h
instead of config.h.
(iso_week_days): Simplify via libc-config.h’s __inline.
(my_strftime): Simplify via libc-config.h’s libc_hidden_def.
* modules/nstrftime (Depends-on): Add libc-config.
2021-12-18 Bruno Haible
libtextstyle-optional: Fix generation of textstyle.h (regr. 2021-12-15).
* m4/libtextstyle-optional.m4 (gl_LIBTEXTSTYLE_OPTIONAL): Invoke
gl_CONDITIONAL_HEADER.
2021-12-18 Bruno Haible
Fix support for --gnu-make in tests (regression 2021-12-15).
* gnulib-tool (func_emit_tests_Makefile_am): When producing output for
GNU make, eliminate %reldir% tokens.
2021-12-17 Bruno Haible
getopt-posix: Fix build on AIX (regression 2021-12-15).
* modules/getopt-posix (configure.ac): Arrange to generate
getopt-cdefs.h.
(Makefile.am): Separate the rules for getopt.h and getopt-cdefs.h.
2021-12-16 Paul Eggert
getopt-posix: omit unnessary building of getopt.h
* modules/getopt-posix (getopt.h, getopt-cdefs.h):
Build only if GL_GENERATE_GETOPT_H.
stdint: omit duplicate gl_CONFIGURE_HEADER calls
* modules/stdint (configure.ac): Omit
‘gl_CONDITIONAL_HEADER([limits.h])’, since stdint depends on
limits-h and doing gl_CONDITIONAL_HEADER twice can result in
‘configure’ failing with “*** GL_GENERATE_LIMITS_H is not set
correctly”.
2021-12-15 Bruno Haible
automake-subdir support: Support the libunistring modules.
* m4/libunistring-base.m4 (gl_LIBUNISTRING_LIBHEADER): Use the value of
the gl_source_base_prefix variable.
2021-12-15 Bruno Haible
automake-subdir support: Support arbitrary --source-base value.
Reported by Marc Nieper-Wißkirchen in
.
* build-aux/prefix-gnulib-mk ($canon_prefix): New variable.
(prefix): Initialize it.
(prefix_assignment): Use it.
2021-12-15 Bruno Haible
automake-subdir support: Look for 'subdir-objects' also in configure.ac.
* gnulib-tool: Look for the automake options also in the first argument
of the AM_INIT_AUTOMAKE invocation in configure.ac.
2021-12-15 Bruno Haible
Add simple examples.
* examples: New directory.
2021-12-15 Bruno Haible
Accommodate non-recursive Automake in a less hacky way.
* gnulib-tool: New option --automake-subdir.
(automake_subdir): New variable.
(func_emit_initmacro_end): Add a second argument. Use it to prefix each
object file name in *_LIBOBJS and *_LTLIBOBJS.
(func_emit_shellvars_init): New function.
(func_import): Add support for --automake-subdir. Invoke
prefix-gnulib-mk. Update calls to func_emit_initmacro_end. Call
func_emit_shellvars_init.
(func_create_testdir): Update calls to func_emit_initmacro_end. Call
func_emit_shellvars_init.
* m4/gnulib-tool.m4 (gl_AUTOMAKE_SUBDIR): New macro.
* m4/gnulib-common.m4 (gl_CONDITIONAL_HEADER): Use the value of the
gl_source_base_prefix variable.
* build-aux/prefix-gnulib-mk: New options --from-gnulib-tool, --prefix.
(contents_of_file): Renamed from contents.
(contents_of_stdin): New function.
(process): Inline and remove function.
* doc/gnulib-tool.texi (Non-recursive make): New section.
2021-12-15 Bruno Haible
Move .h file names out of the *.m4 files.
This is useful because Autoconf macros defined in *.m4 files can be
AC_REQUIREd. In the configure file, they are then expanded before
gl_INIT, i.e. at a place where it is not known whether they are required
for the lib/ or for the tests/ directory (or both).
* m4/gnulib-common.m4 (gl_CONDITIONAL_HEADER): New macro.
* m4/alloca.m4 (gl_FUNC_ALLOCA): Set GL_GENERATE_ALLOCA_H instead of
ALLOCA_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
* modules/alloca-opt (configure.ac): Invoke gl_CONDITIONAL_HEADER.
* m4/argz.m4 (gl_FUNC_ARGZ): Set GL_GENERATE_ARGZ_H instead of ARGZ_H.
Drop AC_SUBST and AM_CONDITIONAL invocations.
* modules/argz (configure.ac): Invoke gl_CONDITIONAL_HEADER.
* m4/assert_h.m4 (gl_ASSERT_H): Set GL_GENERATE_ASSERT_H instead of
ASSERT_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
* modules/assert-h (configure.ac): Invoke gl_CONDITIONAL_HEADER.
* m4/byteswap.m4 (gl_BYTESWAP): Set GL_GENERATE_BYTESWAP_H instead of
BYTESWAP_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
* modules/byteswap (configure.ac): Invoke gl_CONDITIONAL_HEADER.
* m4/errno_h.m4 (gl_HEADER_ERRNO_H): Set GL_GENERATE_ERRNO_H instead of
ERRNO_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
(gl_REPLACE_ERRNO_VALUE): Update.
* m4/perror.m4 (gl_FUNC_PERROR): Update.
* m4/strerror.m4 (gl_FUNC_STRERROR): Update.
* m4/strerror_r.m4 (gl_FUNC_STRERROR_R, gl_FUNC_STRERROR_R_WORKS):
Update.
* modules/errno (configure.ac): Invoke gl_CONDITIONAL_HEADER.
* m4/execinfo.m4 (gl_EXECINFO_H): Set GL_GENERATE_EXECINFO_H instead of
EXECINFO_H. Drop AC_SUBST and AM_CONDITIONAL invocations. Drop AC_LIBOBJ
invocation.
* modules/execinfo (configure.ac): Invoke gl_CONDITIONAL_HEADER and
AC_LIBOBJ.
* m4/float_h.m4 (gl_FLOAT_H): Set GL_GENERATE_FLOAT_H instead of
FLOAT_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
* modules/float (configure.ac): Invoke gl_CONDITIONAL_HEADER.
* m4/fnmatch_h.m4 (gl_FNMATCH_H, gl_REPLACE_FNMATCH_H): Set
GL_GENERATE_FNMATCH_H instead of FNMATCH_H. Drop AC_SUBST and
AM_CONDITIONAL invocations.
* modules/fnmatch-h (configure.ac): Invoke gl_CONDITIONAL_HEADER.
* modules/fnmatch (configure.ac): Likewise.
* m4/getopt.m4 (gl_FUNC_GETOPT_POSIX, gl_GETOPT_SUBSTITUTE_HEADER): Set
GL_GENERATE_GETOPT_H instead of GETOPT_H. Set GL_GENERATE_GETOPT_CDEFS_H
instead of GETOPT_CDEFS_H. Drop AC_SUBST invocations.
* modules/getopt-posix (configure.ac): Invoke gl_CONDITIONAL_HEADER.
* m4/glob_h.m4 (gl_GLOB_H, gl_REPLACE_GLOB_H): Set GL_GENERATE_GLOB_H
instead of GLOB_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
* modules/glob-h (configure.ac): Invoke gl_CONDITIONAL_HEADER.
* modules/glob (configure.ac): Likewise.
* m4/iconv_h.m4 (gl_ICONV_H_DEFAULTS, gl_REPLACE_ICONV_H): Set
GL_GENERATE_ICONV_H instead of ICONV_H. Drop AC_SUBST and AM_CONDITIONAL
invocations.
(gl_ICONV_H): Update.
* modules/iconv-h (configure.ac): Invoke gl_CONDITIONAL_HEADER.
* modules/iconv_open (configure.ac): Likewise.
* m4/ieee754-h.m4 (gl_IEEE754_H): Set GL_GENERATE_IEEE754_H instead of
IEEE754_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
* modules/ieee754-h (configure.ac): Invoke gl_CONDITIONAL_HEADER.
* m4/libgmp.m4 (gl_LIBGMP): Set GL_GENERATE_GMP_H instead of GMP_H. Drop
AC_SUBST invocation.
* modules/libgmp (configure.ac): Invoke gl_CONDITIONAL_HEADER.
(Makefile.am): Use GL_GENERATE_GMP_H.
* m4/libtextstyle-optional.m4 (gl_LIBTEXTSTYLE_OPTIONAL): Set
GL_GENERATE_TEXTSTYLE_H instead of TEXTSTYLE_H. Drop AC_SUBST and
AM_CONDITIONAL invocations.
* modules/libtextstyle-optional (configure.ac): Invoke
gl_CONDITIONAL_HEADER.
* m4/limits-h.m4 (gl_LIMITS_H, gl_REPLACE_LIMITS_H): Set
GL_GENERATE_LIMITS_H instead of LIMITS_H. Drop AC_SUBST and
AM_CONDITIONAL invocations.
* modules/limits-h (configure.ac): Invoke gl_CONDITIONAL_HEADER.
* m4/monetary_h.m4 (gl_MONETARY_H): Set GL_GENERATE_MONETARY_H instead
of MONETARY_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
* modules/monetary (configure.ac): Invoke gl_CONDITIONAL_HEADER.
* m4/net_if_h.m4 (gl_HEADER_NET_IF): Set GL_GENERATE_NET_IF_H instead of
NET_IF_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
* modules/net_if (configure.ac): Invoke gl_CONDITIONAL_HEADER.
* m4/netinet_in_h.m4 (gl_HEADER_NETINET_IN): Set
GL_GENERATE_NETINET_IN_H instead of NETINET_IN_H. Drop AC_SUBST and
AM_CONDITIONAL invocations.
* modules/netinet_in (configure.ac): Invoke gl_CONDITIONAL_HEADER.
* m4/selinux-context-h.m4 (gl_HEADERS_SELINUX_CONTEXT_H): Set
GL_GENERATE_SELINUX_CONTEXT_H instead of SELINUX_CONTEXT_H. Drop
AC_SUBST and AM_CONDITIONAL invocations.
* m4/selinux-label-h.m4 (gl_HEADERS_SELINUX_LABEL_H): Set
GL_GENERATE_SELINUX_LABEL_H instead of SELINUX_LABEL_H. Drop AC_SUBST
and AM_CONDITIONAL invocations.
* modules/selinux-h (configure.ac): Invoke gl_CONDITIONAL_HEADER.
* m4/stdalign.m4 (gl_STDALIGN_H): Set GL_GENERATE_STDALIGN_H instead of
STDALIGN_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
* modules/stdalign (configure.ac): Invoke gl_CONDITIONAL_HEADER.
* m4/stdarg.m4 (gl_STDARG_H): Set GL_GENERATE_STDARG_H instead of
STDARG_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
* modules/stdarg (configure.ac): Invoke gl_CONDITIONAL_HEADER.
* m4/stdbool.m4 (gl_STDBOOL_H): Renamed from AM_STDBOOL_H. Set
GL_GENERATE_STDBOOL_H instead of STDBOOL_H. Drop AC_SUBST and
AM_CONDITIONAL invocations.
* m4/parse-datetime.m4 (gl_PARSE_DATETIME): Don't require AM_STDBOOL_H.
* modules/stdbool (configure.ac): Invoke gl_STDBOOL_H instead of
AM_STDBOOL_H. Invoke gl_CONDITIONAL_HEADER.
* m4/stddef_h.m4 (gl_STDDEF_H): Set GL_GENERATE_STDDEF_H instead of
STDDEF_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
* modules/stddef (configure.ac): Invoke gl_CONDITIONAL_HEADER.
* m4/stdint.m4 (gl_STDINT_H): Set GL_GENERATE_STDINT_H instead of
STDINT_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
* m4/inttypes.m4 (gl_INTTYPES_PRI_SCN): Update.
* modules/stdint (configure.ac): Invoke gl_CONDITIONAL_HEADER.
* m4/stdnoreturn.m4 (gl_STDNORETURN_H): Set GL_GENERATE_STDNORETURN_H
instead of STDNORETURN_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
* modules/stdnoreturn (configure.ac): Invoke gl_CONDITIONAL_HEADER.
* m4/sys_socket_h.m4 (gl_SYS_SOCKET_H): Set GL_GENERATE_SYS_SOCKET_H
instead of SYS_SOCKET_H.
* m4/sysexits.m4 (gl_SYSEXITS): Set GL_GENERATE_SYSEXITS_H instead of
SYSEXITS_H. Drop AC_SUBST and AM_CONDITIONAL invocations.
* modules/sysexits (configure.ac): Invoke gl_CONDITIONAL_HEADER.
* modules/sigsegv (configure.ac): Set GL_GENERATE_SIGSEGV_H instead of
SIGSEGV_H. Drop AC_SUBST and AM_CONDITIONAL invocations. Invoke
gl_CONDITIONAL_HEADER.
2021-12-15 Bruno Haible
Fix creation of build directories with non-recursive-gnulib-prefix-hack.
This is necessary for executing "make" in a VPATH build of a package
that uses prefix-gnulib-mk and a module such as alloca-opt.
* modules/alloca-opt (Makefile.am): Before generating the .h-t file,
ensure that the directory in which we want to create it exists.
(configure.ac): Invoke AC_PROG_MKDIR_P.
* modules/argz: Likewise.
* modules/arpa_inet: Likewise.
* modules/assert-h: Likewise.
* modules/byteswap: Likewise.
* modules/configmake: Likewise.
* modules/ctype: Likewise.
* modules/dirent: Likewise.
* modules/dynarray: Likewise.
* modules/errno: Likewise.
* modules/execinfo: Likewise.
* modules/fcntl-h: Likewise.
* modules/float: Likewise.
* modules/fnmatch-h: Likewise.
* modules/getopt-posix: Likewise.
* modules/glob-h: Likewise.
* modules/iconv-h: Likewise.
* modules/ieee754-h: Likewise.
* modules/inttypes-incomplete: Likewise.
* modules/langinfo: Likewise.
* modules/libgmp: Likewise.
* modules/libtextstyle-optional: Likewise.
* modules/limits-h: Likewise.
* modules/locale: Likewise.
* modules/malloc-h: Likewise.
* modules/math: Likewise.
* modules/monetary: Likewise.
* modules/net_if: Likewise.
* modules/netdb: Likewise.
* modules/netinet_in: Likewise.
* modules/openmp-init: Likewise.
* modules/poll-h: Likewise.
* modules/posix-shell: Likewise.
* modules/pthread-h: Likewise.
* modules/pty: Likewise.
* modules/sched: Likewise.
* modules/scratch_buffer: Likewise.
* modules/search: Likewise.
* modules/selinux-h: Likewise.
* modules/signal-h: Likewise.
* modules/sigsegv: Likewise.
* modules/snippet/link-warning: Likewise.
* modules/spawn: Likewise.
* modules/stdalign: Likewise.
* modules/stdarg: Likewise.
* modules/stdbool: Likewise.
* modules/stddef: Likewise.
* modules/stdint: Likewise.
* modules/stdio: Likewise.
* modules/stdlib: Likewise.
* modules/stdnoreturn: Likewise.
* modules/string: Likewise.
* modules/strings: Likewise.
* modules/sys_file: Likewise.
* modules/sys_ioctl: Likewise.
* modules/sys_random: Likewise.
* modules/sys_resource: Likewise.
* modules/sys_select: Likewise.
* modules/sys_socket: Likewise.
* modules/sys_stat: Likewise.
* modules/sys_time: Likewise.
* modules/sys_times: Likewise.
* modules/sys_types: Likewise.
* modules/sys_uio: Likewise.
* modules/sys_utsname: Likewise.
* modules/sys_wait: Likewise.
* modules/sysexits: Likewise.
* modules/termios: Likewise.
* modules/threads-h: Likewise.
* modules/time: Likewise.
* modules/uchar: Likewise.
* modules/unicase/base: Likewise.
* modules/unicase/special-casing: Likewise.
* modules/uniconv/base: Likewise.
* modules/unictype/base: Likewise.
* modules/unigbrk/base: Likewise.
* modules/unilbrk/base: Likewise.
* modules/uniname/base: Likewise.
* modules/uninorm/base: Likewise.
* modules/unistd: Likewise.
* modules/unistdio/base: Likewise.
* modules/unistr/base: Likewise.
* modules/unitypes: Likewise.
* modules/uniwbrk/base: Likewise.
* modules/uniwidth/base: Likewise.
* modules/utime-h: Likewise.
* modules/wchar: Likewise.
* modules/wctype-h: Likewise.
* gnulib-tool (func_emit_lib_Makefile_am): When producing output for
GNU make, eliminate %reldir% tokens.
2021-12-15 Bruno Haible
non-recursive-gnulib-prefix-hack: Remove obsolete code.
* build-aux/prefix-gnulib-mk (prefix): Remove handling of t-$@ pattern.
2021-12-15 Bruno Haible
Indentation fix.
* m4/include_next.m4 (gl_NEXT_HEADERS_INTERNAL): Correct indentation.
2021-12-14 Paul Eggert
renameatu: port to macOS tmpfs
Problem reported by Sudhip Nashi (Bug#52193).
* lib/renameatu.c (renameat2ish) [HAVE_RENAMEAT]: New function.
(renameatu): Use the new function, to avoid a bug when
renameatx_np fails with errno == ENOTSUP. Don’t try to support
RENAME_EXCHANGE; the old code didn’t work and nobody using using
RENAME_EXCHANGE anyway.
2021-12-12 Bruno Haible
gnulib-tool: Try to support non-recursive-gnulib-prefix-hack with tests.
* gnulib-tool (func_import): Synthesize an AC_CONFIG_LIBOBJ_DIR
invocation.
* m4/non-recursive-gnulib-prefix-hack.m4
(gl_NON_RECURSIVE_GNULIB_PREFIX_HACK): Don't invoke
AC_CONFIG_LIBOBJ_DIR.
2021-12-12 Paul Eggert
bootstrap: refactor for GNU tar
* build-aux/bootstrap (gitignore_entries, insert_if_absent)
(insert_vc_ignore, symlink_to_dir): Define these shell functions
before including bootstrap.conf. This is for GNU tar, whose
bootstrap.conf uses symlink_to_dir.
2021-12-12 Bruno Haible
gnulib-tool: Support different basenames for the lib/,tests/ Makefiles.
* gnulib-tool: New option --tests-makefile-name.
(tests_makefile_name): New variable.
(func_import): Add support for --tests-makefile-name. Replace local
variable makefile_am with two local variables source_makefile_am,
tests_makefile_am.
* m4/gnulib-tool.m4 (gl_TESTS_MAKEFILE_NAME): New macro.
2021-12-11 Bruno Haible
get_ppid_of, get_progname_of: Fix compilation error on Mac OS X < 10.5.
Reported by Ryan Schmidt in
.
* lib/get_ppid_of.c: Include AvailabilityMacros.h
(get_ppid_of): Use MAC_OS_X_VERSION_MAX_ALLOWED and
MAC_OS_X_VERSION_MIN_REQUIRED.
* lib/get_progname_of: Include AvailabilityMacros.h
(get_progname_of): Use MAC_OS_X_VERSION_MAX_ALLOWED and
MAC_OS_X_VERSION_MIN_REQUIRED.
2021-12-10 Paul Eggert
backupfile: assume C99 decls
* lib/backupfile.c: Use C99-style decls after statements.
backupfile: prefer signed integers
* lib/backupfile.c: Include ialloc.h instead of idx.h.
Prefer idx_t to size_t where either will do.
Use imalloc and irealloc instead of malloc and realloc.
* modules/backupfile, modules/backup-rename (Depends-on):
Depend on ialloc not idx.
backupfile: fix numbered backups for XXX/
* lib/backupfile.c (check_extension): Return a bool indicating
whether the original extension was OK. Caller changed.
(numbered_backup): Require that FILELEN does not count
trailing slashes after a non-slash, and don’t require
that *BUF be null-terminated. Caller changed.
This fixes a bug where the numbered backup file name for X/ was
incorrectly computed because the slash messed up the code
looking for X.~1~, X.~2~, etc., and this caused numbered_backup
to loop forever. Also, check that check_extension doesn’t
truncate a file name leading to an infloop.
2021-12-07 Paul Eggert
regex: pacify Coverity clean_state_log_if_needed
Problem reported by Robbie Harwood in:
https://lists.gnu.org/r/bug-gnulib/2021-12/msg00005.html
* lib/regexec.c (clean_state_log_if_needed):
Add a DEBUG_ASSERT; this both pacifies Coverity and
will help to debug in case some other change mistakenly
causes the assertion to become false.
2021-12-07 Bruno Haible
gettext-h: Optimize also for clang.
* lib/gettext.h (pgettext_aux, npgettext_aux, dcpgettext_expr,
dcnpgettext_expr): Inline also on clang.
2021-12-06 Bruno Haible
intprops: Break sync with glibc.
* config/srclist.txt: Comment out intprops.h.
2021-12-06 Paul Eggert
intprops: streamline and get ready for Clang 14
* lib/intprops.h (_GL_HAS_BUILTIN_ADD_OVERFLOW):
Rely on __has_builtin first, since GCC didn’t introduce it until
GCC 9 so we don’t need to special-case GCC first.
(_GL_HAS_BUILTIN_ADD_OVERFLOW, _GL_HAS_BUILTIN_OVERFLOW_P):
Look at __EDG__ rather than __ICC, since icc defines __EDG__ too.
(_GL_HAS_BUILTIN_MUL_OVERFLOW): Define to 1 in Clang 14 and later,
as a bug fix is scheduled for Clang 14.
(_GL_HAS_BUILTIN_OVERFLOW_P): Do not bother to special-case
__clang__, since __has_builtin should do the right thing anyway.
2021-12-06 Bruno Haible
intprops: Treat EDG-based compilers like Intel compilers.
Reported by Ilya Kurdyukov in
.
* lib/intprops.h (_GL_HAS_BUILTIN_OVERFLOW_P): Define to 0 on EDG-based
compilers.
2021-12-05 Bruno Haible
sigsegv: Fix build on some more embedded CPUs.
* m4/stack-direction.m4 (SV_STACK_DIRECTION): Assume the stack grows
negative, when the GCC 11 sources say so.
2021-11-30 Paul Eggert
sys_random: port better to uClibc < 1.0.35
Problem reported by Fabrice Fontaine in:
https://lists.gnu.org/r/bug-gnulib/2021-11/msg00043.html
* lib/sys_random.in.h [HAVE_SYS_RANDOM_H && !__GLIBC__ && __UCLIBC__]:
Include , in case this file is included before
__UCLIBC__ is defined.
2021-11-27 Paul Eggert
gettext-h: document GNULIB_NO_VLA
* doc/gnulib-readme.texi (C99 features avoided):
Document GNULIB_NO_VLA.
gettext-h: use VLA test similar to regex
* lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Assuming
GNULIB_NO_VLA, define if (defined __STDC_VERSION__ && 199901L <=
__STDC_VERSION__ \ + && !defined __STDC_NO_VLA___), not if
((__GNUC__ >= 3 || __GNUG__ >= 2) && !defined __STRICT_ANSI__).
This is more consistent with what the regex module does.
* modules/gettext-h (Depends-on): Depend on vararrays, since
lib/gettext.h uses __STDC_NO_VLA__.
regex: port to tcc
Problem reported by Benno Schulenberg in:
https://lists.gnu.org/r/bug-gnulib/2021-11/msg00038.html
* modules/regex (Depends-on): Depend on vararrays, since
lib/regex.h uses __STDC_NO_VLA__.
* modules/vararrays: Change license from LGPL to LGPLv2+.
2021-11-25 Bernhard Voelker
test-framework-sh: remove unsafe entries from PATH
Running tests with '.' in the PATH may yield unspecified results,
and is deemed unsafe per se. This includes empty entries as well
which are treated like a '.' entry as per POSIX.
* tests/init.sh (setup_): Add snippet to remove relative and non-
accessible entries from the PATH environment variable.
2021-11-24 Paul Eggert
regex: merge from glibc
The main change here, imported from Glibc, is for the regex
code to stop using nested functions when _LIBC is defined.
The intent is for the result to be copied back to Glibc
so that the two implementations can resync.
* lib/regcomp.c (re_set_fastmap, seek_collating_symbol_entry)
(lookup_collation_sequence_value, build_range_exp)
(build_collating_symbol):
* lib/regexec.c (acquire_init_state_context):
Declare with __always_inline instead of with
‘inline __attribute__ ((always_inline))’.
* lib/regexec.c (init_word_char):
Move uint64_t comment to regex_internal.h.
(parse_byte): Change multibyte-detecting arg from re_charset_t *
to re_dfa_t const *. All callers changed.
(build_range_exp, build_collating_symbol) [!_LIBC]:
Change signature to match _LIBC well enough so that the caller can
be simplified to assume _LIBC.
(parse_bracket_exp): Pull its nested functions
seek_collating_symbol_entry, lookup_collation_sequence_value,
build_range_exp, build_collating_symbol out to the top level,
adding args to pass the information instead of having them access
nonlocal vars. Use types in local vars that do not assume glibc.
* lib/regex_internal.h: Explain uint64_t etc. here.
2021-11-23 Paul Eggert
regex: assume RE_ENABLE_I18N
These days there is no longer any need to port to platforms
lacking iswctype etc., since Gnulib now has substitutes.
* config/srclist.txt: Comment out regex_internal.c and
regex_internal.h for now, since they no longer match glibc.
The intent is to merge them again soon.
* lib/regex_internal.h (RE_ENABLE_I18N): Remove.
All uses changed to assume that RE_ENABLE_I18N is 1.
* modules/regex (Depends-on): Add iswctype.
2021-11-15 Paul Eggert
lseek: port around macOS SEEK_HOLE glitch
Problem reported by Sudhip Nashi (Bug#51857#47).
* lib/lseek.c (rpl_lseek): Work around macOS lseek+SEEK_HOLE
returning -1 with ENXIO if there are no holes before EOF,
contrary to the macOS documentation.
lseek: port around macOS SEEK_DATA glitch
Problem reported by Sudhip Nashi (Bug#51857).
* doc/posix-functions/lseek.texi (lseek): Mention macOS SEEK_DATA
issue.
* lib/lseek.c (rpl_lseek): Work around macOS portability glitch.
* m4/lseek.m4 (gl_FUNC_LSEEK): Replace lseek on Darwin.
* modules/lseek (Depends-on): Depend on msvc-nothrow
and fstat only if needed.
2021-11-11 Fabrice Fontaine (tiny change)
sigsegv: fix builds on microblazeel, or1k
* m4/stack-direction.m4 (SV_STACK_DIRECTION):
Assume it grows negative on microblaze* and or1k.
2021-11-09 Paul Eggert
exclude: yield proper errno on failure
* lib/exclude.c (add_exclude_file): Do not assume that fclose
preserves errno on success.
2021-11-07 Paul Eggert
regex: break regcomp.c link with glibc
Problem reported by Bruno Haible in:
https://lists.gnu.org/r/bug-gnulib/2021-11/msg00005.html
* config/srclist.txt: Comment out regcomp.c for now.
* lib/regcomp.c: Revert previous change.
2021-10-24 Bruno Haible
string: Avoid syntax error re strdup in string.in.h (regr. 2021-09-07).
Reported by Jan Engelhardt
and by Arash Esbati via Andy Moreton in
.
* lib/string.in.h (_GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_DEALLOC_FREE,
_GL_ATTRIBUTE_MALLOC): Add fallback declarations, like in
lib/stdlib.in.h.
* lib/wchar.in.h (_GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_DEALLOC_FREE,
_GL_ATTRIBUTE_MALLOC): Likewise.
2021-10-19 Paul Eggert
xalloc: new function xinmalloc
* lib/xmalloc.c (xinmalloc): New function, which is like
xnmalloc but for idx_t instead of size_t.
2021-10-18 Paul Eggert
regex: fix buffer read overrrun
* lib/regexec.c (re_search_internal):
Fix buffer read overrun reported by Benno Schulenberg in:
https://lists.gnu.org/r/bug-gnulib/2021-10/msg00035.html
2021-10-15 Paul Eggert
nproc: port better to macOS 10.14
* lib/nproc.c (num_processors_ignoring_omp)
[HAVE_SYSCTL && !defined __GLIBC__ && defined HW_NCPU]:
Do not use a const mib, as macOS 10.14 rejects this.
2021-10-13 Paul Eggert
sigsegv: fix quoting problem
Problem reported for FreeBSD ports by Alexey Dokuchaev in:
https://bugs.gnu.org/51144
* m4/stack-direction.m4 (SV_STACK_DIRECTION): Quote brackets.
2021-10-10 Paul Eggert
nproc: port better to OpenBSD
Problem reported by Omar Polo in:
https://lists.gnu.org/r/emacs-devel/2021-10/msg00692.html
* lib/nproc.c (num_processors_ignoring_omp): Prefer HW_NCPUONLINE
to HW_NCPU, for OpenBSD. Also, make mib const.
2021-10-02 Paul Eggert
timer-time: port better to OpenBSD 6.9
* m4/timer_time.m4 (gl_TIMER_TIME): Also require timer_settime to
be declared, as it exists in OpenBSD but always fails with ENOSYS.
sys_select: port better to OpenBSD 6.9
OpenBSD 6.9’s includes which then
includes , which caused coreutils/lib/nproc.c compiles
to fail with "/usr/include/signal.h:57: warning: 'struct
sigaction' declared inside parameter list". Fix this.
* lib/sys_select.in.h [__OpenBSD__]: Simply delegate to the system
header if being included from .
2021-09-22 Bruno Haible
doc: Fix outdated statement about Spanish collation.
Reported by Dietmar Schindler in
.
* doc/regex.texi (Collating Elements vs. Characters): Choose another
example of a digraph with special collation.
doc: Don't assume that the output format is TeX-based or info.
Reported by Dietmar Schindler in
.
* doc/regex.texi (Collating Elements vs. Characters): Assume a texinfo
version that groks UTF-8 encoded ISO-8859-1 characters.
2021-09-21 Paul Eggert
regex: sync with glibc
* config/srclist.txt: Uncomment-out posix/regex.c and related
files, as the Gnulib versions have now been copied to glibc.
* lib/intprops.h: Remove authorship comment, as per glibc guidelines.
2021-09-20 Simon Josefsson
maint: Avoid syntax-check failure for empty gnulib submodule.
* top/maint.mk (gnulib_dir): Fall back to GNULIB_SRCDIR if
submodule is not checked out.
2021-09-19 Bruno Haible
Relicense qemu.h under LGPLv2+.
* tests/qemu.h: Change license header.
2021-09-19 Bruno Haible
ialloc: Update license headers after license change from 2021-08-29.
* lib/ialloc.h: Update license header.
* lib/ialloc.c: Likewise.
2021-09-19 Bruno Haible
Improve 'configure --help' output for crypto modules.
* m4/af_alg.m4 (gl_AF_ALG): List the hash functions for which we use the
Linux crypto. Also mention that we use it on files only.
* m4/gl-openssl.m4 (gl_CRYPTO_CHECK): Use manual line breaking, not the
line-filling style of AS_HELP_STRING. Show that --with-openssl takes an
optional argument. List the hash functions for which we use the OpenSSL
library. Don't mention --with-linux-crypto if the af_alg module is not
in use. Mention that --with-linux-crypto applies only to the Linux
kernel. Mention that it gets used only when available. Mention that it
takes precedence only for files. In the error or warning, mention the
pre-built package name that people can install.
2021-09-18 Bruno Haible
string, wchar: Don't require undefined m4 macros (regr. today).
Reported by Colin Watson in
.
* m4/string_h.m4 (gl_STRING_H_REQUIRE_DEFAULTS): Don't use m4_require
directly. Instead, invoke gl_STDLIB_H_REQUIRE_DEFAULTS.
* m4/wchar_h.m4 (gl_WCHAR_H_REQUIRE_DEFAULTS): Likewise.
2021-09-18 Bruno Haible
sm3-buffer tests: New module.
* tests/test-sm3-buffer.c: Renamed from tests/test-sm3.c.
* modules/crypto/sm3-buffer-tests: Renamed from
modules/crypto/sm3-tests. Test tests/test-sm3-buffer.c instead of
tests/test-sm3.c.
sm3-buffer: New module.
* lib/sm3-stream.c: New file, extracted from lib/sm3.c.
* lib/sm3.c: Don't include stdlib.h, unlocked-io.h.
(BLOCKSIZE, sm3_stream): Moved to sm3-stream.c.
* lib/sm3.h: Tweak.
* modules/crypto/sm3-buffer: New file, based on modules/crypto/sm3.
* modules/crypto/sm3: Rewritten.
2021-09-18 Bruno Haible
sha512-buffer tests: New module.
* tests/test-sha512-stream.c: Renamed from tests/test-sha512.c.
* modules/crypto/sha512-buffer-tests: New file, based on
modules/crypto/sha512-tests.
* modules/crypto/sha512-tests: Remove tests that are now in
modules/crypto/sha512-buffer-tests. Test tests/test-sha512-stream.c
instead of tests/test-sha512.c.
sha512: Clarify module to source relation.
* lib/sha512-stream.c: New file, extracted from lib/sha512.c.
* lib/sha512.c: Don't include stdlib.h, unlocked-io.h.
(BLOCKSIZE, shaxxx_stream, sha512_stream, sha384_stream): Moved to
sha512-stream.c.
* lib/sha512.h: Tweak.
* modules/crypto/sha512 (Files): Add lib/sha512-stream.c.
(configure.ac): Don't define GL_COMPILE_CRYPTO_STREAM.
(Makefile.am): Arrange to compile sha512-stream.c.
(Link): Mention $(LIB_CRYPTO).
2021-09-18 Bruno Haible
sha256-buffer tests: New module.
* tests/test-sha256-stream.c: Renamed from tests/test-sha256.c.
* modules/crypto/sha256-buffer-tests: New file, based on
modules/crypto/sha256-tests.
* modules/crypto/sha256-tests: Remove tests that are now in
modules/crypto/sha256-buffer-tests. Test tests/test-sha256-stream.c
instead of tests/test-sha256.c.
sha256: Clarify module to source relation.
* lib/sha256-stream.c: New file, extracted from lib/sha256.c.
* lib/sha256.c: Don't include stdlib.h, unlocked-io.h.
(BLOCKSIZE, shaxxx_stream, sha256_stream, sha224_stream): Moved to
sha256-stream.c.
* lib/sha256.h: Tweak.
* modules/crypto/sha256 (Files): Add lib/sha256-stream.c.
(configure.ac): Don't define GL_COMPILE_CRYPTO_STREAM.
(Makefile.am): Arrange to compile sha256-stream.c.
(Link): Mention $(LIB_CRYPTO).
2021-09-18 Bruno Haible
sha1-buffer tests: New module.
* tests/test-sha1-buffer.c: New file, based on tests/test-sha1.c.
* tests/test-sha1-stream.c: Renamed from tests/test-sha1.c.
(main): Remove sha1-buffer tests.
* modules/crypto/sha1-buffer-tests: New file, based on
modules/crypto/sha1-tests.
* modules/crypto/sha1-tests: Remove tests that are now in
modules/crypto/sha1-buffer-tests. Test tests/test-sha1-stream.c instead
of tests/test-sha1.c.
sha1: Clarify module to source relation.
* lib/sha1-stream.c: New file, extracted from lib/sha1.c.
* lib/sha1.c: Don't include stdlib.h, unlocked-io.h.
(BLOCKSIZE, sha1_stream): Moved to sha1-stream.c.
* lib/sha1.h: Correct indentation.
* modules/crypto/sha1 (Files): Add lib/sha1-stream.c.
(configure.ac): Don't define GL_COMPILE_CRYPTO_STREAM.
(Makefile.am): Arrange to compile sha1-stream.c.
(Link): Mention $(LIB_CRYPTO).
2021-09-18 Bruno Haible
md5-buffer tests: New module.
* tests/test-md5-buffer.c: New file, based on tests/test-md5.c.
* tests/test-md5-stream.c: Renamed from tests/test-md5.c.
(main): Remove md5-buffer tests.
* modules/crypto/md5-buffer-tests: New file, based on
modules/crypto/md5-tests.
* modules/crypto/md5-tests: Remove tests that are now in
modules/crypto/md5-buffer-tests. Test tests/test-md5-stream.c instead
of tests/test-md5.c.
md5: Clarify module to source relation.
* lib/md5-stream.c: New file, extracted from lib/md5.c.
* lib/md5.c: Don't include stdlib.h, unlocked-io.h.
(BLOCKSIZE, md5_stream): Moved to md5-stream.c.
* lib/md5.h: Tweak.
* modules/crypto/md5 (Files): Add lib/md5-stream.c.
(configure.ac): Don't define GL_COMPILE_CRYPTO_STREAM.
(Makefile.am): Arrange to compile md5-stream.c.
(Link): Mention $(LIB_CRYPTO).
2021-09-18 Bruno Haible
md4-buffer tests: New module.
* tests/test-md4-buffer.c: Renamed from tests/test-md4.c.
* modules/crypto/md4-buffer-tests: Renamed from
modules/crypto/md4-tests. Test tests/test-md4-buffer.c instead of
tests/test-md4.c.
md4-buffer: New module.
* lib/md4-stream.c: New file, extracted from lib/md4.c.
* lib/md4.c: Don't include stdlib.h, unlocked-io.h.
(BLOCKSIZE, md4_stream): Moved to md4-stream.c.
* lib/md4.h: Reorder declarations.
* modules/crypto/md4-buffer: New file, based on modules/crypto/md4.
* modules/crypto/md4: Rewritten.
2021-09-18 Bruno Haible
md2-buffer tests: New module.
* tests/test-md2-buffer.c: Renamed from tests/test-md2.c.
* modules/crypto/md2-buffer-tests: Renamed from
modules/crypto/md2-tests. Test tests/test-md2-buffer.c instead of
tests/test-md2.c.
md2-buffer: New module.
* lib/md2-stream.c: New file, extracted from lib/md2.c.
* lib/md2.c: Don't include stdlib.h, unlocked-io.h.
(BLOCKSIZE, md2_stream): Moved to md2-stream.c.
* lib/md2.h: Reorder declarations.
* modules/crypto/md2-buffer: New file, based on modules/crypto/md2.
* modules/crypto/md2: Rewritten.
2021-09-18 Bruno Haible
string, wchar: Don't cause link errors for rpl_free (regr. 2021-09-07).
Reported by Simon Josefsson in
.
* lib/string.in.h (free, rpl_free): Consider GNULIB_FREE_POSIX variable.
* lib/wchar.in.h (free, rpl_free): Likewise.
* m4/string_h.m4 (gl_STRING_H_REQUIRE_DEFAULTS): Require module
indicator variable initializations from the stdlib module.
* m4/wchar_h.m4 (gl_WCHAR_H_REQUIRE_DEFAULTS): Likewise.
* modules/string (Makefile.am): Substitute GNULIB_FREE_POSIX in string.h.
* modules/wchar (Makefile.am): Substitute GNULIB_FREE_POSIX in wchar.h.
2021-09-17 Bruno Haible
threadlib: Avoid crashes in thread-related functions on Cygwin 3.2.0.
Reported by Brian Inglis via Akim Demaille in
.
* m4/threadlib.m4 (gl_WEAK_SYMBOLS): Force a "guessing no" result on
Cygwin.
2021-09-13 Bruno Haible
simple-atomic: Port to Oracle Studio 12.6.
* lib/simple-atomic.c (asm) [0x590 <= __SUNPRO_C && __STDC__]:
#define to __asm.
2021-09-13 Paul Eggert
asyncsafe-spin: port to Oracle Studio 12.6 sparc
Problem reported by Dennis Clarke via Eric Blake in:
https://lists.gnu.org/r/bug-gnulib/2021-09/msg00056.html
* lib/asyncsafe-spin.c (asm) [0x590 <= __SUNPRO_C && __STDC__]:
#define to __asm.
2021-09-12 Paul Eggert
stdint-tests: long long preproc on recent Sun C
* tests/test-stdint.c: Test long long preprocessor constants on
Oracle Developer Studio 12.6, where they should work.
2021-09-13 Bruno Haible
extern-inline: Fix syntax error on macOS with GCC 11 (regr. 2021-08-22).
Reported by Akim Demaille in
.
* m4/extern-inline.m4 (_GL_INLINE, _GL_EXTERN_INLINE): Put _GL_UNUSED
before, not after, 'static'.
2021-09-11 Christian Weisgerber (tiny change)
sigsegv: port to OpenBSD 6.8+ powerpc64
* lib/sigsegv.c (SIGSEGV_FAULT_STACKPOINTER):
Special case for __OpenBSD__ && __powerpc64__, needed due to:
https://github.com/openbsd/src/commit/5e649a8714ba05cf482011b7b7d1e5437b7c17db
which is part of the oldest currently-supported OpenBSD (6.8),
so we needn’t worry about older versions.
2021-09-09 Pádraig Brady
maintainer-makefile: add 'can' to sc_prohibit_doubled_word
* top/maint.mk (sc_prohibit_doubled_word): Check for "can can".
2021-09-08 Paul Eggert
strerror_r-posix: port even better to Android
* lib/strerror_r.c: Use STRERROR_R_CHAR_P to decide whether the
system strerror_r returns char *, and HAVE_DECL_STRERROR_R to
decide whether it either does that or returns an integer. In the
former case, use the system strerror_r even on platforms like
Android API level 23 that don’t have __xpg_strerror_r; also
check for strerror_r failure just in case.
* m4/error.m4 (gl_PREREQ_ERROR):
* m4/strerror_r.m4 (gl_PREREQ_STRERROR_R):
Use system extensions on Android, to avoid mishandling strerror_r
on API level 23 and later.
* modules/error, modules/strerror_r-posix (configure.ac):
Surround gl_PREREQ_ERROR with AS_IF instead of plain if, so that
AC_REQUIREs are propagated out.
strerror_r-posix: port better to Android
* m4/strerror_r.m4 (gl_FUNC_STRERROR_R): Move requirement of
gl_USE_SYSTEM_EXTENSIONS from here ...
(gl_FUNC_STRERROR_R_WORKS): ... to here, which is the macro that
actually needs it. This avoids a bug where 'configure' tests
whether strerror_r has the POSIX API before enabling GNU
extensions. On Android, enabling GNU extensions switches from the
POSIX to the GNU API. Problem reported by Lucy Phipps in:
https://lists.gnu.org/r/bug-gnulib/2021-09/msg00026.html
string, wchar: port rpl_free decl to Android
* lib/string.in.h, lib/wchar.in.h:
(free): When replacing it, declare the unreplaced version too.
Problem reported by Lucy Phipps in:
https://lists.gnu.org/r/bug-gnulib/2021-09/msg00026.html
2021-09-07 Paul Eggert
string, wchar: avoid some namespace pollution
* lib/string.in.h, lib/wchar.in.h:
(free): Declare by hand instead of including stdlib.h.
This avoids some namespace pollution. It should also avoid some
nested-include problems described by Lucy Phipps in:
https://lists.gnu.org/r/bug-gnulib/2021-09/msg00018.html
* modules/string, modules/wchar:
(Depends-on): Add stdlib, so that REPLACE_FREE has the right value.
(Makefile.am): Replace @REPLACE_FREE@ when creating the include file.
2021-09-04 Paul Eggert
idx: break copying from glibc
* config/srclist.txt: Comment out idx.h, and bring back recent change.
2021-09-04 Sun Haiyong (tiny change)
sigsegv: Improve cross-compilation support for LoongArch CPU.
* m4/stack-direction.m4 (SV_STACK_DIRECTION): Assume the stack grows
down on LoongArch.
2021-09-04 Simon Josefsson
doc: Improve help related to bootstrap script.
* doc/gnulib-tool.texi (VCS Issues): Make title more positive,
s/Issues/Integration/. Some more bootstrap-related hints,
including changing suggested submodule path from .gnulib to gnulib
as this seems to be more wide-spread.
2021-09-04 Paul Eggert
intprops: fix minor doc glitches
* doc/intprops.texi (Integer Properties): Fix doc glitches.
2021-09-04 Simon Josefsson
doc: Add suggestions on FDL texinfo usage.
* doc/licenses-texi.texi (License Texinfo sources): Add texinfo
examples.
2021-09-03 Simon Josefsson
maintainer-makefile: Add indentation syntax-check rule.
* top/maint.mk (indent): Use AM_V_GEN and indent_args.
(sc_indent): New rule.
(indent_args): New variable.
(C_SOURCES): New variable, initialized to reasonable C files.
(exclude_file_name_regexp--indent): New variable.
2021-08-30 Paul Eggert
idx: add commentary
* lib/idx.h: Add comments about ssize_t and strlen, in
response to comments from Simon Josefsson in:
https://lists.gnu.org/r/bug-gnulib/2021-08/msg00196.html
2021-08-29 Paul Eggert
attribute: keep up with gnulib-common.m4
* lib/attribute.h (ATTRIBUTE_DEALLOC, ATTRIBUTE_DEALLOC_FREE):
New macros, aliases for the _GL_-prefixed macros added
to gnulib-common.m4 last month.
2021-08-29 Bruno Haible
supersede: Fix test failure under QEMU user-mode for Linux/mips.
* tests/test-supersede-open.h (test_open_supersede): Copy statbuf.st_dev
into a local variable of type dev_t.
* tests/test-supersede-fopen.h (test_fopen_supersede): Likewise.
2021-08-29 Bruno Haible
spawn-pipe: Fix test failure when running under QEMU user-mode.
* tests/test-spawn-pipe-child.c: Include , ,
qemu.h.
(main): Under QEMU user-mode, allow fd 2 or fd 3 to be open.
* modules/spawn-pipe-tests (Files): Add qemu.h.
(Depends-on): Add stdbool.
2021-08-29 Bruno Haible
execute: Fix test failure when running under QEMU user-mode.
* tests/test-execute-child.c: Include , qemu.h.
(main): Under QEMU user-mode, allow fd 3 to be open.
* modules/execute-tests (Files): Add qemu.h.
(Depends-on): Add stdbool.
2021-08-29 Bruno Haible
posix_spawn_file_actions_addfchdir: Avoid test failure under QEMU.
* tests/test-posix_spawn-fchdir.c: Include qemu.h.
(is_qemu): New variable.
(test): Under QEMU user-mode, don't expect that "pwd" produces the
result "/".
(main): Initialize is_qemu. Under QEMU user-mode, skip the relative file
name test.
* modules/posix_spawn_file_actions_addfchdir-tests (Files): Add qemu.h.
(Depends-on): Add stdbool.
2021-08-29 Bruno Haible
getcwd tests: Avoid test failure when running under QEMU user-mode.
* modules/getcwd-tests (Files): Add qemu.h.
(Depends-on): Add stdbool.
* tests/test-getcwd.c: Include qemu.h.
(test_long_name): Skip this test when running under QEMU user-mode.
(main): Consider return code 77 from test_long_name.
2021-08-29 Paul Eggert
base32, base64: treat negative sizes as overflows
* lib/base64.c (base64_encode_alloc):
* lib/base32.c (base32_encode_alloc):
Treat negative sizes as overflows, for better compatibility
with previous API.
2021-08-29 Bruno Haible
explicit_bzero test: Fix test failure due to GCC optimizations.
* tests/test-explicit_bzero.c (do_secret_stuff): Use static variable
'last_stackbuf'.
(main): Use an 'if' to combine the two do_secret_stuff invocations.
2021-08-29 Paul Eggert
dfa: port to non-gnulib
Suggested by Arnold Robbins in:
https://lists.gnu.org/r/bug-gnulib/2021-08/msg00181.html
* lib/dfa.h (_GL_ATTRIBUTE_DEALLOC) [!_GL_ATTRIBUTE_MALLOC]:
Add missing definition.
2021-08-29 Paul Eggert
base32, base64: fix broken tests
Problem reported by Bruno Haible in:
https://lists.gnu.org/r/bug-gnulib/2021-08/msg00170.html
* lib/base32.c, lib/base64.c: Do not include verify.h,
and omit all uses of ‘assume’.
* modules/base32, modules/base64 (Depends-on): Remove verify.
* tests/test-base32.c, tests/test-base64.c:
Don’t pass out-of-range values to allocator,
as converting them to idx_t relies on implementation-defined
behavior that could trap.
ialloc: relicense
* modules/ialloc (License): Change from LGPL to LGPLv2+.
2021-08-28 Bruno Haible
fma: Fix compilation error on Linux/sh4.
* lib/fma.c (FUNC): Don't test for FE_DOWNWARD or FE_UPWARD when these
rounding modes are not defined.
2021-08-28 Bruno Haible
Skip some tests when running under QEMU user-mode.
* tests/qemu.h: New file.
* tests/test-get-rusage-as.c: Include qemu.h.
(main): Skip the test when running under QEMU.
* tests/test-get-rusage-data.c: Include qemu.h.
(main): Skip the test when running under QEMU.
* tests/test-printf-posix2.c: Include qemu.h.
(main): Return with code 77 when running under QEMU.
* tests/test-fprintf-posix2.c: Include qemu.h.
(main): Return with code 77 when running under QEMU.
* tests/test-fprintf-posix3.c: Include qemu.h.
(main): Return with code 79 when running under QEMU.
* tests/test-fprintf-posix3.sh: Skip the test when the return code was
79.
* tests/test-dprintf-posix2.c: Include qemu.h.
(main): Return with code 79 when running under QEMU. Use return code 80
instead of 78.
* tests/test-dprintf-posix2.sh: Skip the test when the return code was
79. Update for changed return code.
* modules/get-rusage-as-tests (Files): Add qemu.h.
(Depends-on): Add stdbool.
* modules/get-rusage-data-tests (Files): Add qemu.h.
(Depends-on): Add stdbool.
* modules/fprintf-posix-tests (Files): Add qemu.h.
(Depends-on): Add stdbool.
* modules/dprintf-posix-tests (Files): Add qemu.h.
(Depends-on): Add stdbool.
2021-08-28 Bruno Haible
sigabbrev_np, sigdescr_np: Fix compilation error on Linux/alpha.
* lib/sigabbrev_np.c (sigabbrev_np): When SIGINFO and SIGPWR have the
same value, give precendence to SIGPWR.
* lib/sigdescr_np.c (sigdescr_np): Likewise.
* tests/test-sigabbrev_np.c (main): Likewise.
* tests/test-sigdescr_np.c (main): Likewise.
2021-08-28 Bruno Haible
execle, execve, execvpe tests: Fix test failures under qemu user-mode.
* test-execle-main.c: Include .
(get_environ_assignment, create_minimal_env): New functions.
(main): Call create_minimal_env.
* test-execve-main.c: Likewise.
* test-execvpe-main.c: Likewise.
2021-08-27 Paul Eggert
base32, base64: prefer signed to unsigned integers
* lib/base32.c, lib/base64.c: Include ialloc.h instad of stdlib.h.
Include intprops.h, verify.h.
* lib/base32.c (base32_encode, base32_encode_alloc, get_8, decode_8)
(base32_decode_ctx, base32_decode_alloc_ctx):
* lib/base32.h (struct base32_decode_context):
* lib/base64.c (base64_encode_fast, base64_encode)
(base64_encode_alloc, get_4, decode_4, base64_decode_ctx)
(base64_decode_alloc_ctx):
* lib/base64.h (struct base64_decode_context):
* tests/test-base32.c (main):
* tests/test-base64.c (main):
Prefer signed to unsigned integers.
* lib/base32.c (base32_encode_alloc):
* lib/base64.c (base64_encode_alloc):
Use simpler and more-direct check for overflow, removing a TODO.
* lib/base32.h, lib/base64.h: Include idx.h instead of stddef.h.
* modules/base32, modules/base64 (Depends-on): Add ialloc, verify.
2021-08-26 Paul Eggert
regex: use __attr_access and C99-style array arg
This should help with some static checking.
Derived from a suggestion by Martin Sebor in:
https://sourceware.org/pipermail/libc-alpha/2021-August/130336.html
* config/srclist.txt: Remove lib/regex.c for now.
* lib/regex.c: Ignore -Wvla for the whole file.
* lib/regex.h (_REGEX_NELTS, _Attr_access_): New macros.
Ignore -Wvla when declaring regexec.
(re_compile_pattern, re_search, re_search2, re_match, re_match_2)
(regerror): Mark with _Attr_access_, as glibc does.
* lib/regex.h (regexec):
* lib/regexec.c (regexec, __compat_regexec):
Use _REGEX_NELTS for each array parameter whose size is another arg
but with an access pattern that cannot be captured with __attr_access.
2021-08-25 Bruno Haible
execute tests: Fix test failure when libtool is in use.
* modules/execute-tests (Makefile.am): Link test-execute-child without
using libtool.
* modules/spawn-pipe-tests (Makefile.am): Link test-spawn-pipe-child
without using libtool.
* modules/system-quote-tests (Makefile.am): Link test-system-quote-child
without using libtool.
2021-08-24 Paul Eggert
dfa: prefer idx_t to ptrdiff_t for nonnegative
* lib/dfa.c (struct dfa, dfaexec_main, dfaexec_mb, dfaexec_sb)
(dfaexec_noop, dfaexec):
* lib/dfa.h (dfaparse, dfacomp, dfaexec):
Prefer idx_t to ptrdiff_t for counts, which should be nonnegative.
* lib/dfa.h: Include idx.h.
2021-08-22 Bruno Haible
snippet/unused-parameter: Mark unused module obsolete.
* modules/snippet/unused-parameter (Status, Notice): Mark as obsolete.
2021-08-22 Bruno Haible
Make generated .in.h files as standalone as possible.
Reported by Jan Engelhardt .
* lib/stdlib.in.h (_GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_DEALLOC_FREE,
_GL_ATTRIBUTE_MALLOC): Add fallback definitions.
* lib/dirent.in.h (_GL_ATTRIBUTE_DEALLOC, _GL_ATTRIBUTE_MALLOC): Add
fallback definitions.
* lib/stdio.in.h (_GL_ATTRIBUTE_DEALLOC): Add fallback definition.
* lib/math.in.h (_GL_ATTRIBUTE_CONST): Add fallback definition.
* lib/pthread.in.h (_GL_ATTRIBUTE_PURE): Add fallback definition.
* lib/threads.in.h (_GL_ATTRIBUTE_PURE): Likewise.
* lib/uchar.in.h (_GL_ATTRIBUTE_PURE): Likewise.
* lib/string.in.h (_GL_ATTRIBUTE_PURE): Move definition, for consistency
with the other *.in.h files.
* lib/se-context.in.h (_GL_ATTRIBUTE_MAYBE_UNUSED): Add fallback
definition.
* lib/se-label.in.h (_GL_ATTRIBUTE_MAYBE_UNUSED): Likewise.
* lib/se-selinux.in.h (_GL_ATTRIBUTE_MAYBE_UNUSED): Likewise.
* lib/textstyle.in.h: Use _GL_ATTRIBUTE_MAYBE_UNUSED instead of
_GL_UNUSED.
(_GL_ATTRIBUTE_SPEC_PRINTF_STANDARD, _GL_ATTRIBUTE_MAYBE_UNUSED): Add
fallback definitions.
2021-08-22 Bruno Haible
gnulib-common.m4: Clarify logic behind _GL_UNUSED_LABEL.
Reported by Paul Eggert.
* m4/gnulib-common.m4 (gl_COMMON_BODY): Add comment and write the
condition in a way that is close to the comment.
2021-08-22 Paul Eggert
c-stack: depend on inttypes, mempcpy
* modules/c-stack (Depends-on): Add inttypes, mempcpy.
mempcpy problem reported by Evan Miller in:
https://debbugs.gnu.org/50098#31
2021-08-22 Bruno Haible
mountlist: Use recommended syntax for _GL_UNUSED_LABEL.
* lib/mountlist.c (read_file_system_list): Add semicolon after
_GL_UNUSED_LABEL.
2021-08-22 Bruno Haible
gnulib-common.m4: Make _GL_UNUSED_LABEL effective for clang.
* m4/gnulib-common.m4 (gl_COMMON_BODY): Make _GL_UNUSED_LABEL use
_GL_ATTRIBUTE_UNUSED also for clang.
2021-08-22 Bruno Haible
gnulib-common.m4: Use C2x [[maybe_unused]] when possible.
* m4/gnulib-common.m4 (gl_COMMON_BODY): Define _GL_UNUSED as an alias of
_GL_ATTRIBUTE_MAYBE_UNUSED, not of _GL_ATTRIBUTE_UNUSED.
* lib/binary-io.h (__gl_setmode): Put _GL_UNUSED before, not after, the
declaration.
* lib/c-stack.c (null_action, segv_handler, overflow_handler,
c_stack_action): Likewise.
* lib/chown.c (chown): Likewise.
* lib/clean-temp-simple.c (cleanup_action): Likewise.
* lib/fts.c (dirent_inode_sort_may_be_useful, leaf_optimization,
fts_set): Likewise.
* lib/getgroups.c (getgroups): Likewise.
* lib/getopt.c (_getopt_initialize): Likewise.
* lib/getugroups.c (getugroups): Likewise.
* lib/localename.c (gl_locale_name_thread_unsafe, gl_locale_name_thread,
gl_locale_name_posix, gl_locale_name_environ): Likewise.
* lib/mkdir.c (rpl_mkdir): Likewise.
* lib/mkfifo.c (mkfifo): Likewise.
* lib/mkfifoat.c (mkfifoat): Likewise.
* lib/mknod.c (mknod): Likewise.
* lib/mknodat.c (mknodat): Likewise.
* lib/mountlist.c (me_remote): Likewise.
* lib/openpty.c (openpty): Likewise.
* lib/parse-datetime.y (yyerror): Likewise.
* lib/passfd.c (sendfd, recvfd): Likewise.
* lib/pthread-cond.c (pthread_condattr_destroy, pthread_cond_init,
pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
pthread_cond_broadcast, pthread_cond_destroy): Likewise.
* lib/pthread-mutex.c (pthread_mutexattr_destroy, pthread_mutex_init,
pthread_mutex_lock, pthread_mutex_trylock, pthread_mutex_timedlock,
pthread_mutex_unlock, pthread_mutex_destroy): Likewise.
* lib/pthread-rwlock.c (pthread_rwlockattr_destroy, pthread_rwlock_init,
pthread_rwlock_timedrdlock, pthread_rwlock_timedwrlock): Likewise.
* lib/pthread-spin.c (pthread_spin_init, pthread_spin_lock,
pthread_spin_trylock, pthread_spin_unlock, pthread_spin_destroy):
Likewise.
* lib/pthread-thread.c (pthread_attr_destroy): Likewise.
* lib/readlink.c (readlink): Likewise.
* lib/rename.c (rpl_rename): Likewise.
* lib/set-permissions.c (set_permissions): Likewise.
* lib/sockets.c (gl_sockets_startup): Likewise.
* lib/stat-time.h (get_stat_birthtime_ns, get_stat_birthtime,
stat_time_normalize): Likewise.
* lib/strptime.c (__strptime_internal): Likewise.
* lib/strtod.c (LDEXP): Likewise.
* lib/symlink.c (symlink): Likewise.
* lib/symlinkat.c (symlinkat): Likewise.
* lib/tempname.c (try_dir, try_nocreate): Likewise.
* lib/textstyle.in.h (styled_ostream_begin_use_class,
styled_ostream_end_use_class, styled_ostream_get_hyperlink_ref,
styled_ostream_get_hyperlink_id, styled_ostream_set_hyperlink,
styled_ostream_flush_to_current_style, fd_ostream_create,
term_ostream_get_color, term_ostream_set_color,
term_ostream_get_bgcolor, term_ostream_set_bgcolor,
term_ostream_get_weight, term_ostream_set_weight,
term_ostream_get_posture, term_ostream_set_posture,
term_ostream_get_underline, term_ostream_set_underline,
term_ostream_get_hyperlink_ref, term_ostream_get_hyperlink_id,
term_ostream_set_hyperlink, term_ostream_create,
term_styled_ostream_create, html_styled_ostream_create,
handle_color_option, handle_style_option, style_file_prepare,
styled_ostream_create, libtextstyle_set_failure_exit_code): Likewise.
* lib/unicodeio.c (exit_failure_callback, fallback_failure_callback):
Likewise.
* lib/wait-process.c (cleanup_slaves_action): Likewise.
* tests/signature.h (SIGNATURE_CHECK2): Likewise.
* tests/test-areadlink.c (do_areadlink): Likewise.
* tests/test-areadlinkat.c (do_areadlinkat): Likewise.
* tests/test-ceilf-ieee.c (main): Likewise.
* tests/test-ceilf1.c (main): Likewise.
* tests/test-dirent.c (dir): Likewise.
* tests/test-fchownat.c (main): Likewise.
* tests/test-fdopendir.c (main): Likewise.
* tests/test-filenamecat.c (main): Likewise.
* tests/test-floor1.c (main): Likewise.
* tests/test-floorf-ieee.c (main): Likewise.
* tests/test-floorf1.c (main): Likewise.
* tests/test-fseeko.c (main): Likewise.
* tests/test-fstatat.c (main): Likewise.
* tests/test-ftello.c (main): Likewise.
* tests/test-getdomainname.c (main): Likewise.
* tests/test-getgroups.c (main): Likewise.
* tests/test-gethostname.c (main): Likewise.
* tests/test-math-c++.cc (OVERLOADED_CHECK): Likewise.
* tests/test-mkdirat.c (main): Likewise.
* tests/test-openat.c (main): Likewise.
* tests/test-parse-datetime.c (main): Likewise.
* tests/test-quotearg-simple.c (main): Likewise.
* tests/test-quotearg.c (main): Likewise.
* tests/test-sethostname2.c (main): Likewise.
* tests/test-unlinkat.c (main): Likewise.
* tests/test-version-etc.c (main): Likewise.
* tests/test-xalloc-die.c (main): Likewise.
* tests/test-xfprintf-posix.c (main): Likewise.
* tests/test-xprintf-posix.c (main): Likewise.
* tests/test-xvasprintf.c (main): Likewise.
2021-08-22 Bruno Haible
gnulib-common.m4: Document the gnulib-internal _GL_ATTRIBUTE_* macros.
* m4/gnulib-common.m4 (gl_COMMON_BODY): Add comments to the
_GL_ATTRIBUTE_* macros, based on lib/attribute.h.
2021-08-22 Bernhard Voelker
doc: fix order of stdlib functions
* doc/gnulib.texi (node Glibc stdlib.h): Move mrand48_r after mkstemps.
Reported by Benno Schulenberg.
2021-08-21 Bruno Haible
c-stack: Test for libsigsegv once, not twice.
* m4/sigsegv.m4: New file, based on modules/sigsegv.
* modules/sigsegv (Files): Add it.
(configure.ac): Require gl_SIGSEGV. Test gl_sigsegv_uses_libsigsegv
instead of with_libsigsegv and gl_cv_lib_sigsegv.
* m4/c-stack.m4 (gl_C_STACK): Likewise.
2021-08-21 Bruno Haible