diff options
author | Jim Meyering <jim@meyering.net> | 2004-06-15 18:00:03 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2004-06-15 18:00:03 +0000 |
commit | 1391da81e02b3a1279f58f96b6420369e50a07b6 (patch) | |
tree | 67d1ba35e1d0ebde231eb45d0c24bf35624eb818 /src | |
parent | 5034e6bdb20e580857a9386f7fdf32ecb62b2e6a (diff) | |
download | coreutils-1391da81e02b3a1279f58f96b6420369e50a07b6.tar.xz |
(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.
Diffstat (limited to 'src')
-rw-r--r-- | src/ls.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -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 |