X-Git-Url: https://pd.if.org/git/?p=pdclib;a=blobdiff_plain;f=platform%2Fexample%2Ffunctions%2F_PDCLIB%2Fallocpages.c;h=f3414bbb0bc8058925f0d67a8c107e0a894adbef;hp=081adfb99993847b1d267cf882eb47ba348e7255;hb=2040228f27d623585d339dec175c4e779ca9edb5;hpb=3ffa88d3e16e7564ff81bf3650b5afa113caac97 diff --git a/platform/example/functions/_PDCLIB/allocpages.c b/platform/example/functions/_PDCLIB/allocpages.c index 081adfb..f3414bb 100644 --- a/platform/example/functions/_PDCLIB/allocpages.c +++ b/platform/example/functions/_PDCLIB/allocpages.c @@ -11,6 +11,8 @@ #include #include +#ifndef REGTEST + int brk( void * ); void * sbrk( intptr_t ); @@ -53,13 +55,14 @@ void * _PDCLIB_allocpages( int const n ) } } +#endif + #ifdef TEST #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 +73,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; }