Leaked source code of windows server 2003
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.

110 lines
2.4 KiB

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