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  <br...@clisp.org>

        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  <br...@clisp.org>

        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 <br...@clisp.org>
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              | 17 +++++------------
 modules/vsnprintf-posix             | 11 ++---------
 modules/vsprintf-posix              | 15 ++++-----------
 21 files changed, 90 insertions(+), 162 deletions(-)
 create mode 100644 modules/mixin/printf-posix

diff --git a/ChangeLog b/ChangeLog
index 5dfaf9023f..b2dd608715 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,28 @@
+2024-06-24  Bruno Haible  <br...@clisp.org>
+
+	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.
+
 2024-06-24  Bruno Haible  <br...@clisp.org>
 
 	c-vasnprintf: Relicense under LGPLv2+.
diff --git a/modules/c-vasnprintf b/modules/c-vasnprintf
index 1ecf4e9cef..ab48d64310 100644
--- a/modules/c-vasnprintf
+++ b/modules/c-vasnprintf
@@ -26,13 +26,7 @@ attribute
 limits-h
 stdint
 stdio
-isnand-nolibm
-isnanl-nolibm
-frexpl-nolibm
-printf-frexp
-printf-frexpl
-signbit
-fpucw
+mixin/printf-posix
 free-posix
 nocrash
 printf-safe
diff --git a/modules/dprintf-posix b/modules/dprintf-posix
index 8f92586437..5bb88bf80d 100644
--- a/modules/dprintf-posix
+++ b/modules/dprintf-posix
@@ -18,15 +18,8 @@ dprintf
 nocrash
 printf-safe
 multiarch
-vasnprintf      [test $ac_cv_func_dprintf = no || test $REPLACE_DPRINTF = 1]
-isnand-nolibm   [test $ac_cv_func_dprintf = no || test $REPLACE_DPRINTF = 1]
-isnanl-nolibm   [test $ac_cv_func_dprintf = no || test $REPLACE_DPRINTF = 1]
-frexp-nolibm    [test $ac_cv_func_dprintf = no || test $REPLACE_DPRINTF = 1]
-frexpl-nolibm   [test $ac_cv_func_dprintf = no || test $REPLACE_DPRINTF = 1]
-printf-frexp    [test $ac_cv_func_dprintf = no || test $REPLACE_DPRINTF = 1]
-printf-frexpl   [test $ac_cv_func_dprintf = no || test $REPLACE_DPRINTF = 1]
-signbit         [test $ac_cv_func_dprintf = no || test $REPLACE_DPRINTF = 1]
-fpucw           [test $ac_cv_func_dprintf = no || test $REPLACE_DPRINTF = 1]
+vasnprintf         [test $ac_cv_func_dprintf = no || test $REPLACE_DPRINTF = 1]
+mixin/printf-posix [test $ac_cv_func_dprintf = no || test $REPLACE_DPRINTF = 1]
 
 configure.ac:
 gl_FUNC_DPRINTF_POSIX
diff --git a/modules/fprintf-posix b/modules/fprintf-posix
index f2bd1a5c7d..6cda1ccef7 100644
--- a/modules/fprintf-posix
+++ b/modules/fprintf-posix
@@ -19,17 +19,10 @@ nocrash
 printf-safe
 errno
 multiarch
-fseterr         [test $REPLACE_FPRINTF = 1]
-vasnprintf      [test $REPLACE_FPRINTF = 1]
-isnand-nolibm   [test $REPLACE_FPRINTF = 1]
-isnanl-nolibm   [test $REPLACE_FPRINTF = 1]
-free-posix      [test $REPLACE_FPRINTF = 1]
-frexp-nolibm    [test $REPLACE_FPRINTF = 1]
-frexpl-nolibm   [test $REPLACE_FPRINTF = 1]
-printf-frexp    [test $REPLACE_FPRINTF = 1]
-printf-frexpl   [test $REPLACE_FPRINTF = 1]
-signbit         [test $REPLACE_FPRINTF = 1]
-fpucw           [test $REPLACE_FPRINTF = 1]
+fseterr            [test $REPLACE_FPRINTF = 1]
+vasnprintf         [test $REPLACE_FPRINTF = 1]
+mixin/printf-posix [test $REPLACE_FPRINTF = 1]
+free-posix         [test $REPLACE_FPRINTF = 1]
 
 configure.ac:
 gl_FUNC_FPRINTF_POSIX
diff --git a/modules/mixin/printf-posix b/modules/mixin/printf-posix
new file mode 100644
index 0000000000..f78559142d
--- /dev/null
+++ b/modules/mixin/printf-posix
@@ -0,0 +1,28 @@
+Description:
+Module dependencies that are needed to compile lib/vasnprintf.c
+with all extras for POSIX compliance.
+
+Files:
+
+Depends-on:
+isnand-nolibm
+isnanl-nolibm
+frexp-nolibm
+frexpl-nolibm
+printf-frexp
+printf-frexpl
+signbit
+fpucw
+
+configure.ac:
+# Conditionally invoke gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS.
+
+Makefile.am:
+
+Include:
+
+License:
+LGPLv2+
+
+Maintainer:
+all
diff --git a/modules/snprintf-posix b/modules/snprintf-posix
index 5794e95cea..e099c7644e 100644
--- a/modules/snprintf-posix
+++ b/modules/snprintf-posix
@@ -18,15 +18,8 @@ snprintf
 nocrash
 printf-safe
 multiarch
-vasnprintf      [test $ac_cv_func_snprintf = no || test $REPLACE_SNPRINTF = 1]
-isnand-nolibm   [test $ac_cv_func_snprintf = no || test $REPLACE_SNPRINTF = 1]
-isnanl-nolibm   [test $ac_cv_func_snprintf = no || test $REPLACE_SNPRINTF = 1]
-frexp-nolibm    [test $ac_cv_func_snprintf = no || test $REPLACE_SNPRINTF = 1]
-frexpl-nolibm   [test $ac_cv_func_snprintf = no || test $REPLACE_SNPRINTF = 1]
-printf-frexp    [test $ac_cv_func_snprintf = no || test $REPLACE_SNPRINTF = 1]
-printf-frexpl   [test $ac_cv_func_snprintf = no || test $REPLACE_SNPRINTF = 1]
-signbit         [test $ac_cv_func_snprintf = no || test $REPLACE_SNPRINTF = 1]
-fpucw           [test $ac_cv_func_snprintf = no || test $REPLACE_SNPRINTF = 1]
+vasnprintf         [test $ac_cv_func_snprintf = no || test $REPLACE_SNPRINTF = 1]
+mixin/printf-posix [test $ac_cv_func_snprintf = no || test $REPLACE_SNPRINTF = 1]
 
 configure.ac:
 gl_FUNC_SNPRINTF_POSIX
diff --git a/modules/sprintf-posix b/modules/sprintf-posix
index a1eb6127ad..2c47424bec 100644
--- a/modules/sprintf-posix
+++ b/modules/sprintf-posix
@@ -18,17 +18,10 @@ stdio
 nocrash
 printf-safe
 multiarch
-vzsprintf       [test $REPLACE_SPRINTF = 1]
-isnand-nolibm   [test $REPLACE_SPRINTF = 1]
-isnanl-nolibm   [test $REPLACE_SPRINTF = 1]
-frexp-nolibm    [test $REPLACE_SPRINTF = 1]
-frexpl-nolibm   [test $REPLACE_SPRINTF = 1]
-printf-frexp    [test $REPLACE_SPRINTF = 1]
-printf-frexpl   [test $REPLACE_SPRINTF = 1]
-signbit         [test $REPLACE_SPRINTF = 1]
-fpucw           [test $REPLACE_SPRINTF = 1]
-stdint          [test $REPLACE_SPRINTF = 1]
-errno           [test $REPLACE_SPRINTF = 1]
+vzsprintf          [test $REPLACE_SPRINTF = 1]
+mixin/printf-posix [test $REPLACE_SPRINTF = 1]
+stdint             [test $REPLACE_SPRINTF = 1]
+errno              [test $REPLACE_SPRINTF = 1]
 
 configure.ac:
 gl_FUNC_SPRINTF_POSIX
diff --git a/modules/unistdio/u16-u16-vasnprintf b/modules/unistdio/u16-u16-vasnprintf
index 98adbbb37a..0237505d58 100644
--- a/modules/unistdio/u16-u16-vasnprintf
+++ b/modules/unistdio/u16-u16-vasnprintf
@@ -31,13 +31,7 @@ unistr/u32-strlen
 unistr/u32-strmblen
 attribute
 stdint
-isnand-nolibm
-isnanl-nolibm
-frexpl-nolibm
-printf-frexp
-printf-frexpl
-signbit
-fpucw
+mixin/printf-posix
 nocrash
 printf-safe
 alloca-opt
diff --git a/modules/unistdio/u16-vasnprintf b/modules/unistdio/u16-vasnprintf
index de541ef1ca..d92e6dd157 100644
--- a/modules/unistdio/u16-vasnprintf
+++ b/modules/unistdio/u16-vasnprintf
@@ -31,13 +31,7 @@ unistr/u32-strlen
 unistr/u32-strmblen
 attribute
 stdint
-isnand-nolibm
-isnanl-nolibm
-frexpl-nolibm
-printf-frexp
-printf-frexpl
-signbit
-fpucw
+mixin/printf-posix
 nocrash
 printf-safe
 alloca-opt
diff --git a/modules/unistdio/u32-u32-vasnprintf b/modules/unistdio/u32-u32-vasnprintf
index 168cdbd7a9..119a9fe4f4 100644
--- a/modules/unistdio/u32-u32-vasnprintf
+++ b/modules/unistdio/u32-u32-vasnprintf
@@ -31,13 +31,7 @@ unistr/u32-strlen
 unistr/u32-strmblen
 attribute
 stdint
-isnand-nolibm
-isnanl-nolibm
-frexpl-nolibm
-printf-frexp
-printf-frexpl
-signbit
-fpucw
+mixin/printf-posix
 nocrash
 printf-safe
 alloca-opt
diff --git a/modules/unistdio/u32-vasnprintf b/modules/unistdio/u32-vasnprintf
index bdea7468b1..bd094712a2 100644
--- a/modules/unistdio/u32-vasnprintf
+++ b/modules/unistdio/u32-vasnprintf
@@ -31,13 +31,7 @@ unistr/u32-strlen
 unistr/u32-strmblen
 attribute
 stdint
-isnand-nolibm
-isnanl-nolibm
-frexpl-nolibm
-printf-frexp
-printf-frexpl
-signbit
-fpucw
+mixin/printf-posix
 nocrash
 printf-safe
 alloca-opt
diff --git a/modules/unistdio/u8-u8-vasnprintf b/modules/unistdio/u8-u8-vasnprintf
index 5168794bf1..733bc15d3f 100644
--- a/modules/unistdio/u8-u8-vasnprintf
+++ b/modules/unistdio/u8-u8-vasnprintf
@@ -31,13 +31,7 @@ unistr/u32-strlen
 unistr/u32-strmblen
 attribute
 stdint
-isnand-nolibm
-isnanl-nolibm
-frexpl-nolibm
-printf-frexp
-printf-frexpl
-signbit
-fpucw
+mixin/printf-posix
 nocrash
 printf-safe
 alloca-opt
diff --git a/modules/unistdio/u8-vasnprintf b/modules/unistdio/u8-vasnprintf
index cf83b9343c..b86f0d2c19 100644
--- a/modules/unistdio/u8-vasnprintf
+++ b/modules/unistdio/u8-vasnprintf
@@ -31,13 +31,7 @@ unistr/u32-strlen
 unistr/u32-strmblen
 attribute
 stdint
-isnand-nolibm
-isnanl-nolibm
-frexpl-nolibm
-printf-frexp
-printf-frexpl
-signbit
-fpucw
+mixin/printf-posix
 nocrash
 printf-safe
 alloca-opt
diff --git a/modules/unistdio/ulc-vasnprintf b/modules/unistdio/ulc-vasnprintf
index bea310b874..544e39d0ab 100644
--- a/modules/unistdio/ulc-vasnprintf
+++ b/modules/unistdio/ulc-vasnprintf
@@ -29,13 +29,7 @@ unistr/u32-strmblen
 attribute
 stdint
 mbsnlen
-isnand-nolibm
-isnanl-nolibm
-frexpl-nolibm
-printf-frexp
-printf-frexpl
-signbit
-fpucw
+mixin/printf-posix
 nocrash
 printf-safe
 alloca-opt
diff --git a/modules/vasnprintf-posix b/modules/vasnprintf-posix
index 10660f369d..cdc7a8900a 100644
--- a/modules/vasnprintf-posix
+++ b/modules/vasnprintf-posix
@@ -15,14 +15,7 @@ m4/math_h.m4
 
 Depends-on:
 vasnprintf
-isnand-nolibm
-isnanl-nolibm
-frexp-nolibm
-frexpl-nolibm
-printf-frexp
-printf-frexpl
-signbit
-fpucw
+mixin/printf-posix
 nocrash
 printf-safe
 multiarch
diff --git a/modules/vasnwprintf-posix b/modules/vasnwprintf-posix
index 554efe1707..71d6a91717 100644
--- a/modules/vasnwprintf-posix
+++ b/modules/vasnwprintf-posix
@@ -15,14 +15,7 @@ m4/math_h.m4
 
 Depends-on:
 vasnwprintf
-isnand-nolibm
-isnanl-nolibm
-frexp-nolibm
-frexpl-nolibm
-printf-frexp
-printf-frexpl
-signbit
-fpucw
+mixin/printf-posix
 nocrash
 printf-safe
 multiarch
diff --git a/modules/vasprintf-posix b/modules/vasprintf-posix
index 7c0686be9d..2bfb2672ae 100644
--- a/modules/vasprintf-posix
+++ b/modules/vasprintf-posix
@@ -14,15 +14,8 @@ m4/math_h.m4
 
 Depends-on:
 vasprintf
-vasnprintf     [test $HAVE_VASPRINTF = 0 || test $REPLACE_VASPRINTF = 1]
-isnand-nolibm
-isnanl-nolibm
-frexp-nolibm
-frexpl-nolibm
-printf-frexp
-printf-frexpl
-signbit
-fpucw
+vasnprintf         [test $HAVE_VASPRINTF = 0 || test $REPLACE_VASPRINTF = 1]
+mixin/printf-posix [test $HAVE_VASPRINTF = 0 || test $REPLACE_VASPRINTF = 1]
 nocrash
 printf-safe
 multiarch
diff --git a/modules/vdprintf-posix b/modules/vdprintf-posix
index 8feca348b1..d4a98805d8 100644
--- a/modules/vdprintf-posix
+++ b/modules/vdprintf-posix
@@ -18,15 +18,8 @@ vdprintf
 nocrash
 printf-safe
 multiarch
-vasnprintf      [test $ac_cv_func_vdprintf = no || test $REPLACE_VDPRINTF = 1]
-isnand-nolibm   [test $ac_cv_func_vdprintf = no || test $REPLACE_VDPRINTF = 1]
-isnanl-nolibm   [test $ac_cv_func_vdprintf = no || test $REPLACE_VDPRINTF = 1]
-frexp-nolibm    [test $ac_cv_func_vdprintf = no || test $REPLACE_VDPRINTF = 1]
-frexpl-nolibm   [test $ac_cv_func_vdprintf = no || test $REPLACE_VDPRINTF = 1]
-printf-frexp    [test $ac_cv_func_vdprintf = no || test $REPLACE_VDPRINTF = 1]
-printf-frexpl   [test $ac_cv_func_vdprintf = no || test $REPLACE_VDPRINTF = 1]
-signbit         [test $ac_cv_func_vdprintf = no || test $REPLACE_VDPRINTF = 1]
-fpucw           [test $ac_cv_func_vdprintf = no || test $REPLACE_VDPRINTF = 1]
+vasnprintf         [test $ac_cv_func_vdprintf = no || test $REPLACE_VDPRINTF = 1]
+mixin/printf-posix [test $ac_cv_func_vdprintf = no || test $REPLACE_VDPRINTF = 1]
 
 configure.ac:
 gl_FUNC_VDPRINTF_POSIX
diff --git a/modules/vfprintf-posix b/modules/vfprintf-posix
index 47794dd9b1..3bc350d98b 100644
--- a/modules/vfprintf-posix
+++ b/modules/vfprintf-posix
@@ -18,18 +18,11 @@ stdio
 nocrash
 printf-safe
 multiarch
-free-posix      [test $REPLACE_VFPRINTF = 1]
-fseterr         [test $REPLACE_VFPRINTF = 1]
-vasnprintf      [test $REPLACE_VFPRINTF = 1]
-isnand-nolibm   [test $REPLACE_VFPRINTF = 1]
-isnanl-nolibm   [test $REPLACE_VFPRINTF = 1]
-frexp-nolibm    [test $REPLACE_VFPRINTF = 1]
-frexpl-nolibm   [test $REPLACE_VFPRINTF = 1]
-printf-frexp    [test $REPLACE_VFPRINTF = 1]
-printf-frexpl   [test $REPLACE_VFPRINTF = 1]
-signbit         [test $REPLACE_VFPRINTF = 1]
-fpucw           [test $REPLACE_VFPRINTF = 1]
-errno           [test $REPLACE_VFPRINTF = 1]
+free-posix         [test $REPLACE_VFPRINTF = 1]
+fseterr            [test $REPLACE_VFPRINTF = 1]
+vasnprintf         [test $REPLACE_VFPRINTF = 1]
+mixin/printf-posix [test $REPLACE_VFPRINTF = 1]
+errno              [test $REPLACE_VFPRINTF = 1]
 
 configure.ac:
 gl_FUNC_VFPRINTF_POSIX
diff --git a/modules/vsnprintf-posix b/modules/vsnprintf-posix
index 88220bf703..720dcedf02 100644
--- a/modules/vsnprintf-posix
+++ b/modules/vsnprintf-posix
@@ -18,15 +18,8 @@ vsnprintf
 nocrash
 printf-safe
 multiarch
-vasnprintf      [test $ac_cv_func_vsnprintf = no || test $REPLACE_VSNPRINTF = 1]
-isnand-nolibm   [test $ac_cv_func_vsnprintf = no || test $REPLACE_VSNPRINTF = 1]
-isnanl-nolibm   [test $ac_cv_func_vsnprintf = no || test $REPLACE_VSNPRINTF = 1]
-frexp-nolibm    [test $ac_cv_func_vsnprintf = no || test $REPLACE_VSNPRINTF = 1]
-frexpl-nolibm   [test $ac_cv_func_vsnprintf = no || test $REPLACE_VSNPRINTF = 1]
-printf-frexp    [test $ac_cv_func_vsnprintf = no || test $REPLACE_VSNPRINTF = 1]
-printf-frexpl   [test $ac_cv_func_vsnprintf = no || test $REPLACE_VSNPRINTF = 1]
-signbit         [test $ac_cv_func_vsnprintf = no || test $REPLACE_VSNPRINTF = 1]
-fpucw           [test $ac_cv_func_vsnprintf = no || test $REPLACE_VSNPRINTF = 1]
+vasnprintf         [test $ac_cv_func_vsnprintf = no || test $REPLACE_VSNPRINTF = 1]
+mixin/printf-posix [test $ac_cv_func_vsnprintf = no || test $REPLACE_VSNPRINTF = 1]
 
 configure.ac:
 gl_FUNC_VSNPRINTF_POSIX
diff --git a/modules/vsprintf-posix b/modules/vsprintf-posix
index 2bbb36055b..91b634921a 100644
--- a/modules/vsprintf-posix
+++ b/modules/vsprintf-posix
@@ -18,17 +18,10 @@ stdio
 nocrash
 printf-safe
 multiarch
-vzsprintf       [test $REPLACE_VSPRINTF = 1]
-isnand-nolibm   [test $REPLACE_VSPRINTF = 1]
-isnanl-nolibm   [test $REPLACE_VSPRINTF = 1]
-frexp-nolibm    [test $REPLACE_VSPRINTF = 1]
-frexpl-nolibm   [test $REPLACE_VSPRINTF = 1]
-printf-frexp    [test $REPLACE_VSPRINTF = 1]
-printf-frexpl   [test $REPLACE_VSPRINTF = 1]
-signbit         [test $REPLACE_VSPRINTF = 1]
-fpucw           [test $REPLACE_VSPRINTF = 1]
-stdint          [test $REPLACE_VSPRINTF = 1]
-errno           [test $REPLACE_VSPRINTF = 1]
+vzsprintf          [test $REPLACE_VSPRINTF = 1]
+mixin/printf-posix [test $REPLACE_VSPRINTF = 1]
+stdint             [test $REPLACE_VSPRINTF = 1]
+errno              [test $REPLACE_VSPRINTF = 1]
 
 configure.ac:
 gl_FUNC_VSPRINTF_POSIX
-- 
2.34.1

>From 8030d9d816f2c7b7df8638589b2442bcb1bb932e Mon Sep 17 00:00:00 2001
From: Bruno Haible <br...@clisp.org>
Subject: [PATCH 02/14] 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.
---
 ChangeLog                  | 19 +++++++++++++++++++
 modules/dprintf-gnu        |  1 +
 modules/fprintf-gnu        |  1 +
 modules/mixin/printf-gnu   | 21 +++++++++++++++++++++
 modules/obstack-printf-gnu |  1 +
 modules/printf-gnu         |  1 +
 modules/snprintf-gnu       |  1 +
 modules/sprintf-gnu        |  1 +
 modules/vasnprintf-gnu     |  1 +
 modules/vasnwprintf-gnu    |  1 +
 modules/vasprintf-gnu      |  1 +
 modules/vdprintf-gnu       |  1 +
 modules/vfprintf-gnu       |  1 +
 modules/vprintf-gnu        |  1 +
 modules/vsnprintf-gnu      |  1 +
 modules/vsprintf-gnu       |  1 +
 16 files changed, 54 insertions(+)
 create mode 100644 modules/mixin/printf-gnu

diff --git a/ChangeLog b/ChangeLog
index b2dd608715..3162246429 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,22 @@
+2024-06-24  Bruno Haible  <br...@clisp.org>
+
+	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  <br...@clisp.org>
 
 	Reduce duplication among *printf-posix modules.
diff --git a/modules/dprintf-gnu b/modules/dprintf-gnu
index b7228f9ec7..b4ca7270b4 100644
--- a/modules/dprintf-gnu
+++ b/modules/dprintf-gnu
@@ -13,6 +13,7 @@ m4/dprintf-gnu.m4
 
 Depends-on:
 dprintf-posix
+mixin/printf-gnu
 
 configure.ac:
 gl_FUNC_DPRINTF_GNU
diff --git a/modules/fprintf-gnu b/modules/fprintf-gnu
index fce7578459..fca6f4c79a 100644
--- a/modules/fprintf-gnu
+++ b/modules/fprintf-gnu
@@ -12,6 +12,7 @@ m4/fprintf-gnu.m4
 
 Depends-on:
 fprintf-posix
+mixin/printf-gnu
 
 configure.ac:
 gl_FUNC_FPRINTF_GNU
diff --git a/modules/mixin/printf-gnu b/modules/mixin/printf-gnu
new file mode 100644
index 0000000000..75f744c0db
--- /dev/null
+++ b/modules/mixin/printf-gnu
@@ -0,0 +1,21 @@
+Description:
+Module dependencies that are needed to compile lib/vasnprintf.c
+with all extras for POSIX compliance and GNU compatibility.
+
+Files:
+
+Depends-on:
+mixin/printf-posix
+
+configure.ac:
+# Conditionally invoke gl_PREREQ_VASNPRINTF_WITH_GNU_EXTRAS.
+
+Makefile.am:
+
+Include:
+
+License:
+LGPLv2+
+
+Maintainer:
+all
diff --git a/modules/obstack-printf-gnu b/modules/obstack-printf-gnu
index c6538ba701..3b51bed05e 100644
--- a/modules/obstack-printf-gnu
+++ b/modules/obstack-printf-gnu
@@ -12,6 +12,7 @@ m4/obstack-printf-gnu.m4
 
 Depends-on:
 obstack-printf-posix
+mixin/printf-gnu
 
 configure.ac:
 gl_FUNC_OBSTACK_PRINTF_GNU
diff --git a/modules/printf-gnu b/modules/printf-gnu
index f42a18fd5b..b73c239440 100644
--- a/modules/printf-gnu
+++ b/modules/printf-gnu
@@ -13,6 +13,7 @@ m4/printf-gnu.m4
 
 Depends-on:
 printf-posix
+mixin/printf-gnu
 
 configure.ac:
 gl_FUNC_PRINTF_GNU
diff --git a/modules/snprintf-gnu b/modules/snprintf-gnu
index 2850c16a34..3ef1c9c0e0 100644
--- a/modules/snprintf-gnu
+++ b/modules/snprintf-gnu
@@ -13,6 +13,7 @@ m4/snprintf-gnu.m4
 
 Depends-on:
 snprintf-posix
+mixin/printf-gnu
 
 configure.ac:
 gl_FUNC_SNPRINTF_GNU
diff --git a/modules/sprintf-gnu b/modules/sprintf-gnu
index 87daff3832..e63f6bc3e4 100644
--- a/modules/sprintf-gnu
+++ b/modules/sprintf-gnu
@@ -12,6 +12,7 @@ m4/sprintf-gnu.m4
 
 Depends-on:
 sprintf-posix
+mixin/printf-gnu
 
 configure.ac:
 gl_FUNC_SPRINTF_GNU
diff --git a/modules/vasnprintf-gnu b/modules/vasnprintf-gnu
index b5551f3011..6c1e82e0ce 100644
--- a/modules/vasnprintf-gnu
+++ b/modules/vasnprintf-gnu
@@ -13,6 +13,7 @@ m4/vasnprintf-gnu.m4
 
 Depends-on:
 vasnprintf-posix
+mixin/printf-gnu
 
 configure.ac:
 gl_FUNC_VASNPRINTF_GNU
diff --git a/modules/vasnwprintf-gnu b/modules/vasnwprintf-gnu
index 582a185edd..91a96182e3 100644
--- a/modules/vasnwprintf-gnu
+++ b/modules/vasnwprintf-gnu
@@ -13,6 +13,7 @@ m4/vasnwprintf-gnu.m4
 
 Depends-on:
 vasnwprintf-posix
+mixin/printf-gnu
 
 configure.ac:
 gl_FUNC_VASNWPRINTF_GNU
diff --git a/modules/vasprintf-gnu b/modules/vasprintf-gnu
index 9635b10f84..257bbbfc9c 100644
--- a/modules/vasprintf-gnu
+++ b/modules/vasprintf-gnu
@@ -12,6 +12,7 @@ m4/vasprintf-gnu.m4
 
 Depends-on:
 vasprintf-posix
+mixin/printf-gnu
 
 configure.ac:
 gl_FUNC_VASPRINTF_GNU
diff --git a/modules/vdprintf-gnu b/modules/vdprintf-gnu
index b7bbb74fbe..6ad683f2ed 100644
--- a/modules/vdprintf-gnu
+++ b/modules/vdprintf-gnu
@@ -13,6 +13,7 @@ m4/vdprintf-gnu.m4
 
 Depends-on:
 vdprintf-posix
+mixin/printf-gnu
 
 configure.ac:
 gl_FUNC_VDPRINTF_GNU
diff --git a/modules/vfprintf-gnu b/modules/vfprintf-gnu
index 71a8c82d3b..2062ef5426 100644
--- a/modules/vfprintf-gnu
+++ b/modules/vfprintf-gnu
@@ -12,6 +12,7 @@ m4/vfprintf-gnu.m4
 
 Depends-on:
 vfprintf-posix
+mixin/printf-gnu
 
 configure.ac:
 gl_FUNC_VFPRINTF_GNU
diff --git a/modules/vprintf-gnu b/modules/vprintf-gnu
index 0fbefc85ba..a900a259d5 100644
--- a/modules/vprintf-gnu
+++ b/modules/vprintf-gnu
@@ -13,6 +13,7 @@ m4/vprintf-gnu.m4
 
 Depends-on:
 vprintf-posix
+mixin/printf-gnu
 
 configure.ac:
 gl_FUNC_VPRINTF_GNU
diff --git a/modules/vsnprintf-gnu b/modules/vsnprintf-gnu
index 36c4cbd586..94085c3ca9 100644
--- a/modules/vsnprintf-gnu
+++ b/modules/vsnprintf-gnu
@@ -13,6 +13,7 @@ m4/vsnprintf-gnu.m4
 
 Depends-on:
 vsnprintf-posix
+mixin/printf-gnu
 
 configure.ac:
 gl_FUNC_VSNPRINTF_GNU
diff --git a/modules/vsprintf-gnu b/modules/vsprintf-gnu
index d86b062e2e..9c2df1ee66 100644
--- a/modules/vsprintf-gnu
+++ b/modules/vsprintf-gnu
@@ -12,6 +12,7 @@ m4/vsprintf-gnu.m4
 
 Depends-on:
 vsprintf-posix
+mixin/printf-gnu
 
 configure.ac:
 gl_FUNC_VSPRINTF_GNU
-- 
2.34.1

Reply via email to