procuding a (non-working) executable for tcc

This commit is contained in:
pommicket 2022-02-17 13:22:13 -05:00
parent 6e1158f49a
commit e900dd8d6f
71 changed files with 42663 additions and 96 deletions

21
05/tcc-0.9.25/setjmp.h Normal file
View file

@ -0,0 +1,21 @@
#ifndef _SETJMP_H
#define _SETJMP_H
#include <stdc_common.h>
typedef long jmp_buf[3];
// @NONSTANDARD: we don't actually support setjmp
int setjmp(jmp_buf env) {
return 0;
}
void __longjmp(jmp_buf env, int val, const char *filename, int line) {
fprintf(stderr, "Error: Tried to longjmp from %s:%d with value %d\n", filename, line, val);
_Exit(-1);
}
#define longjmp(env, val) __longjmp(env, val, __FILE__, __LINE__)
#endif