Hi Darren,

Take for example format_rate() in progressmeter.c, specifically this code:
before:
snprintf(buf, size, "%3lld.%1lld%c%s",
(int64_t) (bytes + 5) / 100,
(int64_t) (bytes + 5) / 10 % 10,
unit[i],
i ? "B" : " ");

after:
snprintf(buf, size, "%3" PRId64 ".%1" PRId64 "%c%s",
(int64_t) (bytes + 5) / 100,
(int64_t) (bytes + 5) / 10 % 10,
unit[i],
i ? "B" : " ");


PRId64 is defined in inttypes.h as "ld" for 64 bit machines or "lld" for
32bit machines. This allows the code to compile cleanly.

I'm also purposing that these macros be added using autoconf if the user
does not have inttypes.h.

Thanks,
Shaw

_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@mindrot.org
http://www.mindrot.org/mailman/listi...enssh-unix-dev