Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/gnu/lib/libmalloc Fix some LP64 issues
details: https://anonhg.NetBSD.org/src/rev/3d69b290c5d5
branches: trunk
changeset: 759390:3d69b290c5d5
user: joerg <joerg%NetBSD.org@localhost>
date: Wed Dec 08 01:54:21 2010 +0000
description:
Fix some LP64 issues
diffstat:
gnu/lib/libmalloc/mtrace.c | 13 +++++--------
gnu/lib/libmalloc/valloc.c | 1 +
2 files changed, 6 insertions(+), 8 deletions(-)
diffs (56 lines):
diff -r 48522d879d0e -r 3d69b290c5d5 gnu/lib/libmalloc/mtrace.c
--- a/gnu/lib/libmalloc/mtrace.c Wed Dec 08 01:45:57 2010 +0000
+++ b/gnu/lib/libmalloc/mtrace.c Wed Dec 08 01:54:21 2010 +0000
@@ -72,8 +72,7 @@
static __ptr_t tr_mallochook __P ((size_t));
static __ptr_t
-tr_mallochook (size)
- size_t size;
+tr_mallochook(size_t size)
{
__ptr_t hdr;
@@ -82,7 +81,7 @@
__malloc_hook = tr_mallochook;
/* We could be printing a NULL here; that's OK. */
- fprintf (mallstream, "+ %p %x\n", hdr, size);
+ fprintf (mallstream, "+ %p %zx\n", hdr, size);
if (hdr == mallwatch)
tr_break ();
@@ -92,9 +91,7 @@
static __ptr_t tr_reallochook __P ((__ptr_t, size_t));
static __ptr_t
-tr_reallochook (ptr, size)
- __ptr_t ptr;
- size_t size;
+tr_reallochook (__ptr_t ptr, size_t size)
{
__ptr_t hdr;
@@ -110,9 +107,9 @@
__realloc_hook = tr_reallochook;
if (hdr == NULL)
/* Failed realloc. */
- fprintf (mallstream, "! %p %x\n", ptr, size);
+ fprintf (mallstream, "! %p %zx\n", ptr, size);
else
- fprintf (mallstream, "< %p\n> %p %x\n", ptr, hdr, size);
+ fprintf (mallstream, "< %p\n> %p %zx\n", ptr, hdr, size);
if (hdr == mallwatch)
tr_break ();
diff -r 48522d879d0e -r 3d69b290c5d5 gnu/lib/libmalloc/valloc.c
--- a/gnu/lib/libmalloc/valloc.c Wed Dec 08 01:45:57 2010 +0000
+++ b/gnu/lib/libmalloc/valloc.c Wed Dec 08 01:54:21 2010 +0000
@@ -23,6 +23,7 @@
#define _MALLOC_INTERNAL
#include <malloc.h>
#endif
+#include <unistd.h>
#ifdef __GNU_LIBRARY__
extern size_t __getpagesize __P ((void));
Home |
Main Index |
Thread Index |
Old Index