ensure C++ compilation on windows

This commit is contained in:
daan 2019-07-22 10:27:14 -07:00
parent 598ed19c61
commit 66b8c37ab3
5 changed files with 16 additions and 10 deletions

View file

@ -384,12 +384,18 @@ bool _mi_preloading() {
// Communicate with the redirection module on Windows
#if defined(_WIN32) && defined(MI_SHARED_LIB)
#ifdef __cplusplus
extern "C" {
#endif
mi_decl_export void _mi_redirect_init() {
// called on redirection
mi_redirected = true;
}
__declspec(dllimport) bool mi_allocator_init(const char** message);
__declspec(dllimport) void mi_allocator_done();
#ifdef __cplusplus
}
#endif
#else
static bool mi_allocator_init(const char** message) {
if (message != NULL) *message = NULL;