[hackers] [scc] [libc] Make stdint.h portable between architectures || Roberto E. Vargas Caballero
commit 8a75537e9a02ecb54c575802ebd4b018bb8cb478
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Thu Feb 16 17:21:05 2017 +0100
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Thu Feb 16 17:21:05 2017 +0100
[libc] Make stdint.h portable between architectures
diff --git a/libc/include/amd64-sysv/arch/stdint.h b/libc/include/amd64-sysv/arch/stdint.h
new file mode 100644
index 0000000..d23765f
--- /dev/null
+++ b/libc/include/amd64-sysv/arch/stdint.h
_AT_@ -0,0 +1,37 @@
+/* See LICENSE file for copyright and license details. */
+
+typedef signed char int8_t;
+typedef short int16_t;
+typedef int int32_t;
+typedef long int64_t;
+
+typedef unsigned char uint8_t;
+typedef unsigned short uint16_t;
+typedef unsigned int 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 int 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 int8_fast_t;
+typedef unsigned int16_fast_t;
+typedef unsigned int32_fast_t;
+typedef unsigned long int64_fast_t;
+
+typedef long intptr_t;
+typedef unsigned long uintptr_t;
+
+typedef long intmax_t;
+typedef unsigned long uintmax_t;
diff --git a/libc/include/amd64-sysv/stdint.h b/libc/include/amd64-sysv/stdint.h
deleted file mode 100644
index 19cd51f..0000000
--- a/libc/include/amd64-sysv/stdint.h
+++ /dev/null
_AT_@ -1,41 +0,0 @@
-/* See LICENSE file for copyright and license details. */
-#ifndef _STDINT_H_
-#define _STDINT_H_
-
-typedef signed char int8_t;
-typedef short int16_t;
-typedef int int32_t;
-typedef long int64_t;
-
-typedef unsigned char uint8_t;
-typedef unsigned short uint16_t;
-typedef unsigned int 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 int 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 int8_fast_t;
-typedef unsigned int16_fast_t;
-typedef unsigned int32_fast_t;
-typedef unsigned long int64_fast_t;
-
-typedef long intptr_t;
-typedef unsigned long uintptr_t;
-
-typedef long intmax_t;
-typedef unsigned long uintmax_t;
-
-#endif
diff --git a/libc/include/i386-sysv/arch/stdint.h b/libc/include/i386-sysv/arch/stdint.h
new file mode 100644
index 0000000..f9686ce
--- /dev/null
+++ b/libc/include/i386-sysv/arch/stdint.h
_AT_@ -0,0 +1,38 @@
+/* See LICENSE file for copyright and license details. */
+
+typedef signed char int8_t;
+typedef short int16_t;
+typedef int int32_t;
+typedef long long int64_t;
+
+typedef unsigned char uint8_t;
+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 int8_fast_t;
+typedef unsigned int16_fast_t;
+typedef unsigned int32_fast_t;
+typedef unsigned long long int64_fast_t;
+
+typedef intptr_t long;
+typedef long long uintptr_t unsigned;
+
+typedef intmax_t long;
+typedef long long uintmax_t unsigned;
+
diff --git a/libc/include/i386-sysv/stdint.h b/libc/include/i386-sysv/stdint.h
deleted file mode 100644
index 155ffa2..0000000
--- a/libc/include/i386-sysv/stdint.h
+++ /dev/null
_AT_@ -1,41 +0,0 @@
-/* See LICENSE file for copyright and license details. */
-#ifndef _STDINT_H_
-#define _STDINT_H_
-
-typedef signed char int8_t;
-typedef short int16_t;
-typedef int int32_t;
-typedef long long int64_t;
-
-typedef unsigned char uint8_t;
-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 int8_fast_t;
-typedef unsigned int16_fast_t;
-typedef unsigned int32_fast_t;
-typedef unsigned long long int64_fast_t;
-
-typedef intptr_t long;
-typedef long long uintptr_t unsigned;
-
-typedef intmax_t long;
-typedef long long uintmax_t unsigned;
-
-#endif
diff --git a/libc/include/qbe/arch/stdint.h b/libc/include/qbe/arch/stdint.h
new file mode 100644
index 0000000..d23765f
--- /dev/null
+++ b/libc/include/qbe/arch/stdint.h
_AT_@ -0,0 +1,37 @@
+/* See LICENSE file for copyright and license details. */
+
+typedef signed char int8_t;
+typedef short int16_t;
+typedef int int32_t;
+typedef long int64_t;
+
+typedef unsigned char uint8_t;
+typedef unsigned short uint16_t;
+typedef unsigned int 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 int 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 int8_fast_t;
+typedef unsigned int16_fast_t;
+typedef unsigned int32_fast_t;
+typedef unsigned long int64_fast_t;
+
+typedef long intptr_t;
+typedef unsigned long uintptr_t;
+
+typedef long intmax_t;
+typedef unsigned long uintmax_t;
diff --git a/libc/include/qbe/stdint.h b/libc/include/qbe/stdint.h
deleted file mode 100644
index 19cd51f..0000000
--- a/libc/include/qbe/stdint.h
+++ /dev/null
_AT_@ -1,41 +0,0 @@
-/* See LICENSE file for copyright and license details. */
-#ifndef _STDINT_H_
-#define _STDINT_H_
-
-typedef signed char int8_t;
-typedef short int16_t;
-typedef int int32_t;
-typedef long int64_t;
-
-typedef unsigned char uint8_t;
-typedef unsigned short uint16_t;
-typedef unsigned int 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 int 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 int8_fast_t;
-typedef unsigned int16_fast_t;
-typedef unsigned int32_fast_t;
-typedef unsigned long int64_fast_t;
-
-typedef long intptr_t;
-typedef unsigned long uintptr_t;
-
-typedef long intmax_t;
-typedef unsigned long uintmax_t;
-
-#endif
diff --git a/libc/include/stdint.h b/libc/include/stdint.h
new file mode 100644
index 0000000..d065848
--- /dev/null
+++ b/libc/include/stdint.h
_AT_@ -0,0 +1,7 @@
+/* See LICENSE file for copyright and license details. */
+#ifndef _STDINT_H_
+#define _STDINT_H_
+
+#include <arch/stdint.h>
+
+#endif
diff --git a/libc/include/z80/arch/stdint.h b/libc/include/z80/arch/stdint.h
new file mode 100644
index 0000000..e05b4fd
--- /dev/null
+++ b/libc/include/z80/arch/stdint.h
_AT_@ -0,0 +1,37 @@
+/* See LICENSE file for copyright and license details. */
+
+typedef signed char int8_t;
+typedef int int16_t;
+typedef long int32_t;
+typedef long long int64_t;
+
+typedef unsigned char uint8_t;
+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 int intptr_t;
+typedef unsigned uintptr_t;
+
+typedef long long intmax_t;
+typedef unsigned long long uintmax_t;
diff --git a/libc/include/z80/stdint.h b/libc/include/z80/stdint.h
deleted file mode 100644
index 1abfffb..0000000
--- a/libc/include/z80/stdint.h
+++ /dev/null
_AT_@ -1,41 +0,0 @@
-/* See LICENSE file for copyright and license details. */
-#ifndef _STDINT_H_
-#define _STDINT_H_
-
-typedef signed char int8_t;
-typedef int int16_t;
-typedef long int32_t;
-typedef long long int64_t;
-
-typedef unsigned char uint8_t;
-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 int intptr_t;
-typedef unsigned uintptr_t;
-
-typedef long long intmax_t;
-typedef unsigned long long uintmax_t;
-
-#endif
Received on Thu Feb 16 2017 - 17:24:35 CET
This archive was generated by hypermail 2.3.0
: Thu Feb 16 2017 - 17:36:37 CET