ce66ab519e
patch-ad: src/tools/qglobal.h mentionss about Q_NO_PACKED_REFERENCE: --- /* 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 --- but it seems we also have to define it on gcc4. patch-ch: Furthermore, it looks gcc4 also rejects implicit pointer casts, so add an explicit cast where the above Q_NO_PACKED_REFERENCE is referred.
43 lines
1.2 KiB
Text
43 lines
1.2 KiB
Text
$NetBSD: patch-ad,v 1.9 2010/08/09 13:21:07 tsutsui Exp $
|
|
|
|
--- src/tools/qglobal.h.orig 2007-02-02 14:01:04.000000000 +0000
|
|
+++ src/tools/qglobal.h
|
|
@@ -63,6 +63,7 @@
|
|
NETBSD - NetBSD
|
|
OPENBSD - OpenBSD
|
|
BSDI - BSD/OS
|
|
+ INTERIX - Interix
|
|
IRIX - SGI Irix
|
|
OSF - HP Tru64 UNIX
|
|
SCO - SCO OpenServer 5
|
|
@@ -82,9 +83,9 @@
|
|
#if defined(__DARWIN_X11__)
|
|
# define Q_OS_DARWIN
|
|
#elif defined(__APPLE__) && (defined(__GNUC__) || defined(__xlC__))
|
|
-# define Q_OS_MACX
|
|
+# define Q_OS_DARWIN
|
|
#elif defined(__MACOSX__)
|
|
-# define Q_OS_MACX
|
|
+# define Q_OS_DARWIN
|
|
#elif defined(macintosh)
|
|
# define Q_OS_MAC9
|
|
#elif defined(__CYGWIN__)
|
|
@@ -120,6 +121,9 @@
|
|
#elif defined(__NetBSD__)
|
|
# define Q_OS_NETBSD
|
|
# define Q_OS_BSD4
|
|
+#elif defined(__INTERIX)
|
|
+# define Q_OS_INTERIX
|
|
+# define Q_OS_BSD4
|
|
#elif defined(__OpenBSD__)
|
|
# define Q_OS_OPENBSD
|
|
# define Q_OS_BSD4
|
|
@@ -317,7 +321,7 @@
|
|
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
|
|
+# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || __GNUC__ >= 4
|
|
# define Q_NO_PACKED_REFERENCE
|
|
# endif
|
|
# endif
|