40 lines
595 B
C++
40 lines
595 B
C++
|
#include <luna/syscall.h>
|
||
|
#include <stdlib.h>
|
||
|
|
||
|
#define maybe_unused __attribute__((maybe_unused))
|
||
|
#define unused __attribute__((unused))
|
||
|
|
||
|
extern "C"
|
||
|
{
|
||
|
noreturn void abort()
|
||
|
{
|
||
|
exit(-1);
|
||
|
}
|
||
|
|
||
|
noreturn void exit(int)
|
||
|
{
|
||
|
__syscall0(SYS_exit);
|
||
|
__builtin_unreachable();
|
||
|
}
|
||
|
|
||
|
int atexit(void (*)(void))
|
||
|
{
|
||
|
return -1;
|
||
|
}
|
||
|
int atoi(const char*)
|
||
|
{
|
||
|
return 0;
|
||
|
}
|
||
|
void free(void*)
|
||
|
{
|
||
|
return;
|
||
|
}
|
||
|
char* getenv(const char*)
|
||
|
{
|
||
|
return 0;
|
||
|
}
|
||
|
void* malloc(size_t)
|
||
|
{
|
||
|
return 0;
|
||
|
}
|
||
|
}
|