Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compilation errors #36

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ MINISAT_RELSYM ?= -g

# Sets of compile flags for different build types
MINISAT_REL ?= -O3 -D NDEBUG
MINISAT_DEB ?= -O0 -D DEBUG
MINISAT_DEB ?= -O0 -D DEBUG
MINISAT_PRF ?= -O3 -D NDEBUG
MINISAT_FPIC ?= -fpic

Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)

Expand Down
4 changes: 3 additions & 1 deletion minisat/core/SolverTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand All @@ -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; }
Expand Down
6 changes: 3 additions & 3 deletions minisat/utils/Options.h
Original file line number Diff line number Diff line change
Expand Up @@ -282,15 +282,15 @@ class Int64Option : public Option
if (range.begin == INT64_MIN)
fprintf(stderr, "imin");
else
fprintf(stderr, "%4"PRIi64, range.begin);
fprintf(stderr, "%4" PRIi64, range.begin);

fprintf(stderr, " .. ");
if (range.end == INT64_MAX)
fprintf(stderr, "imax");
else
fprintf(stderr, "%4"PRIi64, range.end);
fprintf(stderr, "%4" PRIi64, range.end);

fprintf(stderr, "] (default: %"PRIi64")\n", value);
fprintf(stderr, "] (default: %" PRIi64 ")\n", value);
if (verbose){
fprintf(stderr, "\n %s\n", description);
fprintf(stderr, "\n");
Expand Down
6 changes: 3 additions & 3 deletions minisat/utils/System.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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) { return memUsed(); }


#elif defined(__APPLE__)
Expand All @@ -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) { return memUsed(); }

#else
double Minisat::memUsed() { return 0; }
double Minisat::memUsedPeak() { return 0; }
double Minisat::memUsedPeak(bool) { return 0; }
#endif


Expand Down