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