From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS22989 209.51.188.0/24 X-Spam-Status: No, score=-4.5 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 4EC851F619 for ; Sun, 8 Mar 2020 18:46:34 +0000 (UTC) Received: from localhost ([::1]:60730 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jB0wa-00025Z-Tb for normalperson@yhbt.net; Sun, 08 Mar 2020 14:46:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60672) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jB0wS-00024D-Be for bug-gnulib@gnu.org; Sun, 08 Mar 2020 14:46:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jB0wM-0002xI-HM for bug-gnulib@gnu.org; Sun, 08 Mar 2020 14:46:20 -0400 Received: from mail.stusta.mhn.de ([141.84.69.5]:49750) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jB0wL-0002uo-Iu for bug-gnulib@gnu.org; Sun, 08 Mar 2020 14:46:18 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) by mail.stusta.mhn.de (Postfix) with ESMTPSA id 48b9Kw6pHlz2C; Sun, 8 Mar 2020 19:46:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stusta.de; s=default; t=1583693173; bh=X0ocFgy9+LBlqUYbZDDYut3DTvJTJb/VO4K5xA/R/Bg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=T68hjCml0/qY77wCMTVyyocaHzCjNQ7t1mLJQN1eGlr6RexGGtppJR3r2EJoza5iU sZQQe9OuO1CbJ7lb2/iOeSDn5+7np9j4hSPJbpoGfsSbxgCnH2wiZ5jsEDe2yhvjt7 hKsUWcOIX+WUEPZO3t1ATE/tTfsa5nGxwuXmZzdnjUB9jvCHJxDTuRdgoHZSOUraUV FkVM25p+0qpYhsOf5a4DDTYqjpQHEyER3InEF7YZTAQXNYgkqgcqIvGC0jNlrcch5l 3GirI3mUQiwrZUCMtjfLYomU11Yah5U1KviEtSXFFA/cuK06XD56U+2YWB+jKGeSBa Ui7IBmpCJYsOGHdhNa9PYPyUwdQdI1EfSLBg2lF3J7acGV86K61bl1sJPgEPLWANnB ojKSefTXQf0YyDo59CUWm5I9/KdtitxLHDA5CIczoYDh1k1xi+zB1geldxus3ST42C aOBW+7RsOfN5COo7JaMt1PBKajqGrAoO0xPm064pkZfmfF3i3PK9Ofd7JYR+79LBX0 seeOHD1BYHO/k2P2b7+Uqq1bbZQ0wD17lxr5XcmahQ32coAEOM6OicZfcx625TWwUm s2uIxPIUp6+utbBsrVHxllZtAjyeRMdwToNJeunWTszPS0mnxT5X5VJ7Y1Hfa7EiPt xWeeNbrpvevKW462z6bmUN5I= Date: Sun, 8 Mar 2020 20:46:11 +0200 From: Adrian Bunk To: Bruno Haible Subject: Re: gl_{,SN}PRINTF_DIRECTIVE_N wrongly fail on Ubuntu 18.04 Message-ID: <20200308184611.GA1425@localhost> References: <20200308111935.GA20113@localhost> <1672454.J3UH0QvxPd@omega> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1672454.J3UH0QvxPd@omega> User-Agent: Mutt/1.10.1 (2018-07-13) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 141.84.69.5 X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: bug-gnulib@gnu.org Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" 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