Update the changelog
[opencv] / apps / cvenv / EiC / stdClib / errno.c
1 /* errno.c
2  *
3  *      (C) Copyright Dec 20 1998, Edmond J. Breen.
4  *                 ALL RIGHTS RESERVED.
5  * This code may be copied for personal, non-profit use only.
6  *
7  */
8
9 #ifndef NO_ERRNO
10
11 #include <errno.h>
12 #include <stdlib.h>
13 #include "eic.h"
14 #include "stdliblocal.h"
15
16
17 val_t _get_errno(void)
18 {
19     val_t v;
20     /*
21      * This function exists so that EiC can get the address 
22      * of the errno;
23      */
24     
25     errno = 0;
26     v.p.sp = v.p.p = &errno;
27     v.p.ep = (void *) ( ((char *) v.p.p) + sizeof( errno ) );
28     return v;
29 }
30
31
32 #endif
33
34 /*************************************/
35
36 void module_errno()
37 {
38 #ifndef NO_ERRNO
39
40     /* ERRNO.H STUFF */
41     EiC_add_builtinfunc("_get_errno",_get_errno);
42
43 #endif
44 }
45
46
47
48
49