diff -ru4N libpng-1.2.23/Makefile.am libpng-1.2.24rc01/Makefile.am --- libpng-1.2.23/Makefile.am 2007-11-06 10:09:11.591589000 -0600 +++ libpng-1.2.24rc01/Makefile.am 2007-12-07 18:10:21.648503000 -0600 @@ -100,10 +100,10 @@ libpng.sym: png.h pngconf.h rm -f $@ $@.new $(CPP) @LIBPNG_DEFINES@ $(CPPFLAGS) -DPNG_BUILDSYMS $(srcdir)/png.h | \ $(SED) -n -e \ - 's|^.*PNG_FUNCTION_EXPORT[ ]*\([$(AN)]*\).*$$|\1|p' \ - -e 's|^.*PNG_DATA_EXPORT[ ]*\([$(AN)]*\).*$$|\1|p' \ + 's|^.*PNG_FUNCTION_EXPORT[ ]*\([$(AN)]*\).*$$|$(SYMBOL_PREFIX)\1|p' \ + -e 's|^.*PNG_DATA_EXPORT[ ]*\([$(AN)]*\).*$$|$(SYMBOL_PREFIX)\1|p' \ >$@.new mv $@.new $@ libpng.vers: libpng.sym diff -ru4N libpng-1.2.23/Makefile.in libpng-1.2.24rc01/Makefile.in --- libpng-1.2.23/Makefile.in 2007-11-06 10:09:11.639712000 -0600 +++ libpng-1.2.24rc01/Makefile.in 2007-12-07 18:10:21.699509000 -0600 @@ -205,8 +205,9 @@ PATH_SEPARATOR = @PATH_SEPARATOR@ PNGLIB_MAJOR = @PNGLIB_MAJOR@ PNGLIB_MINOR = @PNGLIB_MINOR@ PNGLIB_RELEASE = @PNGLIB_RELEASE@ +SYMBOL_PREFIX = @SYMBOL_PREFIX@ PNGLIB_VERSION = @PNGLIB_VERSION@ POW_LIB = @POW_LIB@ RANLIB = @RANLIB@ SED = @SED@ @@ -1233,10 +1234,10 @@ libpng.sym: png.h pngconf.h rm -f $@ $@.new $(CPP) @LIBPNG_DEFINES@ $(CPPFLAGS) -DPNG_BUILDSYMS $(srcdir)/png.h | \ $(SED) -n -e \ - 's|^.*PNG_FUNCTION_EXPORT[ ]*\([$(AN)]*\).*$$|\1|p' \ - -e 's|^.*PNG_DATA_EXPORT[ ]*\([$(AN)]*\).*$$|\1|p' \ + 's|^.*PNG_FUNCTION_EXPORT[ ]*\([$(AN)]*\).*$$|$(SYMBOL_PREFIX)\1|p' \ + -e 's|^.*PNG_DATA_EXPORT[ ]*\([$(AN)]*\).*$$|$(SYMBOL_PREFIX)\1|p' \ >$@.new mv $@.new $@ libpng.vers: libpng.sym diff -ru4N libpng-1.2.23/configure libpng-1.2.24rc01/configure --- libpng-1.2.23/configure 2007-11-06 10:09:11.825825000 -0600 +++ libpng-1.2.24rc01/configure 2007-12-07 18:10:22.163518000 -0600 @@ -878,8 +878,9 @@ LIBPNG_DEFINES LIBPNG_NO_MMX HAVE_LD_VERSION_SCRIPT_TRUE HAVE_LD_VERSION_SCRIPT_FALSE +SYMBOL_PREFIX PNGLIB_VERSION PNGLIB_MAJOR PNGLIB_MINOR PNGLIB_RELEASE @@ -20788,8 +20789,20 @@ HAVE_LD_VERSION_SCRIPT_FALSE= fi +if test "$have_ld_version_script" = "yes"; then + { echo "$as_me:$LINENO: checking for symbol prefix" >&5 +echo $ECHO_N "checking for symbol prefix... $ECHO_C" >&6; } + SYMBOL_PREFIX=`echo "PREFIX=__USER_LABEL_PREFIX__" \ + | ${CPP-${CC-gcc} -E} - 2>&1 \ + | ${EGREP-grep} "^PREFIX=" \ + | ${SED-sed} "s:^PREFIX=::"` + + { echo "$as_me:$LINENO: result: $SYMBOL_PREFIX" >&5 +echo "${ECHO_T}$SYMBOL_PREFIX" >&6; } +fi + # Substitutions for .in files @@ -21665,8 +21678,9 @@ LIBPNG_DEFINES!$LIBPNG_DEFINES$ac_delim LIBPNG_NO_MMX!$LIBPNG_NO_MMX$ac_delim HAVE_LD_VERSION_SCRIPT_TRUE!$HAVE_LD_VERSION_SCRIPT_TRUE$ac_delim HAVE_LD_VERSION_SCRIPT_FALSE!$HAVE_LD_VERSION_SCRIPT_FALSE$ac_delim +SYMBOL_PREFIX!$SYMBOL_PREFIX$ac_delim PNGLIB_VERSION!$PNGLIB_VERSION$ac_delim PNGLIB_MAJOR!$PNGLIB_MAJOR$ac_delim PNGLIB_MINOR!$PNGLIB_MINOR$ac_delim PNGLIB_RELEASE!$PNGLIB_RELEASE$ac_delim @@ -21675,9 +21689,9 @@ compatlib!$compatlib$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 21; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 22; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} diff -ru4N libpng-1.2.23/configure.ac libpng-1.2.24rc01/configure.ac --- libpng-1.2.23/configure.ac 2007-11-06 10:09:11.693438000 -0600 +++ libpng-1.2.24rc01/configure.ac 2007-12-07 18:10:21.719856000 -0600 @@ -83,8 +83,18 @@ AC_MSG_WARN(*** You have not enabled versioned symbols.) fi AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$have_ld_version_script" = "yes") +if test "$have_ld_version_script" = "yes"; then + AC_MSG_CHECKING([for symbol prefix]) + SYMBOL_PREFIX=`echo "PREFIX=__USER_LABEL_PREFIX__" \ + | ${CPP-${CC-gcc} -E} - 2>&1 \ + | ${EGREP-grep} "^PREFIX=" \ + | ${SED-sed} "s:^PREFIX=::"` + AC_SUBST(SYMBOL_PREFIX) + AC_MSG_RESULT($SYMBOL_PREFIX) +fi + # Substitutions for .in files AC_SUBST(PNGLIB_VERSION) AC_SUBST(PNGLIB_MAJOR) AC_SUBST(PNGLIB_MINOR) Binary files libpng-1.2.23/contrib/gregbook/toucan.png and libpng-1.2.24rc01/contrib/gregbook/toucan.png differ diff -ru4N libpng-1.2.23/contrib/pngminim/decoder/gather.sh libpng-1.2.24rc01/contrib/pngminim/decoder/gather.sh --- libpng-1.2.23/contrib/pngminim/decoder/gather.sh 2007-07-14 08:49:53.670395000 -0500 +++ libpng-1.2.24rc01/contrib/pngminim/decoder/gather.sh 2007-12-07 12:22:01.112648000 -0600 @@ -1,8 +1,8 @@ cp ../../pngminus/png2pnm.c pngm2pnm.c cp ../../../*.h . cp ../../../*.c . -rm example.c pnggccrd.c pngvcrd.c pngtest.c +rm example.c pnggccrd.c pngvcrd.c pngtest.c pngpread.c # change the following 2 lines if zlib is somewhere else cp ../../../../zlib/*.h . cp ../../../../zlib/*.c . -rm minigzip.c example.c compress.c deflate.c +rm minigzip.c example.c compress.c deflate.c diff -ru4N libpng-1.2.23/contrib/pngminim/decoder/makefile.std libpng-1.2.24rc01/contrib/pngminim/decoder/makefile.std --- libpng-1.2.23/contrib/pngminim/decoder/makefile.std 2007-07-14 14:42:42.677566000 -0500 +++ libpng-1.2.24rc01/contrib/pngminim/decoder/makefile.std 2007-12-07 18:08:31.409281000 -0600 @@ -19,9 +19,9 @@ infback$(O) inffast$(O) inflate$(O) inftrees$(O) \ trees$(O) uncompr$(O) zutil$(O) OBJS = pngm2pnm$(O) png$(O) pngerror$(O) pngget$(O) pngmem$(O) \ - pngpread$(O) pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) \ + pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) \ pngset$(O) pngtrans$(O) $(ZOBJS) # implicit make rules ------------------------------------------------------- diff -ru4N libpng-1.2.23/contrib/pngminim/encoder/gather.sh libpng-1.2.24rc01/contrib/pngminim/encoder/gather.sh --- libpng-1.2.23/contrib/pngminim/encoder/gather.sh 2007-07-14 13:28:14.666422000 -0500 +++ libpng-1.2.24rc01/contrib/pngminim/encoder/gather.sh 2007-12-07 12:22:16.646689000 -0600 @@ -1,8 +1,8 @@ cp ../../pngminus/pnm2png.c pnm2pngm.c cp ../../../*.h . cp ../../../*.c . -rm example.c pnggccrd.c pngvcrd.c pngtest.c +rm example.c pnggccrd.c pngvcrd.c pngtest.c pngr*.c # Change the next 2 lines if zlib is somewhere else. cp ../../../../zlib/*.h . cp ../../../../zlib/*.c . rm inf*.[ch] diff -ru4N libpng-1.2.23/contrib/pngminim/encoder/makefile.std libpng-1.2.24rc01/contrib/pngminim/encoder/makefile.std --- libpng-1.2.23/contrib/pngminim/encoder/makefile.std 2007-07-14 14:42:46.994361000 -0500 +++ libpng-1.2.24rc01/contrib/pngminim/encoder/makefile.std 2007-12-07 18:08:44.231676000 -0600 @@ -18,9 +18,8 @@ dummy_inflate$(O) \ trees$(O) uncompr$(O) zutil$(O) OBJS = pnm2pngm$(O) png$(O) pngerror$(O) pngget$(O) pngmem$(O) \ - pngpread$(O) pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) \ pngset$(O) pngtrans$(O) pngwio$(O) pngwrite$(O) \ pngwtran$(O) pngwutil$(O) $(ZOBJS) # implicit make rules ------------------------------------------------------- diff -ru4N libpng-1.2.23/png.h libpng-1.2.24rc01/png.h --- libpng-1.2.23/png.h 2007-11-06 10:08:40.792493000 -0600 +++ libpng-1.2.24rc01/png.h 2007-12-07 18:10:03.180279000 -0600 @@ -171,8 +171,10 @@ * 1.2.22 13 10222 12.so.0.22[.0] * 1.2.23beta01-05 13 10223 12.so.0.23[.0] * 1.2.23rc01 13 10223 12.so.0.23[.0] * 1.2.23 13 10223 12.so.0.23[.0] + * 1.2.24beta01-02 13 10224 12.so.0.24[.0] + * 1.2.24rc01 13 10224 12.so.0.24[.0] * * Henceforth the source version will match the shared-library major * and minor numbers; the shared-library major version number will be * used for changes in backward compatibility, as it is intended. The @@ -1183,12 +1185,14 @@ png_uint_32 iwidth; /* width of current interlaced row in pixels */ png_uint_32 row_number; /* current row in interlace pass */ png_bytep prev_row; /* buffer to save previous (unfiltered) row */ png_bytep row_buf; /* buffer to save current (unfiltered) row */ +#ifndef PNG_NO_WRITE_FILTERING png_bytep sub_row; /* buffer to save "sub" row when filtering */ png_bytep up_row; /* buffer to save "up" row when filtering */ png_bytep avg_row; /* buffer to save "avg" row when filtering */ png_bytep paeth_row; /* buffer to save "Paeth" row when filtering */ +#endif png_row_info row_info; /* used for transformation routines */ png_uint_32 idat_size; /* current IDAT size for read */ png_uint_32 crc; /* current chunk CRC value */ diff -ru4N libpng-1.2.23/pngerror.c libpng-1.2.24rc01/pngerror.c --- libpng-1.2.23/pngerror.c 2007-11-06 10:08:40.889594000 -0600 +++ libpng-1.2.24rc01/pngerror.c 2007-12-07 18:10:03.369306000 -0600 @@ -1,8 +1,8 @@ /* pngerror.c - stub functions for i/o and memory allocation * - * Last changed in libpng 1.2.22 [%DATE%] + * Last changed in libpng 1.2.22 [October 13, 2007] * For conditions of distribution and use, see copyright notice in png.h * Copyright (c) 1998-2007 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) diff -ru4N libpng-1.2.23/pngpread.c libpng-1.2.24rc01/pngpread.c --- libpng-1.2.23/pngpread.c 2007-11-06 10:08:40.977490000 -0600 +++ libpng-1.2.24rc01/pngpread.c 2007-12-07 18:10:03.518859000 -0600 @@ -1,8 +1,8 @@ /* pngpread.c - read a png file in push mode * - * Last changed in libpng 1.2.22 [%DATE%] + * Last changed in libpng 1.2.23 [November 6, 2007] * For conditions of distribution and use, see copyright notice in png.h * Copyright (c) 1998-2007 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) diff -ru4N libpng-1.2.23/pngread.c libpng-1.2.24rc01/pngread.c --- libpng-1.2.23/pngread.c 2007-11-06 10:08:41.001603000 -0600 +++ libpng-1.2.24rc01/pngread.c 2007-12-07 18:10:03.578368000 -0600 @@ -1,8 +1,8 @@ /* pngread.c - read a PNG file * - * Last changed in libpng 1.2.20 September 7, 2007 + * Last changed in libpng 1.2.24 %DATE% * For conditions of distribution and use, see copyright notice in png.h * Copyright (c) 1998-2007 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) @@ -1098,27 +1098,28 @@ { png_structp png_ptr = NULL; png_infop info_ptr = NULL, end_info_ptr = NULL; #ifdef PNG_USER_MEM_SUPPORTED - png_free_ptr free_fn; - png_voidp mem_ptr; + png_free_ptr free_fn = NULL; + png_voidp mem_ptr = NULL; #endif png_debug(1, "in png_destroy_read_struct\n"); if (png_ptr_ptr != NULL) + { png_ptr = *png_ptr_ptr; +#ifdef PNG_USER_MEM_SUPPORTED + free_fn = png_ptr->free_fn; + mem_ptr = png_ptr->mem_ptr; +#endif + } if (info_ptr_ptr != NULL) info_ptr = *info_ptr_ptr; if (end_info_ptr_ptr != NULL) end_info_ptr = *end_info_ptr_ptr; -#ifdef PNG_USER_MEM_SUPPORTED - free_fn = png_ptr->free_fn; - mem_ptr = png_ptr->mem_ptr; -#endif - png_read_destroy(png_ptr, info_ptr, end_info_ptr); if (info_ptr != NULL) { diff -ru4N libpng-1.2.23/pngrtran.c libpng-1.2.24rc01/pngrtran.c --- libpng-1.2.23/pngrtran.c 2007-11-06 10:08:41.105903000 -0600 +++ libpng-1.2.24rc01/pngrtran.c 2007-12-07 18:10:03.754612000 -0600 @@ -1,8 +1,8 @@ /* pngrtran.c - transforms the data in a row for PNG readers * - * Last changed in libpng 1.2.22 [%DATE%] + * Last changed in libpng 1.2.22 [October 13, 2007] * For conditions of distribution and use, see copyright notice in png.h * Copyright (c) 1998-2007 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) diff -ru4N libpng-1.2.23/pngrutil.c libpng-1.2.24rc01/pngrutil.c --- libpng-1.2.23/pngrutil.c 2007-11-06 10:08:41.137953000 -0600 +++ libpng-1.2.24rc01/pngrutil.c 2007-12-07 18:10:03.884338000 -0600 @@ -1,8 +1,8 @@ /* pngrutil.c - utilities to read a PNG file * - * Last changed in libpng 1.2.22 [%DATE%] + * Last changed in libpng 1.2.23 [November 6, 2007] * For conditions of distribution and use, see copyright notice in png.h * Copyright (c) 1998-2007 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) diff -ru4N libpng-1.2.23/pngset.c libpng-1.2.24rc01/pngset.c --- libpng-1.2.23/pngset.c 2007-11-06 10:08:41.162136000 -0600 +++ libpng-1.2.24rc01/pngset.c 2007-12-07 18:10:03.934481000 -0600 @@ -1,8 +1,8 @@ /* pngset.c - storage of image information into info struct * - * Last changed in libpng 1.2.22 [%DATE%] + * Last changed in libpng 1.2.24 [%DATE%] * For conditions of distribution and use, see copyright notice in png.h * Copyright (c) 1998-2007 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) @@ -114,27 +114,16 @@ png_warning(png_ptr, "Ignoring attempt to set negative chromaticity value"); return; } -#ifdef PNG_FLOATING_POINT_SUPPORTED - if (white_x > (double) PNG_UINT_31_MAX || - white_y > (double) PNG_UINT_31_MAX || - red_x > (double) PNG_UINT_31_MAX || - red_y > (double) PNG_UINT_31_MAX || - green_x > (double) PNG_UINT_31_MAX || - green_y > (double) PNG_UINT_31_MAX || - blue_x > (double) PNG_UINT_31_MAX || - blue_y > (double) PNG_UINT_31_MAX) -#else - if (white_x > (png_fixed_point) PNG_UINT_31_MAX/100000L || - white_y > (png_fixed_point) PNG_UINT_31_MAX/100000L || - red_x > (png_fixed_point) PNG_UINT_31_MAX/100000L || - red_y > (png_fixed_point) PNG_UINT_31_MAX/100000L || - green_x > (png_fixed_point) PNG_UINT_31_MAX/100000L || - green_y > (png_fixed_point) PNG_UINT_31_MAX/100000L || - blue_x > (png_fixed_point) PNG_UINT_31_MAX/100000L || - blue_y > (png_fixed_point) PNG_UINT_31_MAX/100000L) -#endif + if (white_x > (png_fixed_point) PNG_UINT_31_MAX || + white_y > (png_fixed_point) PNG_UINT_31_MAX || + red_x > (png_fixed_point) PNG_UINT_31_MAX || + red_y > (png_fixed_point) PNG_UINT_31_MAX || + green_x > (png_fixed_point) PNG_UINT_31_MAX || + green_y > (png_fixed_point) PNG_UINT_31_MAX || + blue_x > (png_fixed_point) PNG_UINT_31_MAX || + blue_y > (png_fixed_point) PNG_UINT_31_MAX ) { png_warning(png_ptr, "Ignoring attempt to set chromaticity value exceeding 21474.83"); return; @@ -994,22 +983,20 @@ { png_warning(png_ptr, "Out of memory while processing sPLT chunk"); } - /* TODO: use png_malloc_warn */ png_memcpy(to->name, from->name, length); to->entries = (png_sPLT_entryp)png_malloc_warn(png_ptr, from->nentries * png_sizeof(png_sPLT_entry)); - /* TODO: use png_malloc_warn */ - png_memcpy(to->entries, from->entries, - from->nentries * png_sizeof(png_sPLT_entry)); if (to->entries == NULL) { png_warning(png_ptr, "Out of memory while processing sPLT chunk"); png_free(png_ptr,to->name); to->name = NULL; } + png_memcpy(to->entries, from->entries, + from->nentries * png_sizeof(png_sPLT_entry)); to->nentries = from->nentries; to->depth = from->depth; } diff -ru4N libpng-1.2.23/pngtest.c libpng-1.2.24rc01/pngtest.c --- libpng-1.2.23/pngtest.c 2007-11-06 10:08:41.187060000 -0600 +++ libpng-1.2.24rc01/pngtest.c 2007-12-07 18:10:03.996972000 -0600 @@ -1,10 +1,10 @@ /* pngtest.c - a simple test program to test libpng * - * Last changed in libpng 1.2.22 - [%DATE%] + * Last changed in libpng 1.2.23 - [November 6, 2007] * For conditions of distribution and use, see copyright notice in png.h - * Copyright (c) 1998-2004 Glenn Randers-Pehrson + * Copyright (c) 1998-2007 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * * This program reads in a PNG image, writes it out again, and then diff -ru4N libpng-1.2.23/pngwrite.c libpng-1.2.24rc01/pngwrite.c --- libpng-1.2.23/pngwrite.c 2007-11-06 10:08:41.270955000 -0600 +++ libpng-1.2.24rc01/pngwrite.c 2007-12-07 18:10:04.129589000 -0600 @@ -1,8 +1,8 @@ /* pngwrite.c - general routines to write a PNG file * - * Last changed in libpng 1.2.15 January 5, 2007 + * Last changed in libpng 1.2.24 %DATE% * For conditions of distribution and use, see copyright notice in png.h * Copyright (c) 1998-2007 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) @@ -1059,13 +1059,15 @@ /* free our memory. png_free checks NULL for us. */ png_free(png_ptr, png_ptr->zbuf); png_free(png_ptr, png_ptr->row_buf); +#ifndef PNG_NO_WRITE_FILTERING png_free(png_ptr, png_ptr->prev_row); png_free(png_ptr, png_ptr->sub_row); png_free(png_ptr, png_ptr->up_row); png_free(png_ptr, png_ptr->avg_row); png_free(png_ptr, png_ptr->paeth_row); +#endif #if defined(PNG_TIME_RFC1123_SUPPORTED) png_free(png_ptr, png_ptr->time_buffer); #endif