dhcpd-pools  3.0
ISC dhcpd lease usage analyser
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-2017 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 <https://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__) \
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 /* C++ compatible function declaration macros.
105  Copyright (C) 2010-2017 Free Software Foundation, Inc.
106 
107  This program is free software: you can redistribute it and/or modify it
108  under the terms of the GNU General Public License as published
109  by the Free Software Foundation; either version 3 of the License, or
110  (at your option) any later version.
111 
112  This program is distributed in the hope that it will be useful,
113  but WITHOUT ANY WARRANTY; without even the implied warranty of
114  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
115  General Public License for more details.
116 
117  You should have received a copy of the GNU General Public License
118  along with this program. If not, see <https://www.gnu.org/licenses/>. */
119 
120 #ifndef _GL_CXXDEFS_H
121 #define _GL_CXXDEFS_H
122 
123 /* Begin/end the GNULIB_NAMESPACE namespace. */
124 #if defined __cplusplus && defined GNULIB_NAMESPACE
125 # define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE {
126 # define _GL_END_NAMESPACE }
127 #else
128 # define _GL_BEGIN_NAMESPACE
129 # define _GL_END_NAMESPACE
130 #endif
131 
132 /* The three most frequent use cases of these macros are:
133 
134  * For providing a substitute for a function that is missing on some
135  platforms, but is declared and works fine on the platforms on which
136  it exists:
137 
138  #if @GNULIB_FOO@
139  # if !@HAVE_FOO@
140  _GL_FUNCDECL_SYS (foo, ...);
141  # endif
142  _GL_CXXALIAS_SYS (foo, ...);
143  _GL_CXXALIASWARN (foo);
144  #elif defined GNULIB_POSIXCHECK
145  ...
146  #endif
147 
148  * For providing a replacement for a function that exists on all platforms,
149  but is broken/insufficient and needs to be replaced on some platforms:
150 
151  #if @GNULIB_FOO@
152  # if @REPLACE_FOO@
153  # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
154  # undef foo
155  # define foo rpl_foo
156  # endif
157  _GL_FUNCDECL_RPL (foo, ...);
158  _GL_CXXALIAS_RPL (foo, ...);
159  # else
160  _GL_CXXALIAS_SYS (foo, ...);
161  # endif
162  _GL_CXXALIASWARN (foo);
163  #elif defined GNULIB_POSIXCHECK
164  ...
165  #endif
166 
167  * For providing a replacement for a function that exists on some platforms
168  but is broken/insufficient and needs to be replaced on some of them and
169  is additionally either missing or undeclared on some other platforms:
170 
171  #if @GNULIB_FOO@
172  # if @REPLACE_FOO@
173  # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
174  # undef foo
175  # define foo rpl_foo
176  # endif
177  _GL_FUNCDECL_RPL (foo, ...);
178  _GL_CXXALIAS_RPL (foo, ...);
179  # else
180  # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@
181  _GL_FUNCDECL_SYS (foo, ...);
182  # endif
183  _GL_CXXALIAS_SYS (foo, ...);
184  # endif
185  _GL_CXXALIASWARN (foo);
186  #elif defined GNULIB_POSIXCHECK
187  ...
188  #endif
189 */
190 
191 /* _GL_EXTERN_C declaration;
192  performs the declaration with C linkage. */
193 #if defined __cplusplus
194 # define _GL_EXTERN_C extern "C"
195 #else
196 # define _GL_EXTERN_C extern
197 #endif
198 
199 /* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes);
200  declares a replacement function, named rpl_func, with the given prototype,
201  consisting of return type, parameters, and attributes.
202  Example:
203  _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...)
204  _GL_ARG_NONNULL ((1)));
205  */
206 #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \
207  _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes)
208 #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \
209  _GL_EXTERN_C rettype rpl_func parameters_and_attributes
210 
211 /* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes);
212  declares the system function, named func, with the given prototype,
213  consisting of return type, parameters, and attributes.
214  Example:
215  _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...)
216  _GL_ARG_NONNULL ((1)));
217  */
218 #define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \
219  _GL_EXTERN_C rettype func parameters_and_attributes
220 
221 /* _GL_CXXALIAS_RPL (func, rettype, parameters);
222  declares a C++ alias called GNULIB_NAMESPACE::func
223  that redirects to rpl_func, if GNULIB_NAMESPACE is defined.
224  Example:
225  _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...));
226 
227  Wrapping rpl_func in an object with an inline conversion operator
228  avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is
229  actually used in the program. */
230 #define _GL_CXXALIAS_RPL(func,rettype,parameters) \
231  _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters)
232 #if defined __cplusplus && defined GNULIB_NAMESPACE
233 # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
234  namespace GNULIB_NAMESPACE \
235  { \
236  static const struct _gl_ ## func ## _wrapper \
237  { \
238  typedef rettype (*type) parameters; \
239  \
240  inline operator type () const \
241  { \
242  return ::rpl_func; \
243  } \
244  } func = {}; \
245  } \
246  _GL_EXTERN_C int _gl_cxxalias_dummy
247 #else
248 # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
249  _GL_EXTERN_C int _gl_cxxalias_dummy
250 #endif
251 
252 /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters);
253  is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters);
254  except that the C function rpl_func may have a slightly different
255  declaration. A cast is used to silence the "invalid conversion" error
256  that would otherwise occur. */
257 #if defined __cplusplus && defined GNULIB_NAMESPACE
258 # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
259  namespace GNULIB_NAMESPACE \
260  { \
261  static const struct _gl_ ## func ## _wrapper \
262  { \
263  typedef rettype (*type) parameters; \
264  \
265  inline operator type () const \
266  { \
267  return reinterpret_cast<type>(::rpl_func); \
268  } \
269  } func = {}; \
270  } \
271  _GL_EXTERN_C int _gl_cxxalias_dummy
272 #else
273 # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
274  _GL_EXTERN_C int _gl_cxxalias_dummy
275 #endif
276 
277 /* _GL_CXXALIAS_SYS (func, rettype, parameters);
278  declares a C++ alias called GNULIB_NAMESPACE::func
279  that redirects to the system provided function func, if GNULIB_NAMESPACE
280  is defined.
281  Example:
282  _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...));
283 
284  Wrapping func in an object with an inline conversion operator
285  avoids a reference to func unless GNULIB_NAMESPACE::func is
286  actually used in the program. */
287 #if defined __cplusplus && defined GNULIB_NAMESPACE
288 # define _GL_CXXALIAS_SYS(func,rettype,parameters) \
289  namespace GNULIB_NAMESPACE \
290  { \
291  static const struct _gl_ ## func ## _wrapper \
292  { \
293  typedef rettype (*type) parameters; \
294  \
295  inline operator type () const \
296  { \
297  return ::func; \
298  } \
299  } func = {}; \
300  } \
301  _GL_EXTERN_C int _gl_cxxalias_dummy
302 #else
303 # define _GL_CXXALIAS_SYS(func,rettype,parameters) \
304  _GL_EXTERN_C int _gl_cxxalias_dummy
305 #endif
306 
307 /* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters);
308  is like _GL_CXXALIAS_SYS (func, rettype, parameters);
309  except that the C function func may have a slightly different declaration.
310  A cast is used to silence the "invalid conversion" error that would
311  otherwise occur. */
312 #if defined __cplusplus && defined GNULIB_NAMESPACE
313 # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
314  namespace GNULIB_NAMESPACE \
315  { \
316  static const struct _gl_ ## func ## _wrapper \
317  { \
318  typedef rettype (*type) parameters; \
319  \
320  inline operator type () const \
321  { \
322  return reinterpret_cast<type>(::func); \
323  } \
324  } func = {}; \
325  } \
326  _GL_EXTERN_C int _gl_cxxalias_dummy
327 #else
328 # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
329  _GL_EXTERN_C int _gl_cxxalias_dummy
330 #endif
331 
332 /* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2);
333  is like _GL_CXXALIAS_SYS (func, rettype, parameters);
334  except that the C function is picked among a set of overloaded functions,
335  namely the one with rettype2 and parameters2. Two consecutive casts
336  are used to silence the "cannot find a match" and "invalid conversion"
337  errors that would otherwise occur. */
338 #if defined __cplusplus && defined GNULIB_NAMESPACE
339  /* The outer cast must be a reinterpret_cast.
340  The inner cast: When the function is defined as a set of overloaded
341  functions, it works as a static_cast<>, choosing the designated variant.
342  When the function is defined as a single variant, it works as a
343  reinterpret_cast<>. The parenthesized cast syntax works both ways. */
344 # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
345  namespace GNULIB_NAMESPACE \
346  { \
347  static const struct _gl_ ## func ## _wrapper \
348  { \
349  typedef rettype (*type) parameters; \
350  \
351  inline operator type () const \
352  { \
353  return reinterpret_cast<type>((rettype2 (*) parameters2)(::func)); \
354  } \
355  } func = {}; \
356  } \
357  _GL_EXTERN_C int _gl_cxxalias_dummy
358 #else
359 # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
360  _GL_EXTERN_C int _gl_cxxalias_dummy
361 #endif
362 
363 /* _GL_CXXALIASWARN (func);
364  causes a warning to be emitted when ::func is used but not when
365  GNULIB_NAMESPACE::func is used. func must be defined without overloaded
366  variants. */
367 #if defined __cplusplus && defined GNULIB_NAMESPACE
368 # define _GL_CXXALIASWARN(func) \
369  _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE)
370 # define _GL_CXXALIASWARN_1(func,namespace) \
371  _GL_CXXALIASWARN_2 (func, namespace)
372 /* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
373  we enable the warning only when not optimizing. */
374 # if !__OPTIMIZE__
375 # define _GL_CXXALIASWARN_2(func,namespace) \
376  _GL_WARN_ON_USE (func, \
377  "The symbol ::" #func " refers to the system function. " \
378  "Use " #namespace "::" #func " instead.")
379 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
380 # define _GL_CXXALIASWARN_2(func,namespace) \
381  extern __typeof__ (func) func
382 # else
383 # define _GL_CXXALIASWARN_2(func,namespace) \
384  _GL_EXTERN_C int _gl_cxxalias_dummy
385 # endif
386 #else
387 # define _GL_CXXALIASWARN(func) \
388  _GL_EXTERN_C int _gl_cxxalias_dummy
389 #endif
390 
391 /* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes);
392  causes a warning to be emitted when the given overloaded variant of ::func
393  is used but not when GNULIB_NAMESPACE::func is used. */
394 #if defined __cplusplus && defined GNULIB_NAMESPACE
395 # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
396  _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \
397  GNULIB_NAMESPACE)
398 # define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \
399  _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace)
400 /* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
401  we enable the warning only when not optimizing. */
402 # if !__OPTIMIZE__
403 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
404  _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \
405  "The symbol ::" #func " refers to the system function. " \
406  "Use " #namespace "::" #func " instead.")
407 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
408 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
409  extern __typeof__ (func) func
410 # else
411 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
412  _GL_EXTERN_C int _gl_cxxalias_dummy
413 # endif
414 #else
415 # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
416  _GL_EXTERN_C int _gl_cxxalias_dummy
417 #endif
418 
419 #endif /* _GL_CXXDEFS_H */
420 
421 /* The definition of _GL_ARG_NONNULL is copied here. */
422 /* A C macro for declaring that specific arguments must not be NULL.
423  Copyright (C) 2009-2017 Free Software Foundation, Inc.
424 
425  This program is free software: you can redistribute it and/or modify it
426  under the terms of the GNU General Public License as published
427  by the Free Software Foundation; either version 3 of the License, or
428  (at your option) any later version.
429 
430  This program is distributed in the hope that it will be useful,
431  but WITHOUT ANY WARRANTY; without even the implied warranty of
432  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
433  General Public License for more details.
434 
435  You should have received a copy of the GNU General Public License
436  along with this program. If not, see <https://www.gnu.org/licenses/>. */
437 
438 /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools
439  that the values passed as arguments n, ..., m must be non-NULL pointers.
440  n = 1 stands for the first argument, n = 2 for the second argument etc. */
441 #ifndef _GL_ARG_NONNULL
442 # if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3
443 # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params))
444 # else
445 # define _GL_ARG_NONNULL(params)
446 # endif
447 #endif
448 
449 /* The definition of _GL_WARN_ON_USE is copied here. */
450 /* A C macro for emitting warnings if a function is used.
451  Copyright (C) 2010-2017 Free Software Foundation, Inc.
452 
453  This program is free software: you can redistribute it and/or modify it
454  under the terms of the GNU General Public License as published
455  by the Free Software Foundation; either version 3 of the License, or
456  (at your option) any later version.
457 
458  This program is distributed in the hope that it will be useful,
459  but WITHOUT ANY WARRANTY; without even the implied warranty of
460  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
461  General Public License for more details.
462 
463  You should have received a copy of the GNU General Public License
464  along with this program. If not, see <https://www.gnu.org/licenses/>. */
465 
466 /* _GL_WARN_ON_USE (function, "literal string") issues a declaration
467  for FUNCTION which will then trigger a compiler warning containing
468  the text of "literal string" anywhere that function is called, if
469  supported by the compiler. If the compiler does not support this
470  feature, the macro expands to an unused extern declaration.
471 
472  This macro is useful for marking a function as a potential
473  portability trap, with the intent that "literal string" include
474  instructions on the replacement function that should be used
475  instead. However, one of the reasons that a function is a
476  portability trap is if it has the wrong signature. Declaring
477  FUNCTION with a different signature in C is a compilation error, so
478  this macro must use the same type as any existing declaration so
479  that programs that avoid the problematic FUNCTION do not fail to
480  compile merely because they included a header that poisoned the
481  function. But this implies that _GL_WARN_ON_USE is only safe to
482  use if FUNCTION is known to already have a declaration. Use of
483  this macro implies that there must not be any other macro hiding
484  the declaration of FUNCTION; but undefining FUNCTION first is part
485  of the poisoning process anyway (although for symbols that are
486  provided only via a macro, the result is a compilation error rather
487  than a warning containing "literal string"). Also note that in
488  C++, it is only safe to use if FUNCTION has no overloads.
489 
490  For an example, it is possible to poison 'getline' by:
491  - adding a call to gl_WARN_ON_USE_PREPARE([[#include <stdio.h>]],
492  [getline]) in configure.ac, which potentially defines
493  HAVE_RAW_DECL_GETLINE
494  - adding this code to a header that wraps the system <stdio.h>:
495  #undef getline
496  #if HAVE_RAW_DECL_GETLINE
497  _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but"
498  "not universally present; use the gnulib module getline");
499  #endif
500 
501  It is not possible to directly poison global variables. But it is
502  possible to write a wrapper accessor function, and poison that
503  (less common usage, like &environ, will cause a compilation error
504  rather than issue the nice warning, but the end result of informing
505  the developer about their portability problem is still achieved):
506  #if HAVE_RAW_DECL_ENVIRON
507  static char ***rpl_environ (void) { return &environ; }
508  _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared");
509  # undef environ
510  # define environ (*rpl_environ ())
511  #endif
512  */
513 #ifndef _GL_WARN_ON_USE
514 
515 # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
516 /* A compiler attribute is available in gcc versions 4.3.0 and later. */
517 # define _GL_WARN_ON_USE(function, message) \
518 extern __typeof__ (function) function __attribute__ ((__warning__ (message)))
519 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
520 /* Verify the existence of the function. */
521 # define _GL_WARN_ON_USE(function, message) \
522 extern __typeof__ (function) function
523 # else /* Unsupported. */
524 # define _GL_WARN_ON_USE(function, message) \
525 _GL_WARN_EXTERN_C int _gl_warn_on_use
526 # endif
527 #endif
528 
529 /* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string")
530  is like _GL_WARN_ON_USE (function, "string"), except that the function is
531  declared with the given prototype, consisting of return type, parameters,
532  and attributes.
533  This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does
534  not work in this case. */
535 #ifndef _GL_WARN_ON_USE_CXX
536 # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
537 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
538 extern rettype function parameters_and_attributes \
539  __attribute__ ((__warning__ (msg)))
540 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
541 /* Verify the existence of the function. */
542 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
543 extern rettype function parameters_and_attributes
544 # else /* Unsupported. */
545 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
546 _GL_WARN_EXTERN_C int _gl_warn_on_use
547 # endif
548 #endif
549 
550 /* _GL_WARN_EXTERN_C declaration;
551  performs the declaration with C linkage. */
552 #ifndef _GL_WARN_EXTERN_C
553 # if defined __cplusplus
554 # define _GL_WARN_EXTERN_C extern "C"
555 # else
556 # define _GL_WARN_EXTERN_C extern
557 # endif
558 #endif
559 
560 
561 /* Define wint_t and WEOF. (Also done in wctype.in.h.) */
562 #if !1 && !defined wint_t
563 # define wint_t int
564 # ifndef WEOF
565 # define WEOF -1
566 # endif
567 #else
568 /* mingw and MSVC define wint_t as 'unsigned short' in <crtdefs.h> or
569  <stddef.h>. This is too small: ISO C 99 section 7.24.1.(2) says that
570  wint_t must be "unchanged by default argument promotions". Override it. */
571 # if 0
572 # if !GNULIB_defined_wint_t
573 # if 0
574 # include <crtdefs.h>
575 # else
576 # include <stddef.h>
577 # endif
578 typedef unsigned int rpl_wint_t;
579 # undef wint_t
580 # define wint_t rpl_wint_t
581 # define GNULIB_defined_wint_t 1
582 # endif
583 # endif
584 # ifndef WEOF
585 # define WEOF ((wint_t) -1)
586 # endif
587 #endif
588 
589 
590 /* Override mbstate_t if it is too small.
591  On IRIX 6.5, sizeof (mbstate_t) == 1, which is not sufficient for
592  implementing mbrtowc for encodings like UTF-8. */
593 #if !(1 && 1) || 0
594 # if !GNULIB_defined_mbstate_t
595 typedef int rpl_mbstate_t;
596 # undef mbstate_t
597 # define mbstate_t rpl_mbstate_t
598 # define GNULIB_defined_mbstate_t 1
599 # endif
600 #endif
601 
602 
603 /* Convert a single-byte character to a wide character. */
604 #if 0
605 # if 0
606 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
607 # undef btowc
608 # define btowc rpl_btowc
609 # endif
610 _GL_FUNCDECL_RPL (btowc, wint_t, (int c) _GL_ATTRIBUTE_PURE);
611 _GL_CXXALIAS_RPL (btowc, wint_t, (int c));
612 # else
613 # if !1
614 _GL_FUNCDECL_SYS (btowc, wint_t, (int c) _GL_ATTRIBUTE_PURE);
615 # endif
616 _GL_CXXALIAS_SYS (btowc, wint_t, (int c));
617 # endif
618 _GL_CXXALIASWARN (btowc);
619 #elif defined GNULIB_POSIXCHECK
620 # undef btowc
621 # if HAVE_RAW_DECL_BTOWC
622 _GL_WARN_ON_USE (btowc, "btowc is unportable - "
623  "use gnulib module btowc for portability");
624 # endif
625 #endif
626 
627 
628 /* Convert a wide character to a single-byte character. */
629 #if 0
630 # if 0
631 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
632 # undef wctob
633 # define wctob rpl_wctob
634 # endif
635 _GL_FUNCDECL_RPL (wctob, int, (wint_t wc) _GL_ATTRIBUTE_PURE);
636 _GL_CXXALIAS_RPL (wctob, int, (wint_t wc));
637 # else
638 # if !defined wctob && !1
639 /* wctob is provided by gnulib, or wctob exists but is not declared. */
640 _GL_FUNCDECL_SYS (wctob, int, (wint_t wc) _GL_ATTRIBUTE_PURE);
641 # endif
642 _GL_CXXALIAS_SYS (wctob, int, (wint_t wc));
643 # endif
644 _GL_CXXALIASWARN (wctob);
645 #elif defined GNULIB_POSIXCHECK
646 # undef wctob
647 # if HAVE_RAW_DECL_WCTOB
648 _GL_WARN_ON_USE (wctob, "wctob is unportable - "
649  "use gnulib module wctob for portability");
650 # endif
651 #endif
652 
653 
654 /* Test whether *PS is in the initial state. */
655 #if 1
656 # if 0
657 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
658 # undef mbsinit
659 # define mbsinit rpl_mbsinit
660 # endif
661 _GL_FUNCDECL_RPL (mbsinit, int, (const mbstate_t *ps));
662 _GL_CXXALIAS_RPL (mbsinit, int, (const mbstate_t *ps));
663 # else
664 # if !1
665 _GL_FUNCDECL_SYS (mbsinit, int, (const mbstate_t *ps));
666 # endif
667 _GL_CXXALIAS_SYS (mbsinit, int, (const mbstate_t *ps));
668 # endif
670 #elif defined GNULIB_POSIXCHECK
671 # undef mbsinit
672 # if HAVE_RAW_DECL_MBSINIT
673 _GL_WARN_ON_USE (mbsinit, "mbsinit is unportable - "
674  "use gnulib module mbsinit for portability");
675 # endif
676 #endif
677 
678 
679 /* Convert a multibyte character to a wide character. */
680 #if 1
681 # if 1
682 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
683 # undef mbrtowc
684 # define mbrtowc rpl_mbrtowc
685 # endif
686 _GL_FUNCDECL_RPL (mbrtowc, size_t,
687  (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps));
688 _GL_CXXALIAS_RPL (mbrtowc, size_t,
689  (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps));
690 # else
691 # if !1
692 _GL_FUNCDECL_SYS (mbrtowc, size_t,
693  (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps));
694 # endif
695 _GL_CXXALIAS_SYS (mbrtowc, size_t,
696  (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps));
697 # endif
699 #elif defined GNULIB_POSIXCHECK
700 # undef mbrtowc
701 # if HAVE_RAW_DECL_MBRTOWC
702 _GL_WARN_ON_USE (mbrtowc, "mbrtowc is unportable - "
703  "use gnulib module mbrtowc for portability");
704 # endif
705 #endif
706 
707 
708 /* Recognize a multibyte character. */
709 #if 0
710 # if 0
711 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
712 # undef mbrlen
713 # define mbrlen rpl_mbrlen
714 # endif
715 _GL_FUNCDECL_RPL (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps));
716 _GL_CXXALIAS_RPL (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps));
717 # else
718 # if !1
719 _GL_FUNCDECL_SYS (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps));
720 # endif
721 _GL_CXXALIAS_SYS (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps));
722 # endif
723 _GL_CXXALIASWARN (mbrlen);
724 #elif defined GNULIB_POSIXCHECK
725 # undef mbrlen
726 # if HAVE_RAW_DECL_MBRLEN
727 _GL_WARN_ON_USE (mbrlen, "mbrlen is unportable - "
728  "use gnulib module mbrlen for portability");
729 # endif
730 #endif
731 
732 
733 /* Convert a string to a wide string. */
734 #if 0
735 # if 0
736 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
737 # undef mbsrtowcs
738 # define mbsrtowcs rpl_mbsrtowcs
739 # endif
740 _GL_FUNCDECL_RPL (mbsrtowcs, size_t,
741  (wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps)
742  _GL_ARG_NONNULL ((2)));
743 _GL_CXXALIAS_RPL (mbsrtowcs, size_t,
744  (wchar_t *dest, const char **srcp, size_t len,
745  mbstate_t *ps));
746 # else
747 # if !1
748 _GL_FUNCDECL_SYS (mbsrtowcs, size_t,
749  (wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps)
750  _GL_ARG_NONNULL ((2)));
751 # endif
752 _GL_CXXALIAS_SYS (mbsrtowcs, size_t,
753  (wchar_t *dest, const char **srcp, size_t len,
754  mbstate_t *ps));
755 # endif
756 _GL_CXXALIASWARN (mbsrtowcs);
757 #elif defined GNULIB_POSIXCHECK
758 # undef mbsrtowcs
759 # if HAVE_RAW_DECL_MBSRTOWCS
760 _GL_WARN_ON_USE (mbsrtowcs, "mbsrtowcs is unportable - "
761  "use gnulib module mbsrtowcs for portability");
762 # endif
763 #endif
764 
765 
766 /* Convert a string to a wide string. */
767 #if 0
768 # if 0
769 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
770 # undef mbsnrtowcs
771 # define mbsnrtowcs rpl_mbsnrtowcs
772 # endif
773 _GL_FUNCDECL_RPL (mbsnrtowcs, size_t,
774  (wchar_t *dest, const char **srcp, size_t srclen, size_t len,
775  mbstate_t *ps)
776  _GL_ARG_NONNULL ((2)));
777 _GL_CXXALIAS_RPL (mbsnrtowcs, size_t,
778  (wchar_t *dest, const char **srcp, size_t srclen, size_t len,
779  mbstate_t *ps));
780 # else
781 # if !1
782 _GL_FUNCDECL_SYS (mbsnrtowcs, size_t,
783  (wchar_t *dest, const char **srcp, size_t srclen, size_t len,
784  mbstate_t *ps)
785  _GL_ARG_NONNULL ((2)));
786 # endif
787 _GL_CXXALIAS_SYS (mbsnrtowcs, size_t,
788  (wchar_t *dest, const char **srcp, size_t srclen, size_t len,
789  mbstate_t *ps));
790 # endif
791 _GL_CXXALIASWARN (mbsnrtowcs);
792 #elif defined GNULIB_POSIXCHECK
793 # undef mbsnrtowcs
794 # if HAVE_RAW_DECL_MBSNRTOWCS
795 _GL_WARN_ON_USE (mbsnrtowcs, "mbsnrtowcs is unportable - "
796  "use gnulib module mbsnrtowcs for portability");
797 # endif
798 #endif
799 
800 
801 /* Convert a wide character to a multibyte character. */
802 #if 0
803 # if 0
804 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
805 # undef wcrtomb
806 # define wcrtomb rpl_wcrtomb
807 # endif
808 _GL_FUNCDECL_RPL (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps));
809 _GL_CXXALIAS_RPL (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps));
810 # else
811 # if !1
812 _GL_FUNCDECL_SYS (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps));
813 # endif
814 _GL_CXXALIAS_SYS (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps));
815 # endif
816 _GL_CXXALIASWARN (wcrtomb);
817 #elif defined GNULIB_POSIXCHECK
818 # undef wcrtomb
819 # if HAVE_RAW_DECL_WCRTOMB
820 _GL_WARN_ON_USE (wcrtomb, "wcrtomb is unportable - "
821  "use gnulib module wcrtomb for portability");
822 # endif
823 #endif
824 
825 
826 /* Convert a wide string to a string. */
827 #if 0
828 # if 0
829 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
830 # undef wcsrtombs
831 # define wcsrtombs rpl_wcsrtombs
832 # endif
833 _GL_FUNCDECL_RPL (wcsrtombs, size_t,
834  (char *dest, const wchar_t **srcp, size_t len, mbstate_t *ps)
835  _GL_ARG_NONNULL ((2)));
836 _GL_CXXALIAS_RPL (wcsrtombs, size_t,
837  (char *dest, const wchar_t **srcp, size_t len,
838  mbstate_t *ps));
839 # else
840 # if !1
841 _GL_FUNCDECL_SYS (wcsrtombs, size_t,
842  (char *dest, const wchar_t **srcp, size_t len, mbstate_t *ps)
843  _GL_ARG_NONNULL ((2)));
844 # endif
845 _GL_CXXALIAS_SYS (wcsrtombs, size_t,
846  (char *dest, const wchar_t **srcp, size_t len,
847  mbstate_t *ps));
848 # endif
849 _GL_CXXALIASWARN (wcsrtombs);
850 #elif defined GNULIB_POSIXCHECK
851 # undef wcsrtombs
852 # if HAVE_RAW_DECL_WCSRTOMBS
853 _GL_WARN_ON_USE (wcsrtombs, "wcsrtombs is unportable - "
854  "use gnulib module wcsrtombs for portability");
855 # endif
856 #endif
857 
858 
859 /* Convert a wide string to a string. */
860 #if 0
861 # if 0
862 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
863 # undef wcsnrtombs
864 # define wcsnrtombs rpl_wcsnrtombs
865 # endif
866 _GL_FUNCDECL_RPL (wcsnrtombs, size_t,
867  (char *dest, const wchar_t **srcp, size_t srclen, size_t len,
868  mbstate_t *ps)
869  _GL_ARG_NONNULL ((2)));
870 _GL_CXXALIAS_RPL (wcsnrtombs, size_t,
871  (char *dest, const wchar_t **srcp, size_t srclen, size_t len,
872  mbstate_t *ps));
873 # else
874 # if !1
875 _GL_FUNCDECL_SYS (wcsnrtombs, size_t,
876  (char *dest, const wchar_t **srcp, size_t srclen, size_t len,
877  mbstate_t *ps)
878  _GL_ARG_NONNULL ((2)));
879 # endif
880 _GL_CXXALIAS_SYS (wcsnrtombs, size_t,
881  (char *dest, const wchar_t **srcp, size_t srclen, size_t len,
882  mbstate_t *ps));
883 # endif
884 _GL_CXXALIASWARN (wcsnrtombs);
885 #elif defined GNULIB_POSIXCHECK
886 # undef wcsnrtombs
887 # if HAVE_RAW_DECL_WCSNRTOMBS
888 _GL_WARN_ON_USE (wcsnrtombs, "wcsnrtombs is unportable - "
889  "use gnulib module wcsnrtombs for portability");
890 # endif
891 #endif
892 
893 
894 /* Return the number of screen columns needed for WC. */
895 #if 0
896 # if 0
897 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
898 # undef wcwidth
899 # define wcwidth rpl_wcwidth
900 # endif
901 _GL_FUNCDECL_RPL (wcwidth, int, (wchar_t) _GL_ATTRIBUTE_PURE);
902 _GL_CXXALIAS_RPL (wcwidth, int, (wchar_t));
903 # else
904 # if !1
905 /* wcwidth exists but is not declared. */
906 _GL_FUNCDECL_SYS (wcwidth, int, (wchar_t) _GL_ATTRIBUTE_PURE);
907 # endif
908 _GL_CXXALIAS_SYS (wcwidth, int, (wchar_t));
909 # endif
910 _GL_CXXALIASWARN (wcwidth);
911 #elif defined GNULIB_POSIXCHECK
912 # undef wcwidth
913 # if HAVE_RAW_DECL_WCWIDTH
914 _GL_WARN_ON_USE (wcwidth, "wcwidth is unportable - "
915  "use gnulib module wcwidth for portability");
916 # endif
917 #endif
918 
919 
920 /* Search N wide characters of S for C. */
921 #if 0
922 # if !1
923 _GL_FUNCDECL_SYS (wmemchr, wchar_t *, (const wchar_t *s, wchar_t c, size_t n)
925 # endif
926  /* On some systems, this function is defined as an overloaded function:
927  extern "C++" {
928  const wchar_t * std::wmemchr (const wchar_t *, wchar_t, size_t);
929  wchar_t * std::wmemchr (wchar_t *, wchar_t, size_t);
930  } */
931 _GL_CXXALIAS_SYS_CAST2 (wmemchr,
932  wchar_t *, (const wchar_t *, wchar_t, size_t),
933  const wchar_t *, (const wchar_t *, wchar_t, size_t));
934 # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
935  && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
936 _GL_CXXALIASWARN1 (wmemchr, wchar_t *, (wchar_t *s, wchar_t c, size_t n));
937 _GL_CXXALIASWARN1 (wmemchr, const wchar_t *,
938  (const wchar_t *s, wchar_t c, size_t n));
939 # else
940 _GL_CXXALIASWARN (wmemchr);
941 # endif
942 #elif defined GNULIB_POSIXCHECK
943 # undef wmemchr
944 # if HAVE_RAW_DECL_WMEMCHR
945 _GL_WARN_ON_USE (wmemchr, "wmemchr is unportable - "
946  "use gnulib module wmemchr for portability");
947 # endif
948 #endif
949 
950 
951 /* Compare N wide characters of S1 and S2. */
952 #if 0
953 # if !1
954 _GL_FUNCDECL_SYS (wmemcmp, int,
955  (const wchar_t *s1, const wchar_t *s2, size_t n)
957 # endif
958 _GL_CXXALIAS_SYS (wmemcmp, int,
959  (const wchar_t *s1, const wchar_t *s2, size_t n));
960 _GL_CXXALIASWARN (wmemcmp);
961 #elif defined GNULIB_POSIXCHECK
962 # undef wmemcmp
963 # if HAVE_RAW_DECL_WMEMCMP
964 _GL_WARN_ON_USE (wmemcmp, "wmemcmp is unportable - "
965  "use gnulib module wmemcmp for portability");
966 # endif
967 #endif
968 
969 
970 /* Copy N wide characters of SRC to DEST. */
971 #if 0
972 # if !1
973 _GL_FUNCDECL_SYS (wmemcpy, wchar_t *,
974  (wchar_t *dest, const wchar_t *src, size_t n));
975 # endif
976 _GL_CXXALIAS_SYS (wmemcpy, wchar_t *,
977  (wchar_t *dest, const wchar_t *src, size_t n));
978 _GL_CXXALIASWARN (wmemcpy);
979 #elif defined GNULIB_POSIXCHECK
980 # undef wmemcpy
981 # if HAVE_RAW_DECL_WMEMCPY
982 _GL_WARN_ON_USE (wmemcpy, "wmemcpy is unportable - "
983  "use gnulib module wmemcpy for portability");
984 # endif
985 #endif
986 
987 
988 /* Copy N wide characters of SRC to DEST, guaranteeing correct behavior for
989  overlapping memory areas. */
990 #if 0
991 # if !1
992 _GL_FUNCDECL_SYS (wmemmove, wchar_t *,
993  (wchar_t *dest, const wchar_t *src, size_t n));
994 # endif
995 _GL_CXXALIAS_SYS (wmemmove, wchar_t *,
996  (wchar_t *dest, const wchar_t *src, size_t n));
997 _GL_CXXALIASWARN (wmemmove);
998 #elif defined GNULIB_POSIXCHECK
999 # undef wmemmove
1000 # if HAVE_RAW_DECL_WMEMMOVE
1001 _GL_WARN_ON_USE (wmemmove, "wmemmove is unportable - "
1002  "use gnulib module wmemmove for portability");
1003 # endif
1004 #endif
1005 
1006 
1007 /* Set N wide characters of S to C. */
1008 #if 0
1009 # if !1
1010 _GL_FUNCDECL_SYS (wmemset, wchar_t *, (wchar_t *s, wchar_t c, size_t n));
1011 # endif
1012 _GL_CXXALIAS_SYS (wmemset, wchar_t *, (wchar_t *s, wchar_t c, size_t n));
1013 _GL_CXXALIASWARN (wmemset);
1014 #elif defined GNULIB_POSIXCHECK
1015 # undef wmemset
1016 # if HAVE_RAW_DECL_WMEMSET
1017 _GL_WARN_ON_USE (wmemset, "wmemset is unportable - "
1018  "use gnulib module wmemset for portability");
1019 # endif
1020 #endif
1021 
1022 
1023 /* Return the number of wide characters in S. */
1024 #if 0
1025 # if !1
1026 _GL_FUNCDECL_SYS (wcslen, size_t, (const wchar_t *s) _GL_ATTRIBUTE_PURE);
1027 # endif
1028 _GL_CXXALIAS_SYS (wcslen, size_t, (const wchar_t *s));
1029 _GL_CXXALIASWARN (wcslen);
1030 #elif defined GNULIB_POSIXCHECK
1031 # undef wcslen
1032 # if HAVE_RAW_DECL_WCSLEN
1033 _GL_WARN_ON_USE (wcslen, "wcslen is unportable - "
1034  "use gnulib module wcslen for portability");
1035 # endif
1036 #endif
1037 
1038 
1039 /* Return the number of wide characters in S, but at most MAXLEN. */
1040 #if 0
1041 # if !1
1042 _GL_FUNCDECL_SYS (wcsnlen, size_t, (const wchar_t *s, size_t maxlen)
1044 # endif
1045 _GL_CXXALIAS_SYS (wcsnlen, size_t, (const wchar_t *s, size_t maxlen));
1046 _GL_CXXALIASWARN (wcsnlen);
1047 #elif defined GNULIB_POSIXCHECK
1048 # undef wcsnlen
1049 # if HAVE_RAW_DECL_WCSNLEN
1050 _GL_WARN_ON_USE (wcsnlen, "wcsnlen is unportable - "
1051  "use gnulib module wcsnlen for portability");
1052 # endif
1053 #endif
1054 
1055 
1056 /* Copy SRC to DEST. */
1057 #if 0
1058 # if !1
1059 _GL_FUNCDECL_SYS (wcscpy, wchar_t *, (wchar_t *dest, const wchar_t *src));
1060 # endif
1061 _GL_CXXALIAS_SYS (wcscpy, wchar_t *, (wchar_t *dest, const wchar_t *src));
1062 _GL_CXXALIASWARN (wcscpy);
1063 #elif defined GNULIB_POSIXCHECK
1064 # undef wcscpy
1065 # if HAVE_RAW_DECL_WCSCPY
1066 _GL_WARN_ON_USE (wcscpy, "wcscpy is unportable - "
1067  "use gnulib module wcscpy for portability");
1068 # endif
1069 #endif
1070 
1071 
1072 /* Copy SRC to DEST, returning the address of the terminating L'\0' in DEST. */
1073 #if 0
1074 # if !1
1075 _GL_FUNCDECL_SYS (wcpcpy, wchar_t *, (wchar_t *dest, const wchar_t *src));
1076 # endif
1077 _GL_CXXALIAS_SYS (wcpcpy, wchar_t *, (wchar_t *dest, const wchar_t *src));
1078 _GL_CXXALIASWARN (wcpcpy);
1079 #elif defined GNULIB_POSIXCHECK
1080 # undef wcpcpy
1081 # if HAVE_RAW_DECL_WCPCPY
1082 _GL_WARN_ON_USE (wcpcpy, "wcpcpy is unportable - "
1083  "use gnulib module wcpcpy for portability");
1084 # endif
1085 #endif
1086 
1087 
1088 /* Copy no more than N wide characters of SRC to DEST. */
1089 #if 0
1090 # if !1
1091 _GL_FUNCDECL_SYS (wcsncpy, wchar_t *,
1092  (wchar_t *dest, const wchar_t *src, size_t n));
1093 # endif
1094 _GL_CXXALIAS_SYS (wcsncpy, wchar_t *,
1095  (wchar_t *dest, const wchar_t *src, size_t n));
1096 _GL_CXXALIASWARN (wcsncpy);
1097 #elif defined GNULIB_POSIXCHECK
1098 # undef wcsncpy
1099 # if HAVE_RAW_DECL_WCSNCPY
1100 _GL_WARN_ON_USE (wcsncpy, "wcsncpy is unportable - "
1101  "use gnulib module wcsncpy for portability");
1102 # endif
1103 #endif
1104 
1105 
1106 /* Copy no more than N characters of SRC to DEST, returning the address of
1107  the last character written into DEST. */
1108 #if 0
1109 # if !1
1110 _GL_FUNCDECL_SYS (wcpncpy, wchar_t *,
1111  (wchar_t *dest, const wchar_t *src, size_t n));
1112 # endif
1113 _GL_CXXALIAS_SYS (wcpncpy, wchar_t *,
1114  (wchar_t *dest, const wchar_t *src, size_t n));
1115 _GL_CXXALIASWARN (wcpncpy);
1116 #elif defined GNULIB_POSIXCHECK
1117 # undef wcpncpy
1118 # if HAVE_RAW_DECL_WCPNCPY
1119 _GL_WARN_ON_USE (wcpncpy, "wcpncpy is unportable - "
1120  "use gnulib module wcpncpy for portability");
1121 # endif
1122 #endif
1123 
1124 
1125 /* Append SRC onto DEST. */
1126 #if 0
1127 # if !1
1128 _GL_FUNCDECL_SYS (wcscat, wchar_t *, (wchar_t *dest, const wchar_t *src));
1129 # endif
1130 _GL_CXXALIAS_SYS (wcscat, wchar_t *, (wchar_t *dest, const wchar_t *src));
1131 _GL_CXXALIASWARN (wcscat);
1132 #elif defined GNULIB_POSIXCHECK
1133 # undef wcscat
1134 # if HAVE_RAW_DECL_WCSCAT
1135 _GL_WARN_ON_USE (wcscat, "wcscat is unportable - "
1136  "use gnulib module wcscat for portability");
1137 # endif
1138 #endif
1139 
1140 
1141 /* Append no more than N wide characters of SRC onto DEST. */
1142 #if 0
1143 # if !1
1144 _GL_FUNCDECL_SYS (wcsncat, wchar_t *,
1145  (wchar_t *dest, const wchar_t *src, size_t n));
1146 # endif
1147 _GL_CXXALIAS_SYS (wcsncat, wchar_t *,
1148  (wchar_t *dest, const wchar_t *src, size_t n));
1149 _GL_CXXALIASWARN (wcsncat);
1150 #elif defined GNULIB_POSIXCHECK
1151 # undef wcsncat
1152 # if HAVE_RAW_DECL_WCSNCAT
1153 _GL_WARN_ON_USE (wcsncat, "wcsncat is unportable - "
1154  "use gnulib module wcsncat for portability");
1155 # endif
1156 #endif
1157 
1158 
1159 /* Compare S1 and S2. */
1160 #if 0
1161 # if !1
1162 _GL_FUNCDECL_SYS (wcscmp, int, (const wchar_t *s1, const wchar_t *s2)
1164 # endif
1165 _GL_CXXALIAS_SYS (wcscmp, int, (const wchar_t *s1, const wchar_t *s2));
1166 _GL_CXXALIASWARN (wcscmp);
1167 #elif defined GNULIB_POSIXCHECK
1168 # undef wcscmp
1169 # if HAVE_RAW_DECL_WCSCMP
1170 _GL_WARN_ON_USE (wcscmp, "wcscmp is unportable - "
1171  "use gnulib module wcscmp for portability");
1172 # endif
1173 #endif
1174 
1175 
1176 /* Compare no more than N wide characters of S1 and S2. */
1177 #if 0
1178 # if !1
1179 _GL_FUNCDECL_SYS (wcsncmp, int,
1180  (const wchar_t *s1, const wchar_t *s2, size_t n)
1182 # endif
1183 _GL_CXXALIAS_SYS (wcsncmp, int,
1184  (const wchar_t *s1, const wchar_t *s2, size_t n));
1185 _GL_CXXALIASWARN (wcsncmp);
1186 #elif defined GNULIB_POSIXCHECK
1187 # undef wcsncmp
1188 # if HAVE_RAW_DECL_WCSNCMP
1189 _GL_WARN_ON_USE (wcsncmp, "wcsncmp is unportable - "
1190  "use gnulib module wcsncmp for portability");
1191 # endif
1192 #endif
1193 
1194 
1195 /* Compare S1 and S2, ignoring case. */
1196 #if 0
1197 # if !1
1198 _GL_FUNCDECL_SYS (wcscasecmp, int, (const wchar_t *s1, const wchar_t *s2)
1200 # endif
1201 _GL_CXXALIAS_SYS (wcscasecmp, int, (const wchar_t *s1, const wchar_t *s2));
1202 _GL_CXXALIASWARN (wcscasecmp);
1203 #elif defined GNULIB_POSIXCHECK
1204 # undef wcscasecmp
1205 # if HAVE_RAW_DECL_WCSCASECMP
1206 _GL_WARN_ON_USE (wcscasecmp, "wcscasecmp is unportable - "
1207  "use gnulib module wcscasecmp for portability");
1208 # endif
1209 #endif
1210 
1211 
1212 /* Compare no more than N chars of S1 and S2, ignoring case. */
1213 #if 0
1214 # if !1
1215 _GL_FUNCDECL_SYS (wcsncasecmp, int,
1216  (const wchar_t *s1, const wchar_t *s2, size_t n)
1218 # endif
1219 _GL_CXXALIAS_SYS (wcsncasecmp, int,
1220  (const wchar_t *s1, const wchar_t *s2, size_t n));
1221 _GL_CXXALIASWARN (wcsncasecmp);
1222 #elif defined GNULIB_POSIXCHECK
1223 # undef wcsncasecmp
1224 # if HAVE_RAW_DECL_WCSNCASECMP
1225 _GL_WARN_ON_USE (wcsncasecmp, "wcsncasecmp is unportable - "
1226  "use gnulib module wcsncasecmp for portability");
1227 # endif
1228 #endif
1229 
1230 
1231 /* Compare S1 and S2, both interpreted as appropriate to the LC_COLLATE
1232  category of the current locale. */
1233 #if 0
1234 # if !1
1235 _GL_FUNCDECL_SYS (wcscoll, int, (const wchar_t *s1, const wchar_t *s2));
1236 # endif
1237 _GL_CXXALIAS_SYS (wcscoll, int, (const wchar_t *s1, const wchar_t *s2));
1238 _GL_CXXALIASWARN (wcscoll);
1239 #elif defined GNULIB_POSIXCHECK
1240 # undef wcscoll
1241 # if HAVE_RAW_DECL_WCSCOLL
1242 _GL_WARN_ON_USE (wcscoll, "wcscoll is unportable - "
1243  "use gnulib module wcscoll for portability");
1244 # endif
1245 #endif
1246 
1247 
1248 /* Transform S2 into array pointed to by S1 such that if wcscmp is applied
1249  to two transformed strings the result is the as applying 'wcscoll' to the
1250  original strings. */
1251 #if 0
1252 # if !1
1253 _GL_FUNCDECL_SYS (wcsxfrm, size_t, (wchar_t *s1, const wchar_t *s2, size_t n));
1254 # endif
1255 _GL_CXXALIAS_SYS (wcsxfrm, size_t, (wchar_t *s1, const wchar_t *s2, size_t n));
1256 _GL_CXXALIASWARN (wcsxfrm);
1257 #elif defined GNULIB_POSIXCHECK
1258 # undef wcsxfrm
1259 # if HAVE_RAW_DECL_WCSXFRM
1260 _GL_WARN_ON_USE (wcsxfrm, "wcsxfrm is unportable - "
1261  "use gnulib module wcsxfrm for portability");
1262 # endif
1263 #endif
1264 
1265 
1266 /* Duplicate S, returning an identical malloc'd string. */
1267 #if 0
1268 # if !1
1269 _GL_FUNCDECL_SYS (wcsdup, wchar_t *, (const wchar_t *s));
1270 # endif
1271 _GL_CXXALIAS_SYS (wcsdup, wchar_t *, (const wchar_t *s));
1272 _GL_CXXALIASWARN (wcsdup);
1273 #elif defined GNULIB_POSIXCHECK
1274 # undef wcsdup
1275 # if HAVE_RAW_DECL_WCSDUP
1276 _GL_WARN_ON_USE (wcsdup, "wcsdup is unportable - "
1277  "use gnulib module wcsdup for portability");
1278 # endif
1279 #endif
1280 
1281 
1282 /* Find the first occurrence of WC in WCS. */
1283 #if 0
1284 # if !1
1285 _GL_FUNCDECL_SYS (wcschr, wchar_t *, (const wchar_t *wcs, wchar_t wc)
1287 # endif
1288  /* On some systems, this function is defined as an overloaded function:
1289  extern "C++" {
1290  const wchar_t * std::wcschr (const wchar_t *, wchar_t);
1291  wchar_t * std::wcschr (wchar_t *, wchar_t);
1292  } */
1293 _GL_CXXALIAS_SYS_CAST2 (wcschr,
1294  wchar_t *, (const wchar_t *, wchar_t),
1295  const wchar_t *, (const wchar_t *, wchar_t));
1296 # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
1297  && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
1298 _GL_CXXALIASWARN1 (wcschr, wchar_t *, (wchar_t *wcs, wchar_t wc));
1299 _GL_CXXALIASWARN1 (wcschr, const wchar_t *, (const wchar_t *wcs, wchar_t wc));
1300 # else
1301 _GL_CXXALIASWARN (wcschr);
1302 # endif
1303 #elif defined GNULIB_POSIXCHECK
1304 # undef wcschr
1305 # if HAVE_RAW_DECL_WCSCHR
1306 _GL_WARN_ON_USE (wcschr, "wcschr is unportable - "
1307  "use gnulib module wcschr for portability");
1308 # endif
1309 #endif
1310 
1311 
1312 /* Find the last occurrence of WC in WCS. */
1313 #if 0
1314 # if !1
1315 _GL_FUNCDECL_SYS (wcsrchr, wchar_t *, (const wchar_t *wcs, wchar_t wc)
1317 # endif
1318  /* On some systems, this function is defined as an overloaded function:
1319  extern "C++" {
1320  const wchar_t * std::wcsrchr (const wchar_t *, wchar_t);
1321  wchar_t * std::wcsrchr (wchar_t *, wchar_t);
1322  } */
1323 _GL_CXXALIAS_SYS_CAST2 (wcsrchr,
1324  wchar_t *, (const wchar_t *, wchar_t),
1325  const wchar_t *, (const wchar_t *, wchar_t));
1326 # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
1327  && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
1328 _GL_CXXALIASWARN1 (wcsrchr, wchar_t *, (wchar_t *wcs, wchar_t wc));
1329 _GL_CXXALIASWARN1 (wcsrchr, const wchar_t *, (const wchar_t *wcs, wchar_t wc));
1330 # else
1331 _GL_CXXALIASWARN (wcsrchr);
1332 # endif
1333 #elif defined GNULIB_POSIXCHECK
1334 # undef wcsrchr
1335 # if HAVE_RAW_DECL_WCSRCHR
1336 _GL_WARN_ON_USE (wcsrchr, "wcsrchr is unportable - "
1337  "use gnulib module wcsrchr for portability");
1338 # endif
1339 #endif
1340 
1341 
1342 /* Return the length of the initial segmet of WCS which consists entirely
1343  of wide characters not in REJECT. */
1344 #if 0
1345 # if !1
1346 _GL_FUNCDECL_SYS (wcscspn, size_t, (const wchar_t *wcs, const wchar_t *reject)
1348 # endif
1349 _GL_CXXALIAS_SYS (wcscspn, size_t, (const wchar_t *wcs, const wchar_t *reject));
1350 _GL_CXXALIASWARN (wcscspn);
1351 #elif defined GNULIB_POSIXCHECK
1352 # undef wcscspn
1353 # if HAVE_RAW_DECL_WCSCSPN
1354 _GL_WARN_ON_USE (wcscspn, "wcscspn is unportable - "
1355  "use gnulib module wcscspn for portability");
1356 # endif
1357 #endif
1358 
1359 
1360 /* Return the length of the initial segmet of WCS which consists entirely
1361  of wide characters in ACCEPT. */
1362 #if 0
1363 # if !1
1364 _GL_FUNCDECL_SYS (wcsspn, size_t, (const wchar_t *wcs, const wchar_t *accept)
1366 # endif
1367 _GL_CXXALIAS_SYS (wcsspn, size_t, (const wchar_t *wcs, const wchar_t *accept));
1368 _GL_CXXALIASWARN (wcsspn);
1369 #elif defined GNULIB_POSIXCHECK
1370 # undef wcsspn
1371 # if HAVE_RAW_DECL_WCSSPN
1372 _GL_WARN_ON_USE (wcsspn, "wcsspn is unportable - "
1373  "use gnulib module wcsspn for portability");
1374 # endif
1375 #endif
1376 
1377 
1378 /* Find the first occurrence in WCS of any character in ACCEPT. */
1379 #if 0
1380 # if !1
1381 _GL_FUNCDECL_SYS (wcspbrk, wchar_t *,
1382  (const wchar_t *wcs, const wchar_t *accept)
1384 # endif
1385  /* On some systems, this function is defined as an overloaded function:
1386  extern "C++" {
1387  const wchar_t * std::wcspbrk (const wchar_t *, const wchar_t *);
1388  wchar_t * std::wcspbrk (wchar_t *, const wchar_t *);
1389  } */
1390 _GL_CXXALIAS_SYS_CAST2 (wcspbrk,
1391  wchar_t *, (const wchar_t *, const wchar_t *),
1392  const wchar_t *, (const wchar_t *, const wchar_t *));
1393 # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
1394  && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
1395 _GL_CXXALIASWARN1 (wcspbrk, wchar_t *,
1396  (wchar_t *wcs, const wchar_t *accept));
1397 _GL_CXXALIASWARN1 (wcspbrk, const wchar_t *,
1398  (const wchar_t *wcs, const wchar_t *accept));
1399 # else
1400 _GL_CXXALIASWARN (wcspbrk);
1401 # endif
1402 #elif defined GNULIB_POSIXCHECK
1403 # undef wcspbrk
1404 # if HAVE_RAW_DECL_WCSPBRK
1405 _GL_WARN_ON_USE (wcspbrk, "wcspbrk is unportable - "
1406  "use gnulib module wcspbrk for portability");
1407 # endif
1408 #endif
1409 
1410 
1411 /* Find the first occurrence of NEEDLE in HAYSTACK. */
1412 #if 0
1413 # if !1
1414 _GL_FUNCDECL_SYS (wcsstr, wchar_t *,
1415  (const wchar_t *haystack, const wchar_t *needle)
1417 # endif
1418  /* On some systems, this function is defined as an overloaded function:
1419  extern "C++" {
1420  const wchar_t * std::wcsstr (const wchar_t *, const wchar_t *);
1421  wchar_t * std::wcsstr (wchar_t *, const wchar_t *);
1422  } */
1423 _GL_CXXALIAS_SYS_CAST2 (wcsstr,
1424  wchar_t *, (const wchar_t *, const wchar_t *),
1425  const wchar_t *, (const wchar_t *, const wchar_t *));
1426 # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
1427  && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
1428 _GL_CXXALIASWARN1 (wcsstr, wchar_t *,
1429  (wchar_t *haystack, const wchar_t *needle));
1430 _GL_CXXALIASWARN1 (wcsstr, const wchar_t *,
1431  (const wchar_t *haystack, const wchar_t *needle));
1432 # else
1433 _GL_CXXALIASWARN (wcsstr);
1434 # endif
1435 #elif defined GNULIB_POSIXCHECK
1436 # undef wcsstr
1437 # if HAVE_RAW_DECL_WCSSTR
1438 _GL_WARN_ON_USE (wcsstr, "wcsstr is unportable - "
1439  "use gnulib module wcsstr for portability");
1440 # endif
1441 #endif
1442 
1443 
1444 /* Divide WCS into tokens separated by characters in DELIM. */
1445 #if 0
1446 # if !1
1447 _GL_FUNCDECL_SYS (wcstok, wchar_t *,
1448  (wchar_t *wcs, const wchar_t *delim, wchar_t **ptr));
1449 # endif
1450 _GL_CXXALIAS_SYS (wcstok, wchar_t *,
1451  (wchar_t *wcs, const wchar_t *delim, wchar_t **ptr));
1452 _GL_CXXALIASWARN (wcstok);
1453 #elif defined GNULIB_POSIXCHECK
1454 # undef wcstok
1455 # if HAVE_RAW_DECL_WCSTOK
1456 _GL_WARN_ON_USE (wcstok, "wcstok is unportable - "
1457  "use gnulib module wcstok for portability");
1458 # endif
1459 #endif
1460 
1461 
1462 /* Determine number of column positions required for first N wide
1463  characters (or fewer if S ends before this) in S. */
1464 #if 0
1465 # if 0
1466 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1467 # undef wcswidth
1468 # define wcswidth rpl_wcswidth
1469 # endif
1470 _GL_FUNCDECL_RPL (wcswidth, int, (const wchar_t *s, size_t n)
1472 _GL_CXXALIAS_RPL (wcswidth, int, (const wchar_t *s, size_t n));
1473 # else
1474 # if !1
1475 _GL_FUNCDECL_SYS (wcswidth, int, (const wchar_t *s, size_t n)
1477 # endif
1478 _GL_CXXALIAS_SYS (wcswidth, int, (const wchar_t *s, size_t n));
1479 # endif
1480 _GL_CXXALIASWARN (wcswidth);
1481 #elif defined GNULIB_POSIXCHECK
1482 # undef wcswidth
1483 # if HAVE_RAW_DECL_WCSWIDTH
1484 _GL_WARN_ON_USE (wcswidth, "wcswidth is unportable - "
1485  "use gnulib module wcswidth for portability");
1486 # endif
1487 #endif
1488 
1489 
1490 /* Convert *TP to a date and time wide string. See
1491  <http://pubs.opengroup.org/onlinepubs/9699919799/functions/wcsftime.html>. */
1492 #if 0
1493 # if 0
1494 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1495 # undef wcsftime
1496 # define wcsftime rpl_wcsftime
1497 # endif
1498 _GL_FUNCDECL_RPL (wcsftime, size_t, (wchar_t *__buf, size_t __bufsize,
1499  const wchar_t *__fmt, const struct tm *__tp)
1500  _GL_ARG_NONNULL ((1, 3, 4)));
1501 _GL_CXXALIAS_RPL (wcsftime, size_t, (wchar_t *__buf, size_t __bufsize,
1502  const wchar_t *__fmt, const struct tm *__tp));
1503 # else
1504 # if !1
1505 _GL_FUNCDECL_SYS (wcsftime, size_t, (wchar_t *__buf, size_t __bufsize,
1506  const wchar_t *__fmt, const struct tm *__tp)
1507  _GL_ARG_NONNULL ((1, 3, 4)));
1508 # endif
1509 _GL_CXXALIAS_SYS (wcsftime, size_t, (wchar_t *__buf, size_t __bufsize,
1510  const wchar_t *__fmt, const struct tm *__tp));
1511 # endif
1512 _GL_CXXALIASWARN (wcsftime);
1513 #elif defined GNULIB_POSIXCHECK
1514 # undef wcsftime
1515 # if HAVE_RAW_DECL_WCSFTIME
1516 _GL_WARN_ON_USE (wcsftime, "wcsftime is unportable - "
1517  "use gnulib module wcsftime for portability");
1518 # endif
1519 #endif
1520 
1521 
1522 #endif /* _GL_WCHAR_H */
1523 #endif /* _GL_WCHAR_H */
1524 #endif
#define mbstate_t
Definition: wchar.in.h:145
#define _GL_FUNCDECL_SYS(func, rettype, parameters_and_attributes)
Definition: inet.h:168
_GL_CXXALIASWARN(mbsinit)
int rpl_mbstate_t
Definition: wchar.in.h:143
_GL_CXXALIAS_RPL(mbrtowc, size_t,(wchar_t *pwc, const char *s, size_t n, mbstate_t *ps))
_GL_ARG_NONNULL((1)))
#define wint_t
Definition: wchar.in.h:111
#define _GL_CXXALIASWARN1(func, rettype, parameters_and_attributes)
Definition: inet.h:365
int mbsinit(const mbstate_t *ps)
Definition: mbsinit.c:55
_GL_FUNCDECL_RPL(mbrtowc, size_t,(wchar_t *pwc, const char *s, size_t n, mbstate_t *ps))
#define _GL_ATTRIBUTE_PURE
Definition: wchar.h:100
#define _GL_CXXALIAS_SYS_CAST2(func, rettype, parameters, rettype2, parameters2)
Definition: inet.h:309
#define _GL_WARN_ON_USE(function, message)
Definition: inet.h:474
_GL_CXXALIAS_SYS(mbsinit, int,(const mbstate_t *ps))
#define mbrtowc
Definition: wchar.h:684