Bruno Haible [Wed, 17 Jul 2024 15:33:12 +0000 (17:33 +0200)]
doc: List library dependencies.
* DEPENDENCIES: List the library dependencies.
Collin Funk [Wed, 17 Jul 2024 02:21:51 +0000 (19:21 -0700)]
gitlog-to-changelog: Improve --version and --help output.
* build-aux/gitlog-to-changelog (usage): Add bug reporting address.
(print_version): New function.
Collin Funk [Wed, 17 Jul 2024 02:18:22 +0000 (19:18 -0700)]
announce-gen: Add bug reporting address to --help.
* build-aux/announce-gen (usage): Add bug reporting address.
Collin Funk [Wed, 17 Jul 2024 02:15:10 +0000 (19:15 -0700)]
useless-if-before-free: Add bug reporting address to --help.
* build-aux/useless-if-before-free (usage): Add bug reporting address.
Paul Eggert [Mon, 15 Jul 2024 21:14:55 +0000 (14:14 -0700)]
strnlen: port to Android 5.0 (API 21)
This is needed for GNU Emacs, which attempts to port to these
old Android versions.
* m4/strnlen.m4 (AC_FUNC_STRNLEN): Replace if Autoconf 2.72 or
earlier, with code that detects the Android problem with strnlen.
This version works around some further bugs in the test, notably,
misplaced 'volatile' and need for volatile in the AIX 4.3 bug
check too.
Bruno Haible [Mon, 15 Jul 2024 21:02:58 +0000 (23:02 +0200)]
manywarnings: Don't enable -Wsystem-headers.
* build-aux/gcc-warning.spec: Add -Wsystem-headers.
* build-aux/g++-warning.spec: Likewise.
* m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC(C)): Don't enable
-Wsystem-headers.
* m4/manywarnings-c++.m4 (gl_MANYWARN_ALL_GCC_CXX_IMPL): Likewise.
Bruno Haible [Mon, 15 Jul 2024 12:48:41 +0000 (14:48 +0200)]
qcopy-acl: Fix copying of ACLs on CentOS 7 (regression 2023-01-12).
* lib/qcopy-acl.c: Include <string.h>, <linux/xattr.h>.
(XATTR_NAME_NFSV4_ACL, XATTR_NAME_POSIX_ACL_ACCESS,
XATTR_NAME_POSIX_ACL_DEFAULT): New macros, from file-has-acl.c.
(is_attr_permissions): Test for these names explicitly.
* m4/acl.m4 (gl_QCOPY_ACL): New macro.
* modules/qcopy-acl (Files): Add m4/acl.m4.
(configure.ac): Invoke gl_QCOPY_ACL.
Bruno Haible [Mon, 15 Jul 2024 02:32:04 +0000 (04:32 +0200)]
stdlib: Fix last commit on macOS, OpenBSD, mingw.
* lib/stdlib.in.h: Don't include <string> with clang, and don't include
it on platforms other than Solaris.
Bruno Haible [Sun, 14 Jul 2024 18:45:46 +0000 (20:45 +0200)]
stdlib: Avoid syntax errors in libstdc++ header files.
* lib/stdlib.in.h: Include <string> before strtol, strtoll, strtoul, or
strtoull gets defined as a macro.
Bruno Haible [Sun, 14 Jul 2024 16:39:29 +0000 (18:39 +0200)]
Activate strtold workarounds.
* modules/c-strtold-tests (Depends-on): Add strtold.
* modules/ldtoastr (Depends-on): Add strtold.
Bruno Haible [Sun, 14 Jul 2024 16:38:16 +0000 (18:38 +0200)]
strtold: Work around major mingw bugs.
* lib/strtod.c (HAVE_UNDERLYING_STRTOD) [USE_LONG_DOUBLE]: Set to 0 on
mingw versions before 10.0.
* doc/posix-functions/strtold.texi: Mention the mingw bugs.
Collin Funk [Sun, 14 Jul 2024 03:14:22 +0000 (20:14 -0700)]
useless-if-before-free: Fix copyright year in --version output.
* build-aux/useless-if-before-free (copyright_year): Derive from
time-stamp.
Collin Funk [Sun, 14 Jul 2024 03:10:46 +0000 (20:10 -0700)]
announce-gen: Fix copyright year in --version output.
* build-aux/announce-gen (copyright_year): Derive from time-stamp.
Bruno Haible [Sat, 13 Jul 2024 22:53:57 +0000 (00:53 +0200)]
stdlib: Support use of clang++ on Ubuntu.
* lib/stdlib.in.h: Ignore __need_system_stdlib_h when GCC's
c++/11/stdlib.h is being included or has been included.
Bruno Haible [Sat, 13 Jul 2024 15:32:07 +0000 (17:32 +0200)]
doc: Revamp list of dependencies.
* DEPENDENCIES: Clarify that GNU make is only needed on OpenBSD and
Solaris. Mark GNU tar as optional, not recommended. Add note about
Solaris 10. Add a second section "Dependencies for building the imported
code". Document the needed locales.
Bruno Haible [Sat, 13 Jul 2024 15:26:37 +0000 (17:26 +0200)]
tests: Don't depend on the exact locale name.
* tests/test-c-ctype.c: Include <stdlib.h>.
(main): Test the return value of setlocale(). Try not only de_DE, but
also de_DE.ISO-8859-1.
* tests/test-vasnprintf-posix3.c (main): Try not only fa_IR.UTF-8, but
also fa_IR.
* tests/test-vasnwprintf-posix3.c (main): Likewise.
Bruno Haible [Fri, 12 Jul 2024 20:44:23 +0000 (22:44 +0200)]
Update last ChangeLog entry.
Pip Cet [Wed, 10 Jul 2024 15:56:34 +0000 (15:56 +0000)]
timespec-sub: Fix compilation error on clang.
* lib/timespec-sub.c (timespec_sub): Use 'int' as type of variable.
Copyright-paperwork-exempt: Yes
Bruno Haible [Sun, 7 Jul 2024 00:53:37 +0000 (02:53 +0200)]
pthread-cond: Fix compilation error on native Windows.
* lib/pthread-cond.c: Include windows-cond.h, not windows-thread.h.
Paul Eggert [Sat, 6 Jul 2024 14:41:44 +0000 (16:41 +0200)]
gnulib-tool: simplify/speed startup
* gnulib-tool, gnulib-tool.py (prog): New var. Use it to simplify
and speed up startup in common cases.
Bruno Haible [Thu, 4 Jul 2024 21:09:30 +0000 (23:09 +0200)]
gitlog-to-changelog: Tweak documentation.
* doc/gitlog-to-changelog.texi (gitlog-to-changelog): Omit irrelevant
detail.
Collin Funk [Thu, 4 Jul 2024 11:04:11 +0000 (04:04 -0700)]
Make time-stamp after-save-hooks buffer-local.
* build-aux/announce-gen: Pass optional arguments to 'add-hook'.
* build-aux/bootstrap: Likewise.
* build-aux/do-release-commit-and-tag: Likewise.
* build-aux/gendocs.sh: Likewise.
* build-aux/git-version-gen: Likewise.
* build-aux/gitlog-to-changelog: Likewise.
* build-aux/gnu-web-doc-update: Likewise.
* build-aux/gnupload: Likewise.
* build-aux/move-if-change: Likewise.
* build-aux/prefix-gnulib-mk: Likewise.
* build-aux/update-copyright: Likewise.
* build-aux/useless-if-before-free: Likewise.
* build-aux/vc-list-files: Likewise.
* top/bootstrap: Likewise.
* top/bootstrap-funclib.sh: Likewise.
Collin Funk [Thu, 4 Jul 2024 04:55:13 +0000 (21:55 -0700)]
gitlog-to-changelog: Add a new --commit-timezone option.
* build-aux/gitlog-to-changelog: Use the date given in the commit time
zone if --commit-timezone is used.
(usage): Mention the new option.
* doc/gitlog-to-changelog.texi (gitlog-to-changelog): Mention the
--commit-timezone and add an invocation example. Add example of date
ordering that may be undesired.
Paul Eggert [Wed, 3 Jul 2024 23:31:33 +0000 (00:31 +0100)]
gitlog-to-changelog: improve doc
Jim Meyering [Wed, 3 Jul 2024 21:07:16 +0000 (23:07 +0200)]
maintainer-makefile: derive VERSION from RELEASE only from command line
* top/maint.mk (VERSION, RELEASE_TYPE): Do not let an environment-
specified RELEASE influence the VERSION and RELEASE_TYPE variables.
Reported by Simon Josefsson in
https://lists.gnu.org/archive/html/bug-gnulib/2024-07/msg00021.html
Bruno Haible [Tue, 2 Jul 2024 18:08:08 +0000 (20:08 +0200)]
git-merge-changelog: Simplify installation instructions.
Reported by Samuel Bronson <naesten@gmail.com> via Simon Josefsson in
<https://lists.gnu.org/archive/html/bug-gnulib/2024-07/msg00014.html>.
* lib/git-merge-changelog.c: Suggest creating a .gitattributes file only
at the top-level.
Bruno Haible [Tue, 2 Jul 2024 11:20:19 +0000 (13:20 +0200)]
uniname/uniname: Modernize gen-uninames.lisp.
Reported by Simon Josefsson in
<https://lists.gnu.org/archive/html/bug-gnulib/2024-07/msg00011.html>.
* lib/uniname/gen-uninames.lisp: Swap second and third parameter. Look
up clisp in $PATH.
* lib/gen-uni-tables.c: Update invocation.
Bruno Haible [Mon, 1 Jul 2024 15:33:17 +0000 (17:33 +0200)]
Avoid some possibly wrong configure test results.
Reported by Arsen Arsenović <arsen@gentoo.org> in
<https://lists.gnu.org/archive/html/bug-gnulib/2024-07/msg00000.html>.
* m4/printf.m4 (gl_PRINTF_DIRECTIVE_N): Include necessary header file
for _exit().
(gl_SNPRINTF_DIRECTIVE_N): Likewise.
* m4/memmem.m4 (gl_FUNC_MEMMEM): Update comment.
* m4/sleep.m4 (gl_FUNC_SLEEP): Likewise.
* m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
* m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
* m4/wcsstr.m4 (gl_FUNC_WCSSTR): Likewise.
Bruno Haible [Mon, 1 Jul 2024 14:44:54 +0000 (16:44 +0200)]
doc: Update regarding stable branches.
* doc/gnulib-readme.texi (Stable Branches): Mention new branch
stable-202407. Mention that stable-202307 is no longer updated.
Collin Funk [Sun, 30 Jun 2024 23:29:01 +0000 (16:29 -0700)]
doc: Remove references to POSIX 202x.
* doc/posix-functions/encrypt.texi: Document as obsolete in
POSIX.1-2024.
* doc/posix-functions/inet_addr.texi: Likewise.
* doc/posix-functions/inet_ntoa.texi: Likewise.
* doc/posix-functions/setkey.texi: Likewise.
* doc/posix-functions/ftw.texi: Document as removed in POSIX.1-2024.
Link the POSIX.1-2017 specification.
* doc/posix-functions/getitimer.texi: Likewise.
* doc/posix-functions/setitimer.texi: Likewise.
* doc/posix-functions/toascii.texi: Likewise.
Bruno Haible [Sun, 30 Jun 2024 21:30:32 +0000 (23:30 +0200)]
*printf* tests: Remove unused includes.
* tests/test-fprintf-gnu.c: Don't include <stdarg.h>.
* tests/test-fprintf-posix.c: Likewise.
* tests/test-szprintf-gnu.c: Likewise.
* tests/test-szprintf-posix.c: Likewise.
* tests/test-xfprintf-posix.c: Likewise.
Bruno Haible [Sun, 30 Jun 2024 21:26:35 +0000 (23:26 +0200)]
vprintf-posix tests: Fix test title.
* tests/test-vprintf-posix.c: Fix title.
Bruno Haible [Sun, 30 Jun 2024 21:10:41 +0000 (23:10 +0200)]
zprintf-gnu: Add tests.
* tests/test-zprintf-gnu.c: New file, based on tests/test-printf-gnu.c.
* tests/test-zprintf-gnu.sh: New file, based on
tests/test-printf-gnu.sh.
* modules/zprintf-gnu-tests: New file.
Bruno Haible [Sun, 30 Jun 2024 21:06:12 +0000 (23:06 +0200)]
zprintf-gnu: New module.
* modules/zprintf-gnu: New file.
Bruno Haible [Sun, 30 Jun 2024 21:04:37 +0000 (23:04 +0200)]
vzprintf-gnu: Add tests.
* tests/test-printf-gnu.h (test_function): Use RETTYPE instead of 'int'.
* tests/test-printf-gnu.c (RETTYPE): New macro.
* tests/test-vprintf-gnu.c (RETTYPE): New macro.
* tests/test-vzprintf-gnu.c: New file, based on
tests/test-vprintf-gnu.c.
* tests/test-vzprintf-gnu.sh: New file, based on
tests/test-vprintf-gnu.sh.
* modules/vzprintf-gnu-tests: New file.
Bruno Haible [Sun, 30 Jun 2024 20:57:50 +0000 (22:57 +0200)]
vzprintf-gnu: New module.
* modules/vzprintf-gnu: New file.
Bruno Haible [Sun, 30 Jun 2024 20:56:15 +0000 (22:56 +0200)]
fzprintf-gnu: Add tests.
* tests/test-fzprintf-gnu.c: New file, based on
tests/test-fprintf-gnu.c.
* tests/test-fzprintf-gnu.sh: New file, based on
tests/test-fprintf-gnu.sh.
* modules/fzprintf-gnu-tests: New file.
Bruno Haible [Sun, 30 Jun 2024 20:49:52 +0000 (22:49 +0200)]
fzprintf-gnu: New module.
* modules/fzprintf-gnu: New file.
Bruno Haible [Sun, 30 Jun 2024 20:42:20 +0000 (22:42 +0200)]
vfzprintf-gnu: Add tests.
* tests/test-vfzprintf-gnu.c: New file, based on
tests/test-vfprintf-gnu.c.
* tests/test-vfzprintf-gnu.sh: New file, based on
tests/test-vfprintf-gnu.sh.
* tests/test-fprintf-gnu.h: Update title.
* modules/vfzprintf-gnu-tests: New file.
Bruno Haible [Sun, 30 Jun 2024 20:36:22 +0000 (22:36 +0200)]
vfzprintf-gnu: New module.
* modules/vfzprintf-gnu: New file.
Bruno Haible [Sun, 30 Jun 2024 20:23:45 +0000 (22:23 +0200)]
zprintf-posix: Add tests.
* tests/test-zprintf-posix.c: New file, based on
tests/test-printf-posix.c.
* tests/test-zprintf-posix.sh: New file, based on
tests/test-printf-posix.sh.
* modules/zprintf-posix-tests: New file.
Bruno Haible [Sun, 30 Jun 2024 20:17:44 +0000 (22:17 +0200)]
zprintf-posix: New module.
* modules/zprintf-posix: New file.
Bruno Haible [Sun, 30 Jun 2024 20:12:41 +0000 (22:12 +0200)]
vzprintf-posix: Add tests.
* tests/test-printf-posix.h (test_function): Use RETTYPE instead of
'int'.
* tests/test-printf-posix.c (RETTYPE): New macro.
* tests/test-vprintf-posix.c (RETTYPE): New macro.
* tests/test-xprintf-posix.c (RETTYPE): New macro.
* tests/test-vzprintf-posix.c: New file, based on
tests/test-vprintf-posix.c.
* tests/test-vzprintf-posix.sh: New file, based on
tests/test-vprintf-posix.sh.
* modules/vzprintf-posix-tests: New file.
Bruno Haible [Sun, 30 Jun 2024 19:57:26 +0000 (21:57 +0200)]
vzprintf-posix: New module.
* modules/vzprintf-posix: New file.
Bruno Haible [Sun, 30 Jun 2024 19:55:13 +0000 (21:55 +0200)]
fzprintf-posix: Add tests.
* tests/test-fzprintf-posix.c: New file, based on
tests/test-fprintf-posix.c.
* tests/test-fzprintf-posix.sh: New file, based on
tests/test-fprintf-posix.sh.
* modules/fzprintf-posix-tests: New file.
Bruno Haible [Sun, 30 Jun 2024 19:18:35 +0000 (21:18 +0200)]
fzprintf-posix: New module.
* modules/fzprintf-posix: New file.
Bruno Haible [Sun, 30 Jun 2024 19:17:03 +0000 (21:17 +0200)]
vfzprintf-posix: Add tests.
* tests/test-vfzprintf-posix.c: New file, based on
tests/test-vfprintf-posix.c.
* tests/test-vfzprintf-posix.sh: New file, based on
tests/test-vfprintf-posix.sh.
* tests/test-fprintf-posix.h: Update title.
* modules/vfzprintf-posix-tests: New file.
Bruno Haible [Sun, 30 Jun 2024 19:07:12 +0000 (21:07 +0200)]
vfzprintf-posix: New module.
* modules/vfzprintf-posix: New file.
Bruno Haible [Sun, 30 Jun 2024 19:00:47 +0000 (21:00 +0200)]
printf-posix: Document properly.
* lib/stdio.in.h (printf): Add specification.
* lib/vprintf.c (printf): Remove specification.
Bruno Haible [Sun, 30 Jun 2024 18:58:29 +0000 (20:58 +0200)]
zprintf: New module.
* lib/stdio.in.h (zprintf): New declaration.
* lib/zprintf.c: New file, based on lib/vzprintf.c.
* m4/stdio_h.m4 (gl_STDIO_H_REQUIRE_DEFAULTS): Initialize
GNULIB_ZPRINTF.
* modules/stdio (Makefile.am): Substitute GNULIB_ZPRINTF.
* modules/zprintf: New file.
Bruno Haible [Sun, 30 Jun 2024 18:15:58 +0000 (20:15 +0200)]
vprintf-posix: Document properly.
* lib/stdio.in.h (vprintf): Add specification.
* lib/vprintf.c (vprintf): Remove specification.
Bruno Haible [Sun, 30 Jun 2024 18:00:58 +0000 (20:00 +0200)]
vzprintf: New module.
* lib/stdio.in.h (vzprintf): New declaration.
* lib/vzprintf.c: New file, based on lib/vprintf.c.
* m4/stdio_h.m4 (gl_STDIO_H_REQUIRE_DEFAULTS): Initialize
GNULIB_VZPRINTF.
* modules/stdio (Makefile.am): Substitute GNULIB_VZPRINTF.
* modules/vzprintf: New file.
Bruno Haible [Sun, 30 Jun 2024 17:47:26 +0000 (19:47 +0200)]
fprintf-posix: Use vfzprintf.
* lib/stdio.in.h (fprintf): Add specification.
* lib/fprintf.c: Don't include <stdlib.h>, vasnprintf.h.
Include intprops.h.
(fprintf): Implement based on vfzprintf.
* modules/fprintf-posix (Depends-on): Add vfzprintf, intprops. Remove
vasnprintf, free-posix.
Bruno Haible [Sun, 30 Jun 2024 17:40:35 +0000 (19:40 +0200)]
fzprintf: New module.
* lib/stdio.in.h (fzprintf): New declaration.
* lib/fzprintf.c: New file, based on lib/vfzprintf.c.
* m4/stdio_h.m4 (gl_STDIO_H_REQUIRE_DEFAULTS): Initialize
GNULIB_FZPRINTF.
* modules/stdio (Makefile.am): Substitute GNULIB_FZPRINTF.
* modules/fzprintf: New file.
Bruno Haible [Sun, 30 Jun 2024 16:45:25 +0000 (18:45 +0200)]
vfprintf-posix: Use vfzprintf.
* lib/stdio.in.h (vfprintf): Add specification.
* lib/vfprintf.c: Don't include <stdlib.h>, vasnprintf.h.
Include intprops.h.
(vfprintf): Implement based on vfzprintf.
* modules/vfprintf-posix (Depends-on): Add vfzprintf, intprops. Remove
vasnprintf, free-posix.
Bruno Haible [Sun, 30 Jun 2024 16:31:56 +0000 (18:31 +0200)]
vfzprintf: New module.
* lib/stdio.in.h (vfzprintf): New declaration.
* lib/vfzprintf.c: New file, based on lib/vfprintf.c and
lib/vdzprintf.c.
* m4/stdio_h.m4 (gl_STDIO_H_REQUIRE_DEFAULTS): Initialize
GNULIB_VFZPRINTF.
* modules/stdio (Makefile.am): Substitute GNULIB_VFZPRINTF.
* modules/vfzprintf: New file.
Bruno Haible [Sun, 30 Jun 2024 15:43:45 +0000 (17:43 +0200)]
dzprintf-gnu: Add tests.
* tests/test-dprintf-gnu.h: New file, extracted from
tests/test-dprintf-gnu.c.
* tests/test-dprintf-gnu.c: Include it.
(test_function): Remove function.
* modules/dprintf-gnu-tests (Files): Add it.
* tests/test-dzprintf-gnu.c: New file, based on
tests/test-dprintf-gnu.c.
* tests/test-dzprintf-gnu.sh: New file, based on
tests/test-dprintf-gnu.sh.
* modules/dzprintf-gnu-tests: New file.
Bruno Haible [Sun, 30 Jun 2024 15:32:14 +0000 (17:32 +0200)]
dzprintf-gnu: New module.
* modules/dzprintf-gnu: New file.
Bruno Haible [Sun, 30 Jun 2024 15:29:44 +0000 (17:29 +0200)]
vdzprintf-gnu: Add tests.
* tests/test-fprintf-gnu.h (test_function): Use RETTYPE instead of
'int'.
* tests/test-fprintf-gnu.c (RETTYPE): New macro.
* tests/test-vdprintf-gnu.c (RETTYPE): New macro.
* tests/test-vfprintf-gnu.c (RETTYPE): New macro.
* tests/test-vdzprintf-gnu.c: New file, based on
tests/test-vdzprintf-posix.c.
* tests/test-vdzprintf-gnu.sh: New file, based on
tests/test-vdzprintf-posix.sh.
* modules/vdzprintf-gnu-tests: New file.
Bruno Haible [Sun, 30 Jun 2024 15:28:59 +0000 (17:28 +0200)]
vdzprintf-gnu: New module.
* modules/vdzprintf-gnu: New file.
Bruno Haible [Sun, 30 Jun 2024 15:25:46 +0000 (17:25 +0200)]
dzprintf-posix: Add tests.
* tests/test-dprintf-posix.h: New file, extracted from
tests/test-dprintf-posix.c.
* tests/test-dprintf-posix.c: Include it. Don't include infinity.h.
(test_function): Remove function.
* modules/dprintf-posix-tests (Files): Add it.
* tests/test-dzprintf-posix.c: New file, based on
tests/test-dprintf-posix.c.
* tests/test-dzprintf-posix.sh: New file, based on
tests/test-dprintf-posix.sh.
* modules/dzprintf-posix-tests: New file.
Bruno Haible [Sun, 30 Jun 2024 15:25:05 +0000 (17:25 +0200)]
dzprintf-posix: New module.
* modules/dzprintf-posix: New file.
Bruno Haible [Sun, 30 Jun 2024 15:21:04 +0000 (17:21 +0200)]
vdzprintf-posix: Add tests.
* tests/test-fprintf-posix.h (test_function): Use RETTYPE instead of
'int'.
* tests/test-fprintf-posix.c (RETTYPE): New macro.
* tests/test-vdprintf-posix.c (RETTYPE): New macro.
* tests/test-vfprintf-posix.c (RETTYPE): New macro.
* tests/test-xfprintf-posix.c (RETTYPE): New macro.
* tests/test-vdzprintf-posix.c: New file, based on
tests/test-vdprintf-posix.c.
* tests/test-vdzprintf-posix.sh: New file, based on
tests/test-vdprintf-posix.sh.
* modules/vdzprintf-posix-tests: New file.
Bruno Haible [Sun, 30 Jun 2024 15:20:02 +0000 (17:20 +0200)]
vdzprintf-posix: New module.
* modules/vdzprintf-posix: New file.
Bruno Haible [Sun, 30 Jun 2024 15:18:35 +0000 (17:18 +0200)]
dprintf: Use vdzprintf.
* lib/stdio.in.h (dprintf): Add specification.
* lib/dprintf.c: Don't include <stdlib.h>, full-write.h, vasnprintf.h.
Include intprops.h.
(dprintf): Implement based on vdzprintf.
* modules/dprintf (Depends-on): Add vdzprintf, intprops. Remove
vasnprintf, free-posix, full-write.
Bruno Haible [Sun, 30 Jun 2024 15:17:14 +0000 (17:17 +0200)]
dzprintf: New module.
* lib/stdio.in.h (dzprintf): New declaration.
* lib/dzprintf.c: New file, based on lib/vdzprintf.c.
* m4/stdio_h.m4 (gl_STDIO_H_REQUIRE_DEFAULTS): Initialize
GNULIB_DZPRINTF.
* modules/stdio (Makefile.am): Substitute GNULIB_DZPRINTF.
* modules/dzprintf: New file.
Bruno Haible [Sun, 30 Jun 2024 15:15:28 +0000 (17:15 +0200)]
vdprintf: Use vdzprintf.
* lib/stdio.in.h (vdprintf): Add specification.
* lib/vdprintf.c: Don't include <stdlib.h>, full-write.h, vasnprintf.h.
Include intprops.h.
(vdprintf): Implement based on vdzprintf.
* modules/vdprintf (Depends-on): Add vdzprintf, intprops. Remove
vasnprintf, free-posix, full-write.
Bruno Haible [Sun, 30 Jun 2024 15:09:24 +0000 (17:09 +0200)]
vdzprintf: New module.
* lib/stdio.in.h (vdzprintf): New declaration.
* lib/vdzprintf.c: New file, based on lib/vdprintf.c.
* m4/stdio_h.m4 (gl_STDIO_H_REQUIRE_DEFAULTS): Initialize
GNULIB_VDZPRINTF.
* modules/stdio (Makefile.am): Substitute GNULIB_VDZPRINTF.
* modules/vdzprintf: New file.
Bruno Haible [Sun, 30 Jun 2024 14:16:26 +0000 (16:16 +0200)]
*printf-tests: Correct test file descriptions.
* tests/test-fprintf-gnu.h: Fix title line.
* tests/test-fprintf-posix.h: Likewise.
* tests/test-printf-gnu.h: Likewise.
* tests/test-printf-posix.h: Likewise.
* tests/test-snzprintf-gnu.h: Likewise.
* tests/test-vaszprintf-gnu.h: Likewise.
Bruno Haible [Sun, 30 Jun 2024 13:47:39 +0000 (15:47 +0200)]
*printf-posix-tests: Strengthen tests.
* tests/test-fprintf-posix.h (test_function): Test %b directive.
* tests/test-printf-posix.h (test_function): Likewise.
* tests/test-dprintf-posix.c (test_function): Likewise.
* tests/test-printf-posix.output: Update expected test result.
Bruno Haible [Sun, 30 Jun 2024 13:41:49 +0000 (15:41 +0200)]
*printf-{posix,gnu}: Tweak module descriptions.
* modules/c-snzprintf-gnu (Description): Say "POSIX compatible", not
"POSIX compliant", since these modules don't implement the %n directive
by default any more.
* modules/c-vaszprintf-gnu (Description): Likewise.
* modules/c-vsnzprintf-gnu (Description): Likewise.
* modules/obstack-printf-posix (Description): Likewise.
* modules/obstack-zprintf-gnu (Description): Likewise.
* modules/obstack-zprintf-posix (Description): Likewise.
* modules/snzprintf-gnu (Description): Likewise.
* modules/snzprintf-posix (Description): Likewise.
* modules/szprintf-gnu (Description): Likewise.
* modules/szprintf-posix (Description): Likewise.
* modules/vaszprintf-gnu (Description): Likewise.
* modules/vaszprintf-posix (Description): Likewise.
* modules/vsnzprintf-gnu (Description): Likewise.
* modules/vsnzprintf-posix (Description): Likewise.
* modules/vszprintf-gnu (Description): Likewise.
* modules/vszprintf-posix (Description): Likewise.
Paul Eggert [Sun, 30 Jun 2024 10:27:48 +0000 (11:27 +0100)]
strnlen: avoid undefined memcmp behavior
Problem reported by Po Lu in:
https://lists.gnu.org/r/bug-gnulib/2024-06/msg00288.html
* config/srclist.txt: Don’t mention strnlen.c even in a comment,
as the Gnulib and glibc implementations have diverged for
portability reasons, and they’re never likely to merge.
* lib/strnlen.c (strnlen): Avoid undefined behavior if
the array S points to has fewer than MAXLEN bytes.
Bruno Haible [Sun, 30 Jun 2024 05:57:12 +0000 (07:57 +0200)]
tests: Avoid warning "is_running_under_virtualbox defined but not used".
* tests/virtualbox.h (is_running_under_virtualbox): Mark as possibly
unused.
Bruno Haible [Sat, 29 Jun 2024 23:57:51 +0000 (01:57 +0200)]
bootstrap-funclib.sh: Restore readability.
* top/bootstrap-funclib.sh (prepare_GNULIB_SRCDIR): Add a line break
instead of removing spaces.
* build-aux/bootstrap: Regenerated.
Bruno Haible [Sat, 29 Jun 2024 23:32:24 +0000 (01:32 +0200)]
Global rename *zs[n]printf -> *s[n]zprintf.
* lib/aszprintf.c: Renamed from lib/azsprintf.c.
* lib/c-aszprintf.c: Renamed from lib/c-azsprintf.c.
* lib/c-vaszprintf.c: Renamed from lib/c-vazsprintf.c.
* lib/c-vsnzprintf.c: Renamed from lib/c-vzsnprintf.c.
* lib/c-snzprintf.c: Renamed from lib/c-zsnprintf.c.
* lib/vaszprintf.c: Renamed from lib/vazsprintf.c.
* lib/vsnzprintf.c: Renamed from lib/vzsnprintf.c.
* lib/vszprintf.c: Renamed from lib/vzsprintf.c.
* lib/snzprintf.c: Renamed from lib/zsnprintf.c.
* lib/szprintf.c: Renamed from lib/zsprintf.c.
* tests/test-c-vaszprintf-gnu.c: Renamed from
tests/test-c-vazsprintf-gnu.c.
* tests/test-c-vaszprintf-gnu.sh: Renamed from
tests/test-c-vazsprintf-gnu.sh.
* tests/test-c-vsnzprintf-gnu.c: Renamed from
tests/test-c-vzsnprintf-gnu.c.
* tests/test-c-vsnzprintf-gnu.sh: Renamed from
tests/test-c-vzsnprintf-gnu.sh.
* tests/test-c-snzprintf-gnu.c: Renamed from
tests/test-c-zsnprintf-gnu.c.
* tests/test-c-snzprintf-gnu.sh: Renamed from
tests/test-c-zsnprintf-gnu.sh.
* tests/test-vaszprintf-gnu.c: Renamed from tests/test-vazsprintf-gnu.c.
* tests/test-vaszprintf-gnu.h: Renamed from tests/test-vazsprintf-gnu.h.
* tests/test-vaszprintf-posix.c: Renamed from
tests/test-vazsprintf-posix.c.
* tests/test-vsnzprintf-gnu.c: Renamed from tests/test-vzsnprintf-gnu.c.
* tests/test-vsnzprintf-posix.c: Renamed from
tests/test-vzsnprintf-posix.c.
* tests/test-vszprintf-gnu.c: Renamed from tests/test-vzsprintf-gnu.c.
* tests/test-vszprintf-posix.c: Renamed from
tests/test-vzsprintf-posix.c.
* tests/test-snzprintf-gnu.c: Renamed from tests/test-zsnprintf-gnu.c.
* tests/test-snzprintf-gnu.h: Renamed from tests/test-zsnprintf-gnu.h.
* tests/test-snzprintf-posix.c: Renamed from
tests/test-zsnprintf-posix.c.
* tests/test-snzprintf-posix.h: Renamed from
tests/test-zsnprintf-posix.h.
* tests/test-szprintf-gnu.c: Renamed from tests/test-zsprintf-gnu.c.
* tests/test-szprintf-gnu.h: Renamed from tests/test-zsprintf-gnu.h.
* tests/test-szprintf-posix.c: Renamed from tests/test-zsprintf-posix.c.
* tests/test-szprintf-posix.h: Renamed from tests/test-zsprintf-posix.h.
* modules/c-vaszprintf: Renamed from modules/c-vazsprintf.
* modules/c-vaszprintf-gnu: Renamed from modules/c-vazsprintf-gnu.
* modules/c-vaszprintf-gnu-tests: Renamed from
modules/c-vazsprintf-gnu-tests.
* modules/c-vsnzprintf: Renamed from modules/c-vzsnprintf.
* modules/c-vsnzprintf-gnu: Renamed from modules/c-vzsnprintf-gnu.
* modules/c-vsnzprintf-gnu-tests: Renamed from
modules/c-vzsnprintf-gnu-tests.
* modules/c-snzprintf: Renamed from modules/c-zsnprintf.
* modules/c-snzprintf-gnu: Renamed from modules/c-zsnprintf-gnu.
* modules/c-snzprintf-gnu-tests: Renamed from
modules/c-zsnprintf-gnu-tests.
* modules/vaszprintf: Renamed from modules/vazsprintf.
* modules/vaszprintf-gnu: Renamed from modules/vazsprintf-gnu.
* modules/vaszprintf-gnu-tests: Renamed from
modules/vazsprintf-gnu-tests.
* modules/vaszprintf-posix: Renamed from modules/vazsprintf-posix.
* modules/vaszprintf-posix-tests: Renamed from
modules/vazsprintf-posix-tests.
* modules/vsnzprintf: Renamed from modules/vzsnprintf.
* modules/vsnzprintf-gnu: Renamed from modules/vzsnprintf-gnu.
* modules/vsnzprintf-gnu-tests: Renamed from
modules/vzsnprintf-gnu-tests.
* modules/vsnzprintf-posix: Renamed from modules/vzsnprintf-posix.
* modules/vsnzprintf-posix-tests: Renamed from
modules/vzsnprintf-posix-tests.
* modules/vszprintf: Renamed from modules/vzsprintf.
* modules/vszprintf-gnu: Renamed from modules/vzsprintf-gnu.
* modules/vszprintf-gnu-tests: Renamed from modules/vzsprintf-gnu-tests.
* modules/vszprintf-posix: Renamed from modules/vzsprintf-posix.
* modules/vszprintf-posix-tests: Renamed from
modules/vzsprintf-posix-tests.
* modules/snzprintf: Renamed from modules/zsnprintf.
* modules/snzprintf-gnu: Renamed from modules/zsnprintf-gnu.
* modules/snzprintf-gnu-tests: Renamed from modules/zsnprintf-gnu-tests.
* modules/snzprintf-posix: Renamed from modules/zsnprintf-posix.
* modules/snzprintf-posix-tests: Renamed from
modules/zsnprintf-posix-tests.
* modules/szprintf: Renamed from modules/zsprintf.
* modules/szprintf-gnu: Renamed from modules/zsprintf-gnu.
* modules/szprintf-gnu-tests: Renamed from modules/zsprintf-gnu-tests.
* modules/szprintf-posix: Renamed from modules/zsprintf-posix.
* modules/szprintf-posix-tests: Renamed from
modules/zsprintf-posix-tests.
All function names updated.
* lib/stdio.in.h, m4/stdio_h.m4, modules/stdio: Update module indicator
names.
Jim Meyering [Sat, 29 Jun 2024 22:08:19 +0000 (15:08 -0700)]
bootstrap-funclib.sh: shrink or split too-long lines
* top/bootstrap-funclib.sh: The generated bootstrap file had lines
lines that triggered a syntax-check failure. Sure, I could have
exempted this file, but it was easy to comply. Besides, this also
fixed a quoting bug in the event that ${GNULIB_URL:-$default_gnulib_url}
had a value requiring double quotes.
* build-aux/bootstrap: Regenerate.
Bruno Haible [Sat, 29 Jun 2024 11:28:14 +0000 (13:28 +0200)]
tests: Avoid test failures due to VirtualBox specific bug.
* tests/virtualbox.h: New file.
* tests/test-pthread-cond.c: Include virtualbox.h.
(main): Skip the test under VirtualBox with KVM paravirtualization and
more than 1 CPU.
* tests/test-cnd.c: Include virtualbox.h.
(main): Skip the test under VirtualBox with KVM paravirtualization and
more than 1 CPU.
* tests/test-cond.c: Include virtualbox.h.
(main): Skip the test under VirtualBox with KVM paravirtualization and
more than 1 CPU.
* tests/test-pthread_sigmask1.c: Include virtualbox.h.
(main): Skip the test under VirtualBox with KVM paravirtualization and
more than 1 CPU.
* tests/test-pthread_sigmask2.c: Include virtualbox.h.
(main): Skip the test under VirtualBox with KVM paravirtualization and
more than 1 CPU.
* tests/test-sigprocmask.c: Include virtualbox.h.
(main): Skip the test under VirtualBox with KVM paravirtualization and
more than 1 CPU.
* modules/pthread-cond-tests (Files): Add tests/virtualbox.h.
* modules/cnd-tests (Files): Likewise.
* modules/cond-tests (Files): Likewise.
* modules/pthread_sigmask-tests (Files): Likewise.
* modules/sigprocmask-tests (Files): Likewise.
Collin Funk [Sat, 29 Jun 2024 06:12:40 +0000 (23:12 -0700)]
doc: Mention the byteswap module in function documentation.
* doc/glibc-functions/bswap_16.texi (bswap_16): Mention the byteswap
module.
* doc/glibc-functions/bswap_32.texi (bswap_32): Likewise.
* doc/glibc-functions/bswap_64.texi (bswap_64): Likewise.
Bruno Haible [Sat, 29 Jun 2024 01:08:33 +0000 (03:08 +0200)]
doc: Mention pthread_cond_timedwait bug caused by hypervisor.
* doc/posix-functions/pthread_cond_timedwait.texi: Mention VirtualBox
specific bug.
* doc/posix-functions/cnd_timedwait.texi: Likewise.
Bruno Haible [Fri, 28 Jun 2024 20:15:23 +0000 (22:15 +0200)]
cond tests: Avoid theoretically possible failure.
* tests/test-cnd.c (cnd_wait_routine, cnd_timedwait_routine): Report to
the main thread if this thread comes too late.
(test_cnd_wait, test_cnd_timedwait): Return a 'skipped' value.
(main): Print SKIP instead of OK if the essence of the test was skipped.
* tests/test-cond.c (cond_routine, timedcond_routine): Report to the
main thread if this thread comes too late.
(test_cond, test_timedcond): Return a 'skipped' value.
(main): Print SKIP instead of OK if the essence of the test was skipped.
* tests/test-pthread-cond.c (pthread_cond_wait_routine,
pthread_cond_timedwait_routine): Report to the main thread if this
thread comes too late.
(test_pthread_cond_wait, test_pthread_cond_timedwait): Return a
'skipped' value.
(main): Print SKIP instead of OK if the essence of the test was skipped.
Bruno Haible [Fri, 28 Jun 2024 19:51:40 +0000 (21:51 +0200)]
cond tests: Improve multithread-safety.
* tests/test-cnd.c (cond_value, cond_timed_out): Mark as volatile.
* tests/test-cond.c (cond_value, cond_timed_out): Likewise.
* tests/test-pthread-cond.c (cond_value, cond_timed_out): Likewise.
Bruno Haible [Fri, 28 Jun 2024 19:40:16 +0000 (21:40 +0200)]
cond tests: Improve comments.
* tests/test-cnd.c: Improve comments.
(cond_value): Remove initializer.
(cond_timed_out): Renamed from cond_timeout.
* tests/test-cond.c: Improve comments.
(cond_value): Remove initializer.
(cond_timed_out): Renamed from cond_timeout.
* tests/test-pthread-cond.c: Improve comments.
(cond_value): Remove initializer.
(cond_timed_out): Renamed from cond_timeout.
Bruno Haible [Fri, 28 Jun 2024 09:10:59 +0000 (11:10 +0200)]
time: Fix test failure on FreeBSD.
* m4/time.m4 (gl_FUNC_TIME): Guess no for FreeBSD in general.
* doc/posix-functions/time.texi: Mention FreeBSD in general.
Collin Funk [Fri, 28 Jun 2024 03:18:53 +0000 (20:18 -0700)]
doc: Improve documentation of previous POSIX functions.
* doc/pastposix-functions/bsd_signal.texi: Document revision that
removed function. Mention the link is the previous version.
* doc/pastposix-functions/getcontext.texi: Likewise.
* doc/pastposix-functions/gethostbyaddr.texi: Likewise.
* doc/pastposix-functions/gethostbyname.texi: Likewise.
* doc/pastposix-functions/h_errno.texi: Likewise.
* doc/pastposix-functions/makecontext.texi: Likewise.
* doc/pastposix-functions/pthread_attr_getstackaddr.texi: Likewise.
* doc/pastposix-functions/pthread_attr_setstackaddr.texi: Likewise.
* doc/pastposix-functions/scalb.texi: Likewise.
* doc/pastposix-functions/setcontext.texi: Likewise.
* doc/pastposix-functions/swapcontext.texi: Likewise.
* doc/pastposix-functions/ualarm.texi: Likewise.
* doc/pastposix-functions/usleep.texi: Likewise.
* doc/pastposix-functions/vfork.texi: Likewise.
Paul Eggert [Thu, 27 Jun 2024 22:39:35 +0000 (23:39 +0100)]
Fix ChangeLog typo
Paul Eggert [Thu, 27 Jun 2024 22:26:18 +0000 (23:26 +0100)]
nstrftime: always include locale.h
* lib/strftime.c: Include locale.h unconditionally, simplifying
the code. Emacs is now open for this change, which we had wanted
to do earlier.
Collin Funk [Thu, 27 Jun 2024 21:38:49 +0000 (14:38 -0700)]
netdb: Simplify NI_MAXHOST and NI_MAXSERV definitions.
* lib/netdb.in.h (NI_MAXHOST, NI_MAXSERV): Fix typos in comments.
Undefine and then redefine to the correct value.
Collin Funk [Thu, 27 Jun 2024 08:01:37 +0000 (01:01 -0700)]
doc: Fix error in previous commits.
* doc/posix-headers/netdb.texi (netdb.h): Move @end itemize to the end
of the list.
Collin Funk [Thu, 27 Jun 2024 07:56:04 +0000 (00:56 -0700)]
netdb tests: Check for NI_MAXHOST and NI_MAXSERV.
* modules/netdb-tests (Depends-on): Add assert-h.
* tests/test-netdb.c: Check that NI_MAXHOST and NI_MAXSERV are defined
correctly.
Collin Funk [Thu, 27 Jun 2024 07:50:16 +0000 (00:50 -0700)]
netdb: Define NI_MAXHOST and NI_MAXSERV.
* doc/posix-headers/netdb.texi (netdb.h): Document definitions that
differ from RFC 2553.
* lib/netdb.in.h (NI_MAXHOST, NI_MAXSERV): Define NI_MAXHOST and
NI_MAXSERV.
Paul Eggert [Wed, 26 Jun 2024 16:16:06 +0000 (17:16 +0100)]
strnlen: document Android bug
* doc/posix-functions/strnlen.texi (strnlen):
Mention Android 5.0 bug reported by Po Lu in this thread:
https://lists.gnu.org/r/bug-gnulib/2024-06/msg00271.html
Collin Funk [Wed, 26 Jun 2024 04:39:50 +0000 (21:39 -0700)]
idpriv-droptemp: Handle large user and group ids.
* lib/idpriv-droptemp.c (saved_uid): Use uid_t instead of int.
(saved_gid): Use gid_t instead of int.
(idpriv_temp_drop): Use uid_t and gid_t instead of int.
(idpriv_temp_restore): Likewise.
Collin Funk [Wed, 26 Jun 2024 04:34:51 +0000 (21:34 -0700)]
idpriv-drop: Handle large user and group ids.
* lib/idpriv-drop.c (idpriv_drop): Use uid_t and gid_t instead of int.
Bruno Haible [Tue, 25 Jun 2024 23:05:05 +0000 (01:05 +0200)]
c-vazsprintf-gnu: Add tests.
* tests/test-vazsprintf-gnu.h: New file, extracted from
tests/test-vazsprintf-gnu.c.
* tests/test-vazsprintf-gnu.c: Include test-vazsprintf-gnu.h.
(test_function): Moved out to tests/test-vazsprintf-gnu.h.
* modules/vazsprintf-gnu-tests (Files): Add tests/test-vazsprintf-gnu.h.
* tests/test-c-vazsprintf-gnu.c: New file.
* tests/test-c-vazsprintf-gnu.sh: New file, based on
tests/test-c-snprintf.sh.
* modules/c-vazsprintf-gnu-tests: New file.
Bruno Haible [Tue, 25 Jun 2024 23:04:58 +0000 (01:04 +0200)]
c-vazsprintf-gnu: New module.
* modules/c-vazsprintf-gnu: New file.
Bruno Haible [Tue, 25 Jun 2024 23:04:43 +0000 (01:04 +0200)]
c-zsnprintf-gnu: Add tests.
* tests/test-c-zsnprintf-gnu.c: New file.
* tests/test-c-zsnprintf-gnu.sh: New file, based on
tests/test-c-snprintf.sh.
* modules/c-zsnprintf-gnu-tests: New file.
Bruno Haible [Tue, 25 Jun 2024 23:04:26 +0000 (01:04 +0200)]
c-zsnprintf-gnu: New module.
* modules/c-zsnprintf-gnu: New file.
Bruno Haible [Tue, 25 Jun 2024 23:04:02 +0000 (01:04 +0200)]
c-vzsnprintf-gnu: Add tests.
* tests/test-c-vzsnprintf-gnu.c: New file, based on
tests/test-vzsnprintf-gnu.c.
* tests/test-c-vzsnprintf-gnu.sh: New file, based on
tests/test-c-snprintf.sh.
* modules/c-vzsnprintf-gnu-tests: New file.
Bruno Haible [Tue, 25 Jun 2024 23:03:35 +0000 (01:03 +0200)]
c-vzsnprintf-gnu: New module.
* modules/c-vzsnprintf-gnu: New file.
Bruno Haible [Tue, 25 Jun 2024 17:27:42 +0000 (19:27 +0200)]
c-vasnprintf: Add tests.
* tests/test-c-vasnprintf.c: New file, based on tests/test-c-snprintf.c.
* tests/test-c-vasnprintf.sh: New file, based on
tests/test-c-snprintf.sh.
* modules/c-vasnprintf-tests: New file.