Build error on powerpc-apple-darwin7.8.0
I have the following problem building inkscape on the above platform:
object-edit.cpp: In function `void sp_spiral_outer_set(SPItem*, const NR::Point&, const NR::Point&, unsigned int)': object-edit.cpp:842: error: `isfinite' undeclared in namespace `std'
Should this be a configure option?
Chris Burdess wrote:
I have the following problem building inkscape on the above platform:
object-edit.cpp: In function `void sp_spiral_outer_set(SPItem*, const NR::Point&, const NR::Point&, unsigned int)': object-edit.cpp:842: error: `isfinite' undeclared in namespace `std'
Should this be a configure option?
We have some across this problem before with isnan(), and had trouble auto-sensing it. Maybe isfinite() should be added to this? Notice how we avoid name collision by renaming it isNaN(). It could be renamed float-attributes.h or something:
#ifdef __APPLE__
/* MacOSX definition */ #define isNaN(a) (__isnan(a))
#else
#ifdef WIN32
/* Win32 definition */ #define isNaN(a) (_isnan(a))
#else
/* Linux definition */ #define isNaN(a) (isnan(a))
#endif /* WIN32 */
#endif /* __APPLE__ */
Fred (he's on OSX I think) has just sent me a patch for flowtext, and this patch treats this function thus:
diff -u -3 -r1.3 isnan.h --- src/isnan.h 9 Jul 2004 19:35:17 -0000 1.3 +++ src/isnan.h 14 Feb 2005 13:13:37 -0000 @@ -22,6 +22,7 @@
/* MacOSX definition */ #define isNaN(a) (__isnan(a)) +#define isFinite(a) (__isfinite(a))
#else
@@ -29,11 +30,13 @@
/* Win32 definition */ #define isNaN(a) (_isnan(a)) +#define isFinite(a) (std::isfinite(a))
#else
/* Linux definition */ #define isNaN(a) (isnan(a)) +#define isFinite(a) (std::isfinite(a))
#endif /* WIN32 */
Apparently that's what worked for him. I'll commit his patch along with this bit, if no one objects.
participants (3)
-
Bob Jamison
-
bulia byak
-
Chris Burdess