2003-01-20 04:13:46 +00:00
|
|
|
/*
|
2004-04-04 13:46:03 +00:00
|
|
|
* GRUB -- GRand Unified Bootloader
|
2007-07-21 23:32:33 +00:00
|
|
|
* Copyright (C) 2003,2006,2007 Free Software Foundation, Inc.
|
2003-01-20 04:13:46 +00:00
|
|
|
*
|
2007-07-21 23:32:33 +00:00
|
|
|
* GRUB is free software: you can redistribute it and/or modify
|
2003-01-20 04:13:46 +00:00
|
|
|
* it under the terms of the GNU General Public License as published by
|
2007-07-21 23:32:33 +00:00
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
2003-01-20 04:13:46 +00:00
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
2007-07-21 23:32:33 +00:00
|
|
|
* GRUB is distributed in the hope that it will be useful,
|
2003-01-20 04:13:46 +00:00
|
|
|
* 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
|
2007-07-21 23:32:33 +00:00
|
|
|
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
2003-01-20 04:13:46 +00:00
|
|
|
*/
|
|
|
|
|
2004-04-04 13:46:03 +00:00
|
|
|
#ifndef GRUB_SETJMP_HEADER
|
|
|
|
#define GRUB_SETJMP_HEADER 1
|
2003-01-20 04:13:46 +00:00
|
|
|
|
2013-10-08 15:01:04 +00:00
|
|
|
#if defined(GRUB_UTIL)
|
2003-11-17 18:07:09 +00:00
|
|
|
#include <setjmp.h>
|
2004-04-04 13:46:03 +00:00
|
|
|
typedef jmp_buf grub_jmp_buf;
|
|
|
|
#define grub_setjmp setjmp
|
|
|
|
#define grub_longjmp longjmp
|
2003-11-17 18:07:09 +00:00
|
|
|
#else
|
2013-10-18 14:38:36 +00:00
|
|
|
|
|
|
|
#include <grub/misc.h>
|
|
|
|
|
|
|
|
#if GNUC_PREREQ(4,0)
|
|
|
|
#define RETURNS_TWICE __attribute__ ((returns_twice))
|
|
|
|
#else
|
|
|
|
#define RETURNS_TWICE
|
|
|
|
#endif
|
|
|
|
|
2006-08-04 19:23:28 +00:00
|
|
|
/* This must define grub_jmp_buf, and declare grub_setjmp and
|
|
|
|
grub_longjmp. */
|
|
|
|
# include <grub/cpu/setjmp.h>
|
2003-11-17 18:07:09 +00:00
|
|
|
#endif
|
2003-01-20 04:13:46 +00:00
|
|
|
|
2004-04-04 13:46:03 +00:00
|
|
|
#endif /* ! GRUB_SETJMP_HEADER */
|