+2025-09-19 Bruno Haible <bruno@clisp.org>
+
+ stringeq: Fix use in C++ mode.
+ * lib/string.in.h (memeq, streq): Define with "C" linkage.
+
2025-09-19 Bruno Haible <bruno@clisp.org>
map-c++-tests: Fix compilation error (regression 2025-09-17).
/* Are S1 and S2, of size N, bytewise equal? */
#if @GNULIB_STRINGEQ@ && !@HAVE_DECL_MEMEQ@
+# ifdef __cplusplus
+extern "C" {
+# endif
_GL_STRING_INLINE bool
memeq (void const *__s1, void const *__s2, size_t __n)
{
return !memcmp (__s1, __s2, __n);
}
+# ifdef __cplusplus
+}
+# endif
#endif
/* Return the first occurrence of NEEDLE in HAYSTACK. */
/* Are strings S1 and S2 equal? */
#if @GNULIB_STRINGEQ@ && !@HAVE_DECL_STREQ@
+# ifdef __cplusplus
+extern "C" {
+# endif
_GL_STRING_INLINE bool
streq (char const *__s1, char const *__s2)
{
return !strcmp (__s1, __s2);
}
+# ifdef __cplusplus
+}
+# endif
#endif
/* Append no more than N characters from SRC onto DEST. */