diff -ru4NwbB libpng-1.4.0/Makefile.am libpng-1.4.1beta08/Makefile.am --- libpng-1.4.0/Makefile.am 2010-01-02 23:05:43.198938331 -0600 +++ libpng-1.4.1beta08/Makefile.am 2010-02-06 19:46:27.431170524 -0600 @@ -1,13 +1,7 @@ # Makefile.am: # Source file for Makefile.in (and hence Makefile) # -# Makefile.am need only be changed on a major version number -# change (e.g. libpng12 --> libpng13). In that case seach -# this file for every instance of the old base name (libpng12) -# and change to the new one (libpng13), then change the -# -version-number settings below so that the new values have -# the correct major part (first field). PNGLIB_BASENAME= libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@ # libpng does not follow GNU file name conventions @@ -15,43 +9,42 @@ # test programs - run on make check, make distcheck check_PROGRAMS= pngtest pngtest_SOURCES = pngtest.c -pngtest_LDADD = libpng14.la +pngtest_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la TESTS = test-pngtest.sh TESTS_ENVIRONMENT= srcdir=$(srcdir) # man pages dist_man_MANS= libpng.3 libpngpf.3 png.5 # generate the -config scripts if required -binconfigs= libpng14-config -EXTRA_SCRIPTS= libpng-config libpng14-config +binconfigs= libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@-config +EXTRA_SCRIPTS= libpng-config libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@-config bin_SCRIPTS= @binconfigs@ # rules to build libpng, only build the old library on request -lib_LTLIBRARIES=libpng14.la -EXTRA_LTLIBRARIES= libpng.la -libpng14_la_SOURCES = png.c pngset.c pngget.c pngrutil.c \ +lib_LTLIBRARIES=libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la +# EXTRA_LTLIBRARIES= libpng.la +libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES = png.c pngset.c pngget.c pngrutil.c \ pngtrans.c pngwutil.c \ pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \ pngwtran.c pngmem.c pngerror.c pngpread.c \ png.h pngconf.h pngpriv.h -libpng14_la_CPPFLAGS = @LIBPNG_DEFINES@ +libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_CPPFLAGS = @LIBPNG_DEFINES@ -# MAJOR UPGRADE: the version-number settings below must be changed. -libpng14_la_LDFLAGS = -no-undefined -export-dynamic \ - -version-number 14:@PNGLIB_RELEASE@:0 +libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LDFLAGS = -no-undefined -export-dynamic \ + -version-number @PNGLIB_MAJOR@@PNGLIB_MINOR@:@PNGLIB_RELEASE@:0 if HAVE_LD_VERSION_SCRIPT # Versioned symbols and restricted exports - libpng14_la_LDFLAGS += -Wl,--version-script=libpng.vers - libpng14_la_DEPENDENCIES = libpng.vers + libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LDFLAGS += -Wl,--version-script=libpng.vers + libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES = libpng.vers else # Only restricted exports when possible - libpng14_la_LDFLAGS += -export-symbols libpng.sym - libpng14_la_DEPENDENCIES = libpng.sym + libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LDFLAGS += -export-symbols libpng.sym + libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES = libpng.sym endif # Avoid depending upon Character Ranges. AN = '_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789' @@ -62,13 +55,13 @@ # pkg-config stuff, note that libpng.pc is always required in order # to get the correct library pkgconfigdir = @pkgconfigdir@ -pkgconfig_DATA = libpng14.pc +pkgconfig_DATA = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.pc #extra source distribution files. EXTRA_DIST= \ - ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO \ + ANNOUNCE CHANGES INSTALL LICENSE README TODO \ pngtest.png pngbar.png pngnow.png pngbar.jpg autogen.sh \ ${srcdir}/projects/cbuilder5/* \ ${srcdir}/projects/visualc6/* \ ${srcdir}/projects/visualc71/* \ @@ -81,9 +74,9 @@ ${srcdir}/contrib/visupng/* \ $(TESTS) \ example.c libpng-1.4.1beta08.txt -CLEANFILES= pngout.png libpng14.pc libpng14-config libpng.vers \ +CLEANFILES= pngout.png libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.pc libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@-config libpng.vers \ libpng.sym MAINTAINERCLEANFILES = Makefile.in aclocal.m4 config.guess config.h.in \ config.sub configure depcomp install-sh ltmain.sh missing @@ -120,15 +113,15 @@ pngconf.h cd $(DESTDIR)$(pkgconfigdir); rm -f libpng.pc cd $(DESTDIR)$(pkgconfigdir); $(LN_S) $(PNGLIB_BASENAME).pc libpng.pc -# do evil things to libpng to cause libpng14 to be used +# do evil things to libpng to cause libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@ to be used install-exec-hook: cd $(DESTDIR)$(bindir); rm -f libpng-config cd $(DESTDIR)$(bindir); $(LN_S) $(PNGLIB_BASENAME)-config libpng-config @set -x;\ cd $(DESTDIR)$(libdir);\ - for ext in a la so sl dylib; do\ + for ext in a la so so.@PNGLIB_MAJOR@@PNGLIB_MINOR@.@PNGLIB_RELEASE@ sl dylib; do\ rm -f libpng.$$ext;\ if test -f $(PNGLIB_BASENAME).$$ext; then\ $(LN_S) $(PNGLIB_BASENAME).$$ext libpng.$$ext;\ fi;\ diff -ru4NwbB libpng-1.4.0/configure.ac libpng-1.4.1beta08/configure.ac --- libpng-1.4.0/configure.ac 2010-01-02 23:05:43.205506090 -0600 +++ libpng-1.4.1beta08/configure.ac 2010-02-06 19:46:27.437703168 -0600 @@ -23,9 +23,9 @@ dnl stop configure from automagically running automake AM_MAINTAINER_MODE PNGLIB_VERSION=1.4.1beta08 -PNGLIB_MAJOR=1 +PNGLIB_MAJOR=%RELEASE% PNGLIB_MINOR=4 PNGLIB_RELEASE=%RELEASE% dnl End of version number stuff diff -ru4NwbB libpng-1.4.0/contrib/pngminim/decoder/pngusr.h libpng-1.4.1beta08/contrib/pngminim/decoder/pngusr.h --- libpng-1.4.0/contrib/pngminim/decoder/pngusr.h 2010-01-02 23:05:37.354267767 -0600 +++ libpng-1.4.1beta08/contrib/pngminim/decoder/pngusr.h 2010-02-06 19:46:21.886610629 -0600 @@ -68,6 +68,8 @@ #define PNG_NO_ZALLOC_ZERO #define PNG_NO_ERROR_NUMBERS #define PNG_NO_EASY_ACCESS #define PNG_NO_PROGRESSIVE_READ +#define PNG_NO_USER_LIMITS +#define PNG_NO_SET_USER_LIMITS #endif /* MINRDPNGCONF_H */ diff -ru4NwbB libpng-1.4.0/contrib/pngminim/encoder/pngusr.h libpng-1.4.1beta08/contrib/pngminim/encoder/pngusr.h --- libpng-1.4.0/contrib/pngminim/encoder/pngusr.h 2010-01-02 23:05:37.396982261 -0600 +++ libpng-1.4.1beta08/contrib/pngminim/encoder/pngusr.h 2010-02-06 19:46:21.929460676 -0600 @@ -66,6 +66,8 @@ #define PNG_NO_CONSOLE_IO #define PNG_NO_ZALLOC_ZERO #define PNG_NO_ERROR_NUMBERS #define PNG_NO_EASY_ACCESS +#define PNG_NO_USER_LIMITS +#define PNG_NO_SET_USER_LIMITS #endif /* MINWRPNGCONF_H */ diff -ru4NwbB libpng-1.4.0/contrib/pngminim/preader/pngusr.h libpng-1.4.1beta08/contrib/pngminim/preader/pngusr.h --- libpng-1.4.0/contrib/pngminim/preader/pngusr.h 2010-01-02 23:05:37.434084192 -0600 +++ libpng-1.4.1beta08/contrib/pngminim/preader/pngusr.h 2010-02-06 19:46:21.963668450 -0600 @@ -58,6 +58,8 @@ #define PNG_NO_CONSOLE_IO #define PNG_NO_ZALLOC_ZERO #define PNG_NO_ERROR_NUMBERS #define PNG_NO_EASY_ACCESS +#define PNG_NO_USER_LIMITS +#define PNG_NO_SET_USER_LIMITS #endif /* MINPRDPNGCONF_H */ diff -ru4NwbB libpng-1.4.0/example.c libpng-1.4.1beta08/example.c --- libpng-1.4.0/example.c 2010-01-02 23:05:36.440226864 -0600 +++ libpng-1.4.1beta08/example.c 2010-02-06 19:46:21.136505077 -0600 @@ -1,9 +1,9 @@ #if 0 /* in case someone actually tries to compile this */ /* example.c - an example of using libpng - * Last changed in libpng 1.4.0 [February 7, 2010] + * Last changed in libpng 1.4.0 [January 3, 2010] * This file has been placed in the public domain by the authors. * Maintained 1998-2010 Glenn Randers-Pehrson * Maintained 1996, 1997 Andreas Dilger) * Written 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) diff -ru4NwbB libpng-1.4.0/png.c libpng-1.4.1beta08/png.c --- libpng-1.4.0/png.c 2010-01-02 23:05:36.448004439 -0600 +++ libpng-1.4.1beta08/png.c 2010-02-06 19:46:21.143831277 -0600 @@ -1,8 +1,8 @@ /* png.c - location for general purpose libpng functions * - * Last changed in libpng 1.4.0 [February 7, 2010] + * Last changed in libpng 1.4.1 [February 7, 2010] * Copyright (c) 1998-2010 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 -ru4NwbB libpng-1.4.0/png.h libpng-1.4.1beta08/png.h --- libpng-1.4.0/png.h 2010-01-02 23:05:36.416098186 -0600 +++ libpng-1.4.1beta08/png.h 2010-02-06 19:46:21.112979041 -0600 @@ -133,8 +133,11 @@ * 1.4.0rc01 14 10400 14.so.14.0[.0] * 1.4.0beta88-109 14 10400 14.so.14.0[.0] * 1.4.0rc02-08 14 10400 14.so.14.0[.0] * 1.4.0 14 10400 14.so.14.0[.0] + * 1.4.1beta01-03 14 10401 14.so.14.1[.0] + * 1.4.1rc01 14 10401 14.so.14.1[.0] + * 1.4.1beta04-08 14 10401 14.so.14.1[.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 @@ -378,9 +381,9 @@ * Versions 0.7 through 1.0.0 were in the range 0 to 100 here (only * version 1.0.0 was mis-numbered 100 instead of 10000). From * version 1.0.1 it's xxyyzz, where x=major, y=minor, z=release */ -#define PNG_LIBPNG_VER 10400 /* 1.4.0 */ +#define PNG_LIBPNG_VER %VER_NUM% /* %MAJOR%.%MINOR%.%RELEASE% */ #ifndef PNG_VERSION_INFO_ONLY /* Include the compression library's header */ #include "zlib.h" @@ -630,25 +633,38 @@ { /* the following are necessary for every PNG file */ png_uint_32 width PNG_DEPSTRUCT; /* width of image in pixels (from IHDR) */ png_uint_32 height PNG_DEPSTRUCT; /* height of image in pixels (from IHDR) */ - png_uint_32 valid PNG_DEPSTRUCT; /* valid chunk data (see PNG_INFO_ below) */ - png_size_t rowbytes PNG_DEPSTRUCT; /* bytes needed to hold an untransformed row */ - png_colorp palette PNG_DEPSTRUCT; /* array of color values (valid & PNG_INFO_PLTE) */ - png_uint_16 num_palette PNG_DEPSTRUCT; /* number of color entries in "palette" (PLTE) */ - png_uint_16 num_trans PNG_DEPSTRUCT; /* number of transparent palette color (tRNS) */ - png_byte bit_depth PNG_DEPSTRUCT; /* 1, 2, 4, 8, or 16 bits/channel (from IHDR) */ - png_byte color_type PNG_DEPSTRUCT; /* see PNG_COLOR_TYPE_ below (from IHDR) */ + png_uint_32 valid PNG_DEPSTRUCT; /* valid chunk data (see PNG_INFO_ + below) */ + png_size_t rowbytes PNG_DEPSTRUCT; /* bytes needed to hold an untransformed + row */ + png_colorp palette PNG_DEPSTRUCT; /* array of color values + (valid & PNG_INFO_PLTE) */ + png_uint_16 num_palette PNG_DEPSTRUCT; /* number of color entries in + "palette" (PLTE) */ + png_uint_16 num_trans PNG_DEPSTRUCT; /* number of transparent palette + color (tRNS) */ + png_byte bit_depth PNG_DEPSTRUCT; /* 1, 2, 4, 8, or 16 bits/channel + (from IHDR) */ + png_byte color_type PNG_DEPSTRUCT; /* see PNG_COLOR_TYPE_ below + (from IHDR) */ /* The following three should have been named *_method not *_type */ - png_byte compression_type PNG_DEPSTRUCT; /* must be PNG_COMPRESSION_TYPE_BASE (IHDR) */ - png_byte filter_type PNG_DEPSTRUCT; /* must be PNG_FILTER_TYPE_BASE (from IHDR) */ - png_byte interlace_type PNG_DEPSTRUCT; /* One of PNG_INTERLACE_NONE, PNG_INTERLACE_ADAM7 */ + png_byte compression_type PNG_DEPSTRUCT; /* must be + PNG_COMPRESSION_TYPE_BASE (IHDR) */ + png_byte filter_type PNG_DEPSTRUCT; /* must be PNG_FILTER_TYPE_BASE + (from IHDR) */ + png_byte interlace_type PNG_DEPSTRUCT; /* One of PNG_INTERLACE_NONE, + PNG_INTERLACE_ADAM7 */ /* The following is informational only on read, and not used on writes. */ - png_byte channels PNG_DEPSTRUCT; /* number of data channels per pixel (1, 2, 3, 4) */ + png_byte channels PNG_DEPSTRUCT; /* number of data channels per + pixel (1, 2, 3, 4) */ png_byte pixel_depth PNG_DEPSTRUCT; /* number of bits per pixel */ - png_byte spare_byte PNG_DEPSTRUCT; /* to align the data, and for future use */ - png_byte signature[8] PNG_DEPSTRUCT; /* magic bytes read by libpng from start of file */ + png_byte spare_byte PNG_DEPSTRUCT; /* to align the data, and for + future use */ + png_byte signature[8] PNG_DEPSTRUCT; /* magic bytes read by libpng + from start of file */ /* The rest of the data is optional. If you are reading, check the * valid field to see if the information in these are valid. If you * are writing, set the valid field to those chunks you want written, @@ -659,15 +675,17 @@ /* The gAMA chunk describes the gamma characteristics of the system * on which the image was created, normally in the range [1.0, 2.5]. * Data is valid if (valid & PNG_INFO_gAMA) is non-zero. */ - float gamma PNG_DEPSTRUCT; /* gamma value of image, if (valid & PNG_INFO_gAMA) */ + float gamma PNG_DEPSTRUCT; /* gamma value of image, + if (valid & PNG_INFO_gAMA) */ #endif #ifdef PNG_sRGB_SUPPORTED /* GR-P, 0.96a */ /* Data valid if (valid & PNG_INFO_sRGB) non-zero. */ - png_byte srgb_intent PNG_DEPSTRUCT; /* sRGB rendering intent [0, 1, 2, or 3] */ + png_byte srgb_intent PNG_DEPSTRUCT; /* sRGB rendering intent + [0, 1, 2, or 3] */ #endif #ifdef PNG_TEXT_SUPPORTED /* The tEXt, and zTXt chunks contain human-readable textual data in @@ -710,10 +728,12 @@ * to fully opaque, respectively. For non-paletted images, there is a * single color specified that should be treated as fully transparent. * Data is valid if (valid & PNG_INFO_tRNS) is non-zero. */ - png_bytep trans_alpha PNG_DEPSTRUCT; /* alpha values for paletted image */ - png_color_16 trans_color PNG_DEPSTRUCT; /* transparent color for non-palette image */ + png_bytep trans_alpha PNG_DEPSTRUCT; /* alpha values for paletted + image */ + png_color_16 trans_color PNG_DEPSTRUCT; /* transparent color for + non-palette image */ #endif #if defined(PNG_bKGD_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) /* The bKGD chunk gives the suggested image background color if the @@ -742,9 +762,10 @@ * defines below). Data is valid if (valid & PNG_INFO_pHYs) is non-zero. */ png_uint_32 x_pixels_per_unit PNG_DEPSTRUCT; /* horizontal pixel density */ png_uint_32 y_pixels_per_unit PNG_DEPSTRUCT; /* vertical pixel density */ - png_byte phys_unit_type PNG_DEPSTRUCT; /* resolution type (see PNG_RESOLUTION_ below) */ + png_byte phys_unit_type PNG_DEPSTRUCT; /* resolution type (see + PNG_RESOLUTION_ below) */ #endif #ifdef PNG_hIST_SUPPORTED /* The hIST chunk contains the relative frequency or importance of the @@ -789,16 +810,21 @@ */ png_charp pcal_purpose PNG_DEPSTRUCT; /* pCAL chunk description string */ png_int_32 pcal_X0 PNG_DEPSTRUCT; /* minimum value */ png_int_32 pcal_X1 PNG_DEPSTRUCT; /* maximum value */ - png_charp pcal_units PNG_DEPSTRUCT; /* Latin-1 string giving physical units */ - png_charpp pcal_params PNG_DEPSTRUCT; /* ASCII strings containing parameter values */ - png_byte pcal_type PNG_DEPSTRUCT; /* equation type (see PNG_EQUATION_ below) */ - png_byte pcal_nparams PNG_DEPSTRUCT; /* number of parameters given in pcal_params */ + png_charp pcal_units PNG_DEPSTRUCT; /* Latin-1 string giving physical + units */ + png_charpp pcal_params PNG_DEPSTRUCT; /* ASCII strings containing + parameter values */ + png_byte pcal_type PNG_DEPSTRUCT; /* equation type + (see PNG_EQUATION_ below) */ + png_byte pcal_nparams PNG_DEPSTRUCT; /* number of parameters given + in pcal_params */ #endif /* New members added in libpng-1.0.6 */ - png_uint_32 free_me PNG_DEPSTRUCT; /* flags items libpng is responsible for freeing */ + png_uint_32 free_me PNG_DEPSTRUCT; /* flags items libpng is + responsible for freeing */ #if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) || \ defined(PNG_HANDLE_AS_UNKNOWN_SUPPORTED) /* Storage for unknown chunks that the library doesn't recognize. */ @@ -808,9 +834,10 @@ #ifdef PNG_iCCP_SUPPORTED /* iCCP chunk data. */ png_charp iccp_name PNG_DEPSTRUCT; /* profile name */ - png_charp iccp_profile PNG_DEPSTRUCT; /* International Color Consortium profile data */ + png_charp iccp_profile PNG_DEPSTRUCT; /* International Color Consortium + profile data */ /* Note to maintainer: should be png_bytep */ png_uint_32 iccp_proflen PNG_DEPSTRUCT; /* ICC profile data length */ png_byte iccp_compression PNG_DEPSTRUCT; /* Always zero */ #endif @@ -840,15 +867,17 @@ #endif #endif #ifdef PNG_INFO_IMAGE_SUPPORTED - /* Memory has been allocated if (valid & PNG_ALLOCATED_INFO_ROWS) non-zero */ + /* Memory has been allocated if (valid & PNG_ALLOCATED_INFO_ROWS) + non-zero */ /* Data valid if (valid & PNG_INFO_IDAT) non-zero */ png_bytepp row_pointers PNG_DEPSTRUCT; /* the image bits */ #endif #if defined(PNG_FIXED_POINT_SUPPORTED) && defined(PNG_gAMA_SUPPORTED) - png_fixed_point int_gamma PNG_DEPSTRUCT; /* gamma of image, if (valid & PNG_INFO_gAMA) */ + png_fixed_point int_gamma PNG_DEPSTRUCT; /* gamma of image, + if (valid & PNG_INFO_gAMA) */ #endif #if defined(PNG_cHRM_SUPPORTED) && defined(PNG_FIXED_POINT_SUPPORTED) png_fixed_point int_x_white PNG_DEPSTRUCT; @@ -993,9 +1022,10 @@ typedef void (PNGAPI *png_write_status_ptr) PNGARG((png_structp, png_uint_32, int)); #ifdef PNG_PROGRESSIVE_READ_SUPPORTED -typedef void (PNGAPI *png_progressive_info_ptr) PNGARG((png_structp, png_infop)); +typedef void (PNGAPI *png_progressive_info_ptr) PNGARG((png_structp, + png_infop)); typedef void (PNGAPI *png_progressive_end_ptr) PNGARG((png_structp, png_infop)); typedef void (PNGAPI *png_progressive_row_ptr) PNGARG((png_structp, png_bytep, png_uint_32, int)); #endif @@ -1006,9 +1036,10 @@ png_row_infop, png_bytep)); #endif #ifdef PNG_USER_CHUNKS_SUPPORTED -typedef int (PNGAPI *png_user_chunk_ptr) PNGARG((png_structp, png_unknown_chunkp)); +typedef int (PNGAPI *png_user_chunk_ptr) PNGARG((png_structp, + png_unknown_chunkp)); #endif #ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED typedef void (PNGAPI *png_unknown_chunk_ptr) PNGARG((png_structp)); #endif @@ -1058,159 +1089,239 @@ struct png_struct_def { #ifdef PNG_SETJMP_SUPPORTED jmp_buf jmpbuf PNG_DEPSTRUCT; /* used in png_error */ - png_longjmp_ptr longjmp_fn PNG_DEPSTRUCT;/* setjmp non-local goto function. */ + png_longjmp_ptr longjmp_fn PNG_DEPSTRUCT;/* setjmp non-local goto + function. */ #endif - png_error_ptr error_fn PNG_DEPSTRUCT; /* function for printing errors and aborting */ - png_error_ptr warning_fn PNG_DEPSTRUCT; /* function for printing warnings */ - png_voidp error_ptr PNG_DEPSTRUCT; /* user supplied struct for error functions */ - png_rw_ptr write_data_fn PNG_DEPSTRUCT; /* function for writing output data */ - png_rw_ptr read_data_fn PNG_DEPSTRUCT; /* function for reading input data */ - png_voidp io_ptr PNG_DEPSTRUCT; /* ptr to application struct for I/O functions */ + png_error_ptr error_fn PNG_DEPSTRUCT; /* function for printing + errors and aborting */ + png_error_ptr warning_fn PNG_DEPSTRUCT; /* function for printing + warnings */ + png_voidp error_ptr PNG_DEPSTRUCT; /* user supplied struct for + error functions */ + png_rw_ptr write_data_fn PNG_DEPSTRUCT; /* function for writing + output data */ + png_rw_ptr read_data_fn PNG_DEPSTRUCT; /* function for reading + input data */ + png_voidp io_ptr PNG_DEPSTRUCT; /* ptr to application struct + for I/O functions */ #ifdef PNG_READ_USER_TRANSFORM_SUPPORTED - png_user_transform_ptr read_user_transform_fn PNG_DEPSTRUCT; /* user read transform */ + png_user_transform_ptr read_user_transform_fn PNG_DEPSTRUCT; /* user read + transform */ #endif #ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED - png_user_transform_ptr write_user_transform_fn PNG_DEPSTRUCT; /* user write transform */ + png_user_transform_ptr write_user_transform_fn PNG_DEPSTRUCT; /* user write + transform */ #endif /* These were added in libpng-1.0.2 */ #ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED #if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \ defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED) - png_voidp user_transform_ptr PNG_DEPSTRUCT; /* user supplied struct for user transform */ - png_byte user_transform_depth PNG_DEPSTRUCT; /* bit depth of user transformed pixels */ - png_byte user_transform_channels PNG_DEPSTRUCT; /* channels in user transformed pixels */ + png_voidp user_transform_ptr PNG_DEPSTRUCT; /* user supplied struct + for user transform */ + png_byte user_transform_depth PNG_DEPSTRUCT; /* bit depth of user + transformed pixels */ + png_byte user_transform_channels PNG_DEPSTRUCT; /* channels in user + transformed pixels */ #endif #endif - png_uint_32 mode PNG_DEPSTRUCT; /* tells us where we are in the PNG file */ - png_uint_32 flags PNG_DEPSTRUCT; /* flags indicating various things to libpng */ - png_uint_32 transformations PNG_DEPSTRUCT; /* which transformations to perform */ + png_uint_32 mode PNG_DEPSTRUCT; /* tells us where we are in + the PNG file */ + png_uint_32 flags PNG_DEPSTRUCT; /* flags indicating various + things to libpng */ + png_uint_32 transformations PNG_DEPSTRUCT; /* which transformations + to perform */ - z_stream zstream PNG_DEPSTRUCT; /* pointer to decompression structure (below) */ + z_stream zstream PNG_DEPSTRUCT; /* pointer to decompression + structure (below) */ png_bytep zbuf PNG_DEPSTRUCT; /* buffer for zlib */ png_size_t zbuf_size PNG_DEPSTRUCT; /* size of zbuf */ int zlib_level PNG_DEPSTRUCT; /* holds zlib compression level */ int zlib_method PNG_DEPSTRUCT; /* holds zlib compression method */ - int zlib_window_bits PNG_DEPSTRUCT; /* holds zlib compression window bits */ - int zlib_mem_level PNG_DEPSTRUCT; /* holds zlib compression memory level */ - int zlib_strategy PNG_DEPSTRUCT; /* holds zlib compression strategy */ + int zlib_window_bits PNG_DEPSTRUCT; /* holds zlib compression window + bits */ + int zlib_mem_level PNG_DEPSTRUCT; /* holds zlib compression memory + level */ + int zlib_strategy PNG_DEPSTRUCT; /* holds zlib compression + strategy */ png_uint_32 width PNG_DEPSTRUCT; /* width of image in pixels */ png_uint_32 height PNG_DEPSTRUCT; /* height of image in pixels */ png_uint_32 num_rows PNG_DEPSTRUCT; /* number of rows in current pass */ png_uint_32 usr_width PNG_DEPSTRUCT; /* width of row at start of write */ png_size_t rowbytes PNG_DEPSTRUCT; /* size of row in bytes */ - png_size_t irowbytes PNG_DEPSTRUCT; /* size of current interlaced row in bytes */ - png_uint_32 iwidth PNG_DEPSTRUCT; /* width of current interlaced row in pixels */ +#if 0 /* Replaced with the following in libpng-1.4.1 */ + png_size_t irowbytes PNG_DEPSTRUCT; +#endif +/* Added in libpng-1.4.1 */ +#ifdef PNG_USER_LIMITS_SUPPORTED + /* Total memory that a zTXt, sPLT, iTXt, iCCP, or unknown chunk + * can occupy when decompressed. 0 means unlimited. + * We will change the typedef from png_size_t to png_alloc_size_t + * in libpng-1.6.0 + */ + png_alloc_size_t user_chunk_malloc_max PNG_DEPSTRUCT; +#endif + png_uint_32 iwidth PNG_DEPSTRUCT; /* width of current interlaced + row in pixels */ png_uint_32 row_number PNG_DEPSTRUCT; /* current row in interlace pass */ - png_bytep prev_row PNG_DEPSTRUCT; /* buffer to save previous (unfiltered) row */ - png_bytep row_buf PNG_DEPSTRUCT; /* buffer to save current (unfiltered) row */ - png_bytep sub_row PNG_DEPSTRUCT; /* buffer to save "sub" row when filtering */ - png_bytep up_row PNG_DEPSTRUCT; /* buffer to save "up" row when filtering */ - png_bytep avg_row PNG_DEPSTRUCT; /* buffer to save "avg" row when filtering */ - png_bytep paeth_row PNG_DEPSTRUCT; /* buffer to save "Paeth" row when filtering */ - png_row_info row_info PNG_DEPSTRUCT; /* used for transformation routines */ + png_bytep prev_row PNG_DEPSTRUCT; /* buffer to save previous + (unfiltered) row */ + png_bytep row_buf PNG_DEPSTRUCT; /* buffer to save current + (unfiltered) row */ + png_bytep sub_row PNG_DEPSTRUCT; /* buffer to save "sub" row + when filtering */ + png_bytep up_row PNG_DEPSTRUCT; /* buffer to save "up" row + when filtering */ + png_bytep avg_row PNG_DEPSTRUCT; /* buffer to save "avg" row + when filtering */ + png_bytep paeth_row PNG_DEPSTRUCT; /* buffer to save "Paeth" row + when filtering */ + png_row_info row_info PNG_DEPSTRUCT; /* used for transformation + routines */ png_uint_32 idat_size PNG_DEPSTRUCT; /* current IDAT size for read */ png_uint_32 crc PNG_DEPSTRUCT; /* current chunk CRC value */ png_colorp palette PNG_DEPSTRUCT; /* palette from the input file */ - png_uint_16 num_palette PNG_DEPSTRUCT; /* number of color entries in palette */ + png_uint_16 num_palette PNG_DEPSTRUCT; /* number of color entries in + palette */ png_uint_16 num_trans PNG_DEPSTRUCT; /* number of transparency values */ - png_byte chunk_name[5] PNG_DEPSTRUCT; /* null-terminated name of current chunk */ - png_byte compression PNG_DEPSTRUCT; /* file compression type (always 0) */ + png_byte chunk_name[5] PNG_DEPSTRUCT; /* null-terminated name of current + chunk */ + png_byte compression PNG_DEPSTRUCT; /* file compression type + (always 0) */ png_byte filter PNG_DEPSTRUCT; /* file filter type (always 0) */ - png_byte interlaced PNG_DEPSTRUCT; /* PNG_INTERLACE_NONE, PNG_INTERLACE_ADAM7 */ + png_byte interlaced PNG_DEPSTRUCT; /* PNG_INTERLACE_NONE, + PNG_INTERLACE_ADAM7 */ png_byte pass PNG_DEPSTRUCT; /* current interlace pass (0 - 6) */ - png_byte do_filter PNG_DEPSTRUCT; /* row filter flags (see PNG_FILTER_ below ) */ + png_byte do_filter PNG_DEPSTRUCT; /* row filter flags (see + PNG_FILTER_ below ) */ png_byte color_type PNG_DEPSTRUCT; /* color type of file */ png_byte bit_depth PNG_DEPSTRUCT; /* bit depth of file */ png_byte usr_bit_depth PNG_DEPSTRUCT; /* bit depth of users row */ png_byte pixel_depth PNG_DEPSTRUCT; /* number of bits per pixel */ png_byte channels PNG_DEPSTRUCT; /* number of channels in file */ png_byte usr_channels PNG_DEPSTRUCT; /* channels at start of write */ - png_byte sig_bytes PNG_DEPSTRUCT; /* magic bytes read/written from start of file */ + png_byte sig_bytes PNG_DEPSTRUCT; /* magic bytes read/written from + start of file */ #if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED) - png_uint_16 filler PNG_DEPSTRUCT; /* filler bytes for pixel expansion */ + png_uint_16 filler PNG_DEPSTRUCT; /* filler bytes for pixel + expansion */ #endif #ifdef PNG_bKGD_SUPPORTED png_byte background_gamma_type PNG_DEPSTRUCT; # ifdef PNG_FLOATING_POINT_SUPPORTED float background_gamma PNG_DEPSTRUCT; # endif - png_color_16 background PNG_DEPSTRUCT; /* background color in screen gamma space */ + png_color_16 background PNG_DEPSTRUCT; /* background color in + screen gamma space */ #ifdef PNG_READ_GAMMA_SUPPORTED - png_color_16 background_1 PNG_DEPSTRUCT; /* background normalized to gamma 1.0 */ + png_color_16 background_1 PNG_DEPSTRUCT; /* background normalized + to gamma 1.0 */ #endif #endif /* PNG_bKGD_SUPPORTED */ #ifdef PNG_WRITE_FLUSH_SUPPORTED - png_flush_ptr output_flush_fn PNG_DEPSTRUCT; /* Function for flushing output */ - png_uint_32 flush_dist PNG_DEPSTRUCT; /* how many rows apart to flush, 0 - no flush */ - png_uint_32 flush_rows PNG_DEPSTRUCT; /* number of rows written since last flush */ + png_flush_ptr output_flush_fn PNG_DEPSTRUCT; /* Function for flushing + output */ + png_uint_32 flush_dist PNG_DEPSTRUCT; /* how many rows apart to flush, + 0 - no flush */ + png_uint_32 flush_rows PNG_DEPSTRUCT; /* number of rows written since + last flush */ #endif #if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) - int gamma_shift PNG_DEPSTRUCT; /* number of "insignificant" bits 16-bit gamma */ + int gamma_shift PNG_DEPSTRUCT; /* number of "insignificant" bits + 16-bit gamma */ #ifdef PNG_FLOATING_POINT_SUPPORTED float gamma PNG_DEPSTRUCT; /* file gamma value */ - float screen_gamma PNG_DEPSTRUCT; /* screen gamma value (display_exponent) */ + float screen_gamma PNG_DEPSTRUCT; /* screen gamma value + (display_exponent) */ #endif #endif #if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) - png_bytep gamma_table PNG_DEPSTRUCT; /* gamma table for 8-bit depth files */ + png_bytep gamma_table PNG_DEPSTRUCT; /* gamma table for 8-bit + depth files */ png_bytep gamma_from_1 PNG_DEPSTRUCT; /* converts from 1.0 to screen */ png_bytep gamma_to_1 PNG_DEPSTRUCT; /* converts from file to 1.0 */ - png_uint_16pp gamma_16_table PNG_DEPSTRUCT; /* gamma table for 16-bit depth files */ - png_uint_16pp gamma_16_from_1 PNG_DEPSTRUCT; /* converts from 1.0 to screen */ + png_uint_16pp gamma_16_table PNG_DEPSTRUCT; /* gamma table for 16-bit + depth files */ + png_uint_16pp gamma_16_from_1 PNG_DEPSTRUCT; /* converts from 1.0 to + screen */ png_uint_16pp gamma_16_to_1 PNG_DEPSTRUCT; /* converts from file to 1.0 */ #endif #if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_sBIT_SUPPORTED) - png_color_8 sig_bit PNG_DEPSTRUCT; /* significant bits in each available channel */ + png_color_8 sig_bit PNG_DEPSTRUCT; /* significant bits in each + available channel */ #endif #if defined(PNG_READ_SHIFT_SUPPORTED) || defined(PNG_WRITE_SHIFT_SUPPORTED) - png_color_8 shift PNG_DEPSTRUCT; /* shift for significant bit tranformation */ + png_color_8 shift PNG_DEPSTRUCT; /* shift for significant bit + tranformation */ #endif #if defined(PNG_tRNS_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) \ || defined(PNG_READ_EXPAND_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) - png_bytep trans_alpha PNG_DEPSTRUCT; /* alpha values for paletted files */ - png_color_16 trans_color PNG_DEPSTRUCT; /* transparent color for non-paletted files */ + png_bytep trans_alpha PNG_DEPSTRUCT; /* alpha values for + paletted files */ + png_color_16 trans_color PNG_DEPSTRUCT; /* transparent color for + non-paletted files */ #endif - png_read_status_ptr read_row_fn PNG_DEPSTRUCT; /* called after each row is decoded */ - png_write_status_ptr write_row_fn PNG_DEPSTRUCT; /* called after each row is encoded */ + png_read_status_ptr read_row_fn PNG_DEPSTRUCT; /* called after each + row is decoded */ + png_write_status_ptr write_row_fn PNG_DEPSTRUCT; /* called after each + row is encoded */ #ifdef PNG_PROGRESSIVE_READ_SUPPORTED - png_progressive_info_ptr info_fn PNG_DEPSTRUCT; /* called after header data fully read */ - png_progressive_row_ptr row_fn PNG_DEPSTRUCT; /* called after each prog. row is decoded */ - png_progressive_end_ptr end_fn PNG_DEPSTRUCT; /* called after image is complete */ - png_bytep save_buffer_ptr PNG_DEPSTRUCT; /* current location in save_buffer */ - png_bytep save_buffer PNG_DEPSTRUCT; /* buffer for previously read data */ - png_bytep current_buffer_ptr PNG_DEPSTRUCT; /* current location in current_buffer */ - png_bytep current_buffer PNG_DEPSTRUCT; /* buffer for recently used data */ - png_uint_32 push_length PNG_DEPSTRUCT; /* size of current input chunk */ - png_uint_32 skip_length PNG_DEPSTRUCT; /* bytes to skip in input data */ - png_size_t save_buffer_size PNG_DEPSTRUCT; /* amount of data now in save_buffer */ - png_size_t save_buffer_max PNG_DEPSTRUCT; /* total size of save_buffer */ - png_size_t buffer_size PNG_DEPSTRUCT; /* total amount of available input data */ - png_size_t current_buffer_size PNG_DEPSTRUCT; /* amount of data now in current_buffer */ - int process_mode PNG_DEPSTRUCT; /* what push library is currently doing */ - int cur_palette PNG_DEPSTRUCT; /* current push library palette index */ + png_progressive_info_ptr info_fn PNG_DEPSTRUCT; /* called after header + data fully read */ + png_progressive_row_ptr row_fn PNG_DEPSTRUCT; /* called after each + prog. row is decoded */ + png_progressive_end_ptr end_fn PNG_DEPSTRUCT; /* called after image + is complete */ + png_bytep save_buffer_ptr PNG_DEPSTRUCT; /* current location in + save_buffer */ + png_bytep save_buffer PNG_DEPSTRUCT; /* buffer for previously + read data */ + png_bytep current_buffer_ptr PNG_DEPSTRUCT; /* current location in + current_buffer */ + png_bytep current_buffer PNG_DEPSTRUCT; /* buffer for recently + used data */ + png_uint_32 push_length PNG_DEPSTRUCT; /* size of current input + chunk */ + png_uint_32 skip_length PNG_DEPSTRUCT; /* bytes to skip in + input data */ + png_size_t save_buffer_size PNG_DEPSTRUCT; /* amount of data now + in save_buffer */ + png_size_t save_buffer_max PNG_DEPSTRUCT; /* total size of + save_buffer */ + png_size_t buffer_size PNG_DEPSTRUCT; /* total amount of + available input data */ + png_size_t current_buffer_size PNG_DEPSTRUCT; /* amount of data now + in current_buffer */ + int process_mode PNG_DEPSTRUCT; /* what push library + is currently doing */ + int cur_palette PNG_DEPSTRUCT; /* current push library + palette index */ # ifdef PNG_TEXT_SUPPORTED - png_size_t current_text_size PNG_DEPSTRUCT; /* current size of text input data */ - png_size_t current_text_left PNG_DEPSTRUCT; /* how much text left to read in input */ - png_charp current_text PNG_DEPSTRUCT; /* current text chunk buffer */ - png_charp current_text_ptr PNG_DEPSTRUCT; /* current location in current_text */ + png_size_t current_text_size PNG_DEPSTRUCT; /* current size of + text input data */ + png_size_t current_text_left PNG_DEPSTRUCT; /* how much text left + to read in input */ + png_charp current_text PNG_DEPSTRUCT; /* current text chunk + buffer */ + png_charp current_text_ptr PNG_DEPSTRUCT; /* current location + in current_text */ # endif /* PNG_PROGRESSIVE_READ_SUPPORTED && PNG_TEXT_SUPPORTED */ #endif /* PNG_PROGRESSIVE_READ_SUPPORTED */ @@ -1224,36 +1335,46 @@ #endif #ifdef PNG_READ_DITHER_SUPPORTED png_bytep palette_lookup PNG_DEPSTRUCT; /* lookup table for dithering */ - png_bytep dither_index PNG_DEPSTRUCT; /* index translation for palette files */ + png_bytep dither_index PNG_DEPSTRUCT; /* index translation for palette + files */ #endif #if defined(PNG_READ_DITHER_SUPPORTED) || defined(PNG_hIST_SUPPORTED) png_uint_16p hist PNG_DEPSTRUCT; /* histogram */ #endif #ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED - png_byte heuristic_method PNG_DEPSTRUCT; /* heuristic for row filter selection */ - png_byte num_prev_filters PNG_DEPSTRUCT; /* number of weights for previous rows */ - png_bytep prev_filters PNG_DEPSTRUCT; /* filter type(s) of previous row(s) */ - png_uint_16p filter_weights PNG_DEPSTRUCT; /* weight(s) for previous line(s) */ - png_uint_16p inv_filter_weights PNG_DEPSTRUCT; /* 1/weight(s) for previous line(s) */ - png_uint_16p filter_costs PNG_DEPSTRUCT; /* relative filter calculation cost */ - png_uint_16p inv_filter_costs PNG_DEPSTRUCT; /* 1/relative filter calculation cost */ + png_byte heuristic_method PNG_DEPSTRUCT; /* heuristic for row + filter selection */ + png_byte num_prev_filters PNG_DEPSTRUCT; /* number of weights + for previous rows */ + png_bytep prev_filters PNG_DEPSTRUCT; /* filter type(s) of + previous row(s) */ + png_uint_16p filter_weights PNG_DEPSTRUCT; /* weight(s) for previous + line(s) */ + png_uint_16p inv_filter_weights PNG_DEPSTRUCT; /* 1/weight(s) for + previous line(s) */ + png_uint_16p filter_costs PNG_DEPSTRUCT; /* relative filter + calculation cost */ + png_uint_16p inv_filter_costs PNG_DEPSTRUCT; /* 1/relative filter + calculation cost */ #endif #ifdef PNG_TIME_RFC1123_SUPPORTED png_charp time_buffer PNG_DEPSTRUCT; /* String to hold RFC 1123 time text */ #endif /* New members added in libpng-1.0.6 */ - png_uint_32 free_me PNG_DEPSTRUCT; /* flags items libpng is responsible for freeing */ + png_uint_32 free_me PNG_DEPSTRUCT; /* flags items libpng is + responsible for freeing */ #ifdef PNG_USER_CHUNKS_SUPPORTED png_voidp user_chunk_ptr PNG_DEPSTRUCT; - png_user_chunk_ptr read_user_chunk_fn PNG_DEPSTRUCT; /* user read chunk handler */ + png_user_chunk_ptr read_user_chunk_fn PNG_DEPSTRUCT; /* user read + chunk handler */ #endif #ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED int num_chunk_list PNG_DEPSTRUCT; @@ -1290,33 +1411,39 @@ /* New members added in libpng-1.2.0 */ /* New members added in libpng-1.0.2 but first enabled by default in 1.2.0 */ #ifdef PNG_USER_MEM_SUPPORTED - png_voidp mem_ptr PNG_DEPSTRUCT; /* user supplied struct for mem functions */ - png_malloc_ptr malloc_fn PNG_DEPSTRUCT; /* function for allocating memory */ - png_free_ptr free_fn PNG_DEPSTRUCT; /* function for freeing memory */ + png_voidp mem_ptr PNG_DEPSTRUCT; /* user supplied struct for + mem functions */ + png_malloc_ptr malloc_fn PNG_DEPSTRUCT; /* function for + allocating memory */ + png_free_ptr free_fn PNG_DEPSTRUCT; /* function for + freeing memory */ #endif /* New member added in libpng-1.0.13 and 1.2.0 */ - png_bytep big_row_buf PNG_DEPSTRUCT; /* buffer to save current (unfiltered) row */ + png_bytep big_row_buf PNG_DEPSTRUCT; /* buffer to save current + (unfiltered) row */ #ifdef PNG_READ_DITHER_SUPPORTED /* The following three members were added at version 1.0.14 and 1.2.4 */ png_bytep dither_sort PNG_DEPSTRUCT; /* working sort array */ - png_bytep index_to_palette PNG_DEPSTRUCT; /* where the original index currently is */ - /* in the palette */ - png_bytep palette_to_index PNG_DEPSTRUCT; /* which original index points to this */ - /* palette color */ + png_bytep index_to_palette PNG_DEPSTRUCT; /* where the original + index currently is + in the palette */ + png_bytep palette_to_index PNG_DEPSTRUCT; /* which original index + points to this + palette color */ #endif /* New members added in libpng-1.0.16 and 1.2.6 */ png_byte compression_type PNG_DEPSTRUCT; -#ifdef PNG_SET_USER_LIMITS_SUPPORTED +#ifdef PNG_USER_LIMITS_SUPPORTED png_uint_32 user_width_max PNG_DEPSTRUCT; png_uint_32 user_height_max PNG_DEPSTRUCT; /* Added in libpng-1.4.0: Total number of sPLT, text, and unknown - * chunks that can be stored (0x7fffffff means unlimited). + * chunks that can be stored (0 means unlimited). */ png_uint_32 user_chunk_cache_max PNG_DEPSTRUCT; #endif @@ -1332,10 +1459,10 @@ /* New member added in libpng-1.2.30 */ png_charp chunkdata PNG_DEPSTRUCT; /* buffer for reading chunk data */ -/* New member added in libpng-1.4.0 */ #ifdef PNG_IO_STATE_SUPPORTED +/* New member added in libpng-1.4.0 */ png_uint_32 io_state PNG_DEPSTRUCT; #endif }; @@ -1379,17 +1506,13 @@ extern PNG_EXPORT(png_structp,png_create_write_struct) PNGARG((png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warn_fn)) PNG_ALLOCATED; -#ifdef PNG_WRITE_SUPPORTED extern PNG_EXPORT(png_size_t,png_get_compression_buffer_size) PNGARG((png_structp png_ptr)); -#endif -#ifdef PNG_WRITE_SUPPORTED extern PNG_EXPORT(void,png_set_compression_buffer_size) PNGARG((png_structp png_ptr, png_size_t size)); -#endif /* Moved from pngconf.h in 1.4.0 and modified to ensure setjmp/longjmp * match up. */ @@ -1401,9 +1524,10 @@ * allocated by the library - the call will return NULL on a mismatch * indicating an ABI mismatch. */ extern PNG_EXPORT(jmp_buf*, png_set_longjmp_fn) - PNGARG((png_structp png_ptr, png_longjmp_ptr longjmp_fn, size_t jmp_buf_size)); + PNGARG((png_structp png_ptr, png_longjmp_ptr longjmp_fn, size_t + jmp_buf_size)); # define png_jmpbuf(png_ptr) \ (*png_set_longjmp_fn((png_ptr), longjmp, sizeof (jmp_buf))) #else # define png_jmpbuf(png_ptr) \ @@ -1546,9 +1670,10 @@ /* Use 1 byte per pixel in 1, 2, or 4-bit depth files. */ extern PNG_EXPORT(void,png_set_packing) PNGARG((png_structp png_ptr)); #endif -#if defined(PNG_READ_PACKSWAP_SUPPORTED) || defined(PNG_WRITE_PACKSWAP_SUPPORTED) +#if defined(PNG_READ_PACKSWAP_SUPPORTED) || \ + defined(PNG_WRITE_PACKSWAP_SUPPORTED) /* Swap packing order of pixels in bytes. */ extern PNG_EXPORT(void,png_set_packswap) PNGARG((png_structp png_ptr)); #endif @@ -1587,9 +1712,11 @@ extern PNG_EXPORT(void,png_set_strip_16) PNGARG((png_structp png_ptr)); #endif #ifdef PNG_READ_DITHER_SUPPORTED -/* Turn on dithering, and reduce the palette to the number of colors available. */ +/* Turn on dithering, and reduce the palette to the number of colors + * available. + */ extern PNG_EXPORT(void,png_set_dither) PNGARG((png_structp png_ptr, png_colorp palette, int num_palette, int maximum_colors, png_uint_16p histogram, int full_dither)); #endif @@ -1804,9 +1931,10 @@ */ #ifdef PNG_STDIO_SUPPORTED /* Initialize the input/output for the PNG file to the default functions. */ -extern PNG_EXPORT(void,png_init_io) PNGARG((png_structp png_ptr, png_FILE_p fp)); +extern PNG_EXPORT(void,png_init_io) PNGARG((png_structp png_ptr, + png_FILE_p fp)); #endif /* Replace the (error and abort), and warning functions with user * supplied functions. If no messages are to be printed you must still @@ -2361,9 +2489,10 @@ #endif extern PNG_EXPORT(png_charp,png_get_copyright) PNGARG((png_structp png_ptr)); extern PNG_EXPORT(png_charp,png_get_header_ver) PNGARG((png_structp png_ptr)); -extern PNG_EXPORT(png_charp,png_get_header_version) PNGARG((png_structp png_ptr)); +extern PNG_EXPORT(png_charp,png_get_header_version) PNGARG((png_structp + png_ptr)); extern PNG_EXPORT(png_charp,png_get_libpng_ver) PNGARG((png_structp png_ptr)); #ifdef PNG_MNG_FEATURES_SUPPORTED extern PNG_EXPORT(png_uint_32,png_permit_mng_features) PNGARG((png_structp @@ -2396,8 +2525,13 @@ extern PNG_EXPORT(void,png_set_chunk_cache_max) PNGARG((png_structp png_ptr, png_uint_32 user_chunk_cache_max)); extern PNG_EXPORT(png_uint_32,png_get_chunk_cache_max) PNGARG((png_structp png_ptr)); +/* Added in libpng-1.4.1 */ +extern PNG_EXPORT(void,png_set_chunk_malloc_max) PNGARG((png_structp + png_ptr, png_alloc_size_t user_chunk_cache_max)); +extern PNG_EXPORT(png_alloc_size_t,png_get_chunk_malloc_max) + PNGARG((png_structp png_ptr)); #endif #if defined(PNG_INCH_CONVERSIONS) && defined(PNG_FLOATING_POINT_SUPPORTED) PNG_EXPORT(png_uint_32,png_get_pixels_per_inch) PNGARG((png_structp png_ptr, @@ -2459,17 +2593,19 @@ /* fg and bg should be in `gamma 1.0' space; alpha is the opacity */ # define png_composite(composite, fg, alpha, bg) \ - { png_uint_16 temp = (png_uint_16)((png_uint_16)(fg) * (png_uint_16)(alpha) \ - + (png_uint_16)(bg)*(png_uint_16)(255 - \ - (png_uint_16)(alpha)) + (png_uint_16)128); \ + { png_uint_16 temp = (png_uint_16)((png_uint_16)(fg) \ + * (png_uint_16)(alpha) \ + + (png_uint_16)(bg)*(png_uint_16)(255 \ + - (png_uint_16)(alpha)) + (png_uint_16)128); \ (composite) = (png_byte)((temp + (temp >> 8)) >> 8); } # define png_composite_16(composite, fg, alpha, bg) \ - { png_uint_32 temp = (png_uint_32)((png_uint_32)(fg) * (png_uint_32)(alpha) \ - + (png_uint_32)(bg)*(png_uint_32)(65535L - \ - (png_uint_32)(alpha)) + (png_uint_32)32768L); \ + { png_uint_32 temp = (png_uint_32)((png_uint_32)(fg) \ + * (png_uint_32)(alpha) \ + + (png_uint_32)(bg)*(png_uint_32)(65535L \ + - (png_uint_32)(alpha)) + (png_uint_32)32768L); \ (composite) = (png_uint_16)((temp + (temp >> 16)) >> 16); } #else /* Standard method using integer division */ diff -ru4NwbB libpng-1.4.0/pngconf.h libpng-1.4.1beta08/pngconf.h --- libpng-1.4.0/pngconf.h 2010-01-02 23:05:36.424884679 -0600 +++ libpng-1.4.1beta08/pngconf.h 2010-02-06 19:46:21.121802488 -0600 @@ -27,9 +27,11 @@ #endif /* Added at libpng-1.2.9 */ -/* config.h is created by and PNG_CONFIGURE_LIBPNG is set by the "configure" script. */ +/* config.h is created by and PNG_CONFIGURE_LIBPNG is set by the "configure" + * script. + */ #ifdef PNG_CONFIGURE_LIBPNG # ifdef HAVE_CONFIG_H # include "config.h" # endif @@ -674,24 +676,44 @@ /* Added at libpng-1.2.6 */ #ifndef PNG_SET_USER_LIMITS_SUPPORTED # ifndef PNG_NO_SET_USER_LIMITS # define PNG_SET_USER_LIMITS_SUPPORTED + /* Feature added at libpng-1.4.0, this flag added at 1.4.1 */ +# define PNG_SET_CHUNK_CACHE_LIMIT_SUPPORTED + /* Feature added at libpng-1.4.1, this flag added at 1.4.1 */ +# define PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED +# endif +#endif + +/* Added at libpng-1.2.43 */ +#ifndef PNG_USER_LIMITS_SUPPORTED +# ifndef PNG_NO_USER_LIMITS +# define PNG_USER_LIMITS_SUPPORTED # endif #endif +/* Added at libpng-1.2.43 */ + /* Added at libpng-1.0.16 and 1.2.6. To accept all valid PNGs no matter - * how large, set these limits to 0x7fffffffL + * how large, set these two limits to 0x7fffffffL */ #ifndef PNG_USER_WIDTH_MAX # define PNG_USER_WIDTH_MAX 1000000L #endif #ifndef PNG_USER_HEIGHT_MAX # define PNG_USER_HEIGHT_MAX 1000000L #endif -/* Added at libpng-1.4.0 */ +/* Added at libpng-1.2.43. To accept all valid PNGs no matter + * how large, set these two limits to 0. + */ #ifndef PNG_USER_CHUNK_CACHE_MAX -# define PNG_USER_CHUNK_CACHE_MAX 0x7fffffffL +# define PNG_USER_CHUNK_CACHE_MAX 0 +#endif + +/* Added at libpng-1.2.43 */ +#ifndef PNG_USER_CHUNK_MALLOC_MAX +# define PNG_USER_CHUNK_MALLOC_MAX 0 #endif /* Added at libpng-1.4.0 */ #if !defined(PNG_NO_IO_STATE) && !defined(PNG_IO_STATE_SUPPORTED) @@ -860,22 +882,24 @@ #endif /* PNG_READ_ANCILLARY_CHUNKS_SUPPORTED */ #ifndef PNG_NO_READ_UNKNOWN_CHUNKS +# ifndef PNG_READ_UNKNOWN_CHUNKS_SUPPORTED # define PNG_READ_UNKNOWN_CHUNKS_SUPPORTED +# endif # ifndef PNG_UNKNOWN_CHUNKS_SUPPORTED # define PNG_UNKNOWN_CHUNKS_SUPPORTED # endif +# ifndef PNG_READ_USER_CHUNKS_SUPPORTED +# define PNG_READ_USER_CHUNKS_SUPPORTED +# endif #endif -#if !defined(PNG_NO_READ_USER_CHUNKS) && \ - defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED) +#ifndef PNG_NO_READ_USER_CHUNKS +# ifndef PNG_READ_USER_CHUNKS_SUPPORTED # define PNG_READ_USER_CHUNKS_SUPPORTED -# define PNG_USER_CHUNKS_SUPPORTED -# ifdef PNG_NO_READ_UNKNOWN_CHUNKS -# undef PNG_NO_READ_UNKNOWN_CHUNKS # endif -# ifdef PNG_NO_HANDLE_AS_UNKNOWN -# undef PNG_NO_HANDLE_AS_UNKNOWN +# ifndef PNG_USER_CHUNKS_SUPPORTED +# define PNG_USER_CHUNKS_SUPPORTED # endif #endif #ifndef PNG_NO_HANDLE_AS_UNKNOWN # ifndef PNG_HANDLE_AS_UNKNOWN_SUPPORTED @@ -1015,11 +1039,13 @@ #endif #endif /* PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED */ -#if !defined(PNG_NO_WRITE_FILTER) && !defined(PNG_WRITE_FILTER_SUPPORTED) +#ifndef PNG_NO_WRITE_FILTER +# ifndef PNG_WRITE_FILTER_SUPPORTED # define PNG_WRITE_FILTER_SUPPORTED #endif +#endif #ifndef PNG_NO_WRITE_UNKNOWN_CHUNKS # define PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED # ifndef PNG_UNKNOWN_CHUNKS_SUPPORTED diff -ru4NwbB libpng-1.4.0/pngerror.c libpng-1.4.1beta08/pngerror.c --- libpng-1.4.0/pngerror.c 2010-01-02 23:05:36.453901617 -0600 +++ libpng-1.4.1beta08/pngerror.c 2010-02-06 19:46:21.149433416 -0600 @@ -1,8 +1,8 @@ /* pngerror.c - stub functions for i/o and memory allocation * - * Last changed in libpng 1.4.0 [February 7, 2010] + * Last changed in libpng 1.4.0 [January 3, 2010] * Copyright (c) 1998-2010 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 -ru4NwbB libpng-1.4.0/pngget.c libpng-1.4.1beta08/pngget.c --- libpng-1.4.0/pngget.c 2010-01-02 23:05:36.461299406 -0600 +++ libpng-1.4.1beta08/pngget.c 2010-02-06 19:46:21.156523806 -0600 @@ -1,8 +1,8 @@ /* pngget.c - retrieval of values from info struct * - * Last changed in libpng 1.4.0 [February 7, 2010] + * Last changed in libpng 1.4.1 [February 7, 2010] * Copyright (c) 1998-2010 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.) * @@ -871,19 +871,18 @@ return (png_ptr? png_ptr->user_chunk_ptr : NULL); } #endif -#ifdef PNG_WRITE_SUPPORTED png_size_t PNGAPI png_get_compression_buffer_size(png_structp png_ptr) { return (png_ptr ? png_ptr->zbuf_size : 0L); } -#endif #ifdef PNG_SET_USER_LIMITS_SUPPORTED -/* These functions were added to libpng 1.2.6 */ +/* These functions were added to libpng 1.2.6 and were enabled + * by default in libpng-1.4.0 */ png_uint_32 PNGAPI png_get_user_width_max (png_structp png_ptr) { return (png_ptr? png_ptr->user_width_max : 0); @@ -896,13 +895,20 @@ /* This function was added to libpng 1.4.0 */ png_uint_32 PNGAPI png_get_chunk_cache_max (png_structp png_ptr) { - return (png_ptr? png_ptr->user_chunk_cache_max? 0x7fffffffL : - png_ptr->user_chunk_cache_max - 1 : 0); + return (png_ptr? png_ptr->user_chunk_cache_max : 0); +} +/* This function was added to libpng 1.4.1 */ +png_uint_32 PNGAPI +png_get_chunk_malloc_max (png_structp png_ptr) +{ + return (png_ptr? + (png_uint_32)png_ptr->user_chunk_malloc_max : 0); } #endif /* ?PNG_SET_USER_LIMITS_SUPPORTED */ +/* These functions were added to libpng 1.4.0 */ #ifdef PNG_IO_STATE_SUPPORTED png_uint_32 PNGAPI png_get_io_state (png_structp png_ptr) { diff -ru4NwbB libpng-1.4.0/pngmem.c libpng-1.4.1beta08/pngmem.c --- libpng-1.4.0/pngmem.c 2010-01-02 23:05:36.467926491 -0600 +++ libpng-1.4.1beta08/pngmem.c 2010-02-06 19:46:21.162710069 -0600 @@ -200,9 +200,9 @@ if (table == NULL) { #ifndef PNG_USER_MEM_SUPPORTED if ((png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0) - png_error(png_ptr, "Out Of Memory"); /* Note "O" and "M" */ + png_error(png_ptr, "Out Of Memory"); /* Note "O", "M" */ else png_warning(png_ptr, "Out Of Memory"); #endif return (NULL); @@ -228,9 +228,9 @@ if (png_ptr->offset_table_ptr == NULL) { #ifndef PNG_USER_MEM_SUPPORTED if ((png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0) - png_error(png_ptr, "Out Of memory"); /* Note "O" and "M" */ + png_error(png_ptr, "Out Of memory"); /* Note "O", "m" */ else png_warning(png_ptr, "Out Of memory"); #endif return (NULL); diff -ru4NwbB libpng-1.4.0/pngpread.c libpng-1.4.1beta08/pngpread.c --- libpng-1.4.0/pngpread.c 2010-01-02 23:05:36.477006213 -0600 +++ libpng-1.4.1beta08/pngpread.c 2010-02-06 19:46:21.171237867 -0600 @@ -1,8 +1,8 @@ /* pngpread.c - read a png file in push mode * - * Last changed in libpng 1.4.0 [February 7, 2010] + * Last changed in libpng 1.4.1 [February 7, 2010] * Copyright (c) 1998-2010 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.) * @@ -328,9 +328,11 @@ png_ptr->idat_size = png_ptr->push_length; png_ptr->mode |= PNG_HAVE_IDAT; png_ptr->process_mode = PNG_READ_IDAT_MODE; png_push_have_info(png_ptr, info_ptr); - png_ptr->zstream.avail_out = (uInt)png_ptr->irowbytes; + png_ptr->zstream.avail_out = + (uInt) PNG_ROWBYTES(png_ptr->pixel_depth, + png_ptr->iwidth) + 1; png_ptr->zstream.next_out = png_ptr->row_buf; return; } @@ -683,21 +685,27 @@ *dp = *sp; } } } - if (png_ptr->save_buffer_size + png_ptr->current_buffer_size > - png_ptr->save_buffer_max) + if (png_ptr->save_buffer_size > + (png_ptr->save_buffer_max - png_ptr->current_buffer_size)) { png_size_t new_max; png_bytep old_buffer; + if (png_ptr->save_buffer_size == PNG_SIZE_MAX) + png_error(png_ptr, "Overflow of save_buffer"); + if (png_ptr->save_buffer_size > PNG_SIZE_MAX - - (png_ptr->current_buffer_size + 256)) - { - png_error(png_ptr, "Potential overflow of save_buffer"); - } + (png_ptr->current_buffer_size + + (png_ptr->save_buffer_size >> 3) + 256)) + new_max = PNG_SIZE_MAX; + + else + new_max = png_ptr->save_buffer_size + png_ptr->current_buffer_size + + (png_ptr->save_buffer_size >> 3) + 256; + - new_max = png_ptr->save_buffer_size + png_ptr->current_buffer_size + 256; old_buffer = png_ptr->save_buffer; png_ptr->save_buffer = (png_bytep)png_malloc(png_ptr, (png_size_t)new_max); png_memcpy(png_ptr->save_buffer, old_buffer, png_ptr->save_buffer_size); @@ -868,9 +876,11 @@ png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED; break; } png_push_process_row(png_ptr); - png_ptr->zstream.avail_out = (uInt)png_ptr->irowbytes; + png_ptr->zstream.avail_out = + (uInt) PNG_ROWBYTES(png_ptr->pixel_depth, + png_ptr->iwidth) + 1; png_ptr->zstream.next_out = png_ptr->row_buf; } else @@ -1133,11 +1143,8 @@ png_pass_inc[png_ptr->pass] - 1 - png_pass_start[png_ptr->pass]) / png_pass_inc[png_ptr->pass]; - png_ptr->irowbytes = PNG_ROWBYTES(png_ptr->pixel_depth, - png_ptr->iwidth) + 1; - if (png_ptr->transformations & PNG_INTERLACE) break; png_ptr->num_rows = (png_ptr->height + diff -ru4NwbB libpng-1.4.0/pngpriv.h libpng-1.4.1beta08/pngpriv.h --- libpng-1.4.0/pngpriv.h 2010-01-02 23:05:36.432657321 -0600 +++ libpng-1.4.1beta08/pngpriv.h 2010-02-06 19:46:21.129392395 -0600 @@ -305,8 +305,10 @@ /* Decompress data in a chunk that uses compression */ #if defined(PNG_zTXt_SUPPORTED) || defined(PNG_iTXt_SUPPORTED) || \ defined(PNG_iCCP_SUPPORTED) || defined(PNG_sPLT_SUPPORTED) +PNG_EXTERN png_size_t png_measure_decompressed_chunk PNGARG((png_structp + png_ptr, int comp_type, png_size_t chunklength, png_size_t prefix_length)); PNG_EXTERN void png_decompress_chunk PNGARG((png_structp png_ptr, int comp_type, png_size_t chunklength, png_size_t prefix_length, png_size_t *data_length)); #endif @@ -350,10 +352,10 @@ #ifdef PNG_FLOATING_POINT_SUPPORTED PNG_EXTERN void png_write_gAMA PNGARG((png_structp png_ptr, double file_gamma)); #endif #ifdef PNG_FIXED_POINT_SUPPORTED -PNG_EXTERN void png_write_gAMA_fixed PNGARG((png_structp png_ptr, png_fixed_point - file_gamma)); +PNG_EXTERN void png_write_gAMA_fixed PNGARG((png_structp png_ptr, + png_fixed_point file_gamma)); #endif #endif #ifdef PNG_WRITE_sBIT_SUPPORTED @@ -555,9 +557,10 @@ #if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED) PNG_EXTERN void png_do_swap PNGARG((png_row_infop row_info, png_bytep row)); #endif -#if defined(PNG_READ_PACKSWAP_SUPPORTED) || defined(PNG_WRITE_PACKSWAP_SUPPORTED) +#if defined(PNG_READ_PACKSWAP_SUPPORTED) || \ + defined(PNG_WRITE_PACKSWAP_SUPPORTED) PNG_EXTERN void png_do_packswap PNGARG((png_row_infop row_info, png_bytep row)); #endif #ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED diff -ru4NwbB libpng-1.4.0/pngread.c libpng-1.4.1beta08/pngread.c --- libpng-1.4.0/pngread.c 2010-01-02 23:05:36.485963803 -0600 +++ libpng-1.4.1beta08/pngread.c 2010-02-06 19:46:21.179707131 -0600 @@ -1,8 +1,8 @@ /* pngread.c - read a PNG file * - * Last changed in libpng 1.4.0 [February 7, 2010] + * Last changed in libpng 1.4.1 [February 7, 2010] * Copyright (c) 1998-2010 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.) * @@ -30,9 +30,11 @@ return (png_create_read_struct_2(user_png_ver, error_ptr, error_fn, warn_fn, NULL, NULL, NULL)); } -/* Alternate create PNG structure for reading, and allocate any memory needed. */ +/* Alternate create PNG structure for reading, and allocate any memory + * needed. + */ png_structp PNGAPI png_create_read_struct_2(png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn) @@ -64,14 +66,20 @@ if (png_ptr == NULL) return (NULL); /* Added at libpng-1.2.6 */ -#ifdef PNG_SET_USER_LIMITS_SUPPORTED +#ifdef PNG_USER_LIMITS_SUPPORTED png_ptr->user_width_max = PNG_USER_WIDTH_MAX; png_ptr->user_height_max = PNG_USER_HEIGHT_MAX; - /* Added at libpng-1.4.0 */ +# ifdef PNG_USER_CHUNK_CACHE_MAX + /* Added at libpng-1.2.43 and 1.4.0 */ png_ptr->user_chunk_cache_max = PNG_USER_CHUNK_CACHE_MAX; #endif +# ifdef PNG_SET_USER_CHUNK_MALLOC_MAX + /* Added at libpng-1.2.43 and 1.4.1 */ + png_ptr->user_chunk_malloc_max = PNG_USER_CHUNK_MALLOC_MAX; +# endif +#endif #ifdef PNG_SETJMP_SUPPORTED /* Applications that neglect to set up their own setjmp() and then encounter a png_error() will longjmp here. Since the jmpbuf is @@ -476,9 +484,10 @@ #if defined(PNG_WRITE_FILLER_SUPPORTED) && !defined(PNG_READ_FILLER_SUPPORTED) if (png_ptr->transformations & PNG_FILLER) png_warning(png_ptr, "PNG_READ_FILLER_SUPPORTED is not defined"); #endif -#if defined(PNG_WRITE_PACKSWAP_SUPPORTED) && !defined(PNG_READ_PACKSWAP_SUPPORTED) +#if defined(PNG_WRITE_PACKSWAP_SUPPORTED) && \ + !defined(PNG_READ_PACKSWAP_SUPPORTED) if (png_ptr->transformations & PNG_PACKSWAP) png_warning(png_ptr, "PNG_READ_PACKSWAP_SUPPORTED is not defined"); #endif #if defined(PNG_WRITE_PACK_SUPPORTED) && !defined(PNG_READ_PACK_SUPPORTED) @@ -579,9 +588,11 @@ if (!(png_ptr->mode & PNG_HAVE_IDAT)) png_error(png_ptr, "Invalid attempt to read row data"); png_ptr->zstream.next_out = png_ptr->row_buf; - png_ptr->zstream.avail_out = (uInt)png_ptr->irowbytes; + png_ptr->zstream.avail_out = + (uInt)(PNG_ROWBYTES(png_ptr->pixel_depth, + png_ptr->iwidth) + 1); do { if (!(png_ptr->zstream.avail_in)) { @@ -1043,9 +1054,10 @@ } /* Free all memory used by the read (old method) */ void /* PRIVATE */ -png_read_destroy(png_structp png_ptr, png_infop info_ptr, png_infop end_info_ptr) +png_read_destroy(png_structp png_ptr, png_infop info_ptr, + png_infop end_info_ptr) { #ifdef PNG_SETJMP_SUPPORTED jmp_buf tmp_jmp; #endif diff -ru4NwbB libpng-1.4.0/pngrio.c libpng-1.4.1beta08/pngrio.c --- libpng-1.4.0/pngrio.c 2010-01-02 23:05:36.491106698 -0600 +++ libpng-1.4.1beta08/pngrio.c 2010-02-06 19:46:21.184547585 -0600 @@ -1,8 +1,8 @@ /* pngrio.c - functions for data input * - * Last changed in libpng 1.4.0 [February 7, 2010] + * Last changed in libpng 1.4.1 [February 7, 2010] * Copyright (c) 1998-2010 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 -ru4NwbB libpng-1.4.0/pngrtran.c libpng-1.4.1beta08/pngrtran.c --- libpng-1.4.0/pngrtran.c 2010-01-02 23:05:36.506593645 -0600 +++ libpng-1.4.1beta08/pngrtran.c 2010-02-06 19:46:21.199712189 -0600 @@ -1,8 +1,8 @@ /* pngrtran.c - transforms the data in a row for PNG readers * - * Last changed in libpng 1.4.0 [February 7, 2010] + * Last changed in libpng 1.4.1 [February 7, 2010] * Copyright (c) 1998-2010 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.) * @@ -431,10 +431,12 @@ [num_new_palette]] = png_ptr->index_to_palette[j]; png_ptr->palette_to_index[png_ptr->index_to_palette[j]] = png_ptr->palette_to_index[num_new_palette]; - png_ptr->index_to_palette[j] = (png_byte)num_new_palette; - png_ptr->palette_to_index[num_new_palette] = (png_byte)j; + png_ptr->index_to_palette[j] = + (png_byte)num_new_palette; + png_ptr->palette_to_index[num_new_palette] = + (png_byte)j; } if (num_new_palette <= maximum_colors) break; } @@ -501,9 +503,10 @@ for (ir = 0; ir < num_red; ir++) { /* int dr = abs(ir - r); */ int dr = ((ir > r) ? ir - r : r - ir); - int index_r = (ir << (PNG_DITHER_BLUE_BITS + PNG_DITHER_GREEN_BITS)); + int index_r = (ir << (PNG_DITHER_BLUE_BITS + + PNG_DITHER_GREEN_BITS)); for (ig = 0; ig < num_green; ig++) { /* int dg = abs(ig - g); */ @@ -746,10 +749,11 @@ { png_debug(1, "in png_init_read_transformations"); { -#if defined(PNG_READ_BACKGROUND_SUPPORTED) || defined(PNG_READ_SHIFT_SUPPORTED) \ - || defined(PNG_READ_GAMMA_SUPPORTED) +#if defined(PNG_READ_BACKGROUND_SUPPORTED) || \ + defined(PNG_READ_SHIFT_SUPPORTED) || \ + defined(PNG_READ_GAMMA_SUPPORTED) int color_type = png_ptr->color_type; #endif #if defined(PNG_READ_EXPAND_SUPPORTED) && defined(PNG_READ_BACKGROUND_SUPPORTED) @@ -944,9 +948,10 @@ { back.red = (png_byte)(pow( (double)png_ptr->background.red/%F255%, gs) * 255.0 + .5); back.green = (png_byte)(pow( - (double)png_ptr->background.green/%F255%, gs) * 255.0 + .5); + (double)png_ptr->background.green/%F255%, gs) * 255.0 + + .5); back.blue = (png_byte)(pow( (double)png_ptr->background.blue/%F255%, gs) * 255.0 + .5); } @@ -1356,9 +1361,10 @@ #ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED if (png_ptr->transformations & PNG_RGB_TO_GRAY) { int rgb_error = - png_do_rgb_to_gray(png_ptr, &(png_ptr->row_info), png_ptr->row_buf + 1); + png_do_rgb_to_gray(png_ptr, &(png_ptr->row_info), + png_ptr->row_buf + 1); if (rgb_error) { png_ptr->rgb_to_gray_status=1; if ((png_ptr->transformations & PNG_RGB_TO_GRAY) == @@ -2342,9 +2348,10 @@ else { png_uint_16 red_1 = png_ptr->gamma_16_to_1[(red&0xff) >> png_ptr->gamma_shift][red>>8]; - png_uint_16 green_1 = png_ptr->gamma_16_to_1[(green&0xff) >> + png_uint_16 green_1 = + png_ptr->gamma_16_to_1[(green&0xff) >> png_ptr->gamma_shift][green>>8]; png_uint_16 blue_1 = png_ptr->gamma_16_to_1[(blue&0xff) >> png_ptr->gamma_shift][blue>>8]; png_uint_16 gray16 = (png_uint_16)((rc*red_1 + gc*green_1 @@ -2439,9 +2446,10 @@ else { png_uint_16 red_1 = png_ptr->gamma_16_to_1[(red&0xff) >> png_ptr->gamma_shift][red>>8]; - png_uint_16 green_1 = png_ptr->gamma_16_to_1[(green&0xff) >> + png_uint_16 green_1 = + png_ptr->gamma_16_to_1[(green&0xff) >> png_ptr->gamma_shift][green>>8]; png_uint_16 blue_1 = png_ptr->gamma_16_to_1[(blue&0xff) >> png_ptr->gamma_shift][blue>>8]; png_uint_16 gray16 = (png_uint_16)((rc * red_1 diff -ru4NwbB libpng-1.4.0/pngrutil.c libpng-1.4.1beta08/pngrutil.c --- libpng-1.4.0/pngrutil.c 2010-01-02 23:05:36.520586494 -0600 +++ libpng-1.4.1beta08/pngrutil.c 2010-02-06 19:46:21.213023121 -0600 @@ -1,8 +1,8 @@ /* pngrutil.c - utilities to read a PNG file * - * Last changed in libpng 1.4.0 [February 7, 2010] + * Last changed in libpng 1.4.1 [February 7, 2010] * Copyright (c) 1998-2010 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.) * @@ -200,8 +200,74 @@ } #if defined(PNG_READ_zTXt_SUPPORTED) || defined(PNG_READ_iTXt_SUPPORTED) || \ defined(PNG_READ_iCCP_SUPPORTED) +png_size_t +png_measure_decompressed_chunk(png_structp png_ptr, int comp_type, + png_size_t chunklength, png_size_t prefix_size) +{ + png_charp text; + png_charp test = "X"; + png_size_t text_size = 0; + + if (comp_type == PNG_COMPRESSION_TYPE_BASE) + { + int ret = Z_OK; + + png_ptr->zstream.next_in = (png_bytep)(png_ptr->chunkdata + prefix_size); + png_ptr->zstream.avail_in = (uInt)(chunklength - prefix_size); + png_ptr->zstream.next_out = png_ptr->zbuf; + png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; + + text = NULL; + + while (png_ptr->zstream.avail_in) + { + ret = inflate(&png_ptr->zstream, Z_PARTIAL_FLUSH); + if (ret != Z_OK && ret != Z_STREAM_END) + { + inflateReset(&png_ptr->zstream); + png_ptr->zstream.avail_in = 0; + break; + } + if (!png_ptr->zstream.avail_out || ret == Z_STREAM_END) + { + if (text == NULL) /* Initialize the decompression buffer */ + { + text_size = prefix_size + + png_ptr->zbuf_size - png_ptr->zstream.avail_out; + + text=test; + } + else /* Enlarge the decompression buffer */ + { + text_size += png_ptr->zbuf_size - png_ptr->zstream.avail_out; +#ifdef PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED + if (png_ptr->user_chunk_malloc_max && + (text_size >= png_ptr->user_chunk_malloc_max - 1)) +#else + if ((PNG_USER_CHUNK_MALLOC_MAX > 0) && + text_size >= PNG_USER_CHUNK_MALLOC_MAX - 1) +#endif + return 0; + } + } + if (ret == Z_STREAM_END) + break; + + else + { + png_ptr->zstream.next_out = png_ptr->zbuf; + png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; + } + } + + inflateReset(&png_ptr->zstream); + png_ptr->zstream.avail_in = 0; + } + return text_size; +} + /* * Decompress trailing data in a chunk. The assumption is that chunkdata * points at an allocated area holding the contents of a chunk with a * trailing compressed part. What we get back is an allocated area @@ -215,19 +281,31 @@ { static PNG_CONST char msg[] = "Error decoding compressed chunk"; png_charp text; png_size_t text_size; + png_size_t expanded_size; + + expanded_size= png_measure_decompressed_chunk(png_ptr, comp_type, + chunklength, prefix_size); + if (expanded_size == 0) + { + *newlength=0; + return; + } if (comp_type == PNG_COMPRESSION_TYPE_BASE) { int ret = Z_OK; + png_size_t buffer_size; + png_ptr->zstream.next_in = (png_bytep)(png_ptr->chunkdata + prefix_size); png_ptr->zstream.avail_in = (uInt)(chunklength - prefix_size); png_ptr->zstream.next_out = png_ptr->zbuf; png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; text_size = 0; text = NULL; + buffer_size = 0; while (png_ptr->zstream.avail_in) { ret = inflate(&png_ptr->zstream, Z_PARTIAL_FLUSH); @@ -245,11 +323,12 @@ text_size = prefix_size + png_sizeof(msg) + 1; text = (png_charp)png_malloc_warn(png_ptr, text_size); if (text == NULL) { - png_free(png_ptr, png_ptr->chunkdata); - png_ptr->chunkdata = NULL; - png_error(png_ptr, "Not enough memory to decompress chunk"); + png_error(png_ptr, + "Not enough memory to decompress chunk"); + text_size = 0; + break; } png_memcpy(text, png_ptr->chunkdata, prefix_size); } @@ -257,71 +336,40 @@ /* Copy what we can of the error message into the text chunk */ text_size = (png_size_t)(chunklength - (text - png_ptr->chunkdata) - 1); + if (text_size > png_sizeof(msg)) text_size = png_sizeof(msg); + png_memcpy(text + prefix_size, msg, text_size); + buffer_size = text_size; break; } if (!png_ptr->zstream.avail_out || ret == Z_STREAM_END) { - if (text == NULL) + if (text == NULL) /* Initialize the decompression buffer */ { - text_size = prefix_size + - png_ptr->zbuf_size - png_ptr->zstream.avail_out; + text_size = expanded_size; + text = (png_charp)png_malloc_warn(png_ptr, text_size + 1); if (text == NULL) { - png_free(png_ptr, png_ptr->chunkdata); - png_ptr->chunkdata = NULL; png_error(png_ptr, "Not enough memory to decompress chunk"); + text_size = 0; + break; } png_memcpy(text + prefix_size, png_ptr->zbuf, text_size - prefix_size); png_memcpy(text, png_ptr->chunkdata, prefix_size); *(text + text_size) = 0x00; + buffer_size = text_size; } - else - { - png_charp tmp; - - tmp = text; -#ifdef PNG_SET_USER_LIMITS_SUPPORTED - if ((png_ptr->user_chunk_cache_max != 0) && - (--png_ptr->user_chunk_cache_max == 0)) - { - png_warning(png_ptr, "No space in chunk cache"); - text = NULL; - } - - else - { -#endif - text = (png_charp)png_malloc_warn(png_ptr, - (png_size_t)(text_size + - png_ptr->zbuf_size - png_ptr->zstream.avail_out + 1)); -#ifdef PNG_SET_USER_LIMITS_SUPPORTED - } -#endif - if (text == NULL) - { - png_free(png_ptr, tmp); - png_free(png_ptr, png_ptr->chunkdata); - png_ptr->chunkdata = NULL; - png_error(png_ptr, - "Not enough memory to decompress chunk"); - } - png_memcpy(text, tmp, text_size); - png_free(png_ptr, tmp); - png_memcpy(text + text_size, png_ptr->zbuf, - (png_ptr->zbuf_size - png_ptr->zstream.avail_out)); - text_size += png_ptr->zbuf_size - png_ptr->zstream.avail_out; - *(text + text_size) = 0x00; } if (ret == Z_STREAM_END) break; + else { png_ptr->zstream.next_out = png_ptr->zbuf; png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; @@ -326,9 +374,9 @@ png_ptr->zstream.next_out = png_ptr->zbuf; png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; } } - } + if (ret != Z_STREAM_END) { #ifdef PNG_STDIO_SUPPORTED char umsg[52]; @@ -1134,9 +1182,9 @@ png_size_t slength; png_debug(1, "in png_handle_sPLT"); -#ifdef PNG_SET_USER_LIMITS_SUPPORTED +#ifdef PNG_USER_LIMITS_SUPPORTED if (png_ptr->user_chunk_cache_max != 0) { if (png_ptr->user_chunk_cache_max == 1) @@ -1184,9 +1232,10 @@ } png_ptr->chunkdata[slength] = 0x00; - for (entry_start = (png_bytep)png_ptr->chunkdata; *entry_start; entry_start++) + for (entry_start = (png_bytep)png_ptr->chunkdata; *entry_start; + entry_start++) /* Empty loop to find end of name */ ; ++entry_start; /* A sample depth should follow the separator, and we should be on it */ @@ -1938,9 +1987,9 @@ int ret; png_debug(1, "in png_handle_tEXt"); -#ifdef PNG_SET_USER_LIMITS_SUPPORTED +#ifdef PNG_USER_LIMITS_SUPPORTED if (png_ptr->user_chunk_cache_max != 0) { if (png_ptr->user_chunk_cache_max == 1) { @@ -2040,9 +2089,9 @@ png_size_t slength, prefix_len, data_len; png_debug(1, "in png_handle_zTXt"); -#ifdef PNG_SET_USER_LIMITS_SUPPORTED +#ifdef PNG_USER_LIMITS_SUPPORTED if (png_ptr->user_chunk_cache_max != 0) { if (png_ptr->user_chunk_cache_max == 1) { @@ -2161,9 +2210,9 @@ png_size_t slength, prefix_len, data_len; png_debug(1, "in png_handle_iTXt"); -#ifdef PNG_SET_USER_LIMITS_SUPPORTED +#ifdef PNG_USER_LIMITS_SUPPORTED if (png_ptr->user_chunk_cache_max != 0) { if (png_ptr->user_chunk_cache_max == 1) { @@ -2305,9 +2354,9 @@ png_uint_32 skip = 0; png_debug(1, "in png_handle_unknown"); -#ifdef PNG_SET_USER_LIMITS_SUPPORTED +#ifdef PNG_USER_LIMITS_SUPPORTED if (png_ptr->user_chunk_cache_max != 0) { if (png_ptr->user_chunk_cache_max == 1) { @@ -2360,9 +2409,10 @@ #endif png_memcpy((png_charp)png_ptr->unknown_chunk.name, (png_charp)png_ptr->chunk_name, png_sizeof(png_ptr->unknown_chunk.name)); - png_ptr->unknown_chunk.name[png_sizeof(png_ptr->unknown_chunk.name)-1] = '\0'; + png_ptr->unknown_chunk.name[png_sizeof(png_ptr->unknown_chunk.name)-1] + = '\0'; png_ptr->unknown_chunk.size = (png_size_t)length; if (length == 0) png_ptr->unknown_chunk.data = NULL; else @@ -2832,9 +2882,10 @@ } default: { png_size_t pixel_bytes = (row_info->pixel_depth >> 3); - png_bytep sp = row + (png_size_t)(row_info->width - 1) * pixel_bytes; + png_bytep sp = row + (png_size_t)(row_info->width - 1) + * pixel_bytes; png_bytep dp = row + (png_size_t)(final_width - 1) * pixel_bytes; int jstop = png_pass_inc[pass]; png_uint_32 i; @@ -3027,11 +3078,8 @@ png_pass_inc[png_ptr->pass] - 1 - png_pass_start[png_ptr->pass]) / png_pass_inc[png_ptr->pass]; - png_ptr->irowbytes = PNG_ROWBYTES(png_ptr->pixel_depth, - png_ptr->iwidth) + 1; - if (!(png_ptr->transformations & PNG_INTERLACE)) { png_ptr->num_rows = (png_ptr->height + png_pass_yinc[png_ptr->pass] - 1 - @@ -3154,18 +3202,14 @@ png_ptr->iwidth = (png_ptr->width + png_pass_inc[png_ptr->pass] - 1 - png_pass_start[png_ptr->pass]) / png_pass_inc[png_ptr->pass]; - - png_ptr->irowbytes = - PNG_ROWBYTES(png_ptr->pixel_depth, png_ptr->iwidth) + 1; } else #endif /* PNG_READ_INTERLACING_SUPPORTED */ { png_ptr->num_rows = png_ptr->height; png_ptr->iwidth = png_ptr->width; - png_ptr->irowbytes = png_ptr->rowbytes + 1; } max_pixel_depth = png_ptr->pixel_depth; #ifdef PNG_READ_PACK_SUPPORTED @@ -3328,9 +3372,10 @@ png_debug1(3, "height = %lu,", png_ptr->height); png_debug1(3, "iwidth = %lu,", png_ptr->iwidth); png_debug1(3, "num_rows = %lu,", png_ptr->num_rows); png_debug1(3, "rowbytes = %lu,", png_ptr->rowbytes); - png_debug1(3, "irowbytes = %lu", png_ptr->irowbytes); + png_debug1(3, "irowbytes = %lu", + PNG_ROWBYTES(png_ptr->pixel_depth, png_ptr->iwidth) + 1); png_ptr->flags |= PNG_FLAG_ROW_INIT; } #endif /* PNG_READ_SUPPORTED */ diff -ru4NwbB libpng-1.4.0/pngset.c libpng-1.4.1beta08/pngset.c --- libpng-1.4.0/pngset.c 2010-01-02 23:05:36.528892955 -0600 +++ libpng-1.4.1beta08/pngset.c 2010-02-06 19:46:21.221345494 -0600 @@ -1,8 +1,8 @@ /* pngset.c - storage of image information into info struct * - * Last changed in libpng 1.4.0 [February 7, 2010] + * Last changed in libpng 1.4.1 [February 7, 2010] * Copyright (c) 1998-2010 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.) * @@ -1092,9 +1092,8 @@ info_ptr->valid |= PNG_INFO_IDAT; } #endif -#ifdef PNG_WRITE_SUPPORTED void PNGAPI png_set_compression_buffer_size(png_structp png_ptr, png_size_t size) { @@ -1105,9 +1104,8 @@ png_ptr->zbuf = (png_bytep)png_malloc(png_ptr, size); png_ptr->zstream.next_out = png_ptr->zbuf; png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; } -#endif void PNGAPI png_set_invalid(png_structp png_ptr, png_infop info_ptr, int mask) { @@ -1136,15 +1135,20 @@ void PNGAPI png_set_chunk_cache_max (png_structp png_ptr, png_uint_32 user_chunk_cache_max) { - if (png_ptr == NULL) - return; + if (png_ptr) png_ptr->user_chunk_cache_max = user_chunk_cache_max; - if (user_chunk_cache_max == 0x7fffffffL) /* Unlimited */ - png_ptr->user_chunk_cache_max = 0; - else - png_ptr->user_chunk_cache_max = user_chunk_cache_max + 1; +} + +/* This function was added to libpng 1.4.1 */ +void PNGAPI +png_set_chunk_malloc_max (png_structp png_ptr, + png_alloc_size_t user_chunk_malloc_max) +{ + if (png_ptr) + png_ptr->user_chunk_malloc_max = + (png_size_t)user_chunk_malloc_max; } #endif /* ?PNG_SET_USER_LIMITS_SUPPORTED */ diff -ru4NwbB libpng-1.4.0/pngtest.c libpng-1.4.1beta08/pngtest.c --- libpng-1.4.0/pngtest.c 2010-01-02 23:05:36.537901646 -0600 +++ libpng-1.4.1beta08/pngtest.c 2010-02-06 19:46:21.230305686 -0600 @@ -1,8 +1,8 @@ /* pngtest.c - a simple test program to test libpng * - * Last changed in libpng 1.4.0 [February 7, 2010] + * Last changed in libpng 1.4.1 [February 7, 2010] * Copyright (c) 1998-2010 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.) * @@ -858,10 +858,10 @@ #ifdef PNG_cHRM_SUPPORTED { png_fixed_point white_x, white_y, red_x, red_y, green_x, green_y, blue_x, blue_y; - if (png_get_cHRM_fixed(read_ptr, read_info_ptr, &white_x, &white_y, &red_x, - &red_y, &green_x, &green_y, &blue_x, &blue_y)) + if (png_get_cHRM_fixed(read_ptr, read_info_ptr, &white_x, &white_y, + &red_x, &red_y, &green_x, &green_y, &blue_x, &blue_y)) { png_set_cHRM_fixed(write_ptr, write_info_ptr, white_x, white_y, red_x, red_y, green_x, green_y, blue_x, blue_y); } @@ -1011,9 +1011,10 @@ if (png_get_sCAL_s(read_ptr, read_info_ptr, &unit, &scal_width, &scal_height)) { - png_set_sCAL_s(write_ptr, write_info_ptr, unit, scal_width, scal_height); + png_set_sCAL_s(write_ptr, write_info_ptr, unit, scal_width, + scal_height); } } #endif #endif @@ -1464,16 +1465,16 @@ int allocation_now = current_allocation; #endif for (i=2; imode&PNG_HAVE_PNG_SIGNATURE)&&(png_ptr->mng_features_permitted)) + if ((png_ptr->mode&PNG_HAVE_PNG_SIGNATURE) && \ + (png_ptr->mng_features_permitted)) { png_warning(png_ptr, "MNG features are not allowed in a PNG datastream"); png_ptr->mng_features_permitted = 0; } @@ -679,11 +680,13 @@ #if !defined(PNG_WRITE_FILLER_SUPPORTED) && defined(PNG_READ_FILLER_SUPPORTED) if (png_ptr->transformations & PNG_FILLER) png_warning(png_ptr, "PNG_WRITE_FILLER_SUPPORTED is not defined"); #endif -#if !defined(PNG_WRITE_PACKSWAP_SUPPORTED) && defined(PNG_READ_PACKSWAP_SUPPORTED) +#if !defined(PNG_WRITE_PACKSWAP_SUPPORTED) && \ + defined(PNG_READ_PACKSWAP_SUPPORTED) if (png_ptr->transformations & PNG_PACKSWAP) - png_warning(png_ptr, "PNG_WRITE_PACKSWAP_SUPPORTED is not defined"); + png_warning(png_ptr, + "PNG_WRITE_PACKSWAP_SUPPORTED is not defined"); #endif #if !defined(PNG_WRITE_PACK_SUPPORTED) && defined(PNG_READ_PACK_SUPPORTED) if (png_ptr->transformations & PNG_PACK) png_warning(png_ptr, "PNG_WRITE_PACK_SUPPORTED is not defined"); @@ -935,9 +938,9 @@ if (png_ptr != NULL) { png_free_data(png_ptr, info_ptr, PNG_FREE_ALL, -1); -#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED +#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED if (png_ptr->num_chunk_list) { png_free(png_ptr, png_ptr->chunk_list); png_ptr->num_chunk_list = 0; diff -ru4NwbB libpng-1.4.0/pngwtran.c libpng-1.4.1beta08/pngwtran.c --- libpng-1.4.0/pngwtran.c 2010-01-02 23:05:36.565577397 -0600 +++ libpng-1.4.1beta08/pngwtran.c 2010-02-06 19:46:21.256741693 -0600 @@ -1,8 +1,8 @@ /* pngwtran.c - transforms the data in a row for PNG writers * - * Last changed in libpng 1.4.0 [February 7, 2010] + * Last changed in libpng 1.4.1 [February 7, 2010] * Copyright (c) 1998-2010 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.) * @@ -29,9 +29,10 @@ #ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED if (png_ptr->transformations & PNG_USER_TRANSFORM) if (png_ptr->write_user_transform_fn != NULL) - (*(png_ptr->write_user_transform_fn)) /* User write transform function */ + (*(png_ptr->write_user_transform_fn)) /* User write transform + function */ (png_ptr, /* png_ptr */ &(png_ptr->row_info), /* row_info: */ /* png_uint_32 width; width of row */ /* png_uint_32 rowbytes; number of bytes in row */ diff -ru4NwbB libpng-1.4.0/pngwutil.c libpng-1.4.1beta08/pngwutil.c --- libpng-1.4.0/pngwutil.c 2010-01-02 23:05:36.577284245 -0600 +++ libpng-1.4.1beta08/pngwutil.c 2010-02-06 19:46:21.268301525 -0600 @@ -1,8 +1,8 @@ /* pngwutil.c - utilities to write a PNG file * - * Last changed in libpng 1.4.0 [February 7, 2010] + * Last changed in libpng 1.4.1 [February 7, 2010] * Copyright (c) 1998-2010 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.) * @@ -435,9 +435,10 @@ case 2: case 4: case 8: case 16: png_ptr->channels = 1; break; - default: png_error(png_ptr, "Invalid bit depth for grayscale image"); + default: png_error(png_ptr, + "Invalid bit depth for grayscale image"); } break; case PNG_COLOR_TYPE_RGB: if (bit_depth != 8 && bit_depth != 16) @@ -638,9 +639,11 @@ buf[2] = pal_ptr->blue; png_write_chunk_data(png_ptr, buf, (png_size_t)3); } #else - /* This is a little slower but some buggy compilers need to do this instead */ + /* This is a little slower but some buggy compilers need to do this + * instead + */ pal_ptr=palette; for (i = 0; i < num_pal; i++) { buf[0] = pal_ptr[i].red; diff -ru4NwbB libpng-1.4.0/projects/xcode/libpng.xcodeproj/project.pbxproj libpng-1.4.1beta08/projects/xcode/libpng.xcodeproj/project.pbxproj --- libpng-1.4.0/projects/xcode/libpng.xcodeproj/project.pbxproj 2010-01-02 23:05:37.879732170 -0600 +++ libpng-1.4.1beta08/projects/xcode/libpng.xcodeproj/project.pbxproj 2010-02-06 19:46:22.361464806 -0600 @@ -225,9 +225,9 @@ buildSettings = { COPY_PHASE_STRIP = NO; DYLIB_COMPATIBILITY_VERSION = 14; DYLIB_CURRENT_VERSION = 14; - FRAMEWORK_VERSION = 1.4.0; + FRAMEWORK_VERSION = 1.4.1beta08; GCC_PRECOMPILE_PREFIX_HEADER = NO; GCC_PREFIX_HEADER = ""; INFOPLIST_FILE = Info.plist; INSTALL_PATH = "@executable_path/../Frameworks"; @@ -243,9 +243,9 @@ isa = XCBuildConfiguration; buildSettings = { DYLIB_COMPATIBILITY_VERSION = 14; DYLIB_CURRENT_VERSION = 14; - FRAMEWORK_VERSION = 1.4.0; + FRAMEWORK_VERSION = 1.4.1beta08; GCC_PRECOMPILE_PREFIX_HEADER = NO; GCC_PREFIX_HEADER = ""; INFOPLIST_FILE = Info.plist; INSTALL_PATH = "@executable_path/../Frameworks"; diff -ru4NwbB libpng-1.4.0/scripts/makefile.32sunu libpng-1.4.1beta08/scripts/makefile.32sunu --- libpng-1.4.0/scripts/makefile.32sunu 2010-01-02 23:05:38.534505578 -0600 +++ libpng-1.4.1beta08/scripts/makefile.32sunu 2010-02-06 19:46:22.930537300 -0600 @@ -1,7 +1,7 @@ # makefile for libpng on Solaris 2.x with cc # Contributed by William L. Sebok, based on makefile.linux -# Copyright (C) 2002, 2006 Glenn Randers-Pehrson +# Copyright (C) 2002, 2006, 2010 Glenn Randers-Pehrson # Copyright (C) 1998 Greg Roelofs # Copyright (C) 1996, 1997 Andreas Dilger # This code is released under the libpng license. @@ -10,18 +10,14 @@ # Library name: LIBNAME=libpng%N% PNGMAJ = %SONUM% -PNGMIN = 1.4.1beta08 -PNGVER = $(PNGMAJ).$(PNGMIN) # Shared library names: LIBSO=$(LIBNAME).so LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) -LIBSOVER=$(LIBNAME).so.$(PNGVER) +LIBSOREL=$(LIBSOMAJ).$(RELEASE) OLDSO=libpng.so -OLDSOMAJ=libpng.so.%OLDNUM% -OLDSOVER=libpng.so.%OLDNUM%.$(PNGMIN) # Utilities: CC=cc AR_RC=ar rc @@ -112,12 +108,9 @@ $(LIBSO): $(LIBSOMAJ) $(LN_SF) $(LIBSOMAJ) $(LIBSO) -$(LIBSOMAJ): $(LIBSOVER) - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ) - -$(LIBSOVER): $(OBJSDLL) +$(LIBSOMAJ): $(OBJSDLL) @case "`type ld`" in *ucb*) \ echo; \ echo '## WARNING:'; \ echo '## The commands "CC" and "LD" must NOT refer to /usr/ucb/cc'; \ @@ -129,13 +122,9 @@ echo; \ ;; \ esac $(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h $(LIBSOMAJ) \ - -o $(LIBSOVER) $(OBJSDLL) - -$(OLDSOVER): $(OBJSDLL) - $(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h $(OLDSOMAJ) \ - -o $(OLDSOVER) $(OBJSDLL) + -o $(LIBSOMAJ) $(OBJSDLL) pngtest: pngtest.o $(LIBSO) $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) @@ -157,26 +146,18 @@ chmod 644 $(DL)/$(LIBNAME).a -@$(RM_F) $(DL)/libpng.a (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) -install-shared: install-headers $(LIBSOVER) libpng.pc \ - $(OLDSOVER) +install-shared: install-headers $(LIBSOMAJ) libpng.pc -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO) - -@$(RM_F) $(DL)/$(LIBSOMAJ) -@$(RM_F) $(DL)/$(LIBSO) + -@$(RM_F) $(DL)/$(LIBSOREL) -@$(RM_F) $(DL)/$(OLDSO) - -@$(RM_F) $(DL)/$(OLDSOMAJ) - -@$(RM_F) $(DL)/$(OLDSOMAJ).$(PNGVER)* - cp $(LIBSOVER) $(DL) - cp $(OLDSOVER) $(DL) - chmod 755 $(DL)/$(LIBSOVER) - chmod 755 $(DL)/$(OLDSOVER) + cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) + chmod 755 $(DL)/$(LIBSOREL) (cd $(DL); \ - $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \ - $(LN_SF) $(OLDSOMAJ) $(OLDSO); \ - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \ - $(LN_SF) $(LIBSOMAJ) $(LIBSO)) + $(LN_SF) $(LIBSOREL) $(LIBSO); \ + $(LN_SF) $(LIBSO) $(OLDSO)) -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc -@$(RM_F) $(DL)/pkgconfig/libpng.pc cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc @@ -228,9 +209,8 @@ clean: $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \ libpng-config $(LIBSO) $(LIBSOMAJ)* \ - $(OLDSOVER) \ libpng.pc DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO writelock: diff -ru4NwbB libpng-1.4.0/scripts/makefile.64sunu libpng-1.4.1beta08/scripts/makefile.64sunu --- libpng-1.4.0/scripts/makefile.64sunu 2010-01-02 23:05:38.545400951 -0600 +++ libpng-1.4.1beta08/scripts/makefile.64sunu 2010-02-06 19:46:22.941148589 -0600 @@ -1,7 +1,7 @@ # makefile for libpng on Solaris 2.x with cc # Contributed by William L. Sebok, based on makefile.linux -# Copyright (C) 2002, 2006 Glenn Randers-Pehrson +# Copyright (C) 2002, 2006, 2010 Glenn Randers-Pehrson # Copyright (C) 1998 Greg Roelofs # Copyright (C) 1996, 1997 Andreas Dilger # This code is released under the libpng license. @@ -10,18 +10,14 @@ # Library name: LIBNAME=libpng%N% PNGMAJ = %SONUM% -PNGMIN = 1.4.1beta08 -PNGVER = $(PNGMAJ).$(PNGMIN) # Shared library names: LIBSO=$(LIBNAME).so LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) -LIBSOVER=$(LIBNAME).so.$(PNGVER) +LIBSOREL=$(LIBSOMAJ).$(RELEASE) OLDSO=libpng.so -OLDSOMAJ=libpng.so.%OLDNUM% -OLDSOVER=libpng.so.%OLDNUM%.$(PNGMIN) # Utilities: CC=cc AR_RC=ar rc @@ -112,12 +108,9 @@ $(LIBSO): $(LIBSOMAJ) $(LN_SF) $(LIBSOMAJ) $(LIBSO) -$(LIBSOMAJ): $(LIBSOVER) - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ) - -$(LIBSOVER): $(OBJSDLL) +$(LIBSOMAJ): $(OBJSDLL) @case "`type ld`" in *ucb*) \ echo; \ echo '## WARNING:'; \ echo '## The commands "CC" and "LD" must NOT refer to /usr/ucb/cc'; \ @@ -129,13 +122,9 @@ echo; \ ;; \ esac $(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h $(LIBSOMAJ) \ - -o $(LIBSOVER) $(OBJSDLL) - -$(OLDSOVER): $(OBJSDLL) - $(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h $(OLDSOMAJ) \ - -o $(OLDSOVER) $(OBJSDLL) + -o $(LIBSOMAJ) $(OBJSDLL) pngtest: pngtest.o $(LIBSO) $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) @@ -157,26 +146,18 @@ chmod 644 $(DL)/$(LIBNAME).a -@$(RM_F) $(DL)/libpng.a (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) -install-shared: install-headers $(LIBSOVER) libpng.pc \ - $(OLDSOVER) +install-shared: install-headers $(LIBSOMAJ) libpng.pc -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO) - -@$(RM_F) $(DL)/$(LIBSOMAJ) -@$(RM_F) $(DL)/$(LIBSO) + -@$(RM_F) $(DL)/$(LIBSOREL) -@$(RM_F) $(DL)/$(OLDSO) - -@$(RM_F) $(DL)/$(OLDSOMAJ) - -@$(RM_F) $(DL)/$(OLDSOMAJ).$(PNGVER)* - cp $(LIBSOVER) $(DL) - cp $(OLDSOVER) $(DL) - chmod 755 $(DL)/$(LIBSOVER) - chmod 755 $(DL)/$(OLDSOVER) + cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) + chmod 755 $(DL)/$(LIBSOREL) (cd $(DL); \ - $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \ - $(LN_SF) $(OLDSOMAJ) $(OLDSO); \ - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \ - $(LN_SF) $(LIBSOMAJ) $(LIBSO)) + $(LN_SF) $(LIBSOREL) $(LIBSO); \ + $(LN_SF) $(LIBSO) $(OLDSO)) -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc -@$(RM_F) $(DL)/pkgconfig/libpng.pc cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc @@ -228,9 +209,8 @@ clean: $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \ libpng-config $(LIBSO) $(LIBSOMAJ)* \ - $(OLDSOVER) \ libpng.pc DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO writelock: diff -ru4NwbB libpng-1.4.0/scripts/makefile.aix libpng-1.4.1beta08/scripts/makefile.aix --- libpng-1.4.0/scripts/makefile.aix 2010-01-02 23:05:38.555099136 -0600 +++ libpng-1.4.1beta08/scripts/makefile.aix 2010-02-06 19:46:22.950805283 -0600 @@ -22,10 +22,8 @@ LN_SF = ln -f -s LIBNAME=libpng%N% PNGMAJ = %SONUM% -PNGMIN = 1.4.1beta08 -PNGVER = $(PNGMAJ).$(PNGMIN) prefix=/usr/local INCPATH=$(prefix)/include LIBPATH=$(prefix)/lib diff -ru4NwbB libpng-1.4.0/scripts/makefile.beos libpng-1.4.1beta08/scripts/makefile.beos --- libpng-1.4.0/scripts/makefile.beos 2010-01-02 23:05:38.575423720 -0600 +++ libpng-1.4.1beta08/scripts/makefile.beos 2010-02-06 19:46:22.970952086 -0600 @@ -1,7 +1,7 @@ # makefile for libpng on BeOS x86 ELF with gcc # modified from makefile.linux by Sander Stoks -# Copyright (C) 2002, 2006, 2008 Glenn Randers-Pehrson +# Copyright (C) 2002, 2006, 2008, 2010 Glenn Randers-Pehrson # Copyright (C) 1999 Greg Roelofs # Copyright (C) 1996, 1997 Andreas Dilger # # This code is released under the libpng license. @@ -10,18 +10,14 @@ # Library name: LIBNAME=libpng%N% PNGMAJ = %SONUM% -PNGMIN = 1.4.1beta08 -PNGVER = $(PNGMAJ).$(PNGMIN) # Shared library names: LIBSO=$(LIBNAME).so LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) -LIBSOVER=$(LIBNAME).so.$(PNGVER) +LIBSOREL=$(LIBSOMAJ).$(RELEASE) OLDSO=libpng.so -OLDSOMAJ=libpng.so.%OLDNUM% -OLDSOVER=libpng.so.%OLDNUM%.$(PNGMIN) # Utilities: CC=gcc AR_RC=ar rc @@ -104,18 +100,11 @@ $(LIBSO): $(LIBSOMAJ) $(LN_SF) $(LIBSOMAJ) $(LIBSO) cp $(LIBSO)* /boot/home/config/lib -$(LIBSOMAJ): $(LIBSOVER) - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ) - -$(LIBSOVER): $(OBJSDLL) +$(LIBSOMAJ): $(OBJSDLL) $(CC) -nostart -Wl,-soname,$(LIBSOMAJ) -o \ - $(LIBSOVER) $(OBJSDLL) $(LDFLAGS) - -$(OLDSOVER): $(OBJSDLL) - $(CC) -nostart -Wl,-soname,$(OLDSOMAJ) -o \ - $(OLDSOVER) $(OBJSDLL) $(LDFLAGS) + $(LIBSOMAJ) $(OBJSDLL) $(LDFLAGS) pngtest: pngtest.o $(LIBSO) $(CC) -L$(ZLIBLIB) -L. -lz -lpng%N% -o pngtest pngtest.o @@ -137,25 +126,19 @@ chmod 644 $(DL)/$(LIBNAME).a -@$(RM_F) $(DL)/libpng.a (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) -install-shared: install-headers $(LIBSOVER) libpng.pc \ - $(OLDSOVER) +install-shared: install-headers $(LIBSOMAJ) libpng.pc + -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO) - -@$(RM_F) $(DL)/$(LIBSOMAJ) + -@$(RM_F) $(DL)/$(LIBSO) + -@$(RM_F) $(DL)/$(LIBSOREL) -@$(RM_F) $(DL)/$(OLDSO) - -@$(RM_F) $(DL)/$(OLDSOMAJ) - -@$(RM_F) $(DL)/$(OLDSOVER)* - cp $(LIBSOVER) $(DL) - cp $(OLDSOVER) $(DL) - chmod 755 $(DL)/$(LIBSOVER) - chmod 755 $(DL)/$(OLDSOVER) + cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) + chmod 755 $(DL)/$(LIBSOREL) (cd $(DL); \ - $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \ - $(LN_SF) $(OLDSOMAJ) $(OLDSO); \ - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \ - $(LN_SF) $(LIBSOMAJ) $(LIBSO)) + $(LN_SF) $(LIBSOREL) $(LIBSO); \ + $(LN_SF) $(LIBSO) $(OLDSO)) -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc -@$(RM_F) $(DL)/pkgconfig/libpng.pc cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc @@ -205,9 +188,8 @@ clean: $(RM_F) *.o libpng.a pngtest pngout.png libpng-config \ $(LIBSO) $(LIBSOMAJ)* pngtesti \ - $(OLDSOVER) \ libpng.pc # DO NOT DELETE THIS LINE -- make depend depends on it. diff -ru4NwbB libpng-1.4.0/scripts/makefile.cegcc libpng-1.4.1beta08/scripts/makefile.cegcc --- libpng-1.4.0/scripts/makefile.cegcc 2010-01-02 23:05:38.594837276 -0600 +++ libpng-1.4.1beta08/scripts/makefile.cegcc 2010-02-06 19:46:22.990054901 -0600 @@ -27,9 +27,9 @@ VER = $(VERMAJ).$(VERMIN).$(VERMIC) NAME = libpng PACKAGE = $(NAME)-$(VER) -BIN = libpng%NN%-0.dll libpng-%OLDNUM%.dll +BIN = libpng%NN%-0.dll LIB = libpng%NN%.a libpng%NN%.dll.a libpng.a libpng.dll.a scripts/png32ce.def INCLUDE = %HEADERS% PC = libpng%NN%.pc libpng.pc @@ -63,9 +63,9 @@ @touch $(PACKAGE)-dev/manifest/$(PACKAGE)-dev.ver compilation: @echo " * Compilation of $(PACKAGE)" - cd $(PACKAGE) && CPPFLAGS="$(CPPFLAGS) -DPNG_BUILD_DLL -DPNG_CONSOLE_IO_SUPPORTED -DPNG_NO_MMX_CODE -D_WIN32_WCE=0x0420" CFLAGS="$(CFLAGS) -mms-bitfields -O3 -pipe -fomit-frame-pointer" LDFLAGS="$(LDFLAGS) -Wl,--enable-auto-import -Wl,-s" ./configure --prefix=/opt/wince --host=arm-mingw32ce && make + cd $(PACKAGE) && CPPFLAGS="$(CPPFLAGS) -DPNG_BUILD_DLL -DPNG_CONSOLE_IO_SUPPORTED -D_WIN32_WCE=0x0420" CFLAGS="$(CFLAGS) -mms-bitfields -O3 -pipe -fomit-frame-pointer" LDFLAGS="$(LDFLAGS) -Wl,--enable-auto-import -Wl,-s" ./configure --prefix=/opt/wince --host=arm-mingw32ce && make copy: @echo " * Copy of binary and development files" @for i in $(BIN); do \ diff -ru4NwbB libpng-1.4.0/scripts/makefile.cygwin libpng-1.4.1beta08/scripts/makefile.cygwin --- libpng-1.4.0/scripts/makefile.cygwin 2010-01-02 23:05:38.606170815 -0600 +++ libpng-1.4.1beta08/scripts/makefile.cygwin 2010-02-06 19:46:23.001119854 -0600 @@ -67,10 +67,8 @@ LIBNAME = libpng%N% PNGMAJ = %SONUM% CYGDLL = %N% -PNGMIN = 1.4.1beta08 -PNGVER = $(PNGMAJ).$(PNGMIN) SHAREDLIB=cygpng$(CYGDLL).dll STATLIB=libpng.a IMPLIB=libpng.dll.a @@ -131,9 +129,9 @@ cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \ -e s!@exec_prefix@!$(exec_prefix)! \ -e s!@libdir@!$(LIBPATH)! \ -e s!@includedir@!$(INCPATH)! \ - -e s!-lpng%N%!-lpng%N%\ -lz! > libpng.pc + -e s!-lpng%NN%!-lpng%NN%\ -lz! > libpng.pc libpng-config: scripts/libpng-config-head.in scripts/libpng-config-body.in @echo -e Making $(LIBNAME) libpng-config file for this libpng \ installation..'\n' using PREFIX=\"$(prefix)\"'\n' diff -ru4NwbB libpng-1.4.0/scripts/makefile.darwin libpng-1.4.1beta08/scripts/makefile.darwin --- libpng-1.4.0/scripts/makefile.darwin 2010-01-02 23:05:38.616919723 -0600 +++ libpng-1.4.1beta08/scripts/makefile.darwin 2010-02-06 19:46:23.014836122 -0600 @@ -1,6 +1,6 @@ # makefile for libpng on Darwin / Mac OS X -# Copyright (C) 2002, 2004, 2006, 2008 Glenn Randers-Pehrson +# Copyright (C) 2002, 2004, 2006, 2008, 2010 Glenn Randers-Pehrson # Copyright (C) 2001 Christoph Pfisterer # derived from makefile.linux: # Copyright (C) 1998, 1999 Greg Roelofs # Copyright (C) 1996, 1997 Andreas Dilger @@ -8,9 +8,9 @@ # This code is released under the libpng license. # For conditions of distribution and use, see the disclaimer # and license in png.h -# where "make install" puts libpng.a, libpng%N%.dylib, png.h and pngconf.h +# where "make install" puts libpng.a, libpng%NN%.dylib, png.h and pngconf.h prefix=/usr/local exec_prefix=$(prefix) # Where the zlib library and include files are located @@ -19,20 +19,16 @@ ZLIBLIB=../zlib ZLIBINC=../zlib # Library name: -LIBNAME = libpng%N% -PNGMAJ = %N% -PNGMIN = 1.4.1beta08 -PNGVER = $(PNGMAJ).$(PNGMIN) +LIBNAME = libpng%NN% +PNGMAJ = %NN% # Shared library names: LIBSO=$(LIBNAME).dylib LIBSOMAJ=$(LIBNAME).$(PNGMAJ).dylib -LIBSOVER=$(LIBNAME).$(PNGVER).dylib +LIBSOREL=$(LIBNAME).$(PNGMAJ).$(RELEASE).dylib OLDSO=libpng.dylib -OLDSOMAJ=libpng.%OLDNUM%.dylib -OLDSOVER=libpng.%OLDNUM%.$(PNGMIN).dylib # Utilities: CC=cc AR_RC=ar rc @@ -42,9 +38,9 @@ RM_F=/bin/rm -f # CFLAGS=-I$(ZLIBINC) -W -Wall -O3 -funroll-loops CFLAGS=-I$(ZLIBINC) -W -Wall -O -funroll-loops -LDFLAGS=-L. -L$(ZLIBLIB) -lpng%N% -lz +LDFLAGS=-L. -L$(ZLIBLIB) -lpng%NN% -lz INCPATH=$(prefix)/include LIBPATH=$(exec_prefix)/lib MANPATH=$(prefix)/man @@ -86,37 +82,27 @@ cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \ -e s!@exec_prefix@!$(exec_prefix)! \ -e s!@libdir@!$(LIBPATH)! \ -e s!@includedir@!$(INCPATH)! \ - -e s!-lpng%N%!-lpng%N%\ -lz! > libpng.pc + -e s!-lpng%NN%!-lpng%NN%\ -lz! > libpng.pc libpng-config: ( cat scripts/libpng-config-head.in; \ echo prefix=\"$(prefix)\"; \ echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \ echo L_opts=\"-L$(LIBPATH)\"; \ - echo libs=\"-lpng%N% -lz\"; \ + echo libs=\"-lpng%NN% -lz\"; \ cat scripts/libpng-config-body.in ) > libpng-config chmod +x libpng-config $(LIBSO): $(LIBSOMAJ) $(LN_SF) $(LIBSOMAJ) $(LIBSO) -$(LIBSOMAJ): $(LIBSOVER) - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ) - -$(LIBSOVER): $(OBJSDLL) +$(LIBSOMAJ): $(OBJSDLL) $(CC) -dynamiclib \ -install_name $(LIBPATH)/$(LIBSOMAJ) \ -current_version %SONUM% -compatibility_version %SONUM% \ - -o $(LIBSOVER) \ - $(OBJSDLL) -L$(ZLIBLIB) -lz - -$(OLDSOVER): $(OBJSDLL) - $(CC) -dynamiclib \ - -install_name $(LIBPATH)/$(OLDSOMAJ) \ - -current_version %OLDNUM% -compatibility_version %OLDNUM% \ - -o $(OLDSOVER) \ + -o $(LIBSOMAJ) \ $(OBJSDLL) -L$(ZLIBLIB) -lz pngtest: pngtest.o $(LIBSO) $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) @@ -140,26 +126,18 @@ $(RANLIB) $(DL)/$(LIBNAME).a -@$(RM_F) $(DL)/libpng.a (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) -install-shared: install-headers $(LIBSO) libpng.pc \ - $(OLDSOVER) +install-shared: install-headers $(LIBSOMAJ) libpng.pc -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - -@$(RM_F) $(DL)/$(LIBNAME).$(PNGVER)*.dylib - -@$(RM_F) $(DL)/$(LIBNAME).$(PNGMAJ)*.dylib -@$(RM_F) $(DL)/$(LIBSO) + -@$(RM_F) $(DL)/$(LIBSOREL) -@$(RM_F) $(DL)/$(OLDSO) - -@$(RM_F) $(DL)/$(OLDSOMAJ) - -@$(RM_F) $(DL)/libpng.3.$(PNGMIN)*.dylib - cp $(LIBSOVER) $(DL) - cp $(OLDSOVER) $(DL) - chmod 755 $(DL)/$(LIBSOVER) - chmod 755 $(DL)/$(OLDSOVER) + cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) + chmod 755 $(DL)/$(LIBSOREL) (cd $(DL); \ - $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \ - $(LN_SF) $(OLDSOMAJ) $(OLDSO); \ - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \ - $(LN_SF) $(LIBSOMAJ) $(LIBSO)) + $(LN_SF) $(LIBSOREL) $(LIBSO); \ + $(LN_SF) $(LIBSO) $(OLDSO)) -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc -@$(RM_F) $(DL)/pkgconfig/libpng.pc cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc @@ -208,9 +186,8 @@ ./pngtesti pngtest.png clean: $(RM_F) *.o libpng.a pngtest pngout.png libpng-config \ - $(OLDSOVER) \ libpng.pc $(LIBNAME).*dylib pngtesti DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO writelock: diff -ru4NwbB libpng-1.4.0/scripts/makefile.dec libpng-1.4.1beta08/scripts/makefile.dec --- libpng-1.4.0/scripts/makefile.dec 2010-01-02 23:05:38.627446223 -0600 +++ libpng-1.4.1beta08/scripts/makefile.dec 2010-02-06 19:46:23.025375667 -0600 @@ -1,25 +1,21 @@ # makefile for libpng on DEC Alpha Unix -# Copyright (C) 2000-2002, 2006 Glenn Randers-Pehrson +# Copyright (C) 2000-2002, 2006, 2010 Glenn Randers-Pehrson # Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. # # This code is released under the libpng license. # For conditions of distribution and use, see the disclaimer # and license in png.h # Library name: PNGMAJ = %SONUM% -PNGMIN = 1.4.1beta08 -PNGVER = $(PNGMAJ).$(PNGMIN) LIBNAME = libpng%N% # Shared library names: LIBSO=$(LIBNAME).so LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) -LIBSOVER=$(LIBNAME).so.$(PNGVER) +LIBSOREL=$(LIBSOMAJ).$(RELEASE) OLDSO=libpng.so -OLDSOMAJ=libpng.so.%OLDNUM% -OLDSOVER=libpng.so.%OLDNUM%.$(PNGMIN) # Utilities: AR_RC=ar rc CC=cc @@ -89,19 +85,12 @@ $(LIBSO): $(LIBSOMAJ) $(LN_SF) $(LIBSOMAJ) $(LIBSO) -$(LIBSOMAJ): $(LIBSOVER) - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ) - -$(LIBSOVER): $(OBJS) +$(LIBSOMAJ): $(OBJS) $(CC) -shared -o $@ $(OBJS) -L$(ZLIBLIB) \ -soname $(LIBSOMAJ) -$(OLDSOVER): $(OBJS) - $(CC) -shared -o $@ $(OBJS) -L$(ZLIBLIB) \ - -soname $(OLDSOMAJ) - pngtest: pngtest.o libpng.a $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) test: pngtest @@ -122,31 +111,24 @@ chmod 644 $(DL)/$(LIBNAME).a -@/bin/rm -f $(DL)/libpng.a (cd $(DL); $(LN_SF)(LIBNAME).a libpng.a) -install-shared: install-headers $(LIBSOVER) libpng.pc \ - $(OLDSOVER) +install-shared: install-headers $(LIBSOMAJ) libpng.pc -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - -@/bin/rm -f $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO) - -@/bin/rm -f $(DL)/$(LIBSOMAJ) - -@/bin/rm -f $(DL)/$(OLDSO) - -@/bin/rm -f $(DL)/$(OLDSOMAJ) - -@/bin/rm -f $(DL)/$(OLDSOVER)* - cp $(LIBSOVER) $(DL) - cp $(OLDSOVER) $(DL) - chmod 755 $(DL)/$(LIBSOVER) - chmod 755 $(DL)/$(OLDSOVER) + -@$(RM_F) $(DL)/$(LIBSO) + -@$(RM_F) $(DL)/$(LIBSOREL) + -@$(RM_F) $(DL)/$(OLDSO) + cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) + chmod 755 $(DL)/$(LIBSOREL) (cd $(DL); \ - $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \ - $(LN_SF) $(OLDSOMAJ) $(OLDSO); \ - $(LN_SF)(LIBSOVER) $(LIBSOMAJ); \ - $(LN_SF)(LIBSOMAJ) $(LIBSO)) + $(LN_SF) $(LIBSOREL) $(LIBSO); \ + $(LN_SF) $(LIBSO) $(OLDSO)) -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi - -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc - -@/bin/rm -f $(DL)/pkgconfig/libpng.pc + -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc + -@$(RM_F) $(DL)/pkgconfig/libpng.pc cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc - (cd $(DL)/pkgconfig; $(LN_SF)(LIBNAME).pc libpng.pc) + (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc) install-man: libpng.3 libpngpf.3 png.5 -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi @@ -192,9 +174,8 @@ clean: /bin/rm -f *.o libpng.a pngtest pngtesti pngout.png \ libpng-config $(LIBSO) $(LIBSOMAJ)* \ - $(OLDSOVER) \ libpng.pc # DO NOT DELETE THIS LINE -- make depend depends on it. diff -ru4NwbB libpng-1.4.0/scripts/makefile.elf libpng-1.4.1beta08/scripts/makefile.elf --- libpng-1.4.0/scripts/makefile.elf 2010-01-02 23:05:38.647844263 -0600 +++ libpng-1.4.1beta08/scripts/makefile.elf 2010-02-06 19:46:23.045639957 -0600 @@ -1,6 +1,6 @@ # makefile for libpng.a and libpng%N%.so on Linux ELF with gcc -# Copyright (C) 1998, 1999, 2002, 2006, 2008 Greg Roelofs +# Copyright (C) 1998, 1999, 2002, 2006, 2008, 2010 Greg Roelofs # and Glenn Randers-Pehrson # Copyright (C) 1996, 1997 Andreas Dilger # # This code is released under the libpng license. @@ -15,18 +15,15 @@ # Library name: LIBNAME = libpng%N% PNGMAJ = %SONUM% -PNGMIN = 1.4.1beta08 -PNGVER = $(PNGMAJ).$(PNGMIN) # Shared library names: LIBSO=$(LIBNAME).so LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) -LIBSOVER=$(LIBNAME).so.$(PNGVER) +LIBSOREL=$(LIBSOMAJ).$(RELEASE) OLDSO=libpng.so OLDSOMAJ=libpng.so.%OLDNUM% -OLDSOVER=libpng.so.%OLDNUM%.$(PNGMIN) # Utilities: AR_RC=ar rc CC=gcc @@ -135,21 +132,12 @@ $(LIBSO): $(LIBSOMAJ) $(LN_SF) $(LIBSOMAJ) $(LIBSO) -$(LIBSOMAJ): $(LIBSOVER) - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ) - -$(LIBSOVER): $(OBJSDLL) libpng.syms +$(LIBSOMAJ): $(OBJSDLL) libpng.syms $(CC) -shared -Wl,-soname,$(LIBSOMAJ) \ -Wl,-version-script,libpng.syms \ - -o $(LIBSOVER) \ - $(OBJSDLL) - -$(OLDSOVER): $(OBJSDLL) libpng.syms - $(CC) -shared -Wl,-soname,$(OLDSOMAJ) \ - -Wl,-version-script,libpng.syms \ - -o $(OLDSOVER) \ + -o $(LIBSOMAJ) \ $(OBJSDLL) pngtest: pngtest.o $(LIBSO) $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) @@ -182,25 +170,18 @@ chmod 644 $(DL)/$(LIBNAME).a -@$(RM_F) $(DL)/libpng.a (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) -install-shared: install-headers $(LIBSOVER) libpng.pc \ - $(OLDSOVER) +install-shared: install-headers $(LIBSOMAJ) libpng.pc -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO) - -@$(RM_F) $(DL)/$(LIBSOMAJ) + -@$(RM_F) $(DL)/$(LIBSO) + -@$(RM_F) $(DL)/$(LIBSOREL) -@$(RM_F) $(DL)/$(OLDSO) - -@$(RM_F) $(DL)/$(OLDSOMAJ) - -@$(RM_F) $(DL)/$(OLDSOVER)* - cp $(LIBSOVER) $(DL) - cp $(OLDSOVER) $(DL) - chmod 755 $(DL)/$(LIBSOVER) - chmod 755 $(DL)/$(OLDSOVER) + cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) + chmod 755 $(DL)/$(LIBSOREL) (cd $(DL); \ - $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \ - $(LN_SF) $(OLDSOMAJ) $(OLDSO); \ - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \ - $(LN_SF) $(LIBSOMAJ) $(LIBSO)) + $(LN_SF) $(LIBSOREL) $(LIBSO); \ + $(LN_SF) $(LIBSO) $(OLDSO)) -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc -@$(RM_F) $(DL)/pkgconfig/libpng.pc cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc @@ -250,9 +231,8 @@ clean: $(RM_F) *.o libpng.a libpng.syms pngtest pngout.png libpng-config \ $(LIBSO) $(LIBSOMAJ)* pngtest-static pngtesti \ - $(OLDSOVER) \ libpng.pc DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO writelock: diff -ru4NwbB libpng-1.4.0/scripts/makefile.hp64 libpng-1.4.1beta08/scripts/makefile.hp64 --- libpng-1.4.0/scripts/makefile.hp64 2010-01-02 23:05:38.677099181 -0600 +++ libpng-1.4.1beta08/scripts/makefile.hp64 2010-02-06 19:46:23.075398810 -0600 @@ -1,6 +1,6 @@ # makefile for libpng, HPUX (10.20 and 11.00) using the ANSI/C product. -# Copyright (C) 1999-2002, 2006, 2009 Glenn Randers-Pehrson +# Copyright (C) 1999-2002, 2006, 2009, 2010 Glenn Randers-Pehrson # Copyright (C) 1995 Guy Eric Schalnat, Group 42 # contributed by Jim Rice and updated by Chris Schleicher, Hewlett Packard # # This code is released under the libpng license. @@ -20,18 +20,14 @@ # Library name: LIBNAME = libpng%N% PNGMAJ = %SONUM% -PNGMIN = 1.4.1beta08 -PNGVER = $(PNGMAJ).$(PNGMIN) # Shared library names: LIBSO=$(LIBNAME).sl LIBSOMAJ=$(LIBNAME).sl.$(PNGMAJ) -LIBSOVER=$(LIBNAME).sl.$(PNGVER) +LIBSOREL=$(LIBSOMAJ).$(RELEASE) OLDSO=libpng.sl -OLDSOMAJ=libpng.sl.%OLDNUM% -OLDSOVER=libpng.sl.%OLDNUM%.$(PNGMIN) # Utilities: AR_RC=ar rc CC=cc @@ -107,18 +103,11 @@ $(LIBSO): $(LIBSOMAJ) $(LN_SF) $(LIBSOMAJ) $(LIBSO) -$(LIBSOMAJ): $(LIBSOVER) - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ) - -$(LIBSOVER): $(OBJSDLL) - $(LD) -b +s \ - +h $(LIBSOMAJ) -o $(LIBSOVER) $(OBJSDLL) - -$(OLDSOVER): $(OBJSDLL) +$(LIBSOMAJ): $(OBJSDLL) $(LD) -b +s \ - +h $(OLDSOMAJ) -o $(OLDSOVER) $(OBJSDLL) + +h $(LIBSOMAJ) -o $(LIBSOMAJ) $(OBJSDLL) pngtest: pngtest.o libpng.a $(CC) -o pngtest $(CCFLAGS) pngtest.o $(LDFLAGS) @@ -140,25 +129,18 @@ chmod 644 $(DL)/$(LIBNAME).a -@$(RM_F) $(DL)/libpng.a (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) -install-shared: install-headers $(LIBSOVER) libpng.pc \ - $(OLDSOVER) +install-shared: install-headers $(LIBSOMAJ) libpng.pc -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO) - -@$(RM_F) $(DL)/$(LIBSOMAJ) + -@$(RM_F) $(DL)/$(LIBSO) + -@$(RM_F) $(DL)/$(LIBSOREL) -@$(RM_F) $(DL)/$(OLDSO) - -@$(RM_F) $(DL)/$(OLDSOMAJ) - -@$(RM_F) $(DL)/$(OLDSOVER)* - cp $(LIBSOVER) $(DL) - cp $(OLDSOVER) $(DL) - chmod 755 $(DL)/$(LIBSOVER) - chmod 755 $(DL)/$(OLDSOVER) + cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) + chmod 755 $(DL)/$(LIBSOREL) (cd $(DL); \ - $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \ - $(LN_SF) $(OLDSOMAJ) $(OLDSO); \ - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \ - $(LN_SF) $(LIBSOMAJ) $(LIBSO)) + $(LN_SF) $(LIBSOREL) $(LIBSO); \ + $(LN_SF) $(LIBSO) $(OLDSO)) -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc -@$(RM_F) $(DL)/pkgconfig/libpng.pc cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc @@ -210,9 +192,8 @@ clean: $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \ libpng-config $(LIBSO) $(LIBSOMAJ)* \ - $(OLDSOVER) \ libpng.pc DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO writelock: diff -ru4NwbB libpng-1.4.0/scripts/makefile.hpgcc libpng-1.4.1beta08/scripts/makefile.hpgcc --- libpng-1.4.0/scripts/makefile.hpgcc 2010-01-02 23:05:38.687891413 -0600 +++ libpng-1.4.1beta08/scripts/makefile.hpgcc 2010-02-06 19:46:23.085834485 -0600 @@ -1,6 +1,6 @@ # makefile for libpng on HP-UX using GCC with the HP ANSI/C linker. -# Copyright (C) 2002, 2006-2008 Glenn Randers-Pehrson +# Copyright (C) 2002, 2006-2008, 2010 Glenn Randers-Pehrson # Copyright (C) 2001, Laurent faillie # Copyright (C) 1998, 1999 Greg Roelofs # Copyright (C) 1996, 1997 Andreas Dilger # @@ -10,18 +10,14 @@ # Library name: LIBNAME = libpng%N% PNGMAJ = %SONUM% -PNGMIN = 1.4.1beta08 -PNGVER = $(PNGMAJ).$(PNGMIN) # Shared library names: LIBSO=$(LIBNAME).sl LIBSOMAJ=$(LIBNAME).sl.$(PNGMAJ) -LIBSOVER=$(LIBNAME).sl.$(PNGVER) +LIBSOREL=$(LIBSOMAJ).$(RELEASE) OLDSO=libpng.sl -OLDSOMAJ=libpng.sl.%OLDNUM% -OLDSOVER=libpng.sl.%OLDNUM%.$(PNGMIN) # Utilities: CC=gcc LD=ld @@ -115,18 +111,11 @@ $(LIBSO): $(LIBSOMAJ) $(LN_SF) $(LIBSOMAJ) $(LIBSO) -$(LIBSOMAJ): $(LIBSOVER) - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ) - -$(LIBSOVER): $(OBJSDLL) - $(LD) -b +s \ - +h $(LIBSOMAJ) -o $(LIBSOVER) $(OBJSDLL) - -$(OLDSOVER): $(OBJSDLL) +$(LIBSOMAJ): $(OBJSDLL) $(LD) -b +s \ - +h $(OLDSOMAJ) -o $(OLDSOVER) $(OBJSDLL) + +h $(LIBSOMAJ) -o $(LIBSOMAJ) $(OBJSDLL) pngtest: pngtest.o $(LIBSO) $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) @@ -149,25 +138,18 @@ chmod 644 $(DL)/$(LIBNAME).a -@$(RM_F) $(DL)/libpng.a (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) -install-shared: install-headers $(LIBSOVER) libpng.pc \ - $(OLDSOVER) +install-shared: install-headers $(LIBSOMAJ) libpng.pc -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO) - -@$(RM_F) $(DL)/$(LIBSOMAJ) + -@$(RM_F) $(DL)/$(LIBSO) + -@$(RM_F) $(DL)/$(LIBSOREL) -@$(RM_F) $(DL)/$(OLDSO) - -@$(RM_F) $(DL)/$(OLDSOMAJ) - -@$(RM_F) $(DL)/$(OLDSOVER)* - cp $(LIBSOVER) $(DL) - cp $(OLDSOVER) $(DL) - chmod 755 $(DL)/$(LIBSOVER) - chmod 755 $(DL)/$(OLDSOVER) + cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) + chmod 755 $(DL)/$(LIBSOREL) (cd $(DL); \ - $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \ - $(LN_SF) $(OLDSOMAJ) $(OLDSO); \ - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \ - $(LN_SF) $(LIBSOMAJ) $(LIBSO)) + $(LN_SF) $(LIBSOREL) $(LIBSO); \ + $(LN_SF) $(LIBSO) $(OLDSO)) -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc -@$(RM_F) $(DL)/pkgconfig/libpng.pc cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc @@ -219,9 +201,8 @@ clean: $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \ libpng-config $(LIBSO) $(LIBSOMAJ)* \ - $(OLDSOVER) \ libpng.pc DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO writelock: diff -ru4NwbB libpng-1.4.0/scripts/makefile.hpux libpng-1.4.1beta08/scripts/makefile.hpux --- libpng-1.4.0/scripts/makefile.hpux 2010-01-02 23:05:38.698504292 -0600 +++ libpng-1.4.1beta08/scripts/makefile.hpux 2010-02-06 19:46:23.096236630 -0600 @@ -1,6 +1,6 @@ # makefile for libpng, HPUX (10.20 and 11.00) using the ANSI/C product. -# Copyright (C) 1999-2002, 2006 Glenn Randers-Pehrson +# Copyright (C) 1999-2002, 2006, 2010 Glenn Randers-Pehrson # Copyright (C) 1995 Guy Eric Schalnat, Group 42 # contributed by Jim Rice and updated by Chris Schleicher, Hewlett Packard # # This code is released under the libpng license. @@ -20,18 +20,14 @@ # Library name: LIBNAME = libpng%N% PNGMAJ = %SONUM% -PNGMIN = 1.4.1beta08 -PNGVER = $(PNGMAJ).$(PNGMIN) # Shared library names: LIBSO=$(LIBNAME).sl LIBSOMAJ=$(LIBNAME).sl.$(PNGMAJ) -LIBSOVER=$(LIBNAME).sl.$(PNGVER) +LIBSOREL=$(LIBSOMAJ).$(RELEASE) OLDSO=libpng.sl -OLDSOMAJ=libpng.sl.%OLDNUM% -OLDSOVER=libpng.sl.%OLDNUM%.$(PNGMIN) # Utilities: AR_RC=ar rc CC=cc @@ -104,18 +100,11 @@ $(LIBSO): $(LIBSOMAJ) $(LN_SF) $(LIBSOMAJ) $(LIBSO) -$(LIBSOMAJ): $(LIBSOVER) - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ) - -$(LIBSOVER): $(OBJSDLL) - $(LD) -b +s \ - +h $(LIBSOMAJ) -o $(LIBSOVER) $(OBJSDLL) - -$(OLDSOVER): $(OBJSDLL) +$(LIBSOMAJ): $(OBJSDLL) $(LD) -b +s \ - +h $(OLDSOMAJ) -o $(OLDSOVER) $(OBJSDLL) + +h $(LIBSOMAJ) -o $(LIBSOMAJ) $(OBJSDLL) pngtest: pngtest.o libpng.a $(CC) -o pngtest $(CCFLAGS) pngtest.o $(LDFLAGS) @@ -137,25 +126,18 @@ chmod 644 $(DL)/$(LIBNAME).a -@$(RM_F) $(DL)/libpng.a (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) -install-shared: install-headers $(LIBSOVER) libpng.pc \ - $(OLDSOVER) +install-shared: install-headers $(LIBSOMAJ) libpng.pc -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO) - -@$(RM_F) $(DL)/$(LIBSOMAJ) + -@$(RM_F) $(DL)/$(LIBSO) + -@$(RM_F) $(DL)/$(LIBSOREL) -@$(RM_F) $(DL)/$(OLDSO) - -@$(RM_F) $(DL)/$(OLDSOMAJ) - -@$(RM_F) $(DL)/$(OLDSOVER)* - cp $(LIBSOVER) $(DL) - cp $(OLDSOVER) $(DL) - chmod 755 $(DL)/$(LIBSOVER) - chmod 755 $(DL)/$(OLDSOVER) + cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) + chmod 755 $(DL)/$(LIBSOREL) (cd $(DL); \ - $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \ - $(LN_SF) $(OLDSOMAJ) $(OLDSO); \ - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \ - $(LN_SF) $(LIBSOMAJ) $(LIBSO)) + $(LN_SF) $(LIBSOREL) $(LIBSO); \ + $(LN_SF) $(LIBSO) $(OLDSO)) -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc -@$(RM_F) $(DL)/pkgconfig/libpng.pc cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc @@ -207,9 +189,8 @@ clean: $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \ libpng-config $(LIBSO) $(LIBSOMAJ)* \ - $(OLDSOVER) \ libpng.pc DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO writelock: diff -ru4NwbB libpng-1.4.0/scripts/makefile.linux libpng-1.4.1beta08/scripts/makefile.linux --- libpng-1.4.0/scripts/makefile.linux 2010-01-02 23:05:38.738777069 -0600 +++ libpng-1.4.1beta08/scripts/makefile.linux 2010-02-06 19:46:23.137184924 -0600 @@ -1,6 +1,6 @@ # makefile for libpng.a and libpng%N%.so on Linux ELF with gcc -# Copyright (C) 1998, 1999, 2002, 2006, 2008 Greg Roelofs and +# Copyright (C) 1998, 1999, 2002, 2006, 2008, 2010 Greg Roelofs and # Glenn Randers-Pehrson # Copyright (C) 1996, 1997 Andreas Dilger # # This code is released under the libpng license. @@ -9,18 +9,15 @@ # Library name: LIBNAME = libpng%N% PNGMAJ = %SONUM% -PNGMIN = 1.4.1beta08 -PNGVER = $(PNGMAJ).$(PNGMIN) +RELEASE = %RELEASE% # Shared library names: LIBSO=$(LIBNAME).so LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) -LIBSOVER=$(LIBNAME).so.$(PNGVER) +LIBSOREL=$(LIBSOMAJ).$(RELEASE) OLDSO=libpng.so -OLDSOMAJ=libpng.so.%OLDNUM% -OLDSOVER=libpng.so.%OLDNUM%.$(PNGMIN) # Utilities: AR_RC=ar rc CC=gcc @@ -113,18 +110,10 @@ $(LIBSO): $(LIBSOMAJ) $(LN_SF) $(LIBSOMAJ) $(LIBSO) -$(LIBSOMAJ): $(LIBSOVER) - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ) - -$(LIBSOVER): $(OBJSDLL) - $(CC) -shared -Wl,-soname,$(LIBSOMAJ) -o $(LIBSOVER) $(OBJSDLL) - -$(OLDSOVER): $(OBJSDLL) - $(CC) -shared -Wl,-soname,$(OLDSOMAJ) \ - -o $(OLDSOVER) \ - $(OBJSDLL) +$(LIBSOMAJ): $(OBJSDLL) + $(CC) -shared -Wl,-soname,$(LIBSOMAJ) -o $(LIBSOMAJ) $(OBJSDLL) pngtest: pngtest.o $(LIBSO) $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) @@ -156,25 +145,19 @@ chmod 644 $(DL)/$(LIBNAME).a -@$(RM_F) $(DL)/libpng.a (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) -install-shared: install-headers $(LIBSOVER) libpng.pc \ - $(OLDSOVER) +install-shared: install-headers $(LIBSOMAJ) libpng.pc -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO) - -@$(RM_F) $(DL)/$(LIBSOMAJ) + -@$(RM_F) $(DL)/$(LIBSO) + -@$(RM_F) $(DL)/$(LIBSOREL) -@$(RM_F) $(DL)/$(OLDSO) - -@$(RM_F) $(DL)/$(OLDSOMAJ) - -@$(RM_F) $(DL)/$(OLDSOVER)* - cp $(LIBSOVER) $(DL) - cp $(OLDSOVER) $(DL) - chmod 755 $(DL)/$(LIBSOVER) - chmod 755 $(DL)/$(OLDSOVER) + cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) + chmod 755 $(DL)/$(LIBSOREL) (cd $(DL); \ - $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \ - $(LN_SF) $(OLDSOMAJ) $(OLDSO); \ - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \ - $(LN_SF) $(LIBSOMAJ) $(LIBSO)) + $(LN_SF) $(LIBSOREL) $(LIBSO); \ + $(LN_SF) $(LIBSO) $(OLDSO)) + -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc -@$(RM_F) $(DL)/pkgconfig/libpng.pc cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc @@ -224,9 +207,8 @@ clean: $(RM_F) *.o libpng.a pngtest pngout.png libpng-config \ $(LIBSO) $(LIBSOMAJ)* pngtest-static pngtesti \ - $(OLDSOVER) \ libpng.pc DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO writelock: diff -ru4NwbB libpng-1.4.0/scripts/makefile.mingw libpng-1.4.1beta08/scripts/makefile.mingw --- libpng-1.4.0/scripts/makefile.mingw 2010-01-02 23:05:38.749921265 -0600 +++ libpng-1.4.1beta08/scripts/makefile.mingw 2010-02-06 19:46:23.148242674 -0600 @@ -64,13 +64,11 @@ CFLAGS= $(strip $(MINGW_CCFLAGS) $(addprefix -I,$(ZLIBINC)) \ -W -Wall -O3 $(ALIGN) -funroll-loops \ -fomit-frame-pointer) # $(WARNMORE) -g -DPNG_DEBUG=5 -LIBNAME = libpng%N% +LIBNAME = libpng%NN% PNGMAJ = %SONUM% -MINGDLL = %N% -PNGMIN = 1.4.1beta08 -PNGVER = $(PNGMAJ).$(PNGMIN) +MINGDLL = %NN% SHAREDLIB=libpng$(MINGDLL).dll STATLIB=libpng.a IMPLIB=libpng.dll.a @@ -128,9 +126,9 @@ -e s!@exec_prefix@!$(exec_prefix)! \ -e s!@libdir@!$(LIBPATH)! \ -e s!@includedir@!$(INCPATH)! \ -e s!@includedir@!$(INCPATH)! \ - -e s!-lpng%N%!-lpng%N%\ -lz\ -lm! > libpng.pc + -e s!-lpng%NN%!-lpng%NN%\ -lz\ -lm! > libpng.pc libpng-config: scripts/libpng-config-head.in scripts/libpng-config-body.in @echo -e Making $(LIBNAME) libpng-config file for this libpng \ installation..'\n' using PREFIX=\"$(prefix)\"'\n' @@ -235,18 +233,18 @@ test-dd: echo echo Testing installed dynamic shared library in $(DL). $(CC) -I$(DI) $(CFLAGS) \ - `$(BINPATH)/libpng%N%-config --cflags` pngtest.c \ + `$(BINPATH)/libpng%NN%-config --cflags` pngtest.c \ -L$(DL) -L$(ZLIBLIB) \ - -o pngtestd `$(BINPATH)/libpng%N%-config --ldflags` + -o pngtestd `$(BINPATH)/libpng%NN%-config --ldflags` ./pngtestd pngtest.png test-installed: $(CC) $(CFLAGS) \ - `$(BINPATH)/libpng%N%-config --cflags` pngtest.c \ + `$(BINPATH)/libpng%NN%-config --cflags` pngtest.c \ -L$(ZLIBLIB) \ - -o pngtesti$(EXE) `$(BINPATH)/libpng%N%-config --ldflags` + -o pngtesti$(EXE) `$(BINPATH)/libpng%NN%-config --ldflags` ./pngtesti$(EXE) pngtest.png clean: /bin/rm -f *.pic.o *.o $(STATLIB) $(IMPLIB) $(SHAREDLIB) \ diff -ru4NwbB libpng-1.4.0/scripts/makefile.ne12bsd libpng-1.4.1beta08/scripts/makefile.ne12bsd --- libpng-1.4.0/scripts/makefile.ne12bsd 2010-01-02 23:05:38.778466818 -0600 +++ libpng-1.4.1beta08/scripts/makefile.ne12bsd 2010-02-06 19:46:23.176451014 -0600 @@ -12,11 +12,11 @@ LOCALBASE?=/usr/local LIBDIR= ${LOCALBASE}/lib MANDIR= ${LOCALBASE}/man -INCSDIR=${LOCALBASE}/include/libpng%N% +INCSDIR=${LOCALBASE}/include/libpng%NN% -LIB= png%N% +LIB= png%NN% SHLIB_MAJOR= 0 SHLIB_MINOR= 1.4.1beta08 SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \ pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \ diff -ru4NwbB libpng-1.4.0/scripts/makefile.sco libpng-1.4.1beta08/scripts/makefile.sco --- libpng-1.4.0/scripts/makefile.sco 2010-01-02 23:05:38.817145823 -0600 +++ libpng-1.4.1beta08/scripts/makefile.sco 2010-02-06 19:46:23.215092134 -0600 @@ -1,8 +1,8 @@ # makefile for SCO OSr5 ELF and Unixware 7 with Native cc # Contributed by Mike Hopkirk (hops@sco.com) modified from Makefile.lnx # force ELF build dynamic linking, SONAME setting in lib and RPATH in app -# Copyright (C) 2002, 2006 Glenn Randers-Pehrson +# Copyright (C) 2002, 2006, 2010 Glenn Randers-Pehrson # Copyright (C) 1998 Greg Roelofs # Copyright (C) 1996, 1997 Andreas Dilger # # This code is released under the libpng license. @@ -11,18 +11,14 @@ # Library name: LIBNAME = libpng%N% PNGMAJ = %SONUM% -PNGMIN = 1.4.1beta08 -PNGVER = $(PNGMAJ).$(PNGMIN) # Shared library names: LIBSO=$(LIBNAME).so LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) -LIBSOVER=$(LIBNAME).so.$(PNGVER) +LIBSOREL=$(LIBSOMAJ).$(RELEASE) OLDSO=libpng.so -OLDSOMAJ=libpng.so.%OLDNUM% -OLDSOVER=libpng.so.%OLDNUM%.$(PNGMIN) # Utilities: CC=cc AR_RC=ar rc @@ -100,17 +96,10 @@ $(LIBSO): $(LIBSOMAJ) $(LN_SF) $(LIBSOMAJ) $(LIBSO) -$(LIBSOMAJ): $(LIBSOVER) - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ) - -$(LIBSOVER): $(OBJSDLL) - $(CC) -G -Wl,-h,$(LIBSOMAJ) -o $(LIBSOVER) \ - $(OBJSDLL) - -$(OLDSOVER): $(OBJSDLL) - $(CC) -G -Wl,-h,$(OLDSOMAJ) -o $(OLDSOVER) \ +$(LIBSOMAJ): $(OBJSDLL) + $(CC) -G -Wl,-h,$(LIBSOMAJ) -o $(LIBSOMAJ) \ $(OBJSDLL) pngtest: pngtest.o $(LIBSO) LD_RUN_PATH=.:$(ZLIBLIB) $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) @@ -135,25 +124,18 @@ chmod 644 $(DL)/$(LIBNAME).a -@$(RM_F) $(DL)/libpng.a (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) -install-shared: install-headers $(LIBSOVER) libpng.pc \ - $(OLDSOVER) +install-shared: install-headers $(LIBSOMAJ) libpng.pc -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO) - -@$(RM_F) $(DL)/$(LIBSOMAJ) + -@$(RM_F) $(DL)/$(LIBSO) + -@$(RM_F) $(DL)/$(LIBSOREL) -@$(RM_F) $(DL)/$(OLDSO) - -@$(RM_F) $(DL)/$(OLDSOMAJ) - -@$(RM_F) $(DL)/$(OLDSOVER)* - cp $(LIBSOVER) $(DL) - cp $(OLDSOVER) $(DL) - chmod 755 $(DL)/$(LIBSOVER) - chmod 755 $(DL)/$(OLDSOVER) + cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) + chmod 755 $(DL)/$(LIBSOREL) (cd $(DL); \ - $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \ - $(LN_SF) $(OLDSOMAJ) $(OLDSO); \ - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \ - $(LN_SF) $(LIBSOMAJ) $(LIBSO)) + $(LN_SF) $(LIBSOREL) $(LIBSO); \ + $(LN_SF) $(LIBSO) $(OLDSO)) -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc -@$(RM_F) $(DL)/pkgconfig/libpng.pc cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc @@ -203,9 +185,8 @@ clean: $(RM_F) *.o libpng.a pngtest pngout.png libpng-config \ $(LIBSO) $(LIBSOMAJ)* pngtest-static pngtesti \ - $(OLDSOVER) \ libpng.pc DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO writelock: diff -ru4NwbB libpng-1.4.0/scripts/makefile.sggcc libpng-1.4.1beta08/scripts/makefile.sggcc --- libpng-1.4.0/scripts/makefile.sggcc 2010-01-02 23:05:38.828045789 -0600 +++ libpng-1.4.1beta08/scripts/makefile.sggcc 2010-02-06 19:46:23.225714738 -0600 @@ -1,6 +1,6 @@ # makefile for libpng.a and libpng%N%.so, SGI IRIX with 'cc' -# Copyright (C) 2001-2002, 2006 Glenn Randers-Pehrson +# Copyright (C) 2001-2002, 2006, 2010 Glenn Randers-Pehrson # Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. # # This code is released under the libpng license. # For conditions of distribution and use, see the disclaimer @@ -8,18 +8,14 @@ # Library name: LIBNAME=libpng%N% PNGMAJ = %SONUM% -PNGMIN = 1.4.1beta08 -PNGVER = $(PNGMAJ).$(PNGMIN) # Shared library names: LIBSO=$(LIBNAME).so LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) -LIBSOVER=$(LIBNAME).so.$(PNGVER) +LIBSOREL=$(LIBSOMAJ).$(RELEASE) OLDSO=libpng.so -OLDSOMAJ=libpng.so.%OLDNUM% -OLDSOVER=libpng.so.%OLDNUM%.$(PNGMIN) # Utilities: AR_RC=ar rc CC=gcc @@ -50,10 +46,8 @@ CFLAGS=$(ABI) -I$(ZLIBINC) -O $(WARNMORE) -fPIC -mabi=n32 LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm LDSHARED=cc $(ABI) -shared -soname $(LIBSOMAJ) \ -set_version sgi$(PNGMAJ).0 -LDLEGACY=cc $(ABI) -shared -soname $(OLDSOMAJ) \ - -set_version sgi$3.0 # See "man dso" for info about shared objects INCPATH=$(prefix)/include LIBPATH=$(exec_prefix)/lib @@ -85,9 +79,9 @@ libpng.a: $(OBJS) $(AR_RC) $@ $(OBJS) $(RANLIB) $@ -shared: $(LIBSOVER) +shared: $(LIBSOMAJ) libpng.pc: cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \ -e s!@exec_prefix@!$(exec_prefix)! \ @@ -110,18 +104,12 @@ $(LIBSO): $(LIBSOMAJ) $(LN_SF) $(LIBSOMAJ) $(LIBSO) -$(LIBSOMAJ): $(LIBSOVER) - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ) - -$(LIBSOVER): $(OBJS) +$(LIBSOMAJ): $(OBJS) $(LDSHARED) -o $@ $(OBJS) $(RM_F) $(LIBSO) $(LIBSOMAJ) -$(OLDSOVER): $(OBJS) - $(LDLEGACY) -o $@ $(OBJS) - pngtest: pngtest.o libpng.a $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) test: pngtest @@ -144,25 +132,18 @@ chmod 644 $(DL)/$(LIBNAME).a -@$(RM_F) $(DL)/libpng.a (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) -install-shared: install-headers $(LIBSOVER) libpng.pc \ - $(OLDSOVER) +install-shared: install-headers $(LIBSOMAJ) libpng.pc -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO) - -@$(RM_F) $(DL)/$(LIBSOMAJ) + -@$(RM_F) $(DL)/$(LIBSO) + -@$(RM_F) $(DL)/$(LIBSOREL) -@$(RM_F) $(DL)/$(OLDSO) - -@$(RM_F) $(DL)/$(OLDSOMAJ) - -@$(RM_F) $(DL)/$(OLDSOVER)* - cp $(LIBSOVER) $(DL) - cp $(OLDSOVER) $(DL) - chmod 755 $(DL)/$(LIBSOVER) - chmod 755 $(DL)/$(OLDSOVER) + cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) + chmod 755 $(DL)/$(LIBSOREL) (cd $(DL); \ - $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \ - $(LN_SF) $(OLDSOMAJ) $(OLDSO); \ - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \ - $(LN_SF) $(LIBSOMAJ) $(LIBSO)) + $(LN_SF) $(LIBSOREL) $(LIBSO); \ + $(LN_SF) $(LIBSO) $(OLDSO)) -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc -@$(RM_F) $(DL)/pkgconfig/libpng.pc cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc @@ -215,9 +196,9 @@ ./pngtesti pngtest.png clean: $(RM_F) libpng.a pngtest pngtesti pngout.png libpng.pc \ - so_locations libpng-config $(LIBSO) $(LIBSOMAJ)* $(OLDSOVER) + so_locations libpng-config $(LIBSO) $(LIBSOMAJ)* DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO writelock: chmod a-w *.[ch35] $(DOCS) scripts/* diff -ru4NwbB libpng-1.4.0/scripts/makefile.sgi libpng-1.4.1beta08/scripts/makefile.sgi --- libpng-1.4.0/scripts/makefile.sgi 2010-01-02 23:05:38.838932586 -0600 +++ libpng-1.4.1beta08/scripts/makefile.sgi 2010-02-06 19:46:23.236290454 -0600 @@ -1,6 +1,6 @@ # makefile for libpng.a and libpng%N%.so, SGI IRIX with 'cc' -# Copyright (C) 2001-2002, 2006, 2007 Glenn Randers-Pehrson +# Copyright (C) 2001-2002, 2006, 2007, 2010 Glenn Randers-Pehrson # Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. # # This code is released under the libpng license. # For conditions of distribution and use, see the disclaimer @@ -8,18 +8,14 @@ # Library name: LIBNAME=libpng%N% PNGMAJ = %SONUM% -PNGMIN = 1.4.1beta08 -PNGVER = $(PNGMAJ).$(PNGMIN) # Shared library names: LIBSO=$(LIBNAME).so LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) -LIBSOVER=$(LIBNAME).so.$(PNGVER) +LIBSOREL=$(LIBSOMAJ).$(RELEASE) OLDSO=libpng.so -OLDSOMAJ=libpng.so.%OLDNUM% -OLDSOVER=libpng.so.%OLDNUM%.$(PNGMIN) # Utilities: AR_RC=ar rc CC=cc @@ -53,10 +49,8 @@ LDFLAGS_A=$(ABI) -L. -L$(ZLIBLIB) -lpng%N% -lz -lm LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm LDSHARED=cc $(ABI) -shared -soname $(LIBSOMAJ) \ -set_version sgi$(PNGMAJ).0 -LDLEGACY=cc $(ABI) -shared -soname $(OLDSOMAJ) \ - -set_version sgi$3.0 # See "man dso" for info about shared objects INCPATH=$(prefix)/include LIBPATH=$(exec_prefix)/lib @@ -88,10 +82,8 @@ libpng.a: $(OBJS) $(AR_RC) $@ $(OBJS) $(RANLIB) $@ -shared: $(LIBSOVER) - libpng.pc: cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \ -e s!@exec_prefix@!$(exec_prefix)! \ -e s!@libdir@!$(LIBPATH)! \ @@ -112,18 +104,12 @@ $(LIBSO): $(LIBSOMAJ) $(LN_SF) $(LIBSOMAJ) $(LIBSO) -$(LIBSOMAJ): $(LIBSOVER) - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ) - -$(LIBSOVER): $(OBJS) +$(LIBSOMAJ): $(OBJS) $(LDSHARED) -o $@ $(OBJS) $(RM_F) $(LIBSO) $(LIBSOMAJ) -$(OLDSOVER): $(OBJS) - $(LDLEGACY) -o $@ $(OBJS) - pngtest: pngtest.o libpng.a $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) test: pngtest @@ -146,25 +132,18 @@ chmod 644 $(DL)/$(LIBNAME).a -@$(RM_F) $(DL)/libpng.a (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) -install-shared: install-headers $(LIBSOVER) libpng.pc \ - $(OLDSOVER) +install-shared: install-headers $(LIBSOMAJ) libpng.pc -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO) - -@$(RM_F) $(DL)/$(LIBSOMAJ) + -@$(RM_F) $(DL)/$(LIBSO) + -@$(RM_F) $(DL)/$(LIBSOREL) -@$(RM_F) $(DL)/$(OLDSO) - -@$(RM_F) $(DL)/$(OLDSOMAJ) - -@$(RM_F) $(DL)/$(OLDSOVER)* - cp $(LIBSOVER) $(DL) - cp $(OLDSOVER) $(DL) - chmod 755 $(DL)/$(LIBSOVER) - chmod 755 $(DL)/$(OLDSOVER) + cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) + chmod 755 $(DL)/$(LIBSOREL) (cd $(DL); \ - $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \ - $(LN_SF) $(OLDSOMAJ) $(OLDSO); \ - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \ - $(LN_SF) $(LIBSOMAJ) $(LIBSO)) + $(LN_SF) $(LIBSOREL) $(LIBSO); \ + $(LN_SF) $(LIBSO) $(OLDSO)) -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc -@$(RM_F) $(DL)/pkgconfig/libpng.pc cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc @@ -218,9 +197,8 @@ clean: $(RM_F) *.o libpng.a pngtest pngtesti pngout.png libpng.pc libpng-config \ $(LIBSO) $(LIBSOMAJ)* \ - $(OLDSOVER) \ so_locations DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO writelock: diff -ru4NwbB libpng-1.4.0/scripts/makefile.so9 libpng-1.4.1beta08/scripts/makefile.so9 --- libpng-1.4.0/scripts/makefile.so9 2010-01-02 23:05:38.849660289 -0600 +++ libpng-1.4.1beta08/scripts/makefile.so9 2010-02-06 19:46:23.246882533 -0600 @@ -1,8 +1,8 @@ # makefile for libpng on Solaris 9 (beta) with Forte cc # Updated by Chad Schrock for Solaris 9 # Contributed by William L. Sebok, based on makefile.linux -# Copyright (C) 2002, 2006, 2008 Glenn Randers-Pehrson +# Copyright (C) 2002, 2006, 2008, 2010 Glenn Randers-Pehrson # Copyright (C) 1998-2001 Greg Roelofs # Copyright (C) 1996-1997 Andreas Dilger # # This code is released under the libpng license. @@ -10,19 +10,15 @@ # and license in png.h # Library name: PNGMAJ = %SONUM% -PNGMIN = 1.4.1beta08 -PNGVER = $(PNGMAJ).$(PNGMIN) LIBNAME = libpng%N% # Shared library names: LIBSO=$(LIBNAME).so LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) -LIBSOVER=$(LIBNAME).so.$(PNGVER) +LIBSOREL=$(LIBSOMAJ).$(RELEASE) OLDSO=libpng.so -OLDSOMAJ=libpng.so.%OLDNUM% -OLDSOVER=libpng.so.%OLDNUM%.$(PNGMIN) # Utilities: # gcc 2.95 doesn't work. CC=cc @@ -110,12 +106,9 @@ $(LIBSO): $(LIBSOMAJ) $(LN_SF) $(LIBSOMAJ) $(LIBSO) -$(LIBSOMAJ): $(LIBSOVER) - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ) - -$(LIBSOVER): $(OBJSDLL) +$(LIBSOMAJ): $(OBJSDLL) @case "`type ld`" in *ucb*) \ echo; \ echo '## WARNING:'; \ echo '## The commands "CC" and "LD" must NOT refer to /usr/ucb/cc'; \ @@ -127,13 +120,9 @@ echo; \ ;; \ esac $(LD) -G -h $(LIBSOMAJ) \ - -o $(LIBSOVER) $(OBJSDLL) - -$(OLDSOVER): $(OBJS) - $(LD) -G -h $(OLDSOMAJ) \ - -o $(OLDSOVER) $(OBJSDLL) + -o $(LIBSOMAJ) $(OBJSDLL) pngtest: pngtest.o $(LIBSO) $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) @@ -155,25 +144,18 @@ chmod 644 $(DL)/$(LIBNAME).a -@$(RM_F) $(DL)/libpng.a (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) -install-shared: install-headers $(LIBSOVER) libpng.pc \ - $(OLDSOVER) +install-shared: install-headers $(LIBSOMAJ) libpng.pc -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO) - -@$(RM_F) $(DL)/$(LIBSOMAJ) + -@$(RM_F) $(DL)/$(LIBSO) + -@$(RM_F) $(DL)/$(LIBSOREL) -@$(RM_F) $(DL)/$(OLDSO) - -@$(RM_F) $(DL)/$(OLDSOMAJ) - -@$(RM_F) $(DL)/$(OLDSOVER)* - cp $(LIBSOVER) $(DL) - cp $(OLDSOVER) $(DL) - chmod 755 $(DL)/$(LIBSOVER) - chmod 755 $(DL)/$(OLDSOVER) + cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) + chmod 755 $(DL)/$(LIBSOREL) (cd $(DL); \ - $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \ - $(LN_SF) $(OLDSOMAJ) $(OLDSO); \ - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \ - $(LN_SF) $(LIBSOMAJ) $(LIBSO)) + $(LN_SF) $(LIBSOREL) $(LIBSO); \ + $(LN_SF) $(LIBSO) $(OLDSO)) -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc -@$(RM_F) $(DL)/pkgconfig/libpng.pc cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc @@ -225,9 +207,8 @@ clean: $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \ libpng-config $(LIBSO) $(LIBSOMAJ)* \ - $(OLDSOVER) \ libpng.pc DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO writelock: diff -ru4NwbB libpng-1.4.0/scripts/makefile.solaris libpng-1.4.1beta08/scripts/makefile.solaris --- libpng-1.4.0/scripts/makefile.solaris 2010-01-02 23:05:38.860444165 -0600 +++ libpng-1.4.1beta08/scripts/makefile.solaris 2010-02-06 19:46:23.257430108 -0600 @@ -1,6 +1,6 @@ # makefile for libpng on Solaris 2.x with gcc -# Copyright (C) 2004, 2006-2008 Glenn Randers-Pehrson +# Copyright (C) 2004, 2006-2008, 2010 Glenn Randers-Pehrson # Contributed by William L. Sebok, based on makefile.linux # Copyright (C) 1998 Greg Roelofs # Copyright (C) 1996, 1997 Andreas Dilger # @@ -10,18 +10,14 @@ # Library name: LIBNAME = libpng%N% PNGMAJ = %SONUM% -PNGMIN = 1.4.1beta08 -PNGVER = $(PNGMAJ).$(PNGMIN) # Shared library names: LIBSO=$(LIBNAME).so LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) -LIBSOVER=$(LIBNAME).so.$(PNGVER) +LIBSOREL=$(LIBSOMAJ).$(RELEASE) OLDSO=libpng.so -OLDSOMAJ=libpng.so.%OLDNUM% -OLDSOVER=libpng.so.%OLDNUM%.$(PNGMIN) # Utilities: AR_RC=ar rc CC=gcc @@ -107,12 +103,9 @@ $(LIBSO): $(LIBSOMAJ) $(LN_SF) $(LIBSOMAJ) $(LIBSO) -$(LIBSOMAJ): $(LIBSOVER) - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ) - -$(LIBSOVER): $(OBJSDLL) +$(LIBSOMAJ): $(OBJSDLL) @case "`type ld`" in *ucb*) \ echo; \ echo '## WARNING:'; \ echo '## The commands "CC" and "LD" must NOT refer to /usr/ucb/cc'; \ @@ -124,13 +117,9 @@ echo; \ ;; \ esac $(LD) -G -h $(LIBSOMAJ) \ - -o $(LIBSOVER) $(OBJSDLL) - -$(OLDSOVER): $(OBJS) - $(LD) -G -h $(OLDSOMAJ) \ - -o $(OLDSOVER) $(OBJSDLL) + -o $(LIBSOMAJ) $(OBJSDLL) pngtest: pngtest.o $(LIBSO) $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) @@ -152,25 +141,18 @@ chmod 644 $(DL)/$(LIBNAME).a -@$(RM_F) $(DL)/libpng.a (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) -install-shared: install-headers $(LIBSOVER) libpng.pc \ - $(OLDSOVER) +install-shared: install-headers $(LIBSOMAJ) libpng.pc -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO) - -@$(RM_F) $(DL)/$(LIBSOMAJ) + -@$(RM_F) $(DL)/$(LIBSO) + -@$(RM_F) $(DL)/$(LIBSOREL) -@$(RM_F) $(DL)/$(OLDSO) - -@$(RM_F) $(DL)/$(OLDSOMAJ) - -@$(RM_F) $(DL)/$(OLDSOVER)* - cp $(LIBSOVER) $(DL) - cp $(OLDSOVER) $(DL) - chmod 755 $(DL)/$(LIBSOVER) - chmod 755 $(DL)/$(OLDSOVER) + cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) + chmod 755 $(DL)/$(LIBSOREL) (cd $(DL); \ - $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \ - $(LN_SF) $(OLDSOMAJ) $(OLDSO); \ - $(LN_SF) $(LIBSOVER) $(LIBSO); \ - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ)) + $(LN_SF) $(LIBSOREL) $(LIBSO); \ + $(LN_SF) $(LIBSO) $(OLDSO)) -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc -@$(RM_F) $(DL)/pkgconfig/libpng.pc cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc @@ -222,9 +204,8 @@ clean: $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \ libpng-config $(LIBSO) $(LIBSOMAJ)* \ - $(OLDSOVER) \ libpng.pc DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO writelock: diff -ru4NwbB libpng-1.4.0/scripts/makefile.solaris-x86 libpng-1.4.1beta08/scripts/makefile.solaris-x86 --- libpng-1.4.0/scripts/makefile.solaris-x86 2010-01-02 23:05:38.871276610 -0600 +++ libpng-1.4.1beta08/scripts/makefile.solaris-x86 2010-02-06 19:46:23.267948264 -0600 @@ -1,6 +1,6 @@ # makefile for libpng on Solaris 2.x with gcc -# Copyright (C) 2004, 2006-2008 Glenn Randers-Pehrson +# Copyright (C) 2004, 2006-2008, 2010 Glenn Randers-Pehrson # Contributed by William L. Sebok, based on makefile.linux # Copyright (C) 1998 Greg Roelofs # Copyright (C) 1996, 1997 Andreas Dilger @@ -10,18 +10,14 @@ # Library name: LIBNAME = libpng%N% PNGMAJ = %SONUM% -PNGMIN = 1.4.1beta08 -PNGVER = $(PNGMAJ).$(PNGMIN) # Shared library names: LIBSO=$(LIBNAME).so LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ) -LIBSOVER=$(LIBNAME).so.$(PNGVER) +LIBSOREL=$(LIBSOMAJ).$(RELEASE) OLDSO=libpng.so -OLDSOMAJ=libpng.so.%OLDNUM% -OLDSOVER=libpng.so.%OLDNUM%.$(PNGMIN) # Utilities: AR_RC=ar rc CC=gcc @@ -107,12 +103,9 @@ $(LIBSO): $(LIBSOMAJ) $(LN_SF) $(LIBSOMAJ) $(LIBSO) -$(LIBSOMAJ): $(LIBSOVER) - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ) - -$(LIBSOVER): $(OBJSDLL) +$(LIBSOMAJ): $(OBJSDLL) @case "`type ld`" in *ucb*) \ echo; \ echo '## WARNING:'; \ echo '## The commands "CC" and "LD" must NOT refer to /usr/ucb/cc'; \ @@ -124,13 +117,9 @@ echo; \ ;; \ esac $(LD) -G -h $(LIBSOMAJ) \ - -o $(LIBSOVER) $(OBJSDLL) - -$(OLDSOVER): $(OBJS) - $(LD) -G -h $(OLDSOMAJ) \ - -o $(OLDSOVER) $(OBJSDLL) + -o $(LIBSOMAJ) $(OBJSDLL) pngtest: pngtest.o $(LIBSO) $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) @@ -152,25 +141,18 @@ chmod 644 $(DL)/$(LIBNAME).a -@$(RM_F) $(DL)/libpng.a (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a) -install-shared: install-headers $(LIBSOVER) libpng.pc \ - $(OLDSOVER) +install-shared: install-headers $(LIBSOMAJ) libpng.pc -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi - -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO) - -@$(RM_F) $(DL)/$(LIBSOMAJ) + -@$(RM_F) $(DL)/$(LIBSO) + -@$(RM_F) $(DL)/$(LIBSOREL) -@$(RM_F) $(DL)/$(OLDSO) - -@$(RM_F) $(DL)/$(OLDSOMAJ) - -@$(RM_F) $(DL)/$(OLDSOVER)* - cp $(LIBSOVER) $(DL) - cp $(OLDSOVER) $(DL) - chmod 755 $(DL)/$(LIBSOVER) - chmod 755 $(DL)/$(OLDSOVER) + cp $(LIBSOMAJ) $(DL)/$(LIBSOREL) + chmod 755 $(DL)/$(LIBSOREL) (cd $(DL); \ - $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \ - $(LN_SF) $(OLDSOMAJ) $(OLDSO); \ - $(LN_SF) $(LIBSOVER) $(LIBSO); \ - $(LN_SF) $(LIBSOVER) $(LIBSOMAJ)) + $(LN_SF) $(LIBSOREL) $(LIBSO); \ + $(LN_SF) $(LIBSO) $(OLDSO)) -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc -@$(RM_F) $(DL)/pkgconfig/libpng.pc cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc @@ -222,9 +204,8 @@ clean: $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \ libpng-config $(LIBSO) $(LIBSOMAJ)* \ - $(OLDSOVER) \ libpng.pc DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO writelock: diff -ru4NwbB libpng-1.4.0/scripts/png32ce.def libpng-1.4.1beta08/scripts/png32ce.def --- libpng-1.4.0/scripts/png32ce.def 2010-01-02 23:05:38.942119227 -0600 +++ libpng-1.4.1beta08/scripts/png32ce.def 2010-02-06 19:46:23.336112656 -0600 @@ -248,10 +248,12 @@ png_benign_chunk_error @210 png_set_benign_error @211 png_get_io_chunk_name @212 png_get_io_state @213 - png_set_premultiply_alpha @214 png_get_chunk_cache_max @215 png_set_chunk_cache_max @216 png_check_cHRM_fixed @217 png_calloc @218 png_set_longjmp_fn @219 +; Added at version 1.4.1 + png_get_chunk_malloc_max @220 + png_set_chunk_malloc_max @221 diff -ru4NwbB libpng-1.4.0/scripts/pngos2.def libpng-1.4.1beta08/scripts/pngos2.def --- libpng-1.4.0/scripts/pngos2.def 2010-01-02 23:05:38.952970892 -0600 +++ libpng-1.4.1beta08/scripts/pngos2.def 2010-02-06 19:46:23.346701887 -0600 @@ -208,14 +208,16 @@ ; png_benign_chunk_error ; png_set_benign_error png_get_io_chunk_name png_get_io_state - png_set_premultiply_alpha png_get_chunk_cache_max png_set_chunk_cache_max png_check_cHRM_fixed png_calloc png_set_longjmp_fn +; Added at version 1.4.1 + png_get_chunk_malloc_max + png_set_chunk_malloc_max ; These are not present when libpng is compiled with PNG_NO_GLOBAL_ARRAYS png_libpng_ver png_pass_start diff -ru4NwbB libpng-1.4.0/scripts/pngwin.def libpng-1.4.1beta08/scripts/pngwin.def --- libpng-1.4.0/scripts/pngwin.def 2010-01-02 23:05:38.963715362 -0600 +++ libpng-1.4.1beta08/scripts/pngwin.def 2010-02-06 19:46:23.357069575 -0600 @@ -203,10 +203,12 @@ ; png_benign_chunk_error ; png_set_benign_error png_get_io_chunk_name png_get_io_state - png_set_premultiply_alpha png_get_chunk_cache_max png_set_chunk_cache_max png_check_cHRM_fixed png_calloc png_set_longjmp_fn +; Added at version 1.4.1 + png_get_chunk_malloc_max + png_set_chunk_malloc_max