diff options
author | H.J. Lu <hongjiu.lu@intel.com> | 2009-07-20 21:06:50 -0700 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2009-07-20 21:06:50 -0700 |
commit | 2b7a8664fa86a182c053b6743f36a5ea8bf6bf6f (patch) | |
tree | 0f7562c05a52ebf1045f02ed2e3dadc94aea5d90 /string/strstr.c | |
parent | 63fbc91bec5623ab002c6e3ae1f3cd08a5f010fd (diff) | |
download | glibc-2b7a8664fa86a182c053b6743f36a5ea8bf6bf6f.tar glibc-2b7a8664fa86a182c053b6743f36a5ea8bf6bf6f.tar.gz glibc-2b7a8664fa86a182c053b6743f36a5ea8bf6bf6f.tar.bz2 glibc-2b7a8664fa86a182c053b6743f36a5ea8bf6bf6f.zip |
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/strstr.c')
-rw-r--r-- | string/strstr.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/string/strstr.c b/string/strstr.c index a9dc312992..ef45f82758 100644 --- a/string/strstr.c +++ b/string/strstr.c @@ -1,5 +1,6 @@ /* Return the offset of one string within another. - Copyright (C) 1994,1996,1997,2000,2001,2003,2008 Free Software Foundation, Inc. + Copyright (C) 1994,1996,1997,2000,2001,2003,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 @@ -40,11 +41,15 @@ #undef strstr +#ifndef STRSTR +#define STRSTR strstr +#endif + /* Return the first occurrence of NEEDLE in HAYSTACK. Return HAYSTACK if NEEDLE is empty, otherwise NULL if NEEDLE is not found in HAYSTACK. */ char * -strstr (const char *haystack_start, const char *needle_start) +STRSTR (const char *haystack_start, const char *needle_start) { const char *haystack = haystack_start; const char *needle = needle_start; |