notmuch/compat/have_strcasestr.c
Dirk Hohndel d09154465a 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 <hohndel@infradead.org>

Tested-by: Tomas Carnecky <tom@dbservice.com> (on OpenSolaris snv_134)
2010-04-14 11:34:12 -07:00

10 lines
152 B
C

#define _GNU_SOURCE
#include <strings.h>
int main()
{
char *found;
const char *haystack, *needle;
found = strcasestr(haystack, needle);
}