mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-07 06:43:00 +03:00
<string.h>: 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 <adhemerval.zanella@linaro.org>
This commit is contained in:
@@ -274,7 +274,7 @@ extern char *strrchr (const char *__s, int __c)
|
|||||||
__THROW __attribute_pure__ __nonnull ((1));
|
__THROW __attribute_pure__ __nonnull ((1));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __USE_GNU
|
#ifdef __USE_MISC
|
||||||
/* This function is similar to `strchr'. But it returns a pointer to
|
/* This function is similar to `strchr'. But it returns a pointer to
|
||||||
the closing NUL byte in case C is not found in S. */
|
the closing NUL byte in case C is not found in S. */
|
||||||
# ifdef __CORRECT_ISO_CPP_STRING_H_PROTO
|
# 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));
|
__THROW __nonnull ((2, 3));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __USE_GNU
|
#ifdef __USE_MISC
|
||||||
/* Similar to `strstr' but this function ignores the case of both strings. */
|
/* Similar to `strstr' but this function ignores the case of both strings. */
|
||||||
# ifdef __CORRECT_ISO_CPP_STRING_H_PROTO
|
# ifdef __CORRECT_ISO_CPP_STRING_H_PROTO
|
||||||
extern "C++" char *strcasestr (char *__haystack, const char *__needle)
|
extern "C++" char *strcasestr (char *__haystack, const char *__needle)
|
||||||
@@ -382,7 +382,7 @@ extern char *strcasestr (const char *__haystack, const char *__needle)
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __USE_GNU
|
#ifdef __USE_MISC
|
||||||
/* Find the first occurrence of NEEDLE in HAYSTACK.
|
/* Find the first occurrence of NEEDLE in HAYSTACK.
|
||||||
NEEDLE is NEEDLELEN bytes long;
|
NEEDLE is NEEDLELEN bytes long;
|
||||||
HAYSTACK is HAYSTACKLEN bytes long. */
|
HAYSTACK is HAYSTACKLEN bytes long. */
|
||||||
|
Reference in New Issue
Block a user