Allow not saving the signal state in SIGSETJMP
[deliverable/binutils-gdb.git] / gdb / gdbsupport / gdb_setjmp.h
index d4ebbfa8f2a2a45dbc6c9e1ed91b2788525a1fdd..499597085b8f33b54e392fccab56e18270d806c2 100644 (file)
 
 #ifdef HAVE_SIGSETJMP
 #define SIGJMP_BUF             sigjmp_buf
-#define SIGSETJMP(buf)         sigsetjmp((buf), 1)
+#define SIGSETJMP(buf,val)     sigsetjmp((buf), val)
 #define SIGLONGJMP(buf,val)    siglongjmp((buf), (val))
 #else
 #define SIGJMP_BUF             jmp_buf
-#define SIGSETJMP(buf)         setjmp(buf)
+/* We ignore val here because that's safer and avoids having to check
+   whether _setjmp exists.  */
+#define SIGSETJMP(buf,val)     setjmp(buf)
 #define SIGLONGJMP(buf,val)    longjmp((buf), (val))
 #endif
 
This page took 0.026202 seconds and 4 git commands to generate.