home *** CD-ROM | disk | FTP | other *** search
/ C Programming Starter Kit 2.0 / SamsPublishing-CProgrammingStarterKit-v2.0-Win31.iso / bc45 / classinc.pak / COMPILER.H < prev    next >
Text File  |  1997-07-23  |  6KB  |  175 lines

  1. /*------------------------------------------------------------------------*/
  2. /*                                                                        */
  3. /*  CLASSLIB/COMPILER.H                                                   */
  4. /*                                                                        */
  5. /*  Copyright (c) 1994 Borland International                              */
  6. /*  All Rights Reserved                                                   */
  7. /*                                                                        */
  8. /*------------------------------------------------------------------------*/
  9.  
  10. #if !defined(CLASSLIB_COMPILER_H)
  11. #define CLASSLIB_COMPILER_H
  12.  
  13. /*------------------------------------------------------------------------*/
  14. /*                                                                        */
  15. /*  OS-specific flags.                                                    */
  16. /*                                                                        */
  17. /*------------------------------------------------------------------------*/
  18.  
  19. //
  20. //  Define a platform flag.
  21. //
  22. //      BI_PLAT_MSW         Microsoft Windows, all versions
  23. //      BI_PLAT_OS2         IBM OS/2
  24. //      BI_PLAT_DOS         DOS
  25. //
  26. #if defined(_Windows)
  27. #define BI_PLAT_MSW
  28. #elif defined(__OS2__)
  29. #define BI_PLAT_OS2
  30. #else
  31. #define BI_PLAT_DOS
  32. #endif
  33.  
  34. //
  35. //  Specify the Windows API if we're compiling for Windows. Must
  36. //  define one of:
  37. //
  38. //      BI_PLAT_WIN16       Microsoft Windows 16
  39. //      BI_PLAT_WIN32       Microsoft Win32
  40. //
  41. #if defined( BI_PLAT_MSW )
  42. #if defined( __FLAT__ )
  43. #define BI_PLAT_WIN32
  44. #else
  45. #define BI_PLAT_WIN16
  46. #endif
  47. #endif
  48.  
  49. //
  50. //  Define the memory model when compiling for Windows 16 or DOS. Must
  51. //  define one of:
  52. //
  53. //      BI_MODEL_TINY       DOS/Windows tiny model
  54. //      BI_MODEL_SMALL      DOS/Windows small model
  55. //      BI_MODEL_COMPACT    DOS/Windows compact model
  56. //      BI_MODEL_MEDIUM     DOS/Windows medium model
  57. //      BI_MODEL_LARGE      DOS/Windows large model
  58. //      BI_MODEL_HUGE       DOS/Windows huge model
  59. //
  60. #if defined( BI_PLAT_WIN16 ) || defined( BI_PLAT_DOS )
  61. #if defined( __TINY__ )
  62. #define BI_MODEL_TINY
  63. #elif defined( __SMALL__ )
  64. #define BI_MODEL_SMALL
  65. #elif defined( __COMPACT__ )
  66. #define BI_MODEL_COMPACT
  67. #elif defined( __MEDIUM__ )
  68. #define BI_MODEL_MEDIUM
  69. #elif defined( __LARGE__ )
  70. #define BI_MODEL_LARGE
  71. #elif defined( __HUGE__ )
  72. #define BI_MODEL_HUGE
  73. #endif
  74. #endif
  75.  
  76. //
  77. //  Define the pointer size. Must define one of:
  78. //
  79. //      BI_PTR_16_16        Intel 16:16 pointer
  80. //      BI_PTR_0_32         32-bit flat pointer (including Intel 0:32)
  81. //
  82. #if defined( __FLAT__ )
  83. #define BI_PTR_0_32
  84. #else
  85. #define BI_PTR_16_16
  86. #endif
  87.  
  88. //  Specify the size of data pointers and code
  89. //  pointers if applicable. Must define one of:
  90. //
  91. //      BI_DATA_NEAR        16-bit pointer in 16:16 models
  92. //      BI_DATA_FAR         32-bit pointer in 16:16 models
  93. //
  94. //  Must also define one of:
  95. //
  96. //      BI_CODE_NEAR        16-bit pointer in 16:16 models
  97. //      BI_CODE_FAR         32-bit pointer in 16:16 models
  98. //
  99. #if defined( BI_PTR_16_16 )
  100. #if defined(BI_MODEL_TINY) || defined(BI_MODEL_SMALL) || defined(BI_MODEL_MEDIUM)
  101. #define BI_DATA_NEAR
  102. #else
  103. #define BI_DATA_FAR
  104. #endif
  105. #if defined(BI_MODEL_TINY) || defined(BI_MODEL_SMALL) || defined(BI_MODEL_COMPACT)
  106. #define BI_CODE_NEAR
  107. #else
  108. #define BI_CODE_FAR
  109. #endif
  110. #endif
  111.  
  112. //
  113. //  Define the type of application being built. Must be one of:
  114. //
  115. //      BI_APP_EXECUTABLE
  116. //      BI_APP_DLL
  117. //
  118. #if defined( __DLL__ )
  119. #define BI_APP_DLL
  120. #else
  121. #define BI_APP_EXECUTABLE
  122. #endif
  123.  
  124. //
  125. //  Only enable multi-thread classes when the OS supports them.
  126. //
  127. #if defined( BI_PLAT_WIN32 ) || defined( BI_PLAT_OS2 )
  128. #define BI_MULTI_THREAD
  129. #endif
  130.  
  131. /*------------------------------------------------------------------------*/
  132. /*                                                                        */
  133. /*  Compiler-specific flags.                                              */
  134. /*                                                                        */
  135. /*------------------------------------------------------------------------*/
  136.  
  137. //------------------------------------------------
  138. //
  139. //  C++ language features
  140. //
  141. //  When compiling with a compiler that doesn't support these
  142. //  features directly, remove the // from the appropriate 
  143. //  #define below or define the macro in the build environment.
  144. //
  145.  
  146. //
  147. //  Language feature:                                        classlib header
  148. //  #define BI_NO_NEW_CASTS     // new style casts              CASTABLE.H
  149.                                 // and array delete
  150. #define BI_NO_MUTABLE           // mutable keyword              DEFS.H
  151. #define BI_NO_BOOL              // boolean type                 DEFS.H
  152.  
  153. //------------------------------------------------
  154. //
  155. //  To use Borland's register calling conventions in the class library,
  156. //  remove the // from the #define below and rebuild the libraries
  157. //  with the -po command line switch.
  158. //
  159.  
  160. //  #define _CLASSLIB_ALLOW_po  // use register calling convention
  161. //                              // (must also use -po on command line)
  162.  
  163. //------------------------------------------------
  164. //
  165. //  -po is only available for Borland's 16-bit optimizing compiler.
  166. //
  167.  
  168. #if defined(__BCOPT__) && !defined(__FLAT__) && !defined(_CLASSLIB_ALLOW_po)
  169. #define BI_CLASSLIB_NO_po
  170. #endif
  171.  
  172. #endif  // CLASSLIB_COMPILER_H
  173.  
  174.  
  175.