pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/games/exchess Make the package build when using gcc-3.3.
details: https://anonhg.NetBSD.org/pkgsrc/rev/ed141ee10fa1
branches: trunk
changeset: 468473:ed141ee10fa1
user: kristerw <kristerw%pkgsrc.org@localhost>
date: Sat Feb 14 04:31:56 2004 +0000
description:
Make the package build when using gcc-3.3.
diffstat:
games/exchess/distinfo | 9 ++-
games/exchess/patches/patch-ad | 15 +++-
games/exchess/patches/patch-af | 13 ++++
games/exchess/patches/patch-ag | 29 +++++++++
games/exchess/patches/patch-ah | 16 +++++
games/exchess/patches/patch-ai | 130 +++++++++++++++++++++++++++++++++++++++++
games/exchess/patches/patch-aj | 42 +++++++++++++
7 files changed, 249 insertions(+), 5 deletions(-)
diffs (297 lines):
diff -r 9b411103bcab -r ed141ee10fa1 games/exchess/distinfo
--- a/games/exchess/distinfo Sat Feb 14 04:06:29 2004 +0000
+++ b/games/exchess/distinfo Sat Feb 14 04:31:56 2004 +0000
@@ -1,9 +1,14 @@
-$NetBSD: distinfo,v 1.3 2002/07/16 13:39:03 agc Exp $
+$NetBSD: distinfo,v 1.4 2004/02/14 04:31:56 kristerw Exp $
SHA1 (EXCH314S.zip) = 7d8ffbd94dc86a97512826e611048a691c8c646d
Size (EXCH314S.zip) = 110676 bytes
SHA1 (patch-aa) = 40e90ccef0f2f1cd56ab8545ab73f93ccdb04017
SHA1 (patch-ab) = a9385051ed9d482e02bbeff40b5d9552ebc56c9f
SHA1 (patch-ac) = cfc1beff8ae3b2e4c9620e8d49852ce80d848ad6
-SHA1 (patch-ad) = 021dbe949c3c5865d9de8a095a2c40a66e41f658
+SHA1 (patch-ad) = ea2c66248a07d21db498bb093be284327838ccaa
SHA1 (patch-ae) = 9d374b888a6f431604f41c4421baa23d8ca775a1
+SHA1 (patch-af) = 7eb0c780dea41b5d17a532f82a76b984eeefda2d
+SHA1 (patch-ag) = 00bb9750c823aecd7fa44aacc1cf539e062055a9
+SHA1 (patch-ah) = 872b0b7c62f95075f0ce7360464fa51215619ee3
+SHA1 (patch-ai) = 5aaa3e15304c8f19282770d126623d71bf747dbe
+SHA1 (patch-aj) = 83f69a5deb3198877a7c8309f34ed9f1189b355a
diff -r 9b411103bcab -r ed141ee10fa1 games/exchess/patches/patch-ad
--- a/games/exchess/patches/patch-ad Sat Feb 14 04:06:29 2004 +0000
+++ b/games/exchess/patches/patch-ad Sat Feb 14 04:31:56 2004 +0000
@@ -1,7 +1,7 @@
-$NetBSD: patch-ad,v 1.1.1.1 2000/10/25 08:40:00 jlam Exp $
+$NetBSD: patch-ad,v 1.2 2004/02/14 04:31:56 kristerw Exp $
---- main.cpp.orig Sat Apr 1 07:46:20 2000
-+++ main.cpp
+--- main.cpp.orig 2000-04-01 07:46:20.000000000 +0200
++++ main.cpp 2004-02-14 04:58:19.000000000 +0100
@@ -17,6 +17,7 @@
#if UNIX
#include <sys/types.h>
@@ -37,3 +37,12 @@
/* initializing hash tables, check tables, scoring parameters,
and the random number seed and tablebases */
+@@ -117,7 +109,7 @@
+ if(li < 10) sprintf(lfile, "run_log.00%i", li);
+ else if(li < 100) sprintf(lfile, "run_log.0%i", li);
+ else sprintf(lfile, "run_log.%i", li);
+- logfile.open(lfile, ios::noreplace | ios::out);
++ logfile.open(lfile, ios::out);
+ if(logfile) break;
+ }
+ if(!logfile) {
diff -r 9b411103bcab -r ed141ee10fa1 games/exchess/patches/patch-af
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/games/exchess/patches/patch-af Sat Feb 14 04:31:56 2004 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-af,v 1.1 2004/02/14 04:31:56 kristerw Exp $
+
+--- hash.h.orig Sat Feb 14 04:16:19 2004
++++ hash.h Sat Feb 14 04:16:36 2004
+@@ -54,6 +54,6 @@
+ float ran(long *idum);
+
+ /* Macro for or'ing two hash codes */
+-#define or(A, B) A.address ^= B.address; A.key ^= B.key
++#define hash_or(A, B) A.address ^= B.address; A.key ^= B.key
+
+-#endif HASH_H
++#endif // HASH_H
diff -r 9b411103bcab -r ed141ee10fa1 games/exchess/patches/patch-ag
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/games/exchess/patches/patch-ag Sat Feb 14 04:31:56 2004 +0000
@@ -0,0 +1,29 @@
+$NetBSD: patch-ag,v 1.1 2004/02/14 04:31:56 kristerw Exp $
+
+--- hash.cpp.orig Sat Feb 14 04:23:02 2004
++++ hash.cpp Sat Feb 14 04:24:05 2004
+@@ -210,7 +210,7 @@
+ }
+
+ for(i = 0; i < 64; i++) {
+- or(temp_rec, hval[ID(p->sq[i])][i]);
++ hash_or(temp_rec, hval[ID(p->sq[i])][i]);
+ if(p->sq[i].side == p->wtm) p->material += value[p->sq[i].type];
+ else p->material -= value[p->sq[i].type];
+ if(p->sq[i].type > PAWN) p->pieces[p->sq[i].side]++;
+@@ -220,11 +220,11 @@
+ }
+ }
+
+- if(p->wtm) { or(temp_rec, wtm); }
+- else { or(temp_rec, btm); }
++ if(p->wtm) { hash_or(temp_rec, wtm); }
++ else { hash_or(temp_rec, btm); }
+
+- or(temp_rec, castle_code[p->castle]);
+- or(temp_rec, ep_code[p->ep]);
++ hash_or(temp_rec, castle_code[p->castle]);
++ hash_or(temp_rec, ep_code[p->ep]);
+
+ return temp_rec;
+ }
diff -r 9b411103bcab -r ed141ee10fa1 games/exchess/patches/patch-ah
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/games/exchess/patches/patch-ah Sat Feb 14 04:31:56 2004 +0000
@@ -0,0 +1,16 @@
+$NetBSD: patch-ah,v 1.1 2004/02/14 04:31:56 kristerw Exp $
+
+--- score.cpp.orig Sat Feb 14 04:22:38 2004
++++ score.cpp Sat Feb 14 04:30:18 2004
+@@ -99,9 +99,9 @@
+ +++++++++++++++++++++++++++++++++*/
+ pcode = stage_code[stage];
+ for(i=1;i<=p->plist[WHITE][PAWN][0];i++)
+- or(pcode, hval[WPAWN][p->plist[WHITE][PAWN][i]]);
++ hash_or(pcode, hval[WPAWN][p->plist[WHITE][PAWN][i]]);
+ for(i=1;i<=p->plist[BLACK][PAWN][0];i++)
+- or(pcode, hval[BPAWN][p->plist[BLACK][PAWN][i]]);
++ hash_or(pcode, hval[BPAWN][p->plist[BLACK][PAWN][i]]);
+
+ /*+++++++++++++++++++++++++++++++
+ |
diff -r 9b411103bcab -r ed141ee10fa1 games/exchess/patches/patch-ai
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/games/exchess/patches/patch-ai Sat Feb 14 04:31:56 2004 +0000
@@ -0,0 +1,130 @@
+$NetBSD: patch-ai,v 1.1 2004/02/14 04:31:56 kristerw Exp $
+
+--- exmove.cpp.orig Sat Feb 14 04:16:56 2004
++++ exmove.cpp Sat Feb 14 04:19:15 2004
+@@ -52,8 +52,8 @@
+ { return 0; }
+ p->sq[5] = p->sq[7];
+ p->sq[7] = empty;
+- or(p->hcode, hval[WROOK][5]);
+- or(p->hcode, hval[WROOK][7]);
++ hash_or(p->hcode, hval[WROOK][5]);
++ hash_or(p->hcode, hval[WROOK][7]);
+ p->has_castled[1] = 1;
+ /* update piece list */
+ for(pi=1;pi<=p->plist[p->wtm][ROOK][0];pi++)
+@@ -69,8 +69,8 @@
+ { return 0; }
+ p->sq[3] = p->sq[0];
+ p->sq[0] = empty;
+- or(p->hcode, hval[WROOK][3]);
+- or(p->hcode, hval[WROOK][0]);
++ hash_or(p->hcode, hval[WROOK][3]);
++ hash_or(p->hcode, hval[WROOK][0]);
+ p->has_castled[1] = 1;
+ /* update piece list */
+ for(pi=1;pi<=p->plist[p->wtm][ROOK][0];pi++)
+@@ -86,8 +86,8 @@
+ { return 0; }
+ p->sq[61] = p->sq[63];
+ p->sq[63] = empty;
+- or(p->hcode, hval[BROOK][61]);
+- or(p->hcode, hval[BROOK][63]);
++ hash_or(p->hcode, hval[BROOK][61]);
++ hash_or(p->hcode, hval[BROOK][63]);
+ p->has_castled[0] = 1;
+ /* update piece list */
+ for(pi=1;pi<=p->plist[p->wtm][ROOK][0];pi++)
+@@ -103,8 +103,8 @@
+ { return 0; }
+ p->sq[59] = p->sq[56];
+ p->sq[56] = empty;
+- or(p->hcode, hval[BROOK][59]);
+- or(p->hcode, hval[BROOK][56]);
++ hash_or(p->hcode, hval[BROOK][59]);
++ hash_or(p->hcode, hval[BROOK][56]);
+ p->has_castled[0] = 1;
+ /* update piece list */
+ for(pi=1;pi<=p->plist[p->wtm][ROOK][0];pi++)
+@@ -125,7 +125,7 @@
+
+ if(p->sq[emove.b.to].type) {
+ // Remove hashcode for the target square
+- or(p->hcode, hval[ID(p->sq[emove.b.to])][emove.b.to]);
++ hash_or(p->hcode, hval[ID(p->sq[emove.b.to])][emove.b.to]);
+ // Remove piece from piece list
+ for(pi=1;pi<=p->plist[p->wtm^1][p->sq[emove.b.to].type][0];pi++)
+ if(p->plist[p->wtm^1][p->sq[emove.b.to].type][pi] == emove.b.to) {
+@@ -143,8 +143,8 @@
+ // Move the new piece to the target square
+ p->sq[emove.b.to] = p->sq[emove.b.from];
+ // Update the hash code to reflect the move
+- or(p->hcode, hval[ID(p->sq[emove.b.from])][emove.b.from]);
+- or(p->hcode, hval[ID(p->sq[emove.b.from])][emove.b.to]);
++ hash_or(p->hcode, hval[ID(p->sq[emove.b.from])][emove.b.from]);
++ hash_or(p->hcode, hval[ID(p->sq[emove.b.from])][emove.b.to]);
+ // Original square is now empty
+ p->sq[emove.b.from] = empty;
+
+@@ -152,7 +152,7 @@
+ if(emove.b.type&EP) {
+ if(p->wtm) {
+ p->sq[emove.b.to-8] = empty;
+- or(p->hcode, hval[BPAWN][emove.b.to-8]);
++ hash_or(p->hcode, hval[BPAWN][emove.b.to-8]);
+ // Update piece lists
+ for(pi=1;pi<=p->plist[p->wtm^1][PAWN][0];pi++)
+ if(p->plist[BLACK][PAWN][pi] == emove.b.to-8) {
+@@ -163,7 +163,7 @@
+ }
+ } else {
+ p->sq[emove.b.to+8] = empty;
+- or(p->hcode, hval[WPAWN][emove.b.to+8]);
++ hash_or(p->hcode, hval[WPAWN][emove.b.to+8]);
+ // Update piece lists
+ for(pi=1;pi<=p->plist[p->wtm^1][PAWN][0];pi++)
+ if(p->plist[WHITE][PAWN][pi] == emove.b.to+8) {
+@@ -189,7 +189,7 @@
+ // if the move is a promotion, promote it
+ if(emove.b.type&PROMOTE) {
+ // Remove the pawn from the hash code
+- or(p->hcode, hval[ID(p->sq[emove.b.to])][emove.b.to]);
++ hash_or(p->hcode, hval[ID(p->sq[emove.b.to])][emove.b.to]);
+ // Change the piece type to the promoted piece
+ p->sq[emove.b.to].type = emove.b.promote;
+ // Add the new piece to the piece lists
+@@ -206,7 +206,7 @@
+ // adjust material score
+ p->material += value[emove.b.promote] - value[PAWN];
+ // add piece to hash code
+- or(p->hcode, hval[ID(p->sq[emove.b.to])][emove.b.to]);
++ hash_or(p->hcode, hval[ID(p->sq[emove.b.to])][emove.b.to]);
+ // adjust total piece count
+ p->pieces[p->wtm]++;
+ }
+@@ -214,11 +214,11 @@
+ // update position characteristics
+ p->wtm = p->wtm^1;
+ p->material = -p->material;
+- or(p->hcode, btm); or(p->hcode, wtm);
++ hash_or(p->hcode, btm); hash_or(p->hcode, wtm);
+
+ // undo hash code for en-passant and castling status
+- or(p->hcode, ep_code[p->ep]);
+- or(p->hcode, castle_code[p->castle]);
++ hash_or(p->hcode, ep_code[p->ep]);
++ hash_or(p->hcode, castle_code[p->castle]);
+
+ // if move is a pawn push 2 spaces, set en passant flag
+ if((emove.b.type&PAWN_PUSH2) &&
+@@ -235,8 +235,8 @@
+ p->last = emove;
+
+ // update hash code for en-passant and castling status
+- or(p->hcode, ep_code[p->ep]);
+- or(p->hcode, castle_code[p->castle]);
++ hash_or(p->hcode, ep_code[p->ep]);
++ hash_or(p->hcode, castle_code[p->castle]);
+
+ // check whether other side is placed in check
+ int ptype = p->sq[emove.b.to].type;
diff -r 9b411103bcab -r ed141ee10fa1 games/exchess/patches/patch-aj
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/games/exchess/patches/patch-aj Sat Feb 14 04:31:56 2004 +0000
@@ -0,0 +1,42 @@
+$NetBSD: patch-aj,v 1.1 2004/02/14 04:31:56 kristerw Exp $
+
+--- search.cpp.orig Sat Feb 14 04:30:46 2004
++++ search.cpp Sat Feb 14 04:32:41 2004
+@@ -181,7 +181,7 @@
+ last_depth = 1;
+
+ // adjusting hash code for game stage
+- or(p.hcode, stage_code[stage]);
++ hash_or(p.hcode, stage_code[stage]);
+
+ // initialize history table
+ for(int i = 0; i < 64; i++)
+@@ -261,7 +261,7 @@
+ }
+
+ // adjusting hash code for game stage
+- or(p.hcode, stage_code[stage]);
++ hash_or(p.hcode, stage_code[stage]);
+
+ if(!xboard && !ALLEG && post) {
+ cout << "\nnode_count = " << node_count
+@@ -423,7 +423,7 @@
+ if(ply) {
+ // add hash code for this position to position list
+ p_list[turn+ply-1] = sp[ply].hcode;
+- or(p_list[turn+ply-1], stage_code[stage]);
++ hash_or(p_list[turn+ply-1], stage_code[stage]);
+
+ // fifty move rule
+ if(sp[ply].fifty >= 100) return(0);
+@@ -470,8 +470,8 @@
+ {
+ node_count++;
+ sp[ply+1] = sp[ply]; sp[ply+1].wtm ^= 1;
+- or(sp[ply+1].hcode,wtm);
+- or(sp[ply+1].hcode,btm);
++ hash_or(sp[ply+1].hcode,wtm);
++ hash_or(sp[ply+1].hcode,btm);
+ sp[ply+1].last.t = NOMOVE; sp[ply+1].ep = 0;
+ sp[ply+1].material = -sp[ply+1].material;
+ sp[ply+1].fifty = 0;
Home |
Main Index |
Thread Index |
Old Index