summaryrefslogtreecommitdiff
path: root/lib/wchar.in.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/wchar.in.h')
-rw-r--r--lib/wchar.in.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/lib/wchar.in.h b/lib/wchar.in.h
index 80b6652e95..6a5b18d39d 100644
--- a/lib/wchar.in.h
+++ b/lib/wchar.in.h
@@ -641,13 +641,25 @@ _GL_WARN_ON_USE (wmemchr, "wmemchr is unportable - "
/* Compare N wide characters of S1 and S2. */
#if @GNULIB_WMEMCMP@
-# if !@HAVE_WMEMCMP@
+# if @REPLACE_WMEMCMP@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef wmemcmp
+# define wmemcmp rpl_wmemcmp
+# endif
+_GL_FUNCDECL_RPL (wmemcmp, int,
+ (const wchar_t *s1, const wchar_t *s2, size_t n)
+ _GL_ATTRIBUTE_PURE);
+_GL_CXXALIAS_RPL (wmemcmp, int,
+ (const wchar_t *s1, const wchar_t *s2, size_t n));
+# else
+# if !@HAVE_WMEMCMP@
_GL_FUNCDECL_SYS (wmemcmp, int,
(const wchar_t *s1, const wchar_t *s2, size_t n)
_GL_ATTRIBUTE_PURE);
-# endif
+# endif
_GL_CXXALIAS_SYS (wmemcmp, int,
(const wchar_t *s1, const wchar_t *s2, size_t n));
+# endif
# if __GLIBC__ >= 2
_GL_CXXALIASWARN (wmemcmp);
# endif