commit 5a1fddfe768b2960d72bb8c8214774c9bd897054
parent 15e5a11a8fb94e2d82468ef7dd91856d4ca5cc82
Author: Kyle Milz <kyle@windows.krwm.net>
Date: Fri, 13 Jan 2017 01:17:32 -0800
inst: fix up win32 build
Diffstat:
4 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/inst_fe.cc b/inst_fe.cc
@@ -114,8 +114,8 @@ InstFrontend::clean_PATH()
}
// Returns true if value ends with suffix, false otherwise.
-static bool
-ends_with(std::string const &value, std::string const &suffix)
+bool
+InstFrontend::ends_with(std::string const &value, std::string const &suffix)
{
if (suffix.length() > value.length())
return false;
diff --git a/inst_fe.h b/inst_fe.h
@@ -30,6 +30,8 @@ class InstFrontend
virtual int fork_compiler() = 0;
protected:
+ bool ends_with(std::string const &, std::string const &);
+
std::vector<char *> m_args;
bool m_is_citruninst;
std::vector<std::string> m_source_files;
diff --git a/inst_fewin32.cc b/inst_fewin32.cc
@@ -84,7 +84,7 @@ InstFrontendWin32::copy_file(std::string const &dst_fn, std::string const &src_f
dst.close();
}
-int
+bool
InstFrontendWin32::is_link(bool object_arg, bool compile_arg)
{
if (std::strcmp(m_args[0], "link") == 0)
diff --git a/inst_main.cc b/inst_main.cc
@@ -14,10 +14,10 @@
// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
//
#ifdef _WIN32
+#include "inst_fewin32.h"
+
#include <windows.h>
#include <Shlwapi.h> // PathFindFileNameA
-
-#include "inst_win32.h"
#else /* _WIN32 */
#include <err.h>
#include <libgen.h> // basename