ref: 6b681a6a53eabc3fe7bff7c20ea168ce9c9922e4
parent: bd2924ad0d60a6e54043adf337169e8ac02d19ea
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Thu Feb 16 10:17:42 EST 2017
[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.
--- 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/",
--- a/libc/include/amd64-sysv/assert.h
+++ /dev/null
@@ -1,9 +1,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
--- a/libc/include/amd64-sysv/ctype.h
+++ /dev/null
@@ -1,20 +1,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
--- a/libc/include/amd64-sysv/errno.h
+++ /dev/null
@@ -1,7 +1,0 @@
-/* See LICENSE file for copyright and license details. */
-#ifndef _ERRNO_H
-#define _ERRNO_H
-
-extern int errno;
-
-#endif
--- /dev/null
+++ b/libc/include/assert.h
@@ -1,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
--- /dev/null
+++ b/libc/include/ctype.h
@@ -1,0 +1,20 @@
+/* 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
--- /dev/null
+++ b/libc/include/errno.h
@@ -1,0 +1,7 @@
+/* See LICENSE file for copyright and license details. */
+#ifndef _ERRNO_H
+#define _ERRNO_H
+
+extern int errno;
+
+#endif
--- a/libc/include/i386-sysv/assert.h
+++ /dev/null
@@ -1,9 +1,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
--- a/libc/include/i386-sysv/ctype.h
+++ /dev/null
@@ -1,20 +1,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
--- a/libc/include/i386-sysv/errno.h
+++ /dev/null
@@ -1,7 +1,0 @@
-/* See LICENSE file for copyright and license details. */
-#ifndef _ERRNO_H
-#define _ERRNO_H
-
-extern int errno;
-
-#endif
--- a/libc/include/qbe/assert.h
+++ /dev/null
@@ -1,9 +1,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
--- a/libc/include/qbe/ctype.h
+++ /dev/null
@@ -1,20 +1,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
--- a/libc/include/qbe/errno.h
+++ /dev/null
@@ -1,7 +1,0 @@
-/* See LICENSE file for copyright and license details. */
-#ifndef _ERRNO_H
-#define _ERRNO_H
-
-extern int errno;
-
-#endif
--- a/libc/include/z80/assert.h
+++ /dev/null
@@ -1,9 +1,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
--- a/libc/include/z80/ctype.h
+++ /dev/null
@@ -1,20 +1,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
--- a/libc/include/z80/errno.h
+++ /dev/null
@@ -1,7 +1,0 @@
-/* See LICENSE file for copyright and license details. */
-#ifndef _ERRNO_H
-#define _ERRNO_H
-
-extern int errno;
-
-#endif