fix compilation on mingw, issue #25

This commit is contained in:
daan 2019-06-23 23:17:44 -07:00
parent e5e2b789ba
commit f0731862d6
2 changed files with 2 additions and 1 deletions

View File

@ -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];

View File

@ -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) {