X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=platform%2Fexample%2Ffunctions%2F_PDCLIB%2Fallocpages.c;h=9de9314ea64cc733de4ec3c02dbb73167902e158;hb=d865c4403fc91d1f1ac95ba76febcee9f429bb97;hp=f5a3609b244184f79c4ae549b40a76e33ab4d69e;hpb=b1fc26afebd4d557ff89a44bc21767a8704c3809;p=pdclib diff --git a/platform/example/functions/_PDCLIB/allocpages.c b/platform/example/functions/_PDCLIB/allocpages.c index f5a3609..9de9314 100644 --- a/platform/example/functions/_PDCLIB/allocpages.c +++ b/platform/example/functions/_PDCLIB/allocpages.c @@ -11,10 +11,12 @@ #include #include +#ifndef REGTEST + int brk( void * ); void * sbrk( intptr_t ); -#include <_PDCLIB_glue.h> +#include "_PDCLIB_glue.h" static void * membreak = NULL; @@ -53,13 +55,15 @@ void * _PDCLIB_allocpages( int const n ) } } +#endif + #ifdef TEST -#include <_PDCLIB_test.h> + +#include "_PDCLIB_test.h" int main( void ) { #ifndef REGTEST - { char * startbreak = sbrk( 0 ); TESTCASE( _PDCLIB_allocpages( 0 ) ); TESTCASE( ( (char *)sbrk( 0 ) - startbreak ) <= _PDCLIB_PAGESIZE ); @@ -70,7 +74,6 @@ int main( void ) TESTCASE( sbrk( 0 ) == startbreak + ( 6 * _PDCLIB_PAGESIZE ) ); TESTCASE( _PDCLIB_allocpages( -3 ) ); TESTCASE( sbrk( 0 ) == startbreak + ( 3 * _PDCLIB_PAGESIZE ) ); - } #endif return TEST_RESULTS; }