bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] printf.m4: fix a bug in detecting printf %j support


From: Bruno Haible
Subject: Re: [PATCH] printf.m4: fix a bug in detecting printf %j support
Date: Thu, 20 Oct 2016 21:51:17 +0200
User-agent: KMail/4.8.5 (Linux/3.8.0-44-generic; KDE/4.8.5; x86_64; ; )

> diff --git a/m4/printf.m4 b/m4/printf.m4
> index e495e0c..c7a14b2 100644
> --- a/m4/printf.m4
> +++ b/m4/printf.m4
> @@ -38,6 +38,8 @@ int main ()
>    if (sprintf (buf, "%ju %d", (uintmax_t) 12345671, 33, 44, 55) < 0
>        || strcmp (buf, "12345671 33") != 0)
>      result |= 1;
> +#else
> +  result |= 1;
>  #endif
>    buf[0] = '\0';
>    if (sprintf (buf, "%zu %d", (size_t) 12345672, 33, 44, 55) < 0

Looks good: Yes, in this case, *printf is not buggy, but we need to replace it
anyway, for the sake of the gnulib-defined 'uintmax_t'.

Thanks to both of you.

Bruno




reply via email to

[Prev in Thread] Current Thread [Next in Thread]