Consolidate definition of USE_WIN32API
[deliverable/binutils-gdb.git] / gdb / gdbsupport / gdb_setjmp.h
index d4ebbfa8f2a2a45dbc6c9e1ed91b2788525a1fdd..168833ae8ea42ec32bd3160136837e1f78624b2e 100644 (file)
@@ -1,5 +1,5 @@
 /* Portability wrappers for setjmp and longjmp.
-   Copyright (C) 1986-2019 Free Software Foundation, Inc.
+   Copyright (C) 1986-2020 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
 
 #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.024913 seconds and 4 git commands to generate.