asteroids(1) now uses chvideomode(1) if no driver is active.
Made the asteroids game object oriented.
Added asteroids to ateroids(1).
uptime(2) in asteroids.
Note that there seems to be a deadlock if a process exits when there are
zombies around. Init also doesn't handle zombie children correctly as there
is sent no SIGCHLD signal yet.
This helps running cross compiled programs as well as compiling programs
under Sortix with gcc. There is also support for global constructors.
Currently, cross-compiled executables uses these startup files. The current
build system continues to use start.o, which does not offer global
constructors and other useful features.
Note that these using the crtX.o files requires the crtbegin.o and crtend.o
files that ship with the cross compiler, but that should be no problem.
There are still a few non-standard quirks and things that needs to be
properly implemented but that shouldn't be too hard and the most important
features are now implemented.
This is a rather stupid implementation as it does the search in linear
time. More importantly, it is correct and helps porting gcc. Besides, it
can easily be fixed in due time.
This violates POSIX but POSIX is stupid in this respect. Of course, this
will ever so subtly break some applications. Not sure how this stupid design
can be fixed without breaking backwards compatibility. Perhaps remove the
putenv(3) function and replace it with a better replacement? (Or perhaps you
should just use setenv(3) anyways..)
This helps gcc build since it assumes that string.h provides various
functions that POSIX mandates is in strings.h. This is OK with me since that
strings.h is a nasty hack anyways. Also, glibc does this.
This caused a corruption of the resulting file if the program fwrite some
data that is buffered, then fseeks, and then fflushes. The fwrite will then
happen at the wrong memory location. Flushing in fseeko(3) fixes the problem
but it may cause violate some standard or just be inefficient.
Previously fread and fwrite for file descriptors would return the number of
bytes read/written rather than the number of elements read/written. This
breaks the C standard and broke various third party programs such as
readelf from binutils.
Removed Maxsi::Process:: functions as they suck and are barely used. Gave
the functions standard names and put them in their own source files.
The declarations now have nice noreturn attributes attached.