summaryrefslogtreecommitdiff
path: root/libs/ezsat/ezminisat.cc
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2014-10-11 10:24:46 +0200
committerClifford Wolf <clifford@clifford.at>2014-10-11 10:24:46 +0200
commit93e6ebe771c675280742adf6905298301575d0a7 (patch)
tree4739e041d6c5f2eba23926feec931f875cd0e8bf /libs/ezsat/ezminisat.cc
parentdf537a216ba6a954a7b3e5631d35f58ebe3b2c0e (diff)
Disabled ezminisat timeout feature for Win32
Diffstat (limited to 'libs/ezsat/ezminisat.cc')
-rw-r--r--libs/ezsat/ezminisat.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/libs/ezsat/ezminisat.cc b/libs/ezsat/ezminisat.cc
index 267355ad..b996d4a3 100644
--- a/libs/ezsat/ezminisat.cc
+++ b/libs/ezsat/ezminisat.cc
@@ -77,6 +77,7 @@ bool ezMiniSAT::eliminated(int idx)
}
#endif
+#ifndef _WIN32
ezMiniSAT *ezMiniSAT::alarmHandlerThis = NULL;
clock_t ezMiniSAT::alarmHandlerTimeout = 0;
@@ -88,6 +89,7 @@ void ezMiniSAT::alarmHandler(int)
} else
alarm(1);
}
+#endif
bool ezMiniSAT::solver(const std::vector<int> &modelExpressions, std::vector<bool> &modelValues, const std::vector<int> &assumptions)
{
@@ -174,6 +176,7 @@ contradiction:
#endif
}
+#ifndef _WIN32
struct sigaction sig_action;
struct sigaction old_sig_action;
int old_alarm_timeout = 0;
@@ -188,9 +191,11 @@ contradiction:
sigaction(SIGALRM, &sig_action, &old_sig_action);
alarm(1);
}
+#endif
bool foundSolution = minisatSolver->solve(assumps);
+#ifndef _WIN32
if (solverTimeout > 0) {
if (alarmHandlerTimeout == 0)
solverTimoutStatus = true;
@@ -198,6 +203,7 @@ contradiction:
sigaction(SIGALRM, &old_sig_action, NULL);
alarm(old_alarm_timeout);
}
+#endif
if (!foundSolution) {
#if !EZMINISAT_INCREMENTAL