]> pd.if.org Git - pdclib/blob - platform/posix/functions/_PDCLIB/_PDCLIB_Exit.c
Add an up to date POSIX port (works on Mac OS X). This is fully functional except...
[pdclib] / platform / posix / functions / _PDCLIB / _PDCLIB_Exit.c
1 /* $Id$ */
2
3 /* _PDCLIB_exit( int )
4
5    This file is part of the Public Domain C Library (PDCLib).
6    Permission is granted to use, modify, and / or redistribute at will.
7 */
8
9 /* This is an example implementation of _PDCLIB_exit() fit for use with POSIX
10    kernels.
11 */
12
13 #include <stdlib.h>
14
15 #ifndef REGTEST
16 #include <_PDCLIB_glue.h>
17
18 extern void _exit( int status ) _PDCLIB_noreturn;
19
20 void _PDCLIB_Exit( int status )
21 {
22     _exit( status );
23 }
24
25 #endif
26
27 #ifdef TEST
28 #include <_PDCLIB_test.h>
29
30 int main( void )
31 {
32 #ifndef REGTEST
33     int UNEXPECTED_RETURN = 0;
34     _PDCLIB_Exit( 0 );
35     TESTCASE( UNEXPECTED_RETURN );
36 #endif
37     return TEST_RESULTS;
38 }
39
40 #endif