Add functions to swap endiannes or convert host to big/little endian
This code should be very compiler friendly and should be optimized to
single bswap instruction on x86.
This iterator should be able to iterate any container within container
with type iterator defined.
This also fixed bug if first entry in outer container is empty container.
We now have more or less posix issue 2018 conforming libc headers.
This was a really time consuming and boring operation but it had to
be done.
Now we get to actually start implementing libc :)
It is annoying that we have to have separate macros for these but
I can't find a way to cleanly return lvalue reference from statement
expression. Currently we cast the reference to pointer and return
unreference the pointer outside of the expression.
This feature will probably not be used any time soon, but atleas
it is implemented if I need it one day
References can be assigned with the set() method. Construction nor
assigment operators cannot be used with references to avoid ambiguity
with what assignment to reference does.
You can set the underlying reference with the set() method and access
it with the get() method.
The references are stored as pointers to the object under the hood
which means that size of a reference is sizeof pointer.
We don't store the error message anymore in BAN::Error.
Instead we store a error code that can be mapped into a string.
This allows BAN::Error to only take 4 bytes instead of 128.
We should also make some kernel initialization just panic instead
of returning errors since they are required for succesfull boot
anyway.
We used to copy all headers everytime to sysroot which caused
rebuild of the whole os. Now we use the cmake command
'copy_directory_if_different' which seemed to fix this issue :)
I have been annoyed for a while since I had to build everything
when running the os since the buildsystem was really bad.
I wanted to rewrite the whole build system and changed to using cmake
:)