7 #include "pthread_impl.h"
9 #define LOCALE_NAME_MAX 23
14 char name
[LOCALE_NAME_MAX
+1];
15 const struct __locale_map
*next
;
18 extern hidden
volatile int __locale_lock
[1];
20 extern hidden
const struct __locale_map __c_dot_utf8
;
21 extern hidden
const struct __locale_struct __c_locale
;
22 extern hidden
const struct __locale_struct __c_dot_utf8_locale
;
24 hidden
const struct __locale_map
*__get_locale(int, const char *);
25 hidden
const char *__mo_lookup(const void *, size_t, const char *);
26 hidden
const char *__lctrans(const char *, const struct __locale_map
*);
27 hidden
const char *__lctrans_cur(const char *);
28 hidden
const char *__lctrans_impl(const char *, const struct __locale_map
*);
29 hidden
int __loc_is_allocated(locale_t
);
30 hidden
char *__gettextdomain(void);
32 #define LOC_MAP_FAILED ((const struct __locale_map *)-1)
34 #define LCTRANS(msg, lc, loc) __lctrans(msg, (loc)->cat[(lc)])
35 #define LCTRANS_CUR(msg) __lctrans_cur(msg)
37 #define C_LOCALE ((locale_t)&__c_locale)
38 #define UTF8_LOCALE ((locale_t)&__c_dot_utf8_locale)
40 #define CURRENT_LOCALE (__pthread_self()->locale)
42 #define CURRENT_UTF8 (!!__pthread_self()->locale->cat[LC_CTYPE])
45 #define MB_CUR_MAX (CURRENT_UTF8 ? 4 : 1)