scc

simple C compiler
git clone git://git.2f30.org/scc
Log | Files | Refs | README | LICENSE

commit 8a75537e9a02ecb54c575802ebd4b018bb8cb478
parent 3099a3db64d71de6b912ab23d0c59376dac7be44
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Thu, 16 Feb 2017 17:21:05 +0100

[libc] Make stdint.h portable between architectures

Diffstat:
Alibc/include/amd64-sysv/arch/stdint.h | 37+++++++++++++++++++++++++++++++++++++
Dlibc/include/amd64-sysv/stdint.h | 41-----------------------------------------
Alibc/include/i386-sysv/arch/stdint.h | 38++++++++++++++++++++++++++++++++++++++
Dlibc/include/i386-sysv/stdint.h | 41-----------------------------------------
Alibc/include/qbe/arch/stdint.h | 37+++++++++++++++++++++++++++++++++++++
Dlibc/include/qbe/stdint.h | 41-----------------------------------------
Alibc/include/stdint.h | 7+++++++
Alibc/include/z80/arch/stdint.h | 37+++++++++++++++++++++++++++++++++++++
Dlibc/include/z80/stdint.h | 41-----------------------------------------
9 files changed, 156 insertions(+), 164 deletions(-)

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