summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-11-01 16:39:15 +0000
committerUlrich Drepper <drepper@redhat.com>2000-11-01 16:39:15 +0000
commite8e24320d23810739c7c90b741fd5ce95e5caf18 (patch)
tree83dcfac27e19794232f2bc725590489d00bb5712
parent4442d7e8ee42829859f645451d7a8b1c3e0aa9e2 (diff)
downloadglibc-e8e24320d23810739c7c90b741fd5ce95e5caf18.tar.gz
glibc-e8e24320d23810739c7c90b741fd5ce95e5caf18.tar.xz
glibc-e8e24320d23810739c7c90b741fd5ce95e5caf18.zip
Update.
	* string/bits/string2.h: Disable strstr optimizations for newer
	gcc versions.  Patch by Joseph S. Myers <jsm28@cam.ac.uk>.
-rw-r--r--ChangeLog3
-rw-r--r--string/bits/string2.h5
2 files changed, 6 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index e6e6302905..494d7c89b4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2000-11-01  Ulrich Drepper  <drepper@redhat.com>
 
+	* string/bits/string2.h: Disable strstr optimizations for newer
+	gcc versions.  Patch by Joseph S. Myers <jsm28@cam.ac.uk>.
+
 	* configure.in (with_cvs): Test for pserver access.
 
 2000-10-31  Ulrich Drepper  <drepper@redhat.com>
diff --git a/string/bits/string2.h b/string/bits/string2.h
index bf174a4c8c..a85add72b1 100644
--- a/string/bits/string2.h
+++ b/string/bits/string2.h
@@ -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'		      \