libc - Freestanding standard library

Makar ships a minimal freestanding C library (libc/) that provides just enough of the standard C interface for the kernel to compile against. It is not a full POSIX libc - it exists solely to satisfy the #include dependencies of the kernel and its subdirectories.


Modules

Header Source(s) Description
stdio.h stdio/printf.c, putchar.c, puts.c Formatted and character output.
stdlib.h stdlib/abort.c Abnormal termination.
string.h string/mem*.c, strlen.c Memory and string utilities.
sys/cdefs.h - Compiler/libc identification macros.

sys/cdefs.h

#define __makar_libc 1

Identifies this as the Makar freestanding libc. Code that needs to detect the Makar environment at compile time can test #ifdef __makar_libc.


Design notes


Future work