Fix MinGW-w64 GCC 4.7 compilation
Contributed by net147@gmail.com BUGS= TEST= Review URL: https://chromiumcodereview.appspot.com/10019012 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11357 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
ac72f5c441
commit
bf630e2371
@ -51,6 +51,22 @@ int strncasecmp(const char* s1, const char* s2, int n) {
|
||||
// the Microsoft Visual Studio C++ CRT.
|
||||
#ifdef __MINGW32__
|
||||
|
||||
|
||||
#ifndef __MINGW64_VERSION_MAJOR
|
||||
|
||||
#define _TRUNCATE 0
|
||||
#define STRUNCATE 80
|
||||
|
||||
inline void MemoryBarrier() {
|
||||
int barrier = 0;
|
||||
__asm__ __volatile__("xchgl %%eax,%0 ":"=r" (barrier));
|
||||
}
|
||||
|
||||
#endif // __MINGW64_VERSION_MAJOR
|
||||
|
||||
|
||||
#ifndef MINGW_HAS_SECURE_API
|
||||
|
||||
int localtime_s(tm* out_tm, const time_t* time) {
|
||||
tm* posix_local_time_struct = localtime(time);
|
||||
if (posix_local_time_struct == NULL) return 1;
|
||||
@ -64,13 +80,6 @@ int fopen_s(FILE** pFile, const char* filename, const char* mode) {
|
||||
return *pFile != NULL ? 0 : 1;
|
||||
}
|
||||
|
||||
|
||||
#ifndef __MINGW64_VERSION_MAJOR
|
||||
#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);
|
||||
@ -104,16 +113,7 @@ int strncpy_s(char* dest, size_t dest_size, const char* source, size_t count) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
#ifndef __MINGW64_VERSION_MAJOR
|
||||
|
||||
inline void MemoryBarrier() {
|
||||
int barrier = 0;
|
||||
__asm__ __volatile__("xchgl %%eax,%0 ":"=r" (barrier));
|
||||
}
|
||||
|
||||
#endif // __MINGW64_VERSION_MAJOR
|
||||
|
||||
#endif // MINGW_HAS_SECURE_API
|
||||
|
||||
#endif // __MINGW32__
|
||||
|
||||
|
@ -264,6 +264,7 @@ TEST(DisasmX64) {
|
||||
ExternalReference after_break_target =
|
||||
ExternalReference(Debug_Address::AfterBreakTarget(),
|
||||
assm.isolate());
|
||||
USE(after_break_target);
|
||||
#endif // ENABLE_DEBUGGER_SUPPORT
|
||||
__ jmp(ic, RelocInfo::CODE_TARGET);
|
||||
__ nop();
|
||||
|
Loading…
Reference in New Issue
Block a user