scc

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

commit 4d0eb7b766c9805598efcc12bdc43cc1af480aca
parent 2dcd40990f0adaccfdda8643e7c19c31b1166bb8
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Thu, 16 Feb 2017 15:17:42 +0100

[libc] Move architecture independent headers to include/

Having the full set of standard headers  duplicated by architecture
generates different maintance problems. This commit is the first
step to remove this duplicity, and it only moves the headers
that currently are architecture independent to the root of the
inclusion path.

Diffstat:
Minc/sysincludes.def.h | 1+
Dlibc/include/amd64-sysv/assert.h | 9---------
Alibc/include/assert.h | 13+++++++++++++
Rlibc/include/amd64-sysv/ctype.h -> libc/include/ctype.h | 0
Rlibc/include/amd64-sysv/errno.h -> libc/include/errno.h | 0
Dlibc/include/i386-sysv/assert.h | 9---------
Dlibc/include/i386-sysv/ctype.h | 20--------------------
Dlibc/include/i386-sysv/errno.h | 7-------
Dlibc/include/qbe/assert.h | 9---------
Dlibc/include/qbe/ctype.h | 20--------------------
Dlibc/include/qbe/errno.h | 7-------
Dlibc/include/z80/assert.h | 9---------
Dlibc/include/z80/ctype.h | 20--------------------
Dlibc/include/z80/errno.h | 7-------
14 files changed, 14 insertions(+), 117 deletions(-)

diff --git a/inc/sysincludes.def.h b/inc/sysincludes.def.h @@ -1,4 +1,5 @@ char *sysincludes[] = { + PREFIX "/include/scc/" , PREFIX "/include/scc/" ARCH "/", /* configure below your standard sys include paths */ PREFIX "/include/", diff --git a/libc/include/amd64-sysv/assert.h b/libc/include/amd64-sysv/assert.h @@ -1,9 +0,0 @@ -/* See LICENSE file for copyright and license details. */ -#ifndef _ASSERT_H -#define _ASSERT_H - -#ifndef NDEBUG -#define assert(exp) __assert(exp, #exp, __FILE__, __LINE__) -#endif - -#endif diff --git a/libc/include/assert.h b/libc/include/assert.h @@ -0,0 +1,13 @@ +/* See LICENSE file for copyright and license details. */ +#ifndef _ASSERT_H +#define _ASSERT_H + +void __assert(int status, char *exp, char *file, long line); + +#ifndef NDEBUG +# define assert(exp) __assert(exp, #exp, __FILE__, __LINE__) +#else +# define assert(exp) ((void)0) +#endif + +#endif diff --git a/libc/include/amd64-sysv/ctype.h b/libc/include/ctype.h diff --git a/libc/include/amd64-sysv/errno.h b/libc/include/errno.h diff --git a/libc/include/i386-sysv/assert.h b/libc/include/i386-sysv/assert.h @@ -1,9 +0,0 @@ -/* See LICENSE file for copyright and license details. */ -#ifndef _ASSERT_H -#define _ASSERT_H - -#ifndef NDEBUG -#define assert(exp) __assert(exp, #exp, __FILE__, __LINE__) -#endif - -#endif diff --git a/libc/include/i386-sysv/ctype.h b/libc/include/i386-sysv/ctype.h @@ -1,20 +0,0 @@ -/* See LICENSE file for copyright and license details. */ -#ifndef _CTYPE_H -#define _CTYPE_H - -int isalnum(int c); -int isalpha(int c); -int islower(int c); -int isupper(int c); -int isdigit(int c); -int isxdigit(int c); -int iscntrl(int c); -int isgraph(int c); -int isspace(int c); -int isblank(int c); -int isprint(int c); -int ispunct(int c); -int tolower(int c); -int toupper(int c); - -#endif diff --git a/libc/include/i386-sysv/errno.h b/libc/include/i386-sysv/errno.h @@ -1,7 +0,0 @@ -/* See LICENSE file for copyright and license details. */ -#ifndef _ERRNO_H -#define _ERRNO_H - -extern int errno; - -#endif diff --git a/libc/include/qbe/assert.h b/libc/include/qbe/assert.h @@ -1,9 +0,0 @@ -/* See LICENSE file for copyright and license details. */ -#ifndef _ASSERT_H -#define _ASSERT_H - -#ifndef NDEBUG -#define assert(exp) __assert(exp, #exp, __FILE__, __LINE__) -#endif - -#endif diff --git a/libc/include/qbe/ctype.h b/libc/include/qbe/ctype.h @@ -1,20 +0,0 @@ -/* See LICENSE file for copyright and license details. */ -#ifndef _CTYPE_H -#define _CTYPE_H - -int isalnum(int c); -int isalpha(int c); -int islower(int c); -int isupper(int c); -int isdigit(int c); -int isxdigit(int c); -int iscntrl(int c); -int isgraph(int c); -int isspace(int c); -int isblank(int c); -int isprint(int c); -int ispunct(int c); -int tolower(int c); -int toupper(int c); - -#endif diff --git a/libc/include/qbe/errno.h b/libc/include/qbe/errno.h @@ -1,7 +0,0 @@ -/* See LICENSE file for copyright and license details. */ -#ifndef _ERRNO_H -#define _ERRNO_H - -extern int errno; - -#endif diff --git a/libc/include/z80/assert.h b/libc/include/z80/assert.h @@ -1,9 +0,0 @@ -/* See LICENSE file for copyright and license details. */ -#ifndef _ASSERT_H -#define _ASSERT_H - -#ifndef NDEBUG -#define assert(exp) __assert(exp, #exp, __FILE__, __LINE__) -#endif - -#endif diff --git a/libc/include/z80/ctype.h b/libc/include/z80/ctype.h @@ -1,20 +0,0 @@ -/* See LICENSE file for copyright and license details. */ -#ifndef _CTYPE_H -#define _CTYPE_H - -int isalnum(int c); -int isalpha(int c); -int islower(int c); -int isupper(int c); -int isdigit(int c); -int isxdigit(int c); -int iscntrl(int c); -int isgraph(int c); -int isspace(int c); -int isblank(int c); -int isprint(int c); -int ispunct(int c); -int tolower(int c); -int toupper(int c); - -#endif diff --git a/libc/include/z80/errno.h b/libc/include/z80/errno.h @@ -1,7 +0,0 @@ -/* See LICENSE file for copyright and license details. */ -#ifndef _ERRNO_H -#define _ERRNO_H - -extern int errno; - -#endif