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.

132 lines
3.5 KiB

  1. /***
  2. *oscalls.h - contains declarations of Operating System types and constants.
  3. *
  4. * Copyright (c) 1985-2001, Microsoft Corporation. All rights reserved.
  5. *
  6. *Purpose:
  7. * Declares types and constants that are defined by the target OS.
  8. *
  9. * [Internal]
  10. *
  11. *Revision History:
  12. * 12-01-90 SRW Module created
  13. * 02-01-91 SRW Removed usage of NT header files (_WIN32)
  14. * 02-28-91 SRW Removed usage of ntconapi.h (_WIN32)
  15. * 04-09-91 PNT Added _MAC_ definitions
  16. * 04-26-91 SRW Disable min/max definitions in windows.h and added debug
  17. * definitions for DbgPrint and DbgBreakPoint(_WIN32)
  18. * 08-05-91 GJF Use win32.h instead of windows.h for now.
  19. * 08-20-91 JCR C++ and ANSI naming
  20. * 09-12-91 GJF Go back to using windows.h for win32 build.
  21. * 09-26-91 GJF Don't use error.h for Win32.
  22. * 11-07-91 GJF win32.h renamed to dosx32.h
  23. * 11-08-91 GJF Don't use windows.h, excpt.h. Add ntstatus.h.
  24. * 12-13-91 GJF Fixed so that exception stuff will build for Win32
  25. * 02-04-92 GJF Now must include ntdef.h to get LPSTR type.
  26. * 02-07-92 GJF Backed out change above, LPSTR also got added to
  27. * winnt.h
  28. * 03-30-92 DJM POSIX support.
  29. * 04-06-92 SRW Backed out 11-08-91 change and went back to using
  30. * windows.h only.
  31. * 05-12-92 DJM Moved POSIX code to it's own ifdef.
  32. * 08-01-92 SRW Let windows.h include excpt.h now that it replaces winxcpt.h
  33. * 09-30-92 SRW Use windows.h for _POSIX_ as well
  34. * 02-23-93 SKS Update copyright to 1993
  35. * 09-06-94 CFW Remove Cruiser support.
  36. * 02-06-95 CFW DEBUG -> _DEBUG
  37. * 02-14-95 CFW Clean up Mac merge.
  38. * 03-29-95 CFW Add error message to internal headers.
  39. * 12-14-95 JWM Add "#pragma once".
  40. * 02-24-97 GJF Replaced defined(_M_M68K) || defined(_M_MPPC) with
  41. * defined(_MAC). Also, detab-ed.
  42. * 05-17-99 PML Remove all Macintosh support.
  43. *
  44. ****/
  45. #if _MSC_VER > 1000 /*IFSTRIP=IGN*/
  46. #pragma once
  47. #endif
  48. #ifndef _INC_OSCALLS
  49. #define _INC_OSCALLS
  50. #ifndef _CRTBLD
  51. /*
  52. * This is an internal C runtime header file. It is used when building
  53. * the C runtimes only. It is not to be used as a public header file.
  54. */
  55. #error ERROR: Use of C runtime library internal header file.
  56. #endif /* _CRTBLD */
  57. #ifdef __cplusplus
  58. extern "C" {
  59. #endif
  60. #ifdef _WIN32
  61. #ifdef NULL
  62. #undef NULL
  63. #endif
  64. #if defined(_DEBUG) && defined(_WIN32)
  65. void DbgBreakPoint(void);
  66. int DbgPrint(char *Format, ...);
  67. #endif /* _DEBUG && _WIN32 */
  68. #define NOMINMAX
  69. #include <windows.h>
  70. #undef NULL
  71. #ifndef NULL
  72. #ifdef __cplusplus
  73. #define NULL 0
  74. #else
  75. #define NULL ((void *)0)
  76. #endif
  77. #endif
  78. /* File time and date types */
  79. typedef struct _FTIME { /* ftime */
  80. unsigned short twosecs : 5;
  81. unsigned short minutes : 6;
  82. unsigned short hours : 5;
  83. } FTIME;
  84. typedef FTIME *PFTIME;
  85. typedef struct _FDATE { /* fdate */
  86. unsigned short day : 5;
  87. unsigned short month : 4;
  88. unsigned short year : 7;
  89. } FDATE;
  90. typedef FDATE *PFDATE;
  91. #else /* ndef _WIN32 */
  92. #ifdef _POSIX_
  93. #undef NULL
  94. #ifdef __cplusplus
  95. #define NULL 0
  96. #else
  97. #define NULL ((void *)0)
  98. #endif
  99. #include <windows.h>
  100. #else /* ndef _POSIX_ */
  101. #error ERROR - ONLY WIN32 OR POSIX TARGETS SUPPORTED!
  102. #endif /* _POSIX_ */
  103. #endif /* _WIN32 */
  104. #ifdef __cplusplus
  105. }
  106. #endif
  107. #endif /* _INC_OSCALLS */