Fix compilation with MinGW-w64.
BUG=v8:1943 TEST= Review URL: https://chromiumcodereview.appspot.com/9428027 Patch from Jonathan Liu <net147@gmail.com>. git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10793 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
5632b6d005
commit
0f348c9208
1
AUTHORS
1
AUTHORS
@ -28,6 +28,7 @@ Jan de Mooij <jandemooij@gmail.com>
|
||||
Jay Freeman <saurik@saurik.com>
|
||||
Joel Stanley <joel.stan@gmail.com>
|
||||
John Jozwiak <jjozwiak@codeaurora.org>
|
||||
Jonathan Liu <net147@gmail.com>
|
||||
Kun Zhang <zhangk@codeaurora.org>
|
||||
Martyn Capewell <martyn.capewell@arm.com>
|
||||
Matt Hanselman <mjhanselman@gmail.com>
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright 2011 the V8 project authors. All rights reserved.
|
||||
# Copyright 2012 the V8 project authors. All rights reserved.
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are
|
||||
# met:
|
||||
@ -300,7 +300,7 @@ V8_EXTRA_FLAGS = {
|
||||
'-Wnon-virtual-dtor']
|
||||
},
|
||||
'os:win32': {
|
||||
'WARNINGFLAGS': ['-pedantic', '-Wno-long-long']
|
||||
'WARNINGFLAGS': ['-pedantic', '-Wno-long-long', '-Wno-pedantic-ms-format']
|
||||
},
|
||||
'os:linux': {
|
||||
'WARNINGFLAGS': ['-pedantic'],
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2011 the V8 project authors. All rights reserved.
|
||||
// Copyright 2012 the V8 project authors. All rights reserved.
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
@ -191,6 +191,11 @@ typedef byte* Address;
|
||||
#define V8_PTR_PREFIX ""
|
||||
#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.
|
||||
// Usage: instead of writing 0x1234567890123456
|
||||
// write V8_2PART_UINT64_C(0x12345678,90123456);
|
||||
|
@ -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);
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2010 the V8 project authors. All rights reserved.
|
||||
// Copyright 2012 the V8 project authors. All rights reserved.
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
@ -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.
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Copyright 2011 the V8 project authors. All rights reserved.
|
||||
// Copyright 2012 the V8 project authors. All rights reserved.
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user