wctype.h revision 1.1
1171133Sgnn/* This file is automatically generated.  DO NOT EDIT! */
2171133Sgnn/* Generated from: NetBSD: mknative-gdb,v 1.12 2020/09/17 16:54:31 christos Exp  */
3171133Sgnn/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp  */
4171133Sgnn
5171133Sgnn/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
6171133Sgnn/* A substitute for ISO C99 <wctype.h>, for platforms that lack it.
7171133Sgnn
8171133Sgnn   Copyright (C) 2006-2020 Free Software Foundation, Inc.
9171133Sgnn
10171133Sgnn   This program is free software; you can redistribute it and/or modify
11171133Sgnn   it under the terms of the GNU General Public License as published by
12171133Sgnn   the Free Software Foundation; either version 3, or (at your option)
13171133Sgnn   any later version.
14171133Sgnn
15171133Sgnn   This program is distributed in the hope that it will be useful,
16171133Sgnn   but WITHOUT ANY WARRANTY; without even the implied warranty of
17171133Sgnn   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18171133Sgnn   GNU General Public License for more details.
19171133Sgnn
20171133Sgnn   You should have received a copy of the GNU General Public License
21171133Sgnn   along with this program; if not, see <https://www.gnu.org/licenses/>.  */
22171133Sgnn
23171133Sgnn/* Written by Bruno Haible and Paul Eggert.  */
24171133Sgnn
25171133Sgnn/*
26171133Sgnn * ISO C 99 <wctype.h> for platforms that lack it.
27171133Sgnn * <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/wctype.h.html>
28171133Sgnn *
29171133Sgnn * iswctype, towctrans, towlower, towupper, wctrans, wctype,
30174510Sobrien * wctrans_t, and wctype_t are not yet implemented.
31174510Sobrien */
32174510Sobrien
33171133Sgnn#if __GNUC__ >= 3
34171133Sgnn#pragma GCC system_header
35171133Sgnn#endif
36171133Sgnn
37171133Sgnn
38171133Sgnn#if (defined __MINGW32__ && defined __CTYPE_H_SOURCED__)
39171133Sgnn
40171133Sgnn/* Special invocation convention:
41171133Sgnn   - With MinGW 3.22, when <ctype.h> includes <wctype.h>, only some part of
42171133Sgnn     <wctype.h> is being processed, which doesn't include the idempotency
43171133Sgnn     guard.   */
44171133Sgnn
45181803Sbz#include_next <wctype.h>
46171133Sgnn
47171133Sgnn#else
48171133Sgnn/* Normal invocation convention.  */
49171133Sgnn
50171133Sgnn#ifndef _GL_WCTYPE_H
51171133Sgnn
52171133Sgnn#if 1
53171133Sgnn/* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>.
54180085Sjulian   Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
55171133Sgnn   <wchar.h>.
56171133Sgnn   BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
57171133Sgnn   included before <wchar.h>.  */
58171133Sgnn# include <stddef.h>
59171133Sgnn# include <stdio.h>
60171133Sgnn# include <time.h>
61171167Sgnn# include <wchar.h>
62171133Sgnn#endif
63171133Sgnn
64171133Sgnn/* Native Windows (mingw, MSVC) have declarations of towupper, towlower, and
65171133Sgnn   isw* functions in <ctype.h>, <wchar.h> as well as in <wctype.h>.  Include
66171133Sgnn   <ctype.h>, <wchar.h> in advance to avoid rpl_ prefix being added to the
67171133Sgnn   declarations.  */
68171133Sgnn#if defined _WIN32 && ! defined __CYGWIN__
69171133Sgnn# include <ctype.h>
70171133Sgnn# include <wchar.h>
71171167Sgnn#endif
72171133Sgnn
73171133Sgnn/* Include the original <wctype.h> if it exists.
74180090Sbz   BeOS 5 has the functions but no <wctype.h>.  */
75185571Sbz/* The include_next requires a split double-inclusion guard.  */
76171133Sgnn#if 1
77171133Sgnn# include_next <wctype.h>
78171133Sgnn#endif
79171133Sgnn
80171133Sgnn#ifndef _GL_WCTYPE_H
81171133Sgnn#define _GL_WCTYPE_H
82171133Sgnn
83171133Sgnn#ifndef _GL_INLINE_HEADER_BEGIN
84171133Sgnn #error "Please include config.h first."
85171732Sbz#endif
86171133Sgnn_GL_INLINE_HEADER_BEGIN
87171732Sbz#ifndef _GL_WCTYPE_INLINE
88171133Sgnn# define _GL_WCTYPE_INLINE _GL_INLINE
89171732Sbz#endif
90171133Sgnn
91171133Sgnn/* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
92171133Sgnn/* C++ compatible function declaration macros.
93171133Sgnn   Copyright (C) 2010-2020 Free Software Foundation, Inc.
94171133Sgnn
95171133Sgnn   This program is free software: you can redistribute it and/or modify it
96171133Sgnn   under the terms of the GNU General Public License as published
97171133Sgnn   by the Free Software Foundation; either version 3 of the License, or
98171133Sgnn   (at your option) any later version.
99171133Sgnn
100171133Sgnn   This program is distributed in the hope that it will be useful,
101171133Sgnn   but WITHOUT ANY WARRANTY; without even the implied warranty of
102171133Sgnn   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
103171133Sgnn   General Public License for more details.
104171133Sgnn
105171133Sgnn   You should have received a copy of the GNU General Public License
106171167Sgnn   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
107183550Szec
108183550Szec#ifndef _GL_CXXDEFS_H
109171133Sgnn#define _GL_CXXDEFS_H
110171133Sgnn
111171133Sgnn/* Begin/end the GNULIB_NAMESPACE namespace.  */
112171133Sgnn#if defined __cplusplus && defined GNULIB_NAMESPACE
113171133Sgnn# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE {
114171133Sgnn# define _GL_END_NAMESPACE }
115171133Sgnn#else
116171133Sgnn# define _GL_BEGIN_NAMESPACE
117171133Sgnn# define _GL_END_NAMESPACE
118171133Sgnn#endif
119171133Sgnn
120171260Sdelphij/* The three most frequent use cases of these macros are:
121171133Sgnn
122171133Sgnn   * For providing a substitute for a function that is missing on some
123171133Sgnn     platforms, but is declared and works fine on the platforms on which
124171133Sgnn     it exists:
125171133Sgnn
126171133Sgnn       #if @GNULIB_FOO@
127171133Sgnn       # if !@HAVE_FOO@
128171133Sgnn       _GL_FUNCDECL_SYS (foo, ...);
129171133Sgnn       # endif
130171133Sgnn       _GL_CXXALIAS_SYS (foo, ...);
131171133Sgnn       _GL_CXXALIASWARN (foo);
132171133Sgnn       #elif defined GNULIB_POSIXCHECK
133171133Sgnn       ...
134171133Sgnn       #endif
135171133Sgnn
136181803Sbz   * For providing a replacement for a function that exists on all platforms,
137171133Sgnn     but is broken/insufficient and needs to be replaced on some platforms:
138171133Sgnn
139171167Sgnn       #if @GNULIB_FOO@
140171133Sgnn       # if @REPLACE_FOO@
141171133Sgnn       #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
142171133Sgnn       #   undef foo
143171133Sgnn       #   define foo rpl_foo
144171133Sgnn       #  endif
145171133Sgnn       _GL_FUNCDECL_RPL (foo, ...);
146171133Sgnn       _GL_CXXALIAS_RPL (foo, ...);
147171133Sgnn       # else
148171133Sgnn       _GL_CXXALIAS_SYS (foo, ...);
149171133Sgnn       # endif
150171133Sgnn       _GL_CXXALIASWARN (foo);
151171133Sgnn       #elif defined GNULIB_POSIXCHECK
152171133Sgnn       ...
153171167Sgnn       #endif
154183550Szec
155171133Sgnn   * For providing a replacement for a function that exists on some platforms
156171133Sgnn     but is broken/insufficient and needs to be replaced on some of them and
157171133Sgnn     is additionally either missing or undeclared on some other platforms:
158171133Sgnn
159171133Sgnn       #if @GNULIB_FOO@
160171133Sgnn       # if @REPLACE_FOO@
161171133Sgnn       #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
162171133Sgnn       #   undef foo
163171133Sgnn       #   define foo rpl_foo
164171133Sgnn       #  endif
165171133Sgnn       _GL_FUNCDECL_RPL (foo, ...);
166171133Sgnn       _GL_CXXALIAS_RPL (foo, ...);
167171133Sgnn       # else
168171133Sgnn       #  if !@HAVE_FOO@   or   if !@HAVE_DECL_FOO@
169171133Sgnn       _GL_FUNCDECL_SYS (foo, ...);
170171133Sgnn       #  endif
171171133Sgnn       _GL_CXXALIAS_SYS (foo, ...);
172171260Sdelphij       # endif
173171133Sgnn       _GL_CXXALIASWARN (foo);
174171133Sgnn       #elif defined GNULIB_POSIXCHECK
175171133Sgnn       ...
176171133Sgnn       #endif
177171133Sgnn*/
178171133Sgnn
179171133Sgnn/* _GL_EXTERN_C declaration;
180171260Sdelphij   performs the declaration with C linkage.  */
181171133Sgnn#if defined __cplusplus
182171133Sgnn# define _GL_EXTERN_C extern "C"
183171133Sgnn#else
184171133Sgnn# define _GL_EXTERN_C extern
185171133Sgnn#endif
186171133Sgnn
187171133Sgnn/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes);
188171133Sgnn   declares a replacement function, named rpl_func, with the given prototype,
189171133Sgnn   consisting of return type, parameters, and attributes.
190171133Sgnn   Example:
191171133Sgnn     _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...)
192171133Sgnn                                  _GL_ARG_NONNULL ((1)));
193171133Sgnn */
194171133Sgnn#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \
195171133Sgnn  _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes)
196171133Sgnn#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \
197171133Sgnn  _GL_EXTERN_C rettype rpl_func parameters_and_attributes
198171167Sgnn
199171133Sgnn/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes);
200171133Sgnn   declares the system function, named func, with the given prototype,
201171133Sgnn   consisting of return type, parameters, and attributes.
202171133Sgnn   Example:
203171133Sgnn     _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...)
204171133Sgnn                                  _GL_ARG_NONNULL ((1)));
205171260Sdelphij */
206171260Sdelphij#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \
207171133Sgnn  _GL_EXTERN_C rettype func parameters_and_attributes
208171133Sgnn
209171133Sgnn/* _GL_CXXALIAS_RPL (func, rettype, parameters);
210171260Sdelphij   declares a C++ alias called GNULIB_NAMESPACE::func
211171133Sgnn   that redirects to rpl_func, if GNULIB_NAMESPACE is defined.
212171167Sgnn   Example:
213171133Sgnn     _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...));
214171133Sgnn
215171237Speter   Wrapping rpl_func in an object with an inline conversion operator
216171133Sgnn   avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is
217171133Sgnn   actually used in the program.  */
218171133Sgnn#define _GL_CXXALIAS_RPL(func,rettype,parameters) \
219171133Sgnn  _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters)
220171133Sgnn#if defined __cplusplus && defined GNULIB_NAMESPACE
221171133Sgnn# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
222171133Sgnn    namespace GNULIB_NAMESPACE                                \
223171133Sgnn    {                                                         \
224171133Sgnn      static const struct _gl_ ## func ## _wrapper            \
225171133Sgnn      {                                                       \
226171133Sgnn        typedef rettype (*type) parameters;                   \
227171133Sgnn                                                              \
228171133Sgnn        inline operator type () const                         \
229171133Sgnn        {                                                     \
230171133Sgnn          return ::rpl_func;                                  \
231171133Sgnn        }                                                     \
232171260Sdelphij      } func = {};                                            \
233171133Sgnn    }                                                         \
234171133Sgnn    _GL_EXTERN_C int _gl_cxxalias_dummy
235171133Sgnn#else
236171133Sgnn# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
237171133Sgnn    _GL_EXTERN_C int _gl_cxxalias_dummy
238171133Sgnn#endif
239171133Sgnn
240171133Sgnn/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters);
241171133Sgnn   is like  _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters);
242171133Sgnn   except that the C function rpl_func may have a slightly different
243171133Sgnn   declaration.  A cast is used to silence the "invalid conversion" error
244171133Sgnn   that would otherwise occur.  */
245171133Sgnn#if defined __cplusplus && defined GNULIB_NAMESPACE
246171133Sgnn# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
247171133Sgnn    namespace GNULIB_NAMESPACE                                     \
248171133Sgnn    {                                                              \
249171133Sgnn      static const struct _gl_ ## func ## _wrapper                 \
250171133Sgnn      {                                                            \
251171133Sgnn        typedef rettype (*type) parameters;                        \
252171133Sgnn                                                                   \
253171133Sgnn        inline operator type () const                              \
254171133Sgnn        {                                                          \
255171133Sgnn          return reinterpret_cast<type>(::rpl_func);               \
256171133Sgnn        }                                                          \
257171133Sgnn      } func = {};                                                 \
258171133Sgnn    }                                                              \
259171133Sgnn    _GL_EXTERN_C int _gl_cxxalias_dummy
260171133Sgnn#else
261171133Sgnn# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
262171133Sgnn    _GL_EXTERN_C int _gl_cxxalias_dummy
263171133Sgnn#endif
264171133Sgnn
265171133Sgnn/* _GL_CXXALIAS_SYS (func, rettype, parameters);
266171133Sgnn   declares a C++ alias called GNULIB_NAMESPACE::func
267177167Sbz   that redirects to the system provided function func, if GNULIB_NAMESPACE
268171237Speter   is defined.
269171133Sgnn   Example:
270171133Sgnn     _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...));
271171133Sgnn
272171133Sgnn   Wrapping func in an object with an inline conversion operator
273171133Sgnn   avoids a reference to func unless GNULIB_NAMESPACE::func is
274171133Sgnn   actually used in the program.  */
275171133Sgnn#if defined __cplusplus && defined GNULIB_NAMESPACE
276171133Sgnn# define _GL_CXXALIAS_SYS(func,rettype,parameters)            \
277171133Sgnn    namespace GNULIB_NAMESPACE                                \
278171133Sgnn    {                                                         \
279171133Sgnn      static const struct _gl_ ## func ## _wrapper            \
280171133Sgnn      {                                                       \
281171133Sgnn        typedef rettype (*type) parameters;                   \
282171133Sgnn                                                              \
283171133Sgnn        inline operator type () const                         \
284171133Sgnn        {                                                     \
285171133Sgnn          return ::func;                                      \
286171133Sgnn        }                                                     \
287171133Sgnn      } func = {};                                            \
288171133Sgnn    }                                                         \
289171133Sgnn    _GL_EXTERN_C int _gl_cxxalias_dummy
290171133Sgnn#else
291171133Sgnn# define _GL_CXXALIAS_SYS(func,rettype,parameters) \
292171133Sgnn    _GL_EXTERN_C int _gl_cxxalias_dummy
293171133Sgnn#endif
294171133Sgnn
295171133Sgnn/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters);
296171133Sgnn   is like  _GL_CXXALIAS_SYS (func, rettype, parameters);
297171133Sgnn   except that the C function func may have a slightly different declaration.
298171133Sgnn   A cast is used to silence the "invalid conversion" error that would
299171133Sgnn   otherwise occur.  */
300171133Sgnn#if defined __cplusplus && defined GNULIB_NAMESPACE
301171133Sgnn# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
302171133Sgnn    namespace GNULIB_NAMESPACE                          \
303171133Sgnn    {                                                   \
304171133Sgnn      static const struct _gl_ ## func ## _wrapper      \
305171133Sgnn      {                                                 \
306171133Sgnn        typedef rettype (*type) parameters;             \
307171133Sgnn                                                        \
308171133Sgnn        inline operator type () const                   \
309171133Sgnn        {                                               \
310171133Sgnn          return reinterpret_cast<type>(::func);        \
311171133Sgnn        }                                               \
312171133Sgnn      } func = {};                                      \
313171167Sgnn    }                                                   \
314171133Sgnn    _GL_EXTERN_C int _gl_cxxalias_dummy
315171133Sgnn#else
316171133Sgnn# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
317177166Sbz    _GL_EXTERN_C int _gl_cxxalias_dummy
318171133Sgnn#endif
319171133Sgnn
320171133Sgnn/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2);
321171133Sgnn   is like  _GL_CXXALIAS_SYS (func, rettype, parameters);
322171133Sgnn   except that the C function is picked among a set of overloaded functions,
323171133Sgnn   namely the one with rettype2 and parameters2.  Two consecutive casts
324171133Sgnn   are used to silence the "cannot find a match" and "invalid conversion"
325171133Sgnn   errors that would otherwise occur.  */
326171133Sgnn#if defined __cplusplus && defined GNULIB_NAMESPACE
327171133Sgnn  /* The outer cast must be a reinterpret_cast.
328171133Sgnn     The inner cast: When the function is defined as a set of overloaded
329171133Sgnn     functions, it works as a static_cast<>, choosing the designated variant.
330171133Sgnn     When the function is defined as a single variant, it works as a
331171133Sgnn     reinterpret_cast<>. The parenthesized cast syntax works both ways.  */
332171133Sgnn# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
333177166Sbz    namespace GNULIB_NAMESPACE                                                \
334171133Sgnn    {                                                                         \
335171133Sgnn      static const struct _gl_ ## func ## _wrapper                            \
336171133Sgnn      {                                                                       \
337171133Sgnn        typedef rettype (*type) parameters;                                   \
338171133Sgnn                                                                              \
339171133Sgnn        inline operator type () const                                         \
340171133Sgnn        {                                                                     \
341171133Sgnn          return reinterpret_cast<type>((rettype2 (*) parameters2)(::func));  \
342171133Sgnn        }                                                                     \
343171133Sgnn      } func = {};                                                            \
344188306Sbz    }                                                                         \
345171133Sgnn    _GL_EXTERN_C int _gl_cxxalias_dummy
346171133Sgnn#else
347171133Sgnn# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
348171133Sgnn    _GL_EXTERN_C int _gl_cxxalias_dummy
349171133Sgnn#endif
350171133Sgnn
351171133Sgnn/* _GL_CXXALIASWARN (func);
352171133Sgnn   causes a warning to be emitted when ::func is used but not when
353171133Sgnn   GNULIB_NAMESPACE::func is used.  func must be defined without overloaded
354171133Sgnn   variants.  */
355171133Sgnn#if defined __cplusplus && defined GNULIB_NAMESPACE
356171133Sgnn# define _GL_CXXALIASWARN(func) \
357171133Sgnn   _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE)
358171133Sgnn# define _GL_CXXALIASWARN_1(func,namespace) \
359171133Sgnn   _GL_CXXALIASWARN_2 (func, namespace)
360171133Sgnn/* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
361171133Sgnn   we enable the warning only when not optimizing.  */
362171133Sgnn# if !__OPTIMIZE__
363177166Sbz#  define _GL_CXXALIASWARN_2(func,namespace) \
364171167Sgnn    _GL_WARN_ON_USE (func, \
365177166Sbz                     "The symbol ::" #func " refers to the system function. " \
366171133Sgnn                     "Use " #namespace "::" #func " instead.")
367171133Sgnn# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
368177166Sbz#  define _GL_CXXALIASWARN_2(func,namespace) \
369     extern __typeof__ (func) func
370# else
371#  define _GL_CXXALIASWARN_2(func,namespace) \
372     _GL_EXTERN_C int _gl_cxxalias_dummy
373# endif
374#else
375# define _GL_CXXALIASWARN(func) \
376    _GL_EXTERN_C int _gl_cxxalias_dummy
377#endif
378
379/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes);
380   causes a warning to be emitted when the given overloaded variant of ::func
381   is used but not when GNULIB_NAMESPACE::func is used.  */
382#if defined __cplusplus && defined GNULIB_NAMESPACE
383# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
384   _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \
385                        GNULIB_NAMESPACE)
386# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \
387   _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace)
388/* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
389   we enable the warning only when not optimizing.  */
390# if !__OPTIMIZE__
391#  define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
392    _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \
393                         "The symbol ::" #func " refers to the system function. " \
394                         "Use " #namespace "::" #func " instead.")
395# else
396#  define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
397     _GL_EXTERN_C int _gl_cxxalias_dummy
398# endif
399#else
400# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
401    _GL_EXTERN_C int _gl_cxxalias_dummy
402#endif
403
404#endif /* _GL_CXXDEFS_H */
405
406/* The definition of _GL_WARN_ON_USE is copied here.  */
407/* A C macro for emitting warnings if a function is used.
408   Copyright (C) 2010-2020 Free Software Foundation, Inc.
409
410   This program is free software: you can redistribute it and/or modify it
411   under the terms of the GNU General Public License as published
412   by the Free Software Foundation; either version 3 of the License, or
413   (at your option) any later version.
414
415   This program is distributed in the hope that it will be useful,
416   but WITHOUT ANY WARRANTY; without even the implied warranty of
417   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
418   General Public License for more details.
419
420   You should have received a copy of the GNU General Public License
421   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
422
423/* _GL_WARN_ON_USE (function, "literal string") issues a declaration
424   for FUNCTION which will then trigger a compiler warning containing
425   the text of "literal string" anywhere that function is called, if
426   supported by the compiler.  If the compiler does not support this
427   feature, the macro expands to an unused extern declaration.
428
429   _GL_WARN_ON_USE_ATTRIBUTE ("literal string") expands to the
430   attribute used in _GL_WARN_ON_USE.  If the compiler does not support
431   this feature, it expands to empty.
432
433   These macros are useful for marking a function as a potential
434   portability trap, with the intent that "literal string" include
435   instructions on the replacement function that should be used
436   instead.
437   _GL_WARN_ON_USE is for functions with 'extern' linkage.
438   _GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline'
439   linkage.
440
441   However, one of the reasons that a function is a portability trap is
442   if it has the wrong signature.  Declaring FUNCTION with a different
443   signature in C is a compilation error, so this macro must use the
444   same type as any existing declaration so that programs that avoid
445   the problematic FUNCTION do not fail to compile merely because they
446   included a header that poisoned the function.  But this implies that
447   _GL_WARN_ON_USE is only safe to use if FUNCTION is known to already
448   have a declaration.  Use of this macro implies that there must not
449   be any other macro hiding the declaration of FUNCTION; but
450   undefining FUNCTION first is part of the poisoning process anyway
451   (although for symbols that are provided only via a macro, the result
452   is a compilation error rather than a warning containing
453   "literal string").  Also note that in C++, it is only safe to use if
454   FUNCTION has no overloads.
455
456   For an example, it is possible to poison 'getline' by:
457   - adding a call to gl_WARN_ON_USE_PREPARE([[#include <stdio.h>]],
458     [getline]) in configure.ac, which potentially defines
459     HAVE_RAW_DECL_GETLINE
460   - adding this code to a header that wraps the system <stdio.h>:
461     #undef getline
462     #if HAVE_RAW_DECL_GETLINE
463     _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but"
464       "not universally present; use the gnulib module getline");
465     #endif
466
467   It is not possible to directly poison global variables.  But it is
468   possible to write a wrapper accessor function, and poison that
469   (less common usage, like &environ, will cause a compilation error
470   rather than issue the nice warning, but the end result of informing
471   the developer about their portability problem is still achieved):
472     #if HAVE_RAW_DECL_ENVIRON
473     static char ***
474     rpl_environ (void) { return &environ; }
475     _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared");
476     # undef environ
477     # define environ (*rpl_environ ())
478     #endif
479   or better (avoiding contradictory use of 'static' and 'extern'):
480     #if HAVE_RAW_DECL_ENVIRON
481     static char ***
482     _GL_WARN_ON_USE_ATTRIBUTE ("environ is not always properly declared")
483     rpl_environ (void) { return &environ; }
484     # undef environ
485     # define environ (*rpl_environ ())
486     #endif
487   */
488#ifndef _GL_WARN_ON_USE
489
490# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
491/* A compiler attribute is available in gcc versions 4.3.0 and later.  */
492#  define _GL_WARN_ON_USE(function, message) \
493extern __typeof__ (function) function __attribute__ ((__warning__ (message)))
494#  define _GL_WARN_ON_USE_ATTRIBUTE(message) \
495  __attribute__ ((__warning__ (message)))
496# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
497/* Verify the existence of the function.  */
498#  define _GL_WARN_ON_USE(function, message) \
499extern __typeof__ (function) function
500#  define _GL_WARN_ON_USE_ATTRIBUTE(message)
501# else /* Unsupported.  */
502#  define _GL_WARN_ON_USE(function, message) \
503_GL_WARN_EXTERN_C int _gl_warn_on_use
504#  define _GL_WARN_ON_USE_ATTRIBUTE(message)
505# endif
506#endif
507
508/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string")
509   is like _GL_WARN_ON_USE (function, "string"), except that in C++ mode the
510   function is declared with the given prototype, consisting of return type,
511   parameters, and attributes.
512   This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does
513   not work in this case.  */
514#ifndef _GL_WARN_ON_USE_CXX
515# if !defined __cplusplus
516#  define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
517     _GL_WARN_ON_USE (function, msg)
518# else
519#  if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
520#   define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
521extern rettype function parameters_and_attributes \
522     __attribute__ ((__warning__ (msg)))
523#  elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
524/* Verify the existence of the function.  */
525#   define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
526extern rettype function parameters_and_attributes
527#  else /* Unsupported.  */
528#   define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
529_GL_WARN_EXTERN_C int _gl_warn_on_use
530#  endif
531# endif
532#endif
533
534/* _GL_WARN_EXTERN_C declaration;
535   performs the declaration with C linkage.  */
536#ifndef _GL_WARN_EXTERN_C
537# if defined __cplusplus
538#  define _GL_WARN_EXTERN_C extern "C"
539# else
540#  define _GL_WARN_EXTERN_C extern
541# endif
542#endif
543
544/* Solaris 2.6 <wctype.h> includes <widec.h> which includes <euc.h> which
545   #defines a number of identifiers in the application namespace.  Revert
546   these #defines.  */
547#ifdef __sun
548# undef multibyte
549# undef eucw1
550# undef eucw2
551# undef eucw3
552# undef scrw1
553# undef scrw2
554# undef scrw3
555#endif
556
557/* Define wint_t and WEOF.  (Also done in wchar.in.h.)  */
558#if !1 && !defined wint_t
559# define wint_t int
560# ifndef WEOF
561#  define WEOF -1
562# endif
563#else
564/* mingw and MSVC define wint_t as 'unsigned short' in <crtdefs.h> or
565   <stddef.h>.  This is too small: ISO C 99 section 7.24.1.(2) says that
566   wint_t must be "unchanged by default argument promotions".  Override it.  */
567# if 0
568#  if !GNULIB_defined_wint_t
569#   if 0
570#    include <crtdefs.h>
571#   else
572#    include <stddef.h>
573#   endif
574typedef unsigned int rpl_wint_t;
575#   undef wint_t
576#   define wint_t rpl_wint_t
577#   define GNULIB_defined_wint_t 1
578#  endif
579# endif
580# ifndef WEOF
581#  define WEOF ((wint_t) -1)
582# endif
583#endif
584
585
586#if !GNULIB_defined_wctype_functions
587
588/* FreeBSD 4.4 to 4.11 has <wctype.h> but lacks the functions.
589   Linux libc5 has <wctype.h> and the functions but they are broken.
590   mingw and MSVC have <wctype.h> and the functions but they take a wchar_t
591   as argument, not an rpl_wint_t.
592   Assume all 11 functions (all isw* except iswblank) are implemented the
593   same way, or not at all.  */
594# if ! 1 || 0
595
596#  if 0 /* implies 0 */
597
598_GL_WCTYPE_INLINE int
599rpl_iswalnum (wint_t wc)
600{
601  return ((wchar_t) wc == wc ? iswalnum ((wchar_t) wc) : 0);
602}
603
604_GL_WCTYPE_INLINE int
605rpl_iswalpha (wint_t wc)
606{
607  return ((wchar_t) wc == wc ? iswalpha ((wchar_t) wc) : 0);
608}
609
610_GL_WCTYPE_INLINE int
611rpl_iswblank (wint_t wc)
612{
613  return ((wchar_t) wc == wc ? iswblank ((wchar_t) wc) : 0);
614}
615
616_GL_WCTYPE_INLINE int
617rpl_iswcntrl (wint_t wc)
618{
619  return ((wchar_t) wc == wc ? iswcntrl ((wchar_t) wc) : 0);
620}
621
622_GL_WCTYPE_INLINE int
623rpl_iswdigit (wint_t wc)
624{
625  return ((wchar_t) wc == wc ? wc >= '0' && wc <= '9' : 0);
626}
627
628_GL_WCTYPE_INLINE int
629rpl_iswgraph (wint_t wc)
630{
631  return ((wchar_t) wc == wc ? iswgraph ((wchar_t) wc) : 0);
632}
633
634_GL_WCTYPE_INLINE int
635rpl_iswlower (wint_t wc)
636{
637  return ((wchar_t) wc == wc ? iswlower ((wchar_t) wc) : 0);
638}
639
640_GL_WCTYPE_INLINE int
641rpl_iswprint (wint_t wc)
642{
643  return ((wchar_t) wc == wc ? iswprint ((wchar_t) wc) : 0);
644}
645
646_GL_WCTYPE_INLINE int
647rpl_iswpunct (wint_t wc)
648{
649  return ((wchar_t) wc == wc ? iswpunct ((wchar_t) wc) : 0);
650}
651
652_GL_WCTYPE_INLINE int
653rpl_iswspace (wint_t wc)
654{
655  return ((wchar_t) wc == wc ? iswspace ((wchar_t) wc) : 0);
656}
657
658_GL_WCTYPE_INLINE int
659rpl_iswupper (wint_t wc)
660{
661  return ((wchar_t) wc == wc ? iswupper ((wchar_t) wc) : 0);
662}
663
664_GL_WCTYPE_INLINE int
665rpl_iswxdigit (wint_t wc)
666{
667  return ((wchar_t) wc == wc
668          ? (wc >= '0' && wc <= '9')
669            || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'F')
670          : 0);
671}
672
673_GL_WCTYPE_INLINE wint_t
674rpl_towlower (wint_t wc)
675{
676  return ((wchar_t) wc == wc ? (wchar_t) towlower ((wchar_t) wc) : wc);
677}
678
679_GL_WCTYPE_INLINE wint_t
680rpl_towupper (wint_t wc)
681{
682  return ((wchar_t) wc == wc ? (wchar_t) towupper ((wchar_t) wc) : wc);
683}
684
685#   if !(defined __cplusplus && defined GNULIB_NAMESPACE)
686#    undef iswalnum
687#    undef iswalpha
688#    undef iswblank
689#    undef iswcntrl
690#    undef iswdigit
691#    undef iswgraph
692#    undef iswlower
693#    undef iswprint
694#    undef iswpunct
695#    undef iswspace
696#    undef iswupper
697#    undef iswxdigit
698#    undef towlower
699#    undef towupper
700#    define iswalnum rpl_iswalnum
701#    define iswalpha rpl_iswalpha
702#    define iswblank rpl_iswblank
703#    define iswcntrl rpl_iswcntrl
704#    define iswdigit rpl_iswdigit
705#    define iswgraph rpl_iswgraph
706#    define iswlower rpl_iswlower
707#    define iswprint rpl_iswprint
708#    define iswpunct rpl_iswpunct
709#    define iswspace rpl_iswspace
710#    define iswupper rpl_iswupper
711#    define iswxdigit rpl_iswxdigit
712#    define towlower rpl_towlower
713#    define towupper rpl_towupper
714#   endif
715
716#  else
717
718/* IRIX 5.3 has macros but no functions, its isw* macros refer to an
719   undefined variable _ctmp_ and to <ctype.h> macros like _P, and they
720   refer to system functions like _iswctype that are not in the
721   standard C library.  Rather than try to get ancient buggy
722   implementations like this to work, just disable them.  */
723#   undef iswalnum
724#   undef iswalpha
725#   undef iswblank
726#   undef iswcntrl
727#   undef iswdigit
728#   undef iswgraph
729#   undef iswlower
730#   undef iswprint
731#   undef iswpunct
732#   undef iswspace
733#   undef iswupper
734#   undef iswxdigit
735#   undef towlower
736#   undef towupper
737
738/* Linux libc5 has <wctype.h> and the functions but they are broken.  */
739#   if 0
740#    if !(defined __cplusplus && defined GNULIB_NAMESPACE)
741#     define iswalnum rpl_iswalnum
742#     define iswalpha rpl_iswalpha
743#     define iswblank rpl_iswblank
744#     define iswcntrl rpl_iswcntrl
745#     define iswdigit rpl_iswdigit
746#     define iswgraph rpl_iswgraph
747#     define iswlower rpl_iswlower
748#     define iswprint rpl_iswprint
749#     define iswpunct rpl_iswpunct
750#     define iswspace rpl_iswspace
751#     define iswupper rpl_iswupper
752#     define iswxdigit rpl_iswxdigit
753#    endif
754#   endif
755#   if 0
756#    if !(defined __cplusplus && defined GNULIB_NAMESPACE)
757#     define towlower rpl_towlower
758#     define towupper rpl_towupper
759#    endif
760#   endif
761
762_GL_WCTYPE_INLINE int
763#   if 0
764rpl_iswalnum
765#   else
766iswalnum
767#   endif
768         (wint_t wc)
769{
770  return ((wc >= '0' && wc <= '9')
771          || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z'));
772}
773
774_GL_WCTYPE_INLINE int
775#   if 0
776rpl_iswalpha
777#   else
778iswalpha
779#   endif
780         (wint_t wc)
781{
782  return (wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z';
783}
784
785_GL_WCTYPE_INLINE int
786#   if 0
787rpl_iswblank
788#   else
789iswblank
790#   endif
791         (wint_t wc)
792{
793  return wc == ' ' || wc == '\t';
794}
795
796_GL_WCTYPE_INLINE int
797#   if 0
798rpl_iswcntrl
799#   else
800iswcntrl
801#   endif
802        (wint_t wc)
803{
804  return (wc & ~0x1f) == 0 || wc == 0x7f;
805}
806
807_GL_WCTYPE_INLINE int
808#   if 0
809rpl_iswdigit
810#   else
811iswdigit
812#   endif
813         (wint_t wc)
814{
815  return wc >= '0' && wc <= '9';
816}
817
818_GL_WCTYPE_INLINE int
819#   if 0
820rpl_iswgraph
821#   else
822iswgraph
823#   endif
824         (wint_t wc)
825{
826  return wc >= '!' && wc <= '~';
827}
828
829_GL_WCTYPE_INLINE int
830#   if 0
831rpl_iswlower
832#   else
833iswlower
834#   endif
835         (wint_t wc)
836{
837  return wc >= 'a' && wc <= 'z';
838}
839
840_GL_WCTYPE_INLINE int
841#   if 0
842rpl_iswprint
843#   else
844iswprint
845#   endif
846         (wint_t wc)
847{
848  return wc >= ' ' && wc <= '~';
849}
850
851_GL_WCTYPE_INLINE int
852#   if 0
853rpl_iswpunct
854#   else
855iswpunct
856#   endif
857         (wint_t wc)
858{
859  return (wc >= '!' && wc <= '~'
860          && !((wc >= '0' && wc <= '9')
861               || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z')));
862}
863
864_GL_WCTYPE_INLINE int
865#   if 0
866rpl_iswspace
867#   else
868iswspace
869#   endif
870         (wint_t wc)
871{
872  return (wc == ' ' || wc == '\t'
873          || wc == '\n' || wc == '\v' || wc == '\f' || wc == '\r');
874}
875
876_GL_WCTYPE_INLINE int
877#   if 0
878rpl_iswupper
879#   else
880iswupper
881#   endif
882         (wint_t wc)
883{
884  return wc >= 'A' && wc <= 'Z';
885}
886
887_GL_WCTYPE_INLINE int
888#   if 0
889rpl_iswxdigit
890#   else
891iswxdigit
892#   endif
893          (wint_t wc)
894{
895  return ((wc >= '0' && wc <= '9')
896          || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'F'));
897}
898
899_GL_WCTYPE_INLINE wint_t
900#   if 0
901rpl_towlower
902#   else
903towlower
904#   endif
905         (wint_t wc)
906{
907  return (wc >= 'A' && wc <= 'Z' ? wc - 'A' + 'a' : wc);
908}
909
910_GL_WCTYPE_INLINE wint_t
911#   if 0
912rpl_towupper
913#   else
914towupper
915#   endif
916         (wint_t wc)
917{
918  return (wc >= 'a' && wc <= 'z' ? wc - 'a' + 'A' : wc);
919}
920
921#  endif
922
923# else
924/* Only some of the functions are missing or broken.  */
925
926#  if 0 && (! 1 || 0)
927/* Only the iswblank function is missing.  */
928#   if 0
929#    if !(defined __cplusplus && defined GNULIB_NAMESPACE)
930#     define iswblank rpl_iswblank
931#    endif
932_GL_FUNCDECL_RPL (iswblank, int, (wint_t wc));
933#   else
934_GL_FUNCDECL_SYS (iswblank, int, (wint_t wc));
935#   endif
936#  endif
937
938#  if 0
939#   if 0
940#    if !(defined __cplusplus && defined GNULIB_NAMESPACE)
941#     undef iswdigit
942#     define iswdigit rpl_iswdigit
943#    endif
944_GL_FUNCDECL_RPL (iswdigit, int, (wint_t wc));
945#   endif
946#  endif
947
948#  if 0
949#   if 0
950#    if !(defined __cplusplus && defined GNULIB_NAMESPACE)
951#     undef iswxdigit
952#     define iswxdigit rpl_iswxdigit
953#    endif
954_GL_FUNCDECL_RPL (iswxdigit, int, (wint_t wc));
955#   endif
956#  endif
957
958# endif
959
960# if defined __MINGW32__ && !0
961
962/* On native Windows, wchar_t is uint16_t, and wint_t is uint32_t.
963   The functions towlower and towupper are implemented in the MSVCRT library
964   to take a wchar_t argument and return a wchar_t result.  mingw declares
965   these functions to take a wint_t argument and return a wint_t result.
966   This means that:
967   1. When the user passes an argument outside the range 0x0000..0xFFFF, the
968      function will look only at the lower 16 bits.  This is allowed according
969      to POSIX.
970   2. The return value is returned in the lower 16 bits of the result register.
971      The upper 16 bits are random: whatever happened to be in that part of the
972      result register.  We need to fix this by adding a zero-extend from
973      wchar_t to wint_t after the call.  */
974
975_GL_WCTYPE_INLINE wint_t
976rpl_towlower (wint_t wc)
977{
978  return (wint_t) (wchar_t) towlower (wc);
979}
980#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
981#   define towlower rpl_towlower
982#  endif
983
984_GL_WCTYPE_INLINE wint_t
985rpl_towupper (wint_t wc)
986{
987  return (wint_t) (wchar_t) towupper (wc);
988}
989#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
990#   define towupper rpl_towupper
991#  endif
992
993# endif /* __MINGW32__ && !0 */
994
995# define GNULIB_defined_wctype_functions 1
996#endif
997
998#if 0
999_GL_CXXALIAS_RPL (iswalnum, int, (wint_t wc));
1000#else
1001_GL_CXXALIAS_SYS (iswalnum, int, (wint_t wc));
1002#endif
1003#if 0
1004_GL_CXXALIAS_RPL (iswalpha, int, (wint_t wc));
1005#else
1006_GL_CXXALIAS_SYS (iswalpha, int, (wint_t wc));
1007#endif
1008#if 0
1009_GL_CXXALIAS_RPL (iswcntrl, int, (wint_t wc));
1010#else
1011_GL_CXXALIAS_SYS (iswcntrl, int, (wint_t wc));
1012#endif
1013#if 0
1014# if 0
1015_GL_CXXALIAS_RPL (iswdigit, int, (wint_t wc));
1016# else
1017_GL_CXXALIAS_SYS (iswdigit, int, (wint_t wc));
1018# endif
1019#endif
1020#if 0
1021_GL_CXXALIAS_RPL (iswgraph, int, (wint_t wc));
1022#else
1023_GL_CXXALIAS_SYS (iswgraph, int, (wint_t wc));
1024#endif
1025#if 0
1026_GL_CXXALIAS_RPL (iswlower, int, (wint_t wc));
1027#else
1028_GL_CXXALIAS_SYS (iswlower, int, (wint_t wc));
1029#endif
1030#if 0
1031_GL_CXXALIAS_RPL (iswprint, int, (wint_t wc));
1032#else
1033_GL_CXXALIAS_SYS (iswprint, int, (wint_t wc));
1034#endif
1035#if 0
1036_GL_CXXALIAS_RPL (iswpunct, int, (wint_t wc));
1037#else
1038_GL_CXXALIAS_SYS (iswpunct, int, (wint_t wc));
1039#endif
1040#if 0
1041_GL_CXXALIAS_RPL (iswspace, int, (wint_t wc));
1042#else
1043_GL_CXXALIAS_SYS (iswspace, int, (wint_t wc));
1044#endif
1045#if 0
1046_GL_CXXALIAS_RPL (iswupper, int, (wint_t wc));
1047#else
1048_GL_CXXALIAS_SYS (iswupper, int, (wint_t wc));
1049#endif
1050#if 0
1051# if 0
1052_GL_CXXALIAS_RPL (iswxdigit, int, (wint_t wc));
1053# else
1054_GL_CXXALIAS_SYS (iswxdigit, int, (wint_t wc));
1055# endif
1056#endif
1057#if __GLIBC__ >= 2
1058_GL_CXXALIASWARN (iswalnum);
1059_GL_CXXALIASWARN (iswalpha);
1060_GL_CXXALIASWARN (iswcntrl);
1061_GL_CXXALIASWARN (iswdigit);
1062_GL_CXXALIASWARN (iswgraph);
1063_GL_CXXALIASWARN (iswlower);
1064_GL_CXXALIASWARN (iswprint);
1065_GL_CXXALIASWARN (iswpunct);
1066_GL_CXXALIASWARN (iswspace);
1067_GL_CXXALIASWARN (iswupper);
1068_GL_CXXALIASWARN (iswxdigit);
1069#endif
1070
1071#if 0
1072# if 0 || 0
1073_GL_CXXALIAS_RPL (iswblank, int, (wint_t wc));
1074# else
1075_GL_CXXALIAS_SYS (iswblank, int, (wint_t wc));
1076# endif
1077# if __GLIBC__ >= 2
1078_GL_CXXALIASWARN (iswblank);
1079# endif
1080#endif
1081
1082#if !1
1083# if !GNULIB_defined_wctype_t
1084typedef void * wctype_t;
1085#  define GNULIB_defined_wctype_t 1
1086# endif
1087#endif
1088
1089/* Get a descriptor for a wide character property.  */
1090#if 0
1091# if !1
1092_GL_FUNCDECL_SYS (wctype, wctype_t, (const char *name));
1093# endif
1094_GL_CXXALIAS_SYS (wctype, wctype_t, (const char *name));
1095# if __GLIBC__ >= 2
1096_GL_CXXALIASWARN (wctype);
1097# endif
1098#elif defined GNULIB_POSIXCHECK
1099# undef wctype
1100# if HAVE_RAW_DECL_WCTYPE
1101_GL_WARN_ON_USE (wctype, "wctype is unportable - "
1102                 "use gnulib module wctype for portability");
1103# endif
1104#endif
1105
1106/* Test whether a wide character has a given property.
1107   The argument WC must be either a wchar_t value or WEOF.
1108   The argument DESC must have been returned by the wctype() function.  */
1109#if 0
1110# if 0
1111#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1112#   undef iswctype
1113#   define iswctype rpl_iswctype
1114#  endif
1115_GL_FUNCDECL_RPL (iswctype, int, (wint_t wc, wctype_t desc));
1116_GL_CXXALIAS_RPL (iswctype, int, (wint_t wc, wctype_t desc));
1117# else
1118#  if !1
1119_GL_FUNCDECL_SYS (iswctype, int, (wint_t wc, wctype_t desc));
1120#  endif
1121_GL_CXXALIAS_SYS (iswctype, int, (wint_t wc, wctype_t desc));
1122# endif
1123# if __GLIBC__ >= 2
1124_GL_CXXALIASWARN (iswctype);
1125# endif
1126#elif defined GNULIB_POSIXCHECK
1127# undef iswctype
1128# if HAVE_RAW_DECL_ISWCTYPE
1129_GL_WARN_ON_USE (iswctype, "iswctype is unportable - "
1130                 "use gnulib module iswctype for portability");
1131# endif
1132#endif
1133
1134#if 0 || defined __MINGW32__
1135_GL_CXXALIAS_RPL (towlower, wint_t, (wint_t wc));
1136_GL_CXXALIAS_RPL (towupper, wint_t, (wint_t wc));
1137#else
1138_GL_CXXALIAS_SYS (towlower, wint_t, (wint_t wc));
1139_GL_CXXALIAS_SYS (towupper, wint_t, (wint_t wc));
1140#endif
1141#if __GLIBC__ >= 2
1142_GL_CXXALIASWARN (towlower);
1143_GL_CXXALIASWARN (towupper);
1144#endif
1145
1146#if !1
1147# if !GNULIB_defined_wctrans_t
1148typedef void * wctrans_t;
1149#  define GNULIB_defined_wctrans_t 1
1150# endif
1151#endif
1152
1153/* Get a descriptor for a wide character case conversion.  */
1154#if 0
1155# if !1
1156_GL_FUNCDECL_SYS (wctrans, wctrans_t, (const char *name));
1157# endif
1158_GL_CXXALIAS_SYS (wctrans, wctrans_t, (const char *name));
1159# if __GLIBC__ >= 2
1160_GL_CXXALIASWARN (wctrans);
1161# endif
1162#elif defined GNULIB_POSIXCHECK
1163# undef wctrans
1164# if HAVE_RAW_DECL_WCTRANS
1165_GL_WARN_ON_USE (wctrans, "wctrans is unportable - "
1166                 "use gnulib module wctrans for portability");
1167# endif
1168#endif
1169
1170/* Perform a given case conversion on a wide character.
1171   The argument WC must be either a wchar_t value or WEOF.
1172   The argument DESC must have been returned by the wctrans() function.  */
1173#if 0
1174# if !1
1175_GL_FUNCDECL_SYS (towctrans, wint_t, (wint_t wc, wctrans_t desc));
1176# endif
1177_GL_CXXALIAS_SYS (towctrans, wint_t, (wint_t wc, wctrans_t desc));
1178# if __GLIBC__ >= 2
1179_GL_CXXALIASWARN (towctrans);
1180# endif
1181#elif defined GNULIB_POSIXCHECK
1182# undef towctrans
1183# if HAVE_RAW_DECL_TOWCTRANS
1184_GL_WARN_ON_USE (towctrans, "towctrans is unportable - "
1185                 "use gnulib module towctrans for portability");
1186# endif
1187#endif
1188
1189_GL_INLINE_HEADER_END
1190
1191#endif /* _GL_WCTYPE_H */
1192#endif /* _GL_WCTYPE_H */
1193#endif
1194