diff options
author | Clifford Wolf <clifford@clifford.at> | 2017-11-26 07:16:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-26 07:16:06 +0100 |
commit | c22d0e1f53f0b1f3127f30a2fcb638a32cf9c58b (patch) | |
tree | 76702d368bb4945886b847cfbe0709d2549cc545 | |
parent | 8dd59bd72e47fffc9b7ab6cc91c76903ada363ff (diff) | |
parent | 1b231b442c576bacc5d25a35a5846f896394e2f1 (diff) | |
download | yosys-c22d0e1f53f0b1f3127f30a2fcb638a32cf9c58b.tar.gz yosys-c22d0e1f53f0b1f3127f30a2fcb638a32cf9c58b.tar.bz2 yosys-c22d0e1f53f0b1f3127f30a2fcb638a32cf9c58b.zip |
Merge pull request #460 from mithro/g3-fixes
Bunch of small fixes
-rw-r--r-- | libs/ezsat/ezminisat.cc | 6 | ||||
-rw-r--r-- | libs/minisat/00_PATCH_remove_zlib.patch | 17 | ||||
-rwxr-xr-x[-rw-r--r--] | libs/minisat/00_UPDATE.sh | 4 | ||||
-rw-r--r-- | libs/minisat/Dimacs.h | 8 | ||||
-rw-r--r-- | libs/minisat/Options.cc | 4 | ||||
-rw-r--r-- | libs/minisat/SimpSolver.cc | 4 | ||||
-rw-r--r-- | libs/minisat/Solver.cc | 4 | ||||
-rw-r--r-- | libs/minisat/System.cc | 4 | ||||
-rw-r--r-- | libs/subcircuit/subcircuit.h | 2 |
9 files changed, 45 insertions, 8 deletions
diff --git a/libs/ezsat/ezminisat.cc b/libs/ezsat/ezminisat.cc index e0ee6292d..4be5fd493 100644 --- a/libs/ezsat/ezminisat.cc +++ b/libs/ezsat/ezminisat.cc @@ -18,8 +18,12 @@ */ // needed for MiniSAT headers (see Minisat Makefile) -#define __STDC_LIMIT_MACROS +#ifndef __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS +#endif +#ifndef __STDC_LIMIT_MACROS +#define __STDC_LIMIT_MACROS +#endif #include "ezminisat.h" diff --git a/libs/minisat/00_PATCH_remove_zlib.patch b/libs/minisat/00_PATCH_remove_zlib.patch index 61a36f7e5..068356b73 100644 --- a/libs/minisat/00_PATCH_remove_zlib.patch +++ b/libs/minisat/00_PATCH_remove_zlib.patch @@ -36,3 +36,20 @@ int operator * () const { return (pos >= size) ? EOF : buf[pos]; } void operator ++ () { pos++; assureLookahead(); } +--- Dimacs.h ++++ Dimacs.h +@@ -76,10 +76,10 @@ static void parse_DIMACS_main(B& in, Solver& S, bool strictp = false) { + + // Inserts problem into solver. + // +-template<class Solver> +-static void parse_DIMACS(gzFile input_stream, Solver& S, bool strictp = false) { +- StreamBuffer in(input_stream); +- parse_DIMACS_main(in, S, strictp); } ++//template<class Solver> ++//static void parse_DIMACS(gzFile input_stream, Solver& S, bool strictp = false) { ++// StreamBuffer in(input_stream); ++// parse_DIMACS_main(in, S, strictp); } + + //================================================================================================= + } diff --git a/libs/minisat/00_UPDATE.sh b/libs/minisat/00_UPDATE.sh index 2ffc11553..ea26215ab 100644..100755 --- a/libs/minisat/00_UPDATE.sh +++ b/libs/minisat/00_UPDATE.sh @@ -9,8 +9,8 @@ rm -rf minisat_upstream sed -i -e 's,^#include *"minisat/[^/]\+/\?,#include ",' *.cc *.h sed -i -e 's/Minisat::memUsedPeak()/Minisat::memUsedPeak(bool)/' System.cc sed -i -e 's/PRI[iu]64/ & /' Options.h Solver.cc -sed -i -e '1 i #define __STDC_LIMIT_MACROS' *.cc -sed -i -e '1 i #define __STDC_FORMAT_MACROS' *.cc +sed -i -e '1 i #ifndef __STDC_LIMIT_MACROS\n#define __STDC_LIMIT_MACROS\n#endif' *.cc +sed -i -e '1 i #ifndef __STDC_FORMAT_MACROS\n#define __STDC_FORMAT_MACROS\n#endif' *.cc patch -p0 < 00_PATCH_mkLit_default_arg.patch patch -p0 < 00_PATCH_remove_zlib.patch diff --git a/libs/minisat/Dimacs.h b/libs/minisat/Dimacs.h index ccfa1c013..61b9d3ca0 100644 --- a/libs/minisat/Dimacs.h +++ b/libs/minisat/Dimacs.h @@ -76,10 +76,10 @@ static void parse_DIMACS_main(B& in, Solver& S, bool strictp = false) { // Inserts problem into solver. // -template<class Solver> -static void parse_DIMACS(gzFile input_stream, Solver& S, bool strictp = false) { - StreamBuffer in(input_stream); - parse_DIMACS_main(in, S, strictp); } +//template<class Solver> +//static void parse_DIMACS(gzFile input_stream, Solver& S, bool strictp = false) { +// StreamBuffer in(input_stream); +// parse_DIMACS_main(in, S, strictp); } //================================================================================================= } diff --git a/libs/minisat/Options.cc b/libs/minisat/Options.cc index 1aff3fab2..5c45dd6ac 100644 --- a/libs/minisat/Options.cc +++ b/libs/minisat/Options.cc @@ -1,5 +1,9 @@ +#ifndef __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS +#endif +#ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS +#endif /**************************************************************************************[Options.cc] Copyright (c) 2008-2010, Niklas Sorensson diff --git a/libs/minisat/SimpSolver.cc b/libs/minisat/SimpSolver.cc index fd5774e0e..7348a905d 100644 --- a/libs/minisat/SimpSolver.cc +++ b/libs/minisat/SimpSolver.cc @@ -1,5 +1,9 @@ +#ifndef __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS +#endif +#ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS +#endif /***********************************************************************************[SimpSolver.cc] Copyright (c) 2006, Niklas Een, Niklas Sorensson Copyright (c) 2007-2010, Niklas Sorensson diff --git a/libs/minisat/Solver.cc b/libs/minisat/Solver.cc index ab476853a..f6d4fb5ae 100644 --- a/libs/minisat/Solver.cc +++ b/libs/minisat/Solver.cc @@ -1,5 +1,9 @@ +#ifndef __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS +#endif +#ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS +#endif /***************************************************************************************[Solver.cc] Copyright (c) 2003-2006, Niklas Een, Niklas Sorensson Copyright (c) 2007-2010, Niklas Sorensson diff --git a/libs/minisat/System.cc b/libs/minisat/System.cc index ceef4292b..1921a1d71 100644 --- a/libs/minisat/System.cc +++ b/libs/minisat/System.cc @@ -1,5 +1,9 @@ +#ifndef __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS +#endif +#ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS +#endif /***************************************************************************************[System.cc] Copyright (c) 2003-2006, Niklas Een, Niklas Sorensson Copyright (c) 2007-2010, Niklas Sorensson diff --git a/libs/subcircuit/subcircuit.h b/libs/subcircuit/subcircuit.h index 5291c6421..8368efab1 100644 --- a/libs/subcircuit/subcircuit.h +++ b/libs/subcircuit/subcircuit.h @@ -131,7 +131,7 @@ namespace SubCircuit public: Solver(); - ~Solver(); + virtual ~Solver(); void setVerbose(); void addGraph(std::string graphId, const Graph &graph); |