Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Unified Diff: src/platform-win32.cc

Issue 10019012: Fix MinGW-w64 GCC 4.7 compilation (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/cctest/test-disasm-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform-win32.cc
===================================================================
--- src/platform-win32.cc (revision 11315)
+++ src/platform-win32.cc (working copy)
@@ -51,6 +51,22 @@
// 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 @@
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,17 +113,8 @@
return 0;
}
+#endif // MINGW_HAS_SECURE_API
-#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
« no previous file with comments | « no previous file | test/cctest/test-disasm-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698