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.

178 lines
5.7 KiB

  1. // scuOsVersion: Defines macros for representing the target OS
  2. // interface and platform build being used
  3. //
  4. // (c) Copyright Schlumberger Technology Corp., unpublished work, created
  5. // 2000. This computer program includes Confidential, Proprietary
  6. // Information and is a Trade Secret of Schlumberger Technology Corp. All
  7. // use, disclosure, and/or reproduction is prohibited unless authorized
  8. // in writing. All Rights Reserved.
  9. //////////////////////////////////////////////////////////////////////
  10. #if !defined(SLBSCU_OSVERSION_H)
  11. #define SLBSCU_OSVERSION_H
  12. #if !defined(WINVER)
  13. #error WINVER must be defined
  14. #endif
  15. // Define the OS interterfaces for this compile
  16. // Selected SLBSCU_<platform>_SERIES macros are defined based on the
  17. // Platform SDK macros defined, where <platform> is
  18. //
  19. // WIN95SIMPLE - Windows 95
  20. // WIN95SR2 - Windows 95 OEM Service Release 2
  21. // WIN98
  22. // WINNT - Windows NT 4.x and 2000
  23. // WINNT4 - Windows NT 4.x
  24. // WIN2K - Windows 2000
  25. // WINNT_ONLY - not Windows 2000 or Windows 98
  26. //
  27. #if (defined(_WIN32_WINDOWS) && (_WIN32_WINDOWS == 0x0410) && (WINVER == 0x0400)) || (!defined(_WIN32_WINNT) && (WINVER == 0x0500))
  28. #define SLBSCU_WIN98_SERIES 1
  29. #else
  30. #define SLBSCU_WIN98_SERIES 0
  31. #endif
  32. #if defined(_WIN32_WINNT) && (_WIN32_WINNT < 0x0400)
  33. #define SLBSCU_WIN95SIMPLE_SERIES 1 // not Service Pack 2
  34. #define SLBSCU_WIN95SR2_SERIES 0 // with Service Pack 2
  35. #define SLBSCU_WINNT4_SERIES 0
  36. #define SLBSCU_WINNT_SERIES 0
  37. #define SLBSCU_WINNT_ONLY_SERIES 0
  38. #define SLBSCU_WIN2K_SERIES 0
  39. #else // defined(_WIN32_WINNT) && (_WIN32_WINNT < 0x0400)
  40. #define SLBSCU_WIN95SIMPLE_SERIES 0
  41. #if defined(_WIN32_WINNT) && (_WIN32_WINNT == 0x0400)
  42. #define SLBSCU_WIN95SR2_SERIES 1 // with Service Pack 2
  43. #else
  44. #define SLBSCI_WIN95SR2_SERIES 0
  45. #endif
  46. #if (WINVER >= 0x0400)
  47. #define SLBSCU_WINNT_SERIES 1
  48. #else
  49. #define SLBSCU_WINNT_SERIES 0
  50. #endif
  51. #if ((WINVER >= 0x0400) && (WINVER < 0x0500))
  52. #define SLBSCU_WINNT4_SERIES 1
  53. #else
  54. #define SLBSCU_WINNT4_SERIES 0
  55. #endif
  56. #if (WINVER >= 0x0500)
  57. #define SLBSCU_WIN2K_SERIES 1
  58. #else
  59. #define SLBSCU_WIN2K_SERIES 0
  60. #endif
  61. #if !SLBSCU_WIN98_SERIES && SLBSCU_WINNT_SERIES
  62. #define SLBSCU_WINNT_ONLY_SERIES 1
  63. #else
  64. #define SLBSCU_WINNT_ONLY_SERIES 0
  65. #endif
  66. #endif // defined(_WIN32_WINNT) && (_WIN32_WINNT < 0x0400)
  67. // Define any SLB_<platform>_BUILD and SLB_NO<platform>_BUILD macros
  68. // which haven't already been defined, as appropriate.
  69. //
  70. // These build macros can be defined at compile time to define what
  71. // are the target platforms for the build. There are two sets of
  72. // macros. The first is in the form of SLB_<platform>_BUILD:
  73. //
  74. // SLB_WIN95_BUILD - for either 95 and 95 OEM Service Pack 2 depeding
  75. // on the Platform SDK macro settings.
  76. // SLB_WIN98_BUILD
  77. // SLB_WINNT_BUILD - only NT 4.x
  78. // SLB_WIN2K_BUILD - Windows 2000
  79. //
  80. // These can be set at compile time in which case they override any
  81. // inference taken from the Platform SDK macros and
  82. // SLBSCU_<platform>_SERIES macros. When non of these is defined at
  83. // compile time, then they are defined here based on the
  84. // SLBSCU_<platform>_SERIES macros taken from the Platform SDK macro
  85. // definitions. Where these build macros override the platform series
  86. // macros, another provide a way to filter the target platform settings.
  87. //
  88. // The SLBSCU_NO<platform>_BUILD are used to "turn off" building for a
  89. // target platform that would otherwise be indicated from platform
  90. // series. Since the Platform SDK macros specify a mininum system
  91. // configuration, you may want to filter out some specific target
  92. // platforms without having to specify each one. The filtering macros
  93. // are:
  94. //
  95. // SLB_NOWIN95_BUILD
  96. // SLB_NOWIN98_BUILD
  97. // SLB_NOWINNT_BUILD
  98. // SLB_NOWIN2K_BUILD
  99. //
  100. // Defining any one of these will indicate the corresponding platform
  101. // isn't supported in this build.
  102. //
  103. // This header file defines both sets for any which haven't been
  104. // defined at build time. In this way, the build can specify the
  105. // minimum build macros based on the Platform SDK settings. All the
  106. // macros will be defined as appropriate so the source code can
  107. // conditionally compile according to the settings.
  108. #if defined(SLB_NOWIN95_BUILD) && defined(SLB_WIN95_BUILD)
  109. #error SLB_NOWIN95_BUILD and SLB_WIN95_BUILD conflict, define one or the other.
  110. #endif
  111. #if defined(SLB_NOWIN98_BUILD) && defined(SLB_WIN98_BUILD)
  112. #error SLB_NOWIN98_BUILD and SLB_WIN98_BUILD conflict, define one or the other.
  113. #endif
  114. #if defined(SLB_NOWINNT_BUILD) && defined(SLB_WINNT_BUILD)
  115. #error SLB_NOWINNT_BUILD and SLB_WINNT_BUILD conflict, define one or the other.
  116. #endif
  117. #if defined(SLB_NOWIN2K_BUILD) && defined(SLB_WIN2K_BUILD)
  118. #error SLB_NOWIN2K_BUILD and SLB_WIN2K_BUILD conflict, define one or the other.
  119. #endif
  120. #if !defined(SLB_WIN95_BUILD) && !defined(SLB_WIN98_BUILD) && !defined(SLB_WINNT_BUILD) && !defined(SLB_WIN2K_BUILD)
  121. // Check for NT/W2K builds to guard against _WIN32_WINNT being set
  122. // for Windows 95 OEM Service Release 2 but being confused with minimum
  123. // Windows NT 4.0 system requirement.
  124. #if !defined(SLB_NOWIN95_BUILD)
  125. #if (SLBSCU_WIN95SR2_SERIES || SLBSCU_WIN95SIMPLE_SERIES)
  126. #define SLB_WIN95_BUILD
  127. #else
  128. #define SLB_NOWIN95_BUILD
  129. #endif
  130. #endif
  131. #if !defined(SLB_NOWIN98_BUILD)
  132. #if SLBSCU_WIN98_SERIES
  133. #define SLB_WIN98_BUILD
  134. #else
  135. #define SLB_NOWIN98_BUILD
  136. #endif
  137. #endif
  138. #if !defined(SLB_NOWINNT_BUILD)
  139. #if SLBSCU_WINNT4_SERIES
  140. #define SLB_WINNT_BUILD
  141. #else
  142. #define SLB_NOWINNT_BUILD
  143. #endif
  144. #endif
  145. #if !defined(SLB_NOWIN2K_BUILD)
  146. #if (SLBSCU_WIN2K_SERIES || SLBSCU_WINNT_SERIES)
  147. #define SLB_WIN2K_BUILD
  148. #else
  149. #define SLB_NOWIN2K_BUILD
  150. #endif
  151. #endif
  152. #endif // !defined(SLB_WIN95_BUILD) && !defined(SLB_...)
  153. #endif // !defined(SLBSCU_OSVERSION_H)