]> pd.if.org Git - pdclib/blobdiff - platform/example_cygwin/functions/_PDCLIB/close.c
Compiling under Cygwin now.
[pdclib] / platform / example_cygwin / functions / _PDCLIB / close.c
diff --git a/platform/example_cygwin/functions/_PDCLIB/close.c b/platform/example_cygwin/functions/_PDCLIB/close.c
new file mode 100644 (file)
index 0000000..c4b6173
--- /dev/null
@@ -0,0 +1,36 @@
+/* $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 <stdio.h>
+
+#ifndef REGTEST
+#include <_PDCLIB_glue.h>
+
+extern int close( int fd );
+
+int _PDCLIB_close( int 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