On Tue, Nov 26, 2013 at 12:40 AM, Lennart Poettering
<[email protected]> wrote:
> On Mon, 25.11.13 15:20, Dave Reisner ([email protected]) wrote:
>
>>     uint64_t can be formatted correctly with %ju, rather than casting to
>>     unsigned and potentially losing accuracy.
>
> Oh, shouldn't we be careful with that? %j is for intmax_t. Which might
> or might not be int64_t. Given that int128_t is already on the horizon
> (newer gcc already support __int128 on 64bit machines...), I wouldn't be
> surprised if intmax_t is growing to 128bit eventually.
>
> Format strings don't really have a nice way to print fixed-size
> integers I fear... the only stuff that is correct is the "PRIu64" macro,
> but that's fricking ugly...
>
> I think PRIu64 is still a better, more future-proof option than %j though...

I'm about to change all this stuff to print the ifname rather than the
index, so please leave it as is for now.

Cheers,

Tom
_______________________________________________
systemd-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to