From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keith Seitz To: Subject: Re: [RFA] work around sigsetjmp/siglongjmp macro problems Date: Tue, 14 Aug 2001 09:34:00 -0000 Message-id: References: <20010813231801.A23019@redhat.com> X-SW-Source: 2001-08/msg00167.html On Mon, 13 Aug 2001, Christopher Faylor wrote: > My proposed patch is below. It may even be an obvious fix. > > Keith, could you try this out and verify that it fixes the problem? Yep, works just fine. Keith > 2001-08-13 Christopher Faylor > > * top.c (SIGSETJMP): Protect macro argument with parentheses. > (SIGLONGJMP): Protect macro argument with parentheses. > > Index: top.c > =================================================================== > RCS file: /cvs/uberbaum/gdb/top.c,v > retrieving revision 1.42 > diff -p -r1.42 top.c > *** top.c 2001/08/01 18:39:23 1.42 > --- top.c 2001/08/14 03:05:50 > *************** NORETURN void (*error_hook) (void) ATTR_ > *** 299,310 **** > directly. */ > #if defined(HAVE_SIGSETJMP) > #define SIGJMP_BUF sigjmp_buf > ! #define SIGSETJMP(buf) sigsetjmp(buf, 1) > ! #define SIGLONGJMP(buf,val) siglongjmp(buf,val) > #else > #define SIGJMP_BUF jmp_buf > #define SIGSETJMP(buf) setjmp(buf) > ! #define SIGLONGJMP(buf,val) longjmp(buf,val) > #endif > > /* Where to go for return_to_top_level. */ > --- 299,310 ---- > directly. */ > #if defined(HAVE_SIGSETJMP) > #define SIGJMP_BUF sigjmp_buf > ! #define SIGSETJMP(buf) sigsetjmp((buf), 1) > ! #define SIGLONGJMP(buf,val) siglongjmp((buf), (val)) > #else > #define SIGJMP_BUF jmp_buf > #define SIGSETJMP(buf) setjmp(buf) > ! #define SIGLONGJMP(buf,val) longjmp((buf), (val)) > #endif > > /* Where to go for return_to_top_level. */ >