From 1391da81e02b3a1279f58f96b6420369e50a07b6 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Tue, 15 Jun 2004 18:00:03 +0000 Subject: [PATCH] (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. --- src/ls.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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 -- 2.47.3