Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions include/cpptrace/from_current.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include <utility>

#ifdef _MSC_VER
#include <windows.h>
#include <excpt.h>
#endif

#include <cpptrace/basic.hpp>
Expand Down Expand Up @@ -43,11 +43,11 @@ CPPTRACE_BEGIN_NAMESPACE

#ifdef _MSC_VER
CPPTRACE_EXPORT CPPTRACE_FORCE_NO_INLINE
int maybe_collect_trace(EXCEPTION_POINTERS* exception_ptrs, int filter_result);
int maybe_collect_trace(_EXCEPTION_POINTERS* exception_ptrs, int filter_result);
CPPTRACE_EXPORT CPPTRACE_FORCE_NO_INLINE
void maybe_collect_trace(EXCEPTION_POINTERS* exception_ptrs, const std::type_info& type_info);
void maybe_collect_trace(_EXCEPTION_POINTERS* exception_ptrs, const std::type_info& type_info);
template<typename E>
CPPTRACE_FORCE_NO_INLINE inline int exception_filter(EXCEPTION_POINTERS* exception_ptrs) {
CPPTRACE_FORCE_NO_INLINE inline int exception_filter(_EXCEPTION_POINTERS* exception_ptrs) {
maybe_collect_trace(exception_ptrs, typeid(E));
return EXCEPTION_CONTINUE_SEARCH;
}
Expand Down
7 changes: 7 additions & 0 deletions src/from_current.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@
#include "logging.hpp"
#include "unwind/unwind.hpp"

#if IS_WINDOWS
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h>
#endif

#ifndef _MSC_VER
#include <cstring>
#endif
Expand Down
4 changes: 4 additions & 0 deletions test/unit/tracing/from_current.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#include <algorithm>
#include <string>

#ifdef _MSC_VER
#include <windows.h>
#endif

#include <gtest/gtest.h>
#include <gtest/gtest-matchers.h>
#include <gmock/gmock.h>
Expand Down
Loading