]> pd.if.org Git - pdclib/blobdiff - platform/example/functions/_PDCLIB/_Exit.c
* platform/example is now a "stub" platform - it should compile anywhere, but
[pdclib] / platform / example / functions / _PDCLIB / _Exit.c
index e096e70d56db7a139841b10e36225de1cb0b6a37..2bfc8c90623057182779167bb03df4b3ec92abb3 100644 (file)
@@ -1,26 +1,23 @@
 /* $Id$ */
 
-/* Release $Name$ */
-
 /* _PDCLIB_exit( int )
 
    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_exit() fit for use with POSIX
-   kernels.
+/* This is a stub implementation of _PDCLIB_Exit
 */
 
 #include <stdlib.h>
 
 #ifndef REGTEST
 #include <_PDCLIB_glue.h>
-#include <unistd.h>
+#include <errno.h>
 
 void _PDCLIB_Exit( int status )
 {
-    _exit( status );
+    errno = ENOTSUP;
 }
 
 #endif
@@ -30,7 +27,9 @@ void _PDCLIB_Exit( int status )
 
 int main( void )
 {
-    TESTCASE( NO_TESTDRIVER );
+    int UNEXPECTED_RETURN = 0;
+    _PDCLIB_Exit( 0 );
+    TESTCASE( UNEXPECTED_RETURN );
     return TEST_RESULTS;
 }