]> Savannah Git Hosting - gnulib.git/log
gnulib.git
10 months agovdzprintf-posix: New module.
Bruno Haible [Sun, 30 Jun 2024 15:20:02 +0000 (17:20 +0200)]
vdzprintf-posix: New module.

* modules/vdzprintf-posix: New file.

10 months agodprintf: Use vdzprintf.
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.

10 months agodzprintf: New module.
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.

10 months agovdprintf: Use vdzprintf.
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.

10 months agovdzprintf: New module.
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.

10 months ago*printf-tests: Correct test file descriptions.
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.

10 months ago*printf-posix-tests: Strengthen tests.
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.

10 months ago*printf-{posix,gnu}: Tweak module descriptions.
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.

10 months agostrnlen: avoid undefined memcmp behavior
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.

10 months agotests: Avoid warning "is_running_under_virtualbox defined but not used".
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.

10 months agobootstrap-funclib.sh: Restore readability.
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.

10 months agoGlobal rename *zs[n]printf -> *s[n]zprintf.
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.

10 months agobootstrap-funclib.sh: shrink or split too-long lines
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.

10 months agotests: Avoid test failures due to VirtualBox specific bug.
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.

10 months agodoc: Mention the byteswap module in function documentation.
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.

10 months agodoc: Mention pthread_cond_timedwait bug caused by hypervisor.
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.

10 months agocond tests: Avoid theoretically possible failure.
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.

10 months agocond tests: Improve multithread-safety.
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.

10 months agocond tests: Improve comments.
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.

10 months agotime: Fix test failure on FreeBSD.
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.

10 months agodoc: Improve documentation of previous POSIX functions.
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.

10 months agoFix ChangeLog typo
Paul Eggert [Thu, 27 Jun 2024 22:39:35 +0000 (23:39 +0100)]
Fix ChangeLog typo

10 months agonstrftime: always include locale.h
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.

10 months agonetdb: Simplify NI_MAXHOST and NI_MAXSERV definitions.
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.

10 months agodoc: Fix error in previous commits.
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.

10 months agonetdb tests: Check for NI_MAXHOST and NI_MAXSERV.
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.

10 months agonetdb: Define NI_MAXHOST and NI_MAXSERV.
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.

10 months agostrnlen: document Android bug
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

10 months agoidpriv-droptemp: Handle large user and group ids.
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.

10 months agoidpriv-drop: Handle large user and group ids.
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.

10 months agoc-vazsprintf-gnu: Add tests.
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.

10 months agoc-vazsprintf-gnu: New module.
Bruno Haible [Tue, 25 Jun 2024 23:04:58 +0000 (01:04 +0200)]
c-vazsprintf-gnu: New module.

* modules/c-vazsprintf-gnu: New file.

10 months agoc-zsnprintf-gnu: Add tests.
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.

10 months agoc-zsnprintf-gnu: New module.
Bruno Haible [Tue, 25 Jun 2024 23:04:26 +0000 (01:04 +0200)]
c-zsnprintf-gnu: New module.

* modules/c-zsnprintf-gnu: New file.

10 months agoc-vzsnprintf-gnu: Add tests.
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.

10 months agoc-vzsnprintf-gnu: New module.
Bruno Haible [Tue, 25 Jun 2024 23:03:35 +0000 (01:03 +0200)]
c-vzsnprintf-gnu: New module.

* modules/c-vzsnprintf-gnu: New file.

10 months agoc-vasnprintf: Add tests.
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.

10 months agoc-vasnprintf: Fix link errors.
Bruno Haible [Tue, 25 Jun 2024 17:35:20 +0000 (19:35 +0200)]
c-vasnprintf: Fix link errors.

* modules/c-vasnprintf (configure.ac): Ensure printf-args.c and
printf-parse.c get compiled. Invoke gl_PREREQ_PRINTF_ARGS,
gl_PREREQ_PRINTF_PARSE.

10 months agoobstack-zprintf-gnu: Add tests.
Bruno Haible [Tue, 25 Jun 2024 14:43:20 +0000 (16:43 +0200)]
obstack-zprintf-gnu: Add tests.

* tests/test-obstack-zprintf-gnu.c: New file, based on
tests/test-vazsprintf-gnu.c.
* modules/obstack-zprintf-gnu-tests: New file.

10 months agoobstack-zprintf-gnu: New module.
Bruno Haible [Tue, 25 Jun 2024 14:42:56 +0000 (16:42 +0200)]
obstack-zprintf-gnu: New module.

* modules/obstack-zprintf-gnu: New file.

10 months agovazsprintf-gnu: Add tests.
Bruno Haible [Tue, 25 Jun 2024 14:42:30 +0000 (16:42 +0200)]
vazsprintf-gnu: Add tests.

* tests/test-vazsprintf-gnu.c: New file, based on
tests/test-zsnprintf-gnu.h.
* modules/vazsprintf-gnu-tests: New file.

10 months agovazsprintf-gnu: New module.
Bruno Haible [Tue, 25 Jun 2024 14:42:04 +0000 (16:42 +0200)]
vazsprintf-gnu: New module.

* modules/vazsprintf-gnu: New file.

10 months agozsprintf-gnu: Add tests.
Bruno Haible [Tue, 25 Jun 2024 14:41:31 +0000 (16:41 +0200)]
zsprintf-gnu: Add tests.

* tests/test-zsprintf-gnu.c: New file.
* modules/zsprintf-gnu-tests: New file.

10 months agozsprintf-gnu: New module.
Bruno Haible [Tue, 25 Jun 2024 14:41:03 +0000 (16:41 +0200)]
zsprintf-gnu: New module.

* modules/zsprintf-gnu: New file.

10 months agovzsprintf-gnu: Add tests.
Bruno Haible [Tue, 25 Jun 2024 14:40:28 +0000 (16:40 +0200)]
vzsprintf-gnu: Add tests.

* tests/test-vzsprintf-gnu.c: New file.
* tests/test-zsprintf-gnu.h: New file, based on
tests/test-zsnprintf-gnu.h.
* modules/vzsprintf-gnu-tests: New file.

10 months agovzsprintf-gnu: New module.
Bruno Haible [Tue, 25 Jun 2024 14:39:59 +0000 (16:39 +0200)]
vzsprintf-gnu: New module.

* modules/vzsprintf-gnu: New file.

10 months agozsnprintf-gnu: Add tests.
Bruno Haible [Tue, 25 Jun 2024 14:39:20 +0000 (16:39 +0200)]
zsnprintf-gnu: Add tests.

* tests/test-zsnprintf-gnu.c: New file.
* modules/zsnprintf-gnu-tests: New file.

10 months agozsnprintf-gnu: New module.
Bruno Haible [Tue, 25 Jun 2024 14:38:52 +0000 (16:38 +0200)]
zsnprintf-gnu: New module.

* modules/zsnprintf-gnu: New file.

10 months agovzsnprintf-gnu: Add tests.
Bruno Haible [Tue, 25 Jun 2024 14:38:11 +0000 (16:38 +0200)]
vzsnprintf-gnu: Add tests.

* tests/test-vzsnprintf-gnu.c: New file.
* tests/test-zsnprintf-gnu.h: New file, based on
tests/test-snprintf-gnu.h.
* modules/vzsnprintf-gnu-tests: New file.

10 months agovzsnprintf-gnu: New module.
Bruno Haible [Tue, 25 Jun 2024 14:36:18 +0000 (16:36 +0200)]
vzsnprintf-gnu: New module.

* modules/vzsnprintf-gnu: New file.

10 months agoobstack-zprintf-posix: Add tests.
Bruno Haible [Mon, 24 Jun 2024 23:10:34 +0000 (01:10 +0200)]
obstack-zprintf-posix: Add tests.

* tests/test-obstack-zprintf-posix.c: New file, based on
tests/test-vazsprintf-posix.c.
* modules/obstack-zprintf-posix-tests: New file.

10 months agoobstack-zprintf-posix: New module.
Bruno Haible [Mon, 24 Jun 2024 23:10:30 +0000 (01:10 +0200)]
obstack-zprintf-posix: New module.

* modules/obstack-zprintf-posix: New file.

10 months agovazsprintf-posix: Add tests.
Bruno Haible [Mon, 24 Jun 2024 23:10:08 +0000 (01:10 +0200)]
vazsprintf-posix: Add tests.

* tests/test-vazsprintf-posix.c: New file, based on
tests/test-zsnprintf-posix.h.
* modules/vazsprintf-posix-tests: New file.

10 months agovazsprintf-posix: New module.
Bruno Haible [Mon, 24 Jun 2024 23:10:03 +0000 (01:10 +0200)]
vazsprintf-posix: New module.

* modules/vazsprintf-posix: New file.

10 months agozsprintf-posix: Add tests.
Bruno Haible [Mon, 24 Jun 2024 23:09:59 +0000 (01:09 +0200)]
zsprintf-posix: Add tests.

* tests/test-zsprintf-posix.c: New file.
* modules/zsprintf-posix-tests: New file.

10 months agozsprintf-posix: New module.
Bruno Haible [Mon, 24 Jun 2024 23:09:55 +0000 (01:09 +0200)]
zsprintf-posix: New module.

* modules/zsprintf-posix: New file.

10 months agovzsprintf-posix: Add tests.
Bruno Haible [Mon, 24 Jun 2024 23:09:49 +0000 (01:09 +0200)]
vzsprintf-posix: Add tests.

* tests/test-vzsprintf-posix.c: New file.
* tests/test-zsprintf-posix.h: New file, based on
tests/test-zsnprintf-posix.h.
* modules/vzsprintf-posix-tests: New file.

10 months agovzsprintf-posix: New module.
Bruno Haible [Mon, 24 Jun 2024 23:09:45 +0000 (01:09 +0200)]
vzsprintf-posix: New module.

* modules/vzsprintf-posix: New file.

10 months agozsnprintf-posix: Add tests.
Bruno Haible [Mon, 24 Jun 2024 23:09:40 +0000 (01:09 +0200)]
zsnprintf-posix: Add tests.

* tests/test-zsnprintf-posix.c: New file.
* modules/zsnprintf-posix-tests: New file.

10 months agozsnprintf-posix: New module.
Bruno Haible [Mon, 24 Jun 2024 23:09:34 +0000 (01:09 +0200)]
zsnprintf-posix: New module.

* modules/zsnprintf-posix: New file.

10 months agovzsnprintf-posix: Add tests.
Bruno Haible [Mon, 24 Jun 2024 23:09:28 +0000 (01:09 +0200)]
vzsnprintf-posix: Add tests.

* tests/test-vzsnprintf-posix.c: New file.
* tests/test-zsnprintf-posix.h: New file, based on
tests/test-snprintf-posix.h.
* modules/vzsnprintf-posix-tests: New file.

10 months agovzsnprintf-posix: New module.
Bruno Haible [Mon, 24 Jun 2024 23:09:21 +0000 (01:09 +0200)]
vzsnprintf-posix: New module.

* modules/vzsnprintf-posix: New file.

10 months agoEase maintainability of *printf-gnu modules.
Bruno Haible [Mon, 24 Jun 2024 23:04:22 +0000 (01:04 +0200)]
Ease maintainability of *printf-gnu modules.

* modules/mixin/printf-gnu: New file.
* modules/dprintf-gnu (Depends-on): Add it.
* modules/fprintf-gnu (Depends-on): Likewise.
* modules/obstack-printf-gnu (Depends-on): Likewise.
* modules/printf-gnu (Depends-on): Likewise.
* modules/snprintf-gnu (Depends-on): Likewise.
* modules/sprintf-gnu (Depends-on): Likewise.
* modules/vasnprintf-gnu (Depends-on): Likewise.
* modules/vasnwprintf-gnu (Depends-on): Likewise.
* modules/vasprintf-gnu (Depends-on): Likewise.
* modules/vdprintf-gnu (Depends-on): Likewise.
* modules/vfprintf-gnu (Depends-on): Likewise.
* modules/vprintf-gnu (Depends-on): Likewise.
* modules/vsnprintf-gnu (Depends-on): Likewise.
* modules/vsprintf-gnu (Depends-on): Likewise.

10 months agoReduce duplication among *printf-posix modules.
Bruno Haible [Mon, 24 Jun 2024 23:04:11 +0000 (01:04 +0200)]
Reduce duplication among *printf-posix modules.

* modules/mixin/printf-posix: New file.
* modules/c-vasnprintf (Depends-on): Add it. Remove isnan*-nolibm,
frexp*-nolibm, printf-frexp*, signbit, fpucw.
* modules/dprintf-posix (Depends-on): Likewise.
* modules/fprintf-posix (Depends-on): Likewise.
* modules/snprintf-posix (Depends-on): Likewise.
* modules/sprintf-posix (Depends-on): Likewise.
* modules/unistdio/u16-u16-vasnprintf (Depends-on): Likewise.
* modules/unistdio/u16-vasnprintf (Depends-on): Likewise.
* modules/unistdio/u32-u32-vasnprintf (Depends-on): Likewise.
* modules/unistdio/u32-vasnprintf (Depends-on): Likewise.
* modules/unistdio/u8-u8-vasnprintf (Depends-on): Likewise.
* modules/unistdio/u8-vasnprintf (Depends-on): Likewise.
* modules/unistdio/ulc-vasnprintf (Depends-on): Likewise.
* modules/vasnprintf-posix (Depends-on): Likewise.
* modules/vasnwprintf-posix (Depends-on): Likewise.
* modules/vasprintf-posix (Depends-on): Likewise.
* modules/vdprintf-posix (Depends-on): Likewise.
* modules/vfprintf-posix (Depends-on): Likewise.
* modules/vsnprintf-posix (Depends-on): Likewise.
* modules/vsprintf-posix (Depends-on): Likewise.

10 months agoc-vasnprintf: Relicense under LGPLv2+.
Bruno Haible [Mon, 24 Jun 2024 18:11:48 +0000 (20:11 +0200)]
c-vasnprintf: Relicense under LGPLv2+.

* lib/c-vasnprintf.h: Rebase on lib/vasnprintf.h.
* lib/c-vasnprintf.c: Rebase on lib/unistdio/ulc-vasnprintf.c.
* modules/c-vasnprintf (License): Change to LGPLv2+.

10 months agodoc: Update info about *printf.
Bruno Haible [Mon, 24 Jun 2024 18:05:28 +0000 (20:05 +0200)]
doc: Update info about *printf.

* doc/*-functions/*printf.texi: Update info regarding size specifiers
w8, wf8, etc.

10 months agodoc: Update info about *printf.
Bruno Haible [Mon, 24 Jun 2024 18:04:54 +0000 (20:04 +0200)]
doc: Update info about *printf.

* doc/*-functions/*printf.texi: Update info regarding %B directive.

10 months agodoc: Update info about *printf.
Bruno Haible [Mon, 24 Jun 2024 18:04:20 +0000 (20:04 +0200)]
doc: Update info about *printf.

* doc/*-functions/*printf.texi: Update info regarding %b directive.

10 months agodoc: Update info about *printf.
Bruno Haible [Mon, 24 Jun 2024 18:03:39 +0000 (20:03 +0200)]
doc: Update info about *printf.

* doc/*-functions/*printf.texi: Update info regarding %f, %e, %g
directives.

10 months agodoc: Update info about *printf.
Bruno Haible [Mon, 24 Jun 2024 18:02:46 +0000 (20:02 +0200)]
doc: Update info about *printf.

* doc/*-functions/*printf.texi: Update info regarding %a directive.
* m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Likewise. Improve bits
assignment in return value.

10 months agodoc: Update info about obstack_*printf.
Bruno Haible [Mon, 24 Jun 2024 18:02:04 +0000 (20:02 +0200)]
doc: Update info about obstack_*printf.

* doc/glibc-functions/obstack_*printf.texi: Update info.

10 months agogit-merge-changelog: Improve last commit.
Bruno Haible [Mon, 24 Jun 2024 11:11:31 +0000 (13:11 +0200)]
git-merge-changelog: Improve last commit.

* lib/git-merge-changelog.c (conflict_write): Add comments.

10 months agogit-merge-changelog: Improve conflict markers.
Andreas Schwab [Mon, 24 Jun 2024 10:38:39 +0000 (12:38 +0200)]
git-merge-changelog: Improve conflict markers.

* lib/git-merge-changelog.c (conflict_write): Add a space after <<<<<<<
and >>>>>>>.

Copyright-paperwork-exempt: Yes

10 months agotest-framework-sh: Fix typo in function invocation (regression 2024-06-11).
Collin Funk [Mon, 24 Jun 2024 01:28:26 +0000 (18:28 -0700)]
test-framework-sh: Fix typo in function invocation (regression 2024-06-11).

* tests/init.sh (mktempd_): Invoke fail_ properly.

10 months agoobstack-zprintf: Add more tests.
Bruno Haible [Sat, 22 Jun 2024 20:02:53 +0000 (22:02 +0200)]
obstack-zprintf: Add more tests.

* tests/test-obstack-zprintf-big.c: New file, based on
tests/test-vasnprintf-big.c.
* modules/obstack-zprintf-extra-tests: New file.
* modules/obstack-zprintf-tests (Depends-on): Add it.

10 months agoobstack-zprintf: Add tests.
Bruno Haible [Sat, 22 Jun 2024 19:59:50 +0000 (21:59 +0200)]
obstack-zprintf: Add tests.

* tests/test-obstack-printf.h: New file, based on
tests/test-obstack-printf.c.
* tests/test-obstack-printf.c: Include test-obstack-printf.h.
(obstack_chunk_alloc, obstack_chunk_free, test_function): Moved to
tests/test-obstack-printf.h.
(test_obstack_vprintf, test_obstack_printf): Remove functions.
(main): Inline them here.
* tests/test-obstack-zprintf.c: New file, based on
tests/test-obstack-printf.c.
* modules/obstack-printf-tests (Files): Add tests/test-obstack-printf.h.
* modules/obstack-zprintf-tests: New file.

10 months agoobstack-zprintf: New module.
Bruno Haible [Sat, 22 Jun 2024 19:31:46 +0000 (21:31 +0200)]
obstack-zprintf: New module.

* lib/stdio.in.h (obstack_zprintf, obstack_vzprintf): New declarations.
(obstack_printf, obstack_vprintf): Tweak comment.
* lib/obstack_printf.c: Parameterize.
(RESULT_TYPE, OBSTACK_PRINTF, OBSTACK_VPRINTF): New macros.
* lib/obstack_zprintf.c: New file.
* m4/stdio_h.m4 (gl_STDIO_H_REQUIRE_DEFAULTS): Initialize
GNULIB_OBSTACK_ZPRINTF.
* modules/stdio (Makefile.am): Substitute GNULIB_OBSTACK_ZPRINTF.
* modules/obstack-zprintf: New file.

10 months agophysmem: Fix typo.
Bruno Haible [Sat, 22 Jun 2024 11:05:11 +0000 (13:05 +0200)]
physmem: Fix typo.

* lib/physmem.h (physmem_claimable): Fix typo in comment.

10 months agoc-xvasprintf: Guarantee a non-NULL result.
Bruno Haible [Sat, 22 Jun 2024 10:22:12 +0000 (12:22 +0200)]
c-xvasprintf: Guarantee a non-NULL result.

* lib/c-xvasprintf.h: Clarify the programmer's responsibilities.
(c_xasprintf, c_xvasprintf): Declare as returning non-NULL.
* lib/c-xvasprintf.c: Include <stdlib.h>, <string.h>.
(c_xvasprintf): Call c_vazsprintf instead of c_vasprintf. When some
other error occurs, emit an error message and abort.
* modules/c-xvasprintf (Files): Add m4/strerrorname_np.m4.
(Depends-on): Add extensions, c-vazsprintf. Remove c-vasprintf.
(configure.ac): Invoke gl_OPTIONAL_STRERRORNAME_NP.
* NEWS: Mention the change.

10 months agoc-vasprintf: Make return convention consistent with other modules.
Bruno Haible [Sat, 22 Jun 2024 10:21:51 +0000 (12:21 +0200)]
c-vasprintf: Make return convention consistent with other modules.

* lib/c-vasprintf.h (c_asprintf, c_vasprintf): Add specification.
* lib/c-asprintf.c: Replaced with code based on lib/asprintf.c.
* lib/c-vasprintf.c: Replaced with code based on lib/vasprintf.c.
* modules/c-vasprintf (Depends-on): Add stdint.
(License): Change to LGPLv2+.

10 months agoc-vazsprintf: New module.
Bruno Haible [Sat, 22 Jun 2024 10:21:46 +0000 (12:21 +0200)]
c-vazsprintf: New module.

* lib/c-vasprintf.h: Change license to LGPLv2+.
Include <stddef.h>.
(c_azsprintf, c_vazsprintf): New declarations.
* lib/c-azsprintf.c: New file, based on lib/azsprintf.c.
* lib/c-vazsprintf.c: New file, based on lib/vazsprintf.c.
* modules/c-vazsprintf: New file.

10 months agoc-snprintf: Use c-vzsnprintf.
Bruno Haible [Sat, 22 Jun 2024 10:21:35 +0000 (12:21 +0200)]
c-snprintf: Use c-vzsnprintf.

* lib/c-snprintf.h (c_snprintf): Move specification to here.
* lib/c-snprintf.c: Change license to LGPLv2+.
Don't include <stdlib.h>, <string.h>, c-vasnprintf.h. Include
<stdint.h>, c-vsnprintf.h.
(c_snprintf): Implement based on c_vzsnprintf.
* modules/c-snprintf (Depends-on): Add stdint, c-vzsnprintf. Remove
c-vasnprintf.

10 months agoc-zsnprintf: New module.
Bruno Haible [Sat, 22 Jun 2024 10:21:29 +0000 (12:21 +0200)]
c-zsnprintf: New module.

* lib/c-snprintf.h: Change license to LGPLv2+.
(c_zsnprintf): New declaration.
* lib/c-zsnprintf.c: New file, based on lib/zsnprintf.c.
* modules/c-zsnprintf: New file.

10 months agoc-vsnprintf: Use c-vzsnprintf.
Bruno Haible [Sat, 22 Jun 2024 10:21:20 +0000 (12:21 +0200)]
c-vsnprintf: Use c-vzsnprintf.

* lib/c-vsnprintf.h (c_vsnprintf): Move specification to here.
* lib/c-vsnprintf.c: Change license to LGPLv2+.
Don't include <stdlib.h>, <string.h>, c-vasnprintf.h. Include
<stdint.h>.
(c_vsnprintf): Implement based on c_vzsnprintf.
* modules/c-vsnprintf (Depends-on): Add stdint, c-vzsnprintf. Remove
c-vasnprintf.
(License): Change to LGPLv2+.

10 months agoc-vzsnprintf: New module.
Bruno Haible [Sat, 22 Jun 2024 10:21:11 +0000 (12:21 +0200)]
c-vzsnprintf: New module.

* lib/c-vsnprintf.h: Change license to LGPLv2+.
(c_vzsnprintf): New declaration.
* lib/c-vzsnprintf.c: New file, based on lib/vzsnprintf.c.
* modules/c-vzsnprintf: New file.

10 months agoxvasprintf: Guarantee a non-NULL result.
Bruno Haible [Sat, 22 Jun 2024 10:17:51 +0000 (12:17 +0200)]
xvasprintf: Guarantee a non-NULL result.

* lib/xvasprintf.h: Clarify the programmer's responsibilities.
(xasprintf, xvasprintf): Declare as returning non-NULL.
* lib/xvasprintf.c: Include <stdlib.h>.
(xstrcat): Allow results longer than INT_MAX characters. Upon size
overflow, invoke xalloc_die.
(xvasprintf): Call vazsprintf instead of vasprintf. When some other
error occurs, emit an error message and abort.
* m4/strerrorname_np.m4 (gl_CHECK_STRERRORNAME_NP): New macro, extracted
from gl_FUNC_STRERRORNAME_NP.
(gl_FUNC_STRERRORNAME_NP): Invoke it.
(gl_OPTIONAL_STRERRORNAME_NP): New macro.
* m4/xvasprintf.m4 (gl_XVASPRINTF): Invoke gl_OPTIONAL_STRERRORNAME_NP.
* modules/xvasprintf (Files): Add m4/strerrorname_np.m4.
(Depends-on): Add extensions, vazsprintf. Remove vasprintf.
* NEWS: Mention the change.

10 months agovasprintf: Make return convention consistent with other modules.
Bruno Haible [Sat, 22 Jun 2024 10:17:10 +0000 (12:17 +0200)]
vasprintf: Make return convention consistent with other modules.

* lib/vasprintf.c: Include <stdint.h>.
(vasprintf): If the length is > PTRDIFF_MAX, fail with ENOMEM, not
EOVERFLOW.
* modules/vasprintf (Depends-on): Add stdint.

10 months agovazsprintf: New module.
Bruno Haible [Sat, 22 Jun 2024 10:17:02 +0000 (12:17 +0200)]
vazsprintf: New module.

* lib/stdio.in.h (azsprintf, vazsprintf): New declarations.
* lib/vazsprintf.c: New file, based on lib/vasprintf.c.
* lib/azsprintf.c: New file, based on lib/asprintf.c.
* m4/stdio_h.m4 (gl_STDIO_H_REQUIRE_DEFAULTS): Initialize
GNULIB_VAZSPRINTF.
* modules/stdio (Makefile.am): Substitute GNULIB_VAZSPRINTF.
* modules/vazsprintf: New file.

10 months agosprintf-posix: Use vzsprintf.
Bruno Haible [Sat, 22 Jun 2024 10:16:30 +0000 (12:16 +0200)]
sprintf-posix: Use vzsprintf.

* lib/stdio.in.h (sprintf): Move specification to here.
* lib/sprintf.c: Don't include <stdlib.h>, vasnprintf.h. Include
<stdint.h>.
(sprintf): Implement based on vzsprintf.
* modules/sprintf-posix (Depends-on): Add vzsprintf. Remove vasnprintf.

10 months agozsprintf: New module.
Bruno Haible [Sat, 22 Jun 2024 10:16:24 +0000 (12:16 +0200)]
zsprintf: New module.

* lib/stdio.in.h (zsprintf): New declaration, based on
lib/sprintf.c.
* lib/zsprintf.c: New file, based on lib/sprintf.c.
* m4/stdio_h.m4 (gl_STDIO_H_REQUIRE_DEFAULTS): Initialize
GNULIB_ZSPRINTF.
* modules/stdio (Makefile.am): Substitute GNULIB_ZSPRINTF.
* modules/zsprintf: New file.

10 months agovsprintf-posix: Use vzsprintf.
Bruno Haible [Sat, 22 Jun 2024 10:16:06 +0000 (12:16 +0200)]
vsprintf-posix: Use vzsprintf.

* lib/stdio.in.h (vsprintf): Move specification to here.
* lib/vsprintf.c: Don't include <stdlib.h>, vasnprintf.h.
(SIZE_MAX): Remove macro.
(vsprintf): Implement based on vzsprintf.
* modules/vsprintf-posix (Depends-on): Add vzsprintf. Remove vasnprintf.

10 months agovzsprintf: New module.
Bruno Haible [Sat, 22 Jun 2024 10:16:00 +0000 (12:16 +0200)]
vzsprintf: New module.

* lib/stdio.in.h (vzsprintf): New declaration, based on
lib/vsprintf.c.
* lib/vzsprintf.c: New file, based on lib/vsprintf.c.
* m4/stdio_h.m4 (gl_STDIO_H_REQUIRE_DEFAULTS): Initialize
GNULIB_VZSPRINTF.
* modules/stdio (Makefile.am): Substitute GNULIB_VZSPRINTF.
* modules/vzsprintf: New file.

10 months agosnprintf: Use vzsnprintf.
Bruno Haible [Sat, 22 Jun 2024 10:15:38 +0000 (12:15 +0200)]
snprintf: Use vzsnprintf.

* lib/stdio.in.h (snprintf): Move specification to here.
* lib/snprintf.c: Don't include <stdlib.h>, <string.h>, vasnprintf.h.
Include <stdint.h>.
(snprintf): Implement based on vzsnprintf.
* modules/snprintf (Depends-on): Add stdint, vzsnprintf. Remove
vasnprintf.

10 months agozsnprintf: New module.
Bruno Haible [Sat, 22 Jun 2024 10:15:32 +0000 (12:15 +0200)]
zsnprintf: New module.

* lib/stdio.in.h (zsnprintf): New declaration, based on
lib/snprintf.c.
* lib/zsnprintf.c: New file, based on lib/snprintf.c.
* m4/stdio_h.m4 (gl_STDIO_H_REQUIRE_DEFAULTS): Initialize
GNULIB_ZSNPRINTF.
* modules/stdio (Makefile.am): Substitute GNULIB_ZSNPRINTF.
* modules/zsnprintf: New file.

10 months agovsnprintf: Use vzsnprintf.
Bruno Haible [Sat, 22 Jun 2024 10:14:52 +0000 (12:14 +0200)]
vsnprintf: Use vzsnprintf.

* lib/stdio.in.h (vsnprintf): Move specification to here.
* lib/vsnprintf.c: Don't include <stdlib.h>, <string.h>, vasnprintf.h.
Include <stdint.h>.
(vsnprintf): Implement based on vzsnprintf.
* modules/vsnprintf (Depends-on): Add stdint, vzsnprintf. Remove
vasnprintf.

10 months agovzsnprintf: New module.
Bruno Haible [Sat, 22 Jun 2024 10:14:41 +0000 (12:14 +0200)]
vzsnprintf: New module.

* lib/stdio.in.h (vzsnprintf): New declaration, based on
lib/vsnprintf.c.
* lib/vzsnprintf.c: New file, based on lib/vsnprintf.c.
* m4/stdio_h.m4 (gl_STDIO_H_REQUIRE_DEFAULTS): Initialize
GNULIB_VZSNPRINTF.
* modules/stdio (Makefile.am): Substitute GNULIB_VZSNPRINTF.
* modules/vzsnprintf: New file.

10 months agotest-framework-sh: Fix side effect on dfa tests (regression 2024-06-11).
Bruno Haible [Thu, 20 Jun 2024 19:56:15 +0000 (21:56 +0200)]
test-framework-sh: Fix side effect on dfa tests (regression 2024-06-11).

* tests/init.sh (returns_): Silence the 'local is_tracing' assignment
for real.

10 months agotest-framework-sh: Fix side effect on dfa tests (regression 2024-06-11).
Bruno Haible [Thu, 20 Jun 2024 14:36:28 +0000 (16:36 +0200)]
test-framework-sh: Fix side effect on dfa tests (regression 2024-06-11).

* tests/init.sh (returns_): Silence the 'local is_tracing' assignment.

10 months agoautoupdate
Karl Berry [Thu, 20 Jun 2024 14:22:00 +0000 (07:22 -0700)]
autoupdate

10 months agovasnwprintf tests: Add test of huge %ls arguments.
Bruno Haible [Thu, 20 Jun 2024 06:13:25 +0000 (08:13 +0200)]
vasnwprintf tests: Add test of huge %ls arguments.

* tests/test-vasnwprintf-big.c (main): Add tests for wide string
arguments with > 2^31 wide characters.