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=-3.8 required=3.0 tests=AWL,BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS 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 6B0441F8C6 for ; Sun, 20 Jun 2021 01:25:46 +0000 (UTC) Received: from localhost ([::1]:58088 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lumDZ-00061k-BQ for normalperson@yhbt.net; Sat, 19 Jun 2021 21:25:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54422) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lumDW-0005zz-38 for bug-gnulib@gnu.org; Sat, 19 Jun 2021 21:25:42 -0400 Received: from mo4-p00-ob.smtp.rzone.de ([85.215.255.20]:13024) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lumDU-0002fa-7g for bug-gnulib@gnu.org; Sat, 19 Jun 2021 21:25:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1624152337; s=strato-dkim-0002; d=clisp.org; h=Message-ID:Date:Subject:To:From:Cc:Date:From:Subject:Sender; bh=qdCbRAKIkqxiK+KXiSRd9CF2fIPNDbOF7sGlCCqQsxQ=; b=C77VP4J8SyIL3jC5JC8nPKY6yB8WK+e6YHLRaPhsY2Ut6ZDFbovG+LJTZ0+cK7046I GnBjYPAcH2Lpj2S3V2YwRAK5kRBkoLpMob76ZSlaJrDrnegzIc+hyTvE3taV1CAjoPLd 5SYqGwE8ALu8eRWuZZkUbwwHZGV9xDbxtZraZKEFZJAvW4xHyS9TlHm2SsKfQ/ePDHwA LhXVVYKYjIgaqrpNkAfKm2U/ICoMGxWm282rfwD2Iaeba2/T1daS1iRXTmIfegpx9U/Q iaQsvSXwByGGLTZNJtWLhTCMOxP9ZJl+3ZiGt8eDlyB7+xd7TzVTeX4cUZk2GzVLJhQQ wimg== Authentication-Results: strato.com; dkim=none X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlIWs+iCP5vnk6shH+AHjwLuWOGKf9yfs=" X-RZG-CLASS-ID: mo00 Received: from bruno.haible.de by smtp.strato.de (RZmta 47.27.3 DYNA|AUTH) with ESMTPSA id 401b97x5K1Pb83c (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (curve X9_62_prime256v1 with 256 ECDH bits, eq. 3072 bits RSA)) (Client did not present a certificate); Sun, 20 Jun 2021 03:25:37 +0200 (CEST) From: Bruno Haible To: bug-gnulib@gnu.org Subject: improve conflict resolution between Gnulib and GNU gettext Date: Sun, 20 Jun 2021 03:25:36 +0200 Message-ID: <3284270.rhaEBvZlVd@omega> User-Agent: KMail/5.1.3 (Linux/4.4.0-210-generic; KDE/5.18.0; x86_64; ; ) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="nextPart3993701.roqcdLahFs" Content-Transfer-Encoding: 7Bit Received-SPF: none client-ip=85.215.255.20; envelope-from=bruno@clisp.org; helo=mo4-p00-ob.smtp.rzone.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: , Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" This is a multi-part message in MIME format. --nextPart3993701.roqcdLahFs Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" When GNU libintl.h defines a *printf symbol and Gnulib's stdio.h does it as well, it is best that libintl.h avoids overriding Gnulib. To this effect, Gnulib needs to set a macro that tells that it has provided an override. Similarly for textstyle.h (from GNU libtextstyle). 2021-06-19 Bruno Haible unistd: Improve conflict resolution between gnulib and textstyle.h. * lib/unistd.in.h (GNULIB_overrides_isatty): New macro. 2021-06-19 Bruno Haible stdio: Improve conflict resolution between gnulib and libintl.h. * lib/stdio.in.h (GNULIB_overrides_snprintf, GNULIB_overrides_sprintf, GNULIB_overrides_asprintf, GNULIB_overrides_vasprintf, GNULIB_overrides_vsnprintf, GNULIB_overrides_vsprintf): New macros. --nextPart3993701.roqcdLahFs Content-Disposition: attachment; filename="0001-stdio-Improve-conflict-resolution-between-gnulib-and.patch" Content-Transfer-Encoding: 7Bit Content-Type: text/x-patch; charset="UTF-8"; name="0001-stdio-Improve-conflict-resolution-between-gnulib-and.patch" >From 7f7c3c1efc640059f2ad3046353935a2b30aaa06 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 20 Jun 2021 03:23:41 +0200 Subject: [PATCH 1/2] stdio: Improve conflict resolution between gnulib and libintl.h. * lib/stdio.in.h (GNULIB_overrides_snprintf, GNULIB_overrides_sprintf, GNULIB_overrides_asprintf, GNULIB_overrides_vasprintf, GNULIB_overrides_vsnprintf, GNULIB_overrides_vsprintf): New macros. --- ChangeLog | 7 +++++++ lib/stdio.in.h | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/ChangeLog b/ChangeLog index 11a75d6..188bdaf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2021-06-19 Bruno Haible + stdio: Improve conflict resolution between gnulib and libintl.h. + * lib/stdio.in.h (GNULIB_overrides_snprintf, GNULIB_overrides_sprintf, + GNULIB_overrides_asprintf, GNULIB_overrides_vasprintf, + GNULIB_overrides_vsnprintf, GNULIB_overrides_vsprintf): New macros. + +2021-06-19 Bruno Haible + declared.sh: Allow parsing 'extern "C"' lines. * build-aux/declared.sh: Don't concatenate lines to an 'extern "C" {' line. diff --git a/lib/stdio.in.h b/lib/stdio.in.h index f0f880a..20ba488 100644 --- a/lib/stdio.in.h +++ b/lib/stdio.in.h @@ -1257,6 +1257,7 @@ _GL_CXXALIASWARN (scanf); # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define snprintf rpl_snprintf # endif +# define GNULIB_overrides_snprintf 1 _GL_FUNCDECL_RPL (snprintf, int, (char *restrict str, size_t size, const char *restrict format, ...) @@ -1302,6 +1303,7 @@ _GL_WARN_ON_USE (snprintf, "snprintf is unportable - " # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define sprintf rpl_sprintf # endif +# define GNULIB_overrides_sprintf 1 _GL_FUNCDECL_RPL (sprintf, int, (char *restrict str, const char *restrict format, ...) _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) @@ -1369,6 +1371,7 @@ _GL_WARN_ON_USE (tmpfile, "tmpfile is not usable on mingw - " # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define asprintf rpl_asprintf # endif +# define GNULIB_overrides_asprintf _GL_FUNCDECL_RPL (asprintf, int, (char **result, const char *format, ...) _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) @@ -1390,6 +1393,7 @@ _GL_CXXALIASWARN (asprintf); # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define vasprintf rpl_vasprintf # endif +# define GNULIB_overrides_vasprintf 1 _GL_FUNCDECL_RPL (vasprintf, int, (char **result, const char *format, va_list args) _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0) @@ -1573,6 +1577,7 @@ _GL_CXXALIASWARN (vscanf); # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define vsnprintf rpl_vsnprintf # endif +# define GNULIB_overrides_vsnprintf 1 _GL_FUNCDECL_RPL (vsnprintf, int, (char *restrict str, size_t size, const char *restrict format, va_list args) @@ -1609,6 +1614,7 @@ _GL_WARN_ON_USE (vsnprintf, "vsnprintf is unportable - " # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define vsprintf rpl_vsprintf # endif +# define GNULIB_overrides_vsprintf 1 _GL_FUNCDECL_RPL (vsprintf, int, (char *restrict str, const char *restrict format, va_list args) -- 2.7.4 --nextPart3993701.roqcdLahFs Content-Disposition: attachment; filename="0002-unistd-Improve-conflict-resolution-between-gnulib-an.patch" Content-Transfer-Encoding: 7Bit Content-Type: text/x-patch; charset="UTF-8"; name="0002-unistd-Improve-conflict-resolution-between-gnulib-an.patch" >From fa7147fdd9f2a6112b5256b034ddfed9b29d8b0f Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 20 Jun 2021 03:23:45 +0200 Subject: [PATCH 2/2] unistd: Improve conflict resolution between gnulib and textstyle.h. * lib/unistd.in.h (GNULIB_overrides_isatty): New macro. --- ChangeLog | 5 +++++ lib/unistd.in.h | 1 + 2 files changed, 6 insertions(+) diff --git a/ChangeLog b/ChangeLog index 188bdaf..da5b631 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2021-06-19 Bruno Haible + unistd: Improve conflict resolution between gnulib and textstyle.h. + * lib/unistd.in.h (GNULIB_overrides_isatty): New macro. + +2021-06-19 Bruno Haible + stdio: Improve conflict resolution between gnulib and libintl.h. * lib/stdio.in.h (GNULIB_overrides_snprintf, GNULIB_overrides_sprintf, GNULIB_overrides_asprintf, GNULIB_overrides_vasprintf, diff --git a/lib/unistd.in.h b/lib/unistd.in.h index 35abbde..d4d4ba7 100644 --- a/lib/unistd.in.h +++ b/lib/unistd.in.h @@ -1521,6 +1521,7 @@ _GL_WARN_ON_USE (group_member, "group_member is unportable - " # undef isatty # define isatty rpl_isatty # endif +# define GNULIB_defined_isatty 1 _GL_FUNCDECL_RPL (isatty, int, (int fd)); _GL_CXXALIAS_RPL (isatty, int, (int fd)); # elif defined _WIN32 && !defined __CYGWIN__ -- 2.7.4 --nextPart3993701.roqcdLahFs--