scc

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

commit 58254c7ee093aad4ec1573667dcf55b4375059ad
parent 8a75537e9a02ecb54c575802ebd4b018bb8cb478
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Thu, 16 Feb 2017 17:23:55 +0100

[libc] Move all the architecuter bits to bits

It helps to keep a cleaner include/ directory.

Diffstat:
inc/sysincludes.def.h | 3+--
libc/include/amd64-sysv/arch/stdint.h | 37-------------------------------------
libc/include/amd64-sysv/arch/stdio.h | 18------------------
libc/include/amd64-sysv/arch/stdlib.h | 14--------------
libc/include/amd64-sysv/arch/string.h | 9---------
libc/include/bits/amd64-sysv/arch/stdint.h | 37+++++++++++++++++++++++++++++++++++++
libc/include/bits/amd64-sysv/arch/stdio.h | 18++++++++++++++++++
libc/include/bits/amd64-sysv/arch/stdlib.h | 14++++++++++++++
libc/include/bits/amd64-sysv/arch/string.h | 9+++++++++
libc/include/bits/i386-sysv/arch/stdint.h | 38++++++++++++++++++++++++++++++++++++++
libc/include/bits/i386-sysv/arch/stdio.h | 18++++++++++++++++++
libc/include/bits/i386-sysv/arch/stdlib.h | 14++++++++++++++
libc/include/bits/i386-sysv/arch/string.h | 9+++++++++
libc/include/bits/qbe/arch/stdint.h | 37+++++++++++++++++++++++++++++++++++++
libc/include/bits/qbe/arch/stdio.h | 18++++++++++++++++++
libc/include/bits/qbe/arch/stdlib.h | 14++++++++++++++
libc/include/bits/qbe/arch/string.h | 9+++++++++
libc/include/bits/z80/arch/stdint.h | 37+++++++++++++++++++++++++++++++++++++
libc/include/bits/z80/arch/stdio.h | 18++++++++++++++++++
libc/include/bits/z80/arch/stdlib.h | 14++++++++++++++
libc/include/bits/z80/arch/string.h | 9+++++++++
libc/include/i386-sysv/arch/stdint.h | 38--------------------------------------
libc/include/i386-sysv/arch/stdio.h | 18------------------
libc/include/i386-sysv/arch/stdlib.h | 14--------------
libc/include/i386-sysv/arch/string.h | 9---------
libc/include/qbe/arch/stdint.h | 37-------------------------------------
libc/include/qbe/arch/stdio.h | 18------------------
libc/include/qbe/arch/stdlib.h | 14--------------
libc/include/qbe/arch/string.h | 9---------
libc/include/z80/arch/stdint.h | 37-------------------------------------
libc/include/z80/arch/stdio.h | 18------------------
libc/include/z80/arch/stdlib.h | 14--------------
libc/include/z80/arch/string.h | 9---------
33 files changed, 314 insertions(+), 315 deletions(-)

diff --git a/inc/sysincludes.def.h b/inc/sysincludes.def.h @@ -1,7 +1,6 @@ char *sysincludes[] = { PREFIX "/include/scc/" , - PREFIX "/include/scc/" ARCH "/", - PREFIX "/include/scc/" ARCH "/arch/", + PREFIX "/include/scc/bits/" ARCH "/", /* configure below your standard sys include paths */ PREFIX "/include/", PREFIX "/local/include/", diff --git a/libc/include/amd64-sysv/arch/stdint.h b/libc/include/amd64-sysv/arch/stdint.h @@ -1,37 +0,0 @@ -/* 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/arch/stdio.h b/libc/include/amd64-sysv/arch/stdio.h @@ -1,18 +0,0 @@ -/* See LICENSE file for copyright and license details. */ -#ifndef NULL -#define NULL ((void *) 0) -#endif - -#ifndef _SIZET -typedef unsigned long size_t; -#define _SIZET -#endif - -#define BUFSIZ 512 -#define FILENAME_MAX 256 -#define FOPEN_MAX 16 - -#define TMP_MAX 25 -#define L_tmpnam 256 - -typedef struct _FILE FILE; diff --git a/libc/include/amd64-sysv/arch/stdlib.h b/libc/include/amd64-sysv/arch/stdlib.h @@ -1,14 +0,0 @@ -/* See LICENSE file for copyright and license details. */ - -#ifndef _SIZET -typedef unsigned long size_t; -#define _SIZET -#endif - -#ifndef NULL -#define NULL ((void *) 0) -#endif - -#define EXIT_FAILURE 1 -#define EXIT_SUCCESS 0 -#define RAND_MAX 32767 diff --git a/libc/include/amd64-sysv/arch/string.h b/libc/include/amd64-sysv/arch/string.h @@ -1,9 +0,0 @@ -/* See LICENSE file for copyright and license details. */ - -#ifndef NULL -#define NULL ((void *) 0) -#endif - -#ifndef _SIZET -typedef unsigned size_t; -#endif diff --git a/libc/include/bits/amd64-sysv/arch/stdint.h b/libc/include/bits/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/bits/amd64-sysv/arch/stdio.h b/libc/include/bits/amd64-sysv/arch/stdio.h @@ -0,0 +1,18 @@ +/* See LICENSE file for copyright and license details. */ +#ifndef NULL +#define NULL ((void *) 0) +#endif + +#ifndef _SIZET +typedef unsigned long size_t; +#define _SIZET +#endif + +#define BUFSIZ 512 +#define FILENAME_MAX 256 +#define FOPEN_MAX 16 + +#define TMP_MAX 25 +#define L_tmpnam 256 + +typedef struct _FILE FILE; diff --git a/libc/include/bits/amd64-sysv/arch/stdlib.h b/libc/include/bits/amd64-sysv/arch/stdlib.h @@ -0,0 +1,14 @@ +/* See LICENSE file for copyright and license details. */ + +#ifndef _SIZET +typedef unsigned long size_t; +#define _SIZET +#endif + +#ifndef NULL +#define NULL ((void *) 0) +#endif + +#define EXIT_FAILURE 1 +#define EXIT_SUCCESS 0 +#define RAND_MAX 32767 diff --git a/libc/include/bits/amd64-sysv/arch/string.h b/libc/include/bits/amd64-sysv/arch/string.h @@ -0,0 +1,9 @@ +/* See LICENSE file for copyright and license details. */ + +#ifndef NULL +#define NULL ((void *) 0) +#endif + +#ifndef _SIZET +typedef unsigned size_t; +#endif diff --git a/libc/include/bits/i386-sysv/arch/stdint.h b/libc/include/bits/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/bits/i386-sysv/arch/stdio.h b/libc/include/bits/i386-sysv/arch/stdio.h @@ -0,0 +1,18 @@ +/* See LICENSE file for copyright and license details. */ +#ifndef NULL +#define NULL ((void *) 0) +#endif + +#ifndef _SIZET +typedef unsigned long size_t; +#define _SIZET +#endif + +#define BUFSIZ 512 +#define FILENAME_MAX 256 +#define FOPEN_MAX 16 + +#define TMP_MAX 25 +#define L_tmpnam 256 + +typedef struct _FILE FILE; diff --git a/libc/include/bits/i386-sysv/arch/stdlib.h b/libc/include/bits/i386-sysv/arch/stdlib.h @@ -0,0 +1,14 @@ +/* See LICENSE file for copyright and license details. */ + +#ifndef _SIZET +typedef unsigned long size_t; +#define _SIZET +#endif + +#ifndef NULL +#define NULL ((void *) 0) +#endif + +#define EXIT_FAILURE 1 +#define EXIT_SUCCESS 0 +#define RAND_MAX 32767 diff --git a/libc/include/bits/i386-sysv/arch/string.h b/libc/include/bits/i386-sysv/arch/string.h @@ -0,0 +1,9 @@ +/* See LICENSE file for copyright and license details. */ + +#ifndef NULL +#define NULL ((void *) 0) +#endif + +#ifndef _SIZET +typedef unsigned size_t; +#endif diff --git a/libc/include/bits/qbe/arch/stdint.h b/libc/include/bits/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/bits/qbe/arch/stdio.h b/libc/include/bits/qbe/arch/stdio.h @@ -0,0 +1,18 @@ +/* See LICENSE file for copyright and license details. */ +#ifndef NULL +#define NULL ((void *) 0) +#endif + +#ifndef _SIZET +typedef unsigned long size_t; +#define _SIZET +#endif + +#define BUFSIZ 512 +#define FILENAME_MAX 256 +#define FOPEN_MAX 16 + +#define TMP_MAX 25 +#define L_tmpnam 256 + +typedef struct _FILE FILE; diff --git a/libc/include/bits/qbe/arch/stdlib.h b/libc/include/bits/qbe/arch/stdlib.h @@ -0,0 +1,14 @@ +/* See LICENSE file for copyright and license details. */ + +#ifndef _SIZET +typedef unsigned long size_t; +#define _SIZET +#endif + +#ifndef NULL +#define NULL ((void *) 0) +#endif + +#define EXIT_FAILURE 1 +#define EXIT_SUCCESS 0 +#define RAND_MAX 32767 diff --git a/libc/include/bits/qbe/arch/string.h b/libc/include/bits/qbe/arch/string.h @@ -0,0 +1,9 @@ +/* See LICENSE file for copyright and license details. */ + +#ifndef NULL +#define NULL ((void *) 0) +#endif + +#ifndef _SIZET +typedef unsigned size_t; +#endif diff --git a/libc/include/bits/z80/arch/stdint.h b/libc/include/bits/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/bits/z80/arch/stdio.h b/libc/include/bits/z80/arch/stdio.h @@ -0,0 +1,18 @@ +/* See LICENSE file for copyright and license details. */ +#ifndef NULL +#define NULL ((void *) 0) +#endif + +#ifndef _SIZET +typedef unsigned size_t; +#define _SIZET +#endif + +#define BUFSIZ 512 +#define FILENAME_MAX 256 +#define FOPEN_MAX 16 + +#define TMP_MAX 25 +#define L_tmpnam 256 + +typedef struct _FILE FILE; diff --git a/libc/include/bits/z80/arch/stdlib.h b/libc/include/bits/z80/arch/stdlib.h @@ -0,0 +1,14 @@ +/* See LICENSE file for copyright and license details. */ + +#ifndef _SIZET +typedef unsigned size_t; +#define _SIZET +#endif + +#ifndef NULL +#define NULL ((void *) 0) +#endif + +#define EXIT_FAILURE 1 +#define EXIT_SUCCESS 0 +#define RAND_MAX 32767 diff --git a/libc/include/bits/z80/arch/string.h b/libc/include/bits/z80/arch/string.h @@ -0,0 +1,9 @@ +/* See LICENSE file for copyright and license details. */ + +#ifndef NULL +#define NULL ((void *) 0) +#endif + +#ifndef _SIZET +typedef unsigned size_t; +#endif diff --git a/libc/include/i386-sysv/arch/stdint.h b/libc/include/i386-sysv/arch/stdint.h @@ -1,38 +0,0 @@ -/* 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/arch/stdio.h b/libc/include/i386-sysv/arch/stdio.h @@ -1,18 +0,0 @@ -/* See LICENSE file for copyright and license details. */ -#ifndef NULL -#define NULL ((void *) 0) -#endif - -#ifndef _SIZET -typedef unsigned long size_t; -#define _SIZET -#endif - -#define BUFSIZ 512 -#define FILENAME_MAX 256 -#define FOPEN_MAX 16 - -#define TMP_MAX 25 -#define L_tmpnam 256 - -typedef struct _FILE FILE; diff --git a/libc/include/i386-sysv/arch/stdlib.h b/libc/include/i386-sysv/arch/stdlib.h @@ -1,14 +0,0 @@ -/* See LICENSE file for copyright and license details. */ - -#ifndef _SIZET -typedef unsigned long size_t; -#define _SIZET -#endif - -#ifndef NULL -#define NULL ((void *) 0) -#endif - -#define EXIT_FAILURE 1 -#define EXIT_SUCCESS 0 -#define RAND_MAX 32767 diff --git a/libc/include/i386-sysv/arch/string.h b/libc/include/i386-sysv/arch/string.h @@ -1,9 +0,0 @@ -/* See LICENSE file for copyright and license details. */ - -#ifndef NULL -#define NULL ((void *) 0) -#endif - -#ifndef _SIZET -typedef unsigned size_t; -#endif diff --git a/libc/include/qbe/arch/stdint.h b/libc/include/qbe/arch/stdint.h @@ -1,37 +0,0 @@ -/* 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/arch/stdio.h b/libc/include/qbe/arch/stdio.h @@ -1,18 +0,0 @@ -/* See LICENSE file for copyright and license details. */ -#ifndef NULL -#define NULL ((void *) 0) -#endif - -#ifndef _SIZET -typedef unsigned long size_t; -#define _SIZET -#endif - -#define BUFSIZ 512 -#define FILENAME_MAX 256 -#define FOPEN_MAX 16 - -#define TMP_MAX 25 -#define L_tmpnam 256 - -typedef struct _FILE FILE; diff --git a/libc/include/qbe/arch/stdlib.h b/libc/include/qbe/arch/stdlib.h @@ -1,14 +0,0 @@ -/* See LICENSE file for copyright and license details. */ - -#ifndef _SIZET -typedef unsigned long size_t; -#define _SIZET -#endif - -#ifndef NULL -#define NULL ((void *) 0) -#endif - -#define EXIT_FAILURE 1 -#define EXIT_SUCCESS 0 -#define RAND_MAX 32767 diff --git a/libc/include/qbe/arch/string.h b/libc/include/qbe/arch/string.h @@ -1,9 +0,0 @@ -/* See LICENSE file for copyright and license details. */ - -#ifndef NULL -#define NULL ((void *) 0) -#endif - -#ifndef _SIZET -typedef unsigned size_t; -#endif diff --git a/libc/include/z80/arch/stdint.h b/libc/include/z80/arch/stdint.h @@ -1,37 +0,0 @@ -/* 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/arch/stdio.h b/libc/include/z80/arch/stdio.h @@ -1,18 +0,0 @@ -/* See LICENSE file for copyright and license details. */ -#ifndef NULL -#define NULL ((void *) 0) -#endif - -#ifndef _SIZET -typedef unsigned size_t; -#define _SIZET -#endif - -#define BUFSIZ 512 -#define FILENAME_MAX 256 -#define FOPEN_MAX 16 - -#define TMP_MAX 25 -#define L_tmpnam 256 - -typedef struct _FILE FILE; diff --git a/libc/include/z80/arch/stdlib.h b/libc/include/z80/arch/stdlib.h @@ -1,14 +0,0 @@ -/* See LICENSE file for copyright and license details. */ - -#ifndef _SIZET -typedef unsigned size_t; -#define _SIZET -#endif - -#ifndef NULL -#define NULL ((void *) 0) -#endif - -#define EXIT_FAILURE 1 -#define EXIT_SUCCESS 0 -#define RAND_MAX 32767 diff --git a/libc/include/z80/arch/string.h b/libc/include/z80/arch/string.h @@ -1,9 +0,0 @@ -/* See LICENSE file for copyright and license details. */ - -#ifndef NULL -#define NULL ((void *) 0) -#endif - -#ifndef _SIZET -typedef unsigned size_t; -#endif