This is so regex can use localeinfo.[ch].
* modules/dfa (Files): Remove lib/localeinfo.c, lib/localeinfo.h.
(Depends-on): Remove c32tolower, c32toupper.  Add localeinfo.
(Include): Remove localeinfo.h.
* modules/localeinfo: New file.
---
 ChangeLog          |  9 +++++++++
 modules/dfa        |  6 +-----
 modules/localeinfo | 41 +++++++++++++++++++++++++++++++++++++++++
 3 files changed, 51 insertions(+), 5 deletions(-)
 create mode 100644 modules/localeinfo

diff --git a/ChangeLog b/ChangeLog
index 1280ae5e18..692becea0c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2026-05-05  Paul Eggert  <[email protected]>
+
+       localeinfo: new module
+       This is so regex can use localeinfo.[ch].
+       * modules/dfa (Files): Remove lib/localeinfo.c, lib/localeinfo.h.
+       (Depends-on): Remove c32tolower, c32toupper.  Add localeinfo.
+       (Include): Remove localeinfo.h.
+       * modules/localeinfo: New file.
+
 2026-05-04  Paul Eggert  <[email protected]>
 
        Pacify GCC 16 -Wkeyword-macro for ‘restrict’
diff --git a/modules/dfa b/modules/dfa
index f06d747a6d..b065b93823 100644
--- a/modules/dfa
+++ b/modules/dfa
@@ -4,8 +4,6 @@ DFA matcher that was initially used by GNU grep, gawk and 
diffutils
 Files:
 lib/dfa.c
 lib/dfa.h
-lib/localeinfo.c
-lib/localeinfo.h
 
 Depends-on:
 assert
@@ -13,8 +11,6 @@ c32isprint
 c32isspace
 c32rtomb
 c32tob
-c32tolower
-c32toupper
 c99
 ctype-h
 flexmember
@@ -22,6 +18,7 @@ gettext-h
 gnulib-i18n
 idx
 locale-h
+localeinfo
 mbrtoc32-regular
 mbszero
 regex
@@ -49,7 +46,6 @@ lib_SOURCES += dfa.c localeinfo.c
 
 Include:
 "dfa.h"
-"localeinfo.h"
 
 Link:
 $(LTLIBUNISTRING) when linking with libtool, $(LIBUNISTRING) otherwise
diff --git a/modules/localeinfo b/modules/localeinfo
new file mode 100644
index 0000000000..7981af292c
--- /dev/null
+++ b/modules/localeinfo
@@ -0,0 +1,41 @@
+Description:
+DFA matcher that was initially used by GNU grep, gawk and diffutils
+
+Files:
+lib/localeinfo.c
+lib/localeinfo.h
+
+Depends-on:
+bool
+c32tolower
+c32toupper
+c99
+limits-h
+mbrtoc32-regular
+mbszero
+uchar-h
+# The lonesome_lower array requires ISO C 23 semantics for char32_t.
+# But uchar-h-c23 has a global effect, therefore leave it to each package
+# to enable it.
+#uchar-h-c23
+verify
+
+configure.ac:
+
+Makefile.am:
+lib_SOURCES += localeinfo.c
+
+Include:
+"localeinfo.h"
+
+Link:
+$(LTLIBUNISTRING) when linking with libtool, $(LIBUNISTRING) otherwise
+$(MBRTOWC_LIB)
+$(LTLIBC32CONV) when linking with libtool, $(LIBC32CONV) otherwise
+$(LTLIBINTL) when linking with libtool, $(LIBINTL) otherwise
+
+License:
+GPL
+
+Maintainer:
+Jim Meyering, Paul Eggert
-- 
2.54.0


Reply via email to