summaryrefslogtreecommitdiffstats
path: root/src/2geom
diff options
context:
space:
mode:
authormjwybrow <mjwybrow@users.sourceforge.net>2008-06-22 03:49:00 +0000
committermjwybrow <mjwybrow@users.sourceforge.net>2008-06-22 03:49:00 +0000
commitaef141460e6e78adb35e8bf4d39dcf4e2a4efebc (patch)
tree59eb056b015f562b636420fd4b9a4e348831c45b /src/2geom
parentpatch 241565 (diff)
downloadinkscape-aef141460e6e78adb35e8bf4d39dcf4e2a4efebc.tar.gz
inkscape-aef141460e6e78adb35e8bf4d39dcf4e2a4efebc.zip
* src/2geom/isnan.h, src/libcola/cola.cpp, src/style.cpp, src/seltrans.cpp,
src/libcola/gradient_projection.cpp, src/libvpsc/generate-constraints.cpp, src/libnr/nr-types.cpp, src/libnr/nr-point-fns-test.cpp, src/isnan.h, src/libnr/nr-point-fns.cpp, src/libnr/in-svg-plane-test.cpp, src/doxygen-main.cpp, src/display/nr-filter-composite.cpp, src/display/nr-filter-merge.cpp, src/display/nr-filter-gaussian.cpp, src/display/bezier-utils.cpp, src/Makefile_insert, src/eraser-context.cpp, src/dyna-draw-context.cpp, src/tweak-context.cpp, src/sp-namedview.cpp, src/libnr/in-svg-plane-test.h, src/libnr/nr-point-fns-test.h, src/mod360-test.h, src/CMakeLists.txt, src/2geom/linear.h: Properly fix the conflicting isnan.h problem: 1) Update src/2geom/isnan.h to match newest Inkscape src/isnana.h (Also commited this change to lib2geom project repository) 2) Remove Inkscape's src/isnan.h 3) Update all files to include src/2geom/isnan.h instead of src/isnan.h (bzr r6013)
Diffstat (limited to 'src/2geom')
-rw-r--r--src/2geom/isnan.h20
-rw-r--r--src/2geom/linear.h2
2 files changed, 16 insertions, 6 deletions
diff --git a/src/2geom/isnan.h b/src/2geom/isnan.h
index 96a70f6dc..6b94daa6e 100644
--- a/src/2geom/isnan.h
+++ b/src/2geom/isnan.h
@@ -16,11 +16,11 @@
*
* Released under GNU GPL, read the file 'COPYING' for more information
*
- * 2005 modification hereby placed in public domain. Probably supercedes the 2004 copyright
- * for the code itself.
+ * 2005 modification hereby placed in public domain. Probably supercedes
+ * the 2004 copyright for the code itself.
*/
-#include <cmath>
+#include <math.h>
/* You might try changing the above to <cmath> if you have problems.
* Whether you use math.h or cmath, you may need to edit the .cpp file
* and/or other .h files to use the same header file.
@@ -32,7 +32,9 @@
# define IS_NAN(_a) (__isnan(_a)) /* MacOSX/Darwin definition < 10.4 */
#elif defined(WIN32) || defined(_isnan)
# define IS_NAN(_a) (_isnan(_a)) /* Win32 definition */
-#elif defined(isnan) || defined(__FreeBSD__)
+#elif defined(isnan) || defined(__FreeBSD__) || defined(__osf__)
+# define IS_NAN(_a) (isnan(_a)) /* GNU definition */
+#elif defined (SOLARIS_2_8) && __GNUC__ == 3 && __GNUC_MINOR__ == 2
# define IS_NAN(_a) (isnan(_a)) /* GNU definition */
#else
# define IS_NAN(_a) (std::isnan(_a))
@@ -47,12 +49,20 @@
# define IS_FINITE(_a) (__isfinite(_a))
#elif defined(__APPLE__) && __GNUC__ == 3
# define IS_FINITE(_a) (__isfinite(_a)) /* MacOSX/Darwin definition < 10.4 */
+#elif defined(__sgi)
+# define IS_FINITE(_a) (_isfinite(_a))
#elif defined(isfinite)
# define IS_FINITE(_a) (isfinite(_a))
+#elif defined(__osf__)
+# define IS_FINITE(_a) (finite(_a) && !IS_NAN(_a))
+#elif defined (SOLARIS_2_8) && __GNUC__ == 3 && __GNUC_MINOR__ == 2
+#include <ieeefp.h>
+#define IS_FINITE(_a) (finite(_a) && !IS_NAN(_a))
#else
# define IS_FINITE(_a) (std::isfinite(_a))
#endif
-/* If the above doesn't work, then try (finite(_a) && !isNaN(_a)) or (!isNaN((_a) - (_a))).
+/* If the above doesn't work, then try (finite(_a) && !IS_NAN(_a)) or
+ * (!IS_NAN((_a) - (_a))).
* Also, please report a bug as per http://www.inkscape.org/report_bugs.php,
* giving information about what platform and compiler version you're using.
*/
diff --git a/src/2geom/linear.h b/src/2geom/linear.h
index 93cbc1b04..271e87be4 100644
--- a/src/2geom/linear.h
+++ b/src/2geom/linear.h
@@ -33,8 +33,8 @@
#ifndef SEEN_LINEAR_H
#define SEEN_LINEAR_H
-#include "isnan.h"
#include "interval.h"
+#include "isnan.h"
namespace Geom{