| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
#if __GNUC__ >= 3 |
| 19 |
@PRAGMA_SYSTEM_HEADER@ |
| 20 |
#endif |
| 21 |
@PRAGMA_COLUMNS@ |
| 22 |
|
| 23 |
#if defined _GL_ALREADY_INCLUDING_STRING_H |
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
#@INCLUDE_NEXT@ @NEXT_STRING_H@ |
| 31 |
|
| 32 |
#else |
| 33 |
|
| 34 |
|
| 35 |
#ifndef _@GUARD_PREFIX@_STRING_H |
| 36 |
|
| 37 |
#define _GL_ALREADY_INCLUDING_STRING_H |
| 38 |
|
| 39 |
|
| 40 |
#@INCLUDE_NEXT@ @NEXT_STRING_H@ |
| 41 |
|
| 42 |
#undef _GL_ALREADY_INCLUDING_STRING_H |
| 43 |
|
| 44 |
#ifndef _@GUARD_PREFIX@_STRING_H |
| 45 |
#define _@GUARD_PREFIX@_STRING_H |
| 46 |
|
| 47 |
|
| 48 |
#include <stddef.h> |
| 49 |
|
| 50 |
|
| 51 |
#if @GNULIB_MBSLEN@ && defined __MirBSD__ |
| 52 |
# include <wchar.h> |
| 53 |
#endif |
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
#if (@GNULIB_STRSIGNAL@ || defined GNULIB_POSIXCHECK) && defined __NetBSD__ \ |
| 58 |
&& ! defined __GLIBC__ |
| 59 |
# include <unistd.h> |
| 60 |
#endif |
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
#if ((@GNULIB_FFSL@ || @GNULIB_FFSLL@ || defined GNULIB_POSIXCHECK) \ |
| 66 |
&& (defined _AIX || defined __ANDROID__)) \ |
| 67 |
&& ! defined __GLIBC__ |
| 68 |
# include <strings.h> |
| 69 |
#endif |
| 70 |
|
| 71 |
|
| 72 |
|
| 73 |
|
| 74 |
#ifndef _GL_ATTRIBUTE_DEALLOC |
| 75 |
# if __GNUC__ >= 11 |
| 76 |
# define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i))) |
| 77 |
# else |
| 78 |
# define _GL_ATTRIBUTE_DEALLOC(f, i) |
| 79 |
# endif |
| 80 |
#endif |
| 81 |
|
| 82 |
|
| 83 |
|
| 84 |
|
| 85 |
#ifndef _GL_ATTRIBUTE_DEALLOC_FREE |
| 86 |
# if defined __cplusplus && defined __GNUC__ && !defined __clang__ |
| 87 |
|
| 88 |
# define _GL_ATTRIBUTE_DEALLOC_FREE \ |
| 89 |
_GL_ATTRIBUTE_DEALLOC ((void (*) (void *)) free, 1) |
| 90 |
# else |
| 91 |
# define _GL_ATTRIBUTE_DEALLOC_FREE \ |
| 92 |
_GL_ATTRIBUTE_DEALLOC (free, 1) |
| 93 |
# endif |
| 94 |
#endif |
| 95 |
|
| 96 |
|
| 97 |
|
| 98 |
|
| 99 |
#ifndef _GL_ATTRIBUTE_MALLOC |
| 100 |
# if __GNUC__ >= 3 || defined __clang__ |
| 101 |
# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) |
| 102 |
# else |
| 103 |
# define _GL_ATTRIBUTE_MALLOC |
| 104 |
# endif |
| 105 |
#endif |
| 106 |
|
| 107 |
|
| 108 |
|
| 109 |
#ifndef _GL_ATTRIBUTE_PURE |
| 110 |
# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || defined __clang__ |
| 111 |
# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) |
| 112 |
# else |
| 113 |
# define _GL_ATTRIBUTE_PURE |
| 114 |
# endif |
| 115 |
#endif |
| 116 |
|
| 117 |
|
| 118 |
|
| 119 |
|
| 120 |
|
| 121 |
|
| 122 |
|
| 123 |
|
| 124 |
|
| 125 |
#if @GNULIB_FREE_POSIX@ |
| 126 |
# if (@REPLACE_FREE@ && !defined free \ |
| 127 |
&& !(defined __cplusplus && defined GNULIB_NAMESPACE)) |
| 128 |
|
| 129 |
# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) |
| 130 |
_GL_EXTERN_C void rpl_free (void *) throw (); |
| 131 |
# else |
| 132 |
_GL_EXTERN_C void rpl_free (void *); |
| 133 |
# endif |
| 134 |
# undef _GL_ATTRIBUTE_DEALLOC_FREE |
| 135 |
# define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (rpl_free, 1) |
| 136 |
# else |
| 137 |
# if defined _MSC_VER && !defined free |
| 138 |
_GL_EXTERN_C |
| 139 |
# if defined _DLL |
| 140 |
__declspec (dllimport) |
| 141 |
# endif |
| 142 |
void __cdecl free (void *); |
| 143 |
# else |
| 144 |
# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) |
| 145 |
_GL_EXTERN_C void free (void *) throw (); |
| 146 |
# else |
| 147 |
_GL_EXTERN_C void free (void *); |
| 148 |
# endif |
| 149 |
# endif |
| 150 |
# endif |
| 151 |
#else |
| 152 |
# if defined _MSC_VER && !defined free |
| 153 |
_GL_EXTERN_C |
| 154 |
# if defined _DLL |
| 155 |
__declspec (dllimport) |
| 156 |
# endif |
| 157 |
void __cdecl free (void *); |
| 158 |
# else |
| 159 |
# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) |
| 160 |
_GL_EXTERN_C void free (void *) throw (); |
| 161 |
# else |
| 162 |
_GL_EXTERN_C void free (void *); |
| 163 |
# endif |
| 164 |
# endif |
| 165 |
#endif |
| 166 |
|
| 167 |
|
| 168 |
|
| 169 |
#if @GNULIB_EXPLICIT_BZERO@ |
| 170 |
# if ! @HAVE_EXPLICIT_BZERO@ |
| 171 |
_GL_FUNCDECL_SYS (explicit_bzero, void, |
| 172 |
(void *__dest, size_t __n) _GL_ARG_NONNULL ((1))); |
| 173 |
# endif |
| 174 |
_GL_CXXALIAS_SYS (explicit_bzero, void, (void *__dest, size_t __n)); |
| 175 |
_GL_CXXALIASWARN (explicit_bzero); |
| 176 |
#elif defined GNULIB_POSIXCHECK |
| 177 |
# undef explicit_bzero |
| 178 |
# if HAVE_RAW_DECL_EXPLICIT_BZERO |
| 179 |
_GL_WARN_ON_USE (explicit_bzero, "explicit_bzero is unportable - " |
| 180 |
"use gnulib module explicit_bzero for portability"); |
| 181 |
# endif |
| 182 |
#endif |
| 183 |
|
| 184 |
|
| 185 |
#if @GNULIB_FFSL@ |
| 186 |
# if !@HAVE_FFSL@ |
| 187 |
_GL_FUNCDECL_SYS (ffsl, int, (long int i)); |
| 188 |
# endif |
| 189 |
_GL_CXXALIAS_SYS (ffsl, int, (long int i)); |
| 190 |
_GL_CXXALIASWARN (ffsl); |
| 191 |
#elif defined GNULIB_POSIXCHECK |
| 192 |
# undef ffsl |
| 193 |
# if HAVE_RAW_DECL_FFSL |
| 194 |
_GL_WARN_ON_USE (ffsl, "ffsl is not portable - use the ffsl module"); |
| 195 |
# endif |
| 196 |
#endif |
| 197 |
|
| 198 |
|
| 199 |
|
| 200 |
#if @GNULIB_FFSLL@ |
| 201 |
# if @REPLACE_FFSLL@ |
| 202 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 203 |
# define ffsll rpl_ffsll |
| 204 |
# endif |
| 205 |
_GL_FUNCDECL_RPL (ffsll, int, (long long int i)); |
| 206 |
_GL_CXXALIAS_RPL (ffsll, int, (long long int i)); |
| 207 |
# else |
| 208 |
# if !@HAVE_FFSLL@ |
| 209 |
_GL_FUNCDECL_SYS (ffsll, int, (long long int i)); |
| 210 |
# endif |
| 211 |
_GL_CXXALIAS_SYS (ffsll, int, (long long int i)); |
| 212 |
# endif |
| 213 |
_GL_CXXALIASWARN (ffsll); |
| 214 |
#elif defined GNULIB_POSIXCHECK |
| 215 |
# undef ffsll |
| 216 |
# if HAVE_RAW_DECL_FFSLL |
| 217 |
_GL_WARN_ON_USE (ffsll, "ffsll is not portable - use the ffsll module"); |
| 218 |
# endif |
| 219 |
#endif |
| 220 |
|
| 221 |
|
| 222 |
#if @GNULIB_MDA_MEMCCPY@ |
| 223 |
|
| 224 |
|
| 225 |
|
| 226 |
# if defined _WIN32 && !defined __CYGWIN__ |
| 227 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 228 |
# undef memccpy |
| 229 |
# define memccpy _memccpy |
| 230 |
# endif |
| 231 |
_GL_CXXALIAS_MDA (memccpy, void *, |
| 232 |
(void *dest, const void *src, int c, size_t n)); |
| 233 |
# else |
| 234 |
_GL_CXXALIAS_SYS (memccpy, void *, |
| 235 |
(void *dest, const void *src, int c, size_t n)); |
| 236 |
# endif |
| 237 |
_GL_CXXALIASWARN (memccpy); |
| 238 |
#endif |
| 239 |
|
| 240 |
|
| 241 |
|
| 242 |
#if @GNULIB_MEMCHR@ |
| 243 |
# if @REPLACE_MEMCHR@ |
| 244 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 245 |
# undef memchr |
| 246 |
# define memchr rpl_memchr |
| 247 |
# endif |
| 248 |
_GL_FUNCDECL_RPL (memchr, void *, (void const *__s, int __c, size_t __n) |
| 249 |
_GL_ATTRIBUTE_PURE |
| 250 |
_GL_ARG_NONNULL ((1))); |
| 251 |
_GL_CXXALIAS_RPL (memchr, void *, (void const *__s, int __c, size_t __n)); |
| 252 |
# else |
| 253 |
|
| 254 |
|
| 255 |
|
| 256 |
_GL_CXXALIAS_SYS_CAST2 (memchr, |
| 257 |
void *, (void const *__s, int __c, size_t __n), |
| 258 |
void const *, (void const *__s, int __c, size_t __n)); |
| 259 |
# endif |
| 260 |
# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ |
| 261 |
&& (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ |
| 262 |
|| defined __clang__) |
| 263 |
_GL_CXXALIASWARN1 (memchr, void *, (void *__s, int __c, size_t __n) throw ()); |
| 264 |
_GL_CXXALIASWARN1 (memchr, void const *, |
| 265 |
(void const *__s, int __c, size_t __n) throw ()); |
| 266 |
# elif __GLIBC__ >= 2 |
| 267 |
_GL_CXXALIASWARN (memchr); |
| 268 |
# endif |
| 269 |
#elif defined GNULIB_POSIXCHECK |
| 270 |
# undef memchr |
| 271 |
|
| 272 |
_GL_WARN_ON_USE (memchr, "memchr has platform-specific bugs - " |
| 273 |
"use gnulib module memchr for portability" ); |
| 274 |
#endif |
| 275 |
|
| 276 |
|
| 277 |
#if @GNULIB_MEMMEM@ |
| 278 |
# if @REPLACE_MEMMEM@ |
| 279 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 280 |
# define memmem rpl_memmem |
| 281 |
# endif |
| 282 |
_GL_FUNCDECL_RPL (memmem, void *, |
| 283 |
(void const *__haystack, size_t __haystack_len, |
| 284 |
void const *__needle, size_t __needle_len) |
| 285 |
_GL_ATTRIBUTE_PURE |
| 286 |
_GL_ARG_NONNULL ((1, 3))); |
| 287 |
_GL_CXXALIAS_RPL (memmem, void *, |
| 288 |
(void const *__haystack, size_t __haystack_len, |
| 289 |
void const *__needle, size_t __needle_len)); |
| 290 |
# else |
| 291 |
# if ! @HAVE_DECL_MEMMEM@ |
| 292 |
_GL_FUNCDECL_SYS (memmem, void *, |
| 293 |
(void const *__haystack, size_t __haystack_len, |
| 294 |
void const *__needle, size_t __needle_len) |
| 295 |
_GL_ATTRIBUTE_PURE |
| 296 |
_GL_ARG_NONNULL ((1, 3))); |
| 297 |
# endif |
| 298 |
_GL_CXXALIAS_SYS (memmem, void *, |
| 299 |
(void const *__haystack, size_t __haystack_len, |
| 300 |
void const *__needle, size_t __needle_len)); |
| 301 |
# endif |
| 302 |
_GL_CXXALIASWARN (memmem); |
| 303 |
#elif defined GNULIB_POSIXCHECK |
| 304 |
# undef memmem |
| 305 |
# if HAVE_RAW_DECL_MEMMEM |
| 306 |
_GL_WARN_ON_USE (memmem, "memmem is unportable and often quadratic - " |
| 307 |
"use gnulib module memmem-simple for portability, " |
| 308 |
"and module memmem for speed" ); |
| 309 |
# endif |
| 310 |
#endif |
| 311 |
|
| 312 |
|
| 313 |
|
| 314 |
#if @GNULIB_MEMPCPY@ |
| 315 |
# if @REPLACE_MEMPCPY@ |
| 316 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 317 |
# undef mempcpy |
| 318 |
# define mempcpy rpl_mempcpy |
| 319 |
# endif |
| 320 |
_GL_FUNCDECL_RPL (mempcpy, void *, |
| 321 |
(void *restrict __dest, void const *restrict __src, |
| 322 |
size_t __n) |
| 323 |
_GL_ARG_NONNULL ((1, 2))); |
| 324 |
_GL_CXXALIAS_RPL (mempcpy, void *, |
| 325 |
(void *restrict __dest, void const *restrict __src, |
| 326 |
size_t __n)); |
| 327 |
# else |
| 328 |
# if !@HAVE_MEMPCPY@ |
| 329 |
_GL_FUNCDECL_SYS (mempcpy, void *, |
| 330 |
(void *restrict __dest, void const *restrict __src, |
| 331 |
size_t __n) |
| 332 |
_GL_ARG_NONNULL ((1, 2))); |
| 333 |
# endif |
| 334 |
_GL_CXXALIAS_SYS (mempcpy, void *, |
| 335 |
(void *restrict __dest, void const *restrict __src, |
| 336 |
size_t __n)); |
| 337 |
# endif |
| 338 |
# if __GLIBC__ >= 2 |
| 339 |
_GL_CXXALIASWARN (mempcpy); |
| 340 |
# endif |
| 341 |
#elif defined GNULIB_POSIXCHECK |
| 342 |
# undef mempcpy |
| 343 |
# if HAVE_RAW_DECL_MEMPCPY |
| 344 |
_GL_WARN_ON_USE (mempcpy, "mempcpy is unportable - " |
| 345 |
"use gnulib module mempcpy for portability"); |
| 346 |
# endif |
| 347 |
#endif |
| 348 |
|
| 349 |
|
| 350 |
#if @GNULIB_MEMRCHR@ |
| 351 |
# if ! @HAVE_DECL_MEMRCHR@ |
| 352 |
_GL_FUNCDECL_SYS (memrchr, void *, (void const *, int, size_t) |
| 353 |
_GL_ATTRIBUTE_PURE |
| 354 |
_GL_ARG_NONNULL ((1))); |
| 355 |
# endif |
| 356 |
|
| 357 |
|
| 358 |
|
| 359 |
_GL_CXXALIAS_SYS_CAST2 (memrchr, |
| 360 |
void *, (void const *, int, size_t), |
| 361 |
void const *, (void const *, int, size_t)); |
| 362 |
# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ |
| 363 |
&& (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ |
| 364 |
|| defined __clang__) |
| 365 |
_GL_CXXALIASWARN1 (memrchr, void *, (void *, int, size_t) throw ()); |
| 366 |
_GL_CXXALIASWARN1 (memrchr, void const *, (void const *, int, size_t) throw ()); |
| 367 |
# elif __GLIBC__ >= 2 |
| 368 |
_GL_CXXALIASWARN (memrchr); |
| 369 |
# endif |
| 370 |
#elif defined GNULIB_POSIXCHECK |
| 371 |
# undef memrchr |
| 372 |
# if HAVE_RAW_DECL_MEMRCHR |
| 373 |
_GL_WARN_ON_USE (memrchr, "memrchr is unportable - " |
| 374 |
"use gnulib module memrchr for portability"); |
| 375 |
# endif |
| 376 |
#endif |
| 377 |
|
| 378 |
|
| 379 |
|
| 380 |
#if @GNULIB_MEMSET_EXPLICIT@ |
| 381 |
# if ! @HAVE_MEMSET_EXPLICIT@ |
| 382 |
_GL_FUNCDECL_SYS (memset_explicit, void *, |
| 383 |
(void *__dest, int __c, size_t __n) _GL_ARG_NONNULL ((1))); |
| 384 |
# endif |
| 385 |
_GL_CXXALIAS_SYS (memset_explicit, void *, (void *__dest, int __c, size_t __n)); |
| 386 |
_GL_CXXALIASWARN (memset_explicit); |
| 387 |
#elif defined GNULIB_POSIXCHECK |
| 388 |
# undef memset_explicit |
| 389 |
# if HAVE_RAW_DECL_MEMSET_EXPLICIT |
| 390 |
_GL_WARN_ON_USE (memset_explicit, "memset_explicit is unportable - " |
| 391 |
"use gnulib module memset_explicit for portability"); |
| 392 |
# endif |
| 393 |
#endif |
| 394 |
|
| 395 |
|
| 396 |
|
| 397 |
|
| 398 |
#if @GNULIB_RAWMEMCHR@ |
| 399 |
# if ! @HAVE_RAWMEMCHR@ |
| 400 |
_GL_FUNCDECL_SYS (rawmemchr, void *, (void const *__s, int __c_in) |
| 401 |
_GL_ATTRIBUTE_PURE |
| 402 |
_GL_ARG_NONNULL ((1))); |
| 403 |
# endif |
| 404 |
|
| 405 |
|
| 406 |
|
| 407 |
_GL_CXXALIAS_SYS_CAST2 (rawmemchr, |
| 408 |
void *, (void const *__s, int __c_in), |
| 409 |
void const *, (void const *__s, int __c_in)); |
| 410 |
# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ |
| 411 |
&& (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ |
| 412 |
|| defined __clang__) |
| 413 |
_GL_CXXALIASWARN1 (rawmemchr, void *, (void *__s, int __c_in) throw ()); |
| 414 |
_GL_CXXALIASWARN1 (rawmemchr, void const *, |
| 415 |
(void const *__s, int __c_in) throw ()); |
| 416 |
# else |
| 417 |
_GL_CXXALIASWARN (rawmemchr); |
| 418 |
# endif |
| 419 |
#elif defined GNULIB_POSIXCHECK |
| 420 |
# undef rawmemchr |
| 421 |
# if HAVE_RAW_DECL_RAWMEMCHR |
| 422 |
_GL_WARN_ON_USE (rawmemchr, "rawmemchr is unportable - " |
| 423 |
"use gnulib module rawmemchr for portability"); |
| 424 |
# endif |
| 425 |
#endif |
| 426 |
|
| 427 |
|
| 428 |
#if @GNULIB_STPCPY@ |
| 429 |
# if @REPLACE_STPCPY@ |
| 430 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 431 |
# undef stpcpy |
| 432 |
# define stpcpy rpl_stpcpy |
| 433 |
# endif |
| 434 |
_GL_FUNCDECL_RPL (stpcpy, char *, |
| 435 |
(char *restrict __dst, char const *restrict __src) |
| 436 |
_GL_ARG_NONNULL ((1, 2))); |
| 437 |
_GL_CXXALIAS_RPL (stpcpy, char *, |
| 438 |
(char *restrict __dst, char const *restrict __src)); |
| 439 |
# else |
| 440 |
# if !@HAVE_STPCPY@ |
| 441 |
_GL_FUNCDECL_SYS (stpcpy, char *, |
| 442 |
(char *restrict __dst, char const *restrict __src) |
| 443 |
_GL_ARG_NONNULL ((1, 2))); |
| 444 |
# endif |
| 445 |
_GL_CXXALIAS_SYS (stpcpy, char *, |
| 446 |
(char *restrict __dst, char const *restrict __src)); |
| 447 |
# endif |
| 448 |
# if __GLIBC__ >= 2 |
| 449 |
_GL_CXXALIASWARN (stpcpy); |
| 450 |
# endif |
| 451 |
#elif defined GNULIB_POSIXCHECK |
| 452 |
# undef stpcpy |
| 453 |
# if HAVE_RAW_DECL_STPCPY |
| 454 |
_GL_WARN_ON_USE (stpcpy, "stpcpy is unportable - " |
| 455 |
"use gnulib module stpcpy for portability"); |
| 456 |
# endif |
| 457 |
#endif |
| 458 |
|
| 459 |
|
| 460 |
|
| 461 |
#if @GNULIB_STPNCPY@ |
| 462 |
# if @REPLACE_STPNCPY@ |
| 463 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 464 |
# undef stpncpy |
| 465 |
# define stpncpy rpl_stpncpy |
| 466 |
# endif |
| 467 |
_GL_FUNCDECL_RPL (stpncpy, char *, |
| 468 |
(char *restrict __dst, char const *restrict __src, |
| 469 |
size_t __n) |
| 470 |
_GL_ARG_NONNULL ((1, 2))); |
| 471 |
_GL_CXXALIAS_RPL (stpncpy, char *, |
| 472 |
(char *restrict __dst, char const *restrict __src, |
| 473 |
size_t __n)); |
| 474 |
# else |
| 475 |
# if ! @HAVE_STPNCPY@ |
| 476 |
_GL_FUNCDECL_SYS (stpncpy, char *, |
| 477 |
(char *restrict __dst, char const *restrict __src, |
| 478 |
size_t __n) |
| 479 |
_GL_ARG_NONNULL ((1, 2))); |
| 480 |
# endif |
| 481 |
_GL_CXXALIAS_SYS (stpncpy, char *, |
| 482 |
(char *restrict __dst, char const *restrict __src, |
| 483 |
size_t __n)); |
| 484 |
# endif |
| 485 |
# if __GLIBC__ >= 2 |
| 486 |
_GL_CXXALIASWARN (stpncpy); |
| 487 |
# endif |
| 488 |
#elif defined GNULIB_POSIXCHECK |
| 489 |
# undef stpncpy |
| 490 |
# if HAVE_RAW_DECL_STPNCPY |
| 491 |
_GL_WARN_ON_USE (stpncpy, "stpncpy is unportable - " |
| 492 |
"use gnulib module stpncpy for portability"); |
| 493 |
# endif |
| 494 |
#endif |
| 495 |
|
| 496 |
#if defined GNULIB_POSIXCHECK |
| 497 |
|
| 498 |
|
| 499 |
# undef strchr |
| 500 |
|
| 501 |
_GL_WARN_ON_USE_CXX (strchr, |
| 502 |
const char *, char *, (const char *, int), |
| 503 |
"strchr cannot work correctly on character strings " |
| 504 |
"in some multibyte locales - " |
| 505 |
"use mbschr if you care about internationalization"); |
| 506 |
#endif |
| 507 |
|
| 508 |
|
| 509 |
#if @GNULIB_STRCHRNUL@ |
| 510 |
# if @REPLACE_STRCHRNUL@ |
| 511 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 512 |
# define strchrnul rpl_strchrnul |
| 513 |
# endif |
| 514 |
_GL_FUNCDECL_RPL (strchrnul, char *, (const char *__s, int __c_in) |
| 515 |
_GL_ATTRIBUTE_PURE |
| 516 |
_GL_ARG_NONNULL ((1))); |
| 517 |
_GL_CXXALIAS_RPL (strchrnul, char *, |
| 518 |
(const char *str, int ch)); |
| 519 |
# else |
| 520 |
# if ! @HAVE_STRCHRNUL@ |
| 521 |
_GL_FUNCDECL_SYS (strchrnul, char *, (char const *__s, int __c_in) |
| 522 |
_GL_ATTRIBUTE_PURE |
| 523 |
_GL_ARG_NONNULL ((1))); |
| 524 |
# endif |
| 525 |
|
| 526 |
|
| 527 |
|
| 528 |
_GL_CXXALIAS_SYS_CAST2 (strchrnul, |
| 529 |
char *, (char const *__s, int __c_in), |
| 530 |
char const *, (char const *__s, int __c_in)); |
| 531 |
# endif |
| 532 |
# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ |
| 533 |
&& (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ |
| 534 |
|| defined __clang__) |
| 535 |
_GL_CXXALIASWARN1 (strchrnul, char *, (char *__s, int __c_in) throw ()); |
| 536 |
_GL_CXXALIASWARN1 (strchrnul, char const *, |
| 537 |
(char const *__s, int __c_in) throw ()); |
| 538 |
# elif __GLIBC__ >= 2 |
| 539 |
_GL_CXXALIASWARN (strchrnul); |
| 540 |
# endif |
| 541 |
#elif defined GNULIB_POSIXCHECK |
| 542 |
# undef strchrnul |
| 543 |
# if HAVE_RAW_DECL_STRCHRNUL |
| 544 |
_GL_WARN_ON_USE (strchrnul, "strchrnul is unportable - " |
| 545 |
"use gnulib module strchrnul for portability"); |
| 546 |
# endif |
| 547 |
#endif |
| 548 |
|
| 549 |
|
| 550 |
#if @GNULIB_STRDUP@ |
| 551 |
# if @REPLACE_STRDUP@ |
| 552 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 553 |
# undef strdup |
| 554 |
# define strdup rpl_strdup |
| 555 |
# endif |
| 556 |
_GL_FUNCDECL_RPL (strdup, char *, |
| 557 |
(char const *__s) |
| 558 |
_GL_ARG_NONNULL ((1)) |
| 559 |
_GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); |
| 560 |
_GL_CXXALIAS_RPL (strdup, char *, (char const *__s)); |
| 561 |
# elif defined _WIN32 && !defined __CYGWIN__ |
| 562 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 563 |
# undef strdup |
| 564 |
# define strdup _strdup |
| 565 |
# endif |
| 566 |
_GL_CXXALIAS_MDA (strdup, char *, (char const *__s)); |
| 567 |
# else |
| 568 |
# if defined __cplusplus && defined GNULIB_NAMESPACE && defined strdup |
| 569 |
|
| 570 |
# undef strdup |
| 571 |
# endif |
| 572 |
# if (!@HAVE_DECL_STRDUP@ || __GNUC__ >= 11) && !defined strdup |
| 573 |
_GL_FUNCDECL_SYS (strdup, char *, |
| 574 |
(char const *__s) |
| 575 |
_GL_ARG_NONNULL ((1)) |
| 576 |
_GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); |
| 577 |
# endif |
| 578 |
_GL_CXXALIAS_SYS (strdup, char *, (char const *__s)); |
| 579 |
# endif |
| 580 |
_GL_CXXALIASWARN (strdup); |
| 581 |
#else |
| 582 |
# if __GNUC__ >= 11 && !defined strdup |
| 583 |
|
| 584 |
_GL_FUNCDECL_SYS (strdup, char *, |
| 585 |
(char const *__s) |
| 586 |
_GL_ARG_NONNULL ((1)) |
| 587 |
_GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); |
| 588 |
# endif |
| 589 |
# if defined GNULIB_POSIXCHECK |
| 590 |
# undef strdup |
| 591 |
# if HAVE_RAW_DECL_STRDUP |
| 592 |
_GL_WARN_ON_USE (strdup, "strdup is unportable - " |
| 593 |
"use gnulib module strdup for portability"); |
| 594 |
# endif |
| 595 |
# elif @GNULIB_MDA_STRDUP@ |
| 596 |
|
| 597 |
|
| 598 |
|
| 599 |
# if defined _WIN32 && !defined __CYGWIN__ |
| 600 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 601 |
# undef strdup |
| 602 |
# define strdup _strdup |
| 603 |
# endif |
| 604 |
_GL_CXXALIAS_MDA (strdup, char *, (char const *__s)); |
| 605 |
# else |
| 606 |
# if defined __cplusplus && defined GNULIB_NAMESPACE && defined strdup |
| 607 |
# undef strdup |
| 608 |
# endif |
| 609 |
_GL_CXXALIAS_SYS (strdup, char *, (char const *__s)); |
| 610 |
# endif |
| 611 |
_GL_CXXALIASWARN (strdup); |
| 612 |
# endif |
| 613 |
#endif |
| 614 |
|
| 615 |
|
| 616 |
#if @GNULIB_STRNCAT@ |
| 617 |
# if @REPLACE_STRNCAT@ |
| 618 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 619 |
# undef strncat |
| 620 |
# define strncat rpl_strncat |
| 621 |
# endif |
| 622 |
_GL_FUNCDECL_RPL (strncat, char *, |
| 623 |
(char *restrict dest, const char *restrict src, size_t n) |
| 624 |
_GL_ARG_NONNULL ((1, 2))); |
| 625 |
_GL_CXXALIAS_RPL (strncat, char *, |
| 626 |
(char *restrict dest, const char *restrict src, size_t n)); |
| 627 |
# else |
| 628 |
_GL_CXXALIAS_SYS (strncat, char *, |
| 629 |
(char *restrict dest, const char *restrict src, size_t n)); |
| 630 |
# endif |
| 631 |
# if __GLIBC__ >= 2 |
| 632 |
_GL_CXXALIASWARN (strncat); |
| 633 |
# endif |
| 634 |
#elif defined GNULIB_POSIXCHECK |
| 635 |
# undef strncat |
| 636 |
# if HAVE_RAW_DECL_STRNCAT |
| 637 |
_GL_WARN_ON_USE (strncat, "strncat is unportable - " |
| 638 |
"use gnulib module strncat for portability"); |
| 639 |
# endif |
| 640 |
#endif |
| 641 |
|
| 642 |
|
| 643 |
#if @GNULIB_STRNDUP@ |
| 644 |
# if @REPLACE_STRNDUP@ |
| 645 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 646 |
# undef strndup |
| 647 |
# define strndup rpl_strndup |
| 648 |
# endif |
| 649 |
_GL_FUNCDECL_RPL (strndup, char *, |
| 650 |
(char const *__s, size_t __n) |
| 651 |
_GL_ARG_NONNULL ((1)) |
| 652 |
_GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); |
| 653 |
_GL_CXXALIAS_RPL (strndup, char *, (char const *__s, size_t __n)); |
| 654 |
# else |
| 655 |
# if !@HAVE_DECL_STRNDUP@ || (__GNUC__ >= 11 && !defined strndup) |
| 656 |
_GL_FUNCDECL_SYS (strndup, char *, |
| 657 |
(char const *__s, size_t __n) |
| 658 |
_GL_ARG_NONNULL ((1)) |
| 659 |
_GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); |
| 660 |
# endif |
| 661 |
_GL_CXXALIAS_SYS (strndup, char *, (char const *__s, size_t __n)); |
| 662 |
# endif |
| 663 |
_GL_CXXALIASWARN (strndup); |
| 664 |
#else |
| 665 |
# if __GNUC__ >= 11 && !defined strndup |
| 666 |
|
| 667 |
_GL_FUNCDECL_SYS (strndup, char *, |
| 668 |
(char const *__s, size_t __n) |
| 669 |
_GL_ARG_NONNULL ((1)) |
| 670 |
_GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE); |
| 671 |
# endif |
| 672 |
# if defined GNULIB_POSIXCHECK |
| 673 |
# undef strndup |
| 674 |
# if HAVE_RAW_DECL_STRNDUP |
| 675 |
_GL_WARN_ON_USE (strndup, "strndup is unportable - " |
| 676 |
"use gnulib module strndup for portability"); |
| 677 |
# endif |
| 678 |
# endif |
| 679 |
#endif |
| 680 |
|
| 681 |
|
| 682 |
|
| 683 |
|
| 684 |
#if @GNULIB_STRNLEN@ |
| 685 |
# if @REPLACE_STRNLEN@ |
| 686 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 687 |
# undef strnlen |
| 688 |
# define strnlen rpl_strnlen |
| 689 |
# endif |
| 690 |
_GL_FUNCDECL_RPL (strnlen, size_t, (char const *__s, size_t __maxlen) |
| 691 |
_GL_ATTRIBUTE_PURE |
| 692 |
_GL_ARG_NONNULL ((1))); |
| 693 |
_GL_CXXALIAS_RPL (strnlen, size_t, (char const *__s, size_t __maxlen)); |
| 694 |
# else |
| 695 |
# if ! @HAVE_DECL_STRNLEN@ |
| 696 |
_GL_FUNCDECL_SYS (strnlen, size_t, (char const *__s, size_t __maxlen) |
| 697 |
_GL_ATTRIBUTE_PURE |
| 698 |
_GL_ARG_NONNULL ((1))); |
| 699 |
# endif |
| 700 |
_GL_CXXALIAS_SYS (strnlen, size_t, (char const *__s, size_t __maxlen)); |
| 701 |
# endif |
| 702 |
_GL_CXXALIASWARN (strnlen); |
| 703 |
#elif defined GNULIB_POSIXCHECK |
| 704 |
# undef strnlen |
| 705 |
# if HAVE_RAW_DECL_STRNLEN |
| 706 |
_GL_WARN_ON_USE (strnlen, "strnlen is unportable - " |
| 707 |
"use gnulib module strnlen for portability"); |
| 708 |
# endif |
| 709 |
#endif |
| 710 |
|
| 711 |
#if defined GNULIB_POSIXCHECK |
| 712 |
|
| 713 |
|
| 714 |
|
| 715 |
|
| 716 |
# undef strcspn |
| 717 |
|
| 718 |
_GL_WARN_ON_USE (strcspn, "strcspn cannot work correctly on character strings " |
| 719 |
"in multibyte locales - " |
| 720 |
"use mbscspn if you care about internationalization"); |
| 721 |
#endif |
| 722 |
|
| 723 |
|
| 724 |
#if @GNULIB_STRPBRK@ |
| 725 |
# if ! @HAVE_STRPBRK@ |
| 726 |
_GL_FUNCDECL_SYS (strpbrk, char *, (char const *__s, char const *__accept) |
| 727 |
_GL_ATTRIBUTE_PURE |
| 728 |
_GL_ARG_NONNULL ((1, 2))); |
| 729 |
# endif |
| 730 |
|
| 731 |
|
| 732 |
|
| 733 |
_GL_CXXALIAS_SYS_CAST2 (strpbrk, |
| 734 |
char *, (char const *__s, char const *__accept), |
| 735 |
const char *, (char const *__s, char const *__accept)); |
| 736 |
# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ |
| 737 |
&& (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ |
| 738 |
|| defined __clang__) |
| 739 |
_GL_CXXALIASWARN1 (strpbrk, char *, (char *__s, char const *__accept) throw ()); |
| 740 |
_GL_CXXALIASWARN1 (strpbrk, char const *, |
| 741 |
(char const *__s, char const *__accept) throw ()); |
| 742 |
# elif __GLIBC__ >= 2 |
| 743 |
_GL_CXXALIASWARN (strpbrk); |
| 744 |
# endif |
| 745 |
# if defined GNULIB_POSIXCHECK |
| 746 |
|
| 747 |
|
| 748 |
|
| 749 |
|
| 750 |
# undef strpbrk |
| 751 |
_GL_WARN_ON_USE_CXX (strpbrk, |
| 752 |
const char *, char *, (const char *, const char *), |
| 753 |
"strpbrk cannot work correctly on character strings " |
| 754 |
"in multibyte locales - " |
| 755 |
"use mbspbrk if you care about internationalization"); |
| 756 |
# endif |
| 757 |
#elif defined GNULIB_POSIXCHECK |
| 758 |
# undef strpbrk |
| 759 |
# if HAVE_RAW_DECL_STRPBRK |
| 760 |
_GL_WARN_ON_USE_CXX (strpbrk, |
| 761 |
const char *, char *, (const char *, const char *), |
| 762 |
"strpbrk is unportable - " |
| 763 |
"use gnulib module strpbrk for portability"); |
| 764 |
# endif |
| 765 |
#endif |
| 766 |
|
| 767 |
#if defined GNULIB_POSIXCHECK |
| 768 |
|
| 769 |
|
| 770 |
# undef strspn |
| 771 |
|
| 772 |
_GL_WARN_ON_USE (strspn, "strspn cannot work correctly on character strings " |
| 773 |
"in multibyte locales - " |
| 774 |
"use mbsspn if you care about internationalization"); |
| 775 |
#endif |
| 776 |
|
| 777 |
#if defined GNULIB_POSIXCHECK |
| 778 |
|
| 779 |
|
| 780 |
# undef strrchr |
| 781 |
|
| 782 |
_GL_WARN_ON_USE_CXX (strrchr, |
| 783 |
const char *, char *, (const char *, int), |
| 784 |
"strrchr cannot work correctly on character strings " |
| 785 |
"in some multibyte locales - " |
| 786 |
"use mbsrchr if you care about internationalization"); |
| 787 |
#endif |
| 788 |
|
| 789 |
|
| 790 |
|
| 791 |
|
| 792 |
|
| 793 |
|
| 794 |
|
| 795 |
|
| 796 |
|
| 797 |
|
| 798 |
|
| 799 |
|
| 800 |
|
| 801 |
|
| 802 |
|
| 803 |
|
| 804 |
|
| 805 |
#if @GNULIB_STRSEP@ |
| 806 |
# if ! @HAVE_STRSEP@ |
| 807 |
_GL_FUNCDECL_SYS (strsep, char *, |
| 808 |
(char **restrict __stringp, char const *restrict __delim) |
| 809 |
_GL_ARG_NONNULL ((1, 2))); |
| 810 |
# endif |
| 811 |
_GL_CXXALIAS_SYS (strsep, char *, |
| 812 |
(char **restrict __stringp, char const *restrict __delim)); |
| 813 |
_GL_CXXALIASWARN (strsep); |
| 814 |
# if defined GNULIB_POSIXCHECK |
| 815 |
# undef strsep |
| 816 |
_GL_WARN_ON_USE (strsep, "strsep cannot work correctly on character strings " |
| 817 |
"in multibyte locales - " |
| 818 |
"use mbssep if you care about internationalization"); |
| 819 |
# endif |
| 820 |
#elif defined GNULIB_POSIXCHECK |
| 821 |
# undef strsep |
| 822 |
# if HAVE_RAW_DECL_STRSEP |
| 823 |
_GL_WARN_ON_USE (strsep, "strsep is unportable - " |
| 824 |
"use gnulib module strsep for portability"); |
| 825 |
# endif |
| 826 |
#endif |
| 827 |
|
| 828 |
#if @GNULIB_STRSTR@ |
| 829 |
# if @REPLACE_STRSTR@ |
| 830 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 831 |
# define strstr rpl_strstr |
| 832 |
# endif |
| 833 |
_GL_FUNCDECL_RPL (strstr, char *, (const char *haystack, const char *needle) |
| 834 |
_GL_ATTRIBUTE_PURE |
| 835 |
_GL_ARG_NONNULL ((1, 2))); |
| 836 |
_GL_CXXALIAS_RPL (strstr, char *, (const char *haystack, const char *needle)); |
| 837 |
# else |
| 838 |
|
| 839 |
|
| 840 |
|
| 841 |
_GL_CXXALIAS_SYS_CAST2 (strstr, |
| 842 |
char *, (const char *haystack, const char *needle), |
| 843 |
const char *, (const char *haystack, const char *needle)); |
| 844 |
# endif |
| 845 |
# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ |
| 846 |
&& (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ |
| 847 |
|| defined __clang__) |
| 848 |
_GL_CXXALIASWARN1 (strstr, char *, |
| 849 |
(char *haystack, const char *needle) throw ()); |
| 850 |
_GL_CXXALIASWARN1 (strstr, const char *, |
| 851 |
(const char *haystack, const char *needle) throw ()); |
| 852 |
# elif __GLIBC__ >= 2 |
| 853 |
_GL_CXXALIASWARN (strstr); |
| 854 |
# endif |
| 855 |
#elif defined GNULIB_POSIXCHECK |
| 856 |
|
| 857 |
|
| 858 |
|
| 859 |
|
| 860 |
# undef strstr |
| 861 |
|
| 862 |
_GL_WARN_ON_USE (strstr, "strstr is quadratic on many systems, and cannot " |
| 863 |
"work correctly on character strings in most " |
| 864 |
"multibyte locales - " |
| 865 |
"use mbsstr if you care about internationalization, " |
| 866 |
"or use strstr if you care about speed"); |
| 867 |
#endif |
| 868 |
|
| 869 |
|
| 870 |
|
| 871 |
#if @GNULIB_STRCASESTR@ |
| 872 |
# if @REPLACE_STRCASESTR@ |
| 873 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 874 |
# define strcasestr rpl_strcasestr |
| 875 |
# endif |
| 876 |
_GL_FUNCDECL_RPL (strcasestr, char *, |
| 877 |
(const char *haystack, const char *needle) |
| 878 |
_GL_ATTRIBUTE_PURE |
| 879 |
_GL_ARG_NONNULL ((1, 2))); |
| 880 |
_GL_CXXALIAS_RPL (strcasestr, char *, |
| 881 |
(const char *haystack, const char *needle)); |
| 882 |
# else |
| 883 |
# if ! @HAVE_STRCASESTR@ |
| 884 |
_GL_FUNCDECL_SYS (strcasestr, char *, |
| 885 |
(const char *haystack, const char *needle) |
| 886 |
_GL_ATTRIBUTE_PURE |
| 887 |
_GL_ARG_NONNULL ((1, 2))); |
| 888 |
# endif |
| 889 |
|
| 890 |
|
| 891 |
|
| 892 |
_GL_CXXALIAS_SYS_CAST2 (strcasestr, |
| 893 |
char *, (const char *haystack, const char *needle), |
| 894 |
const char *, (const char *haystack, const char *needle)); |
| 895 |
# endif |
| 896 |
# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ |
| 897 |
&& (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) \ |
| 898 |
|| defined __clang__) |
| 899 |
_GL_CXXALIASWARN1 (strcasestr, char *, |
| 900 |
(char *haystack, const char *needle) throw ()); |
| 901 |
_GL_CXXALIASWARN1 (strcasestr, const char *, |
| 902 |
(const char *haystack, const char *needle) throw ()); |
| 903 |
# elif __GLIBC__ >= 2 |
| 904 |
_GL_CXXALIASWARN (strcasestr); |
| 905 |
# endif |
| 906 |
#elif defined GNULIB_POSIXCHECK |
| 907 |
|
| 908 |
|
| 909 |
|
| 910 |
# undef strcasestr |
| 911 |
# if HAVE_RAW_DECL_STRCASESTR |
| 912 |
_GL_WARN_ON_USE (strcasestr, "strcasestr does work correctly on character " |
| 913 |
"strings in multibyte locales - " |
| 914 |
"use mbscasestr if you care about " |
| 915 |
"internationalization, or use c-strcasestr if you want " |
| 916 |
"a locale independent function"); |
| 917 |
# endif |
| 918 |
#endif |
| 919 |
|
| 920 |
|
| 921 |
|
| 922 |
|
| 923 |
|
| 924 |
|
| 925 |
|
| 926 |
|
| 927 |
|
| 928 |
|
| 929 |
|
| 930 |
|
| 931 |
|
| 932 |
|
| 933 |
|
| 934 |
|
| 935 |
|
| 936 |
|
| 937 |
|
| 938 |
|
| 939 |
|
| 940 |
|
| 941 |
|
| 942 |
#if @GNULIB_STRTOK_R@ |
| 943 |
# if @REPLACE_STRTOK_R@ |
| 944 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 945 |
# undef strtok_r |
| 946 |
# define strtok_r rpl_strtok_r |
| 947 |
# endif |
| 948 |
_GL_FUNCDECL_RPL (strtok_r, char *, |
| 949 |
(char *restrict s, char const *restrict delim, |
| 950 |
char **restrict save_ptr) |
| 951 |
_GL_ARG_NONNULL ((2, 3))); |
| 952 |
_GL_CXXALIAS_RPL (strtok_r, char *, |
| 953 |
(char *restrict s, char const *restrict delim, |
| 954 |
char **restrict save_ptr)); |
| 955 |
# else |
| 956 |
# if @UNDEFINE_STRTOK_R@ || defined GNULIB_POSIXCHECK |
| 957 |
# undef strtok_r |
| 958 |
# endif |
| 959 |
# if ! @HAVE_DECL_STRTOK_R@ |
| 960 |
_GL_FUNCDECL_SYS (strtok_r, char *, |
| 961 |
(char *restrict s, char const *restrict delim, |
| 962 |
char **restrict save_ptr) |
| 963 |
_GL_ARG_NONNULL ((2, 3))); |
| 964 |
# endif |
| 965 |
_GL_CXXALIAS_SYS (strtok_r, char *, |
| 966 |
(char *restrict s, char const *restrict delim, |
| 967 |
char **restrict save_ptr)); |
| 968 |
# endif |
| 969 |
_GL_CXXALIASWARN (strtok_r); |
| 970 |
# if defined GNULIB_POSIXCHECK |
| 971 |
_GL_WARN_ON_USE (strtok_r, "strtok_r cannot work correctly on character " |
| 972 |
"strings in multibyte locales - " |
| 973 |
"use mbstok_r if you care about internationalization"); |
| 974 |
# endif |
| 975 |
#elif defined GNULIB_POSIXCHECK |
| 976 |
# undef strtok_r |
| 977 |
# if HAVE_RAW_DECL_STRTOK_R |
| 978 |
_GL_WARN_ON_USE (strtok_r, "strtok_r is unportable - " |
| 979 |
"use gnulib module strtok_r for portability"); |
| 980 |
# endif |
| 981 |
#endif |
| 982 |
|
| 983 |
|
| 984 |
|
| 985 |
|
| 986 |
|
| 987 |
#if @GNULIB_MBSLEN@ |
| 988 |
|
| 989 |
|
| 990 |
# ifdef __MirBSD__ |
| 991 |
# undef mbslen |
| 992 |
# endif |
| 993 |
# if @HAVE_MBSLEN@ |
| 994 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 995 |
# define mbslen rpl_mbslen |
| 996 |
# endif |
| 997 |
_GL_FUNCDECL_RPL (mbslen, size_t, (const char *string) |
| 998 |
_GL_ATTRIBUTE_PURE |
| 999 |
_GL_ARG_NONNULL ((1))); |
| 1000 |
_GL_CXXALIAS_RPL (mbslen, size_t, (const char *string)); |
| 1001 |
# else |
| 1002 |
_GL_FUNCDECL_SYS (mbslen, size_t, (const char *string) |
| 1003 |
_GL_ATTRIBUTE_PURE |
| 1004 |
_GL_ARG_NONNULL ((1))); |
| 1005 |
_GL_CXXALIAS_SYS (mbslen, size_t, (const char *string)); |
| 1006 |
# endif |
| 1007 |
# if __GLIBC__ >= 2 |
| 1008 |
_GL_CXXALIASWARN (mbslen); |
| 1009 |
# endif |
| 1010 |
#endif |
| 1011 |
|
| 1012 |
#if @GNULIB_MBSNLEN@ |
| 1013 |
|
| 1014 |
|
| 1015 |
_GL_EXTERN_C size_t mbsnlen (const char *string, size_t len) |
| 1016 |
_GL_ATTRIBUTE_PURE |
| 1017 |
_GL_ARG_NONNULL ((1)); |
| 1018 |
#endif |
| 1019 |
|
| 1020 |
#if @GNULIB_MBSCHR@ |
| 1021 |
|
| 1022 |
|
| 1023 |
|
| 1024 |
|
| 1025 |
# if defined __hpux |
| 1026 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 1027 |
# define mbschr rpl_mbschr |
| 1028 |
# endif |
| 1029 |
_GL_FUNCDECL_RPL (mbschr, char *, (const char *string, int c) |
| 1030 |
_GL_ATTRIBUTE_PURE |
| 1031 |
_GL_ARG_NONNULL ((1))); |
| 1032 |
_GL_CXXALIAS_RPL (mbschr, char *, (const char *string, int c)); |
| 1033 |
# else |
| 1034 |
_GL_FUNCDECL_SYS (mbschr, char *, (const char *string, int c) |
| 1035 |
_GL_ATTRIBUTE_PURE |
| 1036 |
_GL_ARG_NONNULL ((1))); |
| 1037 |
_GL_CXXALIAS_SYS (mbschr, char *, (const char *string, int c)); |
| 1038 |
# endif |
| 1039 |
_GL_CXXALIASWARN (mbschr); |
| 1040 |
#endif |
| 1041 |
|
| 1042 |
#if @GNULIB_MBSRCHR@ |
| 1043 |
|
| 1044 |
|
| 1045 |
|
| 1046 |
|
| 1047 |
# if defined __hpux || defined __INTERIX |
| 1048 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 1049 |
# define mbsrchr rpl_mbsrchr |
| 1050 |
# endif |
| 1051 |
_GL_FUNCDECL_RPL (mbsrchr, char *, (const char *string, int c) |
| 1052 |
_GL_ATTRIBUTE_PURE |
| 1053 |
_GL_ARG_NONNULL ((1))); |
| 1054 |
_GL_CXXALIAS_RPL (mbsrchr, char *, (const char *string, int c)); |
| 1055 |
# else |
| 1056 |
_GL_FUNCDECL_SYS (mbsrchr, char *, (const char *string, int c) |
| 1057 |
_GL_ATTRIBUTE_PURE |
| 1058 |
_GL_ARG_NONNULL ((1))); |
| 1059 |
_GL_CXXALIAS_SYS (mbsrchr, char *, (const char *string, int c)); |
| 1060 |
# endif |
| 1061 |
_GL_CXXALIASWARN (mbsrchr); |
| 1062 |
#endif |
| 1063 |
|
| 1064 |
#if @GNULIB_MBSSTR@ |
| 1065 |
|
| 1066 |
|
| 1067 |
|
| 1068 |
|
| 1069 |
_GL_EXTERN_C char * mbsstr (const char *haystack, const char *needle) |
| 1070 |
_GL_ATTRIBUTE_PURE |
| 1071 |
_GL_ARG_NONNULL ((1, 2)); |
| 1072 |
#endif |
| 1073 |
|
| 1074 |
#if @GNULIB_MBSCASECMP@ |
| 1075 |
|
| 1076 |
|
| 1077 |
|
| 1078 |
|
| 1079 |
|
| 1080 |
|
| 1081 |
_GL_EXTERN_C int mbscasecmp (const char *s1, const char *s2) |
| 1082 |
_GL_ATTRIBUTE_PURE |
| 1083 |
_GL_ARG_NONNULL ((1, 2)); |
| 1084 |
#endif |
| 1085 |
|
| 1086 |
#if @GNULIB_MBSNCASECMP@ |
| 1087 |
|
| 1088 |
|
| 1089 |
|
| 1090 |
|
| 1091 |
|
| 1092 |
|
| 1093 |
|
| 1094 |
|
| 1095 |
|
| 1096 |
_GL_EXTERN_C int mbsncasecmp (const char *s1, const char *s2, size_t n) |
| 1097 |
_GL_ATTRIBUTE_PURE |
| 1098 |
_GL_ARG_NONNULL ((1, 2)); |
| 1099 |
#endif |
| 1100 |
|
| 1101 |
#if @GNULIB_MBSPCASECMP@ |
| 1102 |
|
| 1103 |
|
| 1104 |
|
| 1105 |
|
| 1106 |
|
| 1107 |
|
| 1108 |
|
| 1109 |
|
| 1110 |
_GL_EXTERN_C char * mbspcasecmp (const char *string, const char *prefix) |
| 1111 |
_GL_ATTRIBUTE_PURE |
| 1112 |
_GL_ARG_NONNULL ((1, 2)); |
| 1113 |
#endif |
| 1114 |
|
| 1115 |
#if @GNULIB_MBSCASESTR@ |
| 1116 |
|
| 1117 |
|
| 1118 |
|
| 1119 |
|
| 1120 |
|
| 1121 |
_GL_EXTERN_C char * mbscasestr (const char *haystack, const char *needle) |
| 1122 |
_GL_ATTRIBUTE_PURE |
| 1123 |
_GL_ARG_NONNULL ((1, 2)); |
| 1124 |
#endif |
| 1125 |
|
| 1126 |
#if @GNULIB_MBSCSPN@ |
| 1127 |
|
| 1128 |
|
| 1129 |
|
| 1130 |
|
| 1131 |
|
| 1132 |
_GL_EXTERN_C size_t mbscspn (const char *string, const char *accept) |
| 1133 |
_GL_ATTRIBUTE_PURE |
| 1134 |
_GL_ARG_NONNULL ((1, 2)); |
| 1135 |
#endif |
| 1136 |
|
| 1137 |
#if @GNULIB_MBSPBRK@ |
| 1138 |
|
| 1139 |
|
| 1140 |
|
| 1141 |
|
| 1142 |
# if defined __hpux |
| 1143 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 1144 |
# define mbspbrk rpl_mbspbrk |
| 1145 |
# endif |
| 1146 |
_GL_FUNCDECL_RPL (mbspbrk, char *, (const char *string, const char *accept) |
| 1147 |
_GL_ATTRIBUTE_PURE |
| 1148 |
_GL_ARG_NONNULL ((1, 2))); |
| 1149 |
_GL_CXXALIAS_RPL (mbspbrk, char *, (const char *string, const char *accept)); |
| 1150 |
# else |
| 1151 |
_GL_FUNCDECL_SYS (mbspbrk, char *, (const char *string, const char *accept) |
| 1152 |
_GL_ATTRIBUTE_PURE |
| 1153 |
_GL_ARG_NONNULL ((1, 2))); |
| 1154 |
_GL_CXXALIAS_SYS (mbspbrk, char *, (const char *string, const char *accept)); |
| 1155 |
# endif |
| 1156 |
_GL_CXXALIASWARN (mbspbrk); |
| 1157 |
#endif |
| 1158 |
|
| 1159 |
#if @GNULIB_MBSSPN@ |
| 1160 |
|
| 1161 |
|
| 1162 |
|
| 1163 |
|
| 1164 |
|
| 1165 |
_GL_EXTERN_C size_t mbsspn (const char *string, const char *reject) |
| 1166 |
_GL_ATTRIBUTE_PURE |
| 1167 |
_GL_ARG_NONNULL ((1, 2)); |
| 1168 |
#endif |
| 1169 |
|
| 1170 |
#if @GNULIB_MBSSEP@ |
| 1171 |
|
| 1172 |
|
| 1173 |
|
| 1174 |
|
| 1175 |
|
| 1176 |
|
| 1177 |
|
| 1178 |
|
| 1179 |
|
| 1180 |
|
| 1181 |
|
| 1182 |
|
| 1183 |
|
| 1184 |
|
| 1185 |
_GL_EXTERN_C char * mbssep (char **stringp, const char *delim) |
| 1186 |
_GL_ARG_NONNULL ((1, 2)); |
| 1187 |
#endif |
| 1188 |
|
| 1189 |
#if @GNULIB_MBSTOK_R@ |
| 1190 |
|
| 1191 |
|
| 1192 |
|
| 1193 |
|
| 1194 |
|
| 1195 |
|
| 1196 |
|
| 1197 |
|
| 1198 |
|
| 1199 |
|
| 1200 |
|
| 1201 |
|
| 1202 |
|
| 1203 |
|
| 1204 |
|
| 1205 |
|
| 1206 |
_GL_EXTERN_C char * mbstok_r (char *restrict string, const char *delim, |
| 1207 |
char **save_ptr) |
| 1208 |
_GL_ARG_NONNULL ((2, 3)); |
| 1209 |
#endif |
| 1210 |
|
| 1211 |
|
| 1212 |
#if @GNULIB_STRERROR@ |
| 1213 |
# if @REPLACE_STRERROR@ |
| 1214 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 1215 |
# undef strerror |
| 1216 |
# define strerror rpl_strerror |
| 1217 |
# endif |
| 1218 |
_GL_FUNCDECL_RPL (strerror, char *, (int)); |
| 1219 |
_GL_CXXALIAS_RPL (strerror, char *, (int)); |
| 1220 |
# else |
| 1221 |
_GL_CXXALIAS_SYS (strerror, char *, (int)); |
| 1222 |
# endif |
| 1223 |
# if __GLIBC__ >= 2 |
| 1224 |
_GL_CXXALIASWARN (strerror); |
| 1225 |
# endif |
| 1226 |
#elif defined GNULIB_POSIXCHECK |
| 1227 |
# undef strerror |
| 1228 |
|
| 1229 |
_GL_WARN_ON_USE (strerror, "strerror is unportable - " |
| 1230 |
"use gnulib module strerror to guarantee non-NULL result"); |
| 1231 |
#endif |
| 1232 |
|
| 1233 |
|
| 1234 |
|
| 1235 |
#if @GNULIB_STRERROR_R@ |
| 1236 |
# if @REPLACE_STRERROR_R@ |
| 1237 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 1238 |
# undef strerror_r |
| 1239 |
# define strerror_r rpl_strerror_r |
| 1240 |
# endif |
| 1241 |
_GL_FUNCDECL_RPL (strerror_r, int, (int errnum, char *buf, size_t buflen) |
| 1242 |
_GL_ARG_NONNULL ((2))); |
| 1243 |
_GL_CXXALIAS_RPL (strerror_r, int, (int errnum, char *buf, size_t buflen)); |
| 1244 |
# else |
| 1245 |
# if !@HAVE_DECL_STRERROR_R@ |
| 1246 |
_GL_FUNCDECL_SYS (strerror_r, int, (int errnum, char *buf, size_t buflen) |
| 1247 |
_GL_ARG_NONNULL ((2))); |
| 1248 |
# endif |
| 1249 |
_GL_CXXALIAS_SYS (strerror_r, int, (int errnum, char *buf, size_t buflen)); |
| 1250 |
# endif |
| 1251 |
# if __GLIBC__ >= 2 && @HAVE_DECL_STRERROR_R@ |
| 1252 |
_GL_CXXALIASWARN (strerror_r); |
| 1253 |
# endif |
| 1254 |
#elif defined GNULIB_POSIXCHECK |
| 1255 |
# undef strerror_r |
| 1256 |
# if HAVE_RAW_DECL_STRERROR_R |
| 1257 |
_GL_WARN_ON_USE (strerror_r, "strerror_r is unportable - " |
| 1258 |
"use gnulib module strerror_r-posix for portability"); |
| 1259 |
# endif |
| 1260 |
#endif |
| 1261 |
|
| 1262 |
|
| 1263 |
#if @GNULIB_STRERRORNAME_NP@ |
| 1264 |
# if @REPLACE_STRERRORNAME_NP@ |
| 1265 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 1266 |
# undef strerrorname_np |
| 1267 |
# define strerrorname_np rpl_strerrorname_np |
| 1268 |
# endif |
| 1269 |
_GL_FUNCDECL_RPL (strerrorname_np, const char *, (int errnum)); |
| 1270 |
_GL_CXXALIAS_RPL (strerrorname_np, const char *, (int errnum)); |
| 1271 |
# else |
| 1272 |
# if !@HAVE_STRERRORNAME_NP@ |
| 1273 |
_GL_FUNCDECL_SYS (strerrorname_np, const char *, (int errnum)); |
| 1274 |
# endif |
| 1275 |
_GL_CXXALIAS_SYS (strerrorname_np, const char *, (int errnum)); |
| 1276 |
# endif |
| 1277 |
_GL_CXXALIASWARN (strerrorname_np); |
| 1278 |
#elif defined GNULIB_POSIXCHECK |
| 1279 |
# undef strerrorname_np |
| 1280 |
# if HAVE_RAW_DECL_STRERRORNAME_NP |
| 1281 |
_GL_WARN_ON_USE (strerrorname_np, "strerrorname_np is unportable - " |
| 1282 |
"use gnulib module strerrorname_np for portability"); |
| 1283 |
# endif |
| 1284 |
#endif |
| 1285 |
|
| 1286 |
|
| 1287 |
#if @GNULIB_SIGABBREV_NP@ |
| 1288 |
# if ! @HAVE_SIGABBREV_NP@ |
| 1289 |
_GL_FUNCDECL_SYS (sigabbrev_np, const char *, (int sig)); |
| 1290 |
# endif |
| 1291 |
_GL_CXXALIAS_SYS (sigabbrev_np, const char *, (int sig)); |
| 1292 |
_GL_CXXALIASWARN (sigabbrev_np); |
| 1293 |
#elif defined GNULIB_POSIXCHECK |
| 1294 |
# undef sigabbrev_np |
| 1295 |
# if HAVE_RAW_DECL_SIGABBREV_NP |
| 1296 |
_GL_WARN_ON_USE (sigabbrev_np, "sigabbrev_np is unportable - " |
| 1297 |
"use gnulib module sigabbrev_np for portability"); |
| 1298 |
# endif |
| 1299 |
#endif |
| 1300 |
|
| 1301 |
|
| 1302 |
#if @GNULIB_SIGDESCR_NP@ |
| 1303 |
# if ! @HAVE_SIGDESCR_NP@ |
| 1304 |
_GL_FUNCDECL_SYS (sigdescr_np, const char *, (int sig)); |
| 1305 |
# endif |
| 1306 |
_GL_CXXALIAS_SYS (sigdescr_np, const char *, (int sig)); |
| 1307 |
_GL_CXXALIASWARN (sigdescr_np); |
| 1308 |
#elif defined GNULIB_POSIXCHECK |
| 1309 |
# undef sigdescr_np |
| 1310 |
# if HAVE_RAW_DECL_SIGDESCR_NP |
| 1311 |
_GL_WARN_ON_USE (sigdescr_np, "sigdescr_np is unportable - " |
| 1312 |
"use gnulib module sigdescr_np for portability"); |
| 1313 |
# endif |
| 1314 |
#endif |
| 1315 |
|
| 1316 |
#if @GNULIB_STRSIGNAL@ |
| 1317 |
# if @REPLACE_STRSIGNAL@ |
| 1318 |
# if !(defined __cplusplus && defined GNULIB_NAMESPACE) |
| 1319 |
# define strsignal rpl_strsignal |
| 1320 |
# endif |
| 1321 |
_GL_FUNCDECL_RPL (strsignal, char *, (int __sig)); |
| 1322 |
_GL_CXXALIAS_RPL (strsignal, char *, (int __sig)); |
| 1323 |
# else |
| 1324 |
# if ! @HAVE_DECL_STRSIGNAL@ |
| 1325 |
_GL_FUNCDECL_SYS (strsignal, char *, (int __sig)); |
| 1326 |
# endif |
| 1327 |
|
| 1328 |
|
| 1329 |
_GL_CXXALIAS_SYS_CAST (strsignal, char *, (int __sig)); |
| 1330 |
# endif |
| 1331 |
_GL_CXXALIASWARN (strsignal); |
| 1332 |
#elif defined GNULIB_POSIXCHECK |
| 1333 |
# undef strsignal |
| 1334 |
# if HAVE_RAW_DECL_STRSIGNAL |
| 1335 |
_GL_WARN_ON_USE (strsignal, "strsignal is unportable - " |
| 1336 |
"use gnulib module strsignal for portability"); |
| 1337 |
# endif |
| 1338 |
#endif |
| 1339 |
|
| 1340 |
#if @GNULIB_STRVERSCMP@ |
| 1341 |
# if !@HAVE_STRVERSCMP@ |
| 1342 |
_GL_FUNCDECL_SYS (strverscmp, int, (const char *, const char *) |
| 1343 |
_GL_ATTRIBUTE_PURE |
| 1344 |
_GL_ARG_NONNULL ((1, 2))); |
| 1345 |
# endif |
| 1346 |
_GL_CXXALIAS_SYS (strverscmp, int, (const char *, const char *)); |
| 1347 |
_GL_CXXALIASWARN (strverscmp); |
| 1348 |
#elif defined GNULIB_POSIXCHECK |
| 1349 |
# undef strverscmp |
| 1350 |
# if HAVE_RAW_DECL_STRVERSCMP |
| 1351 |
_GL_WARN_ON_USE (strverscmp, "strverscmp is unportable - " |
| 1352 |
"use gnulib module strverscmp for portability"); |
| 1353 |
# endif |
| 1354 |
#endif |
| 1355 |
|
| 1356 |
|
| 1357 |
#endif |
| 1358 |
#endif |
| 1359 |
#endif |