blu_os
Loading...
Searching...
No Matches
limits.h
Go to the documentation of this file.
1//
2// Created by MrurBo on 14/07/2026.
3//
4
5#ifndef BLU_OS_LIMITS_H
6#define BLU_OS_LIMITS_H
7
8#ifdef __cplusplus
9extern "C" {
10#endif
11
16
17#define _INC_LIMITS
18#define CHAR_BIT 8
19#define SCHAR_MIN (-128)
20#define SCHAR_MAX 127
21#define UCHAR_MAX 0xff
22
23#ifndef _CHAR_UNSIGNED
24 #define CHAR_MIN SCHAR_MIN
25 #define CHAR_MAX SCHAR_MAX
26#else
27 #define CHAR_MIN 0
28 #define CHAR_MAX UCHAR_MAX
29#endif
30
31#define MB_LEN_MAX 5
32#define SHRT_MIN (-32768)
33#define SHRT_MAX 32767
34#define USHRT_MAX 0xffff
35#define INT_MIN (-2147483647 - 1)
36#define INT_MAX 2147483647
37#define UINT_MAX 0xffffffff
38#define LONG_MIN (-2147483647L - 1)
39#define LONG_MAX 2147483647L
40#define ULONG_MAX 0xffffffffUL
41#define LLONG_MAX 9223372036854775807i64
42#define LLONG_MIN (-9223372036854775807i64 - 1)
43#define ULLONG_MAX 0xffffffffffffffffui64
44
45#define _I8_MIN (-127i8 - 1)
46#define _I8_MAX 127i8
47#define _UI8_MAX 0xffui8
48
49#define _I16_MIN (-32767i16 - 1)
50#define _I16_MAX 32767i16
51#define _UI16_MAX 0xffffui16
52
53#define _I32_MIN (-2147483647i32 - 1)
54#define _I32_MAX 2147483647i32
55#define _UI32_MAX 0xffffffffui32
56
57#define _I64_MIN (-9223372036854775807i64 - 1)
58#define _I64_MAX 9223372036854775807i64
59#define _UI64_MAX 0xffffffffffffffffui64
60
61// #ifndef SIZE_MAX
62// #ifdef
63// #define SIZE_MAX 0xffffffffffffffffui64
64// #else
65// #define SIZE_MAX 0xffffffffui32
66// #endif
67// #endif
68
69#if __STDC_WANT_SECURE_LIB__
70 #ifndef RSIZE_MAX
71 #define RSIZE_MAX (SIZE_MAX >> 1)
72 #endif
73#endif
74
75#ifdef __cplusplus
76}
77#endif
78
79#endif //BLU_OS_LIMITS_H