blob: 06ed53a64dbdc1835cd53fb4d473430c3fdfb9dd [file] [log] [blame]
Guido van Rossum4dc66221996-07-24 00:51:51 +00001
2/* Errno module */
3
4#include "Python.h"
5
Tim Peters902952b2002-01-26 17:58:02 +00006/* Windows socket errors (WSA*) */
Guido van Rossum49f9d8e1997-09-28 05:41:56 +00007#ifdef MS_WINDOWS
Christian Heimesc36625b2008-01-04 13:33:00 +00008#define WIN32_LEAN_AND_MEAN
Amaury Forgeot d'Arc3d17a5c2008-06-13 01:09:34 +00009#include <windows.h>
Brian Curtin401f9f32012-05-13 11:19:23 -050010/* The following constants were added to errno.h in VS2010 but have
11 preferred WSA equivalents. */
12#undef EADDRINUSE
13#undef EADDRNOTAVAIL
14#undef EAFNOSUPPORT
15#undef EALREADY
16#undef ECONNABORTED
17#undef ECONNREFUSED
18#undef ECONNRESET
19#undef EDESTADDRREQ
20#undef EHOSTUNREACH
21#undef EINPROGRESS
22#undef EISCONN
23#undef ELOOP
24#undef EMSGSIZE
25#undef ENETDOWN
26#undef ENETRESET
27#undef ENETUNREACH
28#undef ENOBUFS
29#undef ENOPROTOOPT
30#undef ENOTCONN
31#undef ENOTSOCK
32#undef EOPNOTSUPP
33#undef EPROTONOSUPPORT
34#undef EPROTOTYPE
35#undef ETIMEDOUT
36#undef EWOULDBLOCK
Guido van Rossum49f9d8e1997-09-28 05:41:56 +000037#endif
38
Guido van Rossum4dc66221996-07-24 00:51:51 +000039/*
40 * Pull in the system error definitions
Antoine Pitrouf95a1b32010-05-09 15:52:27 +000041 */
Guido van Rossum4dc66221996-07-24 00:51:51 +000042
Guido van Rossum4dc66221996-07-24 00:51:51 +000043static PyMethodDef errno_methods[] = {
Antoine Pitrouf95a1b32010-05-09 15:52:27 +000044 {NULL, NULL}
Guido van Rossum4dc66221996-07-24 00:51:51 +000045};
46
Guido van Rossum49f9d8e1997-09-28 05:41:56 +000047/* Helper function doing the dictionary inserting */
Guido van Rossum4dc66221996-07-24 00:51:51 +000048
49static void
Neal Norwitz0d942032007-08-24 00:10:00 +000050_inscode(PyObject *d, PyObject *de, const char *name, int code)
Guido van Rossum4dc66221996-07-24 00:51:51 +000051{
Antoine Pitrouf95a1b32010-05-09 15:52:27 +000052 PyObject *u = PyUnicode_FromString(name);
53 PyObject *v = PyLong_FromLong((long) code);
Guido van Rossum49f9d8e1997-09-28 05:41:56 +000054
Antoine Pitrouf95a1b32010-05-09 15:52:27 +000055 /* Don't bother checking for errors; they'll be caught at the end
56 * of the module initialization function by the caller of
57 * initerrno().
58 */
59 if (u && v) {
60 /* insert in modules dict */
61 PyDict_SetItem(d, u, v);
62 /* insert in errorcode dict */
63 PyDict_SetItem(de, v, u);
64 }
65 Py_XDECREF(u);
66 Py_XDECREF(v);
Guido van Rossum4dc66221996-07-24 00:51:51 +000067}
68
Martin v. Löwis14f8b4c2002-06-13 20:33:02 +000069PyDoc_STRVAR(errno__doc__,
Guido van Rossum549cb6e1998-08-11 17:50:22 +000070"This module makes available standard errno system symbols.\n\
71\n\
72The value of each symbol is the corresponding integer value,\n\
73e.g., on most systems, errno.ENOENT equals the integer 2.\n\
74\n\
75The dictionary errno.errorcode maps numeric codes to symbol names,\n\
76e.g., errno.errorcode[2] could be the string 'ENOENT'.\n\
77\n\
78Symbols that are not relevant to the underlying system are not defined.\n\
79\n\
80To map error codes to error messages, use the function os.strerror(),\n\
Martin v. Löwis14f8b4c2002-06-13 20:33:02 +000081e.g. os.strerror(2) could return 'No such file or directory'.");
Guido van Rossum549cb6e1998-08-11 17:50:22 +000082
Martin v. Löwis1a214512008-06-11 05:26:20 +000083static struct PyModuleDef errnomodule = {
Antoine Pitrouf95a1b32010-05-09 15:52:27 +000084 PyModuleDef_HEAD_INIT,
85 "errno",
86 errno__doc__,
87 -1,
88 errno_methods,
89 NULL,
90 NULL,
91 NULL,
92 NULL
Martin v. Löwis1a214512008-06-11 05:26:20 +000093};
94
Mark Hammondfe51c6d2002-08-02 02:27:13 +000095PyMODINIT_FUNC
Martin v. Löwis1a214512008-06-11 05:26:20 +000096PyInit_errno(void)
Guido van Rossum4dc66221996-07-24 00:51:51 +000097{
Antoine Pitrouf95a1b32010-05-09 15:52:27 +000098 PyObject *m, *d, *de;
99 m = PyModule_Create(&errnomodule);
100 if (m == NULL)
101 return NULL;
102 d = PyModule_GetDict(m);
103 de = PyDict_New();
104 if (!d || !de || PyDict_SetItemString(d, "errorcode", de) < 0)
105 return NULL;
Guido van Rossum4dc66221996-07-24 00:51:51 +0000106
Guido van Rossum851e7d51997-11-04 20:22:24 +0000107/* Macro so I don't have to edit each and every line below... */
108#define inscode(d, ds, de, name, code, comment) _inscode(d, de, name, code)
109
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000110 /*
111 * The names and comments are borrowed from linux/include/errno.h,
Antoine Pitroub85e1652010-08-18 21:05:19 +0000112 * which should be pretty all-inclusive. However, the Solaris specific
113 * names and comments are borrowed from sys/errno.h in Solaris.
Ronald Oussoren97c3eb42011-05-07 09:59:03 +0200114 * MacOSX specific names and comments are borrowed from sys/errno.h in
115 * MacOSX.
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000116 */
Guido van Rossum4dc66221996-07-24 00:51:51 +0000117
Guido van Rossum4dc66221996-07-24 00:51:51 +0000118#ifdef ENODEV
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000119 inscode(d, ds, de, "ENODEV", ENODEV, "No such device");
Guido van Rossum4dc66221996-07-24 00:51:51 +0000120#endif
121#ifdef ENOCSI
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000122 inscode(d, ds, de, "ENOCSI", ENOCSI, "No CSI structure available");
Guido van Rossum4dc66221996-07-24 00:51:51 +0000123#endif
124#ifdef EHOSTUNREACH
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000125 inscode(d, ds, de, "EHOSTUNREACH", EHOSTUNREACH, "No route to host");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000126#else
127#ifdef WSAEHOSTUNREACH
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000128 inscode(d, ds, de, "EHOSTUNREACH", WSAEHOSTUNREACH, "No route to host");
Guido van Rossum4dc66221996-07-24 00:51:51 +0000129#endif
Guido van Rossum4dc66221996-07-24 00:51:51 +0000130#endif
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000131#ifdef ENOMSG
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000132 inscode(d, ds, de, "ENOMSG", ENOMSG, "No message of desired type");
Guido van Rossum4dc66221996-07-24 00:51:51 +0000133#endif
134#ifdef EUCLEAN
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000135 inscode(d, ds, de, "EUCLEAN", EUCLEAN, "Structure needs cleaning");
Guido van Rossum4dc66221996-07-24 00:51:51 +0000136#endif
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000137#ifdef EL2NSYNC
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000138 inscode(d, ds, de, "EL2NSYNC", EL2NSYNC, "Level 2 not synchronized");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000139#endif
140#ifdef EL2HLT
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000141 inscode(d, ds, de, "EL2HLT", EL2HLT, "Level 2 halted");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000142#endif
143#ifdef ENODATA
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000144 inscode(d, ds, de, "ENODATA", ENODATA, "No data available");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000145#endif
146#ifdef ENOTBLK
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000147 inscode(d, ds, de, "ENOTBLK", ENOTBLK, "Block device required");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000148#endif
149#ifdef ENOSYS
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000150 inscode(d, ds, de, "ENOSYS", ENOSYS, "Function not implemented");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000151#endif
152#ifdef EPIPE
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000153 inscode(d, ds, de, "EPIPE", EPIPE, "Broken pipe");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000154#endif
155#ifdef EINVAL
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000156 inscode(d, ds, de, "EINVAL", EINVAL, "Invalid argument");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000157#else
158#ifdef WSAEINVAL
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000159 inscode(d, ds, de, "EINVAL", WSAEINVAL, "Invalid argument");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000160#endif
161#endif
162#ifdef EOVERFLOW
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000163 inscode(d, ds, de, "EOVERFLOW", EOVERFLOW, "Value too large for defined data type");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000164#endif
165#ifdef EADV
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000166 inscode(d, ds, de, "EADV", EADV, "Advertise error");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000167#endif
168#ifdef EINTR
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000169 inscode(d, ds, de, "EINTR", EINTR, "Interrupted system call");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000170#else
171#ifdef WSAEINTR
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000172 inscode(d, ds, de, "EINTR", WSAEINTR, "Interrupted system call");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000173#endif
174#endif
175#ifdef EUSERS
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000176 inscode(d, ds, de, "EUSERS", EUSERS, "Too many users");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000177#else
178#ifdef WSAEUSERS
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000179 inscode(d, ds, de, "EUSERS", WSAEUSERS, "Too many users");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000180#endif
181#endif
182#ifdef ENOTEMPTY
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000183 inscode(d, ds, de, "ENOTEMPTY", ENOTEMPTY, "Directory not empty");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000184#else
185#ifdef WSAENOTEMPTY
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000186 inscode(d, ds, de, "ENOTEMPTY", WSAENOTEMPTY, "Directory not empty");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000187#endif
188#endif
189#ifdef ENOBUFS
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000190 inscode(d, ds, de, "ENOBUFS", ENOBUFS, "No buffer space available");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000191#else
192#ifdef WSAENOBUFS
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000193 inscode(d, ds, de, "ENOBUFS", WSAENOBUFS, "No buffer space available");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000194#endif
195#endif
196#ifdef EPROTO
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000197 inscode(d, ds, de, "EPROTO", EPROTO, "Protocol error");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000198#endif
199#ifdef EREMOTE
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000200 inscode(d, ds, de, "EREMOTE", EREMOTE, "Object is remote");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000201#else
202#ifdef WSAEREMOTE
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000203 inscode(d, ds, de, "EREMOTE", WSAEREMOTE, "Object is remote");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000204#endif
Guido van Rossum4dc66221996-07-24 00:51:51 +0000205#endif
206#ifdef ENAVAIL
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000207 inscode(d, ds, de, "ENAVAIL", ENAVAIL, "No XENIX semaphores available");
Guido van Rossum4dc66221996-07-24 00:51:51 +0000208#endif
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000209#ifdef ECHILD
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000210 inscode(d, ds, de, "ECHILD", ECHILD, "No child processes");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000211#endif
212#ifdef ELOOP
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000213 inscode(d, ds, de, "ELOOP", ELOOP, "Too many symbolic links encountered");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000214#else
215#ifdef WSAELOOP
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000216 inscode(d, ds, de, "ELOOP", WSAELOOP, "Too many symbolic links encountered");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000217#endif
218#endif
219#ifdef EXDEV
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000220 inscode(d, ds, de, "EXDEV", EXDEV, "Cross-device link");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000221#endif
222#ifdef E2BIG
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000223 inscode(d, ds, de, "E2BIG", E2BIG, "Arg list too long");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000224#endif
225#ifdef ESRCH
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000226 inscode(d, ds, de, "ESRCH", ESRCH, "No such process");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000227#endif
228#ifdef EMSGSIZE
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000229 inscode(d, ds, de, "EMSGSIZE", EMSGSIZE, "Message too long");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000230#else
231#ifdef WSAEMSGSIZE
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000232 inscode(d, ds, de, "EMSGSIZE", WSAEMSGSIZE, "Message too long");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000233#endif
234#endif
235#ifdef EAFNOSUPPORT
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000236 inscode(d, ds, de, "EAFNOSUPPORT", EAFNOSUPPORT, "Address family not supported by protocol");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000237#else
238#ifdef WSAEAFNOSUPPORT
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000239 inscode(d, ds, de, "EAFNOSUPPORT", WSAEAFNOSUPPORT, "Address family not supported by protocol");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000240#endif
241#endif
242#ifdef EBADR
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000243 inscode(d, ds, de, "EBADR", EBADR, "Invalid request descriptor");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000244#endif
245#ifdef EHOSTDOWN
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000246 inscode(d, ds, de, "EHOSTDOWN", EHOSTDOWN, "Host is down");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000247#else
248#ifdef WSAEHOSTDOWN
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000249 inscode(d, ds, de, "EHOSTDOWN", WSAEHOSTDOWN, "Host is down");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000250#endif
251#endif
252#ifdef EPFNOSUPPORT
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000253 inscode(d, ds, de, "EPFNOSUPPORT", EPFNOSUPPORT, "Protocol family not supported");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000254#else
255#ifdef WSAEPFNOSUPPORT
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000256 inscode(d, ds, de, "EPFNOSUPPORT", WSAEPFNOSUPPORT, "Protocol family not supported");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000257#endif
258#endif
259#ifdef ENOPROTOOPT
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000260 inscode(d, ds, de, "ENOPROTOOPT", ENOPROTOOPT, "Protocol not available");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000261#else
262#ifdef WSAENOPROTOOPT
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000263 inscode(d, ds, de, "ENOPROTOOPT", WSAENOPROTOOPT, "Protocol not available");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000264#endif
265#endif
266#ifdef EBUSY
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000267 inscode(d, ds, de, "EBUSY", EBUSY, "Device or resource busy");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000268#endif
269#ifdef EWOULDBLOCK
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000270 inscode(d, ds, de, "EWOULDBLOCK", EWOULDBLOCK, "Operation would block");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000271#else
272#ifdef WSAEWOULDBLOCK
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000273 inscode(d, ds, de, "EWOULDBLOCK", WSAEWOULDBLOCK, "Operation would block");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000274#endif
275#endif
276#ifdef EBADFD
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000277 inscode(d, ds, de, "EBADFD", EBADFD, "File descriptor in bad state");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000278#endif
279#ifdef EDOTDOT
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000280 inscode(d, ds, de, "EDOTDOT", EDOTDOT, "RFS specific error");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000281#endif
282#ifdef EISCONN
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000283 inscode(d, ds, de, "EISCONN", EISCONN, "Transport endpoint is already connected");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000284#else
285#ifdef WSAEISCONN
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000286 inscode(d, ds, de, "EISCONN", WSAEISCONN, "Transport endpoint is already connected");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000287#endif
288#endif
289#ifdef ENOANO
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000290 inscode(d, ds, de, "ENOANO", ENOANO, "No anode");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000291#endif
292#ifdef ESHUTDOWN
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000293 inscode(d, ds, de, "ESHUTDOWN", ESHUTDOWN, "Cannot send after transport endpoint shutdown");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000294#else
295#ifdef WSAESHUTDOWN
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000296 inscode(d, ds, de, "ESHUTDOWN", WSAESHUTDOWN, "Cannot send after transport endpoint shutdown");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000297#endif
298#endif
299#ifdef ECHRNG
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000300 inscode(d, ds, de, "ECHRNG", ECHRNG, "Channel number out of range");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000301#endif
302#ifdef ELIBBAD
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000303 inscode(d, ds, de, "ELIBBAD", ELIBBAD, "Accessing a corrupted shared library");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000304#endif
305#ifdef ENONET
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000306 inscode(d, ds, de, "ENONET", ENONET, "Machine is not on the network");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000307#endif
308#ifdef EBADE
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000309 inscode(d, ds, de, "EBADE", EBADE, "Invalid exchange");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000310#endif
311#ifdef EBADF
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000312 inscode(d, ds, de, "EBADF", EBADF, "Bad file number");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000313#else
314#ifdef WSAEBADF
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000315 inscode(d, ds, de, "EBADF", WSAEBADF, "Bad file number");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000316#endif
317#endif
318#ifdef EMULTIHOP
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000319 inscode(d, ds, de, "EMULTIHOP", EMULTIHOP, "Multihop attempted");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000320#endif
321#ifdef EIO
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000322 inscode(d, ds, de, "EIO", EIO, "I/O error");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000323#endif
324#ifdef EUNATCH
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000325 inscode(d, ds, de, "EUNATCH", EUNATCH, "Protocol driver not attached");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000326#endif
327#ifdef EPROTOTYPE
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000328 inscode(d, ds, de, "EPROTOTYPE", EPROTOTYPE, "Protocol wrong type for socket");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000329#else
330#ifdef WSAEPROTOTYPE
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000331 inscode(d, ds, de, "EPROTOTYPE", WSAEPROTOTYPE, "Protocol wrong type for socket");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000332#endif
333#endif
334#ifdef ENOSPC
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000335 inscode(d, ds, de, "ENOSPC", ENOSPC, "No space left on device");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000336#endif
337#ifdef ENOEXEC
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000338 inscode(d, ds, de, "ENOEXEC", ENOEXEC, "Exec format error");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000339#endif
340#ifdef EALREADY
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000341 inscode(d, ds, de, "EALREADY", EALREADY, "Operation already in progress");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000342#else
343#ifdef WSAEALREADY
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000344 inscode(d, ds, de, "EALREADY", WSAEALREADY, "Operation already in progress");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000345#endif
346#endif
347#ifdef ENETDOWN
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000348 inscode(d, ds, de, "ENETDOWN", ENETDOWN, "Network is down");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000349#else
350#ifdef WSAENETDOWN
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000351 inscode(d, ds, de, "ENETDOWN", WSAENETDOWN, "Network is down");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000352#endif
353#endif
354#ifdef ENOTNAM
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000355 inscode(d, ds, de, "ENOTNAM", ENOTNAM, "Not a XENIX named type file");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000356#endif
357#ifdef EACCES
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000358 inscode(d, ds, de, "EACCES", EACCES, "Permission denied");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000359#else
360#ifdef WSAEACCES
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000361 inscode(d, ds, de, "EACCES", WSAEACCES, "Permission denied");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000362#endif
363#endif
364#ifdef ELNRNG
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000365 inscode(d, ds, de, "ELNRNG", ELNRNG, "Link number out of range");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000366#endif
367#ifdef EILSEQ
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000368 inscode(d, ds, de, "EILSEQ", EILSEQ, "Illegal byte sequence");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000369#endif
370#ifdef ENOTDIR
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000371 inscode(d, ds, de, "ENOTDIR", ENOTDIR, "Not a directory");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000372#endif
373#ifdef ENOTUNIQ
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000374 inscode(d, ds, de, "ENOTUNIQ", ENOTUNIQ, "Name not unique on network");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000375#endif
376#ifdef EPERM
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000377 inscode(d, ds, de, "EPERM", EPERM, "Operation not permitted");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000378#endif
379#ifdef EDOM
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000380 inscode(d, ds, de, "EDOM", EDOM, "Math argument out of domain of func");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000381#endif
382#ifdef EXFULL
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000383 inscode(d, ds, de, "EXFULL", EXFULL, "Exchange full");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000384#endif
385#ifdef ECONNREFUSED
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000386 inscode(d, ds, de, "ECONNREFUSED", ECONNREFUSED, "Connection refused");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000387#else
388#ifdef WSAECONNREFUSED
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000389 inscode(d, ds, de, "ECONNREFUSED", WSAECONNREFUSED, "Connection refused");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000390#endif
391#endif
392#ifdef EISDIR
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000393 inscode(d, ds, de, "EISDIR", EISDIR, "Is a directory");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000394#endif
395#ifdef EPROTONOSUPPORT
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000396 inscode(d, ds, de, "EPROTONOSUPPORT", EPROTONOSUPPORT, "Protocol not supported");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000397#else
398#ifdef WSAEPROTONOSUPPORT
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000399 inscode(d, ds, de, "EPROTONOSUPPORT", WSAEPROTONOSUPPORT, "Protocol not supported");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000400#endif
401#endif
402#ifdef EROFS
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000403 inscode(d, ds, de, "EROFS", EROFS, "Read-only file system");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000404#endif
405#ifdef EADDRNOTAVAIL
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000406 inscode(d, ds, de, "EADDRNOTAVAIL", EADDRNOTAVAIL, "Cannot assign requested address");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000407#else
408#ifdef WSAEADDRNOTAVAIL
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000409 inscode(d, ds, de, "EADDRNOTAVAIL", WSAEADDRNOTAVAIL, "Cannot assign requested address");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000410#endif
411#endif
412#ifdef EIDRM
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000413 inscode(d, ds, de, "EIDRM", EIDRM, "Identifier removed");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000414#endif
415#ifdef ECOMM
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000416 inscode(d, ds, de, "ECOMM", ECOMM, "Communication error on send");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000417#endif
418#ifdef ESRMNT
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000419 inscode(d, ds, de, "ESRMNT", ESRMNT, "Srmount error");
Guido van Rossum4dc66221996-07-24 00:51:51 +0000420#endif
421#ifdef EREMOTEIO
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000422 inscode(d, ds, de, "EREMOTEIO", EREMOTEIO, "Remote I/O error");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000423#endif
424#ifdef EL3RST
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000425 inscode(d, ds, de, "EL3RST", EL3RST, "Level 3 reset");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000426#endif
427#ifdef EBADMSG
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000428 inscode(d, ds, de, "EBADMSG", EBADMSG, "Not a data message");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000429#endif
430#ifdef ENFILE
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000431 inscode(d, ds, de, "ENFILE", ENFILE, "File table overflow");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000432#endif
433#ifdef ELIBMAX
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000434 inscode(d, ds, de, "ELIBMAX", ELIBMAX, "Attempting to link in too many shared libraries");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000435#endif
436#ifdef ESPIPE
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000437 inscode(d, ds, de, "ESPIPE", ESPIPE, "Illegal seek");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000438#endif
439#ifdef ENOLINK
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000440 inscode(d, ds, de, "ENOLINK", ENOLINK, "Link has been severed");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000441#endif
442#ifdef ENETRESET
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000443 inscode(d, ds, de, "ENETRESET", ENETRESET, "Network dropped connection because of reset");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000444#else
445#ifdef WSAENETRESET
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000446 inscode(d, ds, de, "ENETRESET", WSAENETRESET, "Network dropped connection because of reset");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000447#endif
448#endif
449#ifdef ETIMEDOUT
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000450 inscode(d, ds, de, "ETIMEDOUT", ETIMEDOUT, "Connection timed out");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000451#else
452#ifdef WSAETIMEDOUT
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000453 inscode(d, ds, de, "ETIMEDOUT", WSAETIMEDOUT, "Connection timed out");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000454#endif
455#endif
456#ifdef ENOENT
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000457 inscode(d, ds, de, "ENOENT", ENOENT, "No such file or directory");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000458#endif
459#ifdef EEXIST
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000460 inscode(d, ds, de, "EEXIST", EEXIST, "File exists");
Guido van Rossum4dc66221996-07-24 00:51:51 +0000461#endif
462#ifdef EDQUOT
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000463 inscode(d, ds, de, "EDQUOT", EDQUOT, "Quota exceeded");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000464#else
465#ifdef WSAEDQUOT
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000466 inscode(d, ds, de, "EDQUOT", WSAEDQUOT, "Quota exceeded");
Guido van Rossum4dc66221996-07-24 00:51:51 +0000467#endif
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000468#endif
469#ifdef ENOSTR
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000470 inscode(d, ds, de, "ENOSTR", ENOSTR, "Device not a stream");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000471#endif
472#ifdef EBADSLT
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000473 inscode(d, ds, de, "EBADSLT", EBADSLT, "Invalid slot");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000474#endif
475#ifdef EBADRQC
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000476 inscode(d, ds, de, "EBADRQC", EBADRQC, "Invalid request code");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000477#endif
478#ifdef ELIBACC
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000479 inscode(d, ds, de, "ELIBACC", ELIBACC, "Can not access a needed shared library");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000480#endif
481#ifdef EFAULT
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000482 inscode(d, ds, de, "EFAULT", EFAULT, "Bad address");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000483#else
484#ifdef WSAEFAULT
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000485 inscode(d, ds, de, "EFAULT", WSAEFAULT, "Bad address");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000486#endif
487#endif
488#ifdef EFBIG
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000489 inscode(d, ds, de, "EFBIG", EFBIG, "File too large");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000490#endif
491#ifdef EDEADLK
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000492 inscode(d, ds, de, "EDEADLK", EDEADLK, "Resource deadlock would occur");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000493#endif
494#ifdef ENOTCONN
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000495 inscode(d, ds, de, "ENOTCONN", ENOTCONN, "Transport endpoint is not connected");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000496#else
497#ifdef WSAENOTCONN
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000498 inscode(d, ds, de, "ENOTCONN", WSAENOTCONN, "Transport endpoint is not connected");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000499#endif
500#endif
501#ifdef EDESTADDRREQ
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000502 inscode(d, ds, de, "EDESTADDRREQ", EDESTADDRREQ, "Destination address required");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000503#else
504#ifdef WSAEDESTADDRREQ
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000505 inscode(d, ds, de, "EDESTADDRREQ", WSAEDESTADDRREQ, "Destination address required");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000506#endif
507#endif
508#ifdef ELIBSCN
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000509 inscode(d, ds, de, "ELIBSCN", ELIBSCN, ".lib section in a.out corrupted");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000510#endif
511#ifdef ENOLCK
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000512 inscode(d, ds, de, "ENOLCK", ENOLCK, "No record locks available");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000513#endif
514#ifdef EISNAM
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000515 inscode(d, ds, de, "EISNAM", EISNAM, "Is a named type file");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000516#endif
517#ifdef ECONNABORTED
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000518 inscode(d, ds, de, "ECONNABORTED", ECONNABORTED, "Software caused connection abort");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000519#else
520#ifdef WSAECONNABORTED
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000521 inscode(d, ds, de, "ECONNABORTED", WSAECONNABORTED, "Software caused connection abort");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000522#endif
523#endif
524#ifdef ENETUNREACH
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000525 inscode(d, ds, de, "ENETUNREACH", ENETUNREACH, "Network is unreachable");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000526#else
527#ifdef WSAENETUNREACH
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000528 inscode(d, ds, de, "ENETUNREACH", WSAENETUNREACH, "Network is unreachable");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000529#endif
530#endif
531#ifdef ESTALE
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000532 inscode(d, ds, de, "ESTALE", ESTALE, "Stale NFS file handle");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000533#else
534#ifdef WSAESTALE
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000535 inscode(d, ds, de, "ESTALE", WSAESTALE, "Stale NFS file handle");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000536#endif
537#endif
538#ifdef ENOSR
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000539 inscode(d, ds, de, "ENOSR", ENOSR, "Out of streams resources");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000540#endif
541#ifdef ENOMEM
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000542 inscode(d, ds, de, "ENOMEM", ENOMEM, "Out of memory");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000543#endif
544#ifdef ENOTSOCK
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000545 inscode(d, ds, de, "ENOTSOCK", ENOTSOCK, "Socket operation on non-socket");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000546#else
547#ifdef WSAENOTSOCK
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000548 inscode(d, ds, de, "ENOTSOCK", WSAENOTSOCK, "Socket operation on non-socket");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000549#endif
550#endif
551#ifdef ESTRPIPE
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000552 inscode(d, ds, de, "ESTRPIPE", ESTRPIPE, "Streams pipe error");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000553#endif
554#ifdef EMLINK
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000555 inscode(d, ds, de, "EMLINK", EMLINK, "Too many links");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000556#endif
557#ifdef ERANGE
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000558 inscode(d, ds, de, "ERANGE", ERANGE, "Math result not representable");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000559#endif
560#ifdef ELIBEXEC
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000561 inscode(d, ds, de, "ELIBEXEC", ELIBEXEC, "Cannot exec a shared library directly");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000562#endif
563#ifdef EL3HLT
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000564 inscode(d, ds, de, "EL3HLT", EL3HLT, "Level 3 halted");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000565#endif
566#ifdef ECONNRESET
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000567 inscode(d, ds, de, "ECONNRESET", ECONNRESET, "Connection reset by peer");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000568#else
569#ifdef WSAECONNRESET
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000570 inscode(d, ds, de, "ECONNRESET", WSAECONNRESET, "Connection reset by peer");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000571#endif
572#endif
573#ifdef EADDRINUSE
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000574 inscode(d, ds, de, "EADDRINUSE", EADDRINUSE, "Address already in use");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000575#else
576#ifdef WSAEADDRINUSE
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000577 inscode(d, ds, de, "EADDRINUSE", WSAEADDRINUSE, "Address already in use");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000578#endif
579#endif
580#ifdef EOPNOTSUPP
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000581 inscode(d, ds, de, "EOPNOTSUPP", EOPNOTSUPP, "Operation not supported on transport endpoint");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000582#else
583#ifdef WSAEOPNOTSUPP
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000584 inscode(d, ds, de, "EOPNOTSUPP", WSAEOPNOTSUPP, "Operation not supported on transport endpoint");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000585#endif
586#endif
587#ifdef EREMCHG
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000588 inscode(d, ds, de, "EREMCHG", EREMCHG, "Remote address changed");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000589#endif
590#ifdef EAGAIN
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000591 inscode(d, ds, de, "EAGAIN", EAGAIN, "Try again");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000592#endif
593#ifdef ENAMETOOLONG
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000594 inscode(d, ds, de, "ENAMETOOLONG", ENAMETOOLONG, "File name too long");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000595#else
596#ifdef WSAENAMETOOLONG
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000597 inscode(d, ds, de, "ENAMETOOLONG", WSAENAMETOOLONG, "File name too long");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000598#endif
599#endif
600#ifdef ENOTTY
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000601 inscode(d, ds, de, "ENOTTY", ENOTTY, "Not a typewriter");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000602#endif
603#ifdef ERESTART
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000604 inscode(d, ds, de, "ERESTART", ERESTART, "Interrupted system call should be restarted");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000605#endif
606#ifdef ESOCKTNOSUPPORT
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000607 inscode(d, ds, de, "ESOCKTNOSUPPORT", ESOCKTNOSUPPORT, "Socket type not supported");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000608#else
609#ifdef WSAESOCKTNOSUPPORT
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000610 inscode(d, ds, de, "ESOCKTNOSUPPORT", WSAESOCKTNOSUPPORT, "Socket type not supported");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000611#endif
612#endif
613#ifdef ETIME
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000614 inscode(d, ds, de, "ETIME", ETIME, "Timer expired");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000615#endif
616#ifdef EBFONT
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000617 inscode(d, ds, de, "EBFONT", EBFONT, "Bad font file format");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000618#endif
619#ifdef EDEADLOCK
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000620 inscode(d, ds, de, "EDEADLOCK", EDEADLOCK, "Error EDEADLOCK");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000621#endif
622#ifdef ETOOMANYREFS
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000623 inscode(d, ds, de, "ETOOMANYREFS", ETOOMANYREFS, "Too many references: cannot splice");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000624#else
625#ifdef WSAETOOMANYREFS
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000626 inscode(d, ds, de, "ETOOMANYREFS", WSAETOOMANYREFS, "Too many references: cannot splice");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000627#endif
628#endif
629#ifdef EMFILE
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000630 inscode(d, ds, de, "EMFILE", EMFILE, "Too many open files");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000631#else
632#ifdef WSAEMFILE
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000633 inscode(d, ds, de, "EMFILE", WSAEMFILE, "Too many open files");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000634#endif
635#endif
636#ifdef ETXTBSY
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000637 inscode(d, ds, de, "ETXTBSY", ETXTBSY, "Text file busy");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000638#endif
639#ifdef EINPROGRESS
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000640 inscode(d, ds, de, "EINPROGRESS", EINPROGRESS, "Operation now in progress");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000641#else
642#ifdef WSAEINPROGRESS
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000643 inscode(d, ds, de, "EINPROGRESS", WSAEINPROGRESS, "Operation now in progress");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000644#endif
645#endif
646#ifdef ENXIO
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000647 inscode(d, ds, de, "ENXIO", ENXIO, "No such device or address");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000648#endif
649#ifdef ENOPKG
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000650 inscode(d, ds, de, "ENOPKG", ENOPKG, "Package not installed");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000651#endif
652#ifdef WSASY
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000653 inscode(d, ds, de, "WSASY", WSASY, "Error WSASY");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000654#endif
655#ifdef WSAEHOSTDOWN
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000656 inscode(d, ds, de, "WSAEHOSTDOWN", WSAEHOSTDOWN, "Host is down");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000657#endif
658#ifdef WSAENETDOWN
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000659 inscode(d, ds, de, "WSAENETDOWN", WSAENETDOWN, "Network is down");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000660#endif
661#ifdef WSAENOTSOCK
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000662 inscode(d, ds, de, "WSAENOTSOCK", WSAENOTSOCK, "Socket operation on non-socket");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000663#endif
664#ifdef WSAEHOSTUNREACH
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000665 inscode(d, ds, de, "WSAEHOSTUNREACH", WSAEHOSTUNREACH, "No route to host");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000666#endif
667#ifdef WSAELOOP
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000668 inscode(d, ds, de, "WSAELOOP", WSAELOOP, "Too many symbolic links encountered");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000669#endif
670#ifdef WSAEMFILE
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000671 inscode(d, ds, de, "WSAEMFILE", WSAEMFILE, "Too many open files");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000672#endif
673#ifdef WSAESTALE
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000674 inscode(d, ds, de, "WSAESTALE", WSAESTALE, "Stale NFS file handle");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000675#endif
676#ifdef WSAVERNOTSUPPORTED
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000677 inscode(d, ds, de, "WSAVERNOTSUPPORTED", WSAVERNOTSUPPORTED, "Error WSAVERNOTSUPPORTED");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000678#endif
679#ifdef WSAENETUNREACH
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000680 inscode(d, ds, de, "WSAENETUNREACH", WSAENETUNREACH, "Network is unreachable");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000681#endif
682#ifdef WSAEPROCLIM
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000683 inscode(d, ds, de, "WSAEPROCLIM", WSAEPROCLIM, "Error WSAEPROCLIM");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000684#endif
685#ifdef WSAEFAULT
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000686 inscode(d, ds, de, "WSAEFAULT", WSAEFAULT, "Bad address");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000687#endif
688#ifdef WSANOTINITIALISED
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000689 inscode(d, ds, de, "WSANOTINITIALISED", WSANOTINITIALISED, "Error WSANOTINITIALISED");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000690#endif
691#ifdef WSAEUSERS
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000692 inscode(d, ds, de, "WSAEUSERS", WSAEUSERS, "Too many users");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000693#endif
694#ifdef WSAMAKEASYNCREPL
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000695 inscode(d, ds, de, "WSAMAKEASYNCREPL", WSAMAKEASYNCREPL, "Error WSAMAKEASYNCREPL");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000696#endif
697#ifdef WSAENOPROTOOPT
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000698 inscode(d, ds, de, "WSAENOPROTOOPT", WSAENOPROTOOPT, "Protocol not available");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000699#endif
700#ifdef WSAECONNABORTED
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000701 inscode(d, ds, de, "WSAECONNABORTED", WSAECONNABORTED, "Software caused connection abort");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000702#endif
703#ifdef WSAENAMETOOLONG
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000704 inscode(d, ds, de, "WSAENAMETOOLONG", WSAENAMETOOLONG, "File name too long");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000705#endif
706#ifdef WSAENOTEMPTY
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000707 inscode(d, ds, de, "WSAENOTEMPTY", WSAENOTEMPTY, "Directory not empty");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000708#endif
709#ifdef WSAESHUTDOWN
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000710 inscode(d, ds, de, "WSAESHUTDOWN", WSAESHUTDOWN, "Cannot send after transport endpoint shutdown");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000711#endif
712#ifdef WSAEAFNOSUPPORT
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000713 inscode(d, ds, de, "WSAEAFNOSUPPORT", WSAEAFNOSUPPORT, "Address family not supported by protocol");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000714#endif
715#ifdef WSAETOOMANYREFS
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000716 inscode(d, ds, de, "WSAETOOMANYREFS", WSAETOOMANYREFS, "Too many references: cannot splice");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000717#endif
718#ifdef WSAEACCES
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000719 inscode(d, ds, de, "WSAEACCES", WSAEACCES, "Permission denied");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000720#endif
721#ifdef WSATR
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000722 inscode(d, ds, de, "WSATR", WSATR, "Error WSATR");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000723#endif
724#ifdef WSABASEERR
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000725 inscode(d, ds, de, "WSABASEERR", WSABASEERR, "Error WSABASEERR");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000726#endif
727#ifdef WSADESCRIPTIO
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000728 inscode(d, ds, de, "WSADESCRIPTIO", WSADESCRIPTIO, "Error WSADESCRIPTIO");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000729#endif
730#ifdef WSAEMSGSIZE
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000731 inscode(d, ds, de, "WSAEMSGSIZE", WSAEMSGSIZE, "Message too long");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000732#endif
733#ifdef WSAEBADF
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000734 inscode(d, ds, de, "WSAEBADF", WSAEBADF, "Bad file number");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000735#endif
736#ifdef WSAECONNRESET
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000737 inscode(d, ds, de, "WSAECONNRESET", WSAECONNRESET, "Connection reset by peer");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000738#endif
739#ifdef WSAGETSELECTERRO
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000740 inscode(d, ds, de, "WSAGETSELECTERRO", WSAGETSELECTERRO, "Error WSAGETSELECTERRO");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000741#endif
742#ifdef WSAETIMEDOUT
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000743 inscode(d, ds, de, "WSAETIMEDOUT", WSAETIMEDOUT, "Connection timed out");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000744#endif
745#ifdef WSAENOBUFS
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000746 inscode(d, ds, de, "WSAENOBUFS", WSAENOBUFS, "No buffer space available");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000747#endif
748#ifdef WSAEDISCON
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000749 inscode(d, ds, de, "WSAEDISCON", WSAEDISCON, "Error WSAEDISCON");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000750#endif
751#ifdef WSAEINTR
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000752 inscode(d, ds, de, "WSAEINTR", WSAEINTR, "Interrupted system call");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000753#endif
754#ifdef WSAEPROTOTYPE
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000755 inscode(d, ds, de, "WSAEPROTOTYPE", WSAEPROTOTYPE, "Protocol wrong type for socket");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000756#endif
757#ifdef WSAHOS
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000758 inscode(d, ds, de, "WSAHOS", WSAHOS, "Error WSAHOS");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000759#endif
760#ifdef WSAEADDRINUSE
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000761 inscode(d, ds, de, "WSAEADDRINUSE", WSAEADDRINUSE, "Address already in use");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000762#endif
763#ifdef WSAEADDRNOTAVAIL
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000764 inscode(d, ds, de, "WSAEADDRNOTAVAIL", WSAEADDRNOTAVAIL, "Cannot assign requested address");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000765#endif
766#ifdef WSAEALREADY
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000767 inscode(d, ds, de, "WSAEALREADY", WSAEALREADY, "Operation already in progress");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000768#endif
769#ifdef WSAEPROTONOSUPPORT
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000770 inscode(d, ds, de, "WSAEPROTONOSUPPORT", WSAEPROTONOSUPPORT, "Protocol not supported");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000771#endif
772#ifdef WSASYSNOTREADY
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000773 inscode(d, ds, de, "WSASYSNOTREADY", WSASYSNOTREADY, "Error WSASYSNOTREADY");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000774#endif
775#ifdef WSAEWOULDBLOCK
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000776 inscode(d, ds, de, "WSAEWOULDBLOCK", WSAEWOULDBLOCK, "Operation would block");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000777#endif
778#ifdef WSAEPFNOSUPPORT
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000779 inscode(d, ds, de, "WSAEPFNOSUPPORT", WSAEPFNOSUPPORT, "Protocol family not supported");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000780#endif
781#ifdef WSAEOPNOTSUPP
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000782 inscode(d, ds, de, "WSAEOPNOTSUPP", WSAEOPNOTSUPP, "Operation not supported on transport endpoint");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000783#endif
784#ifdef WSAEISCONN
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000785 inscode(d, ds, de, "WSAEISCONN", WSAEISCONN, "Transport endpoint is already connected");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000786#endif
787#ifdef WSAEDQUOT
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000788 inscode(d, ds, de, "WSAEDQUOT", WSAEDQUOT, "Quota exceeded");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000789#endif
790#ifdef WSAENOTCONN
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000791 inscode(d, ds, de, "WSAENOTCONN", WSAENOTCONN, "Transport endpoint is not connected");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000792#endif
793#ifdef WSAEREMOTE
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000794 inscode(d, ds, de, "WSAEREMOTE", WSAEREMOTE, "Object is remote");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000795#endif
796#ifdef WSAEINVAL
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000797 inscode(d, ds, de, "WSAEINVAL", WSAEINVAL, "Invalid argument");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000798#endif
799#ifdef WSAEINPROGRESS
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000800 inscode(d, ds, de, "WSAEINPROGRESS", WSAEINPROGRESS, "Operation now in progress");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000801#endif
802#ifdef WSAGETSELECTEVEN
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000803 inscode(d, ds, de, "WSAGETSELECTEVEN", WSAGETSELECTEVEN, "Error WSAGETSELECTEVEN");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000804#endif
805#ifdef WSAESOCKTNOSUPPORT
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000806 inscode(d, ds, de, "WSAESOCKTNOSUPPORT", WSAESOCKTNOSUPPORT, "Socket type not supported");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000807#endif
808#ifdef WSAGETASYNCERRO
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000809 inscode(d, ds, de, "WSAGETASYNCERRO", WSAGETASYNCERRO, "Error WSAGETASYNCERRO");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000810#endif
811#ifdef WSAMAKESELECTREPL
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000812 inscode(d, ds, de, "WSAMAKESELECTREPL", WSAMAKESELECTREPL, "Error WSAMAKESELECTREPL");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000813#endif
814#ifdef WSAGETASYNCBUFLE
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000815 inscode(d, ds, de, "WSAGETASYNCBUFLE", WSAGETASYNCBUFLE, "Error WSAGETASYNCBUFLE");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000816#endif
817#ifdef WSAEDESTADDRREQ
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000818 inscode(d, ds, de, "WSAEDESTADDRREQ", WSAEDESTADDRREQ, "Destination address required");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000819#endif
820#ifdef WSAECONNREFUSED
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000821 inscode(d, ds, de, "WSAECONNREFUSED", WSAECONNREFUSED, "Connection refused");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000822#endif
823#ifdef WSAENETRESET
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000824 inscode(d, ds, de, "WSAENETRESET", WSAENETRESET, "Network dropped connection because of reset");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000825#endif
826#ifdef WSAN
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000827 inscode(d, ds, de, "WSAN", WSAN, "Error WSAN");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000828#endif
Barry Warsaw31c604d2010-09-22 20:58:04 +0000829#ifdef ENOMEDIUM
830 inscode(d, ds, de, "ENOMEDIUM", ENOMEDIUM, "No medium found");
831#endif
832#ifdef EMEDIUMTYPE
833 inscode(d, ds, de, "EMEDIUMTYPE", EMEDIUMTYPE, "Wrong medium type");
834#endif
835#ifdef ECANCELED
836 inscode(d, ds, de, "ECANCELED", ECANCELED, "Operation Canceled");
837#endif
838#ifdef ENOKEY
839 inscode(d, ds, de, "ENOKEY", ENOKEY, "Required key not available");
840#endif
841#ifdef EKEYEXPIRED
842 inscode(d, ds, de, "EKEYEXPIRED", EKEYEXPIRED, "Key has expired");
843#endif
844#ifdef EKEYREVOKED
845 inscode(d, ds, de, "EKEYREVOKED", EKEYREVOKED, "Key has been revoked");
846#endif
847#ifdef EKEYREJECTED
848 inscode(d, ds, de, "EKEYREJECTED", EKEYREJECTED, "Key was rejected by service");
849#endif
850#ifdef EOWNERDEAD
851 inscode(d, ds, de, "EOWNERDEAD", EOWNERDEAD, "Owner died");
852#endif
853#ifdef ENOTRECOVERABLE
854 inscode(d, ds, de, "ENOTRECOVERABLE", ENOTRECOVERABLE, "State not recoverable");
855#endif
856#ifdef ERFKILL
857 inscode(d, ds, de, "ERFKILL", ERFKILL, "Operation not possible due to RF-kill");
858#endif
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000859
Antoine Pitroub85e1652010-08-18 21:05:19 +0000860 /* Solaris-specific errnos */
861#ifdef ECANCELED
862 inscode(d, ds, de, "ECANCELED", ECANCELED, "Operation canceled");
863#endif
864#ifdef ENOTSUP
865 inscode(d, ds, de, "ENOTSUP", ENOTSUP, "Operation not supported");
866#endif
867#ifdef EOWNERDEAD
868 inscode(d, ds, de, "EOWNERDEAD", EOWNERDEAD, "Process died with the lock");
869#endif
870#ifdef ENOTRECOVERABLE
871 inscode(d, ds, de, "ENOTRECOVERABLE", ENOTRECOVERABLE, "Lock is not recoverable");
872#endif
873#ifdef ELOCKUNMAPPED
874 inscode(d, ds, de, "ELOCKUNMAPPED", ELOCKUNMAPPED, "Locked lock was unmapped");
875#endif
876#ifdef ENOTACTIVE
877 inscode(d, ds, de, "ENOTACTIVE", ENOTACTIVE, "Facility is not active");
878#endif
879
Ronald Oussoren97c3eb42011-05-07 09:59:03 +0200880 /* MacOSX specific errnos */
881#ifdef EAUTH
882 inscode(d, ds, de, "EAUTH", EAUTH, "Authentication error");
883#endif
884#ifdef EBADARCH
885 inscode(d, ds, de, "EBADARCH", EBADARCH, "Bad CPU type in executable");
886#endif
887#ifdef EBADEXEC
888 inscode(d, ds, de, "EBADEXEC", EBADEXEC, "Bad executable (or shared library)");
889#endif
890#ifdef EBADMACHO
891 inscode(d, ds, de, "EBADMACHO", EBADMACHO, "Malformed Mach-o file");
892#endif
893#ifdef EBADRPC
894 inscode(d, ds, de, "EBADRPC", EBADRPC, "RPC struct is bad");
895#endif
896#ifdef EDEVERR
897 inscode(d, ds, de, "EDEVERR", EDEVERR, "Device error");
898#endif
899#ifdef EFTYPE
900 inscode(d, ds, de, "EFTYPE", EFTYPE, "Inappropriate file type or format");
901#endif
902#ifdef ENEEDAUTH
903 inscode(d, ds, de, "ENEEDAUTH", ENEEDAUTH, "Need authenticator");
904#endif
905#ifdef ENOATTR
906 inscode(d, ds, de, "ENOATTR", ENOATTR, "Attribute not found");
907#endif
908#ifdef ENOPOLICY
909 inscode(d, ds, de, "ENOPOLICY", ENOPOLICY, "Policy not found");
910#endif
911#ifdef EPROCLIM
912 inscode(d, ds, de, "EPROCLIM", EPROCLIM, "Too many processes");
913#endif
914#ifdef EPROCUNAVAIL
915 inscode(d, ds, de, "EPROCUNAVAIL", EPROCUNAVAIL, "Bad procedure for program");
916#endif
917#ifdef EPROGMISMATCH
918 inscode(d, ds, de, "EPROGMISMATCH", EPROGMISMATCH, "Program version wrong");
919#endif
920#ifdef EPROGUNAVAIL
921 inscode(d, ds, de, "EPROGUNAVAIL", EPROGUNAVAIL, "RPC prog. not avail");
922#endif
923#ifdef EPWROFF
924 inscode(d, ds, de, "EPWROFF", EPWROFF, "Device power is off");
925#endif
926#ifdef ERPCMISMATCH
927 inscode(d, ds, de, "ERPCMISMATCH", ERPCMISMATCH, "RPC version wrong");
928#endif
929#ifdef ESHLIBVERS
930 inscode(d, ds, de, "ESHLIBVERS", ESHLIBVERS, "Shared library version mismatch");
931#endif
932
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000933 Py_DECREF(de);
934 return m;
Guido van Rossum4dc66221996-07-24 00:51:51 +0000935}