home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
tvos200.zip
/
CPL
/
COMPILER.H
< prev
next >
Wrap
C/C++ Source or Header
|
1995-04-25
|
5KB
|
208 lines
/*
* compiler.h: Shared compiler includes for the appropriate OS & compiler.
* =======================================================================
*
* $Header: z:/apl/compiler.h_V 1.6 93/05/17 12:57:54 JAL Exp $
*
* Revision log:
* -------------
* $Log: compiler.h_V $
* Revision 1.6 93/05/17 12:57:54 JAL
* Added the Borland C++/2 1.0 32-bits compiler.
*
* Revision 1.5 92/08/24 14:36:09 JAL
* Changed heavily to support the 32-bits OS/2 compiler. Also changed the
* support for more'n one operating system.
*
* Revision 1.4 92/06/11 09:54:11 JAL
* Added defines for FOPEN mode (FOPEN_xx) to support 32-bits compiler.
*
* Revision 1.3 92/03/11 15:04:25 JAL
* Again: added #defines for models, but now with names starting with
* M_ to prevent trouble with the compiler's header files.
*
* Revision 1.2 92/03/11 14:59:12 JAL
* Added #defines for model keywords (far, near, cdecl etc).
*
* Revision 1.1 91/10/21 14:36:53 JAL
* Initial revision
*
*
*
*/
#ifndef __cpl_compiler_h
#define __cpl_compiler_h
#if defined(__ICC__)
/****************************************************************************/
/* */
/* IBM C Set/2 compiler (32-bits). */
/* */
/****************************************************************************/
# if !defined(__32BITS__)
# define __32BITS__ 1
# endif
#define M_FAR
#define M_NEAR
#define M_HUGE
#define M_CDECL
#define M_PASCAL
#define M_REGCALL
#define FOPEN_RT "r"
#define FOPEN_RB "rb"
#define FOPEN_WT "w"
#define FOPEN_WB "wb"
#define VER_COMPILER "IBM C Set++"
#include <cpl/iccstub.h> // Turbo C to CSET/2 file
#define CPL_DOWNCAST(type,ptr) ( (type) (ptr) )
#elif defined(__BORLANDC__) && defined(__MSDOS__)
/****************************************************************************/
/* */
/* Borland C++ 3.1 MS/DOS header files & compiler dependent stuff... */
/* */
/****************************************************************************/
#define M_FAR far
#define M_NEAR near
#define M_HUGE huge
#define M_CDECL cdecl
#define M_PASCAL pascal
#define M_REGCALL
#define FOPEN_RT "rt"
#define FOPEN_RB "rb"
#define FOPEN_WT "wt"
#define FOPEN_WB "wb"
#define VER_COMPILER "BC++ 3.1"
#define CPL_DOWNCAST(type,ptr) ( (type) (ptr) )
#include <cpl/tcstub.h>
#elif defined(__TURBOC__) && defined(__OS2__)
/****************************************************************************/
/* */
/* Borland C++/2 for OS/2... 32-bits... */
/* */
/****************************************************************************/
# if !defined(__32BITS__)
# define __32BITS__ 1
# endif
#define M_FAR
#define M_NEAR
#define M_HUGE
#define M_CDECL
#define M_PASCAL
#define M_REGCALL
#define FOPEN_RT "rt"
#define FOPEN_RB "rb"
#define FOPEN_WT "wt"
#define FOPEN_WB "wb"
#define VER_COMPILER "BC++/2 1.0"
#define CPL_DOWNCAST(type,ptr) dynamic_cast<type>(ptr)
#include <cpl/b2stub.h>
#elif defined(__GNUC__) && defined(__OS2__)
/****************************************************************************/
/* */
/* EMX 0.8f GNU CC 2.3.3 for Os/2. */
/* */
/****************************************************************************/
# if !defined(__32BITS__)
# define __32BITS__ 1
# endif
#define M_FAR
#define M_NEAR
#define M_HUGE
#define M_CDECL
#define M_PASCAL
#define M_REGCALL
#define FOPEN_RT "rt"
#define FOPEN_RB "rb"
#define FOPEN_WT "wt"
#define FOPEN_WB "wb"
#define VER_COMPILER "Gnu 2.3.3"
#define CPL_DOWNCAST(type,ptr) ( (type) (ptr) )
// #include <cpl/b2stub.h>
/****************************************************************************/
/* */
/* CODING: WATCOM 10.0a compiler for DOS, OS/2, Windows and the like */
/* */
/****************************************************************************/
#elif defined(__WATCOMC__)
# if defined(__OS2__) // OS/2 target selected?
# if defined(__FLAT__) // Is 32-bits OS/2?
# if !defined(__32BITS__)
# define __32BITS__ 1
# endif // 32BITS
# define M_FAR
# define M_NEAR
# define M_HUGE
# define M_CDECL
# define M_PASCAL
# define M_REGCALL
# endif //__FLAT__
# include <cpl/watstub.h>
# endif // __OS2__
#define FOPEN_RT "rt"
#define FOPEN_RB "rb"
#define FOPEN_WT "wt"
#define FOPEN_WB "wb"
#define VER_COMPILER "WatCOM 10.0a"
#define CPL_DOWNCAST(type,ptr) ( (type) (ptr) )
#else
#error "Undefined COMPILER"
#endif
#endif
#ifdef __OS2__
# ifdef __32BITS__
# define VER_OS "OS/2-32"
# else
# define VER_OS "OS/2-16"
# endif
#elif defined(__MSDOS__)
# define VER_OS "MS/DOS"
#elif defined(__NT__)
# define VER_OS "WinNT"
#else
# error "Compiling for UNKNOWN operating system (must be OS/2 or MS/DOS)"
#endif