summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBogDan Vatra <bogdan@kde.org>2014-10-03 18:17:47 +0300
committerMichael Bruning <michael.bruning@digia.com>2014-10-15 14:32:19 +0200
commit92518c1647822402bd54ef6a42732da5feaa4112 (patch)
treeb1c9bb61dc6a50962b4a2d8569bca79a13120162
parent84fb07ce1b9fb9c44ff5d50b195654d11ccf8763 (diff)
downloadqtwebkit-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>
-rw-r--r--Source/WTF/WTF.pri2
-rw-r--r--Source/WTF/WTF.pro3
-rw-r--r--Source/WTF/wtf/Platform.h4
-rw-r--r--Source/WTF/wtf/unicode/wchar/UnicodeWchar.h9
-rw-r--r--Source/WebCore/Target.pri6
-rw-r--r--Source/WebCore/platform/ThreadGlobalData.cpp1
-rw-r--r--Source/WebCore/platform/text/TextBreakIteratorICU.cpp2
-rw-r--r--Source/WebCore/platform/text/TextEncodingDetectorICU.cpp2
-rw-r--r--Tools/qmake/mkspecs/features/configure.prf2
-rw-r--r--Tools/qmake/mkspecs/features/features.prf2
10 files changed, 28 insertions, 5 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 {
diff --git a/Source/WebCore/Target.pri b/Source/WebCore/Target.pri
index c16ac36ab..b9167d13b 100644
--- a/Source/WebCore/Target.pri
+++ b/Source/WebCore/Target.pri
@@ -2981,6 +2981,12 @@ mac {
}
contains(QT_CONFIG,icu)|mac: SOURCES += platform/text/TextBreakIteratorICU.cpp
+use?(wchar_unicode): {
+ SOURCES += platform/text/wchar/TextBreakIteratorWchar.cpp \
+ platform/text/TextEncodingDetectorNone.cpp
+ SOURCES -= platform/text/TextEncodingDetectorICU.cpp
+}
+
mac {
# For Mac we use the same SmartReplace implementation as the Apple port.
SOURCES += editing/SmartReplaceCF.cpp
diff --git a/Source/WebCore/platform/ThreadGlobalData.cpp b/Source/WebCore/platform/ThreadGlobalData.cpp
index fe88c3af1..698ec6e98 100644
--- a/Source/WebCore/platform/ThreadGlobalData.cpp
+++ b/Source/WebCore/platform/ThreadGlobalData.cpp
@@ -32,6 +32,7 @@
#include "InspectorCounters.h"
#include "ThreadTimers.h"
#include <wtf/MainThread.h>
+#include <wtf/PassOwnPtr.h>
#include <wtf/WTFThreadData.h>
#include <wtf/text/StringImpl.h>
diff --git a/Source/WebCore/platform/text/TextBreakIteratorICU.cpp b/Source/WebCore/platform/text/TextBreakIteratorICU.cpp
index 5e25684b8..b4046ac9b 100644
--- a/Source/WebCore/platform/text/TextBreakIteratorICU.cpp
+++ b/Source/WebCore/platform/text/TextBreakIteratorICU.cpp
@@ -20,6 +20,7 @@
*/
#include "config.h"
+#if USE(ICU_UNICODE)
#include "TextBreakIterator.h"
#include "LineBreakIteratorPoolICU.h"
@@ -687,3 +688,4 @@ TextBreakIterator* cursorMovementIterator(const UChar* string, int length)
}
}
+#endif // #if USE(ICU_UNICODE)
diff --git a/Source/WebCore/platform/text/TextEncodingDetectorICU.cpp b/Source/WebCore/platform/text/TextEncodingDetectorICU.cpp
index 430104eac..c7898abeb 100644
--- a/Source/WebCore/platform/text/TextEncodingDetectorICU.cpp
+++ b/Source/WebCore/platform/text/TextEncodingDetectorICU.cpp
@@ -29,6 +29,7 @@
*/
#include "config.h"
+#if USE(ICU_UNICODE)
#include "TextEncodingDetector.h"
#include "TextEncoding.h"
@@ -115,3 +116,4 @@ bool detectTextEncoding(const char* data, size_t len,
}
}
+#endif // #if USE(ICU_UNICODE)
diff --git a/Tools/qmake/mkspecs/features/configure.prf b/Tools/qmake/mkspecs/features/configure.prf
index 3f64452e5..bff046815 100644
--- a/Tools/qmake/mkspecs/features/configure.prf
+++ b/Tools/qmake/mkspecs/features/configure.prf
@@ -115,7 +115,7 @@ defineTest(finalizeConfigure) {
}
# Sanity checks that would prevent us from building the whole project altogether.
- !mac:!config_icu {
+ !android:!mac:!config_icu {
addReasonForSkippingBuild("ICU is required.")
}
production_build:blackberry|qnx {
diff --git a/Tools/qmake/mkspecs/features/features.prf b/Tools/qmake/mkspecs/features/features.prf
index 62791e505..ef1d5d74a 100644
--- a/Tools/qmake/mkspecs/features/features.prf
+++ b/Tools/qmake/mkspecs/features/features.prf
@@ -142,6 +142,8 @@ defineTest(detectFeatures) {
# IndexedDB requires leveldb
enable?(indexed_database): WEBKIT_CONFIG += use_leveldb
+ !config_icu:!mac: WEBKIT_CONFIG += use_wchar_unicode
+
export(WEBKIT_CONFIG)
export(CONFIGURE_WARNINGS)
}