errno.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. /*
  2. * This file is part of the UCB release of Plan 9. It is subject to the license
  3. * terms in the LICENSE file found in the top-level directory of this
  4. * distribution and at http://akaros.cs.berkeley.edu/files/Plan9License. No
  5. * part of the UCB release of Plan 9, including this file, may be copied,
  6. * modified, propagated, or distributed except according to the terms contained
  7. * in the LICENSE file.
  8. */
  9. #ifndef __ERRNO
  10. #define __ERRNO
  11. #pragma lib "/$M/lib/ape/libap.a"
  12. extern int errno;
  13. #define EDOM 1000
  14. #define ERANGE 1001
  15. #define EPLAN9 1002
  16. #ifdef _POSIX_SOURCE
  17. #define E2BIG 1
  18. #define EACCES 2
  19. #define EAGAIN 3
  20. #define EBADF 4
  21. #define EBUSY 5
  22. #define ECHILD 6
  23. #define EDEADLK 7
  24. #define EEXIST 8
  25. #define EFAULT 9
  26. #define EFBIG 10
  27. #define EINTR 11
  28. #define EINVAL 12
  29. #define EIO 13
  30. #define EISDIR 14
  31. #define EMFILE 15
  32. #define EMLINK 16
  33. #define ENAMETOOLONG 17
  34. #define ENFILE 18
  35. #define ENODEV 19
  36. #define ENOENT 20
  37. #define ENOEXEC 21
  38. #define ENOLCK 22
  39. #define ENOMEM 23
  40. #define ENOSPC 24
  41. #define ENOSYS 25
  42. #define ENOTDIR 26
  43. #define ENOTEMPTY 27
  44. #define ENOTTY 28
  45. #define ENXIO 29
  46. #define EPERM 30
  47. #define EPIPE 31
  48. #define EROFS 32
  49. #define ESPIPE 33
  50. #define ESRCH 34
  51. #define EXDEV 35
  52. /* bsd networking software */
  53. #define ENOTSOCK 36
  54. #define EPROTONOSUPPORT 37
  55. #define EPROTOTYPE 37 /* two names for 37 */
  56. #define ECONNREFUSED 38
  57. #define EAFNOSUPPORT 39
  58. #define ENOBUFS 40
  59. #define EOPNOTSUPP 41
  60. #define EADDRINUSE 42
  61. #define EDESTADDRREQ 43
  62. #define EMSGSIZE 44
  63. #define ENOPROTOOPT 45
  64. #define ESOCKTNOSUPPORT 46
  65. #define EPFNOSUPPORT 47
  66. #define EADDRNOTAVAIL 48
  67. #define ENETDOWN 49
  68. #define ENETUNREACH 50
  69. #define ENETRESET 51
  70. #define ECONNABORTED 52
  71. #define EISCONN 53
  72. #define ENOTCONN 54
  73. #define ESHUTDOWN 55
  74. #define ETOOMANYREFS 56
  75. #define ETIMEDOUT 57
  76. #define EHOSTDOWN 58
  77. #define EHOSTUNREACH 59
  78. #define EGREG 60
  79. /* These added in 1003.1b-1993 */
  80. #define ECANCELED 61
  81. #define EINPROGRESS 62
  82. /* from research unix */
  83. #define ETXTBSY 63
  84. #endif /* _POSIX_SOURCE */
  85. #endif /* __ERRNO */