about summary refs log tree commit diff
path: root/locale/programs/localedef.c
diff options
context:
space:
mode:
Diffstat (limited to 'locale/programs/localedef.c')
-rw-r--r--locale/programs/localedef.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/locale/programs/localedef.c b/locale/programs/localedef.c
index e8f0d3bc54..96ff12eaff 100644
--- a/locale/programs/localedef.c
+++ b/locale/programs/localedef.c
@@ -109,7 +109,7 @@ static const struct argp_option options[] =
   { "posix", OPT_POSIX, NULL, 0, N_("Be strictly POSIX conform") },
   { "quiet", OPT_QUIET, NULL, 0,
     N_("Suppress warnings and information messages") },
-  { "verbose", 'V', NULL, 0, N_("print more messages") },
+  { "verbose", 'V', NULL, 0, N_("Print more messages") },
   { NULL, 0, NULL, 0, NULL }
 };
 
@@ -164,11 +164,9 @@ main (int argc, char *argv[])
   textdomain (_libc_intl_domainname);
 
   /* Parse and process arguments.  */
+  argp_err_exit_status = 4;
   argp_parse (&argp, argc, argv, 0, &remaining, NULL);
 
-  /* XXX POSIX is violated since for unknown option a exit value > 3
-     must be used.  */
-
   /* POSIX.2 requires to be verbose about missing characters in the
      character map.  */
   verbose |= posix_conformance;
@@ -176,11 +174,8 @@ main (int argc, char *argv[])
   if (argc - remaining != 1)
     {
       /* We need exactly one non-option parameter.  */
-      argp_help (&argp, stdout, ARGP_HELP_SEE,
+      argp_help (&argp, stdout, ARGP_HELP_SEE | ARGP_HELP_EXIT_ERR,
 		 program_invocation_short_name);
-
-      /* XXX Currently POSIX is violated.  We must exit with code 4
-	 but the argp_help function currently does not allow this.  */
       exit (4);
     }