From 8c29d069db1898b519c6c610a91a25b5ffb8c9d0 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Mon, 1 Jan 2001 22:16:11 +0000 Subject: A bunch of updates, part from Manuel Novoa III (such as more long long support), and other updates by me (better cross platform, cross-compiler, etc, support. Now compiles with 2.0.x kernels for armnommu. --- libc/stdlib/malloc/alloc.c | 4 ++-- libc/stdlib/malloc/malloc.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'libc/stdlib/malloc') diff --git a/libc/stdlib/malloc/alloc.c b/libc/stdlib/malloc/alloc.c index b782f6dcf..22d508ca1 100644 --- a/libc/stdlib/malloc/alloc.c +++ b/libc/stdlib/malloc/alloc.c @@ -12,7 +12,7 @@ void * calloc_dbg(size_t num, size_t size, char * function, char * file, int line) { void * ptr; - fprintf(stderr, "calloc of %d bytes at %s @%s:%d = ", num*size, function, file, line); + fprintf(stderr, "calloc of %ld bytes at %s @%s:%d = ", (long)(num*size), function, file, line); ptr = calloc(num,size); fprintf(stderr, "%p\n", ptr); return ptr; @@ -26,7 +26,7 @@ void * malloc_dbg(size_t len, char * function, char * file, int line) { void * result; - fprintf(stderr, "malloc of %d bytes at %s @%s:%d = ", len, function, file, line); + fprintf(stderr, "malloc of %ld bytes at %s @%s:%d = ", (long)len, function, file, line); result = malloc(len); fprintf(stderr, "%p\n", result); return result; diff --git a/libc/stdlib/malloc/malloc.c b/libc/stdlib/malloc/malloc.c index d7df5d243..a3f50fb3b 100644 --- a/libc/stdlib/malloc/malloc.c +++ b/libc/stdlib/malloc/malloc.c @@ -296,8 +296,8 @@ struct Block_s /* 32-bytes long control structure (if 4-byte aligned) */ /* packed 4-byte attributes */ /* { */ - char bal_free_mem : 8; /* balance of subtree */ - char bal_ptrs : 8; /* balance of subtree */ + signed char bal_free_mem : 8; /* balance of subtree */ + signed char bal_ptrs : 8; /* balance of subtree */ unsigned int used : 1; /* used/free state of the block */ unsigned int broken : 1; /* 1 if previous block can't be merged with it */ /* } */ -- cgit v1.2.3