Added a workaround for buggy BeOS (all versions) - if you need the setjmp.h

header, you should define COMPILE_FOR_R5 when you want to run the software
under R5 in order not to crash.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9511 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2004-10-25 23:29:24 +00:00
parent 8083619cf7
commit 764201fdae
1 changed files with 8 additions and 0 deletions

View File

@ -29,6 +29,14 @@ extern void _longjmp(jmp_buf jumpBuffer, int value);
extern void longjmp(jmp_buf jumpBuffer, int value);
extern void siglongjmp(sigjmp_buf jumpBuffer, int value);
// ToDo: this is a temporary workaround for a bug in BeOS
// (it exports setjmp/sigsetjmp functions that do not work)
#ifdef COMPILE_FOR_R5
# define setjmp(buffer) __sigsetjmp((buffer), 0)
# define sigsetjmp(buffer, mask) __sigsetjmp((buffer), (mask))
extern int __sigsetjmp(jmp_buf buffer, int saveMask);
#endif
#ifdef __cplusplus
}
#endif