OWLNext    7.0
Borland's Object Windows Library for the modern age
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
msc.h
Go to the documentation of this file.
1//----------------------------------------------------------------------------
2// ObjectWindows
3// Copyright (c) 1995, 1996 by Borland International, All Rights Reserved
4//
5// Compiler-specific defines for Microsoft Visual C/C++. Included only by
6// defs.h
7//
8//----------------------------------------------------------------------------
9#if !defined(OWL_PRIVATE_MSC_H)
10#define OWL_PRIVATE_MSC_H
11
12#pragma once
13
14//
15// Specific name of compiler, BI_COMP_xxxx
16//
17#define BI_COMP_MSC
18
19#if !defined(__FLAT__)
20# define __FLAT__
21#endif
22
23//
24// Define library-wide function calling conventions. Must rebuild everything
25// if changed, and must use appropriate modifier on derived classes.
26//
27
28#if !defined(_CCONV)
29# define _CCONV __cdecl
30#endif
31
32//
33// Only enable multi-thread classes when the OS supports them, and/or when the
34// runtime library support them
35//
36#define BI_MULTI_THREAD
37
38// if RTLDLL we must been multitreaded
39#if defined(_MT) || defined(BI_APP_DLL)
40# define BI_MULTI_THREAD_RTL
41#endif
42
43//
44// Compiler-specific macros
45//
46
47#define _RTLENTRY
48#define _USERENTRY
49#define _EXPCLASS _CRTIMP
50#define _EXPDATA _CRTIMP
51#define _EXPFUNC _CRTIMP
52
53#ifdef _MBCS
54# if !defined(BI_DBCS_SUPPORT)
55# define BI_DBCS_SUPPORT
56# endif
57#endif //_MBCS
58
59#if defined(BI_DBCS_SUPPORT)
60# if !defined(_MBCS)
61# define _MBCS
62# endif
63#endif
64
65#if defined(OWL5_COMPAT) && !defined(UNICODE) && defined(_M_IX86)
66#define OWL_SUPPORT_BWCC
67#define OWL_SUPPORT_CTL3D
68#endif
69
70
71//
72// C++ language features (see "defs.h" for preprocessor symbol descriptions)
73//
74// Language feature: Description SERVICES header
75// ~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~
76#define BI_GLOBALNM_BUG // Global namespace bug in function member int mfunc(int name = ::someName);
77#define BI_NOTEMPLATE_H // No include <owl/template.h>
78
79#if !defined(_CPPRTTI)
80# error You have to enable RTTI support.
81#endif
82#define _RTTI // without __rtti keyword
83
84#if !defined(_CPPUNWIND)
85# error You have to enable exception support.
86#endif
87
88#define BI_NO_LVAL_CASTS // Can cast lvalues
89#define BI_VIRTUAL_BUG //problem when derived class add virtual table
90#define BI_TYPECASTOPERATOR_BUG // problem with type cast operator
91#define BI_HAS_PRAGMA_ONCE
92
93//
94// C++ library features
95//
96
97#define BI_STDIO_CTRFILE
98
99//
100// Misc
101//
102
103#define OWL_BREAK {__debugbreak();}
104#define BI_OWL_PACKING 8
105
106#if !defined(_BUILDOWLDLL)
107# include <owl/private/owllink.h>
108#endif
109
110#define OWL_OUTPUT_DEBUG_STRING(lpsz) ::OutputDebugString(lpsz)
111
112//
113// Disable some MSC warnings, & move some to level 4 since they really are OK
114// TODO: Should not disable warnings in public headers; ideally rewrite the affected code.
115// If that's not feasable, then disable warnings permanently only in source files, and
116// use warning(push/pop) in headers to temporarily turn warnings off for the relevant code.
117//
118
119#pragma warning(disable:4068) // unknown pragma, compiler should ignore
120#pragma warning(disable:4250) // inherits <base> via dominance
121#pragma warning(disable:4251) // class 'type' needs to have dll-interface to be used by clients of class 'type2'
122#pragma warning(disable:4293) // disable warning new in default argument will not free memory
123#pragma warning(disable:4800) // disable warning forsing value to bool
124//#pragma warning(disable:4003) // not enough actual parameters for macro
125#pragma warning(disable:4275) // non dll-interface class used as base for dll-interface class
126//#pragma warning(disable:4243) // type cast conversion from '' to '' exists, but is inaccessible
127#pragma warning(disable:4355) // 'this' used in base member initializer list
128#pragma warning(disable:4273) // 'identifier' : inconsistent DLL linkage. dllexport assumed
129#pragma warning(disable:4786) // 'identifier' : identifier was truncated to 'number' characters in the debug information
130
131/*
132#pragma warning(disable:4514) // unreferenced inline, compiler internal noise
133#pragma warning(disable:4201) // complains about valid anonymouse unions!
134#pragma warning(disable:4238) // nonstandard extension used : class rvalue used as lvalue
135#pragma warning(disable:4290) // no warning about ignoring throw specification
136#pragma warning(disable:4511) // 'class' : copy constructor could not be generated
137#pragma warning(disable:4512) // 'class' : assignment operator could not be generated
138#pragma warning(disable:4516) // 'class::symbol' : access-declarations are deprecated; member using-declarations provide a better alternative
139*/
140
141
142//
143// Turn off reference tracking for certain often used symbols
144//
145
146#pragma component(browser, off, references, "CHECK")
147#pragma component(browser, off, references, "CHECKX")
148#pragma component(browser, off, references, "TRACE")
149#pragma component(browser, off, references, "TRACEX")
150#pragma component(browser, off, references, "PRECONDITION")
151#pragma component(browser, off, references, "PRECONDITIONX")
152#pragma component(browser, off, references, "uint8")
153#pragma component(browser, off, references, "int8")
154#pragma component(browser, off, references, "uint16")
155#pragma component(browser, off, references, "int16")
156#pragma component(browser, off, references, "unit32")
157#pragma component(browser, off, references, "int32")
158#pragma component(browser, off, references, "uint")
159#pragma component(browser, off, references, "LPSTR")
160#pragma component(browser, off, references, "LPTSTR")
161#pragma component(browser, off, references, "LPCSTR")
162#pragma component(browser, off, references, "LPCTSTR")
163#pragma component(browser, off, references, "NULL")
164#pragma component(browser, off, references, "WINAPI")
165#pragma component(browser, off, references, "_OWLCLASS")
166#pragma component(browser, off, references, "_OWLFUNC")
167#pragma component(browser, off, references, "_OWLDATA")
168
169
170#endif // OWL_PRIVATE_MSC_H