Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
alexbevi
GitHub Repository: alexbevi/BizHawk
Path: blob/master/libgambatte/include/gbint.h
2 views
1
/***************************************************************************
2
* Copyright (C) 2007 by Sindre Aamås *
3
* [email protected] *
4
* *
5
* This program is free software; you can redistribute it and/or modify *
6
* it under the terms of the GNU General Public License version 2 as *
7
* published by the Free Software Foundation. *
8
* *
9
* This program is distributed in the hope that it will be useful, *
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12
* GNU General Public License version 2 for more details. *
13
* *
14
* You should have received a copy of the GNU General Public License *
15
* version 2 along with this program; if not, write to the *
16
* Free Software Foundation, Inc., *
17
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
18
***************************************************************************/
19
#ifndef GAMBATTE_INT_H
20
#define GAMBATTE_INT_H
21
22
// note that this is a hack to overcome the fact that libgambatte's original defines are not propagated.
23
#define HAVE_CSTDINT
24
25
#ifdef HAVE_CSTDINT
26
27
#include <cstdint>
28
29
namespace gambatte {
30
using std::uint_least32_t;
31
using std::uint_least16_t;
32
}
33
34
#elif defined(HAVE_STDINT_H)
35
36
#include <stdint.h>
37
38
namespace gambatte {
39
using ::uint_least32_t;
40
using ::uint_least16_t;
41
}
42
43
#else
44
45
namespace gambatte {
46
#ifdef CHAR_LEAST_32
47
typedef unsigned char uint_least32_t;
48
#elif defined(SHORT_LEAST_32)
49
typedef unsigned short uint_least32_t;
50
#elif defined(INT_LEAST_32)
51
typedef unsigned uint_least32_t;
52
#else
53
typedef unsigned long uint_least32_t;
54
#endif
55
56
#ifdef CHAR_LEAST_16
57
typedef unsigned char uint_least16_t;
58
#else
59
typedef unsigned short uint_least16_t;
60
#endif
61
}
62
63
#endif
64
65
#endif
66
67