summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2004-06-15 18:00:03 +0000
committerJim Meyering <jim@meyering.net>2004-06-15 18:00:03 +0000
commit1391da81e02b3a1279f58f96b6420369e50a07b6 (patch)
tree67d1ba35e1d0ebde231eb45d0c24bf35624eb818 /src
parent5034e6bdb20e580857a9386f7fdf32ecb62b2e6a (diff)
downloadcoreutils-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.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/ls.c b/src/ls.c
index 81f0d2ee6..b986e68c1 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