Blame posixjmp.h

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