2022-10-02 16:10:53 +00:00
|
|
|
#include <luna.h>
|
2022-10-01 18:59:22 +00:00
|
|
|
#include <stdlib.h>
|
2022-10-02 15:02:15 +00:00
|
|
|
#include <sys/syscall.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
|
2022-10-01 18:59:22 +00:00
|
|
|
extern "C"
|
|
|
|
{
|
|
|
|
noreturn void abort()
|
|
|
|
{
|
|
|
|
exit(-1);
|
|
|
|
}
|
|
|
|
|
2022-10-08 15:56:40 +00:00
|
|
|
noreturn void exit(int status)
|
2022-10-01 18:59:22 +00:00
|
|
|
{
|
2022-10-08 15:56:40 +00:00
|
|
|
syscall(SYS_exit, status);
|
2022-10-01 18:59:22 +00:00
|
|
|
__builtin_unreachable();
|
|
|
|
}
|
|
|
|
|
|
|
|
int atexit(void (*)(void))
|
|
|
|
{
|
2022-10-02 16:10:53 +00:00
|
|
|
NOT_IMPLEMENTED("atexit");
|
2022-10-01 18:59:22 +00:00
|
|
|
}
|
2022-10-12 09:30:21 +00:00
|
|
|
|
2022-10-01 18:59:22 +00:00
|
|
|
int atoi(const char*)
|
|
|
|
{
|
2022-10-02 16:10:53 +00:00
|
|
|
NOT_IMPLEMENTED("atoi");
|
2022-10-01 18:59:22 +00:00
|
|
|
}
|
2022-10-12 09:30:21 +00:00
|
|
|
|
2022-10-01 18:59:22 +00:00
|
|
|
char* getenv(const char*)
|
|
|
|
{
|
2022-10-02 16:10:53 +00:00
|
|
|
NOT_IMPLEMENTED("getenv");
|
2022-10-01 18:59:22 +00:00
|
|
|
}
|
|
|
|
}
|