mirror of
https://github.com/microsoft/mimalloc.git
synced 2024-12-27 13:33:18 +08:00
fix compilation on mingw, issue #25
This commit is contained in:
parent
e5e2b789ba
commit
f0731862d6
@ -405,6 +405,7 @@ char* mi_strndup(const char* s, size_t n) mi_attr_noexcept {
|
||||
#define PATH_MAX MAX_PATH
|
||||
#endif
|
||||
#include <windows.h>
|
||||
#include <errno.h>
|
||||
char* mi_heap_realpath(mi_heap_t* heap, const char* fname, char* resolved_name) mi_attr_noexcept {
|
||||
// todo: use GetFullPathNameW to allow longer file names
|
||||
char buf[PATH_MAX];
|
||||
|
@ -385,7 +385,7 @@ static void mi_process_done(void) {
|
||||
|
||||
#if defined(_WIN32) && defined(MI_SHARED_LIB)
|
||||
// Windows DLL: easy to hook into process_init and thread_done
|
||||
#include <Windows.h>
|
||||
#include <windows.h>
|
||||
|
||||
__declspec(dllexport) BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, LPVOID reserved) {
|
||||
if (reason==DLL_PROCESS_ATTACH) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user