mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-28 00:21:52 +03:00
Update.
* string/bits/string2.h: Disable strstr optimizations for newer gcc versions. Patch by Joseph S. Myers <jsm28@cam.ac.uk>.
This commit is contained in:
@ -1006,8 +1006,9 @@ __strpbrk_c3 (__const char *__s, char __accept1, char __accept2,
|
||||
#endif
|
||||
|
||||
|
||||
/* Find the first occurrence of NEEDLE in HAYSTACK. */
|
||||
#ifndef _HAVE_STRING_ARCH_strstr
|
||||
/* Find the first occurrence of NEEDLE in HAYSTACK. Newer gcc versions
|
||||
do this itself. */
|
||||
#if !defined _HAVE_STRING_ARCH_strstr && !__GNUC_PREREQ (2, 97)
|
||||
# define strstr(haystack, needle) \
|
||||
(__extension__ (__builtin_constant_p (needle) && __string2_1bptr_p (needle) \
|
||||
? (((__const char *) (needle))[0] == '\0' \
|
||||
|
Reference in New Issue
Block a user