X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=platform%2Fexample%2Ffunctions%2F_PDCLIB%2Fclose.c;fp=platform%2Fexample%2Ffunctions%2F_PDCLIB%2Fclose.c;h=fd85f4c636986b630ebafb5440fe88308a946b26;hb=9b1e6c0a721f9358d9bbc76410e719a878e27edb;hp=0000000000000000000000000000000000000000;hpb=7e26342e81c524067c23e1d7bac2e98200fd4c1b;p=pdclib diff --git a/platform/example/functions/_PDCLIB/close.c b/platform/example/functions/_PDCLIB/close.c new file mode 100644 index 0000000..fd85f4c --- /dev/null +++ b/platform/example/functions/_PDCLIB/close.c @@ -0,0 +1,39 @@ +/* $Id$ */ + +/* _PDCLIB_close( _PDCLIB_fd_t fd ) + + 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_close() fit for use with POSIX + kernels. +*/ + +#include + +#ifndef REGTEST +#include <_PDCLIB_glue.h> + +#include +#include +#include +#include + +int _PDCLIB_close( _PDCLIB_fd_t fd ) +{ + return close( fd ); +} + +#endif + +#ifdef TEST +#include <_PDCLIB_test.h> + +int main( void ) +{ + /* No testdriver; tested in driver for _PDCLIB_open(). */ + return TEST_RESULTS; +} + +#endif