[hackers] [scc] [libc] Add limits.h || Quentin Rameau

From: <git_AT_suckless.org>
Date: Fri, 17 Mar 2017 08:50:00 +0100 (CET)

commit b5f6a023517a9e743228f1603c6d42bf4c2392df
Author: Quentin Rameau <quinq_AT_fifth.space>
AuthorDate: Thu Mar 9 17:40:03 2017 +0100
Commit: Quentin Rameau <quinq_AT_fifth.space>
CommitDate: Fri Mar 17 08:47:02 2017 +0100

    [libc] Add limits.h

diff --git a/libc/include/bits/amd64-sysv/arch/limits.h b/libc/include/bits/amd64-sysv/arch/limits.h
new file mode 100644
index 0000000..29c3870
--- /dev/null
+++ b/libc/include/bits/amd64-sysv/arch/limits.h
_AT_@ -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
new file mode 100644
index 0000000..ca92f88
--- /dev/null
+++ b/libc/include/bits/i386-sysv/arch/limits.h
_AT_@ -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
new file mode 100644
index 0000000..29c3870
--- /dev/null
+++ b/libc/include/bits/qbe/arch/limits.h
_AT_@ -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
new file mode 100644
index 0000000..84fc805
--- /dev/null
+++ b/libc/include/bits/z80/arch/limits.h
_AT_@ -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
new file mode 100644
index 0000000..5e9b9c7
--- /dev/null
+++ b/libc/include/limits.h
_AT_@ -0,0 +1,9 @@
+#ifndef _LIMITS_H
+#define _LIMITS_H
+
+#include <arch/limits.h>
+
+#define CHAR_BIT 8
+#define MB_LEN_MAX 1
+
+#endif
Received on Fri Mar 17 2017 - 08:50:00 CET

This archive was generated by hypermail 2.3.0 : Fri Mar 17 2017 - 09:00:40 CET