3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-08-08 12:11:24 +00:00

minisat: Only define __STDC_XXX_MACROS if not already defined.

Replace;
 #define __STDC_LIMIT_MACROS
 #define __STDC_FORMAT_MACROS

With
 #ifndef __STDC_LIMIT_MACROS
 #define __STDC_LIMIT_MACROS
 #endif
 #ifndef __STDC_FORMAT_MACROS
 #define __STDC_FORMAT_MACROS
 #endif

This fixes a compile warning if you are defining these macros in your
CXXFLAGS (as some distros do).
This commit is contained in:
Tim 'mithro' Ansell 2017-11-24 15:34:46 +11:00
parent 8d48b47450
commit 34c9fbab53
6 changed files with 23 additions and 3 deletions

View file

@ -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