summaryrefslogtreecommitdiff
path: root/libc/stdlib/malloc-simple/alloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/stdlib/malloc-simple/alloc.c')
-rw-r--r--libc/stdlib/malloc-simple/alloc.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/libc/stdlib/malloc-simple/alloc.c b/libc/stdlib/malloc-simple/alloc.c
index 5a208bf28..595142526 100644
--- a/libc/stdlib/malloc-simple/alloc.c
+++ b/libc/stdlib/malloc-simple/alloc.c
@@ -6,9 +6,6 @@
* Parts of the memalign code were stolen from malloc-930716.
*/
-#define mmap __mmap
-#define munmap __munmap
-
#define _GNU_SOURCE
#include <features.h>
#include <unistd.h>
@@ -19,6 +16,10 @@
#include <errno.h>
#include <sys/mman.h>
+libc_hidden_proto(memcpy)
+/*libc_hidden_proto(memset)*/
+libc_hidden_proto(mmap)
+libc_hidden_proto(munmap)
#ifdef L_malloc
void *malloc(size_t size)
@@ -67,7 +68,7 @@ void * calloc(size_t nmemb, size_t lsize)
* doesn't need to actually zero anything....
*/
if (result != NULL) {
- __memset(result, 0, size);
+ memset(result, 0, size);
}
#endif
return result;
@@ -88,7 +89,7 @@ void *realloc(void *ptr, size_t size)
newptr = malloc(size);
if (newptr) {
- __memcpy(newptr, ptr, *((size_t *) (ptr - sizeof(size_t))));
+ memcpy(newptr, ptr, *((size_t *) (ptr - sizeof(size_t))));
free(ptr);
}
return newptr;