home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / detk45he.zip / nerrno.h < prev    next >
Text File  |  1999-05-11  |  12KB  |  322 lines

  1. #ifndef _NERRNO_H_
  2. #define _NERRNO_H_
  3.  
  4. #ifdef TCPV40HDRS
  5. #include <stack16\nerrno.h>
  6. #else
  7. /*
  8.  * The re-defination of error constants are necessary to avoid conflict with
  9.  * ANSI standard error constants.
  10.  *
  11.  * All OS/2 SOCKET API error constants are biased by SOCBASEERR from the "normal"
  12.  *
  13.  */
  14.  
  15. #ifdef KERNEL
  16. #define SOCBASEERR              0
  17. #else
  18. #define SOCBASEERR              10000
  19. #endif
  20.  
  21. #define SOCEPERM                (SOCBASEERR+1)             /* Not owner */
  22. #define SOCENOENT               (SOCBASEERR+2)             /* No such file or directory */
  23. #define SOCESRCH                (SOCBASEERR+3)             /* No such process */
  24. #define SOCEINTR                (SOCBASEERR+4)             /* Interrupted system call */
  25. #define SOCEIO                  (SOCBASEERR+5)             /* Input/output error */
  26. #define SOCENXIO                (SOCBASEERR+6)             /* No such device or address */
  27. #define SOCE2BIG                (SOCBASEERR+7)             /* Argument list too long */
  28. #define SOCENOEXEC              (SOCBASEERR+8)             /* Exec format error */
  29. #define SOCEBADF                (SOCBASEERR+9)             /* Bad file number */
  30. #define SOCECHILD               (SOCBASEERR+10)            /* No child processes */
  31. #define SOCEDEADLK              (SOCBASEERR+11)            /* Resource deadlock avoided */
  32. #define SOCENOMEM               (SOCBASEERR+12)            /* Cannot allocate memory */
  33. #define SOCEACCES               (SOCBASEERR+13)            /* Permission denied */
  34. #define SOCEFAULT               (SOCBASEERR+14)            /* Bad address */
  35. #define SOCENOTBLK              (SOCBASEERR+15)            /* Block device required */
  36. #define SOCEBUSY                (SOCBASEERR+16)            /* Device busy */
  37. #define SOCEEXIST               (SOCBASEERR+17)            /* File exists */
  38. #define SOCEXDEV                (SOCBASEERR+18)            /* Cross-device link */
  39. #define SOCENODEV               (SOCBASEERR+19)            /* Operation not supported by device */
  40. #define SOCENOTDIR              (SOCBASEERR+20)            /* Not a directory */
  41. #define SOCEISDIR               (SOCBASEERR+21)            /* Is a directory */
  42. #define SOCEINVAL               (SOCBASEERR+22)            /* Invalid argument */
  43. #define SOCENFILE               (SOCBASEERR+23)            /* Too many open files in system*/
  44. #define SOCEMFILE               (SOCBASEERR+24)            /* Too many open files */
  45. #define SOCENOTTY               (SOCBASEERR+25)            /* Inappropriate ioctl for device */
  46. #define SOCETXTBSY              (SOCBASEERR+26)            /* Text file busy */
  47. #define SOCEFBIG                (SOCBASEERR+27)            /* File too large */
  48. #define SOCENOSPC               (SOCBASEERR+28)            /* No space left on device */
  49. #define SOCESPIPE               (SOCBASEERR+29)            /* Illegal seek */
  50. #define SOCEROFS                (SOCBASEERR+30)            /* Read-only file system */
  51. #define SOCEMLINK               (SOCBASEERR+31)            /* Too many links */
  52. #define SOCEPIPE                (SOCBASEERR+32)            /* Broken pipe */
  53.  
  54. /* math software */
  55. #define SOCEDOM                 (SOCBASEERR+33)            /* Numerical argument out of domain */
  56. #define SOCERANGE               (SOCBASEERR+34)            /* Result too large */
  57.  
  58. /* non-blocking and interrupt i/o */
  59. #define SOCEAGAIN               (SOCBASEERR+35)            /* Resource temporarily unavailable */
  60. #define SOCEWOULDBLOCK          SOCEAGAIN                  /* Operation would block */
  61. #define SOCEINPROGRESS          (SOCBASEERR+36)            /* Operation now in progress */
  62. #define SOCEALREADY             (SOCBASEERR+37)            /* Operation already in progress */
  63.  
  64. /* ipc/network software -- argument errors */
  65. #define SOCENOTSOCK             (SOCBASEERR+38)            /* Socket operation on non-socket */
  66. #define SOCEDESTADDRREQ         (SOCBASEERR+39)            /* Destination address required */
  67. #define SOCEMSGSIZE             (SOCBASEERR+40)            /* Message too long */
  68. #define SOCEPROTOTYPE           (SOCBASEERR+41)            /* Protocol wrong type for socket */
  69. #define SOCENOPROTOOPT          (SOCBASEERR+42)            /* Protocol not available */
  70. #define SOCEPROTONOSUPPORT      (SOCBASEERR+43)            /* Protocol not supported */
  71. #define SOCESOCKTNOSUPPORT      (SOCBASEERR+44)            /* Socket type not supported */
  72. #define SOCEOPNOTSUPP           (SOCBASEERR+45)            /* Operation not supported */
  73. #define SOCEPFNOSUPPORT         (SOCBASEERR+46)            /* Protocol family not supported */
  74. #define SOCEAFNOSUPPORT         (SOCBASEERR+47)            /* Address family not supported by protocol family */
  75. #define SOCEADDRINUSE           (SOCBASEERR+48)            /* Address already in use */
  76. #define SOCEADDRNOTAVAIL        (SOCBASEERR+49)            /* Can't assign requested address */
  77.  
  78. /* ipc/network software -- operational errors */
  79. #define SOCENETDOWN             (SOCBASEERR+50)            /* Network is down */
  80. #define SOCENETUNREACH          (SOCBASEERR+51)            /* Network is unreachable */
  81. #define SOCENETRESET            (SOCBASEERR+52)            /* Network dropped connection on reset */
  82. #define SOCECONNABORTED         (SOCBASEERR+53)            /* Software caused connection abort */
  83. #define SOCECONNRESET           (SOCBASEERR+54)            /* Connection reset by peer */
  84. #define SOCENOBUFS              (SOCBASEERR+55)            /* No buffer space available */
  85. #define SOCEISCONN              (SOCBASEERR+56)            /* Socket is already connected */
  86. #define SOCENOTCONN             (SOCBASEERR+57)            /* Socket is not connected */
  87. #define SOCESHUTDOWN            (SOCBASEERR+58)            /* Can't send after socket shutdown */
  88. #define SOCETOOMANYREFS         (SOCBASEERR+59)            /* Too many references: can't splice */
  89. #define SOCETIMEDOUT            (SOCBASEERR+60)            /* Operation timed out */
  90. #define SOCECONNREFUSED         (SOCBASEERR+61)            /* Connection refused */
  91.  
  92. #define SOCELOOP                (SOCBASEERR+62)            /* Too many levels of symbolic links */
  93. #define SOCENAMETOOLONG         (SOCBASEERR+63)            /* File name too long */
  94.  
  95. /* should be rearranged */
  96. #define SOCEHOSTDOWN            (SOCBASEERR+64)             /* Host is down */
  97. #define SOCEHOSTUNREACH         (SOCBASEERR+65)             /* No route to host */
  98. #define SOCENOTEMPTY            (SOCBASEERR+66)             /* Directory not empty */
  99.  
  100. /* quotas & mush */
  101. #define SOCEPROCLIM             (SOCBASEERR+67)             /* Too many processes */
  102. #define SOCEUSERS               (SOCBASEERR+68)             /* Too many users */
  103. #define SOCEDQUOT               (SOCBASEERR+69)             /* Disc quota exceeded */
  104.  
  105. /* Network File System */
  106. #define SOCESTALE               (SOCBASEERR+70)             /* Stale NFS file handle */
  107. #define SOCEREMOTE              (SOCBASEERR+71)             /* Too many levels of remote in path */
  108. #define SOCEBADRPC              (SOCBASEERR+72)             /* RPC struct is bad */
  109. #define SOCERPCMISMATCH         (SOCBASEERR+73)             /* RPC version wrong */
  110. #define SOCEPROGUNAVAIL         (SOCBASEERR+74)             /* RPC prog. not avail */
  111. #define SOCEPROGMISMATCH        (SOCBASEERR+75)             /* Program version wrong */
  112. #define SOCEPROCUNAVAIL         (SOCBASEERR+76)             /* Bad procedure for program */
  113.  
  114. #define SOCENOLCK               (SOCBASEERR+77)             /* No locks available */
  115. #define SOCENOSYS               (SOCBASEERR+78)             /* Function not implemented */
  116.  
  117. #define SOCEFTYPE               (SOCBASEERR+79)             /* Inappropriate file type or format */
  118. #define SOCEAUTH                (SOCBASEERR+80)             /* Authentication error */
  119. #define SOCENEEDAUTH            (SOCBASEERR+81)             /* Need authenticator */
  120.  
  121. #define SOCEOS2ERR              (SOCBASEERR+100)            /* OS/2 Error */
  122. #define SOCELAST                (SOCBASEERR+100)            /* Must be equal largest errno */
  123.  
  124. /*
  125.  * OS/2 SOCKET API errors redefined as regular BSD error constants
  126.  */
  127.  
  128. #ifndef ENOENT
  129. #define ENOENT                  SOCENOENT
  130. #endif
  131.  
  132. #ifndef EFAULT
  133. #define EFAULT                  SOCEFAULT
  134. #endif
  135.  
  136. #ifndef EBUSY
  137. #define EBUSY                   SOCEBUSY
  138. #endif
  139.  
  140. #ifndef ENXIO
  141. #define ENXIO                   SOCENXIO
  142. #endif
  143.  
  144. #ifndef EACCES
  145. #define EACCES                  SOCEACCES
  146. #endif
  147.  
  148. #ifndef ENOMEM
  149. #define ENOMEM                  SOCENOMEM
  150. #endif
  151.  
  152. #ifndef ENOTDIR
  153. #define ENOTDIR                 SOCENOTDIR
  154. #endif
  155.  
  156. #ifndef EPERM
  157. #define EPERM                   SOCEPERM
  158. #endif
  159.  
  160. #ifndef ESRCH
  161. #define ESRCH                   SOCESRCH
  162. #endif
  163.  
  164. #ifndef EDQUOT
  165. #define EDQUOT                  SOCEDQUOT
  166. #endif
  167.  
  168. #ifndef EEXIST
  169. #define EEXIST                  SOCEEXIST
  170. #endif
  171.  
  172. #ifndef EBUSY
  173. #define EBUSY                   SOCEBUSY
  174. #endif
  175.  
  176. #ifndef EWOULDBLOCK
  177. #define EWOULDBLOCK             SOCEWOULDBLOCK
  178. #endif
  179.  
  180. #ifndef EINPROGRESS
  181. #define EINPROGRESS             SOCEINPROGRESS
  182. #endif
  183.  
  184. #ifndef EALREADY
  185. #define EALREADY                SOCEALREADY
  186. #endif
  187.  
  188. #ifndef ENOTSOCK
  189. #define ENOTSOCK                SOCENOTSOCK
  190. #endif
  191.  
  192. #ifndef EDESTADDRREQ
  193. #define EDESTADDRREQ            SOCEDESTADDRREQ
  194. #endif
  195.  
  196. #ifndef EMSGSIZE
  197. #define EMSGSIZE                SOCEMSGSIZE
  198. #endif
  199.  
  200. #ifndef EPROTOTYPE
  201. #define EPROTOTYPE              SOCEPROTOTYPE
  202. #endif
  203.  
  204. #ifndef ENOPROTOOPT
  205. #define ENOPROTOOPT             SOCENOPROTOOPT
  206. #endif
  207.  
  208. #ifndef EPROTONOSUPPORT
  209. #define EPROTONOSUPPORT         SOCEPROTONOSUPPORT
  210. #endif
  211.  
  212. #ifndef ESOCKTNOSUPPORT
  213. #define ESOCKTNOSUPPORT         SOCESOCKTNOSUPPORT
  214. #endif
  215.  
  216. #ifndef EOPNOTSUPP
  217. #define EOPNOTSUPP              SOCEOPNOTSUPP
  218. #endif
  219.  
  220. #ifndef EPFNOSUPPORT
  221. #define EPFNOSUPPORT            SOCEPFNOSUPPORT
  222. #endif
  223.  
  224. #ifndef EAFNOSUPPORT
  225. #define EAFNOSUPPORT            SOCEAFNOSUPPORT
  226. #endif
  227.  
  228. #ifndef EADDRINUSE
  229. #define EADDRINUSE              SOCEADDRINUSE
  230. #endif
  231.  
  232. #ifndef EADDRNOTAVAIL
  233. #define EADDRNOTAVAIL           SOCEADDRNOTAVAIL
  234. #endif
  235.  
  236. #ifndef ENETDOWN
  237. #define ENETDOWN                SOCENETDOWN
  238. #endif
  239.  
  240. #ifndef ENETUNREACH
  241. #define ENETUNREACH             SOCENETUNREACH
  242. #endif
  243.  
  244. #ifndef ENETRESET
  245. #define ENETRESET               SOCENETRESET
  246. #endif
  247.  
  248. #ifndef ECONNABORTED
  249. #define ECONNABORTED            SOCECONNABORTED
  250. #endif
  251.  
  252. #ifndef ECONNRESET
  253. #define ECONNRESET              SOCECONNRESET
  254. #endif
  255.  
  256. #ifndef ENOBUFS
  257. #define ENOBUFS                 SOCENOBUFS
  258. #endif
  259.  
  260. #ifndef EISCONN
  261. #define EISCONN                 SOCEISCONN
  262. #endif
  263.  
  264. #ifndef ENOTCONN
  265. #define ENOTCONN                SOCENOTCONN
  266. #endif
  267.  
  268. #ifndef ESHUTDOWN
  269. #define ESHUTDOWN               SOCESHUTDOWN
  270. #endif
  271.  
  272. #ifndef ETOOMANYREFS
  273. #define ETOOMANYREFS            SOCETOOMANYREFS
  274. #endif
  275.  
  276. #ifndef ETIMEDOUT
  277. #define ETIMEDOUT               SOCETIMEDOUT
  278. #endif
  279.  
  280. #ifndef ECONNREFUSED
  281. #define ECONNREFUSED            SOCECONNREFUSED
  282. #endif
  283.  
  284. #ifndef ELOOP
  285. #define ELOOP                   SOCELOOP
  286. #endif
  287.  
  288. #ifndef ENAMETOOLONG            /* Borland and Watcom define this */
  289. #define ENAMETOOLONG            SOCENAMETOOLONG
  290. #endif
  291.  
  292. #ifndef EHOSTDOWN
  293. #define EHOSTDOWN               SOCEHOSTDOWN
  294. #endif
  295.  
  296. #ifndef EHOSTUNREACH
  297. #define EHOSTUNREACH            SOCEHOSTUNREACH
  298. #endif
  299.  
  300. #ifndef ENOTEMPTY               /* Watcom defines this */
  301. #define ENOTEMPTY               SOCENOTEMPTY
  302. #endif
  303.  
  304. #ifndef EINVAL
  305. #define EINVAL                  SOCEINVAL
  306. #endif
  307.  
  308. #ifndef EINTR
  309. #define EINTR                   SOCEINTR
  310. #endif
  311.  
  312. #ifndef EMFILE
  313. #define EMFILE                  SOCEMFILE
  314. #endif
  315.  
  316. #ifndef EPIPE
  317. #define EPIPE                   SOCEPIPE
  318. #endif
  319.  
  320. #endif /* TCPV40HDRS */
  321. #endif  /* _NERRNO_H_ */
  322.