aboutsummaryrefslogtreecommitdiffstats
path: root/astro/xplanet
diff options
context:
space:
mode:
authornovel <novel@FreeBSD.org>2005-06-30 00:09:34 +0800
committernovel <novel@FreeBSD.org>2005-06-30 00:09:34 +0800
commit171812c17e255eba8c9d2526e55c51fb30079e50 (patch)
tree51a661e976e5ba5e0cf4c4679f90786aab59ea94 /astro/xplanet
parente480fc60a61d0c55e3b6054f236f6c4cf35e5dec (diff)
downloadfreebsd-ports-gnome-171812c17e255eba8c9d2526e55c51fb30079e50.tar.gz
freebsd-ports-gnome-171812c17e255eba8c9d2526e55c51fb30079e50.tar.zst
freebsd-ports-gnome-171812c17e255eba8c9d2526e55c51fb30079e50.zip
Add a hack to emulate signbit() on 4.x. I hope this will fix build on 4.x and
work in a proper way. Reported by: pointyhat via kris
Diffstat (limited to 'astro/xplanet')
-rw-r--r--astro/xplanet/files/patch-src-libprojection-ProjectionIcosagnomonic.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/astro/xplanet/files/patch-src-libprojection-ProjectionIcosagnomonic.cpp b/astro/xplanet/files/patch-src-libprojection-ProjectionIcosagnomonic.cpp
new file mode 100644
index 000000000000..d4dcb61d798c
--- /dev/null
+++ b/astro/xplanet/files/patch-src-libprojection-ProjectionIcosagnomonic.cpp
@@ -0,0 +1,22 @@
+--- src/libprojection/ProjectionIcosagnomonic.cpp.orig Tue Jun 14 22:10:36 2005
++++ src/libprojection/ProjectionIcosagnomonic.cpp Wed Jun 29 20:11:58 2005
+@@ -26,6 +26,19 @@
+ #define THIGH 3
+ #define RATIO (((THIGH)*sqrt(3.0)/2)/(TWIDE))
+
++/* signbit() appaired only in FreeBSD 5.1, so we need this hack */
++#ifndef signbit
++static int
++signbit(double x)
++{
++
++ if ((x < 0.0) || (x = -0.0))
++ return 1;
++ else
++ return 0;
++}
++#endif /* signbit */
++
+ bool
+ ProjectionIcosagnomonic::PointXY::sameSide(const PointXY& p1,
+ const PointXY& p2,