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