Re: tests/init.sh

2024-06-24 Thread Bruno Haible
Hi Collin,

> $ gnulib-tool --tests-base testsuite --copy-file tests/init.sh

Ah, that's what you meant. Indeed, that should work.

> Though this would work too and is probably more clear:
> 
> $ gnulib-tool --copy-file tests/init.sh testsuite/init.sh

Yes, this is clearer, because the `gnulib-tool --help` output already
mentions this syntax.

Bruno






[PATCH] git-merge-changelog: fix conflict markers

2024-06-24 Thread Andreas Schwab
* lib/git-merge-changelog.c (conflict_write): Add missing space
after marker.
---
 lib/git-merge-changelog.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/git-merge-changelog.c b/lib/git-merge-changelog.c
index c701d29942..b30045e2aa 100644
--- a/lib/git-merge-changelog.c
+++ b/lib/git-merge-changelog.c
@@ -964,13 +964,13 @@ conflict_write (FILE *fp, struct conflict *c)
   /* Use the same syntax as git's default merge driver.
  Don't indent the contents of the entries (with things like ">" or "-"),
  otherwise the user needs more textual editing to resolve the conflict.  */
-  fputs ("<<<\n", fp);
+  fputs ("<<< \n", fp);
   for (i = 0; i < c->num_old_entries; i++)
 entry_write (fp, c->old_entries[i]);
   fputs ("===\n", fp);
   for (i = 0; i < c->num_modified_entries; i++)
 entry_write (fp, c->modified_entries[i]);
-  fputs (">>>\n", fp);
+  fputs (">>> \n", fp);
 }
 
 /* Long options.  */
-- 
2.45.2


-- 
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."



Re: [PATCH] git-merge-changelog: fix conflict markers

2024-06-24 Thread Bruno Haible
Hi Andreas,

Your chances would be higher for a patch to be applied if you gave a
rationale / justification, and if the patch contained comments.

I did my own research and found a rationale — possibly different from
yours. So I added your patch, and this followup. Also, I changed the
words "fix" and "missing" from your ChangeLog entry, since I am not
aware of a formal standard that specifies how a conflict marker should
look like. Again, if you have different knowledge, please share it.


2024-06-24  Bruno Haible  

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

diff --git a/lib/git-merge-changelog.c b/lib/git-merge-changelog.c
index b30045e2aa..3cffe1fd2f 100644
--- a/lib/git-merge-changelog.c
+++ b/lib/git-merge-changelog.c
@@ -962,6 +962,9 @@ conflict_write (FILE *fp, struct conflict *c)
   idx_t i;
 
   /* Use the same syntax as git's default merge driver.
+ The spaces after <<< and >>> are for compatibility with
+ git/rerere.c, function 'is_cmarker'.  Usually they would be followed by
+ branch or version names, but this info is not available to us here.
  Don't indent the contents of the entries (with things like ">" or "-"),
  otherwise the user needs more textual editing to resolve the conflict.  */
   fputs ("<<< \n", fp);






doc: Update info about *printf

2024-06-24 Thread Bruno Haible
A couple of patches that improve the information about the *printf functions'
workarounds.


2024-06-24  Bruno Haible  

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

2024-06-24  Bruno Haible  

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

2024-06-24  Bruno Haible  

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

2024-06-24  Bruno Haible  

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

2024-06-24  Bruno Haible  

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.

2024-06-24  Bruno Haible  

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

>From 56fd8b5514a8ed776bf9ff63aced37dd4e248adf Mon Sep 17 00:00:00 2001
From: Bruno Haible 
Date: Mon, 24 Jun 2024 20:02:04 +0200
Subject: [PATCH 1/6] doc: Update info about obstack_*printf.

* doc/glibc-functions/obstack_*printf.texi: Update info.
---
 ChangeLog| 5 +
 doc/glibc-functions/obstack_printf.texi  | 2 +-
 doc/glibc-functions/obstack_vprintf.texi | 2 +-
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 9a702d4af3..631a15c7dc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2024-06-24  Bruno Haible  
+
+	doc: Update info about obstack_*printf.
+	* doc/glibc-functions/obstack_*printf.texi: Update info.
+
 2024-06-24  Bruno Haible  
 
 	git-merge-changelog: Improve last commit.
diff --git a/doc/glibc-functions/obstack_printf.texi b/doc/glibc-functions/obstack_printf.texi
index 961ac039c5..01d0508064 100644
--- a/doc/glibc-functions/obstack_printf.texi
+++ b/doc/glibc-functions/obstack_printf.texi
@@ -17,7 +17,7 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-macOS 14, FreeBSD 14.0, NetBSD 10.0, OpenBSD 6.7, Minix 3.1.8, AIX 5.1, HP-UX 11, Solaris 11.4, Cygwin 2.9, mingw, MSVC 14, Android 9.0.
+musl libc, macOS 14, FreeBSD 14.0, NetBSD 10.0, OpenBSD 7.5, Minix 3.1.8, AIX 7.3, HP-UX 11, Solaris 11.4, Cygwin 3.5.3, mingw, MSVC 14, Android 9.0.
 @end itemize
 
 Portability problems fixed by either Gnulib module @code{obstack-printf-posix} or @code{obstack-printf-gnu}:
diff --git a/doc/glibc-functions/obstack_vprintf.texi b/doc/glibc-functions/obstack_vprintf.texi
index 9ac84a943c..4ef55504e9 100644
--- a/doc/glibc-functions/obstack_vprintf.texi
+++ b/doc/glibc-functions/obstack_vprintf.texi
@@ -17,7 +17,7 @@
 @itemize
 @item
 This function is missing on all non-glibc platforms:
-macOS 14, FreeBSD 14.0, NetBSD 10.0, OpenBSD 6.7, Minix 3.1.8, AIX 5.1, HP-UX 11, Solaris 11.4, Cygwin 2.9, mingw, MSVC 14, Android 9.0.
+musl libc, macOS 14, FreeBSD 14.0, NetBSD 10.0, OpenBSD 7.5, Minix 3.1.8, AIX 7.3, HP-UX 11, Solaris 11.4, Cygwin 3.5.3, mingw, MSVC 14, Android 9.0.
 @end itemize
 
 Portability problems fixed by either Gnulib module @code{obstack-printf-posix} or @code{obstack-printf-gnu}:
-- 
2.34.1

>From 6dcd0911bff6a4695149ac9c733f46758504fb7c Mon Sep 17 00:00:00 2001
From: Bruno Haible 
Date: Mon, 24 Jun 2024 20:02:46 +0200
Subject: [PATCH 2/6] 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.
---
 ChangeLog|  7 +++
 doc/glibc-functions/asprintf.texi|  4 ++--
 doc/glibc-functions/obstack_printf.texi  |  4 ++--
 doc/glibc-functions/obstack_vprintf.texi |  4 ++--
 doc/glibc-functions/vasprintf.texi   |  4 ++--
 doc/posix-functions/dprintf.texi |  6 +-
 doc/posix-functions/fprintf.texi |  4 ++--
 doc/posix-functions/printf.texi  |  4 ++--
 doc/posix-functions/snprintf.texi|  4 ++--
 doc/posix-functions/sprintf.texi |  4 ++--
 doc/posix-functions/vdprintf.texi|  6 +-
 doc/posix-functions/vfprintf.texi|  4 ++--
 doc/posix-functions/vprintf.texi |  4 ++--
 doc/posix-functions/vsnprintf.texi   |  4 ++--
 doc/posix-functions/vsprintf.texi|  4 ++--
 m4/printf.m4 | 20 
 16 files changed, 53 insertions(+), 34 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 631a15c7dc..04adbdc9a3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2024-06-24  Bruno Haible  
+
+	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.
+
 2024-06-24  Bruno Haible  
 
 	do

Re: *printf string functions without INT_MAX limitations in C locale

2024-06-24 Thread Bruno Haible
Oops, I forgot to move the 'c-vasnprintf' module LGPLv2+ as well.


2024-06-24  Bruno Haible  

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+.

>From 6c4c5f3de377aa12aa57952d1cca5ac8b027ccb4 Mon Sep 17 00:00:00 2001
From: Bruno Haible 
Date: Mon, 24 Jun 2024 20:11:48 +0200
Subject: [PATCH] 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+.
---
 ChangeLog|  7 +++
 lib/c-vasnprintf.c   | 18 +-
 lib/c-vasnprintf.h   | 16 
 modules/c-vasnprintf |  4 ++--
 4 files changed, 26 insertions(+), 19 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index f67a9dac76..5dfaf9023f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2024-06-24  Bruno Haible  
+
+	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+.
+
 2024-06-24  Bruno Haible  
 
 	doc: Update info about *printf.
diff --git a/lib/c-vasnprintf.c b/lib/c-vasnprintf.c
index a28079d634..16441e1890 100644
--- a/lib/c-vasnprintf.c
+++ b/lib/c-vasnprintf.c
@@ -1,17 +1,17 @@
 /* Formatted output to strings in C locale.
Copyright (C) 2009-2024 Free Software Foundation, Inc.
 
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation, either version 3 of the License, or
-   (at your option) any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License
+   You should have received a copy of the GNU Lesser General Public License
along with this program.  If not, see .  */
 
 #include 
@@ -25,14 +25,14 @@
 
 #define VASNPRINTF c_vasnprintf
 #define FCHAR_T char
-#define DCHAR_T char
 #define DIRECTIVE char_directive
 #define DIRECTIVES char_directives
 #define PRINTF_PARSE printf_parse
+#define DCHAR_T char
 #define DCHAR_CPY memcpy
 #define DCHAR_SET memset
-#define DCHAR_IS_TCHAR 1
 #define TCHAR_T char
+#define DCHAR_IS_TCHAR 1
 
 #define NEED_PRINTF_DOUBLE 1
 #define NEED_PRINTF_LONG_DOUBLE 1
diff --git a/lib/c-vasnprintf.h b/lib/c-vasnprintf.h
index eef6769e81..3908a360b3 100644
--- a/lib/c-vasnprintf.h
+++ b/lib/c-vasnprintf.h
@@ -1,18 +1,18 @@
 /* vsprintf with automatic memory allocation in C locale.
Copyright (C) 2002-2004, 2007-2024 Free Software Foundation, Inc.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation, either version 3, or (at your option)
-   any later version.
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
 
-   This program is distributed in the hope that it will be useful,
+   This file is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   GNU Lesser General Public License for more details.
 
-   You should have received a copy of the GNU General Public License along
-   with this program; if not, see .  */
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see .  */
 
 #ifndef _C_VASNPRINTF_H
 #define _C_VASNPRINTF_H
diff --git a/modules/c-vasnprintf b/modules/c-vasnprintf
index f800ab19d1..1ecf4e9cef 100644
--- a/modules/c-vasnprintf
+++ b/modules/c-vasnprintf
@@ -54,7 +54,7 @@ Include:
 "c-vasnprintf.h"
 
 License:
-GPL
+LGPLv2+
 
 Maintainer:
-Ben Pfaff
+all
-- 
2.34.1



gnulib macro to check for PIC for a dependent library?

2024-06-24 Thread dmitrii . pasechnik
Building shared libraries which depend upon
other libraries breaks whenever a dependency found (by something like
AC_SEARCH_LIBS) was not built with -fPIC (or whatever
the name of this option might be on the platform in question).
And, preferably, one might want to check that the dependency is
a dynamic library itself.

Are there any gnulib (or autoconf) macros available which can help here?
Thinking of writing such a macro myself, it seems that the way to go
would be to write test C code to build a shared library, and try
building it. But this does not look as something that chains too well with
the other tools (i.e. libtool would be the one needed).

Best,
Dima



signature.asc
Description: PGP signature


Reduce duplication among *printf-posix modules

2024-06-24 Thread Bruno Haible
For each of the *z*printf modules, I'll add a -posix and a -gnu variant.
In order to avoid code duplication between the module descriptions,
here are two patches that introduce a "mixin" module for the -posix
variant and likewise one for the -gnu variant.

These modules cannot be used on their own, and are a private detail.
The term "mixin" obviously refers to the concept of mixin classes
in various object-oriented languages.


2024-06-24  Bruno Haible  

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.

2024-06-24  Bruno Haible  

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.

>From 7b5463fadf987afbb2e0bda25d098aaa6449abfc Mon Sep 17 00:00:00 2001
From: Bruno Haible 
Subject: [PATCH 01/14] 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.
---
 ChangeLog   | 25 +
 modules/c-vasnprintf|  8 +---
 modules/dprintf-posix   | 11 ++-
 modules/fprintf-posix   | 15 ---
 modules/mixin/printf-posix  | 28 
 modules/snprintf-posix  | 11 ++-
 modules/sprintf-posix   | 15 ---
 modules/unistdio/u16-u16-vasnprintf |  8 +---
 modules/unistdio/u16-vasnprintf |  8 +---
 modules/unistdio/u32-u32-vasnprintf |  8 +---
 modules/unistdio/u32-vasnprintf |  8 +---
 modules/unistdio/u8-u8-vasnprintf   |  8 +---
 modules/unistdio/u8-vasnprintf  |  8 +---
 modules/unistdio/ulc-vasnprintf |  8 +---
 modules/vasnprintf-posix|  9 +
 modules/vasnwprintf-posix   |  9 +
 modules/vasprintf-posix | 11 ++-
 modules/vdprintf-posix  | 11 ++-
 modules/vfprintf-posix  |

new *z*printf-posix modules

2024-06-24 Thread Bruno Haible
This set of patches adds -posix variants for the *z*printf-posix modules
that we have so far, along with small unit tests.


2024-06-24  Bruno Haible  

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.

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

2024-06-24  Bruno Haible  

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

vazsprintf-posix: New module.
* modules/vazsprintf-posix: New file.

2024-06-24  Bruno Haible  

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

zsprintf-posix: New module.
* modules/zsprintf-posix: New file.

2024-06-24  Bruno Haible  

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.

vzsprintf-posix: New module.
* modules/vzsprintf-posix: New file.

2024-06-24  Bruno Haible  

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

zsnprintf-posix: New module.
* modules/zsnprintf-posix: New file.

2024-06-24  Bruno Haible  

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.

vzsnprintf-posix: New module.
* modules/vzsnprintf-posix: New file.

>From 3b5067e98d78af7c971b4b6fd178092d76aaa611 Mon Sep 17 00:00:00 2001
From: Bruno Haible 
Date: Tue, 25 Jun 2024 01:09:21 +0200
Subject: [PATCH 01/12] vzsnprintf-posix: New module.

* modules/vzsnprintf-posix: New file.
---
 ChangeLog|  5 +
 modules/vzsnprintf-posix | 22 ++
 2 files changed, 27 insertions(+)
 create mode 100644 modules/vzsnprintf-posix

diff --git a/ChangeLog b/ChangeLog
index 3162246429..6b7006d2da 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2024-06-24  Bruno Haible  
+
+	vzsnprintf-posix: New module.
+	* modules/vzsnprintf-posix: New file.
+
 2024-06-24  Bruno Haible  
 
 	Ease maintainability of *printf-gnu modules.
diff --git a/modules/vzsnprintf-posix b/modules/vzsnprintf-posix
new file mode 100644
index 00..e1d30cf54f
--- /dev/null
+++ b/modules/vzsnprintf-posix
@@ -0,0 +1,22 @@
+Description:
+vzsnprintf() function with POSIX compliant format string interpretation
+
+Files:
+
+Depends-on:
+vzsnprintf
+mixin/printf-posix
+
+configure.ac:
+gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS
+
+Makefile.am:
+
+Include:
+
+
+License:
+LGPLv2+
+
+Maintainer:
+all
-- 
2.34.1

>From ccc053ead71ef63dbcef5d13d603ab0bc762fbc6 Mon Sep 17 00:00:00 2001
From: Bruno Haible 
Date: Tue, 25 Jun 2024 01:09:28 +0200
Subject: [PATCH 02/12] 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.
---
 ChangeLog  |   6 ++
 modules/vzsnprintf-posix-tests |  14 +++
 tests/test-vzsnprintf-posix.c  |  48 +
 tests/test-zsnprintf-posix.h   | 183 +
 4 files changed, 251 insertions(+)
 create mode 100644 modules/vzsnprintf-posix-tests
 create mode 100644 tests/test-vzsnprintf-posix.c
 create mode 100644 tests/test-zsnprintf-posix.h

diff --git a/ChangeLog b/ChangeLog
index 6b7006d2da..84abf933b8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2024-06-24  Bruno Haible  
 
+	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.
+
 	vzsnprintf-posix: New module.
 	* modules/vzsnprintf-posix: New file.
 
diff --git a/modules/vzsnprintf-posix-tests b/modules/vzsnprintf-posix-tests
new file mode 100644
index 00..58df0a2436
--- /dev/null
+++ b/modules/vzsnprintf-posix-tests
@@ -0,0 +1,14 @@
+Files:
+tests/test-vzsnprintf-posix.c
+tests/test-zsnprintf-posix.h
+tests/infinity.h
+tests/macros.h
+
+Depends-on:
+nan
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-vzsnprintf-posix
+check_PROGRAMS += test-vzsnprintf-posix
diff --git a/tests/test-vzsnprintf-posix.c b/tests/test-vzsnprintf-posix.c
new file mode 100644
index 00..e44b94cafc
--- /dev/null
+++ b/tests/test-vzsnprintf-posix.c
@@ -0,0 +1,48 @@
+/* Test of POSIX compatible vzsnprintf() function.
+   Copyright (C) 2007-2024 Free Software Foundation, I