STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
errno.h
Go to the documentation of this file.
1 //
2 // errno.h
3 //
4 // Copyright (c) Microsoft Corporation. All rights reserved.
5 //
6 // System error numbers for use with errno and errno_t.
7 //
8 #pragma once
9 #define _INC_ERRNO
10 
11 #include <corecrt.h>
12 
14 
15 
16 
17 #if _CRT_FUNCTIONS_REQUIRED
18  _ACRTIMP int* __cdecl _errno(void);
19  #define errno (*_errno())
20 
21  _ACRTIMP errno_t __cdecl _set_errno(_In_ int _Value);
22  _ACRTIMP errno_t __cdecl _get_errno(_Out_ int* _Value);
23 
24  _ACRTIMP unsigned long* __cdecl __doserrno(void);
25  #define _doserrno (*__doserrno())
26 
27  _ACRTIMP errno_t __cdecl _set_doserrno(_In_ unsigned long _Value);
28  _ACRTIMP errno_t __cdecl _get_doserrno(_Out_ unsigned long * _Value);
29 #endif // _CRT_FUNCTIONS_REQUIRED
30 
31 
32 
33 // Error codes
34 #define EPERM 1
35 #define ENOENT 2
36 #define ESRCH 3
37 #define EINTR 4
38 #define EIO 5
39 #define ENXIO 6
40 #define E2BIG 7
41 #define ENOEXEC 8
42 #define EBADF 9
43 #define ECHILD 10
44 #define EAGAIN 11
45 #define ENOMEM 12
46 #define EACCES 13
47 #define EFAULT 14
48 #define EBUSY 16
49 #define EEXIST 17
50 #define EXDEV 18
51 #define ENODEV 19
52 #define ENOTDIR 20
53 #define EISDIR 21
54 #define ENFILE 23
55 #define EMFILE 24
56 #define ENOTTY 25
57 #define EFBIG 27
58 #define ENOSPC 28
59 #define ESPIPE 29
60 #define EROFS 30
61 #define EMLINK 31
62 #define EPIPE 32
63 #define EDOM 33
64 #define EDEADLK 36
65 #define ENAMETOOLONG 38
66 #define ENOLCK 39
67 #define ENOSYS 40
68 #define ENOTEMPTY 41
69 
70 // Error codes used in the Secure CRT functions
71 #ifndef RC_INVOKED
72  #define _SECURECRT_ERRCODE_VALUES_DEFINED
73  #define EINVAL 22
74  #define ERANGE 34
75  #define EILSEQ 42
76  #define STRUNCATE 80
77 #endif
78 
79 // Support EDEADLOCK for compatibility with older Microsoft C versions
80 #define EDEADLOCK EDEADLK
81 
82 // POSIX Supplement
83 #ifndef _CRT_NO_POSIX_ERROR_CODES
84  #define EADDRINUSE 100
85  #define EADDRNOTAVAIL 101
86  #define EAFNOSUPPORT 102
87  #define EALREADY 103
88  #define EBADMSG 104
89  #define ECANCELED 105
90  #define ECONNABORTED 106
91  #define ECONNREFUSED 107
92  #define ECONNRESET 108
93  #define EDESTADDRREQ 109
94  #define EHOSTUNREACH 110
95  #define EIDRM 111
96  #define EINPROGRESS 112
97  #define EISCONN 113
98  #define ELOOP 114
99  #define EMSGSIZE 115
100  #define ENETDOWN 116
101  #define ENETRESET 117
102  #define ENETUNREACH 118
103  #define ENOBUFS 119
104  #define ENODATA 120
105  #define ENOLINK 121
106  #define ENOMSG 122
107  #define ENOPROTOOPT 123
108  #define ENOSR 124
109  #define ENOSTR 125
110  #define ENOTCONN 126
111  #define ENOTRECOVERABLE 127
112  #define ENOTSOCK 128
113  #define ENOTSUP 129
114  #define EOPNOTSUPP 130
115  #define EOTHER 131
116  #define EOVERFLOW 132
117  #define EOWNERDEAD 133
118  #define EPROTO 134
119  #define EPROTONOSUPPORT 135
120  #define EPROTOTYPE 136
121  #define ETIME 137
122  #define ETIMEDOUT 138
123  #define ETXTBSY 139
124  #define EWOULDBLOCK 140
125 #endif // _CRT_NO_POSIX_ERROR_CODES
126 
127 
128 
#define _Out_
Definition: sal.h:342
_ACRTIMP errno_t __cdecl _get_doserrno(_Out_ unsigned long *_Value)
#define _ACRTIMP
Definition: corecrt.h:27
_ACRTIMP errno_t __cdecl _get_errno(_Out_ int *_Value)
_ACRTIMP errno_t __cdecl _set_doserrno(_In_ unsigned long _Value)
_ACRTIMP unsigned long *__cdecl __doserrno(void)
int errno_t
Definition: corecrt.h:476
#define _CRT_BEGIN_C_HEADER
Definition: vcruntime.h:73
#define _In_
Definition: sal.h:305
#define _CRT_END_C_HEADER
Definition: vcruntime.h:76
_In_ _Value
Definition: corecrt_wstdlib.h:65
_CRT_BEGIN_C_HEADER _ACRTIMP int *__cdecl _errno(void)
_ACRTIMP errno_t __cdecl _set_errno(_In_ int _Value)