+2014-12-13 Keith Marshall <keithmarshall@users.sourceforge.net>
+
+ Some POSIX feature test adjustments.
+
+ * include/stdlib.h (mkstemp): Available since SUSv3, so requires...
+ [_POSIX_C_SOURCE >= 200112L]: ...this minimum level of POSIX support.
+ (mkdtemp): This didn't become available until SUSv4, so requires...
+ [_POSIX_C_SOURCE >= 200809L]: ...this increased feature level.
+
2014-12-11 Keith Marshall <keithmarshall@users.sourceforge.net>
Another CRT_INLINE function implementation rationalization.
#endif /* __MSVCRT__ */
#endif /* !__NO_ISOCEXT */
-#if !defined __STRICT_ANSI__
-/*
- * POSIX/BSD extensions in libmingwex.a; maybe these should be exposed only on
- * the basis of some POSIX or BSD specific feature tests, but for convenience,
- * we require only !__STRICT_ANSI__
- *
+/* POSIX/BSD extensions in libmingwex.a; these should be exposed only on
+ * the basis of appropriate POSIX or BSD specific feature tests...
*
* mkstemp(3) function support; added per feature request #2003.
- * POSIX wants _XOPEN_SOURCE >= 500, (implying _POSIX_C_SOURCE >= 200112L),
- * but, as noted above, we will settle for !__STRICT_ANSI__.
+ * POSIX wants _XOPEN_SOURCE >= 500, (implying _POSIX_C_SOURCE >= 200112L).
*/
+#if _POSIX_C_SOURCE >= 200112L
+
int __cdecl __MINGW_NOTHROW mkstemp( char * );
int __cdecl __MINGW_NOTHROW __mingw_mkstemp( int, char * );
int __cdecl __MINGW_NOTHROW mkstemp( char *__filename_template )
{ return __mingw_mkstemp( _MKSTEMP_INVOKE, __filename_template ); }
+#endif /* _POSIX_C_SOURCE >= 200112L (for mkstemp()) */
+
/* mkdtemp(3) function support: added as adjunct to feature request #2003.
- * POSIX wants _XOPEN_SOURCE >= 700, (implying _POSIX_C_SOURCE >= 200809L),
- * but once again, we will settle for !__STRICT_ANSI__.
+ * POSIX wants _XOPEN_SOURCE >= 700, (implying _POSIX_C_SOURCE >= 200809L).
*/
+#if _POSIX_C_SOURCE >= 200809L
+
char * __cdecl __MINGW_NOTHROW mkdtemp( char * );
char * __cdecl __MINGW_NOTHROW __mingw_mkdtemp( char * );
char * __cdecl __MINGW_NOTHROW mkdtemp( char *__dirname_template )
{ return __mingw_mkdtemp( __dirname_template ); }
-#endif /* (!__STRICT_ANSI__) */
+#endif /* _POSIX_C_SOURCE >= 200809L (for mkdtemp()) */
_END_C_DECLS