Windows NT 4.0 source code leak
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.

215 lines
3.7 KiB

4 years ago
  1. /*++
  2. Copyright (c) 1993 Microsoft Corporation
  3. Module Name:
  4. platform.h
  5. Abstract:
  6. This header file is used to cause the correct machine/platform specific
  7. data structures to be used when compiling for a non-hosted platform.
  8. Author:
  9. Wesley Witt (wesw) 2-Aug-1993
  10. Environment:
  11. User Mode
  12. --*/
  13. #undef i386
  14. #undef _X86_
  15. #undef MIPS
  16. #undef _MIPS_
  17. #undef ALPHA
  18. #undef _ALPHA_
  19. #undef PPC
  20. #undef _PPC_
  21. #define _NTSYSTEM_
  22. //-----------------------------------------------------------------------------------------
  23. //
  24. // mips r4000
  25. //
  26. //-----------------------------------------------------------------------------------------
  27. #if defined(TARGET_MIPS)
  28. #pragma message( "Compiling for target = mips" )
  29. #define _MIPS_
  30. #if defined(HOST_MIPS)
  31. #define MIPS
  32. #endif
  33. #if defined(HOST_i386)
  34. #define __unaligned
  35. #endif
  36. #define _CONTEXT _MIPS_CONTEXT
  37. #define CONTEXT MIPS_CONTEXT
  38. #define PCONTEXT PMIPS_CONTEXT
  39. #define LPCONTEXT LPMIPS_CONTEXT
  40. #include <nt.h>
  41. #include <ntrtl.h>
  42. #include <nturtl.h>
  43. #include <ntdbg.h>
  44. #include <ntos.h>
  45. #include <windows.h>
  46. #if !defined(HOST_MIPS)
  47. #undef MIPS
  48. #undef _MIPS_
  49. #endif
  50. #if defined(HOST_i386)
  51. #undef _cdecl
  52. #undef UNALIGNED
  53. #define UNALIGNED
  54. #endif
  55. //-----------------------------------------------------------------------------------------
  56. //
  57. // PowerPC
  58. //
  59. //-----------------------------------------------------------------------------------------
  60. #elif defined(TARGET_PPC)
  61. #pragma message( "Compiling for target = ppc" )
  62. #define _PPC_
  63. #if defined(HOST_PPC)
  64. #define PPC
  65. #endif
  66. #if defined(HOST_i386)
  67. #define __unaligned
  68. #endif
  69. #define _CONTEXT _PPC_CONTEXT
  70. #define CONTEXT PPC_CONTEXT
  71. #define PCONTEXT PPPC_CONTEXT
  72. #define LPCONTEXT LPPPC_CONTEXT
  73. #include <nt.h>
  74. #include <ntrtl.h>
  75. #include <nturtl.h>
  76. #include <ntdbg.h>
  77. #include <ntos.h>
  78. #include <windows.h>
  79. #if !defined(HOST_PPC)
  80. #undef PPC
  81. #undef _PPC_
  82. #endif
  83. #if defined(HOST_i386)
  84. #undef _cdecl
  85. #undef UNALIGNED
  86. #define UNALIGNED
  87. #endif
  88. //-----------------------------------------------------------------------------------------
  89. //
  90. // intel x86
  91. //
  92. //-----------------------------------------------------------------------------------------
  93. #elif defined(TARGET_i386)
  94. #pragma message( "Compiling for target = x86" )
  95. #define _X86_
  96. #if defined(HOST_MIPS)
  97. #define MIPS
  98. #endif
  99. #define _CONTEXT _I386_CONTEXT
  100. #define CONTEXT I386_CONTEXT
  101. #define PCONTEXT PI386_CONTEXT
  102. #define LPCONTEXT LPI386_CONTEXT
  103. #include <nt.h>
  104. #include <ntrtl.h>
  105. #include <nturtl.h>
  106. #include <ntdbg.h>
  107. #include <ntos.h>
  108. #include <windows.h>
  109. #if defined(HOST_MIPS)
  110. #undef _cdecl
  111. #define _cdecl
  112. #endif
  113. #if defined(HOST_ALPHA)
  114. #undef _cdecl
  115. #define _cdecl
  116. #endif
  117. #if !defined(HOST_i386)
  118. #undef _X86_
  119. #endif
  120. //-----------------------------------------------------------------------------------------
  121. //
  122. // alpha axp
  123. //
  124. //-----------------------------------------------------------------------------------------
  125. #elif defined(TARGET_ALPHA)
  126. #pragma message( "Compiling for target = alpha" )
  127. #define _ALPHA_ 1
  128. #if defined(HOST_i386)
  129. #define __unaligned
  130. #endif
  131. #if defined(HOST_MIPS)
  132. #define MIPS
  133. #endif
  134. #define _CONTEXT _ALPHA_CONTEXT
  135. #define CONTEXT ALPHA_CONTEXT
  136. #define PCONTEXT PALPHA_CONTEXT
  137. #define LPCONTEXT LPALPHA_CONTEXT
  138. #include <nt.h>
  139. #include <ntrtl.h>
  140. #include <nturtl.h>
  141. #include <ntdbg.h>
  142. #include <ntos.h>
  143. #include <windows.h>
  144. #if defined(HOST_MIPS)
  145. #undef _cdecl
  146. #define _cdecl
  147. #endif
  148. #if defined(HOST_i386)
  149. #undef UNALIGNED
  150. #define UNALIGNED
  151. #endif
  152. #if !defined(HOST_ALPHA)
  153. #undef _ALPHA_
  154. #endif
  155. #else
  156. //-----------------------------------------------------------------------------------------
  157. //
  158. // unknown platform
  159. //
  160. //-----------------------------------------------------------------------------------------
  161. #error "Unsupported target CPU"
  162. #endif