[hackers] [scc] [libc] Move architecture independent headers to include/ || Roberto E. Vargas Caballero

From: <git_AT_suckless.org>
Date: Thu, 16 Feb 2017 15:37:13 +0100 (CET)

commit 4d0eb7b766c9805598efcc12bdc43cc1af480aca
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Thu Feb 16 15:17:42 2017 +0100
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Thu Feb 16 15:27:12 2017 +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.

diff --git a/inc/sysincludes.def.h b/inc/sysincludes.def.h
index dba9e7e..92e14de 100644
--- a/inc/sysincludes.def.h
+++ b/inc/sysincludes.def.h
_AT_@ -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
deleted file mode 100644
index 1d9eadb..0000000
--- a/libc/include/amd64-sysv/assert.h
+++ /dev/null
_AT_@ -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/amd64-sysv/ctype.h b/libc/include/amd64-sysv/ctype.h
deleted file mode 100644
index 5f18d76..0000000
--- a/libc/include/amd64-sysv/ctype.h
+++ /dev/null
_AT_@ -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/amd64-sysv/errno.h b/libc/include/amd64-sysv/errno.h
deleted file mode 100644
index ffb42ca..0000000
--- a/libc/include/amd64-sysv/errno.h
+++ /dev/null
_AT_@ -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/assert.h b/libc/include/assert.h
new file mode 100644
index 0000000..7654531
--- /dev/null
+++ b/libc/include/assert.h
_AT_@ -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/ctype.h b/libc/include/ctype.h
new file mode 100644
index 0000000..5f18d76
--- /dev/null
+++ b/libc/include/ctype.h
_AT_@ -0,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
diff --git a/libc/include/errno.h b/libc/include/errno.h
new file mode 100644
index 0000000..ffb42ca
--- /dev/null
+++ b/libc/include/errno.h
_AT_@ -0,0 +1,7 @@
+/* See LICENSE file for copyright and license details. */
+#ifndef _ERRNO_H
+#define _ERRNO_H
+
+extern int errno;
+
+#endif
diff --git a/libc/include/i386-sysv/assert.h b/libc/include/i386-sysv/assert.h
deleted file mode 100644
index 1d9eadb..0000000
--- a/libc/include/i386-sysv/assert.h
+++ /dev/null
_AT_@ -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
deleted file mode 100644
index 5f18d76..0000000
--- a/libc/include/i386-sysv/ctype.h
+++ /dev/null
_AT_@ -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
deleted file mode 100644
index ffb42ca..0000000
--- a/libc/include/i386-sysv/errno.h
+++ /dev/null
_AT_@ -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
deleted file mode 100644
index 1d9eadb..0000000
--- a/libc/include/qbe/assert.h
+++ /dev/null
_AT_@ -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
deleted file mode 100644
index 5f18d76..0000000
--- a/libc/include/qbe/ctype.h
+++ /dev/null
_AT_@ -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
deleted file mode 100644
index ffb42ca..0000000
--- a/libc/include/qbe/errno.h
+++ /dev/null
_AT_@ -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
deleted file mode 100644
index 1d9eadb..0000000
--- a/libc/include/z80/assert.h
+++ /dev/null
_AT_@ -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
deleted file mode 100644
index 5f18d76..0000000
--- a/libc/include/z80/ctype.h
+++ /dev/null
_AT_@ -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
deleted file mode 100644
index ffb42ca..0000000
--- a/libc/include/z80/errno.h
+++ /dev/null
_AT_@ -1,7 +0,0 @@
-/* See LICENSE file for copyright and license details. */
-#ifndef _ERRNO_H
-#define _ERRNO_H
-
-extern int errno;
-
-#endif
Received on Thu Feb 16 2017 - 15:37:13 CET

This archive was generated by hypermail 2.3.0 : Thu Feb 16 2017 - 15:48:17 CET