Main: libc/include/stdlib.h> Implement stubs for "exit" and "abort"

This commit is contained in:
Alex Kotov 2022-06-14 20:01:39 +03:00
parent 300bd833b0
commit 0446478ce4
Signed by: kotovalexarian
GPG Key ID: 553C0EBBEB5D5F08
2 changed files with 13 additions and 0 deletions

View File

@ -6,6 +6,7 @@ EXTRA_DIST = autogen.sh CONTRIBUTING.md sha256sums.txt
SUBDIRS = include
if WITH_LIBC
# FIXME: after "make clean" libc is not rebuiling
SUBDIRS += libc
endif

View File

@ -6,6 +6,18 @@
#include <stdbool.h>
#include <stdlib.h>
// TODO: stub
void exit(const int status __attribute__((unused)))
{
for (;;);
}
// TODO: stub
void abort()
{
exit(EXIT_FAILURE);
}
int atoi(const char *str)
{
while (isspace(*str)) ++str;