NHDT->ANH, nethack->anethack, nhdat->anhdat
[aNetHack.git] / include / integer.h
blobc1c840b63bd9d3e2bcacfb9975b5609c3eaced14
1 /* aNetHack 0.0.1 integer.h $ANH-Date: 1457210314 2016/03/05 20:38:34 $ $ANH-Branch: master $:$ANH-Revision: 1.0 $ */
2 /* aNetHack may be freely redistributed. See license for details. */
4 /* integer.h -- provide sized integer types */
6 #ifndef INTEGER_H
7 #define INTEGER_H
9 #if defined(__STDC__) && __STDC__ >= 199101L
11 /* The compiler claims to conform to C99. Use stdint.h */
12 #include <stdint.h>
13 typedef uint8_t uint8;
14 typedef int16_t int16;
15 typedef uint16_t uint16;
16 typedef int32_t int32;
17 typedef uint32_t uint32;
19 #else /* !C99 */
21 /* Provide uint8, int16, uint16, int32 and uint32 */
22 typedef unsigned char uint8;
23 typedef short int16;
24 typedef unsigned short uint16;
26 #if defined(__WATCOMC__) && !defined(__386__)
27 /* Open Watcom providing a 16 bit build for MS-DOS or OS/2 */
28 /* int is 16 bits; use long for 32 bits */
29 typedef long int32;
30 typedef unsigned long uint32;
31 #else
32 /* Otherwise, assume either a 32- or 64-bit compiler */
33 /* long may be 64 bits; use int for 32 bits */
34 typedef int int32;
35 typedef unsigned int uint32;
36 #endif
38 #endif /* !C99 */
40 #endif /* INTEGER_H */