]> Savannah Git Hosting - gnulib.git/commitdiff
string-h: Fix build error on Windows/macOS about strerror_l.
authorSimon Josefsson <simon@josefsson.org>
Wed, 9 Apr 2025 06:45:40 +0000 (08:45 +0200)
committerSimon Josefsson <simon@josefsson.org>
Wed, 9 Apr 2025 06:45:40 +0000 (08:45 +0200)
https://lists.gnu.org/r/bug-gnulib/2025-04/msg00045.html

* lib/string.in.h: Wrap _GL_WARN_ON_USE in
HAVE_RAW_DECL_STRERROR_L.

ChangeLog
lib/string.in.h

index f213c4a4f9b6f17325af9e8a2cc0befce15c9fde..6e9ffa2a4881cdab812bdce02d00a861924ab410 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2025-04-09  Simon Josefsson  <simon@josefsson.org>
+
+       string-h: Fix build error on Windows/macOS about strerror_l.
+       https://lists.gnu.org/r/bug-gnulib/2025-04/msg00045.html
+       * lib/string.in.h: Wrap _GL_WARN_ON_USE in
+       HAVE_RAW_DECL_STRERROR_L.
+
 2025-04-08  Collin Funk  <collin.funk1@gmail.com>
 
        stddef-h: Silence autoconf warnings introduced in previous commit.
index e6bf6751510af77b14ba4c5db401a276bd17d632..44b9497d8021f4063b2dde2bd8a036567be0275d 100644 (file)
@@ -1499,9 +1499,10 @@ _GL_CXXALIASWARN (strerror_l);
 # endif
 #elif defined GNULIB_POSIXCHECK
 # undef strerror_l
-/* Assume strerror_l is always declared.  */
+# if HAVE_RAW_DECL_STRERROR_L
 _GL_WARN_ON_USE (strerror_l, "strerror_l is unportable - "
                  "use gnulib module strerror_l for portability");
+# endif
 #endif
 
 /* Map any int, typically from errno, into an error message.  Multithread-safe,