diff --git a/gl/wchar.in.h b/gl/wchar.in.h
index cc436b14b0386eda6a4d9efd8e34e905201132e8..cc5baad3c07c8e624bf3d5b05a590ebd571a63c6 100644 (file)
--- a/gl/wchar.in.h
+++ b/gl/wchar.in.h
@@ -264,7 +264,11 @@ extern size_t wcsrtombs (char *dest, const wchar_t **srcp, size_t len, mbstate_t
/* Convert a wide string to a string. */
#if @GNULIB_WCSNRTOMBS@
-# if !@HAVE_WCSNRTOMBS@
+# if @REPLACE_WCSNRTOMBS@
+# undef wcsnrtombs
+# define wcsnrtombs rpl_wcsnrtombs
+# endif
+# if !@HAVE_WCSNRTOMBS@ || @REPLACE_WCSNRTOMBS@
extern size_t wcsnrtombs (char *dest, const wchar_t **srcp, size_t srclen, size_t len, mbstate_t *ps);
# endif
#elif defined GNULIB_POSIXCHECK