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

Unified Diff: src/platform.h

Issue 20177: Support for building V8 with MinGW (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 10 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 | « src/globals.h ('k') | src/platform-win32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform.h
===================================================================
--- src/platform.h (revision 1238)
+++ src/platform.h (working copy)
@@ -44,8 +44,12 @@
#ifndef V8_PLATFORM_H_
#define V8_PLATFORM_H_
+// Windows specific stuff.
#ifdef WIN32
+// Microsoft Visual C++ specific stuff.
+#ifdef _MSC_VER
+
enum {
FP_NAN,
FP_INFINITE,
@@ -66,11 +70,26 @@
int fpclassify(double x);
int signbit(double x);
+int strncasecmp(const char* s1, const char* s2, int n);
+
+#endif // _MSC_VER
+
+// MinGW specific stuff.
+#ifdef __MINGW32__
+
+// Needed for va_list.
+#include <stdarg.h>
+
+#endif // __MINGW32__
+
+// Random is missing on both Visual Studio and MinGW.
int random();
-int strncasecmp(const char* s1, const char* s2, int n);
+#endif // WIN32
-#else
+// GCC specific stuff
+#ifdef __GNUC__
+#define __GNUC_VERSION__ (__GNUC__ * 10000 + __GNUC_MINOR__ * 100)
// Unfortunately, the INFINITY macro cannot be used with the '-pedantic'
// warning flag and certain versions of GCC due to a bug:
@@ -78,17 +97,13 @@
// For now, we use the more involved template-based version from <limits>, but
// only when compiling with GCC versions affected by the bug (2.96.x - 4.0.x)
// __GNUC_PREREQ is not defined in GCC for Mac OS X, so we define our own macro
-#if defined(__GNUC__)
-#define __GNUC_VERSION__ (__GNUC__ * 10000 + __GNUC_MINOR__ * 100)
-#endif
-
#if __GNUC_VERSION__ >= 29600 && __GNUC_VERSION__ < 40100
#include <limits>
#undef INFINITY
#define INFINITY std::numeric_limits<double>::infinity()
#endif
-#endif // WIN32
+#endif // __GNUC__
namespace v8 { namespace internal {
« no previous file with comments | « src/globals.h ('k') | src/platform-win32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698