Skip to content

Commit 458a6bb

Browse files
committed
Fix modules build, guard on _WIN32 instead of _MSC_VER
1 parent 0ff56a6 commit 458a6bb

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

include/cpptrace/utils.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ CPPTRACE_BEGIN_NAMESPACE
6565
}
6666

6767
// dbghelp
68-
#ifdef _MSC_VER
68+
#ifdef _WIN32
6969
CPPTRACE_EXPORT void load_symbols_for_file(const std::string& filename);
7070
#endif
7171
CPPTRACE_END_NAMESPACE

src/cpptrace.cppm

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,5 +103,7 @@ CPPTRACE_BEGIN_NAMESPACE
103103
export using cpptrace::experimental::set_dwarf_resolver_disable_aranges;
104104
}
105105

106-
export using cpptrace::load_symbols_for_file;
106+
#ifdef _WIN32
107+
export using cpptrace::load_symbols_for_file;
108+
#endif
107109
CPPTRACE_END_NAMESPACE

src/utils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ CPPTRACE_BEGIN_NAMESPACE
9090
std::set_terminate(terminate_handler);
9191
}
9292

93-
#if defined(_MSC_VER) && !defined(CPPTRACE_GET_SYMBOLS_WITH_DBGHELP)
93+
#if defined(_WIN32) && !defined(CPPTRACE_GET_SYMBOLS_WITH_DBGHELP)
9494
void load_symbols_for_file(const std::string&) {
9595
// nop
9696
}

0 commit comments

Comments
 (0)