From e88a447dc08db341382fa82fcebb38e2579f5d5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Martins?= Date: Thu, 29 Aug 2013 10:17:12 +0100 Subject: wince: Build fix, assert() is not present in this platform. Change-Id: Ib29f1411b9829bc9bf6a94e4fb23a33f955ee1b2 Reviewed-by: Simon Hausmann --- src/3rdparty/double-conversion/utils.h | 10 +++++++--- src/3rdparty/masm/wtf/Platform.h | 4 ++-- src/qml/jsruntime/qv4object_p.h | 5 +++++ 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/3rdparty/double-conversion/utils.h b/src/3rdparty/double-conversion/utils.h index f0524804b4..f5a8c984e4 100644 --- a/src/3rdparty/double-conversion/utils.h +++ b/src/3rdparty/double-conversion/utils.h @@ -33,13 +33,17 @@ #include #ifndef ASSERT -#define ASSERT(condition) (assert(condition)) +# if defined(WINCE) || defined(_WIN32_WCE) +# define ASSERT(condition) +# else +# define ASSERT(condition) (assert(condition)) +# endif #endif #ifndef UNIMPLEMENTED -#define UNIMPLEMENTED() (exit(-1)) +# define UNIMPLEMENTED() (exit(-1)) #endif #ifndef UNREACHABLE -#define UNREACHABLE() (exit(-1)) +# define UNREACHABLE() (exit(-1)) #endif // Double operations detection based on target architecture. diff --git a/src/3rdparty/masm/wtf/Platform.h b/src/3rdparty/masm/wtf/Platform.h index 64ffbb71f7..68f6f66065 100644 --- a/src/3rdparty/masm/wtf/Platform.h +++ b/src/3rdparty/masm/wtf/Platform.h @@ -490,7 +490,7 @@ #define WTF_USE_QUERY_PERFORMANCE_COUNTER 1 #endif -#if OS(WINCE) && !PLATFORM(QT) +#if OS(WINCE) #define NOSHLWAPI /* shlwapi.h not available on WinCe */ /* MSDN documentation says these functions are provided with uspce.lib. But we cannot find this file. */ @@ -499,7 +499,7 @@ #define _INC_ASSERT /* disable "assert.h" */ #define assert(x) -#endif /* OS(WINCE) && !PLATFORM(QT) */ +#endif /* OS(WINCE) */ #if OS(WINCE) && !PLATFORM(QT) #define WTF_USE_WCHAR_UNICODE 1 diff --git a/src/qml/jsruntime/qv4object_p.h b/src/qml/jsruntime/qv4object_p.h index ce3a271342..d40720b515 100644 --- a/src/qml/jsruntime/qv4object_p.h +++ b/src/qml/jsruntime/qv4object_p.h @@ -58,6 +58,11 @@ #include #include +#ifdef _WIN32_WCE +#undef assert +#define assert(x) +#endif // _WIN32_WCE + QT_BEGIN_NAMESPACE namespace QV4 { -- cgit v1.2.3