LibC: puts() now just calls syscall(SYS_WRITE, ...)

This commit is contained in:
Bananymous
2023-04-22 15:29:38 +03:00
parent 1b4c744974
commit c15f031c3f

View File

@@ -1,5 +1,7 @@
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
#include <sys/syscall.h>
#include <unistd.h>
struct FILE
@@ -86,7 +88,7 @@ int putchar(int ch)
int puts(const char* str)
{
return printf("%s", str);
return syscall(SYS_WRITE, STDOUT_FILENO, str, strlen(str));
}
int sprintf(char* __restrict__ stream, const char* __restrict__ format, ...)