commit 36027b922f764414cfe2871fb96f3626822ceef3
parent 58d1edd3d722b89b325bee5ef3c2994ec6b8dac2
Author: Quentin Rameau <quinq@fifth.space>
Date: Sun, 19 Mar 2017 10:49:52 +0100
[libc] Fix limits.h
Diffstat:
4 files changed, 67 insertions(+), 67 deletions(-)
diff --git a/libc/include/bits/amd64-sysv/arch/limits.h b/libc/include/bits/amd64-sysv/arch/limits.h
@@ -1,17 +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
+#define SCHAR_MAX 0x7F
+#define SCHAR_MIN (-SCHAR_MIN-1)
+#define CHAR_MAX 0x7F
+#define CHAR_MIN (-CHAR_MAX-1)
+#define UCHAR_MAX 0xFF
+#define SHRT_MAX 0x7FFF
+#define SHRT_MIN (-SHRT_MAX-1)
+#define USHRT_MAX 0xFFFF
+#define INT_MAX 0x7FFFFFFF
+#define INT_MIN (-INT_MAX-1)
+#define UINT_MAX 0xFFFFFFFF
+#define LONG_MAX 0x7FFFFFFFFFFFFFFF
+#define LONG_MIN (-LONG_MAX-1)
+#define ULONG_MAX 0xFFFFFFFFFFFFFFFF
+#define LLONG_MAX 0x7FFFFFFFFFFFFFFF
+#define LLONG_MIN (-LLONG_MAX-1)
+#define ULLONG_MAX 0xFFFFFFFFFFFFFFFF
diff --git a/libc/include/bits/i386-sysv/arch/limits.h b/libc/include/bits/i386-sysv/arch/limits.h
@@ -1,17 +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
+#define SCHAR_MAX 0x7F
+#define SCHAR_MIN (-SCHAR_MIN-1)
+#define CHAR_MAX 0x7F
+#define CHAR_MIN (-CHAR_MAX-1)
+#define UCHAR_MAX 0xFF
+#define SHRT_MAX 0x7FFF
+#define SHRT_MIN (-SHRT_MAX-1)
+#define USHRT_MAX 0xFFFF
+#define INT_MAX 0x7FFFFFFF
+#define INT_MIN (-INT_MAX-1)
+#define UINT_MAX 0xFFFFFFFF
+#define LONG_MAX 0x7FFFFFFF
+#define LONG_MIN (-LONG_MAX-1)
+#define ULONG_MAX 0xFFFFFFFF
+#define LLONG_MAX 0x7FFFFFFFFFFFFFFF
+#define LLONG_MIN (-LLONG_MAX-1)
+#define ULLONG_MAX 0xFFFFFFFFFFFFFFFF
diff --git a/libc/include/bits/qbe/arch/limits.h b/libc/include/bits/qbe/arch/limits.h
@@ -1,17 +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
+#define SCHAR_MAX 0x7F
+#define SCHAR_MIN (-SCHAR_MIN-1)
+#define CHAR_MAX 0x7F
+#define CHAR_MIN (-CHAR_MAX-1)
+#define UCHAR_MAX 0xFF
+#define SHRT_MAX 0x7FFF
+#define SHRT_MIN (-SHRT_MAX-1)
+#define USHRT_MAX 0xFFFF
+#define INT_MAX 0x7FFFFFFF
+#define INT_MIN (-INT_MAX-1)
+#define UINT_MAX 0xFFFFFFFF
+#define LONG_MAX 0x7FFFFFFFFFFFFFFF
+#define LONG_MIN (-LONG_MAX-1)
+#define ULONG_MAX 0xFFFFFFFFFFFFFFFF
+#define LLONG_MAX 0x7FFFFFFFFFFFFFFF
+#define LLONG_MIN (-LLONG_MAX-1)
+#define ULLONG_MAX 0xFFFFFFFFFFFFFFFF
diff --git a/libc/include/bits/z80/arch/limits.h b/libc/include/bits/z80/arch/limits.h
@@ -1,17 +1,17 @@
-#define SCHAR_MIN (-128)
-#define SCHAR_MAX 127
-#define UCHAR_MAX 255
+#define SCHAR_MAX 0x7F
+#define SCHAR_MIN (-SCHAR_MIN-1)
+#define CHAR_MAX 0xFF
#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
+#define UCHAR_MAX 0xFF
+#define SHRT_MAX 0x7FFF
+#define SHRT_MIN (-SHRT_MAX-1)
+#define USHRT_MAX 0xFFFF
+#define INT_MAX 0x7FFF
+#define INT_MIN (-INT_MAX-1)
+#define UINT_MAX 0xFFFF
+#define LONG_MAX 0x7FFFFFFF
+#define LONG_MIN (-LONG_MAX-1)
+#define ULONG_MAX 0xFFFFFFFF
+#define LLONG_MAX 0x7FFFFFFFFFFFFFFF
+#define LLONG_MIN (-LLONG_MAX-1)
+#define ULLONG_MAX 0xFFFFFFFFFFFFFFFF