Last change
on this file since 290 was
191,
checked in by tim, 15 years ago
|
updated scons build scripts to handle MinGW
added binaries for MinGW build dependencies
|
File size:
2.7 KB
|
Line | |
---|
1 | /*** |
---|
2 | * errno.h - system wide error numbers (set by system calls) |
---|
3 | * |
---|
4 | * Copyright (c) 1985-1997, 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 | #if !defined(_WIN32) && !defined(_MAC) |
---|
24 | #error ERROR: Only Mac or Win32 targets supported! |
---|
25 | #endif |
---|
26 | |
---|
27 | #include <winsock.h> |
---|
28 | |
---|
29 | #ifdef __cplusplus |
---|
30 | extern "C" { |
---|
31 | #endif |
---|
32 | |
---|
33 | |
---|
34 | |
---|
35 | /* Define _CRTIMP */ |
---|
36 | |
---|
37 | #ifndef _CRTIMP |
---|
38 | #ifdef _DLL |
---|
39 | #define _CRTIMP __declspec(dllimport) |
---|
40 | #else /* ndef _DLL */ |
---|
41 | #define _CRTIMP |
---|
42 | #endif /* _DLL */ |
---|
43 | #endif /* _CRTIMP */ |
---|
44 | |
---|
45 | |
---|
46 | /* Define __cdecl for non-Microsoft compilers */ |
---|
47 | |
---|
48 | #if ( !defined(_MSC_VER) && !defined(__cdecl) ) |
---|
49 | #define __cdecl |
---|
50 | #endif |
---|
51 | |
---|
52 | /* Define _CRTAPI1 (for compatibility with the NT SDK) */ |
---|
53 | |
---|
54 | #ifndef _CRTAPI1 |
---|
55 | #if _MSC_VER >= 800 && _M_IX86 >= 300 |
---|
56 | #define _CRTAPI1 __cdecl |
---|
57 | #else |
---|
58 | #define _CRTAPI1 |
---|
59 | #endif |
---|
60 | #endif |
---|
61 | |
---|
62 | |
---|
63 | /* declare reference to errno */ |
---|
64 | |
---|
65 | #if (defined(_MT) || defined(_MD) || defined(_DLL)) && !defined(_MAC) |
---|
66 | _CRTIMP extern int * __cdecl _errno(void); |
---|
67 | #define errno (*_errno()) |
---|
68 | #else /* ndef _MT && ndef _MD && ndef _DLL */ |
---|
69 | _CRTIMP extern int errno; |
---|
70 | #endif /* _MT || _MD || _DLL */ |
---|
71 | |
---|
72 | /* Error Codes */ |
---|
73 | |
---|
74 | #define EPERM 1 |
---|
75 | #define ENOENT 2 |
---|
76 | #define ESRCH 3 |
---|
77 | #define EINTR 4 |
---|
78 | #define EIO 5 |
---|
79 | #define ENXIO 6 |
---|
80 | #define E2BIG 7 |
---|
81 | #define ENOEXEC 8 |
---|
82 | #define EBADF 9 |
---|
83 | #define ECHILD 10 |
---|
84 | #define EAGAIN 11 |
---|
85 | #define ENOMEM 12 |
---|
86 | #define EACCES 13 |
---|
87 | #define EFAULT 14 |
---|
88 | #define EBUSY 16 |
---|
89 | #define EEXIST 17 |
---|
90 | #define EXDEV 18 |
---|
91 | #define ENODEV 19 |
---|
92 | #define ENOTDIR 20 |
---|
93 | #define EISDIR 21 |
---|
94 | #define EINVAL 22 |
---|
95 | #define ENFILE 23 |
---|
96 | #define EMFILE 24 |
---|
97 | #define ENOTTY 25 |
---|
98 | #define EFBIG 27 |
---|
99 | #define ENOSPC 28 |
---|
100 | #define ESPIPE 29 |
---|
101 | #define EROFS 30 |
---|
102 | #define EMLINK 31 |
---|
103 | #define EPIPE 32 |
---|
104 | #define EDOM 33 |
---|
105 | #define ERANGE 34 |
---|
106 | #define EDEADLK 36 |
---|
107 | |
---|
108 | /* defined differently in winsock.h on WinCE */ |
---|
109 | #ifndef ENAMETOOLONG |
---|
110 | #define ENAMETOOLONG 38 |
---|
111 | #endif |
---|
112 | |
---|
113 | #define ENOLCK 39 |
---|
114 | #define ENOSYS 40 |
---|
115 | |
---|
116 | /* defined differently in winsock.h on WinCE */ |
---|
117 | #ifndef ENOTEMPTY |
---|
118 | #define ENOTEMPTY 41 |
---|
119 | #endif |
---|
120 | |
---|
121 | #define EILSEQ 42 |
---|
122 | |
---|
123 | /* |
---|
124 | * Support EDEADLOCK for compatibiity with older MS-C versions. |
---|
125 | */ |
---|
126 | #define EDEADLOCK EDEADLK |
---|
127 | |
---|
128 | #ifdef __cplusplus |
---|
129 | } |
---|
130 | #endif |
---|
131 | |
---|
132 | #endif /* _INC_ERRNO */ |
---|
Note: See
TracBrowser
for help on using the repository browser.