Blame readline/posixjmp.h

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