-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,3 +1,3 @@ /**************************************************************************** -** $Id$ +** ** @@ -7,3 +7,3 @@ ** -** Copyright (C) 1992-2002 Trolltech AS. All rights reserved. +** Copyright (C) 1992-2003 Trolltech AS. All rights reserved. ** @@ -40,3 +40,3 @@ -#define QT_VERSION_STR "3.1.2" +#define QT_VERSION_STR "3.3.2" /* @@ -44,3 +44,3 @@ */ -#define QT_VERSION 0x030102 +#define QT_VERSION 0x030302 @@ -51,2 +51,3 @@ MAC9 - Mac OS 9 + DARWIN - Darwin OS (Without Mac OS X) MSDOS - MS-DOS and Windows @@ -80,3 +81,5 @@ -#if defined(__APPLE__) && defined(__GNUC__) +#if defined(__DARWIN_X11__) +# define Q_OS_DARWIN +#elif defined(__APPLE__) && defined(__GNUC__) # define Q_OS_MACX @@ -113,3 +116,3 @@ # define Q_OS_LINUX -#elif defined(__FreeBSD__) +#elif defined(__FreeBSD__) || defined(__DragonFly__) # define Q_OS_FREEBSD @@ -151,2 +154,3 @@ # define Q_OS_UNIXWARE7 +#elif defined(__MAKEDEPEND__) #else @@ -155,14 +159,11 @@ +#if defined(Q_OS_WIN32) || defined(Q_OS_WIN64) +# define Q_OS_WIN +#endif + #if defined(Q_OS_MAC9) || defined(Q_OS_MACX) -/* This hack forces the generater to compile qmake not for maxosx native. It is - * compiled for Linux and generates usual makefiles.. - * Does anyone has a better solution for this ? (eilers) - */ -// # define Q_OS_MAC -#define Q_OS_LINUX -#warning "boeser Hack !! (se)" -#undef Q_OS_MACX +# define Q_OS_MAC #endif -#if defined(Q_OS_MAC9) || defined(Q_OS_MSDOS) || defined(Q_OS_OS2) || defined(Q_OS_WIN32) || defined(Q_OS_WIN64) +#if defined(Q_OS_MAC9) || defined(Q_OS_MSDOS) || defined(Q_OS_OS2) || defined(Q_OS_WIN) # undef Q_OS_UNIX @@ -179,3 +180,3 @@ MWERKS - Metrowerks CodeWarrior - MSVC - Microsoft Visual C/C++ + MSVC - Microsoft Visual C/C++, Intel C++ for Windows BOR - Borland/Turbo C++ @@ -194,3 +195,3 @@ KAI - KAI C++ - INTEL - Intel C++ + INTEL - Intel C++ for Linux, Intel C++ for Windows HIGHC - MetaWare High C/C++ @@ -224,3 +225,2 @@ # define QMAC_PASCAL pascal -# define Q_NO_USING_KEYWORD /* ### check "using" status */ @@ -234,3 +234,3 @@ # define Q_CC_MSVC_NET -# if _MSC_VER < 1310 +# if _MSC_VER < 1310 || defined(Q_OS_WIN64) # define Q_TYPENAME @@ -238,3 +238,11 @@ # endif +/* Intel C++ disguising as Visual C++: the `using' keyword avoids warnings */ +# if defined(__INTEL_COMPILER) +# define Q_CC_INTEL +# if !defined(__EXCEPTIONS) +# define Q_NO_EXCEPTIONS +# endif +# else # define Q_NO_USING_KEYWORD /* ### check "using" status */ +# endif @@ -286,4 +294,13 @@ # endif + +/* ARM gcc pads structs to 32 bits, even when they contain a single + char, or short. We tell gcc to pack QChars to 16 bits, to avoid + QString bloat. However, gcc 3.4 doesn't allow us to create references to + members of a packed struct. (Pointers are OK, because then you + supposedly know what you are doing.) */ # if (defined(__arm__) || defined(__ARMEL__)) && !defined(QT_MOC_CPP) # define Q_PACKED __attribute__ ((packed)) +# if __GNUC__ == 3 && __GNUC_MINOR__ >= 4 +# define Q_NO_PACKED_REFERENCE +# endif # endif @@ -307,2 +324,4 @@ Visual Age C++ 5.0 C Compiler 5.0 + ... ... + Visual Age C++ 6.0 C Compiler 6.0 @@ -331,3 +350,3 @@ it separately anyway. */ -#elif defined(__DECCXX) +#elif defined(__DECCXX) || defined(__DECC) # define Q_CC_DEC @@ -372,3 +391,3 @@ -/* The Portland Group compiler is based on EDG and does define __EDG__ */ +/* The Comeau compiler is based on EDG and does define __EDG__ */ # if defined(__COMO__) @@ -377,3 +396,6 @@ -/* Using the `using' keyword avoids KAI C++ warnings */ +/* The `using' keyword was introduced to avoid KAI C++ warnings + but it's now causing KAI C++ errors instead. The standard is + unclear about the use of this keyword, and in practice every + compiler is using its own set of rules. Forget it. */ # elif defined(__KCC) @@ -383,4 +405,5 @@ # endif +# define Q_NO_USING_KEYWORD -/* Using the `using' keyword avoids Intel C++ warnings */ +/* Using the `using' keyword avoids Intel C++ for Linux warnings */ # elif defined(__INTEL_COMPILER) @@ -432,3 +455,2 @@ # define Q_BROKEN_TEMPLATE_SPECIALIZATION -# define Q_STRICT_INLINING_RULES # define Q_NO_EXPLICIT_KEYWORD @@ -440,2 +462,5 @@ # define Q_NO_USING_KEYWORD /* ### check "using" status */ +# if defined(_COMPILER_VERSION) && (_COMPILER_VERSION >= 740) +# pragma set woff 3624,3625, 3649 /* turn off some harmless warnings */ +# endif # endif @@ -455,3 +480,3 @@ -#elif defined(__SUNPRO_CC) +#elif defined(__SUNPRO_CC) || defined(__SUNPRO_C) # define Q_CC_SUN @@ -607,2 +632,9 @@ const bool true = TRUE; +// +// Proper for-scoping +// ### turn on in 4.0 + +#if 0 && defined(Q_CC_MSVC) && !defined(Q_CC_MSVC_NET) +# define for if(0){}else for +#endif @@ -667,3 +699,2 @@ typedef unsigned int Q_UINT32; // 32 bit unsigned #if defined(Q_OS_WIN64) -// LLP64 64-bit model on Windows 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 #else -// LP64 64-bit model on Linux -typedef long Q_LONG; -typedef unsigned long Q_ULONG; -#endif - -#if !defined(QT_CLEAN_NAMESPACE) -// mininum size of 64 bits is not guaranteed -#define Q_INT64 Q_LONG -#define Q_UINT64 Q_ULONG +typedef long Q_LONG; // word up to 64 bit signed +typedef unsigned long Q_ULONG; // word up to 64 bit unsigned +#endif +#if defined(Q_OS_WIN) && !defined(Q_CC_GNU) +# define Q_INT64_C(c) c ## i64 // signed 64 bit constant +# define Q_UINT64_C(c) c ## ui64 // unsigned 64 bit constant +typedef __int64 Q_INT64; // 64 bit signed +typedef unsigned __int64 Q_UINT64; // 64 bit unsigned +#else +# define Q_INT64_C(c) c ## LL // signed 64 bit constant +# define Q_UINT64_C(c) c ## ULL // unsigned 64 bit constant +typedef long long Q_INT64; // 64 bit signed +typedef unsigned long long Q_UINT64; // 64 bit unsigned #endif +typedef Q_INT64 Q_LLONG; // signed long long +typedef Q_UINT64 Q_ULLONG; // unsigned long long @@ -686,3 +723,3 @@ typedef unsigned long Q_ULONG; #if defined(QT_LARGEFILE_SUPPORT) - typedef unsigned long long QtOffset; + typedef Q_ULLONG QtOffset; #else @@ -710,13 +747,13 @@ class QDataStream; #if defined(QCONFIG_LOCAL) -#include <qconfig-local.h> +#include "qconfig-local.h" #elif defined(QCONFIG_MINIMAL) -#include <qconfig-minimal.h> +#include "qconfig-minimal.h" #elif defined(QCONFIG_SMALL) -#include <qconfig-small.h> +#include "qconfig-small.h" #elif defined(QCONFIG_MEDIUM) -#include <qconfig-medium.h> +#include "qconfig-medium.h" #elif defined(QCONFIG_LARGE) -#include <qconfig-large.h> +#include "qconfig-large.h" #else // everything... -#include <qconfig.h> +#include "qconfig.h" #endif @@ -731,2 +768,5 @@ class QDataStream; #include "qmodules.h" +#ifndef QT_MODULE_DIALOGS +# define QT_NO_DIALOG +#endif #ifndef QT_MODULE_ICONVIEW @@ -783,4 +823,4 @@ class QDataStream; #ifndef QT_H -#include <qfeatures.h> -#endif // QT_H +#include "qfeatures.h" +#endif /* QT_H */ @@ -792,3 +832,3 @@ class QDataStream; -#if defined(Q_OS_WIN32) || defined(Q_OS_WIN64) +#if defined(Q_OS_WIN) # if defined(QT_NODLL) @@ -852,2 +892,3 @@ Q_EXPORT const char *qVersion(); Q_EXPORT bool qSysInfo( int *wordSize, bool *bigEndian ); +Q_EXPORT bool qSharedBuild(); #if defined(Q_OS_MAC) @@ -885,3 +926,2 @@ Q_EXPORT int qWinVersion(); // - #define Q_UNUSED(x) (void)x; @@ -1017,11 +1057,15 @@ Q_EXPORT const char *qInstallPathPlugins(); Q_EXPORT const char *qInstallPathData(); +Q_EXPORT const char *qInstallPathTranslations(); +Q_EXPORT const char *qInstallPathSysconf(); -#endif // __cplusplus +#endif /* __cplusplus */ -// compilers which follow outdated template instantiation rules -// require a class to have a comparison operator to exist when -// a QValueList of this type is instantiated. It's not actually -// used in the list, though. Hence the dummy implementation. -// Just in case other code relies on it we better trigger a warning -// mandating a real implementation. +/* + compilers which follow outdated template instantiation rules + require a class to have a comparison operator to exist when + a QValueList of this type is instantiated. It's not actually + used in the list, though. Hence the dummy implementation. + Just in case other code relies on it we better trigger a warning + mandating a real implementation. +*/ #ifdef Q_FULL_TEMPLATE_INSTANTIATION @@ -1036,9 +1080,9 @@ Q_EXPORT const char *qInstallPathData(); -#endif // QGLOBAL_H +#endif /* QGLOBAL_H */ -// -// Avoid some particularly useless warnings from some stupid compilers. -// To get ALL C++ compiler warnings, define QT_CC_WARNINGS or comment out -// the line "#define QT_NO_WARNINGS" -// +/* + Avoid some particularly useless warnings from some stupid compilers. + To get ALL C++ compiler warnings, define QT_CC_WARNINGS or comment out + the line "#define QT_NO_WARNINGS" +*/ @@ -1068,5 +1112,4 @@ Q_EXPORT const char *qInstallPathData(); # pragma warn -sig -# elif defined(Q_CC_MWERKS) -# pragma warn_possunwant off # endif #endif + |