X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=blobdiff_plain;f=include%2Fstring.h;h=24cb1ca3f4ec6b5120ccd71fbff6d203e57ca676;hp=dfe142a270386398de038af21ed1434284b8a016;hb=aaa9eb5101e3a748218fb9373dd9655b50582da2;hpb=73d310e1d2b76cd14b9913bbc3d8e75be91be5a6 diff --git a/include/string.h b/include/string.h index dfe142a2..24cb1ca3 100644 --- a/include/string.h +++ b/include/string.h @@ -13,6 +13,12 @@ extern "C" { #endif #define __NEED_size_t +#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \ + || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \ + || defined(_BSD_SOURCE) +#define __NEED_locale_t +#endif + #include void *memcpy (void *, const void *, size_t); @@ -46,9 +52,13 @@ size_t strlen (const char *); char *strerror (int); +#if defined(_BSD_SOURCE) || defined(_GNU_SOURCE) +#include +#endif #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \ - || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) + || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \ + || defined(_BSD_SOURCE) char *strtok_r (char *, const char *, char **); int strerror_r (int, char *, size_t); char *stpcpy(char *, const char *); @@ -56,9 +66,14 @@ char *stpncpy(char *, const char *, size_t); size_t strnlen (const char *, size_t); char *strdup (const char *); char *strndup (const char *, size_t); +char *strsignal(int); +char *strerror_l (int, locale_t); +int strcoll_l (const char *, const char *, locale_t); +size_t strxfrm_l (char *, const char *, size_t, locale_t); #endif -#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) +#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \ + || defined(_BSD_SOURCE) void *memccpy (void *, const void *, int, size_t); #endif @@ -68,10 +83,18 @@ size_t strlcpy (char *, const char *, size_t); #endif #ifdef _GNU_SOURCE -int strcasecmp (const char *, const char *); -int strncasecmp (const char *, const char *, size_t); +#define strdupa(x) strcpy(alloca(strlen(x)+1),x) +int strverscmp (const char *, const char *); +int strcasecmp_l (const char *, const char *, locale_t); +int strncasecmp_l (const char *, const char *, size_t, locale_t); char *strchrnul(const char *, int); char *strcasestr(const char *, const char *); +char *strsep(char **, const char *); +void *memrchr(const void *, int, size_t); +void *mempcpy(void *, const void *, size_t); +#ifndef __cplusplus +char *basename(); +#endif #endif #ifdef __cplusplus