aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDan Fandrich <dan@coneharvesters.com>2007-09-25 06:43:58 +0000
committerDan Fandrich <dan@coneharvesters.com>2007-09-25 06:43:58 +0000
commitc4782007667a29b1a02f13108f9ec0017aa3cbc7 (patch)
tree8710da004067639bd14b5b9a5bd2347127377124 /lib
parent775f86cb5a1ef5b46d2b7967878daca23c01f987 (diff)
Use a native strcasestr() if found.
Diffstat (limited to 'lib')
-rw-r--r--lib/strequal.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/strequal.c b/lib/strequal.c
index cb8767002..adf84403d 100644
--- a/lib/strequal.c
+++ b/lib/strequal.c
@@ -90,6 +90,9 @@ int curl_strnequal(const char *first, const char *second, size_t max)
*/
char *Curl_strcasestr(const char *haystack, const char *needle)
{
+#if defined(HAVE_STRCASESTR)
+ return strcasestr(haystack, needle);
+#else
size_t nlen = strlen(needle);
size_t hlen = strlen(haystack);
@@ -99,6 +102,7 @@ char *Curl_strcasestr(const char *haystack, const char *needle)
haystack++;
}
return NULL;
+#endif
}
#ifndef HAVE_STRLCAT