Skip to content
This repository was archived by the owner on Jan 2, 2023. It is now read-only.

Commit aa08ff4

Browse files
Thomas Sondergaardashkulz
authored andcommitted
QtWebKit: Fix build with MSVC2015
Apply the same fixes made in commit 1641456 to 3rdparty/javascriptcore to the version of JavaScriptCore that is part of 3rdparty/webkit. - Remove os-win32 from the include path since the system headers are now sufficient. - Introduce a #if depending on MSVC version for snprintf(). - Improve fix for HasTrivial{Constructor,Desctructor} from commit 1641456 Change-Id: I1d04f274cf35b92b72edcdfc8a55ba5170b862e6
1 parent bc8546d commit aa08ff4

4 files changed

Lines changed: 15 additions & 3 deletions

File tree

src/3rdparty/javascriptcore/JavaScriptCore/wtf/TypeTraits.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,12 @@ namespace WTF {
166166
typedef T Type;
167167
};
168168

169-
#if (defined(__GLIBCXX__) && (__GLIBCXX__ >= 20070724) && defined(__GXX_EXPERIMENTAL_CXX0X__)) || (defined(_MSC_VER) && (_MSC_VER >= 1600 && _MSC_VER < 1900))
169+
#if (defined(_MSC_VER) && (_MSC_VER >= 1900))
170+
171+
template<typename T> struct HasTrivialConstructor : public std::is_trivially_default_constructible<T> { };
172+
template<typename T> struct HasTrivialDestructor : public std::is_trivially_destructible<T> { };
173+
174+
#elif (defined(__GLIBCXX__) && (__GLIBCXX__ >= 20070724) && defined(__GXX_EXPERIMENTAL_CXX0X__)) || (defined(_MSC_VER) && (_MSC_VER >= 1600))
170175

171176
// GCC's libstdc++ 20070724 and later supports C++ TR1 type_traits in the std namespace.
172177
// VC10 (VS2010) and later support C++ TR1 type_traits in the std::tr1 namespace.

src/3rdparty/webkit/Source/JavaScriptCore/wtf/StringExtras.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
#if COMPILER(MSVC)
3838
// FIXME: why a COMPILER check instead of OS? also, these should be HAVE checks
3939

40+
#if _MSC_VER < 1900
4041
inline int snprintf(char* buffer, size_t count, const char* format, ...)
4142
{
4243
int result;
@@ -52,6 +53,7 @@ inline int snprintf(char* buffer, size_t count, const char* format, ...)
5253

5354
return result;
5455
}
56+
# endif // _MSC_VER < 1900
5557

5658
inline double wtf_vsnprintf(char* buffer, size_t count, const char* format, va_list args)
5759
{

src/3rdparty/webkit/Source/JavaScriptCore/wtf/TypeTraits.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,12 @@ namespace WTF {
179179
typedef T Type;
180180
};
181181

182-
#if (defined(__GLIBCXX__) && (__GLIBCXX__ >= 20070724) && defined(__GXX_EXPERIMENTAL_CXX0X__)) || (defined(_MSC_VER) && (_MSC_VER >= 1600))
182+
#if (defined(_MSC_VER) && (_MSC_VER >= 1900))
183+
184+
template<typename T> struct HasTrivialConstructor : public std::is_trivially_default_constructible<T> { };
185+
template<typename T> struct HasTrivialDestructor : public std::is_trivially_destructible<T> { };
186+
187+
#elif (defined(__GLIBCXX__) && (__GLIBCXX__ >= 20070724) && defined(__GXX_EXPERIMENTAL_CXX0X__)) || (defined(_MSC_VER) && (_MSC_VER >= 1600))
183188

184189
// GCC's libstdc++ 20070724 and later supports C++ TR1 type_traits in the std namespace.
185190
// VC10 (VS2010) and later support C++ TR1 type_traits in the std::tr1 namespace.

src/3rdparty/webkit/Source/WebKit.pri

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ DEPENDPATH += $$OUT_PWD
3838

3939
DEFINES += BUILDING_QT__=1
4040
building-libs {
41-
win32-msvc*|win32-icc: INCLUDEPATH += $$PWD/JavaScriptCore/os-win32
41+
win32-msvc200*|win32-msvc2010|win32-msvc2012|win32-msvc2013|win32-icc: INCLUDEPATH += $$PWD/JavaScriptCore/os-win32
4242
} else {
4343
CONFIG(QTDIR_build) {
4444
QT += webkit

0 commit comments

Comments
 (0)