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

  1. #ifndef __NERRNO_32H
  2. #define __NERRNO_32H
  3.  
  4. /*
  5.  * The re-defination of error constants are necessary to avoid conflict with
  6.  * standard IBM C Set/2 V1.0 error constants.
  7.  *
  8.  * All OS/2 SOCKET API error constants are biased by SOCBASEERR from the "normal"
  9.  *
  10.  */
  11.  
  12. #define SOCBASEERR              10000
  13.  
  14. /*
  15.  * OS/2 SOCKET API definitions of regular Microsoft C 6.0 error constants
  16.  */
  17.  
  18. #define SOCEPERM                (SOCBASEERR+1)             /* Not owner */
  19. #define SOCESRCH                (SOCBASEERR+3)             /* No such process */
  20. #define SOCEINTR                (SOCBASEERR+4)             /* Interrupted system call */
  21. #define SOCENXIO                (SOCBASEERR+6)             /* No such device or address */
  22. #define SOCEBADF                (SOCBASEERR+9)             /* Bad file number */
  23. #define SOCEACCES               (SOCBASEERR+13)            /* Permission denied */
  24. #define SOCEFAULT               (SOCBASEERR+14)            /* Bad address */
  25. #define SOCEINVAL               (SOCBASEERR+22)            /* Invalid argument */
  26. #define SOCEMFILE               (SOCBASEERR+24)            /* Too many open files */
  27. #define SOCEPIPE                (SOCBASEERR+32)            /* Broken pipe */
  28.  
  29. #define SOCEOS2ERR              (SOCBASEERR+100)            /* OS/2 Error */
  30.  
  31. /*
  32.  * OS/2 SOCKET API definitions of regular BSD error constants
  33.  */
  34.  
  35. #define SOCEWOULDBLOCK          (SOCBASEERR+35)            /* Operation would block */
  36. #define SOCEINPROGRESS          (SOCBASEERR+36)            /* Operation now in progress */
  37. #define SOCEALREADY             (SOCBASEERR+37)            /* Operation already in progress */
  38. #define SOCENOTSOCK             (SOCBASEERR+38)            /* Socket operation on non-socket */
  39. #define SOCEDESTADDRREQ         (SOCBASEERR+39)            /* Destination address required */
  40. #define SOCEMSGSIZE             (SOCBASEERR+40)            /* Message too long */
  41. #define SOCEPROTOTYPE           (SOCBASEERR+41)            /* Protocol wrong type for socket */
  42. #define SOCENOPROTOOPT          (SOCBASEERR+42)            /* Protocol not available */
  43. #define SOCEPROTONOSUPPORT      (SOCBASEERR+43)            /* Protocol not supported */
  44. #define SOCESOCKTNOSUPPORT      (SOCBASEERR+44)            /* Socket type not supported */
  45. #define SOCEOPNOTSUPP           (SOCBASEERR+45)            /* Operation not supported on socket */
  46. #define SOCEPFNOSUPPORT         (SOCBASEERR+46)            /* Protocol family not supported */
  47. #define SOCEAFNOSUPPORT         (SOCBASEERR+47)            /* Address family not supported by protocol family */
  48. #define SOCEADDRINUSE           (SOCBASEERR+48)            /* Address already in use */
  49. #define SOCEADDRNOTAVAIL        (SOCBASEERR+49)            /* Can't assign requested address */
  50. #define SOCENETDOWN             (SOCBASEERR+50)            /* Network is down */
  51. #define SOCENETUNREACH          (SOCBASEERR+51)            /* Network is unreachable */
  52. #define SOCENETRESET            (SOCBASEERR+52)            /* Network dropped connection on reset */
  53. #define SOCECONNABORTED         (SOCBASEERR+53)            /* Software caused connection abort */
  54. #define SOCECONNRESET           (SOCBASEERR+54)            /* Connection reset by peer */
  55. #define SOCENOBUFS              (SOCBASEERR+55)            /* No buffer space available */
  56. #define SOCEISCONN              (SOCBASEERR+56)            /* Socket is already connected */
  57. #define SOCENOTCONN             (SOCBASEERR+57)            /* Socket is not connected */
  58. #define SOCESHUTDOWN            (SOCBASEERR+58)            /* Can't send after socket shutdown */
  59. #define SOCETOOMANYREFS         (SOCBASEERR+59)            /* Too many references: can't splice */
  60. #define SOCETIMEDOUT            (SOCBASEERR+60)            /* Connection timed out */
  61. #define SOCECONNREFUSED         (SOCBASEERR+61)            /* Connection refused */
  62. #define SOCELOOP                (SOCBASEERR+62)            /* Too many levels of symbolic links */
  63. #define SOCENAMETOOLONG         (SOCBASEERR+63)            /* File name too long */
  64. #define SOCEHOSTDOWN            (SOCBASEERR+64)            /* Host is down */
  65. #define SOCEHOSTUNREACH         (SOCBASEERR+65)            /* No route to host */
  66. #define SOCENOTEMPTY            (SOCBASEERR+66)            /* Directory not empty */
  67.  
  68. /*
  69.  * OS/2 SOCKET API errors redefined as regular BSD error constants
  70.  */
  71.  
  72. #ifndef EWOULDBLOCK             /* DRC04 */
  73. #define EWOULDBLOCK             SOCEWOULDBLOCK
  74. #endif
  75.  
  76. #ifndef EINPROGRESS             /* DRC04 */
  77. #define EINPROGRESS             SOCEINPROGRESS
  78. #endif
  79.  
  80. #ifndef EALREADY                /* DRC04 */
  81. #define EALREADY                SOCEALREADY
  82. #endif
  83.  
  84. #ifndef  ENOTSOCK                /* DRC04 */
  85. #define ENOTSOCK                SOCENOTSOCK
  86. #endif
  87.  
  88. #ifndef EDESTADDRREQ            /* DRC04 */
  89. #define EDESTADDRREQ            SOCEDESTADDRREQ
  90. #endif
  91.  
  92. #ifndef EMSGSIZE                /* DRC04 */
  93. #define EMSGSIZE                SOCEMSGSIZE
  94. #endif
  95.  
  96. #ifndef EPROTOTYPE              /* DRC04 */
  97. #define EPROTOTYPE              SOCEPROTOTYPE
  98. #endif
  99.  
  100. #ifndef ENOPROTOOPT             /* DRC04 */
  101. #define ENOPROTOOPT             SOCENOPROTOOPT
  102. #endif
  103.  
  104. #ifndef EPROTONOSUPPORT         /* DRC04 */
  105. #define EPROTONOSUPPORT         SOCEPROTONOSUPPORT
  106. #endif
  107.  
  108. #ifndef ESOCKTNOSUPPORT         /* DRC04 */
  109. #define ESOCKTNOSUPPORT         SOCESOCKTNOSUPPORT
  110. #endif
  111.  
  112. #ifndef EOPNOTSUPP              /* DRC04 */
  113. #define EOPNOTSUPP              SOCEOPNOTSUPP
  114. #endif
  115.  
  116. #ifndef EPFNOSUPPORT            /* DRC04 */
  117. #define EPFNOSUPPORT            SOCEPFNOSUPPORT
  118. #endif
  119.  
  120. #ifndef EAFNOSUPPORT            /* DRC04 */
  121. #define EAFNOSUPPORT            SOCEAFNOSUPPORT
  122. #endif
  123.  
  124. #ifndef EADDRINUSE              /* DRC04 */
  125. #define EADDRINUSE              SOCEADDRINUSE
  126. #endif
  127.  
  128. #ifndef EADDRNOTAVAIL           /* DRC04 */
  129. #define EADDRNOTAVAIL           SOCEADDRNOTAVAIL
  130. #endif
  131.  
  132. #ifndef ENETDOWN                /* DRC04 */
  133. #define ENETDOWN                SOCENETDOWN
  134. #endif
  135.  
  136. #ifndef ENETUNREACH             /* DRC04 */
  137. #define ENETUNREACH             SOCENETUNREACH
  138. #endif
  139.  
  140. #ifndef ENETRESET               /* DRC04 */
  141. #define ENETRESET               SOCENETRESET
  142. #endif
  143.  
  144. #ifndef ECONNABORTED            /* DRC04 */
  145. #define ECONNABORTED            SOCECONNABORTED
  146. #endif
  147.  
  148. #ifndef ECONNRESET              /* DRC04 */
  149. #define ECONNRESET              SOCECONNRESET
  150. #endif
  151.  
  152. #ifndef ENOBUFS                 /* DRC04 */
  153. #define ENOBUFS                 SOCENOBUFS
  154. #endif
  155.  
  156. #ifndef EISCONN                 /* DRC04 */
  157. #define EISCONN                 SOCEISCONN
  158. #endif
  159.  
  160. #ifndef ENOTCONN                /* DRC04 */
  161. #define ENOTCONN                SOCENOTCONN
  162. #endif
  163.  
  164. #ifndef ESHUTDOWN               /* DRC04 */
  165. #define ESHUTDOWN               SOCESHUTDOWN
  166. #endif
  167.  
  168. #ifndef ETOOMANYREFS            /* DRC04 */
  169. #define ETOOMANYREFS            SOCETOOMANYREFS
  170. #endif
  171.  
  172. #ifndef ETIMEDOUT               /* DRC04 */
  173. #define ETIMEDOUT               SOCETIMEDOUT
  174. #endif
  175.  
  176. #ifndef ECONNREFUSED            /* DRC04 */
  177. #define ECONNREFUSED            SOCECONNREFUSED
  178. #endif
  179.  
  180. #ifndef ELOOP                   /* DRC04 */
  181. #define ELOOP                   SOCELOOP
  182. #endif
  183.  
  184. /* DRC01 - The Borland Compiler defines this name to be associated with file */
  185. /*          names.                                                                                                 */
  186.  
  187. /* DRC02 - The Watcom Compiler defines these names */
  188. /* DRC03 - Modified to use the specific compilers definitions */
  189. /* DRC04 - works for all compilers*/
  190.  
  191. #ifndef ENAMETOOLONG            /* DRC03 - Borland and Watcom define this */
  192. #define ENAMETOOLONG            SOCENAMETOOLONG
  193. #endif                          /* DRC03 */
  194.  
  195. #ifndef EHOSTDOWN                               /* DRC04 */
  196. #define EHOSTDOWN               SOCEHOSTDOWN
  197. #endif
  198.  
  199. #ifndef  EHOSTUNREACH                           /* DRC04 */
  200. #define EHOSTUNREACH            SOCEHOSTUNREACH
  201. #endif
  202.  
  203. #ifndef ENOTEMPTY               /* DRC03 - Watcom defines this */
  204. #define ENOTEMPTY               SOCENOTEMPTY
  205. #endif                          /* DRC03 */
  206.  
  207. #endif  /* __NERRNO_32H */
  208.  
  209.