blob: 938eeed6f3d4eef8f4eb516eefc3a31d5339e6d3 [file] [log] [blame]
Martin Roth239b5df2022-07-26 22:18:26 -06001/* SPDX-License-Identifier: GPL-2.0-only */
Angel Ponsf1763ca2021-06-08 16:49:00 +02002
3#ifndef LIMITS_H
4#define LIMITS_H
5
6#define USHRT_MAX ((unsigned short)~0U)
7#define SHRT_MAX ((short)(USHRT_MAX >> 1))
8#define SHRT_MIN ((short)(-SHRT_MAX - 1))
9#define INT_MAX ((int)(~0U >> 1))
10#define INT_MIN (-INT_MAX - 1)
11#define UINT_MAX (~0U)
12#define LONG_MAX ((long)(~0UL >> 1))
13#define LONG_MIN (-LONG_MAX - 1)
14#define ULONG_MAX (~0UL)
15#define LLONG_MAX ((long long)(~0ULL >> 1))
16#define LLONG_MIN (-LLONG_MAX - 1)
17#define ULLONG_MAX (~0ULL)
18#define UINTPTR_MAX ULONG_MAX
19
20#endif /* LIMITS_H */