X-Git-Url: https://pd.if.org/git/?p=pdclib;a=blobdiff_plain;f=platform%2Fgandr%2Ffunctions%2F_PDCLIB%2F_PDCLIB_freepages.c;h=d87e2d84cd6b7606c3219449ddc6543e0480d645;hp=c77687652e64de0739b74998a9f5a954fbd247e9;hb=c42d6c99b024d1a93994d734d9739a3db44c9d67;hpb=c83b63d8752d32b5fe82aa2b1c3b570eef531436 diff --git a/platform/gandr/functions/_PDCLIB/_PDCLIB_freepages.c b/platform/gandr/functions/_PDCLIB/_PDCLIB_freepages.c index c776876..d87e2d8 100644 --- a/platform/gandr/functions/_PDCLIB/_PDCLIB_freepages.c +++ b/platform/gandr/functions/_PDCLIB/_PDCLIB_freepages.c @@ -1,30 +1,33 @@ -/* $Id$ */ - -/* _PDCLIB_allocpages( int const ) - - This file is part of the Public Domain C Library (PDCLib). - Permission is granted to use, modify, and / or redistribute at will. -*/ - -/* This is a stub implementation of _PDCLIB_allocpages -*/ - -#include -#include -#include <_PDCLIB_glue.h> -#include - -void _PDCLIB_freepages( void * p, size_t n ) -{ - return; -} - -#ifdef TEST -#include <_PDCLIB_test.h> - -int main( void ) -{ - return TEST_RESULTS; -} - -#endif +/* _PDCLIB_freepages( void *, 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 a stub implementation of _PDCLIB_allocpages +*/ + +#include +#include +#include "_PDCLIB_glue.h" +#include +#include + +void _PDCLIB_freepages( void * p, size_t n ) +{ + int rv = 0; + if((rv = gd_free_pages( p, n ))) { + perror("_PDCLIB_freepages"); + abort(); + } +} + +#ifdef TEST +#include "_PDCLIB_test.h" + +int main( void ) +{ + return TEST_RESULTS; +} + +#endif