diff options
Diffstat (limited to 'locale')
-rw-r--r-- | locale/duplocale.c | 2 | ||||
-rw-r--r-- | locale/newlocale.c | 6 | ||||
-rw-r--r-- | locale/programs/localedef.c | 11 | ||||
-rw-r--r-- | locale/xlocale.h | 2 |
4 files changed, 8 insertions, 13 deletions
diff --git a/locale/duplocale.c b/locale/duplocale.c index f22c4de..7b188ef 100644 --- a/locale/duplocale.c +++ b/locale/duplocale.c @@ -38,7 +38,7 @@ __duplocale (__locale_t dataset) __libc_lock_lock (__libc_setlocale_lock); /* Get memory. */ - result = (__locale_t) malloc (sizeof (struct __locale_t)); + result = (__locale_t) malloc (sizeof (struct __locale_struct)); if (result != NULL) { int cnt; diff --git a/locale/newlocale.c b/locale/newlocale.c index d4e184b..33cc7fa 100644 --- a/locale/newlocale.c +++ b/locale/newlocale.c @@ -42,7 +42,7 @@ __newlocale (int category_mask, const char *locale, __locale_t base) { /* Intermediate memory for result. */ const char *newnames[LC_ALL]; - struct __locale_t result; + struct __locale_struct result; __locale_t result_ptr; char *locale_path; size_t locale_path_len; @@ -79,7 +79,7 @@ __newlocale (int category_mask, const char *locale, __locale_t base) dataset using the C locale data. */ if (category_mask == 0) { - result_ptr = (__locale_t) malloc (sizeof (struct __locale_t)); + result_ptr = (__locale_t) malloc (sizeof (struct __locale_struct)); *result_ptr = result; goto update; @@ -158,7 +158,7 @@ __newlocale (int category_mask, const char *locale, __locale_t base) if (base == NULL) { /* Allocate new structure. */ - result_ptr = (__locale_t) malloc (sizeof (struct __locale_t)); + result_ptr = (__locale_t) malloc (sizeof (struct __locale_struct)); if (result_ptr == NULL) return NULL; diff --git a/locale/programs/localedef.c b/locale/programs/localedef.c index e8f0d3b..96ff12e 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); } diff --git a/locale/xlocale.h b/locale/xlocale.h index 62b1595..8096080 100644 --- a/locale/xlocale.h +++ b/locale/xlocale.h @@ -25,7 +25,7 @@ (almost) opaque type for the user level programs. The file and this data structure is not standardized. Don't rely on it. It can go away without warning. */ -typedef struct __locale_t +typedef struct __locale_struct { struct locale_data *__locales[6]; /* XXX LC_ALL should be used here */ |