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>
|
|
|
|
|
|
|
|
#define noreturn __attribute__((noreturn))
|
2022-10-01 18:59:22 +00:00
|
|
|
|
|
|
|
#define maybe_unused __attribute__((maybe_unused))
|
|
|
|
#define unused __attribute__((unused))
|
|
|
|
|
|
|
|
extern "C"
|
|
|
|
{
|
|
|
|
noreturn void abort()
|
|
|
|
{
|
|
|
|
exit(-1);
|
|
|
|
}
|
|
|
|
|
|
|
|
noreturn void exit(int)
|
|
|
|
{
|
2022-10-02 15:02:15 +00:00
|
|
|
syscall(SYS_exit);
|
2022-10-01 18:59:22 +00:00
|
|
|
__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;
|
|
|
|
}
|
|
|
|
}
|