"Fossies" - the Fresh Open Source Software Archive

Member "dmd2/src/druntime/src/core/stdc/errno.d" (20 Nov 2020, 101164 Bytes) of package /linux/misc/dmd.2.094.2.linux.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) D source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 /**
    2  * D header file for C99.
    3  *
    4  * $(C_HEADER_DESCRIPTION pubs.opengroup.org/onlinepubs/009695399/basedefs/_errno.h.html, _errno.h)
    5  *
    6  * Copyright: Copyright Sean Kelly 2005 - 2009.
    7  * License: Distributed under the
    8  *      $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0).
    9  *    (See accompanying file LICENSE)
   10  * Authors:   Sean Kelly, Alex Rønne Petersen
   11  * Source:    https://github.com/dlang/druntime/blob/master/src/core/stdc/errno.d
   12  * Standards: ISO/IEC 9899:1999 (E)
   13  */
   14 
   15 module core.stdc.errno;
   16 
   17 version (OSX)
   18     version = Darwin;
   19 else version (iOS)
   20     version = Darwin;
   21 else version (TVOS)
   22     version = Darwin;
   23 else version (WatchOS)
   24     version = Darwin;
   25 
   26 version (ARM)     version = ARM_Any;
   27 version (AArch64) version = ARM_Any;
   28 version (HPPA)    version = HPPA_Any;
   29 version (MIPS32)  version = MIPS_Any;
   30 version (MIPS64)  version = MIPS_Any;
   31 version (PPC)     version = PPC_Any;
   32 version (PPC64)   version = PPC_Any;
   33 version (RISCV32) version = RISCV_Any;
   34 version (RISCV64) version = RISCV_Any;
   35 version (S390)    version = IBMZ_Any;
   36 version (SPARC)   version = SPARC_Any;
   37 version (SPARC64) version = SPARC_Any;
   38 version (SystemZ) version = IBMZ_Any;
   39 version (X86)     version = X86_Any;
   40 version (X86_64)  version = X86_Any;
   41 
   42 @trusted: // Only manipulates errno.
   43 nothrow:
   44 @nogc:
   45 
   46 version (CRuntime_DigitalMars)
   47 {
   48     extern (C)
   49     {
   50         ref int _errno();
   51         alias errno = _errno;
   52     }
   53 }
   54 else version (CRuntime_Microsoft)
   55 {
   56     extern (C)
   57     {
   58         ref int _errno();
   59         alias errno = _errno;
   60     }
   61 }
   62 else version (CRuntime_Glibc)
   63 {
   64     extern (C)
   65     {
   66         ref int __errno_location();
   67         alias errno = __errno_location;
   68     }
   69 }
   70 else version (CRuntime_Musl)
   71 {
   72     extern (C)
   73     {
   74         ref int __errno_location();
   75         alias errno = __errno_location;
   76     }
   77 }
   78 else version (OpenBSD)
   79 {
   80     // https://github.com/openbsd/src/blob/master/include/errno.h
   81     extern (C)
   82     {
   83         ref int __errno();
   84         alias errno = __errno;
   85     }
   86 }
   87 else version (NetBSD)
   88 {
   89     // https://github.com/NetBSD/src/blob/trunk/include/errno.h
   90     extern (C)
   91     {
   92         ref int __errno();
   93         alias errno = __errno;
   94     }
   95 }
   96 else version (FreeBSD)
   97 {
   98     extern (C)
   99     {
  100         ref int __error();
  101         alias errno = __error;
  102     }
  103 }
  104 else version (DragonFlyBSD)
  105 {
  106     extern (C)
  107     {
  108         pragma(mangle, "errno") int __errno;
  109         ref int __error() {
  110             return __errno;
  111         }
  112         alias errno = __error;
  113     }
  114 }
  115 else version (CRuntime_Bionic)
  116 {
  117     extern (C)
  118     {
  119         ref int __errno();
  120         alias errno = __errno;
  121     }
  122 }
  123 else version (CRuntime_UClibc)
  124 {
  125     extern (C)
  126     {
  127         ref int __errno_location();
  128         alias errno = __errno_location;
  129     }
  130 }
  131 else version (Darwin)
  132 {
  133     extern (C)
  134     {
  135         ref int __error();
  136         alias errno = __error;
  137     }
  138 }
  139 else version (Solaris)
  140 {
  141     extern (C)
  142     {
  143         ref int ___errno();
  144         alias errno = ___errno;
  145     }
  146 }
  147 else version (Haiku)
  148 {
  149     // https://github.com/haiku/haiku/blob/master/headers/posix/errno.h
  150     extern (C)
  151     {
  152         ref int _errnop();
  153         alias errno = _errnop;
  154     }
  155 }
  156 else
  157 {
  158     ///
  159     @property int errno() { return getErrno(); }
  160     ///
  161     @property int errno(int n) { return setErrno(n); }
  162 
  163     extern (C)
  164     {
  165         private int getErrno();      // for internal use
  166         private int setErrno(int);   // for internal use
  167     }
  168 }
  169 
  170 extern (C):
  171 
  172 
  173 version (Windows)
  174 {
  175     enum EPERM              = 1;        /// Operation not permitted
  176     enum ENOENT             = 2;        /// No such file or directory
  177     enum ESRCH              = 3;        /// No such process
  178     enum EINTR              = 4;        /// Interrupted system call
  179     enum EIO                = 5;        /// I/O error
  180     enum ENXIO              = 6;        /// No such device or address
  181     enum E2BIG              = 7;        /// Argument list too long
  182     enum ENOEXEC            = 8;        /// Exec format error
  183     enum EBADF              = 9;        /// Bad file number
  184     enum ECHILD             = 10;       /// No child processes
  185     enum EAGAIN             = 11;       /// Try again
  186     enum ENOMEM             = 12;       /// Out of memory
  187     enum EACCES             = 13;       /// Permission denied
  188     enum EFAULT             = 14;       /// Bad address
  189     enum EBUSY              = 16;       /// Device or resource busy
  190     enum EEXIST             = 17;       /// File exists
  191     enum EXDEV              = 18;       /// Cross-device link
  192     enum ENODEV             = 19;       /// No such device
  193     enum ENOTDIR            = 20;       /// Not a directory
  194     enum EISDIR             = 21;       /// Is a directory
  195     enum EINVAL             = 22;       /// Invalid argument
  196     enum ENFILE             = 23;       /// File table overflow
  197     enum EMFILE             = 24;       /// Too many open files
  198     enum ENOTTY             = 25;       /// Not a typewriter
  199     enum EFBIG              = 27;       /// File too large
  200     enum ENOSPC             = 28;       /// No space left on device
  201     enum ESPIPE             = 29;       /// Illegal seek
  202     enum EROFS              = 30;       /// Read-only file system
  203     enum EMLINK             = 31;       /// Too many links
  204     enum EPIPE              = 32;       /// Broken pipe
  205     enum EDOM               = 33;       /// Math argument out of domain of func
  206     enum ERANGE             = 34;       /// Math result not representable
  207     enum EDEADLK            = 36;       /// Resource deadlock would occur
  208     enum ENAMETOOLONG       = 38;       /// File name too long
  209     enum ENOLCK             = 39;       /// No record locks available
  210     enum ENOSYS             = 40;       /// Function not implemented
  211     enum ENOTEMPTY          = 41;       /// Directory not empty
  212     enum EILSEQ             = 42;       /// Illegal byte sequence
  213     enum EDEADLOCK          = EDEADLK;  /// Resource deadlock would occur
  214 
  215     // POSIX compatibility
  216     // See_Also: https://docs.microsoft.com/en-us/cpp/c-runtime-library/errno-constants
  217     enum EADDRINUSE         = 100;
  218     enum EADDRNOTAVAIL      = 101;
  219     enum EAFNOSUPPORT       = 102;
  220     enum EALREADY           = 103;
  221     enum EBADMSG            = 104;
  222     enum ECANCELED          = 105;
  223     enum ECONNABORTED       = 106;
  224     enum ECONNREFUSED       = 107;
  225     enum ECONNRESET         = 108;
  226     enum EDESTADDRREQ       = 109;
  227     enum EHOSTUNREACH       = 110;
  228     enum EIDRM              = 111;
  229     enum EINPROGRESS        = 112;
  230     enum EISCONN            = 113;
  231     enum ELOOP              = 114;
  232     enum EMSGSIZE           = 115;
  233     enum ENETDOWN           = 116;
  234     enum ENETRESET          = 117;
  235     enum ENETUNREACH        = 118;
  236     enum ENOBUFS            = 119;
  237     enum ENODATA            = 120;
  238     enum ENOLINK            = 121;
  239     enum ENOMSG             = 122;
  240     enum ENOPROTOOPT        = 123;
  241     enum ENOSR              = 124;
  242     enum ENOSTR             = 125;
  243     enum ENOTCONN           = 126;
  244     enum ENOTRECOVERABLE    = 127;
  245     enum ENOTSOCK           = 128;
  246     enum ENOTSUP            = 129;
  247     enum EOPNOTSUPP         = 130;
  248     enum EOTHER             = 131;
  249     enum EOVERFLOW          = 132;
  250     enum EOWNERDEAD         = 133;
  251     enum EPROTO             = 134;
  252     enum EPROTONOSUPPORT    = 135;
  253     enum EPROTOTYPE         = 136;
  254     enum ETIME              = 137;
  255     enum ETIMEDOUT          = 138;
  256     enum ETXTBSY            = 139;
  257     enum EWOULDBLOCK        = 140;
  258 }
  259 else version (linux)
  260 {
  261     enum EPERM              = 1;  ///
  262     enum ENOENT             = 2;  ///
  263     enum ESRCH              = 3;  ///
  264     enum EINTR              = 4;  ///
  265     enum EIO                = 5;  ///
  266     enum ENXIO              = 6;  ///
  267     enum E2BIG              = 7;  ///
  268     enum ENOEXEC            = 8;  ///
  269     enum EBADF              = 9;  ///
  270     enum ECHILD             = 10; ///
  271     enum EAGAIN             = 11; ///
  272     enum ENOMEM             = 12; ///
  273     enum EACCES             = 13; ///
  274     enum EFAULT             = 14; ///
  275     enum ENOTBLK            = 15; ///
  276     enum EBUSY              = 16; ///
  277     enum EEXIST             = 17; ///
  278     enum EXDEV              = 18; ///
  279     enum ENODEV             = 19; ///
  280     enum ENOTDIR            = 20; ///
  281     enum EISDIR             = 21; ///
  282     enum EINVAL             = 22; ///
  283     enum ENFILE             = 23; ///
  284     enum EMFILE             = 24; ///
  285     enum ENOTTY             = 25; ///
  286     enum ETXTBSY            = 26; ///
  287     enum EFBIG              = 27; ///
  288     enum ENOSPC             = 28; ///
  289     enum ESPIPE             = 29; ///
  290     enum EROFS              = 30; ///
  291     enum EMLINK             = 31; ///
  292     enum EPIPE              = 32; ///
  293     enum EDOM               = 33; ///
  294     enum ERANGE             = 34; ///
  295 
  296     version (X86_Any)
  297     {
  298         enum EDEADLK            = 35;         ///
  299         enum ENAMETOOLONG       = 36;         ///
  300         enum ENOLCK             = 37;         ///
  301         enum ENOSYS             = 38;         ///
  302         enum ENOTEMPTY          = 39;         ///
  303         enum ELOOP              = 40;         ///
  304         enum EWOULDBLOCK        = EAGAIN;     ///
  305         enum ENOMSG             = 42;         ///
  306         enum EIDRM              = 43;         ///
  307         enum ECHRNG             = 44;         ///
  308         enum EL2NSYNC           = 45;         ///
  309         enum EL3HLT             = 46;         ///
  310         enum EL3RST             = 47;         ///
  311         enum ELNRNG             = 48;         ///
  312         enum EUNATCH            = 49;         ///
  313         enum ENOCSI             = 50;         ///
  314         enum EL2HLT             = 51;         ///
  315         enum EBADE              = 52;         ///
  316         enum EBADR              = 53;         ///
  317         enum EXFULL             = 54;         ///
  318         enum ENOANO             = 55;         ///
  319         enum EBADRQC            = 56;         ///
  320         enum EBADSLT            = 57;         ///
  321         enum EDEADLOCK          = EDEADLK;    ///
  322         enum EBFONT             = 59;         ///
  323         enum ENOSTR             = 60;         ///
  324         enum ENODATA            = 61;         ///
  325         enum ETIME              = 62;         ///
  326         enum ENOSR              = 63;         ///
  327         enum ENONET             = 64;         ///
  328         enum ENOPKG             = 65;         ///
  329         enum EREMOTE            = 66;         ///
  330         enum ENOLINK            = 67;         ///
  331         enum EADV               = 68;         ///
  332         enum ESRMNT             = 69;         ///
  333         enum ECOMM              = 70;         ///
  334         enum EPROTO             = 71;         ///
  335         enum EMULTIHOP          = 72;         ///
  336         enum EDOTDOT            = 73;         ///
  337         enum EBADMSG            = 74;         ///
  338         enum EOVERFLOW          = 75;         ///
  339         enum ENOTUNIQ           = 76;         ///
  340         enum EBADFD             = 77;         ///
  341         enum EREMCHG            = 78;         ///
  342         enum ELIBACC            = 79;         ///
  343         enum ELIBBAD            = 80;         ///
  344         enum ELIBSCN            = 81;         ///
  345         enum ELIBMAX            = 82;         ///
  346         enum ELIBEXEC           = 83;         ///
  347         enum EILSEQ             = 84;         ///
  348         enum ERESTART           = 85;         ///
  349         enum ESTRPIPE           = 86;         ///
  350         enum EUSERS             = 87;         ///
  351         enum ENOTSOCK           = 88;         ///
  352         enum EDESTADDRREQ       = 89;         ///
  353         enum EMSGSIZE           = 90;         ///
  354         enum EPROTOTYPE         = 91;         ///
  355         enum ENOPROTOOPT        = 92;         ///
  356         enum EPROTONOSUPPORT    = 93;         ///
  357         enum ESOCKTNOSUPPORT    = 94;         ///
  358         enum EOPNOTSUPP         = 95;         ///
  359         enum ENOTSUP            = EOPNOTSUPP; ///
  360         enum EPFNOSUPPORT       = 96;         ///
  361         enum EAFNOSUPPORT       = 97;         ///
  362         enum EADDRINUSE         = 98;         ///
  363         enum EADDRNOTAVAIL      = 99;         ///
  364         enum ENETDOWN           = 100;        ///
  365         enum ENETUNREACH        = 101;        ///
  366         enum ENETRESET          = 102;        ///
  367         enum ECONNABORTED       = 103;        ///
  368         enum ECONNRESET         = 104;        ///
  369         enum ENOBUFS            = 105;        ///
  370         enum EISCONN            = 106;        ///
  371         enum ENOTCONN           = 107;        ///
  372         enum ESHUTDOWN          = 108;        ///
  373         enum ETOOMANYREFS       = 109;        ///
  374         enum ETIMEDOUT          = 110;        ///
  375         enum ECONNREFUSED       = 111;        ///
  376         enum EHOSTDOWN          = 112;        ///
  377         enum EHOSTUNREACH       = 113;        ///
  378         enum EALREADY           = 114;        ///
  379         enum EINPROGRESS        = 115;        ///
  380         enum ESTALE             = 116;        ///
  381         enum EUCLEAN            = 117;        ///
  382         enum ENOTNAM            = 118;        ///
  383         enum ENAVAIL            = 119;        ///
  384         enum EISNAM             = 120;        ///
  385         enum EREMOTEIO          = 121;        ///
  386         enum EDQUOT             = 122;        ///
  387         enum ENOMEDIUM          = 123;        ///
  388         enum EMEDIUMTYPE        = 124;        ///
  389         enum ECANCELED          = 125;        ///
  390         enum ENOKEY             = 126;        ///
  391         enum EKEYEXPIRED        = 127;        ///
  392         enum EKEYREVOKED        = 128;        ///
  393         enum EKEYREJECTED       = 129;        ///
  394         enum EOWNERDEAD         = 130;        ///
  395         enum ENOTRECOVERABLE    = 131;        ///
  396         enum ERFKILL            = 132;        ///
  397         enum EHWPOISON          = 133;        ///
  398     }
  399     else version (ARM_Any)
  400     {
  401         enum EDEADLK            = 35;         ///
  402         enum ENAMETOOLONG       = 36;         ///
  403         enum ENOLCK             = 37;         ///
  404         enum ENOSYS             = 38;         ///
  405         enum ENOTEMPTY          = 39;         ///
  406         enum ELOOP              = 40;         ///
  407         enum EWOULDBLOCK        = EAGAIN;     ///
  408         enum ENOMSG             = 42;         ///
  409         enum EIDRM              = 43;         ///
  410         enum ECHRNG             = 44;         ///
  411         enum EL2NSYNC           = 45;         ///
  412         enum EL3HLT             = 46;         ///
  413         enum EL3RST             = 47;         ///
  414         enum ELNRNG             = 48;         ///
  415         enum EUNATCH            = 49;         ///
  416         enum ENOCSI             = 50;         ///
  417         enum EL2HLT             = 51;         ///
  418         enum EBADE              = 52;         ///
  419         enum EBADR              = 53;         ///
  420         enum EXFULL             = 54;         ///
  421         enum ENOANO             = 55;         ///
  422         enum EBADRQC            = 56;         ///
  423         enum EBADSLT            = 57;         ///
  424         enum EDEADLOCK          = EDEADLK;    ///
  425         enum EBFONT             = 59;         ///
  426         enum ENOSTR             = 60;         ///
  427         enum ENODATA            = 61;         ///
  428         enum ETIME              = 62;         ///
  429         enum ENOSR              = 63;         ///
  430         enum ENONET             = 64;         ///
  431         enum ENOPKG             = 65;         ///
  432         enum EREMOTE            = 66;         ///
  433         enum ENOLINK            = 67;         ///
  434         enum EADV               = 68;         ///
  435         enum ESRMNT             = 69;         ///
  436         enum ECOMM              = 70;         ///
  437         enum EPROTO             = 71;         ///
  438         enum EMULTIHOP          = 72;         ///
  439         enum EDOTDOT            = 73;         ///
  440         enum EBADMSG            = 74;         ///
  441         enum EOVERFLOW          = 75;         ///
  442         enum ENOTUNIQ           = 76;         ///
  443         enum EBADFD             = 77;         ///
  444         enum EREMCHG            = 78;         ///
  445         enum ELIBACC            = 79;         ///
  446         enum ELIBBAD            = 80;         ///
  447         enum ELIBSCN            = 81;         ///
  448         enum ELIBMAX            = 82;         ///
  449         enum ELIBEXEC           = 83;         ///
  450         enum EILSEQ             = 84;         ///
  451         enum ERESTART           = 85;         ///
  452         enum ESTRPIPE           = 86;         ///
  453         enum EUSERS             = 87;         ///
  454         enum ENOTSOCK           = 88;         ///
  455         enum EDESTADDRREQ       = 89;         ///
  456         enum EMSGSIZE           = 90;         ///
  457         enum EPROTOTYPE         = 91;         ///
  458         enum ENOPROTOOPT        = 92;         ///
  459         enum EPROTONOSUPPORT    = 93;         ///
  460         enum ESOCKTNOSUPPORT    = 94;         ///
  461         enum EOPNOTSUPP         = 95;         ///
  462         enum ENOTSUP            = EOPNOTSUPP; ///
  463         enum EPFNOSUPPORT       = 96;         ///
  464         enum EAFNOSUPPORT       = 97;         ///
  465         enum EADDRINUSE         = 98;         ///
  466         enum EADDRNOTAVAIL      = 99;         ///
  467         enum ENETDOWN           = 100;        ///
  468         enum ENETUNREACH        = 101;        ///
  469         enum ENETRESET          = 102;        ///
  470         enum ECONNABORTED       = 103;        ///
  471         enum ECONNRESET         = 104;        ///
  472         enum ENOBUFS            = 105;        ///
  473         enum EISCONN            = 106;        ///
  474         enum ENOTCONN           = 107;        ///
  475         enum ESHUTDOWN          = 108;        ///
  476         enum ETOOMANYREFS       = 109;        ///
  477         enum ETIMEDOUT          = 110;        ///
  478         enum ECONNREFUSED       = 111;        ///
  479         enum EHOSTDOWN          = 112;        ///
  480         enum EHOSTUNREACH       = 113;        ///
  481         enum EALREADY           = 114;        ///
  482         enum EINPROGRESS        = 115;        ///
  483         enum ESTALE             = 116;        ///
  484         enum EUCLEAN            = 117;        ///
  485         enum ENOTNAM            = 118;        ///
  486         enum ENAVAIL            = 119;        ///
  487         enum EISNAM             = 120;        ///
  488         enum EREMOTEIO          = 121;        ///
  489         enum EDQUOT             = 122;        ///
  490         enum ENOMEDIUM          = 123;        ///
  491         enum EMEDIUMTYPE        = 124;        ///
  492         enum ECANCELED          = 125;        ///
  493         enum ENOKEY             = 126;        ///
  494         enum EKEYEXPIRED        = 127;        ///
  495         enum EKEYREVOKED        = 128;        ///
  496         enum EKEYREJECTED       = 129;        ///
  497         enum EOWNERDEAD         = 130;        ///
  498         enum ENOTRECOVERABLE    = 131;        ///
  499         enum ERFKILL            = 132;        ///
  500         enum EHWPOISON          = 133;        ///
  501     }
  502     else version (HPPA_Any)
  503     {
  504         enum ENOMSG             = 35;         ///
  505         enum EIDRM              = 36;         ///
  506         enum ECHRNG             = 37;         ///
  507         enum EL2NSYNC           = 38;         ///
  508         enum EL3HLT             = 39;         ///
  509         enum EL3RST             = 40;         ///
  510         enum ELNRNG             = 41;         ///
  511         enum EUNATCH            = 42;         ///
  512         enum ENOCSI             = 43;         ///
  513         enum EL2HLT             = 44;         ///
  514         enum EDEADLK            = 45;         ///
  515         enum EDEADLOCK          = EDEADLK;    ///
  516         enum ENOLCK             = 46;         ///
  517         enum EILSEQ             = 47;         ///
  518         enum ENONET             = 50;         ///
  519         enum ENODATA            = 51;         ///
  520         enum ETIME              = 52;         ///
  521         enum ENOSR              = 53;         ///
  522         enum ENOSTR             = 54;         ///
  523         enum ENOPKG             = 55;         ///
  524         enum ENOLINK            = 57;         ///
  525         enum EADV               = 58;         ///
  526         enum ESRMNT             = 59;         ///
  527         enum ECOMM              = 60;         ///
  528         enum EPROTO             = 61;         ///
  529         enum EMULTIHOP          = 64;         ///
  530         enum EDOTDOT            = 66;         ///
  531         enum EBADMSG            = 67;         ///
  532         enum EUSERS             = 68;         ///
  533         enum EDQUOT             = 69;         ///
  534         enum ESTALE             = 70;         ///
  535         enum EREMOTE            = 71;         ///
  536         enum EOVERFLOW          = 72;         ///
  537         enum EBADE              = 160;        ///
  538         enum EBADR              = 161;        ///
  539         enum EXFULL             = 162;        ///
  540         enum ENOANO             = 163;        ///
  541         enum EBADRQC            = 164;        ///
  542         enum EBADSLT            = 165;        ///
  543         enum EBFONT             = 166;        ///
  544         enum ENOTUNIQ           = 167;        ///
  545         enum EBADFD             = 168;        ///
  546         enum EREMCHG            = 169;        ///
  547         enum ELIBACC            = 170;        ///
  548         enum ELIBBAD            = 171;        ///
  549         enum ELIBSCN            = 172;        ///
  550         enum ELIBMAX            = 173;        ///
  551         enum ELIBEXEC           = 174;        ///
  552         enum ERESTART           = 175;        ///
  553         enum ESTRPIPE           = 176;        ///
  554         enum EUCLEAN            = 177;        ///
  555         enum ENOTNAM            = 178;        ///
  556         enum ENAVAIL            = 179;        ///
  557         enum EISNAM             = 180;        ///
  558         enum EREMOTEIO          = 181;        ///
  559         enum ENOMEDIUM          = 182;        ///
  560         enum EMEDIUMTYPE        = 183;        ///
  561         enum ENOKEY             = 184;        ///
  562         enum EKEYEXPIRED        = 185;        ///
  563         enum EKEYREVOKED        = 186;        ///
  564         enum EKEYREJECTED       = 187;        ///
  565         enum ENOSYM             = 215;        ///
  566         enum ENOTSOCK           = 216;        ///
  567         enum EDESTADDRREQ       = 217;        ///
  568         enum EMSGSIZE           = 218;        ///
  569         enum EPROTOTYPE         = 219;        ///
  570         enum ENOPROTOOPT        = 220;        ///
  571         enum EPROTONOSUPPORT    = 221;        ///
  572         enum ESOCKTNOSUPPORT    = 221;        ///
  573         enum EOPNOTSUPP         = 223;        ///
  574         enum EPFNOSUPPORT       = 224;        ///
  575         enum EAFNOSUPPORT       = 225;        ///
  576         enum EADDRINUSE         = 226;        ///
  577         enum EADDRNOTAVAIL      = 227;        ///
  578         enum ENETDOWN           = 228;        ///
  579         enum ENETUNREACH        = 229;        ///
  580         enum ENETRESET          = 230;        ///
  581         enum ECONNABORTED       = 231;        ///
  582         enum ECONNRESET         = 232;        ///
  583         enum ENOBUFS            = 233;        ///
  584         enum EISCONN            = 234;        ///
  585         enum ENOTCONN           = 235;        ///
  586         enum ESHUTDOWN          = 236;        ///
  587         enum ETOOMANYREFS       = 237;        ///
  588         enum ETIMEDOUT          = 238;        ///
  589         enum ECONNREFUSED       = 239;        ///
  590         enum EREFUSED           = ECONNREFUSED; ///
  591         enum EREMOTERELEASE     = 240;        ///
  592         enum EHOSTDOWN          = 241;        ///
  593         enum EHOSTUNREACH       = 242;        ///
  594         enum EALREADY           = 244;        ///
  595         enum EINPROGRESS        = 245;        ///
  596         enum EWOULDBLOCK        = EAGAIN;     ///
  597         enum ENOTEMPTY          = 247;        ///
  598         enum ENAMETOOLONG       = 248;        ///
  599         enum ELOOP              = 249;        ///
  600         enum ENOSYS             = 251;        ///
  601         enum ECANCELLED         = 253;        ///
  602         enum ECANCELED          = ECANCELLED;  ///
  603         enum EOWNERDEAD         = 254;        ///
  604         enum ENOTRECOVERABLE    = 255;        ///
  605         enum ERFKILL            = 256;        ///
  606         enum EHWPOISON          = 257;        ///
  607     }
  608     else version (MIPS_Any)
  609     {
  610         enum ENOMSG             = 35;         ///
  611         enum EIDRM              = 36;         ///
  612         enum ECHRNG             = 37;         ///
  613         enum EL2NSYNC           = 38;         ///
  614         enum EL3HLT             = 39;         ///
  615         enum EL3RST             = 40;         ///
  616         enum ELNRNG             = 41;         ///
  617         enum EUNATCH            = 42;         ///
  618         enum ENOCSI             = 43;         ///
  619         enum EL2HLT             = 44;         ///
  620         enum EDEADLK            = 45;         ///
  621         enum ENOLCK             = 46;         ///
  622         enum EBADE              = 50;         ///
  623         enum EBADR              = 51;         ///
  624         enum EXFULL             = 52;         ///
  625         enum ENOANO             = 53;         ///
  626         enum EBADRQC            = 54;         ///
  627         enum EBADSLT            = 55;         ///
  628         enum EDEADLOCK          = 56;         ///
  629         enum EBFONT             = 59;         ///
  630         enum ENOSTR             = 60;         ///
  631         enum ENODATA            = 61;         ///
  632         enum ETIME              = 62;         ///
  633         enum ENOSR              = 63;         ///
  634         enum ENONET             = 64;         ///
  635         enum ENOPKG             = 65;         ///
  636         enum EREMOTE            = 66;         ///
  637         enum ENOLINK            = 67;         ///
  638         enum EADV               = 68;         ///
  639         enum ESRMNT             = 69;         ///
  640         enum ECOMM              = 70;         ///
  641         enum EPROTO             = 71;         ///
  642         enum EDOTDOT            = 73;         ///
  643         enum EMULTIHOP          = 74;         ///
  644         enum EBADMSG            = 77;         ///
  645         enum ENAMETOOLONG       = 78;         ///
  646         enum EOVERFLOW          = 79;         ///
  647         enum ENOTUNIQ           = 80;         ///
  648         enum EBADFD             = 81;         ///
  649         enum EREMCHG            = 82;         ///
  650         enum ELIBACC            = 83;         ///
  651         enum ELIBBAD            = 84;         ///
  652         enum ELIBSCN            = 85;         ///
  653         enum ELIBMAX            = 86;         ///
  654         enum ELIBEXEC           = 87;         ///
  655         enum EILSEQ             = 88;         ///
  656         enum ENOSYS             = 89;         ///
  657         enum ELOOP              = 90;         ///
  658         enum ERESTART           = 91;         ///
  659         enum ESTRPIPE           = 92;         ///
  660         enum ENOTEMPTY          = 93;         ///
  661         enum EUSERS             = 94;         ///
  662         enum ENOTSOCK           = 95;         ///
  663         enum EDESTADDRREQ       = 96;         ///
  664         enum EMSGSIZE           = 97;         ///
  665         enum EPROTOTYPE         = 98;         ///
  666         enum ENOPROTOOPT        = 99;         ///
  667         enum EPROTONOSUPPORT    = 120;        ///
  668         enum ESOCKTNOSUPPORT    = 121;        ///
  669         enum EOPNOTSUPP         = 122;        ///
  670         enum ENOTSUP            = EOPNOTSUPP; ///
  671         enum EPFNOSUPPORT       = 123;        ///
  672         enum EAFNOSUPPORT       = 124;        ///
  673         enum EADDRINUSE         = 125;        ///
  674         enum EADDRNOTAVAIL      = 126;        ///
  675         enum ENETDOWN           = 127;        ///
  676         enum ENETUNREACH        = 128;        ///
  677         enum ENETRESET          = 129;        ///
  678         enum ECONNABORTED       = 130;        ///
  679         enum ECONNRESET         = 131;        ///
  680         enum ENOBUFS            = 132;        ///
  681         enum EISCONN            = 133;        ///
  682         enum ENOTCONN           = 134;        ///
  683         enum EUCLEAN            = 135;        ///
  684         enum ENOTNAM            = 137;        ///
  685         enum ENAVAIL            = 138;        ///
  686         enum EISNAM             = 139;        ///
  687         enum EREMOTEIO          = 140;        ///
  688         enum EINIT              = 141;        ///
  689         enum EREMDEV            = 142;        ///
  690         enum ESHUTDOWN          = 143;        ///
  691         enum ETOOMANYREFS       = 144;        ///
  692         enum ETIMEDOUT          = 145;        ///
  693         enum ECONNREFUSED       = 146;        ///
  694         enum EHOSTDOWN          = 147;        ///
  695         enum EHOSTUNREACH       = 148;        ///
  696         enum EWOULDBLOCK        = EAGAIN;     ///
  697         enum EALREADY           = 149;        ///
  698         enum EINPROGRESS        = 150;        ///
  699         enum ESTALE             = 151;        ///
  700         enum ECANCELED          = 158;        ///
  701         enum ENOMEDIUM          = 159;        ///
  702         enum EMEDIUMTYPE        = 160;        ///
  703         enum ENOKEY             = 161;        ///
  704         enum EKEYEXPIRED        = 162;        ///
  705         enum EKEYREVOKED        = 163;        ///
  706         enum EKEYREJECTED       = 164;        ///
  707         enum EOWNERDEAD         = 165;        ///
  708         enum ENOTRECOVERABLE    = 166;        ///
  709         enum ERFKILL            = 167;        ///
  710         enum EHWPOISON          = 168;        ///
  711         enum EDQUOT             = 1133;       ///
  712     }
  713     else version (PPC_Any)
  714     {
  715         enum EDEADLK            = 35;         ///
  716         enum ENAMETOOLONG       = 36;         ///
  717         enum ENOLCK             = 37;         ///
  718         enum ENOSYS             = 38;         ///
  719         enum ENOTEMPTY          = 39;         ///
  720         enum ELOOP              = 40;         ///
  721         enum EWOULDBLOCK        = EAGAIN;     ///
  722         enum ENOMSG             = 42;         ///
  723         enum EIDRM              = 43;         ///
  724         enum ECHRNG             = 44;         ///
  725         enum EL2NSYNC           = 45;         ///
  726         enum EL3HLT             = 46;         ///
  727         enum EL3RST             = 47;         ///
  728         enum ELNRNG             = 48;         ///
  729         enum EUNATCH            = 49;         ///
  730         enum ENOCSI             = 50;         ///
  731         enum EL2HLT             = 51;         ///
  732         enum EBADE              = 52;         ///
  733         enum EBADR              = 53;         ///
  734         enum EXFULL             = 54;         ///
  735         enum ENOANO             = 55;         ///
  736         enum EBADRQC            = 56;         ///
  737         enum EBADSLT            = 57;         ///
  738         enum EDEADLOCK          = 58;         ///
  739         enum EBFONT             = 59;         ///
  740         enum ENOSTR             = 60;         ///
  741         enum ENODATA            = 61;         ///
  742         enum ETIME              = 62;         ///
  743         enum ENOSR              = 63;         ///
  744         enum ENONET             = 64;         ///
  745         enum ENOPKG             = 65;         ///
  746         enum EREMOTE            = 66;         ///
  747         enum ENOLINK            = 67;         ///
  748         enum EADV               = 68;         ///
  749         enum ESRMNT             = 69;         ///
  750         enum ECOMM              = 70;         ///
  751         enum EPROTO             = 71;         ///
  752         enum EMULTIHOP          = 72;         ///
  753         enum EDOTDOT            = 73;         ///
  754         enum EBADMSG            = 74;         ///
  755         enum EOVERFLOW          = 75;         ///
  756         enum ENOTUNIQ           = 76;         ///
  757         enum EBADFD             = 77;         ///
  758         enum EREMCHG            = 78;         ///
  759         enum ELIBACC            = 79;         ///
  760         enum ELIBBAD            = 80;         ///
  761         enum ELIBSCN            = 81;         ///
  762         enum ELIBMAX            = 82;         ///
  763         enum ELIBEXEC           = 83;         ///
  764         enum EILSEQ             = 84;         ///
  765         enum ERESTART           = 85;         ///
  766         enum ESTRPIPE           = 86;         ///
  767         enum EUSERS             = 87;         ///
  768         enum ENOTSOCK           = 88;         ///
  769         enum EDESTADDRREQ       = 89;         ///
  770         enum EMSGSIZE           = 90;         ///
  771         enum EPROTOTYPE         = 91;         ///
  772         enum ENOPROTOOPT        = 92;         ///
  773         enum EPROTONOSUPPORT    = 93;         ///
  774         enum ESOCKTNOSUPPORT    = 94;         ///
  775         enum EOPNOTSUPP         = 95;         ///
  776         enum ENOTSUP            = EOPNOTSUPP; ///
  777         enum EPFNOSUPPORT       = 96;         ///
  778         enum EAFNOSUPPORT       = 97;         ///
  779         enum EADDRINUSE         = 98;         ///
  780         enum EADDRNOTAVAIL      = 99;         ///
  781         enum ENETDOWN           = 100;        ///
  782         enum ENETUNREACH        = 101;        ///
  783         enum ENETRESET          = 102;        ///
  784         enum ECONNABORTED       = 103;        ///
  785         enum ECONNRESET         = 104;        ///
  786         enum ENOBUFS            = 105;        ///
  787         enum EISCONN            = 106;        ///
  788         enum ENOTCONN           = 107;        ///
  789         enum ESHUTDOWN          = 108;        ///
  790         enum ETOOMANYREFS       = 109;        ///
  791         enum ETIMEDOUT          = 110;        ///
  792         enum ECONNREFUSED       = 111;        ///
  793         enum EHOSTDOWN          = 112;        ///
  794         enum EHOSTUNREACH       = 113;        ///
  795         enum EALREADY           = 114;        ///
  796         enum EINPROGRESS        = 115;        ///
  797         enum ESTALE             = 116;        ///
  798         enum EUCLEAN            = 117;        ///
  799         enum ENOTNAM            = 118;        ///
  800         enum ENAVAIL            = 119;        ///
  801         enum EISNAM             = 120;        ///
  802         enum EREMOTEIO          = 121;        ///
  803         enum EDQUOT             = 122;        ///
  804         enum ENOMEDIUM          = 123;        ///
  805         enum EMEDIUMTYPE        = 124;        ///
  806         enum ECANCELED          = 125;        ///
  807         enum ENOKEY             = 126;        ///
  808         enum EKEYEXPIRED        = 127;        ///
  809         enum EKEYREVOKED        = 128;        ///
  810         enum EKEYREJECTED       = 129;        ///
  811         enum EOWNERDEAD         = 130;        ///
  812         enum ENOTRECOVERABLE    = 131;        ///
  813         enum ERFKILL            = 132;        ///
  814         enum EHWPOISON          = 133;        ///
  815     }
  816     else version (RISCV_Any)
  817     {
  818         enum EDEADLK            = 35;         ///
  819         enum ENAMETOOLONG       = 36;         ///
  820         enum ENOLCK             = 37;         ///
  821         enum ENOSYS             = 38;         ///
  822         enum ENOTEMPTY          = 39;         ///
  823         enum ELOOP              = 40;         ///
  824         enum EWOULDBLOCK        = EAGAIN;     ///
  825         enum ENOMSG             = 42;         ///
  826         enum EIDRM              = 43;         ///
  827         enum ECHRNG             = 44;         ///
  828         enum EL2NSYNC           = 45;         ///
  829         enum EL3HLT             = 46;         ///
  830         enum EL3RST             = 47;         ///
  831         enum ELNRNG             = 48;         ///
  832         enum EUNATCH            = 49;         ///
  833         enum ENOCSI             = 50;         ///
  834         enum EL2HLT             = 51;         ///
  835         enum EBADE              = 52;         ///
  836         enum EBADR              = 53;         ///
  837         enum EXFULL             = 54;         ///
  838         enum ENOANO             = 55;         ///
  839         enum EBADRQC            = 56;         ///
  840         enum EBADSLT            = 57;         ///
  841         enum EDEADLOCK          = EDEADLK;    ///
  842         enum EBFONT             = 59;         ///
  843         enum ENOSTR             = 60;         ///
  844         enum ENODATA            = 61;         ///
  845         enum ETIME              = 62;         ///
  846         enum ENOSR              = 63;         ///
  847         enum ENONET             = 64;         ///
  848         enum ENOPKG             = 65;         ///
  849         enum EREMOTE            = 66;         ///
  850         enum ENOLINK            = 67;         ///
  851         enum EADV               = 68;         ///
  852         enum ESRMNT             = 69;         ///
  853         enum ECOMM              = 70;         ///
  854         enum EPROTO             = 71;         ///
  855         enum EMULTIHOP          = 72;         ///
  856         enum EDOTDOT            = 73;         ///
  857         enum EBADMSG            = 74;         ///
  858         enum EOVERFLOW          = 75;         ///
  859         enum ENOTUNIQ           = 76;         ///
  860         enum EBADFD             = 77;         ///
  861         enum EREMCHG            = 78;         ///
  862         enum ELIBACC            = 79;         ///
  863         enum ELIBBAD            = 80;         ///
  864         enum ELIBSCN            = 81;         ///
  865         enum ELIBMAX            = 82;         ///
  866         enum ELIBEXEC           = 83;         ///
  867         enum EILSEQ             = 84;         ///
  868         enum ERESTART           = 85;         ///
  869         enum ESTRPIPE           = 86;         ///
  870         enum EUSERS             = 87;         ///
  871         enum ENOTSOCK           = 88;         ///
  872         enum EDESTADDRREQ       = 89;         ///
  873         enum EMSGSIZE           = 90;         ///
  874         enum EPROTOTYPE         = 91;         ///
  875         enum ENOPROTOOPT        = 92;         ///
  876         enum EPROTONOSUPPORT    = 93;         ///
  877         enum ESOCKTNOSUPPORT    = 94;         ///
  878         enum EOPNOTSUPP         = 95;         ///
  879         enum EPFNOSUPPORT       = 96;         ///
  880         enum EAFNOSUPPORT       = 97;         ///
  881         enum EADDRINUSE         = 98;         ///
  882         enum EADDRNOTAVAIL      = 99;         ///
  883         enum ENETDOWN           = 100;        ///
  884         enum ENETUNREACH        = 101;        ///
  885         enum ENETRESET          = 102;        ///
  886         enum ECONNABORTED       = 103;        ///
  887         enum ECONNRESET         = 104;        ///
  888         enum ENOBUFS            = 105;        ///
  889         enum EISCONN            = 106;        ///
  890         enum ENOTCONN           = 107;        ///
  891         enum ESHUTDOWN          = 108;        ///
  892         enum ETOOMANYREFS       = 109;        ///
  893         enum ETIMEDOUT          = 110;        ///
  894         enum ECONNREFUSED       = 111;        ///
  895         enum EHOSTDOWN          = 112;        ///
  896         enum EHOSTUNREACH       = 113;        ///
  897         enum EALREADY           = 114;        ///
  898         enum EINPROGRESS        = 115;        ///
  899         enum ESTALE             = 116;        ///
  900         enum EUCLEAN            = 117;        ///
  901         enum ENOTNAM            = 118;        ///
  902         enum ENAVAIL            = 119;        ///
  903         enum EISNAM             = 120;        ///
  904         enum EREMOTEIO          = 121;        ///
  905         enum EDQUOT             = 122;        ///
  906         enum ENOMEDIUM          = 123;        ///
  907         enum EMEDIUMTYPE        = 124;        ///
  908         enum ECANCELED          = 125;        ///
  909         enum ENOKEY             = 126;        ///
  910         enum EKEYEXPIRED        = 127;        ///
  911         enum EKEYREVOKED        = 128;        ///
  912         enum EKEYREJECTED       = 129;        ///
  913         enum EOWNERDEAD         = 130;        ///
  914         enum ENOTRECOVERABLE    = 131;        ///
  915         enum ERFKILL            = 132;        ///
  916         enum EHWPOISON          = 133;        ///
  917     }
  918     else version (SPARC_Any)
  919     {
  920         enum EWOULDBLOCK        = EAGAIN;     ///
  921         enum EINPROGRESS        = 36;         ///
  922         enum EALREADY           = 37;         ///
  923         enum ENOTSOCK           = 38;         ///
  924         enum EDESTADDRREQ       = 39;         ///
  925         enum EMSGSIZE           = 40;         ///
  926         enum EPROTOTYPE         = 41;         ///
  927         enum ENOPROTOOPT        = 42;         ///
  928         enum EPROTONOSUPPORT    = 43;         ///
  929         enum ESOCKTNOSUPPORT    = 44;         ///
  930         enum EOPNOTSUPP         = 45;         ///
  931         enum ENOTSUP            = EOPNOTSUPP; ///
  932         enum EPFNOSUPPORT       = 46;         ///
  933         enum EAFNOSUPPORT       = 47;         ///
  934         enum EADDRINUSE         = 48;         ///
  935         enum EADDRNOTAVAIL      = 49;         ///
  936         enum ENETDOWN           = 50;         ///
  937         enum ENETUNREACH        = 51;         ///
  938         enum ENETRESET          = 52;         ///
  939         enum ECONNABORTED       = 53;         ///
  940         enum ECONNRESET         = 54;         ///
  941         enum ENOBUFS            = 55;         ///
  942         enum EISCONN            = 56;         ///
  943         enum ENOTCONN           = 57;         ///
  944         enum ESHUTDOWN          = 58;         ///
  945         enum ETOOMANYREFS       = 59;         ///
  946         enum ETIMEDOUT          = 60;         ///
  947         enum ECONNREFUSED       = 61;         ///
  948         enum ELOOP              = 62;         ///
  949         enum ENAMETOOLONG       = 63;         ///
  950         enum EHOSTDOWN          = 64;         ///
  951         enum EHOSTUNREACH       = 65;         ///
  952         enum ENOTEMPTY          = 66;         ///
  953         enum EPROCLIM           = 67;         ///
  954         enum EUSERS             = 68;         ///
  955         enum EDQUOT             = 69;         ///
  956         enum ESTALE             = 70;         ///
  957         enum EREMOTE            = 71;         ///
  958         enum ENOSTR             = 72;         ///
  959         enum ETIME              = 73;         ///
  960         enum ENOSR              = 74;         ///
  961         enum ENOMSG             = 75;         ///
  962         enum EBADMSG            = 76;         ///
  963         enum EIDRM              = 77;         ///
  964         enum EDEADLK            = 78;         ///
  965         enum ENOLCK             = 79;         ///
  966         enum ENONET             = 80;         ///
  967         enum ERREMOTE           = 81;         ///
  968         enum ENOLINK            = 82;         ///
  969         enum EADV               = 83;         ///
  970         enum ESRMNT             = 84;         ///
  971         enum ECOMM              = 85;         ///
  972         enum EPROTO             = 86;         ///
  973         enum EMULTIHOP          = 87;         ///
  974         enum EDOTDOT            = 88;         ///
  975         enum EREMCHG            = 89;         ///
  976         enum ENOSYS             = 90;         ///
  977         enum ESTRPIPE           = 91;         ///
  978         enum EOVERFLOW          = 92;         ///
  979         enum EBADFD             = 93;         ///
  980         enum ECHRNG             = 94;         ///
  981         enum EL2NSYNC           = 95;         ///
  982         enum EL3HLT             = 96;         ///
  983         enum EL3RST             = 97;         ///
  984         enum ELNRNG             = 98;         ///
  985         enum EUNATCH            = 99;         ///
  986         enum ENOCSI             = 100;        ///
  987         enum EL2HLT             = 101;        ///
  988         enum EBADE              = 102;        ///
  989         enum EBADR              = 103;        ///
  990         enum EXFULL             = 104;        ///
  991         enum ENOANO             = 105;        ///
  992         enum EBADRQC            = 106;        ///
  993         enum EBADSLT            = 107;        ///
  994         enum EDEADLOCK          = 108;        ///
  995         enum EBFONT             = 109;        ///
  996         enum ELIBEXEC           = 110;        ///
  997         enum ENODATA            = 111;        ///
  998         enum ELIBBAD            = 112;        ///
  999         enum ENOPKG             = 113;        ///
 1000         enum ELIBACC            = 114;        ///
 1001         enum ENOTUNIQ           = 115;        ///
 1002         enum ERESTART           = 116;        ///
 1003         enum EUCLEAN            = 117;        ///
 1004         enum ENOTNAM            = 118;        ///
 1005         enum ENAVAIL            = 119;        ///
 1006         enum EISNAM             = 120;        ///
 1007         enum EREMOTEIO          = 121;        ///
 1008         enum EILSEQ             = 122;        ///
 1009         enum ELIBMAX            = 123;        ///
 1010         enum ELIBSCN            = 124;        ///
 1011         enum ENOMEDIUM          = 125;        ///
 1012         enum EMEDIUMTYPE        = 126;        ///
 1013         enum ECANCELED          = 127;        ///
 1014         enum ENOKEY             = 128;        ///
 1015         enum EKEYEXPIRED        = 129;        ///
 1016         enum EKEYREVOKED        = 130;        ///
 1017         enum EKEYREJECTED       = 131;        ///
 1018         enum EOWNERDEAD         = 132;        ///
 1019         enum ENOTRECOVERABLE    = 133;        ///
 1020         enum ERFKILL            = 134;        ///
 1021         enum EHWPOISON          = 135;        ///
 1022     }
 1023     else version (IBMZ_Any)
 1024     {
 1025         enum EDEADLK            = 35;         ///
 1026         enum ENAMETOOLONG       = 36;         ///
 1027         enum ENOLCK             = 37;         ///
 1028         enum ENOSYS             = 38;         ///
 1029         enum ENOTEMPTY          = 39;         ///
 1030         enum ELOOP              = 40;         ///
 1031         enum EWOULDBLOCK        = EAGAIN;     ///
 1032         enum ENOMSG             = 42;         ///
 1033         enum EIDRM              = 43;         ///
 1034         enum ECHRNG             = 44;         ///
 1035         enum EL2NSYNC           = 45;         ///
 1036         enum EL3HLT             = 46;         ///
 1037         enum EL3RST             = 47;         ///
 1038         enum ELNRNG             = 48;         ///
 1039         enum EUNATCH            = 49;         ///
 1040         enum ENOCSI             = 50;         ///
 1041         enum EL2HLT             = 51;         ///
 1042         enum EBADE              = 52;         ///
 1043         enum EBADR              = 53;         ///
 1044         enum EXFULL             = 54;         ///
 1045         enum ENOANO             = 55;         ///
 1046         enum EBADRQC            = 56;         ///
 1047         enum EBADSLT            = 57;         ///
 1048         enum EDEADLOCK          = EDEADLK;    ///
 1049         enum EBFONT             = 59;         ///
 1050         enum ENOSTR             = 60;         ///
 1051         enum ENODATA            = 61;         ///
 1052         enum ETIME              = 62;         ///
 1053         enum ENOSR              = 63;         ///
 1054         enum ENONET             = 64;         ///
 1055         enum ENOPKG             = 65;         ///
 1056         enum EREMOTE            = 66;         ///
 1057         enum ENOLINK            = 67;         ///
 1058         enum EADV               = 68;         ///
 1059         enum ESRMNT             = 69;         ///
 1060         enum ECOMM              = 70;         ///
 1061         enum EPROTO             = 71;         ///
 1062         enum EMULTIHOP          = 72;         ///
 1063         enum EDOTDOT            = 73;         ///
 1064         enum EBADMSG            = 74;         ///
 1065         enum EOVERFLOW          = 75;         ///
 1066         enum ENOTUNIQ           = 76;         ///
 1067         enum EBADFD             = 77;         ///
 1068         enum EREMCHG            = 78;         ///
 1069         enum ELIBACC            = 79;         ///
 1070         enum ELIBBAD            = 80;         ///
 1071         enum ELIBSCN            = 81;         ///
 1072         enum ELIBMAX            = 82;         ///
 1073         enum ELIBEXEC           = 83;         ///
 1074         enum EILSEQ             = 84;         ///
 1075         enum ERESTART           = 85;         ///
 1076         enum ESTRPIPE           = 86;         ///
 1077         enum EUSERS             = 87;         ///
 1078         enum ENOTSOCK           = 88;         ///
 1079         enum EDESTADDRREQ       = 89;         ///
 1080         enum EMSGSIZE           = 90;         ///
 1081         enum EPROTOTYPE         = 91;         ///
 1082         enum ENOPROTOOPT        = 92;         ///
 1083         enum EPROTONOSUPPORT    = 93;         ///
 1084         enum ESOCKTNOSUPPORT    = 94;         ///
 1085         enum EOPNOTSUPP         = 95;         ///
 1086         enum ENOTSUP            = EOPNOTSUPP; ///
 1087         enum EPFNOSUPPORT       = 96;         ///
 1088         enum EAFNOSUPPORT       = 97;         ///
 1089         enum EADDRINUSE         = 98;         ///
 1090         enum EADDRNOTAVAIL      = 99;         ///
 1091         enum ENETDOWN           = 100;        ///
 1092         enum ENETUNREACH        = 101;        ///
 1093         enum ENETRESET          = 102;        ///
 1094         enum ECONNABORTED       = 103;        ///
 1095         enum ECONNRESET         = 104;        ///
 1096         enum ENOBUFS            = 105;        ///
 1097         enum EISCONN            = 106;        ///
 1098         enum ENOTCONN           = 107;        ///
 1099         enum ESHUTDOWN          = 108;        ///
 1100         enum ETOOMANYREFS       = 109;        ///
 1101         enum ETIMEDOUT          = 110;        ///
 1102         enum ECONNREFUSED       = 111;        ///
 1103         enum EHOSTDOWN          = 112;        ///
 1104         enum EHOSTUNREACH       = 113;        ///
 1105         enum EALREADY           = 114;        ///
 1106         enum EINPROGRESS        = 115;        ///
 1107         enum ESTALE             = 116;        ///
 1108         enum EUCLEAN            = 117;        ///
 1109         enum ENOTNAM            = 118;        ///
 1110         enum ENAVAIL            = 119;        ///
 1111         enum EISNAM             = 120;        ///
 1112         enum EREMOTEIO          = 121;        ///
 1113         enum EDQUOT             = 122;        ///
 1114         enum ENOMEDIUM          = 123;        ///
 1115         enum EMEDIUMTYPE        = 124;        ///
 1116         enum ECANCELED          = 125;        ///
 1117         enum ENOKEY             = 126;        ///
 1118         enum EKEYEXPIRED        = 127;        ///
 1119         enum EKEYREVOKED        = 128;        ///
 1120         enum EKEYREJECTED       = 129;        ///
 1121         enum EOWNERDEAD         = 130;        ///
 1122         enum ENOTRECOVERABLE    = 131;        ///
 1123         enum ERFKILL            = 132;        ///
 1124         enum EHWPOISON          = 133;        ///
 1125     }
 1126     else
 1127     {
 1128         static assert(false, "Architecture not supported.");
 1129     }
 1130 }
 1131 else version (Darwin)
 1132 {
 1133     enum EPERM              = 1;        /// Operation not permitted
 1134     enum ENOENT             = 2;        /// No such file or directory
 1135     enum ESRCH              = 3;        /// No such process
 1136     enum EINTR              = 4;        /// Interrupted system call
 1137     enum EIO                = 5;        /// Input/output error
 1138     enum ENXIO              = 6;        /// Device not configured
 1139     enum E2BIG              = 7;        /// Argument list too long
 1140     enum ENOEXEC            = 8;        /// Exec format error
 1141     enum EBADF              = 9;        /// Bad file descriptor
 1142     enum ECHILD             = 10;       /// No child processes
 1143     enum EDEADLK            = 11;       /// Resource deadlock avoided
 1144     enum ENOMEM             = 12;       /// Cannot allocate memory
 1145     enum EACCES             = 13;       /// Permission denied
 1146     enum EFAULT             = 14;       /// Bad address
 1147     enum EBUSY              = 16;       /// Device busy
 1148     enum EEXIST             = 17;       /// File exists
 1149     enum EXDEV              = 18;       /// Cross-device link
 1150     enum ENODEV             = 19;       /// Operation not supported by device
 1151     enum ENOTDIR            = 20;       /// Not a directory
 1152     enum EISDIR             = 21;       /// Is a directory
 1153     enum EINVAL             = 22;       /// Invalid argument
 1154     enum ENFILE             = 23;       /// Too many open files in system
 1155     enum EMFILE             = 24;       /// Too many open files
 1156     enum ENOTTY             = 25;       /// Inappropriate ioctl for device
 1157     enum ETXTBSY            = 26;       /// Text file busy
 1158     enum EFBIG              = 27;       /// File too large
 1159     enum ENOSPC             = 28;       /// No space left on device
 1160     enum ESPIPE             = 29;       /// Illegal seek
 1161     enum EROFS              = 30;       /// Read-only file system
 1162     enum EMLINK             = 31;       /// Too many links
 1163     enum EPIPE              = 32;       /// Broken pipe
 1164     enum EDOM               = 33;       /// Numerical argument out of domain
 1165     enum ERANGE             = 34;       /// Result too large
 1166     enum EAGAIN             = 35;       /// Resource temporarily unavailable
 1167     enum EWOULDBLOCK        = EAGAIN;   /// Operation would block
 1168     enum EINPROGRESS        = 36;       /// Operation now in progress
 1169     enum EALREADY           = 37;       /// Operation already in progress
 1170     enum ENOTSOCK           = 38;       /// Socket operation on non-socket
 1171     enum EDESTADDRREQ       = 39;       /// Destination address required
 1172     enum EMSGSIZE           = 40;       /// Message too long
 1173     enum EPROTOTYPE         = 41;       /// Protocol wrong type for socket
 1174     enum ENOPROTOOPT        = 42;       /// Protocol not available
 1175     enum EPROTONOSUPPORT    = 43;       /// Protocol not supported
 1176     enum ENOTSUP            = 45;       /// Operation not supported
 1177     enum EOPNOTSUPP         = ENOTSUP;  /// Operation not supported on socket
 1178     enum EAFNOSUPPORT       = 47;       /// Address family not supported by protocol family
 1179     enum EADDRINUSE         = 48;       /// Address already in use
 1180     enum EADDRNOTAVAIL      = 49;       /// Can't assign requested address
 1181     enum ENETDOWN           = 50;       /// Network is down
 1182     enum ENETUNREACH        = 51;       /// Network is unreachable
 1183     enum ENETRESET          = 52;       /// Network dropped connection on reset
 1184     enum ECONNABORTED       = 53;       /// Software caused connection abort
 1185     enum ECONNRESET         = 54;       /// Connection reset by peer
 1186     enum ENOBUFS            = 55;       /// No buffer space available
 1187     enum EISCONN            = 56;       /// Socket is already connected
 1188     enum ENOTCONN           = 57;       /// Socket is not connected
 1189     enum ETIMEDOUT          = 60;       /// Operation timed out
 1190     enum ECONNREFUSED       = 61;       /// Connection refused
 1191     enum ELOOP              = 62;       /// Too many levels of symbolic links
 1192     enum ENAMETOOLONG       = 63;       /// File name too long
 1193     enum EHOSTUNREACH       = 65;       /// No route to host
 1194     enum ENOTEMPTY          = 66;       /// Directory not empty
 1195     enum EDQUOT             = 69;       /// Disc quota exceeded
 1196     enum ESTALE             = 70;       /// Stale NFS file handle
 1197     enum ENOLCK             = 77;       /// No locks available
 1198     enum ENOSYS             = 78;       /// Function not implemented
 1199     enum EOVERFLOW          = 84;       /// Value too large to be stored in data type
 1200     enum ECANCELED          = 89;       /// Operation canceled
 1201     enum EIDRM              = 90;       /// Identifier removed
 1202     enum ENOMSG             = 91;       /// No message of desired type
 1203     enum EILSEQ             = 92;       /// Illegal byte sequence
 1204     enum EBADMSG            = 94;       /// Bad message
 1205     enum EMULTIHOP          = 95;       /// Reserved
 1206     enum ENODATA            = 96;       /// No message available on STREAM
 1207     enum ENOLINK            = 97;       /// Reserved
 1208     enum ENOSR              = 98;       /// No STREAM resources
 1209     enum ENOSTR             = 99;       /// Not a STREAM
 1210     enum EPROTO             = 100;      /// Protocol error
 1211     enum ETIME              = 101;      /// STREAM ioctl timeout
 1212     enum ELAST              = 101;      /// Must be equal largest errno
 1213 }
 1214 else version (FreeBSD)
 1215 {
 1216     enum EPERM              = 1;        /// Operation not permitted
 1217     enum ENOENT             = 2;        /// No such file or directory
 1218     enum ESRCH              = 3;        /// No such process
 1219     enum EINTR              = 4;        /// Interrupted system call
 1220     enum EIO                = 5;        /// Input/output error
 1221     enum ENXIO              = 6;        /// Device not configured
 1222     enum E2BIG              = 7;        /// Argument list too long
 1223     enum ENOEXEC            = 8;        /// Exec format error
 1224     enum EBADF              = 9;        /// Bad file descriptor
 1225     enum ECHILD             = 10;       /// No child processes
 1226     enum EDEADLK            = 11;       /// Resource deadlock avoided
 1227     enum ENOMEM             = 12;       /// Cannot allocate memory
 1228     enum EACCES             = 13;       /// Permission denied
 1229     enum EFAULT             = 14;       /// Bad address
 1230     enum ENOTBLK            = 15;       /// Block device required
 1231     enum EBUSY              = 16;       /// Device busy
 1232     enum EEXIST             = 17;       /// File exists
 1233     enum EXDEV              = 18;       /// Cross-device link
 1234     enum ENODEV             = 19;       /// Operation not supported by device
 1235     enum ENOTDIR            = 20;       /// Not a directory
 1236     enum EISDIR             = 21;       /// Is a directory
 1237     enum EINVAL             = 22;       /// Invalid argument
 1238     enum ENFILE             = 23;       /// Too many open files in system
 1239     enum EMFILE             = 24;       /// Too many open files
 1240     enum ENOTTY             = 25;       /// Inappropriate ioctl for device
 1241     enum ETXTBSY            = 26;       /// Text file busy
 1242     enum EFBIG              = 27;       /// File too large
 1243     enum ENOSPC             = 28;       /// No space left on device
 1244     enum ESPIPE             = 29;       /// Illegal seek
 1245     enum EROFS              = 30;       /// Read-only file system
 1246     enum EMLINK             = 31;       /// Too many links
 1247     enum EPIPE              = 32;       /// Broken pipe
 1248     enum EDOM               = 33;       /// Numerical argument out of domain
 1249     enum ERANGE             = 34;       /// Result too large
 1250     enum EAGAIN             = 35;       /// Resource temporarily unavailable
 1251     enum EWOULDBLOCK        = EAGAIN;   /// Operation would block
 1252     enum EINPROGRESS        = 36;       /// Operation now in progress
 1253     enum EALREADY           = 37;       /// Operation already in progress
 1254     enum ENOTSOCK           = 38;       /// Socket operation on non-socket
 1255     enum EDESTADDRREQ       = 39;       /// Destination address required
 1256     enum EMSGSIZE           = 40;       /// Message too long
 1257     enum EPROTOTYPE         = 41;       /// Protocol wrong type for socket
 1258     enum ENOPROTOOPT        = 42;       /// Protocol not available
 1259     enum EPROTONOSUPPORT    = 43;       /// Protocol not supported
 1260     enum ENOTSUP            = 45;       /// Operation not supported
 1261     enum EOPNOTSUPP         = ENOTSUP;  /// Operation not supported on socket
 1262     enum EAFNOSUPPORT       = 47;       /// Address family not supported by protocol family
 1263     enum EADDRINUSE         = 48;       /// Address already in use
 1264     enum EADDRNOTAVAIL      = 49;       /// Can't assign requested address
 1265     enum ENETDOWN           = 50;       /// Network is down
 1266     enum ENETUNREACH        = 51;       /// Network is unreachable
 1267     enum ENETRESET          = 52;       /// Network dropped connection on reset
 1268     enum ECONNABORTED       = 53;       /// Software caused connection abort
 1269     enum ECONNRESET         = 54;       /// Connection reset by peer
 1270     enum ENOBUFS            = 55;       /// No buffer space available
 1271     enum EISCONN            = 56;       /// Socket is already connected
 1272     enum ENOTCONN           = 57;       /// Socket is not connected
 1273     enum ESHUTDOWN          = 58;       /// Can't send after socket shutdown
 1274     enum ETOOMANYREFS       = 59;       /// Too many refrences; can't splice
 1275     enum ETIMEDOUT          = 60;       /// Operation timed out
 1276     enum ECONNREFUSED       = 61;       /// Connection refused
 1277     enum ELOOP              = 62;       /// Too many levels of symbolic links
 1278     enum ENAMETOOLONG       = 63;       /// File name too long
 1279     enum EHOSTUNREACH       = 65;       /// No route to host
 1280     enum ENOTEMPTY          = 66;       /// Directory not empty
 1281     enum EPROCLIM           = 67;       /// Too many processes
 1282     enum EUSERS             = 68;       /// Too many users
 1283     enum EDQUOT             = 69;       /// Disc quota exceeded
 1284     enum ESTALE             = 70;       /// Stale NFS file handle
 1285     enum EREMOTE            = 71;       /// Too many levels of remote in path
 1286     enum EBADRPC            = 72;       /// RPC struct is bad
 1287     enum ERPCMISMATCH       = 73;       /// RPC version wrong
 1288     enum EPROGUNAVAIL       = 74;       /// RPC prog. not avail
 1289     enum EPROGMISMATCH      = 75;       /// Program version wrong
 1290     enum EPROCUNAVAIL       = 76;       /// Bad procedure for program
 1291     enum ENOLCK             = 77;       /// No locks available
 1292     enum ENOSYS             = 78;       /// Function not implemented
 1293     enum EFTYPE             = 79;       /// Inappropriate file type or format
 1294     enum EAUTH              = 80;       /// Authentication error
 1295     enum ENEEDAUTH          = 81;       /// Need authenticator
 1296     enum EIDRM              = 82;       /// Itendifier removed
 1297     enum ENOMSG             = 83;       /// No message of desired type
 1298     enum EOVERFLOW          = 84;       /// Value too large to be stored in data type
 1299     enum ECANCELED          = 85;       /// Operation canceled
 1300     enum EILSEQ             = 86;       /// Illegal byte sequence
 1301     enum ENOATTR            = 87;       /// Attribute not found
 1302     enum EDOOFUS            = 88;       /// Programming error
 1303     enum EBADMSG            = 89;       /// Bad message
 1304     enum EMULTIHOP          = 90;       /// Multihop attempted
 1305     enum ENOLINK            = 91;       /// Link has been severed
 1306     enum EPROTO             = 92;       /// Protocol error
 1307     enum ELAST              = 92;       /// Must be equal largest errno
 1308 }
 1309 else version (NetBSD)
 1310 {
 1311     // http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/sys/errno.h
 1312     enum EPERM           = 1;
 1313     enum ENOENT          = 2;
 1314     enum ESRCH           = 3;
 1315     enum EINTR           = 4;
 1316     enum EIO             = 5;
 1317     enum ENXIO           = 6;
 1318     enum E2BIG           = 7;
 1319     enum ENOEXEC         = 8;
 1320     enum EBADF           = 9;
 1321     enum ECHILD          = 10;
 1322     enum EDEADLK         = 11;
 1323     ///
 1324     enum ENOMEM          = 12;
 1325     enum EACCES          = 13;
 1326     enum EFAULT          = 14;
 1327     enum ENOTBLK         = 15;
 1328     enum EBUSY           = 16;
 1329     enum EEXIST          = 17;
 1330     enum EXDEV           = 18;
 1331     enum ENODEV          = 19;
 1332     enum ENOTDIR         = 20;
 1333     enum EISDIR          = 21;
 1334     enum EINVAL          = 22;
 1335     enum ENFILE          = 23;
 1336     enum EMFILE          = 24;
 1337     enum ENOTTY          = 25;
 1338     enum ETXTBSY         = 26;
 1339     enum EFBIG           = 27;
 1340     enum ENOSPC          = 28;
 1341     enum ESPIPE          = 29;
 1342     enum EROFS           = 30;
 1343     enum EMLINK          = 31;
 1344     enum EPIPE           = 32;
 1345     ///
 1346     enum EDOM            = 33;
 1347     enum ERANGE          = 34;
 1348 
 1349     ///
 1350     enum EAGAIN          = 35;
 1351     enum EWOULDBLOCK     = EAGAIN;
 1352     enum EINPROGRESS     = 36;
 1353     enum EALREADY        = 37;
 1354 
 1355     ///
 1356     enum ENOTSOCK        = 38;
 1357     enum EDESTADDRREQ    = 39;
 1358     enum EMSGSIZE        = 40;
 1359     enum EPROTOTYPE      = 41;
 1360     enum ENOPROTOOPT     = 42;
 1361     enum EPROTONOSUPPORT = 43;
 1362     enum ESOCKTNOSUPPORT = 44;
 1363     enum EOPNOTSUPP      = 45;
 1364     enum EPFNOSUPPORT    = 46;
 1365     enum EAFNOSUPPORT    = 47;
 1366     enum EADDRINUSE      = 48;
 1367     enum EADDRNOTAVAIL   = 49;
 1368 
 1369     ///
 1370     enum ENETDOWN        = 50;
 1371     enum ENETUNREACH     = 51;
 1372     enum ENETRESET       = 52;
 1373     enum ECONNABORTED    = 53;
 1374     enum ECONNRESET      = 54;
 1375     enum ENOBUFS         = 55;
 1376     enum EISCONN         = 56;
 1377     enum ENOTCONN        = 57;
 1378     enum ESHUTDOWN       = 58;
 1379     enum ETOOMANYREFS    = 59;
 1380     enum ETIMEDOUT       = 60;
 1381     enum ECONNREFUSED    = 61;
 1382     enum ELOOP           = 62;
 1383     enum ENAMETOOLONG    = 63;
 1384 
 1385     ///
 1386     enum EHOSTDOWN       = 64;
 1387     enum EHOSTUNREACH    = 65;
 1388     enum ENOTEMPTY       = 66;
 1389 
 1390     ///
 1391     enum EPROCLIM        = 67;
 1392     enum EUSERS          = 68;
 1393     enum EDQUOT          = 69;
 1394 
 1395     ///
 1396     enum ESTALE          = 70;
 1397     enum EREMOTE         = 71;
 1398     enum EBADRPC         = 72;
 1399     enum ERPCMISMATCH    = 73;
 1400     enum EPROGUNAVAIL    = 74;
 1401     enum EPROGMISMATCH   = 75;
 1402     enum EPROCUNAVAIL    = 76;
 1403 
 1404     enum ENOLCK          = 77;
 1405     enum ENOSYS          = 78;
 1406 
 1407     enum EFTYPE          = 79;
 1408     enum EAUTH           = 80;
 1409     enum ENEEDAUTH       = 81;
 1410 
 1411     ///
 1412     enum EIDRM           = 82;
 1413     enum ENOMSG          = 83;
 1414     enum EOVERFLOW       = 84;
 1415     ///
 1416     enum EILSEQ          = 85;
 1417 
 1418     ///
 1419     enum ENOTSUP         = 86;
 1420 
 1421     ///
 1422     enum ECANCELED       = 87;
 1423 
 1424     ///
 1425     enum EBADMSG         = 88;
 1426 
 1427     ///
 1428     enum ENODATA         = 89;
 1429     enum ENOSR           = 90;
 1430     enum ENOSTR          = 91;
 1431     enum ETIME           = 92;
 1432 
 1433     ///
 1434     enum ENOATTR         = 93;
 1435 
 1436     ///
 1437     enum EMULTIHOP       = 94;
 1438     enum ENOLINK         = 95;
 1439     enum EPROTO          = 96;
 1440 }
 1441 else version (OpenBSD)
 1442 {
 1443     enum EPERM              = 1;        /// Operation not permitted
 1444     enum ENOENT             = 2;        /// No such file or directory
 1445     enum ESRCH              = 3;        /// No such process
 1446     enum EINTR              = 4;        /// Interrupted system call
 1447     enum EIO                = 5;        /// Input/output error
 1448     enum ENXIO              = 6;        /// Device not configured
 1449     enum E2BIG              = 7;        /// Argument list too long
 1450     enum ENOEXEC            = 8;        /// Exec format error
 1451     enum EBADF              = 9;        /// Bad file descriptor
 1452     enum ECHILD             = 10;       /// No child processes
 1453     enum EDEADLK            = 11;       /// Resource deadlock avoided
 1454     enum ENOMEM             = 12;       /// Cannot allocate memory
 1455     enum EACCES             = 13;       /// Permission denied
 1456     enum EFAULT             = 14;       /// Bad address
 1457     enum ENOTBLK            = 15;       /// Block device required
 1458     enum EBUSY              = 16;       /// Device busy
 1459     enum EEXIST             = 17;       /// File exists
 1460     enum EXDEV              = 18;       /// Cross-device link
 1461     enum ENODEV             = 19;       /// Operation not supported by device
 1462     enum ENOTDIR            = 20;       /// Not a directory
 1463     enum EISDIR             = 21;       /// Is a directory
 1464     enum EINVAL             = 22;       /// Invalid argument
 1465     enum ENFILE             = 23;       /// Too many open files in system
 1466     enum EMFILE             = 24;       /// Too many open files
 1467     enum ENOTTY             = 25;       /// Inappropriate ioctl for device
 1468     enum ETXTBSY            = 26;       /// Text file busy
 1469     enum EFBIG              = 27;       /// File too large
 1470     enum ENOSPC             = 28;       /// No space left on device
 1471     enum ESPIPE             = 29;       /// Illegal seek
 1472     enum EROFS              = 30;       /// Read-only file system
 1473     enum EMLINK             = 31;       /// Too many links
 1474     enum EPIPE              = 32;       /// Broken pipe
 1475     enum EDOM               = 33;       /// Numerical argument out of domain
 1476     enum ERANGE             = 34;       /// Result too large
 1477     enum EAGAIN             = 35;       /// Resource temporarily unavailable
 1478     enum EWOULDBLOCK        = EAGAIN;   /// Operation would block
 1479     enum EINPROGRESS        = 36;       /// Operation now in progress
 1480     enum EALREADY           = 37;       /// Operation already in progress
 1481     enum ENOTSOCK           = 38;       /// Socket operation on non-socket
 1482     enum EDESTADDRREQ       = 39;       /// Destination address required
 1483     enum EMSGSIZE           = 40;       /// Message too long
 1484     enum EPROTOTYPE         = 41;       /// Protocol wrong type for socket
 1485     enum ENOPROTOOPT        = 42;       /// Protocol not available
 1486     enum EPROTONOSUPPORT    = 43;       /// Protocol not supported
 1487     enum ESOCKTNOSUPPORT    = 44;       /// Socket type not supported
 1488     enum EOPNOTSUPP         = 45;       /// Operation not supported
 1489     enum EPFNOSUPPORT       = 46;       /// Protocol family not supported
 1490     enum EAFNOSUPPORT       = 47;       /// Address family not supported by protocol family
 1491     enum EADDRINUSE         = 48;       /// Address already in use
 1492     enum EADDRNOTAVAIL      = 49;       /// Can't assign requested address
 1493     enum ENETDOWN           = 50;       /// Network is down
 1494     enum ENETUNREACH        = 51;       /// Network is unreachable
 1495     enum ENETRESET          = 52;       /// Network dropped connection on reset
 1496     enum ECONNABORTED       = 53;       /// Software caused connection abort
 1497     enum ECONNRESET         = 54;       /// Connection reset by peer
 1498     enum ENOBUFS            = 55;       /// No buffer space available
 1499     enum EISCONN            = 56;       /// Socket is already connected
 1500     enum ENOTCONN           = 57;       /// Socket is not connected
 1501     enum ESHUTDOWN          = 58;       /// Can't send after socket shutdown
 1502     enum ETOOMANYREFS       = 59;       /// Too many references: can't splice
 1503     enum ETIMEDOUT          = 60;       /// Operation timed out
 1504     enum ECONNREFUSED       = 61;       /// Connection refused
 1505     enum ELOOP              = 62;       /// Too many levels of symbolic links
 1506     enum ENAMETOOLONG       = 63;       /// File name too long
 1507     enum EHOSTDOWN          = 64;       /// Host is down
 1508     enum EHOSTUNREACH       = 65;       /// No route to host
 1509     enum ENOTEMPTY          = 66;       /// Directory not empty
 1510     enum EPROCLIM           = 67;       /// Too many processes
 1511     enum EUSERS             = 68;       /// Too many users
 1512     enum EDQUOT             = 69;       /// Disk quota exceeded
 1513     enum ESTALE             = 70;       /// Stale NFS file handle
 1514     enum EREMOTE            = 71;       /// Too many levels of remote in path
 1515     enum EBADRPC            = 72;       /// RPC struct is bad
 1516     enum ERPCMISMATCH       = 73;       /// RPC version wrong
 1517     enum EPROGUNAVAIL       = 74;       /// RPC program not available
 1518     enum EPROGMISMATCH      = 75;       /// Program version wrong
 1519     enum EPROCUNAVAIL       = 76;       /// Bad procedure for program
 1520     enum ENOLCK             = 77;       /// No locks available
 1521     enum ENOSYS             = 78;       /// Function not implemented
 1522     enum EFTYPE             = 79;       /// Inappropriate file type or format
 1523     enum EAUTH              = 80;       /// Authentication error
 1524     enum ENEEDAUTH          = 81;       /// Need authenticator
 1525     enum EIPSEC             = 82;       /// IPsec processing failure
 1526     enum ENOATTR            = 83;       /// Attribute not found
 1527     enum EILSEQ             = 84;       /// Illegal byte sequence
 1528     enum ENOMEDIUM          = 85;       /// No medium found
 1529     enum EMEDIUMTYPE        = 86;       /// Wrong medium type
 1530     enum EOVERFLOW          = 87;       /// Value too large to be stored in data type
 1531     enum ECANCELED          = 88;       /// Operation canceled
 1532     enum EIDRM              = 89;       /// Identifier removed
 1533     enum ENOMSG             = 90;       /// No message of desired type
 1534     enum ENOTSUP            = 91;       /// Not supported
 1535     enum ELAST              = 91;       /// Must be equal largest errno
 1536 }
 1537 else version (DragonFlyBSD)
 1538 {
 1539     enum EPERM              = 1;
 1540     enum ENOENT             = 2;
 1541     enum ESRCH              = 3;
 1542     enum EINTR              = 4;
 1543     enum EIO                = 5;
 1544     enum ENXIO              = 6;
 1545     enum E2BIG              = 7;
 1546     enum ENOEXEC            = 8;
 1547     enum EBADF              = 9;
 1548     enum ECHILD             = 10;
 1549     enum EDEADLK            = 11;
 1550     enum ENOMEM             = 12;
 1551     enum EACCES             = 13;
 1552     enum EFAULT             = 14;
 1553     enum ENOTBLK            = 15;
 1554     enum EBUSY              = 16;
 1555     enum EEXIST             = 17;
 1556     enum EXDEV              = 18;
 1557     enum ENODEV             = 19;
 1558     enum ENOTDIR            = 20;
 1559     enum EISDIR             = 21;
 1560     enum EINVAL             = 22;
 1561     enum ENFILE             = 23;
 1562     enum EMFILE             = 24;
 1563     enum ENOTTY             = 25;
 1564     enum ETXTBSY            = 26;
 1565     enum EFBIG              = 27;
 1566     enum ENOSPC             = 28;
 1567     enum ESPIPE             = 29;
 1568     enum EROFS              = 30;
 1569     enum EMLINK             = 31;
 1570     enum EPIPE              = 32;
 1571     enum EDOM               = 33;
 1572     enum ERANGE             = 34;
 1573     enum EAGAIN             = 35;
 1574     enum EWOULDBLOCK        = EAGAIN;
 1575     enum EINPROGRESS        = 36;
 1576     enum EALREADY           = 37;
 1577     enum ENOTSOCK           = 38;
 1578     enum EDESTADDRREQ       = 39;
 1579     enum EMSGSIZE           = 40;
 1580     enum EPROTOTYPE         = 41;
 1581     enum ENOPROTOOPT        = 42;
 1582     enum EPROTONOSUPPORT    = 43;
 1583     enum ENOTSUP            = 45;
 1584     enum EOPNOTSUPP         = ENOTSUP;
 1585     enum EPFNOSUPPORT       = 46;
 1586     enum EAFNOSUPPORT       = 47;
 1587     enum EADDRINUSE         = 48;
 1588     enum EADDRNOTAVAIL      = 49;
 1589     enum ENETDOWN           = 50;
 1590     enum ENETUNREACH        = 51;
 1591     enum ENETRESET          = 52;
 1592     enum ECONNABORTED       = 53;
 1593     enum ECONNRESET         = 54;
 1594     enum ENOBUFS            = 55;
 1595     enum EISCONN            = 56;
 1596     enum ENOTCONN           = 57;
 1597     enum ESHUTDOWN          = 58;
 1598     enum ETOOMANYREFS       = 59;
 1599     enum ETIMEDOUT          = 60;
 1600     enum ECONNREFUSED       = 61;
 1601     enum ELOOP              = 62;
 1602     enum ENAMETOOLONG       = 63;
 1603     enum EHOSTUNREACH       = 65;
 1604     enum ENOTEMPTY          = 66;
 1605     enum EPROCLIM           = 67;
 1606     enum EUSERS             = 68;
 1607     enum EDQUOT             = 69;
 1608     enum ESTALE             = 70;
 1609     enum EREMOTE            = 71;
 1610     enum EBADRPC            = 72;
 1611     enum ERPCMISMATCH       = 73;
 1612     enum EPROGUNAVAIL       = 74;
 1613     enum EPROGMISMATCH      = 75;
 1614     enum EPROCUNAVAIL       = 76;
 1615     enum ENOLCK             = 77;
 1616     enum ENOSYS             = 78;
 1617     enum EFTYPE             = 79;
 1618     enum EAUTH              = 80;
 1619     enum ENEEDAUTH          = 81;
 1620     enum EIDRM              = 82;
 1621     enum ENOMSG             = 83;
 1622     enum EOVERFLOW          = 84;
 1623     enum ECANCELED          = 85;
 1624     enum EILSEQ             = 86;
 1625     enum ENOATTR            = 87;
 1626     enum EDOOFUS            = 88;
 1627     enum EBADMSG            = 89;
 1628     enum EMULTIHOP          = 90;
 1629     enum ENOLINK            = 91;
 1630     enum EPROTO             = 92;
 1631     enum ENOMEDIUM          = 93;
 1632     enum EUNUSED94          = 94;
 1633     enum EUNUSED95          = 95;
 1634     enum EUNUSED96          = 96;
 1635     enum EUNUSED97          = 97;
 1636     enum EUNUSED98          = 98;
 1637     enum EASYNC             = 99;
 1638     enum ELAST              = 99;
 1639 }
 1640 else version (Solaris)
 1641 {
 1642     enum EPERM =  1;              ///  Not super-user
 1643     enum ENOENT = 2;              ///  No such file or directory
 1644     enum ESRCH =  3;              ///  No such process
 1645     enum EINTR =  4;              ///  interrupted system call
 1646     enum EIO =    5;              ///  I/O error
 1647     enum ENXIO =  6;              ///  No such device or address
 1648     enum E2BIG =  7;              ///  Arg list too long
 1649     enum ENOEXEC = 8;             ///  Exec format error
 1650     enum EBADF =  9;              ///  Bad file number
 1651     enum ECHILD = 10;             ///  No children
 1652     enum EAGAIN = 11;             ///  Resource temporarily unavailable
 1653     enum ENOMEM = 12;             ///  Not enough core
 1654     enum EACCES = 13;             ///  Permission denied
 1655     enum EFAULT = 14;             ///  Bad address
 1656     enum ENOTBLK = 15;            ///  Block device required
 1657     enum EBUSY =  16;             ///  Mount device busy
 1658     enum EEXIST = 17;             ///  File exists
 1659     enum EXDEV =  18;             ///  Cross-device link
 1660     enum ENODEV = 19;             ///  No such device
 1661     enum ENOTDIR = 20;            ///  Not a directory
 1662     enum EISDIR = 21;             ///  Is a directory
 1663     enum EINVAL = 22;             ///  Invalid argument
 1664     enum ENFILE = 23;             ///  File table overflow
 1665     enum EMFILE = 24;             ///  Too many open files
 1666     enum ENOTTY = 25;             ///  Inappropriate ioctl for device
 1667     enum ETXTBSY = 26;            ///  Text file busy
 1668     enum EFBIG =  27;             ///  File too large
 1669     enum ENOSPC = 28;             ///  No space left on device
 1670     enum ESPIPE = 29;             ///  Illegal seek
 1671     enum EROFS =  30;             ///  Read only file system
 1672     enum EMLINK = 31;             ///  Too many links
 1673     enum EPIPE =  32;             ///  Broken pipe
 1674     enum EDOM =   33;             ///  Math arg out of domain of func
 1675     enum ERANGE = 34;             ///  Math result not representable
 1676     enum ENOMSG = 35;             ///  No message of desired type
 1677     enum EIDRM =  36;             ///  Identifier removed
 1678     enum ECHRNG = 37;             ///  Channel number out of range
 1679     enum EL2NSYNC = 38;           ///  Level 2 not synchronized
 1680     enum EL3HLT = 39;             ///  Level 3 halted
 1681     enum EL3RST = 40;             ///  Level 3 reset
 1682     enum ELNRNG = 41;             ///  Link number out of range
 1683     enum EUNATCH = 42;            ///  Protocol driver not attached
 1684     enum ENOCSI = 43;             ///  No CSI structure available
 1685     enum EL2HLT = 44;             ///  Level 2 halted
 1686     enum EDEADLK = 45;            ///  Deadlock condition.
 1687     enum ENOLCK = 46;             ///  No record locks available.
 1688     enum ECANCELED = 47;          ///  Operation canceled
 1689     enum ENOTSUP = 48;            ///  Operation not supported
 1690     enum EDQUOT = 49;             ///  Disc quota exceeded
 1691     enum EBADE =  50;             ///  invalid exchange
 1692     enum EBADR =  51;             ///  invalid request descriptor
 1693     enum EXFULL = 52;             ///  exchange full
 1694     enum ENOANO = 53;             ///  no anode
 1695     enum EBADRQC = 54;            ///  invalid request code
 1696     enum EBADSLT = 55;            ///  invalid slot
 1697     enum EDEADLOCK = 56;          ///  file locking deadlock error
 1698     enum EBFONT = 57;             ///  bad font file fmt
 1699     enum EOWNERDEAD =     58;     ///  process died with the lock
 1700     enum ENOTRECOVERABLE = 59;    ///  lock is not recoverable
 1701     enum ENOSTR = 60;             ///  Device not a stream
 1702     enum ENODATA = 61;            ///  no data (for no delay io)
 1703     enum ETIME =  62;             ///  timer expired
 1704     enum ENOSR =  63;             ///  out of streams resources
 1705     enum ENONET = 64;             ///  Machine is not on the network
 1706     enum ENOPKG = 65;             ///  Package not installed
 1707     enum EREMOTE = 66;            ///  The object is remote
 1708     enum ENOLINK = 67;            ///  the link has been severed
 1709     enum EADV =   68;             ///  advertise error
 1710     enum ESRMNT = 69;             ///  srmount error
 1711     enum ECOMM =  70;             ///  Communication error on send
 1712     enum EPROTO = 71;             ///  Protocol error
 1713     enum ELOCKUNMAPPED =  72;     ///  locked lock was unmapped
 1714     enum ENOTACTIVE = 73;         ///  Facility is not active
 1715     enum EMULTIHOP = 74;          ///  multihop attempted
 1716     enum EBADMSG = 77;            ///  trying to read unreadable message
 1717     enum ENAMETOOLONG = 78;       ///  path name is too long
 1718     enum EOVERFLOW = 79;          ///  value too large to be stored in data type
 1719     enum ENOTUNIQ = 80;           ///  given log. name not unique
 1720     enum EBADFD =  81;            ///  f.d. invalid for this operation
 1721     enum EREMCHG = 82;            ///  Remote address changed
 1722     enum ELIBACC = 83;            ///  Can't access a needed shared lib.
 1723     enum ELIBBAD = 84;            ///  Accessing a corrupted shared lib.
 1724     enum ELIBSCN = 85;            ///  .lib section in a.out corrupted.
 1725     enum ELIBMAX = 86;            ///  Attempting to link in too many libs.
 1726     enum ELIBEXEC = 87;           ///  Attempting to exec a shared library.
 1727     enum EILSEQ = 88;             ///  Illegal byte sequence.
 1728     enum ENOSYS = 89;             ///  Unsupported file system operation
 1729     enum ELOOP =  90;             ///  Symbolic link loop
 1730     enum ERESTART = 91;           ///  Restartable system call
 1731     enum ESTRPIPE = 92;           ///  if pipe/FIFO, don't sleep in stream head
 1732     enum ENOTEMPTY = 93;          ///  directory not empty
 1733     enum EUSERS = 94;             ///  Too many users (for UFS)
 1734     enum ENOTSOCK =       95;     ///  Socket operation on non-socket
 1735     enum EDESTADDRREQ =   96;     ///  Destination address required
 1736     enum EMSGSIZE =       97;     ///  Message too long
 1737     enum EPROTOTYPE =     98;     ///  Protocol wrong type for socket
 1738     enum ENOPROTOOPT =    99;     ///  Protocol not available
 1739     enum EPROTONOSUPPORT = 120;   ///  Protocol not supported
 1740     enum ESOCKTNOSUPPORT = 121;   ///  Socket type not supported
 1741     enum EOPNOTSUPP =     122;    ///  Operation not supported on socket
 1742     enum EPFNOSUPPORT =   123;    ///  Protocol family not supported
 1743     enum EAFNOSUPPORT =   124;    ///  Address family not supported by the protocol family
 1744     enum EADDRINUSE =     125;    ///  Address already in use
 1745     enum EADDRNOTAVAIL =   126;   ///  Can't assign requested address
 1746     enum ENETDOWN =       127;    ///  Network is down
 1747     enum ENETUNREACH =    128;    ///  Network is unreachable
 1748     enum ENETRESET =      129;    ///  Network dropped connection because of reset
 1749     enum ECONNABORTED =   130;    ///  Software caused connection abort
 1750     enum ECONNRESET =     131;    ///  Connection reset by peer
 1751     enum ENOBUFS =        132;    ///  No buffer space available
 1752     enum EISCONN =        133;    ///  Socket is already connected
 1753     enum ENOTCONN =       134;    ///  Socket is not connected
 1754     enum ESHUTDOWN =      143;    ///  Can't send after socket shutdown
 1755     enum ETOOMANYREFS =   144;    ///  Too many references: can't splice
 1756     enum ETIMEDOUT =      145;    ///  Connection timed out
 1757     enum ECONNREFUSED =   146;    ///  Connection refused
 1758     enum EHOSTDOWN =      147;    ///  Host is down
 1759     enum EHOSTUNREACH =   148;    ///  No route to host
 1760     enum EWOULDBLOCK =    EAGAIN; ///  Resource temporarily unavailable
 1761     enum EALREADY =       149;    ///  operation already in progress
 1762     enum EINPROGRESS =    150;    ///  operation now in progress
 1763     enum ESTALE =         151;    ///  Stale NFS file handle
 1764 }
 1765 else version (Haiku)
 1766 {
 1767     // https://github.com/haiku/haiku/blob/master/headers/os/support/Errors.h
 1768     // https://github.com/haiku/haiku/blob/master/headers/build/os/support/Errors.h
 1769     import core.stdc.limits : INT_MIN;
 1770     enum B_GENERAL_ERROR_BASE        = INT_MIN;
 1771     enum B_OS_ERROR_BASE             = (B_GENERAL_ERROR_BASE + 0x1000);
 1772     enum B_APP_ERROR_BASE            = (B_GENERAL_ERROR_BASE + 0x2000);
 1773     enum B_INTERFACE_ERROR_BASE      = (B_GENERAL_ERROR_BASE + 0x3000);
 1774     enum B_MEDIA_ERROR_BASE          = (B_GENERAL_ERROR_BASE + 0x4000);
 1775                                             /* - 0x41ff */
 1776     enum B_TRANSLATION_ERROR_BASE    = (B_GENERAL_ERROR_BASE + 0x4800);
 1777                                             /* - 0x48ff */
 1778     enum B_MIDI_ERROR_BASE           = (B_GENERAL_ERROR_BASE + 0x5000);
 1779     enum B_STORAGE_ERROR_BASE        = (B_GENERAL_ERROR_BASE + 0x6000);
 1780     enum B_POSIX_ERROR_BASE          = (B_GENERAL_ERROR_BASE + 0x7000);
 1781     enum B_MAIL_ERROR_BASE           = (B_GENERAL_ERROR_BASE + 0x8000);
 1782     enum B_PRINT_ERROR_BASE          = (B_GENERAL_ERROR_BASE + 0x9000);
 1783     enum B_DEVICE_ERROR_BASE         = (B_GENERAL_ERROR_BASE + 0xa000);
 1784 
 1785     /* General Errors */
 1786     enum B_NO_MEMORY                 = (B_GENERAL_ERROR_BASE + 0);
 1787     enum B_IO_ERROR                  = (B_GENERAL_ERROR_BASE + 1);
 1788     enum B_PERMISSION_DENIED         = (B_GENERAL_ERROR_BASE + 2);
 1789     enum B_BAD_INDEX                 = (B_GENERAL_ERROR_BASE + 3);
 1790     enum B_BAD_TYPE                  = (B_GENERAL_ERROR_BASE + 4);
 1791     enum B_BAD_VALUE                 = (B_GENERAL_ERROR_BASE + 5);
 1792     enum B_MISMATCHED_VALUES         = (B_GENERAL_ERROR_BASE + 6);
 1793     enum B_NAME_NOT_FOUND            = (B_GENERAL_ERROR_BASE + 7);
 1794     enum B_NAME_IN_USE               = (B_GENERAL_ERROR_BASE + 8);
 1795     enum B_TIMED_OUT                 = (B_GENERAL_ERROR_BASE + 9);
 1796     enum B_INTERRUPTED               = (B_GENERAL_ERROR_BASE + 10);
 1797     enum B_WOULD_BLOCK               = (B_GENERAL_ERROR_BASE + 11);
 1798     enum B_CANCELED                  = (B_GENERAL_ERROR_BASE + 12);
 1799     enum B_NO_INIT                   = (B_GENERAL_ERROR_BASE + 13);
 1800     enum B_NOT_INITIALIZED           = (B_GENERAL_ERROR_BASE + 13);
 1801     enum B_BUSY                      = (B_GENERAL_ERROR_BASE + 14);
 1802     enum B_NOT_ALLOWED               = (B_GENERAL_ERROR_BASE + 15);
 1803     enum B_BAD_DATA                  = (B_GENERAL_ERROR_BASE + 16);
 1804     enum B_DONT_DO_THAT              = (B_GENERAL_ERROR_BASE + 17);
 1805 
 1806     enum B_ERROR                     = (-1);
 1807     enum B_OK                        = (int(0));
 1808     enum B_NO_ERROR                  = (int(0));
 1809 
 1810     /* Kernel Kit Errors */
 1811     enum B_BAD_SEM_ID                = (B_OS_ERROR_BASE + 0);
 1812     enum B_NO_MORE_SEMS              = (B_OS_ERROR_BASE + 1);
 1813 
 1814     enum B_BAD_THREAD_ID             = (B_OS_ERROR_BASE + 0x100);
 1815     enum B_NO_MORE_THREADS           = (B_OS_ERROR_BASE + 0x101);
 1816     enum B_BAD_THREAD_STATE          = (B_OS_ERROR_BASE + 0x102);
 1817     enum B_BAD_TEAM_ID               = (B_OS_ERROR_BASE + 0x103);
 1818     enum B_NO_MORE_TEAMS             = (B_OS_ERROR_BASE + 0x104);
 1819 
 1820     enum B_BAD_PORT_ID               = (B_OS_ERROR_BASE + 0x200);
 1821     enum B_NO_MORE_PORTS             = (B_OS_ERROR_BASE + 0x201);
 1822 
 1823     enum B_BAD_IMAGE_ID              = (B_OS_ERROR_BASE + 0x300);
 1824     enum B_BAD_ADDRESS               = (B_OS_ERROR_BASE + 0x301);
 1825     enum B_NOT_AN_EXECUTABLE         = (B_OS_ERROR_BASE + 0x302);
 1826     enum B_MISSING_LIBRARY           = (B_OS_ERROR_BASE + 0x303);
 1827     enum B_MISSING_SYMBOL            = (B_OS_ERROR_BASE + 0x304);
 1828     enum B_UNKNOWN_EXECUTABLE        = (B_OS_ERROR_BASE + 0x305);
 1829     enum B_LEGACY_EXECUTABLE         = (B_OS_ERROR_BASE + 0x306);
 1830 
 1831     enum B_DEBUGGER_ALREADY_INSTALLED    = (B_OS_ERROR_BASE + 0x400);
 1832 
 1833     /* Application Kit Errors */
 1834     enum B_BAD_REPLY                         = (B_APP_ERROR_BASE + 0);
 1835     enum B_DUPLICATE_REPLY                   = (B_APP_ERROR_BASE + 1);
 1836     enum B_MESSAGE_TO_SELF                   = (B_APP_ERROR_BASE + 2);
 1837     enum B_BAD_HANDLER                       = (B_APP_ERROR_BASE + 3);
 1838     enum B_ALREADY_RUNNING                   = (B_APP_ERROR_BASE + 4);
 1839     enum B_LAUNCH_FAILED                     = (B_APP_ERROR_BASE + 5);
 1840     enum B_AMBIGUOUS_APP_LAUNCH              = (B_APP_ERROR_BASE + 6);
 1841     enum B_UNKNOWN_MIME_TYPE                 = (B_APP_ERROR_BASE + 7);
 1842     enum B_BAD_SCRIPT_SYNTAX                 = (B_APP_ERROR_BASE + 8);
 1843     enum B_LAUNCH_FAILED_NO_RESOLVE_LINK     = (B_APP_ERROR_BASE + 9);
 1844     enum B_LAUNCH_FAILED_EXECUTABLE          = (B_APP_ERROR_BASE + 10);
 1845     enum B_LAUNCH_FAILED_APP_NOT_FOUND       = (B_APP_ERROR_BASE + 11);
 1846     enum B_LAUNCH_FAILED_APP_IN_TRASH        = (B_APP_ERROR_BASE + 12);
 1847     enum B_LAUNCH_FAILED_NO_PREFERRED_APP    = (B_APP_ERROR_BASE + 13);
 1848     enum B_LAUNCH_FAILED_FILES_APP_NOT_FOUND = (B_APP_ERROR_BASE + 14);
 1849     enum B_BAD_MIME_SNIFFER_RULE             = (B_APP_ERROR_BASE + 15);
 1850     enum B_NOT_A_MESSAGE                     = (B_APP_ERROR_BASE + 16);
 1851     enum B_SHUTDOWN_CANCELLED                = (B_APP_ERROR_BASE + 17);
 1852     enum B_SHUTTING_DOWN                     = (B_APP_ERROR_BASE + 18);
 1853 
 1854     /* Storage Kit/File System Errors */
 1855     enum B_FILE_ERROR                        = (B_STORAGE_ERROR_BASE + 0);
 1856     enum B_FILE_NOT_FOUND                    = (B_STORAGE_ERROR_BASE + 1);
 1857                 /* deprecated: use B_ENTRY_NOT_FOUND instead */
 1858     enum B_FILE_EXISTS                       = (B_STORAGE_ERROR_BASE + 2);
 1859     enum B_ENTRY_NOT_FOUND                   = (B_STORAGE_ERROR_BASE + 3);
 1860     enum B_NAME_TOO_LONG                     = (B_STORAGE_ERROR_BASE + 4);
 1861     enum B_NOT_A_DIRECTORY                   = (B_STORAGE_ERROR_BASE + 5);
 1862     enum B_DIRECTORY_NOT_EMPTY               = (B_STORAGE_ERROR_BASE + 6);
 1863     enum B_DEVICE_FULL                       = (B_STORAGE_ERROR_BASE + 7);
 1864     enum B_READ_ONLY_DEVICE                  = (B_STORAGE_ERROR_BASE + 8);
 1865     enum B_IS_A_DIRECTORY                    = (B_STORAGE_ERROR_BASE + 9);
 1866     enum B_NO_MORE_FDS                       = (B_STORAGE_ERROR_BASE + 10);
 1867     enum B_CROSS_DEVICE_LINK                 = (B_STORAGE_ERROR_BASE + 11);
 1868     enum B_LINK_LIMIT                        = (B_STORAGE_ERROR_BASE + 12);
 1869     enum B_BUSTED_PIPE                       = (B_STORAGE_ERROR_BASE + 13);
 1870     enum B_UNSUPPORTED                       = (B_STORAGE_ERROR_BASE + 14);
 1871     enum B_PARTITION_TOO_SMALL               = (B_STORAGE_ERROR_BASE + 15);
 1872     enum B_PARTIAL_READ                      = (B_STORAGE_ERROR_BASE + 16);
 1873     enum B_PARTIAL_WRITE                     = (B_STORAGE_ERROR_BASE + 17);
 1874 
 1875     /* POSIX Errors */
 1876     enum B_USE_POSITIVE_POSIX_ERRORS = false;
 1877 
 1878     static if (B_USE_POSITIVE_POSIX_ERRORS)
 1879     {
 1880         enum B_TO_POSIX_ERROR(int code) = -code;
 1881     }
 1882     else
 1883     {
 1884         enum B_TO_POSIX_ERROR(int code) = code;
 1885     }
 1886     alias B_FROM_POSIX_ERROR = B_TO_POSIX_ERROR;
 1887 
 1888     enum B_POSIX_ENOMEM  = B_TO_POSIX_ERROR!(B_POSIX_ERROR_BASE + 0);
 1889     enum E2BIG           = B_TO_POSIX_ERROR!(B_POSIX_ERROR_BASE + 1);
 1890     enum ECHILD          = B_TO_POSIX_ERROR!(B_POSIX_ERROR_BASE + 2);
 1891     enum EDEADLK         = B_TO_POSIX_ERROR!(B_POSIX_ERROR_BASE + 3);
 1892     enum EFBIG           = B_TO_POSIX_ERROR!(B_POSIX_ERROR_BASE + 4);
 1893     enum EMLINK          = B_TO_POSIX_ERROR!(B_POSIX_ERROR_BASE + 5);
 1894     enum ENFILE          = B_TO_POSIX_ERROR!(B_POSIX_ERROR_BASE + 6);
 1895     enum ENODEV          = B_TO_POSIX_ERROR!(B_POSIX_ERROR_BASE + 7);
 1896     enum ENOLCK          = B_TO_POSIX_ERROR!(B_POSIX_ERROR_BASE + 8);
 1897     enum ENOSYS          = B_TO_POSIX_ERROR!(B_POSIX_ERROR_BASE + 9);
 1898     enum ENOTTY          = B_TO_POSIX_ERROR!(B_POSIX_ERROR_BASE + 10);
 1899     enum ENXIO           = B_TO_POSIX_ERROR!(B_POSIX_ERROR_BASE + 11);
 1900     enum ESPIPE          = B_TO_POSIX_ERROR!(B_POSIX_ERROR_BASE + 12);
 1901     enum ESRCH           = B_TO_POSIX_ERROR!(B_POSIX_ERROR_BASE + 13);
 1902     enum EFPOS           = B_TO_POSIX_ERROR!(B_POSIX_ERROR_BASE + 14);
 1903     enum ESIGPARM        = B_TO_POSIX_ERROR!(B_POSIX_ERROR_BASE + 15);
 1904     enum EDOM            = B_TO_POSIX_ERROR!(B_POSIX_ERROR_BASE + 16);
 1905     enum ERANGE          = B_TO_POSIX_ERROR!(B_POSIX_ERROR_BASE + 17);
 1906     enum EPROTOTYPE      = B_TO_POSIX_ERROR!(B_POSIX_ERROR_BASE + 18);
 1907     enum EPROTONOSUPPORT = B_TO_POSIX_ERROR!(B_POSIX_ERROR_BASE + 19);
 1908     enum EPFNOSUPPORT    = B_TO_POSIX_ERROR!(B_POSIX_ERROR_BASE + 20);
 1909     enum EAFNOSUPPORT    = B_TO_POSIX_ERROR!(B_POSIX_ERROR_BASE + 21);
 1910     enum EADDRINUSE      = B_TO_POSIX_ERROR!(B_POSIX_ERROR_BASE + 22);
 1911     enum EADDRNOTAVAIL   = B_TO_POSIX_ERROR!(B_POSIX_ERROR_BASE + 23);
 1912     enum ENETDOWN        = B_TO_POSIX_ERROR!(B_POSIX_ERROR_BASE + 24);
 1913     enum ENETUNREACH     = B_TO_POSIX_ERROR!(B_POSIX_ERROR_BASE + 25);
 1914     enum ENETRESET       = B_TO_POSIX_ERROR!(B_POSIX_ERROR_BASE + 26);
 1915     enum ECONNABORTED    = B_TO_POSIX_ERROR!(B_POSIX_ERROR_BASE + 27);
 1916     enum ECONNRESET      = B_TO_POSIX_ERROR!(B_POSIX_ERROR_BASE + 28);
 1917     enum EISCONN         = B_TO_POSIX_ERROR!(B_POSIX_ERROR_BASE + 29);
 1918     enum ENOTCONN        = B_TO_POSIX_ERROR!(B_POSIX_ERROR_BASE + 30);
 1919     enum ESHUTDOWN       = B_TO_POSIX_ERROR!(B_POSIX_ERROR_BASE + 31);
 1920     enum ECONNREFUSED    = B_TO_POSIX_ERROR!(B_POSIX_ERROR_BASE + 32);
 1921     enum EHOSTUNREACH    = B_TO_POSIX_ERROR!(B_POSIX_ERROR_BASE + 33);
 1922     enum ENOPROTOOPT     = B_TO_POSIX_ERROR!(B_POSIX_ERROR_BASE + 34);
 1923     enum ENOBUFS         = B_TO_POSIX_ERROR!(B_POSIX_ERROR_BASE + 35);
 1924     enum EINPROGRESS     = B_TO_POSIX_ERROR!(B_POSIX_ERROR_BASE + 36);
 1925     enum EALREADY        = B_TO_POSIX_ERROR!(B_POSIX_ERROR_BASE + 37);
 1926     enum EILSEQ          = B_TO_POSIX_ERROR!(B_POSIX_ERROR_BASE + 38);
 1927     enum ENOMSG          = B_TO_POSIX_ERROR!(B_POSIX_ERROR_BASE + 39);
 1928     enum ESTALE          = B_TO_POSIX_ERROR!(B_POSIX_ERROR_BASE + 40);
 1929     enum EOVERFLOW       = B_TO_POSIX_ERROR!(B_POSIX_ERROR_BASE + 41);
 1930     enum EMSGSIZE        = B_TO_POSIX_ERROR!(B_POSIX_ERROR_BASE + 42);
 1931     enum EOPNOTSUPP      = B_TO_POSIX_ERROR!(B_POSIX_ERROR_BASE + 43);
 1932     enum ENOTSOCK        = B_TO_POSIX_ERROR!(B_POSIX_ERROR_BASE + 44);
 1933     enum EHOSTDOWN       = B_TO_POSIX_ERROR!(B_POSIX_ERROR_BASE + 45);
 1934     enum EBADMSG         = B_TO_POSIX_ERROR!(B_POSIX_ERROR_BASE + 46);
 1935     enum ECANCELED       = B_TO_POSIX_ERROR!(B_POSIX_ERROR_BASE + 47);
 1936     enum EDESTADDRREQ    = B_TO_POSIX_ERROR!(B_POSIX_ERROR_BASE + 48);
 1937     enum EDQUOT          = B_TO_POSIX_ERROR!(B_POSIX_ERROR_BASE + 49);
 1938     enum EIDRM           = B_TO_POSIX_ERROR!(B_POSIX_ERROR_BASE + 50);
 1939     enum EMULTIHOP       = B_TO_POSIX_ERROR!(B_POSIX_ERROR_BASE + 51);
 1940     enum ENODATA         = B_TO_POSIX_ERROR!(B_POSIX_ERROR_BASE + 52);
 1941     enum ENOLINK         = B_TO_POSIX_ERROR!(B_POSIX_ERROR_BASE + 53);
 1942     enum ENOSR           = B_TO_POSIX_ERROR!(B_POSIX_ERROR_BASE + 54);
 1943     enum ENOSTR          = B_TO_POSIX_ERROR!(B_POSIX_ERROR_BASE + 55);
 1944     enum ENOTSUP         = B_TO_POSIX_ERROR!(B_POSIX_ERROR_BASE + 56);
 1945     enum EPROTO          = B_TO_POSIX_ERROR!(B_POSIX_ERROR_BASE + 57);
 1946     enum ETIME           = B_TO_POSIX_ERROR!(B_POSIX_ERROR_BASE + 58);
 1947     enum ETXTBSY         = B_TO_POSIX_ERROR!(B_POSIX_ERROR_BASE + 59);
 1948     enum ENOATTR         = B_TO_POSIX_ERROR!(B_POSIX_ERROR_BASE + 60);
 1949 
 1950     /* B_NO_MEMORY (0x80000000) can't be negated, so it needs special handling */
 1951     static if (B_USE_POSITIVE_POSIX_ERRORS)
 1952         enum ENOMEM = B_POSIX_ENOMEM;
 1953     else
 1954         enum ENOMEM = B_NO_MEMORY;
 1955 
 1956     /* POSIX errors that can be mapped to BeOS error codes */
 1957     enum EACCES          = B_TO_POSIX_ERROR!(B_PERMISSION_DENIED);
 1958     enum EINTR           = B_TO_POSIX_ERROR!(B_INTERRUPTED);
 1959     enum EIO             = B_TO_POSIX_ERROR!(B_IO_ERROR);
 1960     enum EBUSY           = B_TO_POSIX_ERROR!(B_BUSY);
 1961     enum EFAULT          = B_TO_POSIX_ERROR!(B_BAD_ADDRESS);
 1962     enum ETIMEDOUT       = B_TO_POSIX_ERROR!(B_TIMED_OUT);
 1963     enum EAGAIN          = B_TO_POSIX_ERROR!(B_WOULD_BLOCK) /* SysV compatibility */;
 1964     enum EWOULDBLOCK     = B_TO_POSIX_ERROR!(B_WOULD_BLOCK) /* BSD compatibility */;
 1965     enum EBADF           = B_TO_POSIX_ERROR!(B_FILE_ERROR);
 1966     enum EEXIST          = B_TO_POSIX_ERROR!(B_FILE_EXISTS);
 1967     enum EINVAL          = B_TO_POSIX_ERROR!(B_BAD_VALUE);
 1968     enum ENAMETOOLONG    = B_TO_POSIX_ERROR!(B_NAME_TOO_LONG);
 1969     enum ENOENT          = B_TO_POSIX_ERROR!(B_ENTRY_NOT_FOUND);
 1970     enum EPERM           = B_TO_POSIX_ERROR!(B_NOT_ALLOWED);
 1971     enum ENOTDIR         = B_TO_POSIX_ERROR!(B_NOT_A_DIRECTORY);
 1972     enum EISDIR          = B_TO_POSIX_ERROR!(B_IS_A_DIRECTORY);
 1973     enum ENOTEMPTY       = B_TO_POSIX_ERROR!(B_DIRECTORY_NOT_EMPTY);
 1974     enum ENOSPC          = B_TO_POSIX_ERROR!(B_DEVICE_FULL);
 1975     enum EROFS           = B_TO_POSIX_ERROR!(B_READ_ONLY_DEVICE);
 1976     enum EMFILE          = B_TO_POSIX_ERROR!(B_NO_MORE_FDS);
 1977     enum EXDEV           = B_TO_POSIX_ERROR!(B_CROSS_DEVICE_LINK);
 1978     enum ELOOP           = B_TO_POSIX_ERROR!(B_LINK_LIMIT);
 1979     enum ENOEXEC         = B_TO_POSIX_ERROR!(B_NOT_AN_EXECUTABLE);
 1980     enum EPIPE           = B_TO_POSIX_ERROR!(B_BUSTED_PIPE);
 1981 
 1982     /* new error codes that can be mapped to POSIX errors */
 1983     enum B_BUFFER_OVERFLOW          =  B_FROM_POSIX_ERROR!(EOVERFLOW);
 1984     enum B_TOO_MANY_ARGS            =  B_FROM_POSIX_ERROR!(E2BIG);
 1985     enum B_FILE_TOO_LARGE           =  B_FROM_POSIX_ERROR!(EFBIG);
 1986     enum B_RESULT_NOT_REPRESENTABLE =  B_FROM_POSIX_ERROR!(ERANGE);
 1987     enum B_DEVICE_NOT_FOUND         =  B_FROM_POSIX_ERROR!(ENODEV);
 1988     enum B_NOT_SUPPORTED            =  B_FROM_POSIX_ERROR!(EOPNOTSUPP);
 1989 
 1990     /* Media Kit Errors */
 1991     enum B_STREAM_NOT_FOUND              = (B_MEDIA_ERROR_BASE + 0);
 1992     enum B_SERVER_NOT_FOUND              = (B_MEDIA_ERROR_BASE + 1);
 1993     enum B_RESOURCE_NOT_FOUND            = (B_MEDIA_ERROR_BASE + 2);
 1994     enum B_RESOURCE_UNAVAILABLE          = (B_MEDIA_ERROR_BASE + 3);
 1995     enum B_BAD_SUBSCRIBER                = (B_MEDIA_ERROR_BASE + 4);
 1996     enum B_SUBSCRIBER_NOT_ENTERED        = (B_MEDIA_ERROR_BASE + 5);
 1997     enum B_BUFFER_NOT_AVAILABLE          = (B_MEDIA_ERROR_BASE + 6);
 1998     enum B_LAST_BUFFER_ERROR             = (B_MEDIA_ERROR_BASE + 7);
 1999 
 2000     enum B_MEDIA_SYSTEM_FAILURE          = (B_MEDIA_ERROR_BASE + 100);
 2001     enum B_MEDIA_BAD_NODE                = (B_MEDIA_ERROR_BASE + 101);
 2002     enum B_MEDIA_NODE_BUSY               = (B_MEDIA_ERROR_BASE + 102);
 2003     enum B_MEDIA_BAD_FORMAT              = (B_MEDIA_ERROR_BASE + 103);
 2004     enum B_MEDIA_BAD_BUFFER              = (B_MEDIA_ERROR_BASE + 104);
 2005     enum B_MEDIA_TOO_MANY_NODES          = (B_MEDIA_ERROR_BASE + 105);
 2006     enum B_MEDIA_TOO_MANY_BUFFERS        = (B_MEDIA_ERROR_BASE + 106);
 2007     enum B_MEDIA_NODE_ALREADY_EXISTS     = (B_MEDIA_ERROR_BASE + 107);
 2008     enum B_MEDIA_BUFFER_ALREADY_EXISTS   = (B_MEDIA_ERROR_BASE + 108);
 2009     enum B_MEDIA_CANNOT_SEEK             = (B_MEDIA_ERROR_BASE + 109);
 2010     enum B_MEDIA_CANNOT_CHANGE_RUN_MODE  = (B_MEDIA_ERROR_BASE + 110);
 2011     enum B_MEDIA_APP_ALREADY_REGISTERED  = (B_MEDIA_ERROR_BASE + 111);
 2012     enum B_MEDIA_APP_NOT_REGISTERED      = (B_MEDIA_ERROR_BASE + 112);
 2013     enum B_MEDIA_CANNOT_RECLAIM_BUFFERS  = (B_MEDIA_ERROR_BASE + 113);
 2014     enum B_MEDIA_BUFFERS_NOT_RECLAIMED   = (B_MEDIA_ERROR_BASE + 114);
 2015     enum B_MEDIA_TIME_SOURCE_STOPPED     = (B_MEDIA_ERROR_BASE + 115);
 2016     enum B_MEDIA_TIME_SOURCE_BUSY        = (B_MEDIA_ERROR_BASE + 116);
 2017     enum B_MEDIA_BAD_SOURCE              = (B_MEDIA_ERROR_BASE + 117);
 2018     enum B_MEDIA_BAD_DESTINATION         = (B_MEDIA_ERROR_BASE + 118);
 2019     enum B_MEDIA_ALREADY_CONNECTED       = (B_MEDIA_ERROR_BASE + 119);
 2020     enum B_MEDIA_NOT_CONNECTED           = (B_MEDIA_ERROR_BASE + 120);
 2021     enum B_MEDIA_BAD_CLIP_FORMAT         = (B_MEDIA_ERROR_BASE + 121);
 2022     enum B_MEDIA_ADDON_FAILED            = (B_MEDIA_ERROR_BASE + 122);
 2023     enum B_MEDIA_ADDON_DISABLED          = (B_MEDIA_ERROR_BASE + 123);
 2024     enum B_MEDIA_CHANGE_IN_PROGRESS      = (B_MEDIA_ERROR_BASE + 124);
 2025     enum B_MEDIA_STALE_CHANGE_COUNT      = (B_MEDIA_ERROR_BASE + 125);
 2026     enum B_MEDIA_ADDON_RESTRICTED        = (B_MEDIA_ERROR_BASE + 126);
 2027     enum B_MEDIA_NO_HANDLER              = (B_MEDIA_ERROR_BASE + 127);
 2028     enum B_MEDIA_DUPLICATE_FORMAT        = (B_MEDIA_ERROR_BASE + 128);
 2029     enum B_MEDIA_REALTIME_DISABLED       = (B_MEDIA_ERROR_BASE + 129);
 2030     enum B_MEDIA_REALTIME_UNAVAILABLE    = (B_MEDIA_ERROR_BASE + 130);
 2031 
 2032     /* Mail Kit Errors */
 2033     enum B_MAIL_NO_DAEMON                = (B_MAIL_ERROR_BASE + 0);
 2034     enum B_MAIL_UNKNOWN_USER             = (B_MAIL_ERROR_BASE + 1);
 2035     enum B_MAIL_WRONG_PASSWORD           = (B_MAIL_ERROR_BASE + 2);
 2036     enum B_MAIL_UNKNOWN_HOST             = (B_MAIL_ERROR_BASE + 3);
 2037     enum B_MAIL_ACCESS_ERROR             = (B_MAIL_ERROR_BASE + 4);
 2038     enum B_MAIL_UNKNOWN_FIELD            = (B_MAIL_ERROR_BASE + 5);
 2039     enum B_MAIL_NO_RECIPIENT             = (B_MAIL_ERROR_BASE + 6);
 2040     enum B_MAIL_INVALID_MAIL             = (B_MAIL_ERROR_BASE + 7);
 2041 
 2042     /* Printing Errors */
 2043     enum B_NO_PRINT_SERVER               = (B_PRINT_ERROR_BASE + 0);
 2044 
 2045     /* Device Kit Errors */
 2046     enum B_DEV_INVALID_IOCTL             = (B_DEVICE_ERROR_BASE + 0);
 2047     enum B_DEV_NO_MEMORY                 = (B_DEVICE_ERROR_BASE + 1);
 2048     enum B_DEV_BAD_DRIVE_NUM             = (B_DEVICE_ERROR_BASE + 2);
 2049     enum B_DEV_NO_MEDIA                  = (B_DEVICE_ERROR_BASE + 3);
 2050     enum B_DEV_UNREADABLE                = (B_DEVICE_ERROR_BASE + 4);
 2051     enum B_DEV_FORMAT_ERROR              = (B_DEVICE_ERROR_BASE + 5);
 2052     enum B_DEV_TIMEOUT                   = (B_DEVICE_ERROR_BASE + 6);
 2053     enum B_DEV_RECALIBRATE_ERROR         = (B_DEVICE_ERROR_BASE + 7);
 2054     enum B_DEV_SEEK_ERROR                = (B_DEVICE_ERROR_BASE + 8);
 2055     enum B_DEV_ID_ERROR                  = (B_DEVICE_ERROR_BASE + 9);
 2056     enum B_DEV_READ_ERROR                = (B_DEVICE_ERROR_BASE + 10);
 2057     enum B_DEV_WRITE_ERROR               = (B_DEVICE_ERROR_BASE + 11);
 2058     enum B_DEV_NOT_READY                 = (B_DEVICE_ERROR_BASE + 12);
 2059     enum B_DEV_MEDIA_CHANGED             = (B_DEVICE_ERROR_BASE + 13);
 2060     enum B_DEV_MEDIA_CHANGE_REQUESTED    = (B_DEVICE_ERROR_BASE + 14);
 2061     enum B_DEV_RESOURCE_CONFLICT         = (B_DEVICE_ERROR_BASE + 15);
 2062     enum B_DEV_CONFIGURATION_ERROR       = (B_DEVICE_ERROR_BASE + 16);
 2063     enum B_DEV_DISABLED_BY_USER          = (B_DEVICE_ERROR_BASE + 17);
 2064     enum B_DEV_DOOR_OPEN                 = (B_DEVICE_ERROR_BASE + 18);
 2065 
 2066     enum B_DEV_INVALID_PIPE              = (B_DEVICE_ERROR_BASE + 19);
 2067     enum B_DEV_CRC_ERROR                 = (B_DEVICE_ERROR_BASE + 20);
 2068     enum B_DEV_STALLED                   = (B_DEVICE_ERROR_BASE + 21);
 2069     enum B_DEV_BAD_PID                   = (B_DEVICE_ERROR_BASE + 22);
 2070     enum B_DEV_UNEXPECTED_PID            = (B_DEVICE_ERROR_BASE + 23);
 2071     enum B_DEV_DATA_OVERRUN              = (B_DEVICE_ERROR_BASE + 24);
 2072     enum B_DEV_DATA_UNDERRUN             = (B_DEVICE_ERROR_BASE + 25);
 2073     enum B_DEV_FIFO_OVERRUN              = (B_DEVICE_ERROR_BASE + 26);
 2074     enum B_DEV_FIFO_UNDERRUN             = (B_DEVICE_ERROR_BASE + 27);
 2075     enum B_DEV_PENDING                   = (B_DEVICE_ERROR_BASE + 28);
 2076     enum B_DEV_MULTIPLE_ERRORS           = (B_DEVICE_ERROR_BASE + 29);
 2077     enum B_DEV_TOO_LATE                  = (B_DEVICE_ERROR_BASE + 30);
 2078 
 2079     /* Translation Kit Errors */
 2080     enum B_TRANSLATION_BASE_ERROR        = (B_TRANSLATION_ERROR_BASE + 0);
 2081     enum B_NO_TRANSLATOR                 = (B_TRANSLATION_ERROR_BASE + 1);
 2082     enum B_ILLEGAL_DATA                  = (B_TRANSLATION_ERROR_BASE + 2);
 2083 }
 2084 else
 2085 {
 2086     static assert(false, "Unsupported platform");
 2087 }