home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tlx501.zip / COMPILER.H < prev    next >
C/C++ Source or Header  |  1996-01-05  |  6KB  |  183 lines

  1. /****************************************************************************
  2.     $Id: compiler.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.     Sample header for compiler description.
  10.  
  11.     $Log: compiler.h $
  12.     Revision 501.0  1995/03/07 12:26:40  RON
  13.     Updated for TLX 5.01
  14.     Revision 1.2  1995/01/31 16:32:10  RON
  15.     Update for release 012
  16.     Added partial support for SunPro C++ compiler
  17.     Revision 1.1  1994/11/16  15:20:30  ron
  18.     Initial revision
  19.  
  20. ****************************************************************************/
  21.  
  22. #ifndef _TLX_COMPILER_H
  23. #define _TLX_COMPILER_H
  24.  
  25. #error This file is a sample only; contact Tarma Software Research
  26.  
  27. /*---------------------------------------------------------------------------
  28.     Instructions
  29.     ------------
  30.  
  31.     This file contains sections for all areas that are compiler-specific.
  32.     If you encounter a compiler that isn't supported in the standard TLX
  33.     distribution, you can use this file as a template from which to derive
  34.     your own compiler description.
  35. ---------------------------------------------------------------------------*/
  36.  
  37. #define _CCNAME        Generic C++ compiler
  38. #define _CCVER        0x0000
  39.  
  40. // If the compiler supports compilation of DLLs (or shared libraries in
  41. // UNIX parlance), modify the following construct such that _IN_DLL is
  42. // #defined to 1 if the compiler is set up for DLL compilation.
  43.  
  44. #ifdef _DLL
  45. #define _IN_DLL         1
  46. #endif
  47.  
  48. // If there are special keywords used for classes in the compiler's runtime
  49. // library, #define the following:
  50.  
  51. #define _RTLCLASS        // Used as 'class _RTLCLASS iostream;'
  52.  
  53. // The following set of preprocessor names is used to allow transition to
  54. // the latest ANSI/ISO C++ standards. If your compiler does *not* a particular
  55. // feature, #define the appropriate name to 1.
  56. //
  57. // Note: it is assumed that the compiler supports at least templates and
  58. // multiple inheritance, i.e. the cfront 2.1 level.
  59.  
  60. #define _NORTTI        1    // Runtime type information supported?
  61. #define _NOEXCEPT    1    // Exception handling supported?
  62. #define _NOBOOL        1    // 'bool' data type supported?
  63. #define _NOMUTABLE    1    // 'mutable' modifier supported?
  64.  
  65. // The largest set of options concerns memory models and related keywords.
  66. // The first distinction is between flat and segmented memory architectures.
  67. // #define *one* of the following:
  68.  
  69. #define _MEM_SEG    1    // If a segmented architecture
  70. #define _MEM_FLAT    1    // If a non-segmented architecture
  71.  
  72. // To cope with segmented platforms, #define the following pseudo-keywords
  73. // as appropriate. Also, specify the kind of default data and code pointers
  74. // for the model.
  75. //
  76. // The directives for imported and exported data, functions, and classes
  77. // are also usually architecture-related, so provide them as well.
  78.  
  79. #ifdef _MEM_SEG
  80.     #define _Near    __near    // Modifier for explicit 'near' pointers
  81.     #define _Far    __far    // Modifier for explicit 'far' pointers
  82.     #define _Huge    __huge    // Modifier for explicit 'huge' pointers
  83.  
  84.     #define _ExportClass        __export __far
  85.     #define _ExportFunc         __export __far
  86.     #define _ExportData         __export __far
  87.  
  88.     #define _ImportClass        __huge
  89.     #define _ImportFunc         __far
  90.     #define _ImportData         __far
  91.  
  92.     #if defined(__TINY__)
  93.         #define _CODE_NEAR      1
  94.         #define _DATA_NEAR      1
  95.         #define _MODEL        Tiny
  96.     #elif defined(__SMALL__)
  97.         #define _CODE_NEAR      1
  98.         #define _DATA_NEAR      1
  99.         #define _MODEL        Small
  100.     #elif defined(__COMPACT__)
  101.         #define _CODE_NEAR      1
  102.         #define _DATA_FAR       1
  103.         #define _MODEL        Compact
  104.     #elif defined(__MEDIUM__)
  105.         #define _DATA_NEAR      1
  106.         #define _CODE_FAR       1
  107.         #define _MODEL        Medium
  108.     #elif defined(__LARGE__)
  109.         #define _CODE_FAR       1
  110.         #define _DATA_FAR       1
  111.         #define _MODEL        Large
  112.     #elif defined(__HUGE__)
  113.         #define _CODE_FAR       1
  114.         #define _DATA_FAR       1
  115.         #define _MODEL        Huge
  116.     #else
  117.         #error Unknown memory model
  118.     #endif
  119.  
  120. #else    // Assume non-segmented
  121.  
  122.     #define _Near
  123.     #define _Far
  124.     #define _Huge
  125.  
  126.     #define _MODEL    Flat    // Describes the model to TLX (only)
  127.  
  128.     #define _ExportClass        __export
  129.     #define _ExportFunc         __export
  130.     #define _ExportData         __export
  131.  
  132.     #define _ImportClass    __import
  133.     #define _ImportFunc        __import
  134.     #define _ImportData        __import
  135. #endif
  136.  
  137. // Describe the target platform by defining one or more of the following:
  138.  
  139. #define OS_BSD          1    // BSD Unix platform
  140. #define OS_SCO          1    // SCO Unix platform
  141. #define OS_SV4          1    // Unix SVR4.2 platform
  142. #if OS_BSD || OS_SCO || OS_SV4
  143. #define OS_UNIX          1    // defined on all Unix platforms
  144. #endif
  145.  
  146. #define OS_DOS          1    // 16-bit real mode DOS platform
  147. #define OS_DOS286       1    // 16-bit protected mode DOS platform
  148. #define OS_DOS386       1    // 32-bit protected mode DOS platform
  149. #if OS_DOS || OS_DOS286 || OS_DOS386
  150. #define OS_DOSXXX    1    // defined on all DOS platforms
  151. #endif
  152.  
  153. #define OS_MAC          1    // Macintosh 6.x and above platforms
  154. #define OS_OS2          1    // OS/2 2.x platforms
  155.  
  156. #define OS_WIN16        1    // 16-bit Windows platforms
  157. #define OS_WIN32        1    // 32-bit Windows platforms
  158. #define OS_WIN32S       1    // 32-bit subset Windows platforms
  159. #if OS_WIN16 || OS_WIN32 || OS_WIN32S
  160. #define OS_WINXXX    1    // defined on all Windows platforms
  161. #endif
  162.  
  163. // Target CPU (#define *one* of the following)
  164.  
  165. #define _CPU_I86        1    // On Intel i86 platforms
  166. #define _CPU_M68        1       // On Motorola 680x0 platforms
  167. #define _CPU_ALPHA       1    // On DEC Alpha platforms
  168. #define _CPU_MIPS        1    // On MIPS platforms
  169. #define _CPU_PPC         1    // On Motorola/IBM PowerPC platforms
  170. #define _CPU_SPARC       1    // On Sparc platforms
  171.  
  172. // Describe endianity (there are no provisions for mixed-endianity)
  173. // by #defining *one* of the following:
  174.  
  175. #define _LENDIAN        1    // Little endian (LSB at lowest address)
  176. #define _BENDIAN        1    // Big endian (LSB at highest address)
  177.  
  178. // If a NULL pointer is represented as an all-0 bit pattern, define this:
  179.  
  180. #define _NULL_IS_0      1
  181.  
  182. #endif  // _TLX_COMPILER_H
  183.