summaryrefslogtreecommitdiffstats
path: root/src/corelib/arch
diff options
context:
space:
mode:
authorJoão Abecasis <joao@abecasis.name>2009-09-01 11:53:52 (GMT)
committerJoão Abecasis <joao@abecasis.name>2009-09-01 11:56:28 (GMT)
commit7b6152ad6ac588350b8acf4353fb05628e86af2a (patch)
tree9bca129e75c544bafc23e7eaeb2fd0ee90262c60 /src/corelib/arch
parentdac400ea66c9342d2e5d4455141de64c9cd703dd (diff)
downloadQt-7b6152ad6ac588350b8acf4353fb05628e86af2a.zip
Qt-7b6152ad6ac588350b8acf4353fb05628e86af2a.tar.gz
Qt-7b6152ad6ac588350b8acf4353fb05628e86af2a.tar.bz2
Compilation fixes for Windows CE on ARM
My earlier cleanup/refactoring of qatomic_windows.h broke things on this platform. Should be fixed now. Reviewed-by: Joerg Bornemann
Diffstat (limited to 'src/corelib/arch')
-rw-r--r--src/corelib/arch/qatomic_windows.h26
1 files changed, 14 insertions, 12 deletions
diff --git a/src/corelib/arch/qatomic_windows.h b/src/corelib/arch/qatomic_windows.h
index 50dedc1..a09e9fd 100644
--- a/src/corelib/arch/qatomic_windows.h
+++ b/src/corelib/arch/qatomic_windows.h
@@ -68,7 +68,7 @@
# if _WIN32_WCE < 0x600 && defined(_X86_)
// For X86 Windows CE, include winbase.h to catch inline functions which
-// overwrite the regular definitions inside of coredll.dll.
+// override the regular definitions inside of coredll.dll.
// Though one could use the original version of Increment/Decrement, others are
// not exported at all.
# include <winbase.h>
@@ -76,19 +76,21 @@
// It's safer to remove the volatile and let the compiler add it as needed.
# define QT_INTERLOCKED_NO_VOLATILE
-# else // _WIN32_WCE >= 0x600 || _X86_
+# else // _WIN32_WCE >= 0x600 || !_X86_
# define QT_INTERLOCKED_PROTOTYPE __cdecl
# define QT_INTERLOCKED_DECLARE_PROTOTYPES
-# if _WIN32_WCE >= 0x600 && defined(_X86_)
-# define QT_INTERLOCKED_PREFIX _
-# define QT_INTERLOCKED_INTRINSIC
+# if _WIN32_WCE >= 0x600
+# if defined(_X86_)
+# define QT_INTERLOCKED_PREFIX _
+# define QT_INTERLOCKED_INTRINSIC
+# endif
# else
# define QT_INTERLOCKED_NO_VOLATILE
# endif
-# endif // _WIN32_WCE >= 0x600 || _X86_
+# endif // _WIN32_WCE >= 0x600 || !_X86_
#endif // Q_OS_WINCE
@@ -132,9 +134,9 @@ extern "C" {
long QT_INTERLOCKED_PROTOTYPE QT_INTERLOCKED_FUNCTION( InterlockedExchangeAdd )(long QT_INTERLOCKED_VOLATILE *, long);
# if !defined(__i386__) && !defined(_M_IX86)
- long QT_INTERLOCKED_FUNCTION( InterlockedCompareExchangePointer )(void * QT_INTERLOCKED_VOLATILE *, void *, void *);
- long QT_INTERLOCKED_FUNCTION( InterlockedExchangePointer )(void * QT_INTERLOCKED_VOLATILE *, void *);
- __int64 QT_INTERLOCKED_FUNCTION( InterlockedExchangeAdd64 )(__int64 QT_INTERLOCKED_VOLATILE *, long);
+ void * QT_INTERLOCKED_FUNCTION( InterlockedCompareExchangePointer )(void * QT_INTERLOCKED_VOLATILE *, void *, void *);
+ void * QT_INTERLOCKED_FUNCTION( InterlockedExchangePointer )(void * QT_INTERLOCKED_VOLATILE *, void *);
+ __int64 QT_INTERLOCKED_FUNCTION( InterlockedExchangeAdd64 )(__int64 QT_INTERLOCKED_VOLATILE *, __int64);
# endif
}
@@ -190,7 +192,7 @@ extern "C" {
QT_INTERLOCKED_REMOVE_VOLATILE( value ), \
valueToAdd )
-#if defined(__i386__) || defined(_M_IX86)
+#if defined(Q_OS_WINCE) || defined(__i386__) || defined(_M_IX86)
# define QT_INTERLOCKED_COMPARE_EXCHANGE_POINTER(value, newValue, expectedValue) \
reinterpret_cast<void *>( \
@@ -209,7 +211,7 @@ extern "C" {
QT_INTERLOCKED_REMOVE_VOLATILE( value ## _integral ), \
valueToAdd )
-#else // !defined(__i386__) && !defined(_M_IX86)
+#else // !defined(Q_OS_WINCE) && !defined(__i386__) && !defined(_M_IX86)
# define QT_INTERLOCKED_COMPARE_EXCHANGE_POINTER(value, newValue, expectedValue) \
QT_INTERLOCKED_FUNCTION(InterlockedCompareExchangePointer)( \
@@ -227,7 +229,7 @@ extern "C" {
QT_INTERLOCKED_REMOVE_VOLATILE( value ## _integral ), \
valueToAdd )
-#endif // !defined(__i386__) && !defined(_M_IX86)
+#endif // !defined(Q_OS_WINCE) && !defined(__i386__) && !defined(_M_IX86)
////////////////////////////////////////////////////////////////////////////////////////////////////