]> pd.if.org Git - pdclib/blob - functions/_PDCLIB/errno.c
Fixed prototype warnings.
[pdclib] / functions / _PDCLIB / 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 #define _PDCLIB_INT_H _PDCLIB_INT_H
10 #include <_PDCLIB_int.h>
11
12 #ifndef REGTEST
13
14 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