From 43a9adaef989a8bed5f8fafeef78555df0bd8fb0 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Thu, 31 Aug 2017 17:35:29 +0800 Subject: Misc - Windows compile fixes --- tools/minicargo/build.cpp | 3 +++ tools/minicargo/path.cpp | 3 +++ 2 files changed, 6 insertions(+) (limited to 'tools') diff --git a/tools/minicargo/build.cpp b/tools/minicargo/build.cpp index 56f9b076..b805ebb5 100644 --- a/tools/minicargo/build.cpp +++ b/tools/minicargo/build.cpp @@ -1,5 +1,8 @@ /* */ +#ifdef _WIN32 +# define _CRT_SECURE_NO_WARNINGS // Allows use of getenv (this program doesn't set env vars) +#endif #include "manifest.h" #include "build.h" #include "debug.h" diff --git a/tools/minicargo/path.cpp b/tools/minicargo/path.cpp index 93281e0f..12e505bb 100644 --- a/tools/minicargo/path.cpp +++ b/tools/minicargo/path.cpp @@ -2,6 +2,7 @@ */ #include "path.h" #if _WIN32 +# include #else # include // getcwd/chdir #endif @@ -41,6 +42,8 @@ helpers::path helpers::path::to_absolute() const return *this; #if _WIN32 + char cwd[1024]; + GetCurrentDirectoryA(sizeof(cwd), cwd); #else char cwd[1024]; if( !getcwd(cwd, sizeof(cwd)) ) -- cgit v1.2.3