svn commit: trunk/busybox/coreutils
aldot at busybox.net
aldot at busybox.net
Sat Jan 20 21:32:21 UTC 2007
Author: aldot
Date: 2007-01-20 13:32:20 -0800 (Sat, 20 Jan 2007)
New Revision: 17419
Log:
- make pre SUSv3 option handling dependant on INCLUDE_SUSv2
Modified:
trunk/busybox/coreutils/tty.c
Changeset:
Modified: trunk/busybox/coreutils/tty.c
===================================================================
--- trunk/busybox/coreutils/tty.c 2007-01-20 21:31:21 UTC (rev 17418)
+++ trunk/busybox/coreutils/tty.c 2007-01-20 21:32:20 UTC (rev 17419)
@@ -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 @@
s = "not a tty";
retval = 1;
}
+ USE_INCLUDE_SUSv2(if (!silent) puts(s);)
+ SKIP_INCLUDE_SUSv2(puts(s);)
- if (!silent) {
- puts(s);
- }
-
fflush_stdout_and_exit(retval);
}
More information about the busybox-cvs
mailing list