summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Dempsky <matthew@cvs.openbsd.org>2012-05-14 23:21:36 +0000
committerMatthew Dempsky <matthew@cvs.openbsd.org>2012-05-14 23:21:36 +0000
commitf34de4ac3bcfea14b03ed33d297b02f5209d2b3b (patch)
tree27e63f982ad40f3674a751bac41dfe5a06036e75
parentfcb7bf2bab0bb5e35869990db556288057799c4d (diff)
More sysconf(3)-y and pathconf(3)-y goodness from Brad.
ok guenther, millert (and me); bulk build test by naddy
-rw-r--r--include/unistd.h102
-rw-r--r--lib/libc/gen/sysconf.c260
-rw-r--r--lib/libc/shlib_version2
-rw-r--r--lib/libpthread/include/pthread.h16
-rw-r--r--sys/sys/unistd.h135
5 files changed, 426 insertions, 89 deletions
diff --git a/include/unistd.h b/include/unistd.h
index a3c6f511988..1e398a4c3f4 100644
--- a/include/unistd.h
+++ b/include/unistd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: unistd.h,v 1.70 2012/04/12 12:33:03 deraadt Exp $ */
+/* $OpenBSD: unistd.h,v 1.71 2012/05/14 23:21:35 matthew Exp $ */
/* $NetBSD: unistd.h,v 1.26.4.1 1996/05/28 02:31:51 mrg Exp $ */
/*-
@@ -50,10 +50,102 @@
#define F_TEST 3 /* test a section for locks by other procs */
#endif
-#if __POSIX_VISIBLE
-#define _POSIX_REENTRANT_FUNCTIONS 1
-#define _POSIX_THREAD_SAFE_FUNCTIONS 200112L
-#endif
+/*
+ * POSIX options and option groups we unconditionally do or don't
+ * implement. Please keep this list in alphabetical order.
+ *
+ * Anything which is defined as zero below **must** have an
+ * implementation for the corresponding sysconf() which is able to
+ * determine conclusively whether or not the feature is supported.
+ * Anything which is defined as other than -1 below **must** have
+ * complete headers, types, and function declarations as specified by
+ * the POSIX standard; however, if the relevant sysconf() function
+ * returns -1, the functions may be stubbed out.
+ */
+#define _POSIX_ADVISORY_INFO (-1)
+#define _POSIX_ASYNCHRONOUS_IO (-1)
+#define _POSIX_BARRIERS 200112L
+#define _POSIX_CHOWN_RESTRICTED 1
+#define _POSIX_CLOCK_SELECTION (-1)
+#define _POSIX_CPUTIME (-1)
+#define _POSIX_FSYNC 200112L
+#define _POSIX_IPV6 0
+#define _POSIX_JOB_CONTROL 1
+#define _POSIX_MAPPED_FILES 200112L
+#define _POSIX_MEMLOCK 200112L
+#define _POSIX_MEMLOCK_RANGE 200112L
+#define _POSIX_MEMORY_PROTECTION 200112L
+#define _POSIX_MESSAGE_PASSING (-1)
+#define _POSIX_MONOTONIC_CLOCK 200112L
+#define _POSIX_NO_TRUNC 1
+#define _POSIX_PRIORITIZED_IO (-1)
+#define _POSIX_PRIORITY_SCHEDULING (-1)
+#define _POSIX_RAW_SOCKETS 200112L
+#define _POSIX_READER_WRITER_LOCKS 200112L
+#define _POSIX_REALTIME_SIGNALS (-1)
+#define _POSIX_REGEXP 1
+#define _POSIX_SAVED_IDS 1
+#define _POSIX_SEMAPHORES 200112L
+#define _POSIX_SHARED_MEMORY_OBJECTS (-1)
+#define _POSIX_SHELL 1
+#define _POSIX_SPAWN 200112L
+#define _POSIX_SPIN_LOCKS 200112L
+#define _POSIX_SPORADIC_SERVER (-1)
+#define _POSIX_SYNCHRONIZED_IO (-1)
+#define _POSIX_THREAD_ATTR_STACKADDR 200112L
+#define _POSIX_THREAD_ATTR_STACKSIZE 200112L
+#define _POSIX_THREAD_CPUTIME (-1)
+#define _POSIX_THREAD_PRIO_INHERIT (-1)
+#define _POSIX_THREAD_PRIO_PROTECT (-1)
+#define _POSIX_THREAD_PRIORITY_SCHEDULING (-1)
+#define _POSIX_THREAD_PROCESS_SHARED (-1)
+#define _POSIX_THREAD_ROBUST_PRIO_INHERIT (-1)
+#define _POSIX_THREAD_ROBUST_PRIO_PROTECT (-1)
+#define _POSIX_THREAD_SAFE_FUNCTIONS 200112L
+#define _POSIX_THREAD_SPORADIC_SERVER (-1)
+#define _POSIX_THREADS 200112L
+#define _POSIX_TIMEOUTS 200112L
+#define _POSIX_TIMERS (-1)
+#define _POSIX_TRACE (-1)
+#define _POSIX_TRACE_EVENT_FILTER (-1)
+#define _POSIX_TRACE_INHERIT (-1)
+#define _POSIX_TRACE_LOG (-1)
+#define _POSIX_TYPED_MEMORY_OBJECTS (-1)
+#define _POSIX2_C_BIND 200112L
+#define _POSIX2_C_DEV (-1) /* need C99 utility */
+#define _POSIX2_CHAR_TERM 1
+#define _POSIX2_FORT_DEV (-1) /* need fort77 utility */
+#define _POSIX2_FORT_RUN 200112L
+#define _POSIX2_LOCALEDEF (-1)
+#define _POSIX2_PBS (-1)
+#define _POSIX2_PBS_ACCOUNTING (-1)
+#define _POSIX2_PBS_CHECKPOINT (-1)
+#define _POSIX2_PBS_LOCATE (-1)
+#define _POSIX2_PBS_MESSAGE (-1)
+#define _POSIX2_PBS_TRACK (-1)
+#define _POSIX2_SW_DEV 200112L
+#define _POSIX2_UPE 200112L
+#define _POSIX_V6_ILP32_OFF32 (-1)
+#define _POSIX_V6_ILP32_OFFBIG 0
+#define _POSIX_V6_LP64_OFF64 0
+#define _POSIX_V6_LPBIG_OFFBIG 0
+#define _POSIX_V7_ILP32_OFF32 (-1)
+#define _POSIX_V7_ILP32_OFFBIG 0
+#define _POSIX_V7_LP64_OFF64 0
+#define _POSIX_V7_LPBIG_OFFBIG 0
+
+#define _XOPEN_CRYPT 1
+#define _XOPEN_ENH_I18N (-1) /* mandatory in XSI */
+#define _XOPEN_LEGACY (-1)
+#define _XOPEN_REALTIME (-1)
+#define _XOPEN_REALTIME_THREADS (-1)
+#define _XOPEN_SHM 1
+#define _XOPEN_STREAMS (-1)
+#define _XOPEN_UUCP (-1)
+#define _XOPEN_UNIX (-1)
+
+/* Define the POSIX.2 version we target for compliance. */
+#define _POSIX2_VERSION 199212L
#ifndef NULL
#ifdef __GNUG__
diff --git a/lib/libc/gen/sysconf.c b/lib/libc/gen/sysconf.c
index 838e1c485b2..76db49ae04c 100644
--- a/lib/libc/gen/sysconf.c
+++ b/lib/libc/gen/sysconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sysconf.c,v 1.14 2012/03/06 11:38:26 ajacoutot Exp $ */
+/* $OpenBSD: sysconf.c,v 1.15 2012/05/14 23:21:35 matthew Exp $ */
/*-
* Copyright (c) 1993
* The Regents of the University of California. All rights reserved.
@@ -37,9 +37,11 @@
#include <sys/time.h>
#include <sys/resource.h>
#include <sys/vmmeter.h>
+#include <sys/socket.h>
#include <errno.h>
#include <grp.h>
+#include <pthread.h>
#include <pwd.h>
#include <unistd.h>
@@ -60,7 +62,7 @@ sysconf(int name)
{
struct rlimit rl;
size_t len;
- int mib[3], value, namelen;
+ int mib[3], value, namelen, sverrno;
len = sizeof(value);
namelen = 2;
@@ -159,41 +161,23 @@ sysconf(int name)
mib[1] = USER_RE_DUP_MAX;
break;
case _SC_2_VERSION:
- mib[0] = CTL_USER;
- mib[1] = USER_POSIX2_VERSION;
- break;
+ return (_POSIX2_VERSION);
case _SC_2_C_BIND:
- mib[0] = CTL_USER;
- mib[1] = USER_POSIX2_C_BIND;
- goto yesno;
+ return (_POSIX2_C_BIND);
case _SC_2_C_DEV:
- mib[0] = CTL_USER;
- mib[1] = USER_POSIX2_C_DEV;
- goto yesno;
+ return (_POSIX2_C_DEV);
case _SC_2_CHAR_TERM:
- mib[0] = CTL_USER;
- mib[1] = USER_POSIX2_CHAR_TERM;
- goto yesno;
+ return (_POSIX2_CHAR_TERM);
case _SC_2_FORT_DEV:
- mib[0] = CTL_USER;
- mib[1] = USER_POSIX2_FORT_DEV;
- goto yesno;
+ return (_POSIX2_FORT_DEV);
case _SC_2_FORT_RUN:
- mib[0] = CTL_USER;
- mib[1] = USER_POSIX2_FORT_RUN;
- goto yesno;
+ return (_POSIX2_FORT_RUN);
case _SC_2_LOCALEDEF:
- mib[0] = CTL_USER;
- mib[1] = USER_POSIX2_LOCALEDEF;
- goto yesno;
+ return (_POSIX2_LOCALEDEF);
case _SC_2_SW_DEV:
- mib[0] = CTL_USER;
- mib[1] = USER_POSIX2_SW_DEV;
- goto yesno;
+ return (_POSIX2_SW_DEV);
case _SC_2_UPE:
- mib[0] = CTL_USER;
- mib[1] = USER_POSIX2_UPE;
- goto yesno;
+ return (_POSIX2_UPE);
/* XPG 4.2 */
case _SC_XOPEN_SHM:
@@ -220,6 +204,224 @@ yesno: if (sysctl(mib, namelen, &value, &len, NULL, 0) == -1)
return (MAXHOSTNAMELEN - 1); /* does not include \0 */
case _SC_MONOTONIC_CLOCK:
return (_POSIX_MONOTONIC_CLOCK);
+ case _SC_2_PBS:
+ case _SC_2_PBS_ACCOUNTING:
+ case _SC_2_PBS_CHECKPOINT:
+ case _SC_2_PBS_LOCATE:
+ case _SC_2_PBS_MESSAGE:
+ case _SC_2_PBS_TRACK:
+ return (_POSIX2_PBS);
+ case _SC_ADVISORY_INFO:
+ return (_POSIX_ADVISORY_INFO);
+ case _SC_ASYNCHRONOUS_IO:
+ return (_POSIX_ASYNCHRONOUS_IO);
+ case _SC_ATEXIT_MAX:
+ return (-1);
+ case _SC_BARRIERS:
+ return (_POSIX_BARRIERS);
+ case _SC_CLOCK_SELECTION:
+ return (_POSIX_CLOCK_SELECTION);
+ case _SC_CPUTIME:
+ return (_POSIX_CPUTIME);
+ case _SC_DELAYTIMER_MAX:
+ return (-1);
+ case _SC_IOV_MAX:
+ return (IOV_MAX);
+ case _SC_IPV6:
+#if _POSIX_IPV6 == 0
+ sverrno = errno;
+ value = socket(PF_INET6, SOCK_DGRAM, 0);
+ errno = sverrno;
+ if (value >= 0) {
+ close(value);
+ return (200112L);
+ } else
+ return (0);
+#else
+ return (_POSIX_IPV6);
+#endif
+ case _SC_MAPPED_FILES:
+ return (_POSIX_MAPPED_FILES);
+ case _SC_MEMLOCK:
+ return (_POSIX_MEMLOCK);
+ case _SC_MEMLOCK_RANGE:
+ return (_POSIX_MEMLOCK_RANGE);
+ case _SC_MEMORY_PROTECTION:
+ return (_POSIX_MEMORY_PROTECTION);
+ case _SC_MESSAGE_PASSING:
+ return (_POSIX_MESSAGE_PASSING);
+ case _SC_PRIORITIZED_IO:
+ return (_POSIX_PRIORITIZED_IO);
+ case _SC_PRIORITY_SCHEDULING:
+ return (_POSIX_PRIORITY_SCHEDULING);
+ case _SC_RAW_SOCKETS:
+ return (_POSIX_RAW_SOCKETS);
+ case _SC_READER_WRITER_LOCKS:
+ return (_POSIX_READER_WRITER_LOCKS);
+ case _SC_REALTIME_SIGNALS:
+ return (_POSIX_REALTIME_SIGNALS);
+ case _SC_REGEXP:
+ return (_POSIX_REGEXP);
+ case _SC_SEMAPHORES:
+ return (_POSIX_SEMAPHORES);
+ case _SC_SHARED_MEMORY_OBJECTS:
+ return (_POSIX_SHARED_MEMORY_OBJECTS);
+ case _SC_SHELL:
+ return (_POSIX_SHELL);
+ case _SC_SIGQUEUE_MAX:
+ return (-1);
+ case _SC_SPAWN:
+ return (_POSIX_SPAWN);
+ case _SC_SPIN_LOCKS:
+ return (_POSIX_SPIN_LOCKS);
+ case _SC_SPORADIC_SERVER:
+ return (_POSIX_SPORADIC_SERVER);
+ case _SC_SYNCHRONIZED_IO:
+ return (_POSIX_SYNCHRONIZED_IO);
+ case _SC_SYMLOOP_MAX:
+ return (SYMLOOP_MAX);
+ case _SC_THREAD_ATTR_STACKADDR:
+ return (_POSIX_THREAD_ATTR_STACKADDR);
+ case _SC_THREAD_ATTR_STACKSIZE:
+ return (_POSIX_THREAD_ATTR_STACKSIZE);
+ case _SC_THREAD_CPUTIME:
+ return (_POSIX_THREAD_CPUTIME);
+ case _SC_THREAD_DESTRUCTOR_ITERATIONS:
+ return (PTHREAD_DESTRUCTOR_ITERATIONS);
+ case _SC_THREAD_KEYS_MAX:
+ return (PTHREAD_KEYS_MAX);
+ case _SC_THREAD_PRIO_INHERIT:
+ return (_POSIX_THREAD_PRIO_INHERIT);
+ case _SC_THREAD_PRIO_PROTECT:
+ return (_POSIX_THREAD_PRIO_PROTECT);
+ case _SC_THREAD_PRIORITY_SCHEDULING:
+ return (_POSIX_THREAD_PRIORITY_SCHEDULING);
+ case _SC_THREAD_PROCESS_SHARED:
+ return (_POSIX_THREAD_PROCESS_SHARED);
+ case _SC_THREAD_ROBUST_PRIO_INHERIT:
+ return (_POSIX_THREAD_ROBUST_PRIO_INHERIT);
+ case _SC_THREAD_ROBUST_PRIO_PROTECT:
+ return (_POSIX_THREAD_ROBUST_PRIO_PROTECT);
+ case _SC_THREAD_SPORADIC_SERVER:
+ return (_POSIX_THREAD_SPORADIC_SERVER);
+ case _SC_THREAD_STACK_MIN:
+ return (PTHREAD_STACK_MIN);
+ case _SC_THREAD_THREADS_MAX:
+ return (PTHREAD_THREADS_MAX);
+ case _SC_THREADS:
+ return (_POSIX_THREADS);
+ case _SC_TIMEOUTS:
+ return (_POSIX_TIMEOUTS);
+ case _SC_TIMER_MAX:
+ return (-1);
+ case _SC_TIMERS:
+ return (_POSIX_TIMERS);
+ case _SC_TRACE:
+ case _SC_TRACE_EVENT_FILTER:
+ case _SC_TRACE_EVENT_NAME_MAX:
+ case _SC_TRACE_INHERIT:
+ case _SC_TRACE_LOG:
+ return (_POSIX_TRACE);
+ case _SC_TTY_NAME_MAX:
+ return (TTY_NAME_MAX);
+ case _SC_TYPED_MEMORY_OBJECTS:
+ return (_POSIX_TYPED_MEMORY_OBJECTS);
+ case _SC_V6_ILP32_OFF32:
+ return (_POSIX_V6_ILP32_OFF32);
+ case _SC_V6_ILP32_OFFBIG:
+#if _POSIX_V6_ILP32_OFFBIG == 0
+ if (sizeof(int) * CHAR_BIT == 32 &&
+ sizeof(long) * CHAR_BIT == 32 &&
+ sizeof(void *) * CHAR_BIT == 32 &&
+ sizeof(off_t) * CHAR_BIT >= 64)
+ return 1;
+ else
+ return -1;
+#else
+ return (_POSIX_V6_ILP32_OFFBIG);
+#endif
+ case _SC_V6_LP64_OFF64:
+#if _POSIX_V6_LP64_OFF64 == 0
+ if (sizeof(int) * CHAR_BIT == 32 &&
+ sizeof(long) * CHAR_BIT == 64 &&
+ sizeof(void *) * CHAR_BIT == 64 &&
+ sizeof(off_t) * CHAR_BIT == 64)
+ return 1;
+ else
+ return -1;
+#else
+ return (_POSIX_V6_LP64_OFF64);
+#endif
+ case _SC_V6_LPBIG_OFFBIG:
+#if _POSIX_V6_LPBIG_OFFBIG == 0
+ if (sizeof(int) * CHAR_BIT >= 32 &&
+ sizeof(long) * CHAR_BIT >= 64 &&
+ sizeof(void *) * CHAR_BIT >= 64 &&
+ sizeof(off_t) * CHAR_BIT >= 64)
+ return 1;
+ else
+ return -1;
+#else
+ return (_POSIX_V6_LPBIG_OFFBIG);
+#endif
+ case _SC_V7_ILP32_OFF32:
+ return (_POSIX_V7_ILP32_OFF32);
+ case _SC_V7_ILP32_OFFBIG:
+#if _POSIX_V7_ILP32_OFFBIG == 0
+ if (sizeof(int) * CHAR_BIT == 32 &&
+ sizeof(long) * CHAR_BIT == 32 &&
+ sizeof(void *) * CHAR_BIT == 32 &&
+ sizeof(off_t) * CHAR_BIT >= 64)
+ return 1;
+ else
+ return -1;
+#else
+ return (_POSIX_V7_ILP32_OFFBIG);
+#endif
+ case _SC_V7_LP64_OFF64:
+#if _POSIX_V7_LP64_OFF64 == 0
+ if (sizeof(int) * CHAR_BIT == 32 &&
+ sizeof(long) * CHAR_BIT == 64 &&
+ sizeof(void *) * CHAR_BIT == 64 &&
+ sizeof(off_t) * CHAR_BIT == 64)
+ return 1;
+ else
+ return -1;
+#else
+ return (_POSIX_V7_LP64_OFF64);
+#endif
+ case _SC_V7_LPBIG_OFFBIG:
+#if _POSIX_V7_LPBIG_OFFBIG == 0
+ if (sizeof(int) * CHAR_BIT >= 32 &&
+ sizeof(long) * CHAR_BIT >= 64 &&
+ sizeof(void *) * CHAR_BIT >= 64 &&
+ sizeof(off_t) * CHAR_BIT >= 64)
+ return 1;
+ else
+ return -1;
+#else
+ return (_POSIX_V7_LPBIG_OFFBIG);
+#endif
+ case _SC_XOPEN_CRYPT:
+ return (_XOPEN_CRYPT);
+ case _SC_XOPEN_ENH_I18N:
+ return (_XOPEN_ENH_I18N);
+ case _SC_XOPEN_LEGACY:
+ return (_XOPEN_LEGACY);
+ case _SC_XOPEN_REALTIME:
+ return (_XOPEN_REALTIME);
+ case _SC_XOPEN_REALTIME_THREADS:
+ return (_XOPEN_REALTIME_THREADS);
+ case _SC_XOPEN_STREAMS:
+ return (_XOPEN_STREAMS);
+ case _SC_XOPEN_UNIX:
+ return (_XOPEN_UNIX);
+ case _SC_XOPEN_UUCP:
+ return (_XOPEN_UUCP);
+#ifdef _XOPEN_VERSION
+ case _SC_XOPEN_VERSION:
+ return (_XOPEN_VERSION);
+#endif
/* Extensions */
case _SC_PHYS_PAGES:
diff --git a/lib/libc/shlib_version b/lib/libc/shlib_version
index 2e283db67c1..da350fdb8a2 100644
--- a/lib/libc/shlib_version
+++ b/lib/libc/shlib_version
@@ -1,4 +1,4 @@
major=64
-minor=0
+minor=1
# note: If changes were made to include/thread_private.h or if system
# calls were added/changed then libpthread must also be updated.
diff --git a/lib/libpthread/include/pthread.h b/lib/libpthread/include/pthread.h
index 0fc9f375516..36850b81da6 100644
--- a/lib/libpthread/include/pthread.h
+++ b/lib/libpthread/include/pthread.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pthread.h,v 1.36 2012/05/03 09:07:17 pirofti Exp $ */
+/* $OpenBSD: pthread.h,v 1.37 2012/05/14 23:21:35 matthew Exp $ */
/*
* Copyright (c) 1993, 1994 by Chris Provenzano, proven@mit.edu
@@ -56,20 +56,6 @@
#define PTHREAD_THREADS_MAX ULONG_MAX
/*
- * Compile time symbolic constants for portability specifications:
- *
- * Note that those commented out are not currently supported by the
- * implementation.
- */
-#define _POSIX_THREADS 1
-#define _POSIX_THREAD_ATTR_STACKADDR 1
-#define _POSIX_THREAD_ATTR_STACKSIZE 1
-#define _POSIX_THREAD_PRIORITY_SCHEDULING 1
-#define _POSIX_THREAD_PRIO_INHERIT 1
-#define _POSIX_THREAD_PRIO_PROTECT 1
-/* #define _POSIX_THREAD_PROCESS_SHARED */
-
-/*
* Flags for threads and thread attributes.
*/
#define PTHREAD_DETACHED 0x1
diff --git a/sys/sys/unistd.h b/sys/sys/unistd.h
index da80a176cb0..30bcf342ca2 100644
--- a/sys/sys/unistd.h
+++ b/sys/sys/unistd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: unistd.h,v 1.20 2012/03/06 11:38:26 ajacoutot Exp $ */
+/* $OpenBSD: unistd.h,v 1.21 2012/05/14 23:21:35 matthew Exp $ */
/* $NetBSD: unistd.h,v 1.10 1994/06/29 06:46:06 cgd Exp $ */
/*
@@ -37,26 +37,10 @@
#include <sys/cdefs.h>
-/* compile-time symbolic constants */
- /* implementation supports job control */
-#define _POSIX_JOB_CONTROL 1
- /* saved set-user-ID and set-group-ID */
-#define _POSIX_SAVED_IDS 1
+#define _POSIX_VDISABLE (0377)
+/* Define the POSIX.1 version we target for compliance. */
#define _POSIX_VERSION 199009L
-#define _POSIX2_VERSION 199212L
-
-/* execution-time symbolic constants */
- /* chown requires appropriate privileges */
-#define _POSIX_CHOWN_RESTRICTED 1
- /* monotonic clock */
-#define _POSIX_MONOTONIC_CLOCK 200112L
- /* too-long path components generate errors */
-#define _POSIX_NO_TRUNC 1
- /* may disable terminal special characters */
-#define _POSIX_VDISABLE (0377)
- /* file synchronization is available */
-#define _POSIX_FSYNC 1
/* access function */
#define F_OK 0 /* test for existence of file */
@@ -83,6 +67,8 @@ struct __tfork {
};
#endif
+/* the pathconf(2) and sysconf(3) variable values are part of the ABI */
+
/* configurable pathname variables */
#define _PC_LINK_MAX 1
#define _PC_MAX_CANON 2
@@ -130,26 +116,97 @@ struct __tfork {
#define _SC_SEM_VALUE_MAX 32
#define _SC_HOST_NAME_MAX 33
#define _SC_MONOTONIC_CLOCK 34
-
-/* P1003.1c */
-#define _SC_GETGR_R_SIZE_MAX 100
-#define _SC_GETPW_R_SIZE_MAX 101
-#define _SC_LOGIN_NAME_MAX 102
-#define _SC_THREAD_SAFE_FUNCTIONS 103
-#ifdef notyet
-#define _SC_THREAD_DESTRUCTOR_ITERATIONS
-#define _SC_THREAD_KEYS_MAX
-#define _SC_THREAD_STACK_MIN
-#define _SC_THREAD_THREADS_MAX
-#define _SC_TTY_NAME_MAX
-#define _SC_THREADS
-#define _SC_THREAD_ATTR_STACKADDR
-#define _SC_THREAD_ATTR_STACKSIZE
-#define _SC_THREAD_PRIORITY_SCHEDULING
-#define _SC_THREAD_PRIO_INHERIT
-#define _SC_THREAD_PRIO_PROTECT
-#define _SC_THREAD_PROCESS_SHARED
-#endif
+#define _SC_2_PBS 35
+#define _SC_2_PBS_ACCOUNTING 36
+#define _SC_2_PBS_CHECKPOINT 37
+#define _SC_2_PBS_LOCATE 38
+#define _SC_2_PBS_MESSAGE 39
+#define _SC_2_PBS_TRACK 40
+#define _SC_ADVISORY_INFO 41
+#define _SC_AIO_LISTIO_MAX 42
+#define _SC_AIO_MAX 43
+#define _SC_AIO_PRIO_DELTA_MAX 44
+#define _SC_ASYNCHRONOUS_IO 45
+#define _SC_ATEXIT_MAX 46
+#define _SC_BARRIERS 47
+#define _SC_CLOCK_SELECTION 48
+#define _SC_CPUTIME 49
+#define _SC_DELAYTIMER_MAX 50
+#define _SC_IOV_MAX 51
+#define _SC_IPV6 52
+#define _SC_MAPPED_FILES 53
+#define _SC_MEMLOCK 54
+#define _SC_MEMLOCK_RANGE 55
+#define _SC_MEMORY_PROTECTION 56
+#define _SC_MESSAGE_PASSING 57
+#define _SC_MQ_OPEN_MAX 58
+#define _SC_MQ_PRIO_MAX 59
+#define _SC_PRIORITIZED_IO 60
+#define _SC_PRIORITY_SCHEDULING 61
+#define _SC_RAW_SOCKETS 62
+#define _SC_READER_WRITER_LOCKS 63
+#define _SC_REALTIME_SIGNALS 64
+#define _SC_REGEXP 65
+#define _SC_RTSIG_MAX 66
+#define _SC_SEMAPHORES 67
+#define _SC_SHARED_MEMORY_OBJECTS 68
+#define _SC_SHELL 69
+#define _SC_SIGQUEUE_MAX 70
+#define _SC_SPAWN 71
+#define _SC_SPIN_LOCKS 72
+#define _SC_SPORADIC_SERVER 73
+#define _SC_SS_REPL_MAX 74
+#define _SC_SYNCHRONIZED_IO 75
+#define _SC_SYMLOOP_MAX 76
+#define _SC_THREAD_ATTR_STACKADDR 77
+#define _SC_THREAD_ATTR_STACKSIZE 78
+#define _SC_THREAD_CPUTIME 79
+#define _SC_THREAD_DESTRUCTOR_ITERATIONS 80
+#define _SC_THREAD_KEYS_MAX 81
+#define _SC_THREAD_PRIO_INHERIT 82
+#define _SC_THREAD_PRIO_PROTECT 83
+#define _SC_THREAD_PRIORITY_SCHEDULING 84
+#define _SC_THREAD_PROCESS_SHARED 85
+#define _SC_THREAD_ROBUST_PRIO_INHERIT 86
+#define _SC_THREAD_ROBUST_PRIO_PROTECT 87
+#define _SC_THREAD_SPORADIC_SERVER 88
+#define _SC_THREAD_STACK_MIN 89
+#define _SC_THREAD_THREADS_MAX 90
+#define _SC_THREADS 91
+#define _SC_TIMEOUTS 92
+#define _SC_TIMER_MAX 93
+#define _SC_TIMERS 94
+#define _SC_TRACE 95
+#define _SC_TRACE_EVENT_FILTER 96
+#define _SC_TRACE_EVENT_NAME_MAX 97
+#define _SC_TRACE_INHERIT 98
+#define _SC_TRACE_LOG 99
+#define _SC_GETGR_R_SIZE_MAX 100
+#define _SC_GETPW_R_SIZE_MAX 101
+#define _SC_LOGIN_NAME_MAX 102
+#define _SC_THREAD_SAFE_FUNCTIONS 103
+#define _SC_TRACE_NAME_MAX 104
+#define _SC_TRACE_SYS_MAX 105
+#define _SC_TRACE_USER_EVENT_MAX 106
+#define _SC_TTY_NAME_MAX 107
+#define _SC_TYPED_MEMORY_OBJECTS 108
+#define _SC_V6_ILP32_OFF32 109
+#define _SC_V6_ILP32_OFFBIG 110
+#define _SC_V6_LP64_OFF64 111
+#define _SC_V6_LPBIG_OFFBIG 112
+#define _SC_V7_ILP32_OFF32 113
+#define _SC_V7_ILP32_OFFBIG 114
+#define _SC_V7_LP64_OFF64 115
+#define _SC_V7_LPBIG_OFFBIG 116
+#define _SC_XOPEN_CRYPT 117
+#define _SC_XOPEN_ENH_I18N 118
+#define _SC_XOPEN_LEGACY 119
+#define _SC_XOPEN_REALTIME 120
+#define _SC_XOPEN_REALTIME_THREADS 121
+#define _SC_XOPEN_STREAMS 122
+#define _SC_XOPEN_UNIX 123
+#define _SC_XOPEN_UUCP 124
+#define _SC_XOPEN_VERSION 125
#define _SC_PHYS_PAGES 500
#define _SC_AVPHYS_PAGES 501