kst: improve the previous fix by adding only functions we need in the

global scope. Impacts !clang archs only. Safety REVISION bump
needed as kst has been built at least on powerpc (confirmed by sthen@,
thanks!).

OK rsadowski@ and pirofti@ (who proposed the change)
This commit is contained in:
cwen 2020-01-10 23:10:38 +00:00
parent 7e17838fd8
commit cc3433d490
2 changed files with 7 additions and 5 deletions

View File

@ -1,11 +1,11 @@
# $OpenBSD: Makefile,v 1.39 2020/01/09 17:20:47 cwen Exp $
# $OpenBSD: Makefile,v 1.40 2020/01/10 23:10:38 cwen Exp $
COMMENT= data viewing/plotting tool
GH_ACCOUNT = Kst-plot
GH_PROJECT = kst
GH_TAGNAME = v2.0.8
REVISION = 3
REVISION = 4
SHARED_LIBS += kst2core 0.0 # 2.0
SHARED_LIBS += kst2math 0.0 # 2.0

View File

@ -1,4 +1,4 @@
$OpenBSD: patch-src_libkst_math_kst_h,v 1.1 2020/01/09 17:20:47 cwen Exp $
$OpenBSD: patch-src_libkst_math_kst_h,v 1.2 2020/01/10 23:10:38 cwen Exp $
ports-gcc: fix out of scope errors, from
https://github.com/Kst-plot/kst/pull/18
@ -6,13 +6,15 @@ https://github.com/Kst-plot/kst/pull/18
Index: src/libkst/math_kst.h
--- src/libkst/math_kst.h.orig
+++ src/libkst/math_kst.h
@@ -31,6 +31,11 @@ inline double pow(float a, double b) { return pow((dou
@@ -31,6 +31,13 @@ inline double pow(float a, double b) { return pow((dou
inline double pow(int a, qreal b) { return pow((double)a, (double)b); }
#endif
+#if defined(__OpenBSD__) && !defined(__clang__)
+#include <cmath>
+using namespace std;
+using std::isnan;
+using std::isinf;
+using std::isfinite;
+#endif
+
namespace Kst {