home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c082_122 / 1.ddi / INCLUDE.ZIP / ERRNO.H < prev    next >
Encoding:
C/C++ Source or Header  |  1992-06-10  |  3.6 KB  |  98 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) 1987, 1992 by Borland International
  8.     All Rights Reserved.
  9. */
  10.  
  11. #ifndef __ERRNO_H
  12. #define __ERRNO_H
  13.  
  14. #if !defined(___DEFS_H)
  15. #include <_defs.h>
  16. #endif
  17.  
  18. /*  Dos Error Codes */
  19.  
  20. #define EZERO    0      /* Error 0                  */
  21. #define EINVFNC  1      /* Invalid function number  */
  22. #define ENOFILE  2      /* File not found           */
  23. #define ENOPATH  3      /* Path not found           */
  24. #define ECONTR   7      /* Memory blocks destroyed  */
  25. #define EINVMEM  9      /* Invalid memory block address */
  26. #define EINVENV 10      /* Invalid environment      */
  27. #define EINVFMT 11      /* Invalid format           */
  28. #define EINVACC 12      /* Invalid access code      */
  29. #define EINVDAT 13      /* Invalid data             */
  30. #define EINVDRV 15      /* Invalid drive specified  */
  31. #define ECURDIR 16      /* Attempt to remove CurDir */
  32. #define ENOTSAM 17      /* Not same device          */
  33. #define ENMFILE 18      /* No more files            */
  34.  
  35. #define ENOENT   2      /* No such file or directory*/
  36. #define EMFILE   4      /* Too many open files      */
  37. #define EACCES   5      /* Permission denied        */
  38. #define EBADF    6      /* Bad file number          */
  39. #define ENOMEM   8      /* Not enough core          */
  40. #define EFAULT  14      /* Unknown error            */
  41. #define ENODEV  15      /* No such device           */
  42. #define EINVAL  19      /* Invalid argument         */
  43. #define E2BIG   20      /* Arg list too long        */
  44. #define ENOEXEC 21      /* Exec format error        */
  45. #define EXDEV   22      /* Cross-device link        */
  46. #define ENFILE  23      /* UNIX - not MSDOS         */
  47. #define ECHILD  24      /* Unix/DOS                 */
  48. #define ENOTTY  25      /* UNIX - not MSDOS         */
  49. #define ETXTBSY 26      /* UNIX - not MSDOS         */
  50. #define EFBIG   27      /* UNIX - not MSDOS         */
  51. #define ENOSPC  28      /* UNIX - not MSDOS         */
  52. #define ESPIPE  29      /* UNIX - not MSDOS         */
  53. #define EROFS   30      /* UNIX - not MSDOS         */
  54. #define EMLINK  31      /* UNIX - not MSDOS         */
  55. #define EPIPE   32      /* UNIX - not MSDOS         */
  56. #define EDOM    33      /* Math argument            */
  57. #define ERANGE  34      /* Result too large         */
  58. #define EEXIST  35      /* File already exists      */
  59. #define EDEADLOCK 36    /* Locking violation        */
  60. #define EPERM   37      /* UNIX - not MSDOS         */
  61. #define ESRCH   38      /* UNIX - not MSDOS         */
  62. #define EINTR   39      /* UNIX - not MSDOS         */
  63. #define EIO     40      /* UNIX - not MSDOS         */
  64. #define ENXIO   41      /* UNIX - not MSDOS         */
  65. #define EAGAIN  42      /* UNIX - not MSDOS         */
  66. #define ENOTBLK 43      /* UNIX - not MSDOS         */
  67. #define EBUSY   44      /* UNIX - not MSDOS         */
  68. #define ENOTDIR 45      /* UNIX - not MSDOS         */
  69. #define EISDIR  46      /* UNIX - not MSDOS         */
  70. #define EUCLEAN 47      /* UNIX - not MSDOS         */
  71.  
  72. #if !defined( _RTLDLL )
  73. extern  int _Cdecl  errno;
  74. extern  int _Cdecl  _doserrno;
  75. #else
  76.  
  77. #ifdef __cplusplus
  78. extern "C" {
  79. #endif
  80. int far * far _Cdecl __getErrno(void);
  81. int far * far _Cdecl __getDOSErrno(void);
  82. #ifdef __cplusplus
  83. }
  84. #endif
  85. #define errno (*__getErrno())
  86.  
  87. #if !defined(__STDC__)
  88.     #define _doserrno (*__getDOSErrno())
  89. #endif
  90.  
  91. #endif
  92.  
  93. #if !__STDC__
  94. #define _sys_nerr   48      /* highest defined system error number + 1 */
  95. #endif
  96.  
  97. #endif
  98.