Last active
August 29, 2015 14:26
-
-
Save rgov/62f568a0b886824c32c3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Makefile b/Makefile | |
index ceb9d77..c9bd8fd 100644 | |
--- a/Makefile | |
+++ b/Makefile | |
@@ -60,7 +60,7 @@ SOMINOR=1 | |
SORELEASE?=.0# Declare empty to leave out from library file name. | |
MINISAT_CXXFLAGS = -I. -D __STDC_LIMIT_MACROS -D __STDC_FORMAT_MACROS -Wall -Wno-parentheses -Wextra | |
-MINISAT_LDFLAGS = -Wall -lz | |
+MINISAT_LDFLAGS = -Wall | |
ECHO=@echo | |
ifeq ($(VERB),) | |
@@ -96,9 +96,9 @@ $(BUILD_DIR)/dynamic/%.o: MINISAT_CXXFLAGS +=$(MINISAT_REL) $(MINISAT_FPIC) | |
## Build-type Link-flags: | |
$(BUILD_DIR)/profile/bin/$(MINISAT): MINISAT_LDFLAGS += -pg | |
-$(BUILD_DIR)/release/bin/$(MINISAT): MINISAT_LDFLAGS += --static $(MINISAT_RELSYM) | |
+$(BUILD_DIR)/release/bin/$(MINISAT): MINISAT_LDFLAGS += $(MINISAT_RELSYM) | |
$(BUILD_DIR)/profile/bin/$(MINISAT_CORE): MINISAT_LDFLAGS += -pg | |
-$(BUILD_DIR)/release/bin/$(MINISAT_CORE): MINISAT_LDFLAGS += --static $(MINISAT_RELSYM) | |
+$(BUILD_DIR)/release/bin/$(MINISAT_CORE): MINISAT_LDFLAGS += $(MINISAT_RELSYM) | |
## Executable dependencies | |
$(BUILD_DIR)/release/bin/$(MINISAT): $(BUILD_DIR)/release/minisat/simp/Main.o $(BUILD_DIR)/release/lib/$(MINISAT_SLIB) | |
@@ -154,7 +154,7 @@ $(BUILD_DIR)/release/bin/$(MINISAT_CORE) $(BUILD_DIR)/debug/bin/$(MINISAT_CORE) | |
%/lib/$(MINISAT_SLIB): | |
$(ECHO) Linking Static Library: $@ | |
$(VERB) mkdir -p $(dir $@) | |
- $(VERB) $(AR) -rcs $@ $^ | |
+ $(VERB) $(AR) rcs $@ $^ | |
## Shared Library rule | |
$(BUILD_DIR)/dynamic/lib/$(MINISAT_DLIB).$(SOMAJOR).$(SOMINOR)$(SORELEASE)\ | |
@@ -162,7 +162,7 @@ $(BUILD_DIR)/dynamic/lib/$(MINISAT_DLIB).$(SOMAJOR).$(SOMINOR)$(SORELEASE)\ | |
$(BUILD_DIR)/dynamic/lib/$(MINISAT_DLIB): | |
$(ECHO) Linking Shared Library: $@ | |
$(VERB) mkdir -p $(dir $@) | |
- $(VERB) $(CXX) $(MINISAT_LDFLAGS) $(LDFLAGS) -o $@ -shared -Wl,-soname,$(MINISAT_DLIB).$(SOMAJOR) $^ | |
+ $(VERB) $(CXX) $(MINISAT_LDFLAGS) $(LDFLAGS) -o $@ -shared $^ | |
$(VERB) ln -sf $(MINISAT_DLIB).$(SOMAJOR).$(SOMINOR)$(SORELEASE) $(BUILD_DIR)/dynamic/lib/$(MINISAT_DLIB).$(SOMAJOR) | |
$(VERB) ln -sf $(MINISAT_DLIB).$(SOMAJOR) $(BUILD_DIR)/dynamic/lib/$(MINISAT_DLIB) | |
diff --git a/minisat/core/SolverTypes.h b/minisat/core/SolverTypes.h | |
index 89986d1..b0864c0 100644 | |
--- a/minisat/core/SolverTypes.h | |
+++ b/minisat/core/SolverTypes.h | |
@@ -52,7 +52,8 @@ struct Lit { | |
int x; | |
// Use this as a constructor: | |
- friend Lit mkLit(Var var, bool sign = false); | |
+ friend Lit mkLit(Var var, bool sign); | |
+ friend Lit mkLit(Var var); | |
bool operator == (Lit p) const { return x == p.x; } | |
bool operator != (Lit p) const { return x != p.x; } | |
@@ -61,6 +62,7 @@ struct Lit { | |
inline Lit mkLit (Var var, bool sign) { Lit p; p.x = var + var + (int)sign; return p; } | |
+inline Lit mkLit (Var var) { return mkLit(var, false); } | |
inline Lit operator ~(Lit p) { Lit q; q.x = p.x ^ 1; return q; } | |
inline Lit operator ^(Lit p, bool b) { Lit q; q.x = p.x ^ (unsigned int)b; return q; } | |
inline bool sign (Lit p) { return p.x & 1; } | |
diff --git a/minisat/utils/ParseUtils.h b/minisat/utils/ParseUtils.h | |
index f31fb9e..ed28ea9 100644 | |
--- a/minisat/utils/ParseUtils.h | |
+++ b/minisat/utils/ParseUtils.h | |
@@ -24,7 +24,7 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWA | |
#include <stdlib.h> | |
#include <stdio.h> | |
-#include <zlib.h> | |
+#include </usr/include/zlib.h> | |
#include "minisat/mtl/XAlloc.h" | |
diff --git a/minisat/utils/System.cc b/minisat/utils/System.cc | |
index 21aa4ff..1534b34 100644 | |
--- a/minisat/utils/System.cc | |
+++ b/minisat/utils/System.cc | |
@@ -77,7 +77,7 @@ double Minisat::memUsed() { | |
struct rusage ru; | |
getrusage(RUSAGE_SELF, &ru); | |
return (double)ru.ru_maxrss / 1024; } | |
-double Minisat::memUsedPeak() { return memUsed(); } | |
+double Minisat::memUsedPeak(bool strictlyPeak __attribute__((unused))) { return memUsed(); } | |
#elif defined(__APPLE__) | |
@@ -87,11 +87,11 @@ double Minisat::memUsed() { | |
malloc_statistics_t t; | |
malloc_zone_statistics(NULL, &t); | |
return (double)t.max_size_in_use / (1024*1024); } | |
-double Minisat::memUsedPeak() { return memUsed(); } | |
+double Minisat::memUsedPeak(bool strictlyPeak __attribute__((unused))) { return memUsed(); } | |
#else | |
double Minisat::memUsed() { return 0; } | |
-double Minisat::memUsedPeak() { return 0; } | |
+double Minisat::memUsedPeak(bool strictlyPeak __attribute__((unused))) { return 0; } | |
#endif | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment