aboutsummaryrefslogtreecommitdiff
path: root/util-linux/getopt.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2006-03-10 19:22:06 +0000
committerRob Landley <rob@landley.net>2006-03-10 19:22:06 +0000
commitbc68cd14ccaebc17e7e03a08e51fddfb91007624 (patch)
treebeb32cedafc6232bf8a49fe90f0769d471ea6791 /util-linux/getopt.c
parentdae6aa28598cb2353291f18ca52e768c3259165a (diff)
downloadbusybox-bc68cd14ccaebc17e7e03a08e51fddfb91007624.tar.gz
Patch from Denis Vlasenko turning static const int (which gets emitted into
the busybox binary) into enums (which don't).
Diffstat (limited to 'util-linux/getopt.c')
-rw-r--r--util-linux/getopt.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/util-linux/getopt.c b/util-linux/getopt.c
index 16dcbbca0..9e33b79bf 100644
--- a/util-linux/getopt.c
+++ b/util-linux/getopt.c
@@ -53,9 +53,11 @@
/* NON_OPT is the code that is returned when a non-option is found in '+'
mode */
-static const int NON_OPT = 1;
+enum {
+ NON_OPT = 1,
/* LONG_OPT is the code that is returned when a long option is found. */
-static const int LONG_OPT = 2;
+ LONG_OPT = 2
+};
/* The shells recognized. */
typedef enum {BASH,TCSH} shell_t;
@@ -195,7 +197,7 @@ int generate_output(char * argv[],int argc,const char *optstr,
static struct option *long_options;
static int long_options_length; /* Length of array */
static int long_options_nr; /* Nr of used elements in array */
-static const int LONG_OPTIONS_INCR = 10;
+enum { LONG_OPTIONS_INCR = 10 };
#define init_longopt() add_longopt(NULL,0)
/* Register a long option. The contents of name is copied. */