1 | |
2 | // Boost substitute. For full boost library see http://boost.org |
3 | |
4 | #ifndef BOOST_CSTDINT_HPP |
5 | #define BOOST_CSTDINT_HPP |
6 | |
7 | #if BLARGG_USE_NAMESPACE |
8 | #include <climits> |
9 | #else |
10 | #include <limits.h> |
11 | #endif |
12 | |
13 | BLARGG_BEGIN_NAMESPACE( boost ) |
14 | |
15 | #if UCHAR_MAX != 0xFF || SCHAR_MAX != 0x7F |
16 | # error "No suitable 8-bit type available" |
17 | #endif |
18 | |
19 | typedef unsigned char uint8_t; |
20 | typedef signed char int8_t; |
21 | |
22 | #if USHRT_MAX != 0xFFFF |
23 | # error "No suitable 16-bit type available" |
24 | #endif |
25 | |
26 | typedef short int16_t; |
27 | typedef unsigned short uint16_t; |
28 | |
29 | #if ULONG_MAX == 0xFFFFFFFF |
30 | typedef long int32_t; |
31 | typedef unsigned long uint32_t; |
32 | #elif UINT_MAX == 0xFFFFFFFF |
33 | typedef int int32_t; |
34 | typedef unsigned int uint32_t; |
35 | #else |
36 | # error "No suitable 32-bit type available" |
37 | #endif |
38 | |
39 | BLARGG_END_NAMESPACE |
40 | |
41 | #endif |
42 | |
43 | |