summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--qmake/include/qglobal.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/qmake/include/qglobal.h b/qmake/include/qglobal.h
index b7e919d..ce209fe 100644
--- a/qmake/include/qglobal.h
+++ b/qmake/include/qglobal.h
@@ -1,421 +1,429 @@
1/**************************************************************************** 1/****************************************************************************
2** 2**
3** 3**
4** Global type declarations and definitions 4** Global type declarations and definitions
5** 5**
6** Created : 920529 6** Created : 920529
7** 7**
8** Copyright (C) 1992-2003 Trolltech AS. All rights reserved. 8** Copyright (C) 1992-2003 Trolltech AS. All rights reserved.
9** 9**
10** This file is part of the tools module of the Qt GUI Toolkit. 10** This file is part of the tools module of the Qt GUI Toolkit.
11** 11**
12** This file may be distributed under the terms of the Q Public License 12** This file may be distributed under the terms of the Q Public License
13** as defined by Trolltech AS of Norway and appearing in the file 13** as defined by Trolltech AS of Norway and appearing in the file
14** LICENSE.QPL included in the packaging of this file. 14** LICENSE.QPL included in the packaging of this file.
15** 15**
16** This file may be distributed and/or modified under the terms of the 16** This file may be distributed and/or modified under the terms of the
17** GNU General Public License version 2 as published by the Free Software 17** GNU General Public License version 2 as published by the Free Software
18** Foundation and appearing in the file LICENSE.GPL included in the 18** Foundation and appearing in the file LICENSE.GPL included in the
19** packaging of this file. 19** packaging of this file.
20** 20**
21** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition 21** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
22** licenses may use this file in accordance with the Qt Commercial License 22** licenses may use this file in accordance with the Qt Commercial License
23** Agreement provided with the Software. 23** Agreement provided with the Software.
24** 24**
25** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 25** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
26** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 26** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
27** 27**
28** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for 28** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
29** information about Qt Commercial License Agreements. 29** information about Qt Commercial License Agreements.
30** See http://www.trolltech.com/qpl/ for QPL licensing information. 30** See http://www.trolltech.com/qpl/ for QPL licensing information.
31** See http://www.trolltech.com/gpl/ for GPL licensing information. 31** See http://www.trolltech.com/gpl/ for GPL licensing information.
32** 32**
33** Contact info@trolltech.com if any conditions of this licensing are 33** Contact info@trolltech.com if any conditions of this licensing are
34** not clear to you. 34** not clear to you.
35** 35**
36**********************************************************************/ 36**********************************************************************/
37 37
38#ifndef QGLOBAL_H 38#ifndef QGLOBAL_H
39#define QGLOBAL_H 39#define QGLOBAL_H
40 40
41#define QT_VERSION_STR "3.3.2" 41#define QT_VERSION_STR "3.3.2"
42/* 42/*
43 QT_VERSION is (major << 16) + (minor << 8) + patch. 43 QT_VERSION is (major << 16) + (minor << 8) + patch.
44 */ 44 */
45#define QT_VERSION 0x030302 45#define QT_VERSION 0x030302
46 46
47/* 47/*
48 The operating system, must be one of: (Q_OS_x) 48 The operating system, must be one of: (Q_OS_x)
49 49
50 MACX- Mac OS X 50 MACX- Mac OS X
51 MAC9- Mac OS 9 51 MAC9- Mac OS 9
52 DARWIN - Darwin OS (Without Mac OS X) 52 DARWIN - Darwin OS (Without Mac OS X)
53 MSDOS- MS-DOS and Windows 53 MSDOS- MS-DOS and Windows
54 OS2- OS/2 54 OS2- OS/2
55 OS2EMX- XFree86 on OS/2 (not PM) 55 OS2EMX- XFree86 on OS/2 (not PM)
56 WIN32- Win32 (Windows 95/98/ME and Windows NT/2000/XP) 56 WIN32- Win32 (Windows 95/98/ME and Windows NT/2000/XP)
57 CYGWIN- Cygwin 57 CYGWIN- Cygwin
58 SOLARIS- Sun Solaris 58 SOLARIS- Sun Solaris
59 HPUX- HP-UX 59 HPUX- HP-UX
60 ULTRIX- DEC Ultrix 60 ULTRIX- DEC Ultrix
61 LINUX- Linux 61 LINUX- Linux
62 FREEBSD- FreeBSD 62 FREEBSD- FreeBSD
63 NETBSD- NetBSD 63 NETBSD- NetBSD
64 OPENBSD- OpenBSD 64 OPENBSD- OpenBSD
65 BSDI- BSD/OS 65 BSDI- BSD/OS
66 IRIX- SGI Irix 66 IRIX- SGI Irix
67 OSF- HP Tru64 UNIX 67 OSF- HP Tru64 UNIX
68 SCO- SCO OpenServer 5 68 SCO- SCO OpenServer 5
69 UNIXWARE- UnixWare 7, Open UNIX 8 69 UNIXWARE- UnixWare 7, Open UNIX 8
70 AIX- AIX 70 AIX- AIX
71 HURD- GNU Hurd 71 HURD- GNU Hurd
72 DGUX- DG/UX 72 DGUX- DG/UX
73 RELIANT- Reliant UNIX 73 RELIANT- Reliant UNIX
74 DYNIX- DYNIX/ptx 74 DYNIX- DYNIX/ptx
75 QNX- QNX 75 QNX- QNX
76 QNX6- QNX RTP 6.1 76 QNX6- QNX RTP 6.1
77 LYNX- LynxOS 77 LYNX- LynxOS
78 BSD4- Any BSD 4.4 system 78 BSD4- Any BSD 4.4 system
79 UNIX- Any UNIX BSD/SYSV system 79 UNIX- Any UNIX BSD/SYSV system
80*/ 80*/
81 81
82#if defined(__DARWIN_X11__) 82#if defined(__DARWIN_X11__)
83# define Q_OS_DARWIN 83# define Q_OS_DARWIN
84#elif defined(__APPLE__) && defined(__GNUC__) 84#elif defined(__APPLE__) && defined(__GNUC__)
85# define Q_OS_MACX 85# define Q_OS_MACX
86#elif defined(__MACOSX__) 86#elif defined(__MACOSX__)
87# define Q_OS_MACX 87# define Q_OS_MACX
88#elif defined(macintosh) 88#elif defined(macintosh)
89# define Q_OS_MAC9 89# define Q_OS_MAC9
90#elif defined(__CYGWIN__) 90#elif defined(__CYGWIN__)
91# define Q_OS_CYGWIN 91# define Q_OS_CYGWIN
92#elif defined(MSDOS) || defined(_MSDOS) 92#elif defined(MSDOS) || defined(_MSDOS)
93# define Q_OS_MSDOS 93# define Q_OS_MSDOS
94#elif defined(__OS2__) 94#elif defined(__OS2__)
95# if defined(__EMX__) 95# if defined(__EMX__)
96# define Q_OS_OS2EMX 96# define Q_OS_OS2EMX
97# else 97# else
98# define Q_OS_OS2 98# define Q_OS_OS2
99# endif 99# endif
100#elif !defined(SAG_COM) && (defined(WIN64) || defined(_WIN64) || defined(__WIN64__)) 100#elif !defined(SAG_COM) && (defined(WIN64) || defined(_WIN64) || defined(__WIN64__))
101# define Q_OS_WIN32 101# define Q_OS_WIN32
102# define Q_OS_WIN64 102# define Q_OS_WIN64
103#elif !defined(SAG_COM) && (defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)) 103#elif !defined(SAG_COM) && (defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__))
104# define Q_OS_WIN32 104# define Q_OS_WIN32
105#elif defined(__MWERKS__) && defined(__INTEL__) 105#elif defined(__MWERKS__) && defined(__INTEL__)
106# define Q_OS_WIN32 106# define Q_OS_WIN32
107#elif defined(__sun) || defined(sun) 107#elif defined(__sun) || defined(sun)
108# define Q_OS_SOLARIS 108# define Q_OS_SOLARIS
109#elif defined(hpux) || defined(__hpux) 109#elif defined(hpux) || defined(__hpux)
110# define Q_OS_HPUX 110# define Q_OS_HPUX
111#elif defined(__ultrix) || defined(ultrix) 111#elif defined(__ultrix) || defined(ultrix)
112# define Q_OS_ULTRIX 112# define Q_OS_ULTRIX
113#elif defined(sinix) 113#elif defined(sinix)
114# define Q_OS_RELIANT 114# define Q_OS_RELIANT
115#elif defined(__linux__) || defined(__linux) 115#elif defined(__linux__) || defined(__linux)
116# define Q_OS_LINUX 116# define Q_OS_LINUX
117#elif defined(__FreeBSD__) || defined(__DragonFly__) 117#elif defined(__FreeBSD__) || defined(__DragonFly__)
118# define Q_OS_FREEBSD 118# define Q_OS_FREEBSD
119# define Q_OS_BSD4 119# define Q_OS_BSD4
120#elif defined(__NetBSD__) 120#elif defined(__NetBSD__)
121# define Q_OS_NETBSD 121# define Q_OS_NETBSD
122# define Q_OS_BSD4 122# define Q_OS_BSD4
123#elif defined(__OpenBSD__) 123#elif defined(__OpenBSD__)
124# define Q_OS_OPENBSD 124# define Q_OS_OPENBSD
125# define Q_OS_BSD4 125# define Q_OS_BSD4
126#elif defined(__bsdi__) 126#elif defined(__bsdi__)
127# define Q_OS_BSDI 127# define Q_OS_BSDI
128# define Q_OS_BSD4 128# define Q_OS_BSD4
129#elif defined(__sgi) 129#elif defined(__sgi)
130# define Q_OS_IRIX 130# define Q_OS_IRIX
131#elif defined(__osf__) 131#elif defined(__osf__)
132# define Q_OS_OSF 132# define Q_OS_OSF
133#elif defined(_AIX) 133#elif defined(_AIX)
134# define Q_OS_AIX 134# define Q_OS_AIX
135#elif defined(__Lynx__) 135#elif defined(__Lynx__)
136# define Q_OS_LYNX 136# define Q_OS_LYNX
137#elif defined(__GNU_HURD__) 137#elif defined(__GNU_HURD__)
138# define Q_OS_HURD 138# define Q_OS_HURD
139#elif defined(__DGUX__) 139#elif defined(__DGUX__)
140# define Q_OS_DGUX 140# define Q_OS_DGUX
141#elif defined(__QNXNTO__) 141#elif defined(__QNXNTO__)
142# define Q_OS_QNX6 142# define Q_OS_QNX6
143#elif defined(__QNX__) 143#elif defined(__QNX__)
144# define Q_OS_QNX 144# define Q_OS_QNX
145#elif defined(_SEQUENT_) 145#elif defined(_SEQUENT_)
146# define Q_OS_DYNIX 146# define Q_OS_DYNIX
147#elif defined(_SCO_DS) /* SCO OpenServer 5 + GCC */ 147#elif defined(_SCO_DS) /* SCO OpenServer 5 + GCC */
148# define Q_OS_SCO 148# define Q_OS_SCO
149#elif defined(__USLC__) /* all SCO platforms + UDK or OUDK */ 149#elif defined(__USLC__) /* all SCO platforms + UDK or OUDK */
150# define Q_OS_UNIXWARE 150# define Q_OS_UNIXWARE
151# define Q_OS_UNIXWARE7 151# define Q_OS_UNIXWARE7
152#elif defined(__svr4__) && defined(i386) /* Open UNIX 8 + GCC */ 152#elif defined(__svr4__) && defined(i386) /* Open UNIX 8 + GCC */
153# define Q_OS_UNIXWARE 153# define Q_OS_UNIXWARE
154# define Q_OS_UNIXWARE7 154# define Q_OS_UNIXWARE7
155#elif defined(__MAKEDEPEND__) 155#elif defined(__MAKEDEPEND__)
156#else 156#else
157# error "Qt has not been ported to this OS - talk to qt-bugs@trolltech.com" 157# error "Qt has not been ported to this OS - talk to qt-bugs@trolltech.com"
158#endif 158#endif
159 159
160#if defined(Q_OS_WIN32) || defined(Q_OS_WIN64) 160#if defined(Q_OS_WIN32) || defined(Q_OS_WIN64)
161# define Q_OS_WIN 161# define Q_OS_WIN
162#endif 162#endif
163 163
164#if defined(Q_OS_MAC9) || defined(Q_OS_MACX) 164#if defined(Q_OS_MAC9) || defined(Q_OS_MACX)
165# define Q_OS_MAC 165# define Q_OS_MAC
166/* We have to prevent qmake to generate makefiles or projectfiles for the Apple build system.
167 * This would work if we would use QT3. But we compile with QT2 which don't use qmake and does nothing
168 * about the MAC platform !! (se)
169 */
170#warning "evil hack here !! (se)"
171#define Q_OS_LINUX
172#undef Q_OS_MACX
173#undef Q_OS_MAC
166#endif 174#endif
167 175
168#if defined(Q_OS_MAC9) || defined(Q_OS_MSDOS) || defined(Q_OS_OS2) || defined(Q_OS_WIN) 176#if defined(Q_OS_MAC9) || defined(Q_OS_MSDOS) || defined(Q_OS_OS2) || defined(Q_OS_WIN)
169# undef Q_OS_UNIX 177# undef Q_OS_UNIX
170#elif !defined(Q_OS_UNIX) 178#elif !defined(Q_OS_UNIX)
171# define Q_OS_UNIX 179# define Q_OS_UNIX
172#endif 180#endif
173 181
174 182
175/* 183/*
176 The compiler, must be one of: (Q_CC_x) 184 The compiler, must be one of: (Q_CC_x)
177 185
178 SYM- Symantec C++ for both PC and Macintosh 186 SYM- Symantec C++ for both PC and Macintosh
179 MPW- MPW C++ 187 MPW- MPW C++
180 MWERKS- Metrowerks CodeWarrior 188 MWERKS- Metrowerks CodeWarrior
181 MSVC- Microsoft Visual C/C++, Intel C++ for Windows 189 MSVC- Microsoft Visual C/C++, Intel C++ for Windows
182 BOR- Borland/Turbo C++ 190 BOR- Borland/Turbo C++
183 WAT- Watcom C++ 191 WAT- Watcom C++
184 GNU- GNU C++ 192 GNU- GNU C++
185 COMEAU- Comeau C++ 193 COMEAU- Comeau C++
186 EDG- Edison Design Group C++ 194 EDG- Edison Design Group C++
187 OC - CenterLine C++ 195 OC - CenterLine C++
188 SUN- Sun WorkShop, Forte Developer, or Sun ONE Studio C++ 196 SUN- Sun WorkShop, Forte Developer, or Sun ONE Studio C++
189 MIPS- MIPSpro C++ 197 MIPS- MIPSpro C++
190 DEC- DEC C++ 198 DEC- DEC C++
191 HP - HPUX C++ 199 HP - HPUX C++
192 HPACC- HPUX ANSI C++ 200 HPACC- HPUX ANSI C++
193 USLC- SCO OUDK, UDK, and UnixWare 2.X C++ 201 USLC- SCO OUDK, UDK, and UnixWare 2.X C++
194 CDS- Reliant C++ 202 CDS- Reliant C++
195 KAI- KAI C++ 203 KAI- KAI C++
196 INTEL- Intel C++ for Linux, Intel C++ for Windows 204 INTEL- Intel C++ for Linux, Intel C++ for Windows
197 HIGHC- MetaWare High C/C++ 205 HIGHC- MetaWare High C/C++
198 PGI- Portland Group C++ 206 PGI- Portland Group C++
199 GHS- Green Hills Optimizing C++ Compilers 207 GHS- Green Hills Optimizing C++ Compilers
200 208
201 Should be sorted most to least authoritative. 209 Should be sorted most to least authoritative.
202*/ 210*/
203 211
204/* Symantec C++ is now Digital Mars */ 212/* Symantec C++ is now Digital Mars */
205#if defined(__DMC__) || defined(__SC__) 213#if defined(__DMC__) || defined(__SC__)
206# define Q_CC_SYM 214# define Q_CC_SYM
207/* "explicit" semantics implemented in 8.1e but keyword recognized since 7.5 */ 215/* "explicit" semantics implemented in 8.1e but keyword recognized since 7.5 */
208# if defined(__SC__) && __SC__ < 0x750 216# if defined(__SC__) && __SC__ < 0x750
209# define Q_NO_EXPLICIT_KEYWORD 217# define Q_NO_EXPLICIT_KEYWORD
210# endif 218# endif
211# define Q_NO_USING_KEYWORD 219# define Q_NO_USING_KEYWORD
212# if !defined(_CPPUNWIND) 220# if !defined(_CPPUNWIND)
213# define Q_NO_EXCEPTIONS 221# define Q_NO_EXCEPTIONS
214# endif 222# endif
215 223
216#elif defined(applec) 224#elif defined(applec)
217# define Q_CC_MPW 225# define Q_CC_MPW
218# define Q_NO_BOOL_TYPE 226# define Q_NO_BOOL_TYPE
219# define Q_NO_EXPLICIT_KEYWORD 227# define Q_NO_EXPLICIT_KEYWORD
220# define Q_NO_USING_KEYWORD 228# define Q_NO_USING_KEYWORD
221 229
222#elif defined(__MWERKS__) 230#elif defined(__MWERKS__)
223# define Q_CC_MWERKS 231# define Q_CC_MWERKS
224/* "explicit" recognized since 4.0d1 */ 232/* "explicit" recognized since 4.0d1 */
225# define QMAC_PASCAL pascal 233# define QMAC_PASCAL pascal
226 234
227#elif defined(_MSC_VER) 235#elif defined(_MSC_VER)
228# define Q_CC_MSVC 236# define Q_CC_MSVC
229/* proper support of bool for _MSC_VER >= 1100 */ 237/* proper support of bool for _MSC_VER >= 1100 */
230# define Q_CANNOT_DELETE_CONSTANT 238# define Q_CANNOT_DELETE_CONSTANT
231# define Q_INLINE_TEMPLATES inline 239# define Q_INLINE_TEMPLATES inline
232/* Visual C++.Net issues for _MSC_VER >= 1300 */ 240/* Visual C++.Net issues for _MSC_VER >= 1300 */
233# if _MSC_VER >= 1300 241# if _MSC_VER >= 1300
234# define Q_CC_MSVC_NET 242# define Q_CC_MSVC_NET
235# if _MSC_VER < 1310 || defined(Q_OS_WIN64) 243# if _MSC_VER < 1310 || defined(Q_OS_WIN64)
236# define Q_TYPENAME 244# define Q_TYPENAME
237# endif 245# endif
238# endif 246# endif
239/* Intel C++ disguising as Visual C++: the `using' keyword avoids warnings */ 247/* Intel C++ disguising as Visual C++: the `using' keyword avoids warnings */
240# if defined(__INTEL_COMPILER) 248# if defined(__INTEL_COMPILER)
241# define Q_CC_INTEL 249# define Q_CC_INTEL
242# if !defined(__EXCEPTIONS) 250# if !defined(__EXCEPTIONS)
243# define Q_NO_EXCEPTIONS 251# define Q_NO_EXCEPTIONS
244# endif 252# endif
245# else 253# else
246# define Q_NO_USING_KEYWORD /* ### check "using" status */ 254# define Q_NO_USING_KEYWORD /* ### check "using" status */
247# endif 255# endif
248 256
249#elif defined(__BORLANDC__) || defined(__TURBOC__) 257#elif defined(__BORLANDC__) || defined(__TURBOC__)
250# define Q_CC_BOR 258# define Q_CC_BOR
251# if __BORLANDC__ < 0x502 259# if __BORLANDC__ < 0x502
252# define Q_NO_BOOL_TYPE 260# define Q_NO_BOOL_TYPE
253# define Q_NO_EXPLICIT_KEYWORD 261# define Q_NO_EXPLICIT_KEYWORD
254# endif 262# endif
255# define Q_NO_USING_KEYWORD /* ### check "using" status */ 263# define Q_NO_USING_KEYWORD /* ### check "using" status */
256 264
257#elif defined(__WATCOMC__) 265#elif defined(__WATCOMC__)
258# define Q_CC_WAT 266# define Q_CC_WAT
259# if defined(Q_OS_QNX4) 267# if defined(Q_OS_QNX4)
260/* compiler flags */ 268/* compiler flags */
261# define Q_TYPENAME 269# define Q_TYPENAME
262# define Q_NO_BOOL_TYPE 270# define Q_NO_BOOL_TYPE
263# define Q_CANNOT_DELETE_CONSTANT 271# define Q_CANNOT_DELETE_CONSTANT
264# define mutable 272# define mutable
265/* ??? */ 273/* ??? */
266# define Q_BROKEN_TEMPLATE_SPECIALIZATION 274# define Q_BROKEN_TEMPLATE_SPECIALIZATION
267/* no template classes in QVariant */ 275/* no template classes in QVariant */
268# define QT_NO_TEMPLATE_VARIANT 276# define QT_NO_TEMPLATE_VARIANT
269/* Wcc does not fill in functions needed by valuelists, maps, and 277/* Wcc does not fill in functions needed by valuelists, maps, and
270 valuestacks implicitly */ 278 valuestacks implicitly */
271# define Q_FULL_TEMPLATE_INSTANTIATION 279# define Q_FULL_TEMPLATE_INSTANTIATION
272/* can we just compare the structures? */ 280/* can we just compare the structures? */
273# define Q_FULL_TEMPLATE_INSTANTIATION_MEMCMP 281# define Q_FULL_TEMPLATE_INSTANTIATION_MEMCMP
274/* these are not useful to our customers */ 282/* these are not useful to our customers */
275# define QT_QWS_NO_SHM 283# define QT_QWS_NO_SHM
276# define QT_NO_QWS_MULTIPROCESS 284# define QT_NO_QWS_MULTIPROCESS
277# define QT_NO_SQL 285# define QT_NO_SQL
278# define QT_NO_QWS_CURSOR 286# define QT_NO_QWS_CURSOR
279# endif 287# endif
280 288
281#elif defined(__GNUC__) 289#elif defined(__GNUC__)
282# define Q_CC_GNU 290# define Q_CC_GNU
283# define Q_C_CALLBACKS 291# define Q_C_CALLBACKS
284# if __GNUC__ == 2 && __GNUC_MINOR__ <= 7 292# if __GNUC__ == 2 && __GNUC_MINOR__ <= 7
285# define Q_FULL_TEMPLATE_INSTANTIATION 293# define Q_FULL_TEMPLATE_INSTANTIATION
286# endif 294# endif
287/* GCC 2.95 knows "using" but does not support it correctly */ 295/* GCC 2.95 knows "using" but does not support it correctly */
288# if __GNUC__ == 2 && __GNUC_MINOR__ <= 95 296# if __GNUC__ == 2 && __GNUC_MINOR__ <= 95
289# define Q_NO_USING_KEYWORD 297# define Q_NO_USING_KEYWORD
290# endif 298# endif
291/* GCC 3.1 and GCC 3.2 wrongly define _SB_CTYPE_MACROS on HP-UX */ 299/* GCC 3.1 and GCC 3.2 wrongly define _SB_CTYPE_MACROS on HP-UX */
292# if defined(Q_OS_HPUX) && __GNUC__ == 3 && __GNUC_MINOR__ >= 1 300# if defined(Q_OS_HPUX) && __GNUC__ == 3 && __GNUC_MINOR__ >= 1
293# define Q_WRONG_SB_CTYPE_MACROS 301# define Q_WRONG_SB_CTYPE_MACROS
294# endif 302# endif
295 303
296/* ARM gcc pads structs to 32 bits, even when they contain a single 304/* ARM gcc pads structs to 32 bits, even when they contain a single
297 char, or short. We tell gcc to pack QChars to 16 bits, to avoid 305 char, or short. We tell gcc to pack QChars to 16 bits, to avoid
298 QString bloat. However, gcc 3.4 doesn't allow us to create references to 306 QString bloat. However, gcc 3.4 doesn't allow us to create references to
299 members of a packed struct. (Pointers are OK, because then you 307 members of a packed struct. (Pointers are OK, because then you
300 supposedly know what you are doing.) */ 308 supposedly know what you are doing.) */
301# if (defined(__arm__) || defined(__ARMEL__)) && !defined(QT_MOC_CPP) 309# if (defined(__arm__) || defined(__ARMEL__)) && !defined(QT_MOC_CPP)
302# define Q_PACKED __attribute__ ((packed)) 310# define Q_PACKED __attribute__ ((packed))
303# if __GNUC__ == 3 && __GNUC_MINOR__ >= 4 311# if __GNUC__ == 3 && __GNUC_MINOR__ >= 4
304# define Q_NO_PACKED_REFERENCE 312# define Q_NO_PACKED_REFERENCE
305# endif 313# endif
306# endif 314# endif
307# if !defined(__EXCEPTIONS) 315# if !defined(__EXCEPTIONS)
308# define Q_NO_EXCEPTIONS 316# define Q_NO_EXCEPTIONS
309# endif 317# endif
310 318
311/* IBM compiler versions are a bit messy. There are actually two products: 319/* IBM compiler versions are a bit messy. There are actually two products:
312 the C product, and the C++ product. The C++ compiler is always packaged 320 the C product, and the C++ product. The C++ compiler is always packaged
313 with the latest version of the C compiler. Version numbers do not always 321 with the latest version of the C compiler. Version numbers do not always
314 match. This little table (I'm not sure it's accurate) should be helpful: 322 match. This little table (I'm not sure it's accurate) should be helpful:
315 323
316 C++ product C product 324 C++ product C product
317 325
318 C Set 3.1 C Compiler 3.0 326 C Set 3.1 C Compiler 3.0
319 ... ... 327 ... ...
320 C++ Compiler 3.6.6 C Compiler 4.3 328 C++ Compiler 3.6.6 C Compiler 4.3
321 ... ... 329 ... ...
322 Visual Age C++ 4.0 ... 330 Visual Age C++ 4.0 ...
323 ... ... 331 ... ...
324 Visual Age C++ 5.0 C Compiler 5.0 332 Visual Age C++ 5.0 C Compiler 5.0
325 ... ... 333 ... ...
326 Visual Age C++ 6.0 C Compiler 6.0 334 Visual Age C++ 6.0 C Compiler 6.0
327 335
328 Now: 336 Now:
329 __xlC__ is the version of the C compiler in hexadecimal notation 337 __xlC__ is the version of the C compiler in hexadecimal notation
330 is only an approximation of the C++ compiler version 338 is only an approximation of the C++ compiler version
331 __IBMCPP__ is the version of the C++ compiler in decimal notation 339 __IBMCPP__ is the version of the C++ compiler in decimal notation
332 but it is not defined on older compilers like C Set 3.1 */ 340 but it is not defined on older compilers like C Set 3.1 */
333#elif defined(__xlC__) 341#elif defined(__xlC__)
334# define Q_CC_XLC 342# define Q_CC_XLC
335# define Q_FULL_TEMPLATE_INSTANTIATION 343# define Q_FULL_TEMPLATE_INSTANTIATION
336# if __xlC__ < 0x400 344# if __xlC__ < 0x400
337# define Q_NO_BOOL_TYPE 345# define Q_NO_BOOL_TYPE
338# define Q_NO_EXPLICIT_KEYWORD 346# define Q_NO_EXPLICIT_KEYWORD
339# define Q_NO_USING_KEYWORD 347# define Q_NO_USING_KEYWORD
340# define Q_TYPENAME 348# define Q_TYPENAME
341# define Q_INLINE_TEMPLATES inline 349# define Q_INLINE_TEMPLATES inline
342# define Q_BROKEN_TEMPLATE_SPECIALIZATION 350# define Q_BROKEN_TEMPLATE_SPECIALIZATION
343# define Q_CANNOT_DELETE_CONSTANT 351# define Q_CANNOT_DELETE_CONSTANT
344# endif 352# endif
345 353
346/* Older versions of DEC C++ do not define __EDG__ or __EDG - observed 354/* Older versions of DEC C++ do not define __EDG__ or __EDG - observed
347 on DEC C++ V5.5-004. New versions do define __EDG__ - observed on 355 on DEC C++ V5.5-004. New versions do define __EDG__ - observed on
348 Compaq C++ V6.3-002. 356 Compaq C++ V6.3-002.
349 This compiler is different enough from other EDG compilers to handle 357 This compiler is different enough from other EDG compilers to handle
350 it separately anyway. */ 358 it separately anyway. */
351#elif defined(__DECCXX) || defined(__DECC) 359#elif defined(__DECCXX) || defined(__DECC)
352# define Q_CC_DEC 360# define Q_CC_DEC
353/* Compaq C++ V6 compilers are EDG-based but I'm not sure about older 361/* Compaq C++ V6 compilers are EDG-based but I'm not sure about older
354 DEC C++ V5 compilers. */ 362 DEC C++ V5 compilers. */
355# if defined(__EDG__) 363# if defined(__EDG__)
356# define Q_CC_EDG 364# define Q_CC_EDG
357# endif 365# endif
358/* Compaq have disabled EDG's _BOOL macro and use _BOOL_EXISTS instead 366/* Compaq have disabled EDG's _BOOL macro and use _BOOL_EXISTS instead
359 - observed on Compaq C++ V6.3-002. 367 - observed on Compaq C++ V6.3-002.
360 In any case versions prior to Compaq C++ V6.0-005 do not have bool. */ 368 In any case versions prior to Compaq C++ V6.0-005 do not have bool. */
361# if !defined(_BOOL_EXISTS) 369# if !defined(_BOOL_EXISTS)
362# define Q_NO_BOOL_TYPE 370# define Q_NO_BOOL_TYPE
363# endif 371# endif
364/* Spurious (?) error messages observed on Compaq C++ V6.5-014. */ 372/* Spurious (?) error messages observed on Compaq C++ V6.5-014. */
365# define Q_NO_USING_KEYWORD 373# define Q_NO_USING_KEYWORD
366/* Apply to all versions prior to Compaq C++ V6.0-000 - observed on 374/* Apply to all versions prior to Compaq C++ V6.0-000 - observed on
367 DEC C++ V5.5-004. */ 375 DEC C++ V5.5-004. */
368# if __DECCXX_VER < 60060000 376# if __DECCXX_VER < 60060000
369# define Q_TYPENAME 377# define Q_TYPENAME
370# define Q_BROKEN_TEMPLATE_SPECIALIZATION 378# define Q_BROKEN_TEMPLATE_SPECIALIZATION
371# define Q_CANNOT_DELETE_CONSTANT 379# define Q_CANNOT_DELETE_CONSTANT
372# endif 380# endif
373/* avoid undefined symbol problems with out-of-line template members */ 381/* avoid undefined symbol problems with out-of-line template members */
374# define Q_INLINE_TEMPLATES inline 382# define Q_INLINE_TEMPLATES inline
375 383
376/* Compilers with EDG front end are similar. To detect them we test: 384/* Compilers with EDG front end are similar. To detect them we test:
377 __EDG documented by SGI, observed on MIPSpro 7.3.1.1 and KAI C++ 4.0b 385 __EDG documented by SGI, observed on MIPSpro 7.3.1.1 and KAI C++ 4.0b
378 __EDG__ documented in EDG online docs, observed on Compaq C++ V6.3-002 */ 386 __EDG__ documented in EDG online docs, observed on Compaq C++ V6.3-002 */
379#elif defined(__EDG) || defined(__EDG__) 387#elif defined(__EDG) || defined(__EDG__)
380# define Q_CC_EDG 388# define Q_CC_EDG
381/* From the EDG documentation (does not seem to apply to Compaq C++): 389/* From the EDG documentation (does not seem to apply to Compaq C++):
382 _BOOL 390 _BOOL
383 Defined in C++ mode when bool is a keyword. The name of this 391 Defined in C++ mode when bool is a keyword. The name of this
384 predefined macro is specified by a configuration flag. _BOOL 392 predefined macro is specified by a configuration flag. _BOOL
385 is the default. 393 is the default.
386 __BOOL_DEFINED 394 __BOOL_DEFINED
387 Defined in Microsoft C++ mode when bool is a keyword. */ 395 Defined in Microsoft C++ mode when bool is a keyword. */
388# if !defined(_BOOL) && !defined(__BOOL_DEFINED) 396# if !defined(_BOOL) && !defined(__BOOL_DEFINED)
389# define Q_NO_BOOL_TYPE 397# define Q_NO_BOOL_TYPE
390# endif 398# endif
391 399
392/* The Comeau compiler is based on EDG and does define __EDG__ */ 400/* The Comeau compiler is based on EDG and does define __EDG__ */
393# if defined(__COMO__) 401# if defined(__COMO__)
394# define Q_CC_COMEAU 402# define Q_CC_COMEAU
395# define Q_C_CALLBACKS 403# define Q_C_CALLBACKS
396 404
397/* The `using' keyword was introduced to avoid KAI C++ warnings 405/* The `using' keyword was introduced to avoid KAI C++ warnings
398 but it's now causing KAI C++ errors instead. The standard is 406 but it's now causing KAI C++ errors instead. The standard is
399 unclear about the use of this keyword, and in practice every 407 unclear about the use of this keyword, and in practice every
400 compiler is using its own set of rules. Forget it. */ 408 compiler is using its own set of rules. Forget it. */
401# elif defined(__KCC) 409# elif defined(__KCC)
402# define Q_CC_KAI 410# define Q_CC_KAI
403# if !defined(_EXCEPTIONS) 411# if !defined(_EXCEPTIONS)
404# define Q_NO_EXCEPTIONS 412# define Q_NO_EXCEPTIONS
405# endif 413# endif
406# define Q_NO_USING_KEYWORD 414# define Q_NO_USING_KEYWORD
407 415
408/* Using the `using' keyword avoids Intel C++ for Linux warnings */ 416/* Using the `using' keyword avoids Intel C++ for Linux warnings */
409# elif defined(__INTEL_COMPILER) 417# elif defined(__INTEL_COMPILER)
410# define Q_CC_INTEL 418# define Q_CC_INTEL
411# if !defined(__EXCEPTIONS) 419# if !defined(__EXCEPTIONS)
412# define Q_NO_EXCEPTIONS 420# define Q_NO_EXCEPTIONS
413# endif 421# endif
414 422
415/* The Portland Group compiler is based on EDG and does define __EDG__ */ 423/* The Portland Group compiler is based on EDG and does define __EDG__ */
416# elif defined(__PGI) 424# elif defined(__PGI)
417# define Q_CC_PGI 425# define Q_CC_PGI
418# if !defined(__EXCEPTIONS) 426# if !defined(__EXCEPTIONS)
419# define Q_NO_EXCEPTIONS 427# define Q_NO_EXCEPTIONS
420# endif 428# endif
421 429