/* Errno module */#include "Python.h"/* Windows socket errors (WSA*) */#ifdef MS_WINDOWS#define WIN32_LEAN_AND_MEAN#include <windows.h>/* The following constants were added to errno.h in VS2010 but havepreferred WSA equivalents. */#undef EADDRINUSE#undef EADDRNOTAVAIL#undef EAFNOSUPPORT#undef EALREADY#undef ECONNABORTED#undef ECONNREFUSED#undef ECONNRESET#undef EDESTADDRREQ#undef EHOSTUNREACH#undef EINPROGRESS#undef EISCONN#undef ELOOP#undef EMSGSIZE#undef ENETDOWN#undef ENETRESET#undef ENETUNREACH#undef ENOBUFS#undef ENOPROTOOPT#undef ENOTCONN#undef ENOTSOCK#undef EOPNOTSUPP#undef EPROTONOSUPPORT#undef EPROTOTYPE#undef ETIMEDOUT#undef EWOULDBLOCK#endif/** Pull in the system error definitions*/static PyMethodDef errno_methods[] = {{NULL, NULL}};/* Helper function doing the dictionary inserting */static void_inscode(PyObject *d, PyObject *de, const char *name, int code){PyObject *u = PyUnicode_FromString(name);PyObject *v = PyLong_FromLong((long) code);/* Don't bother checking for errors; they'll be caught at the end* of the module initialization function by the caller of* initerrno().*/if (u && v) {/* insert in modules dict */PyDict_SetItem(d, u, v);/* insert in errorcode dict */PyDict_SetItem(de, v, u);}Py_XDECREF(u);Py_XDECREF(v);}PyDoc_STRVAR(errno__doc__,"This module makes available standard errno system symbols.\n\\n\The value of each symbol is the corresponding integer value,\n\e.g., on most systems, errno.ENOENT equals the integer 2.\n\\n\The dictionary errno.errorcode maps numeric codes to symbol names,\n\e.g., errno.errorcode[2] could be the string 'ENOENT'.\n\\n\Symbols that are not relevant to the underlying system are not defined.\n\\n\To map error codes to error messages, use the function os.strerror(),\n\e.g. os.strerror(2) could return 'No such file or directory'.");static struct PyModuleDef errnomodule = {PyModuleDef_HEAD_INIT,"errno",errno__doc__,-1,errno_methods,NULL,NULL,NULL,NULL};PyMODINIT_FUNCPyInit_errno(void){PyObject *m, *d, *de;m = PyModule_Create(&errnomodule);if (m == NULL)return NULL;d = PyModule_GetDict(m);de = PyDict_New();if (!d || !de || PyDict_SetItemString(d, "errorcode", de) < 0)return NULL;/* Macro so I don't have to edit each and every line below... */#define inscode(d, ds, de, name, code, comment) _inscode(d, de, name, code)/** The names and comments are borrowed from linux/include/errno.h,* which should be pretty all-inclusive. However, the Solaris specific* names and comments are borrowed from sys/errno.h in Solaris.* MacOSX specific names and comments are borrowed from sys/errno.h in* MacOSX.*/#ifdef ENODEVinscode(d, ds, de, "ENODEV", ENODEV, "No such device");#endif#ifdef ENOCSIinscode(d, ds, de, "ENOCSI", ENOCSI, "No CSI structure available");#endif#ifdef EHOSTUNREACHinscode(d, ds, de, "EHOSTUNREACH", EHOSTUNREACH, "No route to host");#else#ifdef WSAEHOSTUNREACHinscode(d, ds, de, "EHOSTUNREACH", WSAEHOSTUNREACH, "No route to host");#endif#endif#ifdef ENOMSGinscode(d, ds, de, "ENOMSG", ENOMSG, "No message of desired type");#endif#ifdef EUCLEANinscode(d, ds, de, "EUCLEAN", EUCLEAN, "Structure needs cleaning");#endif#ifdef EL2NSYNCinscode(d, ds, de, "EL2NSYNC", EL2NSYNC, "Level 2 not synchronized");#endif#ifdef EL2HLTinscode(d, ds, de, "EL2HLT", EL2HLT, "Level 2 halted");#endif#ifdef ENODATAinscode(d, ds, de, "ENODATA", ENODATA, "No data available");#endif#ifdef ENOTBLKinscode(d, ds, de, "ENOTBLK", ENOTBLK, "Block device required");#endif#ifdef ENOSYSinscode(d, ds, de, "ENOSYS", ENOSYS, "Function not implemented");#endif#ifdef EPIPEinscode(d, ds, de, "EPIPE", EPIPE, "Broken pipe");#endif#ifdef EINVALinscode(d, ds, de, "EINVAL", EINVAL, "Invalid argument");#else#ifdef WSAEINVALinscode(d, ds, de, "EINVAL", WSAEINVAL, "Invalid argument");#endif#endif#ifdef EOVERFLOWinscode(d, ds, de, "EOVERFLOW", EOVERFLOW, "Value too large for defined data type");#endif#ifdef EADVinscode(d, ds, de, "EADV", EADV, "Advertise error");#endif#ifdef EINTRinscode(d, ds, de, "EINTR", EINTR, "Interrupted system call");#else#ifdef WSAEINTRinscode(d, ds, de, "EINTR", WSAEINTR, "Interrupted system call");#endif#endif#ifdef EUSERSinscode(d, ds, de, "EUSERS", EUSERS, "Too many users");#else#ifdef WSAEUSERSinscode(d, ds, de, "EUSERS", WSAEUSERS, "Too many users");#endif#endif#ifdef ENOTEMPTYinscode(d, ds, de, "ENOTEMPTY", ENOTEMPTY, "Directory not empty");#else#ifdef WSAENOTEMPTYinscode(d, ds, de, "ENOTEMPTY", WSAENOTEMPTY, "Directory not empty");#endif#endif#ifdef ENOBUFSinscode(d, ds, de, "ENOBUFS", ENOBUFS, "No buffer space available");#else#ifdef WSAENOBUFSinscode(d, ds, de, "ENOBUFS", WSAENOBUFS, "No buffer space available");#endif#endif#ifdef EPROTOinscode(d, ds, de, "EPROTO", EPROTO, "Protocol error");#endif#ifdef EREMOTEinscode(d, ds, de, "EREMOTE", EREMOTE, "Object is remote");#else#ifdef WSAEREMOTEinscode(d, ds, de, "EREMOTE", WSAEREMOTE, "Object is remote");#endif#endif#ifdef ENAVAILinscode(d, ds, de, "ENAVAIL", ENAVAIL, "No XENIX semaphores available");#endif#ifdef ECHILDinscode(d, ds, de, "ECHILD", ECHILD, "No child processes");#endif#ifdef ELOOPinscode(d, ds, de, "ELOOP", ELOOP, "Too many symbolic links encountered");#else#ifdef WSAELOOPinscode(d, ds, de, "ELOOP", WSAELOOP, "Too many symbolic links encountered");#endif#endif#ifdef EXDEVinscode(d, ds, de, "EXDEV", EXDEV, "Cross-device link");#endif#ifdef E2BIGinscode(d, ds, de, "E2BIG", E2BIG, "Arg list too long");#endif#ifdef ESRCHinscode(d, ds, de, "ESRCH", ESRCH, "No such process");#endif#ifdef EMSGSIZEinscode(d, ds, de, "EMSGSIZE", EMSGSIZE, "Message too long");#else#ifdef WSAEMSGSIZEinscode(d, ds, de, "EMSGSIZE", WSAEMSGSIZE, "Message too long");#endif#endif#ifdef EAFNOSUPPORTinscode(d, ds, de, "EAFNOSUPPORT", EAFNOSUPPORT, "Address family not supported by protocol");#else#ifdef WSAEAFNOSUPPORTinscode(d, ds, de, "EAFNOSUPPORT", WSAEAFNOSUPPORT, "Address family not supported by protocol");#endif#endif#ifdef EBADRinscode(d, ds, de, "EBADR", EBADR, "Invalid request descriptor");#endif#ifdef EHOSTDOWNinscode(d, ds, de, "EHOSTDOWN", EHOSTDOWN, "Host is down");#else#ifdef WSAEHOSTDOWNinscode(d, ds, de, "EHOSTDOWN", WSAEHOSTDOWN, "Host is down");#endif#endif#ifdef EPFNOSUPPORTinscode(d, ds, de, "EPFNOSUPPORT", EPFNOSUPPORT, "Protocol family not supported");#else#ifdef WSAEPFNOSUPPORTinscode(d, ds, de, "EPFNOSUPPORT", WSAEPFNOSUPPORT, "Protocol family not supported");#endif#endif#ifdef ENOPROTOOPTinscode(d, ds, de, "ENOPROTOOPT", ENOPROTOOPT, "Protocol not available");#else#ifdef WSAENOPROTOOPTinscode(d, ds, de, "ENOPROTOOPT", WSAENOPROTOOPT, "Protocol not available");#endif#endif#ifdef EBUSYinscode(d, ds, de, "EBUSY", EBUSY, "Device or resource busy");#endif#ifdef EWOULDBLOCKinscode(d, ds, de, "EWOULDBLOCK", EWOULDBLOCK, "Operation would block");#else#ifdef WSAEWOULDBLOCKinscode(d, ds, de, "EWOULDBLOCK", WSAEWOULDBLOCK, "Operation would block");#endif#endif#ifdef EBADFDinscode(d, ds, de, "EBADFD", EBADFD, "File descriptor in bad state");#endif#ifdef EDOTDOTinscode(d, ds, de, "EDOTDOT", EDOTDOT, "RFS specific error");#endif#ifdef EISCONNinscode(d, ds, de, "EISCONN", EISCONN, "Transport endpoint is already connected");#else#ifdef WSAEISCONNinscode(d, ds, de, "EISCONN", WSAEISCONN, "Transport endpoint is already connected");#endif#endif#ifdef ENOANOinscode(d, ds, de, "ENOANO", ENOANO, "No anode");#endif#ifdef ESHUTDOWNinscode(d, ds, de, "ESHUTDOWN", ESHUTDOWN, "Cannot send after transport endpoint shutdown");#else#ifdef WSAESHUTDOWNinscode(d, ds, de, "ESHUTDOWN", WSAESHUTDOWN, "Cannot send after transport endpoint shutdown");#endif#endif#ifdef ECHRNGinscode(d, ds, de, "ECHRNG", ECHRNG, "Channel number out of range");#endif#ifdef ELIBBADinscode(d, ds, de, "ELIBBAD", ELIBBAD, "Accessing a corrupted shared library");#endif#ifdef ENONETinscode(d, ds, de, "ENONET", ENONET, "Machine is not on the network");#endif#ifdef EBADEinscode(d, ds, de, "EBADE", EBADE, "Invalid exchange");#endif#ifdef EBADFinscode(d, ds, de, "EBADF", EBADF, "Bad file number");#else#ifdef WSAEBADFinscode(d, ds, de, "EBADF", WSAEBADF, "Bad file number");#endif#endif#ifdef EMULTIHOPinscode(d, ds, de, "EMULTIHOP", EMULTIHOP, "Multihop attempted");#endif#ifdef EIOinscode(d, ds, de, "EIO", EIO, "I/O error");#endif#ifdef EUNATCHinscode(d, ds, de, "EUNATCH", EUNATCH, "Protocol driver not attached");#endif#ifdef EPROTOTYPEinscode(d, ds, de, "EPROTOTYPE", EPROTOTYPE, "Protocol wrong type for socket");#else#ifdef WSAEPROTOTYPEinscode(d, ds, de, "EPROTOTYPE", WSAEPROTOTYPE, "Protocol wrong type for socket");#endif#endif#ifdef ENOSPCinscode(d, ds, de, "ENOSPC", ENOSPC, "No space left on device");#endif#ifdef ENOEXECinscode(d, ds, de, "ENOEXEC", ENOEXEC, "Exec format error");#endif#ifdef EALREADYinscode(d, ds, de, "EALREADY", EALREADY, "Operation already in progress");#else#ifdef WSAEALREADYinscode(d, ds, de, "EALREADY", WSAEALREADY, "Operation already in progress");#endif#endif#ifdef ENETDOWNinscode(d, ds, de, "ENETDOWN", ENETDOWN, "Network is down");#else#ifdef WSAENETDOWNinscode(d, ds, de, "ENETDOWN", WSAENETDOWN, "Network is down");#endif#endif#ifdef ENOTNAMinscode(d, ds, de, "ENOTNAM", ENOTNAM, "Not a XENIX named type file");#endif#ifdef EACCESinscode(d, ds, de, "EACCES", EACCES, "Permission denied");#else#ifdef WSAEACCESinscode(d, ds, de, "EACCES", WSAEACCES, "Permission denied");#endif#endif#ifdef ELNRNGinscode(d, ds, de, "ELNRNG", ELNRNG, "Link number out of range");#endif#ifdef EILSEQinscode(d, ds, de, "EILSEQ", EILSEQ, "Illegal byte sequence");#endif#ifdef ENOTDIRinscode(d, ds, de, "ENOTDIR", ENOTDIR, "Not a directory");#endif#ifdef ENOTUNIQinscode(d, ds, de, "ENOTUNIQ", ENOTUNIQ, "Name not unique on network");#endif#ifdef EPERMinscode(d, ds, de, "EPERM", EPERM, "Operation not permitted");#endif#ifdef EDOMinscode(d, ds, de, "EDOM", EDOM, "Math argument out of domain of func");#endif#ifdef EXFULLinscode(d, ds, de, "EXFULL", EXFULL, "Exchange full");#endif#ifdef ECONNREFUSEDinscode(d, ds, de, "ECONNREFUSED", ECONNREFUSED, "Connection refused");#else#ifdef WSAECONNREFUSEDinscode(d, ds, de, "ECONNREFUSED", WSAECONNREFUSED, "Connection refused");#endif#endif#ifdef EISDIRinscode(d, ds, de, "EISDIR", EISDIR, "Is a directory");#endif#ifdef EPROTONOSUPPORTinscode(d, ds, de, "EPROTONOSUPPORT", EPROTONOSUPPORT, "Protocol not supported");#else#ifdef WSAEPROTONOSUPPORTinscode(d, ds, de, "EPROTONOSUPPORT", WSAEPROTONOSUPPORT, "Protocol not supported");#endif#endif#ifdef EROFSinscode(d, ds, de, "EROFS", EROFS, "Read-only file system");#endif#ifdef EADDRNOTAVAILinscode(d, ds, de, "EADDRNOTAVAIL", EADDRNOTAVAIL, "Cannot assign requested address");#else#ifdef WSAEADDRNOTAVAILinscode(d, ds, de, "EADDRNOTAVAIL", WSAEADDRNOTAVAIL, "Cannot assign requested address");#endif#endif#ifdef EIDRMinscode(d, ds, de, "EIDRM", EIDRM, "Identifier removed");#endif#ifdef ECOMMinscode(d, ds, de, "ECOMM", ECOMM, "Communication error on send");#endif#ifdef ESRMNTinscode(d, ds, de, "ESRMNT", ESRMNT, "Srmount error");#endif#ifdef EREMOTEIOinscode(d, ds, de, "EREMOTEIO", EREMOTEIO, "Remote I/O error");#endif#ifdef EL3RSTinscode(d, ds, de, "EL3RST", EL3RST, "Level 3 reset");#endif#ifdef EBADMSGinscode(d, ds, de, "EBADMSG", EBADMSG, "Not a data message");#endif#ifdef ENFILEinscode(d, ds, de, "ENFILE", ENFILE, "File table overflow");#endif#ifdef ELIBMAXinscode(d, ds, de, "ELIBMAX", ELIBMAX, "Attempting to link in too many shared libraries");#endif#ifdef ESPIPEinscode(d, ds, de, "ESPIPE", ESPIPE, "Illegal seek");#endif#ifdef ENOLINKinscode(d, ds, de, "ENOLINK", ENOLINK, "Link has been severed");#endif#ifdef ENETRESETinscode(d, ds, de, "ENETRESET", ENETRESET, "Network dropped connection because of reset");#else#ifdef WSAENETRESETinscode(d, ds, de, "ENETRESET", WSAENETRESET, "Network dropped connection because of reset");#endif#endif#ifdef ETIMEDOUTinscode(d, ds, de, "ETIMEDOUT", ETIMEDOUT, "Connection timed out");#else#ifdef WSAETIMEDOUTinscode(d, ds, de, "ETIMEDOUT", WSAETIMEDOUT, "Connection timed out");#endif#endif#ifdef ENOENTinscode(d, ds, de, "ENOENT", ENOENT, "No such file or directory");#endif#ifdef EEXISTinscode(d, ds, de, "EEXIST", EEXIST, "File exists");#endif#ifdef EDQUOTinscode(d, ds, de, "EDQUOT", EDQUOT, "Quota exceeded");#else#ifdef WSAEDQUOTinscode(d, ds, de, "EDQUOT", WSAEDQUOT, "Quota exceeded");#endif#endif#ifdef ENOSTRinscode(d, ds, de, "ENOSTR", ENOSTR, "Device not a stream");#endif#ifdef EBADSLTinscode(d, ds, de, "EBADSLT", EBADSLT, "Invalid slot");#endif#ifdef EBADRQCinscode(d, ds, de, "EBADRQC", EBADRQC, "Invalid request code");#endif#ifdef ELIBACCinscode(d, ds, de, "ELIBACC", ELIBACC, "Can not access a needed shared library");#endif#ifdef EFAULTinscode(d, ds, de, "EFAULT", EFAULT, "Bad address");#else#ifdef WSAEFAULTinscode(d, ds, de, "EFAULT", WSAEFAULT, "Bad address");#endif#endif#ifdef EFBIGinscode(d, ds, de, "EFBIG", EFBIG, "File too large");#endif#ifdef EDEADLKinscode(d, ds, de, "EDEADLK", EDEADLK, "Resource deadlock would occur");#endif#ifdef ENOTCONNinscode(d, ds, de, "ENOTCONN", ENOTCONN, "Transport endpoint is not connected");#else#ifdef WSAENOTCONNinscode(d, ds, de, "ENOTCONN", WSAENOTCONN, "Transport endpoint is not connected");#endif#endif#ifdef EDESTADDRREQinscode(d, ds, de, "EDESTADDRREQ", EDESTADDRREQ, "Destination address required");#else#ifdef WSAEDESTADDRREQinscode(d, ds, de, "EDESTADDRREQ", WSAEDESTADDRREQ, "Destination address required");#endif#endif#ifdef ELIBSCNinscode(d, ds, de, "ELIBSCN", ELIBSCN, ".lib section in a.out corrupted");#endif#ifdef ENOLCKinscode(d, ds, de, "ENOLCK", ENOLCK, "No record locks available");#endif#ifdef EISNAMinscode(d, ds, de, "EISNAM", EISNAM, "Is a named type file");#endif#ifdef ECONNABORTEDinscode(d, ds, de, "ECONNABORTED", ECONNABORTED, "Software caused connection abort");#else#ifdef WSAECONNABORTEDinscode(d, ds, de, "ECONNABORTED", WSAECONNABORTED, "Software caused connection abort");#endif#endif#ifdef ENETUNREACHinscode(d, ds, de, "ENETUNREACH", ENETUNREACH, "Network is unreachable");#else#ifdef WSAENETUNREACHinscode(d, ds, de, "ENETUNREACH", WSAENETUNREACH, "Network is unreachable");#endif#endif#ifdef ESTALEinscode(d, ds, de, "ESTALE", ESTALE, "Stale NFS file handle");#else#ifdef WSAESTALEinscode(d, ds, de, "ESTALE", WSAESTALE, "Stale NFS file handle");#endif#endif#ifdef ENOSRinscode(d, ds, de, "ENOSR", ENOSR, "Out of streams resources");#endif#ifdef ENOMEMinscode(d, ds, de, "ENOMEM", ENOMEM, "Out of memory");#endif#ifdef ENOTSOCKinscode(d, ds, de, "ENOTSOCK", ENOTSOCK, "Socket operation on non-socket");#else#ifdef WSAENOTSOCKinscode(d, ds, de, "ENOTSOCK", WSAENOTSOCK, "Socket operation on non-socket");#endif#endif#ifdef ESTRPIPEinscode(d, ds, de, "ESTRPIPE", ESTRPIPE, "Streams pipe error");#endif#ifdef EMLINKinscode(d, ds, de, "EMLINK", EMLINK, "Too many links");#endif#ifdef ERANGEinscode(d, ds, de, "ERANGE", ERANGE, "Math result not representable");#endif#ifdef ELIBEXECinscode(d, ds, de, "ELIBEXEC", ELIBEXEC, "Cannot exec a shared library directly");#endif#ifdef EL3HLTinscode(d, ds, de, "EL3HLT", EL3HLT, "Level 3 halted");#endif#ifdef ECONNRESETinscode(d, ds, de, "ECONNRESET", ECONNRESET, "Connection reset by peer");#else#ifdef WSAECONNRESETinscode(d, ds, de, "ECONNRESET", WSAECONNRESET, "Connection reset by peer");#endif#endif#ifdef EADDRINUSEinscode(d, ds, de, "EADDRINUSE", EADDRINUSE, "Address already in use");#else#ifdef WSAEADDRINUSEinscode(d, ds, de, "EADDRINUSE", WSAEADDRINUSE, "Address already in use");#endif#endif#ifdef EOPNOTSUPPinscode(d, ds, de, "EOPNOTSUPP", EOPNOTSUPP, "Operation not supported on transport endpoint");#else#ifdef WSAEOPNOTSUPPinscode(d, ds, de, "EOPNOTSUPP", WSAEOPNOTSUPP, "Operation not supported on transport endpoint");#endif#endif#ifdef EREMCHGinscode(d, ds, de, "EREMCHG", EREMCHG, "Remote address changed");#endif#ifdef EAGAINinscode(d, ds, de, "EAGAIN", EAGAIN, "Try again");#endif#ifdef ENAMETOOLONGinscode(d, ds, de, "ENAMETOOLONG", ENAMETOOLONG, "File name too long");#else#ifdef WSAENAMETOOLONGinscode(d, ds, de, "ENAMETOOLONG", WSAENAMETOOLONG, "File name too long");#endif#endif#ifdef ENOTTYinscode(d, ds, de, "ENOTTY", ENOTTY, "Not a typewriter");#endif#ifdef ERESTARTinscode(d, ds, de, "ERESTART", ERESTART, "Interrupted system call should be restarted");#endif#ifdef ESOCKTNOSUPPORTinscode(d, ds, de, "ESOCKTNOSUPPORT", ESOCKTNOSUPPORT, "Socket type not supported");#else#ifdef WSAESOCKTNOSUPPORTinscode(d, ds, de, "ESOCKTNOSUPPORT", WSAESOCKTNOSUPPORT, "Socket type not supported");#endif#endif#ifdef ETIMEinscode(d, ds, de, "ETIME", ETIME, "Timer expired");#endif#ifdef EBFONTinscode(d, ds, de, "EBFONT", EBFONT, "Bad font file format");#endif#ifdef EDEADLOCKinscode(d, ds, de, "EDEADLOCK", EDEADLOCK, "Error EDEADLOCK");#endif#ifdef ETOOMANYREFSinscode(d, ds, de, "ETOOMANYREFS", ETOOMANYREFS, "Too many references: cannot splice");#else#ifdef WSAETOOMANYREFSinscode(d, ds, de, "ETOOMANYREFS", WSAETOOMANYREFS, "Too many references: cannot splice");#endif#endif#ifdef EMFILEinscode(d, ds, de, "EMFILE", EMFILE, "Too many open files");#else#ifdef WSAEMFILEinscode(d, ds, de, "EMFILE", WSAEMFILE, "Too many open files");#endif#endif#ifdef ETXTBSYinscode(d, ds, de, "ETXTBSY", ETXTBSY, "Text file busy");#endif#ifdef EINPROGRESSinscode(d, ds, de, "EINPROGRESS", EINPROGRESS, "Operation now in progress");#else#ifdef WSAEINPROGRESSinscode(d, ds, de, "EINPROGRESS", WSAEINPROGRESS, "Operation now in progress");#endif#endif#ifdef ENXIOinscode(d, ds, de, "ENXIO", ENXIO, "No such device or address");#endif#ifdef ENOPKGinscode(d, ds, de, "ENOPKG", ENOPKG, "Package not installed");#endif#ifdef WSASYinscode(d, ds, de, "WSASY", WSASY, "Error WSASY");#endif#ifdef WSAEHOSTDOWNinscode(d, ds, de, "WSAEHOSTDOWN", WSAEHOSTDOWN, "Host is down");#endif#ifdef WSAENETDOWNinscode(d, ds, de, "WSAENETDOWN", WSAENETDOWN, "Network is down");#endif#ifdef WSAENOTSOCKinscode(d, ds, de, "WSAENOTSOCK", WSAENOTSOCK, "Socket operation on non-socket");#endif#ifdef WSAEHOSTUNREACHinscode(d, ds, de, "WSAEHOSTUNREACH", WSAEHOSTUNREACH, "No route to host");#endif#ifdef WSAELOOPinscode(d, ds, de, "WSAELOOP", WSAELOOP, "Too many symbolic links encountered");#endif#ifdef WSAEMFILEinscode(d, ds, de, "WSAEMFILE", WSAEMFILE, "Too many open files");#endif#ifdef WSAESTALEinscode(d, ds, de, "WSAESTALE", WSAESTALE, "Stale NFS file handle");#endif#ifdef WSAVERNOTSUPPORTEDinscode(d, ds, de, "WSAVERNOTSUPPORTED", WSAVERNOTSUPPORTED, "Error WSAVERNOTSUPPORTED");#endif#ifdef WSAENETUNREACHinscode(d, ds, de, "WSAENETUNREACH", WSAENETUNREACH, "Network is unreachable");#endif#ifdef WSAEPROCLIMinscode(d, ds, de, "WSAEPROCLIM", WSAEPROCLIM, "Error WSAEPROCLIM");#endif#ifdef WSAEFAULTinscode(d, ds, de, "WSAEFAULT", WSAEFAULT, "Bad address");#endif#ifdef WSANOTINITIALISEDinscode(d, ds, de, "WSANOTINITIALISED", WSANOTINITIALISED, "Error WSANOTINITIALISED");#endif#ifdef WSAEUSERSinscode(d, ds, de, "WSAEUSERS", WSAEUSERS, "Too many users");#endif#ifdef WSAMAKEASYNCREPLinscode(d, ds, de, "WSAMAKEASYNCREPL", WSAMAKEASYNCREPL, "Error WSAMAKEASYNCREPL");#endif#ifdef WSAENOPROTOOPTinscode(d, ds, de, "WSAENOPROTOOPT", WSAENOPROTOOPT, "Protocol not available");#endif#ifdef WSAECONNABORTEDinscode(d, ds, de, "WSAECONNABORTED", WSAECONNABORTED, "Software caused connection abort");#endif#ifdef WSAENAMETOOLONGinscode(d, ds, de, "WSAENAMETOOLONG", WSAENAMETOOLONG, "File name too long");#endif#ifdef WSAENOTEMPTYinscode(d, ds, de, "WSAENOTEMPTY", WSAENOTEMPTY, "Directory not empty");#endif#ifdef WSAESHUTDOWNinscode(d, ds, de, "WSAESHUTDOWN", WSAESHUTDOWN, "Cannot send after transport endpoint shutdown");#endif#ifdef WSAEAFNOSUPPORTinscode(d, ds, de, "WSAEAFNOSUPPORT", WSAEAFNOSUPPORT, "Address family not supported by protocol");#endif#ifdef WSAETOOMANYREFSinscode(d, ds, de, "WSAETOOMANYREFS", WSAETOOMANYREFS, "Too many references: cannot splice");#endif#ifdef WSAEACCESinscode(d, ds, de, "WSAEACCES", WSAEACCES, "Permission denied");#endif#ifdef WSATRinscode(d, ds, de, "WSATR", WSATR, "Error WSATR");#endif#ifdef WSABASEERRinscode(d, ds, de, "WSABASEERR", WSABASEERR, "Error WSABASEERR");#endif#ifdef WSADESCRIPTIOinscode(d, ds, de, "WSADESCRIPTIO", WSADESCRIPTIO, "Error WSADESCRIPTIO");#endif#ifdef WSAEMSGSIZEinscode(d, ds, de, "WSAEMSGSIZE", WSAEMSGSIZE, "Message too long");#endif#ifdef WSAEBADFinscode(d, ds, de, "WSAEBADF", WSAEBADF, "Bad file number");#endif#ifdef WSAECONNRESETinscode(d, ds, de, "WSAECONNRESET", WSAECONNRESET, "Connection reset by peer");#endif#ifdef WSAGETSELECTERROinscode(d, ds, de, "WSAGETSELECTERRO", WSAGETSELECTERRO, "Error WSAGETSELECTERRO");#endif#ifdef WSAETIMEDOUTinscode(d, ds, de, "WSAETIMEDOUT", WSAETIMEDOUT, "Connection timed out");#endif#ifdef WSAENOBUFSinscode(d, ds, de, "WSAENOBUFS", WSAENOBUFS, "No buffer space available");#endif#ifdef WSAEDISCONinscode(d, ds, de, "WSAEDISCON", WSAEDISCON, "Error WSAEDISCON");#endif#ifdef WSAEINTRinscode(d, ds, de, "WSAEINTR", WSAEINTR, "Interrupted system call");#endif#ifdef WSAEPROTOTYPEinscode(d, ds, de, "WSAEPROTOTYPE", WSAEPROTOTYPE, "Protocol wrong type for socket");#endif#ifdef WSAHOSinscode(d, ds, de, "WSAHOS", WSAHOS, "Error WSAHOS");#endif#ifdef WSAEADDRINUSEinscode(d, ds, de, "WSAEADDRINUSE", WSAEADDRINUSE, "Address already in use");#endif#ifdef WSAEADDRNOTAVAILinscode(d, ds, de, "WSAEADDRNOTAVAIL", WSAEADDRNOTAVAIL, "Cannot assign requested address");#endif#ifdef WSAEALREADYinscode(d, ds, de, "WSAEALREADY", WSAEALREADY, "Operation already in progress");#endif#ifdef WSAEPROTONOSUPPORTinscode(d, ds, de, "WSAEPROTONOSUPPORT", WSAEPROTONOSUPPORT, "Protocol not supported");#endif#ifdef WSASYSNOTREADYinscode(d, ds, de, "WSASYSNOTREADY", WSASYSNOTREADY, "Error WSASYSNOTREADY");#endif#ifdef WSAEWOULDBLOCKinscode(d, ds, de, "WSAEWOULDBLOCK", WSAEWOULDBLOCK, "Operation would block");#endif#ifdef WSAEPFNOSUPPORTinscode(d, ds, de, "WSAEPFNOSUPPORT", WSAEPFNOSUPPORT, "Protocol family not supported");#endif#ifdef WSAEOPNOTSUPPinscode(d, ds, de, "WSAEOPNOTSUPP", WSAEOPNOTSUPP, "Operation not supported on transport endpoint");#endif#ifdef WSAEISCONNinscode(d, ds, de, "WSAEISCONN", WSAEISCONN, "Transport endpoint is already connected");#endif#ifdef WSAEDQUOTinscode(d, ds, de, "WSAEDQUOT", WSAEDQUOT, "Quota exceeded");#endif#ifdef WSAENOTCONNinscode(d, ds, de, "WSAENOTCONN", WSAENOTCONN, "Transport endpoint is not connected");#endif#ifdef WSAEREMOTEinscode(d, ds, de, "WSAEREMOTE", WSAEREMOTE, "Object is remote");#endif#ifdef WSAEINVALinscode(d, ds, de, "WSAEINVAL", WSAEINVAL, "Invalid argument");#endif#ifdef WSAEINPROGRESSinscode(d, ds, de, "WSAEINPROGRESS", WSAEINPROGRESS, "Operation now in progress");#endif#ifdef WSAGETSELECTEVENinscode(d, ds, de, "WSAGETSELECTEVEN", WSAGETSELECTEVEN, "Error WSAGETSELECTEVEN");#endif#ifdef WSAESOCKTNOSUPPORTinscode(d, ds, de, "WSAESOCKTNOSUPPORT", WSAESOCKTNOSUPPORT, "Socket type not supported");#endif#ifdef WSAGETASYNCERROinscode(d, ds, de, "WSAGETASYNCERRO", WSAGETASYNCERRO, "Error WSAGETASYNCERRO");#endif#ifdef WSAMAKESELECTREPLinscode(d, ds, de, "WSAMAKESELECTREPL", WSAMAKESELECTREPL, "Error WSAMAKESELECTREPL");#endif#ifdef WSAGETASYNCBUFLEinscode(d, ds, de, "WSAGETASYNCBUFLE", WSAGETASYNCBUFLE, "Error WSAGETASYNCBUFLE");#endif#ifdef WSAEDESTADDRREQinscode(d, ds, de, "WSAEDESTADDRREQ", WSAEDESTADDRREQ, "Destination address required");#endif#ifdef WSAECONNREFUSEDinscode(d, ds, de, "WSAECONNREFUSED", WSAECONNREFUSED, "Connection refused");#endif#ifdef WSAENETRESETinscode(d, ds, de, "WSAENETRESET", WSAENETRESET, "Network dropped connection because of reset");#endif#ifdef WSANinscode(d, ds, de, "WSAN", WSAN, "Error WSAN");#endif#ifdef ENOMEDIUMinscode(d, ds, de, "ENOMEDIUM", ENOMEDIUM, "No medium found");#endif#ifdef EMEDIUMTYPEinscode(d, ds, de, "EMEDIUMTYPE", EMEDIUMTYPE, "Wrong medium type");#endif#ifdef ECANCELEDinscode(d, ds, de, "ECANCELED", ECANCELED, "Operation Canceled");#endif#ifdef ENOKEYinscode(d, ds, de, "ENOKEY", ENOKEY, "Required key not available");#endif#ifdef EKEYEXPIREDinscode(d, ds, de, "EKEYEXPIRED", EKEYEXPIRED, "Key has expired");#endif#ifdef EKEYREVOKEDinscode(d, ds, de, "EKEYREVOKED", EKEYREVOKED, "Key has been revoked");#endif#ifdef EKEYREJECTEDinscode(d, ds, de, "EKEYREJECTED", EKEYREJECTED, "Key was rejected by service");#endif#ifdef EOWNERDEADinscode(d, ds, de, "EOWNERDEAD", EOWNERDEAD, "Owner died");#endif#ifdef ENOTRECOVERABLEinscode(d, ds, de, "ENOTRECOVERABLE", ENOTRECOVERABLE, "State not recoverable");#endif#ifdef ERFKILLinscode(d, ds, de, "ERFKILL", ERFKILL, "Operation not possible due to RF-kill");#endif/* Solaris-specific errnos */#ifdef ECANCELEDinscode(d, ds, de, "ECANCELED", ECANCELED, "Operation canceled");#endif#ifdef ENOTSUPinscode(d, ds, de, "ENOTSUP", ENOTSUP, "Operation not supported");#endif#ifdef EOWNERDEADinscode(d, ds, de, "EOWNERDEAD", EOWNERDEAD, "Process died with the lock");#endif#ifdef ENOTRECOVERABLEinscode(d, ds, de, "ENOTRECOVERABLE", ENOTRECOVERABLE, "Lock is not recoverable");#endif#ifdef ELOCKUNMAPPEDinscode(d, ds, de, "ELOCKUNMAPPED", ELOCKUNMAPPED, "Locked lock was unmapped");#endif#ifdef ENOTACTIVEinscode(d, ds, de, "ENOTACTIVE", ENOTACTIVE, "Facility is not active");#endif/* MacOSX specific errnos */#ifdef EAUTHinscode(d, ds, de, "EAUTH", EAUTH, "Authentication error");#endif#ifdef EBADARCHinscode(d, ds, de, "EBADARCH", EBADARCH, "Bad CPU type in executable");#endif#ifdef EBADEXECinscode(d, ds, de, "EBADEXEC", EBADEXEC, "Bad executable (or shared library)");#endif#ifdef EBADMACHOinscode(d, ds, de, "EBADMACHO", EBADMACHO, "Malformed Mach-o file");#endif#ifdef EBADRPCinscode(d, ds, de, "EBADRPC", EBADRPC, "RPC struct is bad");#endif#ifdef EDEVERRinscode(d, ds, de, "EDEVERR", EDEVERR, "Device error");#endif#ifdef EFTYPEinscode(d, ds, de, "EFTYPE", EFTYPE, "Inappropriate file type or format");#endif#ifdef ENEEDAUTHinscode(d, ds, de, "ENEEDAUTH", ENEEDAUTH, "Need authenticator");#endif#ifdef ENOATTRinscode(d, ds, de, "ENOATTR", ENOATTR, "Attribute not found");#endif#ifdef ENOPOLICYinscode(d, ds, de, "ENOPOLICY", ENOPOLICY, "Policy not found");#endif#ifdef EPROCLIMinscode(d, ds, de, "EPROCLIM", EPROCLIM, "Too many processes");#endif#ifdef EPROCUNAVAILinscode(d, ds, de, "EPROCUNAVAIL", EPROCUNAVAIL, "Bad procedure for program");#endif#ifdef EPROGMISMATCHinscode(d, ds, de, "EPROGMISMATCH", EPROGMISMATCH, "Program version wrong");#endif#ifdef EPROGUNAVAILinscode(d, ds, de, "EPROGUNAVAIL", EPROGUNAVAIL, "RPC prog. not avail");#endif#ifdef EPWROFFinscode(d, ds, de, "EPWROFF", EPWROFF, "Device power is off");#endif#ifdef ERPCMISMATCHinscode(d, ds, de, "ERPCMISMATCH", ERPCMISMATCH, "RPC version wrong");#endif#ifdef ESHLIBVERSinscode(d, ds, de, "ESHLIBVERS", ESHLIBVERS, "Shared library version mismatch");#endifPy_DECREF(de);return m;}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。