diff options
author | hasso <hasso@pkgsrc.org> | 2009-08-01 05:29:59 +0000 |
---|---|---|
committer | hasso <hasso@pkgsrc.org> | 2009-08-01 05:29:59 +0000 |
commit | af2b4f368324030c67b0c78c28a7b4d2d2179a5a (patch) | |
tree | 797ba189adf4dc46c6c7d00707a9844a2129ab8a /games/knightcap/patches | |
parent | bd63c18654071176db9820619fd0e9c09e6d2926 (diff) | |
download | pkgsrc-af2b4f368324030c67b0c78c28a7b4d2d2179a5a.tar.gz |
Make it build on recent DragonFly.
Diffstat (limited to 'games/knightcap/patches')
-rw-r--r-- | games/knightcap/patches/patch-ad | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/games/knightcap/patches/patch-ad b/games/knightcap/patches/patch-ad index 309aa2d0d52..8ad85c006a9 100644 --- a/games/knightcap/patches/patch-ad +++ b/games/knightcap/patches/patch-ad @@ -1,8 +1,8 @@ -$NetBSD: patch-ad,v 1.1.1.1 2000/10/15 08:38:23 jlam Exp $ +$NetBSD: patch-ad,v 1.2 2009/08/01 05:29:59 hasso Exp $ ---- knightcap.h.orig Sun May 17 19:09:21 1998 -+++ knightcap.h -@@ -92,7 +92,22 @@ +--- knightcap.h.orig 1998-05-18 02:09:21 +0300 ++++ knightcap.h 2009-08-01 07:33:40 +0300 +@@ -92,7 +92,22 @@ typedef short etype; #define USE_PBRAIN 1 #endif @@ -26,7 +26,7 @@ $NetBSD: patch-ad,v 1.1.1.1 2000/10/15 08:38:23 jlam Exp $ #ifndef RESIGN_VALUE #define RESIGN_VALUE (ROOK_VALUE) -@@ -296,10 +311,19 @@ +@@ -296,10 +311,19 @@ typedef short etype; #define INITIAL_MATERIAL (KING_VALUE + QUEEN_VALUE + 2*ROOK_VALUE + 2*BISHOP_VALUE + 2*KNIGHT_VALUE + 8*PAWN_VALUE) @@ -46,7 +46,27 @@ $NetBSD: patch-ad,v 1.1.1.1 2000/10/15 08:38:23 jlam Exp $ typedef enum {B_KING = -6,B_QUEEN = -5,B_ROOK = -4,B_BISHOP = -3, B_KNIGHT = -2,B_PAWN = -1, -@@ -884,4 +908,8 @@ +@@ -632,6 +656,11 @@ static inline int imax(int i1, int i2) + return i1 > i2? i1 : i2; + } + ++#if defined(__DragonFly__) ++#include <sys/param.h> ++#endif ++ ++#if !(defined(__DragonFly__) && __DragonFly_version >= 200204) + static inline float fmin(float i1, float i2) + { + return i1 > i2? i2 : i1; +@@ -641,6 +670,7 @@ static inline float fmax(float i1, float + { + return i1 > i2? i1 : i2; + } ++#endif + + static inline etype emin(etype i1, etype i2) + { +@@ -884,4 +914,8 @@ static inline int pop_count32(uint32 x) return pop_count16((x) & 0xFFFF) + pop_count16((x) >> 16); } |