1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
-
+
|
/*
* tclPosixStr.c --
*
* This file contains procedures that generate strings corresponding to
* various POSIX-related codes, such as errno and signals.
*
* Copyright (c) 1991-1994 The Regents of the University of California.
* Copyright (c) 1994-1996 Sun Microsystems, Inc.
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
* RCS: @(#) $Id: tclPosixStr.c,v 1.16 2009/10/21 13:53:14 dkf Exp $
* RCS: @(#) $Id: tclPosixStr.c,v 1.16.2.1 2010/09/17 12:55:39 rmax Exp $
*/
#include "tclInt.h"
/*
*----------------------------------------------------------------------
*
|
| ︙ | | |
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
+
+
+
|
#endif
#ifdef EBADFD
case EBADFD: return "EBADFD";
#endif
#ifdef EBADMSG
case EBADMSG: return "EBADMSG";
#endif
#ifdef ECANCELED
case ECANCELED: return "ECANCELED";
#endif
#ifdef EBADR
case EBADR: return "EBADR";
#endif
#ifdef EBADRPC
case EBADRPC: return "EBADRPC";
#endif
#ifdef EBADRQC
|
| ︙ | | |
306
307
308
309
310
311
312
313
314
315
316
317
318
319
|
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
|
+
+
+
|
#endif
#ifdef ENOTBLK
case ENOTBLK: return "ENOTBLK";
#endif
#ifdef ENOTCONN
case ENOTCONN: return "ENOTCONN";
#endif
#ifdef ENOTRECOVERABLE
case ENOTRECOVERABLE: return "ENOTRECOVERABLE";
#endif
#ifdef ENOTDIR
case ENOTDIR: return "ENOTDIR";
#endif
#if defined(ENOTEMPTY) && (!defined(EEXIST) || (ENOTEMPTY != EEXIST))
case ENOTEMPTY: return "ENOTEMPTY";
#endif
#ifdef ENOTNAM
|
| ︙ | | |
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
|
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
|
+
+
+
+
+
+
|
#endif
#ifdef ENXIO
case ENXIO: return "ENXIO";
#endif
#if defined(EOPNOTSUPP) && (!defined(ENOTSUP) || (ENOTSUP != EOPNOTSUPP))
case EOPNOTSUPP: return "EOPNOTSUPP";
#endif
#ifdef EOTHER
case EOTHER: return "EOTHER";
#endif
#if defined(EOVERFLOW) && (!defined(EFBIG) || (EOVERFLOW != EFBIG)) && (!defined(EINVAL) || (EOVERFLOW != EINVAL))
case EOVERFLOW: return "EOVERFLOW";
#endif
#ifdef EOWNERDEAD
case EOWNERDEAD: return "EOWNERDEAD";
#endif
#ifdef EPERM
case EPERM: return "EPERM";
#endif
#if defined(EPFNOSUPPORT) && (!defined(ENOLCK) || (ENOLCK != EPFNOSUPPORT))
case EPFNOSUPPORT: return "EPFNOSUPPORT";
#endif
#ifdef EPIPE
|
| ︙ | | |
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
|
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
|
-
+
-
+
|
#ifdef EACCES
case EACCES: return "permission denied";
#endif
#ifdef EADDRINUSE
case EADDRINUSE: return "address already in use";
#endif
#ifdef EADDRNOTAVAIL
case EADDRNOTAVAIL: return "can't assign requested address";
case EADDRNOTAVAIL: return "cannot assign requested address";
#endif
#ifdef EADV
case EADV: return "advertise error";
#endif
#ifdef EAFNOSUPPORT
case EAFNOSUPPORT: return "address family not supported by protocol family";
case EAFNOSUPPORT: return "address family not supported by protocol";
#endif
#ifdef EAGAIN
case EAGAIN: return "resource temporarily unavailable";
#endif
#ifdef EALIGN
case EALIGN: return "EALIGN";
#endif
|
| ︙ | | |
519
520
521
522
523
524
525
526
527
528
529
530
531
532
|
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
|
+
+
+
|
#endif
#ifdef EBADFD
case EBADFD: return "file descriptor in bad state";
#endif
#ifdef EBADMSG
case EBADMSG: return "not a data message";
#endif
#ifdef ECANCELED
case ECANCELED: return "operation canceled";
#endif
#ifdef EBADR
case EBADR: return "bad request descriptor";
#endif
#ifdef EBADRPC
case EBADRPC: return "RPC structure is bad";
#endif
#ifdef EBADRQC
|
| ︙ | | |
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
|
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
|
-
+
-
+
|
#ifdef EL3HLT
case EL3HLT: return "level 3 halted";
#endif
#ifdef EL3RST
case EL3RST: return "level 3 reset";
#endif
#ifdef ELIBACC
case ELIBACC: return "can not access a needed shared library";
case ELIBACC: return "cannot access a needed shared library";
#endif
#ifdef ELIBBAD
case ELIBBAD: return "accessing a corrupted shared library";
#endif
#ifdef ELIBEXEC
case ELIBEXEC: return "can not exec a shared library directly";
case ELIBEXEC: return "cannot exec a shared library directly";
#endif
#ifdef ELIBMAX
case ELIBMAX: return
"attempting to link in more shared libraries than system limit";
#endif
#ifdef ELIBSCN
case ELIBSCN: return ".lib section in a.out corrupted";
|
| ︙ | | |
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
|
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
|
-
+
|
#ifdef ENOEXEC
case ENOEXEC: return "exec format error";
#endif
#ifdef ENOLCK
case ENOLCK: return "no locks available";
#endif
#ifdef ENOLINK
case ENOLINK: return "link has be severed";
case ENOLINK: return "link has been severed";
#endif
#ifdef ENOMEM
case ENOMEM: return "not enough memory";
#endif
#ifdef ENOMSG
case ENOMSG: return "no message of desired type";
#endif
|
| ︙ | | |
754
755
756
757
758
759
760
761
762
763
764
765
766
767
|
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
|
+
+
+
|
#endif
#ifdef ENOTBLK
case ENOTBLK: return "block device required";
#endif
#ifdef ENOTCONN
case ENOTCONN: return "socket is not connected";
#endif
#ifdef ENOTRECOVERABLE
case ENOTRECOVERABLE: return "state not recoverable";
#endif
#ifdef ENOTDIR
case ENOTDIR: return "not a directory";
#endif
#if defined(ENOTEMPTY) && (!defined(EEXIST) || (ENOTEMPTY != EEXIST))
case ENOTEMPTY: return "directory not empty";
#endif
#ifdef ENOTNAM
|
| ︙ | | |
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
|
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
|
+
+
+
+
+
+
|
#endif
#ifdef ENXIO
case ENXIO: return "no such device or address";
#endif
#if defined(EOPNOTSUPP) && (!defined(ENOTSUP) || (ENOTSUP != EOPNOTSUPP))
case EOPNOTSUPP: return "operation not supported on socket";
#endif
#ifdef EOTHER
case EOTHER: return "other error";
#endif
#if defined(EOVERFLOW) && (!defined(EFBIG) || (EOVERFLOW != EFBIG)) && (!defined(EINVAL) || (EOVERFLOW != EINVAL))
case EOVERFLOW: return "file too big";
#endif
#ifdef EOWNERDEAD
case EOWNERDEAD: return "owner died";
#endif
#ifdef EPERM
case EPERM: return "not owner";
#endif
#if defined(EPFNOSUPPORT) && (!defined(ENOLCK) || (ENOLCK != EPFNOSUPPORT))
case EPFNOSUPPORT: return "protocol family not supported";
#endif
#ifdef EPIPE
|
| ︙ | | |
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
|
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
|
-
+
|
#ifdef EPROGUNAVAIL
case EPROGUNAVAIL: return "RPC program not available";
#endif
#ifdef EPROTO
case EPROTO: return "protocol error";
#endif
#ifdef EPROTONOSUPPORT
case EPROTONOSUPPORT: return "protocol not suppored";
case EPROTONOSUPPORT: return "protocol not supported";
#endif
#ifdef EPROTOTYPE
case EPROTOTYPE: return "protocol wrong type for socket";
#endif
#ifdef ERANGE
case ERANGE: return "math result unrepresentable";
#endif
|
| ︙ | | |
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
|
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
|
-
+
|
#ifdef ERPCMISMATCH
case ERPCMISMATCH: return "RPC version is wrong";
#endif
#ifdef ERREMOTE
case ERREMOTE: return "object is remote";
#endif
#ifdef ESHUTDOWN
case ESHUTDOWN: return "can't send afer socket shutdown";
case ESHUTDOWN: return "cannot send after socket shutdown";
#endif
#ifdef ESOCKTNOSUPPORT
case ESOCKTNOSUPPORT: return "socket type not supported";
#endif
#ifdef ESPIPE
case ESPIPE: return "invalid seek";
#endif
|
| ︙ | | |
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
|
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
|
-
+
|
#if defined(ETIME) && (!defined(ELOOP) || (ETIME != ELOOP))
case ETIME: return "timer expired";
#endif
#if defined(ETIMEDOUT) && (!defined(ENOSTR) || (ETIMEDOUT != ENOSTR))
case ETIMEDOUT: return "connection timed out";
#endif
#ifdef ETOOMANYREFS
case ETOOMANYREFS: return "too many references: can't splice";
case ETOOMANYREFS: return "too many references: cannot splice";
#endif
#ifdef ETXTBSY
case ETXTBSY: return "text file or pseudo-device busy";
#endif
#ifdef EUCLEAN
case EUCLEAN: return "structure needs cleaning";
#endif
|
| ︙ | | |
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
|
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
|
-
+
|
#ifdef EXFULL
case EXFULL: return "message tables full";
#endif
default:
#ifdef NO_STRERROR
return "unknown POSIX error";
#else
return strerror(errno);
return strerror(err);
#endif
}
}
/*
*----------------------------------------------------------------------
*
|
| ︙ | | |