summaryrefslogtreecommitdiff
path: root/string/strcasestr.c
diff options
context:
space:
mode:
authorH.J. Lu <hongjiu.lu@intel.com>2009-07-20 21:06:50 -0700
committerUlrich Drepper <drepper@redhat.com>2009-07-20 21:06:50 -0700
commit2b7a8664fa86a182c053b6743f36a5ea8bf6bf6f (patch)
tree0f7562c05a52ebf1045f02ed2e3dadc94aea5d90 /string/strcasestr.c
parent63fbc91bec5623ab002c6e3ae1f3cd08a5f010fd (diff)
SSE4.2 strstr/strcasestr for x86-64.
This patch implements SSE4.2 strstr/strcasestr, using Knuth-Morris-Pratt string searching algorithm.
Diffstat (limited to 'string/strcasestr.c')
-rw-r--r--string/strcasestr.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/string/strcasestr.c b/string/strcasestr.c
index 92f2eac7c8..088b5d91c7 100644
--- a/string/strcasestr.c
+++ b/string/strcasestr.c
@@ -1,5 +1,6 @@
/* Return the offset of one string within another.
- Copyright (C) 1994, 1996-2000, 2004, 2008 Free Software Foundation, Inc.
+ Copyright (C) 1994, 1996-2000, 2004, 2008, 2009
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -52,11 +53,16 @@
#undef strcasestr
#undef __strcasestr
+#ifndef STRCASESTR
+#define STRCASESTR __strcasestr
+#endif
+
+
/* Find the first occurrence of NEEDLE in HAYSTACK, using
case-insensitive comparison. This function gives unspecified
results in multibyte locales. */
char *
-__strcasestr (const char *haystack_start, const char *needle_start)
+STRCASESTR (const char *haystack_start, const char *needle_start)
{
const char *haystack = haystack_start;
const char *needle = needle_start;