Skip to content

Commit 471254c

Browse files
committed
Fix win32 compilation
1 parent 2d97393 commit 471254c

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

src/solvers/prop/prop.h

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ Author: Daniel Kroening, [email protected]
1212

1313
// decision procedure wrapper for boolean propositional logics
1414

15+
#include <stdint.h>
16+
1517
#include <util/message.h>
1618
#include <util/threeval.h>
1719

src/solvers/sat/satcheck_minisat2.cpp

+21-1
Original file line numberDiff line numberDiff line change
@@ -115,13 +115,17 @@ void satcheck_minisat2_baset<T>::lcnf(const bvt &bv)
115115
clause_counter++;
116116
}
117117

118+
#ifndef _WIN32
119+
118120
static Minisat::Solver *solver_to_interrupt=nullptr;
119121

120122
static void interrupt_solver(int signum)
121123
{
122124
solver_to_interrupt->interrupt();
123125
}
124126

127+
#endif
128+
125129
template<typename T>
126130
propt::resultt satcheck_minisat2_baset<T>::prop_solve()
127131
{
@@ -161,6 +165,10 @@ propt::resultt satcheck_minisat2_baset<T>::prop_solve()
161165
Minisat::vec<Minisat::Lit> solver_assumptions;
162166
convert(assumptions, solver_assumptions);
163167

168+
using Minisat::lbool;
169+
170+
#ifndef _WIN32
171+
164172
void (*old_handler)(int)=SIG_ERR;
165173

166174
if(time_limit_seconds!=0)
@@ -173,7 +181,6 @@ propt::resultt satcheck_minisat2_baset<T>::prop_solve()
173181
alarm(time_limit_seconds);
174182
}
175183

176-
using Minisat::lbool;
177184
lbool solver_result=solver->solveLimited(solver_assumptions);
178185

179186
if(old_handler!=SIG_ERR)
@@ -183,6 +190,19 @@ propt::resultt satcheck_minisat2_baset<T>::prop_solve()
183190
solver_to_interrupt=solver;
184191
}
185192

193+
#else // _WIN32
194+
195+
if(time_limit_seconds!=0)
196+
{
197+
messaget::warning() <<
198+
"Time limit ignored (not supported on Win32 yet)" << messaget::eom;
199+
}
200+
201+
lbool solver_result=
202+
solver->solve(solver_assumptions) ? l_True : l_False;
203+
204+
#endif
205+
186206
if(solver_result==l_True)
187207
{
188208
messaget::status() <<

0 commit comments

Comments
 (0)