bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: bug-gnulib@gnu.org, landfillbaby69@gmail.com
Cc: Paul Eggert <eggert@cs.ucla.edu>
Subject: [PATCH 1/2] string, wchar: port rpl_free decl to Android
Date: Wed,  8 Sep 2021 09:47:16 -0700	[thread overview]
Message-ID: <20210908164717.71331-1-eggert@cs.ucla.edu> (raw)

* 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  <eggert@cs.ucla.edu>
+
+	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  <eggert@cs.ucla.edu>
 
 	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 *);
-- 
2.31.1



             reply	other threads:[~2021-09-08 16:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-08 16:47 Paul Eggert [this message]
2021-09-08 16:47 ` [PATCH 2/2] strerror_r-posix: port better to Android Paul Eggert

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=20210908164717.71331-1-eggert@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=bug-gnulib@gnu.org \
    --cc=landfillbaby69@gmail.com \
    /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).