libc: Add setjmp.h stub functions (not implemented)

This commit is contained in:
apio 2022-10-15 15:13:25 +02:00
parent 46f60b192a
commit 8d552b1522
2 changed files with 48 additions and 0 deletions

View File

@ -0,0 +1,23 @@
#ifndef _SETJMP_H
#define _SETJMP_H
#include <bits/macros.h>
typedef int jmp_buf[1];
typedef int sigjmp_buf[1];
#ifdef __cplusplus
extern "C"
{
#endif
int setjmp(jmp_buf env); // Not implemented.
int sigsetjmp(sigjmp_buf env, int savesigs); // Not implemented.
__lc_noreturn void longjmp(jmp_buf env, int val); // Not implemented.
__lc_noreturn void siglongjmp(sigjmp_buf env, int val); // Not implemented.
#ifdef __cplusplus
}
#endif
#endif

25
libs/libc/src/setjmp.cpp Normal file
View File

@ -0,0 +1,25 @@
#include <luna.h>
#include <setjmp.h>
extern "C"
{
int setjmp(jmp_buf)
{
NOT_IMPLEMENTED("setjmp");
}
int sigsetjmp(sigjmp_buf, int)
{
NOT_IMPLEMENTED("sigsetjmp");
}
__lc_noreturn void longjmp(jmp_buf, int)
{
NOT_IMPLEMENTED("longjmp");
}
__lc_noreturn void siglongjmp(sigjmp_buf, int)
{
NOT_IMPLEMENTED("siglongjmp");
}
}