home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tlx501.zip / BORLAND.H < prev    next >
C/C++ Source or Header  |  1996-02-09  |  5KB  |  214 lines

  1. /****************************************************************************
  2.     $Id: borland.h 501.0 1995/03/07 12:26:40 RON Exp $
  3.  
  4.     Copyright (c) 1991-95 Tarma Software Research. All rights reserved.
  5.  
  6.     Project:    Tarma Library for C++ V5.0
  7.     Author:    Ron van der Wal
  8.  
  9.     Borland-specific declarations of compilation and keyword-like names.
  10.  
  11.     $Log: borland.h $
  12.     Revision 501.0  1995/03/07 12:26:40  RON
  13.     Updated for TLX 5.01
  14.     Revision 1.8  1995/01/31 16:59:30  RON
  15.     Update for release 012
  16.     Added partial support for SunPro C++ compiler
  17.     Revision 1.7  1995/01/28  14:37:36  Ron
  18.     Updated comments to use C++ style
  19.  
  20.     Revision 1.6  1995/01/18  18:52:37  ron
  21.     Added support for _GUI preprocessor name
  22.  
  23.     Revision 1.5  1995/01/05  15:32:26  ron
  24.     Various small changes
  25.  
  26.     Revision 1.4  1994/11/16  15:24:42  ron
  27.     Added _CCNAME, _CCVER, and _MODEL definitions
  28.  
  29.     Revision 1.3  1994/10/06  17:46:36  ron
  30.     Added _NOMUTABLE
  31.  
  32.     Revision 1.2  1994/09/08  15:53:09  ron
  33.     Moved O/S-specific macros into this file
  34.  
  35.     Revision 1.1  1994/08/16  18:06:44  ron
  36.     Initial revision
  37.  
  38. ****************************************************************************/
  39.  
  40. #ifndef _TLX_BORLAND_H
  41. #define _TLX_BORLAND_H
  42.  
  43. #ifndef __TURBOC__
  44. #error This file is for Borland compilations only
  45. #endif
  46.  
  47. #define _CCNAME        Borland C++
  48. #define _CCVER        __TURBOC__
  49.  
  50. #ifdef __DLL__
  51. #define _IN_DLL        1
  52. #endif
  53.  
  54. #ifdef _RTLDLL            // Using DLL version of C runtime library
  55.   #ifndef ___DEFS_H
  56.     #include <_defs.h>        // Borland C++ internal RTL definitions
  57.   #endif
  58.  
  59.   #if defined(_EXPCLASS)    // Borland C++ 4.0, BC++ OS/2
  60.     #define _RTLCLASS    _EXPCLASS
  61.   #elif defined(_CLASSTYPE)    // Borland C++ 3.1
  62.     #define _RTLCLASS    _CLASSTYPE
  63.   #else
  64.     #define _RTLCLASS
  65.   #endif
  66. #endif
  67.  
  68. #if __TURBOC__ < 0x452
  69.   #define _NORTTI    1
  70.   #define _NOEXCEPT    1
  71. #endif
  72.  
  73. // For compatbility with BIDS 4.5, we check whether or not we must define
  74. // 'bool' c.s. here, or leave it to BIDS.
  75.  
  76. #if defined(BI_NO_BOOL)
  77.   #if !defined(CLASSLIB_DEFS_H)
  78.     #error Must #include <classlib\defs.h> before #including this file
  79.   #elif defined(BI_UNIQUE_BOOL)
  80.     #error Unique boolean type requires recompilation of TLX
  81.   #endif
  82. #elif __TURBOC__ < 0x500
  83.   #define _NOBOOL    1
  84. #endif
  85. #define _NOMUTABLE    1
  86.  
  87. // Assume that all Borland compilers target Intel 80x86 processors
  88.  
  89. #define _CPU_I86    1
  90. #define _LENDIAN    1
  91. #define _NULL_IS_0  1
  92.  
  93. #ifdef __FLAT__            // Non-segmented platforms
  94.     #define _MEM_FLAT        1
  95.     #define _Near
  96.     #define _Far
  97.     #define _Huge
  98.     #define _MODEL        Flat
  99. #else                // Segmented memory architectures
  100.     #define _MEM_SEG    1
  101.     #define _Near        _near
  102.     #define _Far        _far
  103.     #define _Huge        _huge
  104.  
  105.     #if __TINY__
  106.     #define _CODE_NEAR    1
  107.     #define _DATA_NEAR    1
  108.         #define _MODEL        Tiny
  109.     #elif __SMALL__
  110.     #define _CODE_NEAR    1
  111.     #define _DATA_NEAR    1
  112.         #define _MODEL        Small
  113.     #elif __COMPACT__
  114.     #define _CODE_NEAR    1
  115.     #define _DATA_FAR    1
  116.         #define _MODEL        Compact
  117.     #elif __MEDIUM__
  118.     #define _CODE_FAR    1
  119.     #define _DATA_NEAR    1
  120.         #define _MODEL        Medium
  121.     #elif __LARGE__
  122.     #define _CODE_FAR    1
  123.     #define _DATA_FAR    1
  124.         #define _MODEL        Large
  125.     #elif __HUGE__
  126.     #define _CODE_FAR    1
  127.     #define _DATA_FAR    1
  128.         #define _MODEL        Huge
  129.     #endif
  130. #endif
  131.  
  132. #if defined(__OS2__)        // OS/2 2.x - assume BCOS2 1.0 and up
  133.  
  134.     #define OS_OS2        1
  135.  
  136.   #ifdef __PM__
  137.     #define _GUI        1
  138.   #endif
  139.  
  140.     #define _ExportClass    __export
  141.     #define _ExportFunc        __export
  142.     #define _ExportData        __export
  143.  
  144.     #define _ImportClass
  145.     #define _ImportFunc
  146.     #define _ImportData
  147.  
  148. #elif defined(__WIN32__)        // Win32 - assume BC++ 4.0 and up
  149.  
  150.   #if defined(__DPMI32__)
  151.     #define OS_DOS386       1
  152.     #define OS_DOSXXX       1
  153.   #else
  154.     #define OS_WIN32        1
  155.     #define OS_WINXXX       1
  156.   #endif
  157.  
  158.   #ifndef __CONSOLE__
  159.     #define _GUI        1
  160.   #endif
  161.  
  162.     #define _ExportClass    __export
  163.     #define _ExportFunc        __export
  164.     #define _ExportData        __export
  165.  
  166.     #define _ImportClass    __import
  167.     #define _ImportFunc        __import
  168.     #define _ImportData        __import
  169.  
  170. #elif defined(__BCPLUSPLUS__) && __BCPLUSPLUS__ >= 0x320
  171.  
  172.     // Versions of Borland C++ from 4.0 onwards
  173.  
  174.     #define _ExportClass    __export
  175.     #define _ExportFunc        __export __far
  176.     #define _ExportData        __export __far
  177.  
  178.     #define _ImportClass    __import
  179.     #define _ImportFunc        __far
  180.     #define _ImportData        __far
  181.  
  182.     #if defined(__DPMI16__)
  183.         #define OS_DOS286       1
  184.         #define OS_DOSXXX       1
  185.     #elif defined(_Windows)
  186.         #define OS_WIN16        1
  187.         #define OS_WINXXX       1
  188.     #define _GUI            1
  189.     #else
  190.         #define OS_DOS          1
  191.         #define OS_DOSXXX       1
  192.     #endif
  193. #else                // Older versions of Borland compilers
  194.  
  195.     #define _ExportClass    _export
  196.     #define _ExportFunc        _export _far
  197.     #define _ExportData        _export _far
  198.  
  199.     #define _ImportClass    _huge
  200.     #define _ImportFunc        _far
  201.     #define _ImportData        _far
  202.  
  203.     #if defined(_Windows)
  204.         #define OS_WIN16        1
  205.         #define OS_WINXXX       1
  206.     #define _GUI            1
  207.     #else
  208.         #define OS_DOS          1
  209.         #define OS_DOSXXX       1
  210.     #endif
  211. #endif
  212.  
  213. #endif    // _TLX_BORLAND_H
  214.