CBMC
errno.c
Go to the documentation of this file.
1 /* FUNCTION: __error */
2 
3 // This is used on MacOS to return the address of a
4 // variable used for the errno macro.
5 
6 __CPROVER_thread_local int __CPROVER_errno;
7 
8 int *__error(void)
9 {
10  return &__CPROVER_errno;
11 }
12 
13 /* FUNCTION: __errno_location */
14 
15 // This is used on Linux to return the address of a
16 // variable used for the errno macro.
17 
18 __CPROVER_thread_local int __CPROVER_errno;
19 
20 int *__errno_location(void)
21 {
22  return &__CPROVER_errno;
23 }
24 
25 /* FUNCTION: _errno */
26 
27 // This is used on Windows to return the address of a
28 // variable used for the errno macro.
29 
30 __CPROVER_thread_local int __CPROVER_errno;
31 
32 int *_errno(void)
33 {
34  return &__CPROVER_errno;
35 }
36 
37 /* FUNCTION: __errno */
38 
39 // This has been spotted in CYGWIN
40 
41 __CPROVER_thread_local int __CPROVER_errno;
42 
43 extern int *__errno(void)
44 {
45  return &__CPROVER_errno;
46 }
47 
48 /* FUNCTION: ___errno */
49 
50 // This has been spotted on Solaris
51 
52 __CPROVER_thread_local int __CPROVER_errno;
53 
54 extern int *___errno(void)
55 {
56  return &__CPROVER_errno;
57 }
int * ___errno(void)
Definition: errno.c:54
int * __errno(void)
Definition: errno.c:43
__CPROVER_thread_local int __CPROVER_errno
Definition: errno.c:6
int * _errno(void)
Definition: errno.c:32
int * __error(void)
Definition: errno.c:8
int * __errno_location(void)
Definition: errno.c:20