Do not use common INFINITY name as it might be overriden by some other include file...
authorantonm@chromium.org <antonm@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 24 Jun 2009 17:25:46 +0000 (17:25 +0000)
committerantonm@chromium.org <antonm@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 24 Jun 2009 17:25:46 +0000 (17:25 +0000)
project specific name.

Review URL: http://codereview.chromium.org/146096

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2267 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/conversions.cc
src/platform.h

index 7f63d9b..2a3db7b 100644 (file)
@@ -327,7 +327,7 @@ static double InternalStringToDouble(S* str,
         index++;
       if (!SubStringEquals(str, index, "Infinity"))
         return JUNK_STRING_VALUE;
-      result = is_negative ? -INFINITY : INFINITY;
+      result = is_negative ? -V8_INFINITY : V8_INFINITY;
       index += 8;
     }
   }
index 8eb9552..2c64d5e 100644 (file)
@@ -44,6 +44,8 @@
 #ifndef V8_PLATFORM_H_
 #define V8_PLATFORM_H_
 
+#define V8_INFINITY INFINITY
+
 // Windows specific stuff.
 #ifdef WIN32
 
@@ -58,7 +60,8 @@ enum {
   FP_NORMAL
 };
 
-#define INFINITY HUGE_VAL
+#undef V8_INFINITY
+#define V8_INFINITY HUGE_VAL
 
 namespace v8 {
 namespace internal {
@@ -100,8 +103,8 @@ int random();
 // __GNUC_PREREQ is not defined in GCC for Mac OS X, so we define our own macro
 #if __GNUC_VERSION__ >= 29600 && __GNUC_VERSION__ < 40100
 #include <limits>
-#undef INFINITY
-#define INFINITY std::numeric_limits<double>::infinity()
+#undef V8_INFINITY
+#define V8_INFINITY std::numeric_limits<double>::infinity()
 #endif
 
 #endif  // __GNUC__