1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-14 01:14:48 +00:00

sag:: %zd only Linux

This commit is contained in:
Zeno Rogue 2024-07-24 22:48:03 +02:00
parent 45538f6ce9
commit 9a87d46a32

View File

@ -127,7 +127,11 @@ struct sagdist_t {
fd = open(fname.c_str(), O_WRONLY | O_CREAT | O_TRUNC, 0666); fd = open(fname.c_str(), O_WRONLY | O_CREAT | O_TRUNC, 0666);
if(write(fd, &N, 8) < 8) throw hr_exception("write error"); if(write(fd, &N, 8) < 8) throw hr_exception("write error");
size_t size = N*N*sizeof(distance); size_t size = N*N*sizeof(distance);
#ifdef LINUX
println(hlog, "size is ", hr::format("%zd", size)); println(hlog, "size is ", hr::format("%zd", size));
#else
println(hlog, "size is ", hr::format("%lld", (long long) size));
#endif
char *p = (char*) tab; char *p = (char*) tab;
while(size) { while(size) {
size_t written = write(fd, p, size); size_t written = write(fd, p, size);