11 #ifndef _LIBCPP_SUPPORT_IBM_LOCALE_MGMT_AIX_H
12 #define _LIBCPP_SUPPORT_IBM_LOCALE_MGMT_AIX_H
25 #define LC_COLLATE_MASK 1
26 #define LC_CTYPE_MASK 2
27 #define LC_MESSAGES_MASK 4
28 #define LC_MONETARY_MASK 8
29 #define LC_NUMERIC_MASK 16
30 #define LC_TIME_MASK 32
31 #define LC_ALL_MASK (LC_COLLATE_MASK | LC_CTYPE_MASK | \
32 LC_MESSAGES_MASK | LC_MONETARY_MASK |\
33 LC_NUMERIC_MASK | LC_TIME_MASK)
41 _LC_locale_t *newloc, *loc;
42 if ((loc = (_LC_locale_t *)__xopen_locale(locale)) == NULL)
47 if ((newloc = (_LC_locale_t *)calloc(1,
sizeof(_LC_locale_t))) == NULL)
53 base = (_LC_locale_t *)__xopen_locale(
"C");
54 memcpy(newloc, base,
sizeof (_LC_locale_t));
55 if (category_mask & LC_COLLATE_MASK)
56 newloc->lc_collate = loc->lc_collate;
57 if (category_mask & LC_CTYPE_MASK)
58 newloc->lc_ctype = loc->lc_ctype;
61 if (category_mask & LC_MONETARY_MASK)
62 newloc->lc_monetary = loc->lc_monetary;
63 if (category_mask & LC_TIME_MASK)
64 newloc->lc_time = loc->lc_time;
65 if (category_mask & LC_NUMERIC_MASK)
66 newloc->lc_numeric = loc->lc_numeric;
79 #endif // !defined(_AIX71)
84 #endif // defined(_AIX)
85 #endif // _LIBCPP_SUPPORT_IBM_LOCALE_MGMT_AIX_H