-rw-r--r-- | qmake/include/qglobal.h | 165 |
1 files changed, 104 insertions, 61 deletions
diff --git a/qmake/include/qglobal.h b/qmake/include/qglobal.h index 94e5607..b7e919d 100644 --- a/qmake/include/qglobal.h +++ b/qmake/include/qglobal.h | |||
@@ -1,16 +1,16 @@ | |||
1 | /**************************************************************************** | 1 | /**************************************************************************** |
2 | ** $Id$ | 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-2002 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 |
@@ -33,27 +33,28 @@ | |||
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.1.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 0x030102 | 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 | MSDOS- MS-DOS and Windows | 53 | MSDOS- MS-DOS and Windows |
53 | OS2- OS/2 | 54 | OS2- OS/2 |
54 | OS2EMX- XFree86 on OS/2 (not PM) | 55 | OS2EMX- XFree86 on OS/2 (not PM) |
55 | WIN32- Win32 (Windows 95/98/ME and Windows NT/2000/XP) | 56 | WIN32- Win32 (Windows 95/98/ME and Windows NT/2000/XP) |
56 | CYGWIN- Cygwin | 57 | CYGWIN- Cygwin |
57 | SOLARIS- Sun Solaris | 58 | SOLARIS- Sun Solaris |
58 | HPUX- HP-UX | 59 | HPUX- HP-UX |
59 | ULTRIX- DEC Ultrix | 60 | ULTRIX- DEC Ultrix |
@@ -73,17 +74,19 @@ | |||
73 | DYNIX- DYNIX/ptx | 74 | DYNIX- DYNIX/ptx |
74 | QNX- QNX | 75 | QNX- QNX |
75 | QNX6- QNX RTP 6.1 | 76 | QNX6- QNX RTP 6.1 |
76 | LYNX- LynxOS | 77 | LYNX- LynxOS |
77 | BSD4- Any BSD 4.4 system | 78 | BSD4- Any BSD 4.4 system |
78 | UNIX- Any UNIX BSD/SYSV system | 79 | UNIX- Any UNIX BSD/SYSV system |
79 | */ | 80 | */ |
80 | 81 | ||
81 | #if defined(__APPLE__) && defined(__GNUC__) | 82 | #if defined(__DARWIN_X11__) |
83 | # define Q_OS_DARWIN | ||
84 | #elif defined(__APPLE__) && defined(__GNUC__) | ||
82 | # define Q_OS_MACX | 85 | # define Q_OS_MACX |
83 | #elif defined(__MACOSX__) | 86 | #elif defined(__MACOSX__) |
84 | # define Q_OS_MACX | 87 | # define Q_OS_MACX |
85 | #elif defined(macintosh) | 88 | #elif defined(macintosh) |
86 | # define Q_OS_MAC9 | 89 | # define Q_OS_MAC9 |
87 | #elif defined(__CYGWIN__) | 90 | #elif defined(__CYGWIN__) |
88 | # define Q_OS_CYGWIN | 91 | # define Q_OS_CYGWIN |
89 | #elif defined(MSDOS) || defined(_MSDOS) | 92 | #elif defined(MSDOS) || defined(_MSDOS) |
@@ -106,17 +109,17 @@ | |||
106 | #elif defined(hpux) || defined(__hpux) | 109 | #elif defined(hpux) || defined(__hpux) |
107 | # define Q_OS_HPUX | 110 | # define Q_OS_HPUX |
108 | #elif defined(__ultrix) || defined(ultrix) | 111 | #elif defined(__ultrix) || defined(ultrix) |
109 | # define Q_OS_ULTRIX | 112 | # define Q_OS_ULTRIX |
110 | #elif defined(sinix) | 113 | #elif defined(sinix) |
111 | # define Q_OS_RELIANT | 114 | # define Q_OS_RELIANT |
112 | #elif defined(__linux__) || defined(__linux) | 115 | #elif defined(__linux__) || defined(__linux) |
113 | # define Q_OS_LINUX | 116 | # define Q_OS_LINUX |
114 | #elif defined(__FreeBSD__) | 117 | #elif defined(__FreeBSD__) || defined(__DragonFly__) |
115 | # define Q_OS_FREEBSD | 118 | # define Q_OS_FREEBSD |
116 | # define Q_OS_BSD4 | 119 | # define Q_OS_BSD4 |
117 | #elif defined(__NetBSD__) | 120 | #elif defined(__NetBSD__) |
118 | # define Q_OS_NETBSD | 121 | # define Q_OS_NETBSD |
119 | # define Q_OS_BSD4 | 122 | # define Q_OS_BSD4 |
120 | #elif defined(__OpenBSD__) | 123 | #elif defined(__OpenBSD__) |
121 | # define Q_OS_OPENBSD | 124 | # define Q_OS_OPENBSD |
122 | # define Q_OS_BSD4 | 125 | # define Q_OS_BSD4 |
@@ -144,60 +147,58 @@ | |||
144 | #elif defined(_SCO_DS) /* SCO OpenServer 5 + GCC */ | 147 | #elif defined(_SCO_DS) /* SCO OpenServer 5 + GCC */ |
145 | # define Q_OS_SCO | 148 | # define Q_OS_SCO |
146 | #elif defined(__USLC__) /* all SCO platforms + UDK or OUDK */ | 149 | #elif defined(__USLC__) /* all SCO platforms + UDK or OUDK */ |
147 | # define Q_OS_UNIXWARE | 150 | # define Q_OS_UNIXWARE |
148 | # define Q_OS_UNIXWARE7 | 151 | # define Q_OS_UNIXWARE7 |
149 | #elif defined(__svr4__) && defined(i386) /* Open UNIX 8 + GCC */ | 152 | #elif defined(__svr4__) && defined(i386) /* Open UNIX 8 + GCC */ |
150 | # define Q_OS_UNIXWARE | 153 | # define Q_OS_UNIXWARE |
151 | # define Q_OS_UNIXWARE7 | 154 | # define Q_OS_UNIXWARE7 |
155 | #elif defined(__MAKEDEPEND__) | ||
152 | #else | 156 | #else |
153 | # 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" |
154 | #endif | 158 | #endif |
155 | 159 | ||
160 | #if defined(Q_OS_WIN32) || defined(Q_OS_WIN64) | ||
161 | # define Q_OS_WIN | ||
162 | #endif | ||
163 | |||
156 | #if defined(Q_OS_MAC9) || defined(Q_OS_MACX) | 164 | #if defined(Q_OS_MAC9) || defined(Q_OS_MACX) |
157 | /* This hack forces the generater to compile qmake not for maxosx native. It is | 165 | # define Q_OS_MAC |
158 | * compiled for Linux and generates usual makefiles.. | ||
159 | * Does anyone has a better solution for this ? (eilers) | ||
160 | */ | ||
161 | // # define Q_OS_MAC | ||
162 | #define Q_OS_LINUX | ||
163 | #warning "boeser Hack !! (se)" | ||
164 | #undef Q_OS_MACX | ||
165 | #endif | 166 | #endif |
166 | 167 | ||
167 | #if defined(Q_OS_MAC9) || defined(Q_OS_MSDOS) || defined(Q_OS_OS2) || defined(Q_OS_WIN32) || defined(Q_OS_WIN64) | 168 | #if defined(Q_OS_MAC9) || defined(Q_OS_MSDOS) || defined(Q_OS_OS2) || defined(Q_OS_WIN) |
168 | # undef Q_OS_UNIX | 169 | # undef Q_OS_UNIX |
169 | #elif !defined(Q_OS_UNIX) | 170 | #elif !defined(Q_OS_UNIX) |
170 | # define Q_OS_UNIX | 171 | # define Q_OS_UNIX |
171 | #endif | 172 | #endif |
172 | 173 | ||
173 | 174 | ||
174 | /* | 175 | /* |
175 | The compiler, must be one of: (Q_CC_x) | 176 | The compiler, must be one of: (Q_CC_x) |
176 | 177 | ||
177 | SYM- Symantec C++ for both PC and Macintosh | 178 | SYM- Symantec C++ for both PC and Macintosh |
178 | MPW- MPW C++ | 179 | MPW- MPW C++ |
179 | MWERKS- Metrowerks CodeWarrior | 180 | MWERKS- Metrowerks CodeWarrior |
180 | MSVC- Microsoft Visual C/C++ | 181 | MSVC- Microsoft Visual C/C++, Intel C++ for Windows |
181 | BOR- Borland/Turbo C++ | 182 | BOR- Borland/Turbo C++ |
182 | WAT- Watcom C++ | 183 | WAT- Watcom C++ |
183 | GNU- GNU C++ | 184 | GNU- GNU C++ |
184 | COMEAU- Comeau C++ | 185 | COMEAU- Comeau C++ |
185 | EDG- Edison Design Group C++ | 186 | EDG- Edison Design Group C++ |
186 | OC - CenterLine C++ | 187 | OC - CenterLine C++ |
187 | SUN- Sun WorkShop, Forte Developer, or Sun ONE Studio C++ | 188 | SUN- Sun WorkShop, Forte Developer, or Sun ONE Studio C++ |
188 | MIPS- MIPSpro C++ | 189 | MIPS- MIPSpro C++ |
189 | DEC- DEC C++ | 190 | DEC- DEC C++ |
190 | HP - HPUX C++ | 191 | HP - HPUX C++ |
191 | HPACC- HPUX ANSI C++ | 192 | HPACC- HPUX ANSI C++ |
192 | USLC- SCO OUDK, UDK, and UnixWare 2.X C++ | 193 | USLC- SCO OUDK, UDK, and UnixWare 2.X C++ |
193 | CDS- Reliant C++ | 194 | CDS- Reliant C++ |
194 | KAI- KAI C++ | 195 | KAI- KAI C++ |
195 | INTEL- Intel C++ | 196 | INTEL- Intel C++ for Linux, Intel C++ for Windows |
196 | HIGHC- MetaWare High C/C++ | 197 | HIGHC- MetaWare High C/C++ |
197 | PGI- Portland Group C++ | 198 | PGI- Portland Group C++ |
198 | GHS- Green Hills Optimizing C++ Compilers | 199 | GHS- Green Hills Optimizing C++ Compilers |
199 | 200 | ||
200 | Should be sorted most to least authoritative. | 201 | Should be sorted most to least authoritative. |
201 | */ | 202 | */ |
202 | 203 | ||
203 | /* Symantec C++ is now Digital Mars */ | 204 | /* Symantec C++ is now Digital Mars */ |
@@ -217,31 +218,38 @@ | |||
217 | # define Q_NO_BOOL_TYPE | 218 | # define Q_NO_BOOL_TYPE |
218 | # define Q_NO_EXPLICIT_KEYWORD | 219 | # define Q_NO_EXPLICIT_KEYWORD |
219 | # define Q_NO_USING_KEYWORD | 220 | # define Q_NO_USING_KEYWORD |
220 | 221 | ||
221 | #elif defined(__MWERKS__) | 222 | #elif defined(__MWERKS__) |
222 | # define Q_CC_MWERKS | 223 | # define Q_CC_MWERKS |
223 | /* "explicit" recognized since 4.0d1 */ | 224 | /* "explicit" recognized since 4.0d1 */ |
224 | # define QMAC_PASCAL pascal | 225 | # define QMAC_PASCAL pascal |
225 | # define Q_NO_USING_KEYWORD /* ### check "using" status */ | ||
226 | 226 | ||
227 | #elif defined(_MSC_VER) | 227 | #elif defined(_MSC_VER) |
228 | # define Q_CC_MSVC | 228 | # define Q_CC_MSVC |
229 | /* proper support of bool for _MSC_VER >= 1100 */ | 229 | /* proper support of bool for _MSC_VER >= 1100 */ |
230 | # define Q_CANNOT_DELETE_CONSTANT | 230 | # define Q_CANNOT_DELETE_CONSTANT |
231 | # define Q_INLINE_TEMPLATES inline | 231 | # define Q_INLINE_TEMPLATES inline |
232 | /* Visual C++.Net issues for _MSC_VER >= 1300 */ | 232 | /* Visual C++.Net issues for _MSC_VER >= 1300 */ |
233 | # if _MSC_VER >= 1300 | 233 | # if _MSC_VER >= 1300 |
234 | # define Q_CC_MSVC_NET | 234 | # define Q_CC_MSVC_NET |
235 | # if _MSC_VER < 1310 | 235 | # if _MSC_VER < 1310 || defined(Q_OS_WIN64) |
236 | # define Q_TYPENAME | 236 | # define Q_TYPENAME |
237 | # endif | 237 | # endif |
238 | # endif | 238 | # endif |
239 | # define Q_NO_USING_KEYWORD /* ### check "using" status */ | 239 | /* Intel C++ disguising as Visual C++: the `using' keyword avoids warnings */ |
240 | # if defined(__INTEL_COMPILER) | ||
241 | # define Q_CC_INTEL | ||
242 | # if !defined(__EXCEPTIONS) | ||
243 | # define Q_NO_EXCEPTIONS | ||
244 | # endif | ||
245 | # else | ||
246 | # define Q_NO_USING_KEYWORD /* ### check "using" status */ | ||
247 | # endif | ||
240 | 248 | ||
241 | #elif defined(__BORLANDC__) || defined(__TURBOC__) | 249 | #elif defined(__BORLANDC__) || defined(__TURBOC__) |
242 | # define Q_CC_BOR | 250 | # define Q_CC_BOR |
243 | # if __BORLANDC__ < 0x502 | 251 | # if __BORLANDC__ < 0x502 |
244 | # define Q_NO_BOOL_TYPE | 252 | # define Q_NO_BOOL_TYPE |
245 | # define Q_NO_EXPLICIT_KEYWORD | 253 | # define Q_NO_EXPLICIT_KEYWORD |
246 | # endif | 254 | # endif |
247 | # define Q_NO_USING_KEYWORD /* ### check "using" status */ | 255 | # define Q_NO_USING_KEYWORD /* ### check "using" status */ |
@@ -279,18 +287,27 @@ | |||
279 | /* GCC 2.95 knows "using" but does not support it correctly */ | 287 | /* GCC 2.95 knows "using" but does not support it correctly */ |
280 | # if __GNUC__ == 2 && __GNUC_MINOR__ <= 95 | 288 | # if __GNUC__ == 2 && __GNUC_MINOR__ <= 95 |
281 | # define Q_NO_USING_KEYWORD | 289 | # define Q_NO_USING_KEYWORD |
282 | # endif | 290 | # endif |
283 | /* GCC 3.1 and GCC 3.2 wrongly define _SB_CTYPE_MACROS on HP-UX */ | 291 | /* GCC 3.1 and GCC 3.2 wrongly define _SB_CTYPE_MACROS on HP-UX */ |
284 | # if defined(Q_OS_HPUX) && __GNUC__ == 3 && __GNUC_MINOR__ >= 1 | 292 | # if defined(Q_OS_HPUX) && __GNUC__ == 3 && __GNUC_MINOR__ >= 1 |
285 | # define Q_WRONG_SB_CTYPE_MACROS | 293 | # define Q_WRONG_SB_CTYPE_MACROS |
286 | # endif | 294 | # endif |
295 | |||
296 | /* 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 | ||
298 | 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 | ||
300 | supposedly know what you are doing.) */ | ||
287 | # if (defined(__arm__) || defined(__ARMEL__)) && !defined(QT_MOC_CPP) | 301 | # if (defined(__arm__) || defined(__ARMEL__)) && !defined(QT_MOC_CPP) |
288 | # define Q_PACKED __attribute__ ((packed)) | 302 | # define Q_PACKED __attribute__ ((packed)) |
303 | # if __GNUC__ == 3 && __GNUC_MINOR__ >= 4 | ||
304 | # define Q_NO_PACKED_REFERENCE | ||
305 | # endif | ||
289 | # endif | 306 | # endif |
290 | # if !defined(__EXCEPTIONS) | 307 | # if !defined(__EXCEPTIONS) |
291 | # define Q_NO_EXCEPTIONS | 308 | # define Q_NO_EXCEPTIONS |
292 | # endif | 309 | # endif |
293 | 310 | ||
294 | /* IBM compiler versions are a bit messy. There are actually two products: | 311 | /* IBM compiler versions are a bit messy. There are actually two products: |
295 | the C product, and the C++ product. The C++ compiler is always packaged | 312 | the C product, and the C++ product. The C++ compiler is always packaged |
296 | with the latest version of the C compiler. Version numbers do not always | 313 | with the latest version of the C compiler. Version numbers do not always |
@@ -300,16 +317,18 @@ | |||
300 | 317 | ||
301 | C Set 3.1 C Compiler 3.0 | 318 | C Set 3.1 C Compiler 3.0 |
302 | ... ... | 319 | ... ... |
303 | C++ Compiler 3.6.6 C Compiler 4.3 | 320 | C++ Compiler 3.6.6 C Compiler 4.3 |
304 | ... ... | 321 | ... ... |
305 | Visual Age C++ 4.0 ... | 322 | Visual Age C++ 4.0 ... |
306 | ... ... | 323 | ... ... |
307 | Visual Age C++ 5.0 C Compiler 5.0 | 324 | Visual Age C++ 5.0 C Compiler 5.0 |
325 | ... ... | ||
326 | Visual Age C++ 6.0 C Compiler 6.0 | ||
308 | 327 | ||
309 | Now: | 328 | Now: |
310 | __xlC__ is the version of the C compiler in hexadecimal notation | 329 | __xlC__ is the version of the C compiler in hexadecimal notation |
311 | is only an approximation of the C++ compiler version | 330 | is only an approximation of the C++ compiler version |
312 | __IBMCPP__ is the version of the C++ compiler in decimal notation | 331 | __IBMCPP__ is the version of the C++ compiler in decimal notation |
313 | but it is not defined on older compilers like C Set 3.1 */ | 332 | but it is not defined on older compilers like C Set 3.1 */ |
314 | #elif defined(__xlC__) | 333 | #elif defined(__xlC__) |
315 | # define Q_CC_XLC | 334 | # define Q_CC_XLC |
@@ -324,17 +343,17 @@ | |||
324 | # define Q_CANNOT_DELETE_CONSTANT | 343 | # define Q_CANNOT_DELETE_CONSTANT |
325 | # endif | 344 | # endif |
326 | 345 | ||
327 | /* Older versions of DEC C++ do not define __EDG__ or __EDG - observed | 346 | /* Older versions of DEC C++ do not define __EDG__ or __EDG - observed |
328 | on DEC C++ V5.5-004. New versions do define __EDG__ - observed on | 347 | on DEC C++ V5.5-004. New versions do define __EDG__ - observed on |
329 | Compaq C++ V6.3-002. | 348 | Compaq C++ V6.3-002. |
330 | This compiler is different enough from other EDG compilers to handle | 349 | This compiler is different enough from other EDG compilers to handle |
331 | it separately anyway. */ | 350 | it separately anyway. */ |
332 | #elif defined(__DECCXX) | 351 | #elif defined(__DECCXX) || defined(__DECC) |
333 | # define Q_CC_DEC | 352 | # define Q_CC_DEC |
334 | /* Compaq C++ V6 compilers are EDG-based but I'm not sure about older | 353 | /* Compaq C++ V6 compilers are EDG-based but I'm not sure about older |
335 | DEC C++ V5 compilers. */ | 354 | DEC C++ V5 compilers. */ |
336 | # if defined(__EDG__) | 355 | # if defined(__EDG__) |
337 | # define Q_CC_EDG | 356 | # define Q_CC_EDG |
338 | # endif | 357 | # endif |
339 | /* Compaq have disabled EDG's _BOOL macro and use _BOOL_EXISTS instead | 358 | /* Compaq have disabled EDG's _BOOL macro and use _BOOL_EXISTS instead |
340 | - observed on Compaq C++ V6.3-002. | 359 | - observed on Compaq C++ V6.3-002. |
@@ -365,29 +384,33 @@ | |||
365 | predefined macro is specified by a configuration flag. _BOOL | 384 | predefined macro is specified by a configuration flag. _BOOL |
366 | is the default. | 385 | is the default. |
367 | __BOOL_DEFINED | 386 | __BOOL_DEFINED |
368 | Defined in Microsoft C++ mode when bool is a keyword. */ | 387 | Defined in Microsoft C++ mode when bool is a keyword. */ |
369 | # if !defined(_BOOL) && !defined(__BOOL_DEFINED) | 388 | # if !defined(_BOOL) && !defined(__BOOL_DEFINED) |
370 | # define Q_NO_BOOL_TYPE | 389 | # define Q_NO_BOOL_TYPE |
371 | # endif | 390 | # endif |
372 | 391 | ||
373 | /* The Portland Group compiler is based on EDG and does define __EDG__ */ | 392 | /* The Comeau compiler is based on EDG and does define __EDG__ */ |
374 | # if defined(__COMO__) | 393 | # if defined(__COMO__) |
375 | # define Q_CC_COMEAU | 394 | # define Q_CC_COMEAU |
376 | # define Q_C_CALLBACKS | 395 | # define Q_C_CALLBACKS |
377 | 396 | ||
378 | /* Using the `using' keyword avoids KAI C++ warnings */ | 397 | /* The `using' keyword was introduced to avoid KAI C++ warnings |
398 | but it's now causing KAI C++ errors instead. The standard is | ||
399 | unclear about the use of this keyword, and in practice every | ||
400 | compiler is using its own set of rules. Forget it. */ | ||
379 | # elif defined(__KCC) | 401 | # elif defined(__KCC) |
380 | # define Q_CC_KAI | 402 | # define Q_CC_KAI |
381 | # if !defined(_EXCEPTIONS) | 403 | # if !defined(_EXCEPTIONS) |
382 | # define Q_NO_EXCEPTIONS | 404 | # define Q_NO_EXCEPTIONS |
383 | # endif | 405 | # endif |
406 | # define Q_NO_USING_KEYWORD | ||
384 | 407 | ||
385 | /* Using the `using' keyword avoids Intel C++ warnings */ | 408 | /* Using the `using' keyword avoids Intel C++ for Linux warnings */ |
386 | # elif defined(__INTEL_COMPILER) | 409 | # elif defined(__INTEL_COMPILER) |
387 | # define Q_CC_INTEL | 410 | # define Q_CC_INTEL |
388 | # if !defined(__EXCEPTIONS) | 411 | # if !defined(__EXCEPTIONS) |
389 | # define Q_NO_EXCEPTIONS | 412 | # define Q_NO_EXCEPTIONS |
390 | # endif | 413 | # endif |
391 | 414 | ||
392 | /* The Portland Group compiler is based on EDG and does define __EDG__ */ | 415 | /* The Portland Group compiler is based on EDG and does define __EDG__ */ |
393 | # elif defined(__PGI) | 416 | # elif defined(__PGI) |
@@ -425,40 +448,42 @@ | |||
425 | 448 | ||
426 | /* The MIPSpro compiler in o32 mode is based on EDG but disables features | 449 | /* The MIPSpro compiler in o32 mode is based on EDG but disables features |
427 | such as template specialization nevertheless */ | 450 | such as template specialization nevertheless */ |
428 | # elif defined(__sgi) | 451 | # elif defined(__sgi) |
429 | # define Q_CC_MIPS | 452 | # define Q_CC_MIPS |
430 | # if defined(_MIPS_SIM) && (_MIPS_SIM == _ABIO32) /* o32 ABI */ | 453 | # if defined(_MIPS_SIM) && (_MIPS_SIM == _ABIO32) /* o32 ABI */ |
431 | # define Q_TYPENAME | 454 | # define Q_TYPENAME |
432 | # define Q_BROKEN_TEMPLATE_SPECIALIZATION | 455 | # define Q_BROKEN_TEMPLATE_SPECIALIZATION |
433 | # define Q_STRICT_INLINING_RULES | ||
434 | # define Q_NO_EXPLICIT_KEYWORD | 456 | # define Q_NO_EXPLICIT_KEYWORD |
435 | # define Q_INLINE_TEMPLATES inline | 457 | # define Q_INLINE_TEMPLATES inline |
436 | # elif defined(_COMPILER_VERSION) && (_COMPILER_VERSION < 730) /* 7.2 */ | 458 | # elif defined(_COMPILER_VERSION) && (_COMPILER_VERSION < 730) /* 7.2 */ |
437 | # define Q_TYPENAME | 459 | # define Q_TYPENAME |
438 | # define Q_BROKEN_TEMPLATE_SPECIALIZATION | 460 | # define Q_BROKEN_TEMPLATE_SPECIALIZATION |
439 | # endif | 461 | # endif |
440 | # define Q_NO_USING_KEYWORD /* ### check "using" status */ | 462 | # define Q_NO_USING_KEYWORD /* ### check "using" status */ |
463 | # if defined(_COMPILER_VERSION) && (_COMPILER_VERSION >= 740) | ||
464 | # pragma set woff 3624,3625, 3649 /* turn off some harmless warnings */ | ||
465 | # endif | ||
441 | # endif | 466 | # endif |
442 | 467 | ||
443 | /* The older UnixWare 2.X compiler? */ | 468 | /* The older UnixWare 2.X compiler? */ |
444 | #elif defined(__USLC__) | 469 | #elif defined(__USLC__) |
445 | # define Q_CC_USLC | 470 | # define Q_CC_USLC |
446 | # define Q_TYPENAME | 471 | # define Q_TYPENAME |
447 | # define Q_NO_BOOL_TYPE | 472 | # define Q_NO_BOOL_TYPE |
448 | # define Q_NO_EXPLICIT_KEYWORD | 473 | # define Q_NO_EXPLICIT_KEYWORD |
449 | # define Q_NO_USING_KEYWORD | 474 | # define Q_NO_USING_KEYWORD |
450 | # define Q_INLINE_TEMPLATES inline | 475 | # define Q_INLINE_TEMPLATES inline |
451 | 476 | ||
452 | /* Never tested! */ | 477 | /* Never tested! */ |
453 | #elif defined(__HIGHC__) | 478 | #elif defined(__HIGHC__) |
454 | # define Q_CC_HIGHC | 479 | # define Q_CC_HIGHC |
455 | 480 | ||
456 | #elif defined(__SUNPRO_CC) | 481 | #elif defined(__SUNPRO_CC) || defined(__SUNPRO_C) |
457 | # define Q_CC_SUN | 482 | # define Q_CC_SUN |
458 | /* 5.0 compiler or better | 483 | /* 5.0 compiler or better |
459 | 'bool' is enabled by default but can be disabled using -features=nobool | 484 | 'bool' is enabled by default but can be disabled using -features=nobool |
460 | in which case _BOOL is not defined | 485 | in which case _BOOL is not defined |
461 | this is the default in 4.2 compatibility mode triggered by -compat=4 */ | 486 | this is the default in 4.2 compatibility mode triggered by -compat=4 */ |
462 | # if __SUNPRO_CC >= 0x500 | 487 | # if __SUNPRO_CC >= 0x500 |
463 | # if !defined(_BOOL) | 488 | # if !defined(_BOOL) |
464 | # define Q_NO_BOOL_TYPE | 489 | # define Q_NO_BOOL_TYPE |
@@ -600,16 +625,23 @@ const bool TRUE = !0; | |||
600 | #endif | 625 | #endif |
601 | #if defined(__WATCOMC__) | 626 | #if defined(__WATCOMC__) |
602 | # if defined(Q_OS_QNX4) | 627 | # if defined(Q_OS_QNX4) |
603 | const bool false = FALSE; | 628 | const bool false = FALSE; |
604 | const bool true = TRUE; | 629 | const bool true = TRUE; |
605 | # endif | 630 | # endif |
606 | #endif | 631 | #endif |
607 | 632 | ||
633 | // | ||
634 | // Proper for-scoping | ||
635 | // ### turn on in 4.0 | ||
636 | |||
637 | #if 0 && defined(Q_CC_MSVC) && !defined(Q_CC_MSVC_NET) | ||
638 | # define for if(0){}else for | ||
639 | #endif | ||
608 | 640 | ||
609 | // | 641 | // |
610 | // Use the "explicit" keyword on platforms that support it. | 642 | // Use the "explicit" keyword on platforms that support it. |
611 | // | 643 | // |
612 | 644 | ||
613 | #if !defined(Q_NO_EXPLICIT_KEYWORD) | 645 | #if !defined(Q_NO_EXPLICIT_KEYWORD) |
614 | # define Q_EXPLICIT explicit | 646 | # define Q_EXPLICIT explicit |
615 | #else | 647 | #else |
@@ -660,36 +692,41 @@ typedef unsigned int UINT32; // 32 bit unsigned | |||
660 | 692 | ||
661 | typedef signed char Q_INT8; // 8 bit signed | 693 | typedef signed char Q_INT8; // 8 bit signed |
662 | typedef unsigned char Q_UINT8;// 8 bit unsigned | 694 | typedef unsigned char Q_UINT8;// 8 bit unsigned |
663 | typedef short Q_INT16;// 16 bit signed | 695 | typedef short Q_INT16;// 16 bit signed |
664 | typedef unsigned short Q_UINT16;// 16 bit unsigned | 696 | typedef unsigned short Q_UINT16;// 16 bit unsigned |
665 | typedef int Q_INT32;// 32 bit signed | 697 | typedef int Q_INT32;// 32 bit signed |
666 | typedef unsigned int Q_UINT32;// 32 bit unsigned | 698 | typedef unsigned int Q_UINT32;// 32 bit unsigned |
667 | #if defined(Q_OS_WIN64) | 699 | #if defined(Q_OS_WIN64) |
668 | // LLP64 64-bit model on Windows | ||
669 | typedef __int64 Q_LONG; // word up to 64 bit signed | 700 | typedef __int64 Q_LONG; // word up to 64 bit signed |
670 | typedef unsigned __int64 Q_ULONG;// word up to 64 bit unsigned | 701 | typedef unsigned __int64 Q_ULONG;// word up to 64 bit unsigned |
671 | #else | 702 | #else |
672 | // LP64 64-bit model on Linux | 703 | typedef long Q_LONG; // word up to 64 bit signed |
673 | typedef long Q_LONG; | 704 | typedef unsigned long Q_ULONG;// word up to 64 bit unsigned |
674 | typedef unsigned long Q_ULONG; | ||
675 | #endif | 705 | #endif |
676 | 706 | #if defined(Q_OS_WIN) && !defined(Q_CC_GNU) | |
677 | #if !defined(QT_CLEAN_NAMESPACE) | 707 | # define Q_INT64_C(c) c ## i64// signed 64 bit constant |
678 | // mininum size of 64 bits is not guaranteed | 708 | # define Q_UINT64_C(c) c ## ui64// unsigned 64 bit constant |
679 | #define Q_INT64 Q_LONG | 709 | typedef __int64 Q_INT64;// 64 bit signed |
680 | #define Q_UINT64 Q_ULONG | 710 | typedef unsigned __int64 Q_UINT64;// 64 bit unsigned |
711 | #else | ||
712 | # define Q_INT64_C(c) c ## LL // signed 64 bit constant | ||
713 | # define Q_UINT64_C(c) c ## ULL// unsigned 64 bit constant | ||
714 | typedef long long Q_INT64;// 64 bit signed | ||
715 | typedef unsigned long long Q_UINT64;// 64 bit unsigned | ||
681 | #endif | 716 | #endif |
717 | typedef Q_INT64 Q_LLONG;// signed long long | ||
718 | typedef Q_UINT64 Q_ULLONG;// unsigned long long | ||
682 | 719 | ||
683 | #if defined(Q_OS_MACX) && !defined(QT_LARGEFILE_SUPPORT) | 720 | #if defined(Q_OS_MACX) && !defined(QT_LARGEFILE_SUPPORT) |
684 | # define QT_LARGEFILE_SUPPORT 64 | 721 | # define QT_LARGEFILE_SUPPORT 64 |
685 | #endif | 722 | #endif |
686 | #if defined(QT_LARGEFILE_SUPPORT) | 723 | #if defined(QT_LARGEFILE_SUPPORT) |
687 | typedef unsigned long long QtOffset; | 724 | typedef Q_ULLONG QtOffset; |
688 | #else | 725 | #else |
689 | typedef Q_ULONG QtOffset; | 726 | typedef Q_ULONG QtOffset; |
690 | #endif | 727 | #endif |
691 | 728 | ||
692 | 729 | ||
693 | // | 730 | // |
694 | // Data stream functions is provided by many classes (defined in qdatastream.h) | 731 | // Data stream functions is provided by many classes (defined in qdatastream.h) |
695 | // | 732 | // |
@@ -703,37 +740,40 @@ class QDataStream; | |||
703 | // Note that disabling some features will produce a libqt that is not | 740 | // Note that disabling some features will produce a libqt that is not |
704 | // compatible with other libqt builds. Such modifications are only | 741 | // compatible with other libqt builds. Such modifications are only |
705 | // supported on Qt/Embedded where reducing the library size is important | 742 | // supported on Qt/Embedded where reducing the library size is important |
706 | // and where the application-suite is often a fixed set. | 743 | // and where the application-suite is often a fixed set. |
707 | // | 744 | // |
708 | 745 | ||
709 | #if !defined(QT_MOC) | 746 | #if !defined(QT_MOC) |
710 | #if defined(QCONFIG_LOCAL) | 747 | #if defined(QCONFIG_LOCAL) |
711 | #include <qconfig-local.h> | 748 | #include "qconfig-local.h" |
712 | #elif defined(QCONFIG_MINIMAL) | 749 | #elif defined(QCONFIG_MINIMAL) |
713 | #include <qconfig-minimal.h> | 750 | #include "qconfig-minimal.h" |
714 | #elif defined(QCONFIG_SMALL) | 751 | #elif defined(QCONFIG_SMALL) |
715 | #include <qconfig-small.h> | 752 | #include "qconfig-small.h" |
716 | #elif defined(QCONFIG_MEDIUM) | 753 | #elif defined(QCONFIG_MEDIUM) |
717 | #include <qconfig-medium.h> | 754 | #include "qconfig-medium.h" |
718 | #elif defined(QCONFIG_LARGE) | 755 | #elif defined(QCONFIG_LARGE) |
719 | #include <qconfig-large.h> | 756 | #include "qconfig-large.h" |
720 | #else // everything... | 757 | #else // everything... |
721 | #include <qconfig.h> | 758 | #include "qconfig.h" |
722 | #endif | 759 | #endif |
723 | #endif | 760 | #endif |
724 | 761 | ||
725 | 762 | ||
726 | #ifndef QT_BUILD_KEY | 763 | #ifndef QT_BUILD_KEY |
727 | #define QT_BUILD_KEY "unspecified" | 764 | #define QT_BUILD_KEY "unspecified" |
728 | #endif | 765 | #endif |
729 | 766 | ||
730 | // prune to local config | 767 | // prune to local config |
731 | #include "qmodules.h" | 768 | #include "qmodules.h" |
769 | #ifndef QT_MODULE_DIALOGS | ||
770 | # define QT_NO_DIALOG | ||
771 | #endif | ||
732 | #ifndef QT_MODULE_ICONVIEW | 772 | #ifndef QT_MODULE_ICONVIEW |
733 | # define QT_NO_ICONVIEW | 773 | # define QT_NO_ICONVIEW |
734 | #endif | 774 | #endif |
735 | #ifndef QT_MODULE_WORKSPACE | 775 | #ifndef QT_MODULE_WORKSPACE |
736 | # define QT_NO_WORKSPACE | 776 | # define QT_NO_WORKSPACE |
737 | #endif | 777 | #endif |
738 | #ifndef QT_MODULE_NETWORK | 778 | #ifndef QT_MODULE_NETWORK |
739 | #define QT_NO_NETWORK | 779 | #define QT_NO_NETWORK |
@@ -776,26 +816,26 @@ class QDataStream; | |||
776 | # endif | 816 | # endif |
777 | #endif | 817 | #endif |
778 | 818 | ||
779 | #if !defined(Q_WS_QWS) && !defined(QT_NO_COP) | 819 | #if !defined(Q_WS_QWS) && !defined(QT_NO_COP) |
780 | # define QT_NO_COP | 820 | # define QT_NO_COP |
781 | #endif | 821 | #endif |
782 | 822 | ||
783 | #ifndef QT_H | 823 | #ifndef QT_H |
784 | #include <qfeatures.h> | 824 | #include "qfeatures.h" |
785 | #endif // QT_H | 825 | #endif /* QT_H */ |
786 | 826 | ||
787 | 827 | ||
788 | // | 828 | // |
789 | // Create Qt DLL if QT_DLL is defined (Windows only) | 829 | // Create Qt DLL if QT_DLL is defined (Windows only) |
790 | // or QT_SHARED is defined (Kylix only) | 830 | // or QT_SHARED is defined (Kylix only) |
791 | // | 831 | // |
792 | 832 | ||
793 | #if defined(Q_OS_WIN32) || defined(Q_OS_WIN64) | 833 | #if defined(Q_OS_WIN) |
794 | # if defined(QT_NODLL) | 834 | # if defined(QT_NODLL) |
795 | # undef QT_MAKEDLL | 835 | # undef QT_MAKEDLL |
796 | # undef QT_DLL | 836 | # undef QT_DLL |
797 | # elif defined(QT_MAKEDLL)/* create a Qt DLL library */ | 837 | # elif defined(QT_MAKEDLL)/* create a Qt DLL library */ |
798 | # if defined(QT_DLL) | 838 | # if defined(QT_DLL) |
799 | # undef QT_DLL | 839 | # undef QT_DLL |
800 | # endif | 840 | # endif |
801 | # define Q_EXPORT __declspec(dllexport) | 841 | # define Q_EXPORT __declspec(dllexport) |
@@ -845,16 +885,17 @@ extern Q_EXPORT bool qt_winunicode; | |||
845 | 885 | ||
846 | 886 | ||
847 | // | 887 | // |
848 | // System information | 888 | // System information |
849 | // | 889 | // |
850 | 890 | ||
851 | Q_EXPORT const char *qVersion(); | 891 | Q_EXPORT const char *qVersion(); |
852 | Q_EXPORT bool qSysInfo( int *wordSize, bool *bigEndian ); | 892 | Q_EXPORT bool qSysInfo( int *wordSize, bool *bigEndian ); |
893 | Q_EXPORT bool qSharedBuild(); | ||
853 | #if defined(Q_OS_MAC) | 894 | #if defined(Q_OS_MAC) |
854 | int qMacVersion(); | 895 | int qMacVersion(); |
855 | #elif defined(Q_WS_WIN) | 896 | #elif defined(Q_WS_WIN) |
856 | Q_EXPORT int qWinVersion(); | 897 | Q_EXPORT int qWinVersion(); |
857 | #if defined(UNICODE) | 898 | #if defined(UNICODE) |
858 | #define QT_WA( uni, ansi ) if ( qt_winunicode ) { uni } else { ansi } | 899 | #define QT_WA( uni, ansi ) if ( qt_winunicode ) { uni } else { ansi } |
859 | #define QT_WA_INLINE( uni, ansi ) ( qt_winunicode ? uni : ansi ) | 900 | #define QT_WA_INLINE( uni, ansi ) ( qt_winunicode ? uni : ansi ) |
860 | #else | 901 | #else |
@@ -878,17 +919,16 @@ Q_EXPORT int qWinVersion(); | |||
878 | 919 | ||
879 | #ifndef Q_TYPENAME | 920 | #ifndef Q_TYPENAME |
880 | # define Q_TYPENAME typename | 921 | # define Q_TYPENAME typename |
881 | #endif | 922 | #endif |
882 | 923 | ||
883 | // | 924 | // |
884 | // Use to avoid "unused parameter" warnings | 925 | // Use to avoid "unused parameter" warnings |
885 | // | 926 | // |
886 | |||
887 | #define Q_UNUSED(x) (void)x; | 927 | #define Q_UNUSED(x) (void)x; |
888 | 928 | ||
889 | // | 929 | // |
890 | // Debugging and error handling | 930 | // Debugging and error handling |
891 | // | 931 | // |
892 | 932 | ||
893 | #if !defined(QT_NO_CHECK) | 933 | #if !defined(QT_NO_CHECK) |
894 | # define QT_CHECK_STATE // check state of objects etc. | 934 | # define QT_CHECK_STATE // check state of objects etc. |
@@ -1010,42 +1050,46 @@ Q_EXPORT void qObsolete( const char *message ); | |||
1010 | 1050 | ||
1011 | Q_EXPORT const char *qInstallPath(); | 1051 | Q_EXPORT const char *qInstallPath(); |
1012 | Q_EXPORT const char *qInstallPathDocs(); | 1052 | Q_EXPORT const char *qInstallPathDocs(); |
1013 | Q_EXPORT const char *qInstallPathHeaders(); | 1053 | Q_EXPORT const char *qInstallPathHeaders(); |
1014 | Q_EXPORT const char *qInstallPathLibs(); | 1054 | Q_EXPORT const char *qInstallPathLibs(); |
1015 | Q_EXPORT const char *qInstallPathBins(); | 1055 | Q_EXPORT const char *qInstallPathBins(); |
1016 | Q_EXPORT const char *qInstallPathPlugins(); | 1056 | Q_EXPORT const char *qInstallPathPlugins(); |
1017 | Q_EXPORT const char *qInstallPathData(); | 1057 | Q_EXPORT const char *qInstallPathData(); |
1058 | Q_EXPORT const char *qInstallPathTranslations(); | ||
1059 | Q_EXPORT const char *qInstallPathSysconf(); | ||
1018 | 1060 | ||
1019 | #endif // __cplusplus | 1061 | #endif /* __cplusplus */ |
1020 | 1062 | ||
1021 | // compilers which follow outdated template instantiation rules | 1063 | /* |
1022 | // require a class to have a comparison operator to exist when | 1064 | compilers which follow outdated template instantiation rules |
1023 | // a QValueList of this type is instantiated. It's not actually | 1065 | require a class to have a comparison operator to exist when |
1024 | // used in the list, though. Hence the dummy implementation. | 1066 | a QValueList of this type is instantiated. It's not actually |
1025 | // Just in case other code relies on it we better trigger a warning | 1067 | used in the list, though. Hence the dummy implementation. |
1026 | // mandating a real implementation. | 1068 | Just in case other code relies on it we better trigger a warning |
1069 | mandating a real implementation. | ||
1070 | */ | ||
1027 | #ifdef Q_FULL_TEMPLATE_INSTANTIATION | 1071 | #ifdef Q_FULL_TEMPLATE_INSTANTIATION |
1028 | # define Q_DUMMY_COMPARISON_OPERATOR(C) \ | 1072 | # define Q_DUMMY_COMPARISON_OPERATOR(C) \ |
1029 | bool operator==( const C& ) const { \ | 1073 | bool operator==( const C& ) const { \ |
1030 | qWarning( #C"::operator==( const "#C"& ) got called." ); \ | 1074 | qWarning( #C"::operator==( const "#C"& ) got called." ); \ |
1031 | return FALSE; \ | 1075 | return FALSE; \ |
1032 | } | 1076 | } |
1033 | #else | 1077 | #else |
1034 | # define Q_DUMMY_COMPARISON_OPERATOR(C) | 1078 | # define Q_DUMMY_COMPARISON_OPERATOR(C) |
1035 | #endif | 1079 | #endif |
1036 | 1080 | ||
1037 | #endif // QGLOBAL_H | 1081 | #endif /* QGLOBAL_H */ |
1038 | 1082 | ||
1039 | // | 1083 | /* |
1040 | // Avoid some particularly useless warnings from some stupid compilers. | 1084 | Avoid some particularly useless warnings from some stupid compilers. |
1041 | // To get ALL C++ compiler warnings, define QT_CC_WARNINGS or comment out | 1085 | To get ALL C++ compiler warnings, define QT_CC_WARNINGS or comment out |
1042 | // the line "#define QT_NO_WARNINGS" | 1086 | the line "#define QT_NO_WARNINGS" |
1043 | // | 1087 | */ |
1044 | 1088 | ||
1045 | #if !defined(QT_CC_WARNINGS) | 1089 | #if !defined(QT_CC_WARNINGS) |
1046 | # define QT_NO_WARNINGS | 1090 | # define QT_NO_WARNINGS |
1047 | #endif | 1091 | #endif |
1048 | #if defined(QT_NO_WARNINGS) | 1092 | #if defined(QT_NO_WARNINGS) |
1049 | # if defined(Q_CC_MSVC) | 1093 | # if defined(Q_CC_MSVC) |
1050 | # pragma warning(disable: 4244) // 'conversion' conversion from 'type1' to 'type2', possible loss of data | 1094 | # pragma warning(disable: 4244) // 'conversion' conversion from 'type1' to 'type2', possible loss of data |
1051 | # pragma warning(disable: 4275) // non - DLL-interface classkey 'identifier' used as base for DLL-interface classkey 'identifier' | 1095 | # pragma warning(disable: 4275) // non - DLL-interface classkey 'identifier' used as base for DLL-interface classkey 'identifier' |
@@ -1061,12 +1105,11 @@ Q_EXPORT const char *qInstallPathData(); | |||
1061 | # elif defined(Q_CC_BOR) | 1105 | # elif defined(Q_CC_BOR) |
1062 | # pragma option -w-inl | 1106 | # pragma option -w-inl |
1063 | # pragma option -w-aus | 1107 | # pragma option -w-aus |
1064 | # pragma warn -inl | 1108 | # pragma warn -inl |
1065 | # pragma warn -pia | 1109 | # pragma warn -pia |
1066 | # pragma warn -ccc | 1110 | # pragma warn -ccc |
1067 | # pragma warn -rch | 1111 | # pragma warn -rch |
1068 | # pragma warn -sig | 1112 | # pragma warn -sig |
1069 | # elif defined(Q_CC_MWERKS) | ||
1070 | # pragma warn_possunwant off | ||
1071 | # endif | 1113 | # endif |
1072 | #endif | 1114 | #endif |
1115 | |||