From ce917c0248108d98644de823e15f854859b44a6f Mon Sep 17 00:00:00 2001 From: Joachim Klein Date: Thu, 13 Jul 2017 05:48:55 +0000 Subject: [PATCH] dd_export.cc: format string %zu is not supported on Windows, use portable PRIuPTR Windows needs %Iu for fprinting size_t / uintptr_t values, use the portable format string macro available in C++11. git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@12012 bbc10eb1-c90d-0410-af57-cb519fbb1720 --- prism/src/dd/dd_export.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/prism/src/dd/dd_export.cc b/prism/src/dd/dd_export.cc index 202261c4..f14cb54b 100644 --- a/prism/src/dd/dd_export.cc +++ b/prism/src/dd/dd_export.cc @@ -31,6 +31,7 @@ #include #include #include +#include #include "dd.h" #include "dd_basics.h" #include "dd_abstr.h" @@ -176,8 +177,9 @@ FILE *fp if (!found) { stored[count++] = dd; } - - fprintf(fp, "%zu\n", (size_t)dd); + + fprintf(fp, "%" PRIuPTR "\n", (uintptr_t)dd); + return 0; }