"Das U-Boot" Source Tree
at master 26 lines 595 B view raw
1/* SPDX-License-Identifier: GPL-2.0+ */ 2 3#ifndef _LIMITS_H 4#define _LIMITS_H 5 6#define INT_MAX 0x7fffffff 7#define UINT_MAX 0xffffffffU 8#define CHAR_BIT 8 9#define UINT32_MAX 0xffffffffU 10#define UINT64_MAX 0xffffffffffffffffULL 11 12#if (defined(CONFIG_64BIT) && !defined(CONFIG_SPL_BUILD)) || \ 13 (defined(CONFIG_SPL_64BIT) && defined(CONFIG_SPL_BUILD)) 14 #define UINTPTR_MAX UINT64_MAX 15#else 16 #define UINTPTR_MAX UINT32_MAX 17#endif 18 19#ifndef SIZE_MAX 20#define SIZE_MAX UINTPTR_MAX 21#endif 22#ifndef SSIZE_MAX 23#define SSIZE_MAX ((ssize_t)(SIZE_MAX >> 1)) 24#endif 25 26#endif /* _LIMITS_H */