Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

127 lines
2.2 KiB

  1. /***
  2. *errno.h - system wide error numbers (set by system calls)
  3. *
  4. * Copyright (c) 1985-1994, Microsoft Corporation. All rights reserved.
  5. *
  6. *Purpose:
  7. * This file defines the system-wide error numbers (set by
  8. * system calls). Conforms to the XENIX standard. Extended
  9. * for compatibility with Uniforum standard.
  10. * [System V]
  11. *
  12. ****/
  13. #ifndef _INC_ERRNO
  14. #define _INC_ERRNO
  15. #ifdef __cplusplus
  16. extern "C" {
  17. #endif
  18. /* Define _CRTAPI1 (for compatibility with the NT SDK) */
  19. #ifndef _CRTAPI1
  20. #if ( (_MSC_VER >= 800) && (_M_IX86 >= 300) )
  21. #define _CRTAPI1 __cdecl
  22. #else
  23. #define _CRTAPI1
  24. #endif
  25. #endif
  26. /* Define _CRTAPI2 (for compatibility with the NT SDK) */
  27. #ifndef _CRTAPI2
  28. #if ( (_MSC_VER >= 800) && (_M_IX86 >= 300) )
  29. #define _CRTAPI2 __cdecl
  30. #else
  31. #define _CRTAPI2
  32. #endif
  33. #endif
  34. /* Define _CRTIMP */
  35. #ifndef _CRTIMP
  36. #ifdef _NTSDK
  37. /* definition compatible with NT SDK */
  38. #define _CRTIMP
  39. #else /* ndef _NTSDK */
  40. /* current definition */
  41. #ifdef _DLL
  42. #define _CRTIMP __declspec(dllimport)
  43. #else /* ndef _DLL */
  44. #define _CRTIMP
  45. #endif /* _DLL */
  46. #endif /* _NTSDK */
  47. #endif /* _CRTIMP */
  48. /* Define __cdecl for non-Microsoft compilers */
  49. #if ( !defined(_MSC_VER) && !defined(__cdecl) )
  50. #define __cdecl
  51. #endif
  52. /* declare reference to errno */
  53. #ifdef _MT
  54. _CRTIMP extern int * __cdecl _errno(void);
  55. #define errno (*_errno())
  56. #else /* ndef _MT */
  57. extern int errno;
  58. #endif /* _MT */
  59. /* Error Codes */
  60. #define EPERM 1
  61. #define ENOENT 2
  62. #define ESRCH 3
  63. #define EINTR 4
  64. #define EIO 5
  65. #define ENXIO 6
  66. #define E2BIG 7
  67. #define ENOEXEC 8
  68. #define EBADF 9
  69. #define ECHILD 10
  70. #define EAGAIN 11
  71. #define ENOMEM 12
  72. #define EACCES 13
  73. #define EFAULT 14
  74. #define EBUSY 16
  75. #define EEXIST 17
  76. #define EXDEV 18
  77. #define ENODEV 19
  78. #define ENOTDIR 20
  79. #define EISDIR 21
  80. #define EINVAL 22
  81. #define ENFILE 23
  82. #define EMFILE 24
  83. #define ENOTTY 25
  84. #define EFBIG 27
  85. #define ENOSPC 28
  86. #define ESPIPE 29
  87. #define EROFS 30
  88. #define EMLINK 31
  89. #define EPIPE 32
  90. #define EDOM 33
  91. #define ERANGE 34
  92. #define EDEADLK 36
  93. #define ENAMETOOLONG 38
  94. #define ENOLCK 39
  95. #define ENOSYS 40
  96. #define ENOTEMPTY 41
  97. #define EILSEQ 42
  98. /*
  99. * Support EDEADLOCK for compatibiity with older MS-C versions.
  100. */
  101. #define EDEADLOCK EDEADLK
  102. #ifdef __cplusplus
  103. }
  104. #endif
  105. #endif /* _INC_ERRNO */