+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
#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. */
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]