[hackers] [scc] [libc] Complete stdint.h || Quentin Rameau

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

commit 0fbca0d905ff742a06122e48433b1aae9d041677
Author: Quentin Rameau <quinq_AT_fifth.space>
AuthorDate: Fri Mar 10 16:13:57 2017 +0100
Commit: Quentin Rameau <quinq_AT_fifth.space>
CommitDate: Fri Mar 17 08:47:03 2017 +0100

    [libc] Complete stdint.h

diff --git a/libc/include/bits/amd64-sysv/arch/stdint.h b/libc/include/bits/amd64-sysv/arch/stdint.h
index 5d609d8..c92d5ed 100644
--- a/libc/include/bits/amd64-sysv/arch/stdint.h
+++ b/libc/include/bits/amd64-sysv/arch/stdint.h
_AT_@ -1,5 +1,85 @@
 /* See LICENSE file for copyright and license details. */
 
+#define INT8_MIN (-128)
+#define INT8_MAX 127
+#define UINT8_MAX 255
+
+#define INT16_MIN (-32768)
+#define INT16_MAX 32767
+#define UINT16_MAX 65535
+
+#define INT32_MIN (-2147483648)
+#define INT32_MAX 2147483647
+#define UINT32_MAX 4294967295U
+
+#define INT64_MIN (-9223372036854775808)
+#define INT64_MAX 9223372036854775807
+#define UINT64_MAX 18446744073709551615U
+
+#define INT_LEAST8_MIN (-128)
+#define INT_LEAST8_MAX 127
+#define UINT_LEAST8_MAX 255
+
+#define INT_LEAST16_MIN (-32768)
+#define INT_LEAST16_MAX 32767
+#define UINT_LEAST16_MAX 65535
+
+#define INT_LEAST32_MIN (-2147483648)
+#define INT_LEAST32_MAX 2147483647
+#define UINT_LEAST32_MAX 4294967295U
+
+#define INT_LEAST64_MIN (-9223372036854775808)
+#define INT_LEAST64_MAX 9223372036854775807
+#define UINT_LEAST64_MAX 18446744073709551615U
+
+#define INT_FAST8_MIN (-2147483648)
+#define INT_FAST8_MAX 2147483647
+#define UINT_FAST8_MAX 4294967295U
+
+#define INT_FAST16_MIN (-2147483648)
+#define INT_FAST16_MAX 2147483647
+#define UINT_FAST16_MAX 4294967295U
+
+#define INT_FAST32_MIN (-2147483648)
+#define INT_FAST32_MAX 2147483647
+#define UINT_FAST32_MAX 4294967295U
+
+#define INT_FAST64_MIN (-9223372036854775808)
+#define INT_FAST64_MAX 9223372036854775807
+#define UINT_FAST64_MAX 18446744073709551615U
+
+#define INTPTR_MIN (-9223372036854775808)
+#define INTPTR_MAX 9223372036854775807
+#define UINTPTR_MAX 18446744073709551615U
+
+#define INTMAX_MIN (-9223372036854775808)
+#define INTMAX_MAX 9223372036854775807
+#define UINTMAX_MAX 18446744073709551615U
+
+#define PTRDIFF_MIN (-2147483648)
+#define PTRDIFF_MAX 2147483647
+
+#define SIG_ATOMIC_MIN (-2147483648)
+#define SIG_ATOMIC_MAX 2147483647
+
+#define SIZE_MAX 18446744073709551615U
+
+#define WCHAR_MIN (-2147483648)
+#define WCHAR_MAX 2147483647
+
+#define INT8_C(x) x
+#define INT16_C(x) x
+#define INT32_C(x) x
+#define INT64_C(x) x ## L
+
+#define UINT8_C(x) x
+#define UINT16_C(x) x
+#define UINT32_C(x) x ## U
+#define UINT64_C(x) x ## UL
+
+#define INTMAX_C(x) x ## L
+#define UINTMAX_C(x) x ## UL
+
 typedef signed char int8_t;
 typedef short int16_t;
 typedef int int32_t;
diff --git a/libc/include/bits/i386-sysv/arch/stdint.h b/libc/include/bits/i386-sysv/arch/stdint.h
index 6941ce6..5831b21 100644
--- a/libc/include/bits/i386-sysv/arch/stdint.h
+++ b/libc/include/bits/i386-sysv/arch/stdint.h
_AT_@ -1,5 +1,85 @@
 /* See LICENSE file for copyright and license details. */
 
+#define INT8_MIN (-128)
+#define INT8_MAX 127
+#define UINT8_MAX 255
+
+#define INT16_MIN (-32768)
+#define INT16_MAX 32767
+#define UINT16_MAX 65535
+
+#define INT32_MIN (-2147483648)
+#define INT32_MAX 2147483647
+#define UINT32_MAX 4294967295U
+
+#define INT64_MIN (-9223372036854775808)
+#define INT64_MAX 9223372036854775807
+#define UINT64_MAX 18446744073709551615U
+
+#define INT_LEAST8_MIN (-128)
+#define INT_LEAST8_MAX 127
+#define UINT_LEAST8_MAX 255
+
+#define INT_LEAST16_MIN (-32768)
+#define INT_LEAST16_MAX 32767
+#define UINT_LEAST16_MAX 65535
+
+#define INT_LEAST32_MIN (-2147483648)
+#define INT_LEAST32_MAX 2147483647
+#define UINT_LEAST32_MAX 4294967295U
+
+#define INT_LEAST64_MIN (-9223372036854775808)
+#define INT_LEAST64_MAX 9223372036854775807
+#define UINT_LEAST64_MAX 18446744073709551615U
+
+#define INT_FAST8_MIN (-2147483648)
+#define INT_FAST8_MAX 2147483647
+#define UINT_FAST8_MAX 4294967295U
+
+#define INT_FAST16_MIN (-2147483648)
+#define INT_FAST16_MAX 2147483647
+#define UINT_FAST16_MAX 4294967295U
+
+#define INT_FAST32_MIN (-2147483648)
+#define INT_FAST32_MAX 2147483647
+#define UINT_FAST32_MAX 4294967295U
+
+#define INT_FAST64_MIN (-9223372036854775808)
+#define INT_FAST64_MAX 9223372036854775807
+#define UINT_FAST64_MAX 18446744073709551615U
+
+#define INTPTR_MIN (-9223372036854775808)
+#define INTPTR_MAX 9223372036854775807
+#define UINTPTR_MAX 18446744073709551615U
+
+#define INTMAX_MIN (-9223372036854775808)
+#define INTMAX_MAX 9223372036854775807
+#define UINTMAX_MAX 18446744073709551615U
+
+#define PTRDIFF_MIN (-9223372036854775808)
+#define PTRDIFF_MAX 9223372036854775807
+
+#define SIG_ATOMIC_MIN (-2147483648)
+#define SIG_ATOMIC_MAX 2147483647
+
+#define SIZE_MAX 18446744073709551615U
+
+#define WCHAR_MIN (-2147483648)
+#define WCHAR_MAX 2147483647
+
+#define INT8_C(x) x
+#define INT16_C(x) x
+#define INT32_C(x) x
+#define INT64_C(x) x ## LL
+
+#define UINT8_C(x) x
+#define UINT16_C(x) x
+#define UINT32_C(x) x ## U
+#define UINT64_C(x) x ## ULL
+
+#define INTMAX_C(x) x ## LL
+#define UINTMAX_C(x) x ## ULL
+
 typedef signed char int8_t;
 typedef short int16_t;
 typedef int int32_t;
diff --git a/libc/include/bits/qbe/arch/stdint.h b/libc/include/bits/qbe/arch/stdint.h
index 5d609d8..dcd5cc9 100644
--- a/libc/include/bits/qbe/arch/stdint.h
+++ b/libc/include/bits/qbe/arch/stdint.h
_AT_@ -1,5 +1,85 @@
 /* See LICENSE file for copyright and license details. */
 
+#define INT8_MIN (-128)
+#define INT8_MAX 127
+#define UINT8_MAX 255
+
+#define INT16_MIN (-32768)
+#define INT16_MAX 32767
+#define UINT16_MAX 65535
+
+#define INT32_MIN (-2147483648)
+#define INT32_MAX 2147483647
+#define UINT32_MAX 4294967295U
+
+#define INT64_MIN (-9223372036854775808)
+#define INT64_MAX 9223372036854775807
+#define UINT64_MAX 18446744073709551615U
+
+#define INT_LEAST8_MIN (-128)
+#define INT_LEAST8_MAX 127
+#define UINT_LEAST8_MAX 255
+
+#define INT_LEAST16_MIN (-32768)
+#define INT_LEAST16_MAX 32767
+#define UINT_LEAST16_MAX 65535
+
+#define INT_LEAST32_MIN (-2147483648)
+#define INT_LEAST32_MAX 2147483647
+#define UINT_LEAST32_MAX 4294967295U
+
+#define INT_LEAST64_MIN (-9223372036854775808)
+#define INT_LEAST64_MAX 9223372036854775807
+#define UINT_LEAST64_MAX 18446744073709551615U
+
+#define INT_FAST8_MIN (-2147483648)
+#define INT_FAST8_MAX 2147483647
+#define UINT_FAST8_MAX 4294967295U
+
+#define INT_FAST16_MIN (-2147483648)
+#define INT_FAST16_MAX 2147483647
+#define UINT_FAST16_MAX 4294967295U
+
+#define INT_FAST32_MIN (-2147483648)
+#define INT_FAST32_MAX 2147483647
+#define UINT_FAST32_MAX 4294967295U
+
+#define INT_FAST64_MIN (-9223372036854775808)
+#define INT_FAST64_MAX 9223372036854775807
+#define UINT_FAST64_MAX 18446744073709551615U
+
+#define INTPTR_MIN (-9223372036854775808)
+#define INTPTR_MAX 9223372036854775807
+#define UINTPTR_MAX 18446744073709551615U
+
+#define INTMAX_MIN (-9223372036854775808)
+#define INTMAX_MAX 9223372036854775807
+#define UINTMAX_MAX 18446744073709551615U
+
+#define PTRDIFF_MIN (-9223372036854775808)
+#define PTRDIFF_MAX 9223372036854775807
+
+#define SIG_ATOMIC_MIN (-2147483648)
+#define SIG_ATOMIC_MAX 2147483647
+
+#define SIZE_MAX 18446744073709551615U
+
+#define WCHAR_MIN (-2147483648)
+#define WCHAR_MAX 2147483647
+
+#define INT8_C(x) x
+#define INT16_C(x) x
+#define INT32_C(x) x
+#define INT64_C(x) x ## L
+
+#define UINT8_C(x) x
+#define UINT16_C(x) x
+#define UINT32_C(x) x ## U
+#define UINT64_C(x) x ## UL
+
+#define INTMAX_C(x) x ## L
+#define UINTMAX_C(x) x ## UL
+
 typedef signed char int8_t;
 typedef short int16_t;
 typedef int int32_t;
diff --git a/libc/include/bits/z80/arch/stdint.h b/libc/include/bits/z80/arch/stdint.h
index e05b4fd..15b8d1f 100644
--- a/libc/include/bits/z80/arch/stdint.h
+++ b/libc/include/bits/z80/arch/stdint.h
_AT_@ -1,5 +1,85 @@
 /* See LICENSE file for copyright and license details. */
 
+#define INT8_MIN (-128)
+#define INT8_MAX 127
+#define UINT8_MAX 255
+
+#define INT16_MIN (-32768)
+#define INT16_MAX 32767
+#define UINT16_MAX 65535U
+
+#define INT32_MIN (-2147483648)
+#define INT32_MAX 2147483647
+#define UINT32_MAX 4294967295U
+
+#define INT64_MIN (-9223372036854775808)
+#define INT64_MAX 9223372036854775807
+#define UINT64_MAX 18446744073709551615U
+
+#define INT_LEAST8_MIN (-128)
+#define INT_LEAST8_MAX 127
+#define UINT_LEAST8_MAX 255
+
+#define INT_LEAST16_MIN (-32768)
+#define INT_LEAST16_MAX 32767
+#define UINT_LEAST16_MAX 65535U
+
+#define INT_LEAST32_MIN (-2147483648)
+#define INT_LEAST32_MAX 2147483647
+#define UINT_LEAST32_MAX 4294967295U
+
+#define INT_LEAST64_MIN (-9223372036854775808)
+#define INT_LEAST64_MAX 9223372036854775807
+#define UINT_LEAST64_MAX 18446744073709551615U
+
+#define INT_FAST8_MIN (-32768)
+#define INT_FAST8_MAX 32767
+#define UINT_FAST8_MAX 65535U
+
+#define INT_FAST16_MIN (-32768)
+#define INT_FAST16_MAX 32767
+#define UINT_FAST16_MAX 65535U
+
+#define INT_FAST32_MIN (-2147483648)
+#define INT_FAST32_MAX 2147483647
+#define UINT_FAST32_MAX 4294967295U
+
+#define INT_FAST64_MIN (-9223372036854775808)
+#define INT_FAST64_MAX 9223372036854775807
+#define UINT_FAST64_MAX 18446744073709551615U
+
+#define INTPTR_MIN (-32768)
+#define INTPTR_MAX 32767
+#define UINTPTR_MAX 65535U
+
+#define INTMAX_MIN (-32768)
+#define INTMAX_MAX 32767
+#define UINTMAX_MAX 65535U
+
+#define PTRDIFF_MIN (-32768)
+#define PTRDIFF_MAX 32767
+
+#define SIG_ATOMIC_MIN (-128)
+#define SIG_ATOMIC_MAX 127
+
+#define SIZE_MAX 18446744073709551615U
+
+#define WCHAR_MIN (-32768)
+#define WCHAR_MAX 32767
+
+#define INT8_C(x) x
+#define INT16_C(x) x
+#define INT32_C(x) x ## L
+#define INT64_C(x) x ## LL
+
+#define UINT8_C(x) x
+#define UINT16_C(x) x ## U
+#define UINT32_C(x) x ## UL
+#define UINT64_C(x) x ## ULL
+
+#define INTMAX_C(x) x ## LL
+#define UINTMAX_C(x) x ## ULL
+
 typedef signed char int8_t;
 typedef int int16_t;
 typedef long int32_t;
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:57 CET