summaryrefslogtreecommitdiff
path: root/src/unistd/_POSIX2_C_VERSION.c
diff options
context:
space:
mode:
authorJakob Kaivo <jkk@ung.org>2019-02-09 16:48:54 -0500
committerJakob Kaivo <jkk@ung.org>2019-02-09 16:48:54 -0500
commitdecde27a8de0953d402df2db3716543b213b9755 (patch)
treebcbd13522737dd099b0bb9ee0528d94e726def52 /src/unistd/_POSIX2_C_VERSION.c
parent4e875ebbf1febc03cee6d80f3dd23cd01112f95c (diff)
add POSIX.2 identifiers
Diffstat (limited to 'src/unistd/_POSIX2_C_VERSION.c')
-rw-r--r--src/unistd/_POSIX2_C_VERSION.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/unistd/_POSIX2_C_VERSION.c b/src/unistd/_POSIX2_C_VERSION.c
new file mode 100644
index 00000000..44c9a0ba
--- /dev/null
+++ b/src/unistd/_POSIX2_C_VERSION.c
@@ -0,0 +1,20 @@
+#include <unistd.h>
+
+#if (defined _POSIX_C_SOURCE)
+#if _POSIX_C_SOURCE >= 200809L
+#define _POSIX2_C_VERSION (200809L)
+#elif _POSIX_C_SOURCE >= 200112L
+#define _POSIX2_C_VERSION (200112L)
+#elif _POSIX_C_SOURCE >= 199506L
+#define _POSIX2_C_VERSION (199506L)
+#elif _POSIX_C_SOURCE >= 2
+#define _POSIX2_C_VERSION (199209L)
+#else
+#undef _POSIX2_C_VERSION
+#endif
+#endif
+
+/*
+POSIX(2)
+*/
+