|
Message-Id: <1942ac523bf082de971930d58d531ba289f93a65.1684932861.git.Jens.Gustedt@inria.fr> Date: Sat, 22 Apr 2023 22:06:13 +0200 From: Jens Gustedt <Jens.Gustedt@...ia.fr> To: musl@...ts.openwall.com Subject: [C23 divers headers 05/17] C23: memccpy, strdup and strndup are now standard C Just remove the feature guards around these. These guards had not even strictly been necessary before, because prefixes mem and str are reserved. --- include/string.h | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/include/string.h b/include/string.h index db73d2a9..7df7a402 100644 --- a/include/string.h +++ b/include/string.h @@ -55,6 +55,10 @@ size_t strlen (const char *); char *strerror (int); +char *strdup (const char *); +char *strndup (const char *, size_t); +void *memccpy (void *__restrict, const void *__restrict, int, size_t); + #if defined(_BSD_SOURCE) || defined(_GNU_SOURCE) #include <strings.h> #endif @@ -67,8 +71,6 @@ int strerror_r (int, char *, size_t); char *stpcpy(char *__restrict, const char *__restrict); char *stpncpy(char *__restrict, const char *__restrict, 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); @@ -76,11 +78,6 @@ 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) \ - || defined(_BSD_SOURCE) -void *memccpy (void *__restrict, const void *__restrict, int, size_t); -#endif - #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) char *strsep(char **, const char *); size_t strlcat (char *, const char *, size_t); -- 2.34.1
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.