home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c081_11 / 2.ddi / INCLUDE.ZIP / ERRNO.H < prev    next >
Encoding:
C/C++ Source or Header  |  1991-02-13  |  3.4 KB  |  95 lines

  1. /*  errno.h
  2.  
  3.     Defines the system error variable errno and the error
  4.     numbers set by system calls. Errors which exist in Unix(tm)
  5.     but not MSDOS have value -1.
  6.  
  7.     Copyright (c) Borland International 1987,1988,1990,1991
  8.     All Rights Reserved.
  9. */
  10.  
  11. #ifndef __ERRNO_H
  12. #define __ERRNO_H
  13.  
  14. #ifdef __DLL__
  15. #define _FAR far
  16. #else
  17. #define _FAR
  18. #endif
  19.  
  20. #if __STDC__
  21. #define _Cdecl
  22. #else
  23. #define _Cdecl  cdecl
  24. #endif
  25.  
  26. #ifndef __PAS__
  27. #define _CType _Cdecl
  28. #else
  29. #define _CType pascal
  30. #endif
  31.  
  32. /*  Dos Error Codes */
  33.  
  34. #define EZERO    0      /* Error 0                  */
  35. #define EINVFNC  1      /* Invalid function number  */
  36. #define ENOFILE  2      /* File not found           */
  37. #define ENOPATH  3      /* Path not found           */
  38. #define ECONTR   7      /* Memory blocks destroyed  */
  39. #define EINVMEM  9      /* Invalid memory block address */
  40. #define EINVENV 10      /* Invalid environment      */
  41. #define EINVFMT 11      /* Invalid format           */
  42. #define EINVACC 12      /* Invalid access code      */
  43. #define EINVDAT 13      /* Invalid data             */
  44. #define EINVDRV 15      /* Invalid drive specified  */
  45. #define ECURDIR 16      /* Attempt to remove CurDir */
  46. #define ENOTSAM 17      /* Not same device          */
  47. #define ENMFILE 18      /* No more files            */
  48.  
  49. #define ENOENT   2      /* No such file or directory*/
  50. #define EMFILE   4      /* Too many open files      */
  51. #define EACCES   5      /* Permission denied        */
  52. #define EBADF    6      /* Bad file number          */
  53. #define ENOMEM   8      /* Not enough core          */
  54. #define ENODEV  15      /* No such device           */
  55. #define EINVAL  19      /* Invalid argument         */
  56. #define E2BIG   20      /* Arg list too long        */
  57. #define ENOEXEC 21      /* Exec format error        */
  58. #define EXDEV   22      /* Cross-device link        */
  59. #define EDOM    33      /* Math argument            */
  60. #define ERANGE  34      /* Result too large         */
  61. #define EEXIST  35      /* File already exists      */
  62. #define ECHILD  -1      /* Unix/DOS                 */
  63. #define EFAULT  -1      /* Unknown error            */
  64. #define EPERM   -1      /* UNIX - not MSDOS         */
  65. #define ESRCH   -1      /* UNIX - not MSDOS         */
  66. #define EINTR   -1      /* UNIX - not MSDOS         */
  67. #define EIO     -1      /* UNIX - not MSDOS         */
  68. #define ENXIO   -1      /* UNIX - not MSDOS         */
  69. #define EAGAIN  -1      /* UNIX - not MSDOS         */
  70. #define ENOTBLK -1      /* UNIX - not MSDOS         */
  71. #define EBUSY   -1      /* UNIX - not MSDOS         */
  72. #define ENOTDIR -1      /* UNIX - not MSDOS         */
  73. #define EISDIR  -1      /* UNIX - not MSDOS         */
  74. #define ENFILE  -1      /* UNIX - not MSDOS         */
  75. #define ENOTTY  -1      /* UNIX - not MSDOS         */
  76. #define ETXTBSY -1      /* UNIX - not MSDOS         */
  77. #define EFBIG   -1      /* UNIX - not MSDOS         */
  78. #define ENOSPC  -1      /* UNIX - not MSDOS         */
  79. #define ESPIPE  -1      /* UNIX - not MSDOS         */
  80. #define EROFS   -1      /* UNIX - not MSDOS         */
  81. #define EMLINK  -1      /* UNIX - not MSDOS         */
  82. #define EPIPE   -1      /* UNIX - not MSDOS         */
  83. #define EUCLEAN -1      /* UNIX - not MSDOS         */
  84.  
  85. extern  int _Cdecl  errno;
  86. extern  int _Cdecl  _doserrno;
  87.  
  88. extern  unsigned _Cdecl _localseg; 
  89.  
  90. #if !__STDC__
  91. #define _sys_nerr   35      /* highest defined system error number */
  92. #endif
  93.  
  94. #endif
  95.