summaryrefslogtreecommitdiff
path: root/modules/vasnprintf-gnu
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2023-03-23 13:51:41 +0100
committerBruno Haible <bruno@clisp.org>2023-03-24 02:45:52 +0100
commit0645e170eadd356967b0690ba8208d85e8042edd (patch)
tree7144fdbd0ccfbb81c7558578204983b1d3c2b300 /modules/vasnprintf-gnu
parentf9a4ee73c3e7b544f640d0d04b55983d3a7b894e (diff)
downloadgnulib-0645e170eadd356967b0690ba8208d85e8042edd.tar.gz
vasnprintf-gnu: New module.
Suggested by Eric Blake in <https://lists.gnu.org/archive/html/bug-gnulib/2023-03/msg00060.html>. * lib/printf-parse.c (PRINTF_PARSE): Recognize the 'B' conversion. * lib/printf-parse.h: Update comments. * lib/wprintf-parse.h: Likewise. * lib/vasnprintf.c (MAX_ROOM_NEEDED): Treat the 'B' conversion like 'b'. (VASNPRINTF): Implement 'B' conversion if NEED_PRINTF_DIRECTIVE_UPPERCASE_B is set. Support the 'B' conversion if requested. * m4/printf.m4 (gl_PRINTF_DIRECTIVE_B): When cross-compiling, guess yes on glibc >= 2.35. (gl_PRINTF_DIRECTIVE_UPPERCASE_B): New macro. * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS): Renamed from gl_PREREQ_VASNPRINTF_WITH_EXTRAS. (gl_PREREQ_VASNPRINTF_DIRECTIVE_UPPERCASE_B, gl_PREREQ_VASNPRINTF_WITH_GNU_EXTRAS): New macros. * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_IS_POSIX): New macro, extracted from gl_FUNC_VASNPRINTF_POSIX. (gl_FUNC_VASNPRINTF_POSIX): Require it. Invoke gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS. * m4/vasnprintf-gnu.m4: New file. * modules/vasnprintf-gnu: New file. * modules/c-vasnprintf (configure.ac): Update. * modules/unistdio/u8-vasnprintf (configure.ac): Likewise. * modules/unistdio/u8-u8-vasnprintf (configure.ac): Likewise. * modules/unistdio/u16-vasnprintf (configure.ac): Likewise. * modules/unistdio/u16-u16-vasnprintf (configure.ac): Likewise. * modules/unistdio/u32-vasnprintf (configure.ac): Likewise. * modules/unistdio/u32-u32-vasnprintf (configure.ac): Likewise. * modules/unistdio/ulc-vasnprintf (configure.ac): Likewise.
Diffstat (limited to 'modules/vasnprintf-gnu')
-rw-r--r--modules/vasnprintf-gnu29
1 files changed, 29 insertions, 0 deletions
diff --git a/modules/vasnprintf-gnu b/modules/vasnprintf-gnu
new file mode 100644
index 0000000000..b5551f3011
--- /dev/null
+++ b/modules/vasnprintf-gnu
@@ -0,0 +1,29 @@
+Description:
+POSIX and GNU compatible vsprintf with automatic memory allocation and bounded
+output size.
+
+Comment:
+This module should not be used as a dependency from a test module,
+otherwise when this module occurs as a tests-related module, it will
+have side effects on the compilation of the 'vasnprintf' module, if
+that module occurs among the main modules in lib/.
+
+Files:
+m4/vasnprintf-gnu.m4
+
+Depends-on:
+vasnprintf-posix
+
+configure.ac:
+gl_FUNC_VASNPRINTF_GNU
+
+Makefile.am:
+
+Include:
+"vasnprintf.h"
+
+License:
+LGPLv2+
+
+Maintainer:
+all