Subject: Re: %llu and %qu
To: None <tech-misc@netbsd.org>
From: Christos Zoulas <christos@zoulas.com>
List: tech-misc
Date: 03/07/2000 21:44:16
In article <87em9mu1sp.fsf@redmail.netbsd.org>,
Chris G. Demetriou <cgd@netbsd.org> wrote:
>Jun-ichiro itojun Hagino <itojun@iijlab.net> writes:
>> 	in usr.bin/netstat, it looks %llu is preferred than %qu when we print
>> 	u_quad_t items.  is there any strong reason for this?
>> 	is %qu non-standard?
>
>note also, the correct way to print u_quad_t items with %ll is to
>_cast_ them to 'long long'.  i.e.
>
>
>	u_quad_t foo;
>
>	printf("%llu\n", (long long)foo);
>
>u_quad_t is simply long on some architectures.

Actually this should read:

	printf("%llu\n", (unsigned long long)foo);

christos