Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
catch_fatal_condition.h
Go to the documentation of this file.
1/*
2 * Created by Phil on 21/08/2014
3 * Copyright 2014 Two Blue Cubes Ltd. All rights reserved.
4 *
5 * Distributed under the Boost Software License, Version 1.0. (See accompanying
6 * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7 *
8 */
9#ifndef TWOBLUECUBES_CATCH_FATAL_CONDITION_H_INCLUDED
10#define TWOBLUECUBES_CATCH_FATAL_CONDITION_H_INCLUDED
11
12#include "catch_platform.h"
15
16
17#if defined( CATCH_CONFIG_WINDOWS_SEH )
18
19namespace Catch {
20
21 struct FatalConditionHandler {
22
23 static LONG CALLBACK handleVectoredException(PEXCEPTION_POINTERS ExceptionInfo);
25 static void reset();
27
28 private:
29 static bool isSet;
30 static ULONG guaranteeSize;
31 static PVOID exceptionHandlerHandle;
32 };
33
34} // namespace Catch
35
36#elif defined ( CATCH_CONFIG_POSIX_SIGNALS )
37
38#include <signal.h>
39
40namespace Catch {
41
43
44 static bool isSet;
45 static struct sigaction oldSigActions[];
46 static stack_t oldSigStack;
47 static char altStackMem[];
48
49 static void handleSignal( int sig );
50
53 static void reset();
54 };
55
56} // namespace Catch
57
58
59#else
60
61namespace Catch {
62 struct FatalConditionHandler {
63 void reset();
64 };
65}
66
67#endif
68
69#endif // TWOBLUECUBES_CATCH_FATAL_CONDITION_H_INCLUDED
static struct sigaction oldSigActions[]