aboutsummaryrefslogtreecommitdiff
path: root/coreutils
diff options
context:
space:
mode:
authorGravatar Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>2007-01-20 21:32:20 +0000
committerGravatar Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>2007-01-20 21:32:20 +0000
commit1118a1de46cdeb166f256374568f4bc21b5d7449 (patch)
treeabfd73cc316caaca925097f9967a45863fb5d1f0 /coreutils
parent8b1ae450379a837326bedcf79f966b2eab100fa3 (diff)
downloadbusybox-1118a1de46cdeb166f256374568f4bc21b5d7449.tar.gz
busybox-1118a1de46cdeb166f256374568f4bc21b5d7449.tar.bz2
- make pre SUSv3 option handling dependant on INCLUDE_SUSv2
Diffstat (limited to 'coreutils')
-rw-r--r--coreutils/tty.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/coreutils/tty.c b/coreutils/tty.c
index b2ab862ec..fee4b8b9f 100644
--- a/coreutils/tty.c
+++ b/coreutils/tty.c
@@ -18,12 +18,12 @@
int tty_main(int argc, char **argv)
{
const char *s;
- int silent; /* Note: No longer relevant in SUSv3. */
+ USE_INCLUDE_SUSv2(int silent;) /* Note: No longer relevant in SUSv3. */
int retval;
xfunc_error_retval = 2; /* SUSv3 requires > 1 for error. */
- silent = getopt32(argc, argv, "s");
+ USE_INCLUDE_SUSv2(silent = getopt32(argc, argv, "s");)
/* gnu tty outputs a warning that it is ignoring all args. */
bb_warn_ignoring_args(argc - optind);
@@ -36,10 +36,8 @@ int tty_main(int argc, char **argv)
s = "not a tty";
retval = 1;
}
-
- if (!silent) {
- puts(s);
- }
+ USE_INCLUDE_SUSv2(if (!silent) puts(s);)
+ SKIP_INCLUDE_SUSv2(puts(s);)
fflush_stdout_and_exit(retval);
}