summaryrefslogtreecommitdiff
path: root/lib/replace/replace.h
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-01-02 10:01:11 +1100
committerAndrew Tridgell <tridge@samba.org>2010-01-02 10:08:12 +1100
commitfef3c910da421e890925e5e61275fc457da87f6e (patch)
tree3884c2b98c9ccf3b13b11f2c156769014c1e5527 /lib/replace/replace.h
parent00b39c70f57882a453a8d2e6b0f1f37fd39a2d2a (diff)
downloadsamba-fef3c910da421e890925e5e61275fc457da87f6e.tar.gz
samba-fef3c910da421e890925e5e61275fc457da87f6e.tar.bz2
samba-fef3c910da421e890925e5e61275fc457da87f6e.zip
libreplace: some systems don't have memmem()
added rep_memmem() and a testsuite
Diffstat (limited to 'lib/replace/replace.h')
-rw-r--r--lib/replace/replace.h6
1 files changed, 6 insertions, 0 deletions
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" */