diff --git a/kernel/identity.cpp b/kernel/identity.cpp index ce3346f5..f7f1449d 100644 --- a/kernel/identity.cpp +++ b/kernel/identity.cpp @@ -1,6 +1,6 @@ /******************************************************************************* - Copyright(C) Jonas 'Sortie' Termansen 2013. + Copyright(C) Jonas 'Sortie' Termansen 2013, 2014. This file is part of Sortix. @@ -22,8 +22,6 @@ *******************************************************************************/ -#include - #include #include #include diff --git a/kernel/include/sortix/kernel/syscall.h b/kernel/include/sortix/kernel/syscall.h index dfe06f13..a514e776 100644 --- a/kernel/include/sortix/kernel/syscall.h +++ b/kernel/include/sortix/kernel/syscall.h @@ -27,7 +27,7 @@ #include -#include +#include namespace Sortix { namespace Syscall { diff --git a/kernel/include/sortix/syscallnum.h b/kernel/include/sortix/syscall.h similarity index 98% rename from kernel/include/sortix/syscallnum.h rename to kernel/include/sortix/syscall.h index e704d860..a548f677 100644 --- a/kernel/include/sortix/syscallnum.h +++ b/kernel/include/sortix/syscall.h @@ -17,8 +17,8 @@ You should have received a copy of the GNU General Public License along with Sortix. If not, see . - sortix/syscallnum.h - Stores numerical constants for each available system call on this kernel. + sortix/syscall.h + Numeric constants identifying each system call. *******************************************************************************/ diff --git a/kernel/poll.cpp b/kernel/poll.cpp index 3df62c71..618e4c0d 100644 --- a/kernel/poll.cpp +++ b/kernel/poll.cpp @@ -31,7 +31,6 @@ #include #include -#include #include #include diff --git a/kernel/syscall.cpp b/kernel/syscall.cpp index 6dafbaaa..0bc2af78 100644 --- a/kernel/syscall.cpp +++ b/kernel/syscall.cpp @@ -24,7 +24,7 @@ #include -#include +#include #include #include @@ -57,7 +57,6 @@ void Init() void Register(size_t index, void* function) { - if ( SYSCALL_MAX_NUM <= index ) PanicF("Attempted to register system call %p to index %zu, but " "SYSCALL_MAX_NUM = %zu", function, index, (size_t) SYSCALL_MAX_NUM); diff --git a/libc/include/sys/syscall.h b/libc/include/sys/syscall.h index eb793988..83f5bbe2 100644 --- a/libc/include/sys/syscall.h +++ b/libc/include/sys/syscall.h @@ -22,16 +22,16 @@ *******************************************************************************/ -#if defined(__is_sortix_kernel) -#error "This file is part of user-space and should not be built in kernel mode" -#endif - #ifndef INCLUDE_SYS_SYSCALL_H #define INCLUDE_SYS_SYSCALL_H +#if !__STDC_HOSTED__ +#error "This file is part of user-space and should not be built into libk" +#endif + #include -#include +#include /* Expand a macro and convert it to string. */ #define SYSCALL_STRINGIFY_EXPAND(foo) #foo