diff options
Diffstat (limited to 'readline/posixjmp.h')
-rw-r--r-- | readline/posixjmp.h | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/readline/posixjmp.h b/readline/posixjmp.h index 49bfecf..9c7e99e 100644 --- a/readline/posixjmp.h +++ b/readline/posixjmp.h @@ -1,6 +1,6 @@ /* posixjmp.h -- wrapper for setjmp.h with changes for POSIX systems. */ -/* Copyright (C) 1987,1991 Free Software Foundation, Inc. +/* Copyright (C) 1987,1991-2015 Free Software Foundation, Inc. This file is part of GNU Bash, the Bourne Again SHell. @@ -27,14 +27,20 @@ #if defined (HAVE_POSIX_SIGSETJMP) # define procenv_t sigjmp_buf -# if !defined (__OPENNT) -# undef setjmp -# define setjmp(x) sigsetjmp((x), 1) -# undef longjmp -# define longjmp(x, n) siglongjmp((x), (n)) -# endif /* !__OPENNT */ + +# define setjmp_nosigs(x) sigsetjmp((x), 0) +# define setjmp_sigs(x) sigsetjmp((x), 1) + +# define _rl_longjmp(x, n) siglongjmp((x), (n)) +# define sh_longjmp(x, n) siglongjmp((x), (n)) #else # define procenv_t jmp_buf + +# define setjmp_nosigs setjmp +# define setjmp_sigs setjmp + +# define _rl_longjmp(x, n) longjmp((x), (n)) +# define sh_longjmp(x, n) longjmp((x), (n)) #endif #endif /* _POSIXJMP_H_ */ |