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.

354 lines
7.3 KiB

  1. /*
  2. *
  3. * REFERENCES:
  4. *
  5. * NOTES:
  6. * To use
  7. * Example: C_PLATFORM
  8. * #if (C_PLATFORM & (C_SUN | C_IBM))
  9. *
  10. * REVISIONS:
  11. * pcy23Nov92 Added some meat
  12. * pcy24Nov92 Added C_OS:C_WINDOWS
  13. * rct25Nov92 Amendments for NetWare
  14. * pcy14Dec92 Removed MULTI_THREADED define from here
  15. * rct27Jan93 Added stuff for INTEK compiler
  16. * pcy02Feb93: Added NT stuff
  17. * ajr17Feb93: Added ifdef's for AIX RS6000
  18. * ajr24Feb93: Added POSIX conditions for UNIX I/O
  19. * ajr25Feb93: Added UNIX C_OS group
  20. * ajr12Mar93: #included <errno.h> for debugging purposes (temp)
  21. * ajr24Mar93: Added TIME_SCALE_FACTOR def's
  22. * ajr24Mar93: Added header include ifndef.. for handling of const typing...
  23. * instead of #defining....
  24. * pcy28Apr93: Dont use // commenting in this module. It's used in C source.
  25. * cad27Sep93: Added include of limits to fix conflicts downstream
  26. * ajr16Nov93: Removed TIME_SCALE_FACTOR
  27. * cad27Dec93: include file madness
  28. * mwh28Feb94: make HPUX legit
  29. * mwh13Mar94: port for SUNOS4
  30. * ram21Mar94: Included windows.h for novell FE work
  31. * mwh04Apr94: port for UWARE - unixware
  32. * mwh12Apr94: port for SCO
  33. * pcy19Apr94: port for SGI
  34. * ajr25Apr94: Handle SIGFUNC_HAS_VARARGS here
  35. * mwh23May94: port for NCR
  36. * mwh01Jun94: port for INTERACTIVE
  37. * jps20jul94: added #undef SYSTEM for os2
  38. * djs31Mar95: port for UNISYS
  39. * daf17May95: port for ALPHA/OSF
  40. * dml24Aug95: removed conditional code for OS2 ver 1.3
  41. * djs09Sep95: port for HPUX 10.0
  42. * djs02Oct95: port for AIX 4.1
  43. * djs06Oct95: port for UnixWare 2.01
  44. * ajr07Nov95: port for Sinix RM. Must have c style comments with preprocessor
  45. * dml15Dec95: put C_WIN311 def back in (was overwritten by C_OLIV) in INTERACTIVE slot
  46. * rsd28Dec95: Change #ifdef DOS to #ifdef NWDOS, add C_NETWORK C_IPX
  47. * ntf29Dec95: Added C_NT to ORd OS's for including <windows.h>, also put in
  48. * #undef VOID and #undef BOOLEAN in this block because of
  49. * conflicts using Visual C++ 4.0 for NT.
  50. * pcy28jun96: Added C_API stuff
  51. * cgm27may97: Added smartheap header file.
  52. */
  53. #ifndef _CDEFINE_H
  54. #define _CDEFINE_H
  55. #ifdef USE_SMARTHEAP
  56. #include "smrtheap.hpp"
  57. #endif
  58. #include <limits.h>
  59. /*
  60. * C_OS codes
  61. */
  62. #define C_DOS 1 /* 0000 0000 0000 0000 0000 0001 */
  63. #define C_OS2 2 /* 0000 0000 0000 0000 0000 0010 */
  64. #define C_NLM 4 /* 0000 0000 0000 0000 0000 0100 */
  65. #define C_AIX 8 /* 0000 0000 0000 0000 0000 1000 */
  66. #define C_IRIX 16 /* 0000 0000 0000 0000 0001 0000 */
  67. #define C_HPUX 32 /* 0000 0000 0000 0000 0010 0000 */
  68. #define C_SUNOS4 64 /* 0000 0000 0000 0000 0100 0000 */
  69. #define C_WINDOWS 128 /* 0000 0000 0000 0000 1000 0000 */
  70. #define C_VAP 256 /* 0000 0000 0000 0001 0000 0000 */
  71. #define C_NT 512 /* 0000 0000 0000 0010 0000 0000 */
  72. #define C_SOLARIS2 1024 /* 0000 0000 0000 0100 0000 0000 */
  73. #define C_UWARE 2048 /* 0000 0000 0000 1000 0000 0000 */
  74. #define C_SCO 4096 /* 0000 0000 0001 0000 0000 0000 */
  75. #define C_NCR 8192 /* 0000 0000 0010 0000 0000 0000 */
  76. #define C_WIN311 16384 /* 0000 0000 0100 0000 0000 0000 */
  77. #define C_OLIV 32768 /* 0000 0000 1000 0000 0000 0000 */
  78. #define C_USYS 65536 /* 0000 0001 0000 0000 0000 0000 */
  79. #define C_ALPHAOSF 131072 /* 0000 0010 0000 0000 0000 0000 */
  80. #define C_SINIX 262144 /* 0000 0100 0000 0000 0000 0000 */
  81. #define C_INTERACTIVE 524288 /* 0000 1000 0000 0000 0000 0000 */
  82. #define C_WIN95 1048576 /* 0001 0000 0000 0000 0000 0000 */
  83. /*
  84. * C_VERSION codes
  85. */
  86. #define C_OS2_13 1
  87. #define C_OS2_2X 2
  88. /* --------------------
  89. / C_OSVER
  90. / -------------------- */
  91. #define C_AIX3_2 1
  92. /* --------------------
  93. / C_IOSTD
  94. / -------------------- */
  95. #define C_POSIX 1
  96. /*
  97. * C_VENDOR codes
  98. */
  99. /*
  100. #define C_SUN 1
  101. #define C_IBM 2
  102. #define C_SGI 4
  103. #define C_HP 8
  104. #define C_DEC 16
  105. */
  106. /*
  107. * C_PLATFORM codes
  108. */
  109. #define C_INTEL286 0
  110. #define C_INTEL386 1
  111. #define C_MIPS 2
  112. #define C_SPARC 4
  113. #define C_SGI 8
  114. #define C_HP 16
  115. #define C_DEC 32
  116. #define C_X86 64
  117. /*
  118. * C_MACHINE codes
  119. */
  120. #define C_PS2 1
  121. /*
  122. * C_NETWORK codes
  123. */
  124. #define C_DDE 1
  125. #define C_IPX 2
  126. /* empty by default */
  127. #define SYSTEM
  128. /*
  129. * C_APPFRAMEWORK codes
  130. */
  131. #define C_OWL 1
  132. #define C_COMPILER 0
  133. /* C_API codes */
  134. #define C_WIN32 1
  135. #define C_WIN16 2
  136. #ifdef OS2
  137. #define C_OS C_OS2
  138. #ifdef OS22X
  139. #define C_VERSION C_OS2_2X
  140. #undef SYSTEM
  141. #define SYSTEM _System
  142. #else
  143. #define C_VERSION C_OS2_13
  144. #define SYSTEM
  145. #endif
  146. #endif
  147. #ifdef VAP
  148. #define C_OS C_VAP
  149. #endif
  150. #ifdef NLM
  151. #define C_OS C_NLM
  152. #endif
  153. #ifdef NWDOS
  154. #define C_OS C_DOS
  155. #define C_NETWORK C_IPX
  156. #endif
  157. #ifdef X86
  158. #define C_PLATFORM C_X86
  159. #endif
  160. #ifdef IBM
  161. #define C_PLATFORM C_IBM
  162. #endif
  163. #ifdef SPARC
  164. #define C_PLATFORM C_SPARC
  165. #endif
  166. #ifdef SGI
  167. #define C_PLATFORM C_SGI
  168. #endif
  169. #ifdef AIXPS2
  170. #define C_OS C_AIXPS2
  171. #endif
  172. #ifdef AIX
  173. #define C_OS C_AIX
  174. #endif
  175. #ifdef HPUX
  176. #define C_OS C_HPUX
  177. #endif
  178. #ifdef UWARE
  179. #define C_OS C_UWARE
  180. #endif
  181. #ifdef SCO
  182. #define C_OS C_SCO
  183. #endif
  184. #ifdef INTERACTIVE
  185. #define C_OS C_INTERACTIVE
  186. #endif
  187. #ifdef NCR
  188. #define C_OS C_NCR
  189. #endif
  190. #ifdef SGI
  191. #define C_OS C_IRIX
  192. #endif
  193. #ifdef WIN311
  194. #define C_OS C_WIN311
  195. #define C_NETWORK C_DDE
  196. #define C_API C_WIN16
  197. #endif
  198. #ifdef NWWIN
  199. #define C_OS C_WINDOWS
  200. #define C_NETWORK C_IPX
  201. #define C_APPFRAMEWORK C_OWL
  202. #define C_API C_WIN16
  203. #endif
  204. #ifdef NT
  205. #define C_OS C_NT
  206. #define SYSTEM
  207. #define C_API C_WIN32
  208. #endif
  209. #ifdef WIN95
  210. #define C_OS (C_NT | C_WIN95)
  211. #define SYSTEM
  212. #define C_API C_WIN32
  213. #endif
  214. #ifdef __INTEK__
  215. #define __cplusplus
  216. #endif
  217. #ifdef AIX3_2
  218. #define C_OSVER C_AIX3_2
  219. #endif
  220. #ifdef SOLARIS2
  221. #define C_OS C_SOLARIS2
  222. #endif
  223. #ifdef USYS
  224. #define C_OS C_USYS
  225. #endif
  226. #ifdef ALPHAOSF
  227. #define C_OS C_ALPHAOSF
  228. #endif
  229. #ifdef APC_OLIVETTI
  230. #define C_OS C_OLIV
  231. #endif
  232. #ifdef SUNOS4
  233. #define C_OS C_SUNOS4
  234. #endif
  235. #ifdef SINIX
  236. #define C_OS C_SINIX
  237. #endif
  238. /* --------------------
  239. / Some Unix Stuff....
  240. / -------------------- */
  241. #define C_UNIX (C_AIX | C_HPUX | C_SUNOS4 | C_SOLARIS2 |\
  242. C_UWARE | C_SCO | C_OLIV | C_IRIX | C_NCR |\
  243. C_INTERACTIVE | C_USYS | C_ALPHAOSF | C_SINIX)
  244. #define SIGFUNC_HAS_VARARGS C_IRIX
  245. #if (C_OS & C_UNIX)
  246. #define C_IOSTD C_POSIX
  247. #endif
  248. #define C_HPUX9 1
  249. #define C_HPUX10 2
  250. #ifdef HPUX10
  251. #define C_HP_VERSION C_HPUX10
  252. #else
  253. #define C_HP_VERSION C_HPUX9
  254. #endif
  255. #define C_AIX3 1
  256. #define C_AIX4 2
  257. #ifdef AIX4
  258. #define C_AIX_VERSION C_AIX4
  259. #else
  260. #define C_AIX_VERSION C_AIX3
  261. #endif
  262. #define C_UWARE1 1
  263. #define C_UWARE2 2
  264. #ifdef UWARE2
  265. #define C_UWARE_VERSION C_UWARE2
  266. #else
  267. #define C_UWARE_VERSION C_UWARE1
  268. #endif
  269. /* ---------------
  270. ...THREADED Macros
  271. --------------- */
  272. #if (C_OS & (C_WINDOWS | C_WIN311 | C_UNIX | C_DOS))
  273. #define SINGLETHREADED
  274. #else
  275. #define MULTITHREADED
  276. #endif
  277. /*
  278. * Used for error logging. @(#)cdefine.h 1.35 expands to filename and rev in SCCS
  279. */
  280. #ifndef __APCFILE__
  281. #define __APCFILE__ "@(#)cdefine.h 1.35"
  282. #endif
  283. /*
  284. * Most of files required this for Windows Novell Fe.
  285. */
  286. #if (C_OS & (C_WINDOWS | C_WIN311 | C_NT))
  287. /* Need to do this otherwise <winnt.h> will not define SHORT */
  288. #undef VOID
  289. #undef BOOLEAN
  290. #include <windows.h>
  291. #endif
  292. #endif