diff options
author | Ulrich Drepper <drepper@redhat.com> | 2000-12-27 23:27:22 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2000-12-27 23:27:22 +0000 |
commit | 5fba3e5e3c6fd862a7159059898812ecfcf4249d (patch) | |
tree | 3cace916d4e6045fb28862dc05b0eba576b5bb16 /malloc/malloc.c | |
parent | de149cdbaf9327b5dbb85b1a473fce5c6ec7951f (diff) | |
download | glibc-5fba3e5e3c6fd862a7159059898812ecfcf4249d.tar glibc-5fba3e5e3c6fd862a7159059898812ecfcf4249d.tar.gz glibc-5fba3e5e3c6fd862a7159059898812ecfcf4249d.tar.bz2 glibc-5fba3e5e3c6fd862a7159059898812ecfcf4249d.zip |
(memmove): Add prototypes. (MALLOC_MEMMOVE): Define. (chunk_realloc): Use it instead of MALLOC_COPY if source and destination might overlap.
Diffstat (limited to 'malloc/malloc.c')
-rw-r--r-- | malloc/malloc.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/malloc/malloc.c b/malloc/malloc.c index 2eb9c558b9..187c8147a0 100644 --- a/malloc/malloc.c +++ b/malloc/malloc.c @@ -415,9 +415,11 @@ extern "C" { #if __STD_C void* memset(void*, int, size_t); void* memcpy(void*, const void*, size_t); +void* memmove(void*, const void*, size_t); #else Void_t* memset(); Void_t* memcpy(); +Void_t* memmove(); #endif #endif @@ -462,6 +464,9 @@ do { \ } else memcpy(dest, src, mcsz); \ } while(0) +#define MALLOC_MEMMOVE(dest,src,nbytes) \ + memmove(dest, src, mcsz) + #else /* !USE_MEMCPY */ /* Use Duff's device for good zeroing/copying performance. */ |