summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f03d14a)
raw | patch | inline | side by side (parent: f03d14a)
author | mjwybrow <mjwybrow@users.sourceforge.net> | |
Sun, 22 Jun 2008 03:49:00 +0000 (03:49 +0000) | ||
committer | mjwybrow <mjwybrow@users.sourceforge.net> | |
Sun, 22 Jun 2008 03:49:00 +0000 (03:49 +0000) |
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
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
26 files changed:
diff --git a/src/2geom/isnan.h b/src/2geom/isnan.h
index 96a70f6dcf5c1939cfe5d6874c1796ef1b797d06..6b94daa6e5c61826784c2799af54ee1226a37df5 100644 (file)
--- a/src/2geom/isnan.h
+++ b/src/2geom/isnan.h
*
* 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.
# 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))
# 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 93cbc1b0413946b4570ba1b6f0fc9e7d400e81ba..271e87be4642a4a29d84483b95c4c07146e75220 100644 (file)
--- a/src/2geom/linear.h
+++ b/src/2geom/linear.h
#ifndef SEEN_LINEAR_H
#define SEEN_LINEAR_H
-#include "isnan.h"
#include "interval.h"
+#include "isnan.h"
namespace Geom{
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 4d6367995700f7617aedc1325323202151e55399..e1f36cd796a5a3ffa7426aae45615f4fd82224e2 100644 (file)
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
interface.cpp
interface.h
isinf.h
-isnan.h
isnormal.h
jabber_whiteboard
knot.cpp
diff --git a/src/Makefile_insert b/src/Makefile_insert
index 7863225743f794c55a07d04c9c70260e6fb46a07..033d2781079f064e230d32c77df68da67c2aacc4 100644 (file)
--- a/src/Makefile_insert
+++ b/src/Makefile_insert
inkscape-stock.cpp inkscape-stock.h\
inkscape.cpp inkscape.h inkscape-private.h \
interface.cpp interface.h \
- isnan.h isinf.h \
+ isinf.h \
isnormal.h \
knot-enums.h \
knot-holder-entity.h knot-holder-entity.cpp \
index b01e31b1411581945919753002c9a60241387264..434e7169e8df1a2e1fb579eb5070eb9fee909bb5 100644 (file)
#include "bezier-utils.h"
#include <libnr/nr-point-fns.h>
-#include "isnan.h"
+#include "2geom/isnan.h"
typedef NR::Point BezierCurve[];
index 02a195bb0cbfef4d1176a254c2ba558b6032c8c7..a1a4886741f6a02d59328f3b9f639873392729dd 100644 (file)
#include <cmath>
-#include "isnan.h"
+#include "2geom/isnan.h"
#include "sp-fecomposite.h"
#include "display/nr-filter-composite.h"
#include "display/nr-filter-pixops.h"
index 3113332476e40a62df6f523573d6e16a694ebaa0..76b541ace61029b0ac3d855ccb1e99015b049dbc 100644 (file)
#include <cstdlib>
#include <limits>
-#include "isnan.h"
+#include "2geom/isnan.h"
#include "display/nr-filter-primitive.h"
#include "display/nr-filter-gaussian.h"
index 977d4fbf81aaa2cd5e1b50f03108acec95ea05e3..1632a7a82e64fb63daf35bdf0d978b63ee0fdb49 100644 (file)
#include <cmath>
#include <vector>
-#include "isnan.h"
+#include "2geom/isnan.h"
#include "sp-femerge.h"
#include "display/nr-filter-merge.h"
#include "display/nr-filter-pixops.h"
diff --git a/src/doxygen-main.cpp b/src/doxygen-main.cpp
index ae1e1de963a30b565b4b4ab5a50af5fa446f12f9..035d83a1452d979043379a0b96fd414fc2505b63 100644 (file)
--- a/src/doxygen-main.cpp
+++ b/src/doxygen-main.cpp
/** \page Rendering Rendering Related Classes and Files
*
* SPColor [\ref color.cpp, \ref color.h, \ref color-rgba.h]
- * [\ref geom.cpp] [\ref isnan.h] [\ref mod360.cpp]
+ * [\ref geom.cpp] [\ref mod360.cpp]
*/
/** \page OtherServices Classes and Files From Other Services
* [\ref inkview.cpp, \ref slideshow.cpp] [\ref sp-animation.cpp]
index cd3a9158a06e387d4d222d6b8ebc28a80f60636b..18ebf2b061287cabf8f6f78d9b17c79ef8e44d42 100644 (file)
#include "display/canvas-bpath.h"
#include "display/canvas-arena.h"
#include "livarot/Shape.h"
-#include "isnan.h"
+#include "2geom/isnan.h"
#include "dyna-draw-context.h"
diff --git a/src/eraser-context.cpp b/src/eraser-context.cpp
index 36cfb0d15a945406aa91f1195c9db9c50fd3f3cd..9319018086194965d486807547ab3f90ebe8cb1e 100644 (file)
--- a/src/eraser-context.cpp
+++ b/src/eraser-context.cpp
#include "display/canvas-bpath.h"
#include "display/canvas-arena.h"
#include "livarot/Shape.h"
-#include "isnan.h"
+#include "2geom/isnan.h"
#include "eraser-context.h"
diff --git a/src/isnan.h b/src/isnan.h
--- a/src/isnan.h
+++ /dev/null
@@ -1,70 +0,0 @@
-#ifndef __ISNAN_H__
-#define __ISNAN_H__
-
-/*
- * Temporary fix for various misdefinitions of isnan().
- * isnan() is becoming undef'd in some .h files.
- * #include this last in your .cpp file to get it right.
- *
- * The problem is that isnan and isfinite are part of C99 but aren't part of
- * the C++ standard (which predates C99).
- *
- * Authors:
- * Inkscape groupies and obsessive-compulsives
- *
- * Copyright (C) 2004 authors
- *
- * 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.
- */
-
-#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.
- */
-
-#if defined(__isnan)
-# define IS_NAN(_a) (__isnan(_a))
-#elif defined(__APPLE__) && __GNUC__ == 3
-# 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__) || 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))
-#endif
-/* If the above doesn't work, then try (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.
- */
-
-
-#if defined(__isfinite)
-# 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) && !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.
- */
-
-
-#endif /* __ISNAN_H__ */
diff --git a/src/libcola/cola.cpp b/src/libcola/cola.cpp
index 2119ea981d847de9aa758b1a972b2cd4b3e5b287..2a3b525a77d5cbf998333ae770d11e646099c793 100644 (file)
--- a/src/libcola/cola.cpp
+++ b/src/libcola/cola.cpp
#include "conjugate_gradient.h"
#include "straightener.h"
#include "shortest_paths.h"
-#include "isnan.h"
+#include "2geom/isnan.h"
namespace cola {
index 237cb94af377fef8011cf04aeb126299dd945bb6..fb8702ec70893fa71784ec84528998f24eb2ba1c 100644 (file)
#include <libvpsc/constraint.h>
#include "gradient_projection.h"
#include <iostream>
-#include "isnan.h"
+#include "2geom/isnan.h"
#include "isinf.h"
#include <math.h>
index 138812655077cf9dcd316e29f815f47f3a2ad9f5..061333cbbd4343544b0724040d12b83cf7903c6f 100644 (file)
#include "libnr/in-svg-plane.h"
#include "utest/utest.h"
-#include "isnan.h"
+#include "2geom/isnan.h"
int main(int argc, char *argv[])
{
index ced9f978ca619f85804ad86753f797aee1220331..304182fed71cbe4162455741c2aa762fc229e645 100644 (file)
#include <cmath>
#include "libnr/in-svg-plane.h"
-#include "isnan.h"
+#include "2geom/isnan.h"
class InSvgPlaneTest : public CxxTest::TestSuite
{
index 00a704b596cfda1ac7cf5cf88fa29b4fc9cca061..312055fee853c913c2bb392ea789dedf880b4c6f 100644 (file)
#include "utest/utest.h"
#include "libnr/nr-point-fns.h"
-#include "isnan.h"
+#include "2geom/isnan.h"
using NR::Point;
index a94ef1b7368d860d5f2c28cd3e315e961e9ee1e6..bd6605802787566e454e7e11a27982c2dcee06ed 100644 (file)
#include <stdlib.h>
#include "libnr/nr-point-fns.h"
-#include "isnan.h"
+#include "2geom/isnan.h"
using NR::Point;
index f73f71e3bb0388b912fcb8c4f8dce1b4fc87fb6e..5082c3a109950a09e5e7dbcf83d4e367456512f5 100644 (file)
#include <libnr/nr-point-fns.h>
-#include <isnan.h>
+#include <2geom/isnan.h>
using NR::Point;
diff --git a/src/libnr/nr-types.cpp b/src/libnr/nr-types.cpp
index a4e16d1278b636e7c5b641f48d596e0d49dd8d75..4da711cc01351d3e82e34a4c5a0b667f9b90c21b 100644 (file)
--- a/src/libnr/nr-types.cpp
+++ b/src/libnr/nr-types.cpp
#include <libnr/nr-types.h>
-#include "isnan.h" //temporary fix for isnan()
+#include "2geom/isnan.h"
/** Scales this vector to make it a unit vector (within rounding error).
*
index f3bc65eed858f5d7cdca322f8632277f72627808..c57966e26ca593523c636e86cdc451fb1dba8e1d 100644 (file)
#include "generate-constraints.h"
#include "constraint.h"
-#include "isnan.h" /* Include last */
+#include "2geom/isnan.h" /* Include last */
using std::set;
using std::vector;
diff --git a/src/mod360-test.h b/src/mod360-test.h
index 79627571fd3c73b9c94f9e4b47a9cb9712d4d23f..2d65beb924bf77924daafaa35e61b6c4fd08a138 100644 (file)
--- a/src/mod360-test.h
+++ b/src/mod360-test.h
#include <cxxtest/TestSuite.h>
-#include <isnan.h>
+#include "2geom/isnan.h"
#include "mod360.h"
diff --git a/src/seltrans.cpp b/src/seltrans.cpp
index 3d5c19b8ca1970a77cc7333b41e6d683958c9b0e..a3e0c9f0b4cec86f897f6c5439acd7542c4389b5 100644 (file)
--- a/src/seltrans.cpp
+++ b/src/seltrans.cpp
#include "2geom/angle.h"
#include "display/snap-indicator.h"
-#include "isnan.h" //temp fix. make sure included last
static void sp_remove_handles(SPKnot *knot[], gint num);
diff --git a/src/sp-namedview.cpp b/src/sp-namedview.cpp
index 54e84927a768c73995bdbc3529042aa6e91d6314..7caa9407cfef05de719503749dd831bae9ebb9eb 100644 (file)
--- a/src/sp-namedview.cpp
+++ b/src/sp-namedview.cpp
#include "desktop.h"
#include "conn-avoid-ref.h" // for defaultConnSpacing.
-#include "isnan.h" //temp fix for isnan(). include last
#define DEFAULTTOLERANCE 0.4
#define DEFAULTGRIDCOLOR 0x3f3fff25
diff --git a/src/style.cpp b/src/style.cpp
index a67b86167221ecf6ef0e562a228906819e6dc103..766f5a7fbe7b021b94c136417492641b5f212209 100644 (file)
--- a/src/style.cpp
+++ b/src/style.cpp
#include "svg/css-ostringstream.h"
#include "xml/repr.h"
#include "unit-constants.h"
-#include "isnan.h"
+#include "2geom/isnan.h"
#include "macros.h"
#include "sp-filter-reference.h"
diff --git a/src/tweak-context.cpp b/src/tweak-context.cpp
index 509194612c16c40c214fabf0a1987a9b8fa4c1e5..923a219bc4952f7bf72a4c6f5f423e5fa6a9689b 100644 (file)
--- a/src/tweak-context.cpp
+++ b/src/tweak-context.cpp
#include "display/canvas-arena.h"
#include "display/curve.h"
#include "livarot/Shape.h"
-#include "isnan.h"
+#include "2geom/isnan.h"
#include "prefs-utils.h"
#include "style.h"
#include "box3d.h"