aboutsummaryrefslogtreecommitdiff
path: root/libpsn00b/include/cstdint
blob: 3b1bc4a0c119d32a1e77cc7b310d46e1629f4e5c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*
 * PSn00bSDK standard library
 * (C) 2019-2023 Lameguy64, spicyjpeg - MPL licensed
 *
 * This is a replacement for the <cstdint> header included with GCC, which seems
 * to be broken (at least in GCC 12.2.0) as it requires some macros to be set.
 */

#pragma once

#include <stdint.h>

namespace std {

#define _DEF_TYPE(bits, prefix) \
	using ::prefix##bits##_t; \
	using ::prefix##_fast##bits##_t; \
	using ::prefix##_least##bits##_t;

_DEF_TYPE( 8, int)
_DEF_TYPE( 8, uint)
_DEF_TYPE(16, int)
_DEF_TYPE(16, uint)
_DEF_TYPE(32, int)
_DEF_TYPE(32, uint)

#undef _DEF_TYPE

using ::intmax_t;
using ::uintmax_t;
using ::intptr_t;
using ::uintptr_t;

}