32 #pragma GCC system_header
52 # include_next <wctype.h>
59 #ifndef _GL_WCTYPE_INLINE
60 # define _GL_WCTYPE_INLINE _GL_INLINE
128 #if defined __cplusplus
129 # define _GL_EXTERN_C extern "C"
131 # define _GL_EXTERN_C extern
141 #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \
142 _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes)
143 #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \
144 _GL_EXTERN_C rettype rpl_func parameters_and_attributes
153 #define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \
154 _GL_EXTERN_C rettype func parameters_and_attributes
162 #define _GL_CXXALIAS_RPL(func,rettype,parameters) \
163 _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters)
164 #if defined __cplusplus && defined GNULIB_NAMESPACE
165 # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
166 namespace GNULIB_NAMESPACE \
168 rettype (*const func) parameters = ::rpl_func; \
170 _GL_EXTERN_C int _gl_cxxalias_dummy
172 # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
173 _GL_EXTERN_C int _gl_cxxalias_dummy
181 #if defined __cplusplus && defined GNULIB_NAMESPACE
182 # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
183 namespace GNULIB_NAMESPACE \
185 rettype (*const func) parameters = \
186 reinterpret_cast<rettype(*)parameters>(::rpl_func); \
188 _GL_EXTERN_C int _gl_cxxalias_dummy
190 # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
191 _GL_EXTERN_C int _gl_cxxalias_dummy
201 #if defined __cplusplus && defined GNULIB_NAMESPACE
208 # define _GL_CXXALIAS_SYS(func,rettype,parameters) \
209 namespace GNULIB_NAMESPACE \
211 static rettype (*func) parameters = ::func; \
213 _GL_EXTERN_C int _gl_cxxalias_dummy
215 # define _GL_CXXALIAS_SYS(func,rettype,parameters) \
216 _GL_EXTERN_C int _gl_cxxalias_dummy
224 #if defined __cplusplus && defined GNULIB_NAMESPACE
225 # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
226 namespace GNULIB_NAMESPACE \
228 static rettype (*func) parameters = \
229 reinterpret_cast<rettype(*)parameters>(::func); \
231 _GL_EXTERN_C int _gl_cxxalias_dummy
233 # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
234 _GL_EXTERN_C int _gl_cxxalias_dummy
243 #if defined __cplusplus && defined GNULIB_NAMESPACE
249 # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
250 namespace GNULIB_NAMESPACE \
252 static rettype (*func) parameters = \
253 reinterpret_cast<rettype(*)parameters>( \
254 (rettype2(*)parameters2)(::func)); \
256 _GL_EXTERN_C int _gl_cxxalias_dummy
258 # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
259 _GL_EXTERN_C int _gl_cxxalias_dummy
266 #if defined __cplusplus && defined GNULIB_NAMESPACE
267 # define _GL_CXXALIASWARN(func) \
268 _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE)
269 # define _GL_CXXALIASWARN_1(func,namespace) \
270 _GL_CXXALIASWARN_2 (func, namespace)
274 # define _GL_CXXALIASWARN_2(func,namespace) \
275 _GL_WARN_ON_USE (func, \
276 "The symbol ::" #func " refers to the system function. " \
277 "Use " #namespace "::" #func " instead.")
278 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
279 # define _GL_CXXALIASWARN_2(func,namespace) \
280 extern __typeof__ (func) func
282 # define _GL_CXXALIASWARN_2(func,namespace) \
283 _GL_EXTERN_C int _gl_cxxalias_dummy
286 # define _GL_CXXALIASWARN(func) \
287 _GL_EXTERN_C int _gl_cxxalias_dummy
293 #if defined __cplusplus && defined GNULIB_NAMESPACE
294 # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
295 _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \
297 # define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \
298 _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace)
302 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
303 _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \
304 "The symbol ::" #func " refers to the system function. " \
305 "Use " #namespace "::" #func " instead.")
306 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
307 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
308 extern __typeof__ (func) func
310 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
311 _GL_EXTERN_C int _gl_cxxalias_dummy
314 # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
315 _GL_EXTERN_C int _gl_cxxalias_dummy
321 #ifndef _GL_WARN_ON_USE
323 # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
325 # define _GL_WARN_ON_USE(function, message) \
326 extern __typeof__ (function) function __attribute__ ((__warning__ (message)))
327 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
329 # define _GL_WARN_ON_USE(function, message) \
330 extern __typeof__ (function) function
332 # define _GL_WARN_ON_USE(function, message) \
333 _GL_WARN_EXTERN_C int _gl_warn_on_use
343 #ifndef _GL_WARN_ON_USE_CXX
344 # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
345 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
346 extern rettype function parameters_and_attributes \
347 __attribute__ ((__warning__ (msg)))
348 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
350 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
351 extern rettype function parameters_and_attributes
353 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
354 _GL_WARN_EXTERN_C int _gl_warn_on_use
360 #ifndef _GL_WARN_EXTERN_C
361 # if defined __cplusplus
362 # define _GL_WARN_EXTERN_C extern "C"
364 # define _GL_WARN_EXTERN_C extern
382 #if !1 && !defined wint_t
391 # if defined _MSC_VER
392 # if !GNULIB_defined_wint_t
393 # include <crtdefs.h>
394 typedef unsigned int rpl_wint_t;
396 # define wint_t rpl_wint_t
397 # define GNULIB_defined_wint_t 1
401 # define WEOF ((wint_t) -1)
406 #if !GNULIB_defined_wctype_functions
436 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
437 # define iswalnum rpl_iswalnum
438 # define iswalpha rpl_iswalpha
439 # define iswblank rpl_iswblank
440 # define iswcntrl rpl_iswcntrl
441 # define iswdigit rpl_iswdigit
442 # define iswgraph rpl_iswgraph
443 # define iswlower rpl_iswlower
444 # define iswprint rpl_iswprint
445 # define iswpunct rpl_iswpunct
446 # define iswspace rpl_iswspace
447 # define iswupper rpl_iswupper
448 # define iswxdigit rpl_iswxdigit
452 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
453 # define towlower rpl_towlower
454 # define towupper rpl_towupper
466 return ((wc >=
'0' && wc <=
'9')
467 || ((wc & ~0x20) >=
'A' && (wc & ~0x20) <=
'Z'));
478 return (wc & ~0x20) >=
'A' && (wc & ~0x20) <=
'Z';
489 return wc ==
' ' || wc ==
'\t';
500 return (wc & ~0x1f) == 0 || wc == 0x7f;
511 return wc >=
'0' && wc <=
'9';
522 return wc >=
'!' && wc <=
'~';
533 return wc >=
'a' && wc <=
'z';
544 return wc >=
' ' && wc <=
'~';
555 return (wc >=
'!' && wc <=
'~'
556 && !((wc >=
'0' && wc <=
'9')
557 || ((wc & ~0x20) >=
'A' && (wc & ~0x20) <=
'Z')));
568 return (wc ==
' ' || wc ==
'\t'
569 || wc ==
'\n' || wc ==
'\v' || wc ==
'\f' || wc ==
'\r');
580 return wc >=
'A' && wc <=
'Z';
591 return ((wc >=
'0' && wc <=
'9')
592 || ((wc & ~0x20) >=
'A' && (wc & ~0x20) <=
'F'));
603 return (wc >=
'A' && wc <=
'Z' ? wc -
'A' +
'a' : wc);
614 return (wc >=
'a' && wc <=
'z' ? wc -
'a' +
'A' : wc);
617 # elif 0 && (! 1 || 0)
621 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
622 # define iswblank rpl_iswblank
631 # if defined __MINGW32__
647 rpl_towlower (wint_t wc)
649 return (wint_t) (wchar_t) towlower (wc);
651 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
652 # define towlower rpl_towlower
656 rpl_towupper (wint_t wc)
658 return (wint_t) (wchar_t) towupper (wc);
660 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
661 # define towupper rpl_towupper
666 # define GNULIB_defined_wctype_functions 1
716 # if !GNULIB_defined_wctype_t
717 typedef void * wctype_t;
718 # define GNULIB_defined_wctype_t 1
729 #elif defined GNULIB_POSIXCHECK
731 # if HAVE_RAW_DECL_WCTYPE
733 "use gnulib module wctype for portability");
746 #elif defined GNULIB_POSIXCHECK
748 # if HAVE_RAW_DECL_ISWCTYPE
750 "use gnulib module iswctype for portability");
754 #if 0 || defined __MINGW32__
765 # if !GNULIB_defined_wctrans_t
766 typedef void * wctrans_t;
767 # define GNULIB_defined_wctrans_t 1
778 #elif defined GNULIB_POSIXCHECK
780 # if HAVE_RAW_DECL_WCTRANS
782 "use gnulib module wctrans for portability");
795 #elif defined GNULIB_POSIXCHECK
797 # if HAVE_RAW_DECL_TOWCTRANS
799 "use gnulib module towctrans for portability");
#define _GL_WCTYPE_INLINE
_GL_CXXALIAS_SYS(iswalnum, int,(wint_t wc))
#define _GL_WARN_ON_USE(function, message)
#define _GL_FUNCDECL_RPL(func, rettype, parameters_and_attributes)
#define _GL_CXXALIAS_RPL(func, rettype, parameters)
_GL_CXXALIASWARN(iswalnum)
#define _GL_INLINE_HEADER_END
#define _GL_FUNCDECL_SYS(func, rettype, parameters_and_attributes)
#define _GL_INLINE_HEADER_BEGIN