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

  1. /****************************************************************************
  2.     $Id: microsof.h 501.0 1995/03/07 12:26:44 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.     Microsoft-specific declarations of compilation and keyword-like names.
  10.  
  11.     $Log: microsof.h $
  12.     Revision 501.0  1995/03/07 12:26:44  RON
  13.     Updated for TLX 5.01
  14.     Revision 1.5  1995/01/31 16:32:12  RON
  15.     Update for release 012
  16.     Added partial support for SunPro C++ compiler
  17.     Revision 1.4  1994/11/16  15:22:38  ron
  18.     Added _CCNAME, _CCVER, and _MODEL definitions
  19.  
  20.     Revision 1.3  1994/10/06  17:48:36  ron
  21.     Added _NOMUTABLE
  22.  
  23.     Revision 1.2  1994/09/08  15:53:59  ron
  24.     Moved O/S-specific macros into this file
  25.  
  26.     Revision 1.1  1994/08/16  18:06:49  ron
  27.     Initial revision
  28.  
  29. ****************************************************************************/
  30.  
  31. #ifndef _TLX_MICROSOF_H
  32. #define _TLX_MICROSOF_H
  33.  
  34. #ifndef _MSC_VER
  35. #error This file is for Microsoft compilations only
  36. #endif
  37.  
  38. #define _CCNAME        Microsoft C++
  39. #define _CCVER        _MSC_VER
  40.  
  41. #ifdef _DLL
  42.     #define _IN_DLL     1
  43. #endif
  44.  
  45. #if _MSC_VER < 1000
  46. #error TLX 5.0 requires C++ template support
  47. #define _NORTTI        1
  48. #define _NOEXCEPT    1
  49. #define _NOBOOL        1
  50. #define _NOMUTABLE    1
  51. #elif _MSC_VER < 1020
  52. #define _NOBOOL        1
  53. #define _NOMUTABLE    1
  54. #pragma warning(disable:4237)    /* Non-standard 'bool' etc. extension */
  55. #else
  56. #define _NOMUTABLE    1
  57. #pragma warning(disable:4237)    /* Non-standard 'bool' etc. extension */
  58. #endif
  59.  
  60. #ifdef _WIN32            /* Non-segmented platforms */
  61.  
  62.     #define _Near
  63.     #define _Far
  64.     #define _Huge
  65.     #define _MODEL        Flat
  66.  
  67.     #define _ExportClass        __export
  68.     #define _ExportFunc         __export
  69.     #define _ExportData         __export
  70.  
  71.     #define _ImportClass    __import
  72.     #define _ImportFunc        __import
  73.     #define _ImportData        __import
  74.  
  75. #else                           /* Segmented memory architectures */
  76.  
  77.     #define _Near               _near
  78.     #define _Far                _far
  79.     #define _Huge               _huge
  80.  
  81.     #define _ExportClass        __export
  82.     #define _ExportFunc         __export __far
  83.     #define _ExportData         __export __far
  84.  
  85.     #define _ImportClass        __huge
  86.     #define _ImportFunc         __far
  87.     #define _ImportData         __far
  88.  
  89.     #if defined(M_I86TM) || defined(M_I86SM)
  90.         #define _CODE_NEAR      1
  91.         #define _DATA_NEAR      1
  92.         #define _MODEL        Tiny/Small
  93.     #elif defined(M_I86CM)
  94.         #define _CODE_NEAR      1
  95.         #define _DATA_FAR       1
  96.         #define _MODEL        Compact
  97.     #elif defined(M_I86MM)
  98.         #define _DATA_NEAR      1
  99.         #define _CODE_FAR       1
  100.         #define _MODEL        Medium
  101.     #elif defined(M_I86LM) || defined(M_I86HM)
  102.         #define _CODE_FAR       1
  103.         #define _DATA_FAR       1
  104.         #define _MODEL        Flat
  105.     #else
  106.         #error Unknown Microsoft memory model
  107.     #endif
  108. #endif
  109.  
  110. #if defined(_WIN32)
  111.     #define OS_WIN32    1
  112.     #define OS_WINXXX   1
  113.     #define _CPU_I86    1
  114.     #define _LENDIAN    1
  115.     #define _NULL_IS_0  1
  116.     #define _MEM_FLAT   1
  117. #elif defined(_WINDOWS)
  118.     #define OS_WIN16    1
  119.     #define OS_WINXXX   1
  120.     #define _CPU_I86    1
  121.     #define _LENDIAN    1
  122.     #define _NULL_IS_0  1
  123.     #define _MEM_SEG    1
  124. #elif defined(_MSDOS)
  125.     #define OS_DOS      1
  126.     #define OS_DOSXXX   1
  127.     #define _CPU_I86    1
  128.     #define _LENDIAN    1
  129.     #define _NULL_IS_0  1
  130.     #define _MEM_SEG    1
  131. #elif defined(_MACINTOSH)
  132.     #define OS_MAC      1
  133.     #define _CPU_M68    1               // Might be PowerPC!
  134.     #define _BENDIAN    1
  135.     #define _NULL_IS_0  1
  136.     #define _MEM_FLAT   1
  137. #else
  138.     #error Unknown Microsoft compilation target
  139. #endif
  140.  
  141. #if 0
  142. /*---------------------------------------------------------------------------
  143.     Microsoft C/C++ 7.0/8.0 additional functions
  144. ---------------------------------------------------------------------------*/
  145.  
  146. #ifndef _VA_LIST_DEFINED
  147. typedef char *va_list;
  148. #define _VA_LIST_DEFINED
  149. #endif
  150.  
  151. int     _TLXFUNC vsscanf(const char *, const char *, va_list);
  152. #endif
  153.  
  154. #endif  /* _TLX_MICROSOF_H */
  155.