]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
regex: fix support for overriding "gnulib"
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 10 Sep 2025 15:33:49 +0000 (08:33 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 10 Sep 2025 15:33:49 +0000 (08:33 -0700)
Problem reported by Pádraig Brady in:
https://lists.gnu.org/r/bug-gnulib/2025-09/msg00104.html
* lib/regex_internal.h [!_LIBC]: Simplify by including gettext.h
rather than doing things by hand and mishandling GNULIB_TEXT_DOMAIN.
(gettext_noop) [!_LIBC]: Remove, since gettext.h does that now.
* modules/regex (Depends-on): Add gettext-h.

ChangeLog
lib/regex_internal.h
modules/regex

index fd6965d40412f8c730ad464a77d7eff0cd9b1bec..8b83dca9f6570e6e6406247a0cabe5ba5a405844 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2025-09-10  Paul Eggert  <eggert@cs.ucla.edu>
+
+       regex: fix support for overriding "gnulib"
+       Problem reported by Pádraig Brady in:
+       https://lists.gnu.org/r/bug-gnulib/2025-09/msg00104.html
+       * lib/regex_internal.h [!_LIBC]: Simplify by including gettext.h
+       rather than doing things by hand and mishandling GNULIB_TEXT_DOMAIN.
+       (gettext_noop) [!_LIBC]: Remove, since gettext.h does that now.
+       * modules/regex (Depends-on): Add gettext-h.
+
 2025-09-09  Pádraig Brady  <P@draigBrady.com>
 
        maintainer-makefile: relax coverage requirements
index 855025e13b83e80beec8de63dbe5eb81f7f36848..03893b8630b28d16581f4942699ef56f6b14c16e 100644 (file)
 #endif
 
 /* This is for other GNU distributions with internationalized messages.  */
-#if (HAVE_LIBINTL_H && ENABLE_NLS) || defined _LIBC
+#ifdef _LIBC
 # include <libintl.h>
 # undef gettext
-# ifdef _LIBC
-#  define gettext(msgid) \
+# define gettext(msgid) \
   __dcgettext (_libc_intl_domainname, msgid, LC_MESSAGES)
-# else
-#  define gettext(msgid) dgettext (GNULIB_TEXT_DOMAIN, msgid)
-# endif
-#else
-# undef gettext
-# define gettext(msgid) (msgid)
-#endif
-
-#ifndef gettext_noop
-/* This define is so xgettext can find the internationalizable
-   strings.  */
 # define gettext_noop(String) String
+#else
+# include "gettext.h"
 #endif
 
 /* Number of ASCII characters.  */
index 34802a4a9408cc3907db47033ce6662108dce728..75e897edde79a455f3a01d23374b0f5839c68bef 100644 (file)
@@ -22,6 +22,7 @@ vararrays
 attribute               [test $ac_use_included_regex = yes]
 btowc                   [test $ac_use_included_regex = yes]
 builtin-expect          [test $ac_use_included_regex = yes]
+gettext-h               [test $ac_use_included_regex = yes]
 glibc-internal/dynarray [test $ac_use_included_regex = yes]
 gnulib-i18n             [test $ac_use_included_regex = yes]
 intprops                [test $ac_use_included_regex = yes]