aboutsummaryrefslogtreecommitdiffstats
path: root/icepack
diff options
context:
space:
mode:
authorAntti Lukats <Antti.Lukats@googlemail.com>2015-08-21 16:53:24 +0200
committerAntti Lukats <Antti.Lukats@googlemail.com>2015-08-21 16:53:24 +0200
commit2b8be1098634c27491bee1ad30e368a281f5b548 (patch)
tree6bdcf863ade8e0ccb04760d3381ff05fbcf83910 /icepack
parent02ff06c05014b24f7cf10c5bc7e17aab8f157fda (diff)
downloadicestorm-2b8be1098634c27491bee1ad30e368a281f5b548.tar.gz
icestorm-2b8be1098634c27491bee1ad30e368a281f5b548.tar.bz2
icestorm-2b8be1098634c27491bee1ad30e368a281f5b548.zip
fixed for VS2013
Diffstat (limited to 'icepack')
-rw-r--r--icepack/icepack.cc20
1 files changed, 20 insertions, 0 deletions
diff --git a/icepack/icepack.cc b/icepack/icepack.cc
index 3e0f109..93a4fa9 100644
--- a/icepack/icepack.cc
+++ b/icepack/icepack.cc
@@ -28,6 +28,17 @@
#include <stdio.h>
#include <stdarg.h>
+/*
+ * needed for VS2013 at least
+ */
+#ifdef _WIN32
+
+#define __PRETTY_FUNCTION__ __FUNCTION__
+#include <algorithm>
+
+#endif
+
+
using std::vector;
using std::string;
@@ -1128,7 +1139,16 @@ int main(int argc, char **argv)
std::ostream *osp;
if (parameters.size() >= 1 && parameters[0] != "-") {
+
+
+ /* VS2013 would open .bin file as ascii */
+#ifdef _WIN32
+ ifs.open(parameters[0], std::ios::binary);
+#else
ifs.open(parameters[0]);
+#endif
+
+
if (!ifs.is_open())
error("Failed to open input file.\n");
isp = &ifs;