[hackers] [scc] [libc] Fix limits.h || Quentin Rameau
commit 36027b922f764414cfe2871fb96f3626822ceef3
Author: Quentin Rameau <quinq_AT_fifth.space>
AuthorDate: Sun Mar 19 10:49:52 2017 +0100
Commit: Quentin Rameau <quinq_AT_fifth.space>
CommitDate: Tue Mar 21 12:07:54 2017 +0100
[libc] Fix limits.h
diff --git a/libc/include/bits/amd64-sysv/arch/limits.h b/libc/include/bits/amd64-sysv/arch/limits.h
index 29c3870..a675b59 100644
--- a/libc/include/bits/amd64-sysv/arch/limits.h
+++ b/libc/include/bits/amd64-sysv/arch/limits.h
_AT_@ -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
index ca92f88..d580aa5 100644
--- a/libc/include/bits/i386-sysv/arch/limits.h
+++ b/libc/include/bits/i386-sysv/arch/limits.h
_AT_@ -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
index 29c3870..a675b59 100644
--- a/libc/include/bits/qbe/arch/limits.h
+++ b/libc/include/bits/qbe/arch/limits.h
_AT_@ -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
index 84fc805..e963b32 100644
--- a/libc/include/bits/z80/arch/limits.h
+++ b/libc/include/bits/z80/arch/limits.h
_AT_@ -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
Received on Tue Mar 21 2017 - 12:08:57 CET
This archive was generated by hypermail 2.3.0
: Tue Mar 21 2017 - 12:12:28 CET