Re: snprintf heads-up

From: Date: Fri, 08 Sep 2000 14:14:41 +0000
Subject: Re: snprintf heads-up
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-32668@lists.php.net to get a copy of this message
On 08-Sep-00 Stanislav Malyshev wrote: | ZS>> written. As it doesn't always appear to be the case, the best approach | | More precisely, it almost always is not the case, once the 'n' part comes | into play. | | ZS>> IMHO would be using the bundled snprintf() always, regardless of | whether | ZS>> snprintf() is available on the platform. | ZS>> As far as I can tell from glancing through snprintf.c, this version of | ZS>> snprintf() would return the number of characters that were effectively | ZS>> written under all circumstances (I could be wrong, we need to test it). | | That would be highly confusing behaviour - calling something snprintf | where it isn't snprintf. Then we better call it safe_snprintf or something | like that. if the documented behaviour really is true, we could write a little configure test and macro that masks this behaviour. Ciao, Thomas --- Thomas Pundt -------------------------- http://rp-online.de/ ----------------- RP-Online Verlagsgesellschaft mbH | pundt@rp-online.de Blumenstrasse 28, D-40212 Duesseldorf | Schlossstrasse 42, D-40477 Duesseldorf

« previous php.dev (#32668) next »