[Xcb] [PATCH:util] atoms.c: #include <stdio.h> for vsnprintf case, not just vasprintf

Arnaud Fontaine arnaud at andesi.org
Mon May 20 23:18:40 PDT 2013


Hello,

> Both forms of v*printf() function need <stdio.h>, so include it
> unconditionally.  Fixes https://bugs.freedesktop.org/show_bug.cgi?id=64807
> 
> Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
> ---
>  src/atoms.c |    2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/src/atoms.c b/src/atoms.c
> index 7b3aec6..e9133a6 100644
> --- a/src/atoms.c
> +++ b/src/atoms.c
> @@ -1,9 +1,7 @@
>  /* Rely on vasprintf (GNU extension) instead of vsnprintf if
>     possible... */
> -#ifdef HAVE_VASPRINTF
>  #define _GNU_SOURCE
>  #include <stdio.h>
> -#endif

AFAIK, defining _GNU_SOURCE macro even  for compilers not supporting GNU
extensions is not an issue, so:

Reviewed-by: Arnaud Fontaine <arnau at debian.org>

Thanks for the patch.

Cheers,
-- 
Arnaud Fontaine


More information about the Xcb mailing list