|
Zephyr API 3.6.99
|
Loading...
Searching...
No Matches
Go to the documentation of this file.
9#ifndef ZEPHYR_LIB_LIBC_MINIMAL_INCLUDE_LIMITS_H_
10#define ZEPHYR_LIB_LIBC_MINIMAL_INCLUDE_LIMITS_H_
17#define UCHAR_MAX 0xFFU
19#error "unexpected __CHAR_BIT__ value"
22#define SCHAR_MAX __SCHAR_MAX__
23#define SCHAR_MIN (-SCHAR_MAX - 1)
25#ifdef __CHAR_UNSIGNED__
27 #define CHAR_MAX UCHAR_MAX
31 #define CHAR_MAX SCHAR_MAX
32 #define CHAR_MIN SCHAR_MIN
35#define CHAR_BIT __CHAR_BIT__
36#define LONG_BIT (__SIZEOF_LONG__ * CHAR_BIT)
37#define WORD_BIT (__SIZEOF_POINTER__ * CHAR_BIT)
39#define INT_MAX __INT_MAX__
40#define SHRT_MAX __SHRT_MAX__
41#define LONG_MAX __LONG_MAX__
42#define LLONG_MAX __LONG_LONG_MAX__
44#define INT_MIN (-INT_MAX - 1)
45#define SHRT_MIN (-SHRT_MAX - 1)
46#define LONG_MIN (-LONG_MAX - 1L)
47#define LLONG_MIN (-LLONG_MAX - 1LL)
49#if __SIZE_MAX__ == __UINT32_MAX__
50#define SSIZE_MAX __INT32_MAX__
51#elif __SIZE_MAX__ == __UINT64_MAX__
52#define SSIZE_MAX __INT64_MAX__
54#error "unexpected __SIZE_MAX__ value"
57#if __SIZEOF_SHORT__ == 2
58#define USHRT_MAX 0xFFFFU
60#error "unexpected __SIZEOF_SHORT__ value"
63#if __SIZEOF_INT__ == 4
64#define UINT_MAX 0xFFFFFFFFU
66#error "unexpected __SIZEOF_INT__ value"
69#if __SIZEOF_LONG__ == 4
70#define ULONG_MAX 0xFFFFFFFFUL
71#elif __SIZEOF_LONG__ == 8
72#define ULONG_MAX 0xFFFFFFFFFFFFFFFFUL
74#error "unexpected __SIZEOF_LONG__ value"
77#if __SIZEOF_LONG_LONG__ == 8
78#define ULLONG_MAX 0xFFFFFFFFFFFFFFFFULL
80#error "unexpected __SIZEOF_LONG_LONG__ value"