1 /*
2 		      ANSI C Runtime Library
3 
4     Copyright 1983-2005 Green Hills Software, Inc.
5 
6     This program is the property of Green Hills Software, Inc,
7     its contents are proprietary information and no part of it
8     is to be disclosed to anyone except employees of Green Hills
9     Software, Inc., or as agreed in writing signed by the President
10     of Green Hills Software, Inc.
11 */
12 
13 /*
14     This file is included in every library module which uses errno
15 */
16 #ifndef __INDERRNO_H
17 #define __INDERRNO_H
18 
19 #include <errno.h>
20 
21 #include "inddef.h"
22 
23 #if defined(EMBEDDED)
24 
25 void __gh_set_errno(int err);
26 int  __gh_get_errno(void);
27 
28 #else
29 
30 #define __gh_set_errno(x)	((errno) = (x))
31 /* #define  __gh_get_errno(void)	(errno) */
__gh_get_errno(void)32 static __inline int __gh_get_errno(void) { return errno; }
33 
34 #endif
35 
36 #endif /* __INDERRNO_H */
37