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