summaryrefslogtreecommitdiff
path: root/src/ls.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1996-04-21 04:11:43 +0000
committerJim Meyering <jim@meyering.net>1996-04-21 04:11:43 +0000
commit7d956ece8cd718d895a1920f0acdd9f32a7cc691 (patch)
tree461353616694fea3b913019d50bc2cb5f9ba40ef /src/ls.c
parentee708ff4aaf7ecf857431955a10600cd5be7774f (diff)
downloadcoreutils-7d956ece8cd718d895a1920f0acdd9f32a7cc691.tar.xz
(decode_switches): Use getenv (POSIXLY_CORRECT), not undefined posix_pedantic.
Diffstat (limited to 'src/ls.c')
-rw-r--r--src/ls.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ls.c b/src/ls.c
index 8b524d954..5f56e857e 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -727,8 +727,10 @@ decode_switches (int argc, char **argv)
}
#endif
+ /* TABSIZE is not POSIX-approved.
+ Ignore it when POSIXLY_CORRECT is set. */
tabsize = 8;
- if (!posix_pedantic && (p = getenv ("TABSIZE")))
+ if (getenv ("POSIXLY_CORRECT") == 0 && (p = getenv ("TABSIZE")))
{
if (xstrtol (p, NULL, 0, &tmp_long, NULL) == LONGINT_OK
&& 0 < tmp_long && tmp_long <= INT_MAX)