summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/3rdparty/v8/SConstruct7
-rw-r--r--src/3rdparty/v8/src/globals.h11
-rw-r--r--src/3rdparty/v8/src/platform-win32.cc22
-rw-r--r--src/3rdparty/v8/src/win32-headers.h6
-rw-r--r--src/3rdparty/v8/src/x64/cpu-x64.cc2
5 files changed, 35 insertions, 13 deletions
diff --git a/src/3rdparty/v8/SConstruct b/src/3rdparty/v8/SConstruct
index f9c33ca..4069da7 100644
--- a/src/3rdparty/v8/SConstruct
+++ b/src/3rdparty/v8/SConstruct
@@ -294,7 +294,12 @@ V8_EXTRA_FLAGS = {
'-Wnon-virtual-dtor']
},
'os:win32': {
- 'WARNINGFLAGS': ['-pedantic', '-Wno-long-long']
+ 'WARNINGFLAGS': ['-pedantic',
+ '-Wno-long-long',
+ '-Wno-pedantic-ms-format'],
+ 'library:shared': {
+ 'LIBS': ['winmm', 'ws2_32']
+ }
},
'os:linux': {
'WARNINGFLAGS': ['-pedantic'],
diff --git a/src/3rdparty/v8/src/globals.h b/src/3rdparty/v8/src/globals.h
index f85f286..a532039 100644
--- a/src/3rdparty/v8/src/globals.h
+++ b/src/3rdparty/v8/src/globals.h
@@ -175,17 +175,22 @@ typedef byte* Address;
// than defining __STDC_CONSTANT_MACROS before including <stdint.h>, and it
// works on compilers that don't have it (like MSVC).
#if V8_HOST_ARCH_64_BIT
-#ifdef _MSC_VER
+#if defined(_MSC_VER)
#define V8_UINT64_C(x) (x ## UI64)
#define V8_INT64_C(x) (x ## I64)
#define V8_INTPTR_C(x) (x ## I64)
#define V8_PTR_PREFIX "ll"
-#else // _MSC_VER
+#elif defined(__MINGW64__)
+#define V8_UINT64_C(x) (x ## ULL)
+#define V8_INT64_C(x) (x ## LL)
+#define V8_INTPTR_C(x) (x ## LL)
+#define V8_PTR_PREFIX "I64"
+#else
#define V8_UINT64_C(x) (x ## UL)
#define V8_INT64_C(x) (x ## L)
#define V8_INTPTR_C(x) (x ## L)
#define V8_PTR_PREFIX "l"
-#endif // _MSC_VER
+#endif
#else // V8_HOST_ARCH_64_BIT
#define V8_INTPTR_C(x) (x)
#define V8_PTR_PREFIX ""
diff --git a/src/3rdparty/v8/src/platform-win32.cc b/src/3rdparty/v8/src/platform-win32.cc
index 8771c43..ba69bdc 100644
--- a/src/3rdparty/v8/src/platform-win32.cc
+++ b/src/3rdparty/v8/src/platform-win32.cc
@@ -58,21 +58,26 @@ int localtime_s(tm* out_tm, const time_t* time) {
}
-// Not sure this the correct interpretation of _mkgmtime
-time_t _mkgmtime(tm* timeptr) {
- return mktime(timeptr);
-}
-
-
int fopen_s(FILE** pFile, const char* filename, const char* mode) {
*pFile = fopen(filename, mode);
return *pFile != NULL ? 0 : 1;
}
+#ifndef __MINGW64_VERSION_MAJOR
+
+// Not sure this the correct interpretation of _mkgmtime
+time_t _mkgmtime(tm* timeptr) {
+ return mktime(timeptr);
+}
+
+
#define _TRUNCATE 0
#define STRUNCATE 80
+#endif // __MINGW64_VERSION_MAJOR
+
+
int _vsnprintf_s(char* buffer, size_t sizeOfBuffer, size_t count,
const char* format, va_list argptr) {
ASSERT(count == _TRUNCATE);
@@ -107,11 +112,16 @@ int strncpy_s(char* dest, size_t dest_size, const char* source, size_t count) {
}
+#ifndef __MINGW64_VERSION_MAJOR
+
inline void MemoryBarrier() {
int barrier = 0;
__asm__ __volatile__("xchgl %%eax,%0 ":"=r" (barrier));
}
+#endif // __MINGW64_VERSION_MAJOR
+
+
#endif // __MINGW32__
// Generate a pseudo-random number in the range 0-2^31-1. Usually
diff --git a/src/3rdparty/v8/src/win32-headers.h b/src/3rdparty/v8/src/win32-headers.h
index 0ee3306..1f0ee48 100644
--- a/src/3rdparty/v8/src/win32-headers.h
+++ b/src/3rdparty/v8/src/win32-headers.h
@@ -64,10 +64,10 @@
#undef _WIN32_WINNT
#define _WIN32_WINNT 0x501
#endif // __MINGW32__
-#ifndef __MINGW32__
+#if !defined(__MINGW32__) || defined(__MINGW64_VERSION_MAJOR)
#include <dbghelp.h> // For SymLoadModule64 and al.
#include <errno.h> // For STRUNCATE
-#endif // __MINGW32__
+#endif // !defined(__MINGW32__) || defined(__MINGW64_VERSION_MAJOR)
#include <limits.h> // For INT_MAX and al.
#include <tlhelp32.h> // For Module32First and al.
@@ -75,7 +75,9 @@
// makes it impossible to have them elsewhere.
#include <winsock2.h>
#include <ws2tcpip.h>
+#ifndef __MINGW32__
#include <wspiapi.h>
+#endif // __MINGW32__
#include <process.h> // for _beginthreadex()
#include <stdlib.h>
#endif // V8_WIN32_HEADERS_FULL
diff --git a/src/3rdparty/v8/src/x64/cpu-x64.cc b/src/3rdparty/v8/src/x64/cpu-x64.cc
index ae5045f..9dc3b4f 100644
--- a/src/3rdparty/v8/src/x64/cpu-x64.cc
+++ b/src/3rdparty/v8/src/x64/cpu-x64.cc
@@ -27,7 +27,7 @@
// CPU specific code for x64 independent of OS goes here.
-#ifdef __GNUC__
+#if defined(__GNUC__) && !defined(__MINGW64__)
#include "third_party/valgrind/valgrind.h"
#endif