1 /* DO NOT EDIT! GENERATED AUTOMATICALLY! */
2 /* A substitute for ISO C99 <wctype.h>, for platforms that lack it.
4 Copyright (C) 2006-2015 Free Software Foundation, Inc.
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3, or (at your option)
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, see <http://www.gnu.org/licenses/>. */
19 /* Written by Bruno Haible and Paul Eggert. */
22 * ISO C 99 <wctype.h> for platforms that lack it.
23 * <http://www.opengroup.org/susv3xbd/wctype.h.html>
25 * iswctype, towctrans, towlower, towupper, wctrans, wctype,
26 * wctrans_t, and wctype_t are not yet implemented.
32 #pragma GCC system_header
37 /* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>.
38 Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
40 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
41 included before <wchar.h>. */
48 /* mingw has declarations of towupper and towlower in <ctype.h> as
49 well <wctype.h>. Include <ctype.h> in advance to avoid rpl_ prefix
50 being added to the declarations. */
55 /* Include the original <wctype.h> if it exists.
56 BeOS 5 has the functions but no <wctype.h>. */
57 /* The include_next requires a split double-inclusion guard. */
59 # include_next <wctype.h>
65 #ifndef _GL_INLINE_HEADER_BEGIN
66 #error "Please include config.h first."
68 _GL_INLINE_HEADER_BEGIN
69 #ifndef _GL_WCTYPE_INLINE
70 # define _GL_WCTYPE_INLINE _GL_INLINE
73 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
77 /* The three most frequent use cases of these macros are:
79 * For providing a substitute for a function that is missing on some
80 platforms, but is declared and works fine on the platforms on which
85 _GL_FUNCDECL_SYS (foo, ...);
87 _GL_CXXALIAS_SYS (foo, ...);
88 _GL_CXXALIASWARN (foo);
89 #elif defined GNULIB_POSIXCHECK
93 * For providing a replacement for a function that exists on all platforms,
94 but is broken/insufficient and needs to be replaced on some platforms:
98 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
102 _GL_FUNCDECL_RPL (foo, ...);
103 _GL_CXXALIAS_RPL (foo, ...);
105 _GL_CXXALIAS_SYS (foo, ...);
107 _GL_CXXALIASWARN (foo);
108 #elif defined GNULIB_POSIXCHECK
112 * For providing a replacement for a function that exists on some platforms
113 but is broken/insufficient and needs to be replaced on some of them and
114 is additionally either missing or undeclared on some other platforms:
118 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
122 _GL_FUNCDECL_RPL (foo, ...);
123 _GL_CXXALIAS_RPL (foo, ...);
125 # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@
126 _GL_FUNCDECL_SYS (foo, ...);
128 _GL_CXXALIAS_SYS (foo, ...);
130 _GL_CXXALIASWARN (foo);
131 #elif defined GNULIB_POSIXCHECK
136 /* _GL_EXTERN_C declaration;
137 performs the declaration with C linkage. */
138 #if defined __cplusplus
139 # define _GL_EXTERN_C extern "C"
141 # define _GL_EXTERN_C extern
144 /* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes);
145 declares a replacement function, named rpl_func, with the given prototype,
146 consisting of return type, parameters, and attributes.
148 _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...)
149 _GL_ARG_NONNULL ((1)));
151 #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \
152 _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes)
153 #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \
154 _GL_EXTERN_C rettype rpl_func parameters_and_attributes
156 /* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes);
157 declares the system function, named func, with the given prototype,
158 consisting of return type, parameters, and attributes.
160 _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...)
161 _GL_ARG_NONNULL ((1)));
163 #define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \
164 _GL_EXTERN_C rettype func parameters_and_attributes
166 /* _GL_CXXALIAS_RPL (func, rettype, parameters);
167 declares a C++ alias called GNULIB_NAMESPACE::func
168 that redirects to rpl_func, if GNULIB_NAMESPACE is defined.
170 _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...));
172 #define _GL_CXXALIAS_RPL(func,rettype,parameters) \
173 _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters)
174 #if defined __cplusplus && defined GNULIB_NAMESPACE
175 # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
176 namespace GNULIB_NAMESPACE \
178 rettype (*const func) parameters = ::rpl_func; \
180 _GL_EXTERN_C int _gl_cxxalias_dummy
182 # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
183 _GL_EXTERN_C int _gl_cxxalias_dummy
186 /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters);
187 is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters);
188 except that the C function rpl_func may have a slightly different
189 declaration. A cast is used to silence the "invalid conversion" error
190 that would otherwise occur. */
191 #if defined __cplusplus && defined GNULIB_NAMESPACE
192 # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
193 namespace GNULIB_NAMESPACE \
195 rettype (*const func) parameters = \
196 reinterpret_cast<rettype(*)parameters>(::rpl_func); \
198 _GL_EXTERN_C int _gl_cxxalias_dummy
200 # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
201 _GL_EXTERN_C int _gl_cxxalias_dummy
204 /* _GL_CXXALIAS_SYS (func, rettype, parameters);
205 declares a C++ alias called GNULIB_NAMESPACE::func
206 that redirects to the system provided function func, if GNULIB_NAMESPACE
209 _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...));
211 #if defined __cplusplus && defined GNULIB_NAMESPACE
212 /* If we were to write
213 rettype (*const func) parameters = ::func;
214 like above in _GL_CXXALIAS_RPL_1, the compiler could optimize calls
215 better (remove an indirection through a 'static' pointer variable),
216 but then the _GL_CXXALIASWARN macro below would cause a warning not only
217 for uses of ::func but also for uses of GNULIB_NAMESPACE::func. */
218 # define _GL_CXXALIAS_SYS(func,rettype,parameters) \
219 namespace GNULIB_NAMESPACE \
221 static rettype (*func) parameters = ::func; \
223 _GL_EXTERN_C int _gl_cxxalias_dummy
225 # define _GL_CXXALIAS_SYS(func,rettype,parameters) \
226 _GL_EXTERN_C int _gl_cxxalias_dummy
229 /* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters);
230 is like _GL_CXXALIAS_SYS (func, rettype, parameters);
231 except that the C function func may have a slightly different declaration.
232 A cast is used to silence the "invalid conversion" error that would
234 #if defined __cplusplus && defined GNULIB_NAMESPACE
235 # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
236 namespace GNULIB_NAMESPACE \
238 static rettype (*func) parameters = \
239 reinterpret_cast<rettype(*)parameters>(::func); \
241 _GL_EXTERN_C int _gl_cxxalias_dummy
243 # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
244 _GL_EXTERN_C int _gl_cxxalias_dummy
247 /* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2);
248 is like _GL_CXXALIAS_SYS (func, rettype, parameters);
249 except that the C function is picked among a set of overloaded functions,
250 namely the one with rettype2 and parameters2. Two consecutive casts
251 are used to silence the "cannot find a match" and "invalid conversion"
252 errors that would otherwise occur. */
253 #if defined __cplusplus && defined GNULIB_NAMESPACE
254 /* The outer cast must be a reinterpret_cast.
255 The inner cast: When the function is defined as a set of overloaded
256 functions, it works as a static_cast<>, choosing the designated variant.
257 When the function is defined as a single variant, it works as a
258 reinterpret_cast<>. The parenthesized cast syntax works both ways. */
259 # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
260 namespace GNULIB_NAMESPACE \
262 static rettype (*func) parameters = \
263 reinterpret_cast<rettype(*)parameters>( \
264 (rettype2(*)parameters2)(::func)); \
266 _GL_EXTERN_C int _gl_cxxalias_dummy
268 # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
269 _GL_EXTERN_C int _gl_cxxalias_dummy
272 /* _GL_CXXALIASWARN (func);
273 causes a warning to be emitted when ::func is used but not when
274 GNULIB_NAMESPACE::func is used. func must be defined without overloaded
276 #if defined __cplusplus && defined GNULIB_NAMESPACE
277 # define _GL_CXXALIASWARN(func) \
278 _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE)
279 # define _GL_CXXALIASWARN_1(func,namespace) \
280 _GL_CXXALIASWARN_2 (func, namespace)
281 /* To work around GCC bug <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
282 we enable the warning only when not optimizing. */
284 # define _GL_CXXALIASWARN_2(func,namespace) \
285 _GL_WARN_ON_USE (func, \
286 "The symbol ::" #func " refers to the system function. " \
287 "Use " #namespace "::" #func " instead.")
288 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
289 # define _GL_CXXALIASWARN_2(func,namespace) \
290 extern __typeof__ (func) func
292 # define _GL_CXXALIASWARN_2(func,namespace) \
293 _GL_EXTERN_C int _gl_cxxalias_dummy
296 # define _GL_CXXALIASWARN(func) \
297 _GL_EXTERN_C int _gl_cxxalias_dummy
300 /* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes);
301 causes a warning to be emitted when the given overloaded variant of ::func
302 is used but not when GNULIB_NAMESPACE::func is used. */
303 #if defined __cplusplus && defined GNULIB_NAMESPACE
304 # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
305 _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \
307 # define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \
308 _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace)
309 /* To work around GCC bug <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
310 we enable the warning only when not optimizing. */
312 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
313 _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \
314 "The symbol ::" #func " refers to the system function. " \
315 "Use " #namespace "::" #func " instead.")
316 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
317 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
318 extern __typeof__ (func) func
320 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
321 _GL_EXTERN_C int _gl_cxxalias_dummy
324 # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
325 _GL_EXTERN_C int _gl_cxxalias_dummy
328 #endif /* _GL_CXXDEFS_H */
330 /* The definition of _GL_WARN_ON_USE is copied here. */
331 #ifndef _GL_WARN_ON_USE
333 # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
334 /* A compiler attribute is available in gcc versions 4.3.0 and later. */
335 # define _GL_WARN_ON_USE(function, message) \
336 extern __typeof__ (function) function __attribute__ ((__warning__ (message)))
337 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
338 /* Verify the existence of the function. */
339 # define _GL_WARN_ON_USE(function, message) \
340 extern __typeof__ (function) function
341 # else /* Unsupported. */
342 # define _GL_WARN_ON_USE(function, message) \
343 _GL_WARN_EXTERN_C int _gl_warn_on_use
347 /* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string")
348 is like _GL_WARN_ON_USE (function, "string"), except that the function is
349 declared with the given prototype, consisting of return type, parameters,
351 This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does
352 not work in this case. */
353 #ifndef _GL_WARN_ON_USE_CXX
354 # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
355 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
356 extern rettype function parameters_and_attributes \
357 __attribute__ ((__warning__ (msg)))
358 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
359 /* Verify the existence of the function. */
360 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
361 extern rettype function parameters_and_attributes
362 # else /* Unsupported. */
363 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
364 _GL_WARN_EXTERN_C int _gl_warn_on_use
368 /* _GL_WARN_EXTERN_C declaration;
369 performs the declaration with C linkage. */
370 #ifndef _GL_WARN_EXTERN_C
371 # if defined __cplusplus
372 # define _GL_WARN_EXTERN_C extern "C"
374 # define _GL_WARN_EXTERN_C extern
378 /* Solaris 2.6 <wctype.h> includes <widec.h> which includes <euc.h> which
379 #defines a number of identifiers in the application namespace. Revert
391 /* Define wint_t and WEOF. (Also done in wchar.in.h.) */
392 #if !1 && !defined wint_t
398 /* MSVC defines wint_t as 'unsigned short' in <crtdefs.h>.
399 This is too small: ISO C 99 section 7.24.1.(2) says that wint_t must be
400 "unchanged by default argument promotions". Override it. */
401 # if defined _MSC_VER
402 # if !GNULIB_defined_wint_t
403 # include <crtdefs.h>
404 typedef unsigned int rpl_wint_t;
406 # define wint_t rpl_wint_t
407 # define GNULIB_defined_wint_t 1
411 # define WEOF ((wint_t) -1)
416 #if !GNULIB_defined_wctype_functions
418 /* FreeBSD 4.4 to 4.11 has <wctype.h> but lacks the functions.
419 Linux libc5 has <wctype.h> and the functions but they are broken.
420 Assume all 11 functions (all isw* except iswblank) are implemented the
421 same way, or not at all. */
424 /* IRIX 5.3 has macros but no functions, its isw* macros refer to an
425 undefined variable _ctmp_ and to <ctype.h> macros like _P, and they
426 refer to system functions like _iswctype that are not in the
427 standard C library. Rather than try to get ancient buggy
428 implementations like this to work, just disable them. */
444 /* Linux libc5 has <wctype.h> and the functions but they are broken. */
446 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
447 # define iswalnum rpl_iswalnum
448 # define iswalpha rpl_iswalpha
449 # define iswblank rpl_iswblank
450 # define iswcntrl rpl_iswcntrl
451 # define iswdigit rpl_iswdigit
452 # define iswgraph rpl_iswgraph
453 # define iswlower rpl_iswlower
454 # define iswprint rpl_iswprint
455 # define iswpunct rpl_iswpunct
456 # define iswspace rpl_iswspace
457 # define iswupper rpl_iswupper
458 # define iswxdigit rpl_iswxdigit
462 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
463 # define towlower rpl_towlower
464 # define towupper rpl_towupper
468 _GL_WCTYPE_INLINE int
476 return ((wc >= '0' && wc <= '9')
477 || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z'));
480 _GL_WCTYPE_INLINE int
488 return (wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z';
491 _GL_WCTYPE_INLINE int
499 return wc == ' ' || wc == '\t';
502 _GL_WCTYPE_INLINE int
510 return (wc & ~0x1f) == 0 || wc == 0x7f;
513 _GL_WCTYPE_INLINE int
521 return wc >= '0' && wc <= '9';
524 _GL_WCTYPE_INLINE int
532 return wc >= '!' && wc <= '~';
535 _GL_WCTYPE_INLINE int
543 return wc >= 'a' && wc <= 'z';
546 _GL_WCTYPE_INLINE int
554 return wc >= ' ' && wc <= '~';
557 _GL_WCTYPE_INLINE int
565 return (wc >= '!' && wc <= '~'
566 && !((wc >= '0' && wc <= '9')
567 || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z')));
570 _GL_WCTYPE_INLINE int
578 return (wc == ' ' || wc == '\t'
579 || wc == '\n' || wc == '\v' || wc == '\f' || wc == '\r');
582 _GL_WCTYPE_INLINE int
590 return wc >= 'A' && wc <= 'Z';
593 _GL_WCTYPE_INLINE int
601 return ((wc >= '0' && wc <= '9')
602 || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'F'));
605 _GL_WCTYPE_INLINE wint_t
613 return (wc >= 'A' && wc <= 'Z' ? wc - 'A' + 'a' : wc);
616 _GL_WCTYPE_INLINE wint_t
624 return (wc >= 'a' && wc <= 'z' ? wc - 'a' + 'A' : wc);
627 # elif 1 && (! 1 || 0)
628 /* Only the iswblank function is missing. */
631 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
632 # define iswblank rpl_iswblank
634 _GL_FUNCDECL_RPL (iswblank, int, (wint_t wc));
636 _GL_FUNCDECL_SYS (iswblank, int, (wint_t wc));
641 # if defined __MINGW32__
643 /* On native Windows, wchar_t is uint16_t, and wint_t is uint32_t.
644 The functions towlower and towupper are implemented in the MSVCRT library
645 to take a wchar_t argument and return a wchar_t result. mingw declares
646 these functions to take a wint_t argument and return a wint_t result.
648 1. When the user passes an argument outside the range 0x0000..0xFFFF, the
649 function will look only at the lower 16 bits. This is allowed according
651 2. The return value is returned in the lower 16 bits of the result register.
652 The upper 16 bits are random: whatever happened to be in that part of the
653 result register. We need to fix this by adding a zero-extend from
654 wchar_t to wint_t after the call. */
656 _GL_WCTYPE_INLINE wint_t
657 rpl_towlower (wint_t wc)
659 return (wint_t) (wchar_t) towlower (wc);
661 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
662 # define towlower rpl_towlower
665 _GL_WCTYPE_INLINE wint_t
666 rpl_towupper (wint_t wc)
668 return (wint_t) (wchar_t) towupper (wc);
670 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
671 # define towupper rpl_towupper
674 # endif /* __MINGW32__ */
676 # define GNULIB_defined_wctype_functions 1
680 _GL_CXXALIAS_RPL (iswalnum, int, (wint_t wc));
681 _GL_CXXALIAS_RPL (iswalpha, int, (wint_t wc));
682 _GL_CXXALIAS_RPL (iswcntrl, int, (wint_t wc));
683 _GL_CXXALIAS_RPL (iswdigit, int, (wint_t wc));
684 _GL_CXXALIAS_RPL (iswgraph, int, (wint_t wc));
685 _GL_CXXALIAS_RPL (iswlower, int, (wint_t wc));
686 _GL_CXXALIAS_RPL (iswprint, int, (wint_t wc));
687 _GL_CXXALIAS_RPL (iswpunct, int, (wint_t wc));
688 _GL_CXXALIAS_RPL (iswspace, int, (wint_t wc));
689 _GL_CXXALIAS_RPL (iswupper, int, (wint_t wc));
690 _GL_CXXALIAS_RPL (iswxdigit, int, (wint_t wc));
692 _GL_CXXALIAS_SYS (iswalnum, int, (wint_t wc));
693 _GL_CXXALIAS_SYS (iswalpha, int, (wint_t wc));
694 _GL_CXXALIAS_SYS (iswcntrl, int, (wint_t wc));
695 _GL_CXXALIAS_SYS (iswdigit, int, (wint_t wc));
696 _GL_CXXALIAS_SYS (iswgraph, int, (wint_t wc));
697 _GL_CXXALIAS_SYS (iswlower, int, (wint_t wc));
698 _GL_CXXALIAS_SYS (iswprint, int, (wint_t wc));
699 _GL_CXXALIAS_SYS (iswpunct, int, (wint_t wc));
700 _GL_CXXALIAS_SYS (iswspace, int, (wint_t wc));
701 _GL_CXXALIAS_SYS (iswupper, int, (wint_t wc));
702 _GL_CXXALIAS_SYS (iswxdigit, int, (wint_t wc));
704 _GL_CXXALIASWARN (iswalnum);
705 _GL_CXXALIASWARN (iswalpha);
706 _GL_CXXALIASWARN (iswcntrl);
707 _GL_CXXALIASWARN (iswdigit);
708 _GL_CXXALIASWARN (iswgraph);
709 _GL_CXXALIASWARN (iswlower);
710 _GL_CXXALIASWARN (iswprint);
711 _GL_CXXALIASWARN (iswpunct);
712 _GL_CXXALIASWARN (iswspace);
713 _GL_CXXALIASWARN (iswupper);
714 _GL_CXXALIASWARN (iswxdigit);
718 _GL_CXXALIAS_RPL (iswblank, int, (wint_t wc));
720 _GL_CXXALIAS_SYS (iswblank, int, (wint_t wc));
722 _GL_CXXALIASWARN (iswblank);
726 # if !GNULIB_defined_wctype_t
727 typedef void * wctype_t;
728 # define GNULIB_defined_wctype_t 1
732 /* Get a descriptor for a wide character property. */
735 _GL_FUNCDECL_SYS (wctype, wctype_t, (const char *name));
737 _GL_CXXALIAS_SYS (wctype, wctype_t, (const char *name));
738 _GL_CXXALIASWARN (wctype);
739 #elif defined GNULIB_POSIXCHECK
741 # if HAVE_RAW_DECL_WCTYPE
742 _GL_WARN_ON_USE (wctype, "wctype is unportable - "
743 "use gnulib module wctype for portability");
747 /* Test whether a wide character has a given property.
748 The argument WC must be either a wchar_t value or WEOF.
749 The argument DESC must have been returned by the wctype() function. */
752 _GL_FUNCDECL_SYS (iswctype, int, (wint_t wc, wctype_t desc));
754 _GL_CXXALIAS_SYS (iswctype, int, (wint_t wc, wctype_t desc));
755 _GL_CXXALIASWARN (iswctype);
756 #elif defined GNULIB_POSIXCHECK
758 # if HAVE_RAW_DECL_ISWCTYPE
759 _GL_WARN_ON_USE (iswctype, "iswctype is unportable - "
760 "use gnulib module iswctype for portability");
764 #if 0 || defined __MINGW32__
765 _GL_CXXALIAS_RPL (towlower, wint_t, (wint_t wc));
766 _GL_CXXALIAS_RPL (towupper, wint_t, (wint_t wc));
768 _GL_CXXALIAS_SYS (towlower, wint_t, (wint_t wc));
769 _GL_CXXALIAS_SYS (towupper, wint_t, (wint_t wc));
771 _GL_CXXALIASWARN (towlower);
772 _GL_CXXALIASWARN (towupper);
775 # if !GNULIB_defined_wctrans_t
776 typedef void * wctrans_t;
777 # define GNULIB_defined_wctrans_t 1
781 /* Get a descriptor for a wide character case conversion. */
784 _GL_FUNCDECL_SYS (wctrans, wctrans_t, (const char *name));
786 _GL_CXXALIAS_SYS (wctrans, wctrans_t, (const char *name));
787 _GL_CXXALIASWARN (wctrans);
788 #elif defined GNULIB_POSIXCHECK
790 # if HAVE_RAW_DECL_WCTRANS
791 _GL_WARN_ON_USE (wctrans, "wctrans is unportable - "
792 "use gnulib module wctrans for portability");
796 /* Perform a given case conversion on a wide character.
797 The argument WC must be either a wchar_t value or WEOF.
798 The argument DESC must have been returned by the wctrans() function. */
801 _GL_FUNCDECL_SYS (towctrans, wint_t, (wint_t wc, wctrans_t desc));
803 _GL_CXXALIAS_SYS (towctrans, wint_t, (wint_t wc, wctrans_t desc));
804 _GL_CXXALIASWARN (towctrans);
805 #elif defined GNULIB_POSIXCHECK
807 # if HAVE_RAW_DECL_TOWCTRANS
808 _GL_WARN_ON_USE (towctrans, "towctrans is unportable - "
809 "use gnulib module towctrans for portability");
813 _GL_INLINE_HEADER_END
815 #endif /* _GL_WCTYPE_H */
816 #endif /* _GL_WCTYPE_H */