2017-01-28 Keith Marshall <keithmarshall@users.sourceforge.net>
+ Make strnlen() and wcsnlen() declaratively consistent.
+
+ * include/string.h (strnlen): Do not expose its declaration, unless...
+ [_POSIX_C_SOURCE >= 200809L]: ...this feature test is enabled.
+
+2017-01-28 Keith Marshall <keithmarshall@users.sourceforge.net>
+
Implement wcsnlen() API per feature request [#2332].
* mingwex/strnlen.s: Rename it as...
#endif /* ! __STRICT_ANSI__ */
+#if _POSIX_C_SOURCE >= 200809L
#if __MSVCRT_VERSION__ >= __MSVCR80_DLL
/* MSVCR80.DLL adds a (mostly) POSIX.1-2008 conforming strnlen(); (it's
* also available in MSVCRT.DLL from _WIN32_WINNT_VISTA onwards, but we
*/
_CRTIMP __cdecl __MINGW_NOTHROW char *strnlen (const char *, size_t);
-#elif _POSIX_C_SOURCE >= 200809L
+#else /* MSVCRT.DLL || pre-MSVCR80.DLL */
/* Emulation, to support recent POSIX.1; we prefer this for ALL versions
* of MSVCRT.DLL, (even those which already provide strnlen()); to avoid
* the GCC breakage noted above. (Note that we implement strnlen() with
__CRT_ALIAS size_t strnlen (const char *__text, size_t __maxlen)
{ return __mingw_strnlen (__text, __maxlen); }
+#endif /* MSVCRT.DLL || pre-MSVCR80.DLL */
#endif /* _POSIX_C_SOURCE >= 200809L */
#undef __STRING_H_SOURCED__