From: Rich Felker Date: Fri, 6 Jan 2023 11:33:19 +0000 (-0500) Subject: expose memmem under baseline POSIX feature profile X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=a4b0a665b84c4a3117cca152fe28c204d23ece46;hp=9532ae1318201d66b235a618df16aac0b3386630;p=musl expose memmem under baseline POSIX feature profile memmem has been adopted for the next issue of POSIX (outcome of tracker item 1061). since mem* is in the reserved namespace for string.h it's already fully conforming to expose it by default, so just do so. --- diff --git a/include/string.h b/include/string.h index 43ad0942..db73d2a9 100644 --- a/include/string.h +++ b/include/string.h @@ -73,6 +73,7 @@ char *strsignal(int); char *strerror_l (int, locale_t); int strcoll_l (const char *, const char *, locale_t); size_t strxfrm_l (char *__restrict, const char *__restrict, size_t, locale_t); +void *memmem(const void *, size_t, const void *, size_t); #endif #if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \ @@ -92,7 +93,6 @@ void explicit_bzero (void *, size_t); int strverscmp (const char *, const char *); char *strchrnul(const char *, int); char *strcasestr(const 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