VSF Documented
stdint.h
Go to the documentation of this file.
1#ifndef __SIMPLE_LIBC_STDINT_H__
2#define __SIMPLE_LIBC_STDINT_H__
3
4typedef signed char int8_t;
5typedef unsigned char uint8_t;
6typedef short int16_t;
7typedef unsigned short uint16_t;
8typedef int int32_t;
9typedef unsigned uint32_t;
10typedef long long int64_t;
11typedef unsigned long long uint64_t;
12
13typedef signed char int_least8_t;
14typedef unsigned char uint_least8_t;
15typedef short int_least16_t;
16typedef unsigned short uint_least16_t;
17typedef int int_least32_t;
18typedef unsigned uint_least32_t;
19typedef long long int_least64_t;
20typedef unsigned long long uint_least64_t;
21
22typedef char int_fast8_t;
23typedef unsigned char uint_fast8_t;
24typedef short int_fast16_t;
25typedef unsigned short uint_fast16_t;
26typedef int int_fast32_t;
27typedef unsigned int uint_fast32_t;
28typedef long long int_fast64_t;
29typedef unsigned long long uint_fast64_t;
30
31typedef long long intmax_t;
32typedef unsigned long long uintmax_t;
33
34#ifdef __VSF64__
35typedef uint64_t uintptr_t;
36typedef int64_t intptr_t;
37#else
40#endif
41
42//#if !defined(__cplusplus)
43
44#define INT8_MIN (-128)
45#define INT16_MIN (-32768)
46#define INT32_MIN (-2147483647 - 1)
47#define INT64_MIN (-9223372036854775807LL - 1)
48
49#define INT8_MAX 127
50#define INT16_MAX 32767
51#define INT32_MAX 2147483647
52#define INT64_MAX 9223372036854775807LL
53
54#define UINT8_MAX 0xff
55#define UINT16_MAX 0xffff
56#define UINT32_MAX 0xffffffff
57#define UINT64_MAX 0xffffffffffffffffULL
58
59#define INT_LEAST8_MIN INT8_MIN
60#define INT_LEAST16_MIN INT16_MIN
61#define INT_LEAST32_MIN INT32_MIN
62#define INT_LEAST64_MIN INT64_MIN
63
64#define INT_LEAST8_MAX INT8_MAX
65#define INT_LEAST16_MAX INT16_MAX
66#define INT_LEAST32_MAX INT32_MAX
67#define INT_LEAST64_MAX INT64_MAX
68
69#define UINT_LEAST8_MAX UINT8_MAX
70#define UINT_LEAST16_MAX UINT16_MAX
71#define UINT_LEAST32_MAX UINT32_MAX
72#define UINT_LEAST64_MAX UINT64_MAX
73
74#define INT_FAST8_MIN INT8_MIN
75#define INT_FAST16_MIN INT16_MIN
76#define INT_FAST32_MIN INT32_MIN
77#define INT_FAST64_MIN INT64_MIN
78
79#define INT_FAST8_MAX INT8_MAX
80#define INT_FAST16_MAX INT16_MAX
81#define INT_FAST32_MAX INT32_MAX
82#define INT_FAST64_MAX INT64_MAX
83
84#define UINT_FAST8_MAX UINT8_MAX
85#define UINT_FAST16_MAX UINT16_MAX
86#define UINT_FAST32_MAX UINT32_MAX
87#define UINT_FAST64_MAX UINT64_MAX
88
89#define INTMAX_MIN INT64_MIN
90#define INTMAX_MAX INT64_MAX
91#define UINTMAX_MAX UINT64_MAX
92
93#ifdef __VSF64__
94# define INTPTR_MIN INT64_MIN
95# define INTPTR_MAX INT64_MAX
96# define UINTPTR_MAX UINT64_MAX
97
98# define PTRDIFF_MIN INT64_MIN
99# define PTRDIFF_MAX INT64_MAX
100
101# define SIZE_MAX UINT64_MAX
102#else
103# define INTPTR_MIN INT32_MIN
104# define INTPTR_MAX INT32_MAX
105# define UINTPTR_MAX UINT32_MAX
106
107# define PTRDIFF_MIN INT32_MIN
108# define PTRDIFF_MAX INT32_MAX
109
110# define SIZE_MAX UINT32_MAX
111#endif
112
113//#endif
114
115#endif
uint32_t uintptr_t
Definition stdint.h:38
long long int_least64_t
Definition stdint.h:19
unsigned short uint16_t
Definition stdint.h:7
unsigned char uint_fast8_t
Definition stdint.h:23
unsigned uint32_t
Definition stdint.h:9
int int32_t
Definition stdint.h:8
int32_t intptr_t
Definition stdint.h:39
unsigned int uint_fast32_t
Definition stdint.h:27
int int_least32_t
Definition stdint.h:17
unsigned long long uintmax_t
Definition stdint.h:32
short int_least16_t
Definition stdint.h:15
long long int_fast64_t
Definition stdint.h:28
long long int64_t
Definition stdint.h:10
int int_fast32_t
Definition stdint.h:26
unsigned long long uint_least64_t
Definition stdint.h:20
short int16_t
Definition stdint.h:6
unsigned long long uint64_t
Definition stdint.h:11
unsigned uint_least32_t
Definition stdint.h:18
unsigned short uint_fast16_t
Definition stdint.h:25
unsigned char uint_least8_t
Definition stdint.h:14
unsigned long long uint_fast64_t
Definition stdint.h:29
unsigned char uint8_t
Definition stdint.h:5
long long intmax_t
Definition stdint.h:31
unsigned short uint_least16_t
Definition stdint.h:16
signed char int_least8_t
Definition stdint.h:13
signed char int8_t
Definition stdint.h:4
char int_fast8_t
Definition stdint.h:22
short int_fast16_t
Definition stdint.h:24