scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | README | LICENSE

commit 8b4ea9f94a44b0f265f82b061459b54c353c9634
parent c21e72f40c77a68f7b23a03141a5c5431790fb37
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Fri, 27 Aug 2021 11:44:57 +0200

libc: Update include arch to last version

This code is being updated out of the tree of scc and
it is time to synchroniza both copies now.

Diffstat:
Minclude/bits/amd64/arch/stdint.h | 63++++++++++++++++++++++++++++++++++++++-------------------------
Dinclude/bits/amd64/arch/stdio.h | 10----------
Minclude/bits/amd64/arch/stdlib.h | 3---
Dinclude/bits/amd64/arch/time.h | 4----
Minclude/bits/arm/arch/stdint.h | 19+++++++++++++++++++
Dinclude/bits/arm/arch/stdio.h | 10----------
Minclude/bits/arm/arch/stdlib.h | 3---
Dinclude/bits/arm/arch/time.h | 3---
Minclude/bits/arm64/arch/stdint.h | 57++++++++++++++++++++++++++++++++++++++-------------------
Dinclude/bits/arm64/arch/stdio.h | 10----------
Minclude/bits/arm64/arch/stdlib.h | 3---
Dinclude/bits/arm64/arch/time.h | 3---
Minclude/bits/i386/arch/stdint.h | 38+++++++++++++++++++-------------------
Dinclude/bits/i386/arch/stdio.h | 10----------
Minclude/bits/i386/arch/stdlib.h | 8--------
Dinclude/bits/i386/arch/time.h | 3---
Minclude/bits/ppc/arch/cdefs.h | 2+-
Minclude/bits/ppc/arch/setjmp.h | 2+-
Minclude/bits/ppc/arch/stdint.h | 57++++++++++++++++++++++++++++++++++++++-------------------
Dinclude/bits/ppc/arch/stdio.h | 10----------
Minclude/bits/ppc/arch/stdlib.h | 3---
Dinclude/bits/ppc/arch/time.h | 3---
Ainclude/bits/z80/arch/setjmp.h | 1+
Minclude/bits/z80/arch/stdint.h | 38+++++++++++++++++++-------------------
Dinclude/bits/z80/arch/stdio.h | 10----------
Minclude/bits/z80/arch/stdlib.h | 5+----
Dinclude/bits/z80/arch/time.h | 3---
27 files changed, 175 insertions(+), 206 deletions(-)

diff --git a/include/bits/amd64/arch/stdint.h b/include/bits/amd64/arch/stdint.h @@ -18,9 +18,9 @@ #define INT_LEAST8_MAX INT8_MAX #define UINT_LEAST8_MAX UINT8_MAX -#define INT_LEAST16_MIN INT16_MIN -#define INT_LEAST16_MAX INT16_MAX -#define UINT_LEAST16_MAX UINT16_MAX +#define INT_LEAST16_MIN INT32_MIN +#define INT_LEAST16_MAX INT32_MAX +#define UINT_LEAST16_MAX UINT32_MAX #define INT_LEAST32_MIN INT32_MIN #define INT_LEAST32_MAX INT32_MAX @@ -30,9 +30,9 @@ #define INT_LEAST64_MAX INT64_MAX #define UINT_LEAST64_MAX UINT64_MAX -#define INT_FAST8_MIN INT32_MIN -#define INT_FAST8_MAX INT32_MAX -#define UINT_FAST8_MAX UINT32_MAX +#define INT_FAST8_MIN INT8_MIN +#define INT_FAST8_MAX INT8_MAX +#define UINT_FAST8_MAX UINT8_MAX #define INT_FAST16_MIN INT32_MIN #define INT_FAST16_MAX INT32_MAX @@ -65,6 +65,19 @@ #define WCHAR_MIN INT32_MIN #define WCHAR_MAX INT32_MAX +#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; @@ -75,25 +88,25 @@ typedef unsigned short uint16_t; typedef unsigned uint32_t; typedef unsigned long uint64_t; -typedef signed char int8_least_t; -typedef short int16_least_t; -typedef int int32_least_t; -typedef long int64_least_t; - -typedef unsigned char uint8_least_t; -typedef unsigned short uint16_least_t; -typedef unsigned uint32_least_t; -typedef unsigned long uint64_least_t; - -typedef int int8_fast_t; -typedef int int16_fast_t; -typedef int int32_fast_t; -typedef long int64_fast_t; - -typedef unsigned uint8_fast_t; -typedef unsigned uint16_fast_t; -typedef unsigned uint32_fast_t; -typedef unsigned long uint64_fast_t; +typedef signed char int_least8_t; +typedef short int_least16_t; +typedef int int_least32_t; +typedef long int_least64_t; + +typedef unsigned char uint_least8_t; +typedef unsigned short uint_least16_t; +typedef unsigned uint_least32_t; +typedef unsigned long uint_least64_t; + +typedef signed char int_fast8_t; +typedef int int_fast16_t; +typedef int int_fast32_t; +typedef int int_fast64_t; + +typedef unsigned char uint_fast8_t; +typedef unsigned uint_fast16_t; +typedef unsigned uint_fast32_t; +typedef unsigned long uint_fast64_t; typedef long intptr_t; typedef unsigned long uintptr_t; diff --git a/include/bits/amd64/arch/stdio.h b/include/bits/amd64/arch/stdio.h @@ -1,10 +0,0 @@ -#define BUFSIZ 512 -#define FILENAME_MAX 256 -#define FOPEN_MAX 16 - -#define TMP_MAX 25 -#define L_tmpnam 256 - -#define _TMPNAME "/tmp/tmp.0000000" - -typedef int fpos_t; diff --git a/include/bits/amd64/arch/stdlib.h b/include/bits/amd64/arch/stdlib.h @@ -1,4 +1 @@ -#define EXIT_FAILURE 1 -#define EXIT_SUCCESS 0 - #define _ALIGNTYPE long double diff --git a/include/bits/amd64/arch/time.h b/include/bits/amd64/arch/time.h @@ -1,4 +0,0 @@ -#define _MAXYEAR 9999 -#define CLOCKS_PER_SEC 128 - -typedef long time_t; diff --git a/include/bits/arm/arch/stdint.h b/include/bits/arm/arch/stdint.h @@ -57,8 +57,27 @@ #define PTRDIFF_MIN INT32_MIN #define PTRDIFF_MAX INT32_MAX +#define SIG_ATOMIC_MIN INT32_MIN +#define SIG_ATOMIC_MAX INT32_MAX + #define SIZE_MAX UINT32_MAX +#define WCHAR_MIN INT32_MIN +#define WCHAR_MAX INT32_MAX + +#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/include/bits/arm/arch/stdio.h b/include/bits/arm/arch/stdio.h @@ -1,10 +0,0 @@ -#define BUFSIZ 512 -#define FILENAME_MAX 256 -#define FOPEN_MAX 16 - -#define TMP_MAX 25 -#define L_tmpnam 256 - -#define _TMPNAME "/tmp/tmp.0000000" - -typedef int fpos_t; diff --git a/include/bits/arm/arch/stdlib.h b/include/bits/arm/arch/stdlib.h @@ -1,4 +1 @@ -#define EXIT_FAILURE 1 -#define EXIT_SUCCESS 0 - #define _ALIGNTYPE long double diff --git a/include/bits/arm/arch/time.h b/include/bits/arm/arch/time.h @@ -1,3 +0,0 @@ -#define _MAXYEAR 9999 - -typedef long int time_t; diff --git a/include/bits/arm64/arch/stdint.h b/include/bits/arm64/arch/stdint.h @@ -57,8 +57,27 @@ #define PTRDIFF_MIN INT64_MIN #define PTRDIFF_MAX INT64_MAX +#define SIG_ATOMIC_MIN INT32_MIN +#define SIG_ATOMIC_MAX INT32_MAX + #define SIZE_MAX UINT64_MAX +#define WCHAR_MIN INT32_MIN +#define WCHAR_MAX INT32_MAX + +#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; @@ -69,25 +88,25 @@ typedef unsigned short uint16_t; typedef unsigned int uint32_t; typedef unsigned long long uint64_t; -typedef signed char int8_least_t; -typedef short int16_least_t; -typedef int int32_least_t; -typedef long long int64_least_t; - -typedef unsigned char uint8_least_t; -typedef unsigned short uint16_least_t; -typedef unsigned int uint32_least_t; -typedef unsigned long long uint64_least_t; - -typedef int int8_fast_t; -typedef int int16_fast_t; -typedef int int32_fast_t; -typedef long long int64_fast_t; - -typedef unsigned int uint8_fast_t; -typedef unsigned int uint16_fast_t; -typedef unsigned int uint32_fast_t; -typedef unsigned long long uint64_fast_t; +typedef signed char int_least8_t; +typedef short int_least16_t; +typedef int int_least32_t; +typedef long long int_least64_t; + +typedef unsigned char uint_least8_t; +typedef unsigned short uint_least16_t; +typedef unsigned int uint_least32_t; +typedef unsigned long long uint_least64_t; + +typedef int int_fast8_t; +typedef int int_fast16_t; +typedef int int_fast32_t; +typedef long long int_fast64_t; + +typedef unsigned int uint_fast8_t; +typedef unsigned int uint_fast16_t; +typedef unsigned int uint_fast32_t; +typedef unsigned long long uint_fast64_t; typedef long intptr_t; typedef unsigned long uintptr_t; diff --git a/include/bits/arm64/arch/stdio.h b/include/bits/arm64/arch/stdio.h @@ -1,10 +0,0 @@ -#define BUFSIZ 512 -#define FILENAME_MAX 256 -#define FOPEN_MAX 16 - -#define TMP_MAX 25 -#define L_tmpnam 256 - -#define _TMPNAME "/tmp/tmp.0000000" - -typedef int fpos_t; diff --git a/include/bits/arm64/arch/stdlib.h b/include/bits/arm64/arch/stdlib.h @@ -1,4 +1 @@ -#define EXIT_FAILURE 1 -#define EXIT_SUCCESS 0 - #define _ALIGNTYPE long double diff --git a/include/bits/arm64/arch/time.h b/include/bits/arm64/arch/time.h @@ -1,3 +0,0 @@ -#define _MAXYEAR 9999 - -typedef long int time_t; diff --git a/include/bits/i386/arch/stdint.h b/include/bits/i386/arch/stdint.h @@ -88,25 +88,25 @@ typedef unsigned short uint16_t; typedef unsigned uint32_t; typedef unsigned long long uint64_t; -typedef signed char int8_least_t; -typedef short int16_least_t; -typedef int int32_least_t; -typedef long long int64_least_t; - -typedef unsigned char uint8_least_t; -typedef unsigned short uint16_least_t; -typedef unsigned uint32_least_t; -typedef unsigned long long uint64_least_t; - -typedef int int8_fast_t; -typedef int int16_fast_t; -typedef int int32_fast_t; -typedef long long int64_fast_t; - -typedef unsigned uint8_fast_t; -typedef unsigned uint16_fast_t; -typedef unsigned uint32_fast_t; -typedef unsigned long long uint64_fast_t; +typedef signed char int_least8_t; +typedef short int_least16_t; +typedef int int_least32_t; +typedef long long int_least64_t; + +typedef unsigned char uint_least8_t; +typedef unsigned short uint_least16_t; +typedef unsigned uint_least32_t; +typedef unsigned long long uint_least64_t; + +typedef int int_fast8_t; +typedef int int_fast16_t; +typedef int int_fast32_t; +typedef long long int_fast64_t; + +typedef unsigned uint_fast8_t; +typedef unsigned uint_fast16_t; +typedef unsigned uint_fast32_t; +typedef unsigned long long uint_fast64_t; typedef int intptr_t; typedef unsigned uintptr_t; diff --git a/include/bits/i386/arch/stdio.h b/include/bits/i386/arch/stdio.h @@ -1,10 +0,0 @@ -#define BUFSIZ 512 -#define FILENAME_MAX 256 -#define FOPEN_MAX 16 - -#define TMP_MAX 25 -#define L_tmpnam 256 - -#define _TMPNAME "/tmp/tmp.0000000" - -typedef long fpos_t; diff --git a/include/bits/i386/arch/stdlib.h b/include/bits/i386/arch/stdlib.h @@ -1,9 +1 @@ -#define EXIT_FAILURE 1 -#define EXIT_SUCCESS 0 - -#ifndef _WCHAR_T -typedef int wchar_t; -#define _WCHAR_T -#endif - #define _ALIGNTYPE long double diff --git a/include/bits/i386/arch/time.h b/include/bits/i386/arch/time.h @@ -1,3 +0,0 @@ -#define _MAXYEAR 2037 - -typedef long int time_t; diff --git a/include/bits/ppc/arch/cdefs.h b/include/bits/ppc/arch/cdefs.h @@ -1,6 +1,6 @@ #ifdef _NEED_SIZET #ifndef _SIZET -typedef unsigned long size_t; +typedef unsigned size_t; #define _SIZET #endif #undef _NEED_SIZET diff --git a/include/bits/ppc/arch/setjmp.h b/include/bits/ppc/arch/setjmp.h @@ -1 +1 @@ -typedef unsigned long long jmp_buf[56]; +typedef unsigned long jmp_buf[56]; diff --git a/include/bits/ppc/arch/stdint.h b/include/bits/ppc/arch/stdint.h @@ -57,8 +57,27 @@ #define PTRDIFF_MIN INT32_MIN #define PTRDIFF_MAX INT32_MAX +#define SIG_ATOMIC_MIN INT32_MIN +#define SIG_ATOMIC_MAX INT32_MAX + #define SIZE_MAX UINT32_MAX +#define WCHAR_MIN INT32_MIN +#define WCHAR_MAX INT32_MAX + +#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; @@ -69,25 +88,25 @@ typedef unsigned short uint16_t; typedef unsigned int uint32_t; typedef unsigned long long uint64_t; -typedef signed char int8_least_t; -typedef short int16_least_t; -typedef int int32_least_t; -typedef long long int64_least_t; - -typedef unsigned char uint8_least_t; -typedef unsigned short uint16_least_t; -typedef unsigned int uint32_least_t; -typedef unsigned long long uint64_least_t; - -typedef int int8_fast_t; -typedef int int16_fast_t; -typedef int int32_fast_t; -typedef long long int64_fast_t; - -typedef unsigned int uint8_fast_t; -typedef unsigned int uint16_fast_t; -typedef unsigned int uint32_fast_t; -typedef unsigned long long uint64_fast_t; +typedef signed char int_least8_t; +typedef short int_least16_t; +typedef int int_least32_t; +typedef long long int_least64_t; + +typedef unsigned char uint_least8_t; +typedef unsigned short uint_least16_t; +typedef unsigned int uint_least32_t; +typedef unsigned long long uint_least64_t; + +typedef int int_fast8_t; +typedef int int_fast16_t; +typedef int int_fast32_t; +typedef long long int_fast64_t; + +typedef unsigned int uint_fast8_t; +typedef unsigned int uint_fast16_t; +typedef unsigned int uint_fast32_t; +typedef unsigned long long uint_fast64_t; typedef long intptr_t; typedef unsigned long uintptr_t; diff --git a/include/bits/ppc/arch/stdio.h b/include/bits/ppc/arch/stdio.h @@ -1,10 +0,0 @@ -#define BUFSIZ 512 -#define FILENAME_MAX 256 -#define FOPEN_MAX 16 - -#define TMP_MAX 25 -#define L_tmpnam 256 - -#define _TMPNAME "/tmp/tmp.0000000" - -typedef int fpos_t; diff --git a/include/bits/ppc/arch/stdlib.h b/include/bits/ppc/arch/stdlib.h @@ -1,4 +1 @@ -#define EXIT_FAILURE 1 -#define EXIT_SUCCESS 0 - #define _ALIGNTYPE long double diff --git a/include/bits/ppc/arch/time.h b/include/bits/ppc/arch/time.h @@ -1,3 +0,0 @@ -#define _MAXYEAR 9999 - -typedef long int time_t; diff --git a/include/bits/z80/arch/setjmp.h b/include/bits/z80/arch/setjmp.h @@ -0,0 +1 @@ +typedef unsigned short jmp_buf[4]; diff --git a/include/bits/z80/arch/stdint.h b/include/bits/z80/arch/stdint.h @@ -88,25 +88,25 @@ typedef unsigned uint16_t; typedef unsigned long uint32_t; typedef unsigned long long uint64_t; -typedef signed char int8_least_t; -typedef int int16_least_t; -typedef long int32_least_t; -typedef long long int64_least_t; - -typedef unsigned char uint8_least_t; -typedef unsigned uint16_least_t; -typedef unsigned long uint32_least_t; -typedef unsigned long long uint64_least_t; - -typedef signed char int8_fast_t; -typedef int int16_fast_t; -typedef long int32_fast_t; -typedef long long int64_fast_t; - -typedef unsigned char uint8_fast_t; -typedef unsigned uint16_fast_t; -typedef unsigned long uint32_fast_t; -typedef unsigned long long uint64_fast_t; +typedef signed char int_least8_t; +typedef int int_least16_t; +typedef long int_least32_t; +typedef long long int_least64_t; + +typedef unsigned char uint_least8_t; +typedef unsigned uint_least16_t; +typedef unsigned long uint_least32_t; +typedef unsigned long long uint_least64_t; + +typedef signed char int_fast8_t; +typedef int int_fast16_t; +typedef long int_fast32_t; +typedef long long int_fast64_t; + +typedef unsigned char uint_fast8_t; +typedef unsigned uint_fast16_t; +typedef unsigned long uint_fast32_t; +typedef unsigned long long uint_fast64_t; typedef int intptr_t; typedef unsigned uintptr_t; diff --git a/include/bits/z80/arch/stdio.h b/include/bits/z80/arch/stdio.h @@ -1,10 +0,0 @@ -#define BUFSIZ 512 -#define FILENAME_MAX 256 -#define FOPEN_MAX 16 - -#define TMP_MAX 25 -#define L_tmpnam 256 - -#define _TMPNAME "TMP.000" - -typedef long fpos_t; diff --git a/include/bits/z80/arch/stdlib.h b/include/bits/z80/arch/stdlib.h @@ -1,4 +1 @@ -#define EXIT_FAILURE 1 -#define EXIT_SUCCESS 0 - -#define _ALIGNTYPE int +#define _ALIGNTYPE long double diff --git a/include/bits/z80/arch/time.h b/include/bits/z80/arch/time.h @@ -1,3 +0,0 @@ -#define _MAXYEAR 2037 - -typedef long time_t;