GDBserver
wchar.h
Go to the documentation of this file.
1 /* DO NOT EDIT! GENERATED AUTOMATICALLY! */
2 /* A substitute for ISO C99 <wchar.h>, for platforms that have issues.
3 
4  Copyright (C) 2007-2016 Free Software Foundation, Inc.
5 
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)
9  any later version.
10 
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.
15 
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/>. */
18 
19 /* Written by Eric Blake. */
20 
21 /*
22  * ISO C 99 <wchar.h> for platforms that have issues.
23  * <http://www.opengroup.org/susv3xbd/wchar.h.html>
24  *
25  * For now, this just ensures proper prerequisite inclusion order and
26  * the declaration of wcwidth().
27  */
28 
29 #if __GNUC__ >= 3
30 #pragma GCC system_header
31 #endif
32 
33 
34 #if (((defined __need_mbstate_t || defined __need_wint_t) \
35  && !defined __MINGW32__ && !defined __KLIBC__) \
36  || (defined __hpux \
37  && ((defined _INTTYPES_INCLUDED && !defined strtoimax) \
38  || defined _GL_JUST_INCLUDE_SYSTEM_WCHAR_H)) \
39  || (defined __MINGW32__ && defined __STRING_H_SOURCED__) \
40  || defined _GL_ALREADY_INCLUDING_WCHAR_H)
41 /* Special invocation convention:
42  - Inside glibc and uClibc header files, but not MinGW.
43  - On HP-UX 11.00 we have a sequence of nested includes
44  <wchar.h> -> <stdlib.h> -> <stdint.h>, and the latter includes <wchar.h>,
45  once indirectly <stdint.h> -> <sys/types.h> -> <inttypes.h> -> <wchar.h>
46  and once directly. In both situations 'wint_t' is not yet defined,
47  therefore we cannot provide the function overrides; instead include only
48  the system's <wchar.h>.
49  - With MinGW 3.22, when <string.h> includes <wchar.h>, only some part of
50  <wchar.h> is actually processed, and that doesn't include 'mbstate_t'.
51  - On IRIX 6.5, similarly, we have an include <wchar.h> -> <wctype.h>, and
52  the latter includes <wchar.h>. But here, we have no way to detect whether
53  <wctype.h> is completely included or is still being included. */
54 
55 #include_next <wchar.h>
56 
57 #else
58 /* Normal invocation convention. */
59 
60 #ifndef _GL_WCHAR_H
61 
62 #define _GL_ALREADY_INCLUDING_WCHAR_H
63 
64 #if 1
65 # include <features.h> /* for __GLIBC__ */
66 #endif
67 
68 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
69  <wchar.h>.
70  BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
71  included before <wchar.h>.
72  In some builds of uClibc, <wchar.h> is nonexistent and wchar_t is defined
73  by <stddef.h>.
74  But avoid namespace pollution on glibc systems. */
75 #if !(defined __GLIBC__ && !defined __UCLIBC__)
76 # include <stddef.h>
77 #endif
78 #ifndef __GLIBC__
79 # include <stdio.h>
80 # include <time.h>
81 #endif
82 
83 /* Include the original <wchar.h> if it exists.
84  Some builds of uClibc lack it. */
85 /* The include_next requires a split double-inclusion guard. */
86 #if 1
87 # include_next <wchar.h>
88 #endif
89 
90 #undef _GL_ALREADY_INCLUDING_WCHAR_H
91 
92 #ifndef _GL_WCHAR_H
93 #define _GL_WCHAR_H
94 
95 /* The __attribute__ feature is available in gcc versions 2.5 and later.
96  The attribute __pure__ was added in gcc 2.96. */
97 #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
98 # define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
99 #else
100 # define _GL_ATTRIBUTE_PURE /* empty */
101 #endif
102 
103 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
104 #ifndef _GL_CXXDEFS_H
105 #define _GL_CXXDEFS_H
106 
107 /* Begin/end the GNULIB_NAMESPACE namespace. */
108 #if defined __cplusplus && defined GNULIB_NAMESPACE
109 # define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE {
110 # define _GL_END_NAMESPACE }
111 #else
112 # define _GL_BEGIN_NAMESPACE
113 # define _GL_END_NAMESPACE
114 #endif
115 
116 /* The three most frequent use cases of these macros are:
117 
118  * For providing a substitute for a function that is missing on some
119  platforms, but is declared and works fine on the platforms on which
120  it exists:
121 
122  #if @GNULIB_FOO@
123  # if !@HAVE_FOO@
124  _GL_FUNCDECL_SYS (foo, ...);
125  # endif
126  _GL_CXXALIAS_SYS (foo, ...);
127  _GL_CXXALIASWARN (foo);
128  #elif defined GNULIB_POSIXCHECK
129  ...
130  #endif
131 
132  * For providing a replacement for a function that exists on all platforms,
133  but is broken/insufficient and needs to be replaced on some platforms:
134 
135  #if @GNULIB_FOO@
136  # if @REPLACE_FOO@
137  # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
138  # undef foo
139  # define foo rpl_foo
140  # endif
141  _GL_FUNCDECL_RPL (foo, ...);
142  _GL_CXXALIAS_RPL (foo, ...);
143  # else
144  _GL_CXXALIAS_SYS (foo, ...);
145  # endif
146  _GL_CXXALIASWARN (foo);
147  #elif defined GNULIB_POSIXCHECK
148  ...
149  #endif
150 
151  * For providing a replacement for a function that exists on some platforms
152  but is broken/insufficient and needs to be replaced on some of them and
153  is additionally either missing or undeclared on some other platforms:
154 
155  #if @GNULIB_FOO@
156  # if @REPLACE_FOO@
157  # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
158  # undef foo
159  # define foo rpl_foo
160  # endif
161  _GL_FUNCDECL_RPL (foo, ...);
162  _GL_CXXALIAS_RPL (foo, ...);
163  # else
164  # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@
165  _GL_FUNCDECL_SYS (foo, ...);
166  # endif
167  _GL_CXXALIAS_SYS (foo, ...);
168  # endif
169  _GL_CXXALIASWARN (foo);
170  #elif defined GNULIB_POSIXCHECK
171  ...
172  #endif
173 */
174 
175 /* _GL_EXTERN_C declaration;
176  performs the declaration with C linkage. */
177 #if defined __cplusplus
178 # define _GL_EXTERN_C extern "C"
179 #else
180 # define _GL_EXTERN_C extern
181 #endif
182 
183 /* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes);
184  declares a replacement function, named rpl_func, with the given prototype,
185  consisting of return type, parameters, and attributes.
186  Example:
187  _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...)
188  _GL_ARG_NONNULL ((1)));
189  */
190 #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \
191  _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes)
192 #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \
193  _GL_EXTERN_C rettype rpl_func parameters_and_attributes
194 
195 /* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes);
196  declares the system function, named func, with the given prototype,
197  consisting of return type, parameters, and attributes.
198  Example:
199  _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...)
200  _GL_ARG_NONNULL ((1)));
201  */
202 #define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \
203  _GL_EXTERN_C rettype func parameters_and_attributes
204 
205 /* _GL_CXXALIAS_RPL (func, rettype, parameters);
206  declares a C++ alias called GNULIB_NAMESPACE::func
207  that redirects to rpl_func, if GNULIB_NAMESPACE is defined.
208  Example:
209  _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...));
210 
211  Wrapping rpl_func in an object with an inline conversion operator
212  avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is
213  actually used in the program. */
214 #define _GL_CXXALIAS_RPL(func,rettype,parameters) \
215  _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters)
216 #if defined __cplusplus && defined GNULIB_NAMESPACE
217 # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
218  namespace GNULIB_NAMESPACE \
219  { \
220  static const struct _gl_ ## func ## _wrapper \
221  { \
222  typedef rettype (*type) parameters; \
223  inline type rpl () const { return ::rpl_func; } \
224  inline operator type () const { return rpl (); } \
225  } func = {}; \
226  } \
227  _GL_EXTERN_C int _gl_cxxalias_dummy
228 #else
229 # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
230  _GL_EXTERN_C int _gl_cxxalias_dummy
231 #endif
232 
233 /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters);
234  is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters);
235  except that the C function rpl_func may have a slightly different
236  declaration. A cast is used to silence the "invalid conversion" error
237  that would otherwise occur. */
238 #if defined __cplusplus && defined GNULIB_NAMESPACE
239 # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
240  namespace GNULIB_NAMESPACE \
241  { \
242  static const struct _gl_ ## func ## _wrapper \
243  { \
244  typedef rettype (*type) parameters; \
245  inline type rpl () const \
246  { return reinterpret_cast<type>(::rpl_func); } \
247  inline operator type () const { return rpl (); } \
248  } func = {}; \
249  } \
250  _GL_EXTERN_C int _gl_cxxalias_dummy
251 #else
252 # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
253  _GL_EXTERN_C int _gl_cxxalias_dummy
254 #endif
255 
256 /* _GL_CXXALIAS_SYS (func, rettype, parameters);
257  declares a C++ alias called GNULIB_NAMESPACE::func
258  that redirects to the system provided function func, if GNULIB_NAMESPACE
259  is defined.
260  Example:
261  _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...));
262 
263  Wrapping func in an object with an inline conversion operator
264  avoids a reference to func unless GNULIB_NAMESPACE::func is
265  actually used in the program. */
266 #if defined __cplusplus && defined GNULIB_NAMESPACE
267 # define _GL_CXXALIAS_SYS(func,rettype,parameters) \
268  namespace GNULIB_NAMESPACE \
269  { \
270  static const struct _gl_ ## func ## _wrapper \
271  { \
272  typedef rettype (*type) parameters; \
273  inline type rpl () const { return ::func; } \
274  inline operator type () const { return rpl (); } \
275  } func = {}; \
276  } \
277  _GL_EXTERN_C int _gl_cxxalias_dummy
278 #else
279 # define _GL_CXXALIAS_SYS(func,rettype,parameters) \
280  _GL_EXTERN_C int _gl_cxxalias_dummy
281 #endif
282 
283 /* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters);
284  is like _GL_CXXALIAS_SYS (func, rettype, parameters);
285  except that the C function func may have a slightly different declaration.
286  A cast is used to silence the "invalid conversion" error that would
287  otherwise occur. */
288 #if defined __cplusplus && defined GNULIB_NAMESPACE
289 # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
290  namespace GNULIB_NAMESPACE \
291  { \
292  static const struct _gl_ ## func ## _wrapper \
293  { \
294  typedef rettype (*type) parameters; \
295  inline type rpl () const \
296  { return reinterpret_cast<type>(::func); } \
297  inline operator type () const { return rpl (); }\
298  } func = {}; \
299  } \
300  _GL_EXTERN_C int _gl_cxxalias_dummy
301 #else
302 # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
303  _GL_EXTERN_C int _gl_cxxalias_dummy
304 #endif
305 
306 /* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2);
307  is like _GL_CXXALIAS_SYS (func, rettype, parameters);
308  except that the C function is picked among a set of overloaded functions,
309  namely the one with rettype2 and parameters2. Two consecutive casts
310  are used to silence the "cannot find a match" and "invalid conversion"
311  errors that would otherwise occur. */
312 #if defined __cplusplus && defined GNULIB_NAMESPACE
313  /* The outer cast must be a reinterpret_cast.
314  The inner cast: When the function is defined as a set of overloaded
315  functions, it works as a static_cast<>, choosing the designated variant.
316  When the function is defined as a single variant, it works as a
317  reinterpret_cast<>. The parenthesized cast syntax works both ways. */
318 # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
319  namespace GNULIB_NAMESPACE \
320  { \
321  static const struct _gl_ ## func ## _wrapper \
322  { \
323  typedef rettype (*type) parameters; \
324  \
325  inline type rpl () const \
326  { return reinterpret_cast<type>((rettype2 (*) parameters2)(::func)); }\
327  \
328  inline operator type () const { return rpl (); } \
329  } func = {}; \
330  } \
331  _GL_EXTERN_C int _gl_cxxalias_dummy
332 #else
333 # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
334  _GL_EXTERN_C int _gl_cxxalias_dummy
335 #endif
336 
337 /* _GL_CXXALIASWARN (func);
338  causes a warning to be emitted when ::func is used but not when
339  GNULIB_NAMESPACE::func is used. func must be defined without overloaded
340  variants. */
341 #if defined __cplusplus && defined GNULIB_NAMESPACE
342 # define _GL_CXXALIASWARN(func) \
343  _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE)
344 # define _GL_CXXALIASWARN_1(func,namespace) \
345  _GL_CXXALIASWARN_2 (func, namespace)
346 /* To work around GCC bug <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
347  we enable the warning only when not optimizing. */
348 # if !__OPTIMIZE__
349 # define _GL_CXXALIASWARN_2(func,namespace) \
350  _GL_WARN_ON_USE (func, \
351  "The symbol ::" #func " refers to the system function. " \
352  "Use " #namespace "::" #func " instead.")
353 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
354 # define _GL_CXXALIASWARN_2(func,namespace) \
355  extern __typeof__ (func) func
356 # else
357 # define _GL_CXXALIASWARN_2(func,namespace) \
358  _GL_EXTERN_C int _gl_cxxalias_dummy
359 # endif
360 #else
361 # define _GL_CXXALIASWARN(func) \
362  _GL_EXTERN_C int _gl_cxxalias_dummy
363 #endif
364 
365 /* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes);
366  causes a warning to be emitted when the given overloaded variant of ::func
367  is used but not when GNULIB_NAMESPACE::func is used. */
368 #if defined __cplusplus && defined GNULIB_NAMESPACE
369 # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
370  _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \
371  GNULIB_NAMESPACE)
372 # define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \
373  _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace)
374 /* To work around GCC bug <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
375  we enable the warning only when not optimizing. */
376 # if !__OPTIMIZE__
377 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
378  _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \
379  "The symbol ::" #func " refers to the system function. " \
380  "Use " #namespace "::" #func " instead.")
381 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
382 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
383  extern __typeof__ (func) func
384 # else
385 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
386  _GL_EXTERN_C int _gl_cxxalias_dummy
387 # endif
388 #else
389 # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
390  _GL_EXTERN_C int _gl_cxxalias_dummy
391 #endif
392 
393 #endif /* _GL_CXXDEFS_H */
394 
395 /* The definition of _GL_ARG_NONNULL is copied here. */
396 /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools
397  that the values passed as arguments n, ..., m must be non-NULL pointers.
398  n = 1 stands for the first argument, n = 2 for the second argument etc. */
399 #ifndef _GL_ARG_NONNULL
400 # if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3
401 # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params))
402 # else
403 # define _GL_ARG_NONNULL(params)
404 # endif
405 #endif
406 
407 /* The definition of _GL_WARN_ON_USE is copied here. */
408 #ifndef _GL_WARN_ON_USE
409 
410 # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
411 /* A compiler attribute is available in gcc versions 4.3.0 and later. */
412 # define _GL_WARN_ON_USE(function, message) \
413 extern __typeof__ (function) function __attribute__ ((__warning__ (message)))
414 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
415 /* Verify the existence of the function. */
416 # define _GL_WARN_ON_USE(function, message) \
417 extern __typeof__ (function) function
418 # else /* Unsupported. */
419 # define _GL_WARN_ON_USE(function, message) \
420 _GL_WARN_EXTERN_C int _gl_warn_on_use
421 # endif
422 #endif
423 
424 /* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string")
425  is like _GL_WARN_ON_USE (function, "string"), except that the function is
426  declared with the given prototype, consisting of return type, parameters,
427  and attributes.
428  This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does
429  not work in this case. */
430 #ifndef _GL_WARN_ON_USE_CXX
431 # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
432 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
433 extern rettype function parameters_and_attributes \
434  __attribute__ ((__warning__ (msg)))
435 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
436 /* Verify the existence of the function. */
437 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
438 extern rettype function parameters_and_attributes
439 # else /* Unsupported. */
440 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
441 _GL_WARN_EXTERN_C int _gl_warn_on_use
442 # endif
443 #endif
444 
445 /* _GL_WARN_EXTERN_C declaration;
446  performs the declaration with C linkage. */
447 #ifndef _GL_WARN_EXTERN_C
448 # if defined __cplusplus
449 # define _GL_WARN_EXTERN_C extern "C"
450 # else
451 # define _GL_WARN_EXTERN_C extern
452 # endif
453 #endif
454 
455 
456 /* Define wint_t and WEOF. (Also done in wctype.in.h.) */
457 #if !1 && !defined wint_t
458 # define wint_t int
459 # ifndef WEOF
460 # define WEOF -1
461 # endif
462 #else
463 /* MSVC defines wint_t as 'unsigned short' in <crtdefs.h>.
464  This is too small: ISO C 99 section 7.24.1.(2) says that wint_t must be
465  "unchanged by default argument promotions". Override it. */
466 # if defined _MSC_VER
467 # if !GNULIB_defined_wint_t
468 # include <crtdefs.h>
469 typedef unsigned int rpl_wint_t;
470 # undef wint_t
471 # define wint_t rpl_wint_t
472 # define GNULIB_defined_wint_t 1
473 # endif
474 # endif
475 # ifndef WEOF
476 # define WEOF ((wint_t) -1)
477 # endif
478 #endif
479 
480 
481 /* Override mbstate_t if it is too small.
482  On IRIX 6.5, sizeof (mbstate_t) == 1, which is not sufficient for
483  implementing mbrtowc for encodings like UTF-8. */
484 #if !(1 && 1) || 0
485 # if !GNULIB_defined_mbstate_t
486 typedef int rpl_mbstate_t;
487 # undef mbstate_t
488 # define mbstate_t rpl_mbstate_t
489 # define GNULIB_defined_mbstate_t 1
490 # endif
491 #endif
492 
493 
494 /* Convert a single-byte character to a wide character. */
495 #if 0
496 # if 0
497 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
498 # undef btowc
499 # define btowc rpl_btowc
500 # endif
501 _GL_FUNCDECL_RPL (btowc, wint_t, (int c) _GL_ATTRIBUTE_PURE);
502 _GL_CXXALIAS_RPL (btowc, wint_t, (int c));
503 # else
504 # if !1
505 _GL_FUNCDECL_SYS (btowc, wint_t, (int c) _GL_ATTRIBUTE_PURE);
506 # endif
507 _GL_CXXALIAS_SYS (btowc, wint_t, (int c));
508 # endif
509 _GL_CXXALIASWARN (btowc);
510 #elif defined GNULIB_POSIXCHECK
511 # undef btowc
512 # if HAVE_RAW_DECL_BTOWC
513 _GL_WARN_ON_USE (btowc, "btowc is unportable - "
514  "use gnulib module btowc for portability");
515 # endif
516 #endif
517 
518 
519 /* Convert a wide character to a single-byte character. */
520 #if 0
521 # if 0
522 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
523 # undef wctob
524 # define wctob rpl_wctob
525 # endif
526 _GL_FUNCDECL_RPL (wctob, int, (wint_t wc) _GL_ATTRIBUTE_PURE);
527 _GL_CXXALIAS_RPL (wctob, int, (wint_t wc));
528 # else
529 # if !defined wctob && !1
530 /* wctob is provided by gnulib, or wctob exists but is not declared. */
531 _GL_FUNCDECL_SYS (wctob, int, (wint_t wc) _GL_ATTRIBUTE_PURE);
532 # endif
533 _GL_CXXALIAS_SYS (wctob, int, (wint_t wc));
534 # endif
535 _GL_CXXALIASWARN (wctob);
536 #elif defined GNULIB_POSIXCHECK
537 # undef wctob
538 # if HAVE_RAW_DECL_WCTOB
539 _GL_WARN_ON_USE (wctob, "wctob is unportable - "
540  "use gnulib module wctob for portability");
541 # endif
542 #endif
543 
544 
545 /* Test whether *PS is in the initial state. */
546 #if 1
547 # if 0
548 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
549 # undef mbsinit
550 # define mbsinit rpl_mbsinit
551 # endif
552 _GL_FUNCDECL_RPL (mbsinit, int, (const mbstate_t *ps));
553 _GL_CXXALIAS_RPL (mbsinit, int, (const mbstate_t *ps));
554 # else
555 # if !1
556 _GL_FUNCDECL_SYS (mbsinit, int, (const mbstate_t *ps));
557 # endif
558 _GL_CXXALIAS_SYS (mbsinit, int, (const mbstate_t *ps));
559 # endif
560 _GL_CXXALIASWARN (mbsinit);
561 #elif defined GNULIB_POSIXCHECK
562 # undef mbsinit
563 # if HAVE_RAW_DECL_MBSINIT
564 _GL_WARN_ON_USE (mbsinit, "mbsinit is unportable - "
565  "use gnulib module mbsinit for portability");
566 # endif
567 #endif
568 
569 
570 /* Convert a multibyte character to a wide character. */
571 #if 1
572 # if 1
573 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
574 # undef mbrtowc
575 # define mbrtowc rpl_mbrtowc
576 # endif
577 _GL_FUNCDECL_RPL (mbrtowc, size_t,
578  (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps));
579 _GL_CXXALIAS_RPL (mbrtowc, size_t,
580  (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps));
581 # else
582 # if !1
583 _GL_FUNCDECL_SYS (mbrtowc, size_t,
584  (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps));
585 # endif
586 _GL_CXXALIAS_SYS (mbrtowc, size_t,
587  (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps));
588 # endif
590 #elif defined GNULIB_POSIXCHECK
591 # undef mbrtowc
592 # if HAVE_RAW_DECL_MBRTOWC
593 _GL_WARN_ON_USE (mbrtowc, "mbrtowc is unportable - "
594  "use gnulib module mbrtowc for portability");
595 # endif
596 #endif
597 
598 
599 /* Recognize a multibyte character. */
600 #if 0
601 # if 0
602 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
603 # undef mbrlen
604 # define mbrlen rpl_mbrlen
605 # endif
606 _GL_FUNCDECL_RPL (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps));
607 _GL_CXXALIAS_RPL (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps));
608 # else
609 # if !1
610 _GL_FUNCDECL_SYS (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps));
611 # endif
612 _GL_CXXALIAS_SYS (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps));
613 # endif
614 _GL_CXXALIASWARN (mbrlen);
615 #elif defined GNULIB_POSIXCHECK
616 # undef mbrlen
617 # if HAVE_RAW_DECL_MBRLEN
618 _GL_WARN_ON_USE (mbrlen, "mbrlen is unportable - "
619  "use gnulib module mbrlen for portability");
620 # endif
621 #endif
622 
623 
624 /* Convert a string to a wide string. */
625 #if 1
626 # if 0
627 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
628 # undef mbsrtowcs
629 # define mbsrtowcs rpl_mbsrtowcs
630 # endif
631 _GL_FUNCDECL_RPL (mbsrtowcs, size_t,
632  (wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps)
633  _GL_ARG_NONNULL ((2)));
634 _GL_CXXALIAS_RPL (mbsrtowcs, size_t,
635  (wchar_t *dest, const char **srcp, size_t len,
636  mbstate_t *ps));
637 # else
638 # if !1
639 _GL_FUNCDECL_SYS (mbsrtowcs, size_t,
640  (wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps)
641  _GL_ARG_NONNULL ((2)));
642 # endif
643 _GL_CXXALIAS_SYS (mbsrtowcs, size_t,
644  (wchar_t *dest, const char **srcp, size_t len,
645  mbstate_t *ps));
646 # endif
647 _GL_CXXALIASWARN (mbsrtowcs);
648 #elif defined GNULIB_POSIXCHECK
649 # undef mbsrtowcs
650 # if HAVE_RAW_DECL_MBSRTOWCS
651 _GL_WARN_ON_USE (mbsrtowcs, "mbsrtowcs is unportable - "
652  "use gnulib module mbsrtowcs for portability");
653 # endif
654 #endif
655 
656 
657 /* Convert a string to a wide string. */
658 #if 0
659 # if 0
660 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
661 # undef mbsnrtowcs
662 # define mbsnrtowcs rpl_mbsnrtowcs
663 # endif
664 _GL_FUNCDECL_RPL (mbsnrtowcs, size_t,
665  (wchar_t *dest, const char **srcp, size_t srclen, size_t len,
666  mbstate_t *ps)
667  _GL_ARG_NONNULL ((2)));
668 _GL_CXXALIAS_RPL (mbsnrtowcs, size_t,
669  (wchar_t *dest, const char **srcp, size_t srclen, size_t len,
670  mbstate_t *ps));
671 # else
672 # if !1
673 _GL_FUNCDECL_SYS (mbsnrtowcs, size_t,
674  (wchar_t *dest, const char **srcp, size_t srclen, size_t len,
675  mbstate_t *ps)
676  _GL_ARG_NONNULL ((2)));
677 # endif
678 _GL_CXXALIAS_SYS (mbsnrtowcs, size_t,
679  (wchar_t *dest, const char **srcp, size_t srclen, size_t len,
680  mbstate_t *ps));
681 # endif
682 _GL_CXXALIASWARN (mbsnrtowcs);
683 #elif defined GNULIB_POSIXCHECK
684 # undef mbsnrtowcs
685 # if HAVE_RAW_DECL_MBSNRTOWCS
686 _GL_WARN_ON_USE (mbsnrtowcs, "mbsnrtowcs is unportable - "
687  "use gnulib module mbsnrtowcs for portability");
688 # endif
689 #endif
690 
691 
692 /* Convert a wide character to a multibyte character. */
693 #if 0
694 # if 0
695 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
696 # undef wcrtomb
697 # define wcrtomb rpl_wcrtomb
698 # endif
699 _GL_FUNCDECL_RPL (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps));
700 _GL_CXXALIAS_RPL (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps));
701 # else
702 # if !1
703 _GL_FUNCDECL_SYS (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps));
704 # endif
705 _GL_CXXALIAS_SYS (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps));
706 # endif
707 _GL_CXXALIASWARN (wcrtomb);
708 #elif defined GNULIB_POSIXCHECK
709 # undef wcrtomb
710 # if HAVE_RAW_DECL_WCRTOMB
711 _GL_WARN_ON_USE (wcrtomb, "wcrtomb is unportable - "
712  "use gnulib module wcrtomb for portability");
713 # endif
714 #endif
715 
716 
717 /* Convert a wide string to a string. */
718 #if 0
719 # if 0
720 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
721 # undef wcsrtombs
722 # define wcsrtombs rpl_wcsrtombs
723 # endif
724 _GL_FUNCDECL_RPL (wcsrtombs, size_t,
725  (char *dest, const wchar_t **srcp, size_t len, mbstate_t *ps)
726  _GL_ARG_NONNULL ((2)));
727 _GL_CXXALIAS_RPL (wcsrtombs, size_t,
728  (char *dest, const wchar_t **srcp, size_t len,
729  mbstate_t *ps));
730 # else
731 # if !1
732 _GL_FUNCDECL_SYS (wcsrtombs, size_t,
733  (char *dest, const wchar_t **srcp, size_t len, mbstate_t *ps)
734  _GL_ARG_NONNULL ((2)));
735 # endif
736 _GL_CXXALIAS_SYS (wcsrtombs, size_t,
737  (char *dest, const wchar_t **srcp, size_t len,
738  mbstate_t *ps));
739 # endif
740 _GL_CXXALIASWARN (wcsrtombs);
741 #elif defined GNULIB_POSIXCHECK
742 # undef wcsrtombs
743 # if HAVE_RAW_DECL_WCSRTOMBS
744 _GL_WARN_ON_USE (wcsrtombs, "wcsrtombs is unportable - "
745  "use gnulib module wcsrtombs for portability");
746 # endif
747 #endif
748 
749 
750 /* Convert a wide string to a string. */
751 #if 0
752 # if 0
753 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
754 # undef wcsnrtombs
755 # define wcsnrtombs rpl_wcsnrtombs
756 # endif
757 _GL_FUNCDECL_RPL (wcsnrtombs, size_t,
758  (char *dest, const wchar_t **srcp, size_t srclen, size_t len,
759  mbstate_t *ps)
760  _GL_ARG_NONNULL ((2)));
761 _GL_CXXALIAS_RPL (wcsnrtombs, size_t,
762  (char *dest, const wchar_t **srcp, size_t srclen, size_t len,
763  mbstate_t *ps));
764 # else
765 # if !1
766 _GL_FUNCDECL_SYS (wcsnrtombs, size_t,
767  (char *dest, const wchar_t **srcp, size_t srclen, size_t len,
768  mbstate_t *ps)
769  _GL_ARG_NONNULL ((2)));
770 # endif
771 _GL_CXXALIAS_SYS (wcsnrtombs, size_t,
772  (char *dest, const wchar_t **srcp, size_t srclen, size_t len,
773  mbstate_t *ps));
774 # endif
775 _GL_CXXALIASWARN (wcsnrtombs);
776 #elif defined GNULIB_POSIXCHECK
777 # undef wcsnrtombs
778 # if HAVE_RAW_DECL_WCSNRTOMBS
779 _GL_WARN_ON_USE (wcsnrtombs, "wcsnrtombs is unportable - "
780  "use gnulib module wcsnrtombs for portability");
781 # endif
782 #endif
783 
784 
785 /* Return the number of screen columns needed for WC. */
786 #if 0
787 # if 0
788 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
789 # undef wcwidth
790 # define wcwidth rpl_wcwidth
791 # endif
792 _GL_FUNCDECL_RPL (wcwidth, int, (wchar_t) _GL_ATTRIBUTE_PURE);
793 _GL_CXXALIAS_RPL (wcwidth, int, (wchar_t));
794 # else
795 # if !1
796 /* wcwidth exists but is not declared. */
797 _GL_FUNCDECL_SYS (wcwidth, int, (wchar_t) _GL_ATTRIBUTE_PURE);
798 # elif defined __KLIBC__
799 /* On OS/2 kLIBC, wcwidth is a macro that expands to the name of a
800  static inline function. The implementation of wcwidth in wcwidth.c
801  causes a "conflicting types" error. */
802 # undef wcwidth
803 # endif
804 _GL_CXXALIAS_SYS (wcwidth, int, (wchar_t));
805 # endif
806 _GL_CXXALIASWARN (wcwidth);
807 #elif defined GNULIB_POSIXCHECK
808 # undef wcwidth
809 # if HAVE_RAW_DECL_WCWIDTH
810 _GL_WARN_ON_USE (wcwidth, "wcwidth is unportable - "
811  "use gnulib module wcwidth for portability");
812 # endif
813 #endif
814 
815 
816 /* Search N wide characters of S for C. */
817 #if 0
818 # if !1
819 _GL_FUNCDECL_SYS (wmemchr, wchar_t *, (const wchar_t *s, wchar_t c, size_t n)
821 # endif
822  /* On some systems, this function is defined as an overloaded function:
823  extern "C++" {
824  const wchar_t * std::wmemchr (const wchar_t *, wchar_t, size_t);
825  wchar_t * std::wmemchr (wchar_t *, wchar_t, size_t);
826  } */
827 _GL_CXXALIAS_SYS_CAST2 (wmemchr,
828  wchar_t *, (const wchar_t *, wchar_t, size_t),
829  const wchar_t *, (const wchar_t *, wchar_t, size_t));
830 # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
831  && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
832 _GL_CXXALIASWARN1 (wmemchr, wchar_t *, (wchar_t *s, wchar_t c, size_t n));
833 _GL_CXXALIASWARN1 (wmemchr, const wchar_t *,
834  (const wchar_t *s, wchar_t c, size_t n));
835 # else
836 _GL_CXXALIASWARN (wmemchr);
837 # endif
838 #elif defined GNULIB_POSIXCHECK
839 # undef wmemchr
840 # if HAVE_RAW_DECL_WMEMCHR
841 _GL_WARN_ON_USE (wmemchr, "wmemchr is unportable - "
842  "use gnulib module wmemchr for portability");
843 # endif
844 #endif
845 
846 
847 /* Compare N wide characters of S1 and S2. */
848 #if 0
849 # if !1
850 _GL_FUNCDECL_SYS (wmemcmp, int,
851  (const wchar_t *s1, const wchar_t *s2, size_t n)
853 # endif
854 _GL_CXXALIAS_SYS (wmemcmp, int,
855  (const wchar_t *s1, const wchar_t *s2, size_t n));
856 _GL_CXXALIASWARN (wmemcmp);
857 #elif defined GNULIB_POSIXCHECK
858 # undef wmemcmp
859 # if HAVE_RAW_DECL_WMEMCMP
860 _GL_WARN_ON_USE (wmemcmp, "wmemcmp is unportable - "
861  "use gnulib module wmemcmp for portability");
862 # endif
863 #endif
864 
865 
866 /* Copy N wide characters of SRC to DEST. */
867 #if 0
868 # if !1
869 _GL_FUNCDECL_SYS (wmemcpy, wchar_t *,
870  (wchar_t *dest, const wchar_t *src, size_t n));
871 # endif
872 _GL_CXXALIAS_SYS (wmemcpy, wchar_t *,
873  (wchar_t *dest, const wchar_t *src, size_t n));
874 _GL_CXXALIASWARN (wmemcpy);
875 #elif defined GNULIB_POSIXCHECK
876 # undef wmemcpy
877 # if HAVE_RAW_DECL_WMEMCPY
878 _GL_WARN_ON_USE (wmemcpy, "wmemcpy is unportable - "
879  "use gnulib module wmemcpy for portability");
880 # endif
881 #endif
882 
883 
884 /* Copy N wide characters of SRC to DEST, guaranteeing correct behavior for
885  overlapping memory areas. */
886 #if 0
887 # if !1
888 _GL_FUNCDECL_SYS (wmemmove, wchar_t *,
889  (wchar_t *dest, const wchar_t *src, size_t n));
890 # endif
891 _GL_CXXALIAS_SYS (wmemmove, wchar_t *,
892  (wchar_t *dest, const wchar_t *src, size_t n));
893 _GL_CXXALIASWARN (wmemmove);
894 #elif defined GNULIB_POSIXCHECK
895 # undef wmemmove
896 # if HAVE_RAW_DECL_WMEMMOVE
897 _GL_WARN_ON_USE (wmemmove, "wmemmove is unportable - "
898  "use gnulib module wmemmove for portability");
899 # endif
900 #endif
901 
902 
903 /* Set N wide characters of S to C. */
904 #if 0
905 # if !1
906 _GL_FUNCDECL_SYS (wmemset, wchar_t *, (wchar_t *s, wchar_t c, size_t n));
907 # endif
908 _GL_CXXALIAS_SYS (wmemset, wchar_t *, (wchar_t *s, wchar_t c, size_t n));
909 _GL_CXXALIASWARN (wmemset);
910 #elif defined GNULIB_POSIXCHECK
911 # undef wmemset
912 # if HAVE_RAW_DECL_WMEMSET
913 _GL_WARN_ON_USE (wmemset, "wmemset is unportable - "
914  "use gnulib module wmemset for portability");
915 # endif
916 #endif
917 
918 
919 /* Return the number of wide characters in S. */
920 #if 0
921 # if !1
922 _GL_FUNCDECL_SYS (wcslen, size_t, (const wchar_t *s) _GL_ATTRIBUTE_PURE);
923 # endif
924 _GL_CXXALIAS_SYS (wcslen, size_t, (const wchar_t *s));
925 _GL_CXXALIASWARN (wcslen);
926 #elif defined GNULIB_POSIXCHECK
927 # undef wcslen
928 # if HAVE_RAW_DECL_WCSLEN
929 _GL_WARN_ON_USE (wcslen, "wcslen is unportable - "
930  "use gnulib module wcslen for portability");
931 # endif
932 #endif
933 
934 
935 /* Return the number of wide characters in S, but at most MAXLEN. */
936 #if 0
937 # if !1
938 _GL_FUNCDECL_SYS (wcsnlen, size_t, (const wchar_t *s, size_t maxlen)
940 # endif
941 _GL_CXXALIAS_SYS (wcsnlen, size_t, (const wchar_t *s, size_t maxlen));
942 _GL_CXXALIASWARN (wcsnlen);
943 #elif defined GNULIB_POSIXCHECK
944 # undef wcsnlen
945 # if HAVE_RAW_DECL_WCSNLEN
946 _GL_WARN_ON_USE (wcsnlen, "wcsnlen is unportable - "
947  "use gnulib module wcsnlen for portability");
948 # endif
949 #endif
950 
951 
952 /* Copy SRC to DEST. */
953 #if 0
954 # if !1
955 _GL_FUNCDECL_SYS (wcscpy, wchar_t *, (wchar_t *dest, const wchar_t *src));
956 # endif
957 _GL_CXXALIAS_SYS (wcscpy, wchar_t *, (wchar_t *dest, const wchar_t *src));
958 _GL_CXXALIASWARN (wcscpy);
959 #elif defined GNULIB_POSIXCHECK
960 # undef wcscpy
961 # if HAVE_RAW_DECL_WCSCPY
962 _GL_WARN_ON_USE (wcscpy, "wcscpy is unportable - "
963  "use gnulib module wcscpy for portability");
964 # endif
965 #endif
966 
967 
968 /* Copy SRC to DEST, returning the address of the terminating L'\0' in DEST. */
969 #if 0
970 # if !1
971 _GL_FUNCDECL_SYS (wcpcpy, wchar_t *, (wchar_t *dest, const wchar_t *src));
972 # endif
973 _GL_CXXALIAS_SYS (wcpcpy, wchar_t *, (wchar_t *dest, const wchar_t *src));
974 _GL_CXXALIASWARN (wcpcpy);
975 #elif defined GNULIB_POSIXCHECK
976 # undef wcpcpy
977 # if HAVE_RAW_DECL_WCPCPY
978 _GL_WARN_ON_USE (wcpcpy, "wcpcpy is unportable - "
979  "use gnulib module wcpcpy for portability");
980 # endif
981 #endif
982 
983 
984 /* Copy no more than N wide characters of SRC to DEST. */
985 #if 0
986 # if !1
987 _GL_FUNCDECL_SYS (wcsncpy, wchar_t *,
988  (wchar_t *dest, const wchar_t *src, size_t n));
989 # endif
990 _GL_CXXALIAS_SYS (wcsncpy, wchar_t *,
991  (wchar_t *dest, const wchar_t *src, size_t n));
992 _GL_CXXALIASWARN (wcsncpy);
993 #elif defined GNULIB_POSIXCHECK
994 # undef wcsncpy
995 # if HAVE_RAW_DECL_WCSNCPY
996 _GL_WARN_ON_USE (wcsncpy, "wcsncpy is unportable - "
997  "use gnulib module wcsncpy for portability");
998 # endif
999 #endif
1000 
1001 
1002 /* Copy no more than N characters of SRC to DEST, returning the address of
1003  the last character written into DEST. */
1004 #if 0
1005 # if !1
1006 _GL_FUNCDECL_SYS (wcpncpy, wchar_t *,
1007  (wchar_t *dest, const wchar_t *src, size_t n));
1008 # endif
1009 _GL_CXXALIAS_SYS (wcpncpy, wchar_t *,
1010  (wchar_t *dest, const wchar_t *src, size_t n));
1011 _GL_CXXALIASWARN (wcpncpy);
1012 #elif defined GNULIB_POSIXCHECK
1013 # undef wcpncpy
1014 # if HAVE_RAW_DECL_WCPNCPY
1015 _GL_WARN_ON_USE (wcpncpy, "wcpncpy is unportable - "
1016  "use gnulib module wcpncpy for portability");
1017 # endif
1018 #endif
1019 
1020 
1021 /* Append SRC onto DEST. */
1022 #if 0
1023 # if !1
1024 _GL_FUNCDECL_SYS (wcscat, wchar_t *, (wchar_t *dest, const wchar_t *src));
1025 # endif
1026 _GL_CXXALIAS_SYS (wcscat, wchar_t *, (wchar_t *dest, const wchar_t *src));
1027 _GL_CXXALIASWARN (wcscat);
1028 #elif defined GNULIB_POSIXCHECK
1029 # undef wcscat
1030 # if HAVE_RAW_DECL_WCSCAT
1031 _GL_WARN_ON_USE (wcscat, "wcscat is unportable - "
1032  "use gnulib module wcscat for portability");
1033 # endif
1034 #endif
1035 
1036 
1037 /* Append no more than N wide characters of SRC onto DEST. */
1038 #if 0
1039 # if !1
1040 _GL_FUNCDECL_SYS (wcsncat, wchar_t *,
1041  (wchar_t *dest, const wchar_t *src, size_t n));
1042 # endif
1043 _GL_CXXALIAS_SYS (wcsncat, wchar_t *,
1044  (wchar_t *dest, const wchar_t *src, size_t n));
1045 _GL_CXXALIASWARN (wcsncat);
1046 #elif defined GNULIB_POSIXCHECK
1047 # undef wcsncat
1048 # if HAVE_RAW_DECL_WCSNCAT
1049 _GL_WARN_ON_USE (wcsncat, "wcsncat is unportable - "
1050  "use gnulib module wcsncat for portability");
1051 # endif
1052 #endif
1053 
1054 
1055 /* Compare S1 and S2. */
1056 #if 0
1057 # if !1
1058 _GL_FUNCDECL_SYS (wcscmp, int, (const wchar_t *s1, const wchar_t *s2)
1060 # endif
1061 _GL_CXXALIAS_SYS (wcscmp, int, (const wchar_t *s1, const wchar_t *s2));
1062 _GL_CXXALIASWARN (wcscmp);
1063 #elif defined GNULIB_POSIXCHECK
1064 # undef wcscmp
1065 # if HAVE_RAW_DECL_WCSCMP
1066 _GL_WARN_ON_USE (wcscmp, "wcscmp is unportable - "
1067  "use gnulib module wcscmp for portability");
1068 # endif
1069 #endif
1070 
1071 
1072 /* Compare no more than N wide characters of S1 and S2. */
1073 #if 0
1074 # if !1
1075 _GL_FUNCDECL_SYS (wcsncmp, int,
1076  (const wchar_t *s1, const wchar_t *s2, size_t n)
1078 # endif
1079 _GL_CXXALIAS_SYS (wcsncmp, int,
1080  (const wchar_t *s1, const wchar_t *s2, size_t n));
1081 _GL_CXXALIASWARN (wcsncmp);
1082 #elif defined GNULIB_POSIXCHECK
1083 # undef wcsncmp
1084 # if HAVE_RAW_DECL_WCSNCMP
1085 _GL_WARN_ON_USE (wcsncmp, "wcsncmp is unportable - "
1086  "use gnulib module wcsncmp for portability");
1087 # endif
1088 #endif
1089 
1090 
1091 /* Compare S1 and S2, ignoring case. */
1092 #if 0
1093 # if !1
1094 _GL_FUNCDECL_SYS (wcscasecmp, int, (const wchar_t *s1, const wchar_t *s2)
1096 # endif
1097 _GL_CXXALIAS_SYS (wcscasecmp, int, (const wchar_t *s1, const wchar_t *s2));
1098 _GL_CXXALIASWARN (wcscasecmp);
1099 #elif defined GNULIB_POSIXCHECK
1100 # undef wcscasecmp
1101 # if HAVE_RAW_DECL_WCSCASECMP
1102 _GL_WARN_ON_USE (wcscasecmp, "wcscasecmp is unportable - "
1103  "use gnulib module wcscasecmp for portability");
1104 # endif
1105 #endif
1106 
1107 
1108 /* Compare no more than N chars of S1 and S2, ignoring case. */
1109 #if 0
1110 # if !1
1111 _GL_FUNCDECL_SYS (wcsncasecmp, int,
1112  (const wchar_t *s1, const wchar_t *s2, size_t n)
1114 # endif
1115 _GL_CXXALIAS_SYS (wcsncasecmp, int,
1116  (const wchar_t *s1, const wchar_t *s2, size_t n));
1117 _GL_CXXALIASWARN (wcsncasecmp);
1118 #elif defined GNULIB_POSIXCHECK
1119 # undef wcsncasecmp
1120 # if HAVE_RAW_DECL_WCSNCASECMP
1121 _GL_WARN_ON_USE (wcsncasecmp, "wcsncasecmp is unportable - "
1122  "use gnulib module wcsncasecmp for portability");
1123 # endif
1124 #endif
1125 
1126 
1127 /* Compare S1 and S2, both interpreted as appropriate to the LC_COLLATE
1128  category of the current locale. */
1129 #if 0
1130 # if !1
1131 _GL_FUNCDECL_SYS (wcscoll, int, (const wchar_t *s1, const wchar_t *s2));
1132 # endif
1133 _GL_CXXALIAS_SYS (wcscoll, int, (const wchar_t *s1, const wchar_t *s2));
1134 _GL_CXXALIASWARN (wcscoll);
1135 #elif defined GNULIB_POSIXCHECK
1136 # undef wcscoll
1137 # if HAVE_RAW_DECL_WCSCOLL
1138 _GL_WARN_ON_USE (wcscoll, "wcscoll is unportable - "
1139  "use gnulib module wcscoll for portability");
1140 # endif
1141 #endif
1142 
1143 
1144 /* Transform S2 into array pointed to by S1 such that if wcscmp is applied
1145  to two transformed strings the result is the as applying 'wcscoll' to the
1146  original strings. */
1147 #if 0
1148 # if !1
1149 _GL_FUNCDECL_SYS (wcsxfrm, size_t, (wchar_t *s1, const wchar_t *s2, size_t n));
1150 # endif
1151 _GL_CXXALIAS_SYS (wcsxfrm, size_t, (wchar_t *s1, const wchar_t *s2, size_t n));
1152 _GL_CXXALIASWARN (wcsxfrm);
1153 #elif defined GNULIB_POSIXCHECK
1154 # undef wcsxfrm
1155 # if HAVE_RAW_DECL_WCSXFRM
1156 _GL_WARN_ON_USE (wcsxfrm, "wcsxfrm is unportable - "
1157  "use gnulib module wcsxfrm for portability");
1158 # endif
1159 #endif
1160 
1161 
1162 /* Duplicate S, returning an identical malloc'd string. */
1163 #if 0
1164 # if !1
1165 _GL_FUNCDECL_SYS (wcsdup, wchar_t *, (const wchar_t *s));
1166 # endif
1167 _GL_CXXALIAS_SYS (wcsdup, wchar_t *, (const wchar_t *s));
1168 _GL_CXXALIASWARN (wcsdup);
1169 #elif defined GNULIB_POSIXCHECK
1170 # undef wcsdup
1171 # if HAVE_RAW_DECL_WCSDUP
1172 _GL_WARN_ON_USE (wcsdup, "wcsdup is unportable - "
1173  "use gnulib module wcsdup for portability");
1174 # endif
1175 #endif
1176 
1177 
1178 /* Find the first occurrence of WC in WCS. */
1179 #if 0
1180 # if !1
1181 _GL_FUNCDECL_SYS (wcschr, wchar_t *, (const wchar_t *wcs, wchar_t wc)
1183 # endif
1184  /* On some systems, this function is defined as an overloaded function:
1185  extern "C++" {
1186  const wchar_t * std::wcschr (const wchar_t *, wchar_t);
1187  wchar_t * std::wcschr (wchar_t *, wchar_t);
1188  } */
1189 _GL_CXXALIAS_SYS_CAST2 (wcschr,
1190  wchar_t *, (const wchar_t *, wchar_t),
1191  const wchar_t *, (const wchar_t *, wchar_t));
1192 # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
1193  && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
1194 _GL_CXXALIASWARN1 (wcschr, wchar_t *, (wchar_t *wcs, wchar_t wc));
1195 _GL_CXXALIASWARN1 (wcschr, const wchar_t *, (const wchar_t *wcs, wchar_t wc));
1196 # else
1197 _GL_CXXALIASWARN (wcschr);
1198 # endif
1199 #elif defined GNULIB_POSIXCHECK
1200 # undef wcschr
1201 # if HAVE_RAW_DECL_WCSCHR
1202 _GL_WARN_ON_USE (wcschr, "wcschr is unportable - "
1203  "use gnulib module wcschr for portability");
1204 # endif
1205 #endif
1206 
1207 
1208 /* Find the last occurrence of WC in WCS. */
1209 #if 0
1210 # if !1
1211 _GL_FUNCDECL_SYS (wcsrchr, wchar_t *, (const wchar_t *wcs, wchar_t wc)
1213 # endif
1214  /* On some systems, this function is defined as an overloaded function:
1215  extern "C++" {
1216  const wchar_t * std::wcsrchr (const wchar_t *, wchar_t);
1217  wchar_t * std::wcsrchr (wchar_t *, wchar_t);
1218  } */
1219 _GL_CXXALIAS_SYS_CAST2 (wcsrchr,
1220  wchar_t *, (const wchar_t *, wchar_t),
1221  const wchar_t *, (const wchar_t *, wchar_t));
1222 # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
1223  && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
1224 _GL_CXXALIASWARN1 (wcsrchr, wchar_t *, (wchar_t *wcs, wchar_t wc));
1225 _GL_CXXALIASWARN1 (wcsrchr, const wchar_t *, (const wchar_t *wcs, wchar_t wc));
1226 # else
1227 _GL_CXXALIASWARN (wcsrchr);
1228 # endif
1229 #elif defined GNULIB_POSIXCHECK
1230 # undef wcsrchr
1231 # if HAVE_RAW_DECL_WCSRCHR
1232 _GL_WARN_ON_USE (wcsrchr, "wcsrchr is unportable - "
1233  "use gnulib module wcsrchr for portability");
1234 # endif
1235 #endif
1236 
1237 
1238 /* Return the length of the initial segmet of WCS which consists entirely
1239  of wide characters not in REJECT. */
1240 #if 0
1241 # if !1
1242 _GL_FUNCDECL_SYS (wcscspn, size_t, (const wchar_t *wcs, const wchar_t *reject)
1244 # endif
1245 _GL_CXXALIAS_SYS (wcscspn, size_t, (const wchar_t *wcs, const wchar_t *reject));
1246 _GL_CXXALIASWARN (wcscspn);
1247 #elif defined GNULIB_POSIXCHECK
1248 # undef wcscspn
1249 # if HAVE_RAW_DECL_WCSCSPN
1250 _GL_WARN_ON_USE (wcscspn, "wcscspn is unportable - "
1251  "use gnulib module wcscspn for portability");
1252 # endif
1253 #endif
1254 
1255 
1256 /* Return the length of the initial segmet of WCS which consists entirely
1257  of wide characters in ACCEPT. */
1258 #if 0
1259 # if !1
1260 _GL_FUNCDECL_SYS (wcsspn, size_t, (const wchar_t *wcs, const wchar_t *accept)
1262 # endif
1263 _GL_CXXALIAS_SYS (wcsspn, size_t, (const wchar_t *wcs, const wchar_t *accept));
1264 _GL_CXXALIASWARN (wcsspn);
1265 #elif defined GNULIB_POSIXCHECK
1266 # undef wcsspn
1267 # if HAVE_RAW_DECL_WCSSPN
1268 _GL_WARN_ON_USE (wcsspn, "wcsspn is unportable - "
1269  "use gnulib module wcsspn for portability");
1270 # endif
1271 #endif
1272 
1273 
1274 /* Find the first occurrence in WCS of any character in ACCEPT. */
1275 #if 0
1276 # if !1
1277 _GL_FUNCDECL_SYS (wcspbrk, wchar_t *,
1278  (const wchar_t *wcs, const wchar_t *accept)
1280 # endif
1281  /* On some systems, this function is defined as an overloaded function:
1282  extern "C++" {
1283  const wchar_t * std::wcspbrk (const wchar_t *, const wchar_t *);
1284  wchar_t * std::wcspbrk (wchar_t *, const wchar_t *);
1285  } */
1286 _GL_CXXALIAS_SYS_CAST2 (wcspbrk,
1287  wchar_t *, (const wchar_t *, const wchar_t *),
1288  const wchar_t *, (const wchar_t *, const wchar_t *));
1289 # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
1290  && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
1291 _GL_CXXALIASWARN1 (wcspbrk, wchar_t *,
1292  (wchar_t *wcs, const wchar_t *accept));
1293 _GL_CXXALIASWARN1 (wcspbrk, const wchar_t *,
1294  (const wchar_t *wcs, const wchar_t *accept));
1295 # else
1296 _GL_CXXALIASWARN (wcspbrk);
1297 # endif
1298 #elif defined GNULIB_POSIXCHECK
1299 # undef wcspbrk
1300 # if HAVE_RAW_DECL_WCSPBRK
1301 _GL_WARN_ON_USE (wcspbrk, "wcspbrk is unportable - "
1302  "use gnulib module wcspbrk for portability");
1303 # endif
1304 #endif
1305 
1306 
1307 /* Find the first occurrence of NEEDLE in HAYSTACK. */
1308 #if 0
1309 # if !1
1310 _GL_FUNCDECL_SYS (wcsstr, wchar_t *,
1311  (const wchar_t *haystack, const wchar_t *needle)
1313 # endif
1314  /* On some systems, this function is defined as an overloaded function:
1315  extern "C++" {
1316  const wchar_t * std::wcsstr (const wchar_t *, const wchar_t *);
1317  wchar_t * std::wcsstr (wchar_t *, const wchar_t *);
1318  } */
1319 _GL_CXXALIAS_SYS_CAST2 (wcsstr,
1320  wchar_t *, (const wchar_t *, const wchar_t *),
1321  const wchar_t *, (const wchar_t *, const wchar_t *));
1322 # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
1323  && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
1324 _GL_CXXALIASWARN1 (wcsstr, wchar_t *,
1325  (wchar_t *haystack, const wchar_t *needle));
1326 _GL_CXXALIASWARN1 (wcsstr, const wchar_t *,
1327  (const wchar_t *haystack, const wchar_t *needle));
1328 # else
1329 _GL_CXXALIASWARN (wcsstr);
1330 # endif
1331 #elif defined GNULIB_POSIXCHECK
1332 # undef wcsstr
1333 # if HAVE_RAW_DECL_WCSSTR
1334 _GL_WARN_ON_USE (wcsstr, "wcsstr is unportable - "
1335  "use gnulib module wcsstr for portability");
1336 # endif
1337 #endif
1338 
1339 
1340 /* Divide WCS into tokens separated by characters in DELIM. */
1341 #if 0
1342 # if !1
1343 _GL_FUNCDECL_SYS (wcstok, wchar_t *,
1344  (wchar_t *wcs, const wchar_t *delim, wchar_t **ptr));
1345 # endif
1346 _GL_CXXALIAS_SYS (wcstok, wchar_t *,
1347  (wchar_t *wcs, const wchar_t *delim, wchar_t **ptr));
1348 _GL_CXXALIASWARN (wcstok);
1349 #elif defined GNULIB_POSIXCHECK
1350 # undef wcstok
1351 # if HAVE_RAW_DECL_WCSTOK
1352 _GL_WARN_ON_USE (wcstok, "wcstok is unportable - "
1353  "use gnulib module wcstok for portability");
1354 # endif
1355 #endif
1356 
1357 
1358 /* Determine number of column positions required for first N wide
1359  characters (or fewer if S ends before this) in S. */
1360 #if 0
1361 # if 0
1362 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1363 # undef wcswidth
1364 # define wcswidth rpl_wcswidth
1365 # endif
1366 _GL_FUNCDECL_RPL (wcswidth, int, (const wchar_t *s, size_t n)
1368 _GL_CXXALIAS_RPL (wcswidth, int, (const wchar_t *s, size_t n));
1369 # else
1370 # if !1
1371 _GL_FUNCDECL_SYS (wcswidth, int, (const wchar_t *s, size_t n)
1373 # endif
1374 _GL_CXXALIAS_SYS (wcswidth, int, (const wchar_t *s, size_t n));
1375 # endif
1376 _GL_CXXALIASWARN (wcswidth);
1377 #elif defined GNULIB_POSIXCHECK
1378 # undef wcswidth
1379 # if HAVE_RAW_DECL_WCSWIDTH
1380 _GL_WARN_ON_USE (wcswidth, "wcswidth is unportable - "
1381  "use gnulib module wcswidth for portability");
1382 # endif
1383 #endif
1384 
1385 
1386 #endif /* _GL_WCHAR_H */
1387 #endif /* _GL_WCHAR_H */
1388 #endif
_GL_CXXALIASWARN(mbsinit)
#define _GL_WARN_ON_USE(function, message)
Definition: dirent.h:383
_GL_CXXALIAS_RPL(mbrtowc, size_t,(wchar_t *pwc, const char *s, size_t n, mbstate_t *ps))
#define _GL_ARG_NONNULL(params)
Definition: arg-nonnull.h:8
#define _GL_CXXALIAS_SYS_CAST2(func, rettype, parameters, rettype2, parameters2)
Definition: c++defs.h:230
_GL_FUNCDECL_RPL(mbrtowc, size_t,(wchar_t *pwc, const char *s, size_t n, mbstate_t *ps))
_GL_CXXALIASWARN1(frexp, double,(double x, int *expptr))
#define _GL_ATTRIBUTE_PURE
Definition: wchar.h:100
#define _GL_FUNCDECL_SYS(func, rettype, parameters_and_attributes)
Definition: c++defs.h:99
_GL_CXXALIAS_SYS(mbsinit, int,(const mbstate_t *ps))
#define mbrtowc
Definition: wchar.h:575