scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

commit d0ec99aaad5f303dfbd9fd0e094856f7f78c106d
parent 26962956798171998310076e26dd086187ea5ba9
Author: Roberto E. Vargas Caballero <k0ga@shike2.net>
Date:   Mon, 21 Apr 2025 22:08:39 +0200

libc: Add macro definition for setjmp

The standard is contradictory about setjmp(), because it literally says
that it can be a macro or a function, but it has several paragrapshs
where it defines it as a macro, and even explicitely says that setjmp.h
defines the setjmp macro. Given this situation, the saner decision is to
define it as a recursive macro with one argument that expands to itself.

Diffstat:
Minclude/setjmp.h | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/include/setjmp.h b/include/setjmp.h @@ -3,6 +3,8 @@ #include <arch/setjmp.h> +#define setjmp(x) setjmp(x) + extern int setjmp(jmp_buf); extern void longjmp(jmp_buf, int);