aboutsummaryrefslogtreecommitdiff
path: root/.builds/netbsd.diff
blob: 14ca9af96a532df7435eb14c183b8ddcd60a99ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
diff --git a/stdlib.h b/stdlib.h
index 51dbb0c70836..f47d0b9467ee 100644
--- a/stdlib.h
+++ b/stdlib.h
@@ -186,12 +186,8 @@ void	 srandom(unsigned int) __RENAME(__srandom60);
 #endif
 #ifdef _NETBSD_SOURCE
 #define	RANDOM_MAX	0x7fffffff	/* (((long)1 << 31) - 1) */
-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 +202,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);
@@ -255,6 +249,24 @@ int	 posix_openpt(int);
 int	 posix_memalign(void **, size_t, size_t);
 #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 *);
+#ifdef _NETBSD_SOURCE
+int	 mkostemp(char *, int);
+int	 mkostemps(char *, int, int);
+#endif
+
+int	 getsubopt(char **, char * const *, char **);
+#endif
+
 /*
  * Implementation-defined extensions
  */
diff --git a/sys/cdefs.h b/sys/cdefs.h
index ac8f1e3b9faf..7370015eb513 100644
--- a/sys/cdefs.h
+++ b/sys/cdefs.h
@@ -499,13 +499,11 @@
 #endif
 
 #if !defined(_STANDALONE) && !defined(_KERNEL)
-#if defined(__GNUC__) || defined(__PCC__)
-#define	__RENAME(x)	___RENAME(x)
-#elif defined(__lint__)
+#if defined(__lint__)
 #define	__RENAME(x)	__symbolrename(x)
 #else
-#error "No function renaming possible"
-#endif /* __GNUC__ */
+#define	__RENAME(x)	___RENAME(x)
+#endif /* __lint__ */
 #else /* _STANDALONE || _KERNEL */
 #define	__RENAME(x)	no renaming in kernel/standalone environment
 #endif