errno.h
上传用户:luoyougen
上传日期:2008-05-12
资源大小:23136k
文件大小:6k
源码类别:

VxWorks

开发平台:

C/C++

  1. /* errno.h - errno numbers */
  2. /* Copyright 1984-1999 Wind River Systems, Inc. */
  3. /*
  4.  * Copyright (c) 1982, 1986 Regents of the University of California.
  5.  * All rights reserved.  The Berkeley software License Agreement
  6.  * specifies the terms and conditions for redistribution.
  7.  *
  8.  * @(#)errno.h 7.1 (Berkeley) 6/4/86
  9.  */
  10. /*
  11. modification history
  12. --------------------
  13. 01p,21jun00,rsh  upgrade to dosFs 2.0
  14. 01p,10feb99,spm  added comments for STREAMS errors and updated ERRMAX value
  15. 01o,30jun98,lrn  added ERRNO_PX_FLAG and MAP_ERRNO_2_POSIX (SPR#20700)
  16. 01n,20aug95,jag  added ENOSR ENOSTR EPROTO EBADMSG ENODATA ETIME ENOMSG
  17. 01m,15nov93,dvs  added ENOSYS and ECANCELED
  18. 01l,13nov92,dnw  added conditional definition of errno for non-ANSI (SPR #1771)
  19. 01k,02oct92,srh  added c++ version of errno macro
  20. 01j,22sep92,rrr  added support for c++
  21. 01i,18jul92,smb  finished ANSI merge
  22. 01i,08jul92,smb  Phase 1 of ANSI merge
  23. 01h,04jul92,jcf  cleaned up.
  24. 01g,26may92,rrr  the tree shuffle
  25. 01f,04oct91,rrr  passed through the ansification filter
  26.   -changed ASMLANGUAGE to _ASMLANGUAGE
  27.   -changed copyright notice
  28. 01e,25oct90,dnw  removed some unused definitions.
  29. 01d,05oct90,shl  added copyright notice.
  30. 01c,24sep90,elr  ifdef'd errno declaration for assembly.
  31. 01b,13jul90,dnw  added declaration of errno for ANSI compliance
  32. */
  33. #ifndef __INCerrnoh
  34. #define __INCerrnoh
  35. #ifdef __cplusplus
  36. extern "C" {
  37. #endif
  38. #include "types/vxANSI.h"
  39. /*
  40.  * POSIX Error codes
  41.  */
  42. #define EPERM 1 /* Not owner */
  43. #define ENOENT 2 /* No such file or directory */
  44. #define ESRCH 3 /* No such process */
  45. #define EINTR 4 /* Interrupted system call */
  46. #define EIO 5 /* I/O error */
  47. #define ENXIO 6 /* No such device or address */
  48. #define E2BIG 7 /* Arg list too long */
  49. #define ENOEXEC 8 /* Exec format error */
  50. #define EBADF 9 /* Bad file number */
  51. #define ECHILD 10 /* No children */
  52. #define EAGAIN 11 /* No more processes */
  53. #define ENOMEM 12 /* Not enough core */
  54. #define EACCES 13 /* Permission denied */
  55. #define EFAULT 14 /* Bad address */
  56. #define ENOTEMPTY 15 /* Directory not empty */
  57. #define EBUSY 16 /* Mount device busy */
  58. #define EEXIST 17 /* File exists */
  59. #define EXDEV 18 /* Cross-device link */
  60. #define ENODEV 19 /* No such device */
  61. #define ENOTDIR 20 /* Not a directory*/
  62. #define EISDIR 21 /* Is a directory */
  63. #define EINVAL 22 /* Invalid argument */
  64. #define ENFILE 23 /* File table overflow */
  65. #define EMFILE 24 /* Too many open files */
  66. #define ENOTTY 25 /* Not a typewriter */
  67. #define ENAMETOOLONG 26 /* File name too long */
  68. #define EFBIG 27 /* File too large */
  69. #define ENOSPC 28 /* No space left on device */
  70. #define ESPIPE 29 /* Illegal seek */
  71. #define EROFS 30 /* Read-only file system */
  72. #define EMLINK 31 /* Too many links */
  73. #define EPIPE 32 /* Broken pipe */
  74. #define EDEADLK 33 /* Resource deadlock avoided */
  75. #define ENOLCK 34 /* No locks available */
  76. #define ENOTSUP 35 /* Unsupported value */
  77. #define EMSGSIZE 36 /* Message size */
  78. /* ANSI math software */
  79. #define EDOM 37 /* Argument too large */
  80. #define ERANGE 38 /* Result too large */
  81. /* ipc/network software */
  82. /* argument errors */
  83. #define EDESTADDRREQ 40 /* Destination address required */
  84. #define EPROTOTYPE 41 /* Protocol wrong type for socket */
  85. #define ENOPROTOOPT 42 /* Protocol not available */
  86. #define EPROTONOSUPPORT 43 /* Protocol not supported */
  87. #define ESOCKTNOSUPPORT 44 /* Socket type not supported */
  88. #define EOPNOTSUPP 45 /* Operation not supported on socket */
  89. #define EPFNOSUPPORT 46 /* Protocol family not supported */
  90. #define EAFNOSUPPORT 47 /* Addr family not supported */
  91. #define EADDRINUSE 48 /* Address already in use */
  92. #define EADDRNOTAVAIL 49 /* Can't assign requested address */
  93. #define ENOTSOCK 50 /* Socket operation on non-socket */
  94. /* operational errors */
  95. #define ENETUNREACH 51 /* Network is unreachable */
  96. #define ENETRESET 52 /* Network dropped connection on reset*/
  97. #define ECONNABORTED 53 /* Software caused connection abort */
  98. #define ECONNRESET 54 /* Connection reset by peer */
  99. #define ENOBUFS 55 /* No buffer space available */
  100. #define EISCONN 56 /* Socket is already connected */
  101. #define ENOTCONN 57 /* Socket is not connected */
  102. #define ESHUTDOWN 58 /* Can't send after socket shutdown */
  103. #define ETOOMANYREFS 59 /* Too many references: can't splice */
  104. #define ETIMEDOUT 60 /* Connection timed out */
  105. #define ECONNREFUSED 61 /* Connection refused */
  106. #define ENETDOWN 62 /* Network is down */
  107. #define ETXTBSY 63 /* Text file busy */
  108. #define ELOOP 64 /* Too many levels of symbolic links */
  109. #define EHOSTUNREACH 65 /* No route to host */
  110. #define ENOTBLK 66 /* Block device required */
  111. #define EHOSTDOWN 67 /* Host is down */
  112. /* non-blocking and interrupt i/o */
  113. #define EINPROGRESS 68 /* Operation now in progress */
  114. #define EALREADY 69 /* Operation already in progress */
  115. #define EWOULDBLOCK 70 /* Operation would block */
  116. #define ENOSYS 71 /* Function not implemented */
  117. /* aio errors (should be under posix) */
  118. #define ECANCELED 72 /* Operation canceled */
  119. /* specific STREAMS errno values */
  120. #define ENOSR           74              /* Insufficient memory */
  121. #define ENOSTR          75              /* STREAMS device required */
  122. #define EPROTO          76              /* Generic STREAMS error */
  123. #define EBADMSG         77              /* Invalid STREAMS message */
  124. #define ENODATA         78              /* Missing expected message data */
  125. #define ETIME           79              /* STREAMS timeout occurred */
  126. #define ENOMSG          80              /* Unexpected message type */ 
  127. #define ERRMAX 81
  128. /* for module specific error codes which can be mapped to one of the above */
  129. #define ERRNO_PX_FLAG (1<<15)
  130. /* macro to map module-specific error codes to POSIX if applicable */
  131. #define MAP_ERRNO_2_POSIX(errno)
  132. (((errno) & ERRNO_PX_FLAG)? (errno) &= 0x7fff : (errno) )
  133. /* Definition of errno */
  134. #ifndef _ASMLANGUAGE
  135. #if defined(__STDC__) || defined(__cplusplus)
  136. extern int * __errno(void);
  137. #else
  138. extern int * __errno();
  139. #endif /* __STDC__ */
  140. #ifdef __cplusplus
  141. inline int &__errnoRef()
  142.     {
  143.     return (*__errno());
  144.     }
  145. #define errno   __errnoRef()
  146. #else
  147. #define errno (*__errno())
  148. #endif  /* __cplusplus */
  149. #endif /* _ASMLANGUAGE */
  150. #ifdef __cplusplus
  151. }
  152. #endif
  153. #endif /* __INCerrnoh */