1 /***
2 *errno.h - system wide error numbers (set by system calls)
3 *
4 *           Copyright (c) Microsoft Corporation. All rights reserved.
5 *
6 *Purpose:
7 *           This file defines the system-wide error numbers (set by
8 *           system calls).  Conforms to the XENIX standard.  Extended
9 *           for compatibility with Uniforum standard.
10 *           [System V]
11 *
12 *           [Public]
13 *
14 ****/
15
16 #if        _MSC_VER > 1000
17 #pragma once
18 #endif
19
20 #ifndef _INC_ERRNO
21 #define _INC_ERRNO
22
23 #include <crtdefs.h>
24
25 #ifdef  __cplusplus
26 extern "C" {
27 #endif
28
29 /* declare reference to errno */
30
31 #ifndef _CRT_ERRNO_DEFINED
32 #define _CRT_ERRNO_DEFINED
33 _CRTIMP extern int * __cdecl _errno(void);
34 #define errno     (*_errno())
35
36 errno_t __cdecl _set_errno(_In_ int _Value);
37 errno_t __cdecl _get_errno(_Out_ int * _Value);
38 #endif
39
40 /* Error Codes */
41
42 #define EPERM                  1
43 #define ENOENT                2
44 #define ESRCH                  3
45 #define EINTR                  4
46 #define EIO                     5
47 #define ENXIO                  6
48 #define E2BIG                  7
49 #define ENOEXEC               8
50 #define EBADF                  9
51 #define ECHILD                10
Lines 52 ... 61 are skipped.
62 #define ENFILE                23
63 #define EMFILE                24
64 #define ENOTTY                25
65 #define EFBIG                  27
66 #define ENOSPC                28
67 #define ESPIPE                29
68 #define EROFS                  30
69 #define EMLINK                31
70 #define EPIPE                  32
71 #define EDOM                    33
72 #define EDEADLK               36
73 #define ENAMETOOLONG      38
74 #define ENOLCK                39
75 #define ENOSYS                40
76 #define ENOTEMPTY           41
77
78 /* Error codes used in the Secure CRT functions */
79
80 #ifndef RC_INVOKED
81 #if !defined(_SECURECRT_ERRCODE_VALUES_DEFINED)
82 #define _SECURECRT_ERRCODE_VALUES_DEFINED
83 #define EINVAL                22
84 #define ERANGE                34
85 #define EILSEQ                42
86 #define STRUNCATE           80
87 #endif
88 #endif
89
90
91 /*
92  * Support EDEADLOCK for compatibiity with older MS-C versions.
93  */
94 #define EDEADLOCK           EDEADLK
95
96 #ifdef  __cplusplus
97 }
98 #endif
99
100 #endif  /* _INC_ERRNO */
101