runit

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

error.c (1233B)


      1 /* Public domain. */
      2 
      3 #include <errno.h>
      4 #include "error.h"
      5 
      6 /* warning: as coverage improves here, should update error_{str,temp} */
      7 
      8 int error_intr =
      9 #ifdef EINTR
     10 EINTR;
     11 #else
     12 -1;
     13 #endif
     14 
     15 int error_nomem =
     16 #ifdef ENOMEM
     17 ENOMEM;
     18 #else
     19 -2;
     20 #endif
     21 
     22 int error_noent = 
     23 #ifdef ENOENT
     24 ENOENT;
     25 #else
     26 -3;
     27 #endif
     28 
     29 int error_txtbsy =
     30 #ifdef ETXTBSY
     31 ETXTBSY;
     32 #else
     33 -4;
     34 #endif
     35 
     36 int error_io =
     37 #ifdef EIO
     38 EIO;
     39 #else
     40 -5;
     41 #endif
     42 
     43 int error_exist =
     44 #ifdef EEXIST
     45 EEXIST;
     46 #else
     47 -6;
     48 #endif
     49 
     50 int error_timeout =
     51 #ifdef ETIMEDOUT
     52 ETIMEDOUT;
     53 #else
     54 -7;
     55 #endif
     56 
     57 int error_inprogress =
     58 #ifdef EINPROGRESS
     59 EINPROGRESS;
     60 #else
     61 -8;
     62 #endif
     63 
     64 int error_wouldblock =
     65 #ifdef EWOULDBLOCK
     66 EWOULDBLOCK;
     67 #else
     68 -9;
     69 #endif
     70 
     71 int error_again =
     72 #ifdef EAGAIN
     73 EAGAIN;
     74 #else
     75 -10;
     76 #endif
     77 
     78 int error_pipe =
     79 #ifdef EPIPE
     80 EPIPE;
     81 #else
     82 -11;
     83 #endif
     84 
     85 int error_perm =
     86 #ifdef EPERM
     87 EPERM;
     88 #else
     89 -12;
     90 #endif
     91 
     92 int error_acces =
     93 #ifdef EACCES
     94 EACCES;
     95 #else
     96 -13;
     97 #endif
     98 
     99 int error_nodevice =
    100 #ifdef ENXIO
    101 ENXIO;
    102 #else
    103 -14;
    104 #endif
    105 
    106 int error_proto =
    107 #ifdef EPROTO
    108 EPROTO;
    109 #else
    110 -15;
    111 #endif
    112 
    113 int error_isdir =
    114 #ifdef EISDIR
    115 EISDIR;
    116 #else
    117 -16;
    118 #endif
    119 
    120 int error_connrefused =
    121 #ifdef ECONNREFUSED
    122 ECONNREFUSED;
    123 #else
    124 -17;
    125 #endif
    126 
    127 int error_notdir =
    128 #ifdef ENOTDIR
    129 ENOTDIR;
    130 #else
    131 -18;
    132 #endif