Andy Lester wrote:

On Feb 5, 2008, at 1:17 PM, [EMAIL PROTECTED] wrote:

(He sent this to me directly by mistake)

snprintf is problematic on older Solaris systems, for one.  At least
through 2.7 (2.8?) it's not included in any lib. So other apps needed to
test and bring in their own version.

This is covered in the ticket that exists already, it turns out:

http://rt.perl.org/rt3/Ticket/Display.html?id=39117

Short version: We'll need to make a snprintf() wrapper around sprintf() that ignores the length argument for the systems that don't support it. I'd rather ignore the length and pass on through to sprintf() than to have a parallel implementation. Ignoring the length parameter leaves those platforms without snprintf() exactly where they are today.

I'm wondering if we should aim for "TR 24731: Extensions to the C Library Part I: Bounds-checking interfaces" [1]. I kind of like the idea, but uncertain how much it caught on yet (or will).

[1] http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1146.pdf

Ron

Reply via email to