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