summaryrefslogtreecommitdiff
path: root/libc/stdlib/malloc/malloc_debug.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/stdlib/malloc/malloc_debug.c')
-rw-r--r--libc/stdlib/malloc/malloc_debug.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/libc/stdlib/malloc/malloc_debug.c b/libc/stdlib/malloc/malloc_debug.c
index abe5546ca..6c74d78bb 100644
--- a/libc/stdlib/malloc/malloc_debug.c
+++ b/libc/stdlib/malloc/malloc_debug.c
@@ -11,14 +11,16 @@
* Written by Miles Bader <miles@gnu.org>
*/
-#define atoi __atoi
-#define vfprintf __vfprintf
-
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <stdarg.h>
+libc_hidden_proto(atoi)
+libc_hidden_proto(vfprintf)
+libc_hidden_proto(putc)
+libc_hidden_proto(getenv)
+
#include "malloc.h"
#include "heap.h"
@@ -42,7 +44,7 @@ __malloc_debug_printf (int indent, const char *fmt, ...)
while (spaces > 0)
{
- __putc (' ', stderr);
+ putc (' ', stderr);
spaces--;
}
@@ -50,7 +52,7 @@ __malloc_debug_printf (int indent, const char *fmt, ...)
vfprintf (stderr, fmt, val);
va_end (val);
- __putc ('\n', stderr);
+ putc ('\n', stderr);
__malloc_debug_indent (indent);
}
@@ -58,7 +60,7 @@ __malloc_debug_printf (int indent, const char *fmt, ...)
void
__malloc_debug_init (void)
{
- char *ev = __getenv ("MALLOC_DEBUG");
+ char *ev = getenv ("MALLOC_DEBUG");
if (ev)
{
int val = atoi (ev);