mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-27 10:41:12 +08:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user