[trunk] Fix compilation on VS2010 (snprintf is not C89). C++11 should avoid this in the future
This commit is contained in:
parent
320784659d
commit
f0a2fdd508
|
@ -81,6 +81,9 @@ static int writeoutput( const char *fn, FILE *ppm, int X, int Y, int bpp )
|
|||
/* write single comp as PGM: P5 */
|
||||
for( i = 0; i < 3; ++i )
|
||||
{
|
||||
#ifdef _MSC_VER
|
||||
#define snprintf _snprintf /* Visual Studio */
|
||||
#endif
|
||||
snprintf( outfn, sizeof(outfn), "%s.%s.pgm", fn, exts[i] );
|
||||
outf[i] = fopen( outfn, "wb" );
|
||||
if( !outf[i] ) goto cleanup;
|
||||
|
|
Loading…
Reference in New Issue