00001 /* posixjmp.h -- wrapper for setjmp.h with changes for POSIX systems. */ 00002 00003 /* Copyright (C) 1987,1991 Free Software Foundation, Inc. 00004 00005 This file is part of GNU Bash, the Bourne Again SHell. 00006 00007 Bash is free software; you can redistribute it and/or modify it 00008 under the terms of the GNU General Public License as published by 00009 the Free Software Foundation; either version 2, or (at your option) 00010 any later version. 00011 00012 Bash is distributed in the hope that it will be useful, but WITHOUT 00013 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 00014 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public 00015 License for more details. 00016 00017 You should have received a copy of the GNU General Public License 00018 along with Bash; see the file COPYING. If not, write to the Free 00019 Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ 00020 00021 #ifndef _POSIXJMP_H_ 00022 #define _POSIXJMP_H_ 00023 00024 #include <setjmp.h> 00025 00026 /* This *must* be included *after* config.h */ 00027 00028 #if defined (HAVE_POSIX_SIGSETJMP) 00029 # define procenv_t sigjmp_buf 00030 # if !defined (__OPENNT) 00031 # undef setjmp 00032 # define setjmp(x) sigsetjmp((x), 1) 00033 # undef longjmp 00034 # define longjmp(x, n) siglongjmp((x), (n)) 00035 # endif /* !__OPENNT */ 00036 #else 00037 # define procenv_t jmp_buf 00038 #endif 00039 00040 #endif /* _POSIXJMP_H_ */