summaryrefslogtreecommitdiffstats
path: root/sys/sys/cdefs.h
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2005-05-27 20:41:45 +0000
committermillert <millert@openbsd.org>2005-05-27 20:41:45 +0000
commitb6caff4677aa99652f823f36dcbce48274a21bf6 (patch)
treee49368f3e342074145ba8676f2bbe729a3d4a2e5 /sys/sys/cdefs.h
parentstep 1 in fixing bioctl commands intermixed with regular io. (diff)
downloadwireguard-openbsd-b6caff4677aa99652f823f36dcbce48274a21bf6.tar.xz
wireguard-openbsd-b6caff4677aa99652f823f36dcbce48274a21bf6.zip
If _POSIX_SOURCE is defined but _POSIX_C_SOURCE is not just
define _POSIX_C_SOURCE to 198808.
Diffstat (limited to 'sys/sys/cdefs.h')
-rw-r--r--sys/sys/cdefs.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h
index 323108c1953..ff1ed0b9e7b 100644
--- a/sys/sys/cdefs.h
+++ b/sys/sys/cdefs.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cdefs.h,v 1.16 2005/05/24 22:28:02 millert Exp $ */
+/* $OpenBSD: cdefs.h,v 1.17 2005/05/27 20:41:45 millert Exp $ */
/* $NetBSD: cdefs.h,v 1.16 1996/04/03 20:46:39 christos Exp $ */
/*
@@ -246,6 +246,9 @@
* The POSIX spec implies a specific value for __ISO_C_VISIBLE, though
* this may be overridden by the _ISOC99_SOURCE macro later.
*/
+#if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE)
+#define _POSIX_C_SOURCE 198808
+#endif
#ifdef _POSIX_C_SOURCE
# if (_POSIX_C_SOURCE - 0 >= 200112)
# define __POSIX_VISIBLE 200112
@@ -263,10 +266,10 @@
# define __POSIX_VISIBLE 199009
# define __ISO_C_VISIBLE 1990
# endif
-#elif defined(_POSIX_SOURCE)
+#else
# define __POSIX_VISIBLE 198808
-# define __ISO_C_VISIBLE 0
-#endif
+# define __ISO_C_VISIBLE 0
+#endif /* _POSIX_C_SOURCE */
/*
* _ANSI_SOURCE means to expose ANSI C89 interfaces only.