summaryrefslogtreecommitdiff
path: root/libc/stdlib
diff options
context:
space:
mode:
Diffstat (limited to 'libc/stdlib')
-rw-r--r--libc/stdlib/malloc/heap_debug.c4
-rw-r--r--libc/stdlib/malloc/malloc.h2
-rw-r--r--libc/stdlib/malloc/malloc_debug.c4
-rw-r--r--libc/stdlib/stdlib.c2
-rw-r--r--libc/stdlib/system.c4
-rw-r--r--libc/stdlib/unix_grantpt.c8
6 files changed, 15 insertions, 9 deletions
diff --git a/libc/stdlib/malloc/heap_debug.c b/libc/stdlib/malloc/heap_debug.c
index 4804ba9ee..7dab95627 100644
--- a/libc/stdlib/malloc/heap_debug.c
+++ b/libc/stdlib/malloc/heap_debug.c
@@ -80,13 +80,13 @@ __heap_check_failure (struct heap *heap, struct heap_free_area *fa,
vfprintf (stderr, fmt, val);
va_end (val);
- putc ('\n', stderr);
+ __putc ('\n', stderr);
__malloc_debug_set_indent (0);
__malloc_debug_printf (1, "heap dump:");
__heap_dump_freelist (heap);
- exit (22);
+ __exit (22);
}
/* Do some consistency checks on HEAP. If they fail, output an error
diff --git a/libc/stdlib/malloc/malloc.h b/libc/stdlib/malloc/malloc.h
index 08ebfdf5b..707cad13d 100644
--- a/libc/stdlib/malloc/malloc.h
+++ b/libc/stdlib/malloc/malloc.h
@@ -79,6 +79,8 @@ extern struct heap __malloc_mmb_heap;
to stderr, when the variable __malloc_mmb_debug is set to true. */
#ifdef MALLOC_MMB_DEBUGGING
# include <stdio.h>
+extern int __putc(int c, FILE *stream) attribute_hidden;
+
extern int __malloc_mmb_debug;
# define MALLOC_MMB_DEBUG(indent, fmt, args...) \
(__malloc_mmb_debug ? __malloc_debug_printf (indent, fmt , ##args) : 0)
diff --git a/libc/stdlib/malloc/malloc_debug.c b/libc/stdlib/malloc/malloc_debug.c
index e8711ff77..abe5546ca 100644
--- a/libc/stdlib/malloc/malloc_debug.c
+++ b/libc/stdlib/malloc/malloc_debug.c
@@ -42,7 +42,7 @@ __malloc_debug_printf (int indent, const char *fmt, ...)
while (spaces > 0)
{
- putc (' ', stderr);
+ __putc (' ', stderr);
spaces--;
}
@@ -50,7 +50,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);
}
diff --git a/libc/stdlib/stdlib.c b/libc/stdlib/stdlib.c
index 3b7d37ccb..ab95c9378 100644
--- a/libc/stdlib/stdlib.c
+++ b/libc/stdlib/stdlib.c
@@ -724,7 +724,7 @@ unsigned long long attribute_hidden __XL_NPP(_stdlib_strto_ll)(register const Wc
/* void _Exit(int status) */
/* { */
-/* _exit(status); */
+/* _exit_internal(status); */
/* } */
/* #endif */
diff --git a/libc/stdlib/system.c b/libc/stdlib/system.c
index 616d2dda6..a537156fd 100644
--- a/libc/stdlib/system.c
+++ b/libc/stdlib/system.c
@@ -1,6 +1,8 @@
#define wait4 __wait4
#define execl __execl
#define signal __signal
+#define vfork __vfork
+#define fork __fork
#include <stdio.h>
#include <stddef.h>
@@ -38,7 +40,7 @@ int __libc_system(char *command)
signal(SIGCHLD, SIG_DFL);
execl("/bin/sh", "sh", "-c", command, (char *) 0);
- _exit(127);
+ _exit_internal(127);
}
/* Signals are not absolutly guarenteed with vfork */
signal(SIGQUIT, SIG_IGN);
diff --git a/libc/stdlib/unix_grantpt.c b/libc/stdlib/unix_grantpt.c
index c8dbf3cb3..0e7d50a99 100644
--- a/libc/stdlib/unix_grantpt.c
+++ b/libc/stdlib/unix_grantpt.c
@@ -24,6 +24,8 @@
#define waitpid __waitpid
#define dup2 __dup2
#define chmod __chmod
+#define vfork __vfork
+#define fork __fork
#include <assert.h>
#include <errno.h>
@@ -42,7 +44,7 @@
/* uClinux-2.0 has vfork, but Linux 2.0 doesn't */
#include <sys/syscall.h>
#if ! defined __NR_vfork
-#define vfork fork
+#define vfork fork
#endif
extern int __ptsname_r (int fd, char *buf, size_t buflen) attribute_hidden;
@@ -166,10 +168,10 @@ grantpt (int fd)
/* We pase the master pseudo terminal as file descriptor PTY_FILENO. */
if (fd != PTY_FILENO)
if (dup2 (fd, PTY_FILENO) < 0)
- _exit (FAIL_EBADF);
+ _exit_internal (FAIL_EBADF);
execle (_PATH_PT_CHOWN, _PATH_PT_CHOWN, NULL, NULL);
- _exit (FAIL_EXEC);
+ _exit_internal (FAIL_EXEC);
}
else
{