diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/chmod.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/chmod.c b/src/chmod.c index 7febb63dc..14ad4d5cd 100644 --- a/src/chmod.c +++ b/src/chmod.c @@ -74,13 +74,20 @@ static enum Verbosity verbosity = V_off; of this file. This file must exist. */ static char *reference_file; +/* For long options that have no equivalent short option, use a + non-character as a pseudo short option, starting with CHAR_MAX + 1. */ +enum +{ + REFERENCE_FILE_OPTION = CHAR_MAX + 1 +}; + static struct option const long_options[] = { {"recursive", no_argument, 0, 'R'}, {"changes", no_argument, 0, 'c'}, {"silent", no_argument, 0, 'f'}, {"quiet", no_argument, 0, 'f'}, - {"reference", required_argument, 0, CHAR_MAX + 1}, + {"reference", required_argument, 0, REFERENCE_FILE_OPTION}, {"verbose", no_argument, 0, 'v'}, {GETOPT_HELP_OPTION_DECL}, {GETOPT_VERSION_OPTION_DECL}, @@ -310,7 +317,7 @@ main (int argc, char **argv) error (1, 0, _("invalid mode")); modeind = thisind; break; - case CHAR_MAX + 1: + case REFERENCE_FILE_OPTION: reference_file = optarg; break; case 'R': |