]> Git Repo - u-boot.git/blame - include/limits.h
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sh
[u-boot.git] / include / limits.h
CommitLineData
13de8483
RM
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
99145eec
AG
12#if (defined(CONFIG_64BIT) && !defined(CONFIG_SPL_BUILD)) || \
13 (defined(CONFIG_SPL_64BIT) && defined(CONFIG_SPL_BUILD))
13de8483
RM
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 */
This page took 0.058374 seconds and 4 git commands to generate.