]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
gen-uni-tables: Fix compilation error (regression 2025-09-17).
authorBruno Haible <bruno@clisp.org>
Tue, 23 Sep 2025 19:44:46 +0000 (21:44 +0200)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Sep 2025 19:44:46 +0000 (21:44 +0200)
* lib/gen-uni-tables.c (streq, memeq): Move definitions before their
first use.

ChangeLog
lib/gen-uni-tables.c

index 02df4f6732dbabd4dbfed2df02ea0e881a535678..a942e53a403605963569b6cc78962686a830cc5f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2025-09-23  Bruno Haible  <bruno@clisp.org>
+
+       gen-uni-tables: Fix compilation error (regression 2025-09-17).
+       * lib/gen-uni-tables.c (streq, memeq): Move definitions before their
+       first use.
+
 2025-09-23  Bruno Haible  <bruno@clisp.org>
 
        Clarify link dependency towards libgcrypt or OpenSSL's libcrypto.
index 97f8ff4b0d8c5fc0cc7c1316ca0ef4bd63d3f4db..00c52fe757f01a876c813155aef40e3439c1646b 100644 (file)
 /* Utility functions.  */
 
 static bool
-str_startswith (const char *string, const char *prefix)
+streq (char const *s1, char const *s2)
 {
-  return strncmp (string, prefix, strlen (prefix)) == 0;
+  return strcmp (s1, s2) == 0;
 }
 
 static bool
-str_endswith (const char *string, const char *suffix)
+memeq (void const *s1, void const *s2, size_t n)
 {
-  size_t len = strlen (string);
-  size_t n = strlen (suffix);
-  return len >= n && streq (string + len - n, suffix);
+  return memcmp (s1, s2, n) == 0;
 }
 
 static bool
-memeq (void const *s1, void const *s2, size_t n)
+str_startswith (const char *string, const char *prefix)
 {
-  return !memcmp (s1, s2, n);
+  return strncmp (string, prefix, strlen (prefix)) == 0;
 }
 
 static bool
-streq (char const *s1, char const *s2)
+str_endswith (const char *string, const char *suffix)
 {
-  return !strcmp (s1, s2);
+  size_t len = strlen (string);
+  size_t n = strlen (suffix);
+  return len >= n && streq (string + len - n, suffix);
 }
 
 /* ========================================================================= */