summaryrefslogtreecommitdiff
path: root/qmake/include/qglobal.h
Unidiff
Diffstat (limited to 'qmake/include/qglobal.h') (more/less context) (ignore whitespace changes)
-rw-r--r--qmake/include/qglobal.h165
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,3 +1,3 @@
1/**************************************************************************** 1/****************************************************************************
2** $Id$ 2**
3** 3**
@@ -7,3 +7,3 @@
7** 7**
8** Copyright (C) 1992-2002 Trolltech AS. All rights reserved. 8** Copyright (C) 1992-2003 Trolltech AS. All rights reserved.
9** 9**
@@ -40,3 +40,3 @@
40 40
41#define QT_VERSION_STR "3.1.2" 41#define QT_VERSION_STR "3.3.2"
42/* 42/*
@@ -44,3 +44,3 @@
44 */ 44 */
45#define QT_VERSION 0x030102 45#define QT_VERSION 0x030302
46 46
@@ -51,2 +51,3 @@
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
@@ -80,3 +81,5 @@
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
@@ -113,3 +116,3 @@
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
@@ -151,2 +154,3 @@
151# define Q_OS_UNIXWARE7 154# define Q_OS_UNIXWARE7
155#elif defined(__MAKEDEPEND__)
152#else 156#else
@@ -155,14 +159,11 @@
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
@@ -179,3 +180,3 @@
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++
@@ -194,3 +195,3 @@
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++
@@ -224,3 +225,2 @@
224# define QMAC_PASCAL pascal 225# define QMAC_PASCAL pascal
225# define Q_NO_USING_KEYWORD /* ### check "using" status */
226 226
@@ -234,3 +234,3 @@
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
@@ -238,3 +238,11 @@
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
@@ -286,4 +294,13 @@
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
@@ -307,2 +324,4 @@
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
@@ -331,3 +350,3 @@
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
@@ -372,3 +391,3 @@
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__)
@@ -377,3 +396,6 @@
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)
@@ -383,4 +405,5 @@
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)
@@ -432,3 +455,2 @@
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
@@ -440,2 +462,5 @@
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
@@ -455,3 +480,3 @@
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
@@ -607,2 +632,9 @@ const bool true = TRUE;
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
@@ -667,3 +699,2 @@ 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
@@ -671,12 +702,18 @@ 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
@@ -686,3 +723,3 @@ typedef unsigned long Q_ULONG;
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
@@ -710,13 +747,13 @@ class QDataStream;
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
@@ -731,2 +768,5 @@ class QDataStream;
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
@@ -783,4 +823,4 @@ class QDataStream;
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
@@ -792,3 +832,3 @@ class QDataStream;
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)
@@ -852,2 +892,3 @@ Q_EXPORT const char *qVersion();
852Q_EXPORT bool qSysInfo( int *wordSize, bool *bigEndian ); 892Q_EXPORT bool qSysInfo( int *wordSize, bool *bigEndian );
893Q_EXPORT bool qSharedBuild();
853#if defined(Q_OS_MAC) 894#if defined(Q_OS_MAC)
@@ -885,3 +926,2 @@ Q_EXPORT int qWinVersion();
885// 926//
886
887#define Q_UNUSED(x) (void)x; 927#define Q_UNUSED(x) (void)x;
@@ -1017,11 +1057,15 @@ Q_EXPORT const char *qInstallPathPlugins();
1017Q_EXPORT const char *qInstallPathData(); 1057Q_EXPORT const char *qInstallPathData();
1058Q_EXPORT const char *qInstallPathTranslations();
1059Q_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
@@ -1036,9 +1080,9 @@ Q_EXPORT const char *qInstallPathData();
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
@@ -1068,5 +1112,4 @@ Q_EXPORT const char *qInstallPathData();
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