From 9a87d46a32b811c52ab7e13e09451bdb9d064c4f Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Wed, 24 Jul 2024 22:48:03 +0200 Subject: [PATCH] sag:: %zd only Linux --- rogueviz/sag/cells.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rogueviz/sag/cells.cpp b/rogueviz/sag/cells.cpp index 2b70b75f..5a132865 100644 --- a/rogueviz/sag/cells.cpp +++ b/rogueviz/sag/cells.cpp @@ -127,7 +127,11 @@ struct sagdist_t { fd = open(fname.c_str(), O_WRONLY | O_CREAT | O_TRUNC, 0666); if(write(fd, &N, 8) < 8) throw hr_exception("write error"); size_t size = N*N*sizeof(distance); + #ifdef LINUX println(hlog, "size is ", hr::format("%zd", size)); + #else + println(hlog, "size is ", hr::format("%lld", (long long) size)); + #endif char *p = (char*) tab; while(size) { size_t written = write(fd, p, size);