bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@stusta.de>
To: Bruno Haible <bruno@clisp.org>
Cc: bug-gnulib@gnu.org
Subject: Re: gl_{,SN}PRINTF_DIRECTIVE_N wrongly fail on Ubuntu 18.04
Date: Sun, 8 Mar 2020 20:46:11 +0200	[thread overview]
Message-ID: <20200308184611.GA1425@localhost> (raw)
In-Reply-To: <1672454.J3UH0QvxPd@omega>

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	other threads:[~2020-03-08 18:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-08 11:19 gl_{,SN}PRINTF_DIRECTIVE_N wrongly fail on Ubuntu 18.04 Adrian Bunk
2020-03-08 17:59 ` Bruno Haible
2020-03-08 18:46   ` Adrian Bunk [this message]
2020-03-08 22:04     ` Bruno Haible
2020-03-08 23:38       ` Adrian Bunk
2020-03-09  0:11         ` Bruno Haible
2020-03-09  3:36           ` Paul Eggert
2020-03-16 13:17       ` Bruno Haible

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200308184611.GA1425@localhost \
    --to=bunk@stusta.de \
    --cc=bruno@clisp.org \
    --cc=bug-gnulib@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).