Commit Graph

5 Commits

Author SHA1 Message Date
743aedcd49 libc: Implement atexit() and _exit()
exit() now calls registered handlers before calling _exit().

And initialize_libc() can now register a handler to close stdout and stderr on program termination!! :)
2022-10-12 20:41:55 +02:00
ffc223c2cf libc: Document functions in stdlib.h
Also, add prototypes for calloc() and realloc(), which were already implemented but not in the header.
2022-10-12 11:30:21 +02:00
560b0a1705 libc: Rename the _ folder to bits, as used internally by libraries 2022-10-04 19:11:54 +02:00
a050ed9133 libc: add an internal macros.h header with headers to make attributes less verbose 2022-10-04 19:06:56 +02:00
fcf5923cc0 WIP: Add a C Library, let's try to compile a Hosted GCC cross-compiler using this! 2022-10-01 20:59:22 +02:00