X-Git-Url: https://pd.if.org/git/?p=pdclib;a=blobdiff_plain;f=platform%2Fposix%2Ffunctions%2F_PDCLIB%2F_PDCLIB_allocpages.c;h=0416f181170daffec942e1dd32021228ae092ca1;hp=c63e7809ad0c2275e3e0d3fb73355c79c5631dc9;hb=c42d6c99b024d1a93994d734d9739a3db44c9d67;hpb=1aba8d4e33b2a020709f81182709c7de7a728c76 diff --git a/platform/posix/functions/_PDCLIB/_PDCLIB_allocpages.c b/platform/posix/functions/_PDCLIB/_PDCLIB_allocpages.c index c63e780..0416f18 100644 --- a/platform/posix/functions/_PDCLIB/_PDCLIB_allocpages.c +++ b/platform/posix/functions/_PDCLIB/_PDCLIB_allocpages.c @@ -1,18 +1,21 @@ -/* _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 #include #include -#include <_PDCLIB_glue.h> +#include "_PDCLIB_glue.h" + +#ifndef MAP_ANON +#define MAP_ANON MAP_ANOYNMOUS +#endif void * _PDCLIB_allocpages( size_t n ) { @@ -30,7 +33,7 @@ void * _PDCLIB_allocpages( size_t n ) #endif #ifdef TEST -#include <_PDCLIB_test.h> +#include "_PDCLIB_test.h" int main( void ) {