1 /* DO NOT EDIT! GENERATED AUTOMATICALLY! */
2 /* A substitute for ISO C99 <wchar.h>, for platforms that have issues.
4 Copyright (C) 2007-2011 Free Software Foundation, Inc.
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3, or (at your option)
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software Foundation,
18 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
20 /* Written by Eric Blake. */
23 * ISO C 99 <wchar.h> for platforms that have issues.
24 * <http://www.opengroup.org/susv3xbd/wchar.h.html>
26 * For now, this just ensures proper prerequisite inclusion order and
27 * the declaration of wcwidth().
31 #pragma GCC system_header
35 #if defined __need_mbstate_t || defined __need_wint_t || (defined __hpux && ((defined _INTTYPES_INCLUDED && !defined strtoimax) || defined _GL_JUST_INCLUDE_SYSTEM_WCHAR_H)) || defined _GL_ALREADY_INCLUDING_WCHAR_H
36 /* Special invocation convention:
37 - Inside glibc and uClibc header files.
38 - On HP-UX 11.00 we have a sequence of nested includes
39 <wchar.h> -> <stdlib.h> -> <stdint.h>, and the latter includes <wchar.h>,
40 once indirectly <stdint.h> -> <sys/types.h> -> <inttypes.h> -> <wchar.h>
41 and once directly. In both situations 'wint_t' is not yet defined,
42 therefore we cannot provide the function overrides; instead include only
43 the system's <wchar.h>.
44 - On IRIX 6.5, similarly, we have an include <wchar.h> -> <wctype.h>, and
45 the latter includes <wchar.h>. But here, we have no way to detect whether
46 <wctype.h> is completely included or is still being included. */
48 #include_next <wchar.h>
51 /* Normal invocation convention. */
55 #define _GL_ALREADY_INCLUDING_WCHAR_H
58 # include <features.h> /* for __GLIBC__ */
61 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
63 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
64 included before <wchar.h>.
65 In some builds of uClibc, <wchar.h> is nonexistent and wchar_t is defined
67 But avoid namespace pollution on glibc systems. */
68 #if !(defined __GLIBC__ && !defined __UCLIBC__)
76 /* Include the original <wchar.h> if it exists.
77 Some builds of uClibc lack it. */
78 /* The include_next requires a split double-inclusion guard. */
80 # include_next <wchar.h>
83 #undef _GL_ALREADY_INCLUDING_WCHAR_H
88 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
92 /* The three most frequent use cases of these macros are:
94 * For providing a substitute for a function that is missing on some
95 platforms, but is declared and works fine on the platforms on which
100 _GL_FUNCDECL_SYS (foo, ...);
102 _GL_CXXALIAS_SYS (foo, ...);
103 _GL_CXXALIASWARN (foo);
104 #elif defined GNULIB_POSIXCHECK
108 * For providing a replacement for a function that exists on all platforms,
109 but is broken/insufficient and needs to be replaced on some platforms:
113 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
117 _GL_FUNCDECL_RPL (foo, ...);
118 _GL_CXXALIAS_RPL (foo, ...);
120 _GL_CXXALIAS_SYS (foo, ...);
122 _GL_CXXALIASWARN (foo);
123 #elif defined GNULIB_POSIXCHECK
127 * For providing a replacement for a function that exists on some platforms
128 but is broken/insufficient and needs to be replaced on some of them and
129 is additionally either missing or undeclared on some other platforms:
133 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
137 _GL_FUNCDECL_RPL (foo, ...);
138 _GL_CXXALIAS_RPL (foo, ...);
140 # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@
141 _GL_FUNCDECL_SYS (foo, ...);
143 _GL_CXXALIAS_SYS (foo, ...);
145 _GL_CXXALIASWARN (foo);
146 #elif defined GNULIB_POSIXCHECK
151 /* _GL_EXTERN_C declaration;
152 performs the declaration with C linkage. */
153 #if defined __cplusplus
154 # define _GL_EXTERN_C extern "C"
156 # define _GL_EXTERN_C extern
159 /* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes);
160 declares a replacement function, named rpl_func, with the given prototype,
161 consisting of return type, parameters, and attributes.
163 _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...)
164 _GL_ARG_NONNULL ((1)));
166 #define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \
167 _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes)
168 #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \
169 _GL_EXTERN_C rettype rpl_func parameters_and_attributes
171 /* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes);
172 declares the system function, named func, with the given prototype,
173 consisting of return type, parameters, and attributes.
175 _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...)
176 _GL_ARG_NONNULL ((1)));
178 #define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \
179 _GL_EXTERN_C rettype func parameters_and_attributes
181 /* _GL_CXXALIAS_RPL (func, rettype, parameters);
182 declares a C++ alias called GNULIB_NAMESPACE::func
183 that redirects to rpl_func, if GNULIB_NAMESPACE is defined.
185 _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...));
187 #define _GL_CXXALIAS_RPL(func,rettype,parameters) \
188 _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters)
189 #if defined __cplusplus && defined GNULIB_NAMESPACE
190 # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
191 namespace GNULIB_NAMESPACE \
193 rettype (*const func) parameters = ::rpl_func; \
195 _GL_EXTERN_C int _gl_cxxalias_dummy
197 # define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
198 _GL_EXTERN_C int _gl_cxxalias_dummy
201 /* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters);
202 is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters);
203 except that the C function rpl_func may have a slightly different
204 declaration. A cast is used to silence the "invalid conversion" error
205 that would otherwise occur. */
206 #if defined __cplusplus && defined GNULIB_NAMESPACE
207 # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
208 namespace GNULIB_NAMESPACE \
210 rettype (*const func) parameters = \
211 reinterpret_cast<rettype(*)parameters>(::rpl_func); \
213 _GL_EXTERN_C int _gl_cxxalias_dummy
215 # define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
216 _GL_EXTERN_C int _gl_cxxalias_dummy
219 /* _GL_CXXALIAS_SYS (func, rettype, parameters);
220 declares a C++ alias called GNULIB_NAMESPACE::func
221 that redirects to the system provided function func, if GNULIB_NAMESPACE
224 _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...));
226 #if defined __cplusplus && defined GNULIB_NAMESPACE
227 /* If we were to write
228 rettype (*const func) parameters = ::func;
229 like above in _GL_CXXALIAS_RPL_1, the compiler could optimize calls
230 better (remove an indirection through a 'static' pointer variable),
231 but then the _GL_CXXALIASWARN macro below would cause a warning not only
232 for uses of ::func but also for uses of GNULIB_NAMESPACE::func. */
233 # define _GL_CXXALIAS_SYS(func,rettype,parameters) \
234 namespace GNULIB_NAMESPACE \
236 static rettype (*func) parameters = ::func; \
238 _GL_EXTERN_C int _gl_cxxalias_dummy
240 # define _GL_CXXALIAS_SYS(func,rettype,parameters) \
241 _GL_EXTERN_C int _gl_cxxalias_dummy
244 /* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters);
245 is like _GL_CXXALIAS_SYS (func, rettype, parameters);
246 except that the C function func may have a slightly different declaration.
247 A cast is used to silence the "invalid conversion" error that would
249 #if defined __cplusplus && defined GNULIB_NAMESPACE
250 # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
251 namespace GNULIB_NAMESPACE \
253 static rettype (*func) parameters = \
254 reinterpret_cast<rettype(*)parameters>(::func); \
256 _GL_EXTERN_C int _gl_cxxalias_dummy
258 # define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
259 _GL_EXTERN_C int _gl_cxxalias_dummy
262 /* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2);
263 is like _GL_CXXALIAS_SYS (func, rettype, parameters);
264 except that the C function is picked among a set of overloaded functions,
265 namely the one with rettype2 and parameters2. Two consecutive casts
266 are used to silence the "cannot find a match" and "invalid conversion"
267 errors that would otherwise occur. */
268 #if defined __cplusplus && defined GNULIB_NAMESPACE
269 /* The outer cast must be a reinterpret_cast.
270 The inner cast: When the function is defined as a set of overloaded
271 functions, it works as a static_cast<>, choosing the designated variant.
272 When the function is defined as a single variant, it works as a
273 reinterpret_cast<>. The parenthesized cast syntax works both ways. */
274 # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
275 namespace GNULIB_NAMESPACE \
277 static rettype (*func) parameters = \
278 reinterpret_cast<rettype(*)parameters>( \
279 (rettype2(*)parameters2)(::func)); \
281 _GL_EXTERN_C int _gl_cxxalias_dummy
283 # define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
284 _GL_EXTERN_C int _gl_cxxalias_dummy
287 /* _GL_CXXALIASWARN (func);
288 causes a warning to be emitted when ::func is used but not when
289 GNULIB_NAMESPACE::func is used. func must be defined without overloaded
291 #if defined __cplusplus && defined GNULIB_NAMESPACE
292 # define _GL_CXXALIASWARN(func) \
293 _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE)
294 # define _GL_CXXALIASWARN_1(func,namespace) \
295 _GL_CXXALIASWARN_2 (func, namespace)
296 /* To work around GCC bug <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
297 we enable the warning only when not optimizing. */
299 # define _GL_CXXALIASWARN_2(func,namespace) \
300 _GL_WARN_ON_USE (func, \
301 "The symbol ::" #func " refers to the system function. " \
302 "Use " #namespace "::" #func " instead.")
303 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
304 # define _GL_CXXALIASWARN_2(func,namespace) \
305 extern __typeof__ (func) func
307 # define _GL_CXXALIASWARN_2(func,namespace) \
308 _GL_EXTERN_C int _gl_cxxalias_dummy
311 # define _GL_CXXALIASWARN(func) \
312 _GL_EXTERN_C int _gl_cxxalias_dummy
315 /* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes);
316 causes a warning to be emitted when the given overloaded variant of ::func
317 is used but not when GNULIB_NAMESPACE::func is used. */
318 #if defined __cplusplus && defined GNULIB_NAMESPACE
319 # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
320 _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \
322 # define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \
323 _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace)
324 /* To work around GCC bug <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
325 we enable the warning only when not optimizing. */
327 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
328 _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \
329 "The symbol ::" #func " refers to the system function. " \
330 "Use " #namespace "::" #func " instead.")
331 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
332 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
333 extern __typeof__ (func) func
335 # define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
336 _GL_EXTERN_C int _gl_cxxalias_dummy
339 # define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
340 _GL_EXTERN_C int _gl_cxxalias_dummy
343 #endif /* _GL_CXXDEFS_H */
345 /* The definition of _GL_ARG_NONNULL is copied here. */
346 /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools
347 that the values passed as arguments n, ..., m must be non-NULL pointers.
348 n = 1 stands for the first argument, n = 2 for the second argument etc. */
349 #ifndef _GL_ARG_NONNULL
350 # if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3
351 # define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params))
353 # define _GL_ARG_NONNULL(params)
357 /* The definition of _GL_WARN_ON_USE is copied here. */
358 #ifndef _GL_WARN_ON_USE
360 # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
361 /* A compiler attribute is available in gcc versions 4.3.0 and later. */
362 # define _GL_WARN_ON_USE(function, message) \
363 extern __typeof__ (function) function __attribute__ ((__warning__ (message)))
364 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
365 /* Verify the existence of the function. */
366 # define _GL_WARN_ON_USE(function, message) \
367 extern __typeof__ (function) function
368 # else /* Unsupported. */
369 # define _GL_WARN_ON_USE(function, message) \
370 _GL_WARN_EXTERN_C int _gl_warn_on_use
374 /* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string")
375 is like _GL_WARN_ON_USE (function, "string"), except that the function is
376 declared with the given prototype, consisting of return type, parameters,
378 This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does
379 not work in this case. */
380 #ifndef _GL_WARN_ON_USE_CXX
381 # if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
382 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
383 extern rettype function parameters_and_attributes \
384 __attribute__ ((__warning__ (msg)))
385 # elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
386 /* Verify the existence of the function. */
387 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
388 extern rettype function parameters_and_attributes
389 # else /* Unsupported. */
390 # define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \
391 _GL_WARN_EXTERN_C int _gl_warn_on_use
395 /* _GL_WARN_EXTERN_C declaration;
396 performs the declaration with C linkage. */
397 #ifndef _GL_WARN_EXTERN_C
398 # if defined __cplusplus
399 # define _GL_WARN_EXTERN_C extern "C"
401 # define _GL_WARN_EXTERN_C extern
406 /* Define wint_t and WEOF. (Also done in wctype.in.h.) */
407 #if !1 && !defined wint_t
414 # define WEOF ((wint_t) -1)
419 /* Override mbstate_t if it is too small.
420 On IRIX 6.5, sizeof (mbstate_t) == 1, which is not sufficient for
421 implementing mbrtowc for encodings like UTF-8. */
423 # if !GNULIB_defined_mbstate_t
424 typedef int rpl_mbstate_t
;
426 # define mbstate_t rpl_mbstate_t
427 # define GNULIB_defined_mbstate_t 1
432 /* Convert a single-byte character to a wide character. */
435 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
437 # define btowc rpl_btowc
439 _GL_FUNCDECL_RPL (btowc
, wint_t, (int c
));
440 _GL_CXXALIAS_RPL (btowc
, wint_t, (int c
));
443 _GL_FUNCDECL_SYS (btowc
, wint_t, (int c
));
445 _GL_CXXALIAS_SYS (btowc
, wint_t, (int c
));
447 _GL_CXXALIASWARN (btowc
);
448 #elif defined GNULIB_POSIXCHECK
450 # if HAVE_RAW_DECL_BTOWC
451 _GL_WARN_ON_USE (btowc
, "btowc is unportable - "
452 "use gnulib module btowc for portability");
457 /* Convert a wide character to a single-byte character. */
460 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
462 # define wctob rpl_wctob
464 _GL_FUNCDECL_RPL (wctob
, int, (wint_t wc
));
465 _GL_CXXALIAS_RPL (wctob
, int, (wint_t wc
));
467 # if !defined wctob && !1
468 /* wctob is provided by gnulib, or wctob exists but is not declared. */
469 _GL_FUNCDECL_SYS (wctob
, int, (wint_t wc
));
471 _GL_CXXALIAS_SYS (wctob
, int, (wint_t wc
));
473 _GL_CXXALIASWARN (wctob
);
474 #elif defined GNULIB_POSIXCHECK
476 # if HAVE_RAW_DECL_WCTOB
477 _GL_WARN_ON_USE (wctob
, "wctob is unportable - "
478 "use gnulib module wctob for portability");
483 /* Test whether *PS is in the initial state. */
486 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
488 # define mbsinit rpl_mbsinit
490 _GL_FUNCDECL_RPL (mbsinit
, int, (const mbstate_t *ps
));
491 _GL_CXXALIAS_RPL (mbsinit
, int, (const mbstate_t *ps
));
494 _GL_FUNCDECL_SYS (mbsinit
, int, (const mbstate_t *ps
));
496 _GL_CXXALIAS_SYS (mbsinit
, int, (const mbstate_t *ps
));
498 _GL_CXXALIASWARN (mbsinit
);
499 #elif defined GNULIB_POSIXCHECK
501 # if HAVE_RAW_DECL_MBSINIT
502 _GL_WARN_ON_USE (mbsinit
, "mbsinit is unportable - "
503 "use gnulib module mbsinit for portability");
508 /* Convert a multibyte character to a wide character. */
511 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
513 # define mbrtowc rpl_mbrtowc
515 _GL_FUNCDECL_RPL (mbrtowc
, size_t,
516 (wchar_t *pwc
, const char *s
, size_t n
, mbstate_t *ps
));
517 _GL_CXXALIAS_RPL (mbrtowc
, size_t,
518 (wchar_t *pwc
, const char *s
, size_t n
, mbstate_t *ps
));
521 _GL_FUNCDECL_SYS (mbrtowc
, size_t,
522 (wchar_t *pwc
, const char *s
, size_t n
, mbstate_t *ps
));
524 _GL_CXXALIAS_SYS (mbrtowc
, size_t,
525 (wchar_t *pwc
, const char *s
, size_t n
, mbstate_t *ps
));
527 _GL_CXXALIASWARN (mbrtowc
);
528 #elif defined GNULIB_POSIXCHECK
530 # if HAVE_RAW_DECL_MBRTOWC
531 _GL_WARN_ON_USE (mbrtowc
, "mbrtowc is unportable - "
532 "use gnulib module mbrtowc for portability");
537 /* Recognize a multibyte character. */
540 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
542 # define mbrlen rpl_mbrlen
544 _GL_FUNCDECL_RPL (mbrlen
, size_t, (const char *s
, size_t n
, mbstate_t *ps
));
545 _GL_CXXALIAS_RPL (mbrlen
, size_t, (const char *s
, size_t n
, mbstate_t *ps
));
548 _GL_FUNCDECL_SYS (mbrlen
, size_t, (const char *s
, size_t n
, mbstate_t *ps
));
550 _GL_CXXALIAS_SYS (mbrlen
, size_t, (const char *s
, size_t n
, mbstate_t *ps
));
552 _GL_CXXALIASWARN (mbrlen
);
553 #elif defined GNULIB_POSIXCHECK
555 # if HAVE_RAW_DECL_MBRLEN
556 _GL_WARN_ON_USE (mbrlen
, "mbrlen is unportable - "
557 "use gnulib module mbrlen for portability");
562 /* Convert a string to a wide string. */
565 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
567 # define mbsrtowcs rpl_mbsrtowcs
569 _GL_FUNCDECL_RPL (mbsrtowcs
, size_t,
570 (wchar_t *dest
, const char **srcp
, size_t len
, mbstate_t *ps
)
571 _GL_ARG_NONNULL ((2)));
572 _GL_CXXALIAS_RPL (mbsrtowcs
, size_t,
573 (wchar_t *dest
, const char **srcp
, size_t len
,
577 _GL_FUNCDECL_SYS (mbsrtowcs
, size_t,
578 (wchar_t *dest
, const char **srcp
, size_t len
, mbstate_t *ps
)
579 _GL_ARG_NONNULL ((2)));
581 _GL_CXXALIAS_SYS (mbsrtowcs
, size_t,
582 (wchar_t *dest
, const char **srcp
, size_t len
,
585 _GL_CXXALIASWARN (mbsrtowcs
);
586 #elif defined GNULIB_POSIXCHECK
588 # if HAVE_RAW_DECL_MBSRTOWCS
589 _GL_WARN_ON_USE (mbsrtowcs
, "mbsrtowcs is unportable - "
590 "use gnulib module mbsrtowcs for portability");
595 /* Convert a string to a wide string. */
598 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
600 # define mbsnrtowcs rpl_mbsnrtowcs
602 _GL_FUNCDECL_RPL (mbsnrtowcs
, size_t,
603 (wchar_t *dest
, const char **srcp
, size_t srclen
, size_t len
,
605 _GL_ARG_NONNULL ((2)));
606 _GL_CXXALIAS_RPL (mbsnrtowcs
, size_t,
607 (wchar_t *dest
, const char **srcp
, size_t srclen
, size_t len
,
611 _GL_FUNCDECL_SYS (mbsnrtowcs
, size_t,
612 (wchar_t *dest
, const char **srcp
, size_t srclen
, size_t len
,
614 _GL_ARG_NONNULL ((2)));
616 _GL_CXXALIAS_SYS (mbsnrtowcs
, size_t,
617 (wchar_t *dest
, const char **srcp
, size_t srclen
, size_t len
,
620 _GL_CXXALIASWARN (mbsnrtowcs
);
621 #elif defined GNULIB_POSIXCHECK
623 # if HAVE_RAW_DECL_MBSNRTOWCS
624 _GL_WARN_ON_USE (mbsnrtowcs
, "mbsnrtowcs is unportable - "
625 "use gnulib module mbsnrtowcs for portability");
630 /* Convert a wide character to a multibyte character. */
633 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
635 # define wcrtomb rpl_wcrtomb
637 _GL_FUNCDECL_RPL (wcrtomb
, size_t, (char *s
, wchar_t wc
, mbstate_t *ps
));
638 _GL_CXXALIAS_RPL (wcrtomb
, size_t, (char *s
, wchar_t wc
, mbstate_t *ps
));
641 _GL_FUNCDECL_SYS (wcrtomb
, size_t, (char *s
, wchar_t wc
, mbstate_t *ps
));
643 _GL_CXXALIAS_SYS (wcrtomb
, size_t, (char *s
, wchar_t wc
, mbstate_t *ps
));
645 _GL_CXXALIASWARN (wcrtomb
);
646 #elif defined GNULIB_POSIXCHECK
648 # if HAVE_RAW_DECL_WCRTOMB
649 _GL_WARN_ON_USE (wcrtomb
, "wcrtomb is unportable - "
650 "use gnulib module wcrtomb for portability");
655 /* Convert a wide string to a string. */
658 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
660 # define wcsrtombs rpl_wcsrtombs
662 _GL_FUNCDECL_RPL (wcsrtombs
, size_t,
663 (char *dest
, const wchar_t **srcp
, size_t len
, mbstate_t *ps
)
664 _GL_ARG_NONNULL ((2)));
665 _GL_CXXALIAS_RPL (wcsrtombs
, size_t,
666 (char *dest
, const wchar_t **srcp
, size_t len
,
670 _GL_FUNCDECL_SYS (wcsrtombs
, size_t,
671 (char *dest
, const wchar_t **srcp
, size_t len
, mbstate_t *ps
)
672 _GL_ARG_NONNULL ((2)));
674 _GL_CXXALIAS_SYS (wcsrtombs
, size_t,
675 (char *dest
, const wchar_t **srcp
, size_t len
,
678 _GL_CXXALIASWARN (wcsrtombs
);
679 #elif defined GNULIB_POSIXCHECK
681 # if HAVE_RAW_DECL_WCSRTOMBS
682 _GL_WARN_ON_USE (wcsrtombs
, "wcsrtombs is unportable - "
683 "use gnulib module wcsrtombs for portability");
688 /* Convert a wide string to a string. */
691 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
693 # define wcsnrtombs rpl_wcsnrtombs
695 _GL_FUNCDECL_RPL (wcsnrtombs
, size_t,
696 (char *dest
, const wchar_t **srcp
, size_t srclen
, size_t len
,
698 _GL_ARG_NONNULL ((2)));
699 _GL_CXXALIAS_RPL (wcsnrtombs
, size_t,
700 (char *dest
, const wchar_t **srcp
, size_t srclen
, size_t len
,
704 _GL_FUNCDECL_SYS (wcsnrtombs
, size_t,
705 (char *dest
, const wchar_t **srcp
, size_t srclen
, size_t len
,
707 _GL_ARG_NONNULL ((2)));
709 _GL_CXXALIAS_SYS (wcsnrtombs
, size_t,
710 (char *dest
, const wchar_t **srcp
, size_t srclen
, size_t len
,
713 _GL_CXXALIASWARN (wcsnrtombs
);
714 #elif defined GNULIB_POSIXCHECK
716 # if HAVE_RAW_DECL_WCSNRTOMBS
717 _GL_WARN_ON_USE (wcsnrtombs
, "wcsnrtombs is unportable - "
718 "use gnulib module wcsnrtombs for portability");
723 /* Return the number of screen columns needed for WC. */
726 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
728 # define wcwidth rpl_wcwidth
730 _GL_FUNCDECL_RPL (wcwidth
, int, (wchar_t));
731 _GL_CXXALIAS_RPL (wcwidth
, int, (wchar_t));
734 /* wcwidth exists but is not declared. */
735 _GL_FUNCDECL_SYS (wcwidth
, int, (wchar_t));
737 _GL_CXXALIAS_SYS (wcwidth
, int, (wchar_t));
739 _GL_CXXALIASWARN (wcwidth
);
740 #elif defined GNULIB_POSIXCHECK
742 # if HAVE_RAW_DECL_WCWIDTH
743 _GL_WARN_ON_USE (wcwidth
, "wcwidth is unportable - "
744 "use gnulib module wcwidth for portability");
749 /* Search N wide characters of S for C. */
752 _GL_FUNCDECL_SYS (wmemchr
, wchar_t *, (const wchar_t *s
, wchar_t c
, size_t n
));
754 /* On some systems, this function is defined as an overloaded function:
756 const wchar_t * std::wmemchr (const wchar_t *, wchar_t, size_t);
757 wchar_t * std::wmemchr (wchar_t *, wchar_t, size_t);
759 _GL_CXXALIAS_SYS_CAST2 (wmemchr
,
760 wchar_t *, (const wchar_t *, wchar_t, size_t),
761 const wchar_t *, (const wchar_t *, wchar_t, size_t));
762 # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
763 && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
764 _GL_CXXALIASWARN1 (wmemchr
, wchar_t *, (wchar_t *s
, wchar_t c
, size_t n
));
765 _GL_CXXALIASWARN1 (wmemchr
, const wchar_t *,
766 (const wchar_t *s
, wchar_t c
, size_t n
));
768 _GL_CXXALIASWARN (wmemchr
);
770 #elif defined GNULIB_POSIXCHECK
772 # if HAVE_RAW_DECL_WMEMCHR
773 _GL_WARN_ON_USE (wmemchr
, "wmemchr is unportable - "
774 "use gnulib module wmemchr for portability");
779 /* Compare N wide characters of S1 and S2. */
782 _GL_FUNCDECL_SYS (wmemcmp
, int,
783 (const wchar_t *s1
, const wchar_t *s2
, size_t n
));
785 _GL_CXXALIAS_SYS (wmemcmp
, int,
786 (const wchar_t *s1
, const wchar_t *s2
, size_t n
));
787 _GL_CXXALIASWARN (wmemcmp
);
788 #elif defined GNULIB_POSIXCHECK
790 # if HAVE_RAW_DECL_WMEMCMP
791 _GL_WARN_ON_USE (wmemcmp
, "wmemcmp is unportable - "
792 "use gnulib module wmemcmp for portability");
797 /* Copy N wide characters of SRC to DEST. */
800 _GL_FUNCDECL_SYS (wmemcpy
, wchar_t *,
801 (wchar_t *dest
, const wchar_t *src
, size_t n
));
803 _GL_CXXALIAS_SYS (wmemcpy
, wchar_t *,
804 (wchar_t *dest
, const wchar_t *src
, size_t n
));
805 _GL_CXXALIASWARN (wmemcpy
);
806 #elif defined GNULIB_POSIXCHECK
808 # if HAVE_RAW_DECL_WMEMCPY
809 _GL_WARN_ON_USE (wmemcpy
, "wmemcpy is unportable - "
810 "use gnulib module wmemcpy for portability");
815 /* Copy N wide characters of SRC to DEST, guaranteeing correct behavior for
816 overlapping memory areas. */
819 _GL_FUNCDECL_SYS (wmemmove
, wchar_t *,
820 (wchar_t *dest
, const wchar_t *src
, size_t n
));
822 _GL_CXXALIAS_SYS (wmemmove
, wchar_t *,
823 (wchar_t *dest
, const wchar_t *src
, size_t n
));
824 _GL_CXXALIASWARN (wmemmove
);
825 #elif defined GNULIB_POSIXCHECK
827 # if HAVE_RAW_DECL_WMEMMOVE
828 _GL_WARN_ON_USE (wmemmove
, "wmemmove is unportable - "
829 "use gnulib module wmemmove for portability");
834 /* Set N wide characters of S to C. */
837 _GL_FUNCDECL_SYS (wmemset
, wchar_t *, (wchar_t *s
, wchar_t c
, size_t n
));
839 _GL_CXXALIAS_SYS (wmemset
, wchar_t *, (wchar_t *s
, wchar_t c
, size_t n
));
840 _GL_CXXALIASWARN (wmemset
);
841 #elif defined GNULIB_POSIXCHECK
843 # if HAVE_RAW_DECL_WMEMSET
844 _GL_WARN_ON_USE (wmemset
, "wmemset is unportable - "
845 "use gnulib module wmemset for portability");
850 /* Return the number of wide characters in S. */
853 _GL_FUNCDECL_SYS (wcslen
, size_t, (const wchar_t *s
));
855 _GL_CXXALIAS_SYS (wcslen
, size_t, (const wchar_t *s
));
856 _GL_CXXALIASWARN (wcslen
);
857 #elif defined GNULIB_POSIXCHECK
859 # if HAVE_RAW_DECL_WCSLEN
860 _GL_WARN_ON_USE (wcslen
, "wcslen is unportable - "
861 "use gnulib module wcslen for portability");
866 /* Return the number of wide characters in S, but at most MAXLEN. */
869 _GL_FUNCDECL_SYS (wcsnlen
, size_t, (const wchar_t *s
, size_t maxlen
));
871 _GL_CXXALIAS_SYS (wcsnlen
, size_t, (const wchar_t *s
, size_t maxlen
));
872 _GL_CXXALIASWARN (wcsnlen
);
873 #elif defined GNULIB_POSIXCHECK
875 # if HAVE_RAW_DECL_WCSNLEN
876 _GL_WARN_ON_USE (wcsnlen
, "wcsnlen is unportable - "
877 "use gnulib module wcsnlen for portability");
882 /* Copy SRC to DEST. */
885 _GL_FUNCDECL_SYS (wcscpy
, wchar_t *, (wchar_t *dest
, const wchar_t *src
));
887 _GL_CXXALIAS_SYS (wcscpy
, wchar_t *, (wchar_t *dest
, const wchar_t *src
));
888 _GL_CXXALIASWARN (wcscpy
);
889 #elif defined GNULIB_POSIXCHECK
891 # if HAVE_RAW_DECL_WCSCPY
892 _GL_WARN_ON_USE (wcscpy
, "wcscpy is unportable - "
893 "use gnulib module wcscpy for portability");
898 /* Copy SRC to DEST, returning the address of the terminating L'\0' in DEST. */
901 _GL_FUNCDECL_SYS (wcpcpy
, wchar_t *, (wchar_t *dest
, const wchar_t *src
));
903 _GL_CXXALIAS_SYS (wcpcpy
, wchar_t *, (wchar_t *dest
, const wchar_t *src
));
904 _GL_CXXALIASWARN (wcpcpy
);
905 #elif defined GNULIB_POSIXCHECK
907 # if HAVE_RAW_DECL_WCPCPY
908 _GL_WARN_ON_USE (wcpcpy
, "wcpcpy is unportable - "
909 "use gnulib module wcpcpy for portability");
914 /* Copy no more than N wide characters of SRC to DEST. */
917 _GL_FUNCDECL_SYS (wcsncpy
, wchar_t *,
918 (wchar_t *dest
, const wchar_t *src
, size_t n
));
920 _GL_CXXALIAS_SYS (wcsncpy
, wchar_t *,
921 (wchar_t *dest
, const wchar_t *src
, size_t n
));
922 _GL_CXXALIASWARN (wcsncpy
);
923 #elif defined GNULIB_POSIXCHECK
925 # if HAVE_RAW_DECL_WCSNCPY
926 _GL_WARN_ON_USE (wcsncpy
, "wcsncpy is unportable - "
927 "use gnulib module wcsncpy for portability");
932 /* Copy no more than N characters of SRC to DEST, returning the address of
933 the last character written into DEST. */
936 _GL_FUNCDECL_SYS (wcpncpy
, wchar_t *,
937 (wchar_t *dest
, const wchar_t *src
, size_t n
));
939 _GL_CXXALIAS_SYS (wcpncpy
, wchar_t *,
940 (wchar_t *dest
, const wchar_t *src
, size_t n
));
941 _GL_CXXALIASWARN (wcpncpy
);
942 #elif defined GNULIB_POSIXCHECK
944 # if HAVE_RAW_DECL_WCPNCPY
945 _GL_WARN_ON_USE (wcpncpy
, "wcpncpy is unportable - "
946 "use gnulib module wcpncpy for portability");
951 /* Append SRC onto DEST. */
954 _GL_FUNCDECL_SYS (wcscat
, wchar_t *, (wchar_t *dest
, const wchar_t *src
));
956 _GL_CXXALIAS_SYS (wcscat
, wchar_t *, (wchar_t *dest
, const wchar_t *src
));
957 _GL_CXXALIASWARN (wcscat
);
958 #elif defined GNULIB_POSIXCHECK
960 # if HAVE_RAW_DECL_WCSCAT
961 _GL_WARN_ON_USE (wcscat
, "wcscat is unportable - "
962 "use gnulib module wcscat for portability");
967 /* Append no more than N wide characters of SRC onto DEST. */
970 _GL_FUNCDECL_SYS (wcsncat
, wchar_t *,
971 (wchar_t *dest
, const wchar_t *src
, size_t n
));
973 _GL_CXXALIAS_SYS (wcsncat
, wchar_t *,
974 (wchar_t *dest
, const wchar_t *src
, size_t n
));
975 _GL_CXXALIASWARN (wcsncat
);
976 #elif defined GNULIB_POSIXCHECK
978 # if HAVE_RAW_DECL_WCSNCAT
979 _GL_WARN_ON_USE (wcsncat
, "wcsncat is unportable - "
980 "use gnulib module wcsncat for portability");
985 /* Compare S1 and S2. */
988 _GL_FUNCDECL_SYS (wcscmp
, int, (const wchar_t *s1
, const wchar_t *s2
));
990 _GL_CXXALIAS_SYS (wcscmp
, int, (const wchar_t *s1
, const wchar_t *s2
));
991 _GL_CXXALIASWARN (wcscmp
);
992 #elif defined GNULIB_POSIXCHECK
994 # if HAVE_RAW_DECL_WCSCMP
995 _GL_WARN_ON_USE (wcscmp
, "wcscmp is unportable - "
996 "use gnulib module wcscmp for portability");
1001 /* Compare no more than N wide characters of S1 and S2. */
1004 _GL_FUNCDECL_SYS (wcsncmp
, int,
1005 (const wchar_t *s1
, const wchar_t *s2
, size_t n
));
1007 _GL_CXXALIAS_SYS (wcsncmp
, int,
1008 (const wchar_t *s1
, const wchar_t *s2
, size_t n
));
1009 _GL_CXXALIASWARN (wcsncmp
);
1010 #elif defined GNULIB_POSIXCHECK
1012 # if HAVE_RAW_DECL_WCSNCMP
1013 _GL_WARN_ON_USE (wcsncmp
, "wcsncmp is unportable - "
1014 "use gnulib module wcsncmp for portability");
1019 /* Compare S1 and S2, ignoring case. */
1022 _GL_FUNCDECL_SYS (wcscasecmp
, int, (const wchar_t *s1
, const wchar_t *s2
));
1024 _GL_CXXALIAS_SYS (wcscasecmp
, int, (const wchar_t *s1
, const wchar_t *s2
));
1025 _GL_CXXALIASWARN (wcscasecmp
);
1026 #elif defined GNULIB_POSIXCHECK
1028 # if HAVE_RAW_DECL_WCSCASECMP
1029 _GL_WARN_ON_USE (wcscasecmp
, "wcscasecmp is unportable - "
1030 "use gnulib module wcscasecmp for portability");
1035 /* Compare no more than N chars of S1 and S2, ignoring case. */
1038 _GL_FUNCDECL_SYS (wcsncasecmp
, int,
1039 (const wchar_t *s1
, const wchar_t *s2
, size_t n
));
1041 _GL_CXXALIAS_SYS (wcsncasecmp
, int,
1042 (const wchar_t *s1
, const wchar_t *s2
, size_t n
));
1043 _GL_CXXALIASWARN (wcsncasecmp
);
1044 #elif defined GNULIB_POSIXCHECK
1046 # if HAVE_RAW_DECL_WCSNCASECMP
1047 _GL_WARN_ON_USE (wcsncasecmp
, "wcsncasecmp is unportable - "
1048 "use gnulib module wcsncasecmp for portability");
1053 /* Compare S1 and S2, both interpreted as appropriate to the LC_COLLATE
1054 category of the current locale. */
1057 _GL_FUNCDECL_SYS (wcscoll
, int, (const wchar_t *s1
, const wchar_t *s2
));
1059 _GL_CXXALIAS_SYS (wcscoll
, int, (const wchar_t *s1
, const wchar_t *s2
));
1060 _GL_CXXALIASWARN (wcscoll
);
1061 #elif defined GNULIB_POSIXCHECK
1063 # if HAVE_RAW_DECL_WCSCOLL
1064 _GL_WARN_ON_USE (wcscoll
, "wcscoll is unportable - "
1065 "use gnulib module wcscoll for portability");
1070 /* Transform S2 into array pointed to by S1 such that if wcscmp is applied
1071 to two transformed strings the result is the as applying 'wcscoll' to the
1072 original strings. */
1075 _GL_FUNCDECL_SYS (wcsxfrm
, size_t, (wchar_t *s1
, const wchar_t *s2
, size_t n
));
1077 _GL_CXXALIAS_SYS (wcsxfrm
, size_t, (wchar_t *s1
, const wchar_t *s2
, size_t n
));
1078 _GL_CXXALIASWARN (wcsxfrm
);
1079 #elif defined GNULIB_POSIXCHECK
1081 # if HAVE_RAW_DECL_WCSXFRM
1082 _GL_WARN_ON_USE (wcsxfrm
, "wcsxfrm is unportable - "
1083 "use gnulib module wcsxfrm for portability");
1088 /* Duplicate S, returning an identical malloc'd string. */
1091 _GL_FUNCDECL_SYS (wcsdup
, wchar_t *, (const wchar_t *s
));
1093 _GL_CXXALIAS_SYS (wcsdup
, wchar_t *, (const wchar_t *s
));
1094 _GL_CXXALIASWARN (wcsdup
);
1095 #elif defined GNULIB_POSIXCHECK
1097 # if HAVE_RAW_DECL_WCSDUP
1098 _GL_WARN_ON_USE (wcsdup
, "wcsdup is unportable - "
1099 "use gnulib module wcsdup for portability");
1104 /* Find the first occurrence of WC in WCS. */
1107 _GL_FUNCDECL_SYS (wcschr
, wchar_t *, (const wchar_t *wcs
, wchar_t wc
));
1109 /* On some systems, this function is defined as an overloaded function:
1111 const wchar_t * std::wcschr (const wchar_t *, wchar_t);
1112 wchar_t * std::wcschr (wchar_t *, wchar_t);
1114 _GL_CXXALIAS_SYS_CAST2 (wcschr
,
1115 wchar_t *, (const wchar_t *, wchar_t),
1116 const wchar_t *, (const wchar_t *, wchar_t));
1117 # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
1118 && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
1119 _GL_CXXALIASWARN1 (wcschr
, wchar_t *, (wchar_t *wcs
, wchar_t wc
));
1120 _GL_CXXALIASWARN1 (wcschr
, const wchar_t *, (const wchar_t *wcs
, wchar_t wc
));
1122 _GL_CXXALIASWARN (wcschr
);
1124 #elif defined GNULIB_POSIXCHECK
1126 # if HAVE_RAW_DECL_WCSCHR
1127 _GL_WARN_ON_USE (wcschr
, "wcschr is unportable - "
1128 "use gnulib module wcschr for portability");
1133 /* Find the last occurrence of WC in WCS. */
1136 _GL_FUNCDECL_SYS (wcsrchr
, wchar_t *, (const wchar_t *wcs
, wchar_t wc
));
1138 /* On some systems, this function is defined as an overloaded function:
1140 const wchar_t * std::wcsrchr (const wchar_t *, wchar_t);
1141 wchar_t * std::wcsrchr (wchar_t *, wchar_t);
1143 _GL_CXXALIAS_SYS_CAST2 (wcsrchr
,
1144 wchar_t *, (const wchar_t *, wchar_t),
1145 const wchar_t *, (const wchar_t *, wchar_t));
1146 # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
1147 && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
1148 _GL_CXXALIASWARN1 (wcsrchr
, wchar_t *, (wchar_t *wcs
, wchar_t wc
));
1149 _GL_CXXALIASWARN1 (wcsrchr
, const wchar_t *, (const wchar_t *wcs
, wchar_t wc
));
1151 _GL_CXXALIASWARN (wcsrchr
);
1153 #elif defined GNULIB_POSIXCHECK
1155 # if HAVE_RAW_DECL_WCSRCHR
1156 _GL_WARN_ON_USE (wcsrchr
, "wcsrchr is unportable - "
1157 "use gnulib module wcsrchr for portability");
1162 /* Return the length of the initial segmet of WCS which consists entirely
1163 of wide characters not in REJECT. */
1166 _GL_FUNCDECL_SYS (wcscspn
, size_t, (const wchar_t *wcs
, const wchar_t *reject
));
1168 _GL_CXXALIAS_SYS (wcscspn
, size_t, (const wchar_t *wcs
, const wchar_t *reject
));
1169 _GL_CXXALIASWARN (wcscspn
);
1170 #elif defined GNULIB_POSIXCHECK
1172 # if HAVE_RAW_DECL_WCSCSPN
1173 _GL_WARN_ON_USE (wcscspn
, "wcscspn is unportable - "
1174 "use gnulib module wcscspn for portability");
1179 /* Return the length of the initial segmet of WCS which consists entirely
1180 of wide characters in ACCEPT. */
1183 _GL_FUNCDECL_SYS (wcsspn
, size_t, (const wchar_t *wcs
, const wchar_t *accept
));
1185 _GL_CXXALIAS_SYS (wcsspn
, size_t, (const wchar_t *wcs
, const wchar_t *accept
));
1186 _GL_CXXALIASWARN (wcsspn
);
1187 #elif defined GNULIB_POSIXCHECK
1189 # if HAVE_RAW_DECL_WCSSPN
1190 _GL_WARN_ON_USE (wcsspn
, "wcsspn is unportable - "
1191 "use gnulib module wcsspn for portability");
1196 /* Find the first occurrence in WCS of any character in ACCEPT. */
1199 _GL_FUNCDECL_SYS (wcspbrk
, wchar_t *,
1200 (const wchar_t *wcs
, const wchar_t *accept
));
1202 /* On some systems, this function is defined as an overloaded function:
1204 const wchar_t * std::wcspbrk (const wchar_t *, const wchar_t *);
1205 wchar_t * std::wcspbrk (wchar_t *, const wchar_t *);
1207 _GL_CXXALIAS_SYS_CAST2 (wcspbrk
,
1208 wchar_t *, (const wchar_t *, const wchar_t *),
1209 const wchar_t *, (const wchar_t *, const wchar_t *));
1210 # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
1211 && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
1212 _GL_CXXALIASWARN1 (wcspbrk
, wchar_t *,
1213 (wchar_t *wcs
, const wchar_t *accept
));
1214 _GL_CXXALIASWARN1 (wcspbrk
, const wchar_t *,
1215 (const wchar_t *wcs
, const wchar_t *accept
));
1217 _GL_CXXALIASWARN (wcspbrk
);
1219 #elif defined GNULIB_POSIXCHECK
1221 # if HAVE_RAW_DECL_WCSPBRK
1222 _GL_WARN_ON_USE (wcspbrk
, "wcspbrk is unportable - "
1223 "use gnulib module wcspbrk for portability");
1228 /* Find the first occurrence of NEEDLE in HAYSTACK. */
1231 _GL_FUNCDECL_SYS (wcsstr
, wchar_t *,
1232 (const wchar_t *haystack
, const wchar_t *needle
));
1234 /* On some systems, this function is defined as an overloaded function:
1236 const wchar_t * std::wcsstr (const wchar_t *, const wchar_t *);
1237 wchar_t * std::wcsstr (wchar_t *, const wchar_t *);
1239 _GL_CXXALIAS_SYS_CAST2 (wcsstr
,
1240 wchar_t *, (const wchar_t *, const wchar_t *),
1241 const wchar_t *, (const wchar_t *, const wchar_t *));
1242 # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
1243 && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
1244 _GL_CXXALIASWARN1 (wcsstr
, wchar_t *,
1245 (wchar_t *haystack
, const wchar_t *needle
));
1246 _GL_CXXALIASWARN1 (wcsstr
, const wchar_t *,
1247 (const wchar_t *haystack
, const wchar_t *needle
));
1249 _GL_CXXALIASWARN (wcsstr
);
1251 #elif defined GNULIB_POSIXCHECK
1253 # if HAVE_RAW_DECL_WCSSTR
1254 _GL_WARN_ON_USE (wcsstr
, "wcsstr is unportable - "
1255 "use gnulib module wcsstr for portability");
1260 /* Divide WCS into tokens separated by characters in DELIM. */
1263 _GL_FUNCDECL_SYS (wcstok
, wchar_t *,
1264 (wchar_t *wcs
, const wchar_t *delim
, wchar_t **ptr
));
1266 _GL_CXXALIAS_SYS (wcstok
, wchar_t *,
1267 (wchar_t *wcs
, const wchar_t *delim
, wchar_t **ptr
));
1268 _GL_CXXALIASWARN (wcstok
);
1269 #elif defined GNULIB_POSIXCHECK
1271 # if HAVE_RAW_DECL_WCSTOK
1272 _GL_WARN_ON_USE (wcstok
, "wcstok is unportable - "
1273 "use gnulib module wcstok for portability");
1278 /* Determine number of column positions required for first N wide
1279 characters (or fewer if S ends before this) in S. */
1282 # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1284 # define wcswidth rpl_wcswidth
1286 _GL_FUNCDECL_RPL (wcswidth
, int, (const wchar_t *s
, size_t n
));
1287 _GL_CXXALIAS_RPL (wcswidth
, int, (const wchar_t *s
, size_t n
));
1290 _GL_FUNCDECL_SYS (wcswidth
, int, (const wchar_t *s
, size_t n
));
1292 _GL_CXXALIAS_SYS (wcswidth
, int, (const wchar_t *s
, size_t n
));
1294 _GL_CXXALIASWARN (wcswidth
);
1295 #elif defined GNULIB_POSIXCHECK
1297 # if HAVE_RAW_DECL_WCSWIDTH
1298 _GL_WARN_ON_USE (wcswidth
, "wcswidth is unportable - "
1299 "use gnulib module wcswidth for portability");
1304 #endif /* _GL_WCHAR_H */
1305 #endif /* _GL_WCHAR_H */