diff options
author | dufault <dufault@FreeBSD.org> | 1998-03-04 10:27:00 +0000 |
---|---|---|
committer | dufault <dufault@FreeBSD.org> | 1998-03-04 10:27:00 +0000 |
commit | e28788f2a420e093ade000eeb0ba96634af0e177 (patch) | |
tree | ed01e5e208cef9b87e2f87e523c53a779b5e241b /lib/libc/gen/sysconf.c | |
parent | 8893ec06df8a340a0fd561e62ae140190cf3c832 (diff) | |
download | FreeBSD-src-e28788f2a420e093ade000eeb0ba96634af0e177.zip FreeBSD-src-e28788f2a420e093ade000eeb0ba96634af0e177.tar.gz |
Reviewed by: msmith, bde long ago
POSIX.4 headers and sysctl variables. Nothing should change
unless POSIX4 is defined or _POSIX_VERSION is set to 199309.
Diffstat (limited to 'lib/libc/gen/sysconf.c')
-rw-r--r-- | lib/libc/gen/sysconf.c | 107 |
1 files changed, 107 insertions, 0 deletions
diff --git a/lib/libc/gen/sysconf.c b/lib/libc/gen/sysconf.c index 16a3efa..df67581 100644 --- a/lib/libc/gen/sysconf.c +++ b/lib/libc/gen/sysconf.c @@ -174,6 +174,113 @@ sysconf(name) case _SC_2_UPE: mib[0] = CTL_USER; mib[1] = USER_POSIX2_UPE; + goto yesno; + +#ifdef POSIX4 + /* POSIX.4 */ + + case _SC_ASYNCHRONOUS_IO: + mib[0] = CTL_POSIX4; + mib[1] = CTL_POSIX4_ASYNCHRONOUS_IO; + goto yesno; + case _SC_MAPPED_FILES: + mib[0] = CTL_POSIX4; + mib[1] = CTL_POSIX4_MAPPED_FILES; + goto yesno; + case _SC_MEMLOCK: + mib[0] = CTL_POSIX4; + mib[1] = CTL_POSIX4_MEMLOCK; + goto yesno; + case _SC_MEMLOCK_RANGE: + mib[0] = CTL_POSIX4; + mib[1] = CTL_POSIX4_MEMLOCK_RANGE; + goto yesno; + case _SC_MEMORY_PROTECTION: + mib[0] = CTL_POSIX4; + mib[1] = CTL_POSIX4_MEMORY_PROTECTION; + goto yesno; + case _SC_MESSAGE_PASSING: + mib[0] = CTL_POSIX4; + mib[1] = CTL_POSIX4_MESSAGE_PASSING; + goto yesno; + case _SC_PRIORITIZED_IO: + mib[0] = CTL_POSIX4; + mib[1] = CTL_POSIX4_PRIORITIZED_IO; + goto yesno; + case _SC_PRIORITY_SCHEDULING: + mib[0] = CTL_POSIX4; + mib[1] = CTL_POSIX4_PRIORITY_SCHEDULING; + goto yesno; + case _SC_REALTIME_SIGNALS: + mib[0] = CTL_POSIX4; + mib[1] = CTL_POSIX4_REALTIME_SIGNALS; + goto yesno; + case _SC_SEMAPHORES: + mib[0] = CTL_POSIX4; + mib[1] = CTL_POSIX4_SEMAPHORES; + goto yesno; + case _SC_FSYNC: + mib[0] = CTL_POSIX4; + mib[1] = CTL_POSIX4_FSYNC; + goto yesno; + case _SC_SHARED_MEMORY_OBJECTS: + mib[0] = CTL_POSIX4; + mib[1] = CTL_POSIX4_SHARED_MEMORY_OBJECTS; + goto yesno; + case _SC_SYNCHRONIZED_IO: + mib[0] = CTL_POSIX4; + mib[1] = CTL_POSIX4_SYNCHRONIZED_IO; + goto yesno; + case _SC_TIMERS: + mib[0] = CTL_POSIX4; + mib[1] = CTL_POSIX4_TIMERS; + goto yesno; + case _SC_AIO_LISTIO_MAX: + mib[0] = CTL_POSIX4; + mib[1] = CTL_POSIX4_AIO_LISTIO_MAX; + goto yesno; + case _SC_AIO_MAX: + mib[0] = CTL_POSIX4; + mib[1] = CTL_POSIX4_AIO_MAX; + goto yesno; + case _SC_AIO_PRIO_DELTA_MAX: + mib[0] = CTL_POSIX4; + mib[1] = CTL_POSIX4_AIO_PRIO_DELTA_MAX; + goto yesno; + case _SC_DELAYTIMER_MAX: + mib[0] = CTL_POSIX4; + mib[1] = CTL_POSIX4_DELAYTIMER_MAX; + goto yesno; + case _SC_MQ_OPEN_MAX: + mib[0] = CTL_POSIX4; + mib[1] = CTL_POSIX4_MQ_OPEN_MAX; + goto yesno; + case _SC_PAGESIZE: + mib[0] = CTL_POSIX4; + mib[1] = CTL_POSIX4_PAGESIZE; + goto yesno; + case _SC_RTSIG_MAX: + mib[0] = CTL_POSIX4; + mib[1] = CTL_POSIX4_RTSIG_MAX; + goto yesno; + case _SC_SEM_NSEMS_MAX: + mib[0] = CTL_POSIX4; + mib[1] = CTL_POSIX4_SEM_NSEMS_MAX; + goto yesno; + case _SC_SEM_VALUE_MAX: + mib[0] = CTL_POSIX4; + mib[1] = CTL_POSIX4_SEM_VALUE_MAX; + goto yesno; + case _SC_SIGQUEUE_MAX: + mib[0] = CTL_POSIX4; + mib[1] = CTL_POSIX4_SIGQUEUE_MAX; + goto yesno; + case _SC_TIMER_MAX: + mib[0] = CTL_POSIX4; + mib[1] = CTL_POSIX4_TIMER_MAX; + goto yesno; +#endif /* POSIX4 */ + yesno: if (sysctl(mib, 2, &value, &len, NULL, 0) == -1) return (-1); if (value == 0) |