Here's the fix for minisat and clang 6.

OK?

Index: patches/patch-minisat_core_Solver_cc
===================================================================
RCS file: patches/patch-minisat_core_Solver_cc
diff -N patches/patch-minisat_core_Solver_cc
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-minisat_core_Solver_cc        11 Apr 2018 14:18:17 -0000
@@ -0,0 +1,24 @@
+$OpenBSD$
+
+C++11 fixes.
+
+Index: minisat/core/Solver.cc
+--- minisat/core/Solver.cc.orig
++++ minisat/core/Solver.cc
+@@ -992,11 +992,11 @@ void Solver::printStats() const
+ {
+     double cpu_time = cpuTime();
+     double mem_used = memUsedPeak();
+-    printf("restarts              : %"PRIu64"\n", starts);
+-    printf("conflicts             : %-12"PRIu64"   (%.0f /sec)\n", conflicts  
 , conflicts   /cpu_time);
+-    printf("decisions             : %-12"PRIu64"   (%4.2f %% random) (%.0f 
/sec)\n", decisions, (float)rnd_decisions*100 / (float)decisions, decisions   
/cpu_time);
+-    printf("propagations          : %-12"PRIu64"   (%.0f /sec)\n", 
propagations, propagations/cpu_time);
+-    printf("conflict literals     : %-12"PRIu64"   (%4.2f %% deleted)\n", 
tot_literals, (max_literals - tot_literals)*100 / (double)max_literals);
++    printf("restarts              : %" PRIu64 "\n", starts);
++    printf("conflicts             : %-12" PRIu64 "   (%.0f /sec)\n", 
conflicts   , conflicts   /cpu_time);
++    printf("decisions             : %-12" PRIu64 "   (%4.2f %% random) (%.0f 
/sec)\n", decisions, (float)rnd_decisions*100 / (float)decisions, decisions   
/cpu_time);
++    printf("propagations          : %-12" PRIu64 "   (%.0f /sec)\n", 
propagations, propagations/cpu_time);
++    printf("conflict literals     : %-12" PRIu64 "   (%4.2f %% deleted)\n", 
tot_literals, (max_literals - tot_literals)*100 / (double)max_literals);
+     if (mem_used != 0) printf("Memory used           : %.2f MB\n", mem_used);
+     printf("CPU time              : %g s\n", cpu_time);
+ }
Index: patches/patch-minisat_utils_Options_h
===================================================================
RCS file: patches/patch-minisat_utils_Options_h
diff -N patches/patch-minisat_utils_Options_h
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-minisat_utils_Options_h       11 Apr 2018 14:18:23 -0000
@@ -0,0 +1,26 @@
+$OpenBSD$
+
+C++11 fixes.
+
+Index: minisat/utils/Options.h
+--- minisat/utils/Options.h.orig
++++ minisat/utils/Options.h
+@@ -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");

-- 
Best Regards
Edd Barrett

http://www.theunixzoo.co.uk

Reply via email to