[master] Include png_reset_zstream() in png.c only when PNG_READ_SUPPORTED

is defined.
This commit is contained in:
Glenn Randers-Pehrson
2010-04-29 09:22:01 -05:00
parent 8876e74e43
commit 97313e0aab
3 changed files with 23 additions and 13 deletions

8
png.c
View File

@@ -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