aboutsummaryrefslogtreecommitdiff
path: root/coreutils
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2009-06-19 12:10:38 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2009-06-19 12:10:38 +0200
commitf3b92d385695aecefd93d5f199be1f64270c2687 (patch)
tree5d6b2308ceafea6040bd78ea8401a91eb65d376b /coreutils
parente2e4cc249dc1bd4b280846f55a36208674eadd55 (diff)
downloadbusybox-f3b92d385695aecefd93d5f199be1f64270c2687.tar.gz
getopt: FEATURE_GETOPT_LONG for -l; rename GETOPT_LONG to LONG_OPTS
Signed-off-by: Colin Watson <cjwatson@ubuntu.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'coreutils')
-rw-r--r--coreutils/Config.in16
-rw-r--r--coreutils/od_bloaty.c12
-rw-r--r--coreutils/touch.c4
-rw-r--r--coreutils/uname.c4
4 files changed, 18 insertions, 18 deletions
diff --git a/coreutils/Config.in b/coreutils/Config.in
index 88642d71e..f9db0671d 100644
--- a/coreutils/Config.in
+++ b/coreutils/Config.in
@@ -204,7 +204,7 @@ config ENV
config FEATURE_ENV_LONG_OPTIONS
bool "Enable long options"
default n
- depends on ENV && GETOPT_LONG
+ depends on ENV && LONG_OPTS
help
Support long options for the env applet.
@@ -217,7 +217,7 @@ config EXPAND
config FEATURE_EXPAND_LONG_OPTIONS
bool "Enable long options"
default n
- depends on EXPAND && GETOPT_LONG
+ depends on EXPAND && LONG_OPTS
help
Support long options for the expand applet.
@@ -291,7 +291,7 @@ config INSTALL
config FEATURE_INSTALL_LONG_OPTIONS
bool "Enable long options"
default n
- depends on INSTALL && GETOPT_LONG
+ depends on INSTALL && LONG_OPTS
help
Support long options for the install applet.
@@ -364,7 +364,7 @@ config FEATURE_LS_USERNAME
config FEATURE_LS_COLOR
bool "Allow use of color to identify file types"
default y
- depends on LS && GETOPT_LONG
+ depends on LS && LONG_OPTS
help
This enables the --color option to ls.
@@ -394,7 +394,7 @@ config MKDIR
config FEATURE_MKDIR_LONG_OPTIONS
bool "Enable long options"
default n
- depends on MKDIR && GETOPT_LONG
+ depends on MKDIR && LONG_OPTS
help
Support long options for the mkdir applet.
@@ -421,7 +421,7 @@ config MV
config FEATURE_MV_LONG_OPTIONS
bool "Enable long options"
default n
- depends on MV && GETOPT_LONG
+ depends on MV && LONG_OPTS
help
Support long options for the mv applet.
@@ -498,7 +498,7 @@ config RMDIR
config FEATURE_RMDIR_LONG_OPTIONS
bool "Enable long options"
default n
- depends on RMDIR && GETOPT_LONG
+ depends on RMDIR && LONG_OPTS
help
Support long options for the rmdir applet, including
--ignore-fail-on-non-empty for compatibility with GNU rmdir.
@@ -732,7 +732,7 @@ config UNEXPAND
config FEATURE_UNEXPAND_LONG_OPTIONS
bool "Enable long options"
default n
- depends on UNEXPAND && GETOPT_LONG
+ depends on UNEXPAND && LONG_OPTS
help
Support long options for the unexpand applet.
diff --git a/coreutils/od_bloaty.c b/coreutils/od_bloaty.c
index eb4579857..00efec51c 100644
--- a/coreutils/od_bloaty.c
+++ b/coreutils/od_bloaty.c
@@ -832,7 +832,7 @@ format_address_std(off_t address, char c)
printf(address_fmt, address);
}
-#if ENABLE_GETOPT_LONG
+#if ENABLE_LONG_OPTS
/* only used with --traditional */
static void
format_address_paren(off_t address, char c)
@@ -953,7 +953,7 @@ get_lcm(void)
return l_c_m;
}
-#if ENABLE_GETOPT_LONG
+#if ENABLE_LONG_OPTS
/* If S is a valid traditional offset specification with an optional
leading '+' return nonzero and set *OFFSET to the offset it denotes. */
@@ -1199,9 +1199,9 @@ int od_main(int argc, char **argv)
OPT_s = 1 << 15,
OPT_S = 1 << 16,
OPT_w = 1 << 17,
- OPT_traditional = (1 << 18) * ENABLE_GETOPT_LONG,
+ OPT_traditional = (1 << 18) * ENABLE_LONG_OPTS,
};
-#if ENABLE_GETOPT_LONG
+#if ENABLE_LONG_OPTS
static const char od_longopts[] ALIGN1 =
"skip-bytes\0" Required_argument "j"
"address-radix\0" Required_argument "A"
@@ -1235,7 +1235,7 @@ int od_main(int argc, char **argv)
/* Parse command line */
opt_complementary = "w+:t::"; /* -w N, -t is a list */
-#if ENABLE_GETOPT_LONG
+#if ENABLE_LONG_OPTS
applet_long_options = od_longopts;
#endif
opt = getopt32(argv, "A:N:abcdfhij:lot:vxsS:"
@@ -1306,7 +1306,7 @@ int od_main(int argc, char **argv)
* FIXME: POSIX 1003.1-2001 with XSI requires support for the
* traditional syntax even if --traditional is not given. */
-#if ENABLE_GETOPT_LONG
+#if ENABLE_LONG_OPTS
if (opt & OPT_traditional) {
off_t o1, o2;
diff --git a/coreutils/touch.c b/coreutils/touch.c
index 1d5541710..7d434a233 100644
--- a/coreutils/touch.c
+++ b/coreutils/touch.c
@@ -41,7 +41,7 @@ int touch_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int touch_main(int argc UNUSED_PARAM, char **argv)
{
#if ENABLE_DESKTOP
-#if ENABLE_GETOPT_LONG
+#if ENABLE_LONG_OPTS
static const char longopts[] ALIGN1 =
/* name, has_arg, val */
"no-create\0" No_argument "c"
@@ -59,7 +59,7 @@ int touch_main(int argc UNUSED_PARAM, char **argv)
int opts;
#if ENABLE_DESKTOP
-#if ENABLE_GETOPT_LONG
+#if ENABLE_LONG_OPTS
applet_long_options = longopts;
#endif
#endif
diff --git a/coreutils/uname.c b/coreutils/uname.c
index 5a790fb70..df4566063 100644
--- a/coreutils/uname.c
+++ b/coreutils/uname.c
@@ -73,7 +73,7 @@ static const unsigned short utsname_offset[] = {
int uname_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int uname_main(int argc UNUSED_PARAM, char **argv)
{
-#if ENABLE_GETOPT_LONG
+#if ENABLE_LONG_OPTS
static const char longopts[] ALIGN1 =
/* name, has_arg, val */
"all\0" No_argument "a"
@@ -97,7 +97,7 @@ int uname_main(int argc UNUSED_PARAM, char **argv)
const unsigned short *delta;
unsigned toprint;
- IF_GETOPT_LONG(applet_long_options = longopts);
+ IF_LONG_OPTS(applet_long_options = longopts);
toprint = getopt32(argv, options);
if (argv[optind]) { /* coreutils-6.9 compat */