From d09154465aeae727e93a4abf54ff8f3bf0bdab76 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Tue, 13 Apr 2010 09:47:48 -0700 Subject: Add simplistic reimplementation of strcasestr to compat library While all systems that I have access to support strcasestr, it is in fact not part of POSIX. So here's a fallback reimplementation based on POSIX functions. Signed-off-by: Dirk Hohndel Tested-by: Tomas Carnecky (on OpenSolaris snv_134) --- compat/have_strcasestr.c | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 compat/have_strcasestr.c (limited to 'compat/have_strcasestr.c') diff --git a/compat/have_strcasestr.c b/compat/have_strcasestr.c new file mode 100644 index 00000000..c0fb7629 --- /dev/null +++ b/compat/have_strcasestr.c @@ -0,0 +1,10 @@ +#define _GNU_SOURCE +#include + +int main() +{ + char *found; + const char *haystack, *needle; + + found = strcasestr(haystack, needle); +} -- cgit v1.2.3