Skip to content

Commit 1641456

Browse files
Friedemann KleintFriedemann Kleint
authored andcommitted
QtScript: Fix build with MSVC2015.
- Remove os-win32 from the include path since the system headers are now sufficient. - Introduce some #if depending on version for traits and snprintf(). Change-Id: I290b2260e3c1595a7940c76ec2d9a4372709b156 Reviewed-by: Simon Hausmann <[email protected]> (cherry picked from qtscript/c095135d047db6190beafab48d083b00ec82f2d8)
1 parent 445d29d commit 1641456

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

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

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

39+
# if _MSC_VER < 1900
3940
inline int snprintf(char* buffer, size_t count, const char* format, ...)
4041
{
4142
int result;
@@ -45,6 +46,7 @@ inline int snprintf(char* buffer, size_t count, const char* format, ...)
4546
va_end(args);
4647
return result;
4748
}
49+
# endif // _MSC_VER < 1900
4850

4951
#if COMPILER(MSVC7) || OS(WINCE)
5052

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

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

169-
#if (defined(__GLIBCXX__) && (__GLIBCXX__ >= 20070724) && defined(__GXX_EXPERIMENTAL_CXX0X__)) || (defined(_MSC_VER) && (_MSC_VER >= 1600))
169+
#if (defined(__GLIBCXX__) && (__GLIBCXX__ >= 20070724) && defined(__GXX_EXPERIMENTAL_CXX0X__)) || (defined(_MSC_VER) && (_MSC_VER >= 1600 && _MSC_VER < 1900))
170170

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

src/3rdparty/javascriptcore/WebKit.pri

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ isEmpty(OUTPUT_DIR) {
2222

2323
DEFINES += BUILDING_QT__=1
2424
building-libs {
25-
win32-msvc*|win32-icc: INCLUDEPATH += $$PWD/JavaScriptCore/os-win32
25+
win32-msvc2008|win32-msvc2010|win32-msvc2012|win32-msvc2013|win32-icc: INCLUDEPATH += $$PWD/JavaScriptCore/os-win32
2626
} else {
2727
CONFIG(QTDIR_build) {
2828
QT += webkit

0 commit comments

Comments
 (0)