mirror of https://github.com/YosysHQ/icestorm.git
commit
24f521e1c4
|
|
@ -28,6 +28,17 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* needed for VS2013 at least
|
||||||
|
*/
|
||||||
|
#ifdef _WIN32
|
||||||
|
|
||||||
|
#define __PRETTY_FUNCTION__ __FUNCTION__
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
using std::vector;
|
using std::vector;
|
||||||
using std::string;
|
using std::string;
|
||||||
|
|
||||||
|
|
@ -1128,7 +1139,16 @@ int main(int argc, char **argv)
|
||||||
std::ostream *osp;
|
std::ostream *osp;
|
||||||
|
|
||||||
if (parameters.size() >= 1 && parameters[0] != "-") {
|
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]);
|
ifs.open(parameters[0]);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
if (!ifs.is_open())
|
if (!ifs.is_open())
|
||||||
error("Failed to open input file.\n");
|
error("Failed to open input file.\n");
|
||||||
isp = &ifs;
|
isp = &ifs;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue