mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[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:
committed by
Glenn Randers-Pehrson
parent
f8d3e854cb
commit
38647d4b21
11
png.c
11
png.c
@@ -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.";
|
||||
|
||||
Reference in New Issue
Block a user