17abaaf6cc4deb360012c532ffda05acdfb0d0f3
[debian/tar] / gnu / wchar.in.h
1 /* -*- buffer-read-only: t -*- vi: set ro: */
2 /* DO NOT EDIT! GENERATED AUTOMATICALLY! */
3 /* A substitute for ISO C99 <wchar.h>, for platforms that have issues.
4
5    Copyright (C) 2007-2013 Free Software Foundation, Inc.
6
7    This program is free software; you can redistribute it and/or modify
8    it under the terms of the GNU General Public License as published by
9    the Free Software Foundation; either version 3, or (at your option)
10    any later version.
11
12    This program is distributed in the hope that it will be useful,
13    but WITHOUT ANY WARRANTY; without even the implied warranty of
14    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15    GNU General Public License for more details.
16
17    You should have received a copy of the GNU General Public License
18    along with this program; if not, see <http://www.gnu.org/licenses/>.  */
19
20 /* Written by Eric Blake.  */
21
22 /*
23  * ISO C 99 <wchar.h> for platforms that have issues.
24  * <http://www.opengroup.org/susv3xbd/wchar.h.html>
25  *
26  * For now, this just ensures proper prerequisite inclusion order and
27  * the declaration of wcwidth().
28  */
29
30 #if __GNUC__ >= 3
31 @PRAGMA_SYSTEM_HEADER@
32 #endif
33 @PRAGMA_COLUMNS@
34
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.  */
47
48 #@INCLUDE_NEXT@ @NEXT_WCHAR_H@
49
50 #else
51 /* Normal invocation convention.  */
52
53 #ifndef _@GUARD_PREFIX@_WCHAR_H
54
55 #define _GL_ALREADY_INCLUDING_WCHAR_H
56
57 #if @HAVE_FEATURES_H@
58 # include <features.h> /* for __GLIBC__ */
59 #endif
60
61 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
62    <wchar.h>.
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
66    by <stddef.h>.
67    But avoid namespace pollution on glibc systems.  */
68 #if !(defined __GLIBC__ && !defined __UCLIBC__)
69 # include <stddef.h>
70 #endif
71 #ifndef __GLIBC__
72 # include <stdio.h>
73 # include <time.h>
74 #endif
75
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.  */
79 #if @HAVE_WCHAR_H@
80 # @INCLUDE_NEXT@ @NEXT_WCHAR_H@
81 #endif
82
83 #undef _GL_ALREADY_INCLUDING_WCHAR_H
84
85 #ifndef _@GUARD_PREFIX@_WCHAR_H
86 #define _@GUARD_PREFIX@_WCHAR_H
87
88 /* The __attribute__ feature is available in gcc versions 2.5 and later.
89    The attribute __pure__ was added in gcc 2.96.  */
90 #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
91 # define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
92 #else
93 # define _GL_ATTRIBUTE_PURE /* empty */
94 #endif
95
96 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
97
98 /* The definition of _GL_ARG_NONNULL is copied here.  */
99
100 /* The definition of _GL_WARN_ON_USE is copied here.  */
101
102
103 /* Define wint_t and WEOF.  (Also done in wctype.in.h.)  */
104 #if !@HAVE_WINT_T@ && !defined wint_t
105 # define wint_t int
106 # ifndef WEOF
107 #  define WEOF -1
108 # endif
109 #else
110 /* MSVC defines wint_t as 'unsigned short' in <crtdefs.h>.
111    This is too small: ISO C 99 section 7.24.1.(2) says that wint_t must be
112    "unchanged by default argument promotions".  Override it.  */
113 # if defined _MSC_VER
114 #  if !GNULIB_defined_wint_t
115 #   include <crtdefs.h>
116 typedef unsigned int rpl_wint_t;
117 #   undef wint_t
118 #   define wint_t rpl_wint_t
119 #   define GNULIB_defined_wint_t 1
120 #  endif
121 # endif
122 # ifndef WEOF
123 #  define WEOF ((wint_t) -1)
124 # endif
125 #endif
126
127
128 /* Override mbstate_t if it is too small.
129    On IRIX 6.5, sizeof (mbstate_t) == 1, which is not sufficient for
130    implementing mbrtowc for encodings like UTF-8.  */
131 #if !(@HAVE_MBSINIT@ && @HAVE_MBRTOWC@) || @REPLACE_MBSTATE_T@
132 # if !GNULIB_defined_mbstate_t
133 typedef int rpl_mbstate_t;
134 #  undef mbstate_t
135 #  define mbstate_t rpl_mbstate_t
136 #  define GNULIB_defined_mbstate_t 1
137 # endif
138 #endif
139
140
141 /* Convert a single-byte character to a wide character.  */
142 #if @GNULIB_BTOWC@
143 # if @REPLACE_BTOWC@
144 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
145 #   undef btowc
146 #   define btowc rpl_btowc
147 #  endif
148 _GL_FUNCDECL_RPL (btowc, wint_t, (int c) _GL_ATTRIBUTE_PURE);
149 _GL_CXXALIAS_RPL (btowc, wint_t, (int c));
150 # else
151 #  if !@HAVE_BTOWC@
152 _GL_FUNCDECL_SYS (btowc, wint_t, (int c) _GL_ATTRIBUTE_PURE);
153 #  endif
154 _GL_CXXALIAS_SYS (btowc, wint_t, (int c));
155 # endif
156 _GL_CXXALIASWARN (btowc);
157 #elif defined GNULIB_POSIXCHECK
158 # undef btowc
159 # if HAVE_RAW_DECL_BTOWC
160 _GL_WARN_ON_USE (btowc, "btowc is unportable - "
161                  "use gnulib module btowc for portability");
162 # endif
163 #endif
164
165
166 /* Convert a wide character to a single-byte character.  */
167 #if @GNULIB_WCTOB@
168 # if @REPLACE_WCTOB@
169 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
170 #   undef wctob
171 #   define wctob rpl_wctob
172 #  endif
173 _GL_FUNCDECL_RPL (wctob, int, (wint_t wc) _GL_ATTRIBUTE_PURE);
174 _GL_CXXALIAS_RPL (wctob, int, (wint_t wc));
175 # else
176 #  if !defined wctob && !@HAVE_DECL_WCTOB@
177 /* wctob is provided by gnulib, or wctob exists but is not declared.  */
178 _GL_FUNCDECL_SYS (wctob, int, (wint_t wc) _GL_ATTRIBUTE_PURE);
179 #  endif
180 _GL_CXXALIAS_SYS (wctob, int, (wint_t wc));
181 # endif
182 _GL_CXXALIASWARN (wctob);
183 #elif defined GNULIB_POSIXCHECK
184 # undef wctob
185 # if HAVE_RAW_DECL_WCTOB
186 _GL_WARN_ON_USE (wctob, "wctob is unportable - "
187                  "use gnulib module wctob for portability");
188 # endif
189 #endif
190
191
192 /* Test whether *PS is in the initial state.  */
193 #if @GNULIB_MBSINIT@
194 # if @REPLACE_MBSINIT@
195 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
196 #   undef mbsinit
197 #   define mbsinit rpl_mbsinit
198 #  endif
199 _GL_FUNCDECL_RPL (mbsinit, int, (const mbstate_t *ps));
200 _GL_CXXALIAS_RPL (mbsinit, int, (const mbstate_t *ps));
201 # else
202 #  if !@HAVE_MBSINIT@
203 _GL_FUNCDECL_SYS (mbsinit, int, (const mbstate_t *ps));
204 #  endif
205 _GL_CXXALIAS_SYS (mbsinit, int, (const mbstate_t *ps));
206 # endif
207 _GL_CXXALIASWARN (mbsinit);
208 #elif defined GNULIB_POSIXCHECK
209 # undef mbsinit
210 # if HAVE_RAW_DECL_MBSINIT
211 _GL_WARN_ON_USE (mbsinit, "mbsinit is unportable - "
212                  "use gnulib module mbsinit for portability");
213 # endif
214 #endif
215
216
217 /* Convert a multibyte character to a wide character.  */
218 #if @GNULIB_MBRTOWC@
219 # if @REPLACE_MBRTOWC@
220 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
221 #   undef mbrtowc
222 #   define mbrtowc rpl_mbrtowc
223 #  endif
224 _GL_FUNCDECL_RPL (mbrtowc, size_t,
225                   (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps));
226 _GL_CXXALIAS_RPL (mbrtowc, size_t,
227                   (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps));
228 # else
229 #  if !@HAVE_MBRTOWC@
230 _GL_FUNCDECL_SYS (mbrtowc, size_t,
231                   (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps));
232 #  endif
233 _GL_CXXALIAS_SYS (mbrtowc, size_t,
234                   (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps));
235 # endif
236 _GL_CXXALIASWARN (mbrtowc);
237 #elif defined GNULIB_POSIXCHECK
238 # undef mbrtowc
239 # if HAVE_RAW_DECL_MBRTOWC
240 _GL_WARN_ON_USE (mbrtowc, "mbrtowc is unportable - "
241                  "use gnulib module mbrtowc for portability");
242 # endif
243 #endif
244
245
246 /* Recognize a multibyte character.  */
247 #if @GNULIB_MBRLEN@
248 # if @REPLACE_MBRLEN@
249 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
250 #   undef mbrlen
251 #   define mbrlen rpl_mbrlen
252 #  endif
253 _GL_FUNCDECL_RPL (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps));
254 _GL_CXXALIAS_RPL (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps));
255 # else
256 #  if !@HAVE_MBRLEN@
257 _GL_FUNCDECL_SYS (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps));
258 #  endif
259 _GL_CXXALIAS_SYS (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps));
260 # endif
261 _GL_CXXALIASWARN (mbrlen);
262 #elif defined GNULIB_POSIXCHECK
263 # undef mbrlen
264 # if HAVE_RAW_DECL_MBRLEN
265 _GL_WARN_ON_USE (mbrlen, "mbrlen is unportable - "
266                  "use gnulib module mbrlen for portability");
267 # endif
268 #endif
269
270
271 /* Convert a string to a wide string.  */
272 #if @GNULIB_MBSRTOWCS@
273 # if @REPLACE_MBSRTOWCS@
274 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
275 #   undef mbsrtowcs
276 #   define mbsrtowcs rpl_mbsrtowcs
277 #  endif
278 _GL_FUNCDECL_RPL (mbsrtowcs, size_t,
279                   (wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps)
280                   _GL_ARG_NONNULL ((2)));
281 _GL_CXXALIAS_RPL (mbsrtowcs, size_t,
282                   (wchar_t *dest, const char **srcp, size_t len,
283                    mbstate_t *ps));
284 # else
285 #  if !@HAVE_MBSRTOWCS@
286 _GL_FUNCDECL_SYS (mbsrtowcs, size_t,
287                   (wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps)
288                   _GL_ARG_NONNULL ((2)));
289 #  endif
290 _GL_CXXALIAS_SYS (mbsrtowcs, size_t,
291                   (wchar_t *dest, const char **srcp, size_t len,
292                    mbstate_t *ps));
293 # endif
294 _GL_CXXALIASWARN (mbsrtowcs);
295 #elif defined GNULIB_POSIXCHECK
296 # undef mbsrtowcs
297 # if HAVE_RAW_DECL_MBSRTOWCS
298 _GL_WARN_ON_USE (mbsrtowcs, "mbsrtowcs is unportable - "
299                  "use gnulib module mbsrtowcs for portability");
300 # endif
301 #endif
302
303
304 /* Convert a string to a wide string.  */
305 #if @GNULIB_MBSNRTOWCS@
306 # if @REPLACE_MBSNRTOWCS@
307 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
308 #   undef mbsnrtowcs
309 #   define mbsnrtowcs rpl_mbsnrtowcs
310 #  endif
311 _GL_FUNCDECL_RPL (mbsnrtowcs, size_t,
312                   (wchar_t *dest, const char **srcp, size_t srclen, size_t len,
313                    mbstate_t *ps)
314                   _GL_ARG_NONNULL ((2)));
315 _GL_CXXALIAS_RPL (mbsnrtowcs, size_t,
316                   (wchar_t *dest, const char **srcp, size_t srclen, size_t len,
317                    mbstate_t *ps));
318 # else
319 #  if !@HAVE_MBSNRTOWCS@
320 _GL_FUNCDECL_SYS (mbsnrtowcs, size_t,
321                   (wchar_t *dest, const char **srcp, size_t srclen, size_t len,
322                    mbstate_t *ps)
323                   _GL_ARG_NONNULL ((2)));
324 #  endif
325 _GL_CXXALIAS_SYS (mbsnrtowcs, size_t,
326                   (wchar_t *dest, const char **srcp, size_t srclen, size_t len,
327                    mbstate_t *ps));
328 # endif
329 _GL_CXXALIASWARN (mbsnrtowcs);
330 #elif defined GNULIB_POSIXCHECK
331 # undef mbsnrtowcs
332 # if HAVE_RAW_DECL_MBSNRTOWCS
333 _GL_WARN_ON_USE (mbsnrtowcs, "mbsnrtowcs is unportable - "
334                  "use gnulib module mbsnrtowcs for portability");
335 # endif
336 #endif
337
338
339 /* Convert a wide character to a multibyte character.  */
340 #if @GNULIB_WCRTOMB@
341 # if @REPLACE_WCRTOMB@
342 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
343 #   undef wcrtomb
344 #   define wcrtomb rpl_wcrtomb
345 #  endif
346 _GL_FUNCDECL_RPL (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps));
347 _GL_CXXALIAS_RPL (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps));
348 # else
349 #  if !@HAVE_WCRTOMB@
350 _GL_FUNCDECL_SYS (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps));
351 #  endif
352 _GL_CXXALIAS_SYS (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps));
353 # endif
354 _GL_CXXALIASWARN (wcrtomb);
355 #elif defined GNULIB_POSIXCHECK
356 # undef wcrtomb
357 # if HAVE_RAW_DECL_WCRTOMB
358 _GL_WARN_ON_USE (wcrtomb, "wcrtomb is unportable - "
359                  "use gnulib module wcrtomb for portability");
360 # endif
361 #endif
362
363
364 /* Convert a wide string to a string.  */
365 #if @GNULIB_WCSRTOMBS@
366 # if @REPLACE_WCSRTOMBS@
367 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
368 #   undef wcsrtombs
369 #   define wcsrtombs rpl_wcsrtombs
370 #  endif
371 _GL_FUNCDECL_RPL (wcsrtombs, size_t,
372                   (char *dest, const wchar_t **srcp, size_t len, mbstate_t *ps)
373                   _GL_ARG_NONNULL ((2)));
374 _GL_CXXALIAS_RPL (wcsrtombs, size_t,
375                   (char *dest, const wchar_t **srcp, size_t len,
376                    mbstate_t *ps));
377 # else
378 #  if !@HAVE_WCSRTOMBS@
379 _GL_FUNCDECL_SYS (wcsrtombs, size_t,
380                   (char *dest, const wchar_t **srcp, size_t len, mbstate_t *ps)
381                   _GL_ARG_NONNULL ((2)));
382 #  endif
383 _GL_CXXALIAS_SYS (wcsrtombs, size_t,
384                   (char *dest, const wchar_t **srcp, size_t len,
385                    mbstate_t *ps));
386 # endif
387 _GL_CXXALIASWARN (wcsrtombs);
388 #elif defined GNULIB_POSIXCHECK
389 # undef wcsrtombs
390 # if HAVE_RAW_DECL_WCSRTOMBS
391 _GL_WARN_ON_USE (wcsrtombs, "wcsrtombs is unportable - "
392                  "use gnulib module wcsrtombs for portability");
393 # endif
394 #endif
395
396
397 /* Convert a wide string to a string.  */
398 #if @GNULIB_WCSNRTOMBS@
399 # if @REPLACE_WCSNRTOMBS@
400 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
401 #   undef wcsnrtombs
402 #   define wcsnrtombs rpl_wcsnrtombs
403 #  endif
404 _GL_FUNCDECL_RPL (wcsnrtombs, size_t,
405                   (char *dest, const wchar_t **srcp, size_t srclen, size_t len,
406                    mbstate_t *ps)
407                   _GL_ARG_NONNULL ((2)));
408 _GL_CXXALIAS_RPL (wcsnrtombs, size_t,
409                   (char *dest, const wchar_t **srcp, size_t srclen, size_t len,
410                    mbstate_t *ps));
411 # else
412 #  if !@HAVE_WCSNRTOMBS@
413 _GL_FUNCDECL_SYS (wcsnrtombs, size_t,
414                   (char *dest, const wchar_t **srcp, size_t srclen, size_t len,
415                    mbstate_t *ps)
416                   _GL_ARG_NONNULL ((2)));
417 #  endif
418 _GL_CXXALIAS_SYS (wcsnrtombs, size_t,
419                   (char *dest, const wchar_t **srcp, size_t srclen, size_t len,
420                    mbstate_t *ps));
421 # endif
422 _GL_CXXALIASWARN (wcsnrtombs);
423 #elif defined GNULIB_POSIXCHECK
424 # undef wcsnrtombs
425 # if HAVE_RAW_DECL_WCSNRTOMBS
426 _GL_WARN_ON_USE (wcsnrtombs, "wcsnrtombs is unportable - "
427                  "use gnulib module wcsnrtombs for portability");
428 # endif
429 #endif
430
431
432 /* Return the number of screen columns needed for WC.  */
433 #if @GNULIB_WCWIDTH@
434 # if @REPLACE_WCWIDTH@
435 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
436 #   undef wcwidth
437 #   define wcwidth rpl_wcwidth
438 #  endif
439 _GL_FUNCDECL_RPL (wcwidth, int, (wchar_t) _GL_ATTRIBUTE_PURE);
440 _GL_CXXALIAS_RPL (wcwidth, int, (wchar_t));
441 # else
442 #  if !@HAVE_DECL_WCWIDTH@
443 /* wcwidth exists but is not declared.  */
444 _GL_FUNCDECL_SYS (wcwidth, int, (wchar_t) _GL_ATTRIBUTE_PURE);
445 #  endif
446 _GL_CXXALIAS_SYS (wcwidth, int, (wchar_t));
447 # endif
448 _GL_CXXALIASWARN (wcwidth);
449 #elif defined GNULIB_POSIXCHECK
450 # undef wcwidth
451 # if HAVE_RAW_DECL_WCWIDTH
452 _GL_WARN_ON_USE (wcwidth, "wcwidth is unportable - "
453                  "use gnulib module wcwidth for portability");
454 # endif
455 #endif
456
457
458 /* Search N wide characters of S for C.  */
459 #if @GNULIB_WMEMCHR@
460 # if !@HAVE_WMEMCHR@
461 _GL_FUNCDECL_SYS (wmemchr, wchar_t *, (const wchar_t *s, wchar_t c, size_t n)
462                                       _GL_ATTRIBUTE_PURE);
463 # endif
464   /* On some systems, this function is defined as an overloaded function:
465        extern "C++" {
466          const wchar_t * std::wmemchr (const wchar_t *, wchar_t, size_t);
467          wchar_t * std::wmemchr (wchar_t *, wchar_t, size_t);
468        }  */
469 _GL_CXXALIAS_SYS_CAST2 (wmemchr,
470                         wchar_t *, (const wchar_t *, wchar_t, size_t),
471                         const wchar_t *, (const wchar_t *, wchar_t, size_t));
472 # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
473      && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
474 _GL_CXXALIASWARN1 (wmemchr, wchar_t *, (wchar_t *s, wchar_t c, size_t n));
475 _GL_CXXALIASWARN1 (wmemchr, const wchar_t *,
476                    (const wchar_t *s, wchar_t c, size_t n));
477 # else
478 _GL_CXXALIASWARN (wmemchr);
479 # endif
480 #elif defined GNULIB_POSIXCHECK
481 # undef wmemchr
482 # if HAVE_RAW_DECL_WMEMCHR
483 _GL_WARN_ON_USE (wmemchr, "wmemchr is unportable - "
484                  "use gnulib module wmemchr for portability");
485 # endif
486 #endif
487
488
489 /* Compare N wide characters of S1 and S2.  */
490 #if @GNULIB_WMEMCMP@
491 # if !@HAVE_WMEMCMP@
492 _GL_FUNCDECL_SYS (wmemcmp, int,
493                   (const wchar_t *s1, const wchar_t *s2, size_t n)
494                   _GL_ATTRIBUTE_PURE);
495 # endif
496 _GL_CXXALIAS_SYS (wmemcmp, int,
497                   (const wchar_t *s1, const wchar_t *s2, size_t n));
498 _GL_CXXALIASWARN (wmemcmp);
499 #elif defined GNULIB_POSIXCHECK
500 # undef wmemcmp
501 # if HAVE_RAW_DECL_WMEMCMP
502 _GL_WARN_ON_USE (wmemcmp, "wmemcmp is unportable - "
503                  "use gnulib module wmemcmp for portability");
504 # endif
505 #endif
506
507
508 /* Copy N wide characters of SRC to DEST.  */
509 #if @GNULIB_WMEMCPY@
510 # if !@HAVE_WMEMCPY@
511 _GL_FUNCDECL_SYS (wmemcpy, wchar_t *,
512                   (wchar_t *dest, const wchar_t *src, size_t n));
513 # endif
514 _GL_CXXALIAS_SYS (wmemcpy, wchar_t *,
515                   (wchar_t *dest, const wchar_t *src, size_t n));
516 _GL_CXXALIASWARN (wmemcpy);
517 #elif defined GNULIB_POSIXCHECK
518 # undef wmemcpy
519 # if HAVE_RAW_DECL_WMEMCPY
520 _GL_WARN_ON_USE (wmemcpy, "wmemcpy is unportable - "
521                  "use gnulib module wmemcpy for portability");
522 # endif
523 #endif
524
525
526 /* Copy N wide characters of SRC to DEST, guaranteeing correct behavior for
527    overlapping memory areas.  */
528 #if @GNULIB_WMEMMOVE@
529 # if !@HAVE_WMEMMOVE@
530 _GL_FUNCDECL_SYS (wmemmove, wchar_t *,
531                   (wchar_t *dest, const wchar_t *src, size_t n));
532 # endif
533 _GL_CXXALIAS_SYS (wmemmove, wchar_t *,
534                   (wchar_t *dest, const wchar_t *src, size_t n));
535 _GL_CXXALIASWARN (wmemmove);
536 #elif defined GNULIB_POSIXCHECK
537 # undef wmemmove
538 # if HAVE_RAW_DECL_WMEMMOVE
539 _GL_WARN_ON_USE (wmemmove, "wmemmove is unportable - "
540                  "use gnulib module wmemmove for portability");
541 # endif
542 #endif
543
544
545 /* Set N wide characters of S to C.  */
546 #if @GNULIB_WMEMSET@
547 # if !@HAVE_WMEMSET@
548 _GL_FUNCDECL_SYS (wmemset, wchar_t *, (wchar_t *s, wchar_t c, size_t n));
549 # endif
550 _GL_CXXALIAS_SYS (wmemset, wchar_t *, (wchar_t *s, wchar_t c, size_t n));
551 _GL_CXXALIASWARN (wmemset);
552 #elif defined GNULIB_POSIXCHECK
553 # undef wmemset
554 # if HAVE_RAW_DECL_WMEMSET
555 _GL_WARN_ON_USE (wmemset, "wmemset is unportable - "
556                  "use gnulib module wmemset for portability");
557 # endif
558 #endif
559
560
561 /* Return the number of wide characters in S.  */
562 #if @GNULIB_WCSLEN@
563 # if !@HAVE_WCSLEN@
564 _GL_FUNCDECL_SYS (wcslen, size_t, (const wchar_t *s) _GL_ATTRIBUTE_PURE);
565 # endif
566 _GL_CXXALIAS_SYS (wcslen, size_t, (const wchar_t *s));
567 _GL_CXXALIASWARN (wcslen);
568 #elif defined GNULIB_POSIXCHECK
569 # undef wcslen
570 # if HAVE_RAW_DECL_WCSLEN
571 _GL_WARN_ON_USE (wcslen, "wcslen is unportable - "
572                  "use gnulib module wcslen for portability");
573 # endif
574 #endif
575
576
577 /* Return the number of wide characters in S, but at most MAXLEN.  */
578 #if @GNULIB_WCSNLEN@
579 # if !@HAVE_WCSNLEN@
580 _GL_FUNCDECL_SYS (wcsnlen, size_t, (const wchar_t *s, size_t maxlen)
581                                    _GL_ATTRIBUTE_PURE);
582 # endif
583 _GL_CXXALIAS_SYS (wcsnlen, size_t, (const wchar_t *s, size_t maxlen));
584 _GL_CXXALIASWARN (wcsnlen);
585 #elif defined GNULIB_POSIXCHECK
586 # undef wcsnlen
587 # if HAVE_RAW_DECL_WCSNLEN
588 _GL_WARN_ON_USE (wcsnlen, "wcsnlen is unportable - "
589                  "use gnulib module wcsnlen for portability");
590 # endif
591 #endif
592
593
594 /* Copy SRC to DEST.  */
595 #if @GNULIB_WCSCPY@
596 # if !@HAVE_WCSCPY@
597 _GL_FUNCDECL_SYS (wcscpy, wchar_t *, (wchar_t *dest, const wchar_t *src));
598 # endif
599 _GL_CXXALIAS_SYS (wcscpy, wchar_t *, (wchar_t *dest, const wchar_t *src));
600 _GL_CXXALIASWARN (wcscpy);
601 #elif defined GNULIB_POSIXCHECK
602 # undef wcscpy
603 # if HAVE_RAW_DECL_WCSCPY
604 _GL_WARN_ON_USE (wcscpy, "wcscpy is unportable - "
605                  "use gnulib module wcscpy for portability");
606 # endif
607 #endif
608
609
610 /* Copy SRC to DEST, returning the address of the terminating L'\0' in DEST.  */
611 #if @GNULIB_WCPCPY@
612 # if !@HAVE_WCPCPY@
613 _GL_FUNCDECL_SYS (wcpcpy, wchar_t *, (wchar_t *dest, const wchar_t *src));
614 # endif
615 _GL_CXXALIAS_SYS (wcpcpy, wchar_t *, (wchar_t *dest, const wchar_t *src));
616 _GL_CXXALIASWARN (wcpcpy);
617 #elif defined GNULIB_POSIXCHECK
618 # undef wcpcpy
619 # if HAVE_RAW_DECL_WCPCPY
620 _GL_WARN_ON_USE (wcpcpy, "wcpcpy is unportable - "
621                  "use gnulib module wcpcpy for portability");
622 # endif
623 #endif
624
625
626 /* Copy no more than N wide characters of SRC to DEST.  */
627 #if @GNULIB_WCSNCPY@
628 # if !@HAVE_WCSNCPY@
629 _GL_FUNCDECL_SYS (wcsncpy, wchar_t *,
630                   (wchar_t *dest, const wchar_t *src, size_t n));
631 # endif
632 _GL_CXXALIAS_SYS (wcsncpy, wchar_t *,
633                   (wchar_t *dest, const wchar_t *src, size_t n));
634 _GL_CXXALIASWARN (wcsncpy);
635 #elif defined GNULIB_POSIXCHECK
636 # undef wcsncpy
637 # if HAVE_RAW_DECL_WCSNCPY
638 _GL_WARN_ON_USE (wcsncpy, "wcsncpy is unportable - "
639                  "use gnulib module wcsncpy for portability");
640 # endif
641 #endif
642
643
644 /* Copy no more than N characters of SRC to DEST, returning the address of
645    the last character written into DEST.  */
646 #if @GNULIB_WCPNCPY@
647 # if !@HAVE_WCPNCPY@
648 _GL_FUNCDECL_SYS (wcpncpy, wchar_t *,
649                   (wchar_t *dest, const wchar_t *src, size_t n));
650 # endif
651 _GL_CXXALIAS_SYS (wcpncpy, wchar_t *,
652                   (wchar_t *dest, const wchar_t *src, size_t n));
653 _GL_CXXALIASWARN (wcpncpy);
654 #elif defined GNULIB_POSIXCHECK
655 # undef wcpncpy
656 # if HAVE_RAW_DECL_WCPNCPY
657 _GL_WARN_ON_USE (wcpncpy, "wcpncpy is unportable - "
658                  "use gnulib module wcpncpy for portability");
659 # endif
660 #endif
661
662
663 /* Append SRC onto DEST.  */
664 #if @GNULIB_WCSCAT@
665 # if !@HAVE_WCSCAT@
666 _GL_FUNCDECL_SYS (wcscat, wchar_t *, (wchar_t *dest, const wchar_t *src));
667 # endif
668 _GL_CXXALIAS_SYS (wcscat, wchar_t *, (wchar_t *dest, const wchar_t *src));
669 _GL_CXXALIASWARN (wcscat);
670 #elif defined GNULIB_POSIXCHECK
671 # undef wcscat
672 # if HAVE_RAW_DECL_WCSCAT
673 _GL_WARN_ON_USE (wcscat, "wcscat is unportable - "
674                  "use gnulib module wcscat for portability");
675 # endif
676 #endif
677
678
679 /* Append no more than N wide characters of SRC onto DEST.  */
680 #if @GNULIB_WCSNCAT@
681 # if !@HAVE_WCSNCAT@
682 _GL_FUNCDECL_SYS (wcsncat, wchar_t *,
683                   (wchar_t *dest, const wchar_t *src, size_t n));
684 # endif
685 _GL_CXXALIAS_SYS (wcsncat, wchar_t *,
686                   (wchar_t *dest, const wchar_t *src, size_t n));
687 _GL_CXXALIASWARN (wcsncat);
688 #elif defined GNULIB_POSIXCHECK
689 # undef wcsncat
690 # if HAVE_RAW_DECL_WCSNCAT
691 _GL_WARN_ON_USE (wcsncat, "wcsncat is unportable - "
692                  "use gnulib module wcsncat for portability");
693 # endif
694 #endif
695
696
697 /* Compare S1 and S2.  */
698 #if @GNULIB_WCSCMP@
699 # if !@HAVE_WCSCMP@
700 _GL_FUNCDECL_SYS (wcscmp, int, (const wchar_t *s1, const wchar_t *s2)
701                                _GL_ATTRIBUTE_PURE);
702 # endif
703 _GL_CXXALIAS_SYS (wcscmp, int, (const wchar_t *s1, const wchar_t *s2));
704 _GL_CXXALIASWARN (wcscmp);
705 #elif defined GNULIB_POSIXCHECK
706 # undef wcscmp
707 # if HAVE_RAW_DECL_WCSCMP
708 _GL_WARN_ON_USE (wcscmp, "wcscmp is unportable - "
709                  "use gnulib module wcscmp for portability");
710 # endif
711 #endif
712
713
714 /* Compare no more than N wide characters of S1 and S2.  */
715 #if @GNULIB_WCSNCMP@
716 # if !@HAVE_WCSNCMP@
717 _GL_FUNCDECL_SYS (wcsncmp, int,
718                   (const wchar_t *s1, const wchar_t *s2, size_t n)
719                   _GL_ATTRIBUTE_PURE);
720 # endif
721 _GL_CXXALIAS_SYS (wcsncmp, int,
722                   (const wchar_t *s1, const wchar_t *s2, size_t n));
723 _GL_CXXALIASWARN (wcsncmp);
724 #elif defined GNULIB_POSIXCHECK
725 # undef wcsncmp
726 # if HAVE_RAW_DECL_WCSNCMP
727 _GL_WARN_ON_USE (wcsncmp, "wcsncmp is unportable - "
728                  "use gnulib module wcsncmp for portability");
729 # endif
730 #endif
731
732
733 /* Compare S1 and S2, ignoring case.  */
734 #if @GNULIB_WCSCASECMP@
735 # if !@HAVE_WCSCASECMP@
736 _GL_FUNCDECL_SYS (wcscasecmp, int, (const wchar_t *s1, const wchar_t *s2)
737                                    _GL_ATTRIBUTE_PURE);
738 # endif
739 _GL_CXXALIAS_SYS (wcscasecmp, int, (const wchar_t *s1, const wchar_t *s2));
740 _GL_CXXALIASWARN (wcscasecmp);
741 #elif defined GNULIB_POSIXCHECK
742 # undef wcscasecmp
743 # if HAVE_RAW_DECL_WCSCASECMP
744 _GL_WARN_ON_USE (wcscasecmp, "wcscasecmp is unportable - "
745                  "use gnulib module wcscasecmp for portability");
746 # endif
747 #endif
748
749
750 /* Compare no more than N chars of S1 and S2, ignoring case.  */
751 #if @GNULIB_WCSNCASECMP@
752 # if !@HAVE_WCSNCASECMP@
753 _GL_FUNCDECL_SYS (wcsncasecmp, int,
754                   (const wchar_t *s1, const wchar_t *s2, size_t n)
755                   _GL_ATTRIBUTE_PURE);
756 # endif
757 _GL_CXXALIAS_SYS (wcsncasecmp, int,
758                   (const wchar_t *s1, const wchar_t *s2, size_t n));
759 _GL_CXXALIASWARN (wcsncasecmp);
760 #elif defined GNULIB_POSIXCHECK
761 # undef wcsncasecmp
762 # if HAVE_RAW_DECL_WCSNCASECMP
763 _GL_WARN_ON_USE (wcsncasecmp, "wcsncasecmp is unportable - "
764                  "use gnulib module wcsncasecmp for portability");
765 # endif
766 #endif
767
768
769 /* Compare S1 and S2, both interpreted as appropriate to the LC_COLLATE
770    category of the current locale.  */
771 #if @GNULIB_WCSCOLL@
772 # if !@HAVE_WCSCOLL@
773 _GL_FUNCDECL_SYS (wcscoll, int, (const wchar_t *s1, const wchar_t *s2));
774 # endif
775 _GL_CXXALIAS_SYS (wcscoll, int, (const wchar_t *s1, const wchar_t *s2));
776 _GL_CXXALIASWARN (wcscoll);
777 #elif defined GNULIB_POSIXCHECK
778 # undef wcscoll
779 # if HAVE_RAW_DECL_WCSCOLL
780 _GL_WARN_ON_USE (wcscoll, "wcscoll is unportable - "
781                  "use gnulib module wcscoll for portability");
782 # endif
783 #endif
784
785
786 /* Transform S2 into array pointed to by S1 such that if wcscmp is applied
787    to two transformed strings the result is the as applying 'wcscoll' to the
788    original strings.  */
789 #if @GNULIB_WCSXFRM@
790 # if !@HAVE_WCSXFRM@
791 _GL_FUNCDECL_SYS (wcsxfrm, size_t, (wchar_t *s1, const wchar_t *s2, size_t n));
792 # endif
793 _GL_CXXALIAS_SYS (wcsxfrm, size_t, (wchar_t *s1, const wchar_t *s2, size_t n));
794 _GL_CXXALIASWARN (wcsxfrm);
795 #elif defined GNULIB_POSIXCHECK
796 # undef wcsxfrm
797 # if HAVE_RAW_DECL_WCSXFRM
798 _GL_WARN_ON_USE (wcsxfrm, "wcsxfrm is unportable - "
799                  "use gnulib module wcsxfrm for portability");
800 # endif
801 #endif
802
803
804 /* Duplicate S, returning an identical malloc'd string.  */
805 #if @GNULIB_WCSDUP@
806 # if !@HAVE_WCSDUP@
807 _GL_FUNCDECL_SYS (wcsdup, wchar_t *, (const wchar_t *s));
808 # endif
809 _GL_CXXALIAS_SYS (wcsdup, wchar_t *, (const wchar_t *s));
810 _GL_CXXALIASWARN (wcsdup);
811 #elif defined GNULIB_POSIXCHECK
812 # undef wcsdup
813 # if HAVE_RAW_DECL_WCSDUP
814 _GL_WARN_ON_USE (wcsdup, "wcsdup is unportable - "
815                  "use gnulib module wcsdup for portability");
816 # endif
817 #endif
818
819
820 /* Find the first occurrence of WC in WCS.  */
821 #if @GNULIB_WCSCHR@
822 # if !@HAVE_WCSCHR@
823 _GL_FUNCDECL_SYS (wcschr, wchar_t *, (const wchar_t *wcs, wchar_t wc)
824                                      _GL_ATTRIBUTE_PURE);
825 # endif
826   /* On some systems, this function is defined as an overloaded function:
827        extern "C++" {
828          const wchar_t * std::wcschr (const wchar_t *, wchar_t);
829          wchar_t * std::wcschr (wchar_t *, wchar_t);
830        }  */
831 _GL_CXXALIAS_SYS_CAST2 (wcschr,
832                         wchar_t *, (const wchar_t *, wchar_t),
833                         const wchar_t *, (const wchar_t *, wchar_t));
834 # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
835      && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
836 _GL_CXXALIASWARN1 (wcschr, wchar_t *, (wchar_t *wcs, wchar_t wc));
837 _GL_CXXALIASWARN1 (wcschr, const wchar_t *, (const wchar_t *wcs, wchar_t wc));
838 # else
839 _GL_CXXALIASWARN (wcschr);
840 # endif
841 #elif defined GNULIB_POSIXCHECK
842 # undef wcschr
843 # if HAVE_RAW_DECL_WCSCHR
844 _GL_WARN_ON_USE (wcschr, "wcschr is unportable - "
845                  "use gnulib module wcschr for portability");
846 # endif
847 #endif
848
849
850 /* Find the last occurrence of WC in WCS.  */
851 #if @GNULIB_WCSRCHR@
852 # if !@HAVE_WCSRCHR@
853 _GL_FUNCDECL_SYS (wcsrchr, wchar_t *, (const wchar_t *wcs, wchar_t wc)
854                                       _GL_ATTRIBUTE_PURE);
855 # endif
856   /* On some systems, this function is defined as an overloaded function:
857        extern "C++" {
858          const wchar_t * std::wcsrchr (const wchar_t *, wchar_t);
859          wchar_t * std::wcsrchr (wchar_t *, wchar_t);
860        }  */
861 _GL_CXXALIAS_SYS_CAST2 (wcsrchr,
862                         wchar_t *, (const wchar_t *, wchar_t),
863                         const wchar_t *, (const wchar_t *, wchar_t));
864 # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
865      && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
866 _GL_CXXALIASWARN1 (wcsrchr, wchar_t *, (wchar_t *wcs, wchar_t wc));
867 _GL_CXXALIASWARN1 (wcsrchr, const wchar_t *, (const wchar_t *wcs, wchar_t wc));
868 # else
869 _GL_CXXALIASWARN (wcsrchr);
870 # endif
871 #elif defined GNULIB_POSIXCHECK
872 # undef wcsrchr
873 # if HAVE_RAW_DECL_WCSRCHR
874 _GL_WARN_ON_USE (wcsrchr, "wcsrchr is unportable - "
875                  "use gnulib module wcsrchr for portability");
876 # endif
877 #endif
878
879
880 /* Return the length of the initial segmet of WCS which consists entirely
881    of wide characters not in REJECT.  */
882 #if @GNULIB_WCSCSPN@
883 # if !@HAVE_WCSCSPN@
884 _GL_FUNCDECL_SYS (wcscspn, size_t, (const wchar_t *wcs, const wchar_t *reject)
885                                    _GL_ATTRIBUTE_PURE);
886 # endif
887 _GL_CXXALIAS_SYS (wcscspn, size_t, (const wchar_t *wcs, const wchar_t *reject));
888 _GL_CXXALIASWARN (wcscspn);
889 #elif defined GNULIB_POSIXCHECK
890 # undef wcscspn
891 # if HAVE_RAW_DECL_WCSCSPN
892 _GL_WARN_ON_USE (wcscspn, "wcscspn is unportable - "
893                  "use gnulib module wcscspn for portability");
894 # endif
895 #endif
896
897
898 /* Return the length of the initial segmet of WCS which consists entirely
899    of wide characters in ACCEPT.  */
900 #if @GNULIB_WCSSPN@
901 # if !@HAVE_WCSSPN@
902 _GL_FUNCDECL_SYS (wcsspn, size_t, (const wchar_t *wcs, const wchar_t *accept)
903                                   _GL_ATTRIBUTE_PURE);
904 # endif
905 _GL_CXXALIAS_SYS (wcsspn, size_t, (const wchar_t *wcs, const wchar_t *accept));
906 _GL_CXXALIASWARN (wcsspn);
907 #elif defined GNULIB_POSIXCHECK
908 # undef wcsspn
909 # if HAVE_RAW_DECL_WCSSPN
910 _GL_WARN_ON_USE (wcsspn, "wcsspn is unportable - "
911                  "use gnulib module wcsspn for portability");
912 # endif
913 #endif
914
915
916 /* Find the first occurrence in WCS of any character in ACCEPT.  */
917 #if @GNULIB_WCSPBRK@
918 # if !@HAVE_WCSPBRK@
919 _GL_FUNCDECL_SYS (wcspbrk, wchar_t *,
920                   (const wchar_t *wcs, const wchar_t *accept)
921                   _GL_ATTRIBUTE_PURE);
922 # endif
923   /* On some systems, this function is defined as an overloaded function:
924        extern "C++" {
925          const wchar_t * std::wcspbrk (const wchar_t *, const wchar_t *);
926          wchar_t * std::wcspbrk (wchar_t *, const wchar_t *);
927        }  */
928 _GL_CXXALIAS_SYS_CAST2 (wcspbrk,
929                         wchar_t *, (const wchar_t *, const wchar_t *),
930                         const wchar_t *, (const wchar_t *, const wchar_t *));
931 # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
932      && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
933 _GL_CXXALIASWARN1 (wcspbrk, wchar_t *,
934                    (wchar_t *wcs, const wchar_t *accept));
935 _GL_CXXALIASWARN1 (wcspbrk, const wchar_t *,
936                    (const wchar_t *wcs, const wchar_t *accept));
937 # else
938 _GL_CXXALIASWARN (wcspbrk);
939 # endif
940 #elif defined GNULIB_POSIXCHECK
941 # undef wcspbrk
942 # if HAVE_RAW_DECL_WCSPBRK
943 _GL_WARN_ON_USE (wcspbrk, "wcspbrk is unportable - "
944                  "use gnulib module wcspbrk for portability");
945 # endif
946 #endif
947
948
949 /* Find the first occurrence of NEEDLE in HAYSTACK.  */
950 #if @GNULIB_WCSSTR@
951 # if !@HAVE_WCSSTR@
952 _GL_FUNCDECL_SYS (wcsstr, wchar_t *,
953                   (const wchar_t *haystack, const wchar_t *needle)
954                   _GL_ATTRIBUTE_PURE);
955 # endif
956   /* On some systems, this function is defined as an overloaded function:
957        extern "C++" {
958          const wchar_t * std::wcsstr (const wchar_t *, const wchar_t *);
959          wchar_t * std::wcsstr (wchar_t *, const wchar_t *);
960        }  */
961 _GL_CXXALIAS_SYS_CAST2 (wcsstr,
962                         wchar_t *, (const wchar_t *, const wchar_t *),
963                         const wchar_t *, (const wchar_t *, const wchar_t *));
964 # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \
965      && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
966 _GL_CXXALIASWARN1 (wcsstr, wchar_t *,
967                    (wchar_t *haystack, const wchar_t *needle));
968 _GL_CXXALIASWARN1 (wcsstr, const wchar_t *,
969                    (const wchar_t *haystack, const wchar_t *needle));
970 # else
971 _GL_CXXALIASWARN (wcsstr);
972 # endif
973 #elif defined GNULIB_POSIXCHECK
974 # undef wcsstr
975 # if HAVE_RAW_DECL_WCSSTR
976 _GL_WARN_ON_USE (wcsstr, "wcsstr is unportable - "
977                  "use gnulib module wcsstr for portability");
978 # endif
979 #endif
980
981
982 /* Divide WCS into tokens separated by characters in DELIM.  */
983 #if @GNULIB_WCSTOK@
984 # if !@HAVE_WCSTOK@
985 _GL_FUNCDECL_SYS (wcstok, wchar_t *,
986                   (wchar_t *wcs, const wchar_t *delim, wchar_t **ptr));
987 # endif
988 _GL_CXXALIAS_SYS (wcstok, wchar_t *,
989                   (wchar_t *wcs, const wchar_t *delim, wchar_t **ptr));
990 _GL_CXXALIASWARN (wcstok);
991 #elif defined GNULIB_POSIXCHECK
992 # undef wcstok
993 # if HAVE_RAW_DECL_WCSTOK
994 _GL_WARN_ON_USE (wcstok, "wcstok is unportable - "
995                  "use gnulib module wcstok for portability");
996 # endif
997 #endif
998
999
1000 /* Determine number of column positions required for first N wide
1001    characters (or fewer if S ends before this) in S.  */
1002 #if @GNULIB_WCSWIDTH@
1003 # if @REPLACE_WCSWIDTH@
1004 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
1005 #   undef wcswidth
1006 #   define wcswidth rpl_wcswidth
1007 #  endif
1008 _GL_FUNCDECL_RPL (wcswidth, int, (const wchar_t *s, size_t n)
1009                                  _GL_ATTRIBUTE_PURE);
1010 _GL_CXXALIAS_RPL (wcswidth, int, (const wchar_t *s, size_t n));
1011 # else
1012 #  if !@HAVE_WCSWIDTH@
1013 _GL_FUNCDECL_SYS (wcswidth, int, (const wchar_t *s, size_t n)
1014                                  _GL_ATTRIBUTE_PURE);
1015 #  endif
1016 _GL_CXXALIAS_SYS (wcswidth, int, (const wchar_t *s, size_t n));
1017 # endif
1018 _GL_CXXALIASWARN (wcswidth);
1019 #elif defined GNULIB_POSIXCHECK
1020 # undef wcswidth
1021 # if HAVE_RAW_DECL_WCSWIDTH
1022 _GL_WARN_ON_USE (wcswidth, "wcswidth is unportable - "
1023                  "use gnulib module wcswidth for portability");
1024 # endif
1025 #endif
1026
1027
1028 #endif /* _@GUARD_PREFIX@_WCHAR_H */
1029 #endif /* _@GUARD_PREFIX@_WCHAR_H */
1030 #endif