summaryrefslogtreecommitdiff
path: root/games/exchess/patches/patch-ab
blob: 67096709c213ace63cdd9127270de723bf22f36e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
$NetBSD: patch-ab,v 1.3 2013/04/30 22:20:58 joerg Exp $

--- chess.h.orig	2000-02-19 11:28:46.000000000 +0000
+++ chess.h
@@ -3,6 +3,8 @@
 #ifndef CHESS_H
 #define CHESS_H
 
+#include <sys/types.h>
+
 // move structure to encapsulate several important move parameters
 // note: The char used below is treated like an integer.
 
@@ -30,7 +32,7 @@ struct move_t {
 // union of move_t and an integer to make comparison of 
 // moves easier.  (as suggested in Tom Kerrigans simple chess program)
 
-union move {
+union my_move {
   move_t b;
   int t;           // assuming a 32 bit integer
 };
@@ -38,7 +40,7 @@ union move {
 // Add a score for sorting purposes to the move record
 
 struct move_rec {
-  move m;
+  my_move m;
   int score; 
 };
 
@@ -79,14 +81,14 @@ struct position {
                              // side to move
   int extend;                // extension flag
   char plist[2][7][10];      // piece lists
-  move last;                 // last move made
+  my_move last;              // last move made
   h_code hcode;              // hash code
 };
 
 // Structure for position in the opening book
 
 struct book_rec {
- unsigned __int64 pos_code;    // position hash code
+ u_int64_t pos_code;           // position hash code
  int score;                    // score for position
  int gambit;                   // flag for gambit play
 };