summaryrefslogtreecommitdiff
blob: d7fbcbfdb13b605d36a21a25b97d9a119e1e436f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Desc:	Fix missing isinf() for Solaris (same way as for kcalc).
Author:	Heiko Przybyl <zuxez@cs.tu-berlin.de>
--- kalgebra-4.3.2/kalgebra/analitzagui/graph2d.cpp.orig	2009-10-16 15:31:29.804959916 +0200
+++ kalgebra-4.3.2/kalgebra/analitzagui/graph2d.cpp	2009-10-16 15:35:36.879338408 +0200
@@ -38,6 +38,17 @@
 #include "analitza.h"
 #include "functionsmodel.h"
 
+// Stolen from kcalc.
+#if defined(Q_OS_SOLARIS)
+// Strictly by the standard, ininf() is a c99-ism which
+// is unavailable in C++. The IEEE FP headers provide
+// a function with similar functionality, so use that instead.
+// However, !finite(a) == isinf(a) || isnan(a), so it's 
+// not 100% correct.
+#include <ieeefp.h>
+#define isinf(a) !finite(a)
+#endif
+
 // #define DEBUG_GRAPH
 
 using namespace std;