From: Jim Meyering Date: Tue, 15 Jun 2004 18:00:03 +0000 (+0000) Subject: (decode_switches): Pay attention to TABSIZE even if POSIXLY_CORRECT X-Git-Tag: v5.3.0~1337 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1391da81e02b3a1279f58f96b6420369e50a07b6;p=thirdparty%2Fcoreutils.git (decode_switches): Pay attention to TABSIZE even if POSIXLY_CORRECT is set. POSIX reserves upper-case environment variables to the implementation, so it's OK for ls to depend on TABSIZE. --- diff --git a/src/ls.c b/src/ls.c index 81f0d2ee69..b986e68c14 100644 --- a/src/ls.c +++ b/src/ls.c @@ -1416,12 +1416,10 @@ decode_switches (int argc, char **argv) } #endif - /* Using the TABSIZE environment variable is not POSIX-approved. - Ignore it when POSIXLY_CORRECT is set. */ { - char const *p; + char const *p = getenv ("TABSIZE"); tabsize = 8; - if (!getenv ("POSIXLY_CORRECT") && (p = getenv ("TABSIZE"))) + if (p) { unsigned long int tmp_ulong; if (xstrtoul (p, NULL, 0, &tmp_ulong, NULL) == LONGINT_OK