diff options
| author | Mathieu Malaterre <mathieu.malaterre@gmail.com> | 2014-03-13 11:03:05 +0000 |
|---|---|---|
| committer | Mathieu Malaterre <mathieu.malaterre@gmail.com> | 2014-03-13 11:03:05 +0000 |
| commit | f0a2fdd50870d1fc561a0e5a69c8e1cd59d56cf5 (patch) | |
| tree | 8d129c3cde505848dabe776c90993e46348b28ac /tests | |
| parent | 320784659d09b702676835ed60fe0e5bb3999860 (diff) | |
[trunk] Fix compilation on VS2010 (snprintf is not C89). C++11 should avoid this in the future
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ppm2rgb3.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/ppm2rgb3.c b/tests/ppm2rgb3.c index 9d46f98e..c9b4772a 100644 --- a/tests/ppm2rgb3.c +++ b/tests/ppm2rgb3.c @@ -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; |
