Reviewers: Erik Corry,

Message:
Hi Erik,

The latest release 2.2.9 isn't building on Solaris, here is a patch to fix that. __C99FEATURES__ needs to be defined before any #include <math.h> in order to get
certain macros like isfinite().

Ryan

Description:
Move __C99FEATURES__ define to compile for Solaris

Please review this at http://codereview.chromium.org/1990010/show

Affected files:
  M SConstruct
  M src/platform.h


Index: SConstruct
diff --git a/SConstruct b/SConstruct
index 244e8ac69dff45e41b4c8783bbfbd9b3a6437b79..1056de7d69f2f09ca62396ff0572dc4341950297 100644
--- a/SConstruct
+++ b/SConstruct
@@ -179,6 +179,9 @@ LIBRARY_FLAGS = {
       'CCFLAGS':      ['-ansi'],
     },
     'os:solaris': {
+      # On Solaris, to get isinf, INFINITY, fpclassify and other macros one
+      # needs to define __C99FEATURES__.
+      'CPPDEFINES': ['__C99FEATURES__'],
       'CPPPATH' : ['/usr/local/include'],
       'LIBPATH' : ['/usr/local/lib'],
       'CCFLAGS':      ['-ansi'],
Index: src/platform.h
diff --git a/src/platform.h b/src/platform.h
index 82e2e3c06253589fb1e6c3937cc33d13776ecb0b..7156441b3a6b3262c0946963662222dd27e2a1ce 100644
--- a/src/platform.h
+++ b/src/platform.h
@@ -44,12 +44,6 @@
 #ifndef V8_PLATFORM_H_
 #define V8_PLATFORM_H_

-#ifdef __sun
-// On Solaris, to get isinf, INFINITY, fpclassify and other macros one needs
-// to define this symbol
-#define __C99FEATURES__ 1
-#endif
-
 #define V8_INFINITY INFINITY

 // Windows specific stuff.


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to