vaseboot/include/VasEBoot/setjmp.h

43 lines
1.3 KiB
C

/*
* VasEBoot -- GRand Unified Bootloader
* Copyright (C) 2003,2006,2007 Free Software Foundation, Inc.
*
* VasEBoot 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.
*
* VasEBoot 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.
*
* You should have received a copy of the GNU General Public License
* along with VasEBoot. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef VasEBoot_SETJMP_HEADER
#define VasEBoot_SETJMP_HEADER 1
#if defined(VasEBoot_UTIL)
#include <setjmp.h>
typedef jmp_buf VasEBoot_jmp_buf;
#define VasEBoot_setjmp setjmp
#define VasEBoot_longjmp longjmp
#else
#include <VasEBoot/misc.h>
#if GNUC_PREREQ(4,0)
#define RETURNS_TWICE __attribute__ ((returns_twice))
#else
#define RETURNS_TWICE
#endif
/* This must define VasEBoot_jmp_buf, and declare VasEBoot_setjmp and
VasEBoot_longjmp. */
# include <VasEBoot/cpu/setjmp.h>
#endif
#endif /* ! VasEBoot_SETJMP_HEADER */