Hi,

Vivien Kraus wrote:
> I want asprintf. The manual page tells me it can be provided by
> vasprintf-gnu. However, if I import the vasprintf-gnu module, it tells
> me to add:
>   #include "vasprintf.h"
> 
> (like vasprintf-posix, but vasprintf tells me to just include stdio.h)
> 
> But this file does not seem to exist, and the compiler fails with:
> fatal error: vasprintf.h: No such file or directory

Oh, indeed. This is a left-over from 18 years ago(!). We have this entry
in the NEWS file:

2007-03-27  vasprintf       The module now depends on stdio, so replace
                               #include "vasprintf.h"
                            with
                               #include <stdio.h>

This patch fixes it.


2025-03-03  Bruno Haible  <br...@clisp.org>

        vasprintf-posix, vasprintf-gnu: Fix module description.
        Reported by Vivien Kraus <viv...@planete-kraus.eu> in
        <https://lists.gnu.org/archive/html/bug-gnulib/2025-03/msg00009.html>.
        * modules/vasprintf-posix (Include): Change to <stdio.h>.
        * modules/vasprintf-gnu (Include): Likewise.

diff --git a/modules/vasprintf-gnu b/modules/vasprintf-gnu
index 257bbbfc9c..1820fe8f2d 100644
--- a/modules/vasprintf-gnu
+++ b/modules/vasprintf-gnu
@@ -20,7 +20,7 @@ gl_FUNC_VASPRINTF_GNU
 Makefile.am:
 
 Include:
-"vasprintf.h"
+<stdio.h>
 
 License:
 LGPL
diff --git a/modules/vasprintf-posix b/modules/vasprintf-posix
index 2bfb2672ae..95aa8087d4 100644
--- a/modules/vasprintf-posix
+++ b/modules/vasprintf-posix
@@ -26,7 +26,7 @@ gl_FUNC_VASPRINTF_POSIX
 Makefile.am:
 
 Include:
-"vasprintf.h"
+<stdio.h>
 
 License:
 LGPL




Reply via email to