[libpng17] Fixed makepng.c so that it compiles with GCC 5.1.0.

Added contrib/testspngs/: a directory for additional test png files
This commit is contained in:
John Bowler
2015-09-18 16:22:38 -05:00
committed by Glenn Randers-Pehrson
parent f8d3e854cb
commit 38647d4b21
32 changed files with 177 additions and 96 deletions

11
png.c
View File

@@ -15,7 +15,7 @@
#define PNG_SRC_FILE PNG_SRC_FILE_png
/* Generate a compiler error if there is an old png.h in the search path. */
typedef png_libpng_version_1_7_0beta65 Your_png_h_is_not_version_1_7_0beta65;
typedef png_libpng_version_1_7_0beta66 Your_png_h_is_not_version_1_7_0beta66;
/* Tells libpng that we have already handled the first "num_bytes" bytes
* of the PNG file signature. If the PNG data is embedded into another
@@ -141,10 +141,9 @@ png_calculate_crc(png_structrp png_ptr, png_const_bytep ptr, png_size_t length)
do
{
uInt safe_length = (uInt)length;
#ifndef __COVERITY__
if (safe_length == 0)
safe_length = (uInt)-1; /* evil, but safe */
#endif
safe_length = ZLIB_IO_MAX;
crc = crc32(crc, ptr, safe_length);
@@ -694,13 +693,13 @@ png_get_copyright(png_const_structrp png_ptr)
#else
# ifdef __STDC__
return PNG_STRING_NEWLINE \
"libpng version 1.7.0beta65 - September 16, 2015" PNG_STRING_NEWLINE \
"libpng version 1.7.0beta66 - September 18, 2015" PNG_STRING_NEWLINE \
"Copyright (c) 1998-2015 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \
"Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
"Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
PNG_STRING_NEWLINE;
# else
return "libpng version 1.7.0beta65 - September 16, 2015\
return "libpng version 1.7.0beta66 - September 18, 2015\
Copyright (c) 1998-2015 Glenn Randers-Pehrson\
Copyright (c) 1996-1997 Andreas Dilger\
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.";