home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / borhead.zip / _DEFS.H next >
Text File  |  1994-11-09  |  3KB  |  95 lines

  1. /*  _defs.h
  2.  
  3.     Common definitions for pointer size and calling conventions.
  4.  
  5.     Calling conventions:
  6.     _RTLENTRY       Specifies the calling convention used by the RTL
  7.  
  8.     _USERENTRY      Specifies the calling convention the RTL expects user
  9.                     compiled functions to use (for callbacks)
  10.  
  11.     Export (and size for DOS) information:
  12.     _EXPCLASS       Exports class if building DLL version of library
  13.                     For DOS16 also provides size information
  14.  
  15.     _EXPDATA        Exports data if building DLL version of library
  16.  
  17.     _EXPFUNC        Exports function if building DLL version of library
  18.                     For DOS16 also provides size information
  19.  
  20.     _FAR            Promotes data pointers to far in DLLs (DOS16 only)
  21.  
  22.     Obsolete versions:
  23.     _Cdecl          Use _RTLENTRY
  24.     _CLASSTYPE      Use _EXPCLASS
  25.     _FARFUNC        Use _EXPFUNC
  26.     _FARCALL        Use _EXPFUNC and declare function explicity __far
  27. */
  28.  
  29. /*
  30.  *      C/C++ Run Time Library - Version 1.5
  31.  *
  32.  *      Copyright (c) 1991, 1994 by Borland International
  33.  *      All Rights Reserved.
  34.  *
  35.  */
  36.  
  37. #if !defined(___DEFS_H)
  38. #define ___DEFS_H
  39.  
  40. #if defined(__MT__)
  41. #    define _MT
  42. #endif
  43.  
  44. #    define _RTLENTRY  __stdcall
  45. #    define _USERENTRY __stdcall
  46.  
  47. #if defined(__PAS__)
  48. #    define _RTLENTRYF __pascal
  49. #else
  50. #    define _RTLENTRYF _RTLENTRY
  51. #endif
  52.  
  53. #   define _FAR
  54. #   if defined(_BUILDRTLDLL)
  55. #       define _EXPCLASS  __export
  56. #       define _EXPDATA   __export
  57. #       define _EXPFUNC   __export
  58. #   else
  59. #       define _EXPCLASS
  60. #       define _EXPDATA
  61. #       define _EXPFUNC
  62. #   endif
  63.  
  64.  
  65. #define _EXPFUNC32  _EXPFUNC
  66. #define _EXPFUNC16
  67.  
  68.  
  69. #define _Cdecl      _RTLENTRY
  70. #define _CType      _RTLENTRYF
  71. #define _CLASSTYPE  _EXPCLASS
  72. #define _FARFUNC    _EXPFUNC
  73. #define _FARCALL    _EXPFUNC __far
  74.  
  75. #  define _M_IX86 300
  76.  
  77.  
  78. #if defined(__cplusplus)
  79. #   define _PTRDEF(name) typedef name _FAR * P##name;
  80. #   define _REFDEF(name) typedef name _FAR & R##name;
  81. #   define _REFPTRDEF(name) typedef name _FAR * _FAR & RP##name;
  82. #   define _PTRCONSTDEF(name) typedef const name _FAR * PC##name;
  83. #   define _REFCONSTDEF(name) typedef const name _FAR & RC##name;
  84.  
  85. /*********** Obsolete definitions for OWL 1.0 *************/
  86. #   define _CLASSDEF(name) class _EXPCLASS name; \
  87.            _PTRDEF(name) \
  88.            _REFDEF(name) \
  89.            _REFPTRDEF(name) \
  90.            _PTRCONSTDEF(name) \
  91.            _REFCONSTDEF(name)
  92. #endif
  93.  
  94. #endif  /* ___DEFS_H */
  95.