Module Name: src
Committed By: christos
Date: Sat Jul 3 14:07:13 UTC 2021
Modified Files:
src/include: stdlib.h
Log Message:
PR/56250: Michael Forney: mkstemp/mkdtemp not declared with
_POSIX_C_SOURCE=200809L
To generate a diff of this commit:
cvs rdiff -u -r1.122 -r1.123 src/include/stdlib.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/include/stdlib.h
diff -u src/include/stdlib.h:1.122 src/include/stdlib.h:1.123
--- src/include/stdlib.h:1.122 Tue May 26 17:49:29 2020
+++ src/include/stdlib.h Sat Jul 3 10:07:13 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: stdlib.h,v 1.122 2020/05/26 21:49:29 joerg Exp $ */
+/* $NetBSD: stdlib.h,v 1.123 2021/07/03 14:07:13 christos Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -190,8 +190,6 @@ int mkostemp(char *, int);
int mkostemps(char *, int, int);
#endif
-char *mkdtemp(char *);
-int mkstemp(char *);
char *mktemp(char *)
#ifdef __MKTEMP_OK__
__RENAME(_mktemp)
@@ -206,8 +204,6 @@ int ttyslot(void);
void *valloc(size_t); /* obsoleted by malloc() */
-int getsubopt(char **, char * const *, char **);
-
int grantpt(int);
int unlockpt(int);
char *ptsname(int);
@@ -256,6 +252,20 @@ int posix_memalign(void **, size_t, siz
#endif
/*
+ * The Open Group Base Specifications, Issue 7; IEEE Std 1003.1-2008 (POSIX)
+ * or
+ * X/Open Portability Guide >= Issue 4 Version 2
+ */
+#if (_POSIX_C_SOURCE - 0) >= 200809L || \
+ (defined(_XOPEN_SOURCE) && defined(_XOPEN_SOURCE_EXTENDED)) || \
+ (_XOPEN_SOURCE - 0) >= 500 || defined(_NETBSD_SOURCE)
+char *mkdtemp(char *);
+int mkstemp(char *);
+
+int getsubopt(char **, char * const *, char **);
+#endif
+
+/*
* Implementation-defined extensions
*/
#if defined(_NETBSD_SOURCE)