19 @PRAGMA_SYSTEM_HEADER@
23 #if defined _GL_ALREADY_INCLUDING_STRING_H 30 #@INCLUDE_NEXT@ @NEXT_STRING_H@ 35 #ifndef _@GUARD_PREFIX@_STRING_H 37 #define _GL_ALREADY_INCLUDING_STRING_H 40 #@INCLUDE_NEXT@ @NEXT_STRING_H@ 42 #undef _GL_ALREADY_INCLUDING_STRING_H 44 #ifndef _@GUARD_PREFIX@_STRING_H 45 #define _@GUARD_PREFIX@_STRING_H 51 #if @GNULIB_MBSLEN@ && defined __MirBSD__ 57 #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) 58 # define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) 60 # define _GL_ATTRIBUTE_PURE 65 #if (@GNULIB_STRSIGNAL@ || defined GNULIB_POSIXCHECK) && defined __NetBSD__ \ 66 && ! defined __GLIBC__ 79 #if @GNULIB_EXPLICIT_BZERO@ 80 # if ! @HAVE_EXPLICIT_BZERO@ 86 #elif defined GNULIB_POSIXCHECK 87 # undef explicit_bzero 88 # if HAVE_RAW_DECL_EXPLICIT_BZERO 90 "use gnulib module explicit_bzero for portability");
101 #elif defined GNULIB_POSIXCHECK 103 # if HAVE_RAW_DECL_FFSL 116 #elif defined GNULIB_POSIXCHECK 118 # if HAVE_RAW_DECL_FFSLL 119 _GL_WARN_ON_USE (ffsll,
"ffsll is not portable - use the ffsll module");
126 # if @REPLACE_MEMCHR@ 127 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 128 # define memchr rpl_memchr 144 void *, (
void const *__s,
int __c,
size_t __n),
145 void const *, (
void const *__s,
int __c,
size_t __n));
147 # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ 148 && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) 151 (
void const *__s,
int __c,
size_t __n));
155 #elif defined GNULIB_POSIXCHECK 159 "use gnulib module memchr for portability" );
164 # if @REPLACE_MEMMEM@ 165 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 166 # define memmem rpl_memmem 169 (
void const *__haystack,
size_t __haystack_len,
170 void const *__needle,
size_t __needle_len)
174 (
void const *__haystack,
size_t __haystack_len,
175 void const *__needle,
size_t __needle_len));
177 # if ! @HAVE_DECL_MEMMEM@ 179 (
void const *__haystack,
size_t __haystack_len,
180 void const *__needle,
size_t __needle_len)
185 (
void const *__haystack,
size_t __haystack_len,
186 void const *__needle,
size_t __needle_len));
189 #elif defined GNULIB_POSIXCHECK 191 # if HAVE_RAW_DECL_MEMMEM 193 "use gnulib module memmem-simple for portability, " 194 "and module memmem for speed" );
201 # if ! @HAVE_MEMPCPY@ 211 #elif defined GNULIB_POSIXCHECK 213 # if HAVE_RAW_DECL_MEMPCPY 215 "use gnulib module mempcpy for portability");
221 # if ! @HAVE_DECL_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)) 239 #elif defined GNULIB_POSIXCHECK 241 # if HAVE_RAW_DECL_MEMRCHR 243 "use gnulib module memrchr for portability");
250 #if @GNULIB_RAWMEMCHR@ 251 # if ! @HAVE_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)) 269 #elif defined GNULIB_POSIXCHECK 271 # if HAVE_RAW_DECL_RAWMEMCHR 273 "use gnulib module rawmemchr for portability");
287 #elif defined GNULIB_POSIXCHECK 289 # if HAVE_RAW_DECL_STPCPY 291 "use gnulib module stpcpy for portability");
298 # if @REPLACE_STPNCPY@ 299 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 301 # define stpncpy rpl_stpncpy 311 # if ! @HAVE_STPNCPY@ 322 #elif defined GNULIB_POSIXCHECK 324 # if HAVE_RAW_DECL_STPNCPY 326 "use gnulib module stpncpy for portability");
330 #if defined GNULIB_POSIXCHECK 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");
341 #if @GNULIB_STRCHRNUL@ 342 # if @REPLACE_STRCHRNUL@ 343 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 344 # define strchrnul rpl_strchrnul 350 (
const char *str,
int ch));
352 # if ! @HAVE_STRCHRNUL@ 361 char *, (
char const *__s,
int __c_in),
362 char const *, (
char const *__s,
int __c_in));
364 # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ 365 && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) 371 #elif defined GNULIB_POSIXCHECK 373 # if HAVE_RAW_DECL_STRCHRNUL 375 "use gnulib module strchrnul for portability");
381 # if @REPLACE_STRDUP@ 382 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 384 # define strdup rpl_strdup 389 # if defined __cplusplus && defined GNULIB_NAMESPACE && defined strdup 393 # if !(@HAVE_DECL_STRDUP@ || defined strdup) 399 #elif defined GNULIB_POSIXCHECK 401 # if HAVE_RAW_DECL_STRDUP 403 "use gnulib module strdup for portability");
409 # if @REPLACE_STRNCAT@ 410 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 412 # define strncat rpl_strncat 416 _GL_CXXALIAS_RPL (strncat,
char *, (
char *dest,
const char *src,
size_t n));
418 _GL_CXXALIAS_SYS (strncat,
char *, (
char *dest,
const char *src,
size_t n));
421 #elif defined GNULIB_POSIXCHECK 423 # if HAVE_RAW_DECL_STRNCAT 425 "use gnulib module strncat for portability");
431 # if @REPLACE_STRNDUP@ 432 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 434 # define strndup rpl_strndup 440 # if ! @HAVE_DECL_STRNDUP@ 447 #elif defined GNULIB_POSIXCHECK 449 # if HAVE_RAW_DECL_STRNDUP 451 "use gnulib module strndup for portability");
459 # if @REPLACE_STRNLEN@ 460 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 462 # define strnlen rpl_strnlen 469 # if ! @HAVE_DECL_STRNLEN@ 477 #elif defined GNULIB_POSIXCHECK 479 # if HAVE_RAW_DECL_STRNLEN 481 "use gnulib module strnlen for portability");
485 #if defined GNULIB_POSIXCHECK 492 _GL_WARN_ON_USE (strcspn,
"strcspn cannot work correctly on character strings " 493 "in multibyte locales - " 494 "use mbscspn if you care about internationalization");
499 # if ! @HAVE_STRPBRK@ 508 char *, (
char const *__s,
char const *__accept),
509 const char *, (
char const *__s,
char const *__accept));
510 # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ 511 && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) 514 (
char const *__s,
char const *__accept));
518 # if defined GNULIB_POSIXCHECK 524 _GL_WARN_ON_USE (strpbrk,
"strpbrk cannot work correctly on character strings " 525 "in multibyte locales - " 526 "use mbspbrk if you care about internationalization");
528 #elif defined GNULIB_POSIXCHECK 530 # if HAVE_RAW_DECL_STRPBRK 532 "use gnulib module strpbrk for portability");
536 #if defined GNULIB_POSIXCHECK 541 _GL_WARN_ON_USE (strspn,
"strspn cannot work correctly on character strings " 542 "in multibyte locales - " 543 "use mbsspn if you care about internationalization");
546 #if defined GNULIB_POSIXCHECK 551 _GL_WARN_ON_USE (strrchr,
"strrchr cannot work correctly on character strings " 552 "in some multibyte locales - " 553 "use mbsrchr if you care about internationalization");
581 # if defined GNULIB_POSIXCHECK 583 _GL_WARN_ON_USE (strsep,
"strsep cannot work correctly on character strings " 584 "in multibyte locales - " 585 "use mbssep if you care about internationalization");
587 #elif defined GNULIB_POSIXCHECK 589 # if HAVE_RAW_DECL_STRSEP 591 "use gnulib module strsep for portability");
596 # if @REPLACE_STRSTR@ 597 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 598 # define strstr rpl_strstr 609 char *, (
const char *haystack,
const char *needle),
610 const char *, (
const char *haystack,
const char *needle));
612 # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ 613 && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) 616 (
const char *haystack,
const char *needle));
620 #elif defined GNULIB_POSIXCHECK 628 "work correctly on character strings in most " 629 "multibyte locales - " 630 "use mbsstr if you care about internationalization, " 631 "or use strstr if you care about speed");
636 #if @GNULIB_STRCASESTR@ 637 # if @REPLACE_STRCASESTR@ 638 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 639 # define strcasestr rpl_strcasestr 642 (
const char *haystack,
const char *needle)
646 (
const char *haystack,
const char *needle));
648 # if ! @HAVE_STRCASESTR@ 650 (
const char *haystack,
const char *needle)
658 char *, (
const char *haystack,
const char *needle),
659 const char *, (
const char *haystack,
const char *needle));
661 # if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ 662 && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) 665 (
const char *haystack,
const char *needle));
669 #elif defined GNULIB_POSIXCHECK 674 # if HAVE_RAW_DECL_STRCASESTR 675 _GL_WARN_ON_USE (strcasestr,
"strcasestr does work correctly on character " 676 "strings in multibyte locales - " 677 "use mbscasestr if you care about " 678 "internationalization, or use c-strcasestr if you want " 679 "a locale independent function");
705 #if @GNULIB_STRTOK_R@ 706 # if @REPLACE_STRTOK_R@ 707 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 709 # define strtok_r rpl_strtok_r 719 # if @UNDEFINE_STRTOK_R@ || defined GNULIB_POSIXCHECK 722 # if ! @HAVE_DECL_STRTOK_R@ 733 # if defined GNULIB_POSIXCHECK 734 _GL_WARN_ON_USE (strtok_r,
"strtok_r cannot work correctly on character " 735 "strings in multibyte locales - " 736 "use mbstok_r if you care about internationalization");
738 #elif defined GNULIB_POSIXCHECK 740 # if HAVE_RAW_DECL_STRTOK_R 742 "use gnulib module strtok_r for portability");
757 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 758 # define mbslen rpl_mbslen 776 _GL_EXTERN_C size_t mbsnlen (
const char *
string,
size_t len)
787 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 788 # define mbschr rpl_mbschr 808 # if defined __hpux || defined __INTERIX 809 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 810 # define mbsrchr rpl_mbsrchr 830 _GL_EXTERN_C char * mbsstr (
const char *haystack,
const char *needle)
835 #if @GNULIB_MBSCASECMP@ 842 _GL_EXTERN_C int mbscasecmp (
const char *s1,
const char *s2)
847 #if @GNULIB_MBSNCASECMP@ 857 _GL_EXTERN_C int mbsncasecmp (
const char *s1,
const char *s2,
size_t n)
862 #if @GNULIB_MBSPCASECMP@ 871 _GL_EXTERN_C char * mbspcasecmp (
const char *
string,
const char *prefix)
876 #if @GNULIB_MBSCASESTR@ 882 _GL_EXTERN_C char * mbscasestr (
const char *haystack,
const char *needle)
893 _GL_EXTERN_C size_t mbscspn (
const char *
string,
const char *accept)
904 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 905 # define mbspbrk rpl_mbspbrk 910 _GL_CXXALIAS_RPL (mbspbrk,
char *, (
const char *
string,
const char *accept));
915 _GL_CXXALIAS_SYS (mbspbrk,
char *, (
const char *
string,
const char *accept));
926 _GL_EXTERN_C size_t mbsspn (
const char *
string,
const char *reject)
946 _GL_EXTERN_C char * mbssep (
char **stringp,
const char *delim)
950 #if @GNULIB_MBSTOK_R@ 967 _GL_EXTERN_C char * mbstok_r (
char *
string,
const char *delim,
char **save_ptr)
972 #if @GNULIB_STRERROR@ 973 # if @REPLACE_STRERROR@ 974 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 976 # define strerror rpl_strerror 984 #elif defined GNULIB_POSIXCHECK 988 "use gnulib module strerror to guarantee non-NULL result");
993 #if @GNULIB_STRERROR_R@ 994 # if @REPLACE_STRERROR_R@ 995 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 997 # define strerror_r rpl_strerror_r 1003 # if !@HAVE_DECL_STRERROR_R@ 1009 # if @HAVE_DECL_STRERROR_R@ 1012 #elif defined GNULIB_POSIXCHECK 1014 # if HAVE_RAW_DECL_STRERROR_R 1016 "use gnulib module strerror_r-posix for portability");
1020 #if @GNULIB_STRSIGNAL@ 1021 # if @REPLACE_STRSIGNAL@ 1022 # if !(defined __cplusplus && defined GNULIB_NAMESPACE) 1023 # define strsignal rpl_strsignal 1028 # if ! @HAVE_DECL_STRSIGNAL@ 1036 #elif defined GNULIB_POSIXCHECK 1038 # if HAVE_RAW_DECL_STRSIGNAL 1040 "use gnulib module strsignal for portability");
1044 #if @GNULIB_STRVERSCMP@ 1045 # if !@HAVE_STRVERSCMP@ 1052 #elif defined GNULIB_POSIXCHECK 1054 # if HAVE_RAW_DECL_STRVERSCMP 1056 "use gnulib module strverscmp for portability");
#define _GL_CXXALIAS_SYS_CAST(func, rettype, parameters)
Definition: inet.h:278
#define _GL_FUNCDECL_SYS(func, rettype, parameters_and_attributes)
Definition: inet.h:168
#define _GL_ATTRIBUTE_PURE
Definition: string.in.h:60
this configure time declaration test was not run int strerror_r(int errnum, char *buf, size_t buflen)
#define _GL_CXXALIAS_RPL(func, rettype, parameters)
Definition: inet.h:180
char * strstr(const char *haystack_start, const char *needle_start)
Definition: strstr.c:39
#define _GL_CXXALIASWARN(func)
Definition: inet.h:337
#define _GL_CXXALIASWARN1(func, rettype, parameters_and_attributes)
Definition: inet.h:365
#define _GL_EXTERN_C
Definition: inet.h:146
char * strerror(int n)
Definition: strerror.c:36
#define _GL_CXXALIAS_SYS(func, rettype, parameters)
Definition: inet.h:253
#define _GL_FUNCDECL_RPL(func, rettype, parameters_and_attributes)
Definition: inet.h:156
#define restrict
Definition: config.h:1858
#define _GL_CXXALIAS_SYS_CAST2(func, rettype, parameters, rettype2, parameters2)
Definition: inet.h:309
#define _GL_WARN_ON_USE(function, message)
Definition: inet.h:474