home *** CD-ROM | disk | FTP | other *** search
/ ANews 3 / AnewsCD3.iso / DP / Programmation / GCC / gcc_include / sys / errno.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-03-08  |  2.9 KB  |  98 lines

  1. /*    error codes for ansic.library        */
  2. /*    (c)Copyright 1992 Davide Pasetto     */
  3.  
  4. /* The following symbols are the error codes returned by the UNIX system    */
  5. /* functions.  Typically, a UNIX function returns -1 when an error occurs,    */
  6. /* and the global integer named errno contains one of these values.            */
  7.  
  8. #ifndef    _SYS_ERRNO_H
  9. #define _SYS_ERRNO_H
  10.  
  11. #define UNUSED    0
  12. #define EPERM    1     /* User is not owner */
  13. #define ENOENT    2    /* No such file or directory */
  14. #define ESRCH    3     /* No such process */
  15. #define EINTR    4     /* Interrupted system call */
  16. #define EIO        5    /* I/O error */
  17. #define ENXIO    6     /* No such device or address */
  18. #define E2BIG    7     /* Arg list is too long */
  19. #define ENOEXEC    8    /* Exec format error */
  20. #define EBADF    9     /* Bad file number */
  21. #define ECHILD    10    /* No child process */
  22. #define EAGAIN    11    /* No more processes allowed */
  23. #define ENOMEM    12    /* No memory available */
  24. #define EACCES    13    /* Access denied */
  25. #define EFAULT    14    /* Bad address */
  26. #define ENOTBLK    15    /* Bulk device required */
  27. #define EBUSY    16    /* Resource is busy */
  28. #define EEXIST    17    /* File already exists */
  29. #define EXDEV    18    /* Cross-device link */
  30. #define ENODEV    19    /* No such device */
  31. #define ENOTDIR    20    /* Not a directory */
  32. #define EISDIR    21    /* Is a directory */
  33. #define EINVAL    22    /* Invalid argument */
  34. #define ENFILE    23    /* No more files (units) allowed */
  35. #define EMFILE    24    /* No more files (units) allowed for this process */
  36. #define ENOTTY    25    /* Not a terminal */
  37. #define ETXTBSY    26    /* Text file is busy */
  38. #define EFBIG    27    /* File is too large */
  39. #define ENOSPC    28    /* No space left */
  40. #define ESPIPE    29    /* Seek issued to pipe */
  41. #define EROFS    30    /* Read-only file system */
  42. #define EMLINK    31    /* Too many links */
  43. #define EPIPE    32    /* Broken pipe */
  44. #define EDOM    33     /* Math function argument error */
  45. #define ERANGE    34    /* Math function result is out of range */
  46.  
  47. #define EWOULDBLOCK        35
  48. #define EINPROGRESS        36
  49. #define EALREADY        37
  50. #define ENOTSOCK        38
  51. #define EDESTADDRREQ    39
  52. #define EMSGSIZE        40
  53. #define EPROTOTYPE        41
  54. #define ENOPROTOOPT        42
  55. #define EPROTONOSUPPORT 43
  56. #define ESOCKTNOSUPPORT 44
  57. #define EOPNOTSUPP        45
  58. #define EPFNOSUPPORT    46
  59. #define EAFNOSUPPORT    47
  60. #define EADDRINUSE        48
  61. #define EADDRNOTAVAIL    49
  62. #define ENETDOWN        50
  63. #define ENETUNREACH        51
  64. #define ENETRESET        52
  65. #define ECONNABORTED    53
  66. #define ECONNRESET        54
  67. #define ENOBUFS         55
  68. #define EISCONN         56
  69. #define ENOTCONN        57
  70. #define ESHUTDOWN        58
  71. #define ETOOMANYREFS    59
  72. #define ETIMEDOUT        60
  73. #define EREFUSED        61
  74. #define ELOOP            62
  75. #define ENAMETOOLONG    63
  76. #define EHOSTDOWN        64
  77. #define EHOSTUNREACH    65
  78. #define ENOTEMPTY        66
  79. #define EPROCLIM        67
  80. #define EUSERS            68
  81. #define EDQUOT            69
  82.  
  83. #define MAXERRORS        70        /* error number limit */
  84.  
  85. #ifdef    __cplusplus
  86. extern "C" {
  87. #endif
  88.  
  89. extern    int        errno;            /* last error code */
  90. extern    int        sys_nerr;        /* max number of errors (equiv to MAXERRORS) */
  91. extern    char    *sys_errlist[];    /* error texts vector */
  92.  
  93. #ifdef    __cplusplus
  94. }
  95. #endif
  96.  
  97. #endif    /* _SYS_ERRNO_H */
  98.