summaryrefslogtreecommitdiff
path: root/games/exchess/patches
diff options
context:
space:
mode:
authorhe <he@pkgsrc.org>2022-07-24 21:26:30 +0000
committerhe <he@pkgsrc.org>2022-07-24 21:26:30 +0000
commitf21c8a7e27842a65f8ed282209a84c628ef839ef (patch)
treeff1cb12cf2edfd0234256cd90779a1e8ac9c94b1 /games/exchess/patches
parente7a842cefdee9fabbfa60488bc676e56a11732a2 (diff)
downloadpkgsrc-f21c8a7e27842a65f8ed282209a84c628ef839ef.tar.gz
games/exchess: Be explicit about needing signed chars.
Fixes build on NetBSD/powerpc where "char" is unsigned.
Diffstat (limited to 'games/exchess/patches')
-rw-r--r--games/exchess/patches/patch-src_score.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/games/exchess/patches/patch-src_score.h b/games/exchess/patches/patch-src_score.h
new file mode 100644
index 00000000000..17cd517def9
--- /dev/null
+++ b/games/exchess/patches/patch-src_score.h
@@ -0,0 +1,16 @@
+$NetBSD: patch-src_score.h,v 1.1 2022/07/24 21:26:30 he Exp $
+
+The piece_sq table depends on signed chars which isn't
+the default on NetBSD/powerpc, so make that explicit.
+
+--- src/score.h.orig 2017-02-04 14:23:32.000000000 +0000
++++ src/score.h
+@@ -96,7 +96,7 @@ char attack_scale[16] = { 0, 1, 2, 4, 9,
+ // stage 3 = ending
+
+
+-char piece_sq[4][7][64] = { // note values cannot exceed +127 or -127!
++signed char piece_sq[4][7][64] = { // note values cannot exceed +127 or -127!
+
+ // Reading these is a little tricky. These tables
+ // are set up to look like a chess board from white's