mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-05-04 22:49:32 +03:00
fix compilation on mingw, issue #25
This commit is contained in:
parent
e5e2b789ba
commit
f0731862d6
2 changed files with 2 additions and 1 deletions
|
@ -405,6 +405,7 @@ char* mi_strndup(const char* s, size_t n) mi_attr_noexcept {
|
||||||
#define PATH_MAX MAX_PATH
|
#define PATH_MAX MAX_PATH
|
||||||
#endif
|
#endif
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
#include <errno.h>
|
||||||
char* mi_heap_realpath(mi_heap_t* heap, const char* fname, char* resolved_name) mi_attr_noexcept {
|
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
|
// todo: use GetFullPathNameW to allow longer file names
|
||||||
char buf[PATH_MAX];
|
char buf[PATH_MAX];
|
||||||
|
|
|
@ -385,7 +385,7 @@ static void mi_process_done(void) {
|
||||||
|
|
||||||
#if defined(_WIN32) && defined(MI_SHARED_LIB)
|
#if defined(_WIN32) && defined(MI_SHARED_LIB)
|
||||||
// Windows DLL: easy to hook into process_init and thread_done
|
// 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) {
|
__declspec(dllexport) BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, LPVOID reserved) {
|
||||||
if (reason==DLL_PROCESS_ATTACH) {
|
if (reason==DLL_PROCESS_ATTACH) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue