From e2f6ebd3f2969753e4ffc337ce5fb6cdf9d74775 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Mon, 19 Mar 2001 06:24:20 +0000 Subject: Fix up breakage resulting from flipping the sense of some defines. Change from defining things to "0" in the disabled case to outright undefining them, lest code that does an "#ifdef FOO" get inadvertantly triggered. Remove now unneeded lines from Rules.mak which makes the command line smaller and avoids redundancy (since this stuff is now pulled in via features.h). -Erik --- libc/stdlib/malloc-simple/alloc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'libc/stdlib/malloc-simple') diff --git a/libc/stdlib/malloc-simple/alloc.c b/libc/stdlib/malloc-simple/alloc.c index ed1c381a5..02231fbed 100644 --- a/libc/stdlib/malloc-simple/alloc.c +++ b/libc/stdlib/malloc-simple/alloc.c @@ -1,3 +1,4 @@ +#include #include #include #include @@ -67,10 +68,10 @@ void *calloc(size_t num, size_t size) void *malloc(size_t len) { void *result = mmap((void *) 0, len, PROT_READ | PROT_WRITE, -#ifdef __HAS_NO_MMU__ - MAP_SHARED | MAP_ANONYMOUS, 0, 0 -#else +#ifdef __UCLIBC_HAS_MMU__ MAP_PRIVATE | MAP_ANONYMOUS, 0, 0 +#else + MAP_SHARED | MAP_ANONYMOUS, 0, 0 #endif ); -- cgit v1.2.3