X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=blobdiff_plain;f=include%2Fstring.h;h=d44123332753313f4426c136b5330325552e06e1;hp=f96f71ee0b5731fcc869bf00efca589efc8c4c95;hb=1ab59de81e94e7802f85d314a709f8350a0e9b65;hpb=400c5e5c8307a2ebe44ef1f203f5a15669f20347 diff --git a/include/string.h b/include/string.h index f96f71ee..d4412333 100644 --- a/include/string.h +++ b/include/string.h @@ -5,18 +5,9 @@ extern "C" { #endif -#if __STDC_VERSION__ >= 199901L -#define __restrict restrict -#elif !defined(__GNUC__) -#define __restrict -#endif +#include -#undef NULL -#ifdef __cplusplus -#define NULL 0 -#else -#define NULL ((void*)0) -#endif +#define NULL 0L #define __NEED_size_t #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \ @@ -83,7 +74,8 @@ size_t strxfrm_l (char *__restrict, const char *__restrict, size_t, locale_t); void *memccpy (void *__restrict, const void *__restrict, int, size_t); #endif -#ifdef _BSD_SOURCE +#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) +char *strsep(char **, const char *); size_t strlcat (char *, const char *, size_t); size_t strlcpy (char *, const char *, size_t); #endif @@ -95,7 +87,7 @@ 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 *memmem(const void *, size_t, const void *, size_t); void *memrchr(const void *, int, size_t); void *mempcpy(void *, const void *, size_t); #ifndef __cplusplus