summaryrefslogtreecommitdiff
authoreilers <eilers>2004-07-29 10:50:29 (UTC)
committer eilers <eilers>2004-07-29 10:50:29 (UTC)
commit9981eb853deaeac6ef5f87b94b60984450cb630a (patch) (unidiff)
tree8888c220156b831a70d88ff6b64d8f76386ef9d1
parent08d7594f45f24112f76192ddbcd8ed3f0a651186 (diff)
downloadopie-9981eb853deaeac6ef5f87b94b60984450cb630a.zip
opie-9981eb853deaeac6ef5f87b94b60984450cb630a.tar.gz
opie-9981eb853deaeac6ef5f87b94b60984450cb630a.tar.bz2
Reimplement fix to compile and work on MacOS-X.
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,677 +1,685 @@
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
422/* Never tested! */ 430/* Never tested! */
423# elif defined(__ghs) 431# elif defined(__ghs)
424# define Q_CC_GHS 432# define Q_CC_GHS
425 433
426/* The UnixWare 7 UDK compiler is based on EDG and does define __EDG__ */ 434/* The UnixWare 7 UDK compiler is based on EDG and does define __EDG__ */
427# elif defined(__USLC__) && defined(__SCO_VERSION__) 435# elif defined(__USLC__) && defined(__SCO_VERSION__)
428# define Q_CC_USLC 436# define Q_CC_USLC
429/* The latest UDK 7.1.1b does not need this, but previous versions do */ 437/* The latest UDK 7.1.1b does not need this, but previous versions do */
430# if !defined(__SCO_VERSION__) || (__SCO_VERSION__ < 302200010) 438# if !defined(__SCO_VERSION__) || (__SCO_VERSION__ < 302200010)
431# define Q_INLINE_TEMPLATES inline 439# define Q_INLINE_TEMPLATES inline
432# endif 440# endif
433# define Q_NO_USING_KEYWORD /* ### check "using" status */ 441# define Q_NO_USING_KEYWORD /* ### check "using" status */
434 442
435/* Never tested! */ 443/* Never tested! */
436# elif defined(CENTERLINE_CLPP) || defined(OBJECTCENTER) 444# elif defined(CENTERLINE_CLPP) || defined(OBJECTCENTER)
437# define Q_CC_OC 445# define Q_CC_OC
438# define Q_NO_USING_KEYWORD 446# define Q_NO_USING_KEYWORD
439 447
440/* CDS++ defines __EDG__ although this is not documented in the Reliant 448/* CDS++ defines __EDG__ although this is not documented in the Reliant
441 documentation. It also follows conventions like _BOOL and this documented */ 449 documentation. It also follows conventions like _BOOL and this documented */
442# elif defined(sinix) 450# elif defined(sinix)
443# define Q_CC_CDS 451# define Q_CC_CDS
444# define Q_NO_USING_KEYWORD 452# define Q_NO_USING_KEYWORD
445# if defined(__cplusplus) && (__cplusplus < 2) /* Cfront C++ mode */ 453# if defined(__cplusplus) && (__cplusplus < 2) /* Cfront C++ mode */
446# define Q_NO_EXCEPTIONS 454# define Q_NO_EXCEPTIONS
447# endif 455# endif
448 456
449/* The MIPSpro compiler in o32 mode is based on EDG but disables features 457/* The MIPSpro compiler in o32 mode is based on EDG but disables features
450 such as template specialization nevertheless */ 458 such as template specialization nevertheless */
451# elif defined(__sgi) 459# elif defined(__sgi)
452# define Q_CC_MIPS 460# define Q_CC_MIPS
453# if defined(_MIPS_SIM) && (_MIPS_SIM == _ABIO32) /* o32 ABI */ 461# if defined(_MIPS_SIM) && (_MIPS_SIM == _ABIO32) /* o32 ABI */
454# define Q_TYPENAME 462# define Q_TYPENAME
455# define Q_BROKEN_TEMPLATE_SPECIALIZATION 463# define Q_BROKEN_TEMPLATE_SPECIALIZATION
456# define Q_NO_EXPLICIT_KEYWORD 464# define Q_NO_EXPLICIT_KEYWORD
457# define Q_INLINE_TEMPLATES inline 465# define Q_INLINE_TEMPLATES inline
458# elif defined(_COMPILER_VERSION) && (_COMPILER_VERSION < 730) /* 7.2 */ 466# elif defined(_COMPILER_VERSION) && (_COMPILER_VERSION < 730) /* 7.2 */
459# define Q_TYPENAME 467# define Q_TYPENAME
460# define Q_BROKEN_TEMPLATE_SPECIALIZATION 468# define Q_BROKEN_TEMPLATE_SPECIALIZATION
461# endif 469# endif
462# define Q_NO_USING_KEYWORD /* ### check "using" status */ 470# define Q_NO_USING_KEYWORD /* ### check "using" status */
463# if defined(_COMPILER_VERSION) && (_COMPILER_VERSION >= 740) 471# if defined(_COMPILER_VERSION) && (_COMPILER_VERSION >= 740)
464# pragma set woff 3624,3625, 3649 /* turn off some harmless warnings */ 472# pragma set woff 3624,3625, 3649 /* turn off some harmless warnings */
465# endif 473# endif
466# endif 474# endif
467 475
468/* The older UnixWare 2.X compiler? */ 476/* The older UnixWare 2.X compiler? */
469#elif defined(__USLC__) 477#elif defined(__USLC__)
470# define Q_CC_USLC 478# define Q_CC_USLC
471# define Q_TYPENAME 479# define Q_TYPENAME
472# define Q_NO_BOOL_TYPE 480# define Q_NO_BOOL_TYPE
473# define Q_NO_EXPLICIT_KEYWORD 481# define Q_NO_EXPLICIT_KEYWORD
474# define Q_NO_USING_KEYWORD 482# define Q_NO_USING_KEYWORD
475# define Q_INLINE_TEMPLATES inline 483# define Q_INLINE_TEMPLATES inline
476 484
477/* Never tested! */ 485/* Never tested! */
478#elif defined(__HIGHC__) 486#elif defined(__HIGHC__)
479# define Q_CC_HIGHC 487# define Q_CC_HIGHC
480 488
481#elif defined(__SUNPRO_CC) || defined(__SUNPRO_C) 489#elif defined(__SUNPRO_CC) || defined(__SUNPRO_C)
482# define Q_CC_SUN 490# define Q_CC_SUN
483/* 5.0 compiler or better 491/* 5.0 compiler or better
484 'bool' is enabled by default but can be disabled using -features=nobool 492 'bool' is enabled by default but can be disabled using -features=nobool
485 in which case _BOOL is not defined 493 in which case _BOOL is not defined
486 this is the default in 4.2 compatibility mode triggered by -compat=4 */ 494 this is the default in 4.2 compatibility mode triggered by -compat=4 */
487# if __SUNPRO_CC >= 0x500 495# if __SUNPRO_CC >= 0x500
488# if !defined(_BOOL) 496# if !defined(_BOOL)
489# define Q_NO_BOOL_TYPE 497# define Q_NO_BOOL_TYPE
490# endif 498# endif
491# if defined(__SUNPRO_CC_COMPAT) && (__SUNPRO_CC_COMPAT <= 4) 499# if defined(__SUNPRO_CC_COMPAT) && (__SUNPRO_CC_COMPAT <= 4)
492# define Q_NO_USING_KEYWORD 500# define Q_NO_USING_KEYWORD
493# endif 501# endif
494# define Q_C_CALLBACKS 502# define Q_C_CALLBACKS
495/* 4.2 compiler or older */ 503/* 4.2 compiler or older */
496# else 504# else
497# define Q_NO_BOOL_TYPE 505# define Q_NO_BOOL_TYPE
498# define Q_NO_EXPLICIT_KEYWORD 506# define Q_NO_EXPLICIT_KEYWORD
499# define Q_NO_USING_KEYWORD 507# define Q_NO_USING_KEYWORD
500# endif 508# endif
501 509
502/* CDS++ does not seem to define __EDG__ or __EDG according to Reliant 510/* CDS++ does not seem to define __EDG__ or __EDG according to Reliant
503 documentation but nevertheless uses EDG conventions like _BOOL */ 511 documentation but nevertheless uses EDG conventions like _BOOL */
504#elif defined(sinix) 512#elif defined(sinix)
505# define Q_CC_EDG 513# define Q_CC_EDG
506# define Q_CC_CDS 514# define Q_CC_CDS
507# if !defined(_BOOL) 515# if !defined(_BOOL)
508# define Q_NO_BOOL_TYPE 516# define Q_NO_BOOL_TYPE
509# endif 517# endif
510# define Q_BROKEN_TEMPLATE_SPECIALIZATION 518# define Q_BROKEN_TEMPLATE_SPECIALIZATION
511 519
512#elif defined(Q_OS_HPUX) 520#elif defined(Q_OS_HPUX)
513/* __HP_aCC was not defined in first aCC releases */ 521/* __HP_aCC was not defined in first aCC releases */
514# if defined(__HP_aCC) || __cplusplus >= 199707L 522# if defined(__HP_aCC) || __cplusplus >= 199707L
515# define Q_CC_HPACC 523# define Q_CC_HPACC
516# else 524# else
517# define Q_CC_HP 525# define Q_CC_HP
518# define Q_NO_BOOL_TYPE 526# define Q_NO_BOOL_TYPE
519# define Q_FULL_TEMPLATE_INSTANTIATION 527# define Q_FULL_TEMPLATE_INSTANTIATION
520# define Q_BROKEN_TEMPLATE_SPECIALIZATION 528# define Q_BROKEN_TEMPLATE_SPECIALIZATION
521# define Q_NO_EXPLICIT_KEYWORD 529# define Q_NO_EXPLICIT_KEYWORD
522# endif 530# endif
523# define Q_NO_USING_KEYWORD /* ### check "using" status */ 531# define Q_NO_USING_KEYWORD /* ### check "using" status */
524 532
525#else 533#else
526# error "Qt has not been tested with this compiler - talk to qt-bugs@trolltech.com" 534# error "Qt has not been tested with this compiler - talk to qt-bugs@trolltech.com"
527#endif 535#endif
528 536
529#ifndef Q_PACKED 537#ifndef Q_PACKED
530# define Q_PACKED 538# define Q_PACKED
531#endif 539#endif
532 540
533 541
534/* 542/*
535 The window system, must be one of: (Q_WS_x) 543 The window system, must be one of: (Q_WS_x)
536 544
537 MACX- Mac OS X 545 MACX- Mac OS X
538 MAC9- Mac OS 9 546 MAC9- Mac OS 9
539 QWS- Qt/Embedded 547 QWS- Qt/Embedded
540 WIN32- Windows 548 WIN32- Windows
541 X11- X Window System 549 X11- X Window System
542 PM - unsupported 550 PM - unsupported
543 WIN16- unsupported 551 WIN16- unsupported
544*/ 552*/
545 553
546#if defined(Q_OS_MAC9) 554#if defined(Q_OS_MAC9)
547# define Q_WS_MAC9 555# define Q_WS_MAC9
548#elif defined(Q_OS_MSDOS) 556#elif defined(Q_OS_MSDOS)
549# define Q_WS_WIN16 557# define Q_WS_WIN16
550# error "Qt requires Win32 and does not work with Windows 3.x" 558# error "Qt requires Win32 and does not work with Windows 3.x"
551#elif defined(_WIN32_X11_) 559#elif defined(_WIN32_X11_)
552# define Q_WS_X11 560# define Q_WS_X11
553#elif defined(Q_OS_WIN32) 561#elif defined(Q_OS_WIN32)
554# define Q_WS_WIN32 562# define Q_WS_WIN32
555# if defined(Q_OS_WIN64) 563# if defined(Q_OS_WIN64)
556# define Q_WS_WIN64 564# define Q_WS_WIN64
557# endif 565# endif
558#elif defined(Q_OS_OS2) 566#elif defined(Q_OS_OS2)
559# define Q_WS_PM 567# define Q_WS_PM
560# error "Qt does not work with OS/2 Presentation Manager or Workplace Shell" 568# error "Qt does not work with OS/2 Presentation Manager or Workplace Shell"
561#elif defined(Q_OS_UNIX) 569#elif defined(Q_OS_UNIX)
562# if defined(QWS) 570# if defined(QWS)
563# define Q_WS_QWS 571# define Q_WS_QWS
564# define QT_NO_QWS_IM 572# define QT_NO_QWS_IM
565# elif defined(Q_OS_MACX) 573# elif defined(Q_OS_MACX)
566# define Q_WS_MACX 574# define Q_WS_MACX
567# else 575# else
568# define Q_WS_X11 576# define Q_WS_X11
569# endif 577# endif
570#endif 578#endif
571#if defined(Q_OS_MAC) && !defined(QMAC_PASCAL) 579#if defined(Q_OS_MAC) && !defined(QMAC_PASCAL)
572# define QMAC_PASCAL 580# define QMAC_PASCAL
573#endif 581#endif
574 582
575#if defined(Q_WS_WIN16) || defined(Q_WS_WIN32) 583#if defined(Q_WS_WIN16) || defined(Q_WS_WIN32)
576# define Q_WS_WIN 584# define Q_WS_WIN
577#endif 585#endif
578 586
579#if (defined(Q_WS_MAC9) || defined(Q_WS_MACX)) && !defined(Q_WS_QWS) && !defined(Q_WS_X11) 587#if (defined(Q_WS_MAC9) || defined(Q_WS_MACX)) && !defined(Q_WS_QWS) && !defined(Q_WS_X11)
580# define Q_WS_MAC 588# define Q_WS_MAC
581#endif 589#endif
582 590
583 591
584/* 592/*
585 Some classes do not permit copies to be made of an object. 593 Some classes do not permit copies to be made of an object.
586 These classes contains a private copy constructor and operator= 594 These classes contains a private copy constructor and operator=
587 to disable copying (the compiler gives an error message). 595 to disable copying (the compiler gives an error message).
588 Undefine Q_DISABLE_COPY to turn off this checking. 596 Undefine Q_DISABLE_COPY to turn off this checking.
589*/ 597*/
590 598
591#define Q_DISABLE_COPY 599#define Q_DISABLE_COPY
592 600
593#if defined(__cplusplus) 601#if defined(__cplusplus)
594 602
595 603
596// 604//
597// Useful type definitions for Qt 605// Useful type definitions for Qt
598// 606//
599 607
600#if defined(Q_NO_BOOL_TYPE) 608#if defined(Q_NO_BOOL_TYPE)
601#if defined(Q_CC_HP) 609#if defined(Q_CC_HP)
602// bool is an unsupported reserved keyword in later versions 610// bool is an unsupported reserved keyword in later versions
603#define bool int 611#define bool int
604#else 612#else
605typedef int bool; 613typedef int bool;
606#endif 614#endif
607#endif 615#endif
608 616
609typedef unsigned char uchar; 617typedef unsigned char uchar;
610typedef unsigned short ushort; 618typedef unsigned short ushort;
611 typedef unsigneduint; 619 typedef unsigneduint;
612typedef unsigned long ulong; 620typedef unsigned long ulong;
613 typedef char *pchar; 621 typedef char *pchar;
614 typedef uchar *puchar; 622 typedef uchar *puchar;
615typedef const char *pcchar; 623typedef const char *pcchar;
616 624
617 625
618// 626//
619// Constant bool values 627// Constant bool values
620// 628//
621 629
622#ifndef TRUE 630#ifndef TRUE
623const bool FALSE = 0; 631const bool FALSE = 0;
624const bool TRUE = !0; 632const bool TRUE = !0;
625#endif 633#endif
626#if defined(__WATCOMC__) 634#if defined(__WATCOMC__)
627# if defined(Q_OS_QNX4) 635# if defined(Q_OS_QNX4)
628const bool false = FALSE; 636const bool false = FALSE;
629const bool true = TRUE; 637const bool true = TRUE;
630# endif 638# endif
631#endif 639#endif
632 640
633// 641//
634// Proper for-scoping 642// Proper for-scoping
635// ### turn on in 4.0 643// ### turn on in 4.0
636 644
637#if 0 && defined(Q_CC_MSVC) && !defined(Q_CC_MSVC_NET) 645#if 0 && defined(Q_CC_MSVC) && !defined(Q_CC_MSVC_NET)
638# define for if(0){}else for 646# define for if(0){}else for
639#endif 647#endif
640 648
641// 649//
642// Use the "explicit" keyword on platforms that support it. 650// Use the "explicit" keyword on platforms that support it.
643// 651//
644 652
645#if !defined(Q_NO_EXPLICIT_KEYWORD) 653#if !defined(Q_NO_EXPLICIT_KEYWORD)
646# define Q_EXPLICIT explicit 654# define Q_EXPLICIT explicit
647#else 655#else
648# define Q_EXPLICIT 656# define Q_EXPLICIT
649#endif 657#endif
650 658
651 659
652// 660//
653// Workaround for static const members on MSVC++. 661// Workaround for static const members on MSVC++.
654// 662//
655 663
656#if defined(Q_CC_MSVC) 664#if defined(Q_CC_MSVC)
657# define QT_STATIC_CONST static 665# define QT_STATIC_CONST static
658# define QT_STATIC_CONST_IMPL 666# define QT_STATIC_CONST_IMPL
659#else 667#else
660# define QT_STATIC_CONST static const 668# define QT_STATIC_CONST static const
661# define QT_STATIC_CONST_IMPL const 669# define QT_STATIC_CONST_IMPL const
662#endif 670#endif
663 671
664 672
665// 673//
666// Utility macros and inline functions 674// Utility macros and inline functions
667// 675//
668 676
669 #define QMAX(a, b)((b) < (a) ? (a) : (b)) 677 #define QMAX(a, b)((b) < (a) ? (a) : (b))
670 #define QMIN(a, b)((a) < (b) ? (a) : (b)) 678 #define QMIN(a, b)((a) < (b) ? (a) : (b))
671 #define QABS(a)((a) >= 0 ? (a) : -(a)) 679 #define QABS(a)((a) >= 0 ? (a) : -(a))
672 680
673inline int qRound( double d ) 681inline int qRound( double d )
674{ 682{
675 return d >= 0.0 ? int(d + 0.5) : int( d - ((int)d-1) + 0.5 ) + ((int)d-1); 683 return d >= 0.0 ? int(d + 0.5) : int( d - ((int)d-1) + 0.5 ) + ((int)d-1);
676} 684}
677 685