home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / C / BC_502 / CLASSINC.PAK / DEFS.H < prev    next >
Encoding:
C/C++ Source or Header  |  1997-05-06  |  4.7 KB  |  166 lines

  1. //----------------------------------------------------------------------------
  2. // Borland Class Library
  3. // Copyright (c) 1993, 1997 by Borland International, All Rights Reserved
  4. //
  5. //$Revision:   5.10  $
  6. //
  7. //----------------------------------------------------------------------------
  8. #if !defined(CLASSLIB_DEFS_H)
  9. #define CLASSLIB_DEFS_H
  10.  
  11. #if !defined(__cplusplus)
  12. # error Must compile Borland Class Library as C++
  13. #endif
  14.  
  15. //----------------------------------------------------------------------------
  16. // We must use all libraries in DLLs if we are using BIDS in a DLL
  17. //
  18. // Define _BIDSDLL with -WSE (-WE for 32bit) to use BIDS & RTL in dlls.
  19. //
  20. // Be sure _BUILDBIDSDLL is defined when building an actual BIDS dll
  21. //
  22. #if defined(_BIDSDLL) || defined(_CLASSDLL) || defined(_BUILDBIDSDLL) || defined(_RTLDLL)
  23. # if !defined(_BIDSDLL)
  24. #   define _BIDSDLL
  25. # endif
  26. # if !defined(_SVCSDLL)
  27. #   define _SVCSDLL
  28. # endif
  29. # if !defined(_RTLDLL)
  30. #   define _RTLDLL
  31. # endif
  32. #endif
  33.  
  34. //
  35. // Get core services definitions and the windowing system headers
  36. //
  37. #if !defined(SERVICES_DEFS_H)
  38. # include <services/defs.h>
  39. #endif
  40.  
  41. //----------------------------------------------------------------------------
  42. //
  43. //  To restore the old BIDS naming convention of data and function names
  44. //  beginning with lowercase letters, in addition to the new convention of
  45. //  uppercase letters, remove the // from the #define below or define on the
  46. //  cmd line. The libraries do not need to be rebuilt.
  47. //
  48.  
  49. //#define BI_OLDNAMES         // add names with initial lowercase
  50.  
  51. //----------------------------------------------------------------------------
  52. //
  53. //  Common definitions for pointer size and calling conventions.
  54. //
  55. //  Calling conventions:
  56. //
  57. //  _BIDSENTRY      Specifies the calling convention used by BIDS.
  58. //
  59. //
  60. //  Export (and size for DOS) information:
  61. //
  62. //  _BIDSCLASS      Exports class if building DLL version of library.
  63. //                  For DOS16 also provides size information.
  64. //
  65. //  _BIDSDATA       Exports data if building DLL version of library.
  66. //
  67. //  _BIDSFUNC       Exports function if building DLL version of library.
  68. //                  For DOS16 also provides size information
  69. //
  70. //  _BIDSFAR        Promotes data pointers to far in DLLs (DOS16 only).
  71. //
  72. //  _BIDSFARDATA    Forces data pointer to be far.
  73. //
  74. //  _BIDSFARFUNC    Forces function to be far.
  75. //
  76. //  _BIDSFARCLASS   Forces class to be far.
  77. //
  78. //  _BIDSNEARDATA   Forces data to be near.
  79. //
  80. //  _BIDSNEARFUNC   Forces function to be near.
  81. //
  82. //  _BIDSNEARCLASS  Forces class to be near.
  83. //
  84. //----------------------------------------------------------------------------
  85.  
  86. #define _BIDSENTRY _CALLCNVN
  87. #if defined(BI_COMP_MSC)
  88. # define _BIDSCTOR
  89. #else
  90. # define _BIDSCTOR _BIDSENTRY
  91. #endif
  92.  
  93. #if defined(BI_PTR_0_32)
  94. # define _BIDSFARDATA
  95. # define _BIDSFARFUNC
  96. # define _BIDSFARCLASS
  97. # define _BIDSNEARDATA
  98. # define _BIDSNEARFUNC
  99. # define _BIDSNEARCLASS
  100. # if defined(_BUILDBIDSDLL)
  101. #   define _BIDSCLASS     __export _CALLCNVN
  102. #   define _BIDSCLASS_RTL __export _CALLCNVN
  103. #   define _BIDSTEMPL     __export
  104. #   define _BIDSDATA      __export
  105. #   define _BIDSFUNC      __export
  106. # elif defined(_BIDSDLL) && !defined(BI_PLAT_OS2)
  107. #   define _BIDSCLASS     __import _CALLCNVN
  108. #   define _BIDSCLASS_RTL __import _CALLCNVN
  109. #   define _BIDSTEMPL     __import
  110. #   define _BIDSDATA      __import
  111. #   define _BIDSFUNC      __import
  112. # else
  113. #   define _BIDSCLASS     _CALLCNVN
  114. #   define _BIDSCLASS_RTL _CALLCNVN
  115. #   define _BIDSTEMPL
  116. #   define _BIDSDATA
  117. #   define _BIDSFUNC
  118. # endif
  119. #else  // 16bit
  120. # if defined(_BIDSDLL)
  121. #   define _BIDSCLASS     __export _CALLCNVN
  122. #   define _BIDSTEMPL     __export
  123. # elif defined(_BIDSFARVTABLE) || defined(BI_DATA_HUGE)
  124. #   define _BIDSCLASS     __huge _CALLCNVN
  125. #   define _BIDSTEMPL     __huge
  126. # elif defined(BI_DATA_FAR)
  127. #   define _BIDSCLASS     __far _CALLCNVN
  128. #   define _BIDSTEMPL     __far
  129. # else
  130. #   define _BIDSCLASS     __near _CALLCNVN
  131. #   define _BIDSTEMPL     __near
  132. # endif
  133. # define _BIDSFARDATA     __far
  134. # define _BIDSFARFUNC     __far
  135. # define _BIDSFARCLASS    __far _CALLCNVN
  136. # define _BIDSNEARDATA    __near
  137. # define _BIDSNEARFUNC    __near
  138. # define _BIDSNEARCLASS   __near _CALLCNVN
  139. # if defined(_BUILDBIDSDLL)
  140. #   define _BIDSFUNC      __export
  141. # else
  142. #   if defined(_BIDSDLL)
  143. #     define _BIDSFUNC    __far
  144. #   else
  145. #     define _BIDSFUNC
  146. #   endif
  147. # endif
  148. # define _BIDSDATA
  149. # if defined(_BIDSFARVTABLE)
  150. #   define _BIDSCLASS_RTL _EXPCLASS
  151. # else
  152. #   define _BIDSCLASS_RTL _BIDSCLASS
  153. # endif
  154. #endif
  155. #define _BIDSFAR
  156.  
  157. #if defined(BI_NAMESPACE)
  158.  
  159. # if defined(BI_NO_NAMESPACE)
  160. #   error Compiler lacks support for namespaces.
  161. # endif
  162.  
  163. #endif
  164.  
  165. #endif  // CLASSLIB_DEFS_H
  166.