Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
alexbevi
GitHub Repository: alexbevi/BizHawk
Path: blob/master/libsnes/bsnes/nall/stdint.hpp
2 views
1
#ifndef NALL_STDINT_HPP
2
#define NALL_STDINT_HPP
3
4
#if defined(_MSC_VER)
5
typedef signed char int8_t;
6
typedef signed short int16_t;
7
typedef signed int int32_t;
8
typedef signed long long int64_t;
9
typedef int64_t intmax_t;
10
#if defined(_WIN64)
11
typedef int64_t intptr_t;
12
#else
13
typedef int32_t intptr_t;
14
#endif
15
16
typedef unsigned char uint8_t;
17
typedef unsigned short uint16_t;
18
typedef unsigned int uint32_t;
19
typedef unsigned long long uint64_t;
20
typedef uint64_t uintmax_t;
21
#if defined(_WIN64)
22
typedef uint64_t uintptr_t;
23
#else
24
typedef uint32_t uintptr_t;
25
#endif
26
#else
27
#include <stdint.h>
28
#endif
29
30
namespace nall {
31
static_assert(sizeof(int8_t) == 1, "int8_t is not of the correct size" );
32
static_assert(sizeof(int16_t) == 2, "int16_t is not of the correct size");
33
static_assert(sizeof(int32_t) == 4, "int32_t is not of the correct size");
34
static_assert(sizeof(int64_t) == 8, "int64_t is not of the correct size");
35
36
static_assert(sizeof(uint8_t) == 1, "int8_t is not of the correct size" );
37
static_assert(sizeof(uint16_t) == 2, "int16_t is not of the correct size");
38
static_assert(sizeof(uint32_t) == 4, "int32_t is not of the correct size");
39
static_assert(sizeof(uint64_t) == 8, "int64_t is not of the correct size");
40
}
41
42
#endif
43
44