1167974Sdelphij/* posixjmp.h -- wrapper for setjmp.h with changes for POSIX systems. */ 2167974Sdelphij 3167974Sdelphij/* Copyright (C) 1987,1991 Free Software Foundation, Inc. 478556Sobrien 5215041Sobrien This file is part of GNU Bash, the Bourne Again SHell. 6215041Sobrien 7167974Sdelphij Bash is free software; you can redistribute it and/or modify it 8167974Sdelphij under the terms of the GNU General Public License as published by 9167974Sdelphij the Free Software Foundation; either version 2, or (at your option) 10167974Sdelphij any later version. 11167974Sdelphij 12167974Sdelphij Bash is distributed in the hope that it will be useful, but WITHOUT 13167974Sdelphij ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 14167974Sdelphij or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public 15215041Sobrien License for more details. 1678556Sobrien 17167974Sdelphij You should have received a copy of the GNU General Public License 18146293Sobrien along with Bash; see the file COPYING. If not, write to the Free 19167974Sdelphij Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ 2078556Sobrien 2178556Sobrien#ifndef _POSIXJMP_H_ 2278556Sobrien#define _POSIXJMP_H_ 2378556Sobrien 2478556Sobrien#include <setjmp.h> 2578556Sobrien 26167974Sdelphij/* This *must* be included *after* config.h */ 27167974Sdelphij 28167974Sdelphij#if defined (HAVE_POSIX_SIGSETJMP) 29167974Sdelphij# define procenv_t sigjmp_buf 30167974Sdelphij# if !defined (__OPENNT) 3178556Sobrien# undef setjmp 3278556Sobrien# define setjmp(x) sigsetjmp((x), 1) 3378556Sobrien# undef longjmp 3478556Sobrien# define longjmp(x, n) siglongjmp((x), (n)) 3578556Sobrien# endif /* !__OPENNT */ 36167974Sdelphij#else 37146293Sobrien# define procenv_t jmp_buf 3878556Sobrien#endif 3978556Sobrien 4078556Sobrien#endif /* _POSIXJMP_H_ */ 4178556Sobrien