Commit | Line | Data |
---|---|---|
805e021f CE |
1 | /* |
2 | * Copyright 2000, International Business Machines Corporation and others. | |
3 | * All Rights Reserved. | |
4 | * | |
5 | * This software has been released under the terms of the IBM Public | |
6 | * License. For details, see the LICENSE file in the top-level source | |
7 | * directory or online at http://www.openafs.org/dl/license10.html | |
8 | */ | |
9 | ||
10 | #ifndef OPENAFS_ERRMAP_NT_H | |
11 | #define OPENAFS_ERRMAP_NT_H | |
12 | ||
13 | /* Declare NT to Unix-ish error translation function */ | |
14 | extern int nterr_nt2unix(long ntErr, int defaultErr); | |
15 | ||
16 | /* Include C Runtime Library error code definitions */ | |
17 | #include <errno.h> | |
18 | ||
19 | /* | |
20 | * Define additional POSIX codes not specified by | |
21 | * Visual Studio. Different versions include different | |
22 | * error code definitions. If an error is not declared | |
23 | * by the C Runtime Library, define it using the equivalent | |
24 | * Winsock error. If there is no Winsock equivalent, | |
25 | * define an AFS private value in the Winsock space. | |
26 | */ | |
27 | ||
28 | /* Overloaded codes. */ | |
29 | #ifndef EWOULDBLOCK | |
30 | #define EWOULDBLOCK WSAEWOULDBLOCK | |
31 | #endif | |
32 | ||
33 | #ifndef EINPROGRESS | |
34 | #define EINPROGRESS WSAEINPROGRESS | |
35 | #endif | |
36 | #ifndef EALREADY | |
37 | #define EALREADY WSAEALREADY | |
38 | #endif | |
39 | #ifndef ENOTSOCK | |
40 | #define ENOTSOCK WSAENOTSOCK | |
41 | #endif | |
42 | #ifndef EDESTADDRREQ | |
43 | #define EDESTADDRREQ WSAEDESTADDRREQ | |
44 | #endif | |
45 | #ifndef EMSGSIZE | |
46 | #define EMSGSIZE WSAEMSGSIZE | |
47 | #endif | |
48 | #ifndef EPROTOTYPE | |
49 | #define EPROTOTYPE WSAEPROTOTYPE | |
50 | #endif | |
51 | #ifndef ENOPROTOOPT | |
52 | #define ENOPROTOOPT WSAENOPROTOOPT | |
53 | #endif | |
54 | #ifndef EPROTONOSUPPORT | |
55 | #define EPROTONOSUPPORT WSAEPROTONOSUPPORT | |
56 | #endif | |
57 | #ifndef ESOCKTNOSUPPORT | |
58 | #define ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT | |
59 | #endif | |
60 | #ifndef EOPNOTSUPP | |
61 | #define EOPNOTSUPP WSAEOPNOTSUPP | |
62 | #endif | |
63 | #ifndef EPFNOSUPPORT | |
64 | #define EPFNOSUPPORT WSAEPFNOSUPPORT | |
65 | #endif | |
66 | #ifndef EAFNOSUPPORT | |
67 | #define EAFNOSUPPORT WSAEAFNOSUPPORT | |
68 | #endif | |
69 | #ifndef EADDRINUSE | |
70 | #define EADDRINUSE WSAEADDRINUSE | |
71 | #endif | |
72 | #ifndef EADDRNOTAVAIL | |
73 | #define EADDRNOTAVAIL WSAEADDRNOTAVAIL | |
74 | #endif | |
75 | #ifndef ENETDOWN | |
76 | #define ENETDOWN WSAENETDOWN | |
77 | #endif | |
78 | #ifndef ENETUNREACH | |
79 | #define ENETUNREACH WSAENETUNREACH | |
80 | #endif | |
81 | #ifndef ENETRESET | |
82 | #define ENETRESET WSAENETRESET | |
83 | #endif | |
84 | #ifndef ECONNABORTED | |
85 | #define ECONNABORTED WSAECONNABORTED | |
86 | #endif | |
87 | #ifndef ECONNRESET | |
88 | #define ECONNRESET WSAECONNRESET | |
89 | #endif | |
90 | #ifndef ENOBUFS | |
91 | #define ENOBUFS WSAENOBUFS | |
92 | #endif | |
93 | #ifndef EISCONN | |
94 | #define EISCONN WSAEISCONN | |
95 | #endif | |
96 | #ifndef ENOTCONN | |
97 | #define ENOTCONN WSAENOTCONN | |
98 | #endif | |
99 | #ifndef ESHUTDOWN | |
100 | #define ESHUTDOWN WSAESHUTDOWN | |
101 | #endif | |
102 | #ifndef ETOOMANYREFS | |
103 | #define ETOOMANYREFS WSAETOOMANYREFS | |
104 | #endif | |
105 | #ifndef ETIMEDOUT | |
106 | #define ETIMEDOUT WSAETIMEDOUT | |
107 | #endif | |
108 | #ifndef ECONNREFUSED | |
109 | #define ECONNREFUSED WSAECONNREFUSED | |
110 | #endif | |
111 | #ifndef ELOOP | |
112 | #define ELOOP WSAELOOP | |
113 | #endif | |
114 | #ifndef ENAMETOOLONG | |
115 | #define ENAMETOOLONG WSAENAMETOOLONG | |
116 | #endif | |
117 | #ifndef EHOSTDOWN | |
118 | #define EHOSTDOWN WSAEHOSTDOWN | |
119 | #endif | |
120 | #ifndef EHOSTUNREACH | |
121 | #define EHOSTUNREACH WSAEHOSTUNREACH | |
122 | #endif | |
123 | #ifndef ENOTEMPTY | |
124 | #define ENOTEMPTY WSAENOTEMPTY | |
125 | #endif | |
126 | #ifndef EPROCLIM | |
127 | #define EPROCLIM WSAEPROCLIM | |
128 | #endif | |
129 | #ifndef EUSERS | |
130 | #define EUSERS WSAEUSERS | |
131 | #endif | |
132 | #ifndef EDQUOT | |
133 | #define EDQUOT WSAEDQUOT | |
134 | #endif | |
135 | #ifndef ESTALE | |
136 | #define ESTALE WSAESTALE | |
137 | #endif | |
138 | #ifndef EREMOTE | |
139 | #define EREMOTE WSAEREMOTE | |
140 | #endif | |
141 | ||
142 | /* | |
143 | * New codes | |
144 | * Highest known value is WSA_QOS_RESERVED_PETYPE (WSABASEERR + 1031) | |
145 | */ | |
146 | #define AFS_NT_ERRNO_BASE WSABASEERR + 1100 | |
147 | ||
148 | #ifndef EOVERFLOW | |
149 | #define EOVERFLOW (AFS_NT_ERRNO_BASE + 0) | |
150 | #endif | |
151 | #ifndef ENOMSG | |
152 | #define ENOMSG (AFS_NT_ERRNO_BASE + 1) | |
153 | #endif | |
154 | #ifndef ETIME | |
155 | #define ETIME (AFS_NT_ERRNO_BASE + 2) | |
156 | #endif | |
157 | #ifndef ENOTBLK | |
158 | #define ENOTBLK (AFS_NT_ERRNO_BASE + 3) | |
159 | #endif | |
160 | ||
161 | #endif /* OPENAFS_ERRMAP_NT_H */ | |
162 |