OSDN Git Service

Correct erroneous mkstemp() availability condition.
authorKeith Marshall <keith@users.osdn.me>
Sat, 29 May 2021 22:02:20 +0000 (23:02 +0100)
committerKeith Marshall <keith@users.osdn.me>
Sat, 29 May 2021 22:02:20 +0000 (23:02 +0100)
mingwrt/ChangeLog
mingwrt/include/stdlib.h

index 345bd47..93d1452 100644 (file)
@@ -1,3 +1,12 @@
+2021-05-29  Keith Marshall  <keith@users.osdn.me>
+
+       Correct erroneous mkstemp() availability condition.
+
+       * include/stdlib.h (mkstemp): POSIX requires...
+       [_XOPEN_SOURCE >= 500]: ...this, which is equivalent to...
+       [_POSIX_C_SOURCE >= 199506L]: ...this, and not (as we had it)...
+       [_POSIX_C_SOURCE >= 200112L]: ...this; correct it.
+
 2021-05-23  Keith Marshall  <keith@users.osdn.me>
 
        Add a makefile clarification comment.
index cb21431..e183d1b 100644 (file)
@@ -905,9 +905,9 @@ __cdecl __MINGW_NOTHROW  wchar_t *ulltow (unsigned long long __n, wchar_t * __w,
  * 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).
+ * POSIX wants _XOPEN_SOURCE >= 500, (implying _POSIX_C_SOURCE >= 199506L).
  */
-#if _POSIX_C_SOURCE >= 200112L
+#if _POSIX_C_SOURCE >= 199506L
 
 __cdecl __MINGW_NOTHROW  int mkstemp (char *);
 __cdecl __MINGW_NOTHROW  int __mingw_mkstemp (int, char *);
@@ -955,7 +955,7 @@ __CRT_ALIAS __LIBIMPL__(( FUNCTION = mkstemp ))
 __cdecl __MINGW_NOTHROW  int mkstemp (char *__filename_template)
 { return __mingw_mkstemp( _MKSTEMP_INVOKE, __filename_template ); }
 
-#endif /* _POSIX_C_SOURCE >= 200112L (for mkstemp()) */
+#endif /* _POSIX_C_SOURCE >= 199506L (for mkstemp()) */
 
 /* mkdtemp(3) function support: added as adjunct to feature request #2003.
  * POSIX wants _XOPEN_SOURCE >= 700, (implying _POSIX_C_SOURCE >= 200809L).