summaryrefslogtreecommitdiff
path: root/locale/programs/localedef.c
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2013-09-24 22:07:47 +0000
committerJoseph Myers <joseph@codesourcery.com>2013-09-24 22:07:47 +0000
commit6055173a0f2733ea4fc2825afd295156143fca79 (patch)
tree11dac563ce23c6e0e95d2146dfaef2a1a7faa459 /locale/programs/localedef.c
parent39bf0bb44c07ab2cae5b813fc7c196abfdf411b3 (diff)
downloadglibc-6055173a0f2733ea4fc2825afd295156143fca79.tar.gz
Add localedef --big-endian and --little-endian options.
Diffstat (limited to 'locale/programs/localedef.c')
-rw-r--r--locale/programs/localedef.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/locale/programs/localedef.c b/locale/programs/localedef.c
index 5a14f2ce32..8b9866ab29 100644
--- a/locale/programs/localedef.c
+++ b/locale/programs/localedef.c
@@ -112,6 +112,8 @@ void (*argp_program_version_hook) (FILE *, struct argp_state *) = print_version;
#define OPT_REPLACE 307
#define OPT_DELETE_FROM_ARCHIVE 308
#define OPT_LIST_ARCHIVE 309
+#define OPT_LITTLE_ENDIAN 400
+#define OPT_BIG_ENDIAN 401
/* Definitions of arguments for argp functions. */
static const struct argp_option options[] =
@@ -144,6 +146,10 @@ static const struct argp_option options[] =
{ "list-archive", OPT_LIST_ARCHIVE, NULL, 0, N_("List content of archive") },
{ "alias-file", 'A', N_("FILE"), 0,
N_("locale.alias file to consult when making archive")},
+ { "little-endian", OPT_LITTLE_ENDIAN, NULL, 0,
+ N_("Generate little-endian output") },
+ { "big-endian", OPT_BIG_ENDIAN, NULL, 0,
+ N_("Generate big-endian output") },
{ NULL, 0, NULL, 0, NULL }
};
@@ -326,6 +332,12 @@ parse_opt (int key, char *arg, struct argp_state *state)
case OPT_LIST_ARCHIVE:
list_archive = true;
break;
+ case OPT_LITTLE_ENDIAN:
+ set_big_endian (false);
+ break;
+ case OPT_BIG_ENDIAN:
+ set_big_endian (true);
+ break;
case 'c':
force_output = 1;
break;