diff options
author | BogDan Vatra <bogdan@kde.org> | 2014-10-03 18:17:47 +0300 |
---|---|---|
committer | Michael Bruning <michael.bruning@digia.com> | 2014-10-15 14:32:19 +0200 |
commit | 92518c1647822402bd54ef6a42732da5feaa4112 (patch) | |
tree | b1c9bb61dc6a50962b4a2d8569bca79a13120162 /Source/WTF | |
parent | 84fb07ce1b9fb9c44ff5d50b195654d11ccf8763 (diff) | |
download | qtwebkit-92518c1647822402bd54ef6a42732da5feaa4112.tar.gz |
Fix android compile.
Change-Id: I9848c2b384e6fa85a5224ce0691456105d2fe8a1
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Diffstat (limited to 'Source/WTF')
-rw-r--r-- | Source/WTF/WTF.pri | 2 | ||||
-rw-r--r-- | Source/WTF/WTF.pro | 3 | ||||
-rw-r--r-- | Source/WTF/wtf/Platform.h | 4 | ||||
-rw-r--r-- | Source/WTF/wtf/unicode/wchar/UnicodeWchar.h | 9 |
4 files changed, 14 insertions, 4 deletions
diff --git a/Source/WTF/WTF.pri b/Source/WTF/WTF.pri index 4c0d1908e..696e4962e 100644 --- a/Source/WTF/WTF.pri +++ b/Source/WTF/WTF.pri @@ -13,7 +13,7 @@ mac { # Therefore WebKit provides adequate header files. INCLUDEPATH = $${ROOT_WEBKIT_DIR}/Source/WTF/icu $$INCLUDEPATH LIBS += -licucore -} else { +} else:!use?(wchar_unicode): { win32: LIBS += -licuin -licuuc -licudt else:!contains(QT_CONFIG,no-pkg-config):packagesExist("icu-i18n"): PKGCONFIG *= icu-i18n else:android: LIBS += -licui18n -licuuc diff --git a/Source/WTF/WTF.pro b/Source/WTF/WTF.pro index ef622920d..2976d007b 100644 --- a/Source/WTF/WTF.pro +++ b/Source/WTF/WTF.pro @@ -264,6 +264,8 @@ win32 { threads/BinarySemaphore.cpp } +use?(wchar_unicode): SOURCES += wtf/unicode/wchar/UnicodeWchar.cpp + QT += core QT -= gui @@ -276,4 +278,3 @@ QT -= gui # For GCC 4.5 and before we disable C++0x mode in JSC for if enabled in Qt's mkspec QMAKE_CXXFLAGS -= -std=c++0x -std=gnu++0x -std=c++11 -std=gnu++11 } - diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h index 2747ff6b0..a53c60de5 100644 --- a/Source/WTF/wtf/Platform.h +++ b/Source/WTF/wtf/Platform.h @@ -572,6 +572,10 @@ #endif /* OS(WINCE) && !PLATFORM(QT) */ +#if OS(ANDROID) && PLATFORM(QT) +# define WTF_USE_WCHAR_UNICODE 1 +#endif + #if !USE(WCHAR_UNICODE) #define WTF_USE_ICU_UNICODE 1 #endif diff --git a/Source/WTF/wtf/unicode/wchar/UnicodeWchar.h b/Source/WTF/wtf/unicode/wchar/UnicodeWchar.h index 10c2026c5..a8610916d 100644 --- a/Source/WTF/wtf/unicode/wchar/UnicodeWchar.h +++ b/Source/WTF/wtf/unicode/wchar/UnicodeWchar.h @@ -26,11 +26,16 @@ #define WTF_UnicodeWchar_h #include <stdint.h> -#include <wchar.h> #include <wtf/unicode/ScriptCodesFromICU.h> #include <wtf/unicode/UnicodeMacrosFromICU.h> -typedef wchar_t UChar; +#ifndef ANDROID +# include <wchar.h> + typedef wchar_t UChar; +#else + typedef unsigned short int UChar; +#endif + typedef uint32_t UChar32; namespace WTF { |