bug-gnulib
[Top][All Lists]
Advanced

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

Re: gl_{,SN}PRINTF_DIRECTIVE_N wrongly fail on Ubuntu 18.04


From: Adrian Bunk
Subject: Re: gl_{,SN}PRINTF_DIRECTIVE_N wrongly fail on Ubuntu 18.04
Date: Sun, 8 Mar 2020 20:46:11 +0200
User-agent: Mutt/1.10.1 (2018-07-13)

On Sun, Mar 08, 2020 at 06:59:54PM +0100, Bruno Haible wrote:
> Hi Adrian,

Hi Bruno,

> gnulib works as designed. gnulib is designed to override system function so as
> to make them POSIX compliant. POSIX [1] specifies that support for %n in the
> *printf functions is mandatory. As you have shown with the test program, glibc
> does not provide %n support when the CFLAGS contain _FORTIFY_SOURCE=2; gnulib
> rectifies that.

it is unfortunate when GNU software like bison or gzip uses the
gnulib replacement for most glibc users.

In that case there are one documentation deficit and two gnulib bugs:

    * This function does not support the 'n' directive on some platforms:
-     MSVC 14.
+     MSVC 14, glibc with _FORTIFY_SOURCE > 0 (default in some
+     Linux distributions).


The cross compile cases are then bogus for glibc:

printf:
 *)               gl_cv_func_printf_directive_n="guessing yes";;

snprintf:
 *-gnu* | gnu*)        gl_cv_func_snprintf_directive_n="guessing yes";;


> Bruno
>...

cu
Adrian



reply via email to

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