Messages in this thread | | | Subject | Re: [PATCH] size_t now supported in printk | From | Andreas Jaeger <> | Date | 23 Jul 1999 19:47:26 +0200 |
| |
>>>>> Sean Hunter writes:
Sean> By popular demand, this patch allows the use of the "%Z" qualifier to Sean> denote a size_t argument to vsprintf (and thus printk). A number of Sean> people have told me that this would be useful to reduce the need for Sean> casts on non-intel architectures. I have seen this need myself in Sean> trying to remove compile warnings on Alpha.
Sean> The patch is agains 2.2.10, but I don't think anything has touched Sean> this file for quite some time, so it'll probably go cleanly Sean> everywhere. Please feel free to apply, test, flame etc. If feedback Sean> is positive I'll send it to Alan and Linus with a suitably grovelling Sean> request for inclusion.
Sean> Sean
Sean> --- linux.vanilla/lib/vsprintf.c Wed Jul 21 12:05:34 1999 Sean> +++ linux/lib/vsprintf.c Fri Jul 23 17:25:48 1999 Sean> @@ -156,7 +156,9 @@ Sean> int precision; /* min. # of digits for integers; max Sean> number of chars for from string */ Sean> int qualifier; /* 'h', 'l', or 'L' for integer fields */ Sean> + /* 'Z' support added 23/7/1999 S.H. */
Please use 'z' - and then send it to Linus.
The latest ISO C9x draft (from January 99) specifies:
z Specifies that a following d, i, o, u, x, or X conversion specifier applies to a size_t or the corresponding signed integer type argument; or that a following n conversion specifier applies to a pointer to a signed integer type corresponding to size_t argument.
The glibc 2.1 manual has: `z' `Z' Specifies that the argument is a `size_t'.
`z' was introduced in ISO C 9x. `Z' is a GNU extension predating this addition and should not be used anymore in new code.
Andreas -- Andreas Jaeger aj@arthur.rhein-neckar.de jaeger@informatik.uni-kl.de for pgp-key finger ajaeger@aixd1.rhrk.uni-kl.de
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |