[PATCH] Bionic lacks transparent LFS migrations; provide a workaround

Rich Felker dalias at libc.org
Wed Apr 29 02:56:24 UTC 2015


On Tue, Apr 28, 2015 at 09:53:26PM -0400, Matt Whitlock wrote:
> On Wednesday, 29 April 2015, at 1:26 am, Tanguy Pruvot wrote:
> > For this case i generally cast the param to the biggest possible type.
> > 
> > printf("llu", (uint64_t) val);
> 
> You probably shouldn't assume that uint64_t is the largest possible
> integer type. In particular, off_t is not guaranteed to be <= 64
> bits.
> 
> #include <inttypes.h>
> printf("%"PRIuMAX, (uintmax_t) val);
> 
> But I hate the idea of involving all the nasty large-integer
> arithmetic machinery if it's not strictly necessary.

PRIuMAX is useless. There's a standard name for this, %ju.

Rich


More information about the busybox mailing list