mirror of https://github.com/tailix/libkernaux.git
Main: libc/include/stdlib.h> Implement stubs for "exit" and "abort"
This commit is contained in:
parent
300bd833b0
commit
0446478ce4
|
@ -6,6 +6,7 @@ EXTRA_DIST = autogen.sh CONTRIBUTING.md sha256sums.txt
|
||||||
SUBDIRS = include
|
SUBDIRS = include
|
||||||
|
|
||||||
if WITH_LIBC
|
if WITH_LIBC
|
||||||
|
# FIXME: after "make clean" libc is not rebuiling
|
||||||
SUBDIRS += libc
|
SUBDIRS += libc
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,18 @@
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdlib.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)
|
int atoi(const char *str)
|
||||||
{
|
{
|
||||||
while (isspace(*str)) ++str;
|
while (isspace(*str)) ++str;
|
||||||
|
|
Loading…
Reference in New Issue