scc

suckless C compiler
git clone git://git.suckless.org/scc
Log | Files | Refs | README | LICENSE

commit 0fbca0d905ff742a06122e48433b1aae9d041677
parent 9c0cdc0d646eb080d3593b2b36382cac3b4bfb8b
Author: Quentin Rameau <quinq@fifth.space>
Date:   Fri, 10 Mar 2017 16:13:57 +0100

[libc] Complete stdint.h

Diffstat:
libc/include/bits/amd64-sysv/arch/stdint.h | 80+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
libc/include/bits/i386-sysv/arch/stdint.h | 80+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
libc/include/bits/qbe/arch/stdint.h | 80+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
libc/include/bits/z80/arch/stdint.h | 80+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 320 insertions(+), 0 deletions(-)

diff --git a/libc/include/bits/amd64-sysv/arch/stdint.h b/libc/include/bits/amd64-sysv/arch/stdint.h @@ -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 @@ -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 @@ -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 @@ -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;