1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20: #include <locale.h>
21: #include "localeinfo.h"
22:
23: #define DEFINE_CATEGORY(category, category_name, items, a) \
24: extern struct locale_data _nl_C_##category; weak_extern (_nl_C_##category)
25: #include "categories.def"
26: #undef DEFINE_CATEGORY
27:
28:
29: extern const char _nl_C_LC_CTYPE_class[] attribute_hidden;
30: extern const char _nl_C_LC_CTYPE_toupper[] attribute_hidden;
31: extern const char _nl_C_LC_CTYPE_tolower[] attribute_hidden;
32: weak_extern (_nl_C_LC_CTYPE_class)
33: weak_extern (_nl_C_LC_CTYPE_toupper)
34: weak_extern (_nl_C_LC_CTYPE_tolower)
35:
36:
37:
38:
39:
40: struct __locale_struct _nl_global_locale attribute_hidden =
41: {
42: .__locales =
43: {
44: #define DEFINE_CATEGORY(category, category_name, items, a) \
45: [category] = &_nl_C_##category,
46: #include "categories.def"
47: #undef DEFINE_CATEGORY
48: },
49: .__names =
50: {
51: [LC_ALL] = _nl_C_name,
52: #define DEFINE_CATEGORY(category, category_name, items, a) \
53: [category] = _nl_C_name,
54: #include "categories.def"
55: #undef DEFINE_CATEGORY
56: },
57: .__ctype_b = (const unsigned short int *) _nl_C_LC_CTYPE_class + 128,
58: .__ctype_tolower = (const int *) _nl_C_LC_CTYPE_tolower + 128,
59: .__ctype_toupper = (const int *) _nl_C_LC_CTYPE_toupper + 128
60: };
61:
62: #include <tls.h>
63: #if HAVE___THREAD
64:
65: __thread void *__libc_tsd_LOCALE = &_nl_global_locale;
66: #else
67: __libc_tsd_define (, LOCALE)
68:
69:
70:
71:
72: # ifndef _HURD_THREADVAR_H
73: __typeof (__libc_tsd_LOCALE_data) __libc_tsd_LOCALE_data = &_nl_global_locale;
74: # endif
75: #endif