the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
1
2// Copyright Oliver Kowalke 2009.
3// Distributed under the Boost Software License, Version 1.0.
4// (See accompanying file LICENSE_1_0.txt or copy at
5// http://www.boost.org/LICENSE_1_0.txt)
6
7#ifndef BOOST_CONTEXT_FCONTEXT_H
8#define BOOST_CONTEXT_FCONTEXT_H
9
10#if defined(__PGI)
11#include <stdint.h>
12#endif
13
14#if defined(_WIN32_WCE)
15typedef int intptr_t;
16#endif
17
18#include <boost/config.hpp>
19#include <boost/cstdint.hpp>
20
21#include <boost/context/detail/config.hpp>
22
23#ifdef BOOST_HAS_ABI_HEADERS
24# include BOOST_ABI_PREFIX
25#endif
26
27// x86_64
28// test x86_64 before i386 because icc might
29// define __i686__ for x86_64 too
30#if defined(__x86_64__) || defined(__x86_64) \
31 || defined(__amd64__) || defined(__amd64) \
32 || defined(_M_X64) || defined(_M_AMD64)
33# if defined(BOOST_WINDOWS)
34# include <boost/context/detail/fcontext_x86_64_win.hpp>
35# else
36# include <boost/context/detail/fcontext_x86_64.hpp>
37# endif
38// i386
39#elif defined(i386) || defined(__i386__) || defined(__i386) \
40 || defined(__i486__) || defined(__i586__) || defined(__i686__) \
41 || defined(__X86__) || defined(_X86_) || defined(__THW_INTEL__) \
42 || defined(__I86__) || defined(__INTEL__) || defined(__IA32__) \
43 || defined(_M_IX86) || defined(_I86_)
44# if defined(BOOST_WINDOWS)
45# include <boost/context/detail/fcontext_i386_win.hpp>
46# else
47# include <boost/context/detail/fcontext_i386.hpp>
48# endif
49// arm
50#elif defined(__arm__) || defined(__thumb__) || defined(__TARGET_ARCH_ARM) \
51 || defined(__TARGET_ARCH_THUMB) || defined(_ARM) || defined(_M_ARM)
52# include <boost/context/detail/fcontext_arm.hpp>
53// mips
54#elif (defined(__mips) && __mips == 1) || defined(_MIPS_ISA_MIPS1) \
55 || defined(_R3000)
56# include <boost/context/detail/fcontext_mips.hpp>
57// powerpc
58#elif defined(__powerpc) || defined(__powerpc__) || defined(__ppc) \
59 || defined(__ppc__) || defined(_ARCH_PPC) || defined(__POWERPC__) \
60 || defined(__PPCGECKO__) || defined(__PPCBROADWAY) || defined(_XENON)
61# include <boost/context/detail/fcontext_ppc.hpp>
62#else
63# error "platform not supported"
64#endif
65
66namespace boost {
67namespace context {
68
69extern "C" BOOST_CONTEXT_DECL
70intptr_t BOOST_CONTEXT_CALLDECL jump_fcontext( fcontext_t * ofc, fcontext_t const* nfc, intptr_t vp, bool preserve_fpu = true);
71extern "C" BOOST_CONTEXT_DECL
72fcontext_t * BOOST_CONTEXT_CALLDECL make_fcontext( void * sp, std::size_t size, void (* fn)( intptr_t) );
73
74}}
75
76#ifdef BOOST_HAS_ABI_HEADERS
77# include BOOST_ABI_SUFFIX
78#endif
79
80#endif // BOOST_CONTEXT_FCONTEXT_H
81