17#define FD_ERR INVALID_HANDLE_VALUE
22#define LOCK_T pthread_mutex_t
23#define LOCK_INIT(x) pthread_mutex_init(&(x), NULL)
24#define LOCK(x) pthread_mutex_lock(&(x))
25#define UNLOCK(x) pthread_mutex_unlock(&(x))
28#define LOCK_INIT(x) do { x = CreateMutex(NULL, FALSE, NULL); } while (0)
29#define LOCK(x) WaitForSingleObject(x, INFINITE)
30#define UNLOCK(x) ReleaseMutex(x)
39#define WDLSUFFIX ".rtbw"
40#define DTZSUFFIX ".rtbz"
41#define WDLDIR "RTBWDIR"
42#define DTZDIR "RTBZDIR"
45#define WDL_MAGIC 0x5d23e871
46#define DTZ_MAGIC 0xa50c66d7
50typedef unsigned long long uint64;
51typedef unsigned int uint32;
52typedef unsigned char ubyte;
53typedef unsigned short ushort;
86__attribute__((__may_alias__));
101 int factor[2][TBPIECES];
102 ubyte pieces[2][TBPIECES];
103 ubyte norm[2][TBPIECES];
117 int factor[2][TBPIECES];
118 ubyte pieces[2][TBPIECES];
119 ubyte norm[2][TBPIECES];
133 int factor[TBPIECES];
134 ubyte pieces[TBPIECES];
135 ubyte norm[TBPIECES];
152 int factor[TBPIECES];
153 ubyte pieces[TBPIECES];
154 ubyte norm[TBPIECES];
157 ushort map_idx[4][4];