shithub: scc

Download patch

ref: cfbc2aa99a9b694a4a89557be5f8350bfa7aec8a
parent: 6457215350890348ab42c5f6569a987c6bd525d5
author: Quentin Rameau <quinq@fifth.space>
date: Thu Mar 9 12:40:03 EST 2017

[libc] Add limits.h

--- /dev/null
+++ b/libc/include/bits/amd64-sysv/arch/limits.h
@@ -1,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
--- /dev/null
+++ b/libc/include/bits/i386-sysv/arch/limits.h
@@ -1,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
--- /dev/null
+++ b/libc/include/bits/qbe/arch/limits.h
@@ -1,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
--- /dev/null
+++ b/libc/include/bits/z80/arch/limits.h
@@ -1,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
--- /dev/null
+++ b/libc/include/limits.h
@@ -1,0 +1,9 @@
+#ifndef _LIMITS_H
+#define _LIMITS_H
+
+#include <arch/limits.h>
+
+#define CHAR_BIT   8
+#define MB_LEN_MAX 1
+
+#endif