3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-23 09:05:32 +00:00

Merged a few fixes for non-posix systems from github.com/Siesh1oo/yosys

(see https://github.com/cliffordwolf/yosys/pull/28)
This commit is contained in:
Clifford Wolf 2014-03-11 14:24:24 +01:00
parent 9992026a8d
commit 91704a7853
11 changed files with 52 additions and 13 deletions

View file

@ -43,7 +43,9 @@
#include <stdio.h>
#include <string.h>
#include <dirent.h>
#include <cerrno>
#include <sstream>
#include <climits>
#include "blifparse.h"
@ -973,7 +975,11 @@ struct AbcPass : public Pass {
int lut_mode = 0;
size_t argidx;
char *pwd = get_current_dir_name();
char pwd [PATH_MAX];
if (!getcwd(pwd, sizeof(pwd))) {
log_cmd_error("getcwd failed: %s\n", strerror(errno));
log_abort();
}
for (argidx = 1; argidx < args.size(); argidx++) {
std::string arg = args[argidx];
if (arg == "-exe" && argidx+1 < args.size()) {
@ -1020,7 +1026,6 @@ struct AbcPass : public Pass {
}
break;
}
free(pwd);
extra_args(args, argidx, design);
if (lut_mode != 0 && !liberty_file.empty())

View file

@ -23,6 +23,7 @@
#include "kernel/log.h"
#include <string.h>
#include <fnmatch.h>
#include <errno.h>
using RTLIL::id2cstr;

View file

@ -23,8 +23,9 @@
#include "kernel/consteval.h"
#include "kernel/celltypes.h"
#include "fsmdata.h"
#include "math.h"
#include <math.h>
#include <string.h>
#include <errno.h>
static void fm_set_fsm_print(RTLIL::Cell *cell, RTLIL::Module *module, FsmData &fsm_data, const char *prefix, FILE *f)
{

View file

@ -21,6 +21,7 @@
#include "kernel/log.h"
#include "libparse.h"
#include <string.h>
#include <errno.h>
using namespace PASS_DFFLIBMAP;