aboutsummaryrefslogtreecommitdiff
path: root/util-linux/getopt.c
diff options
context:
space:
mode:
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 @@
53 53
54/* NON_OPT is the code that is returned when a non-option is found in '+' 54/* NON_OPT is the code that is returned when a non-option is found in '+'
55 mode */ 55 mode */
56static const int NON_OPT = 1; 56enum {
57 NON_OPT = 1,
57/* LONG_OPT is the code that is returned when a long option is found. */ 58/* LONG_OPT is the code that is returned when a long option is found. */
58static const int LONG_OPT = 2; 59 LONG_OPT = 2
60};
59 61
60/* The shells recognized. */ 62/* The shells recognized. */
61typedef enum {BASH,TCSH} shell_t; 63typedef enum {BASH,TCSH} shell_t;
@@ -195,7 +197,7 @@ int generate_output(char * argv[],int argc,const char *optstr,
195static struct option *long_options; 197static struct option *long_options;
196static int long_options_length; /* Length of array */ 198static int long_options_length; /* Length of array */
197static int long_options_nr; /* Nr of used elements in array */ 199static int long_options_nr; /* Nr of used elements in array */
198static const int LONG_OPTIONS_INCR = 10; 200enum { LONG_OPTIONS_INCR = 10 };
199#define init_longopt() add_longopt(NULL,0) 201#define init_longopt() add_longopt(NULL,0)
200 202
201/* Register a long option. The contents of name is copied. */ 203/* Register a long option. The contents of name is copied. */