arrfab / rpms / glibc

Forked from rpms/glibc 4 years ago
Clone

Blame SOURCES/glibc-rh1505492-undef-50.patch

147e83
commit 3b566046c3e8cb252f4c0ab7b6041fef5098f1a5
147e83
Author: Siddhesh Poyarekar <siddhesh@redhat.com>
147e83
Date:   Mon Dec 29 17:39:30 2014 +0530
147e83
147e83
    Add _POSIX namespace SYSCONF macros to posix-conf-vars.list
147e83
    
147e83
    This fixes the remaining -Wundef warnings.  Tested on x86_64.
147e83
    
147e83
            * posix/posix-conf-vars.list: Add _POSIX sysconf namespace.
147e83
            * sysdeps/posix/sysconf.c: Include posix-conf-vars.h.
147e83
            (__sysconf): Use CONF_IS_* macros.
147e83
147e83
diff --git a/posix/posix-conf-vars.list b/posix/posix-conf-vars.list
147e83
index 8f308c216626c59c..3e7e7cdaa9c46c85 100644
147e83
--- a/posix/posix-conf-vars.list
147e83
+++ b/posix/posix-conf-vars.list
147e83
@@ -14,6 +14,96 @@ SPEC POSIX {
147e83
   V7_LPBIG_OFFBIG
147e83
 }
147e83
 
147e83
+SYSCONF POSIX {
147e83
+  ADVISORY_INFO
147e83
+  ARG_MAX
147e83
+  ASYNCHRONOUS_IO
147e83
+  BARRIERS
147e83
+  BASE
147e83
+  CHILD_MAX
147e83
+  C_LANG_SUPPORT
147e83
+  C_LANG_SUPPORT_R
147e83
+  CLOCK_SELECTION
147e83
+  CPUTIME
147e83
+  DEVICE_IO
147e83
+  DEVICE_SPECIFIC
147e83
+  DEVICE_SPECIFIC_R
147e83
+  FD_MGMT
147e83
+  FIFO
147e83
+  FILE_ATTRIBUTES
147e83
+  FILE_LOCKING
147e83
+  FILE_SYSTEM
147e83
+  FSYNC
147e83
+  JOB_CONTROL
147e83
+  MAPPED_FILES
147e83
+  MEMLOCK
147e83
+  MEMLOCK_RANGE
147e83
+  MEMORY_PROTECTION
147e83
+  MESSAGE_PASSING
147e83
+  MONOTONIC_CLOCK
147e83
+  MULTI_PROCESS
147e83
+  NETWORKING
147e83
+  NGROUPS_MAX
147e83
+  OPEN_MAX
147e83
+  PII
147e83
+  PII_INTERNET
147e83
+  PII_INTERNET_DGRAM
147e83
+  PII_INTERNET_STREAM
147e83
+  PII_OSI
147e83
+  PII_OSI_CLTS
147e83
+  PII_OSI_COTS
147e83
+  PII_OSI_M
147e83
+  PII_SOCKET
147e83
+  PII_XTI
147e83
+  PIPE
147e83
+  POLL
147e83
+  PRIORITIZED_IO
147e83
+  PRIORITY_SCHEDULING
147e83
+  READER_WRITER_LOCKS
147e83
+  REALTIME_SIGNALS
147e83
+  REGEXP
147e83
+  SAVED_IDS
147e83
+  SELECT
147e83
+  SEMAPHORES
147e83
+  SHARED_MEMORY_OBJECTS
147e83
+  SHELL
147e83
+  SIGNALS
147e83
+  SINGLE_PROCESS
147e83
+  SPAWN
147e83
+  SPIN_LOCKS
147e83
+  SPORADIC_SERVER
147e83
+  SSIZE_MAX
147e83
+  STREAM_MAX
147e83
+  SYNCHRONIZED_IO
147e83
+  SYSTEM_DATABASE
147e83
+  SYSTEM_DATABASE_R
147e83
+  THREAD_ATTR_STACKADDR
147e83
+  THREAD_ATTR_STACKSIZE
147e83
+  THREAD_CPUTIME
147e83
+  THREAD_PRIO_INHERIT
147e83
+  THREAD_PRIO_PROTECT
147e83
+  THREAD_PRIORITY_SCHEDULING
147e83
+  THREAD_PROCESS_SHARED
147e83
+  THREADS
147e83
+  THREAD_SAFE_FUNCTIONS
147e83
+  THREAD_SPORADIC_SERVER
147e83
+  TIMEOUTS
147e83
+  TIMERS
147e83
+  TRACE
147e83
+  TRACE_EVENT_FILTER
147e83
+  TRACE_INHERIT
147e83
+  TRACE_LOG
147e83
+  TYPED_MEMORY_OBJECTS
147e83
+  TZNAME_MAX
147e83
+  USER_GROUPS
147e83
+  USER_GROUPS_R
147e83
+  VERSION
147e83
+# Additional variables not in getconf.
147e83
+  THREAD_DESTRUCTOR_ITERATIONS
147e83
+  IPV6
147e83
+  RAW_SOCKETS
147e83
+}
147e83
+
147e83
 SPEC XBS5 {
147e83
   ILP32_OFF32
147e83
   ILP32_OFFBIG
147e83
diff --git a/sysdeps/posix/sysconf.c b/sysdeps/posix/sysconf.c
147e83
index cf4f8010097e309a..1e9d4e099e94981c 100644
147e83
--- a/sysdeps/posix/sysconf.c
147e83
+++ b/sysdeps/posix/sysconf.c
147e83
@@ -31,6 +31,8 @@
147e83
 #include <sys/types.h>
147e83
 #include <regex.h>
147e83
 
147e83
+#include <posix-conf-vars.h>
147e83
+
147e83
 
147e83
 #define NEED_CHECK_SPEC \
147e83
   (!defined _XBS5_ILP32_OFF32 || !defined _XBS5_ILP32_OFFBIG \
147e83
@@ -95,112 +97,112 @@ __sysconf (name)
147e83
       return MAX (__tzname_max (), _POSIX_TZNAME_MAX);
147e83
 
147e83
     case _SC_JOB_CONTROL:
147e83
-#if _POSIX_JOB_CONTROL > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_JOB_CONTROL)
147e83
       return _POSIX_JOB_CONTROL;
147e83
 #else
147e83
       return -1;
147e83
 #endif
147e83
 
147e83
     case _SC_SAVED_IDS:
147e83
-#if _POSIX_SAVED_IDS > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_SAVED_IDS)
147e83
       return 1;
147e83
 #else
147e83
       return -1;
147e83
 #endif
147e83
 
147e83
     case _SC_REALTIME_SIGNALS:
147e83
-#if _POSIX_REALTIME_SIGNALS > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_REALTIME_SIGNALS)
147e83
       return _POSIX_REALTIME_SIGNALS;
147e83
 #else
147e83
       return -1;
147e83
 #endif
147e83
 
147e83
     case _SC_PRIORITY_SCHEDULING:
147e83
-#if _POSIX_PRIORITY_SCHEDULING > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_PRIORITY_SCHEDULING)
147e83
       return _POSIX_PRIORITY_SCHEDULING;
147e83
 #else
147e83
       return -1;
147e83
 #endif
147e83
 
147e83
     case _SC_TIMERS:
147e83
-#if _POSIX_TIMERS > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_TIMERS)
147e83
       return _POSIX_TIMERS;
147e83
 #else
147e83
       return -1;
147e83
 #endif
147e83
 
147e83
     case _SC_ASYNCHRONOUS_IO:
147e83
-#if _POSIX_ASYNCHRONOUS_IO > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_ASYNCHRONOUS_IO)
147e83
       return _POSIX_ASYNCHRONOUS_IO;
147e83
 #else
147e83
       return -1;
147e83
 #endif
147e83
 
147e83
     case _SC_PRIORITIZED_IO:
147e83
-#if _POSIX_PRIORITIZED_IO > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_PRIORITIZED_IO)
147e83
       return _POSIX_PRIORITIZED_IO;
147e83
 #else
147e83
       return -1;
147e83
 #endif
147e83
 
147e83
     case _SC_SYNCHRONIZED_IO:
147e83
-#if _POSIX_SYNCHRONIZED_IO > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_SYNCHRONIZED_IO)
147e83
       return _POSIX_SYNCHRONIZED_IO;
147e83
 #else
147e83
       return -1;
147e83
 #endif
147e83
 
147e83
     case _SC_FSYNC:
147e83
-#if _POSIX_FSYNC > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_FSYNC)
147e83
       return _POSIX_FSYNC;
147e83
 #else
147e83
       return -1;
147e83
 #endif
147e83
 
147e83
     case _SC_MAPPED_FILES:
147e83
-#if _POSIX_MAPPED_FILES > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_MAPPED_FILES)
147e83
       return _POSIX_MAPPED_FILES;
147e83
 #else
147e83
       return -1;
147e83
 #endif
147e83
 
147e83
     case _SC_MEMLOCK:
147e83
-#if _POSIX_MEMLOCK > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_MEMLOCK)
147e83
       return _POSIX_MEMLOCK;
147e83
 #else
147e83
       return -1;
147e83
 #endif
147e83
 
147e83
     case _SC_MEMLOCK_RANGE:
147e83
-#if _POSIX_MEMLOCK_RANGE > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_MEMLOCK_RANGE)
147e83
       return _POSIX_MEMLOCK_RANGE;
147e83
 #else
147e83
       return -1;
147e83
 #endif
147e83
 
147e83
     case _SC_MEMORY_PROTECTION:
147e83
-#if _POSIX_MEMORY_PROTECTION > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_MEMORY_PROTECTION)
147e83
       return _POSIX_MEMORY_PROTECTION;
147e83
 #else
147e83
       return -1;
147e83
 #endif
147e83
 
147e83
     case _SC_MESSAGE_PASSING:
147e83
-#if _POSIX_MESSAGE_PASSING > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_MESSAGE_PASSING)
147e83
       return _POSIX_MESSAGE_PASSING;
147e83
 #else
147e83
       return -1;
147e83
 #endif
147e83
 
147e83
     case _SC_SEMAPHORES:
147e83
-#if _POSIX_SEMAPHORES > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_SEMAPHORES)
147e83
       return _POSIX_SEMAPHORES;
147e83
 #else
147e83
       return -1;
147e83
 #endif
147e83
 
147e83
     case _SC_SHARED_MEMORY_OBJECTS:
147e83
-#if _POSIX_SHARED_MEMORY_OBJECTS > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_SHARED_MEMORY_OBJECTS)
147e83
       return _POSIX_SHARED_MEMORY_OBJECTS;
147e83
 #else
147e83
       return -1;
147e83
@@ -353,49 +355,49 @@ __sysconf (name)
147e83
 #endif
147e83
 
147e83
     case _SC_PII:
147e83
-#if _POSIX_PII > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_PII)
147e83
       return 1;
147e83
 #else
147e83
       return -1;
147e83
 #endif
147e83
 
147e83
     case _SC_PII_XTI:
147e83
-#if _POSIX_PII_XTI > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_PII_XTI)
147e83
       return 1;
147e83
 #else
147e83
       return -1;
147e83
 #endif
147e83
 
147e83
     case _SC_PII_SOCKET:
147e83
-#if _POSIX_PII_SOCKET > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_PII_SOCKET)
147e83
       return 1;
147e83
 #else
147e83
       return -1;
147e83
 #endif
147e83
 
147e83
     case _SC_PII_INTERNET:
147e83
-#if _POSIX_PII_INTERNET > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_PII_INTERNET)
147e83
       return 1;
147e83
 #else
147e83
       return -1;
147e83
 #endif
147e83
 
147e83
     case _SC_PII_OSI:
147e83
-#if _POSIX_PII_OSI > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_PII_OSI)
147e83
       return 1;
147e83
 #else
147e83
       return -1;
147e83
 #endif
147e83
 
147e83
     case _SC_POLL:
147e83
-#if _POSIX_POLL > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_POLL)
147e83
       return 1;
147e83
 #else
147e83
       return -1;
147e83
 #endif
147e83
 
147e83
     case _SC_SELECT:
147e83
-#if _POSIX_SELECT > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_SELECT)
147e83
       return 1;
147e83
 #else
147e83
       return -1;
147e83
@@ -410,35 +412,35 @@ __sysconf (name)
147e83
 #endif
147e83
 
147e83
     case _SC_PII_INTERNET_STREAM:
147e83
-#if _POSIX_PII_INTERNET_STREAM > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_PII_INTERNET_STREAM)
147e83
       return 1;
147e83
 #else
147e83
       return -1;
147e83
 #endif
147e83
 
147e83
     case _SC_PII_INTERNET_DGRAM:
147e83
-#if _POSIX_PII_INTERNET_DGRAM > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_PII_INTERNET_DGRAM)
147e83
       return 1;
147e83
 #else
147e83
       return -1;
147e83
 #endif
147e83
 
147e83
     case _SC_PII_OSI_COTS:
147e83
-#if _POSIX_PII_OSI_COTS > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_PII_OSI_COTS)
147e83
       return 1;
147e83
 #else
147e83
       return -1;
147e83
 #endif
147e83
 
147e83
     case _SC_PII_OSI_CLTS:
147e83
-#if _POSIX_PII_OSI_CLTS > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_PII_OSI_CLTS)
147e83
       return 1;
147e83
 #else
147e83
       return -1;
147e83
 #endif
147e83
 
147e83
     case _SC_PII_OSI_M:
147e83
-#if _POSIX_PII_OSI_M > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_PII_OSI_M)
147e83
       return 1;
147e83
 #else
147e83
       return -1;
147e83
@@ -519,14 +521,14 @@ __sysconf (name)
147e83
 
147e83
       /* POSIX 1003.1c (POSIX Threads).  */
147e83
     case _SC_THREADS:
147e83
-#if _POSIX_THREADS > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_THREADS)
147e83
       return _POSIX_THREADS;
147e83
 #else
147e83
       return -1;
147e83
 #endif
147e83
 
147e83
     case _SC_THREAD_SAFE_FUNCTIONS:
147e83
-#if _POSIX_THREAD_SAFE_FUNCTIONS > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_THREAD_SAFE_FUNCTIONS)
147e83
       return _POSIX_THREAD_SAFE_FUNCTIONS;
147e83
 #else
147e83
       return -1;
147e83
@@ -553,7 +555,7 @@ __sysconf (name)
147e83
 #endif
147e83
 
147e83
     case _SC_THREAD_DESTRUCTOR_ITERATIONS:
147e83
-#if _POSIX_THREAD_DESTRUCTOR_ITERATIONS > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_THREAD_DESTRUCTOR_ITERATIONS)
147e83
       return _POSIX_THREAD_DESTRUCTOR_ITERATIONS;
147e83
 #else
147e83
       return -1;
147e83
@@ -581,42 +583,42 @@ __sysconf (name)
147e83
 #endif
147e83
 
147e83
     case _SC_THREAD_ATTR_STACKADDR:
147e83
-#if _POSIX_THREAD_ATTR_STACKADDR > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_THREAD_ATTR_STACKADDR)
147e83
       return _POSIX_THREAD_ATTR_STACKADDR;
147e83
 #else
147e83
       return -1;
147e83
 #endif
147e83
 
147e83
     case _SC_THREAD_ATTR_STACKSIZE:
147e83
-#if _POSIX_THREAD_ATTR_STACKSIZE > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_THREAD_ATTR_STACKSIZE)
147e83
       return _POSIX_THREAD_ATTR_STACKSIZE;
147e83
 #else
147e83
       return -1;
147e83
 #endif
147e83
 
147e83
     case _SC_THREAD_PRIORITY_SCHEDULING:
147e83
-#if _POSIX_THREAD_PRIORITY_SCHEDULING > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_THREAD_PRIORITY_SCHEDULING)
147e83
       return _POSIX_THREAD_PRIORITY_SCHEDULING;
147e83
 #else
147e83
       return -1;
147e83
 #endif
147e83
 
147e83
     case _SC_THREAD_PRIO_INHERIT:
147e83
-#if _POSIX_THREAD_PRIO_INHERIT > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_THREAD_PRIO_INHERIT)
147e83
       return _POSIX_THREAD_PRIO_INHERIT;
147e83
 #else
147e83
       return -1;
147e83
 #endif
147e83
 
147e83
     case _SC_THREAD_PRIO_PROTECT:
147e83
-#if _POSIX_THREAD_PRIO_PROTECT > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_THREAD_PRIO_PROTECT)
147e83
       return _POSIX_THREAD_PRIO_PROTECT;
147e83
 #else
147e83
       return -1;
147e83
 #endif
147e83
 
147e83
     case _SC_THREAD_PROCESS_SHARED:
147e83
-#if _POSIX_THREAD_PROCESS_SHARED > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_THREAD_PROCESS_SHARED)
147e83
       return _POSIX_THREAD_PROCESS_SHARED;
147e83
 #else
147e83
       return -1;
147e83
@@ -833,152 +835,152 @@ __sysconf (name)
147e83
 #endif
147e83
 
147e83
     case _SC_ADVISORY_INFO:
147e83
-#if _POSIX_ADVISORY_INFO > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_ADVISORY_INFO)
147e83
       return _POSIX_ADVISORY_INFO;
147e83
 #else
147e83
       return -1;
147e83
 #endif
147e83
 
147e83
     case _SC_BARRIERS:
147e83
-#if _POSIX_BARRIERS > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_BARRIERS)
147e83
       return _POSIX_BARRIERS;
147e83
 #else
147e83
       return -1;
147e83
 #endif
147e83
 
147e83
     case _SC_BASE:
147e83
-#if _POSIX_BASE > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_BASE)
147e83
       return _POSIX_BASE;
147e83
 #else
147e83
       return -1;
147e83
 #endif
147e83
     case _SC_C_LANG_SUPPORT:
147e83
-#if _POSIX_C_LANG_SUPPORT > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_C_LANG_SUPPORT)
147e83
       return _POSIX_C_LANG_SUPPORT;
147e83
 #else
147e83
       return -1;
147e83
 #endif
147e83
     case _SC_C_LANG_SUPPORT_R:
147e83
-#if _POSIX_C_LANG_SUPPORT_R > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_C_LANG_SUPPORT_R)
147e83
       return _POSIX_C_LANG_SUPPORT_R;
147e83
 #else
147e83
       return -1;
147e83
 #endif
147e83
 
147e83
     case _SC_CLOCK_SELECTION:
147e83
-#if _POSIX_CLOCK_SELECTION > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_CLOCK_SELECTION)
147e83
       return _POSIX_CLOCK_SELECTION;
147e83
 #else
147e83
       return -1;
147e83
 #endif
147e83
 
147e83
     case _SC_CPUTIME:
147e83
-#if _POSIX_CPUTIME > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_CPUTIME)
147e83
       return _POSIX_CPUTIME;
147e83
 #else
147e83
       return -1;
147e83
 #endif
147e83
 
147e83
     case _SC_DEVICE_IO:
147e83
-#if _POSIX_DEVICE_IO > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_DEVICE_IO)
147e83
       return _POSIX_DEVICE_IO;
147e83
 #else
147e83
       return -1;
147e83
 #endif
147e83
     case _SC_DEVICE_SPECIFIC:
147e83
-#if _POSIX_DEVICE_SPECIFIC > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_DEVICE_SPECIFIC)
147e83
       return _POSIX_DEVICE_SPECIFIC;
147e83
 #else
147e83
       return -1;
147e83
 #endif
147e83
     case _SC_DEVICE_SPECIFIC_R:
147e83
-#if _POSIX_DEVICE_SPECIFIC_R > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_DEVICE_SPECIFIC_R)
147e83
       return _POSIX_DEVICE_SPECIFIC_R;
147e83
 #else
147e83
       return -1;
147e83
 #endif
147e83
 
147e83
     case _SC_FD_MGMT:
147e83
-#if _POSIX_FD_MGMT > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_FD_MGMT)
147e83
       return _POSIX_FD_MGMT;
147e83
 #else
147e83
       return -1;
147e83
 #endif
147e83
 
147e83
     case _SC_FIFO:
147e83
-#if _POSIX_FIFO > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_FIFO)
147e83
       return _POSIX_FIFO;
147e83
 #else
147e83
       return -1;
147e83
 #endif
147e83
     case _SC_PIPE:
147e83
-#if _POSIX_PIPE > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_PIPE)
147e83
       return _POSIX_PIPE;
147e83
 #else
147e83
       return -1;
147e83
 #endif
147e83
 
147e83
     case _SC_FILE_ATTRIBUTES:
147e83
-#if _POSIX_FILE_ATTRIBUTES > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_FILE_ATTRIBUTES)
147e83
       return _POSIX_FILE_ATTRIBUTES;
147e83
 #else
147e83
       return -1;
147e83
 #endif
147e83
     case _SC_FILE_LOCKING:
147e83
-#if _POSIX_FILE_LOCKING > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_FILE_LOCKING)
147e83
       return _POSIX_FILE_LOCKING;
147e83
 #else
147e83
       return -1;
147e83
 #endif
147e83
     case _SC_FILE_SYSTEM:
147e83
-#if _POSIX_FILE_SYSTEM > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_FILE_SYSTEM)
147e83
       return _POSIX_FILE_SYSTEM;
147e83
 #else
147e83
       return -1;
147e83
 #endif
147e83
 
147e83
     case _SC_MONOTONIC_CLOCK:
147e83
-#if _POSIX_MONOTONIC_CLOCK
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_MONOTONIC_CLOCK)
147e83
       return _POSIX_MONOTONIC_CLOCK;
147e83
 #else
147e83
       return -1;
147e83
 #endif
147e83
 
147e83
     case _SC_MULTI_PROCESS:
147e83
-#if _POSIX_MULTI_PROCESS > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_MULTI_PROCESS)
147e83
       return _POSIX_MULTI_PROCESS;
147e83
 #else
147e83
       return -1;
147e83
 #endif
147e83
     case _SC_SINGLE_PROCESS:
147e83
-#if _POSIX_SINGLE_PROCESS > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_SINGLE_PROCESS)
147e83
       return _POSIX_SINGLE_PROCESS;
147e83
 #else
147e83
       return -1;
147e83
 #endif
147e83
 
147e83
     case _SC_NETWORKING:
147e83
-#if _POSIX_NETWORKING > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_NETWORKING)
147e83
       return _POSIX_NETWORKING;
147e83
 #else
147e83
       return -1;
147e83
 #endif
147e83
 
147e83
     case _SC_READER_WRITER_LOCKS:
147e83
-#if _POSIX_READER_WRITER_LOCKS > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_READER_WRITER_LOCKS)
147e83
       return _POSIX_READER_WRITER_LOCKS;
147e83
 #else
147e83
       return -1;
147e83
 #endif
147e83
     case _SC_SPIN_LOCKS:
147e83
-#if _POSIX_SPIN_LOCKS > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_SPIN_LOCKS)
147e83
       return _POSIX_SPIN_LOCKS;
147e83
 #else
147e83
       return -1;
147e83
 #endif
147e83
 
147e83
     case _SC_REGEXP:
147e83
-#if _POSIX_REGEXP > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_REGEXP)
147e83
       return _POSIX_REGEXP;
147e83
 #else
147e83
       return -1;
147e83
@@ -989,81 +991,81 @@ __sysconf (name)
147e83
       return -1;
147e83
 
147e83
     case _SC_SHELL:
147e83
-#if _POSIX_SHELL > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_SHELL)
147e83
       return _POSIX_SHELL;
147e83
 #else
147e83
       return -1;
147e83
 #endif
147e83
 
147e83
     case _SC_SIGNALS:
147e83
-#ifdef _POSIX_SIGNALS
147e83
+#if CONF_IS_DEFINED (_POSIX_SIGNALS)
147e83
       return _POSIX_SIGNALS;
147e83
 #else
147e83
       return -1;
147e83
 #endif
147e83
 
147e83
     case _SC_SPAWN:
147e83
-#if _POSIX_SPAWN > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_SPAWN)
147e83
       return _POSIX_SPAWN;
147e83
 #else
147e83
       return -1;
147e83
 #endif
147e83
 
147e83
     case _SC_SPORADIC_SERVER:
147e83
-#if _POSIX_SPORADIC_SERVER > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_SPORADIC_SERVER)
147e83
       return _POSIX_SPORADIC_SERVER;
147e83
 #else
147e83
       return -1;
147e83
 #endif
147e83
     case _SC_THREAD_SPORADIC_SERVER:
147e83
-#if _POSIX_THREAD_SPORADIC_SERVER > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_THREAD_SPORADIC_SERVER)
147e83
       return _POSIX_THREAD_SPORADIC_SERVER;
147e83
 #else
147e83
       return -1;
147e83
 #endif
147e83
 
147e83
     case _SC_SYSTEM_DATABASE:
147e83
-#if _POSIX_SYSTEM_DATABASE > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_SYSTEM_DATABASE)
147e83
       return _POSIX_SYSTEM_DATABASE;
147e83
 #else
147e83
       return -1;
147e83
 #endif
147e83
     case _SC_SYSTEM_DATABASE_R:
147e83
-#if _POSIX_SYSTEM_DATABASE_R > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_SYSTEM_DATABASE_R)
147e83
       return _POSIX_SYSTEM_DATABASE_R;
147e83
 #else
147e83
       return -1;
147e83
 #endif
147e83
 
147e83
     case _SC_THREAD_CPUTIME:
147e83
-#if _POSIX_THREAD_CPUTIME > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_THREAD_CPUTIME)
147e83
       return _POSIX_THREAD_CPUTIME;
147e83
 #else
147e83
       return -1;
147e83
 #endif
147e83
 
147e83
     case _SC_TIMEOUTS:
147e83
-#if _POSIX_TIMEOUTS > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_TIMEOUTS)
147e83
       return _POSIX_TIMEOUTS;
147e83
 #else
147e83
       return -1;
147e83
 #endif
147e83
 
147e83
     case _SC_TYPED_MEMORY_OBJECTS:
147e83
-#if _POSIX_TYPED_MEMORY_OBJECTS > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_TYPED_MEMORY_OBJECTS)
147e83
       return _POSIX_TYPED_MEMORY_OBJECTS;
147e83
 #else
147e83
       return -1;
147e83
 #endif
147e83
 
147e83
     case _SC_USER_GROUPS:
147e83
-#if _POSIX_USER_GROUPS > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_USER_GROUPS)
147e83
       return _POSIX_USER_GROUPS;
147e83
 #else
147e83
       return -1;
147e83
 #endif
147e83
     case _SC_USER_GROUPS_R:
147e83
-#if _POSIX_USER_GROUPS_R > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_USER_GROUPS_R)
147e83
       return _POSIX_USER_GROUPS_R;
147e83
 #else
147e83
       return -1;
147e83
@@ -1128,25 +1130,25 @@ __sysconf (name)
147e83
 #endif
147e83
 
147e83
     case _SC_TRACE:
147e83
-#if _POSIX_TRACE > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_TRACE)
147e83
       return _POSIX_TRACE;
147e83
 #else
147e83
       return -1;
147e83
 #endif
147e83
     case _SC_TRACE_EVENT_FILTER:
147e83
-#if _POSIX_TRACE_EVENT_FILTER > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_TRACE_EVENT_FILTER)
147e83
       return _POSIX_TRACE_EVENT_FILTER;
147e83
 #else
147e83
       return -1;
147e83
 #endif
147e83
     case _SC_TRACE_INHERIT:
147e83
-#if _POSIX_TRACE_INHERIT > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_TRACE_INHERIT)
147e83
       return _POSIX_TRACE_INHERIT;
147e83
 #else
147e83
       return -1;
147e83
 #endif
147e83
     case _SC_TRACE_LOG:
147e83
-#if _POSIX_TRACE_LOG > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_TRACE_LOG)
147e83
       return _POSIX_TRACE_LOG;
147e83
 #else
147e83
       return -1;
147e83
@@ -1183,14 +1185,14 @@ __sysconf (name)
147e83
       return 0;
147e83
 
147e83
     case _SC_IPV6:
147e83
-#if _POSIX_IPV6 > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_IPV6)
147e83
       return _POSIX_IPV6;
147e83
 #else
147e83
       return -1;
147e83
 #endif
147e83
 
147e83
     case _SC_RAW_SOCKETS:
147e83
-#if _POSIX_RAW_SOCKETS > 0
147e83
+#if CONF_IS_DEFINED_SET (_POSIX_RAW_SOCKETS)
147e83
       return _POSIX_RAW_SOCKETS;
147e83
 #else
147e83
       return -1;