From 8039a20611be5a73aada9a9ac39ca23514dcb2fa Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Mon, 5 Nov 2018 14:50:41 +0100 Subject: [PATCH] Tiny LibC things. --- LibC/limits.h | 0 LibC/setjmp.h | 0 LibC/string.cpp | 2 +- LibC/string.h | 2 +- LibC/sys/cdefs.h | 3 +++ LibC/sys/file.h | 0 LibC/sys/param.h | 0 LibC/sys/time.h | 0 LibC/sys/wait.h | 0 LibC/termios.h | 0 LibC/unistd.h | 1 + 11 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 LibC/limits.h create mode 100644 LibC/setjmp.h create mode 100644 LibC/sys/file.h create mode 100644 LibC/sys/param.h create mode 100644 LibC/sys/time.h create mode 100644 LibC/sys/wait.h create mode 100644 LibC/termios.h diff --git a/LibC/limits.h b/LibC/limits.h new file mode 100644 index 0000000000..e69de29bb2 diff --git a/LibC/setjmp.h b/LibC/setjmp.h new file mode 100644 index 0000000000..e69de29bb2 diff --git a/LibC/string.cpp b/LibC/string.cpp index 0efe36a9eb..ebd632c70b 100644 --- a/LibC/string.cpp +++ b/LibC/string.cpp @@ -132,7 +132,7 @@ char* strncat(char *dest, const char *src, size_t n) return dest; } -const char* strerror(int errnum) +char* strerror(int errnum) { switch (errnum) { case 0: return "No error"; diff --git a/LibC/string.h b/LibC/string.h index b16b5a733b..3da50ca1f6 100644 --- a/LibC/string.h +++ b/LibC/string.h @@ -18,7 +18,7 @@ char* strcat(char *dest, const char *src); char* strncat(char *dest, const char *src, size_t); size_t strspn(const char*, const char* accept); size_t strcspn(const char*, const char* reject); -const char* strerror(int errnum); +char* strerror(int errnum); __END_DECLS diff --git a/LibC/sys/cdefs.h b/LibC/sys/cdefs.h index 4bfbabedf1..22c1525bf3 100644 --- a/LibC/sys/cdefs.h +++ b/LibC/sys/cdefs.h @@ -10,3 +10,6 @@ #define __BEGIN_DECLS #define __END_DECLS #endif + +#undef __P +#define __P(a) a diff --git a/LibC/sys/file.h b/LibC/sys/file.h new file mode 100644 index 0000000000..e69de29bb2 diff --git a/LibC/sys/param.h b/LibC/sys/param.h new file mode 100644 index 0000000000..e69de29bb2 diff --git a/LibC/sys/time.h b/LibC/sys/time.h new file mode 100644 index 0000000000..e69de29bb2 diff --git a/LibC/sys/wait.h b/LibC/sys/wait.h new file mode 100644 index 0000000000..e69de29bb2 diff --git a/LibC/termios.h b/LibC/termios.h new file mode 100644 index 0000000000..e69de29bb2 diff --git a/LibC/unistd.h b/LibC/unistd.h index abcf410aba..de1fd85180 100644 --- a/LibC/unistd.h +++ b/LibC/unistd.h @@ -45,6 +45,7 @@ off_t lseek(int fd, off_t, int whence); #define SIGKILL 9 #define SIGSEGV 11 #define SIGTERM 15 +#define SIGCHLD 17 #define HOST_NAME_MAX 64