| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
#include "tclInt.h" |
| 18 |
#include "tclPort.h" |
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
CONST char * |
| 39 |
Tcl_ErrnoId() |
| 40 |
{ |
| 41 |
switch (errno) { |
| 42 |
#ifdef E2BIG |
| 43 |
case E2BIG: return "E2BIG"; |
| 44 |
#endif |
| 45 |
#ifdef EACCES |
| 46 |
case EACCES: return "EACCES"; |
| 47 |
#endif |
| 48 |
#ifdef EADDRINUSE |
| 49 |
case EADDRINUSE: return "EADDRINUSE"; |
| 50 |
#endif |
| 51 |
#ifdef EADDRNOTAVAIL |
| 52 |
case EADDRNOTAVAIL: return "EADDRNOTAVAIL"; |
| 53 |
#endif |
| 54 |
#ifdef EADV |
| 55 |
case EADV: return "EADV"; |
| 56 |
#endif |
| 57 |
#ifdef EAFNOSUPPORT |
| 58 |
case EAFNOSUPPORT: return "EAFNOSUPPORT"; |
| 59 |
#endif |
| 60 |
#ifdef EAGAIN |
| 61 |
case EAGAIN: return "EAGAIN"; |
| 62 |
#endif |
| 63 |
#ifdef EALIGN |
| 64 |
case EALIGN: return "EALIGN"; |
| 65 |
#endif |
| 66 |
#if defined(EALREADY) && (!defined(EBUSY) || (EALREADY != EBUSY )) |
| 67 |
case EALREADY: return "EALREADY"; |
| 68 |
#endif |
| 69 |
#ifdef EBADE |
| 70 |
case EBADE: return "EBADE"; |
| 71 |
#endif |
| 72 |
#ifdef EBADF |
| 73 |
case EBADF: return "EBADF"; |
| 74 |
#endif |
| 75 |
#ifdef EBADFD |
| 76 |
case EBADFD: return "EBADFD"; |
| 77 |
#endif |
| 78 |
#ifdef EBADMSG |
| 79 |
case EBADMSG: return "EBADMSG"; |
| 80 |
#endif |
| 81 |
#ifdef EBADR |
| 82 |
case EBADR: return "EBADR"; |
| 83 |
#endif |
| 84 |
#ifdef EBADRPC |
| 85 |
case EBADRPC: return "EBADRPC"; |
| 86 |
#endif |
| 87 |
#ifdef EBADRQC |
| 88 |
case EBADRQC: return "EBADRQC"; |
| 89 |
#endif |
| 90 |
#ifdef EBADSLT |
| 91 |
case EBADSLT: return "EBADSLT"; |
| 92 |
#endif |
| 93 |
#ifdef EBFONT |
| 94 |
case EBFONT: return "EBFONT"; |
| 95 |
#endif |
| 96 |
#ifdef EBUSY |
| 97 |
case EBUSY: return "EBUSY"; |
| 98 |
#endif |
| 99 |
#ifdef ECHILD |
| 100 |
case ECHILD: return "ECHILD"; |
| 101 |
#endif |
| 102 |
#ifdef ECHRNG |
| 103 |
case ECHRNG: return "ECHRNG"; |
| 104 |
#endif |
| 105 |
#ifdef ECOMM |
| 106 |
case ECOMM: return "ECOMM"; |
| 107 |
#endif |
| 108 |
#ifdef ECONNABORTED |
| 109 |
case ECONNABORTED: return "ECONNABORTED"; |
| 110 |
#endif |
| 111 |
#ifdef ECONNREFUSED |
| 112 |
case ECONNREFUSED: return "ECONNREFUSED"; |
| 113 |
#endif |
| 114 |
#ifdef ECONNRESET |
| 115 |
case ECONNRESET: return "ECONNRESET"; |
| 116 |
#endif |
| 117 |
#if defined(EDEADLK) && (!defined(EWOULDBLOCK) || (EDEADLK != EWOULDBLOCK)) |
| 118 |
case EDEADLK: return "EDEADLK"; |
| 119 |
#endif |
| 120 |
#if defined(EDEADLOCK) && (!defined(EDEADLK) || (EDEADLOCK != EDEADLK)) |
| 121 |
case EDEADLOCK: return "EDEADLOCK"; |
| 122 |
#endif |
| 123 |
#ifdef EDESTADDRREQ |
| 124 |
case EDESTADDRREQ: return "EDESTADDRREQ"; |
| 125 |
#endif |
| 126 |
#ifdef EDIRTY |
| 127 |
case EDIRTY: return "EDIRTY"; |
| 128 |
#endif |
| 129 |
#ifdef EDOM |
| 130 |
case EDOM: return "EDOM"; |
| 131 |
#endif |
| 132 |
#ifdef EDOTDOT |
| 133 |
case EDOTDOT: return "EDOTDOT"; |
| 134 |
#endif |
| 135 |
#ifdef EDQUOT |
| 136 |
case EDQUOT: return "EDQUOT"; |
| 137 |
#endif |
| 138 |
#ifdef EDUPPKG |
| 139 |
case EDUPPKG: return "EDUPPKG"; |
| 140 |
#endif |
| 141 |
#ifdef EEXIST |
| 142 |
case EEXIST: return "EEXIST"; |
| 143 |
#endif |
| 144 |
#ifdef EFAULT |
| 145 |
case EFAULT: return "EFAULT"; |
| 146 |
#endif |
| 147 |
#ifdef EFBIG |
| 148 |
case EFBIG: return "EFBIG"; |
| 149 |
#endif |
| 150 |
#ifdef EHOSTDOWN |
| 151 |
case EHOSTDOWN: return "EHOSTDOWN"; |
| 152 |
#endif |
| 153 |
#ifdef EHOSTUNREACH |
| 154 |
case EHOSTUNREACH: return "EHOSTUNREACH"; |
| 155 |
#endif |
| 156 |
#if defined(EIDRM) && (!defined(EINPROGRESS) || (EIDRM != EINPROGRESS)) |
| 157 |
case EIDRM: return "EIDRM"; |
| 158 |
#endif |
| 159 |
#ifdef EINIT |
| 160 |
case EINIT: return "EINIT"; |
| 161 |
#endif |
| 162 |
#ifdef EINPROGRESS |
| 163 |
case EINPROGRESS: return "EINPROGRESS"; |
| 164 |
#endif |
| 165 |
#ifdef EINTR |
| 166 |
case EINTR: return "EINTR"; |
| 167 |
#endif |
| 168 |
#ifdef EINVAL |
| 169 |
case EINVAL: return "EINVAL"; |
| 170 |
#endif |
| 171 |
#ifdef EIO |
| 172 |
case EIO: return "EIO"; |
| 173 |
#endif |
| 174 |
#ifdef EISCONN |
| 175 |
case EISCONN: return "EISCONN"; |
| 176 |
#endif |
| 177 |
#ifdef EISDIR |
| 178 |
case EISDIR: return "EISDIR"; |
| 179 |
#endif |
| 180 |
#ifdef EISNAME |
| 181 |
case EISNAM: return "EISNAM"; |
| 182 |
#endif |
| 183 |
#ifdef ELBIN |
| 184 |
case ELBIN: return "ELBIN"; |
| 185 |
#endif |
| 186 |
#ifdef EL2HLT |
| 187 |
case EL2HLT: return "EL2HLT"; |
| 188 |
#endif |
| 189 |
#ifdef EL2NSYNC |
| 190 |
case EL2NSYNC: return "EL2NSYNC"; |
| 191 |
#endif |
| 192 |
#ifdef EL3HLT |
| 193 |
case EL3HLT: return "EL3HLT"; |
| 194 |
#endif |
| 195 |
#ifdef EL3RST |
| 196 |
case EL3RST: return "EL3RST"; |
| 197 |
#endif |
| 198 |
#ifdef ELIBACC |
| 199 |
case ELIBACC: return "ELIBACC"; |
| 200 |
#endif |
| 201 |
#ifdef ELIBBAD |
| 202 |
case ELIBBAD: return "ELIBBAD"; |
| 203 |
#endif |
| 204 |
#ifdef ELIBEXEC |
| 205 |
case ELIBEXEC: return "ELIBEXEC"; |
| 206 |
#endif |
| 207 |
#ifdef ELIBMAX |
| 208 |
case ELIBMAX: return "ELIBMAX"; |
| 209 |
#endif |
| 210 |
#ifdef ELIBSCN |
| 211 |
case ELIBSCN: return "ELIBSCN"; |
| 212 |
#endif |
| 213 |
#ifdef ELNRNG |
| 214 |
case ELNRNG: return "ELNRNG"; |
| 215 |
#endif |
| 216 |
#if defined(ELOOP) && (!defined(ENOENT) || (ELOOP != ENOENT)) |
| 217 |
case ELOOP: return "ELOOP"; |
| 218 |
#endif |
| 219 |
#ifdef EMFILE |
| 220 |
case EMFILE: return "EMFILE"; |
| 221 |
#endif |
| 222 |
#ifdef EMLINK |
| 223 |
case EMLINK: return "EMLINK"; |
| 224 |
#endif |
| 225 |
#ifdef EMSGSIZE |
| 226 |
case EMSGSIZE: return "EMSGSIZE"; |
| 227 |
#endif |
| 228 |
#ifdef EMULTIHOP |
| 229 |
case EMULTIHOP: return "EMULTIHOP"; |
| 230 |
#endif |
| 231 |
#ifdef ENAMETOOLONG |
| 232 |
case ENAMETOOLONG: return "ENAMETOOLONG"; |
| 233 |
#endif |
| 234 |
#ifdef ENAVAIL |
| 235 |
case ENAVAIL: return "ENAVAIL"; |
| 236 |
#endif |
| 237 |
#ifdef ENET |
| 238 |
case ENET: return "ENET"; |
| 239 |
#endif |
| 240 |
#ifdef ENETDOWN |
| 241 |
case ENETDOWN: return "ENETDOWN"; |
| 242 |
#endif |
| 243 |
#ifdef ENETRESET |
| 244 |
case ENETRESET: return "ENETRESET"; |
| 245 |
#endif |
| 246 |
#ifdef ENETUNREACH |
| 247 |
case ENETUNREACH: return "ENETUNREACH"; |
| 248 |
#endif |
| 249 |
#ifdef ENFILE |
| 250 |
case ENFILE: return "ENFILE"; |
| 251 |
#endif |
| 252 |
#ifdef ENOANO |
| 253 |
case ENOANO: return "ENOANO"; |
| 254 |
#endif |
| 255 |
#if defined(ENOBUFS) && (!defined(ENOSR) || (ENOBUFS != ENOSR)) |
| 256 |
case ENOBUFS: return "ENOBUFS"; |
| 257 |
#endif |
| 258 |
#ifdef ENOCSI |
| 259 |
case ENOCSI: return "ENOCSI"; |
| 260 |
#endif |
| 261 |
#if defined(ENODATA) && (!defined(ECONNREFUSED) || (ENODATA != ECONNREFUSED)) |
| 262 |
case ENODATA: return "ENODATA"; |
| 263 |
#endif |
| 264 |
#ifdef ENODEV |
| 265 |
case ENODEV: return "ENODEV"; |
| 266 |
#endif |
| 267 |
#ifdef ENOENT |
| 268 |
case ENOENT: return "ENOENT"; |
| 269 |
#endif |
| 270 |
#ifdef ENOEXEC |
| 271 |
case ENOEXEC: return "ENOEXEC"; |
| 272 |
#endif |
| 273 |
#ifdef ENOLCK |
| 274 |
case ENOLCK: return "ENOLCK"; |
| 275 |
#endif |
| 276 |
#ifdef ENOLINK |
| 277 |
case ENOLINK: return "ENOLINK"; |
| 278 |
#endif |
| 279 |
#ifdef ENOMEM |
| 280 |
case ENOMEM: return "ENOMEM"; |
| 281 |
#endif |
| 282 |
#ifdef ENOMSG |
| 283 |
case ENOMSG: return "ENOMSG"; |
| 284 |
#endif |
| 285 |
#ifdef ENONET |
| 286 |
case ENONET: return "ENONET"; |
| 287 |
#endif |
| 288 |
#ifdef ENOPKG |
| 289 |
case ENOPKG: return "ENOPKG"; |
| 290 |
#endif |
| 291 |
#ifdef ENOPROTOOPT |
| 292 |
case ENOPROTOOPT: return "ENOPROTOOPT"; |
| 293 |
#endif |
| 294 |
#ifdef ENOSPC |
| 295 |
case ENOSPC: return "ENOSPC"; |
| 296 |
#endif |
| 297 |
#if defined(ENOSR) && (!defined(ENAMETOOLONG) || (ENAMETOOLONG != ENOSR)) |
| 298 |
case ENOSR: return "ENOSR"; |
| 299 |
#endif |
| 300 |
#if defined(ENOSTR) && (!defined(ENOTTY) || (ENOTTY != ENOSTR)) |
| 301 |
case ENOSTR: return "ENOSTR"; |
| 302 |
#endif |
| 303 |
#ifdef ENOSYM |
| 304 |
case ENOSYM: return "ENOSYM"; |
| 305 |
#endif |
| 306 |
#ifdef ENOSYS |
| 307 |
case ENOSYS: return "ENOSYS"; |
| 308 |
#endif |
| 309 |
#ifdef ENOTBLK |
| 310 |
case ENOTBLK: return "ENOTBLK"; |
| 311 |
#endif |
| 312 |
#ifdef ENOTCONN |
| 313 |
case ENOTCONN: return "ENOTCONN"; |
| 314 |
#endif |
| 315 |
#ifdef ENOTDIR |
| 316 |
case ENOTDIR: return "ENOTDIR"; |
| 317 |
#endif |
| 318 |
#if defined(ENOTEMPTY) && (!defined(EEXIST) || (ENOTEMPTY != EEXIST)) |
| 319 |
case ENOTEMPTY: return "ENOTEMPTY"; |
| 320 |
#endif |
| 321 |
#ifdef ENOTNAM |
| 322 |
case ENOTNAM: return "ENOTNAM"; |
| 323 |
#endif |
| 324 |
#ifdef ENOTSOCK |
| 325 |
case ENOTSOCK: return "ENOTSOCK"; |
| 326 |
#endif |
| 327 |
#ifdef ENOTSUP |
| 328 |
case ENOTSUP: return "ENOTSUP"; |
| 329 |
#endif |
| 330 |
#ifdef ENOTTY |
| 331 |
case ENOTTY: return "ENOTTY"; |
| 332 |
#endif |
| 333 |
#ifdef ENOTUNIQ |
| 334 |
case ENOTUNIQ: return "ENOTUNIQ"; |
| 335 |
#endif |
| 336 |
#ifdef ENXIO |
| 337 |
case ENXIO: return "ENXIO"; |
| 338 |
#endif |
| 339 |
#if defined(EOPNOTSUPP) && (!defined(ENOTSUP) || (ENOTSUP != EOPNOTSUPP)) |
| 340 |
case EOPNOTSUPP: return "EOPNOTSUPP"; |
| 341 |
#endif |
| 342 |
#if defined(EOVERFLOW) && ( !defined(EFBIG) || (EOVERFLOW != EFBIG) ) && ( !defined(EINVAL) || (EOVERFLOW != EINVAL) ) |
| 343 |
case EOVERFLOW: return "EOVERFLOW"; |
| 344 |
#endif |
| 345 |
#ifdef EPERM |
| 346 |
case EPERM: return "EPERM"; |
| 347 |
#endif |
| 348 |
#if defined(EPFNOSUPPORT) && (!defined(ENOLCK) || (ENOLCK != EPFNOSUPPORT)) |
| 349 |
case EPFNOSUPPORT: return "EPFNOSUPPORT"; |
| 350 |
#endif |
| 351 |
#ifdef EPIPE |
| 352 |
case EPIPE: return "EPIPE"; |
| 353 |
#endif |
| 354 |
#ifdef EPROCLIM |
| 355 |
case EPROCLIM: return "EPROCLIM"; |
| 356 |
#endif |
| 357 |
#ifdef EPROCUNAVAIL |
| 358 |
case EPROCUNAVAIL: return "EPROCUNAVAIL"; |
| 359 |
#endif |
| 360 |
#ifdef EPROGMISMATCH |
| 361 |
case EPROGMISMATCH: return "EPROGMISMATCH"; |
| 362 |
#endif |
| 363 |
#ifdef EPROGUNAVAIL |
| 364 |
case EPROGUNAVAIL: return "EPROGUNAVAIL"; |
| 365 |
#endif |
| 366 |
#ifdef EPROTO |
| 367 |
case EPROTO: return "EPROTO"; |
| 368 |
#endif |
| 369 |
#ifdef EPROTONOSUPPORT |
| 370 |
case EPROTONOSUPPORT: return "EPROTONOSUPPORT"; |
| 371 |
#endif |
| 372 |
#ifdef EPROTOTYPE |
| 373 |
case EPROTOTYPE: return "EPROTOTYPE"; |
| 374 |
#endif |
| 375 |
#ifdef ERANGE |
| 376 |
case ERANGE: return "ERANGE"; |
| 377 |
#endif |
| 378 |
#if defined(EREFUSED) && (!defined(ECONNREFUSED) || (EREFUSED != ECONNREFUSED)) |
| 379 |
case EREFUSED: return "EREFUSED"; |
| 380 |
#endif |
| 381 |
#ifdef EREMCHG |
| 382 |
case EREMCHG: return "EREMCHG"; |
| 383 |
#endif |
| 384 |
#ifdef EREMDEV |
| 385 |
case EREMDEV: return "EREMDEV"; |
| 386 |
#endif |
| 387 |
#ifdef EREMOTE |
| 388 |
case EREMOTE: return "EREMOTE"; |
| 389 |
#endif |
| 390 |
#ifdef EREMOTEIO |
| 391 |
case EREMOTEIO: return "EREMOTEIO"; |
| 392 |
#endif |
| 393 |
#ifdef EREMOTERELEASE |
| 394 |
case EREMOTERELEASE: return "EREMOTERELEASE"; |
| 395 |
#endif |
| 396 |
#ifdef EROFS |
| 397 |
case EROFS: return "EROFS"; |
| 398 |
#endif |
| 399 |
#ifdef ERPCMISMATCH |
| 400 |
case ERPCMISMATCH: return "ERPCMISMATCH"; |
| 401 |
#endif |
| 402 |
#ifdef ERREMOTE |
| 403 |
case ERREMOTE: return "ERREMOTE"; |
| 404 |
#endif |
| 405 |
#ifdef ESHUTDOWN |
| 406 |
case ESHUTDOWN: return "ESHUTDOWN"; |
| 407 |
#endif |
| 408 |
#ifdef ESOCKTNOSUPPORT |
| 409 |
case ESOCKTNOSUPPORT: return "ESOCKTNOSUPPORT"; |
| 410 |
#endif |
| 411 |
#ifdef ESPIPE |
| 412 |
case ESPIPE: return "ESPIPE"; |
| 413 |
#endif |
| 414 |
#ifdef ESRCH |
| 415 |
case ESRCH: return "ESRCH"; |
| 416 |
#endif |
| 417 |
#ifdef ESRMNT |
| 418 |
case ESRMNT: return "ESRMNT"; |
| 419 |
#endif |
| 420 |
#ifdef ESTALE |
| 421 |
case ESTALE: return "ESTALE"; |
| 422 |
#endif |
| 423 |
#ifdef ESUCCESS |
| 424 |
case ESUCCESS: return "ESUCCESS"; |
| 425 |
#endif |
| 426 |
#if defined(ETIME) && (!defined(ELOOP) || (ETIME != ELOOP)) |
| 427 |
case ETIME: return "ETIME"; |
| 428 |
#endif |
| 429 |
#if defined(ETIMEDOUT) && (!defined(ENOSTR) || (ETIMEDOUT != ENOSTR)) |
| 430 |
case ETIMEDOUT: return "ETIMEDOUT"; |
| 431 |
#endif |
| 432 |
#ifdef ETOOMANYREFS |
| 433 |
case ETOOMANYREFS: return "ETOOMANYREFS"; |
| 434 |
#endif |
| 435 |
#ifdef ETXTBSY |
| 436 |
case ETXTBSY: return "ETXTBSY"; |
| 437 |
#endif |
| 438 |
#ifdef EUCLEAN |
| 439 |
case EUCLEAN: return "EUCLEAN"; |
| 440 |
#endif |
| 441 |
#ifdef EUNATCH |
| 442 |
case EUNATCH: return "EUNATCH"; |
| 443 |
#endif |
| 444 |
#ifdef EUSERS |
| 445 |
case EUSERS: return "EUSERS"; |
| 446 |
#endif |
| 447 |
#ifdef EVERSION |
| 448 |
case EVERSION: return "EVERSION"; |
| 449 |
#endif |
| 450 |
#if defined(EWOULDBLOCK) && (!defined(EAGAIN) || (EWOULDBLOCK != EAGAIN)) |
| 451 |
case EWOULDBLOCK: return "EWOULDBLOCK"; |
| 452 |
#endif |
| 453 |
#ifdef EXDEV |
| 454 |
case EXDEV: return "EXDEV"; |
| 455 |
#endif |
| 456 |
#ifdef EXFULL |
| 457 |
case EXFULL: return "EXFULL"; |
| 458 |
#endif |
| 459 |
} |
| 460 |
return "unknown error"; |
| 461 |
} |
| 462 |
|
| 463 |
|
| 464 |
|
| 465 |
|
| 466 |
|
| 467 |
|
| 468 |
|
| 469 |
|
| 470 |
|
| 471 |
|
| 472 |
|
| 473 |
|
| 474 |
|
| 475 |
|
| 476 |
|
| 477 |
|
| 478 |
|
| 479 |
|
| 480 |
|
| 481 |
|
| 482 |
|
| 483 |
|
| 484 |
|
| 485 |
|
| 486 |
CONST char * |
| 487 |
Tcl_ErrnoMsg(err) |
| 488 |
int err; |
| 489 |
{ |
| 490 |
switch (err) { |
| 491 |
#ifdef E2BIG |
| 492 |
case E2BIG: return "argument list too long"; |
| 493 |
#endif |
| 494 |
#ifdef EACCES |
| 495 |
case EACCES: return "permission denied"; |
| 496 |
#endif |
| 497 |
#ifdef EADDRINUSE |
| 498 |
case EADDRINUSE: return "address already in use"; |
| 499 |
#endif |
| 500 |
#ifdef EADDRNOTAVAIL |
| 501 |
case EADDRNOTAVAIL: return "can't assign requested address"; |
| 502 |
#endif |
| 503 |
#ifdef EADV |
| 504 |
case EADV: return "advertise error"; |
| 505 |
#endif |
| 506 |
#ifdef EAFNOSUPPORT |
| 507 |
case EAFNOSUPPORT: return "address family not supported by protocol family"; |
| 508 |
#endif |
| 509 |
#ifdef EAGAIN |
| 510 |
case EAGAIN: return "resource temporarily unavailable"; |
| 511 |
#endif |
| 512 |
#ifdef EALIGN |
| 513 |
case EALIGN: return "EALIGN"; |
| 514 |
#endif |
| 515 |
#if defined(EALREADY) && (!defined(EBUSY) || (EALREADY != EBUSY )) |
| 516 |
case EALREADY: return "operation already in progress"; |
| 517 |
#endif |
| 518 |
#ifdef EBADE |
| 519 |
case EBADE: return "bad exchange descriptor"; |
| 520 |
#endif |
| 521 |
#ifdef EBADF |
| 522 |
case EBADF: return "bad file number"; |
| 523 |
#endif |
| 524 |
#ifdef EBADFD |
| 525 |
case EBADFD: return "file descriptor in bad state"; |
| 526 |
#endif |
| 527 |
#ifdef EBADMSG |
| 528 |
case EBADMSG: return "not a data message"; |
| 529 |
#endif |
| 530 |
#ifdef EBADR |
| 531 |
case EBADR: return "bad request descriptor"; |
| 532 |
#endif |
| 533 |
#ifdef EBADRPC |
| 534 |
case EBADRPC: return "RPC structure is bad"; |
| 535 |
#endif |
| 536 |
#ifdef EBADRQC |
| 537 |
case EBADRQC: return "bad request code"; |
| 538 |
#endif |
| 539 |
#ifdef EBADSLT |
| 540 |
case EBADSLT: return "invalid slot"; |
| 541 |
#endif |
| 542 |
#ifdef EBFONT |
| 543 |
case EBFONT: return "bad font file format"; |
| 544 |
#endif |
| 545 |
#ifdef EBUSY |
| 546 |
case EBUSY: return "file busy"; |
| 547 |
#endif |
| 548 |
#ifdef ECHILD |
| 549 |
case ECHILD: return "no children"; |
| 550 |
#endif |
| 551 |
#ifdef ECHRNG |
| 552 |
case ECHRNG: return "channel number out of range"; |
| 553 |
#endif |
| 554 |
#ifdef ECOMM |
| 555 |
case ECOMM: return "communication error on send"; |
| 556 |
#endif |
| 557 |
#ifdef ECONNABORTED |
| 558 |
case ECONNABORTED: return "software caused connection abort"; |
| 559 |
#endif |
| 560 |
#ifdef ECONNREFUSED |
| 561 |
case ECONNREFUSED: return "connection refused"; |
| 562 |
#endif |
| 563 |
#ifdef ECONNRESET |
| 564 |
case ECONNRESET: return "connection reset by peer"; |
| 565 |
#endif |
| 566 |
#if defined(EDEADLK) && (!defined(EWOULDBLOCK) || (EDEADLK != EWOULDBLOCK)) |
| 567 |
case EDEADLK: return "resource deadlock avoided"; |
| 568 |
#endif |
| 569 |
#if defined(EDEADLOCK) && (!defined(EDEADLK) || (EDEADLOCK != EDEADLK)) |
| 570 |
case EDEADLOCK: return "resource deadlock avoided"; |
| 571 |
#endif |
| 572 |
#ifdef EDESTADDRREQ |
| 573 |
case EDESTADDRREQ: return "destination address required"; |
| 574 |
#endif |
| 575 |
#ifdef EDIRTY |
| 576 |
case EDIRTY: return "mounting a dirty fs w/o force"; |
| 577 |
#endif |
| 578 |
#ifdef EDOM |
| 579 |
case EDOM: return "math argument out of range"; |
| 580 |
#endif |
| 581 |
#ifdef EDOTDOT |
| 582 |
case EDOTDOT: return "cross mount point"; |
| 583 |
#endif |
| 584 |
#ifdef EDQUOT |
| 585 |
case EDQUOT: return "disk quota exceeded"; |
| 586 |
#endif |
| 587 |
#ifdef EDUPPKG |
| 588 |
case EDUPPKG: return "duplicate package name"; |
| 589 |
#endif |
| 590 |
#ifdef EEXIST |
| 591 |
case EEXIST: return "file already exists"; |
| 592 |
#endif |
| 593 |
#ifdef EFAULT |
| 594 |
case EFAULT: return "bad address in system call argument"; |
| 595 |
#endif |
| 596 |
#ifdef EFBIG |
| 597 |
case EFBIG: return "file too large"; |
| 598 |
#endif |
| 599 |
#ifdef EHOSTDOWN |
| 600 |
case EHOSTDOWN: return "host is down"; |
| 601 |
#endif |
| 602 |
#ifdef EHOSTUNREACH |
| 603 |
case EHOSTUNREACH: return "host is unreachable"; |
| 604 |
#endif |
| 605 |
#if defined(EIDRM) && (!defined(EINPROGRESS) || (EIDRM != EINPROGRESS)) |
| 606 |
case EIDRM: return "identifier removed"; |
| 607 |
#endif |
| 608 |
#ifdef EINIT |
| 609 |
case EINIT: return "initialization error"; |
| 610 |
#endif |
| 611 |
#ifdef EINPROGRESS |
| 612 |
case EINPROGRESS: return "operation now in progress"; |
| 613 |
#endif |
| 614 |
#ifdef EINTR |
| 615 |
case EINTR: return "interrupted system call"; |
| 616 |
#endif |
| 617 |
#ifdef EINVAL |
| 618 |
case EINVAL: return "invalid argument"; |
| 619 |
#endif |
| 620 |
#ifdef EIO |
| 621 |
case EIO: return "I/O error"; |
| 622 |
#endif |
| 623 |
#ifdef EISCONN |
| 624 |
case EISCONN: return "socket is already connected"; |
| 625 |
#endif |
| 626 |
#ifdef EISDIR |
| 627 |
case EISDIR: return "illegal operation on a directory"; |
| 628 |
#endif |
| 629 |
#ifdef EISNAME |
| 630 |
case EISNAM: return "is a name file"; |
| 631 |
#endif |
| 632 |
#ifdef ELBIN |
| 633 |
case ELBIN: return "ELBIN"; |
| 634 |
#endif |
| 635 |
#ifdef EL2HLT |
| 636 |
case EL2HLT: return "level 2 halted"; |
| 637 |
#endif |
| 638 |
#ifdef EL2NSYNC |
| 639 |
case EL2NSYNC: return "level 2 not synchronized"; |
| 640 |
#endif |
| 641 |
#ifdef EL3HLT |
| 642 |
case EL3HLT: return "level 3 halted"; |
| 643 |
#endif |
| 644 |
#ifdef EL3RST |
| 645 |
case EL3RST: return "level 3 reset"; |
| 646 |
#endif |
| 647 |
#ifdef ELIBACC |
| 648 |
case ELIBACC: return "can not access a needed shared library"; |
| 649 |
#endif |
| 650 |
#ifdef ELIBBAD |
| 651 |
case ELIBBAD: return "accessing a corrupted shared library"; |
| 652 |
#endif |
| 653 |
#ifdef ELIBEXEC |
| 654 |
case ELIBEXEC: return "can not exec a shared library directly"; |
| 655 |
#endif |
| 656 |
#ifdef ELIBMAX |
| 657 |
case ELIBMAX: return |
| 658 |
"attempting to link in more shared libraries than system limit"; |
| 659 |
#endif |
| 660 |
#ifdef ELIBSCN |
| 661 |
case ELIBSCN: return ".lib section in a.out corrupted"; |
| 662 |
#endif |
| 663 |
#ifdef ELNRNG |
| 664 |
case ELNRNG: return "link number out of range"; |
| 665 |
#endif |
| 666 |
#if defined(ELOOP) && (!defined(ENOENT) || (ELOOP != ENOENT)) |
| 667 |
case ELOOP: return "too many levels of symbolic links"; |
| 668 |
#endif |
| 669 |
#ifdef EMFILE |
| 670 |
case EMFILE: return "too many open files"; |
| 671 |
#endif |
| 672 |
#ifdef EMLINK |
| 673 |
case EMLINK: return "too many links"; |
| 674 |
#endif |
| 675 |
#ifdef EMSGSIZE |
| 676 |
case EMSGSIZE: return "message too long"; |
| 677 |
#endif |
| 678 |
#ifdef EMULTIHOP |
| 679 |
case EMULTIHOP: return "multihop attempted"; |
| 680 |
#endif |
| 681 |
#ifdef ENAMETOOLONG |
| 682 |
case ENAMETOOLONG: return "file name too long"; |
| 683 |
#endif |
| 684 |
#ifdef ENAVAIL |
| 685 |
case ENAVAIL: return "not available"; |
| 686 |
#endif |
| 687 |
#ifdef ENET |
| 688 |
case ENET: return "ENET"; |
| 689 |
#endif |
| 690 |
#ifdef ENETDOWN |
| 691 |
case ENETDOWN: return "network is down"; |
| 692 |
#endif |
| 693 |
#ifdef ENETRESET |
| 694 |
case ENETRESET: return "network dropped connection on reset"; |
| 695 |
#endif |
| 696 |
#ifdef ENETUNREACH |
| 697 |
case ENETUNREACH: return "network is unreachable"; |
| 698 |
#endif |
| 699 |
#ifdef ENFILE |
| 700 |
case ENFILE: return "file table overflow"; |
| 701 |
#endif |
| 702 |
#ifdef ENOANO |
| 703 |
case ENOANO: return "anode table overflow"; |
| 704 |
#endif |
| 705 |
#if defined(ENOBUFS) && (!defined(ENOSR) || (ENOBUFS != ENOSR)) |
| 706 |
case ENOBUFS: return "no buffer space available"; |
| 707 |
#endif |
| 708 |
#ifdef ENOCSI |
| 709 |
case ENOCSI: return "no CSI structure available"; |
| 710 |
#endif |
| 711 |
#if defined(ENODATA) && (!defined(ECONNREFUSED) || (ENODATA != ECONNREFUSED)) |
| 712 |
case ENODATA: return "no data available"; |
| 713 |
#endif |
| 714 |
#ifdef ENODEV |
| 715 |
case ENODEV: return "no such device"; |
| 716 |
#endif |
| 717 |
#ifdef ENOENT |
| 718 |
case ENOENT: return "no such file or directory"; |
| 719 |
#endif |
| 720 |
#ifdef ENOEXEC |
| 721 |
case ENOEXEC: return "exec format error"; |
| 722 |
#endif |
| 723 |
#ifdef ENOLCK |
| 724 |
case ENOLCK: return "no locks available"; |
| 725 |
#endif |
| 726 |
#ifdef ENOLINK |
| 727 |
case ENOLINK: return "link has be severed"; |
| 728 |
#endif |
| 729 |
#ifdef ENOMEM |
| 730 |
case ENOMEM: return "not enough memory"; |
| 731 |
#endif |
| 732 |
#ifdef ENOMSG |
| 733 |
case ENOMSG: return "no message of desired type"; |
| 734 |
#endif |
| 735 |
#ifdef ENONET |
| 736 |
case ENONET: return "machine is not on the network"; |
| 737 |
#endif |
| 738 |
#ifdef ENOPKG |
| 739 |
case ENOPKG: return "package not installed"; |
| 740 |
#endif |
| 741 |
#ifdef ENOPROTOOPT |
| 742 |
case ENOPROTOOPT: return "bad protocol option"; |
| 743 |
#endif |
| 744 |
#ifdef ENOSPC |
| 745 |
case ENOSPC: return "no space left on device"; |
| 746 |
#endif |
| 747 |
#if defined(ENOSR) && (!defined(ENAMETOOLONG) || (ENAMETOOLONG != ENOSR)) |
| 748 |
case ENOSR: return "out of stream resources"; |
| 749 |
#endif |
| 750 |
#if defined(ENOSTR) && (!defined(ENOTTY) || (ENOTTY != ENOSTR)) |
| 751 |
case ENOSTR: return "not a stream device"; |
| 752 |
#endif |
| 753 |
#ifdef ENOSYM |
| 754 |
case ENOSYM: return "unresolved symbol name"; |
| 755 |
#endif |
| 756 |
#ifdef ENOSYS |
| 757 |
case ENOSYS: return "function not implemented"; |
| 758 |
#endif |
| 759 |
#ifdef ENOTBLK |
| 760 |
case ENOTBLK: return "block device required"; |
| 761 |
#endif |
| 762 |
#ifdef ENOTCONN |
| 763 |
case ENOTCONN: return "socket is not connected"; |
| 764 |
#endif |
| 765 |
#ifdef ENOTDIR |
| 766 |
case ENOTDIR: return "not a directory"; |
| 767 |
#endif |
| 768 |
#if defined(ENOTEMPTY) && (!defined(EEXIST) || (ENOTEMPTY != EEXIST)) |
| 769 |
case ENOTEMPTY: return "directory not empty"; |
| 770 |
#endif |
| 771 |
#ifdef ENOTNAM |
| 772 |
case ENOTNAM: return "not a name file"; |
| 773 |
#endif |
| 774 |
#ifdef ENOTSOCK |
| 775 |
case ENOTSOCK: return "socket operation on non-socket"; |
| 776 |
#endif |
| 777 |
#ifdef ENOTSUP |
| 778 |
case ENOTSUP: return "operation not supported"; |
| 779 |
#endif |
| 780 |
#ifdef ENOTTY |
| 781 |
case ENOTTY: return "inappropriate device for ioctl"; |
| 782 |
#endif |
| 783 |
#ifdef ENOTUNIQ |
| 784 |
case ENOTUNIQ: return "name not unique on network"; |
| 785 |
#endif |
| 786 |
#ifdef ENXIO |
| 787 |
case ENXIO: return "no such device or address"; |
| 788 |
#endif |
| 789 |
#if defined(EOPNOTSUPP) && (!defined(ENOTSUP) || (ENOTSUP != EOPNOTSUPP)) |
| 790 |
case EOPNOTSUPP: return "operation not supported on socket"; |
| 791 |
#endif |
| 792 |
#if defined(EOVERFLOW) && ( !defined(EFBIG) || (EOVERFLOW != EFBIG) ) && ( !defined(EINVAL) || (EOVERFLOW != EINVAL) ) |
| 793 |
case EOVERFLOW: return "file too big"; |
| 794 |
#endif |
| 795 |
#ifdef EPERM |
| 796 |
case EPERM: return "not owner"; |
| 797 |
#endif |
| 798 |
#if defined(EPFNOSUPPORT) && (!defined(ENOLCK) || (ENOLCK != EPFNOSUPPORT)) |
| 799 |
case EPFNOSUPPORT: return "protocol family not supported"; |
| 800 |
#endif |
| 801 |
#ifdef EPIPE |
| 802 |
case EPIPE: return "broken pipe"; |
| 803 |
#endif |
| 804 |
#ifdef EPROCLIM |
| 805 |
case EPROCLIM: return "too many processes"; |
| 806 |
#endif |
| 807 |
#ifdef EPROCUNAVAIL |
| 808 |
case EPROCUNAVAIL: return "bad procedure for program"; |
| 809 |
#endif |
| 810 |
#ifdef EPROGMISMATCH |
| 811 |
case EPROGMISMATCH: return "program version wrong"; |
| 812 |
#endif |
| 813 |
#ifdef EPROGUNAVAIL |
| 814 |
case EPROGUNAVAIL: return "RPC program not available"; |
| 815 |
#endif |
| 816 |
#ifdef EPROTO |
| 817 |
case EPROTO: return "protocol error"; |
| 818 |
#endif |
| 819 |
#ifdef EPROTONOSUPPORT |
| 820 |
case EPROTONOSUPPORT: return "protocol not suppored"; |
| 821 |
#endif |
| 822 |
#ifdef EPROTOTYPE |
| 823 |
case EPROTOTYPE: return "protocol wrong type for socket"; |
| 824 |
#endif |
| 825 |
#ifdef ERANGE |
| 826 |
case ERANGE: return "math result unrepresentable"; |
| 827 |
#endif |
| 828 |
#if defined(EREFUSED) && (!defined(ECONNREFUSED) || (EREFUSED != ECONNREFUSED)) |
| 829 |
case EREFUSED: return "EREFUSED"; |
| 830 |
#endif |
| 831 |
#ifdef EREMCHG |
| 832 |
case EREMCHG: return "remote address changed"; |
| 833 |
#endif |
| 834 |
#ifdef EREMDEV |
| 835 |
case EREMDEV: return "remote device"; |
| 836 |
#endif |
| 837 |
#ifdef EREMOTE |
| 838 |
case EREMOTE: return "pathname hit remote file system"; |
| 839 |
#endif |
| 840 |
#ifdef EREMOTEIO |
| 841 |
case EREMOTEIO: return "remote i/o error"; |
| 842 |
#endif |
| 843 |
#ifdef EREMOTERELEASE |
| 844 |
case EREMOTERELEASE: return "EREMOTERELEASE"; |
| 845 |
#endif |
| 846 |
#ifdef EROFS |
| 847 |
case EROFS: return "read-only file system"; |
| 848 |
#endif |
| 849 |
#ifdef ERPCMISMATCH |
| 850 |
case ERPCMISMATCH: return "RPC version is wrong"; |
| 851 |
#endif |
| 852 |
#ifdef ERREMOTE |
| 853 |
case ERREMOTE: return "object is remote"; |
| 854 |
#endif |
| 855 |
#ifdef ESHUTDOWN |
| 856 |
case ESHUTDOWN: return "can't send afer socket shutdown"; |
| 857 |
#endif |
| 858 |
#ifdef ESOCKTNOSUPPORT |
| 859 |
case ESOCKTNOSUPPORT: return "socket type not supported"; |
| 860 |
#endif |
| 861 |
#ifdef ESPIPE |
| 862 |
case ESPIPE: return "invalid seek"; |
| 863 |
#endif |
| 864 |
#ifdef ESRCH |
| 865 |
case ESRCH: return "no such process"; |
| 866 |
#endif |
| 867 |
#ifdef ESRMNT |
| 868 |
case ESRMNT: return "srmount error"; |
| 869 |
#endif |
| 870 |
#ifdef ESTALE |
| 871 |
case ESTALE: return "stale remote file handle"; |
| 872 |
#endif |
| 873 |
#ifdef ESUCCESS |
| 874 |
case ESUCCESS: return "Error 0"; |
| 875 |
#endif |
| 876 |
#if defined(ETIME) && (!defined(ELOOP) || (ETIME != ELOOP)) |
| 877 |
case ETIME: return "timer expired"; |
| 878 |
#endif |
| 879 |
#if defined(ETIMEDOUT) && (!defined(ENOSTR) || (ETIMEDOUT != ENOSTR)) |
| 880 |
case ETIMEDOUT: return "connection timed out"; |
| 881 |
#endif |
| 882 |
#ifdef ETOOMANYREFS |
| 883 |
case ETOOMANYREFS: return "too many references: can't splice"; |
| 884 |
#endif |
| 885 |
#ifdef ETXTBSY |
| 886 |
case ETXTBSY: return "text file or pseudo-device busy"; |
| 887 |
#endif |
| 888 |
#ifdef EUCLEAN |
| 889 |
case EUCLEAN: return "structure needs cleaning"; |
| 890 |
#endif |
| 891 |
#ifdef EUNATCH |
| 892 |
case EUNATCH: return "protocol driver not attached"; |
| 893 |
#endif |
| 894 |
#ifdef EUSERS |
| 895 |
case EUSERS: return "too many users"; |
| 896 |
#endif |
| 897 |
#ifdef EVERSION |
| 898 |
case EVERSION: return "version mismatch"; |
| 899 |
#endif |
| 900 |
#if defined(EWOULDBLOCK) && (!defined(EAGAIN) || (EWOULDBLOCK != EAGAIN)) |
| 901 |
case EWOULDBLOCK: return "operation would block"; |
| 902 |
#endif |
| 903 |
#ifdef EXDEV |
| 904 |
case EXDEV: return "cross-domain link"; |
| 905 |
#endif |
| 906 |
#ifdef EXFULL |
| 907 |
case EXFULL: return "message tables full"; |
| 908 |
#endif |
| 909 |
default: |
| 910 |
#ifdef NO_STRERROR |
| 911 |
return "unknown POSIX error"; |
| 912 |
#else |
| 913 |
return strerror(errno); |
| 914 |
#endif |
| 915 |
} |
| 916 |
} |
| 917 |
|
| 918 |
|
| 919 |
|
| 920 |
|
| 921 |
|
| 922 |
|
| 923 |
|
| 924 |
|
| 925 |
|
| 926 |
|
| 927 |
|
| 928 |
|
| 929 |
|
| 930 |
|
| 931 |
|
| 932 |
|
| 933 |
|
| 934 |
|
| 935 |
|
| 936 |
CONST char * |
| 937 |
Tcl_SignalId(sig) |
| 938 |
int sig; |
| 939 |
{ |
| 940 |
switch (sig) { |
| 941 |
#ifdef SIGABRT |
| 942 |
case SIGABRT: return "SIGABRT"; |
| 943 |
#endif |
| 944 |
#ifdef SIGALRM |
| 945 |
case SIGALRM: return "SIGALRM"; |
| 946 |
#endif |
| 947 |
#ifdef SIGBUS |
| 948 |
case SIGBUS: return "SIGBUS"; |
| 949 |
#endif |
| 950 |
#ifdef SIGCHLD |
| 951 |
case SIGCHLD: return "SIGCHLD"; |
| 952 |
#endif |
| 953 |
#if defined(SIGCLD) && (!defined(SIGCHLD) || (SIGCLD != SIGCHLD)) |
| 954 |
case SIGCLD: return "SIGCLD"; |
| 955 |
#endif |
| 956 |
#ifdef SIGCONT |
| 957 |
case SIGCONT: return "SIGCONT"; |
| 958 |
#endif |
| 959 |
#if defined(SIGEMT) && (!defined(SIGXCPU) || (SIGEMT != SIGXCPU)) |
| 960 |
case SIGEMT: return "SIGEMT"; |
| 961 |
#endif |
| 962 |
#ifdef SIGFPE |
| 963 |
case SIGFPE: return "SIGFPE"; |
| 964 |
#endif |
| 965 |
#ifdef SIGHUP |
| 966 |
case SIGHUP: return "SIGHUP"; |
| 967 |
#endif |
| 968 |
#ifdef SIGILL |
| 969 |
case SIGILL: return "SIGILL"; |
| 970 |
#endif |
| 971 |
#ifdef SIGINT |
| 972 |
case SIGINT: return "SIGINT"; |
| 973 |
#endif |
| 974 |
#ifdef SIGIO |
| 975 |
case SIGIO: return "SIGIO"; |
| 976 |
#endif |
| 977 |
#if defined(SIGIOT) && (!defined(SIGABRT) || (SIGIOT != SIGABRT)) |
| 978 |
case SIGIOT: return "SIGIOT"; |
| 979 |
#endif |
| 980 |
#ifdef SIGKILL |
| 981 |
case SIGKILL: return "SIGKILL"; |
| 982 |
#endif |
| 983 |
#if defined(SIGLOST) && (!defined(SIGIOT) || (SIGLOST != SIGIOT)) && (!defined(SIGURG) || (SIGLOST != SIGURG)) && (!defined(SIGPROF) || (SIGLOST != SIGPROF)) && (!defined(SIGIO) || (SIGLOST != SIGIO)) |
| 984 |
case SIGLOST: return "SIGLOST"; |
| 985 |
#endif |
| 986 |
#ifdef SIGPIPE |
| 987 |
case SIGPIPE: return "SIGPIPE"; |
| 988 |
#endif |
| 989 |
#if defined(SIGPOLL) && (!defined(SIGIO) || (SIGPOLL != SIGIO)) |
| 990 |
case SIGPOLL: return "SIGPOLL"; |
| 991 |
#endif |
| 992 |
#ifdef SIGPROF |
| 993 |
case SIGPROF: return "SIGPROF"; |
| 994 |
#endif |
| 995 |
#if defined(SIGPWR) && (!defined(SIGXFSZ) || (SIGPWR != SIGXFSZ)) && (!defined(SIGLOST) || (SIGPWR != SIGLOST)) |
| 996 |
case SIGPWR: return "SIGPWR"; |
| 997 |
#endif |
| 998 |
#ifdef SIGQUIT |
| 999 |
case SIGQUIT: return "SIGQUIT"; |
| 1000 |
#endif |
| 1001 |
#ifdef SIGSEGV |
| 1002 |
case SIGSEGV: return "SIGSEGV"; |
| 1003 |
#endif |
| 1004 |
#ifdef SIGSTOP |
| 1005 |
case SIGSTOP: return "SIGSTOP"; |
| 1006 |
#endif |
| 1007 |
#ifdef SIGSYS |
| 1008 |
case SIGSYS: return "SIGSYS"; |
| 1009 |
#endif |
| 1010 |
#ifdef SIGTERM |
| 1011 |
case SIGTERM: return "SIGTERM"; |
| 1012 |
#endif |
| 1013 |
#ifdef SIGTRAP |
| 1014 |
case SIGTRAP: return "SIGTRAP"; |
| 1015 |
#endif |
| 1016 |
#ifdef SIGTSTP |
| 1017 |
case SIGTSTP: return "SIGTSTP"; |
| 1018 |
#endif |
| 1019 |
#ifdef SIGTTIN |
| 1020 |
case SIGTTIN: return "SIGTTIN"; |
| 1021 |
#endif |
| 1022 |
#ifdef SIGTTOU |
| 1023 |
case SIGTTOU: return "SIGTTOU"; |
| 1024 |
#endif |
| 1025 |
#if defined(SIGURG) && (!defined(SIGIO) || (SIGURG != SIGIO)) |
| 1026 |
case SIGURG: return "SIGURG"; |
| 1027 |
#endif |
| 1028 |
#if defined(SIGUSR1) && (!defined(SIGIO) || (SIGUSR1 != SIGIO)) |
| 1029 |
case SIGUSR1: return "SIGUSR1"; |
| 1030 |
#endif |
| 1031 |
#if defined(SIGUSR2) && (!defined(SIGURG) || (SIGUSR2 != SIGURG)) |
| 1032 |
case SIGUSR2: return "SIGUSR2"; |
| 1033 |
#endif |
| 1034 |
#ifdef SIGVTALRM |
| 1035 |
case SIGVTALRM: return "SIGVTALRM"; |
| 1036 |
#endif |
| 1037 |
#ifdef SIGWINCH |
| 1038 |
case SIGWINCH: return "SIGWINCH"; |
| 1039 |
#endif |
| 1040 |
#ifdef SIGXCPU |
| 1041 |
case SIGXCPU: return "SIGXCPU"; |
| 1042 |
#endif |
| 1043 |
#ifdef SIGXFSZ |
| 1044 |
case SIGXFSZ: return "SIGXFSZ"; |
| 1045 |
#endif |
| 1046 |
} |
| 1047 |
return "unknown signal"; |
| 1048 |
} |
| 1049 |
|
| 1050 |
|
| 1051 |
|
| 1052 |
|
| 1053 |
|
| 1054 |
|
| 1055 |
|
| 1056 |
|
| 1057 |
|
| 1058 |
|
| 1059 |
|
| 1060 |
|
| 1061 |
|
| 1062 |
|
| 1063 |
|
| 1064 |
|
| 1065 |
|
| 1066 |
|
| 1067 |
|
| 1068 |
CONST char * |
| 1069 |
Tcl_SignalMsg(sig) |
| 1070 |
int sig; |
| 1071 |
{ |
| 1072 |
switch (sig) { |
| 1073 |
#ifdef SIGABRT |
| 1074 |
case SIGABRT: return "SIGABRT"; |
| 1075 |
#endif |
| 1076 |
#ifdef SIGALRM |
| 1077 |
case SIGALRM: return "alarm clock"; |
| 1078 |
#endif |
| 1079 |
#ifdef SIGBUS |
| 1080 |
case SIGBUS: return "bus error"; |
| 1081 |
#endif |
| 1082 |
#ifdef SIGCHLD |
| 1083 |
case SIGCHLD: return "child status changed"; |
| 1084 |
#endif |
| 1085 |
#if defined(SIGCLD) && (!defined(SIGCHLD) || (SIGCLD != SIGCHLD)) |
| 1086 |
case SIGCLD: return "child status changed"; |
| 1087 |
#endif |
| 1088 |
#ifdef SIGCONT |
| 1089 |
case SIGCONT: return "continue after stop"; |
| 1090 |
#endif |
| 1091 |
#if defined(SIGEMT) && (!defined(SIGXCPU) || (SIGEMT != SIGXCPU)) |
| 1092 |
case SIGEMT: return "EMT instruction"; |
| 1093 |
#endif |
| 1094 |
#ifdef SIGFPE |
| 1095 |
case SIGFPE: return "floating-point exception"; |
| 1096 |
#endif |
| 1097 |
#ifdef SIGHUP |
| 1098 |
case SIGHUP: return "hangup"; |
| 1099 |
#endif |
| 1100 |
#ifdef SIGILL |
| 1101 |
case SIGILL: return "illegal instruction"; |
| 1102 |
#endif |
| 1103 |
#ifdef SIGINT |
| 1104 |
case SIGINT: return "interrupt"; |
| 1105 |
#endif |
| 1106 |
#ifdef SIGIO |
| 1107 |
case SIGIO: return "input/output possible on file"; |
| 1108 |
#endif |
| 1109 |
#if defined(SIGIOT) && (!defined(SIGABRT) || (SIGABRT != SIGIOT)) |
| 1110 |
case SIGIOT: return "IOT instruction"; |
| 1111 |
#endif |
| 1112 |
#ifdef SIGKILL |
| 1113 |
case SIGKILL: return "kill signal"; |
| 1114 |
#endif |
| 1115 |
#if defined(SIGLOST) && (!defined(SIGIOT) || (SIGLOST != SIGIOT)) && (!defined(SIGURG) || (SIGLOST != SIGURG)) && (!defined(SIGPROF) || (SIGLOST != SIGPROF)) && (!defined(SIGIO) || (SIGLOST != SIGIO)) |
| 1116 |
case SIGLOST: return "resource lost"; |
| 1117 |
#endif |
| 1118 |
#ifdef SIGPIPE |
| 1119 |
case SIGPIPE: return "write on pipe with no readers"; |
| 1120 |
#endif |
| 1121 |
#if defined(SIGPOLL) && (!defined(SIGIO) || (SIGPOLL != SIGIO)) |
| 1122 |
case SIGPOLL: return "input/output possible on file"; |
| 1123 |
#endif |
| 1124 |
#ifdef SIGPROF |
| 1125 |
case SIGPROF: return "profiling alarm"; |
| 1126 |
#endif |
| 1127 |
#if defined(SIGPWR) && (!defined(SIGXFSZ) || (SIGPWR != SIGXFSZ)) && (!defined(SIGLOST) || (SIGPWR != SIGLOST)) |
| 1128 |
case SIGPWR: return "power-fail restart"; |
| 1129 |
#endif |
| 1130 |
#ifdef SIGQUIT |
| 1131 |
case SIGQUIT: return "quit signal"; |
| 1132 |
#endif |
| 1133 |
#ifdef SIGSEGV |
| 1134 |
case SIGSEGV: return "segmentation violation"; |
| 1135 |
#endif |
| 1136 |
#ifdef SIGSTOP |
| 1137 |
case SIGSTOP: return "stop"; |
| 1138 |
#endif |
| 1139 |
#ifdef SIGSYS |
| 1140 |
case SIGSYS: return "bad argument to system call"; |
| 1141 |
#endif |
| 1142 |
#ifdef SIGTERM |
| 1143 |
case SIGTERM: return "software termination signal"; |
| 1144 |
#endif |
| 1145 |
#ifdef SIGTRAP |
| 1146 |
case SIGTRAP: return "trace trap"; |
| 1147 |
#endif |
| 1148 |
#ifdef SIGTSTP |
| 1149 |
case SIGTSTP: return "stop signal from tty"; |
| 1150 |
#endif |
| 1151 |
#ifdef SIGTTIN |
| 1152 |
case SIGTTIN: return "background tty read"; |
| 1153 |
#endif |
| 1154 |
#ifdef SIGTTOU |
| 1155 |
case SIGTTOU: return "background tty write"; |
| 1156 |
#endif |
| 1157 |
#if defined(SIGURG) && (!defined(SIGIO) || (SIGURG != SIGIO)) |
| 1158 |
case SIGURG: return "urgent I/O condition"; |
| 1159 |
#endif |
| 1160 |
#if defined(SIGUSR1) && (!defined(SIGIO) || (SIGUSR1 != SIGIO)) |
| 1161 |
case SIGUSR1: return "user-defined signal 1"; |
| 1162 |
#endif |
| 1163 |
#if defined(SIGUSR2) && (!defined(SIGURG) || (SIGUSR2 != SIGURG)) |
| 1164 |
case SIGUSR2: return "user-defined signal 2"; |
| 1165 |
#endif |
| 1166 |
#ifdef SIGVTALRM |
| 1167 |
case SIGVTALRM: return "virtual time alarm"; |
| 1168 |
#endif |
| 1169 |
#ifdef SIGWINCH |
| 1170 |
case SIGWINCH: return "window changed"; |
| 1171 |
#endif |
| 1172 |
#ifdef SIGXCPU |
| 1173 |
case SIGXCPU: return "exceeded CPU time limit"; |
| 1174 |
#endif |
| 1175 |
#ifdef SIGXFSZ |
| 1176 |
case SIGXFSZ: return "exceeded file size limit"; |
| 1177 |
#endif |
| 1178 |
} |
| 1179 |
return "unknown signal"; |
| 1180 |
} |