blob: 86720af49d53aa0917a275d8c97c6119afb068c9 [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>
Guido van Rossum49f9d8e1997-09-28 05:41:56 +000010#endif
11
Guido van Rossum4dc66221996-07-24 00:51:51 +000012/*
13 * Pull in the system error definitions
Antoine Pitrouf95a1b32010-05-09 15:52:27 +000014 */
Guido van Rossum4dc66221996-07-24 00:51:51 +000015
Guido van Rossum4dc66221996-07-24 00:51:51 +000016static PyMethodDef errno_methods[] = {
Antoine Pitrouf95a1b32010-05-09 15:52:27 +000017 {NULL, NULL}
Guido van Rossum4dc66221996-07-24 00:51:51 +000018};
19
Guido van Rossum49f9d8e1997-09-28 05:41:56 +000020/* Helper function doing the dictionary inserting */
Guido van Rossum4dc66221996-07-24 00:51:51 +000021
22static void
Neal Norwitz0d942032007-08-24 00:10:00 +000023_inscode(PyObject *d, PyObject *de, const char *name, int code)
Guido van Rossum4dc66221996-07-24 00:51:51 +000024{
Antoine Pitrouf95a1b32010-05-09 15:52:27 +000025 PyObject *u = PyUnicode_FromString(name);
26 PyObject *v = PyLong_FromLong((long) code);
Guido van Rossum49f9d8e1997-09-28 05:41:56 +000027
Antoine Pitrouf95a1b32010-05-09 15:52:27 +000028 /* Don't bother checking for errors; they'll be caught at the end
29 * of the module initialization function by the caller of
30 * initerrno().
31 */
32 if (u && v) {
33 /* insert in modules dict */
34 PyDict_SetItem(d, u, v);
35 /* insert in errorcode dict */
36 PyDict_SetItem(de, v, u);
37 }
38 Py_XDECREF(u);
39 Py_XDECREF(v);
Guido van Rossum4dc66221996-07-24 00:51:51 +000040}
41
Martin v. Löwis14f8b4c2002-06-13 20:33:02 +000042PyDoc_STRVAR(errno__doc__,
Guido van Rossum549cb6e1998-08-11 17:50:22 +000043"This module makes available standard errno system symbols.\n\
44\n\
45The value of each symbol is the corresponding integer value,\n\
46e.g., on most systems, errno.ENOENT equals the integer 2.\n\
47\n\
48The dictionary errno.errorcode maps numeric codes to symbol names,\n\
49e.g., errno.errorcode[2] could be the string 'ENOENT'.\n\
50\n\
51Symbols that are not relevant to the underlying system are not defined.\n\
52\n\
53To map error codes to error messages, use the function os.strerror(),\n\
Martin v. Löwis14f8b4c2002-06-13 20:33:02 +000054e.g. os.strerror(2) could return 'No such file or directory'.");
Guido van Rossum549cb6e1998-08-11 17:50:22 +000055
Martin v. Löwis1a214512008-06-11 05:26:20 +000056static struct PyModuleDef errnomodule = {
Antoine Pitrouf95a1b32010-05-09 15:52:27 +000057 PyModuleDef_HEAD_INIT,
58 "errno",
59 errno__doc__,
60 -1,
61 errno_methods,
62 NULL,
63 NULL,
64 NULL,
65 NULL
Martin v. Löwis1a214512008-06-11 05:26:20 +000066};
67
Mark Hammondfe51c6d2002-08-02 02:27:13 +000068PyMODINIT_FUNC
Martin v. Löwis1a214512008-06-11 05:26:20 +000069PyInit_errno(void)
Guido van Rossum4dc66221996-07-24 00:51:51 +000070{
Antoine Pitrouf95a1b32010-05-09 15:52:27 +000071 PyObject *m, *d, *de;
72 m = PyModule_Create(&errnomodule);
73 if (m == NULL)
74 return NULL;
75 d = PyModule_GetDict(m);
76 de = PyDict_New();
77 if (!d || !de || PyDict_SetItemString(d, "errorcode", de) < 0)
78 return NULL;
Guido van Rossum4dc66221996-07-24 00:51:51 +000079
Guido van Rossum851e7d51997-11-04 20:22:24 +000080/* Macro so I don't have to edit each and every line below... */
81#define inscode(d, ds, de, name, code, comment) _inscode(d, de, name, code)
82
Antoine Pitrouf95a1b32010-05-09 15:52:27 +000083 /*
84 * The names and comments are borrowed from linux/include/errno.h,
Antoine Pitroub85e1652010-08-18 21:05:19 +000085 * which should be pretty all-inclusive. However, the Solaris specific
86 * names and comments are borrowed from sys/errno.h in Solaris.
Antoine Pitrouf95a1b32010-05-09 15:52:27 +000087 */
Guido van Rossum4dc66221996-07-24 00:51:51 +000088
Guido van Rossum4dc66221996-07-24 00:51:51 +000089#ifdef ENODEV
Antoine Pitrouf95a1b32010-05-09 15:52:27 +000090 inscode(d, ds, de, "ENODEV", ENODEV, "No such device");
Guido van Rossum4dc66221996-07-24 00:51:51 +000091#endif
92#ifdef ENOCSI
Antoine Pitrouf95a1b32010-05-09 15:52:27 +000093 inscode(d, ds, de, "ENOCSI", ENOCSI, "No CSI structure available");
Guido van Rossum4dc66221996-07-24 00:51:51 +000094#endif
95#ifdef EHOSTUNREACH
Antoine Pitrouf95a1b32010-05-09 15:52:27 +000096 inscode(d, ds, de, "EHOSTUNREACH", EHOSTUNREACH, "No route to host");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +000097#else
98#ifdef WSAEHOSTUNREACH
Antoine Pitrouf95a1b32010-05-09 15:52:27 +000099 inscode(d, ds, de, "EHOSTUNREACH", WSAEHOSTUNREACH, "No route to host");
Guido van Rossum4dc66221996-07-24 00:51:51 +0000100#endif
Guido van Rossum4dc66221996-07-24 00:51:51 +0000101#endif
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000102#ifdef ENOMSG
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000103 inscode(d, ds, de, "ENOMSG", ENOMSG, "No message of desired type");
Guido van Rossum4dc66221996-07-24 00:51:51 +0000104#endif
105#ifdef EUCLEAN
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000106 inscode(d, ds, de, "EUCLEAN", EUCLEAN, "Structure needs cleaning");
Guido van Rossum4dc66221996-07-24 00:51:51 +0000107#endif
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000108#ifdef EL2NSYNC
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000109 inscode(d, ds, de, "EL2NSYNC", EL2NSYNC, "Level 2 not synchronized");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000110#endif
111#ifdef EL2HLT
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000112 inscode(d, ds, de, "EL2HLT", EL2HLT, "Level 2 halted");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000113#endif
114#ifdef ENODATA
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000115 inscode(d, ds, de, "ENODATA", ENODATA, "No data available");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000116#endif
117#ifdef ENOTBLK
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000118 inscode(d, ds, de, "ENOTBLK", ENOTBLK, "Block device required");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000119#endif
120#ifdef ENOSYS
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000121 inscode(d, ds, de, "ENOSYS", ENOSYS, "Function not implemented");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000122#endif
123#ifdef EPIPE
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000124 inscode(d, ds, de, "EPIPE", EPIPE, "Broken pipe");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000125#endif
126#ifdef EINVAL
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000127 inscode(d, ds, de, "EINVAL", EINVAL, "Invalid argument");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000128#else
129#ifdef WSAEINVAL
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000130 inscode(d, ds, de, "EINVAL", WSAEINVAL, "Invalid argument");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000131#endif
132#endif
133#ifdef EOVERFLOW
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000134 inscode(d, ds, de, "EOVERFLOW", EOVERFLOW, "Value too large for defined data type");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000135#endif
136#ifdef EADV
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000137 inscode(d, ds, de, "EADV", EADV, "Advertise error");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000138#endif
139#ifdef EINTR
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000140 inscode(d, ds, de, "EINTR", EINTR, "Interrupted system call");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000141#else
142#ifdef WSAEINTR
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000143 inscode(d, ds, de, "EINTR", WSAEINTR, "Interrupted system call");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000144#endif
145#endif
146#ifdef EUSERS
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000147 inscode(d, ds, de, "EUSERS", EUSERS, "Too many users");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000148#else
149#ifdef WSAEUSERS
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000150 inscode(d, ds, de, "EUSERS", WSAEUSERS, "Too many users");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000151#endif
152#endif
153#ifdef ENOTEMPTY
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000154 inscode(d, ds, de, "ENOTEMPTY", ENOTEMPTY, "Directory not empty");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000155#else
156#ifdef WSAENOTEMPTY
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000157 inscode(d, ds, de, "ENOTEMPTY", WSAENOTEMPTY, "Directory not empty");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000158#endif
159#endif
160#ifdef ENOBUFS
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000161 inscode(d, ds, de, "ENOBUFS", ENOBUFS, "No buffer space available");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000162#else
163#ifdef WSAENOBUFS
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000164 inscode(d, ds, de, "ENOBUFS", WSAENOBUFS, "No buffer space available");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000165#endif
166#endif
167#ifdef EPROTO
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000168 inscode(d, ds, de, "EPROTO", EPROTO, "Protocol error");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000169#endif
170#ifdef EREMOTE
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000171 inscode(d, ds, de, "EREMOTE", EREMOTE, "Object is remote");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000172#else
173#ifdef WSAEREMOTE
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000174 inscode(d, ds, de, "EREMOTE", WSAEREMOTE, "Object is remote");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000175#endif
Guido van Rossum4dc66221996-07-24 00:51:51 +0000176#endif
177#ifdef ENAVAIL
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000178 inscode(d, ds, de, "ENAVAIL", ENAVAIL, "No XENIX semaphores available");
Guido van Rossum4dc66221996-07-24 00:51:51 +0000179#endif
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000180#ifdef ECHILD
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000181 inscode(d, ds, de, "ECHILD", ECHILD, "No child processes");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000182#endif
183#ifdef ELOOP
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000184 inscode(d, ds, de, "ELOOP", ELOOP, "Too many symbolic links encountered");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000185#else
186#ifdef WSAELOOP
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000187 inscode(d, ds, de, "ELOOP", WSAELOOP, "Too many symbolic links encountered");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000188#endif
189#endif
190#ifdef EXDEV
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000191 inscode(d, ds, de, "EXDEV", EXDEV, "Cross-device link");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000192#endif
193#ifdef E2BIG
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000194 inscode(d, ds, de, "E2BIG", E2BIG, "Arg list too long");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000195#endif
196#ifdef ESRCH
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000197 inscode(d, ds, de, "ESRCH", ESRCH, "No such process");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000198#endif
199#ifdef EMSGSIZE
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000200 inscode(d, ds, de, "EMSGSIZE", EMSGSIZE, "Message too long");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000201#else
202#ifdef WSAEMSGSIZE
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000203 inscode(d, ds, de, "EMSGSIZE", WSAEMSGSIZE, "Message too long");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000204#endif
205#endif
206#ifdef EAFNOSUPPORT
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000207 inscode(d, ds, de, "EAFNOSUPPORT", EAFNOSUPPORT, "Address family not supported by protocol");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000208#else
209#ifdef WSAEAFNOSUPPORT
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000210 inscode(d, ds, de, "EAFNOSUPPORT", WSAEAFNOSUPPORT, "Address family not supported by protocol");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000211#endif
212#endif
213#ifdef EBADR
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000214 inscode(d, ds, de, "EBADR", EBADR, "Invalid request descriptor");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000215#endif
216#ifdef EHOSTDOWN
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000217 inscode(d, ds, de, "EHOSTDOWN", EHOSTDOWN, "Host is down");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000218#else
219#ifdef WSAEHOSTDOWN
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000220 inscode(d, ds, de, "EHOSTDOWN", WSAEHOSTDOWN, "Host is down");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000221#endif
222#endif
223#ifdef EPFNOSUPPORT
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000224 inscode(d, ds, de, "EPFNOSUPPORT", EPFNOSUPPORT, "Protocol family not supported");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000225#else
226#ifdef WSAEPFNOSUPPORT
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000227 inscode(d, ds, de, "EPFNOSUPPORT", WSAEPFNOSUPPORT, "Protocol family not supported");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000228#endif
229#endif
230#ifdef ENOPROTOOPT
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000231 inscode(d, ds, de, "ENOPROTOOPT", ENOPROTOOPT, "Protocol not available");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000232#else
233#ifdef WSAENOPROTOOPT
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000234 inscode(d, ds, de, "ENOPROTOOPT", WSAENOPROTOOPT, "Protocol not available");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000235#endif
236#endif
237#ifdef EBUSY
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000238 inscode(d, ds, de, "EBUSY", EBUSY, "Device or resource busy");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000239#endif
240#ifdef EWOULDBLOCK
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000241 inscode(d, ds, de, "EWOULDBLOCK", EWOULDBLOCK, "Operation would block");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000242#else
243#ifdef WSAEWOULDBLOCK
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000244 inscode(d, ds, de, "EWOULDBLOCK", WSAEWOULDBLOCK, "Operation would block");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000245#endif
246#endif
247#ifdef EBADFD
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000248 inscode(d, ds, de, "EBADFD", EBADFD, "File descriptor in bad state");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000249#endif
250#ifdef EDOTDOT
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000251 inscode(d, ds, de, "EDOTDOT", EDOTDOT, "RFS specific error");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000252#endif
253#ifdef EISCONN
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000254 inscode(d, ds, de, "EISCONN", EISCONN, "Transport endpoint is already connected");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000255#else
256#ifdef WSAEISCONN
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000257 inscode(d, ds, de, "EISCONN", WSAEISCONN, "Transport endpoint is already connected");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000258#endif
259#endif
260#ifdef ENOANO
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000261 inscode(d, ds, de, "ENOANO", ENOANO, "No anode");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000262#endif
263#ifdef ESHUTDOWN
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000264 inscode(d, ds, de, "ESHUTDOWN", ESHUTDOWN, "Cannot send after transport endpoint shutdown");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000265#else
266#ifdef WSAESHUTDOWN
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000267 inscode(d, ds, de, "ESHUTDOWN", WSAESHUTDOWN, "Cannot send after transport endpoint shutdown");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000268#endif
269#endif
270#ifdef ECHRNG
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000271 inscode(d, ds, de, "ECHRNG", ECHRNG, "Channel number out of range");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000272#endif
273#ifdef ELIBBAD
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000274 inscode(d, ds, de, "ELIBBAD", ELIBBAD, "Accessing a corrupted shared library");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000275#endif
276#ifdef ENONET
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000277 inscode(d, ds, de, "ENONET", ENONET, "Machine is not on the network");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000278#endif
279#ifdef EBADE
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000280 inscode(d, ds, de, "EBADE", EBADE, "Invalid exchange");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000281#endif
282#ifdef EBADF
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000283 inscode(d, ds, de, "EBADF", EBADF, "Bad file number");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000284#else
285#ifdef WSAEBADF
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000286 inscode(d, ds, de, "EBADF", WSAEBADF, "Bad file number");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000287#endif
288#endif
289#ifdef EMULTIHOP
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000290 inscode(d, ds, de, "EMULTIHOP", EMULTIHOP, "Multihop attempted");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000291#endif
292#ifdef EIO
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000293 inscode(d, ds, de, "EIO", EIO, "I/O error");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000294#endif
295#ifdef EUNATCH
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000296 inscode(d, ds, de, "EUNATCH", EUNATCH, "Protocol driver not attached");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000297#endif
298#ifdef EPROTOTYPE
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000299 inscode(d, ds, de, "EPROTOTYPE", EPROTOTYPE, "Protocol wrong type for socket");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000300#else
301#ifdef WSAEPROTOTYPE
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000302 inscode(d, ds, de, "EPROTOTYPE", WSAEPROTOTYPE, "Protocol wrong type for socket");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000303#endif
304#endif
305#ifdef ENOSPC
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000306 inscode(d, ds, de, "ENOSPC", ENOSPC, "No space left on device");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000307#endif
308#ifdef ENOEXEC
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000309 inscode(d, ds, de, "ENOEXEC", ENOEXEC, "Exec format error");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000310#endif
311#ifdef EALREADY
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000312 inscode(d, ds, de, "EALREADY", EALREADY, "Operation already in progress");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000313#else
314#ifdef WSAEALREADY
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000315 inscode(d, ds, de, "EALREADY", WSAEALREADY, "Operation already in progress");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000316#endif
317#endif
318#ifdef ENETDOWN
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000319 inscode(d, ds, de, "ENETDOWN", ENETDOWN, "Network is down");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000320#else
321#ifdef WSAENETDOWN
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000322 inscode(d, ds, de, "ENETDOWN", WSAENETDOWN, "Network is down");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000323#endif
324#endif
325#ifdef ENOTNAM
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000326 inscode(d, ds, de, "ENOTNAM", ENOTNAM, "Not a XENIX named type file");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000327#endif
328#ifdef EACCES
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000329 inscode(d, ds, de, "EACCES", EACCES, "Permission denied");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000330#else
331#ifdef WSAEACCES
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000332 inscode(d, ds, de, "EACCES", WSAEACCES, "Permission denied");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000333#endif
334#endif
335#ifdef ELNRNG
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000336 inscode(d, ds, de, "ELNRNG", ELNRNG, "Link number out of range");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000337#endif
338#ifdef EILSEQ
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000339 inscode(d, ds, de, "EILSEQ", EILSEQ, "Illegal byte sequence");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000340#endif
341#ifdef ENOTDIR
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000342 inscode(d, ds, de, "ENOTDIR", ENOTDIR, "Not a directory");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000343#endif
344#ifdef ENOTUNIQ
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000345 inscode(d, ds, de, "ENOTUNIQ", ENOTUNIQ, "Name not unique on network");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000346#endif
347#ifdef EPERM
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000348 inscode(d, ds, de, "EPERM", EPERM, "Operation not permitted");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000349#endif
350#ifdef EDOM
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000351 inscode(d, ds, de, "EDOM", EDOM, "Math argument out of domain of func");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000352#endif
353#ifdef EXFULL
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000354 inscode(d, ds, de, "EXFULL", EXFULL, "Exchange full");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000355#endif
356#ifdef ECONNREFUSED
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000357 inscode(d, ds, de, "ECONNREFUSED", ECONNREFUSED, "Connection refused");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000358#else
359#ifdef WSAECONNREFUSED
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000360 inscode(d, ds, de, "ECONNREFUSED", WSAECONNREFUSED, "Connection refused");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000361#endif
362#endif
363#ifdef EISDIR
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000364 inscode(d, ds, de, "EISDIR", EISDIR, "Is a directory");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000365#endif
366#ifdef EPROTONOSUPPORT
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000367 inscode(d, ds, de, "EPROTONOSUPPORT", EPROTONOSUPPORT, "Protocol not supported");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000368#else
369#ifdef WSAEPROTONOSUPPORT
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000370 inscode(d, ds, de, "EPROTONOSUPPORT", WSAEPROTONOSUPPORT, "Protocol not supported");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000371#endif
372#endif
373#ifdef EROFS
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000374 inscode(d, ds, de, "EROFS", EROFS, "Read-only file system");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000375#endif
376#ifdef EADDRNOTAVAIL
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000377 inscode(d, ds, de, "EADDRNOTAVAIL", EADDRNOTAVAIL, "Cannot assign requested address");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000378#else
379#ifdef WSAEADDRNOTAVAIL
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000380 inscode(d, ds, de, "EADDRNOTAVAIL", WSAEADDRNOTAVAIL, "Cannot assign requested address");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000381#endif
382#endif
383#ifdef EIDRM
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000384 inscode(d, ds, de, "EIDRM", EIDRM, "Identifier removed");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000385#endif
386#ifdef ECOMM
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000387 inscode(d, ds, de, "ECOMM", ECOMM, "Communication error on send");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000388#endif
389#ifdef ESRMNT
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000390 inscode(d, ds, de, "ESRMNT", ESRMNT, "Srmount error");
Guido van Rossum4dc66221996-07-24 00:51:51 +0000391#endif
392#ifdef EREMOTEIO
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000393 inscode(d, ds, de, "EREMOTEIO", EREMOTEIO, "Remote I/O error");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000394#endif
395#ifdef EL3RST
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000396 inscode(d, ds, de, "EL3RST", EL3RST, "Level 3 reset");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000397#endif
398#ifdef EBADMSG
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000399 inscode(d, ds, de, "EBADMSG", EBADMSG, "Not a data message");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000400#endif
401#ifdef ENFILE
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000402 inscode(d, ds, de, "ENFILE", ENFILE, "File table overflow");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000403#endif
404#ifdef ELIBMAX
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000405 inscode(d, ds, de, "ELIBMAX", ELIBMAX, "Attempting to link in too many shared libraries");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000406#endif
407#ifdef ESPIPE
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000408 inscode(d, ds, de, "ESPIPE", ESPIPE, "Illegal seek");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000409#endif
410#ifdef ENOLINK
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000411 inscode(d, ds, de, "ENOLINK", ENOLINK, "Link has been severed");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000412#endif
413#ifdef ENETRESET
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000414 inscode(d, ds, de, "ENETRESET", ENETRESET, "Network dropped connection because of reset");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000415#else
416#ifdef WSAENETRESET
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000417 inscode(d, ds, de, "ENETRESET", WSAENETRESET, "Network dropped connection because of reset");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000418#endif
419#endif
420#ifdef ETIMEDOUT
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000421 inscode(d, ds, de, "ETIMEDOUT", ETIMEDOUT, "Connection timed out");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000422#else
423#ifdef WSAETIMEDOUT
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000424 inscode(d, ds, de, "ETIMEDOUT", WSAETIMEDOUT, "Connection timed out");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000425#endif
426#endif
427#ifdef ENOENT
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000428 inscode(d, ds, de, "ENOENT", ENOENT, "No such file or directory");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000429#endif
430#ifdef EEXIST
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000431 inscode(d, ds, de, "EEXIST", EEXIST, "File exists");
Guido van Rossum4dc66221996-07-24 00:51:51 +0000432#endif
433#ifdef EDQUOT
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000434 inscode(d, ds, de, "EDQUOT", EDQUOT, "Quota exceeded");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000435#else
436#ifdef WSAEDQUOT
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000437 inscode(d, ds, de, "EDQUOT", WSAEDQUOT, "Quota exceeded");
Guido van Rossum4dc66221996-07-24 00:51:51 +0000438#endif
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000439#endif
440#ifdef ENOSTR
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000441 inscode(d, ds, de, "ENOSTR", ENOSTR, "Device not a stream");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000442#endif
443#ifdef EBADSLT
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000444 inscode(d, ds, de, "EBADSLT", EBADSLT, "Invalid slot");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000445#endif
446#ifdef EBADRQC
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000447 inscode(d, ds, de, "EBADRQC", EBADRQC, "Invalid request code");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000448#endif
449#ifdef ELIBACC
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000450 inscode(d, ds, de, "ELIBACC", ELIBACC, "Can not access a needed shared library");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000451#endif
452#ifdef EFAULT
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000453 inscode(d, ds, de, "EFAULT", EFAULT, "Bad address");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000454#else
455#ifdef WSAEFAULT
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000456 inscode(d, ds, de, "EFAULT", WSAEFAULT, "Bad address");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000457#endif
458#endif
459#ifdef EFBIG
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000460 inscode(d, ds, de, "EFBIG", EFBIG, "File too large");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000461#endif
462#ifdef EDEADLK
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000463 inscode(d, ds, de, "EDEADLK", EDEADLK, "Resource deadlock would occur");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000464#endif
465#ifdef ENOTCONN
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000466 inscode(d, ds, de, "ENOTCONN", ENOTCONN, "Transport endpoint is not connected");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000467#else
468#ifdef WSAENOTCONN
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000469 inscode(d, ds, de, "ENOTCONN", WSAENOTCONN, "Transport endpoint is not connected");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000470#endif
471#endif
472#ifdef EDESTADDRREQ
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000473 inscode(d, ds, de, "EDESTADDRREQ", EDESTADDRREQ, "Destination address required");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000474#else
475#ifdef WSAEDESTADDRREQ
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000476 inscode(d, ds, de, "EDESTADDRREQ", WSAEDESTADDRREQ, "Destination address required");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000477#endif
478#endif
479#ifdef ELIBSCN
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000480 inscode(d, ds, de, "ELIBSCN", ELIBSCN, ".lib section in a.out corrupted");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000481#endif
482#ifdef ENOLCK
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000483 inscode(d, ds, de, "ENOLCK", ENOLCK, "No record locks available");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000484#endif
485#ifdef EISNAM
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000486 inscode(d, ds, de, "EISNAM", EISNAM, "Is a named type file");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000487#endif
488#ifdef ECONNABORTED
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000489 inscode(d, ds, de, "ECONNABORTED", ECONNABORTED, "Software caused connection abort");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000490#else
491#ifdef WSAECONNABORTED
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000492 inscode(d, ds, de, "ECONNABORTED", WSAECONNABORTED, "Software caused connection abort");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000493#endif
494#endif
495#ifdef ENETUNREACH
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000496 inscode(d, ds, de, "ENETUNREACH", ENETUNREACH, "Network is unreachable");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000497#else
498#ifdef WSAENETUNREACH
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000499 inscode(d, ds, de, "ENETUNREACH", WSAENETUNREACH, "Network is unreachable");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000500#endif
501#endif
502#ifdef ESTALE
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000503 inscode(d, ds, de, "ESTALE", ESTALE, "Stale NFS file handle");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000504#else
505#ifdef WSAESTALE
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000506 inscode(d, ds, de, "ESTALE", WSAESTALE, "Stale NFS file handle");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000507#endif
508#endif
509#ifdef ENOSR
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000510 inscode(d, ds, de, "ENOSR", ENOSR, "Out of streams resources");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000511#endif
512#ifdef ENOMEM
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000513 inscode(d, ds, de, "ENOMEM", ENOMEM, "Out of memory");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000514#endif
515#ifdef ENOTSOCK
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000516 inscode(d, ds, de, "ENOTSOCK", ENOTSOCK, "Socket operation on non-socket");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000517#else
518#ifdef WSAENOTSOCK
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000519 inscode(d, ds, de, "ENOTSOCK", WSAENOTSOCK, "Socket operation on non-socket");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000520#endif
521#endif
522#ifdef ESTRPIPE
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000523 inscode(d, ds, de, "ESTRPIPE", ESTRPIPE, "Streams pipe error");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000524#endif
525#ifdef EMLINK
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000526 inscode(d, ds, de, "EMLINK", EMLINK, "Too many links");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000527#endif
528#ifdef ERANGE
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000529 inscode(d, ds, de, "ERANGE", ERANGE, "Math result not representable");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000530#endif
531#ifdef ELIBEXEC
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000532 inscode(d, ds, de, "ELIBEXEC", ELIBEXEC, "Cannot exec a shared library directly");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000533#endif
534#ifdef EL3HLT
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000535 inscode(d, ds, de, "EL3HLT", EL3HLT, "Level 3 halted");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000536#endif
537#ifdef ECONNRESET
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000538 inscode(d, ds, de, "ECONNRESET", ECONNRESET, "Connection reset by peer");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000539#else
540#ifdef WSAECONNRESET
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000541 inscode(d, ds, de, "ECONNRESET", WSAECONNRESET, "Connection reset by peer");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000542#endif
543#endif
544#ifdef EADDRINUSE
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000545 inscode(d, ds, de, "EADDRINUSE", EADDRINUSE, "Address already in use");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000546#else
547#ifdef WSAEADDRINUSE
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000548 inscode(d, ds, de, "EADDRINUSE", WSAEADDRINUSE, "Address already in use");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000549#endif
550#endif
551#ifdef EOPNOTSUPP
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000552 inscode(d, ds, de, "EOPNOTSUPP", EOPNOTSUPP, "Operation not supported on transport endpoint");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000553#else
554#ifdef WSAEOPNOTSUPP
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000555 inscode(d, ds, de, "EOPNOTSUPP", WSAEOPNOTSUPP, "Operation not supported on transport endpoint");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000556#endif
557#endif
558#ifdef EREMCHG
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000559 inscode(d, ds, de, "EREMCHG", EREMCHG, "Remote address changed");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000560#endif
561#ifdef EAGAIN
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000562 inscode(d, ds, de, "EAGAIN", EAGAIN, "Try again");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000563#endif
564#ifdef ENAMETOOLONG
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000565 inscode(d, ds, de, "ENAMETOOLONG", ENAMETOOLONG, "File name too long");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000566#else
567#ifdef WSAENAMETOOLONG
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000568 inscode(d, ds, de, "ENAMETOOLONG", WSAENAMETOOLONG, "File name too long");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000569#endif
570#endif
571#ifdef ENOTTY
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000572 inscode(d, ds, de, "ENOTTY", ENOTTY, "Not a typewriter");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000573#endif
574#ifdef ERESTART
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000575 inscode(d, ds, de, "ERESTART", ERESTART, "Interrupted system call should be restarted");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000576#endif
577#ifdef ESOCKTNOSUPPORT
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000578 inscode(d, ds, de, "ESOCKTNOSUPPORT", ESOCKTNOSUPPORT, "Socket type not supported");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000579#else
580#ifdef WSAESOCKTNOSUPPORT
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000581 inscode(d, ds, de, "ESOCKTNOSUPPORT", WSAESOCKTNOSUPPORT, "Socket type not supported");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000582#endif
583#endif
584#ifdef ETIME
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000585 inscode(d, ds, de, "ETIME", ETIME, "Timer expired");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000586#endif
587#ifdef EBFONT
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000588 inscode(d, ds, de, "EBFONT", EBFONT, "Bad font file format");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000589#endif
590#ifdef EDEADLOCK
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000591 inscode(d, ds, de, "EDEADLOCK", EDEADLOCK, "Error EDEADLOCK");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000592#endif
593#ifdef ETOOMANYREFS
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000594 inscode(d, ds, de, "ETOOMANYREFS", ETOOMANYREFS, "Too many references: cannot splice");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000595#else
596#ifdef WSAETOOMANYREFS
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000597 inscode(d, ds, de, "ETOOMANYREFS", WSAETOOMANYREFS, "Too many references: cannot splice");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000598#endif
599#endif
600#ifdef EMFILE
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000601 inscode(d, ds, de, "EMFILE", EMFILE, "Too many open files");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000602#else
603#ifdef WSAEMFILE
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000604 inscode(d, ds, de, "EMFILE", WSAEMFILE, "Too many open files");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000605#endif
606#endif
607#ifdef ETXTBSY
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000608 inscode(d, ds, de, "ETXTBSY", ETXTBSY, "Text file busy");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000609#endif
610#ifdef EINPROGRESS
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000611 inscode(d, ds, de, "EINPROGRESS", EINPROGRESS, "Operation now in progress");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000612#else
613#ifdef WSAEINPROGRESS
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000614 inscode(d, ds, de, "EINPROGRESS", WSAEINPROGRESS, "Operation now in progress");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000615#endif
616#endif
617#ifdef ENXIO
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000618 inscode(d, ds, de, "ENXIO", ENXIO, "No such device or address");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000619#endif
620#ifdef ENOPKG
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000621 inscode(d, ds, de, "ENOPKG", ENOPKG, "Package not installed");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000622#endif
623#ifdef WSASY
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000624 inscode(d, ds, de, "WSASY", WSASY, "Error WSASY");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000625#endif
626#ifdef WSAEHOSTDOWN
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000627 inscode(d, ds, de, "WSAEHOSTDOWN", WSAEHOSTDOWN, "Host is down");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000628#endif
629#ifdef WSAENETDOWN
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000630 inscode(d, ds, de, "WSAENETDOWN", WSAENETDOWN, "Network is down");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000631#endif
632#ifdef WSAENOTSOCK
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000633 inscode(d, ds, de, "WSAENOTSOCK", WSAENOTSOCK, "Socket operation on non-socket");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000634#endif
635#ifdef WSAEHOSTUNREACH
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000636 inscode(d, ds, de, "WSAEHOSTUNREACH", WSAEHOSTUNREACH, "No route to host");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000637#endif
638#ifdef WSAELOOP
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000639 inscode(d, ds, de, "WSAELOOP", WSAELOOP, "Too many symbolic links encountered");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000640#endif
641#ifdef WSAEMFILE
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000642 inscode(d, ds, de, "WSAEMFILE", WSAEMFILE, "Too many open files");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000643#endif
644#ifdef WSAESTALE
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000645 inscode(d, ds, de, "WSAESTALE", WSAESTALE, "Stale NFS file handle");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000646#endif
647#ifdef WSAVERNOTSUPPORTED
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000648 inscode(d, ds, de, "WSAVERNOTSUPPORTED", WSAVERNOTSUPPORTED, "Error WSAVERNOTSUPPORTED");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000649#endif
650#ifdef WSAENETUNREACH
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000651 inscode(d, ds, de, "WSAENETUNREACH", WSAENETUNREACH, "Network is unreachable");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000652#endif
653#ifdef WSAEPROCLIM
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000654 inscode(d, ds, de, "WSAEPROCLIM", WSAEPROCLIM, "Error WSAEPROCLIM");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000655#endif
656#ifdef WSAEFAULT
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000657 inscode(d, ds, de, "WSAEFAULT", WSAEFAULT, "Bad address");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000658#endif
659#ifdef WSANOTINITIALISED
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000660 inscode(d, ds, de, "WSANOTINITIALISED", WSANOTINITIALISED, "Error WSANOTINITIALISED");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000661#endif
662#ifdef WSAEUSERS
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000663 inscode(d, ds, de, "WSAEUSERS", WSAEUSERS, "Too many users");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000664#endif
665#ifdef WSAMAKEASYNCREPL
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000666 inscode(d, ds, de, "WSAMAKEASYNCREPL", WSAMAKEASYNCREPL, "Error WSAMAKEASYNCREPL");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000667#endif
668#ifdef WSAENOPROTOOPT
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000669 inscode(d, ds, de, "WSAENOPROTOOPT", WSAENOPROTOOPT, "Protocol not available");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000670#endif
671#ifdef WSAECONNABORTED
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000672 inscode(d, ds, de, "WSAECONNABORTED", WSAECONNABORTED, "Software caused connection abort");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000673#endif
674#ifdef WSAENAMETOOLONG
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000675 inscode(d, ds, de, "WSAENAMETOOLONG", WSAENAMETOOLONG, "File name too long");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000676#endif
677#ifdef WSAENOTEMPTY
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000678 inscode(d, ds, de, "WSAENOTEMPTY", WSAENOTEMPTY, "Directory not empty");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000679#endif
680#ifdef WSAESHUTDOWN
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000681 inscode(d, ds, de, "WSAESHUTDOWN", WSAESHUTDOWN, "Cannot send after transport endpoint shutdown");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000682#endif
683#ifdef WSAEAFNOSUPPORT
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000684 inscode(d, ds, de, "WSAEAFNOSUPPORT", WSAEAFNOSUPPORT, "Address family not supported by protocol");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000685#endif
686#ifdef WSAETOOMANYREFS
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000687 inscode(d, ds, de, "WSAETOOMANYREFS", WSAETOOMANYREFS, "Too many references: cannot splice");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000688#endif
689#ifdef WSAEACCES
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000690 inscode(d, ds, de, "WSAEACCES", WSAEACCES, "Permission denied");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000691#endif
692#ifdef WSATR
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000693 inscode(d, ds, de, "WSATR", WSATR, "Error WSATR");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000694#endif
695#ifdef WSABASEERR
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000696 inscode(d, ds, de, "WSABASEERR", WSABASEERR, "Error WSABASEERR");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000697#endif
698#ifdef WSADESCRIPTIO
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000699 inscode(d, ds, de, "WSADESCRIPTIO", WSADESCRIPTIO, "Error WSADESCRIPTIO");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000700#endif
701#ifdef WSAEMSGSIZE
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000702 inscode(d, ds, de, "WSAEMSGSIZE", WSAEMSGSIZE, "Message too long");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000703#endif
704#ifdef WSAEBADF
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000705 inscode(d, ds, de, "WSAEBADF", WSAEBADF, "Bad file number");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000706#endif
707#ifdef WSAECONNRESET
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000708 inscode(d, ds, de, "WSAECONNRESET", WSAECONNRESET, "Connection reset by peer");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000709#endif
710#ifdef WSAGETSELECTERRO
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000711 inscode(d, ds, de, "WSAGETSELECTERRO", WSAGETSELECTERRO, "Error WSAGETSELECTERRO");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000712#endif
713#ifdef WSAETIMEDOUT
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000714 inscode(d, ds, de, "WSAETIMEDOUT", WSAETIMEDOUT, "Connection timed out");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000715#endif
716#ifdef WSAENOBUFS
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000717 inscode(d, ds, de, "WSAENOBUFS", WSAENOBUFS, "No buffer space available");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000718#endif
719#ifdef WSAEDISCON
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000720 inscode(d, ds, de, "WSAEDISCON", WSAEDISCON, "Error WSAEDISCON");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000721#endif
722#ifdef WSAEINTR
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000723 inscode(d, ds, de, "WSAEINTR", WSAEINTR, "Interrupted system call");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000724#endif
725#ifdef WSAEPROTOTYPE
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000726 inscode(d, ds, de, "WSAEPROTOTYPE", WSAEPROTOTYPE, "Protocol wrong type for socket");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000727#endif
728#ifdef WSAHOS
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000729 inscode(d, ds, de, "WSAHOS", WSAHOS, "Error WSAHOS");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000730#endif
731#ifdef WSAEADDRINUSE
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000732 inscode(d, ds, de, "WSAEADDRINUSE", WSAEADDRINUSE, "Address already in use");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000733#endif
734#ifdef WSAEADDRNOTAVAIL
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000735 inscode(d, ds, de, "WSAEADDRNOTAVAIL", WSAEADDRNOTAVAIL, "Cannot assign requested address");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000736#endif
737#ifdef WSAEALREADY
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000738 inscode(d, ds, de, "WSAEALREADY", WSAEALREADY, "Operation already in progress");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000739#endif
740#ifdef WSAEPROTONOSUPPORT
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000741 inscode(d, ds, de, "WSAEPROTONOSUPPORT", WSAEPROTONOSUPPORT, "Protocol not supported");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000742#endif
743#ifdef WSASYSNOTREADY
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000744 inscode(d, ds, de, "WSASYSNOTREADY", WSASYSNOTREADY, "Error WSASYSNOTREADY");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000745#endif
746#ifdef WSAEWOULDBLOCK
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000747 inscode(d, ds, de, "WSAEWOULDBLOCK", WSAEWOULDBLOCK, "Operation would block");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000748#endif
749#ifdef WSAEPFNOSUPPORT
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000750 inscode(d, ds, de, "WSAEPFNOSUPPORT", WSAEPFNOSUPPORT, "Protocol family not supported");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000751#endif
752#ifdef WSAEOPNOTSUPP
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000753 inscode(d, ds, de, "WSAEOPNOTSUPP", WSAEOPNOTSUPP, "Operation not supported on transport endpoint");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000754#endif
755#ifdef WSAEISCONN
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000756 inscode(d, ds, de, "WSAEISCONN", WSAEISCONN, "Transport endpoint is already connected");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000757#endif
758#ifdef WSAEDQUOT
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000759 inscode(d, ds, de, "WSAEDQUOT", WSAEDQUOT, "Quota exceeded");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000760#endif
761#ifdef WSAENOTCONN
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000762 inscode(d, ds, de, "WSAENOTCONN", WSAENOTCONN, "Transport endpoint is not connected");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000763#endif
764#ifdef WSAEREMOTE
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000765 inscode(d, ds, de, "WSAEREMOTE", WSAEREMOTE, "Object is remote");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000766#endif
767#ifdef WSAEINVAL
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000768 inscode(d, ds, de, "WSAEINVAL", WSAEINVAL, "Invalid argument");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000769#endif
770#ifdef WSAEINPROGRESS
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000771 inscode(d, ds, de, "WSAEINPROGRESS", WSAEINPROGRESS, "Operation now in progress");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000772#endif
773#ifdef WSAGETSELECTEVEN
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000774 inscode(d, ds, de, "WSAGETSELECTEVEN", WSAGETSELECTEVEN, "Error WSAGETSELECTEVEN");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000775#endif
776#ifdef WSAESOCKTNOSUPPORT
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000777 inscode(d, ds, de, "WSAESOCKTNOSUPPORT", WSAESOCKTNOSUPPORT, "Socket type not supported");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000778#endif
779#ifdef WSAGETASYNCERRO
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000780 inscode(d, ds, de, "WSAGETASYNCERRO", WSAGETASYNCERRO, "Error WSAGETASYNCERRO");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000781#endif
782#ifdef WSAMAKESELECTREPL
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000783 inscode(d, ds, de, "WSAMAKESELECTREPL", WSAMAKESELECTREPL, "Error WSAMAKESELECTREPL");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000784#endif
785#ifdef WSAGETASYNCBUFLE
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000786 inscode(d, ds, de, "WSAGETASYNCBUFLE", WSAGETASYNCBUFLE, "Error WSAGETASYNCBUFLE");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000787#endif
788#ifdef WSAEDESTADDRREQ
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000789 inscode(d, ds, de, "WSAEDESTADDRREQ", WSAEDESTADDRREQ, "Destination address required");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000790#endif
791#ifdef WSAECONNREFUSED
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000792 inscode(d, ds, de, "WSAECONNREFUSED", WSAECONNREFUSED, "Connection refused");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000793#endif
794#ifdef WSAENETRESET
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000795 inscode(d, ds, de, "WSAENETRESET", WSAENETRESET, "Network dropped connection because of reset");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000796#endif
797#ifdef WSAN
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000798 inscode(d, ds, de, "WSAN", WSAN, "Error WSAN");
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000799#endif
Barry Warsaw31c604d2010-09-22 20:58:04 +0000800#ifdef ENOMEDIUM
801 inscode(d, ds, de, "ENOMEDIUM", ENOMEDIUM, "No medium found");
802#endif
803#ifdef EMEDIUMTYPE
804 inscode(d, ds, de, "EMEDIUMTYPE", EMEDIUMTYPE, "Wrong medium type");
805#endif
806#ifdef ECANCELED
807 inscode(d, ds, de, "ECANCELED", ECANCELED, "Operation Canceled");
808#endif
809#ifdef ENOKEY
810 inscode(d, ds, de, "ENOKEY", ENOKEY, "Required key not available");
811#endif
812#ifdef EKEYEXPIRED
813 inscode(d, ds, de, "EKEYEXPIRED", EKEYEXPIRED, "Key has expired");
814#endif
815#ifdef EKEYREVOKED
816 inscode(d, ds, de, "EKEYREVOKED", EKEYREVOKED, "Key has been revoked");
817#endif
818#ifdef EKEYREJECTED
819 inscode(d, ds, de, "EKEYREJECTED", EKEYREJECTED, "Key was rejected by service");
820#endif
821#ifdef EOWNERDEAD
822 inscode(d, ds, de, "EOWNERDEAD", EOWNERDEAD, "Owner died");
823#endif
824#ifdef ENOTRECOVERABLE
825 inscode(d, ds, de, "ENOTRECOVERABLE", ENOTRECOVERABLE, "State not recoverable");
826#endif
827#ifdef ERFKILL
828 inscode(d, ds, de, "ERFKILL", ERFKILL, "Operation not possible due to RF-kill");
829#endif
Guido van Rossum49f9d8e1997-09-28 05:41:56 +0000830
Antoine Pitroub85e1652010-08-18 21:05:19 +0000831 /* Solaris-specific errnos */
832#ifdef ECANCELED
833 inscode(d, ds, de, "ECANCELED", ECANCELED, "Operation canceled");
834#endif
835#ifdef ENOTSUP
836 inscode(d, ds, de, "ENOTSUP", ENOTSUP, "Operation not supported");
837#endif
838#ifdef EOWNERDEAD
839 inscode(d, ds, de, "EOWNERDEAD", EOWNERDEAD, "Process died with the lock");
840#endif
841#ifdef ENOTRECOVERABLE
842 inscode(d, ds, de, "ENOTRECOVERABLE", ENOTRECOVERABLE, "Lock is not recoverable");
843#endif
844#ifdef ELOCKUNMAPPED
845 inscode(d, ds, de, "ELOCKUNMAPPED", ELOCKUNMAPPED, "Locked lock was unmapped");
846#endif
847#ifdef ENOTACTIVE
848 inscode(d, ds, de, "ENOTACTIVE", ENOTACTIVE, "Facility is not active");
849#endif
850
Antoine Pitrouf95a1b32010-05-09 15:52:27 +0000851 Py_DECREF(de);
852 return m;
Guido van Rossum4dc66221996-07-24 00:51:51 +0000853}