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.

134 lines
2.4 KiB

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