diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 17:06:04 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 17:06:04 +0000 |
commit | 2f0649f6fe411d7e07c8d56cf8ea56db53536da8 (patch) | |
tree | 778611fb52176dce1ad06c68e87b2cb348ca0f7b /usr/include/limits.h | |
parent | Initial commit. (diff) | |
download | klibc-2f0649f6fe411d7e07c8d56cf8ea56db53536da8.tar.xz klibc-2f0649f6fe411d7e07c8d56cf8ea56db53536da8.zip |
Adding upstream version 2.0.13.upstream/2.0.13upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'usr/include/limits.h')
-rw-r--r-- | usr/include/limits.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/usr/include/limits.h b/usr/include/limits.h new file mode 100644 index 0000000..464420a --- /dev/null +++ b/usr/include/limits.h @@ -0,0 +1,47 @@ +/* + * limits.h + */ + +#ifndef _LIMITS_H +#define _LIMITS_H + +/* No multibyte characters seen */ +#define MB_LEN_MAX 1 + +#define OPEN_MAX 256 + +#define CHAR_BIT 8 +#define SHRT_BIT 16 +#define INT_BIT 32 +#define LONGLONG_BIT 64 + +#define SCHAR_MIN (-128) +#define SCHAR_MAX 127 +#define UCHAR_MAX 255 + +#ifdef __CHAR_UNSIGNED__ +# define CHAR_MIN 0 +# define CHAR_MAX UCHAR_MAX +#else +# define CHAR_MIN SCHAR_MIN +# define CHAR_MAX SCHAR_MAX +#endif + +#define SHRT_MIN (-32768) +#define SHRT_MAX 32767 +#define USHRT_MAX 65535 + +#define INT_MIN (-2147483647-1) +#define INT_MAX 2147483647 +#define UINT_MAX 4294967295U + +#define LLONG_MIN (-9223372036854775807LL-1) +#define LLONG_MAX 9223372036854775807LL +#define ULLONG_MAX 18446744073709551615ULL + +#include <bitsize/limits.h> +#include <linux/limits.h> + +#define SSIZE_MAX LONG_MAX + +#endif /* _LIMITS_H */ |