From 97313e0aab3a8826599c24ac49d1812d1bed7bde Mon Sep 17 00:00:00 2001 From: Glenn Randers-Pehrson Date: Thu, 29 Apr 2010 09:22:01 -0500 Subject: [PATCH] [master] Include png_reset_zstream() in png.c only when PNG_READ_SUPPORTED is defined. --- ANNOUNCE | 22 +++++++++++++--------- CHANGES | 6 +++++- png.c | 8 +++++--- 3 files changed, 23 insertions(+), 13 deletions(-) diff --git a/ANNOUNCE b/ANNOUNCE index 23a0bfe17..fc87204d0 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -1,5 +1,5 @@ -Libpng 1.4.2rc04 - April 27, 2010 +Libpng 1.4.2rc05 - April 29, 2010 This is not intended to be a public release. It will be replaced within a few weeks by a public version or by another test version. @@ -9,20 +9,20 @@ Files available for download: Source files with LF line endings (for Unix/Linux) and with a "configure" script - 1.4.2rc04.tar.xz (LZMA-compressed, recommended) - 1.4.2rc04.tar.gz - 1.4.2rc04.tar.bz2 + 1.4.2rc05.tar.xz (LZMA-compressed, recommended) + 1.4.2rc05.tar.gz + 1.4.2rc05.tar.bz2 Source files with CRLF line endings (for Windows), without the "configure" script - lp142r04.zip - lp142r04.7z + lp142r05.zip + lp142r05.7z Other information: - 1.4.2rc04-README.txt - 1.4.2rc04-LICENSE.txt + 1.4.2rc05-README.txt + 1.4.2rc05-LICENSE.txt Changes since the last public release (1.4.1): @@ -44,13 +44,17 @@ version 1.4.2rc03 [April 24, 2010] Added some "(long)" typecasts to printf calls in png_handle_cHRM(). Relaxed the overly-restrictive permissions of some files. -version 1.4.2rc04 [April 27, 2010] +version 1.4.2rc04 [April 28, 2010] Added the "vstudio" project to replace "visualc6" and "visualc71" which will be removed from libpng-1.5.0. Demonstrate in example.c that lang_key should be initialized. Set PNG_NO_READ_BGR, PNG_NO_IO_STATE, and PNG_NO_TIME_RFC1123 in contrib/pngminim/decoder/pngusr.h to make a smaller decoder application. +version 1.4.2rc05 [April 29, 2010] + Include png_reset_zstream() in png.c only when PNG_READ_SUPPORTED is defined. + Removed dummy_inflate.c from contrib/pngminim/encoder + Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit https://lists.sourceforge.net/lists/listinfo/png-mng-implement diff --git a/CHANGES b/CHANGES index 5af409606..f10a28350 100644 --- a/CHANGES +++ b/CHANGES @@ -2555,13 +2555,17 @@ version 1.4.2rc03 [April 24, 2010] Added some "(long)" typecasts to printf calls in png_handle_cHRM(). Relaxed the overly-restrictive permissions of some files. -version 1.4.2rc04 [April 27, 2010] +version 1.4.2rc04 [April 28, 2010] Added the "vstudio" project to replace "visualc6" and "visualc71" which will be removed from libpng-1.5.0. Demonstrate in example.c that lang_key should be initialized. Set PNG_NO_READ_BGR, PNG_NO_IO_STATE, and PNG_NO_TIME_RFC1123 in contrib/pngminim/decoder/pngusr.h to make a smaller decoder application. +version 1.4.2rc05 [April 29, 2010] + Include png_reset_zstream() in png.c only when PNG_READ_SUPPORTED is defined. + Removed dummy_inflate.c from contrib/pngminim/encoder + Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit https://lists.sourceforge.net/lists/listinfo/png-mng-implement diff --git a/png.c b/png.c index d868a1cf0..7f3a67d61 100644 --- a/png.c +++ b/png.c @@ -551,13 +551,13 @@ png_get_copyright(png_structp png_ptr) #else #ifdef __STDC__ return ((png_charp) PNG_STRING_NEWLINE \ - "libpng version 1.4.2rc04 - April 27, 2010" PNG_STRING_NEWLINE \ + "libpng version 1.4.2rc04 - April 29, 2010" PNG_STRING_NEWLINE \ "Copyright (c) 1998-2010 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 ((png_charp) "libpng version 1.4.2rc04 - April 27, 2010\ + return ((png_charp) "libpng version 1.4.2rc04 - April 29, 2010\ Copyright (c) 1998-2010 Glenn Randers-Pehrson\ Copyright (c) 1996-1997 Andreas Dilger\ Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc."); @@ -622,7 +622,9 @@ png_handle_as_unknown(png_structp png_ptr, png_bytep chunk_name) return 0; } #endif +#endif /* defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) */ +#ifdef PNG_READ_SUPPORTED /* This function, added to libpng-1.0.6g, is untested. */ int PNGAPI png_reset_zstream(png_structp png_ptr) @@ -631,7 +633,7 @@ png_reset_zstream(png_structp png_ptr) return Z_STREAM_ERROR; return (inflateReset(&png_ptr->zstream)); } -#endif /* defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) */ +#endif /* PNG_READ_SUPPORTED */ /* This function was added to libpng-1.0.7 */ png_uint_32 PNGAPI