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