home *** CD-ROM | disk | FTP | other *** search
- #ifndef __RWCOMPILER_H__
- #define __RWCOMPILER_H__
- pragma push_align_members(64);
-
- /*
- * Compiler and system related foibles and directives
- *
- * $Header: E:/vcs/rw/compiler.h_v 1.10 24 Mar 1992 19:43:08 KEFFER $
- *
- ****************************************************************************
- *
- * Rogue Wave
- * P.O. Box 2328
- * Corvallis, OR 97339
- * Voice: (503) 754-3010 FAX: (503) 757-6650
- *
- * Copyright (C) 1989, 1990, 1991. This software is subject to copyright
- * protection under the laws of the United States and other countries.
- *
- ***************************************************************************
- *
- * This file depends on a manifest constant having been defined
- * for your compiler. Most compilers have one built in.
- * For others, you will have to supply one by using a -D flag:
- *
- * AT&T Version 1.2: -D__ATT1__
- * AT&T Version 2.X: -D__ATT2__
- * AT&T Version 3.X: -D__ATT3__
- * Glockenspiel: -D__GLOCK__
- * Oregon (early versions only): -D__OREGON__
- *
- */
-
- /*********************************************************************
-
- U S E R T U N A B L E S E C T I O N
-
- *********************************************************************/
-
- /****
- **** This section has various parameters that you might
- **** have to set depending on your compiler and operating system.
- ****/
-
- /*
- * Uncomment the following if your "C" (not C++) compiler understands
- * K&R style prototypes only. The most common situation is Unix machines
- * using non-ANSI "C" compilers.
- */
-
- /* #define KR_ONLY 1 */
-
-
- /*
- * Uncomment the following if your compiler does not have ANSI compliant
- * header files. In particular, you will have to do this if the prototype
- * for function memcpy() is found in <memory.h> on your machine, rather
- * than <string.h> (which is required by ANSI).
- */
-
- /* #define NON_ANSI_HEADERS 1 */
-
-
-
- /*
- * You may have to uncomment one of the following. Most modern
- * "merged" versions of Unix are not very fussy about System V versus
- * Berkeley style functions and so you may not have to do anything.
- */
-
- /* #define SYSV 1 */ /* For System V Unix */
- /* #define BSD 1 */ /* For Berkeley Unix */
- /* #define __MSDOS__ 1 */ /* For MS-DOS (You will probably have to do nothing --- most compilers already define this) */
-
-
- /*
- * Uncomment the following if your compiler has trouble with
- * base class access adjustments using the "::baseFunctionName;"
- * construct (early versions of cfront ca. Summer '89):
- */
-
- /* #define NO_ACCESS_ADJUSTMENT 1 */
-
-
- /*
- * Uncomment the following if your compiler is using Microsoft C
- * as a backend (e.g., Glockenspiel under MS-DOS).
- */
-
- /* #define MSC_BACKEND 1 */
-
-
- /*
- * Uncomment the following if your compiler is V2.1 compiliant.
- * For most compilers, it is not necessary to do anything --- this can be
- * auto-detected.
- */
-
- /* #define CPPV21 1 */
-
-
-
- /*
- * Uncomment the following if your compiler supports inlined 80x86 assembly.
- * For most compilers it is not necessary to do anything --- this can be
- * auto-detected.
- */
-
- /* #define INLINE86_ASSEMBLY 1 */
-
- /*************************************************************************
- **************************************************************************
- ** **
- ** From here on, it's pretty much boilerplate **
- ** and rarely requires any tuning. **
- ** **
- **************************************************************************
- **************************************************************************/
-
-
- /************************ Cfront derivatives ******************************/
-
- /* Any of these defines a cfront style compiler: */
- #if defined(__ATT1__) || defined(__ATT2__) || defined(__ATT3__)
-
- # define __ATT__ 1
-
- # if defined(__ATT3__)
- # define HAS_TEMPLATES 1
- # define GROKS_TEMPLATE_TYPEDEF 1
- # endif
-
- #endif
-
- /****************** Various Glockenspiel foibles. ***********************/
-
- #if defined(__GLOCK__)
-
- # if !defined(__ATT__)
- /* If we haven't been told differently,
- assume Glock folks have a V2.X cfront compiler */
- # define __ATT2__ 1
- # define __ATT__ 1
- # endif
-
- /*
- * We assume that if the Glock folks are running under MS-DOS,
- * then they're using Microsoft C as the backend:
- */
- # if defined(__MSDOS__) && !defined(MSC_BACKEND)
- # define MSC_BACKEND 1
- # endif
-
- /* Glock has bug in base class access adjustments: */
- # ifndef NO_ACCESS_ADJUSTMENT
- # define NO_ACCESS_ADJUSTMENT 1
- # endif
-
- /* Glock emits "const structs", then attempts to assign to them: */
- # define CONST_EMIT_BUG 1
-
- /*
- * Glockenspiel was too lazy to provide type-safe linkage include
- * files, preferring to use the backend C compiler include files.
- * These require a "C" wrapper:
- */
- # ifdef __cplusplus
- # define STARTWRAP extern "C" {
- # define ENDWRAP }
- # endif
-
- #else /* Not Glock */
-
- # define STARTWRAP
- # define ENDWRAP
-
- #endif
-
- /********************** Various Zortech foibles **************************/
-
- #if defined(__ZTC__)
-
- /* Define __MSDOS__ for Zortech. */
- # if !defined(__MSDOS__)
- # define __MSDOS__ 1
- # endif
-
- /* Zortech has a type conversion bug: */
- # define ZTC_TYPE_CONVERSION_BUG 1
-
- /* Zortech takes "constness" too literally: */
- # define PARANOID_CONST_BUG 1
-
- #endif
-
- /********************** Borland's Turbo C++ **************************/
-
- #if defined(__TURBOC__)
-
- /*
- * Turbo and Borland won't inline code that contains
- * "while" or "for" loops or that generates temporaries
- * requiring destructors:
- */
- # define NO_INLINED_WHILES 1
- # define NO_INLINED_FORS 1
- # define NO_INLINED_TEMP_DESTRUCTORS 1
-
- /* The Borland compilers left out this definition: */
- # define name2 _Paste2
-
- /* Turbo C++ V1.00 forgets the segment address when passing
- a class as a far reference if the class has not been defined. */
- # if __TURBOC__ <= 0x0295
- # define UNDEFINED_REFERENCE_BUG 1
- # endif
-
- # if __TURBOC__ >=0x200
-
- /*
- * Borland C++ and later Turbo C++ have inlined assembly. So do
- * earlier Turbo C++ *professional* versions.
- * In this case, you should uncomment the
- * #define INLINE86_ASSEMBLY directive near the top of this file.
- * No harm done if you don't: things will just be slower.
- */
- # define INLINE86_ASSEMBLY 1
-
- /*
- * Borland C++ Version 2.0:
- * Calls destructor of temporaries in inlines of inlines incorrectly.
- * Increments pointer to structs incorrectly.
- * Passes the wrong size to an overloaded delete
- */
- # if __TURBOC__ < 0x300
- # define BCC_INLINE_DESTRUCTOR_BUG 1
- # define BCC_STRUCT_POINTER_BUG 1
- # define TCC_DELETE_SIZE_BUG 1
- # endif /* end Borland C++ V2.0 */
-
- /*
- * Borland C++ V3.0 and Turbo C++ V3.0
- * Uses V2.1 style scoping and templates.
- */
- # if __TURBOC__ >= 0x400
- # if !defined(CPPV21)
- # define CPPV21 1
- # endif
- # define HAS_TEMPLATES 1
- # endif /* end Borland C++ V3.0 */
-
- # endif /* end post Turbo C++ V1.01 section */
-
- #endif /* __TURBOC__ */
-
- /************************ Microsoft C/C++ *****************************/
-
- #if defined(_MSC_VER)
- # if !defined(MSC_BACKEND)
- # define MSC_BACKEND 1
- # endif
- # if !defined(CPPV21)
- # define CPPV21 1
- # endif
- #endif
-
- /********************** Oregon Software C++ ***************************/
-
- #if defined(_OREGON_) && !defined(__OREGON__)
- /* Early version of Oregon use single underscore: */
- # define __OREGON__ _OREGON_
- #endif
-
- /************************* Saber C++ **********************************/
-
- #if defined(__SABER_CXX__) && !defined(NO_ACCESS_ADJUSTMENT)
- # define NO_ACCESS_ADJUSTMENT 1
- #endif
-
- /********************** MetaWare High C/C++ *********************************/
-
- #ifdef __HIGHC__
- # ifndef CPPV21
- # define CPPV21 1
- # endif
- #endif
-
- /********************** Miscellaneous *********************************/
-
- #if defined(MSDOS) && !defined(__MSDOS__)
- # define __MSDOS__ 1
- #endif
-
- #if defined(sun) && !defined(BSD)
- # define BSD 1
- #endif
-
- #if (defined(SYSV) || defined(BSD)) && !defined(unix)
- # define unix 1
- #endif
-
- #ifdef CPPV21
- # define SCOPE_NESTED_ENUMS 1
- # define RWSCOPE(a) a::
- #else
- # define RWSCOPE(a)
- #endif
-
- /* No Pi for these compilers: */
- #if defined(MSC_BACKEND) || defined(__OREGON__)
- # ifndef M_PI
- # define M_PI 3.14159265358979323846
- # endif
- #endif
-
- /*
- * These compilers allow a reference to be recast to something
- * else.
- */
- #if defined(__TURBOC__) || defined(__ZTC__)
- # define HAS_CAST_TO_REFERENCE 1
- #endif
-
- #ifndef NON_ANSI_HEADERS
- /* Thanks to Mike Lueke of TauMetric for this elegant test... */
- # include <limits.h>
- # if (CHAR_MIN==0) && !(__HIGHC__)
- /* A formal argument of type "char" will exactly match
- a formal argument of type "unsigned char". */
- # define CHAR_MATCHES_UCHAR 1
- # endif
- #endif
-
- /*
- * All compilers except Zortech allow overloading on the "const" modifier.
- * Zortech V3.0 does, but it still doesn't work for the most common case: operator().
- */
- #ifndef __ZTC__
- # define CONST_OVERLOADS 1
- #endif
-
- /*
- * All compilers except early Zortech have iostreams:
- */
- #if !defined(__ZTC__) || (__ZTC__ >= 0x300)
- # define HAS_IOSTREAMS 1
- #endif
-
- /*
- * All known compilers have old-style streams:
- */
- #define HAS_STREAMS 1
-
- /*
- * Most (but not all) non-unix systems convert new line to carriage
- * return / line feed on output:
- */
- #if !defined(unix)
- # define CRLF_CONVENTION 1
- #endif
-
- /* These compilers have useful speedup functions: */
- #if defined(__TURBOC__) || defined(__ZTC__) || defined(MSC_BACKEND)
- # define HAS_STRICMP 1 /* stricmp(): case-insensitive search */
- # define HAS_STRNICMP 1 /* strnicmp(): case-insensitive limited search */
- # define HAS_MEMMOVE 1 /* memmove(): potentially overlapping copy */
- #endif
-
- /*
- * $Log: E:/vcs/rw/compiler.h_v $
- *
- * Rev 1.10 24 Mar 1992 19:43:08 KEFFER
- * Ported to MetaWare High C.
- *
- * Rev 1.9 18 Mar 1992 11:27:38 KEFFER
- * Ported to Turbo C++ V3.0
- *
- * Rev 1.8 17 Mar 1992 11:36:00 KEFFER
- * MS-DOS hacks now done in defs.h.
- *
- * Rev 1.7 21 Feb 1992 12:30:08 KEFFER
- * Added support for Microsoft C/C++ V7.0
- *
- * Rev 1.6 13 Nov 1991 11:08:48 keffer
- * DLL directives now put in a separate header file.
- *
- * Rev 1.5 17 Oct 1991 09:13:00 keffer
- * Changed include path to <rw/xxx.h>
- *
- * Rev 1.3 24 Sep 1991 18:57:24 keffer
- * Updated for Zortech V3.0
- *
- * Rev 1.2 02 Sep 1991 11:54:42 keffer
- * Added INLINE86_ASSEMBLY directive
- *
- */
-
- pragma pop_align_members();
- #endif /* __RWCOMPILER_H__ */
-