Implemented a proper libc

This commit is contained in:
2024-10-05 13:34:24 +02:00
parent a6445ebcb6
commit 5a5ea4ea59
28 changed files with 258 additions and 123 deletions
+10
View File
@@ -0,0 +1,10 @@
#ifndef STDARG_H
#define STDARG_H
typedef char* va_list;
#define va_start(ap, paramn) (void)((ap) = (char*)(&(paramn) + 1))
#define va_end(ap) (void)((ap) = 0)
#define va_arg(ap, type) (((type*)((ap) = ((ap) + sizeof(type))))[-1])
#endif