diff --git a/libs/libc/include/setjmp.h b/libs/libc/include/setjmp.h new file mode 100644 index 00000000..edfb2f3c --- /dev/null +++ b/libs/libc/include/setjmp.h @@ -0,0 +1,23 @@ +#ifndef _SETJMP_H +#define _SETJMP_H + +#include + +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 \ No newline at end of file diff --git a/libs/libc/src/setjmp.cpp b/libs/libc/src/setjmp.cpp new file mode 100644 index 00000000..6a9f8041 --- /dev/null +++ b/libs/libc/src/setjmp.cpp @@ -0,0 +1,25 @@ +#include +#include + +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"); + } +} \ No newline at end of file