a few more fixes for unistd/sysconf feature reporting
authorRich Felker <dalias@aerifal.cx>
Sat, 27 Jul 2013 04:02:39 +0000 (00:02 -0400)
committerRich Felker <dalias@aerifal.cx>
Sat, 27 Jul 2013 04:02:39 +0000 (00:02 -0400)
include/unistd.h
src/conf/sysconf.c

index 151a6ce95f411579a0e7a47199bf6868e3e906a9..13acc147af81390d2c49e67c3cc990965f3f8c33 100644 (file)
@@ -237,6 +237,7 @@ void syncfs(int);
 #define _POSIX_READER_WRITER_LOCKS _POSIX_VERSION
 #define _POSIX_ASYNCHRONOUS_IO  _POSIX_VERSION
 #define _POSIX_SEMAPHORES       _POSIX_VERSION
+#define _POSIX_SHARED_MEMORY_OBJECTS _POSIX_VERSION
 
 #define _POSIX2_C_BIND          _POSIX_VERSION
 
index b2e94e522e29467b0babf34203f08ea7683fdca2..d979b62691d70d7f5502f96e4fdcaf995b029ba8 100644 (file)
@@ -27,14 +27,14 @@ long sysconf(int name)
                [_SC_ASYNCHRONOUS_IO] = VER,
                [_SC_PRIORITIZED_IO] = -1,
                [_SC_SYNCHRONIZED_IO] = -1,
-               [_SC_FSYNC] = -1,
+               [_SC_FSYNC] = VER,
                [_SC_MAPPED_FILES] = VER,
                [_SC_MEMLOCK] = VER,
                [_SC_MEMLOCK_RANGE] = VER,
                [_SC_MEMORY_PROTECTION] = VER,
                [_SC_MESSAGE_PASSING] = VER,
                [_SC_SEMAPHORES] = VER,
-               [_SC_SHARED_MEMORY_OBJECTS] = -1,
+               [_SC_SHARED_MEMORY_OBJECTS] = VER,
                [_SC_AIO_LISTIO_MAX] = -1,
                [_SC_AIO_MAX] = -1,
                [_SC_AIO_PRIO_DELTA_MAX] = 0, /* ?? */
@@ -85,7 +85,7 @@ long sysconf(int name)
                [_SC_GETPW_R_SIZE_MAX] = -1,
                [_SC_LOGIN_NAME_MAX] = 256,
                [_SC_TTY_NAME_MAX] = TTY_NAME_MAX,
-               [_SC_THREAD_DESTRUCTOR_ITERATIONS] = _POSIX_THREAD_DESTRUCTOR_ITERATIONS,
+               [_SC_THREAD_DESTRUCTOR_ITERATIONS] = PTHREAD_DESTRUCTOR_ITERATIONS,
                [_SC_THREAD_KEYS_MAX] = PTHREAD_KEYS_MAX,
                [_SC_THREAD_STACK_MIN] = PTHREAD_STACK_MIN,
                [_SC_THREAD_THREADS_MAX] = -1,
@@ -103,7 +103,7 @@ long sysconf(int name)
                [_SC_PASS_MAX] = -1,
                [_SC_XOPEN_VERSION] = _XOPEN_VERSION,
                [_SC_XOPEN_XCU_VERSION] = _XOPEN_VERSION,
-               [_SC_XOPEN_UNIX] = -1,
+               [_SC_XOPEN_UNIX] = 1,
                [_SC_XOPEN_CRYPT] = -1,
                [_SC_XOPEN_ENH_I18N] = 1,
                [_SC_XOPEN_SHM] = 1,
@@ -140,7 +140,7 @@ long sysconf(int name)
                [_SC_XBS5_ILP32_OFF32] = -1,
                [_SC_XBS5_ILP32_OFFBIG] = 2*(sizeof(long)==4)-1,
                [_SC_XBS5_LP64_OFF64] = 2*(sizeof(long)==8)-1,
-               [_SC_XBS5_LPBIG_OFFBIG] = 2*(sizeof(long)>=8)-1,
+               [_SC_XBS5_LPBIG_OFFBIG] = -1,
                [_SC_XOPEN_LEGACY] = -1,
                [_SC_XOPEN_REALTIME] = -1,
                [_SC_XOPEN_REALTIME_THREADS] = -1,
@@ -191,7 +191,7 @@ long sysconf(int name)
                [_SC_V6_ILP32_OFF32] = -1,
                [_SC_V6_ILP32_OFFBIG] = 2*(sizeof(long)==4)-1,
                [_SC_V6_LP64_OFF64] = 2*(sizeof(long)==8)-1,
-               [_SC_V6_LPBIG_OFFBIG] = 2*(sizeof(long)>=8)-1,
+               [_SC_V6_LPBIG_OFFBIG] = -1,
                [_SC_HOST_NAME_MAX] = HOST_NAME_MAX,
                [_SC_TRACE] = -1,
                [_SC_TRACE_EVENT_FILTER] = -1,
@@ -203,7 +203,7 @@ long sysconf(int name)
                [_SC_V7_ILP32_OFF32] = -1,
                [_SC_V7_ILP32_OFFBIG] = 2*(sizeof(long)==4)-1,
                [_SC_V7_LP64_OFF64] = 2*(sizeof(long)==8)-1,
-               [_SC_V7_LPBIG_OFFBIG] = 2*(sizeof(long)>=8)-1,
+               [_SC_V7_LPBIG_OFFBIG] = -1,
                [_SC_SS_REPL_MAX] = -1,
                [_SC_TRACE_EVENT_NAME_MAX] = -1,
                [_SC_TRACE_NAME_MAX] = -1,