| From | Sent On | Attachments |
|---|---|---|
| Andrew Gallatin | Oct 8, 2002 5:26 pm | |
| Mike Barcroft | Oct 8, 2002 5:30 pm | |
| John Baldwin | Oct 8, 2002 6:22 pm | |
| Mike Barcroft | Oct 8, 2002 6:53 pm | |
| Bruce Evans | Oct 8, 2002 11:23 pm | |
| Peter Wemm | Oct 9, 2002 10:30 am | |
| Andrew Gallatin | Oct 9, 2002 10:32 am | |
| John Baldwin | Oct 9, 2002 11:03 am | |
| Andrew Gallatin | Oct 9, 2002 11:10 am | |
| John Baldwin | Oct 9, 2002 11:20 am | |
| John Baldwin | Oct 9, 2002 11:30 am | |
| John Baldwin | Oct 9, 2002 11:39 am | |
| Nate Lawson | Oct 9, 2002 12:10 pm | |
| Bruce Evans | Oct 9, 2002 12:40 pm | |
| Bruce Evans | Oct 9, 2002 1:40 pm | |
| John Baldwin | Oct 9, 2002 1:44 pm | |
| Bruce Evans | Oct 9, 2002 2:04 pm | |
| David O'Brien | Oct 9, 2002 2:22 pm | |
| David O'Brien | Oct 9, 2002 3:05 pm | |
| Bruce Evans | Oct 10, 2002 12:16 am | |
| Bruce Evans | Oct 10, 2002 5:15 am | |
| John Baldwin | Oct 10, 2002 6:29 am | |
| David O'Brien | Oct 10, 2002 7:38 am | |
| John Baldwin | Oct 10, 2002 8:04 am |
| Subject: | Re: lp64 vs lp32 printf | |
|---|---|---|
| From: | Bruce Evans (bd...@zeta.org.au) | |
| Date: | Oct 8, 2002 11:23:24 pm | |
| List: | org.freebsd.freebsd-arch | |
On Tue, 8 Oct 2002, Mike Barcroft wrote:
Andrew Gallatin <gall...@cs.duke.edu> writes:
What's the accepted way to printf something (like sizeof()) which boils down to "unsigned int" on x86 and "unsigned long" on the LP64 platforms?
In userland you can use %z for printing size_t's. In the kernel, casting to intmax_t/uintmax_t and using %j is correct.
Um, using intmax_t to print size_t's would be incorrect, since it is signed. Using uintmax_t would be bloat. Very few typedefed types need the full bloat of [u]intmax_t, and size_t is unlikely to become one of them before casting it to uintmax_t to print it becomes a style bug in the kernel too (when %z is implemented).
To Unsubscribe: send mail to majo...@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message





