From: Simon Josefsson Date: Wed, 9 Apr 2025 06:45:40 +0000 (+0200) Subject: string-h: Fix build error on Windows/macOS about strerror_l. X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=1e72c41b486b3fdd9e523fb4b3b4f523d2743500;p=gnulib.git 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. --- diff --git a/ChangeLog b/ChangeLog index f213c4a4f9..6e9ffa2a48 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2025-04-09 Simon Josefsson + + 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 stddef-h: Silence autoconf warnings introduced in previous commit. diff --git a/lib/string.in.h b/lib/string.in.h index e6bf675151..44b9497d80 100644 --- a/lib/string.in.h +++ b/lib/string.in.h @@ -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,