fix ports/glucose

Issue #106
This commit is contained in:
Johannes Schlatow
2018-06-13 13:42:12 +02:00
committed by Norman Feske
parent 3076cd3722
commit 3ffdcfe96e
4 changed files with 14 additions and 6 deletions

View File

@@ -1 +1 @@
5f0847efd708b9abd2d25d3352a0a85c3e654429
41c79967122ef8dc145eb592c6c518f06af8ef6b

View File

@@ -6,7 +6,7 @@ URL(glucose) := http://www.labri.fr/perso/lsimon/downloads/softwares/glucose-$(V
SHA(glucose) := e721005535f8ca96d58c0c7e3923924e948a231fb305960b1bf4af49cbc936a6
DIR(glucose) := src/lib/glucose
PATCHES := $(addprefix src/lib/glucose/,c++11.patch pow.patch map.patch buffer_size.patch copy_constructor.patch cputime.patch)
PATCHES := $(addprefix src/lib/glucose/,c++11.patch pow.patch map.patch buffer_size.patch copy_constructor.patch cputime.patch parse.patch)
DIRS := include/glucose/core include/glucose/mtl include/glucose/utils

View File

@@ -4,7 +4,7 @@ create_boot_directory
set fd [open "bin/Test.cnf" w]
puts $fd {
p cnf 15 20
p cnf 15 22
-1 10 11 8 9 0
-2 10 11 8 9 0
-2 4 0
@@ -30,8 +30,6 @@ p cnf 15 20
}
close $fd
set filesize [exec stat -c "%s" bin/Test.cnf]
append config {
<config>
<parent-provides>
@@ -66,7 +64,7 @@ append config "
<libc stdin=\"/dev/null\" stdout=\"/dev/log\" stderr=\"/dev/log\" />
<vfs>
<dir name=\"dev\"> <log/> <null/> </dir>
<rom name=\"Test.cnf\" size=\"$filesize\"/>
<rom name=\"Test.cnf\" />
</vfs>
</config>
</start>

View File

@@ -0,0 +1,10 @@
+++ src/lib/glucose/core/Dimacs.h 2018-06-13 13:12:39.770427200 +0200
@@ -52,7 +52,7 @@
int cnt = 0;
for (;;){
skipWhitespace(in);
- if (*in == EOF) break;
+ if (*in == EOF or *in == 0) break;
else if (*in == 'p'){
if (eagerMatch(in, "p cnf")){
vars = parseInt(in);