blu_os
Loading...
Searching...
No Matches
stdint.h
Go to the documentation of this file.
1//
2// Created by dylan on 13/07/2026.
3//
4
5#ifndef BLU_OS_STDINT_H
6#define BLU_OS_STDINT_H
7
8#ifdef __cplusplus
9extern "C" {
10#endif
11
18
19#define INT8_MIN (-128)
20#define INT8_MAX 127
21#define UINT8_MAX 255U
22
23#define INT16_MIN (-32768)
24#define INT16_MAX 32767
25#define UINT16_MAX 65535U
26
27#define INT32_MIN (-2147483648)
28#define INT32_MAX 2147483647
29#define UINT32_MAX 4294967295U
30
31#define INT64_MIN (-9223372036854775807LL - 1)
32#define INT64_MAX 9223372036854775807LL
33#define UINT64_MAX 18446744073709551615ULL
34
35#define INT_LEAST8_MIN INT8_MIN
36#define INT_LEAST8_MAX INT8_MAX
37#define UINT_LEAST8_MAX UINT8_MAX
38
39#define INT_LEAST16_MIN INT16_MIN
40#define INT_LEAST16_MAX INT16_MAX
41#define UINT_LEAST16_MAX UINT16_MAX
42
43#define INT_LEAST32_MIN INT32_MIN
44#define INT_LEAST32_MAX INT32_MAX
45#define UINT_LEAST32_MAX UINT32_MAX
46
47#define INT_LEAST64_MIN INT64_MIN
48#define INT_LEAST64_MAX INT64_MAX
49#define UINT_LEAST64_MAX UINT64_MAX
50
51#ifdef __x86_64__
52#define INTPTR_MIN INT64_MIN
53#define INTPTR_MAX INT64_MAX
54#define UINTPTR_MAX UINT64_MAX
55#else
56#define INTPTR_MIN INT32_MIN
57#define INTPTR_MAX INT32_MAX
58#define UINTPTR_MAX UINT32_MAX
59#endif
60
61#define INTMAX_MIN INT64_MIN
62#define INTMAX_MAX INT64_MAX
63#define UINTMAX_MAX UINT64_MAX
64
65typedef signed char int8_t;
66typedef unsigned char uint8_t;
67typedef signed short int16_t;
68typedef unsigned short uint16_t;
69typedef signed int int32_t;
70typedef unsigned int uint32_t;
71typedef signed long long int64_t;
72typedef unsigned long long uint64_t;
73
74typedef int8_t int_least8_t;
75typedef int16_t int_least16_t;
76typedef int32_t int_least32_t;
77typedef int64_t int_least64_t;
78typedef uint8_t uint_least8_t;
79typedef uint16_t uint_least16_t;
80typedef uint32_t uint_least32_t;
81typedef uint64_t uint_least64_t;
82
83typedef int int_fast8_t;
84typedef int int_fast16_t;
85typedef int int_fast32_t;
86typedef long long int_fast64_t;
87typedef unsigned int uint_fast8_t;
88typedef unsigned int uint_fast16_t;
89typedef unsigned int uint_fast32_t;
90typedef unsigned long long uint_fast64_t;
91
92#ifdef __x86_64__
93typedef long intptr_t;
94typedef unsigned long uintptr_t;
95#else
96typedef int intptr_t;
97typedef unsigned int uintptr_t;
98#endif
99
100typedef long long intmax_t;
101typedef unsigned long long uintmax_t;
102
103
104#ifdef __cplusplus
105}
106#endif
107
108#endif //BLU_OS_STDINT_H