aboutsummaryrefslogtreecommitdiff
path: root/coreutils
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils')
-rw-r--r--coreutils/fold.c3
-rw-r--r--coreutils/head.c3
-rw-r--r--coreutils/tail.c2
3 files changed, 8 insertions, 0 deletions
diff --git a/coreutils/fold.c b/coreutils/fold.c
index 8f74ed88d..ee0fdc250 100644
--- a/coreutils/fold.c
+++ b/coreutils/fold.c
@@ -52,6 +52,8 @@ extern int fold_main(int argc, char **argv)
int i;
int errs = 0;
+
+#ifdef CONFIG_FEATURE_SUSv2_OBSOLETE
/* Turn any numeric options into -w options. */
for (i = 1; i < argc; i++) {
char const *a = argv[i];
@@ -69,6 +71,7 @@ extern int fold_main(int argc, char **argv)
}
}
}
+#endif
flags = bb_getopt_ulflags(argc, argv, "bsw:", &w_opt);
if (flags & FLAG_WIDTH)
diff --git a/coreutils/head.c b/coreutils/head.c
index dab4de11b..a20873333 100644
--- a/coreutils/head.c
+++ b/coreutils/head.c
@@ -56,6 +56,7 @@ int head_main(int argc, char **argv)
int c;
int retval = EXIT_SUCCESS;
+#if defined CONFIG_FEATURE_SUSv2 || defined CONFIG_FEATURE_FANCY_HEAD
/* Allow legacy syntax of an initial numeric option without -n. */
if ((argc > 1) && (argv[1][0] == '-')
/* && (isdigit)(argv[1][1]) */
@@ -66,7 +67,9 @@ int head_main(int argc, char **argv)
p = (*argv) + 1;
goto GET_COUNT;
}
+#endif
+ /* No size benefit in converting this to bb_getopt_ulflags */
while ((opt = getopt(argc, argv, head_opts)) > 0) {
switch(opt) {
#ifdef CONFIG_FEATURE_FANCY_HEAD
diff --git a/coreutils/tail.c b/coreutils/tail.c
index 1db1e2b0f..cc1517a7e 100644
--- a/coreutils/tail.c
+++ b/coreutils/tail.c
@@ -121,6 +121,7 @@ int tail_main(int argc, char **argv)
char *s, *buf;
const char *fmt;
+#ifdef CONFIG_FEATURE_SUSv2
/* Allow legacy syntax of an initial numeric option without -n. */
if (argc >=2 && ((argv[1][0] == '+') || ((argv[1][0] == '-')
/* && (isdigit)(argv[1][1]) */
@@ -130,6 +131,7 @@ int tail_main(int argc, char **argv)
optarg = argv[1];
goto GET_COUNT;
}
+#endif
while ((opt = getopt(argc, argv, tail_opts)) > 0) {
switch (opt) {