From fef3c910da421e890925e5e61275fc457da87f6e Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 2 Jan 2010 10:01:11 +1100 Subject: libreplace: some systems don't have memmem() added rep_memmem() and a testsuite --- lib/replace/replace.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/replace/replace.h') diff --git a/lib/replace/replace.h b/lib/replace/replace.h index 6424d10c0f..baf2368130 100644 --- a/lib/replace/replace.h +++ b/lib/replace/replace.h @@ -140,6 +140,12 @@ char *rep_strdup(const char *s); void *rep_memmove(void *dest,const void *src,int size); #endif +#ifndef HAVE_MEMMEM +#define memmem rep_memmem +void *rep_memmem(const void *haystack, size_t haystacklen, + const void *needle, size_t needlelen); +#endif + #ifndef HAVE_MKTIME #define mktime rep_mktime /* prototype is in "system/time.h" */ -- cgit