From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2178) id 781EC3858D28; Thu, 6 Apr 2023 15:03:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 781EC3858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1680793392; bh=+qV0MxY/wE/MBIKBgxpzP0MDtCzIoJsZV+wUwUfg5Ww=; h=From:To:Subject:Date:From; b=iVvAvBQH6T9rWY99yyX+t6xUV5p4A+nb7W/VXN28bj6iCsHBV/b/Jqun3jdo8dYca FYgSPNXkyG8cdnLzX/uTvexS+OKgOxj8RPKIh0t+p5qZvO5qT/2jiuJuJm5LVNSXv+ +9YQPpVrYJRkFeIDmimLwEWLZ0IfCrNx8Zuh6drs= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Florian Weimer To: glibc-cvs@sourceware.org Subject: [glibc] : Make strchrnul, strcasestr, memmem available by default X-Act-Checkin: glibc X-Git-Author: Florian Weimer X-Git-Refname: refs/heads/master X-Git-Oldrev: 81a3cc956ef4e324c83419fa6d7a559d6e762cd7 X-Git-Newrev: 30e3ca78f92be44f46851557f54b47e789bd3416 Message-Id: <20230406150312.781EC3858D28@sourceware.org> Date: Thu, 6 Apr 2023 15:03:12 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=30e3ca78f92be44f46851557f54b47e789bd3416 commit 30e3ca78f92be44f46851557f54b47e789bd3416 Author: Florian Weimer Date: Thu Apr 6 16:40:44 2023 +0200 : Make strchrnul, strcasestr, memmem available by default FreeBSD makes them available by default, too, so there does not seem to be a reason to restrict these functions to _GNU_SOURCE. Reviewed-by: Adhemerval Zanella Diff: --- string/string.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/string/string.h b/string/string.h index 7f0f600224..4927879ecf 100644 --- a/string/string.h +++ b/string/string.h @@ -274,7 +274,7 @@ extern char *strrchr (const char *__s, int __c) __THROW __attribute_pure__ __nonnull ((1)); #endif -#ifdef __USE_GNU +#ifdef __USE_MISC /* This function is similar to `strchr'. But it returns a pointer to the closing NUL byte in case C is not found in S. */ # ifdef __CORRECT_ISO_CPP_STRING_H_PROTO @@ -368,7 +368,7 @@ extern char *strtok_r (char *__restrict __s, const char *__restrict __delim, __THROW __nonnull ((2, 3)); #endif -#ifdef __USE_GNU +#ifdef __USE_MISC /* Similar to `strstr' but this function ignores the case of both strings. */ # ifdef __CORRECT_ISO_CPP_STRING_H_PROTO extern "C++" char *strcasestr (char *__haystack, const char *__needle) @@ -382,7 +382,7 @@ extern char *strcasestr (const char *__haystack, const char *__needle) # endif #endif -#ifdef __USE_GNU +#ifdef __USE_MISC /* Find the first occurrence of NEEDLE in HAYSTACK. NEEDLE is NEEDLELEN bytes long; HAYSTACK is HAYSTACKLEN bytes long. */