Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/include PR/56250: Michael Forney: mkstemp/mkdtemp not declar...



details: https://anonhg.NetBSD.org/src/rev/c1a76d78813d
branches: trunk
changeset: 380045:c1a76d78813d
user: christos <christos%NetBSD.org@localhost>
date: Sat Jul 03 14:07:13 2021 +0000
description:
PR/56250: Michael Forney: mkstemp/mkdtemp not declared with
_POSIX_C_SOURCE=200809L
diffstat:
 include/stdlib.h | 20 +++++++++++++++-----
 1 files changed, 15 insertions(+), 5 deletions(-)
diffs (48 lines):
diff -r 0687880641ca -r c1a76d78813d include/stdlib.h
--- a/include/stdlib.h Sat Jul 03 09:39:26 2021 +0000
+++ b/include/stdlib.h Sat Jul 03 14:07:13 2021 +0000
@@ -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)


Home | Main Index | Thread Index | Old Index

AltStyle によって変換されたページ (->オリジナル) /