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.4 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, 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 787D21F8C6 for ; Wed, 8 Sep 2021 16:48:06 +0000 (UTC) Received: from localhost ([::1]:37356 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mO0k1-0000aD-Lg for normalperson@yhbt.net; Wed, 08 Sep 2021 12:48:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53094) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mO0jc-0000CZ-Pb for bug-gnulib@gnu.org; Wed, 08 Sep 2021 12:47:40 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:50620) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mO0jZ-00079Z-0Q for bug-gnulib@gnu.org; Wed, 08 Sep 2021 12:47:39 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 364EA160142; Wed, 8 Sep 2021 09:47:34 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 4mPMh_gBXRHe; Wed, 8 Sep 2021 09:47:33 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 48883160141; Wed, 8 Sep 2021 09:47:33 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id bm7Mzrbz3VFK; Wed, 8 Sep 2021 09:47:33 -0700 (PDT) Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 24D08160140; Wed, 8 Sep 2021 09:47:33 -0700 (PDT) From: Paul Eggert To: bug-gnulib@gnu.org, landfillbaby69@gmail.com Subject: [PATCH 1/2] string, wchar: port rpl_free decl to Android Date: Wed, 8 Sep 2021 09:47:16 -0700 Message-Id: <20210908164717.71331-1-eggert@cs.ucla.edu> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=131.179.128.68; envelope-from=eggert@cs.ucla.edu; helo=zimbra.cs.ucla.edu X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-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: , Cc: Paul Eggert Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" * lib/string.in.h, lib/wchar.in.h: (free): When replacing it, declare the unreplaced version too. Problem reported by Lucy Phipps in: https://lists.gnu.org/r/bug-gnulib/2021-09/msg00026.html --- ChangeLog | 8 ++++++++ lib/string.in.h | 1 + lib/wchar.in.h | 1 + 3 files changed, 10 insertions(+) diff --git a/ChangeLog b/ChangeLog index f73dc5a130..d2dd671c5b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2021-09-08 Paul Eggert + + string, wchar: port rpl_free decl to Android + * lib/string.in.h, lib/wchar.in.h: + (free): When replacing it, declare the unreplaced version too. + Problem reported by Lucy Phipps in: + https://lists.gnu.org/r/bug-gnulib/2021-09/msg00026.html + 2021-09-07 Paul Eggert =20 string, wchar: avoid some namespace pollution diff --git a/lib/string.in.h b/lib/string.in.h index 6214b55784..8977153c88 100644 --- a/lib/string.in.h +++ b/lib/string.in.h @@ -86,6 +86,7 @@ /* Declare 'free' if needed for _GL_ATTRIBUTE_DEALLOC_FREE. */ #if (@REPLACE_FREE@ && !defined free \ && !(defined __cplusplus && defined GNULIB_NAMESPACE)) +_GL_EXTERN_C void free (void *); # define free rpl_free #endif _GL_EXTERN_C void free (void *); diff --git a/lib/wchar.in.h b/lib/wchar.in.h index 027a145496..acb9d4ea64 100644 --- a/lib/wchar.in.h +++ b/lib/wchar.in.h @@ -149,6 +149,7 @@ typedef int rpl_mbstate_t; /* Declare 'free' if needed for _GL_ATTRIBUTE_DEALLOC_FREE. */ #if (@REPLACE_FREE@ && !defined free \ && !(defined __cplusplus && defined GNULIB_NAMESPACE)) +_GL_EXTERN_C void free (void *); # define free rpl_free #endif _GL_EXTERN_C void free (void *); --=20 2.31.1