remove unsupported nonstandard sysconf macros and their table entries
some of these may have been from ancient (pre-SUSv2) POSIX versions; more likely, they were from POSIX drafts or glibc interpretations of what ancient versions of POSIX should have added (instead they made they described functionality mandatory and/or dropped it completely). others are purely glibc-isms, many of them ill-thought-out, like providing ways to lookup the min/max values of types at runtime (despite the impossibility of them changing at runtime and the impossibility of representing ULONG_MAX in a return value of type long). since our sysconf implementation does not support or return meaningful values for any of these, it's harmful to have the macros around; applications' build scripts may detect and attempt to use them, only to get -1/EINVAL as a result. if removing them does break some applications, and it's determined that the usage was reasonable, some of these could be added back on an as-needed basis, but they should return actual meaningful values, not junk like they were returning before.
This commit is contained in:
parent
ff78355bc1
commit
93be56ba88
2 changed files with 0 additions and 120 deletions
|
|
@ -65,11 +65,9 @@ long sysconf(int name)
|
|||
[_SC_BC_SCALE_MAX] = _POSIX2_BC_SCALE_MAX,
|
||||
[_SC_BC_STRING_MAX] = _POSIX2_BC_STRING_MAX,
|
||||
[_SC_COLL_WEIGHTS_MAX] = COLL_WEIGHTS_MAX,
|
||||
[_SC_EQUIV_CLASS_MAX] = -1, /* ?? */
|
||||
[_SC_EXPR_NEST_MAX] = -1,
|
||||
[_SC_LINE_MAX] = -1,
|
||||
[_SC_RE_DUP_MAX] = RE_DUP_MAX,
|
||||
[_SC_CHARCLASS_NAME_MAX] = -1, /* ?? */
|
||||
[_SC_2_VERSION] = VER,
|
||||
[_SC_2_C_BIND] = VER,
|
||||
[_SC_2_C_DEV] = -1,
|
||||
|
|
@ -77,20 +75,7 @@ long sysconf(int name)
|
|||
[_SC_2_FORT_RUN] = -1,
|
||||
[_SC_2_SW_DEV] = -1,
|
||||
[_SC_2_LOCALEDEF] = -1,
|
||||
[_SC_PII] = -1, /* ????????? */
|
||||
[_SC_PII_XTI] = -1,
|
||||
[_SC_PII_SOCKET] = -1,
|
||||
[_SC_PII_INTERNET] = -1,
|
||||
[_SC_PII_OSI] = -1,
|
||||
[_SC_POLL] = 1,
|
||||
[_SC_SELECT] = 1,
|
||||
[_SC_IOV_MAX] = IOV_MAX,
|
||||
[_SC_PII_INTERNET_STREAM] = -1,
|
||||
[_SC_PII_INTERNET_DGRAM] = -1,
|
||||
[_SC_PII_OSI_COTS] = -1,
|
||||
[_SC_PII_OSI_CLTS] = -1,
|
||||
[_SC_PII_OSI_M] = -1,
|
||||
[_SC_T_IOV_MAX] = -1,
|
||||
[_SC_THREADS] = VER,
|
||||
[_SC_THREAD_SAFE_FUNCTIONS] = VER,
|
||||
[_SC_GETGR_R_SIZE_MAX] = -1,
|
||||
|
|
@ -120,35 +105,11 @@ long sysconf(int name)
|
|||
[_SC_XOPEN_ENH_I18N] = 1,
|
||||
[_SC_XOPEN_SHM] = 1,
|
||||
[_SC_2_CHAR_TERM] = -1,
|
||||
[_SC_2_C_VERSION] = -1,
|
||||
[_SC_2_UPE] = -1,
|
||||
[_SC_XOPEN_XPG2] = -1,
|
||||
[_SC_XOPEN_XPG3] = -1,
|
||||
[_SC_XOPEN_XPG4] = -1,
|
||||
[_SC_CHAR_BIT] = -1,
|
||||
[_SC_CHAR_MAX] = -1,
|
||||
[_SC_CHAR_MIN] = -1,
|
||||
[_SC_INT_MAX] = -1,
|
||||
[_SC_INT_MIN] = -1,
|
||||
[_SC_LONG_BIT] = -1,
|
||||
[_SC_WORD_BIT] = -1,
|
||||
[_SC_MB_LEN_MAX] = -1,
|
||||
[_SC_NZERO] = NZERO,
|
||||
[_SC_SSIZE_MAX] = -1,
|
||||
[_SC_SCHAR_MAX] = -1,
|
||||
[_SC_SCHAR_MIN] = -1,
|
||||
[_SC_SHRT_MAX] = -1,
|
||||
[_SC_SHRT_MIN] = -1,
|
||||
[_SC_UCHAR_MAX] = -1,
|
||||
[_SC_UINT_MAX] = -1,
|
||||
[_SC_ULONG_MAX] = -1,
|
||||
[_SC_USHRT_MAX] = -1,
|
||||
[_SC_NL_ARGMAX] = -1,
|
||||
[_SC_NL_LANGMAX] = -1,
|
||||
[_SC_NL_MSGMAX] = -1,
|
||||
[_SC_NL_NMAX] = -1,
|
||||
[_SC_NL_SETMAX] = -1,
|
||||
[_SC_NL_TEXTMAX] = -1,
|
||||
[_SC_XBS5_ILP32_OFF32] = -1,
|
||||
[_SC_XBS5_ILP32_OFFBIG] = sizeof(long)==4 ? 1 : JT_ZERO,
|
||||
[_SC_XBS5_LP64_OFF64] = sizeof(long)==8 ? 1 : JT_ZERO,
|
||||
|
|
@ -158,40 +119,19 @@ long sysconf(int name)
|
|||
[_SC_XOPEN_REALTIME_THREADS] = -1,
|
||||
[_SC_ADVISORY_INFO] = VER,
|
||||
[_SC_BARRIERS] = VER,
|
||||
[_SC_BASE] = -1,
|
||||
[_SC_C_LANG_SUPPORT] = -1,
|
||||
[_SC_C_LANG_SUPPORT_R] = -1,
|
||||
[_SC_CLOCK_SELECTION] = VER,
|
||||
[_SC_CPUTIME] = VER,
|
||||
[_SC_THREAD_CPUTIME] = VER,
|
||||
[_SC_DEVICE_IO] = -1,
|
||||
[_SC_DEVICE_SPECIFIC] = -1,
|
||||
[_SC_DEVICE_SPECIFIC_R] = -1,
|
||||
[_SC_FD_MGMT] = -1,
|
||||
[_SC_FIFO] = -1,
|
||||
[_SC_PIPE] = -1,
|
||||
[_SC_FILE_ATTRIBUTES] = -1,
|
||||
[_SC_FILE_LOCKING] = -1,
|
||||
[_SC_FILE_SYSTEM] = -1,
|
||||
[_SC_MONOTONIC_CLOCK] = VER,
|
||||
[_SC_MULTI_PROCESS] = -1,
|
||||
[_SC_SINGLE_PROCESS] = -1,
|
||||
[_SC_NETWORKING] = -1,
|
||||
[_SC_READER_WRITER_LOCKS] = VER,
|
||||
[_SC_SPIN_LOCKS] = VER,
|
||||
[_SC_REGEXP] = 1,
|
||||
[_SC_REGEX_VERSION] = -1,
|
||||
[_SC_SHELL] = 1,
|
||||
[_SC_SIGNALS] = -1,
|
||||
[_SC_SPAWN] = VER,
|
||||
[_SC_SPORADIC_SERVER] = -1,
|
||||
[_SC_THREAD_SPORADIC_SERVER] = -1,
|
||||
[_SC_SYSTEM_DATABASE] = -1,
|
||||
[_SC_SYSTEM_DATABASE_R] = -1,
|
||||
[_SC_TIMEOUTS] = VER,
|
||||
[_SC_TYPED_MEMORY_OBJECTS] = -1,
|
||||
[_SC_USER_GROUPS] = -1,
|
||||
[_SC_USER_GROUPS_R] = -1,
|
||||
[_SC_2_PBS] = -1,
|
||||
[_SC_2_PBS_ACCOUNTING] = -1,
|
||||
[_SC_2_PBS_LOCATE] = -1,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue