aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2015-08-21 19:47:11 +0200
committerClifford Wolf <clifford@clifford.at>2015-08-21 19:47:11 +0200
commit24f521e1c49944a2d4702540060a4a67d75fb6cb (patch)
tree6bdcf863ade8e0ccb04760d3381ff05fbcf83910
parent02ff06c05014b24f7cf10c5bc7e17aab8f157fda (diff)
parent2b8be1098634c27491bee1ad30e368a281f5b548 (diff)
downloadicestorm-24f521e1c49944a2d4702540060a4a67d75fb6cb.tar.gz
icestorm-24f521e1c49944a2d4702540060a4a67d75fb6cb.tar.bz2
icestorm-24f521e1c49944a2d4702540060a4a67d75fb6cb.zip
Merge pull request #6 from AnttiLukats/master
fixed for VS2013
-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;