digitalmars.D - Linux errno - errno.d
- S. (137/137) Jul 13 2006 I noticed that errno.h does not have a d equivilent, so I made this. Ho...
- Alexander Panek (3/144) Jul 13 2006 Woohoo! \o/
I noticed that errno.h does not have a d equivilent, so I made this. Hope it helps. I put it in std/c/linux/ begin 0644 errno.d M;6]D=6QE('-T9"YC+FQI;G5X+F5R<FYO.PH*96YU;2!["B` 15!%4DT /2`Q M"2\J($YO('-U8V <')O8V5S<R`J+PH ($5)3E12(#T -"P)+RH 26YT97)R M=7!T960 <WES=&5M(&-A;&P *B\*("!%24\ /2`U+`DO*B!)+T\ 97)R;W( M1B`](#DL M*B!.;R!C:&EL9"!P<F]C97-S97, *B\*("!%04=!24X /2`Q,2P)+RH 5')Y M(&%G86EN("HO"B` 14Y/345-(#T ,3(L"2\J($]U="!O9B!M96UO<GD *B\* M3%0 /2`Q-"P)+RH 0F%D(&%D9')E<W, *B\*("!%3D]40DQ+(#T ,34L"2\J M($)L;V-K(&1E=FEC92!R97%U:7)E9"`J+PH ($5"55-9(#T ,38L"2\J($1E M=FEC92!O<B!R97-O=7)C92!B=7-Y("HO"B` 145825-4(#T ,3<L"2\J($9I M;&4 97AI<W1S("HO"B` 15A$158 /2`Q."P)+RH 0W)O<W,M9&5V:6-E(&QI M;FL *B\*("!%3D]$158 /2`Q.2P)+RH 3F\ <W5C:"!D979I8V4 *B\*("!% M3D]41$E2(#T ,C`L"2\J($YO="!A(&1I<F5C=&]R>2`J+PH ($5)4T1)4B`] M;G9A;&ED(&%R9W5M96YT("HO"B` 14Y&24Q%(#T ,C,L"2\J($9I;&4 =&%B M;&4 ;W9E<F9L;W< *B\*("!%349)3$4 /2`R-"P)+RH 5&]O(&UA;GD ;W!E M0DE'(#T M"2\J($YO('-P86-E(&QE9G0 ;VX 9&5V:6-E("HO"B` 15-025!%(#T ,CDL M"2\J($EL;&5G86P <V5E:R`J+PH ($523T93(#T ,S`L"2\J(%)E860M;VYL M:6YK<R`J+PH ($5025!%(#T ,S(L"2\J($)R;VME;B!P:7!E("HO"B` 141/ M96YT86)L92`J+PH ($5$14%$3$L /2`S-2P)+RH 4F5S;W5R8V4 9&5A9&QO M8VL =V]U;&0 ;V-C=7( *B\*"B` 14Y!34543T],3TY'(#T ,S8L"2\J($9I M<F0 ;&]C:W, 879A:6QA8FQE("HO"B` 14Y/4UE3(#T ,S L"2\J($9U;F-T M:7)E8W1O<GD ;F]T(&5M<'1Y("HO"B` 14Q/3U` /2`T,"P)+RH 5&]O(&UA M/2`T,BP)+RH 3F\ ;65S<V%G92!O9B!D97-I<F5D('1Y<&4 *B\*("!%2412 M-"P)+RH 0VAA;FYE;"!N=6UB97( ;W5T(&]F(')A;F=E("HO"B` 14PR3E-9 M3D, /2`T-2P)+RH 3&5V96P ,B!N;W0 <WEN8VAR;VYI>F5D("HO"B` 14PS M2$Q4(#T M;V-O;"!D<FEV97( ;F]T(&%T=&%C:&5D("HO"B` 14Y/0U-)(#T -3`L"2\J M($YO($-322!S=')U8W1U<F4 879A:6QA8FQE("HO"B` 14PR2$Q4(#T -3$L M9"!E>&-H86YG92`J+PH ($5"0412(#T -3,L"2\J($EN=F%L:60 <F5Q=65S M="!D97-C<FEP=&]R("HO"B` 15A&54Q,(#T -30L"2\J($5X8VAA;F=E(&9U M(#T -38L"2\J($EN=F%L:60 <F5Q=65S="!C;V1E("HO"B` 14)!1%-,5"`] M14)&3TY4(#T -3DL"2\J($)A9"!F;VYT(&9I;&4 9F]R;6%T("HO"B` 14Y/ M4U12(#T -C`L"2\J($1E=FEC92!N;W0 82!S=')E86T *B\*("!%3D]$051! M(#T -C$L"2\J($YO(&1A=&$ 879A:6QA8FQE("HO"B` 151)344 /2`V,BP) M+RH 5&EM97( 97AP:7)E9"`J+PH ($5.3U-2(#T -C,L"2\J($]U="!O9B!S M86-K86=E(&YO="!I;G-T86QL960 *B\*("!%4D5-3U1%(#T -C8L"2\J($]B M:F5C="!I<R!R96UO=&4 *B\*("!%3D],24Y+(#T -C<L"2\J($QI;FL :&%S M(&)E96X <V5V97)E9"`J+PH ($5!1%8 /2`V."P)+RH 061V97)T:7-E(&5R M<F]R("HO"B` 15-234Y4(#T -CDL"2\J(%-R;6]U;G0 97)R;W( *B\*("!% M("!%4%)/5$\ /2`W,2P)+RH 4')O=&]C;VP 97)R;W( *B\*("!%355,5$E( M3U` /2`W,BP)+RH 375L=&EH;W` 871T96UP=&5D("HO"B` 141/5$1/5"`] M*B!686QU92!T;V\ ;&%R9V4 9F]R(&1E9FEN960 9&%T82!T>7!E("HO"B` M14Y/5%5.25$ /2`W-BP)+RH 3F%M92!N;W0 =6YI<75E(&]N(&YE='=O<FL M*B\*("!%0D%$1D0 /2`W-RP)+RH 1FEL92!D97-C<FEP=&]R(&EN(&)A9"!S M;F=E9"`J+PH ($5,24)!0T, /2`W.2P)+RH 0V%N(&YO="!A8V-E<W, 82!N M965D960 <VAA<F5D(&QI8G)A<GD *B\*("!%3$E"0D%$(#T M8V5S<VEN9R!A(&-O<G)U<'1E9"!S:&%R960 ;&EB<F%R>2`J+PH ($5,24)3 M0TX /2`X,2P)+RH +FQI8B!S96-T:6]N(&EN(&$N;W5T(&-O<G)U<'1E9"`J M+PH ($5,24)-05 /2`X,BP)+RH 071T96UP=&EN9R!T;R!L:6YK(&EN('1O M14E,4T51(#T M15-405)4(#T M('!I<&4 97)R;W( *B\*("!%55-%4E, /2`X-RP)+RH 5&]O(&UA;GD =7-E M(&YO;BUS;V-K970 *B\*("!%1$535$%$1%)215$ /2`X.2P)+RH 1&5S=&EN M871I;VX 861D<F5S<R!R97%U:7)E9"`J+PH ($5-4T=325I%(#T .3`L"2\J M($UE<W-A9V4 =&]O(&QO;F< *B\*("!%4%)/5$]465!%(#T .3$L"2\J(%!R M;W1O8V]L('=R;VYG('1Y<&4 9F]R('-O8VME="`J+PH ($5.3U!23U1/3U!4 M(#T .3(L"2\J(%!R;W1O8V]L(&YO="!A=F%I;&%B;&4 *B\*("!%4%)/5$]. M3U-54%!/4E0 /2`Y,RP)+RH 4')O=&]C;VP ;F]T('-U<'!O<G1E9"`J+PH M($533T-+5$Y/4U504$]25"`](#DT+`DO*B!3;V-K970 ='EP92!N;W0 <W5P M<&]R=&5D("HO"B` 14]03D]44U504"`](#DU+`DO*B!/<&5R871I;VX ;F]T M('-U<'!O<G1E9"!O;B!T<F%N<W!O<G0 96YD<&]I;G0 *B\*("!%4$9.3U-5 M4%!/4E0 /2`Y-BP)+RH 4')O=&]C;VP 9F%M:6QY(&YO="!S=7!P;W)T960 M*B\*("!%049.3U-54%!/4E0 /2`Y-RP)+RH 061D<F5S<R!F86UI;'D ;F]T M('-U<'!O<G1E9"!B>2!P<F]T;V-O;"`J+PH ($5!1$1224Y54T4 /2`Y."P) M+RH 061D<F5S<R!A;')E861Y(&EN('5S92`J+PH ($5!1$123D]4059!24P M/2`Y.2P)+RH 0V%N;F]T(&%S<VEG;B!R97%U97-T960 861D<F5S<R`J+PH M($5.151$3U=.(#T ,3`P+`DO*B!.971W;W)K(&ES(&1O=VX *B\*("!%3D54 M+RH 4V]F='=A<F4 8V%U<V5D(&-O;FYE8W1I;VX 86)O<G0 *B\*("!%0T]. M3E)%4T54(#T M("!%3D]"5493(#T ,3`U+`DO*B!.;R!B=69F97( <W!A8V4 879A:6QA8FQE M86YS<&]R="!E;F1P;VEN="!I<R!N;W0 8V]N;F5C=&5D("HO"B` 15-(551$ M3U=.(#T M<&]I;G0 <VAU=&1O=VX *B\*("!%5$]/34%.65)%1E, /2`Q,#DL"2\J(%1O M;R!M86YY(')E9F5R96YC97,Z(&-A;FYO="!S<&QI8V4 *B\*("!%5$E-141/ M550 /2`Q,3`L"2\J($-O;FYE8W1I;VX =&EM960 ;W5T("HO"B` 14-/3DY2 M14954T5$(#T M,3$T+`DO*B!/<&5R871I;VX 86QR96%D>2!I;B!P<F]G<F5S<R`J+PH ($5) M3E!23T=215-3(#T ,3$U+`DO*B!/<&5R871I;VX ;F]W(&EN('!R;V=R97-S M("HO"B` 15-404Q%(#T ,3$V+`DO*B!3=&%L92!.1E, 9FEL92!H86YD;&4 M*B\*("!%54-,14%.(#T ,3$W+`DO*B!3=')U8W1U<F4 ;F5E9', 8VQE86YI M;F< *B\*("!%3D]43D%-(#T ,3$X+`DO*B!.;W0 82!814Y)6"!N86UE9"!T M>7!E(&9I;&4 *B\*("!%3D%604E,(#T ,3$Y+`DO*B!.;R!814Y)6"!S96UA M86UE9"!T>7!E(&9I;&4 *B\*("!%4D5-3U1%24\ /2`Q,C$L"2\J(%)E;6]T M92!)+T\ 97)R;W( *B\*("!%1%%53U0 /2`Q,C(L"2\J(%%U;W1A(&5X8V5E M("HO"B` 14U%1$E535194$4 /2`Q,C0L"2\J(%=R;VYG(&UE9&EU;2!T>7!E M("HO"B` 14-!3D-%3$5$(#T ,3(U+`DO*B!/<&5R871I;VX 0V%N8V5L960 M*B\*("!%3D]+15D /2`Q,C8L"2\J(%)E<75I<F5D(&ME>2!N;W0 879A:6QA M8FQE("HO"B` 14M%64584$E2140 /2`Q,C<L"2\J($ME>2!H87, 97AP:7)E M9"`J+PH ($5+15E2159/2T5$(#T ,3(X+`DO*B!+97D :&%S(&)E96X <F5V 4=&5D(&)Y('-E<G9I8V4 *B\*?0I% ` end
Jul 13 2006
Woohoo! \o/ Thanks :) S. wrote:I noticed that errno.h does not have a d equivilent, so I made this. Hope it helps. I put it in std/c/linux/ module std.c.linux.errno; enum { EPERM = 1, /* Operation not permitted */ ENOENT = 2, /* No such file or directory */ ESRCH = 3, /* No such process */ EINTR = 4, /* Interrupted system call */ EIO = 5, /* I/O error */ ENXIO = 6, /* No such device or address */ E2BIG = 7, /* Argument list too long */ ENOEXEC = 8, /* Exec format error */ EBADF = 9, /* Bad file number */ ECHILD = 10, /* No child processes */ EAGAIN = 11, /* Try again */ ENOMEM = 12, /* Out of memory */ EACCES = 13, /* Permission denied */ EFAULT = 14, /* Bad address */ ENOTBLK = 15, /* Block device required */ EBUSY = 16, /* Device or resource busy */ EEXIST = 17, /* File exists */ EXDEV = 18, /* Cross-device link */ ENODEV = 19, /* No such device */ ENOTDIR = 20, /* Not a directory */ EISDIR = 21, /* Is a directory */ EINVAL = 22, /* Invalid argument */ ENFILE = 23, /* File table overflow */ EMFILE = 24, /* Too many open files */ ENOTTY = 25, /* Not a typewriter */ ETXTBSY = 26, /* Text file busy */ EFBIG = 27, /* File too large */ ENOSPC = 28, /* No space left on device */ ESPIPE = 29, /* Illegal seek */ EROFS = 30, /* Read-only file system */ EMLINK = 31, /* Too many links */ EPIPE = 32, /* Broken pipe */ EDOM = 33, /* Math argument out of domain of func */ ERANGE = 34, /* Math result not representable */ EDEADLK = 35, /* Resource deadlock would occur */ ENAMETOOLONG = 36, /* File name too long */ ENOLCK = 37, /* No record locks available */ ENOSYS = 38, /* Function not implemented */ ENOTEMPTY = 39, /* Directory not empty */ ELOOP = 40, /* Too many symbolic links encountered */ EWOULDBLOCK = 11, /* Operation would block */ ENOMSG = 42, /* No message of desired type */ EIDRM = 43, /* Identifier removed */ ECHRNG = 44, /* Channel number out of range */ EL2NSYNC = 45, /* Level 2 not synchronized */ EL3HLT = 46, /* Level 3 halted */ EL3RST = 47, /* Level 3 reset */ ELNRNG = 48, /* Link number out of range */ EUNATCH = 49, /* Protocol driver not attached */ ENOCSI = 50, /* No CSI structure available */ EL2HLT = 51, /* Level 2 halted */ EBADE = 52, /* Invalid exchange */ EBADR = 53, /* Invalid request descriptor */ EXFULL = 54, /* Exchange full */ ENOANO = 55, /* No anode */ EBADRQC = 56, /* Invalid request code */ EBADSLT = 57, /* Invalid slot */ EDEADLOCK = 35, EBFONT = 59, /* Bad font file format */ ENOSTR = 60, /* Device not a stream */ ENODATA = 61, /* No data available */ ETIME = 62, /* Timer expired */ ENOSR = 63, /* Out of streams resources */ ENONET = 64, /* Machine is not on the network */ ENOPKG = 65, /* Package not installed */ EREMOTE = 66, /* Object is remote */ ENOLINK = 67, /* Link has been severed */ EADV = 68, /* Advertise error */ ESRMNT = 69, /* Srmount error */ ECOMM = 70, /* Communication error on send */ EPROTO = 71, /* Protocol error */ EMULTIHOP = 72, /* Multihop attempted */ EDOTDOT = 73, /* RFS specific error */ EBADMSG = 74, /* Not a data message */ EOVERFLOW = 75, /* Value too large for defined data type */ ENOTUNIQ = 76, /* Name not unique on network */ EBADFD = 77, /* File descriptor in bad state */ EREMCHG = 78, /* Remote address changed */ ELIBACC = 79, /* Can not access a needed shared library */ ELIBBAD = 80, /* Accessing a corrupted shared library */ ELIBSCN = 81, /* .lib section in a.out corrupted */ ELIBMAX = 82, /* Attempting to link in too many shared libraries */ ELIBEXEC = 83, /* Cannot exec a shared library directly */ EILSEQ = 84, /* Illegal byte sequence */ ERESTART = 85, /* Interrupted system call should be restarted */ ESTRPIPE = 86, /* Streams pipe error */ EUSERS = 87, /* Too many users */ ENOTSOCK = 88, /* Socket operation on non-socket */ EDESTADDRREQ = 89, /* Destination address required */ EMSGSIZE = 90, /* Message too long */ EPROTOTYPE = 91, /* Protocol wrong type for socket */ ENOPROTOOPT = 92, /* Protocol not available */ EPROTONOSUPPORT = 93, /* Protocol not supported */ ESOCKTNOSUPPORT = 94, /* Socket type not supported */ EOPNOTSUPP = 95, /* Operation not supported on transport endpoint */ EPFNOSUPPORT = 96, /* Protocol family not supported */ EAFNOSUPPORT = 97, /* Address family not supported by protocol */ EADDRINUSE = 98, /* Address already in use */ EADDRNOTAVAIL = 99, /* Cannot assign requested address */ ENETDOWN = 100, /* Network is down */ ENETUNREACH = 101, /* Network is unreachable */ ENETRESET = 102, /* Network dropped connection because of reset */ ECONNABORTED = 103, /* Software caused connection abort */ ECONNRESET = 104, /* Connection reset by peer */ ENOBUFS = 105, /* No buffer space available */ EISCONN = 106, /* Transport endpoint is already connected */ ENOTCONN = 107, /* Transport endpoint is not connected */ ESHUTDOWN = 108, /* Cannot send after transport endpoint shutdown */ ETOOMANYREFS = 109, /* Too many references: cannot splice */ ETIMEDOUT = 110, /* Connection timed out */ ECONNREFUSED = 111, /* Connection refused */ EHOSTDOWN = 112, /* Host is down */ EHOSTUNREACH = 113, /* No route to host */ EALREADY = 114, /* Operation already in progress */ EINPROGRESS = 115, /* Operation now in progress */ ESTALE = 116, /* Stale NFS file handle */ EUCLEAN = 117, /* Structure needs cleaning */ ENOTNAM = 118, /* Not a XENIX named type file */ ENAVAIL = 119, /* No XENIX semaphores available */ EISNAM = 120, /* Is a named type file */ EREMOTEIO = 121, /* Remote I/O error */ EDQUOT = 122, /* Quota exceeded */ ENOMEDIUM = 123, /* No medium found */ EMEDIUMTYPE = 124, /* Wrong medium type */ ECANCELED = 125, /* Operation Canceled */ ENOKEY = 126, /* Required key not available */ EKEYEXPIRED = 127, /* Key has expired */ EKEYREVOKED = 128, /* Key has been revoked */ EKEYREJECTED = 129 /* Key was rejected by service */ }
Jul 13 2006