diff options
author | dholland <dholland@pkgsrc.org> | 2015-06-25 06:22:11 +0000 |
---|---|---|
committer | dholland <dholland@pkgsrc.org> | 2015-06-25 06:22:11 +0000 |
commit | b666e9c8d83d7f3ab1f6a0b2cfdde281e97238f9 (patch) | |
tree | 7df7eb73b287c217c9911a720ed4cdfdde02e0b7 /games/craft/patches | |
parent | 7c8237662b5fac1cac03a5eace06668ec8f04760 (diff) | |
download | pkgsrc-b666e9c8d83d7f3ab1f6a0b2cfdde281e97238f9.tar.gz |
Cast argument of sqrt to double to placate Solaris compiler.
Also while here remove one article of pkglint.
Diffstat (limited to 'games/craft/patches')
-rw-r--r-- | games/craft/patches/patch-craft.hc | 15 | ||||
-rw-r--r-- | games/craft/patches/patch-object__handler.hc | 15 |
2 files changed, 30 insertions, 0 deletions
diff --git a/games/craft/patches/patch-craft.hc b/games/craft/patches/patch-craft.hc new file mode 100644 index 00000000000..208777963c7 --- /dev/null +++ b/games/craft/patches/patch-craft.hc @@ -0,0 +1,15 @@ +$NetBSD: patch-craft.hc,v 1.1 2015/06/25 06:22:11 dholland Exp $ + +Cast sqrt argument to double to placate the Solaris compiler. + +--- craft.hc~ 2015-06-25 06:13:03.000000000 +0000 ++++ craft.hc +@@ -221,7 +221,7 @@ double pdist (int x1, int y1, int x2, in + {int xx = x1 - x2; + int yy = y1 - y2; + +- return sqrt (xx * xx + yy * yy); ++ return sqrt ((double)(xx * xx + yy * yy)); + } + + void init_speed (double factor) diff --git a/games/craft/patches/patch-object__handler.hc b/games/craft/patches/patch-object__handler.hc new file mode 100644 index 00000000000..01884431e7f --- /dev/null +++ b/games/craft/patches/patch-object__handler.hc @@ -0,0 +1,15 @@ +$NetBSD: patch-object__handler.hc,v 1.1 2015/06/25 06:22:11 dholland Exp $ + +Cast sqrt argument to double to placate the Solaris compiler. + +--- object_handler.hc~ 2015-06-25 06:13:03.000000000 +0000 ++++ object_handler.hc +@@ -36,7 +36,7 @@ double dist (int x1, int y1, int x2, int + {int xx = x1 - x2; + int yy = y1 - y2; + +- return sqrt (xx * xx + yy * yy); ++ return sqrt ((double)(xx * xx + yy * yy)); + } + + int stepdist (int x1, int y1, int x2, int y2) |