lol
1diff --git a/Source/JavaScriptCore/API/JSStringRef.cpp b/Source/JavaScriptCore/API/JSStringRef.cpp
2index 812f3d413..77a3fd0f4 100644
3--- a/Source/JavaScriptCore/API/JSStringRef.cpp
4+++ b/Source/JavaScriptCore/API/JSStringRef.cpp
5@@ -37,7 +37,7 @@ using namespace WTF::Unicode;
6 JSStringRef JSStringCreateWithCharacters(const JSChar* chars, size_t numChars)
7 {
8 initializeThreading();
9- return OpaqueJSString::create(chars, numChars).leakRef();
10+ return OpaqueJSString::create(reinterpret_cast<const UChar*>(chars), numChars).leakRef();
11 }
12
13 JSStringRef JSStringCreateWithUTF8CString(const char* string)
14@@ -62,7 +62,7 @@ JSStringRef JSStringCreateWithUTF8CString(const char* string)
15 JSStringRef JSStringCreateWithCharactersNoCopy(const JSChar* chars, size_t numChars)
16 {
17 initializeThreading();
18- return OpaqueJSString::create(StringImpl::createWithoutCopying(chars, numChars, WTF::DoesNotHaveTerminatingNullCharacter)).leakRef();
19+ return OpaqueJSString::create(StringImpl::createWithoutCopying(reinterpret_cast<const UChar*>(chars), numChars, WTF::DoesNotHaveTerminatingNullCharacter)).leakRef();
20 }
21
22 JSStringRef JSStringRetain(JSStringRef string)
23@@ -83,7 +83,7 @@ size_t JSStringGetLength(JSStringRef string)
24
25 const JSChar* JSStringGetCharactersPtr(JSStringRef string)
26 {
27- return string->characters();
28+ return reinterpret_cast<const JSChar*>(string->characters());
29 }
30
31 size_t JSStringGetMaximumUTF8CStringSize(JSStringRef string)
32diff --git a/Source/JavaScriptCore/runtime/DateConversion.cpp b/Source/JavaScriptCore/runtime/DateConversion.cpp
33index 0b57f012d..05e27338b 100644
34--- a/Source/JavaScriptCore/runtime/DateConversion.cpp
35+++ b/Source/JavaScriptCore/runtime/DateConversion.cpp
36@@ -107,7 +107,8 @@ String formatDateTime(const GregorianDateTime& t, DateTimeFormat format, bool as
37 #if OS(WINDOWS)
38 TIME_ZONE_INFORMATION timeZoneInformation;
39 GetTimeZoneInformation(&timeZoneInformation);
40- const WCHAR* timeZoneName = t.isDST() ? timeZoneInformation.DaylightName : timeZoneInformation.StandardName;
41+ const WCHAR* winTimeZoneName = t.isDST() ? timeZoneInformation.DaylightName : timeZoneInformation.StandardName;
42+ String timeZoneName(reinterpret_cast<const UChar*>(winTimeZoneName));
43 #else
44 struct tm gtm = t;
45 char timeZoneName[70];
46diff --git a/Source/WTF/WTF.pri b/Source/WTF/WTF.pri
47index 1f4866d66..bb61e4ba3 100644
48--- a/Source/WTF/WTF.pri
49+++ b/Source/WTF/WTF.pri
50@@ -12,7 +12,7 @@ mac {
51 # Mac OS does ship libicu but not the associated header files.
52 # Therefore WebKit provides adequate header files.
53 INCLUDEPATH = $${ROOT_WEBKIT_DIR}/Source/WTF/icu $$INCLUDEPATH
54- LIBS += -licucore
55+ LIBS += /usr/lib/libicucore.dylib
56 } else:!use?(wchar_unicode): {
57 win32 {
58 CONFIG(static, static|shared) {
59diff --git a/Source/WTF/wtf/TypeTraits.h b/Source/WTF/wtf/TypeTraits.h
60index 9df2c95cf..f5d6121fd 100644
61--- a/Source/WTF/wtf/TypeTraits.h
62+++ b/Source/WTF/wtf/TypeTraits.h
63@@ -72,6 +72,9 @@ namespace WTF {
64 template<> struct IsInteger<unsigned long> { static const bool value = true; };
65 template<> struct IsInteger<long long> { static const bool value = true; };
66 template<> struct IsInteger<unsigned long long> { static const bool value = true; };
67+#if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__) || (defined(_HAS_CHAR16_T_LANGUAGE_SUPPORT) && _HAS_CHAR16_T_LANGUAGE_SUPPORT)
68+ template<> struct IsInteger<char16_t> { static const bool value = true; };
69+#endif
70 #if !COMPILER(MSVC) || defined(_NATIVE_WCHAR_T_DEFINED)
71 template<> struct IsInteger<wchar_t> { static const bool value = true; };
72 #endif
73diff --git a/Source/WebCore/plugins/qt/PluginPackageQt.cpp b/Source/WebCore/plugins/qt/PluginPackageQt.cpp
74index a923d49aa..46772a4bb 100644
75--- a/Source/WebCore/plugins/qt/PluginPackageQt.cpp
76+++ b/Source/WebCore/plugins/qt/PluginPackageQt.cpp
77@@ -136,7 +136,11 @@ static void initializeGtk(QLibrary* module = 0)
78 }
79 }
80
81+#ifdef NIXPKGS_LIBGTK2
82+ QLibrary library(QLatin1String(NIXPKGS_LIBGTK2), 0);
83+#else
84 QLibrary library(QLatin1String("libgtk-x11-2.0"), 0);
85+#endif
86 if (library.load()) {
87 typedef void *(*gtk_init_check_ptr)(int*, char***);
88 gtk_init_check_ptr gtkInitCheck = (gtk_init_check_ptr)library.resolve("gtk_init_check");
89diff --git a/Source/WebCore/plugins/qt/PluginViewQt.cpp b/Source/WebCore/plugins/qt/PluginViewQt.cpp
90index de06a2fea..86fe39ef1 100644
91--- a/Source/WebCore/plugins/qt/PluginViewQt.cpp
92+++ b/Source/WebCore/plugins/qt/PluginViewQt.cpp
93@@ -697,7 +697,11 @@ static Display *getPluginDisplay()
94 // support gdk based plugins (like flash) that use a different X connection.
95 // The code below has the same effect as this one:
96 // Display *gdkDisplay = gdk_x11_display_get_xdisplay(gdk_display_get_default());
97+#ifdef NIXPKGS_LIBGDK2
98+ QLibrary library(QLatin1String(NIXPKGS_LIBGDK2), 0);
99+#else
100 QLibrary library(QLatin1String("libgdk-x11-2.0"), 0);
101+#endif
102 if (!library.load())
103 return 0;
104
105diff --git a/Source/WebKit2/PluginProcess/qt/PluginProcessMainQt.cpp b/Source/WebKit2/PluginProcess/qt/PluginProcessMainQt.cpp
106index 8de65216b..38f5c05e5 100644
107--- a/Source/WebKit2/PluginProcess/qt/PluginProcessMainQt.cpp
108+++ b/Source/WebKit2/PluginProcess/qt/PluginProcessMainQt.cpp
109@@ -53,7 +53,11 @@ static void messageHandler(QtMsgType type, const QMessageLogContext&, const QStr
110
111 static bool initializeGtk()
112 {
113+#ifdef NIXPKGS_LIBGTK2
114+ QLibrary gtkLibrary(QLatin1String(NIXPKGS_LIBGTK2), 0);
115+#else
116 QLibrary gtkLibrary(QLatin1String("libgtk-x11-2.0"), 0);
117+#endif
118 if (!gtkLibrary.load())
119 return false;
120 typedef void* (*gtk_init_ptr)(void*, void*);
121diff --git a/Source/WebKit2/Shared/API/c/WKString.cpp b/Source/WebKit2/Shared/API/c/WKString.cpp
122index cbac67dd8..23400a64e 100644
123--- a/Source/WebKit2/Shared/API/c/WKString.cpp
124+++ b/Source/WebKit2/Shared/API/c/WKString.cpp
125@@ -55,7 +55,7 @@ size_t WKStringGetLength(WKStringRef stringRef)
126 size_t WKStringGetCharacters(WKStringRef stringRef, WKChar* buffer, size_t bufferLength)
127 {
128 COMPILE_ASSERT(sizeof(WKChar) == sizeof(UChar), WKStringGetCharacters_sizeof_WKChar_matches_UChar);
129- return (toImpl(stringRef)->getCharacters(static_cast<UChar*>(buffer), bufferLength));
130+ return (toImpl(stringRef)->getCharacters(reinterpret_cast<UChar*>(buffer), bufferLength));
131 }
132
133 size_t WKStringGetMaximumUTF8CStringSize(WKStringRef stringRef)
134diff --git a/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp b/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp
135index d734ff684..0f6ff63d1 100644
136--- a/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp
137+++ b/Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp
138@@ -64,7 +64,11 @@ static Display* getPluginDisplay()
139 // The code below has the same effect as this one:
140 // Display *gdkDisplay = gdk_x11_display_get_xdisplay(gdk_display_get_default());
141
142+#ifdef NIXPKGS_LIBGDK2
143+ QLibrary library(QLatin1String(NIXPKGS_LIBGDK2), 0);
144+#else
145 QLibrary library(QLatin1String("libgdk-x11-2.0"), 0);
146+#endif
147 if (!library.load())
148 return 0;
149