-/* _PDCLIB_allocpages( int const )
+/* _PDCLIB_allocpages( size_t )
This file is part of the Public Domain C Library (PDCLib).
Permission is granted to use, modify, and / or redistribute at will.
*/
-/* This is an example implementation of _PDCLIB_allocpages() (declared in
- _PDCLIB_config.h), fit for use with POSIX kernels.
-*/
-
#ifndef REGTEST
+#ifdef __linux__
+#define _GNU_SOURCE
+#endif
#include <stdint.h>
#include <stddef.h>
#include <sys/mman.h>
-#include <_PDCLIB_glue.h>
+#include "_PDCLIB_glue.h"
+
+#ifndef MAP_ANON
+#define MAP_ANON MAP_ANOYNMOUS
+#endif
void * _PDCLIB_allocpages( size_t n )
{
#endif
#ifdef TEST
-#include <_PDCLIB_test.h>
+#include "_PDCLIB_test.h"
int main( void )
{