scc

simple C compiler
git clone git://git.2f30.org/scc
Log | Files | Refs | README | LICENSE

commit b5f6a023517a9e743228f1603c6d42bf4c2392df
parent 11e057e823f48206c7e3115af2989d918c9e3025
Author: Quentin Rameau <quinq@fifth.space>
Date:   Thu,  9 Mar 2017 17:40:03 +0100

[libc] Add limits.h

Diffstat:
Alibc/include/bits/amd64-sysv/arch/limits.h | 17+++++++++++++++++
Alibc/include/bits/i386-sysv/arch/limits.h | 17+++++++++++++++++
Alibc/include/bits/qbe/arch/limits.h | 17+++++++++++++++++
Alibc/include/bits/z80/arch/limits.h | 17+++++++++++++++++
Alibc/include/limits.h | 9+++++++++
5 files changed, 77 insertions(+), 0 deletions(-)

diff --git a/libc/include/bits/amd64-sysv/arch/limits.h b/libc/include/bits/amd64-sysv/arch/limits.h @@ -0,0 +1,17 @@ +#define SCHAR_MIN (-128) +#define SCHAR_MAX 127 +#define UCHAR_MAX 255 +#define CHAR_MIN (-128) +#define CHAR_MAX 127 +#define SHRT_MIN (-16384) +#define SHRT_MAX 16383 +#define USHRT_MAX 65535 +#define INT_MIN (-268435456) +#define INT_MAX 268435455 +#define UINT_MAX 4294967295 +#define LONG_MIN (-72057594037927936) +#define LONG_MAX 72057594037927935 +#define ULONG_MAX 18446744073709551615 +#define LLONG_MIN (-72057594037927936) +#define LLONG_MAX 72057594037927935 +#define ULLONG_MAX 18446744073709551615 diff --git a/libc/include/bits/i386-sysv/arch/limits.h b/libc/include/bits/i386-sysv/arch/limits.h @@ -0,0 +1,17 @@ +#define SCHAR_MIN (-128) +#define SCHAR_MAX 127 +#define UCHAR_MAX 255 +#define CHAR_MIN (-128) +#define CHAR_MAX 127 +#define SHRT_MIN (-16384) +#define SHRT_MAX 16383 +#define USHRT_MAX 65535 +#define INT_MIN (-268435456) +#define INT_MAX 268435455 +#define UINT_MAX 4294967295 +#define LONG_MIN (-268435456) +#define LONG_MAX 268435455 +#define ULONG_MAX 4294967295 +#define LLONG_MIN (-72057594037927936) +#define LLONG_MAX 72057594037927935 +#define ULLONG_MAX 18446744073709551615 diff --git a/libc/include/bits/qbe/arch/limits.h b/libc/include/bits/qbe/arch/limits.h @@ -0,0 +1,17 @@ +#define SCHAR_MIN (-128) +#define SCHAR_MAX 127 +#define UCHAR_MAX 255 +#define CHAR_MIN (-128) +#define CHAR_MAX 127 +#define SHRT_MIN (-16384) +#define SHRT_MAX 16383 +#define USHRT_MAX 65535 +#define INT_MIN (-268435456) +#define INT_MAX 268435455 +#define UINT_MAX 4294967295 +#define LONG_MIN (-72057594037927936) +#define LONG_MAX 72057594037927935 +#define ULONG_MAX 18446744073709551615 +#define LLONG_MIN (-72057594037927936) +#define LLONG_MAX 72057594037927935 +#define ULLONG_MAX 18446744073709551615 diff --git a/libc/include/bits/z80/arch/limits.h b/libc/include/bits/z80/arch/limits.h @@ -0,0 +1,17 @@ +#define SCHAR_MIN (-128) +#define SCHAR_MAX 127 +#define UCHAR_MAX 255 +#define CHAR_MIN 0 +#define CHAR_MAX 255 +#define SHRT_MIN (-16384) +#define SHRT_MAX 16383 +#define USHRT_MAX 65535 +#define INT_MIN (-16384) +#define INT_MAX 16383 +#define UINT_MAX 65535 +#define LONG_MIN (-268435456) +#define LONG_MAX 268435455 +#define ULONG_MAX 4294967295 +#define LLONG_MIN (-72057594037927936) +#define LLONG_MAX 72057594037927935 +#define ULLONG_MAX 18446744073709551615 diff --git a/libc/include/limits.h b/libc/include/limits.h @@ -0,0 +1,9 @@ +#ifndef _LIMITS_H +#define _LIMITS_H + +#include <arch/limits.h> + +#define CHAR_BIT 8 +#define MB_LEN_MAX 1 + +#endif