[CRT]
[reactos.git] / reactos / include / crt / errno.h
1 /**
2 * This file has no copyright assigned and is placed in the Public Domain.
3 * This file is part of the w64 mingw-runtime package.
4 * No warranty is given; refer to the file DISCLAIMER within this package.
5 */
6 #ifndef _INC_ERRNO
7 #define _INC_ERRNO
8
9 #include <crtdefs.h>
10
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14
15 #ifndef _CRT_ERRNO_DEFINED
16 #define _CRT_ERRNO_DEFINED
17 _CRTIMP extern int *__cdecl _errno(void);
18 #define errno (*_errno())
19
20 errno_t __cdecl _set_errno(_In_ int _Value);
21 errno_t __cdecl _get_errno(_Out_ int *_Value);
22 #endif
23
24 #define EPERM 1
25 #define ENOENT 2
26 #define ESRCH 3
27 #define EINTR 4
28 #define EIO 5
29 #define ENXIO 6
30 #define E2BIG 7
31 #define ENOEXEC 8
32 #define EBADF 9
33 #define ECHILD 10
34 #define EAGAIN 11
35 #define ENOMEM 12
36 #define EACCES 13
37 #define EFAULT 14
38 #define EBUSY 16
39 #define EEXIST 17
40 #define EXDEV 18
41 #define ENODEV 19
42 #define ENOTDIR 20
43 #define EISDIR 21
44 #define ENFILE 23
45 #define EMFILE 24
46 #define ENOTTY 25
47 #define EFBIG 27
48 #define ENOSPC 28
49 #define ESPIPE 29
50 #define EROFS 30
51 #define EMLINK 31
52 #define EPIPE 32
53 #define EDOM 33
54 #define EDEADLK 36
55 #define ENAMETOOLONG 38
56 #define ENOLCK 39
57 #define ENOSYS 40
58 #define ENOTEMPTY 41
59
60 #ifndef RC_INVOKED
61 #if !defined(_SECURECRT_ERRCODE_VALUES_DEFINED)
62 #define _SECURECRT_ERRCODE_VALUES_DEFINED
63 #define EINVAL 22
64 #define ERANGE 34
65 #define EILSEQ 42
66 #define STRUNCATE 80
67 #endif
68 #endif
69
70 #define EDEADLOCK EDEADLK
71
72 #define EWOULDBLOCK 140
73
74 #ifdef __cplusplus
75 }
76 #endif
77 #endif