xref: /AOO41X/main/libpng/libpng-1.5.1.patch (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
1*cdf0e10cSrcweir--- misc/libpng-1.5.1/makefile.mk	2011-03-24 21:49:50.911397154 +0100
2*cdf0e10cSrcweir+++ misc/build/libpng-1.5.1/makefile.mk	2011-03-24 21:47:23.379397048 +0100
3*cdf0e10cSrcweir@@ -1 +1,49 @@
4*cdf0e10cSrcweir-dummy
5*cdf0e10cSrcweir+#*************************************************************************
6*cdf0e10cSrcweir+#
7*cdf0e10cSrcweir+#   Copyright according the GNU Public License.
8*cdf0e10cSrcweir+#
9*cdf0e10cSrcweir+#*************************************************************************
10*cdf0e10cSrcweir+
11*cdf0e10cSrcweir+PRJ=..$/..$/..$/..
12*cdf0e10cSrcweir+
13*cdf0e10cSrcweir+PRJNAME=libpng
14*cdf0e10cSrcweir+TARGET=libpng
15*cdf0e10cSrcweir+LIBTARGET=NO
16*cdf0e10cSrcweir+EXTERNAL_WARNINGS_NOT_ERRORS=TRUE
17*cdf0e10cSrcweir+VISIBILITY_HIDDEN=TRUE
18*cdf0e10cSrcweir+
19*cdf0e10cSrcweir+# --- Settings -----------------------------------------------------------
20*cdf0e10cSrcweir+
21*cdf0e10cSrcweir+.INCLUDE :  settings.mk
22*cdf0e10cSrcweir+
23*cdf0e10cSrcweir+
24*cdf0e10cSrcweir+.IF "$(GUI)$(CPU)"=="WNTP"
25*cdf0e10cSrcweir+CFLAGS=$(CFLAGS) -Od
26*cdf0e10cSrcweir+.ENDIF
27*cdf0e10cSrcweir+
28*cdf0e10cSrcweir+# --- Files --------------------------------------------------------
29*cdf0e10cSrcweir+
30*cdf0e10cSrcweir+SLOFILES=	 $(SLO)$/png.obj 		\
31*cdf0e10cSrcweir+                $(SLO)$/pngerror.obj	\
32*cdf0e10cSrcweir+                $(SLO)$/pngget.obj	\
33*cdf0e10cSrcweir+                $(SLO)$/pngmem.obj	\
34*cdf0e10cSrcweir+                $(SLO)$/pngpread.obj	\
35*cdf0e10cSrcweir+                $(SLO)$/pngread.obj	\
36*cdf0e10cSrcweir+                $(SLO)$/pngrio.obj	\
37*cdf0e10cSrcweir+                $(SLO)$/pngrtran.obj	\
38*cdf0e10cSrcweir+                $(SLO)$/pngrutil.obj	\
39*cdf0e10cSrcweir+                $(SLO)$/pngset.obj	\
40*cdf0e10cSrcweir+                $(SLO)$/pngtest.obj	\
41*cdf0e10cSrcweir+                $(SLO)$/pngtrans.obj	\
42*cdf0e10cSrcweir+                $(SLO)$/pngvalid.obj	\
43*cdf0e10cSrcweir+                $(SLO)$/pngwio.obj	\
44*cdf0e10cSrcweir+                $(SLO)$/pngwrite.obj	\
45*cdf0e10cSrcweir+                $(SLO)$/pngwtran.obj	\
46*cdf0e10cSrcweir+                $(SLO)$/pngwutil.obj
47*cdf0e10cSrcweir+
48*cdf0e10cSrcweir+LIB1TARGET=$(SLB)$/$(TARGET).lib
49*cdf0e10cSrcweir+LIB1ARCHIV=$(LB)$/$(TARGET).a
50*cdf0e10cSrcweir+LIB1OBJFILES=$(SLOFILES)
51*cdf0e10cSrcweir+
52*cdf0e10cSrcweir+.INCLUDE :  target.mk
53*cdf0e10cSrcweir+
54*cdf0e10cSrcweir--- misc/libpng-1.5.1/pnglibconf.h	2011-03-24 21:49:50.913397154 +0100
55*cdf0e10cSrcweir+++ misc/build/libpng-1.5.1/pnglibconf.h	2011-03-24 21:47:23.380397048 +0100
56*cdf0e10cSrcweir@@ -1 +1,176 @@
57*cdf0e10cSrcweir-dummy
58*cdf0e10cSrcweir+
59*cdf0e10cSrcweir+/* libpng STANDARD API DEFINITION */
60*cdf0e10cSrcweir+
61*cdf0e10cSrcweir+/* pnglibconf.h - library build configuration */
62*cdf0e10cSrcweir+
63*cdf0e10cSrcweir+/* libpng version 1.5.0 - last changed on January 6, 2011 */
64*cdf0e10cSrcweir+
65*cdf0e10cSrcweir+/* Copyright (c) 1998-2011 Glenn Randers-Pehrson */
66*cdf0e10cSrcweir+
67*cdf0e10cSrcweir+/* This code is released under the libpng license. */
68*cdf0e10cSrcweir+/* For conditions of distribution and use, see the disclaimer */
69*cdf0e10cSrcweir+/* and license in png.h */
70*cdf0e10cSrcweir+
71*cdf0e10cSrcweir+/* pnglibconf.h */
72*cdf0e10cSrcweir+/* Machine generated file: DO NOT EDIT */
73*cdf0e10cSrcweir+/* Derived from: scripts/pnglibconf.dfa */
74*cdf0e10cSrcweir+#ifndef PNGLCONF_H
75*cdf0e10cSrcweir+#define PNGLCONF_H
76*cdf0e10cSrcweir+/* settings */
77*cdf0e10cSrcweir+#define PNG_MAX_GAMMA_8 11
78*cdf0e10cSrcweir+#define PNG_CALLOC_SUPPORTED
79*cdf0e10cSrcweir+#define PNG_QUANTIZE_RED_BITS 5
80*cdf0e10cSrcweir+#define PNG_USER_WIDTH_MAX 1000000L
81*cdf0e10cSrcweir+#define PNG_QUANTIZE_GREEN_BITS 5
82*cdf0e10cSrcweir+#define PNG_API_RULE 0
83*cdf0e10cSrcweir+#define PNG_QUANTIZE_BLUE_BITS 5
84*cdf0e10cSrcweir+#define PNG_USER_CHUNK_CACHE_MAX 0
85*cdf0e10cSrcweir+#define PNG_USER_HEIGHT_MAX 1000000L
86*cdf0e10cSrcweir+#define PNG_sCAL_PRECISION 5
87*cdf0e10cSrcweir+#define PNG_COST_SHIFT 3
88*cdf0e10cSrcweir+#define PNG_WEIGHT_SHIFT 8
89*cdf0e10cSrcweir+#define PNG_USER_CHUNK_MALLOC_MAX 0
90*cdf0e10cSrcweir+#define PNG_DEFAULT_READ_MACROS 1
91*cdf0e10cSrcweir+#define PNG_ZBUF_SIZE 8192
92*cdf0e10cSrcweir+#define PNG_GAMMA_THRESHOLD_FIXED 5000
93*cdf0e10cSrcweir+/* end of settings */
94*cdf0e10cSrcweir+/* options */
95*cdf0e10cSrcweir+#define PNG_INFO_IMAGE_SUPPORTED
96*cdf0e10cSrcweir+#define PNG_HANDLE_AS_UNKNOWN_SUPPORTED
97*cdf0e10cSrcweir+#define PNG_POINTER_INDEXING_SUPPORTED
98*cdf0e10cSrcweir+#define PNG_WARNINGS_SUPPORTED
99*cdf0e10cSrcweir+#define PNG_FLOATING_ARITHMETIC_SUPPORTED
100*cdf0e10cSrcweir+#define PNG_WRITE_SUPPORTED
101*cdf0e10cSrcweir+#define PNG_WRITE_INTERLACING_SUPPORTED
102*cdf0e10cSrcweir+#define PNG_WRITE_16BIT_SUPPORTED
103*cdf0e10cSrcweir+#define PNG_EASY_ACCESS_SUPPORTED
104*cdf0e10cSrcweir+#define PNG_ALIGN_MEMORY_SUPPORTED
105*cdf0e10cSrcweir+#define PNG_WRITE_WEIGHTED_FILTER_SUPPORTED
106*cdf0e10cSrcweir+#define PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED
107*cdf0e10cSrcweir+#define PNG_USER_LIMITS_SUPPORTED
108*cdf0e10cSrcweir+#define PNG_FIXED_POINT_SUPPORTED
109*cdf0e10cSrcweir+/*#undef PNG_ERROR_NUMBERS_SUPPORTED*/
110*cdf0e10cSrcweir+#define PNG_ERROR_TEXT_SUPPORTED
111*cdf0e10cSrcweir+#define PNG_READ_SUPPORTED
112*cdf0e10cSrcweir+/*#undef PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED*/
113*cdf0e10cSrcweir+#define PNG_BENIGN_ERRORS_SUPPORTED
114*cdf0e10cSrcweir+#define PNG_SETJMP_SUPPORTED
115*cdf0e10cSrcweir+#define PNG_WRITE_FLUSH_SUPPORTED
116*cdf0e10cSrcweir+#define PNG_MNG_FEATURES_SUPPORTED
117*cdf0e10cSrcweir+#define PNG_FLOATING_POINT_SUPPORTED
118*cdf0e10cSrcweir+#define PNG_INCH_CONVERSIONS_SUPPORTED
119*cdf0e10cSrcweir+#define PNG_STDIO_SUPPORTED
120*cdf0e10cSrcweir+#define PNG_READ_UNKNOWN_CHUNKS_SUPPORTED
121*cdf0e10cSrcweir+#define PNG_USER_MEM_SUPPORTED
122*cdf0e10cSrcweir+#define PNG_IO_STATE_SUPPORTED
123*cdf0e10cSrcweir+#define PNG_SET_USER_LIMITS_SUPPORTED
124*cdf0e10cSrcweir+#define PNG_READ_ANCILLARY_CHUNKS_SUPPORTED
125*cdf0e10cSrcweir+#define PNG_WRITE_INT_FUNCTIONS_SUPPORTED
126*cdf0e10cSrcweir+#define PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED
127*cdf0e10cSrcweir+#define PNG_WRITE_FILTER_SUPPORTED
128*cdf0e10cSrcweir+#define PNG_SET_CHUNK_CACHE_LIMIT_SUPPORTED
129*cdf0e10cSrcweir+#define PNG_WRITE_iCCP_SUPPORTED
130*cdf0e10cSrcweir+#define PNG_READ_TRANSFORMS_SUPPORTED
131*cdf0e10cSrcweir+#define PNG_READ_GAMMA_SUPPORTED
132*cdf0e10cSrcweir+#define PNG_READ_bKGD_SUPPORTED
133*cdf0e10cSrcweir+#define PNG_UNKNOWN_CHUNKS_SUPPORTED
134*cdf0e10cSrcweir+#define PNG_READ_sCAL_SUPPORTED
135*cdf0e10cSrcweir+#define PNG_WRITE_hIST_SUPPORTED
136*cdf0e10cSrcweir+#define PNG_READ_OPT_PLTE_SUPPORTED
137*cdf0e10cSrcweir+#define PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED
138*cdf0e10cSrcweir+#define PNG_WRITE_gAMA_SUPPORTED
139*cdf0e10cSrcweir+#define PNG_READ_GRAY_TO_RGB_SUPPORTED
140*cdf0e10cSrcweir+#define PNG_WRITE_pCAL_SUPPORTED
141*cdf0e10cSrcweir+#define PNG_READ_INVERT_ALPHA_SUPPORTED
142*cdf0e10cSrcweir+#define PNG_WRITE_TRANSFORMS_SUPPORTED
143*cdf0e10cSrcweir+#define PNG_READ_sBIT_SUPPORTED
144*cdf0e10cSrcweir+#define PNG_READ_PACK_SUPPORTED
145*cdf0e10cSrcweir+#define PNG_WRITE_SWAP_SUPPORTED
146*cdf0e10cSrcweir+#define PNG_READ_cHRM_SUPPORTED
147*cdf0e10cSrcweir+#define PNG_WRITE_tIME_SUPPORTED
148*cdf0e10cSrcweir+#define PNG_READ_INTERLACING_SUPPORTED
149*cdf0e10cSrcweir+#define PNG_READ_tRNS_SUPPORTED
150*cdf0e10cSrcweir+#define PNG_WRITE_pHYs_SUPPORTED
151*cdf0e10cSrcweir+#define PNG_WRITE_INVERT_SUPPORTED
152*cdf0e10cSrcweir+#define PNG_READ_RGB_TO_GRAY_SUPPORTED
153*cdf0e10cSrcweir+#define PNG_WRITE_sRGB_SUPPORTED
154*cdf0e10cSrcweir+#define PNG_READ_oFFs_SUPPORTED
155*cdf0e10cSrcweir+#define PNG_WRITE_FILLER_SUPPORTED
156*cdf0e10cSrcweir+#define PNG_WRITE_TEXT_SUPPORTED
157*cdf0e10cSrcweir+#define PNG_WRITE_SHIFT_SUPPORTED
158*cdf0e10cSrcweir+#define PNG_PROGRESSIVE_READ_SUPPORTED
159*cdf0e10cSrcweir+#define PNG_READ_SHIFT_SUPPORTED
160*cdf0e10cSrcweir+#define PNG_CONVERT_tIME_SUPPORTED
161*cdf0e10cSrcweir+#define PNG_READ_USER_TRANSFORM_SUPPORTED
162*cdf0e10cSrcweir+#define PNG_READ_INT_FUNCTIONS_SUPPORTED
163*cdf0e10cSrcweir+#define PNG_READ_USER_CHUNKS_SUPPORTED
164*cdf0e10cSrcweir+#define PNG_READ_hIST_SUPPORTED
165*cdf0e10cSrcweir+#define PNG_READ_16BIT_SUPPORTED
166*cdf0e10cSrcweir+#define PNG_READ_SWAP_ALPHA_SUPPORTED
167*cdf0e10cSrcweir+#define PNG_READ_COMPOSITE_NODIV_SUPPORTED
168*cdf0e10cSrcweir+#define PNG_SEQUENTIAL_READ_SUPPORTED
169*cdf0e10cSrcweir+#define PNG_READ_BACKGROUND_SUPPORTED
170*cdf0e10cSrcweir+#define PNG_READ_QUANTIZE_SUPPORTED
171*cdf0e10cSrcweir+#define PNG_READ_iCCP_SUPPORTED
172*cdf0e10cSrcweir+#define PNG_READ_STRIP_ALPHA_SUPPORTED
173*cdf0e10cSrcweir+#define PNG_READ_PACKSWAP_SUPPORTED
174*cdf0e10cSrcweir+#define PNG_READ_sRGB_SUPPORTED
175*cdf0e10cSrcweir+#define PNG_WRITE_tEXt_SUPPORTED
176*cdf0e10cSrcweir+#define PNG_READ_gAMA_SUPPORTED
177*cdf0e10cSrcweir+#define PNG_READ_pCAL_SUPPORTED
178*cdf0e10cSrcweir+#define PNG_READ_EXPAND_SUPPORTED
179*cdf0e10cSrcweir+#define PNG_WRITE_sPLT_SUPPORTED
180*cdf0e10cSrcweir+#define PNG_READ_SWAP_SUPPORTED
181*cdf0e10cSrcweir+#define PNG_READ_tIME_SUPPORTED
182*cdf0e10cSrcweir+#define PNG_READ_pHYs_SUPPORTED
183*cdf0e10cSrcweir+#define PNG_WRITE_SWAP_ALPHA_SUPPORTED
184*cdf0e10cSrcweir+#define PNG_TIME_RFC1123_SUPPORTED
185*cdf0e10cSrcweir+#define PNG_READ_TEXT_SUPPORTED
186*cdf0e10cSrcweir+#define PNG_WRITE_BGR_SUPPORTED
187*cdf0e10cSrcweir+#define PNG_USER_CHUNKS_SUPPORTED
188*cdf0e10cSrcweir+#define PNG_CONSOLE_IO_SUPPORTED
189*cdf0e10cSrcweir+#define PNG_WRITE_PACK_SUPPORTED
190*cdf0e10cSrcweir+#define PNG_READ_FILLER_SUPPORTED
191*cdf0e10cSrcweir+#define PNG_WRITE_bKGD_SUPPORTED
192*cdf0e10cSrcweir+#define PNG_WRITE_tRNS_SUPPORTED
193*cdf0e10cSrcweir+#define PNG_READ_sPLT_SUPPORTED
194*cdf0e10cSrcweir+#define PNG_WRITE_sCAL_SUPPORTED
195*cdf0e10cSrcweir+#define PNG_WRITE_oFFs_SUPPORTED
196*cdf0e10cSrcweir+#define PNG_READ_tEXt_SUPPORTED
197*cdf0e10cSrcweir+#define PNG_WRITE_sBIT_SUPPORTED
198*cdf0e10cSrcweir+#define PNG_READ_INVERT_SUPPORTED
199*cdf0e10cSrcweir+#define PNG_READ_16_TO_8_SUPPORTED
200*cdf0e10cSrcweir+#define PNG_WRITE_cHRM_SUPPORTED
201*cdf0e10cSrcweir+#define PNG_16BIT_SUPPORTED
202*cdf0e10cSrcweir+#define PNG_WRITE_USER_TRANSFORM_SUPPORTED
203*cdf0e10cSrcweir+#define PNG_READ_BGR_SUPPORTED
204*cdf0e10cSrcweir+#define PNG_WRITE_PACKSWAP_SUPPORTED
205*cdf0e10cSrcweir+#define PNG_WRITE_INVERT_ALPHA_SUPPORTED
206*cdf0e10cSrcweir+#define PNG_sCAL_SUPPORTED
207*cdf0e10cSrcweir+#define PNG_WRITE_zTXt_SUPPORTED
208*cdf0e10cSrcweir+#define PNG_sBIT_SUPPORTED
209*cdf0e10cSrcweir+#define PNG_cHRM_SUPPORTED
210*cdf0e10cSrcweir+#define PNG_bKGD_SUPPORTED
211*cdf0e10cSrcweir+#define PNG_tRNS_SUPPORTED
212*cdf0e10cSrcweir+#define PNG_WRITE_iTXt_SUPPORTED
213*cdf0e10cSrcweir+#define PNG_oFFs_SUPPORTED
214*cdf0e10cSrcweir+#define PNG_USER_TRANSFORM_PTR_SUPPORTED
215*cdf0e10cSrcweir+#define PNG_USER_TRANSFORM_INFO_SUPPORTED
216*cdf0e10cSrcweir+#define PNG_hIST_SUPPORTED
217*cdf0e10cSrcweir+#define PNG_iCCP_SUPPORTED
218*cdf0e10cSrcweir+#define PNG_sRGB_SUPPORTED
219*cdf0e10cSrcweir+#define PNG_READ_zTXt_SUPPORTED
220*cdf0e10cSrcweir+#define PNG_gAMA_SUPPORTED
221*cdf0e10cSrcweir+#define PNG_pCAL_SUPPORTED
222*cdf0e10cSrcweir+#define PNG_CHECK_cHRM_SUPPORTED
223*cdf0e10cSrcweir+#define PNG_tIME_SUPPORTED
224*cdf0e10cSrcweir+#define PNG_pHYs_SUPPORTED
225*cdf0e10cSrcweir+#define PNG_READ_iTXt_SUPPORTED
226*cdf0e10cSrcweir+#define PNG_TEXT_SUPPORTED
227*cdf0e10cSrcweir+#define PNG_SAVE_INT_32_SUPPORTED
228*cdf0e10cSrcweir+#define PNG_sPLT_SUPPORTED
229*cdf0e10cSrcweir+#define PNG_tEXt_SUPPORTED
230*cdf0e10cSrcweir+#define PNG_zTXt_SUPPORTED
231*cdf0e10cSrcweir+#define PNG_iTXt_SUPPORTED
232*cdf0e10cSrcweir+/* end of options */
233*cdf0e10cSrcweir+#endif /* PNGLCONF_H */
234*cdf0e10cSrcweir--- misc/libpng-1.5.1/pngstruct.h	2011-02-03 05:58:17.000000000 +0100
235*cdf0e10cSrcweir+++ misc/build/libpng-1.5.1/pngstruct.h	2011-03-24 21:47:23.380397048 +0100
236*cdf0e10cSrcweir@@ -24,7 +24,11 @@
237*cdf0e10cSrcweir  * in this structure and is required for decompressing the LZ compressed
238*cdf0e10cSrcweir  * data in PNG files.
239*cdf0e10cSrcweir  */
240*cdf0e10cSrcweir+#if defined MACOSX
241*cdf0e10cSrcweir #include "zlib.h"
242*cdf0e10cSrcweir+#else
243*cdf0e10cSrcweir+#include <external/zlib/zlib.h>
244*cdf0e10cSrcweir+#endif
245*cdf0e10cSrcweir
246*cdf0e10cSrcweir struct png_struct_def
247*cdf0e10cSrcweir {
248*cdf0e10cSrcweir--- misc/libpng-1.5.1/pngtest.c	2011-02-03 05:58:17.000000000 +0100
249*cdf0e10cSrcweir+++ misc/build/libpng-1.5.1/pngtest.c	2011-03-24 21:47:23.380397048 +0100
250*cdf0e10cSrcweir@@ -31,7 +31,12 @@
251*cdf0e10cSrcweir  * of files at once by typing "pngtest -m file1.png file2.png ..."
252*cdf0e10cSrcweir  */
253*cdf0e10cSrcweir
254*cdf0e10cSrcweir+#if defined MACOSX
255*cdf0e10cSrcweir #include "zlib.h"
256*cdf0e10cSrcweir+#else
257*cdf0e10cSrcweir+#include <external/zlib/zlib.h>
258*cdf0e10cSrcweir+#endif
259*cdf0e10cSrcweir+
260*cdf0e10cSrcweir #include "png.h"
261*cdf0e10cSrcweir /* Copied from pngpriv.h but only used in error messages below. */
262*cdf0e10cSrcweir #ifndef PNG_ZBUF_SIZE
263*cdf0e10cSrcweir--- misc/libpng-1.5.1/pngvalid.c	2011-02-03 05:58:17.000000000 +0100
264*cdf0e10cSrcweir+++ misc/build/libpng-1.5.1/pngvalid.c	2011-03-24 21:47:23.381397048 +0100
265*cdf0e10cSrcweir@@ -51,7 +51,11 @@
266*cdf0e10cSrcweir #define PNG_READ_16BIT_SUPPORTED
267*cdf0e10cSrcweir #endif
268*cdf0e10cSrcweir
269*cdf0e10cSrcweir-#include "zlib.h"   /* For crc32 */
270*cdf0e10cSrcweir+#if defined MACOSX
271*cdf0e10cSrcweir+#include "zlib.h"
272*cdf0e10cSrcweir+#else
273*cdf0e10cSrcweir+#include <external/zlib/zlib.h>
274*cdf0e10cSrcweir+#endif
275*cdf0e10cSrcweir
276*cdf0e10cSrcweir #include <float.h>  /* For floating point constants */
277*cdf0e10cSrcweir #include <stdlib.h> /* For malloc */
278