/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#if defined(HAVE_MMAP)
+#ifndef MAP_ANONYMOUS
+ #define MAP_ANONYMOUS MAP_ANON
+#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h> /* Prototypes for lseek */
/* Return MAP_PRIVATE if MDP represents /dev/zero. Otherwise, return
MAP_SHARED. */
-#define MAP_PRIVATE_OR_SHARED(MDP) ((MDP -> flags & MMALLOC_DEVZERO) \
+#define MAP_PRIVATE_OR_SHARED(MDP) (( MDP -> flags & MMALLOC_ANONYMOUS) \
? MAP_PRIVATE \
: MAP_SHARED)
to signal an error return, and besides, it is useful to
catch NULL pointers if it is unmapped. Instead start
at the next page boundary. */
- base = (void*) getpagesize ();
+ base = (void*)(long) getpagesize ();
}
else if (base == (void*) -1)
{
}
return ((void*) base);
}
-#endif /* defined(HAVE_MMAP) */