]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/platform.h
3 * Purpose: define the OS and compiler identification macros
4 * Author: Vadim Zeitlin
6 * Created: 29.10.01 (extracted from wx/defs.h)
8 * Copyright: (c) 1997-2001 wxWindows team
9 * Licence: wxWindows license
12 /* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */
14 #ifndef _WX_PLATFORM_H_
15 #define _WX_PLATFORM_H_
18 first define Windows symbols if they're not defined on the command line: we
19 can autodetect everything we need if _WIN32 is defined
21 #if defined(_WIN32) || defined(WIN32) || defined(__NT__)
30 /* Win95 means Win95-style UI, i.e. Win9x/NT 4+ */
31 #if !defined(__WIN95__) && defined(WINVER) && (WINVER >= 0x0400)
36 #if defined(__WXMSW__) || defined(__WIN32__)
37 #if !defined(__WINDOWS__)
54 #if defined(TWIN32) && !defined(__TWIN32__)
59 Include wx/setup.h for the Unix platform defines generated by configure and
60 the library compilation options
64 /* check the consistency of the settings in setup.h */
65 #include "wx/chkconf.h"
68 old C++ headers (like <iostream.h>) declare classes in the global namespace
69 while the new, standard ones (like <iostream>) do it in std:: namespace
71 using this macro allows constuctions like "wxSTD iostream" to work in
81 OS: first test for generic Unix defines, then for particular flavours and
82 finally for Unix-like systems
84 #if defined(__UNIX__) || defined(__unix) || defined(__unix__) || \
85 defined(____SVR4____) || defined(__LINUX__) || defined(__sgi) || \
86 defined(__hpux) || defined(sun) || defined(__SUN__) || defined(_AIX) || \
87 defined(__EMX__) || defined(__VMS) || defined(__BEOS__)
91 /* Helps SGI compilation, apparently */
94 #define __need_wchar_t
97 Note I use the term __SGI_CC__ for both cc and CC, its not a good
98 idea to mix gcc and cc/CC, the name mangling is different
101 #endif /* gcc/!gcc */
104 #if defined(sun) || defined(__SUN__)
113 #define OS2EMX_PLAIN_CHAR
116 /* define __HPUX__ for HP-UX where standard macro is __hpux */
117 #if defined(__hpux) && !defined(__HPUX__)
121 #if defined(__WXMAC__) && defined(__DARWIN__)
125 Some code has been added to workaround defects(?) in the
126 bundled gcc compiler. These corrections are identified by:
127 __DARWIN__ for corrections necessary for Darwin (wxMac, wxMotif)
130 #include <Carbon/Carbon.h>
131 #endif /* __WXMAC__ && __DARWIN__ */
133 #if defined(__CYGWIN__)
134 #if !defined(wxSIZE_T_IS_UINT)
135 #define wxSIZE_T_IS_UINT
138 #elif defined(applec) || \
139 defined(THINK_C) || \
140 (defined(__MWERKS__) && !defined(__INTEL__))
142 #elif defined(__WXMAC__) && defined(__DARWIN__)
144 #define __UNIX_LIKE__
147 Some code has been added to workaround defects(?) in the
148 bundled gcc compiler. These corrections are identified by:
149 __DARWIN__ for corrections necessary for Darwin (wxMac, wxMotif)
152 #include <Carbon/Carbon.h>
153 #elif defined(__OS2__)
154 #if defined(__IBMCPP__)
155 #define __VISAGEAVER__ __IBMCPP__
164 /* Place other OS/2 compiler environment defines here */
165 #if defined(__VISAGECPP__)
166 /* VisualAge is the only thing that understands _Optlink */
167 #define LINKAGEMODE _Optlink
169 #define wxSIZE_T_IS_UINT
171 #elif defined(__DOS__)
172 /* size_t is the same as unsigned int for Watcom 11 compiler, */
173 /* so define it if it hadn't been done by configure yet */
174 #if !defined(wxSIZE_T_IS_UINT) && !defined(wxSIZE_T_IS_ULONG)
175 #define wxSIZE_T_IS_UINT
182 /* to be changed for Win64! */
188 define another standard symbol for Microsoft Visual C++: the standard
189 one (_MSC_VER) is also defined by Metrowerks compiler
191 #if defined(_MSC_VER) && !defined(__MWERKS__)
192 #define __VISUALC__ _MSC_VER
193 #elif defined(__BCPLUSPLUS__) && !defined(__BORLANDC__)
195 #elif defined(__WATCOMC__)
196 #elif defined(__SC__)
197 #define __SYMANTECC__
198 #endif /* compiler */
200 /* size_t is the same as unsigned int for all Windows compilers we know, */
201 /* so define it if it hadn't been done by configure yet */
202 #if !defined(wxSIZE_T_IS_UINT) && !defined(wxSIZE_T_IS_ULONG)
203 #define wxSIZE_T_IS_UINT
208 if we're on a Unix system but didn't use configure (so that setup.h didn't
209 define __UNIX__), do define __UNIX__ now
211 #if !defined(__UNIX__) && defined(__UNIX_LIKE__)
215 #if defined(__HPUX__) && !defined(__WXGTK__)
218 #endif /* __WXMOTIF__ */
221 #if defined(__WXMOTIF__)
226 This macro can be used to check that the version of mingw32 compiler is
229 #if defined( __GNUWIN32__ ) || defined( __MINGW32__ ) || defined( __CYGWIN__ )
230 #include "wx/msw/gccpriv.h"
232 #undef wxCHECK_W32API_VERSION
233 #define wxCHECK_W32API_VERSION(maj, min) (0)
236 #endif /* _WX_PLATFORM_H_ */