* lib/setlocale.c (setlocale_unixlike): Accept "POSIX" as an alias for
"C".
+2017-04-21 Bruno Haible <bruno@clisp.org>
+
+ Fix test-mbrtowc5.sh failure on native Windows.
+ * lib/setlocale.c (setlocale_unixlike): Accept "POSIX" as an alias for
+ "C".
+
2017-04-21 Bruno Haible <bruno@clisp.org>
Avoid accidental use of native Windows APIs on Cygwin.
char ll_buf[64];
char CC_buf[64];
+ /* The native Windows implementation of setlocale understands the special
+ locale name "C", but not "POSIX". Therefore map "POSIX" to "C". */
+#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
+ if (locale != NULL && strcmp (locale, "POSIX") == 0)
+ locale = "C";
+#endif
+
/* First, try setlocale with the original argument unchanged. */
result = setlocale (category, locale);
if (result != NULL)