$NetBSD: patch-ad,v 1.1.1.1 2000/10/15 08:38:23 jlam Exp $

--- knightcap.h.orig	Sun May 17 19:09:21 1998
+++ knightcap.h
@@ -92,7 +92,22 @@
 #define USE_PBRAIN 1
 #endif
 
-#define BRAIN_FILE "brain.dat"
+/*
+ * Support finding brain.dat in another directory (BRAIN_DIR) determined
+ * at compile-time.
+ */
+#ifndef BRAIN_DIR
+#define BRAIN_DIR "./"
+#endif
+#define BRAIN_FILE BRAIN_DIR "brain.dat"
+
+/*
+ * Support finding endgame tables in another direcotry (TB_DIR) determined
+ * at compile-time.
+ */
+#ifndef TB_DIR
+#define TB_DIR "../EGTB"
+#endif
 
 #ifndef RESIGN_VALUE
 #define RESIGN_VALUE (ROOK_VALUE)
@@ -296,10 +311,19 @@
 
 #define INITIAL_MATERIAL (KING_VALUE + QUEEN_VALUE + 2*ROOK_VALUE + 2*BISHOP_VALUE + 2*KNIGHT_VALUE + 8*PAWN_VALUE)
 
+#if defined(__NetBSD__)
+#include <machine/types.h>
+
+typedef int16_t int16;
+typedef u_int16_t uint16;
+typedef u_int32_t uint32;
+typedef u_int64_t uint64;
+#else
 typedef short int16;
 typedef unsigned short uint16;
 typedef unsigned uint32;
 typedef unsigned long long uint64;
+#endif
 
 typedef enum {B_KING = -6,B_QUEEN = -5,B_ROOK = -4,B_BISHOP = -3,
 	      B_KNIGHT = -2,B_PAWN = -1,
@@ -884,4 +908,8 @@
 	return pop_count16((x) & 0xFFFF) + pop_count16((x) >> 16);
 }
 
-
+/*
+ * Make window_size global so that the GL board can be displayed at
+ * correct initial size.  window_size is defined in knightcap.c.
+ */
+extern int window_size;
