From d3dd91fcbc3fdd38db7fa5e2a844a103e8090a00 Mon Sep 17 00:00:00 2001 From: dufault Date: Sun, 8 Mar 1998 17:25:38 +0000 Subject: Reviewed by: bde Changes to support building with _POSIX_SOURCE set to 199309L: 1. Add sys/_posix.h to handle those preprocessor defs that POSIX says have effects when defined before including any header files; 2. Change POSIX4_VISIBLE back to _POSIX4_VISIBLE 3. Add _POSIX4_VISIBLE_HISTORICALLY for pre-existing BSD features now defined in POSIX. These show up when: _POSIX_SOURCE and _POSIX_C_SOURCE are not set or _POSIX_C_SOURCE is set >= 199309L and vanish when: _POSIX_SOURCE is set or _POSIX_C_SOURCE is < 199309L. 4. Explain these in man 9 posix4; 5. Include _posix.h and conditionalize on new feature test. --- lib/libc/gen/sysconf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/libc/gen/sysconf.c') diff --git a/lib/libc/gen/sysconf.c b/lib/libc/gen/sysconf.c index df67581..2d9c2ed 100644 --- a/lib/libc/gen/sysconf.c +++ b/lib/libc/gen/sysconf.c @@ -176,7 +176,7 @@ sysconf(name) mib[1] = USER_POSIX2_UPE; goto yesno; -#ifdef POSIX4 +#if _POSIX_VERSION >= 199309L /* POSIX.4 */ case _SC_ASYNCHRONOUS_IO: @@ -279,7 +279,7 @@ sysconf(name) mib[0] = CTL_POSIX4; mib[1] = CTL_POSIX4_TIMER_MAX; goto yesno; -#endif /* POSIX4 */ +#endif /* _POSIX_VERSION >= 199309L */ yesno: if (sysctl(mib, 2, &value, &len, NULL, 0) == -1) return (-1); -- cgit v1.1