1 /*
2  * Copyright (C) 1999-2006
3  *           Brian Goetz <brian@quiotix.com>
4  *           Loic Dachary <loic@dachary.org>
5  *           Igor Kravtchenko <igor@obraz.net>
6  *
7  * This program gives you software freedom; you can copy, convey,
8  * propagate, redistribute and/or modify this program under the terms of
9  * the GNU General Public License (GPL) as published by the Free Software
10  * Foundation (FSF), either version 3 of the License, or (at your option)
11  * any later version of the GPL published by the FSF.
12  *
13  * This program is distributed in the hope that it will be useful, but
14  * WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License along
19  * with this program in a file in the toplevel directory called "GPLv3".
20  * If not, see <http://www.gnu.org/licenses/>.
21  */
22 #ifndef __POKER_DEFS_H__
23 #define __POKER_DEFS_H__
24 
25 
26 /* Compiler-specific junk */
27 
28 #if defined(_MSC_VER)
29 #  define UINT64_TYPE unsigned __int64
30 #  define inline __inline
31 #  define thread __declspec( thread )
32 #else
33 #  define thread
34 #  include "poker_config.h"
35 #endif
36 
37 #ifdef HAVE_SYS_TYPES_H
38 #  include <sys/types.h>
39 #endif
40 #ifdef HAVE_INTTYPES_H
41 #  include <inttypes.h>
42 #else
43 #  ifdef HAVE_STDINT_H
44 #    include <stdint.h>
45 #  endif
46 #endif
47 
48 /* 64-bit integer junk */
49 
50 #undef USE_INT64
51 #ifdef HAVE_UINT64_T
52 typedef uint64_t		uint64;
53 #define USE_INT64 1
54 #elif defined(HAVE_LONG_LONG)
55 typedef unsigned long long      uint64;
56 #define USE_INT64 1
57 #elif SIZEOF_LONG == 8
58 typedef unsigned long           uint64;
59 #define USE_INT64 1
60 #elif defined(UINT64_TYPE)
61 typedef UINT64_TYPE             uint64;
62 #define USE_INT64 1
63 #endif
64 
65 #ifdef USE_INT64
66 #define LongLong_OP(result, op1, op2, operation) \
67   do { result = (op1) operation (op2); } while (0)
68 #define LongLong_OR(result, op1, op2)  LongLong_OP(result, op1, op2, |)
69 #define LongLong_AND(result, op1, op2) LongLong_OP(result, op1, op2, &)
70 #define LongLong_XOR(result, op1, op2) LongLong_OP(result, op1, op2, ^)
71 #endif
72 
73 
74 typedef unsigned char  uint8;
75 #ifndef HAVE_INT8
76 typedef signed char   int8;
77 #endif
78 typedef unsigned short uint16;
79 typedef unsigned int   uint32;
80 
81 #include "deck.h"
82 #include "handval.h"
83 #include "handval_low.h"
84 #include "enumerate.h"
85 
86 #include "game_std.h"
87 
88 #endif
89 
90