[Bf-committers] snprintf() -- function not present on Win32.
Stephane SOPPERA
bf-committers@blender.org
Sun, 09 Nov 2003 18:42:20 +0100
Alexander Ewering wrote:
>On Sun, 9 Nov 2003, Simon Clitherow wrote:
>
>
>
>>Ok, false alarm! Found the function in stdio.h. :)
>>
>>
>
>In fact, snprintf() is NOT portable!
>
>>From a BSD manpage:
>
> hard to assure. For safety, programmers should use the snprintf()
>inter-
> face instead. Unfortunately, this interface is not portable.
>
>>From a Linux manpage:
>
>CONFORMING TO
> These are GNU extensions.
>
>
>
From a linux manpage:
The fprintf, printf, sprintf, vprintf, vfprintf, and vsprintf
functions
conform to ANSI X3.159-1989 (``ANSI C'') and ISO/IEC 9899:1999
(``ISO
C99''). The snprintf and vsnprintf functions conform to
ISO/IEC
9899:1999.
snprintf is C99 and is safer than sprintf (see the bug I reported about
sequence plugins)
--
Stephane SOPPERA
http://perso.wanadoo.fr/stephane.soppera