summaryrefslogtreecommitdiff
path: root/include/m_string.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/m_string.h')
-rw-r--r--include/m_string.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/m_string.h b/include/m_string.h
index 5863bb51b73..062d0b4cf65 100644
--- a/include/m_string.h
+++ b/include/m_string.h
@@ -122,6 +122,16 @@ extern void bmove_align(gptr dst,const gptr src,uint len);
#define bmove512(A,B,C) memcpy(A,B,C)
#endif
+#ifdef HAVE_purify
+#include <assert.h>
+#define memcpy_overlap(A,B,C) \
+DBUG_ASSERT((A) == (B) || ((A)+(C)) <= (B) || ((B)+(C)) <= (A)); \
+bmove((byte*) key,(byte*) from,(size_t) length);
+#else
+#define memcpy_overlap(A,B,C) memcpy((A), (B), (C))
+#endif /* HAVE_purify */
+
+
/* Prototypes for string functions */
#if !defined(bfill) && !defined(HAVE_BFILL)