]> pd.if.org Git - pdclib/blob - opt/tss_errno/errno.c
tss_errno: _PDCLIB_errno_func()
[pdclib] / opt / tss_errno / errno.c
1 /* $Id$ */
2
3 /* _PDCLIB_errno
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 #ifndef REGTEST
10 #include <threads.h>
11
12 /* Temporary */
13
14 static int _PDCLIB_errno = 0;
15
16 int * _PDCLIB_errno_func()
17 {
18     return &_PDCLIB_errno;
19 }
20
21 #endif
22
23 #ifdef TEST
24 #include <_PDCLIB_test.h>
25
26 #include <errno.h>
27
28 int main( void )
29 {
30     errno = 0;
31     TESTCASE( errno == 0 );
32     errno = EDOM;
33     TESTCASE( errno == EDOM );
34     errno = ERANGE;
35     TESTCASE( errno == ERANGE );
36     return TEST_RESULTS;
37 }
38
39 #endif
40