summaryrefslogtreecommitdiff
path: root/libc/stdlib/malloc-simple
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2006-01-14 00:58:03 +0000
committerPeter S. Mazinger <ps.m@gmx.net>2006-01-14 00:58:03 +0000
commitaf0172162f7c653cad6a11ed1c1a5459bc154465 (patch)
tree70031dad1e7286d58762da7b9e3d3f93d043c278 /libc/stdlib/malloc-simple
parentc8609543a9a8bf6559c2931dbbef6b3c41b3fbf2 (diff)
hidden_def/hidden_proto: convert all users (I hope) termios split, add some missing headers, other jump relocs removed
Diffstat (limited to 'libc/stdlib/malloc-simple')
-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;