logo

utils-std

Collection of commonly available Unix tools git clone https://anongit.hacktivis.me/git/utils-std.git/
commit: 9d95b95eb003df990d5fabbc19ac8601c674f925
parent 8d6f89f25242702793a1e3f96de1b3867a6ca825
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Tue, 25 Mar 2025 00:17:26 +0100

cmd/getconf_vars.m4: remove extraneous manual #ifdef

Diffstat:

Mcmd/getconf_vars.m453++++++++++++++++-------------------------------------
1 file changed, 16 insertions(+), 37 deletions(-)

diff --git a/cmd/getconf_vars.m4 b/cmd/getconf_vars.m4 @@ -107,9 +107,7 @@ conf_var_limit("POSIX_REC_MAX_XFER_SIZE", _PC_REC_MAX_XFER_SIZE, POSIX_REC_MAX_X conf_var_limit("POSIX_REC_MIN_XFER_SIZE", _PC_REC_MIN_XFER_SIZE, POSIX_REC_MIN_XFER_SIZE) conf_var_limit("POSIX_REC_XFER_ALIGN", _PC_REC_XFER_ALIGN, POSIX_REC_XFER_ALIGN) conf_var_limit("SYMLINK_MAX", _PC_SYMLINK_MAX, SYMLINK_MAX) -#ifdef _PC_TEXTDOMAIN_MAX conf_var_limit("TEXTDOMAIN_MAX", _PC_TEXTDOMAIN_MAX, TEXTDOMAIN_MAX) -#endif conf_var("_POSIX_CHOWN_RESTRICTED", _PC_CHOWN_RESTRICTED) conf_var("_POSIX_NO_TRUNC", _PC_NO_TRUNC) conf_var("_POSIX_VDISABLE", _PC_VDISABLE) @@ -131,7 +129,7 @@ conf_var_limit("BC_DIM_MAX", _SC_BC_DIM_MAX, BC_DIM_MAX) conf_var_limit("BC_SCALE_MAX", _SC_BC_SCALE_MAX, BC_SCALE_MAX) conf_var_limit("BC_STRING_MAX", _SC_BC_STRING_MAX, BC_STRING_MAX) conf_var_limit("CHILD_MAX", _SC_CHILD_MAX, CHILD_MAX) - // name not in POSIX.1-2024 but value is + // name not in POSIX.1-2024 but _SC_ value is conf_var("CLK_TCK", _SC_CLK_TCK) conf_var_limit("COLL_WEIGHTS_MAX", _SC_COLL_WEIGHTS_MAX, COLL_WEIGHTS_MAX) conf_var_limit("DELAYTIMER_MAX", _SC_DELAYTIMER_MAX, DELAYTIMER_MAX) @@ -141,28 +139,21 @@ conf_var_limit("IOV_MAX", _SC_IOV_MAX, IOV_MAX) conf_var_limit("LINE_MAX", _SC_LINE_MAX, LINE_MAX) conf_var_limit("LOGIN_NAME_MAX", _SC_LOGIN_NAME_MAX, LOGIN_NAME_MAX) conf_var_limit("NGROUPS_MAX", _SC_NGROUPS_MAX, NGROUPS_MAX) - // name not in POSIX.1-2024 but value is + // name not in POSIX.1-2024 but _SC_ value is conf_var("GETGR_R_SIZE_MAX", _SC_GETGR_R_SIZE_MAX) - // name not in POSIX.1-2024 but value is + // name not in POSIX.1-2024 but _SC_ value is conf_var("GETPW_R_SIZE_MAX", _SC_GETPW_R_SIZE_MAX) conf_var_limit("MQ_OPEN_MAX", _SC_MQ_OPEN_MAX, MQ_OPEN_MAX) conf_var_limit("MQ_PRIO_MAX", _SC_MQ_PRIO_MAX, MQ_PRIO_MAX) -#ifdef _SC_NPROCESSORS_CONF // added in POSIX.1-2024 - // name not in POSIX.1-2024 but value is + // added in POSIX.1-2024 + // name not in POSIX.1-2024 but _SC_ value is conf_var("NPROCESSORS_CONF", _SC_NPROCESSORS_CONF) -#endif -#ifdef _SC_NPROCESSORS_ONLN // added in POSIX.1-2024 - // name not in POSIX.1-2024 but value is + // added in POSIX.1-2024 + // name not in POSIX.1-2024 but _SC_ value is conf_var("NPROCESSORS_ONLN", _SC_NPROCESSORS_ONLN) -#endif -#ifdef _SC_NSIG // added in POSIX.1-2024 - // name not in POSIX.1-2024 but value is -# ifdef NSIG + // added in POSIX.1-2024 + // name not in POSIX.1-2024 but _SC_ value is conf_var_limit("NSIG", _SC_NSIG, NSIG) -# else -conf_var("NSIG", _SC_NSIG) -# endif -#endif conf_var_limit("OPEN_MAX", _SC_OPEN_MAX, OPEN_MAX) conf_var_limit("PAGE_SIZE", _SC_PAGE_SIZE, PAGE_SIZE) conf_var_limit("PAGESIZE", _SC_PAGESIZE, PAGESIZE) @@ -185,9 +176,8 @@ conf_var("_POSIX_BARRIERS", _SC_BARRIERS) conf_var("_POSIX_ASYNCHRONOUS_IO", _SC_ASYNCHRONOUS_IO) conf_var("_POSIX_CLOCK_SELECTION", _SC_CLOCK_SELECTION) conf_var("_POSIX_CPUTIME", _SC_CPUTIME) -#ifdef _SC_DEVICE_CONTROL // added in POSIX.1-2024 +// added in POSIX.1-2024 conf_var("_POSIX_DEVICE_CONTROL", _SC_DEVICE_CONTROL) -#endif conf_var("_POSIX_FSYNC", _SC_FSYNC) conf_var("_POSIX_IPV6", _SC_IPV6) conf_var("_POSIX_JOB_CONTROL", _SC_JOB_CONTROL) @@ -228,21 +218,16 @@ conf_var("_POSIX_TIMEOUTS", _SC_TIMEOUTS) conf_var("_POSIX_TIMERS", _SC_TIMERS) conf_var("_POSIX_TYPED_MEMORY_OBJECTS", _SC_TYPED_MEMORY_OBJECTS) conf_var("_POSIX_VERSION", _SC_VERSION) -#ifdef _SC_V8_ILP32_OFF32 // added in POSIX.1-2024 +// added in POSIX.1-2024 conf_var("_POSIX_V8_ILP32_OFF32", _SC_V8_ILP32_OFF32) -#endif -#ifdef _SC_V8_ILP32_OFFBIG // added in POSIX.1-2024 +// added in POSIX.1-2024 conf_var("_POSIX_V8_ILP32_OFFBIG", _SC_V8_ILP32_OFFBIG) -#endif -#ifdef _SC_V8_LP64_OFF64 // added in POSIX.1-2024 +// added in POSIX.1-2024 conf_var("_POSIX_V8_LP64_OFF64", _SC_V8_LP64_OFF64) -#endif -#ifdef _SC_V8_LPBIG_OFFBIG // added in POSIX.1-2024 +// added in POSIX.1-2024 conf_var("_POSIX_V8_LPBIG_OFFBIG", _SC_V8_LPBIG_OFFBIG) -#endif -#ifdef _SC_V7_ILP32_OFF32 // Obsolescent in POSIX.1-2024 +// Obsolescent in POSIX.1-2024 conf_var("_POSIX_V7_ILP32_OFF32", _SC_V7_ILP32_OFF32) -#endif conf_var("_POSIX_V7_ILP32_OFFBIG", _SC_V7_ILP32_OFFBIG) conf_var("_POSIX_V7_LP64_OFF64", _SC_V7_LP64_OFF64) conf_var("_POSIX_V7_LPBIG_OFFBIG", _SC_V7_LPBIG_OFFBIG) @@ -270,12 +255,9 @@ conf_var("_XOPEN_REALTIME_THREADS", _SC_XOPEN_REALTIME_THREADS) conf_var("_XOPEN_SHM", _SC_XOPEN_SHM) conf_var("_XOPEN_UNIX", _SC_XOPEN_UNIX) conf_var("XOPEN_UNIX", _SC_XOPEN_UNIX) -#ifdef _SC_XOPEN_UUCP // added in POSIX.1-2008, strangely missing from musl +// added in POSIX.1-2008, strangely missing from musl conf_var("_XOPEN_UUCP", _SC_XOPEN_UUCP) conf_var("XOPEN_UUCP", _SC_XOPEN_UUCP) -#else -#warning sysconf variable _SC_XOPEN_UUCP undefined -#endif conf_var("_XOPEN_VERSION", _SC_XOPEN_VERSION) #ifdef _SC_CHARCLASS_NAME_MAX /* https://www.austingroupbugs.net/view.php?id=1912 - sysconf lacks variable for {CHARCLASS_NAME_MAX} */ @@ -293,9 +275,6 @@ define(`limits_var_alias', ` {"$1", $2},')dnl // _MIN and _MAX from <limits.h> static const struct limits limits_vars[] = { limits_var(SS_REPL_MAX) -#ifndef _PC_TEXTDOMAIN_MAX -limits_var(TEXTDOMAIN_MAX) -#endif #ifndef _SC_CHARCLASS_NAME_MAX limits_var(CHARCLASS_NAME_MAX) #endif