i-bash/lib/readline/posixjmp.h

43 lines
1.3 KiB
C
Raw Normal View History

1997-06-05 14:59:13 +00:00
/* posixjmp.h -- wrapper for setjmp.h with changes for POSIX systems. */
2000-03-17 21:46:59 +00:00
/* Copyright (C) 1987,1991 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
2009-01-12 13:36:28 +00:00
Bash is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
2000-03-17 21:46:59 +00:00
2009-01-12 13:36:28 +00:00
Bash is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
2000-03-17 21:46:59 +00:00
You should have received a copy of the GNU General Public License
2009-01-12 13:36:28 +00:00
along with Bash. If not, see <http://www.gnu.org/licenses/>.
*/
2000-03-17 21:46:59 +00:00
1997-06-05 14:59:13 +00:00
#ifndef _POSIXJMP_H_
#define _POSIXJMP_H_
#include <setjmp.h>
/* This *must* be included *after* config.h */
#if defined (HAVE_POSIX_SIGSETJMP)
# define procenv_t sigjmp_buf
1999-02-19 17:11:39 +00:00
# if !defined (__OPENNT)
# undef setjmp
# define setjmp(x) sigsetjmp((x), 1)
# define setjmp_nosigs(x) sigsetjmp((x), 0)
1999-02-19 17:11:39 +00:00
# undef longjmp
# define longjmp(x, n) siglongjmp((x), (n))
# endif /* !__OPENNT */
1997-06-05 14:59:13 +00:00
#else
# define procenv_t jmp_buf
# define setjmp_nosigs setjmp
1997-06-05 14:59:13 +00:00
#endif
#endif /* _POSIXJMP_H_ */