diff options
author | Ulrich Drepper <drepper@redhat.com> | 2006-05-15 18:36:28 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2006-05-15 18:36:28 +0000 |
commit | 9446614c28b003812b59e99ff1f38aa526234c1c (patch) | |
tree | c7109087c02a598a6d4bb5cba4f77d6e62ce7d12 /locale/localeinfo.h | |
parent | 88dbff8cf980b4b63bdbb0e987489bc20176f220 (diff) | |
download | glibc-9446614c28b003812b59e99ff1f38aa526234c1c.tar.gz |
* locale/setlocale.c: Change _nl_category_names into a string.
Add new _nl_category_name_idxs. Change all users.
* locale/localeinfo.h: Adjust declaration of _nl_category_names.
Declare _nl_category_name_idxs.
* locale/findlocale.c: Adjust for _nl_category_names change.
* locale/loadlocale.c: Likewise.
* locale/newlocale.c: Likewise.
* intl/dcigettext.c: Likewise.
Diffstat (limited to 'locale/localeinfo.h')
-rw-r--r-- | locale/localeinfo.h | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/locale/localeinfo.h b/locale/localeinfo.h index 3b0ed4f30b..4f746a298d 100644 --- a/locale/localeinfo.h +++ b/locale/localeinfo.h @@ -1,5 +1,5 @@ /* Declarations for internal libc locale interfaces - Copyright (C) 1995-2001, 2002, 2003, 2005 Free Software Foundation, Inc. + Copyright (C) 1995-2003, 2005, 2006 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -172,8 +172,22 @@ enum #define _ISCTYPE(c, desc) \ (((((const uint32_t *) (desc)) - 8)[(c) >> 5] >> ((c) & 0x1f)) & 1) -extern const char *const _nl_category_names[__LC_LAST] attribute_hidden; -extern const size_t _nl_category_name_sizes[__LC_LAST] attribute_hidden; +/* Category name handling variables. */ +#define CATNAMEMF(line) CATNAMEMF1 (line) +#define CATNAMEMF1(line) str##line +extern const union catnamestr_t +{ + struct + { +#define DEFINE_CATEGORY(category, category_name, items, a) \ + char CATNAMEMF (__LINE__)[sizeof (category_name)]; +#include "categories.def" +#undef DEFINE_CATEGORY + }; + char str[0]; +} _nl_category_names attribute_hidden; +const uint8_t _nl_category_name_idxs[__LC_LAST] attribute_hidden; +extern const uint8_t _nl_category_name_sizes[__LC_LAST] attribute_hidden; /* Name of the standard locales. */ extern const char _nl_C_name[] attribute_hidden; |