Changeset 388 for python/vendor/current/Modules/errnomodule.c
- Timestamp:
- Mar 19, 2014, 11:11:30 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/vendor/current/Modules/errnomodule.c
r2 r388 11 11 /* 12 12 * Pull in the system error definitions 13 */ 13 */ 14 14 15 15 static PyMethodDef errno_methods[] = { 16 {NULL,NULL}16 {NULL, NULL} 17 17 }; 18 18 … … 22 22 _inscode(PyObject *d, PyObject *de, char *name, int code) 23 23 { 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 24 PyObject *u = PyString_FromString(name); 25 PyObject *v = PyInt_FromLong((long) code); 26 27 /* Don't bother checking for errors; they'll be caught at the end 28 * of the module initialization function by the caller of 29 * initerrno(). 30 */ 31 if (u && v) { 32 /* insert in modules dict */ 33 PyDict_SetItem(d, u, v); 34 /* insert in errorcode dict */ 35 PyDict_SetItem(de, v, u); 36 } 37 Py_XDECREF(u); 38 Py_XDECREF(v); 39 39 } 40 40 … … 56 56 initerrno(void) 57 57 { 58 59 60 61 62 63 64 65 58 PyObject *m, *d, *de; 59 m = Py_InitModule3("errno", errno_methods, errno__doc__); 60 if (m == NULL) 61 return; 62 d = PyModule_GetDict(m); 63 de = PyDict_New(); 64 if (!d || !de || PyDict_SetItemString(d, "errorcode", de) < 0) 65 return; 66 66 67 67 /* Macro so I don't have to edit each and every line below... */ 68 68 #define inscode(d, ds, de, name, code, comment) _inscode(d, de, name, code) 69 69 70 71 72 73 */ 70 /* 71 * The names and comments are borrowed from linux/include/errno.h, 72 * which should be pretty all-inclusive 73 */ 74 74 75 75 #ifdef ENODEV 76 76 inscode(d, ds, de, "ENODEV", ENODEV, "No such device"); 77 77 #endif 78 78 #ifdef ENOCSI 79 79 inscode(d, ds, de, "ENOCSI", ENOCSI, "No CSI structure available"); 80 80 #endif 81 81 #ifdef EHOSTUNREACH 82 82 inscode(d, ds, de, "EHOSTUNREACH", EHOSTUNREACH, "No route to host"); 83 83 #else 84 84 #ifdef WSAEHOSTUNREACH 85 85 inscode(d, ds, de, "EHOSTUNREACH", WSAEHOSTUNREACH, "No route to host"); 86 86 #endif 87 87 #endif 88 88 #ifdef ENOMSG 89 89 inscode(d, ds, de, "ENOMSG", ENOMSG, "No message of desired type"); 90 90 #endif 91 91 #ifdef EUCLEAN 92 92 inscode(d, ds, de, "EUCLEAN", EUCLEAN, "Structure needs cleaning"); 93 93 #endif 94 94 #ifdef EL2NSYNC 95 95 inscode(d, ds, de, "EL2NSYNC", EL2NSYNC, "Level 2 not synchronized"); 96 96 #endif 97 97 #ifdef EL2HLT 98 98 inscode(d, ds, de, "EL2HLT", EL2HLT, "Level 2 halted"); 99 99 #endif 100 100 #ifdef ENODATA 101 101 inscode(d, ds, de, "ENODATA", ENODATA, "No data available"); 102 102 #endif 103 103 #ifdef ENOTBLK 104 104 inscode(d, ds, de, "ENOTBLK", ENOTBLK, "Block device required"); 105 105 #endif 106 106 #ifdef ENOSYS 107 107 inscode(d, ds, de, "ENOSYS", ENOSYS, "Function not implemented"); 108 108 #endif 109 109 #ifdef EPIPE 110 110 inscode(d, ds, de, "EPIPE", EPIPE, "Broken pipe"); 111 111 #endif 112 112 #ifdef EINVAL 113 113 inscode(d, ds, de, "EINVAL", EINVAL, "Invalid argument"); 114 114 #else 115 115 #ifdef WSAEINVAL 116 116 inscode(d, ds, de, "EINVAL", WSAEINVAL, "Invalid argument"); 117 117 #endif 118 118 #endif 119 119 #ifdef EOVERFLOW 120 120 inscode(d, ds, de, "EOVERFLOW", EOVERFLOW, "Value too large for defined data type"); 121 121 #endif 122 122 #ifdef EADV 123 123 inscode(d, ds, de, "EADV", EADV, "Advertise error"); 124 124 #endif 125 125 #ifdef EINTR 126 126 inscode(d, ds, de, "EINTR", EINTR, "Interrupted system call"); 127 127 #else 128 128 #ifdef WSAEINTR 129 129 inscode(d, ds, de, "EINTR", WSAEINTR, "Interrupted system call"); 130 130 #endif 131 131 #endif 132 132 #ifdef EUSERS 133 133 inscode(d, ds, de, "EUSERS", EUSERS, "Too many users"); 134 134 #else 135 135 #ifdef WSAEUSERS 136 136 inscode(d, ds, de, "EUSERS", WSAEUSERS, "Too many users"); 137 137 #endif 138 138 #endif 139 139 #ifdef ENOTEMPTY 140 140 inscode(d, ds, de, "ENOTEMPTY", ENOTEMPTY, "Directory not empty"); 141 141 #else 142 142 #ifdef WSAENOTEMPTY 143 143 inscode(d, ds, de, "ENOTEMPTY", WSAENOTEMPTY, "Directory not empty"); 144 144 #endif 145 145 #endif 146 146 #ifdef ENOBUFS 147 147 inscode(d, ds, de, "ENOBUFS", ENOBUFS, "No buffer space available"); 148 148 #else 149 149 #ifdef WSAENOBUFS 150 150 inscode(d, ds, de, "ENOBUFS", WSAENOBUFS, "No buffer space available"); 151 151 #endif 152 152 #endif 153 153 #ifdef EPROTO 154 154 inscode(d, ds, de, "EPROTO", EPROTO, "Protocol error"); 155 155 #endif 156 156 #ifdef EREMOTE 157 157 inscode(d, ds, de, "EREMOTE", EREMOTE, "Object is remote"); 158 158 #else 159 159 #ifdef WSAEREMOTE 160 160 inscode(d, ds, de, "EREMOTE", WSAEREMOTE, "Object is remote"); 161 161 #endif 162 162 #endif 163 163 #ifdef ENAVAIL 164 164 inscode(d, ds, de, "ENAVAIL", ENAVAIL, "No XENIX semaphores available"); 165 165 #endif 166 166 #ifdef ECHILD 167 167 inscode(d, ds, de, "ECHILD", ECHILD, "No child processes"); 168 168 #endif 169 169 #ifdef ELOOP 170 170 inscode(d, ds, de, "ELOOP", ELOOP, "Too many symbolic links encountered"); 171 171 #else 172 172 #ifdef WSAELOOP 173 173 inscode(d, ds, de, "ELOOP", WSAELOOP, "Too many symbolic links encountered"); 174 174 #endif 175 175 #endif 176 176 #ifdef EXDEV 177 177 inscode(d, ds, de, "EXDEV", EXDEV, "Cross-device link"); 178 178 #endif 179 179 #ifdef E2BIG 180 180 inscode(d, ds, de, "E2BIG", E2BIG, "Arg list too long"); 181 181 #endif 182 182 #ifdef ESRCH 183 183 inscode(d, ds, de, "ESRCH", ESRCH, "No such process"); 184 184 #endif 185 185 #ifdef EMSGSIZE 186 186 inscode(d, ds, de, "EMSGSIZE", EMSGSIZE, "Message too long"); 187 187 #else 188 188 #ifdef WSAEMSGSIZE 189 189 inscode(d, ds, de, "EMSGSIZE", WSAEMSGSIZE, "Message too long"); 190 190 #endif 191 191 #endif 192 192 #ifdef EAFNOSUPPORT 193 193 inscode(d, ds, de, "EAFNOSUPPORT", EAFNOSUPPORT, "Address family not supported by protocol"); 194 194 #else 195 195 #ifdef WSAEAFNOSUPPORT 196 196 inscode(d, ds, de, "EAFNOSUPPORT", WSAEAFNOSUPPORT, "Address family not supported by protocol"); 197 197 #endif 198 198 #endif 199 199 #ifdef EBADR 200 200 inscode(d, ds, de, "EBADR", EBADR, "Invalid request descriptor"); 201 201 #endif 202 202 #ifdef EHOSTDOWN 203 203 inscode(d, ds, de, "EHOSTDOWN", EHOSTDOWN, "Host is down"); 204 204 #else 205 205 #ifdef WSAEHOSTDOWN 206 206 inscode(d, ds, de, "EHOSTDOWN", WSAEHOSTDOWN, "Host is down"); 207 207 #endif 208 208 #endif 209 209 #ifdef EPFNOSUPPORT 210 210 inscode(d, ds, de, "EPFNOSUPPORT", EPFNOSUPPORT, "Protocol family not supported"); 211 211 #else 212 212 #ifdef WSAEPFNOSUPPORT 213 213 inscode(d, ds, de, "EPFNOSUPPORT", WSAEPFNOSUPPORT, "Protocol family not supported"); 214 214 #endif 215 215 #endif 216 216 #ifdef ENOPROTOOPT 217 217 inscode(d, ds, de, "ENOPROTOOPT", ENOPROTOOPT, "Protocol not available"); 218 218 #else 219 219 #ifdef WSAENOPROTOOPT 220 220 inscode(d, ds, de, "ENOPROTOOPT", WSAENOPROTOOPT, "Protocol not available"); 221 221 #endif 222 222 #endif 223 223 #ifdef EBUSY 224 224 inscode(d, ds, de, "EBUSY", EBUSY, "Device or resource busy"); 225 225 #endif 226 226 #ifdef EWOULDBLOCK 227 227 inscode(d, ds, de, "EWOULDBLOCK", EWOULDBLOCK, "Operation would block"); 228 228 #else 229 229 #ifdef WSAEWOULDBLOCK 230 230 inscode(d, ds, de, "EWOULDBLOCK", WSAEWOULDBLOCK, "Operation would block"); 231 231 #endif 232 232 #endif 233 233 #ifdef EBADFD 234 234 inscode(d, ds, de, "EBADFD", EBADFD, "File descriptor in bad state"); 235 235 #endif 236 236 #ifdef EDOTDOT 237 237 inscode(d, ds, de, "EDOTDOT", EDOTDOT, "RFS specific error"); 238 238 #endif 239 239 #ifdef EISCONN 240 240 inscode(d, ds, de, "EISCONN", EISCONN, "Transport endpoint is already connected"); 241 241 #else 242 242 #ifdef WSAEISCONN 243 243 inscode(d, ds, de, "EISCONN", WSAEISCONN, "Transport endpoint is already connected"); 244 244 #endif 245 245 #endif 246 246 #ifdef ENOANO 247 247 inscode(d, ds, de, "ENOANO", ENOANO, "No anode"); 248 248 #endif 249 249 #ifdef ESHUTDOWN 250 250 inscode(d, ds, de, "ESHUTDOWN", ESHUTDOWN, "Cannot send after transport endpoint shutdown"); 251 251 #else 252 252 #ifdef WSAESHUTDOWN 253 253 inscode(d, ds, de, "ESHUTDOWN", WSAESHUTDOWN, "Cannot send after transport endpoint shutdown"); 254 254 #endif 255 255 #endif 256 256 #ifdef ECHRNG 257 257 inscode(d, ds, de, "ECHRNG", ECHRNG, "Channel number out of range"); 258 258 #endif 259 259 #ifdef ELIBBAD 260 260 inscode(d, ds, de, "ELIBBAD", ELIBBAD, "Accessing a corrupted shared library"); 261 261 #endif 262 262 #ifdef ENONET 263 263 inscode(d, ds, de, "ENONET", ENONET, "Machine is not on the network"); 264 264 #endif 265 265 #ifdef EBADE 266 266 inscode(d, ds, de, "EBADE", EBADE, "Invalid exchange"); 267 267 #endif 268 268 #ifdef EBADF 269 269 inscode(d, ds, de, "EBADF", EBADF, "Bad file number"); 270 270 #else 271 271 #ifdef WSAEBADF 272 272 inscode(d, ds, de, "EBADF", WSAEBADF, "Bad file number"); 273 273 #endif 274 274 #endif 275 275 #ifdef EMULTIHOP 276 276 inscode(d, ds, de, "EMULTIHOP", EMULTIHOP, "Multihop attempted"); 277 277 #endif 278 278 #ifdef EIO 279 279 inscode(d, ds, de, "EIO", EIO, "I/O error"); 280 280 #endif 281 281 #ifdef EUNATCH 282 282 inscode(d, ds, de, "EUNATCH", EUNATCH, "Protocol driver not attached"); 283 283 #endif 284 284 #ifdef EPROTOTYPE 285 285 inscode(d, ds, de, "EPROTOTYPE", EPROTOTYPE, "Protocol wrong type for socket"); 286 286 #else 287 287 #ifdef WSAEPROTOTYPE 288 288 inscode(d, ds, de, "EPROTOTYPE", WSAEPROTOTYPE, "Protocol wrong type for socket"); 289 289 #endif 290 290 #endif 291 291 #ifdef ENOSPC 292 292 inscode(d, ds, de, "ENOSPC", ENOSPC, "No space left on device"); 293 293 #endif 294 294 #ifdef ENOEXEC 295 295 inscode(d, ds, de, "ENOEXEC", ENOEXEC, "Exec format error"); 296 296 #endif 297 297 #ifdef EALREADY 298 298 inscode(d, ds, de, "EALREADY", EALREADY, "Operation already in progress"); 299 299 #else 300 300 #ifdef WSAEALREADY 301 301 inscode(d, ds, de, "EALREADY", WSAEALREADY, "Operation already in progress"); 302 302 #endif 303 303 #endif 304 304 #ifdef ENETDOWN 305 305 inscode(d, ds, de, "ENETDOWN", ENETDOWN, "Network is down"); 306 306 #else 307 307 #ifdef WSAENETDOWN 308 308 inscode(d, ds, de, "ENETDOWN", WSAENETDOWN, "Network is down"); 309 309 #endif 310 310 #endif 311 311 #ifdef ENOTNAM 312 312 inscode(d, ds, de, "ENOTNAM", ENOTNAM, "Not a XENIX named type file"); 313 313 #endif 314 314 #ifdef EACCES 315 315 inscode(d, ds, de, "EACCES", EACCES, "Permission denied"); 316 316 #else 317 317 #ifdef WSAEACCES 318 318 inscode(d, ds, de, "EACCES", WSAEACCES, "Permission denied"); 319 319 #endif 320 320 #endif 321 321 #ifdef ELNRNG 322 322 inscode(d, ds, de, "ELNRNG", ELNRNG, "Link number out of range"); 323 323 #endif 324 324 #ifdef EILSEQ 325 325 inscode(d, ds, de, "EILSEQ", EILSEQ, "Illegal byte sequence"); 326 326 #endif 327 327 #ifdef ENOTDIR 328 328 inscode(d, ds, de, "ENOTDIR", ENOTDIR, "Not a directory"); 329 329 #endif 330 330 #ifdef ENOTUNIQ 331 331 inscode(d, ds, de, "ENOTUNIQ", ENOTUNIQ, "Name not unique on network"); 332 332 #endif 333 333 #ifdef EPERM 334 334 inscode(d, ds, de, "EPERM", EPERM, "Operation not permitted"); 335 335 #endif 336 336 #ifdef EDOM 337 337 inscode(d, ds, de, "EDOM", EDOM, "Math argument out of domain of func"); 338 338 #endif 339 339 #ifdef EXFULL 340 340 inscode(d, ds, de, "EXFULL", EXFULL, "Exchange full"); 341 341 #endif 342 342 #ifdef ECONNREFUSED 343 343 inscode(d, ds, de, "ECONNREFUSED", ECONNREFUSED, "Connection refused"); 344 344 #else 345 345 #ifdef WSAECONNREFUSED 346 346 inscode(d, ds, de, "ECONNREFUSED", WSAECONNREFUSED, "Connection refused"); 347 347 #endif 348 348 #endif 349 349 #ifdef EISDIR 350 350 inscode(d, ds, de, "EISDIR", EISDIR, "Is a directory"); 351 351 #endif 352 352 #ifdef EPROTONOSUPPORT 353 353 inscode(d, ds, de, "EPROTONOSUPPORT", EPROTONOSUPPORT, "Protocol not supported"); 354 354 #else 355 355 #ifdef WSAEPROTONOSUPPORT 356 356 inscode(d, ds, de, "EPROTONOSUPPORT", WSAEPROTONOSUPPORT, "Protocol not supported"); 357 357 #endif 358 358 #endif 359 359 #ifdef EROFS 360 360 inscode(d, ds, de, "EROFS", EROFS, "Read-only file system"); 361 361 #endif 362 362 #ifdef EADDRNOTAVAIL 363 363 inscode(d, ds, de, "EADDRNOTAVAIL", EADDRNOTAVAIL, "Cannot assign requested address"); 364 364 #else 365 365 #ifdef WSAEADDRNOTAVAIL 366 366 inscode(d, ds, de, "EADDRNOTAVAIL", WSAEADDRNOTAVAIL, "Cannot assign requested address"); 367 367 #endif 368 368 #endif 369 369 #ifdef EIDRM 370 370 inscode(d, ds, de, "EIDRM", EIDRM, "Identifier removed"); 371 371 #endif 372 372 #ifdef ECOMM 373 373 inscode(d, ds, de, "ECOMM", ECOMM, "Communication error on send"); 374 374 #endif 375 375 #ifdef ESRMNT 376 376 inscode(d, ds, de, "ESRMNT", ESRMNT, "Srmount error"); 377 377 #endif 378 378 #ifdef EREMOTEIO 379 379 inscode(d, ds, de, "EREMOTEIO", EREMOTEIO, "Remote I/O error"); 380 380 #endif 381 381 #ifdef EL3RST 382 382 inscode(d, ds, de, "EL3RST", EL3RST, "Level 3 reset"); 383 383 #endif 384 384 #ifdef EBADMSG 385 385 inscode(d, ds, de, "EBADMSG", EBADMSG, "Not a data message"); 386 386 #endif 387 387 #ifdef ENFILE 388 388 inscode(d, ds, de, "ENFILE", ENFILE, "File table overflow"); 389 389 #endif 390 390 #ifdef ELIBMAX 391 391 inscode(d, ds, de, "ELIBMAX", ELIBMAX, "Attempting to link in too many shared libraries"); 392 392 #endif 393 393 #ifdef ESPIPE 394 394 inscode(d, ds, de, "ESPIPE", ESPIPE, "Illegal seek"); 395 395 #endif 396 396 #ifdef ENOLINK 397 397 inscode(d, ds, de, "ENOLINK", ENOLINK, "Link has been severed"); 398 398 #endif 399 399 #ifdef ENETRESET 400 400 inscode(d, ds, de, "ENETRESET", ENETRESET, "Network dropped connection because of reset"); 401 401 #else 402 402 #ifdef WSAENETRESET 403 403 inscode(d, ds, de, "ENETRESET", WSAENETRESET, "Network dropped connection because of reset"); 404 404 #endif 405 405 #endif 406 406 #ifdef ETIMEDOUT 407 407 inscode(d, ds, de, "ETIMEDOUT", ETIMEDOUT, "Connection timed out"); 408 408 #else 409 409 #ifdef WSAETIMEDOUT 410 410 inscode(d, ds, de, "ETIMEDOUT", WSAETIMEDOUT, "Connection timed out"); 411 411 #endif 412 412 #endif 413 413 #ifdef ENOENT 414 414 inscode(d, ds, de, "ENOENT", ENOENT, "No such file or directory"); 415 415 #endif 416 416 #ifdef EEXIST 417 417 inscode(d, ds, de, "EEXIST", EEXIST, "File exists"); 418 418 #endif 419 419 #ifdef EDQUOT 420 420 inscode(d, ds, de, "EDQUOT", EDQUOT, "Quota exceeded"); 421 421 #else 422 422 #ifdef WSAEDQUOT 423 423 inscode(d, ds, de, "EDQUOT", WSAEDQUOT, "Quota exceeded"); 424 424 #endif 425 425 #endif 426 426 #ifdef ENOSTR 427 427 inscode(d, ds, de, "ENOSTR", ENOSTR, "Device not a stream"); 428 428 #endif 429 429 #ifdef EBADSLT 430 430 inscode(d, ds, de, "EBADSLT", EBADSLT, "Invalid slot"); 431 431 #endif 432 432 #ifdef EBADRQC 433 433 inscode(d, ds, de, "EBADRQC", EBADRQC, "Invalid request code"); 434 434 #endif 435 435 #ifdef ELIBACC 436 436 inscode(d, ds, de, "ELIBACC", ELIBACC, "Can not access a needed shared library"); 437 437 #endif 438 438 #ifdef EFAULT 439 439 inscode(d, ds, de, "EFAULT", EFAULT, "Bad address"); 440 440 #else 441 441 #ifdef WSAEFAULT 442 442 inscode(d, ds, de, "EFAULT", WSAEFAULT, "Bad address"); 443 443 #endif 444 444 #endif 445 445 #ifdef EFBIG 446 446 inscode(d, ds, de, "EFBIG", EFBIG, "File too large"); 447 447 #endif 448 448 #ifdef EDEADLK 449 449 inscode(d, ds, de, "EDEADLK", EDEADLK, "Resource deadlock would occur"); 450 450 #endif 451 451 #ifdef ENOTCONN 452 452 inscode(d, ds, de, "ENOTCONN", ENOTCONN, "Transport endpoint is not connected"); 453 453 #else 454 454 #ifdef WSAENOTCONN 455 455 inscode(d, ds, de, "ENOTCONN", WSAENOTCONN, "Transport endpoint is not connected"); 456 456 #endif 457 457 #endif 458 458 #ifdef EDESTADDRREQ 459 459 inscode(d, ds, de, "EDESTADDRREQ", EDESTADDRREQ, "Destination address required"); 460 460 #else 461 461 #ifdef WSAEDESTADDRREQ 462 462 inscode(d, ds, de, "EDESTADDRREQ", WSAEDESTADDRREQ, "Destination address required"); 463 463 #endif 464 464 #endif 465 465 #ifdef ELIBSCN 466 466 inscode(d, ds, de, "ELIBSCN", ELIBSCN, ".lib section in a.out corrupted"); 467 467 #endif 468 468 #ifdef ENOLCK 469 469 inscode(d, ds, de, "ENOLCK", ENOLCK, "No record locks available"); 470 470 #endif 471 471 #ifdef EISNAM 472 472 inscode(d, ds, de, "EISNAM", EISNAM, "Is a named type file"); 473 473 #endif 474 474 #ifdef ECONNABORTED 475 475 inscode(d, ds, de, "ECONNABORTED", ECONNABORTED, "Software caused connection abort"); 476 476 #else 477 477 #ifdef WSAECONNABORTED 478 478 inscode(d, ds, de, "ECONNABORTED", WSAECONNABORTED, "Software caused connection abort"); 479 479 #endif 480 480 #endif 481 481 #ifdef ENETUNREACH 482 482 inscode(d, ds, de, "ENETUNREACH", ENETUNREACH, "Network is unreachable"); 483 483 #else 484 484 #ifdef WSAENETUNREACH 485 485 inscode(d, ds, de, "ENETUNREACH", WSAENETUNREACH, "Network is unreachable"); 486 486 #endif 487 487 #endif 488 488 #ifdef ESTALE 489 489 inscode(d, ds, de, "ESTALE", ESTALE, "Stale NFS file handle"); 490 490 #else 491 491 #ifdef WSAESTALE 492 492 inscode(d, ds, de, "ESTALE", WSAESTALE, "Stale NFS file handle"); 493 493 #endif 494 494 #endif 495 495 #ifdef ENOSR 496 496 inscode(d, ds, de, "ENOSR", ENOSR, "Out of streams resources"); 497 497 #endif 498 498 #ifdef ENOMEM 499 499 inscode(d, ds, de, "ENOMEM", ENOMEM, "Out of memory"); 500 500 #endif 501 501 #ifdef ENOTSOCK 502 502 inscode(d, ds, de, "ENOTSOCK", ENOTSOCK, "Socket operation on non-socket"); 503 503 #else 504 504 #ifdef WSAENOTSOCK 505 505 inscode(d, ds, de, "ENOTSOCK", WSAENOTSOCK, "Socket operation on non-socket"); 506 506 #endif 507 507 #endif 508 508 #ifdef ESTRPIPE 509 509 inscode(d, ds, de, "ESTRPIPE", ESTRPIPE, "Streams pipe error"); 510 510 #endif 511 511 #ifdef EMLINK 512 512 inscode(d, ds, de, "EMLINK", EMLINK, "Too many links"); 513 513 #endif 514 514 #ifdef ERANGE 515 515 inscode(d, ds, de, "ERANGE", ERANGE, "Math result not representable"); 516 516 #endif 517 517 #ifdef ELIBEXEC 518 518 inscode(d, ds, de, "ELIBEXEC", ELIBEXEC, "Cannot exec a shared library directly"); 519 519 #endif 520 520 #ifdef EL3HLT 521 521 inscode(d, ds, de, "EL3HLT", EL3HLT, "Level 3 halted"); 522 522 #endif 523 523 #ifdef ECONNRESET 524 524 inscode(d, ds, de, "ECONNRESET", ECONNRESET, "Connection reset by peer"); 525 525 #else 526 526 #ifdef WSAECONNRESET 527 527 inscode(d, ds, de, "ECONNRESET", WSAECONNRESET, "Connection reset by peer"); 528 528 #endif 529 529 #endif 530 530 #ifdef EADDRINUSE 531 531 inscode(d, ds, de, "EADDRINUSE", EADDRINUSE, "Address already in use"); 532 532 #else 533 533 #ifdef WSAEADDRINUSE 534 534 inscode(d, ds, de, "EADDRINUSE", WSAEADDRINUSE, "Address already in use"); 535 535 #endif 536 536 #endif 537 537 #ifdef EOPNOTSUPP 538 538 inscode(d, ds, de, "EOPNOTSUPP", EOPNOTSUPP, "Operation not supported on transport endpoint"); 539 539 #else 540 540 #ifdef WSAEOPNOTSUPP 541 541 inscode(d, ds, de, "EOPNOTSUPP", WSAEOPNOTSUPP, "Operation not supported on transport endpoint"); 542 542 #endif 543 543 #endif 544 544 #ifdef EREMCHG 545 545 inscode(d, ds, de, "EREMCHG", EREMCHG, "Remote address changed"); 546 546 #endif 547 547 #ifdef EAGAIN 548 548 inscode(d, ds, de, "EAGAIN", EAGAIN, "Try again"); 549 549 #endif 550 550 #ifdef ENAMETOOLONG 551 551 inscode(d, ds, de, "ENAMETOOLONG", ENAMETOOLONG, "File name too long"); 552 552 #else 553 553 #ifdef WSAENAMETOOLONG 554 554 inscode(d, ds, de, "ENAMETOOLONG", WSAENAMETOOLONG, "File name too long"); 555 555 #endif 556 556 #endif 557 557 #ifdef ENOTTY 558 558 inscode(d, ds, de, "ENOTTY", ENOTTY, "Not a typewriter"); 559 559 #endif 560 560 #ifdef ERESTART 561 561 inscode(d, ds, de, "ERESTART", ERESTART, "Interrupted system call should be restarted"); 562 562 #endif 563 563 #ifdef ESOCKTNOSUPPORT 564 564 inscode(d, ds, de, "ESOCKTNOSUPPORT", ESOCKTNOSUPPORT, "Socket type not supported"); 565 565 #else 566 566 #ifdef WSAESOCKTNOSUPPORT 567 567 inscode(d, ds, de, "ESOCKTNOSUPPORT", WSAESOCKTNOSUPPORT, "Socket type not supported"); 568 568 #endif 569 569 #endif 570 570 #ifdef ETIME 571 571 inscode(d, ds, de, "ETIME", ETIME, "Timer expired"); 572 572 #endif 573 573 #ifdef EBFONT 574 574 inscode(d, ds, de, "EBFONT", EBFONT, "Bad font file format"); 575 575 #endif 576 576 #ifdef EDEADLOCK 577 577 inscode(d, ds, de, "EDEADLOCK", EDEADLOCK, "Error EDEADLOCK"); 578 578 #endif 579 579 #ifdef ETOOMANYREFS 580 580 inscode(d, ds, de, "ETOOMANYREFS", ETOOMANYREFS, "Too many references: cannot splice"); 581 581 #else 582 582 #ifdef WSAETOOMANYREFS 583 583 inscode(d, ds, de, "ETOOMANYREFS", WSAETOOMANYREFS, "Too many references: cannot splice"); 584 584 #endif 585 585 #endif 586 586 #ifdef EMFILE 587 587 inscode(d, ds, de, "EMFILE", EMFILE, "Too many open files"); 588 588 #else 589 589 #ifdef WSAEMFILE 590 590 inscode(d, ds, de, "EMFILE", WSAEMFILE, "Too many open files"); 591 591 #endif 592 592 #endif 593 593 #ifdef ETXTBSY 594 594 inscode(d, ds, de, "ETXTBSY", ETXTBSY, "Text file busy"); 595 595 #endif 596 596 #ifdef EINPROGRESS 597 597 inscode(d, ds, de, "EINPROGRESS", EINPROGRESS, "Operation now in progress"); 598 598 #else 599 599 #ifdef WSAEINPROGRESS 600 600 inscode(d, ds, de, "EINPROGRESS", WSAEINPROGRESS, "Operation now in progress"); 601 601 #endif 602 602 #endif 603 603 #ifdef ENXIO 604 604 inscode(d, ds, de, "ENXIO", ENXIO, "No such device or address"); 605 605 #endif 606 606 #ifdef ENOPKG 607 607 inscode(d, ds, de, "ENOPKG", ENOPKG, "Package not installed"); 608 608 #endif 609 609 #ifdef WSASY 610 610 inscode(d, ds, de, "WSASY", WSASY, "Error WSASY"); 611 611 #endif 612 612 #ifdef WSAEHOSTDOWN 613 613 inscode(d, ds, de, "WSAEHOSTDOWN", WSAEHOSTDOWN, "Host is down"); 614 614 #endif 615 615 #ifdef WSAENETDOWN 616 616 inscode(d, ds, de, "WSAENETDOWN", WSAENETDOWN, "Network is down"); 617 617 #endif 618 618 #ifdef WSAENOTSOCK 619 619 inscode(d, ds, de, "WSAENOTSOCK", WSAENOTSOCK, "Socket operation on non-socket"); 620 620 #endif 621 621 #ifdef WSAEHOSTUNREACH 622 622 inscode(d, ds, de, "WSAEHOSTUNREACH", WSAEHOSTUNREACH, "No route to host"); 623 623 #endif 624 624 #ifdef WSAELOOP 625 625 inscode(d, ds, de, "WSAELOOP", WSAELOOP, "Too many symbolic links encountered"); 626 626 #endif 627 627 #ifdef WSAEMFILE 628 628 inscode(d, ds, de, "WSAEMFILE", WSAEMFILE, "Too many open files"); 629 629 #endif 630 630 #ifdef WSAESTALE 631 631 inscode(d, ds, de, "WSAESTALE", WSAESTALE, "Stale NFS file handle"); 632 632 #endif 633 633 #ifdef WSAVERNOTSUPPORTED 634 634 inscode(d, ds, de, "WSAVERNOTSUPPORTED", WSAVERNOTSUPPORTED, "Error WSAVERNOTSUPPORTED"); 635 635 #endif 636 636 #ifdef WSAENETUNREACH 637 637 inscode(d, ds, de, "WSAENETUNREACH", WSAENETUNREACH, "Network is unreachable"); 638 638 #endif 639 639 #ifdef WSAEPROCLIM 640 640 inscode(d, ds, de, "WSAEPROCLIM", WSAEPROCLIM, "Error WSAEPROCLIM"); 641 641 #endif 642 642 #ifdef WSAEFAULT 643 643 inscode(d, ds, de, "WSAEFAULT", WSAEFAULT, "Bad address"); 644 644 #endif 645 645 #ifdef WSANOTINITIALISED 646 646 inscode(d, ds, de, "WSANOTINITIALISED", WSANOTINITIALISED, "Error WSANOTINITIALISED"); 647 647 #endif 648 648 #ifdef WSAEUSERS 649 649 inscode(d, ds, de, "WSAEUSERS", WSAEUSERS, "Too many users"); 650 650 #endif 651 651 #ifdef WSAMAKEASYNCREPL 652 652 inscode(d, ds, de, "WSAMAKEASYNCREPL", WSAMAKEASYNCREPL, "Error WSAMAKEASYNCREPL"); 653 653 #endif 654 654 #ifdef WSAENOPROTOOPT 655 655 inscode(d, ds, de, "WSAENOPROTOOPT", WSAENOPROTOOPT, "Protocol not available"); 656 656 #endif 657 657 #ifdef WSAECONNABORTED 658 658 inscode(d, ds, de, "WSAECONNABORTED", WSAECONNABORTED, "Software caused connection abort"); 659 659 #endif 660 660 #ifdef WSAENAMETOOLONG 661 661 inscode(d, ds, de, "WSAENAMETOOLONG", WSAENAMETOOLONG, "File name too long"); 662 662 #endif 663 663 #ifdef WSAENOTEMPTY 664 664 inscode(d, ds, de, "WSAENOTEMPTY", WSAENOTEMPTY, "Directory not empty"); 665 665 #endif 666 666 #ifdef WSAESHUTDOWN 667 667 inscode(d, ds, de, "WSAESHUTDOWN", WSAESHUTDOWN, "Cannot send after transport endpoint shutdown"); 668 668 #endif 669 669 #ifdef WSAEAFNOSUPPORT 670 670 inscode(d, ds, de, "WSAEAFNOSUPPORT", WSAEAFNOSUPPORT, "Address family not supported by protocol"); 671 671 #endif 672 672 #ifdef WSAETOOMANYREFS 673 673 inscode(d, ds, de, "WSAETOOMANYREFS", WSAETOOMANYREFS, "Too many references: cannot splice"); 674 674 #endif 675 675 #ifdef WSAEACCES 676 676 inscode(d, ds, de, "WSAEACCES", WSAEACCES, "Permission denied"); 677 677 #endif 678 678 #ifdef WSATR 679 679 inscode(d, ds, de, "WSATR", WSATR, "Error WSATR"); 680 680 #endif 681 681 #ifdef WSABASEERR 682 682 inscode(d, ds, de, "WSABASEERR", WSABASEERR, "Error WSABASEERR"); 683 683 #endif 684 684 #ifdef WSADESCRIPTIO 685 685 inscode(d, ds, de, "WSADESCRIPTIO", WSADESCRIPTIO, "Error WSADESCRIPTIO"); 686 686 #endif 687 687 #ifdef WSAEMSGSIZE 688 688 inscode(d, ds, de, "WSAEMSGSIZE", WSAEMSGSIZE, "Message too long"); 689 689 #endif 690 690 #ifdef WSAEBADF 691 691 inscode(d, ds, de, "WSAEBADF", WSAEBADF, "Bad file number"); 692 692 #endif 693 693 #ifdef WSAECONNRESET 694 694 inscode(d, ds, de, "WSAECONNRESET", WSAECONNRESET, "Connection reset by peer"); 695 695 #endif 696 696 #ifdef WSAGETSELECTERRO 697 697 inscode(d, ds, de, "WSAGETSELECTERRO", WSAGETSELECTERRO, "Error WSAGETSELECTERRO"); 698 698 #endif 699 699 #ifdef WSAETIMEDOUT 700 700 inscode(d, ds, de, "WSAETIMEDOUT", WSAETIMEDOUT, "Connection timed out"); 701 701 #endif 702 702 #ifdef WSAENOBUFS 703 703 inscode(d, ds, de, "WSAENOBUFS", WSAENOBUFS, "No buffer space available"); 704 704 #endif 705 705 #ifdef WSAEDISCON 706 706 inscode(d, ds, de, "WSAEDISCON", WSAEDISCON, "Error WSAEDISCON"); 707 707 #endif 708 708 #ifdef WSAEINTR 709 709 inscode(d, ds, de, "WSAEINTR", WSAEINTR, "Interrupted system call"); 710 710 #endif 711 711 #ifdef WSAEPROTOTYPE 712 712 inscode(d, ds, de, "WSAEPROTOTYPE", WSAEPROTOTYPE, "Protocol wrong type for socket"); 713 713 #endif 714 714 #ifdef WSAHOS 715 715 inscode(d, ds, de, "WSAHOS", WSAHOS, "Error WSAHOS"); 716 716 #endif 717 717 #ifdef WSAEADDRINUSE 718 718 inscode(d, ds, de, "WSAEADDRINUSE", WSAEADDRINUSE, "Address already in use"); 719 719 #endif 720 720 #ifdef WSAEADDRNOTAVAIL 721 721 inscode(d, ds, de, "WSAEADDRNOTAVAIL", WSAEADDRNOTAVAIL, "Cannot assign requested address"); 722 722 #endif 723 723 #ifdef WSAEALREADY 724 724 inscode(d, ds, de, "WSAEALREADY", WSAEALREADY, "Operation already in progress"); 725 725 #endif 726 726 #ifdef WSAEPROTONOSUPPORT 727 727 inscode(d, ds, de, "WSAEPROTONOSUPPORT", WSAEPROTONOSUPPORT, "Protocol not supported"); 728 728 #endif 729 729 #ifdef WSASYSNOTREADY 730 730 inscode(d, ds, de, "WSASYSNOTREADY", WSASYSNOTREADY, "Error WSASYSNOTREADY"); 731 731 #endif 732 732 #ifdef WSAEWOULDBLOCK 733 733 inscode(d, ds, de, "WSAEWOULDBLOCK", WSAEWOULDBLOCK, "Operation would block"); 734 734 #endif 735 735 #ifdef WSAEPFNOSUPPORT 736 736 inscode(d, ds, de, "WSAEPFNOSUPPORT", WSAEPFNOSUPPORT, "Protocol family not supported"); 737 737 #endif 738 738 #ifdef WSAEOPNOTSUPP 739 739 inscode(d, ds, de, "WSAEOPNOTSUPP", WSAEOPNOTSUPP, "Operation not supported on transport endpoint"); 740 740 #endif 741 741 #ifdef WSAEISCONN 742 742 inscode(d, ds, de, "WSAEISCONN", WSAEISCONN, "Transport endpoint is already connected"); 743 743 #endif 744 744 #ifdef WSAEDQUOT 745 745 inscode(d, ds, de, "WSAEDQUOT", WSAEDQUOT, "Quota exceeded"); 746 746 #endif 747 747 #ifdef WSAENOTCONN 748 748 inscode(d, ds, de, "WSAENOTCONN", WSAENOTCONN, "Transport endpoint is not connected"); 749 749 #endif 750 750 #ifdef WSAEREMOTE 751 751 inscode(d, ds, de, "WSAEREMOTE", WSAEREMOTE, "Object is remote"); 752 752 #endif 753 753 #ifdef WSAEINVAL 754 754 inscode(d, ds, de, "WSAEINVAL", WSAEINVAL, "Invalid argument"); 755 755 #endif 756 756 #ifdef WSAEINPROGRESS 757 757 inscode(d, ds, de, "WSAEINPROGRESS", WSAEINPROGRESS, "Operation now in progress"); 758 758 #endif 759 759 #ifdef WSAGETSELECTEVEN 760 760 inscode(d, ds, de, "WSAGETSELECTEVEN", WSAGETSELECTEVEN, "Error WSAGETSELECTEVEN"); 761 761 #endif 762 762 #ifdef WSAESOCKTNOSUPPORT 763 763 inscode(d, ds, de, "WSAESOCKTNOSUPPORT", WSAESOCKTNOSUPPORT, "Socket type not supported"); 764 764 #endif 765 765 #ifdef WSAGETASYNCERRO 766 766 inscode(d, ds, de, "WSAGETASYNCERRO", WSAGETASYNCERRO, "Error WSAGETASYNCERRO"); 767 767 #endif 768 768 #ifdef WSAMAKESELECTREPL 769 769 inscode(d, ds, de, "WSAMAKESELECTREPL", WSAMAKESELECTREPL, "Error WSAMAKESELECTREPL"); 770 770 #endif 771 771 #ifdef WSAGETASYNCBUFLE 772 772 inscode(d, ds, de, "WSAGETASYNCBUFLE", WSAGETASYNCBUFLE, "Error WSAGETASYNCBUFLE"); 773 773 #endif 774 774 #ifdef WSAEDESTADDRREQ 775 775 inscode(d, ds, de, "WSAEDESTADDRREQ", WSAEDESTADDRREQ, "Destination address required"); 776 776 #endif 777 777 #ifdef WSAECONNREFUSED 778 778 inscode(d, ds, de, "WSAECONNREFUSED", WSAECONNREFUSED, "Connection refused"); 779 779 #endif 780 780 #ifdef WSAENETRESET 781 781 inscode(d, ds, de, "WSAENETRESET", WSAENETRESET, "Network dropped connection because of reset"); 782 782 #endif 783 783 #ifdef WSAN 784 inscode(d, ds, de, "WSAN", WSAN, "Error WSAN"); 785 #endif 786 787 Py_DECREF(de); 784 inscode(d, ds, de, "WSAN", WSAN, "Error WSAN"); 785 #endif 786 #ifdef ENOTSUP 787 inscode(d, ds, de, "ENOTSUP", ENOTSUP, "Operation not supported"); 788 #endif 789 790 Py_DECREF(de); 788 791 }
Note:
See TracChangeset
for help on using the changeset viewer.