ref: 8b0c12fda4008321ef8cbd61f9af24e0e6464e74
parent: e43e3872b43d9c1b49e9e5c015b32258c3735ad8
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Fri Aug 27 07:44:57 EDT 2021
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.
--- 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 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 signed char int_least8_t;
+typedef short int_least16_t;
+typedef int int_least32_t;
+typedef long int_least64_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 unsigned char uint_least8_t;
+typedef unsigned short uint_least16_t;
+typedef unsigned uint_least32_t;
+typedef unsigned long uint_least64_t;
-typedef int int8_fast_t;
-typedef int int16_fast_t;
-typedef int int32_fast_t;
-typedef long int64_fast_t;
+typedef signed char int_fast8_t;
+typedef int int_fast16_t;
+typedef int int_fast32_t;
+typedef int int_fast64_t;
-typedef unsigned uint8_fast_t;
-typedef unsigned uint16_fast_t;
-typedef unsigned uint32_fast_t;
-typedef unsigned long uint64_fast_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;
--- a/include/bits/amd64/arch/stdio.h
+++ /dev/null
@@ -1,10 +1,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;
--- a/include/bits/amd64/arch/stdlib.h
+++ b/include/bits/amd64/arch/stdlib.h
@@ -1,4 +1,1 @@
-#define EXIT_FAILURE 1
-#define EXIT_SUCCESS 0
-
#define _ALIGNTYPE long double
--- a/include/bits/amd64/arch/time.h
+++ /dev/null
@@ -1,4 +1,0 @@
-#define _MAXYEAR 9999
-#define CLOCKS_PER_SEC 128
-
-typedef long time_t;
--- a/include/bits/arm/arch/stdint.h
+++ b/include/bits/arm/arch/stdint.h
@@ -57,7 +57,26 @@
#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;
--- a/include/bits/arm/arch/stdio.h
+++ /dev/null
@@ -1,10 +1,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;
--- a/include/bits/arm/arch/stdlib.h
+++ b/include/bits/arm/arch/stdlib.h
@@ -1,4 +1,1 @@
-#define EXIT_FAILURE 1
-#define EXIT_SUCCESS 0
-
#define _ALIGNTYPE long double
--- a/include/bits/arm/arch/time.h
+++ /dev/null
@@ -1,3 +1,0 @@
-#define _MAXYEAR 9999
-
-typedef long int time_t;
--- 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 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 signed char int_least8_t;
+typedef short int_least16_t;
+typedef int int_least32_t;
+typedef long long int_least64_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 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 int8_fast_t;
-typedef int int16_fast_t;
-typedef int int32_fast_t;
-typedef long long int64_fast_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 uint8_fast_t;
-typedef unsigned int uint16_fast_t;
-typedef unsigned int uint32_fast_t;
-typedef unsigned long long uint64_fast_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;
--- a/include/bits/arm64/arch/stdio.h
+++ /dev/null
@@ -1,10 +1,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;
--- a/include/bits/arm64/arch/stdlib.h
+++ b/include/bits/arm64/arch/stdlib.h
@@ -1,4 +1,1 @@
-#define EXIT_FAILURE 1
-#define EXIT_SUCCESS 0
-
#define _ALIGNTYPE long double
--- a/include/bits/arm64/arch/time.h
+++ /dev/null
@@ -1,3 +1,0 @@
-#define _MAXYEAR 9999
-
-typedef long int time_t;
--- a/include/bits/i386/arch/stdint.h
+++ b/include/bits/i386/arch/stdint.h
@@ -88,25 +88,25 @@
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 signed char int_least8_t;
+typedef short int_least16_t;
+typedef int int_least32_t;
+typedef long long int_least64_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 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 int8_fast_t;
-typedef int int16_fast_t;
-typedef int int32_fast_t;
-typedef long long int64_fast_t;
+typedef int int_fast8_t;
+typedef int int_fast16_t;
+typedef int int_fast32_t;
+typedef long long int_fast64_t;
-typedef unsigned uint8_fast_t;
-typedef unsigned uint16_fast_t;
-typedef unsigned uint32_fast_t;
-typedef unsigned long long uint64_fast_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;
--- a/include/bits/i386/arch/stdio.h
+++ /dev/null
@@ -1,10 +1,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;
--- a/include/bits/i386/arch/stdlib.h
+++ b/include/bits/i386/arch/stdlib.h
@@ -1,9 +1,1 @@
-#define EXIT_FAILURE 1
-#define EXIT_SUCCESS 0
-
-#ifndef _WCHAR_T
-typedef int wchar_t;
-#define _WCHAR_T
-#endif
-
#define _ALIGNTYPE long double
--- a/include/bits/i386/arch/time.h
+++ /dev/null
@@ -1,3 +1,0 @@
-#define _MAXYEAR 2037
-
-typedef long int time_t;
--- 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
--- a/include/bits/ppc/arch/setjmp.h
+++ b/include/bits/ppc/arch/setjmp.h
@@ -1,1 +1,1 @@
-typedef unsigned long long jmp_buf[56];
+typedef unsigned long jmp_buf[56];
--- 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 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 signed char int_least8_t;
+typedef short int_least16_t;
+typedef int int_least32_t;
+typedef long long int_least64_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 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 int8_fast_t;
-typedef int int16_fast_t;
-typedef int int32_fast_t;
-typedef long long int64_fast_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 uint8_fast_t;
-typedef unsigned int uint16_fast_t;
-typedef unsigned int uint32_fast_t;
-typedef unsigned long long uint64_fast_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;
--- a/include/bits/ppc/arch/stdio.h
+++ /dev/null
@@ -1,10 +1,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;
--- a/include/bits/ppc/arch/stdlib.h
+++ b/include/bits/ppc/arch/stdlib.h
@@ -1,4 +1,1 @@
-#define EXIT_FAILURE 1
-#define EXIT_SUCCESS 0
-
#define _ALIGNTYPE long double
--- a/include/bits/ppc/arch/time.h
+++ /dev/null
@@ -1,3 +1,0 @@
-#define _MAXYEAR 9999
-
-typedef long int time_t;
--- /dev/null
+++ b/include/bits/z80/arch/setjmp.h
@@ -1,0 +1,1 @@
+typedef unsigned short jmp_buf[4];
--- a/include/bits/z80/arch/stdint.h
+++ b/include/bits/z80/arch/stdint.h
@@ -88,25 +88,25 @@
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 signed char int_least8_t;
+typedef int int_least16_t;
+typedef long int_least32_t;
+typedef long long int_least64_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 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 int8_fast_t;
-typedef int int16_fast_t;
-typedef long int32_fast_t;
-typedef long long int64_fast_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 uint8_fast_t;
-typedef unsigned uint16_fast_t;
-typedef unsigned long uint32_fast_t;
-typedef unsigned long long uint64_fast_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;
--- a/include/bits/z80/arch/stdio.h
+++ /dev/null
@@ -1,10 +1,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;
--- a/include/bits/z80/arch/stdlib.h
+++ b/include/bits/z80/arch/stdlib.h
@@ -1,4 +1,1 @@
-#define EXIT_FAILURE 1
-#define EXIT_SUCCESS 0
-
-#define _ALIGNTYPE int
+#define _ALIGNTYPE long double
--- a/include/bits/z80/arch/time.h
+++ /dev/null
@@ -1,3 +1,0 @@
-#define _MAXYEAR 2037
-
-typedef long time_t;