[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: Re: [PATCH] Bionic lacks transparent LFS migrations; provide a workaround
From: Rich Felker <dalias () libc ! org>
Date: 2015-04-29 2:56:24
Message-ID: 20150429025624.GR17573 () brightrain ! aerifal ! cx
[Download RAW message or body]
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
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic