I've been trying to get some functionality to the %I64 printf size specifier. My last patch was rejected because it was non-portible. Therefore, I've written an internal function, pf_integer_conv, to handle the conversion of integers only -- not floats. The patch tries to not impact the current printf infrastructure as much as possible, therefore it only forwards %I64 sizes. However, it could be possible to foward all integer types as I wrote it to handle them all, and this is probably the way to go.
There are a couple of problems I have discovered in our printf. One is that if flags->Precision is zero, then it is unused. But according to man 3 printf, precision can be explicitly defined as zero. Therefore, we do not handle "zero" precision. The next problem is when we rebuild our format string to handle the integer and floats, and call printf from libc to handle it. It happens to print to a fixed buffer of 40 without checking. If we ever get called to print a number with a field length greater than 40 or whatever large combination, libc will happily print beyond the end of the buffer. These are problems in the current infrastructure and will need to be addressed.
Any comments? I'd like to have a better idea on restructuring the printf to handle number conversions before we move forward. I still need to work on floating point too, as of yet.
Jesse