diff options
author | damico <none@none> | 2007-08-20 21:48:23 -0700 |
---|---|---|
committer | damico <none@none> | 2007-08-20 21:48:23 -0700 |
commit | 1d4a595a8095c076c8332a2198578c9a0f429e93 (patch) | |
tree | e8a5a09f4091c52c6314876be27e7a122f7ce470 | |
parent | 2cb5f2d8d3edf24c4304283afef8e0558d839bbd (diff) | |
download | illumos-gate-1d4a595a8095c076c8332a2198578c9a0f429e93.tar.gz |
6466682 UNIX03 *vsx*: some unistd.h _POSIX2_* constants should return 200112Lonnv_72
6525584 UNIX03 *vsx*: unistd.h _XOPEN_UNIX constant is defined but with no value
-rw-r--r-- | usr/src/lib/libc/port/gen/sysconf.c | 30 | ||||
-rw-r--r-- | usr/src/uts/common/sys/unistd.h | 19 |
2 files changed, 39 insertions, 10 deletions
diff --git a/usr/src/lib/libc/port/gen/sysconf.c b/usr/src/lib/libc/port/gen/sysconf.c index 2fce51b32e..f9503ce1ce 100644 --- a/usr/src/lib/libc/port/gen/sysconf.c +++ b/usr/src/lib/libc/port/gen/sysconf.c @@ -231,13 +231,19 @@ sysconf(int name) /* XPG4/POSIX.1-1990/POSIX.2-1992 names */ case _SC_2_C_BIND: - return ((long)_POSIX2_C_BIND); + if (__xpg6 & _C99SUSv3_XPG6_sysconf_version) + return (200112L); + else + return (1L); case _SC_2_CHAR_TERM: return ((long)_POSIX2_CHAR_TERM); case _SC_2_C_DEV: - return ((long)_POSIX2_C_DEV); + if (__xpg6 & _C99SUSv3_XPG6_sysconf_version) + return (200112L); + else + return (1L); case _SC_2_C_VERSION: if (__xpg6 & _C99SUSv3_XPG6_sysconf_version) @@ -249,16 +255,28 @@ sysconf(int name) return (-1L); case _SC_2_FORT_RUN: - return ((long)_POSIX2_FORT_RUN); + if (__xpg6 & _C99SUSv3_XPG6_sysconf_version) + return (200112L); + else + return (1L); case _SC_2_LOCALEDEF: - return ((long)_POSIX2_LOCALEDEF); + if (__xpg6 & _C99SUSv3_XPG6_sysconf_version) + return (200112L); + else + return (1L); case _SC_2_SW_DEV: - return ((long)_POSIX2_SW_DEV); + if (__xpg6 & _C99SUSv3_XPG6_sysconf_version) + return (200112L); + else + return (1L); case _SC_2_UPE: - return ((long)_POSIX2_UPE); + if (__xpg6 & _C99SUSv3_XPG6_sysconf_version) + return (200112L); + else + return (1L); case _SC_2_VERSION: if (__xpg6 & _C99SUSv3_XPG6_sysconf_version) diff --git a/usr/src/uts/common/sys/unistd.h b/usr/src/uts/common/sys/unistd.h index 92d0798426..7cfbb9744f 100644 --- a/usr/src/uts/common/sys/unistd.h +++ b/usr/src/uts/common/sys/unistd.h @@ -18,6 +18,7 @@ * * CDDL HEADER END */ + /* * Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T * All Rights Reserved @@ -362,7 +363,7 @@ extern "C" { #define _XOPEN_XPG3 /* Supports XPG, Issue 3 */ #define _XOPEN_XPG4 /* Supports XPG, Issue 4 */ -#define _XOPEN_UNIX /* Supports XPG, Issue 4, Version 2 */ +#define _XOPEN_UNIX 0 /* Supports X/Open System Interfaces */ #ifndef _XOPEN_XCU_VERSION #define _XOPEN_XCU_VERSION 4 /* Supports XCU4 */ @@ -371,13 +372,23 @@ extern "C" { #define _XOPEN_REALTIME 1 /* Supports Realtime */ #define _XOPEN_ENH_I18N 1 /* Supports Enhanced International */ #define _XOPEN_SHM 1 /* Supports Shared Memory Feature */ -#define _POSIX2_C_BIND 200112L /* Supports C Language Bindings */ -#define _POSIX2_C_DEV 1 /* Supports C language dev utility */ #define _POSIX2_CHAR_TERM 1 /* Supports at least 1 terminal type */ + +#ifdef _XPG6 +#define _POSIX2_C_BIND 200112L /* Supports C Language Bindings */ +#define _POSIX2_C_DEV 200112L /* Supports C language dev utility */ #define _POSIX2_FORT_RUN 200112L /* Supports FORTRAN runtime */ +#define _POSIX2_LOCALEDEF 200112L /* Supports creation of locales */ +#define _POSIX2_SW_DEV 200112L /* Supports S/W Development Utility */ +#define _POSIX2_UPE 200112L /* Supports User Portability Utility */ +#else +#define _POSIX2_C_BIND 1 /* Supports C Language Bindings */ +#define _POSIX2_C_DEV 1 /* Supports C language dev utility */ +#define _POSIX2_FORT_RUN 1 /* Supports FORTRAN runtime */ #define _POSIX2_LOCALEDEF 1 /* Supports creation of locales */ -#define _POSIX2_SW_DEV 1 /* Supports S/W Devlopement Utility */ +#define _POSIX2_SW_DEV 1 /* Supports S/W Development Utility */ #define _POSIX2_UPE 1 /* Supports User Portability Utility */ +#endif /* _XPG6 */ /* UNIX 03 names */ #define _POSIX_REGEXP 1 /* Supports POSIX Regular Expressions */ |