The module name 'streq' is confusing, given that we have a new module
'stringeq' that defines a function/macro streq().

As a first step to fixing this confusion, let me rename the old 'streq'
module from 2007 to 'streq-opt'.


2026-02-21  Bruno Haible  <[email protected]>

        streq: Rename to streq-opt.
        * lib/streq-opt.h: Renamed from lib/streq.h.
        * modules/streq-opt: Renamed from modules/streq.
        * NEWS: Mention the change.
        * lib/c32is-impl.h: Include streq-opt.h instead of streq.h.
        * lib/c32to-impl.h: Likewise.
        * lib/c32rtomb.c: Likewise.
        * lib/c32width.c: Likewise.
        * lib/lc-charset-dispatch.c: Likewise.
        * lib/lc-charset-unicode.c: Likewise.
        * lib/mbrtoc32.c: Likewise.
        * lib/uniwidth/cjk.h: Likewise.
        * lib/wcwidth.c: Likewise.
        * modules/c32is* (Depends-on): Add streq-opt. Remove streq.
        * modules/c32to* (Depends-on): Likewise.
        * modules/c32rtomb (Depends-on): Likewise.
        * modules/mbrtoc32 (Depends-on): Likewise.
        * modules/mbrtowc (Depends-on): Likewise.
        * modules/uchar-h-c23 (Depends-on): Likewise.
        * modules/unilbrk/u*-possible-linebreaks (Depends-on): Likewise.
        * modules/uniwidth/width (Depends-on): Likewise.
        * modules/wcwidth (Depends-on): Likewise.
        * MODULES.html.sh: Update.

diff --git a/MODULES.html.sh b/MODULES.html.sh
index a5e108365e..b274c56960 100755
--- a/MODULES.html.sh
+++ b/MODULES.html.sh
@@ -1870,7 +1870,7 @@ func_all_modules ()
   func_module strcasestr
   func_module strcasestr-simple
   func_module strchrnul
-  func_module streq
+  func_module streq-opt
   func_module strerrorname_np
   func_module strerror_r-posix
   func_module string-buffer
diff --git a/NEWS b/NEWS
index 5fea672149..10790f391b 100644
--- a/NEWS
+++ b/NEWS
@@ -78,6 +78,9 @@ User visible incompatible changes
 
 Date        Modules         Changes
 
+2026-02-21  streq           This module is renamed to 'streq-opt'. Its include
+                            file is renamed from "streq.h" to "streq-opt.h".
+
 2025-12-04  issymlinkat     The include file is changed from "issymlink.h" to
                             "issymlinkat.h".
 
diff --git a/lib/c32is-impl.h b/lib/c32is-impl.h
index 7fa7929186..2cd03dc4d2 100644
--- a/lib/c32is-impl.h
+++ b/lib/c32is-impl.h
@@ -25,7 +25,7 @@
 
 #if GNULIB_defined_mbstate_t
 # include "localcharset.h"
-# include "streq.h"
+# include "streq-opt.h"
 #endif
 
 #if GL_CHAR32_T_IS_UNICODE
diff --git a/lib/c32rtomb.c b/lib/c32rtomb.c
index 2969fe3e57..74d38ed754 100644
--- a/lib/c32rtomb.c
+++ b/lib/c32rtomb.c
@@ -26,7 +26,7 @@
 
 #include "attribute.h" /* FALLTHROUGH */
 #include "localcharset.h"
-#include "streq.h"
+#include "streq-opt.h"
 
 #if GL_CHAR32_T_IS_UNICODE
 # include "lc-charset-unicode.h"
diff --git a/lib/c32to-impl.h b/lib/c32to-impl.h
index 2528e51dc1..f6eaf5fdb4 100644
--- a/lib/c32to-impl.h
+++ b/lib/c32to-impl.h
@@ -21,7 +21,7 @@
 
 #if GNULIB_defined_mbstate_t
 # include "localcharset.h"
-# include "streq.h"
+# include "streq-opt.h"
 #endif
 
 #if GL_CHAR32_T_IS_UNICODE
diff --git a/lib/c32width.c b/lib/c32width.c
index 727c2bd34b..da944cfe74 100644
--- a/lib/c32width.c
+++ b/lib/c32width.c
@@ -29,7 +29,7 @@
 #endif
 
 #if GNULIB_defined_mbstate_t
-# include "streq.h"
+# include "streq-opt.h"
 #endif
 
 #include "localcharset.h"
diff --git a/lib/lc-charset-dispatch.c b/lib/lc-charset-dispatch.c
index 53a9b2cd9b..09f83f1887 100644
--- a/lib/lc-charset-dispatch.c
+++ b/lib/lc-charset-dispatch.c
@@ -24,7 +24,7 @@
 #if GNULIB_defined_mbstate_t
 
 # include "localcharset.h"
-# include "streq.h"
+# include "streq-opt.h"
 
 # if GNULIB_WCHAR_SINGLE_LOCALE
 /* When we know that the locale does not change, provide a speedup by
diff --git a/lib/lc-charset-unicode.c b/lib/lc-charset-unicode.c
index fada05f8c7..2d8941a2dc 100644
--- a/lib/lc-charset-unicode.c
+++ b/lib/lc-charset-unicode.c
@@ -35,7 +35,7 @@
 # include <wchar.h>
 
 # include "localcharset.h"
-# include "streq.h"
+# include "streq-opt.h"
 # include "glthread/once.h"
 # include "glthread/tls.h"
 # include "unistr.h"
diff --git a/lib/mbrtoc32.c b/lib/mbrtoc32.c
index 4c8f526701..f3570f73ff 100644
--- a/lib/mbrtoc32.c
+++ b/lib/mbrtoc32.c
@@ -87,7 +87,7 @@ mbrtoc32 (char32_t *pwc, const char *s, size_t n, mbstate_t 
*ps)
 # include <wchar.h>
 
 # include "localcharset.h"
-# include "streq.h"
+# include "streq-opt.h"
 
 # if MBRTOC32_IN_C_LOCALE_MAYBE_EILSEQ
 #  include "hard-locale.h"
diff --git a/lib/streq.h b/lib/streq-opt.h
similarity index 98%
rename from lib/streq.h
rename to lib/streq-opt.h
index 505fc4ae37..31f0e77583 100644
--- a/lib/streq.h
+++ b/lib/streq-opt.h
@@ -16,8 +16,8 @@
 
 /* Written by Bruno Haible <[email protected]>.  */
 
-#ifndef _GL_STREQ_H
-#define _GL_STREQ_H
+#ifndef _GL_STREQ_OPT_H
+#define _GL_STREQ_OPT_H
 
 #include <string.h>
 
@@ -183,4 +183,4 @@ streq0 (const char *s1, const char *s2, char s20, char s21, 
char s22, char s23,
 }
 #endif
 
-#endif /* _GL_STREQ_H */
+#endif /* _GL_STREQ_OPT_H */
diff --git a/lib/uniwidth/cjk.h b/lib/uniwidth/cjk.h
index bcd49fbf4e..9fc0dbdec3 100644
--- a/lib/uniwidth/cjk.h
+++ b/lib/uniwidth/cjk.h
@@ -15,7 +15,7 @@
    You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
-#include "streq.h"
+#include "streq-opt.h"
 
 static int
 is_cjk_encoding (const char *encoding)
diff --git a/lib/wcwidth.c b/lib/wcwidth.c
index ffcc977843..0f5c5ea4b0 100644
--- a/lib/wcwidth.c
+++ b/lib/wcwidth.c
@@ -23,7 +23,7 @@
 #include <wctype.h>
 
 #include "localcharset.h"
-#include "streq.h"
+#include "streq-opt.h"
 #include "uniwidth.h"
 
 /* Returns 1 if the current locale is an UTF-8 locale, 0 otherwise.  */
diff --git a/modules/c32isalnum b/modules/c32isalnum
index 04ed803cb2..c3a5201a5d 100644
--- a/modules/c32isalnum
+++ b/modules/c32isalnum
@@ -18,7 +18,7 @@ uchar-h
 wchar-h
 wctype-h
 localcharset    [test $REPLACE_MBSTATE_T = 1]
-streq           [test $REPLACE_MBSTATE_T = 1]
+streq-opt       [test $REPLACE_MBSTATE_T = 1]
 unictype/ctype-alnum
 assert-h
 
diff --git a/modules/c32isalpha b/modules/c32isalpha
index 6964786445..f23147b1c6 100644
--- a/modules/c32isalpha
+++ b/modules/c32isalpha
@@ -18,7 +18,7 @@ uchar-h
 wchar-h
 wctype-h
 localcharset    [test $REPLACE_MBSTATE_T = 1]
-streq           [test $REPLACE_MBSTATE_T = 1]
+streq-opt       [test $REPLACE_MBSTATE_T = 1]
 unictype/ctype-alpha
 assert-h
 
diff --git a/modules/c32isblank b/modules/c32isblank
index dfaf3deb43..03cfc26459 100644
--- a/modules/c32isblank
+++ b/modules/c32isblank
@@ -19,7 +19,7 @@ wchar-h
 wctype-h
 iswblank
 localcharset    [test $REPLACE_MBSTATE_T = 1]
-streq           [test $REPLACE_MBSTATE_T = 1]
+streq-opt       [test $REPLACE_MBSTATE_T = 1]
 unictype/ctype-blank
 assert-h
 
diff --git a/modules/c32iscntrl b/modules/c32iscntrl
index 46c9ce692f..0b438c9526 100644
--- a/modules/c32iscntrl
+++ b/modules/c32iscntrl
@@ -18,7 +18,7 @@ uchar-h
 wchar-h
 wctype-h
 localcharset    [test $REPLACE_MBSTATE_T = 1]
-streq           [test $REPLACE_MBSTATE_T = 1]
+streq-opt       [test $REPLACE_MBSTATE_T = 1]
 unictype/ctype-cntrl
 assert-h
 
diff --git a/modules/c32isdigit b/modules/c32isdigit
index 29ffcb8905..98eeb05247 100644
--- a/modules/c32isdigit
+++ b/modules/c32isdigit
@@ -19,7 +19,7 @@ wchar-h
 wctype-h
 iswdigit
 localcharset    [test $REPLACE_MBSTATE_T = 1]
-streq           [test $REPLACE_MBSTATE_T = 1]
+streq-opt       [test $REPLACE_MBSTATE_T = 1]
 unictype/ctype-digit
 assert-h
 
diff --git a/modules/c32isgraph b/modules/c32isgraph
index d99a6603b5..4c3efd9d5b 100644
--- a/modules/c32isgraph
+++ b/modules/c32isgraph
@@ -18,7 +18,7 @@ uchar-h
 wchar-h
 wctype-h
 localcharset    [test $REPLACE_MBSTATE_T = 1]
-streq           [test $REPLACE_MBSTATE_T = 1]
+streq-opt       [test $REPLACE_MBSTATE_T = 1]
 unictype/ctype-graph
 assert-h
 
diff --git a/modules/c32islower b/modules/c32islower
index 01c61a8b91..6d4d0eeeb3 100644
--- a/modules/c32islower
+++ b/modules/c32islower
@@ -18,7 +18,7 @@ uchar-h
 wchar-h
 wctype-h
 localcharset    [test $REPLACE_MBSTATE_T = 1]
-streq           [test $REPLACE_MBSTATE_T = 1]
+streq-opt       [test $REPLACE_MBSTATE_T = 1]
 unictype/ctype-lower
 assert-h
 
diff --git a/modules/c32isprint b/modules/c32isprint
index aefc14d67d..0035d5a2a7 100644
--- a/modules/c32isprint
+++ b/modules/c32isprint
@@ -18,7 +18,7 @@ uchar-h
 wchar-h
 wctype-h
 localcharset    [test $REPLACE_MBSTATE_T = 1]
-streq           [test $REPLACE_MBSTATE_T = 1]
+streq-opt       [test $REPLACE_MBSTATE_T = 1]
 unictype/ctype-print
 assert-h
 
diff --git a/modules/c32ispunct b/modules/c32ispunct
index 08d2fbb4f7..b2bf734121 100644
--- a/modules/c32ispunct
+++ b/modules/c32ispunct
@@ -20,7 +20,7 @@ wchar-h
 wctype-h
 iswpunct
 localcharset    [test $REPLACE_MBSTATE_T = 1]
-streq           [test $REPLACE_MBSTATE_T = 1]
+streq-opt       [test $REPLACE_MBSTATE_T = 1]
 unictype/ctype-punct
 assert-h
 
diff --git a/modules/c32isspace b/modules/c32isspace
index cdb23a31fe..c3f8e4603f 100644
--- a/modules/c32isspace
+++ b/modules/c32isspace
@@ -18,7 +18,7 @@ uchar-h
 wchar-h
 wctype-h
 localcharset    [test $REPLACE_MBSTATE_T = 1]
-streq           [test $REPLACE_MBSTATE_T = 1]
+streq-opt       [test $REPLACE_MBSTATE_T = 1]
 unictype/ctype-space
 assert-h
 
diff --git a/modules/c32isupper b/modules/c32isupper
index 801cd2d6a6..5c05f11b3d 100644
--- a/modules/c32isupper
+++ b/modules/c32isupper
@@ -18,7 +18,7 @@ uchar-h
 wchar-h
 wctype-h
 localcharset    [test $REPLACE_MBSTATE_T = 1]
-streq           [test $REPLACE_MBSTATE_T = 1]
+streq-opt       [test $REPLACE_MBSTATE_T = 1]
 unictype/ctype-upper
 assert-h
 
diff --git a/modules/c32isxdigit b/modules/c32isxdigit
index 3591b1c076..a20caeaa94 100644
--- a/modules/c32isxdigit
+++ b/modules/c32isxdigit
@@ -20,7 +20,7 @@ wchar-h
 wctype-h
 iswxdigit
 localcharset    [test $REPLACE_MBSTATE_T = 1]
-streq           [test $REPLACE_MBSTATE_T = 1]
+streq-opt       [test $REPLACE_MBSTATE_T = 1]
 unictype/ctype-xdigit
 assert-h
 
diff --git a/modules/c32rtomb b/modules/c32rtomb
index 8a4e0a0f94..1b1bd000d0 100644
--- a/modules/c32rtomb
+++ b/modules/c32rtomb
@@ -16,7 +16,7 @@ attribute       [test $HAVE_C32RTOMB = 0 || test 
$REPLACE_C32RTOMB = 1]
 wchar-h         [test $HAVE_C32RTOMB = 0 || test $REPLACE_C32RTOMB = 1]
 wcrtomb         [test $HAVE_C32RTOMB = 0 || test $REPLACE_C32RTOMB = 1]
 localcharset    [{ test $HAVE_C32RTOMB = 0 || test $REPLACE_C32RTOMB = 1; } && 
test $SMALL_WCHAR_T = 1]
-streq           [{ test $HAVE_C32RTOMB = 0 || test $REPLACE_C32RTOMB = 1; } && 
test $SMALL_WCHAR_T = 1]
+streq-opt       [{ test $HAVE_C32RTOMB = 0 || test $REPLACE_C32RTOMB = 1; } && 
test $SMALL_WCHAR_T = 1]
 
 configure.ac:
 gl_FUNC_C32RTOMB
diff --git a/modules/c32tolower b/modules/c32tolower
index 139c7e2eee..95dc427cd2 100644
--- a/modules/c32tolower
+++ b/modules/c32tolower
@@ -18,7 +18,7 @@ uchar-h
 wchar-h
 wctype-h
 localcharset    [test $REPLACE_MBSTATE_T = 1]
-streq           [test $REPLACE_MBSTATE_T = 1]
+streq-opt       [test $REPLACE_MBSTATE_T = 1]
 unicase/tolower
 assert-h
 
diff --git a/modules/c32toupper b/modules/c32toupper
index 10f023742a..f6a83a3d48 100644
--- a/modules/c32toupper
+++ b/modules/c32toupper
@@ -18,7 +18,7 @@ uchar-h
 wchar-h
 wctype-h
 localcharset    [test $REPLACE_MBSTATE_T = 1]
-streq           [test $REPLACE_MBSTATE_T = 1]
+streq-opt       [test $REPLACE_MBSTATE_T = 1]
 unicase/toupper
 assert-h
 
diff --git a/modules/mbrtoc32 b/modules/mbrtoc32
index ac2391dd79..f8f8257517 100644
--- a/modules/mbrtoc32
+++ b/modules/mbrtoc32
@@ -31,7 +31,7 @@ mbsinit         [{ test $HAVE_MBRTOC32 = 0 || test 
$REPLACE_MBRTOC32 = 1; } && t
 mbszero         [{ test $HAVE_MBRTOC32 = 0 || test $REPLACE_MBRTOC32 = 1; } && 
test $REPLACE_MBSTATE_T = 0]
 assert-h        [test $HAVE_MBRTOC32 = 0 || test $REPLACE_MBRTOC32 = 1]
 localcharset    [test $HAVE_MBRTOC32 = 0 || test $REPLACE_MBRTOC32 = 1]
-streq           [test $HAVE_MBRTOC32 = 0 || test $REPLACE_MBRTOC32 = 1]
+streq-opt       [test $HAVE_MBRTOC32 = 0 || test $REPLACE_MBRTOC32 = 1]
 
 configure.ac:
 gl_FUNC_MBRTOC32
diff --git a/modules/mbrtowc b/modules/mbrtowc
index 7a989178f2..cba9487814 100644
--- a/modules/mbrtowc
+++ b/modules/mbrtowc
@@ -28,7 +28,7 @@ hard-locale     [{ test $HAVE_MBRTOWC = 0 || test 
$REPLACE_MBRTOWC = 1; } && tes
 mbsinit         [{ test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; } && 
test $REPLACE_MBSTATE_T = 0]
 assert-h        [test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1]
 localcharset    [test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1]
-streq           [test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1]
+streq-opt       [test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1]
 
 configure.ac:
 gl_FUNC_MBRTOWC
diff --git a/modules/streq b/modules/streq-opt
similarity index 82%
rename from modules/streq
rename to modules/streq-opt
index aadce69305..6a6ce63402 100644
--- a/modules/streq
+++ b/modules/streq-opt
@@ -2,7 +2,7 @@ Description:
 Optimized string comparison.
 
 Files:
-lib/streq.h
+lib/streq-opt.h
 
 Depends-on:
 stringeq
@@ -12,7 +12,7 @@ configure.ac:
 Makefile.am:
 
 Include:
-"streq.h"
+"streq-opt.h"
 
 License:
 LGPLv2+
diff --git a/modules/uchar-h-c23 b/modules/uchar-h-c23
index dec9eaec03..b22f68a6ab 100644
--- a/modules/uchar-h-c23
+++ b/modules/uchar-h-c23
@@ -10,7 +10,7 @@ uchar-h
 wchar-h
 iconv
 localcharset
-streq
+streq-opt
 once
 tls
 mbszero
diff --git a/modules/unilbrk/u16-possible-linebreaks 
b/modules/unilbrk/u16-possible-linebreaks
index 60a5288108..f2d0c1bde2 100644
--- a/modules/unilbrk/u16-possible-linebreaks
+++ b/modules/unilbrk/u16-possible-linebreaks
@@ -10,7 +10,7 @@ Depends-on:
 unilbrk/base
 unilbrk/tables
 unistr/u16-mbtouc-unsafe
-streq
+streq-opt
 
 configure.ac:
 gl_LIBUNISTRING_MODULE([1.4], [unilbrk/u16-possible-linebreaks])
diff --git a/modules/unilbrk/u32-possible-linebreaks 
b/modules/unilbrk/u32-possible-linebreaks
index 5921768fc0..fcae636d5d 100644
--- a/modules/unilbrk/u32-possible-linebreaks
+++ b/modules/unilbrk/u32-possible-linebreaks
@@ -9,7 +9,7 @@ lib/uniwidth/cjk.h
 Depends-on:
 unilbrk/base
 unilbrk/tables
-streq
+streq-opt
 
 configure.ac:
 gl_LIBUNISTRING_MODULE([1.4], [unilbrk/u32-possible-linebreaks])
diff --git a/modules/unilbrk/u8-possible-linebreaks 
b/modules/unilbrk/u8-possible-linebreaks
index bc47767d23..43b933b39a 100644
--- a/modules/unilbrk/u8-possible-linebreaks
+++ b/modules/unilbrk/u8-possible-linebreaks
@@ -10,7 +10,7 @@ Depends-on:
 unilbrk/base
 unilbrk/tables
 unistr/u8-mbtouc-unsafe
-streq
+streq-opt
 
 configure.ac:
 gl_LIBUNISTRING_MODULE([1.4], [unilbrk/u8-possible-linebreaks])
diff --git a/modules/uniwidth/width b/modules/uniwidth/width
index 323221f280..68faff17a2 100644
--- a/modules/uniwidth/width
+++ b/modules/uniwidth/width
@@ -10,7 +10,7 @@ lib/unictype/bitmap.h
 
 Depends-on:
 uniwidth/base
-streq
+streq-opt
 
 configure.ac:
 gl_LIBUNISTRING_MODULE([1.4], [uniwidth/width])
diff --git a/modules/wcwidth b/modules/wcwidth
index d1cae49918..0573636a4c 100644
--- a/modules/wcwidth
+++ b/modules/wcwidth
@@ -11,7 +11,7 @@ wchar-h
 extensions
 wctype-h        [test $HAVE_WCWIDTH = 0 || test $REPLACE_WCWIDTH = 1]
 localcharset    [test $HAVE_WCWIDTH = 0 || test $REPLACE_WCWIDTH = 1]
-streq           [test $HAVE_WCWIDTH = 0 || test $REPLACE_WCWIDTH = 1]
+streq-opt       [test $HAVE_WCWIDTH = 0 || test $REPLACE_WCWIDTH = 1]
 uniwidth/width  [test $HAVE_WCWIDTH = 0 || test $REPLACE_WCWIDTH = 1]
 
 configure.ac:




Reply via email to