aboutsummaryrefslogtreecommitdiffstats
path: root/libs/ezsat/ezminisat.cc
diff options
context:
space:
mode:
authorTim 'mithro' Ansell <mithro@mithis.com>2017-11-24 15:34:46 +1100
committerTim 'mithro' Ansell <mithro@mithis.com>2017-11-25 19:48:26 -0800
commit34c9fbab5367133fe6e0365068f78762ded70623 (patch)
tree46c7ad3e406217ebd96a70e0460655b36552585f /libs/ezsat/ezminisat.cc
parent8d48b47450f5e62a7db1766da57d5736872077a9 (diff)
downloadyosys-34c9fbab5367133fe6e0365068f78762ded70623.tar.gz
yosys-34c9fbab5367133fe6e0365068f78762ded70623.tar.bz2
yosys-34c9fbab5367133fe6e0365068f78762ded70623.zip
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).
Diffstat (limited to 'libs/ezsat/ezminisat.cc')
-rw-r--r--libs/ezsat/ezminisat.cc6
1 files changed, 5 insertions, 1 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"