summaryrefslogtreecommitdiff
path: root/deps/v8/src/globals.h
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2011-09-08 16:03:35 -0700
committerRyan Dahl <ry@tinyclouds.org>2011-09-08 16:11:20 -0700
commit03c2f62020e231db8be078d33e836cbe7e015460 (patch)
tree976bbdb9a68710c6684e24106beff768132e6041 /deps/v8/src/globals.h
parent0a127d6a694f2928f91d2ed51ef85a65768fdad3 (diff)
downloadnode-new-03c2f62020e231db8be078d33e836cbe7e015460.tar.gz
Upgrade V8 to 3.6.2
Diffstat (limited to 'deps/v8/src/globals.h')
-rw-r--r--deps/v8/src/globals.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/deps/v8/src/globals.h b/deps/v8/src/globals.h
index bb9d0a8e8b..6c6966aee5 100644
--- a/deps/v8/src/globals.h
+++ b/deps/v8/src/globals.h
@@ -28,6 +28,35 @@
#ifndef V8_GLOBALS_H_
#define V8_GLOBALS_H_
+// Define V8_INFINITY
+#define V8_INFINITY INFINITY
+
+// GCC specific stuff
+#ifdef __GNUC__
+
+#define __GNUC_VERSION_FOR_INFTY__ (__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:
+// http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11931
+// 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 __GNUC_VERSION_FOR_INFTY__ >= 29600 && __GNUC_VERSION_FOR_INFTY__ < 40100
+#include <limits>
+#undef V8_INFINITY
+#define V8_INFINITY std::numeric_limits<double>::infinity()
+#endif
+#undef __GNUC_VERSION_FOR_INFTY__
+
+#endif // __GNUC__
+
+#ifdef _MSC_VER
+#undef V8_INFINITY
+#define V8_INFINITY HUGE_VAL
+#endif
+
+
#include "../include/v8stdint.h"
namespace v8 {