Commit 2f7dfd7f authored by yangguo@chromium.org's avatar yangguo@chromium.org

Fix MinGW64 build.

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9584047

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10911 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 8454eeb7
...@@ -300,7 +300,12 @@ V8_EXTRA_FLAGS = { ...@@ -300,7 +300,12 @@ V8_EXTRA_FLAGS = {
'-Wnon-virtual-dtor'] '-Wnon-virtual-dtor']
}, },
'os:win32': { 'os:win32': {
'WARNINGFLAGS': ['-pedantic', '-Wno-long-long', '-Wno-pedantic-ms-format'] 'WARNINGFLAGS': ['-pedantic',
'-Wno-long-long',
'-Wno-pedantic-ms-format'],
'library:shared': {
'LIBS': ['winmm', 'ws2_32']
}
}, },
'os:linux': { 'os:linux': {
'WARNINGFLAGS': ['-pedantic'], 'WARNINGFLAGS': ['-pedantic'],
......
...@@ -175,27 +175,27 @@ typedef byte* Address; ...@@ -175,27 +175,27 @@ typedef byte* Address;
// than defining __STDC_CONSTANT_MACROS before including <stdint.h>, and it // than defining __STDC_CONSTANT_MACROS before including <stdint.h>, and it
// works on compilers that don't have it (like MSVC). // works on compilers that don't have it (like MSVC).
#if V8_HOST_ARCH_64_BIT #if V8_HOST_ARCH_64_BIT
#ifdef _MSC_VER #if defined(_MSC_VER)
#define V8_UINT64_C(x) (x ## UI64) #define V8_UINT64_C(x) (x ## UI64)
#define V8_INT64_C(x) (x ## I64) #define V8_INT64_C(x) (x ## I64)
#define V8_INTPTR_C(x) (x ## I64) #define V8_INTPTR_C(x) (x ## I64)
#define V8_PTR_PREFIX "ll" #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_UINT64_C(x) (x ## UL)
#define V8_INT64_C(x) (x ## L) #define V8_INT64_C(x) (x ## L)
#define V8_INTPTR_C(x) (x ## L) #define V8_INTPTR_C(x) (x ## L)
#define V8_PTR_PREFIX "l" #define V8_PTR_PREFIX "l"
#endif // _MSC_VER #endif
#else // V8_HOST_ARCH_64_BIT #else // V8_HOST_ARCH_64_BIT
#define V8_INTPTR_C(x) (x) #define V8_INTPTR_C(x) (x)
#define V8_PTR_PREFIX "" #define V8_PTR_PREFIX ""
#endif // V8_HOST_ARCH_64_BIT #endif // V8_HOST_ARCH_64_BIT
#ifdef __MINGW64__
#undef V8_PTR_PREFIX
#define V8_PTR_PREFIX "I64"
#endif // __MINGW64__
// The following macro works on both 32 and 64-bit platforms. // The following macro works on both 32 and 64-bit platforms.
// Usage: instead of writing 0x1234567890123456 // Usage: instead of writing 0x1234567890123456
// write V8_2PART_UINT64_C(0x12345678,90123456); // write V8_2PART_UINT64_C(0x12345678,90123456);
......
...@@ -885,7 +885,6 @@ void* OS::Allocate(const size_t requested, ...@@ -885,7 +885,6 @@ void* OS::Allocate(const size_t requested,
bool is_executable) { bool is_executable) {
// VirtualAlloc rounds allocated size to page size automatically. // VirtualAlloc rounds allocated size to page size automatically.
size_t msize = RoundUp(requested, static_cast<int>(GetPageSize())); size_t msize = RoundUp(requested, static_cast<int>(GetPageSize()));
void* address = 0;
// Windows XP SP2 allows Data Excution Prevention (DEP). // Windows XP SP2 allows Data Excution Prevention (DEP).
int prot = is_executable ? PAGE_EXECUTE_READWRITE : PAGE_READWRITE; int prot = is_executable ? PAGE_EXECUTE_READWRITE : PAGE_READWRITE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment