Included patch #5920: Create define to override C-library memcpy. 2 Defines are created: MEMCPY() for normal memcpy, SMEMCPY() for situations where some compilers might inline the copy and save a function call. Also replaced all calls to memcpy() with calls to (S)MEMCPY().

This commit is contained in:
goldsimon
2007-05-10 05:20:05 +00:00
parent b41520f9e2
commit 255d5a748f
18 changed files with 51 additions and 34 deletions

View File

@@ -53,6 +53,18 @@
#define NO_SYS 0
#endif
/* override this if you have a faster implementation at hand than the one
included in your C library */
#ifndef MEMCPY
#define MEMCPY(dst,src,len) memcpy(dst,src,len)
#endif
/* override this with care: some compilers (e.g. gcc) can inline a call to
memcpy() if the length is known at compile time and is small */
#ifndef SMEMCPY
#define SMEMCPY(dst,src,len) memcpy(dst,src,len)
#endif
/* ---------- Memory options ---------- */
#ifndef MEM_LIBC_MALLOC
#define MEM_LIBC_MALLOC 0