* libc/include/machine/setjmp.h (_longjmp): Define as function on

Cygwin.
	(_setjmp): Ditto.
This commit is contained in:
Corinna Vinschen 2008-06-21 18:48:45 +00:00
parent 31558344b0
commit eb3f08acf8
2 changed files with 12 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2008-06-21 Corinna Vinschen <corinna@vinschen.de>
* libc/include/machine/setjmp.h (_longjmp): Define as function on
Cygwin.
(_setjmp): Ditto.
2008-06-18 Eric Blake <ebb9@byu.net> 2008-06-18 Eric Blake <ebb9@byu.net>
Per Posix, strsignal returns non-const char*. Per Posix, strsignal returns non-const char*.

View File

@ -307,11 +307,16 @@ typedef int sigjmp_buf[_JBLEN+2];
#endif #endif
/* POSIX _setjmp/_longjmp macros, maintained for XSI compatibility. These /* POSIX _setjmp/_longjmp, maintained for XSI compatibility. These
are equivalent to sigsetjmp/siglongjmp when not saving the signal mask. are equivalent to sigsetjmp/siglongjmp when not saving the signal mask.
New applications should use sigsetjmp/siglongjmp instead. */ New applications should use sigsetjmp/siglongjmp instead. */
#ifdef __CYGWIN__
extern void _longjmp(jmp_buf, int);
extern int _setjmp(jmp_buf);
#else
#define _setjmp(env) sigsetjmp ((env), 0) #define _setjmp(env) sigsetjmp ((env), 0)
#define _longjmp(env, val) siglongjmp ((env), (val)) #define _longjmp(env, val) siglongjmp ((env), (val))
#endif
#ifdef __cplusplus #ifdef __cplusplus
} }