[Bf-committers] Blender 2.43 RC1

Giuseppe Ghibò ghibo at mandriva.com
Mon Jan 8 13:46:06 CET 2007

Ton Roosendaal wrote:

> Hi,
> First; snprintf() is not defined in all platforms, so it needs #ifdefs.

Well, I thought there was implicit usage of snprintf() ;-). Indeed you are right as
snprintf() is not part of ANSI C 89 (though mostly it
was available almost everywhere, I remember of using it on Lattice|SAS/C
on the Amiga several years ago...), but sound to be also part of C99
standard, so I wonder which platform actually don't support it properly.
Anyway what kind of #ifdef it's better to use in case of snprintf() usage? I've
seen it was used this one in the rest of blender code:

#if defined(WIN32) && (!(defined snprintf))
#define snprintf _snprintf

or better for a specific platform, like:

#ifdef __linux__



More information about the Bf-committers mailing list