11 #ifndef _LIBCPP_SUPPORT_IBM_XLOCALE_H
12 #define _LIBCPP_SUPPORT_IBM_XLOCALE_H
13 #include <support/ibm/locale_mgmt_aix.h>
26 int isalnum_l(
int c,
locale_t locale)
28 return __xisalnum(locale, c);
31 int isalpha_l(
int c,
locale_t locale)
33 return __xisalpha(locale, c);
36 int isblank_l(
int c,
locale_t locale)
38 return __xisblank(locale, c);
41 int iscntrl_l(
int c,
locale_t locale)
43 return __xiscntrl(locale, c);
46 int isdigit_l(
int c,
locale_t locale)
48 return __xisdigit(locale, c);
51 int isgraph_l(
int c,
locale_t locale)
53 return __xisgraph(locale, c);
56 int islower_l(
int c,
locale_t locale)
58 return __xislower(locale, c);
61 int isprint_l(
int c,
locale_t locale)
63 return __xisprint(locale, c);
67 int ispunct_l(
int c,
locale_t locale)
69 return __xispunct(locale, c);
72 int isspace_l(
int c,
locale_t locale)
74 return __xisspace(locale, c);
77 int isupper_l(
int c,
locale_t locale)
79 return __xisupper(locale, c);
83 int isxdigit_l(
int c,
locale_t locale)
85 return __xisxdigit(locale, c);
89 int iswalnum_l(
wchar_t wc,
locale_t locale)
91 return __xiswalnum(locale, wc);
95 int iswalpha_l(
wchar_t wc,
locale_t locale)
97 return __xiswalpha(locale, wc);
101 int iswblank_l(
wchar_t wc,
locale_t locale)
103 return __xiswblank(locale, wc);
107 int iswcntrl_l(
wchar_t wc,
locale_t locale)
109 return __xiswcntrl(locale, wc);
113 int iswdigit_l(
wchar_t wc,
locale_t locale)
115 return __xiswdigit(locale, wc);
119 int iswgraph_l(
wchar_t wc,
locale_t locale)
121 return __xiswgraph(locale, wc);
125 int iswlower_l(
wchar_t wc,
locale_t locale)
127 return __xiswlower(locale, wc);
131 int iswprint_l(
wchar_t wc,
locale_t locale)
133 return __xiswprint(locale, wc);
137 int iswpunct_l(
wchar_t wc,
locale_t locale)
139 return __xiswpunct(locale, wc);
143 int iswspace_l(
wchar_t wc,
locale_t locale)
145 return __xiswspace(locale, wc);
149 int iswupper_l(
wchar_t wc,
locale_t locale)
151 return __xiswupper(locale, wc);
155 int iswxdigit_l(
wchar_t wc,
locale_t locale)
157 return __xiswxdigit(locale, wc);
161 int iswctype_l(wint_t wc, wctype_t desc,
locale_t locale)
163 return __xiswctype(locale, wc, desc);
167 int toupper_l(
int c,
locale_t locale)
169 return __xtoupper(locale, c);
172 int tolower_l(
int c,
locale_t locale)
174 return __xtolower(locale, c);
177 wint_t towupper_l(wint_t wc,
locale_t locale)
179 return __xtowupper(locale, wc);
182 wint_t towlower_l(wint_t wc,
locale_t locale)
184 return __xtowlower(locale, wc);
188 int strcoll_l(
const char *__s1,
const char *__s2,
locale_t locale)
190 return __xstrcoll(locale, __s1, __s2);
193 int wcscoll_l(
const wchar_t *__s1,
const wchar_t *__s2,
locale_t locale)
195 return __xwcscoll(locale, __s1, __s2);
198 size_t strxfrm_l(
char *__s1,
const char *__s2,
size_t __n,
locale_t locale)
200 return __xstrxfrm(locale, __s1, __s2, __n);
204 size_t wcsxfrm_l(
wchar_t *__ws1,
const wchar_t *__ws2,
size_t __n,
207 return __xwcsxfrm(locale, __ws1, __ws2, __n);
209 #endif // !defined(_AIX71)
214 size_t strftime_l(
char *__s,
size_t __size,
const char *__fmt,
215 const struct tm *__tm,
locale_t locale) {
216 return __xstrftime(locale, __s, __size, __fmt, __tm);
222 long long strtoll_l(
const char *__nptr,
char **__endptr,
224 return strtoll(__nptr, __endptr, __base);
227 long strtol_l(
const char *__nptr,
char **__endptr,
229 return strtol(__nptr, __endptr, __base);
232 long double strtold_l(
const char *__nptr,
char **__endptr,
234 return strtold(__nptr, __endptr);
237 unsigned long long strtoull_l(
const char *__nptr,
char **__endptr,
239 return strtoull(__nptr, __endptr, __base);
242 unsigned long strtoul_l(
const char *__nptr,
char **__endptr,
244 return strtoul(__nptr, __endptr, __base);
248 int vasprintf(
char **strp,
const char *fmt, va_list ap)
250 const size_t buff_size = 256;
252 if ((*strp = (
char *)malloc(buff_size)) == NULL)
256 if ((str_size = vsnprintf(*strp, buff_size, fmt, ap)) >= buff_size)
258 if ((*strp = (
char *)realloc(*strp, str_size + 1)) == NULL)
262 str_size = vsnprintf(*strp, str_size + 1, fmt, ap);
270 #endif // defined(_AIX)
271 #endif // _LIBCPP_SUPPORT_IBM_XLOCALE_H