OSDN Git Service

fix up malloc debug building
authorMike Frysinger <vapier@gentoo.org>
Fri, 13 Apr 2007 18:01:21 +0000 (18:01 -0000)
committerMike Frysinger <vapier@gentoo.org>
Fri, 13 Apr 2007 18:01:21 +0000 (18:01 -0000)
libc/stdlib/malloc/free.c
libc/stdlib/malloc/heap.h
libc/stdlib/malloc/heap_alloc.c
libc/stdlib/malloc/heap_alloc_at.c
libc/stdlib/malloc/heap_debug.c
libc/stdlib/malloc/heap_free.c
libc/stdlib/malloc/malloc.c
libc/stdlib/malloc/malloc.h
libc/stdlib/malloc/malloc_debug.c
libc/stdlib/malloc/realloc.c

index 81c7183..da39533 100644 (file)
@@ -7,7 +7,7 @@
  * This file is subject to the terms and conditions of the GNU Lesser
  * General Public License.  See the file COPYING.LIB in the main
  * directory of this archive for more details.
- * 
+ *
  * Written by Miles Bader <miles@gnu.org>
  */
 
index ecc432b..38ec41c 100644 (file)
@@ -7,7 +7,7 @@
  * This file is subject to the terms and conditions of the GNU Lesser
  * General Public License.  See the file COPYING.LIB in the main
  * directory of this archive for more details.
- * 
+ *
  * Written by Miles Bader <miles@gnu.org>
  */
 
index 8a6c784..f8d5965 100644 (file)
@@ -7,7 +7,7 @@
  * This file is subject to the terms and conditions of the GNU Lesser
  * General Public License.  See the file COPYING.LIB in the main
  * directory of this archive for more details.
- * 
+ *
  * Written by Miles Bader <miles@gnu.org>
  */
 
index de84e99..296c6e5 100644 (file)
@@ -7,7 +7,7 @@
  * This file is subject to the terms and conditions of the GNU Lesser
  * General Public License.  See the file COPYING.LIB in the main
  * directory of this archive for more details.
- * 
+ *
  * Written by Miles Bader <miles@gnu.org>
  */
 
index 9e5b61c..e83831d 100644 (file)
@@ -7,7 +7,7 @@
  * This file is subject to the terms and conditions of the GNU Lesser
  * General Public License.  See the file COPYING.LIB in the main
  * directory of this archive for more details.
- * 
+ *
  * Written by Miles Bader <miles@gnu.org>
  */
 
 #include <stdio.h>
 #include <stdarg.h>
 #include <string.h>
+#include <unistd.h>
 
 libc_hidden_proto(vfprintf)
 libc_hidden_proto(fprintf)
+libc_hidden_proto(_exit)
 
 #include "malloc.h"
 #include "heap.h"
@@ -66,7 +68,7 @@ __heap_dump (struct heap *heap, const char *str)
 
 /* Output an error message to stderr, and exit.  STR is printed with the
    failure message.  */
-static void
+static void attribute_noreturn
 __heap_check_failure (struct heap *heap, struct heap_free_area *fa,
                      const char *str, char *fmt, ...)
 {
@@ -81,13 +83,13 @@ __heap_check_failure (struct heap *heap, struct heap_free_area *fa,
   vfprintf (stderr, fmt, val);
   va_end (val);
 
-  __putc ('\n', stderr);
+  fprintf (stderr, "\n");
 
   __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
index a4b5259..8bc740d 100644 (file)
@@ -7,7 +7,7 @@
  * This file is subject to the terms and conditions of the GNU Lesser
  * General Public License.  See the file COPYING.LIB in the main
  * directory of this archive for more details.
- * 
+ *
  * Written by Miles Bader <miles@gnu.org>
  */
 
index 373b5dc..770d7ae 100644 (file)
@@ -7,7 +7,7 @@
  * This file is subject to the terms and conditions of the GNU Lesser
  * General Public License.  See the file COPYING.LIB in the main
  * directory of this archive for more details.
- * 
+ *
  * Written by Miles Bader <miles@gnu.org>
  */
 
index 78232d6..7277cd2 100644 (file)
@@ -84,7 +84,6 @@ 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...)                                      \
index 6c74d78..39c3919 100644 (file)
@@ -7,7 +7,7 @@
  * This file is subject to the terms and conditions of the GNU Lesser
  * General Public License.  See the file COPYING.LIB in the main
  * directory of this archive for more details.
- * 
+ *
  * Written by Miles Bader <miles@gnu.org>
  */
 
index 4d56565..21ff9a3 100644 (file)
@@ -7,7 +7,7 @@
  * This file is subject to the terms and conditions of the GNU Lesser
  * General Public License.  See the file COPYING.LIB in the main
  * directory of this archive for more details.
- * 
+ *
  * Written by Miles Bader <miles@gnu.org>
  */