Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(792)

Side by Side Diff: third_party/libpng/pngconf.h

Issue 1118002: libpng: update to 1.2.43 (Closed)
Patch Set: Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 1
2 /* pngconf.h - machine configurable file for libpng 2 /* pngconf.h - machine configurable file for libpng
3 * 3 *
4 * libpng version 1.2.37 - June 4, 2009 4 * libpng version 1.2.43 - February 25, 2010
5 * For conditions of distribution and use, see copyright notice in png.h 5 * Copyright (c) 1998-2010 Glenn Randers-Pehrson
6 * Copyright (c) 1998-2009 Glenn Randers-Pehrson
7 * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) 6 * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
8 * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) 7 * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
8 *
9 * This code is released under the libpng license.
10 * For conditions of distribution and use, see the disclaimer
11 * and license in png.h
9 */ 12 */
10 13
11 /* Any machine specific code is near the front of this file, so if you 14 /* Any machine specific code is near the front of this file, so if you
12 * are configuring libpng for a machine, you may want to read the section 15 * are configuring libpng for a machine, you may want to read the section
13 * starting here down to where it starts to typedef png_color, png_text, 16 * starting here down to where it starts to typedef png_color, png_text,
14 * and png_info. 17 * and png_info.
15 */ 18 */
16 19
17 #ifndef PNGCONF_H 20 #ifndef PNGCONF_H
18 #define PNGCONF_H 21 #define PNGCONF_H
19 22
20 #define PNG_1_2_X 23 #define PNG_1_2_X
21 24
22 /* 25 /*
23 * PNG_USER_CONFIG has to be defined on the compiler command line. This 26 * PNG_USER_CONFIG has to be defined on the compiler command line. This
24 * includes the resource compiler for Windows DLL configurations. 27 * includes the resource compiler for Windows DLL configurations.
25 */ 28 */
26 #ifdef PNG_USER_CONFIG 29 #ifdef PNG_USER_CONFIG
27 # ifndef PNG_USER_PRIVATEBUILD 30 # ifndef PNG_USER_PRIVATEBUILD
28 # define PNG_USER_PRIVATEBUILD 31 # define PNG_USER_PRIVATEBUILD
29 # endif 32 # endif
30 #include "pngusr.h" 33 #include "pngusr.h"
31 #endif 34 #endif
32 35
33 /* PNG_CONFIGURE_LIBPNG is set by the "configure" script. */ 36 /* PNG_CONFIGURE_LIBPNG is set by the "configure" script. */
34 #ifdef PNG_CONFIGURE_LIBPNG 37 #ifdef PNG_CONFIGURE_LIBPNG
35 #ifdef HAVE_CONFIG_H 38 #ifdef HAVE_CONFIG_H
36 #include "config.h" 39 #include "config.h"
37 #endif 40 #endif
38 #endif 41 #endif
39 42
40 /* 43 /*
41 * Added at libpng-1.2.8 44 * Added at libpng-1.2.8
42 * 45 *
43 * If you create a private DLL you need to define in "pngusr.h" the followings: 46 * If you create a private DLL you need to define in "pngusr.h" the followings:
44 * #define PNG_USER_PRIVATEBUILD <Describes by whom and why this version of 47 * #define PNG_USER_PRIVATEBUILD <Describes by whom and why this version of
45 * the DLL was built> 48 * the DLL was built>
46 * e.g. #define PNG_USER_PRIVATEBUILD "Build by MyCompany for xyz reasons." 49 * e.g. #define PNG_USER_PRIVATEBUILD "Build by MyCompany for xyz reasons."
47 * #define PNG_USER_DLLFNAME_POSTFIX <two-letter postfix that serve to 50 * #define PNG_USER_DLLFNAME_POSTFIX <two-letter postfix that serve to
48 * distinguish your DLL from those of the official release. These 51 * distinguish your DLL from those of the official release. These
49 * correspond to the trailing letters that come after the version 52 * correspond to the trailing letters that come after the version
50 * number and must match your private DLL name> 53 * number and must match your private DLL name>
51 * e.g. // private DLL "libpng13gx.dll" 54 * e.g. // private DLL "libpng13gx.dll"
52 * #define PNG_USER_DLLFNAME_POSTFIX "gx" 55 * #define PNG_USER_DLLFNAME_POSTFIX "gx"
53 * 56 *
54 * The following macros are also at your disposal if you want to complete the 57 * The following macros are also at your disposal if you want to complete the
55 * DLL VERSIONINFO structure. 58 * DLL VERSIONINFO structure.
56 * - PNG_USER_VERSIONINFO_COMMENTS 59 * - PNG_USER_VERSIONINFO_COMMENTS
57 * - PNG_USER_VERSIONINFO_COMPANYNAME 60 * - PNG_USER_VERSIONINFO_COMPANYNAME
58 * - PNG_USER_VERSIONINFO_LEGALTRADEMARKS 61 * - PNG_USER_VERSIONINFO_LEGALTRADEMARKS
59 */ 62 */
60 63
61 #ifdef __STDC__ 64 #ifdef __STDC__
62 #ifdef SPECIALBUILD 65 #ifdef SPECIALBUILD
63 # pragma message("PNG_LIBPNG_SPECIALBUILD (and deprecated SPECIALBUILD)\ 66 # pragma message("PNG_LIBPNG_SPECIALBUILD (and deprecated SPECIALBUILD)\
64 are now LIBPNG reserved macros. Use PNG_USER_PRIVATEBUILD instead.") 67 are now LIBPNG reserved macros. Use PNG_USER_PRIVATEBUILD instead.")
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 #ifndef PNG_NO_READ_SUPPORTED 108 #ifndef PNG_NO_READ_SUPPORTED
106 # define PNG_READ_SUPPORTED 109 # define PNG_READ_SUPPORTED
107 #endif 110 #endif
108 111
109 /* Enable if you want a read-only libpng */ 112 /* Enable if you want a read-only libpng */
110 113
111 #ifndef PNG_NO_WRITE_SUPPORTED 114 #ifndef PNG_NO_WRITE_SUPPORTED
112 # define PNG_WRITE_SUPPORTED 115 # define PNG_WRITE_SUPPORTED
113 #endif 116 #endif
114 117
118 /* Enabled in 1.2.41. */
119 #ifdef PNG_ALLOW_BENIGN_ERRORS
120 # define png_benign_error png_warning
121 # define png_chunk_benign_error png_chunk_warning
122 #else
123 # ifndef PNG_BENIGN_ERRORS_SUPPORTED
124 # define png_benign_error png_error
125 # define png_chunk_benign_error png_chunk_error
126 # endif
127 #endif
128
129 /* Added in libpng-1.2.41 */
130 #if !defined(PNG_NO_WARNINGS) && !defined(PNG_WARNINGS_SUPPORTED)
131 # define PNG_WARNINGS_SUPPORTED
132 #endif
133
134 #if !defined(PNG_NO_ERROR_TEXT) && !defined(PNG_ERROR_TEXT_SUPPORTED)
135 # define PNG_ERROR_TEXT_SUPPORTED
136 #endif
137
138 #if !defined(PNG_NO_CHECK_cHRM) && !defined(PNG_CHECK_cHRM_SUPPORTED)
139 # define PNG_CHECK_cHRM_SUPPORTED
140 #endif
141
115 /* Enabled by default in 1.2.0. You can disable this if you don't need to 142 /* Enabled by default in 1.2.0. You can disable this if you don't need to
116 support PNGs that are embedded in MNG datastreams */ 143 * support PNGs that are embedded in MNG datastreams
144 */
117 #if !defined(PNG_1_0_X) && !defined(PNG_NO_MNG_FEATURES) 145 #if !defined(PNG_1_0_X) && !defined(PNG_NO_MNG_FEATURES)
118 # ifndef PNG_MNG_FEATURES_SUPPORTED 146 # ifndef PNG_MNG_FEATURES_SUPPORTED
119 # define PNG_MNG_FEATURES_SUPPORTED 147 # define PNG_MNG_FEATURES_SUPPORTED
120 # endif 148 # endif
121 #endif 149 #endif
122 150
123 #ifndef PNG_NO_FLOATING_POINT_SUPPORTED 151 #ifndef PNG_NO_FLOATING_POINT_SUPPORTED
124 # ifndef PNG_FLOATING_POINT_SUPPORTED 152 # ifndef PNG_FLOATING_POINT_SUPPORTED
125 # define PNG_FLOATING_POINT_SUPPORTED 153 # define PNG_FLOATING_POINT_SUPPORTED
126 # endif 154 # endif
(...skipping 13 matching lines...) Expand all
140 168
141 /* Special munging to support doing things the 'cygwin' way: 169 /* Special munging to support doing things the 'cygwin' way:
142 * 'Normal' png-on-win32 defines/defaults: 170 * 'Normal' png-on-win32 defines/defaults:
143 * PNG_BUILD_DLL -- building dll 171 * PNG_BUILD_DLL -- building dll
144 * PNG_USE_DLL -- building an application, linking to dll 172 * PNG_USE_DLL -- building an application, linking to dll
145 * (no define) -- building static library, or building an 173 * (no define) -- building static library, or building an
146 * application and linking to the static lib 174 * application and linking to the static lib
147 * 'Cygwin' defines/defaults: 175 * 'Cygwin' defines/defaults:
148 * PNG_BUILD_DLL -- (ignored) building the dll 176 * PNG_BUILD_DLL -- (ignored) building the dll
149 * (no define) -- (ignored) building an application, linking to the dll 177 * (no define) -- (ignored) building an application, linking to the dll
150 * PNG_STATIC -- (ignored) building the static lib, or building an 178 * PNG_STATIC -- (ignored) building the static lib, or building an
151 * application that links to the static lib. 179 * application that links to the static lib.
152 * ALL_STATIC -- (ignored) building various static libs, or building an 180 * ALL_STATIC -- (ignored) building various static libs, or building an
153 * application that links to the static libs. 181 * application that links to the static libs.
154 * Thus, 182 * Thus,
155 * a cygwin user should define either PNG_BUILD_DLL or PNG_STATIC, and 183 * a cygwin user should define either PNG_BUILD_DLL or PNG_STATIC, and
156 * this bit of #ifdefs will define the 'correct' config variables based on 184 * this bit of #ifdefs will define the 'correct' config variables based on
157 * that. If a cygwin user *wants* to define 'PNG_USE_DLL' that's okay, but 185 * that. If a cygwin user *wants* to define 'PNG_USE_DLL' that's okay, but
158 * unnecessary. 186 * unnecessary.
159 * 187 *
160 * Also, the precedence order is: 188 * Also, the precedence order is:
161 * ALL_STATIC (since we can't #undef something outside our namespace) 189 * ALL_STATIC (since we can't #undef something outside our namespace)
162 * PNG_BUILD_DLL 190 * PNG_BUILD_DLL
163 * PNG_STATIC 191 * PNG_STATIC
164 * (nothing) == PNG_USE_DLL 192 * (nothing) == PNG_USE_DLL
165 * 193 *
166 * CYGWIN (2002-01-20): The preceding is now obsolete. With the advent 194 * CYGWIN (2002-01-20): The preceding is now obsolete. With the advent
167 * of auto-import in binutils, we no longer need to worry about 195 * of auto-import in binutils, we no longer need to worry about
168 * __declspec(dllexport) / __declspec(dllimport) and friends. Therefore, 196 * __declspec(dllexport) / __declspec(dllimport) and friends. Therefore,
169 * we don't need to worry about PNG_STATIC or ALL_STATIC when it comes 197 * we don't need to worry about PNG_STATIC or ALL_STATIC when it comes
170 * to __declspec() stuff. However, we DO need to worry about 198 * to __declspec() stuff. However, we DO need to worry about
171 * PNG_BUILD_DLL and PNG_STATIC because those change some defaults 199 * PNG_BUILD_DLL and PNG_STATIC because those change some defaults
172 * such as CONSOLE_IO and whether GLOBAL_ARRAYS are allowed. 200 * such as CONSOLE_IO and whether GLOBAL_ARRAYS are allowed.
173 */ 201 */
174 #if defined(__CYGWIN__) 202 #ifdef __CYGWIN__
175 # if defined(ALL_STATIC) 203 # ifdef ALL_STATIC
176 # if defined(PNG_BUILD_DLL) 204 # ifdef PNG_BUILD_DLL
177 # undef PNG_BUILD_DLL 205 # undef PNG_BUILD_DLL
178 # endif 206 # endif
179 # if defined(PNG_USE_DLL) 207 # ifdef PNG_USE_DLL
180 # undef PNG_USE_DLL 208 # undef PNG_USE_DLL
181 # endif 209 # endif
182 # if defined(PNG_DLL) 210 # ifdef PNG_DLL
183 # undef PNG_DLL 211 # undef PNG_DLL
184 # endif 212 # endif
185 # if !defined(PNG_STATIC) 213 # ifndef PNG_STATIC
186 # define PNG_STATIC 214 # define PNG_STATIC
187 # endif 215 # endif
188 # else 216 # else
189 # if defined (PNG_BUILD_DLL) 217 # ifdef PNG_BUILD_DLL
190 # if defined(PNG_STATIC) 218 # ifdef PNG_STATIC
191 # undef PNG_STATIC 219 # undef PNG_STATIC
192 # endif 220 # endif
193 # if defined(PNG_USE_DLL) 221 # ifdef PNG_USE_DLL
194 # undef PNG_USE_DLL 222 # undef PNG_USE_DLL
195 # endif 223 # endif
196 # if !defined(PNG_DLL) 224 # ifndef PNG_DLL
197 # define PNG_DLL 225 # define PNG_DLL
198 # endif 226 # endif
199 # else 227 # else
200 # if defined(PNG_STATIC) 228 # ifdef PNG_STATIC
201 # if defined(PNG_USE_DLL) 229 # ifdef PNG_USE_DLL
202 # undef PNG_USE_DLL 230 # undef PNG_USE_DLL
203 # endif 231 # endif
204 # if defined(PNG_DLL) 232 # ifdef PNG_DLL
205 # undef PNG_DLL 233 # undef PNG_DLL
206 # endif 234 # endif
207 # else 235 # else
208 # if !defined(PNG_USE_DLL) 236 # ifndef PNG_USE_DLL
209 # define PNG_USE_DLL 237 # define PNG_USE_DLL
210 # endif 238 # endif
211 # if !defined(PNG_DLL) 239 # ifndef PNG_DLL
212 # define PNG_DLL 240 # define PNG_DLL
213 # endif 241 # endif
214 # endif 242 # endif
215 # endif 243 # endif
216 # endif 244 # endif
217 #endif 245 #endif
218 246
219 /* This protects us against compilers that run on a windowing system 247 /* This protects us against compilers that run on a windowing system
220 * and thus don't have or would rather us not use the stdio types: 248 * and thus don't have or would rather us not use the stdio types:
221 * stdin, stdout, and stderr. The only one currently used is stderr 249 * stdin, stdout, and stderr. The only one currently used is stderr
222 * in png_error() and png_warning(). #defining PNG_NO_CONSOLE_IO will 250 * in png_error() and png_warning(). #defining PNG_NO_CONSOLE_IO will
223 * prevent these from being compiled and used. #defining PNG_NO_STDIO 251 * prevent these from being compiled and used. #defining PNG_NO_STDIO
224 * will also prevent these, plus will prevent the entire set of stdio 252 * will also prevent these, plus will prevent the entire set of stdio
225 * macros and functions (FILE *, printf, etc.) from being compiled and used, 253 * macros and functions (FILE *, printf, etc.) from being compiled and used,
226 * unless (PNG_DEBUG > 0) has been #defined. 254 * unless (PNG_DEBUG > 0) has been #defined.
227 * 255 *
228 * #define PNG_NO_CONSOLE_IO 256 * #define PNG_NO_CONSOLE_IO
229 * #define PNG_NO_STDIO 257 * #define PNG_NO_STDIO
230 */ 258 */
231 259
232 #if defined(_WIN32_WCE) 260 #if !defined(PNG_NO_STDIO) && !defined(PNG_STDIO_SUPPORTED)
261 # define PNG_STDIO_SUPPORTED
262 #endif
263
264 #ifdef _WIN32_WCE
233 # include <windows.h> 265 # include <windows.h>
234 /* Console I/O functions are not supported on WindowsCE */ 266 /* Console I/O functions are not supported on WindowsCE */
235 # define PNG_NO_CONSOLE_IO 267 # define PNG_NO_CONSOLE_IO
236 /* abort() may not be supported on some/all Windows CE platforms */ 268 /* abort() may not be supported on some/all Windows CE platforms */
237 # define PNG_ABORT() exit(-1) 269 # define PNG_ABORT() exit(-1)
238 # ifdef PNG_DEBUG 270 # ifdef PNG_DEBUG
239 # undef PNG_DEBUG 271 # undef PNG_DEBUG
240 # endif 272 # endif
241 #endif 273 #endif
242 274
243 #ifdef PNG_BUILD_DLL 275 #ifdef PNG_BUILD_DLL
244 # ifndef PNG_CONSOLE_IO_SUPPORTED 276 # ifndef PNG_CONSOLE_IO_SUPPORTED
245 # ifndef PNG_NO_CONSOLE_IO 277 # ifndef PNG_NO_CONSOLE_IO
246 # define PNG_NO_CONSOLE_IO 278 # define PNG_NO_CONSOLE_IO
247 # endif 279 # endif
248 # endif 280 # endif
249 #endif 281 #endif
250 282
251 # ifdef PNG_NO_STDIO 283 # ifdef PNG_NO_STDIO
252 # ifndef PNG_NO_CONSOLE_IO 284 # ifndef PNG_NO_CONSOLE_IO
253 # define PNG_NO_CONSOLE_IO 285 # define PNG_NO_CONSOLE_IO
254 # endif 286 # endif
255 # ifdef PNG_DEBUG 287 # ifdef PNG_DEBUG
256 # if (PNG_DEBUG > 0) 288 # if (PNG_DEBUG > 0)
257 # include <stdio.h> 289 # include <stdio.h>
258 # endif 290 # endif
259 # endif 291 # endif
260 # else 292 # else
261 # if !defined(_WIN32_WCE) 293 # ifndef _WIN32_WCE
262 /* "stdio.h" functions are not supported on WindowsCE */ 294 /* "stdio.h" functions are not supported on WindowsCE */
263 # include <stdio.h> 295 # include <stdio.h>
264 # endif 296 # endif
265 # endif 297 # endif
266 298
299 #if !(defined PNG_NO_CONSOLE_IO) && !defined(PNG_CONSOLE_IO_SUPPORTED)
300 # define PNG_CONSOLE_IO_SUPPORTED
301 #endif
302
267 /* This macro protects us against machines that don't have function 303 /* This macro protects us against machines that don't have function
268 * prototypes (ie K&R style headers). If your compiler does not handle 304 * prototypes (ie K&R style headers). If your compiler does not handle
269 * function prototypes, define this macro and use the included ansi2knr. 305 * function prototypes, define this macro and use the included ansi2knr.
270 * I've always been able to use _NO_PROTO as the indicator, but you may 306 * I've always been able to use _NO_PROTO as the indicator, but you may
271 * need to drag the empty declaration out in front of here, or change the 307 * need to drag the empty declaration out in front of here, or change the
272 * ifdef to suit your own needs. 308 * ifdef to suit your own needs.
273 */ 309 */
274 #ifndef PNGARG 310 #ifndef PNGARG
275 311
276 #ifdef OF /* zlib prototype munger */ 312 #ifdef OF /* zlib prototype munger */
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 * possible to have run-time registry of chunk-handling functions, some of 404 * possible to have run-time registry of chunk-handling functions, some of
369 * these will be made available again. 405 * these will be made available again.
370 #define PNG_EXTERN extern 406 #define PNG_EXTERN extern
371 */ 407 */
372 #define PNG_EXTERN 408 #define PNG_EXTERN
373 409
374 /* Other defines specific to compilers can go here. Try to keep 410 /* Other defines specific to compilers can go here. Try to keep
375 * them inside an appropriate ifdef/endif pair for portability. 411 * them inside an appropriate ifdef/endif pair for portability.
376 */ 412 */
377 413
378 #if defined(PNG_FLOATING_POINT_SUPPORTED) 414 #ifdef PNG_FLOATING_POINT_SUPPORTED
379 # if defined(MACOS) 415 # ifdef MACOS
380 /* We need to check that <math.h> hasn't already been included earlier 416 /* We need to check that <math.h> hasn't already been included earlier
381 * as it seems it doesn't agree with <fp.h>, yet we should really use 417 * as it seems it doesn't agree with <fp.h>, yet we should really use
382 * <fp.h> if possible. 418 * <fp.h> if possible.
383 */ 419 */
384 # if !defined(__MATH_H__) && !defined(__MATH_H) && !defined(__cmath__) 420 # if !defined(__MATH_H__) && !defined(__MATH_H) && !defined(__cmath__)
385 # include <fp.h> 421 # include <fp.h>
386 # endif 422 # endif
387 # else 423 # else
388 # include <math.h> 424 # include <math.h>
389 # endif 425 # endif
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 * if you only want to have a png-compliant reader/writer but don't need 516 * if you only want to have a png-compliant reader/writer but don't need
481 * any of the extra transformations. This saves about 80 kbytes in a 517 * any of the extra transformations. This saves about 80 kbytes in a
482 * typical installation of the library. (PNG_NO_* form added in version 518 * typical installation of the library. (PNG_NO_* form added in version
483 * 1.0.1c, for consistency) 519 * 1.0.1c, for consistency)
484 */ 520 */
485 521
486 /* The size of the png_text structure changed in libpng-1.0.6 when 522 /* The size of the png_text structure changed in libpng-1.0.6 when
487 * iTXt support was added. iTXt support was turned off by default through 523 * iTXt support was added. iTXt support was turned off by default through
488 * libpng-1.2.x, to support old apps that malloc the png_text structure 524 * libpng-1.2.x, to support old apps that malloc the png_text structure
489 * instead of calling png_set_text() and letting libpng malloc it. It 525 * instead of calling png_set_text() and letting libpng malloc it. It
490 * was turned on by default in libpng-1.3.0. 526 * will be turned on by default in libpng-1.4.0.
491 */ 527 */
492 528
493 #if defined(PNG_1_0_X) || defined (PNG_1_2_X) 529 #if defined(PNG_1_0_X) || defined (PNG_1_2_X)
494 # ifndef PNG_NO_iTXt_SUPPORTED 530 # ifndef PNG_NO_iTXt_SUPPORTED
495 # define PNG_NO_iTXt_SUPPORTED 531 # define PNG_NO_iTXt_SUPPORTED
496 # endif 532 # endif
497 # ifndef PNG_NO_READ_iTXt 533 # ifndef PNG_NO_READ_iTXt
498 # define PNG_NO_READ_iTXt 534 # define PNG_NO_READ_iTXt
499 # endif 535 # endif
500 # ifndef PNG_NO_WRITE_iTXt 536 # ifndef PNG_NO_WRITE_iTXt
(...skipping 13 matching lines...) Expand all
514 /* The following support, added after version 1.0.0, can be turned off here en 550 /* The following support, added after version 1.0.0, can be turned off here en
515 * masse by defining PNG_LEGACY_SUPPORTED in case you need binary compatibility 551 * masse by defining PNG_LEGACY_SUPPORTED in case you need binary compatibility
516 * with old applications that require the length of png_struct and png_info 552 * with old applications that require the length of png_struct and png_info
517 * to remain unchanged. 553 * to remain unchanged.
518 */ 554 */
519 555
520 #ifdef PNG_LEGACY_SUPPORTED 556 #ifdef PNG_LEGACY_SUPPORTED
521 # define PNG_NO_FREE_ME 557 # define PNG_NO_FREE_ME
522 # define PNG_NO_READ_UNKNOWN_CHUNKS 558 # define PNG_NO_READ_UNKNOWN_CHUNKS
523 # define PNG_NO_WRITE_UNKNOWN_CHUNKS 559 # define PNG_NO_WRITE_UNKNOWN_CHUNKS
560 # define PNG_NO_HANDLE_AS_UNKNOWN
524 # define PNG_NO_READ_USER_CHUNKS 561 # define PNG_NO_READ_USER_CHUNKS
525 # define PNG_NO_READ_iCCP 562 # define PNG_NO_READ_iCCP
526 # define PNG_NO_WRITE_iCCP 563 # define PNG_NO_WRITE_iCCP
527 # define PNG_NO_READ_iTXt 564 # define PNG_NO_READ_iTXt
528 # define PNG_NO_WRITE_iTXt 565 # define PNG_NO_WRITE_iTXt
529 # define PNG_NO_READ_sCAL 566 # define PNG_NO_READ_sCAL
530 # define PNG_NO_WRITE_sCAL 567 # define PNG_NO_WRITE_sCAL
531 # define PNG_NO_READ_sPLT 568 # define PNG_NO_READ_sPLT
532 # define PNG_NO_WRITE_sPLT 569 # define PNG_NO_WRITE_sPLT
533 # define PNG_NO_INFO_IMAGE 570 # define PNG_NO_INFO_IMAGE
534 # define PNG_NO_READ_RGB_TO_GRAY 571 # define PNG_NO_READ_RGB_TO_GRAY
535 # define PNG_NO_READ_USER_TRANSFORM 572 # define PNG_NO_READ_USER_TRANSFORM
536 # define PNG_NO_WRITE_USER_TRANSFORM 573 # define PNG_NO_WRITE_USER_TRANSFORM
537 # define PNG_NO_USER_MEM 574 # define PNG_NO_USER_MEM
538 # define PNG_NO_READ_EMPTY_PLTE 575 # define PNG_NO_READ_EMPTY_PLTE
539 # define PNG_NO_MNG_FEATURES 576 # define PNG_NO_MNG_FEATURES
540 # define PNG_NO_FIXED_POINT_SUPPORTED 577 # define PNG_NO_FIXED_POINT_SUPPORTED
541 #endif 578 #endif
542 579
543 /* Ignore attempt to turn off both floating and fixed point support */ 580 /* Ignore attempt to turn off both floating and fixed point support */
544 #if !defined(PNG_FLOATING_POINT_SUPPORTED) || \ 581 #if !defined(PNG_FLOATING_POINT_SUPPORTED) || \
545 !defined(PNG_NO_FIXED_POINT_SUPPORTED) 582 !defined(PNG_NO_FIXED_POINT_SUPPORTED)
546 # define PNG_FIXED_POINT_SUPPORTED 583 # define PNG_FIXED_POINT_SUPPORTED
547 #endif 584 #endif
548 585
549 #ifndef PNG_NO_FREE_ME 586 #ifndef PNG_NO_FREE_ME
550 # define PNG_FREE_ME_SUPPORTED 587 # define PNG_FREE_ME_SUPPORTED
551 #endif 588 #endif
552 589
553 #if defined(PNG_READ_SUPPORTED) 590 #ifdef PNG_READ_SUPPORTED
554 591
555 #if !defined(PNG_READ_TRANSFORMS_NOT_SUPPORTED) && \ 592 #if !defined(PNG_READ_TRANSFORMS_NOT_SUPPORTED) && \
556 !defined(PNG_NO_READ_TRANSFORMS) 593 !defined(PNG_NO_READ_TRANSFORMS)
557 # define PNG_READ_TRANSFORMS_SUPPORTED 594 # define PNG_READ_TRANSFORMS_SUPPORTED
558 #endif 595 #endif
559 596
560 #ifdef PNG_READ_TRANSFORMS_SUPPORTED 597 #ifdef PNG_READ_TRANSFORMS_SUPPORTED
561 # ifndef PNG_NO_READ_EXPAND 598 # ifndef PNG_NO_READ_EXPAND
562 # define PNG_READ_EXPAND_SUPPORTED 599 # define PNG_READ_EXPAND_SUPPORTED
563 # endif 600 # endif
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
607 # define PNG_READ_STRIP_ALPHA_SUPPORTED 644 # define PNG_READ_STRIP_ALPHA_SUPPORTED
608 # endif 645 # endif
609 # ifndef PNG_NO_READ_USER_TRANSFORM 646 # ifndef PNG_NO_READ_USER_TRANSFORM
610 # define PNG_READ_USER_TRANSFORM_SUPPORTED 647 # define PNG_READ_USER_TRANSFORM_SUPPORTED
611 # endif 648 # endif
612 # ifndef PNG_NO_READ_RGB_TO_GRAY 649 # ifndef PNG_NO_READ_RGB_TO_GRAY
613 # define PNG_READ_RGB_TO_GRAY_SUPPORTED 650 # define PNG_READ_RGB_TO_GRAY_SUPPORTED
614 # endif 651 # endif
615 #endif /* PNG_READ_TRANSFORMS_SUPPORTED */ 652 #endif /* PNG_READ_TRANSFORMS_SUPPORTED */
616 653
654 /* PNG_PROGRESSIVE_READ_NOT_SUPPORTED is deprecated. */
617 #if !defined(PNG_NO_PROGRESSIVE_READ) && \ 655 #if !defined(PNG_NO_PROGRESSIVE_READ) && \
618 !defined(PNG_PROGRESSIVE_READ_SUPPORTED) /* if you don't do progressive */ 656 !defined(PNG_PROGRESSIVE_READ_NOT_SUPPORTED) /* if you don't do progressive */
619 # define PNG_PROGRESSIVE_READ_SUPPORTED /* reading. This is not talking */ 657 # define PNG_PROGRESSIVE_READ_SUPPORTED /* reading. This is not talking */
620 #endif /* about interlacing capability! You'll */ 658 #endif /* about interlacing capability! You'll */
621 /* still have interlacing unless you change the following line: */ 659 /* still have interlacing unless you change the following define: */
660 #define PNG_READ_INTERLACING_SUPPORTED /* required for PNG-compliant decoders */
661
662 /* PNG_NO_SEQUENTIAL_READ_SUPPORTED is deprecated. */
663 #if !defined(PNG_NO_SEQUENTIAL_READ) && \
664 !defined(PNG_SEQUENTIAL_READ_SUPPORTED) && \
665 !defined(PNG_NO_SEQUENTIAL_READ_SUPPORTED)
666 # define PNG_SEQUENTIAL_READ_SUPPORTED
667 #endif
622 668
623 #define PNG_READ_INTERLACING_SUPPORTED /* required in PNG-compliant decoders */ 669 #define PNG_READ_INTERLACING_SUPPORTED /* required in PNG-compliant decoders */
624 670
625 #ifndef PNG_NO_READ_COMPOSITE_NODIV 671 #ifndef PNG_NO_READ_COMPOSITE_NODIV
626 # ifndef PNG_NO_READ_COMPOSITED_NODIV /* libpng-1.0.x misspelling */ 672 # ifndef PNG_NO_READ_COMPOSITED_NODIV /* libpng-1.0.x misspelling */
627 # define PNG_READ_COMPOSITE_NODIV_SUPPORTED /* well tested on Intel, SGI */ 673 # define PNG_READ_COMPOSITE_NODIV_SUPPORTED /* well tested on Intel, SGI */
628 # endif 674 # endif
629 #endif 675 #endif
630 676
631 #if defined(PNG_1_0_X) || defined (PNG_1_2_X) 677 #if defined(PNG_1_0_X) || defined (PNG_1_2_X)
632 /* Deprecated, will be removed from version 2.0.0. 678 /* Deprecated, will be removed from version 2.0.0.
633 Use PNG_MNG_FEATURES_SUPPORTED instead. */ 679 Use PNG_MNG_FEATURES_SUPPORTED instead. */
634 #ifndef PNG_NO_READ_EMPTY_PLTE 680 #ifndef PNG_NO_READ_EMPTY_PLTE
635 # define PNG_READ_EMPTY_PLTE_SUPPORTED 681 # define PNG_READ_EMPTY_PLTE_SUPPORTED
636 #endif 682 #endif
637 #endif 683 #endif
638 684
639 #endif /* PNG_READ_SUPPORTED */ 685 #endif /* PNG_READ_SUPPORTED */
640 686
641 #if defined(PNG_WRITE_SUPPORTED) 687 #ifdef PNG_WRITE_SUPPORTED
642 688
643 # if !defined(PNG_WRITE_TRANSFORMS_NOT_SUPPORTED) && \ 689 # if !defined(PNG_WRITE_TRANSFORMS_NOT_SUPPORTED) && \
644 !defined(PNG_NO_WRITE_TRANSFORMS) 690 !defined(PNG_NO_WRITE_TRANSFORMS)
645 # define PNG_WRITE_TRANSFORMS_SUPPORTED 691 # define PNG_WRITE_TRANSFORMS_SUPPORTED
646 #endif 692 #endif
647 693
648 #ifdef PNG_WRITE_TRANSFORMS_SUPPORTED 694 #ifdef PNG_WRITE_TRANSFORMS_SUPPORTED
649 # ifndef PNG_NO_WRITE_SHIFT 695 # ifndef PNG_NO_WRITE_SHIFT
650 # define PNG_WRITE_SHIFT_SUPPORTED 696 # define PNG_WRITE_SHIFT_SUPPORTED
651 # endif 697 # endif
(...skipping 11 matching lines...) Expand all
663 # endif 709 # endif
664 # ifndef PNG_NO_WRITE_INVERT 710 # ifndef PNG_NO_WRITE_INVERT
665 # define PNG_WRITE_INVERT_SUPPORTED 711 # define PNG_WRITE_INVERT_SUPPORTED
666 # endif 712 # endif
667 # ifndef PNG_NO_WRITE_FILLER 713 # ifndef PNG_NO_WRITE_FILLER
668 # define PNG_WRITE_FILLER_SUPPORTED /* same as WRITE_STRIP_ALPHA */ 714 # define PNG_WRITE_FILLER_SUPPORTED /* same as WRITE_STRIP_ALPHA */
669 # endif 715 # endif
670 # ifndef PNG_NO_WRITE_SWAP_ALPHA 716 # ifndef PNG_NO_WRITE_SWAP_ALPHA
671 # define PNG_WRITE_SWAP_ALPHA_SUPPORTED 717 # define PNG_WRITE_SWAP_ALPHA_SUPPORTED
672 # endif 718 # endif
719 #ifndef PNG_1_0_X
673 # ifndef PNG_NO_WRITE_INVERT_ALPHA 720 # ifndef PNG_NO_WRITE_INVERT_ALPHA
674 # define PNG_WRITE_INVERT_ALPHA_SUPPORTED 721 # define PNG_WRITE_INVERT_ALPHA_SUPPORTED
675 # endif 722 # endif
723 #endif
676 # ifndef PNG_NO_WRITE_USER_TRANSFORM 724 # ifndef PNG_NO_WRITE_USER_TRANSFORM
677 # define PNG_WRITE_USER_TRANSFORM_SUPPORTED 725 # define PNG_WRITE_USER_TRANSFORM_SUPPORTED
678 # endif 726 # endif
679 #endif /* PNG_WRITE_TRANSFORMS_SUPPORTED */ 727 #endif /* PNG_WRITE_TRANSFORMS_SUPPORTED */
680 728
681 #if !defined(PNG_NO_WRITE_INTERLACING_SUPPORTED) && \ 729 #if !defined(PNG_NO_WRITE_INTERLACING_SUPPORTED) && \
682 !defined(PNG_WRITE_INTERLACING_SUPPORTED) 730 !defined(PNG_WRITE_INTERLACING_SUPPORTED)
683 #define PNG_WRITE_INTERLACING_SUPPORTED /* not required for PNG-compliant 731 #define PNG_WRITE_INTERLACING_SUPPORTED /* not required for PNG-compliant
684 encoders, but can cause trouble 732 encoders, but can cause trouble
685 if left undefined */ 733 if left undefined */
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
734 * png_get_pixels_per_meter() 782 * png_get_pixels_per_meter()
735 * png_get_x_offset_pixels() 783 * png_get_x_offset_pixels()
736 * png_get_y_offset_pixels() 784 * png_get_y_offset_pixels()
737 * png_get_x_offset_microns() 785 * png_get_x_offset_microns()
738 * png_get_y_offset_microns() 786 * png_get_y_offset_microns()
739 */ 787 */
740 #if !defined(PNG_NO_EASY_ACCESS) && !defined(PNG_EASY_ACCESS_SUPPORTED) 788 #if !defined(PNG_NO_EASY_ACCESS) && !defined(PNG_EASY_ACCESS_SUPPORTED)
741 # define PNG_EASY_ACCESS_SUPPORTED 789 # define PNG_EASY_ACCESS_SUPPORTED
742 #endif 790 #endif
743 791
744 /* PNG_ASSEMBLER_CODE was enabled by default in version 1.2.0 792 /* PNG_ASSEMBLER_CODE was enabled by default in version 1.2.0
745 * and removed from version 1.2.20. The following will be removed 793 * and removed from version 1.2.20. The following will be removed
746 * from libpng-1.4.0 794 * from libpng-1.4.0
747 */ 795 */
748 796
749 #if defined(PNG_READ_SUPPORTED) && !defined(PNG_NO_OPTIMIZED_CODE) 797 #if defined(PNG_READ_SUPPORTED) && !defined(PNG_NO_OPTIMIZED_CODE)
750 # ifndef PNG_OPTIMIZED_CODE_SUPPORTED 798 # ifndef PNG_OPTIMIZED_CODE_SUPPORTED
751 # define PNG_OPTIMIZED_CODE_SUPPORTED 799 # define PNG_OPTIMIZED_CODE_SUPPORTED
752 # endif 800 # endif
753 #endif 801 #endif
754 802
755 #if defined(PNG_READ_SUPPORTED) && !defined(PNG_NO_ASSEMBLER_CODE) 803 #if defined(PNG_READ_SUPPORTED) && !defined(PNG_NO_ASSEMBLER_CODE)
756 # ifndef PNG_ASSEMBLER_CODE_SUPPORTED 804 # ifndef PNG_ASSEMBLER_CODE_SUPPORTED
757 # define PNG_ASSEMBLER_CODE_SUPPORTED 805 # define PNG_ASSEMBLER_CODE_SUPPORTED
758 # endif 806 # endif
759 807
760 # if defined(__GNUC__) && defined(__x86_64__) && (__GNUC__ < 4) 808 # if defined(__GNUC__) && defined(__x86_64__) && (__GNUC__ < 4)
761 /* work around 64-bit gcc compiler bugs in gcc-3.x */ 809 /* work around 64-bit gcc compiler bugs in gcc-3.x */
762 # if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE) 810 # if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE)
763 # define PNG_NO_MMX_CODE 811 # define PNG_NO_MMX_CODE
764 # endif 812 # endif
765 # endif 813 # endif
766 814
767 # if defined(__APPLE__) 815 # ifdef __APPLE__
768 # if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE) 816 # if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE)
769 # define PNG_NO_MMX_CODE 817 # define PNG_NO_MMX_CODE
770 # endif 818 # endif
771 # endif 819 # endif
772 820
773 # if (defined(__MWERKS__) && ((__MWERKS__ < 0x0900) || macintosh)) 821 # if (defined(__MWERKS__) && ((__MWERKS__ < 0x0900) || macintosh))
774 # if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE) 822 # if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE)
775 # define PNG_NO_MMX_CODE 823 # define PNG_NO_MMX_CODE
776 # endif 824 # endif
777 # endif 825 # endif
778 826
779 # if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE) 827 # if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE)
780 # define PNG_MMX_CODE_SUPPORTED 828 # define PNG_MMX_CODE_SUPPORTED
781 # endif 829 # endif
782 830
783 #endif 831 #endif
784 /* end of obsolete code to be removed from libpng-1.4.0 */ 832 /* end of obsolete code to be removed from libpng-1.4.0 */
785 833
786 #if !defined(PNG_1_0_X) 834 /* Added at libpng-1.2.0 */
835 #ifndef PNG_1_0_X
787 #if !defined(PNG_NO_USER_MEM) && !defined(PNG_USER_MEM_SUPPORTED) 836 #if !defined(PNG_NO_USER_MEM) && !defined(PNG_USER_MEM_SUPPORTED)
788 # define PNG_USER_MEM_SUPPORTED 837 # define PNG_USER_MEM_SUPPORTED
789 #endif 838 #endif
790 #endif /* PNG_1_0_X */ 839 #endif /* PNG_1_0_X */
791 840
792 /* Added at libpng-1.2.6 */ 841 /* Added at libpng-1.2.6 */
793 #if !defined(PNG_1_0_X) 842 #ifndef PNG_1_0_X
794 #ifndef PNG_SET_USER_LIMITS_SUPPORTED 843 # ifndef PNG_SET_USER_LIMITS_SUPPORTED
795 #if !defined(PNG_NO_SET_USER_LIMITS) && !defined(PNG_SET_USER_LIMITS_SUPPORTED) 844 # ifndef PNG_NO_SET_USER_LIMITS
796 # define PNG_SET_USER_LIMITS_SUPPORTED 845 # define PNG_SET_USER_LIMITS_SUPPORTED
846 # endif
847 # endif
848 #endif /* PNG_1_0_X */
849
850 /* Added at libpng-1.0.53 and 1.2.43 */
851 #ifndef PNG_USER_LIMITS_SUPPORTED
852 # ifndef PNG_NO_USER_LIMITS
853 # define PNG_USER_LIMITS_SUPPORTED
854 # endif
797 #endif 855 #endif
798 #endif
799 #endif /* PNG_1_0_X */
800 856
801 /* Added at libpng-1.0.16 and 1.2.6. To accept all valid PNGS no matter 857 /* Added at libpng-1.0.16 and 1.2.6. To accept all valid PNGS no matter
802 * how large, set these limits to 0x7fffffffL 858 * how large, set these limits to 0x7fffffffL
803 */ 859 */
804 #ifndef PNG_USER_WIDTH_MAX 860 #ifndef PNG_USER_WIDTH_MAX
805 # define PNG_USER_WIDTH_MAX 1000000L 861 # define PNG_USER_WIDTH_MAX 1000000L
806 #endif 862 #endif
807 #ifndef PNG_USER_HEIGHT_MAX 863 #ifndef PNG_USER_HEIGHT_MAX
808 # define PNG_USER_HEIGHT_MAX 1000000L 864 # define PNG_USER_HEIGHT_MAX 1000000L
809 #endif 865 #endif
810 866
811 /* Added at libpng-1.2.34 and 1.4.0 */ 867 /* Added at libpng-1.2.43. To accept all valid PNGs no matter
868 * how large, set these two limits to 0.
869 */
870 #ifndef PNG_USER_CHUNK_CACHE_MAX
871 # define PNG_USER_CHUNK_CACHE_MAX 0
872 #endif
873
874 /* Added at libpng-1.2.43 */
875 #ifndef PNG_USER_CHUNK_MALLOC_MAX
876 # define PNG_USER_CHUNK_MALLOC_MAX 0
877 #endif
878
879 #ifndef PNG_LITERAL_SHARP
880 # define PNG_LITERAL_SHARP 0x23
881 #endif
882 #ifndef PNG_LITERAL_LEFT_SQUARE_BRACKET
883 # define PNG_LITERAL_LEFT_SQUARE_BRACKET 0x5b
884 #endif
885 #ifndef PNG_LITERAL_RIGHT_SQUARE_BRACKET
886 # define PNG_LITERAL_RIGHT_SQUARE_BRACKET 0x5d
887 #endif
888
889 /* Added at libpng-1.2.34 */
812 #ifndef PNG_STRING_NEWLINE 890 #ifndef PNG_STRING_NEWLINE
813 #define PNG_STRING_NEWLINE "\n" 891 #define PNG_STRING_NEWLINE "\n"
814 #endif 892 #endif
815 893
816 /* These are currently experimental features, define them if you want */ 894 /* These are currently experimental features, define them if you want */
817 895
818 /* very little testing */ 896 /* very little testing */
819 /* 897 /*
820 #ifdef PNG_READ_SUPPORTED 898 #ifdef PNG_READ_SUPPORTED
821 # ifndef PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED 899 # ifndef PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED
822 # define PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED 900 # define PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED
823 # endif 901 # endif
824 #endif 902 #endif
825 */ 903 */
826 904
827 /* This is only for PowerPC big-endian and 680x0 systems */ 905 /* This is only for PowerPC big-endian and 680x0 systems */
828 /* some testing */ 906 /* some testing */
829 /* 907 /*
830 #ifndef PNG_READ_BIG_ENDIAN_SUPPORTED 908 #ifndef PNG_READ_BIG_ENDIAN_SUPPORTED
831 # define PNG_READ_BIG_ENDIAN_SUPPORTED 909 # define PNG_READ_BIG_ENDIAN_SUPPORTED
832 #endif 910 #endif
833 */ 911 */
834 912
835 /* Buggy compilers (e.g., gcc 2.7.2.2) need this */ 913 /* Buggy compilers (e.g., gcc 2.7.2.2) need this */
836 /* 914 /*
837 #define PNG_NO_POINTER_INDEXING 915 #define PNG_NO_POINTER_INDEXING
838 */ 916 */
839 917
918 #if !defined(PNG_NO_POINTER_INDEXING) && \
919 !defined(PNG_POINTER_INDEXING_SUPPORTED)
920 # define PNG_POINTER_INDEXING_SUPPORTED
921 #endif
922
840 /* These functions are turned off by default, as they will be phased out. */ 923 /* These functions are turned off by default, as they will be phased out. */
841 /* 924 /*
842 #define PNG_USELESS_TESTS_SUPPORTED 925 #define PNG_USELESS_TESTS_SUPPORTED
843 #define PNG_CORRECT_PALETTE_SUPPORTED 926 #define PNG_CORRECT_PALETTE_SUPPORTED
844 */ 927 */
845 928
846 /* Any chunks you are not interested in, you can undef here. The 929 /* Any chunks you are not interested in, you can undef here. The
847 * ones that allocate memory may be expecially important (hIST, 930 * ones that allocate memory may be expecially important (hIST,
848 * tEXt, zTXt, tRNS, pCAL). Others will just save time and make png_info 931 * tEXt, zTXt, tRNS, pCAL). Others will just save time and make png_info
849 * a bit smaller. 932 * a bit smaller.
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
933 # define PNG_tIME_SUPPORTED 1016 # define PNG_tIME_SUPPORTED
934 #endif 1017 #endif
935 #ifndef PNG_NO_READ_tRNS 1018 #ifndef PNG_NO_READ_tRNS
936 # define PNG_READ_tRNS_SUPPORTED 1019 # define PNG_READ_tRNS_SUPPORTED
937 # define PNG_tRNS_SUPPORTED 1020 # define PNG_tRNS_SUPPORTED
938 #endif 1021 #endif
939 #ifndef PNG_NO_READ_zTXt 1022 #ifndef PNG_NO_READ_zTXt
940 # define PNG_READ_zTXt_SUPPORTED 1023 # define PNG_READ_zTXt_SUPPORTED
941 # define PNG_zTXt_SUPPORTED 1024 # define PNG_zTXt_SUPPORTED
942 #endif 1025 #endif
1026 #ifndef PNG_NO_READ_OPT_PLTE
1027 # define PNG_READ_OPT_PLTE_SUPPORTED /* only affects support of the */
1028 #endif /* optional PLTE chunk in RGB and RGBA images */
1029 #if defined(PNG_READ_iTXt_SUPPORTED) || defined(PNG_READ_tEXt_SUPPORTED) || \
1030 defined(PNG_READ_zTXt_SUPPORTED)
1031 # define PNG_READ_TEXT_SUPPORTED
1032 # define PNG_TEXT_SUPPORTED
1033 #endif
1034
1035 #endif /* PNG_READ_ANCILLARY_CHUNKS_SUPPORTED */
1036
943 #ifndef PNG_NO_READ_UNKNOWN_CHUNKS 1037 #ifndef PNG_NO_READ_UNKNOWN_CHUNKS
944 # define PNG_READ_UNKNOWN_CHUNKS_SUPPORTED 1038 # define PNG_READ_UNKNOWN_CHUNKS_SUPPORTED
945 # ifndef PNG_UNKNOWN_CHUNKS_SUPPORTED 1039 # ifndef PNG_UNKNOWN_CHUNKS_SUPPORTED
946 # define PNG_UNKNOWN_CHUNKS_SUPPORTED 1040 # define PNG_UNKNOWN_CHUNKS_SUPPORTED
947 # endif 1041 # endif
948 # ifndef PNG_NO_HANDLE_AS_UNKNOWN
949 # define PNG_HANDLE_AS_UNKNOWN_SUPPORTED
950 # endif
951 #endif 1042 #endif
952 #if !defined(PNG_NO_READ_USER_CHUNKS) && \ 1043 #if !defined(PNG_NO_READ_USER_CHUNKS) && \
953 defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED) 1044 defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED)
954 # define PNG_READ_USER_CHUNKS_SUPPORTED 1045 # define PNG_READ_USER_CHUNKS_SUPPORTED
955 # define PNG_USER_CHUNKS_SUPPORTED 1046 # define PNG_USER_CHUNKS_SUPPORTED
956 # ifdef PNG_NO_READ_UNKNOWN_CHUNKS 1047 # ifdef PNG_NO_READ_UNKNOWN_CHUNKS
957 # undef PNG_NO_READ_UNKNOWN_CHUNKS 1048 # undef PNG_NO_READ_UNKNOWN_CHUNKS
958 # endif 1049 # endif
959 # ifdef PNG_NO_HANDLE_AS_UNKNOWN 1050 # ifdef PNG_NO_HANDLE_AS_UNKNOWN
960 # undef PNG_NO_HANDLE_AS_UNKNOWN 1051 # undef PNG_NO_HANDLE_AS_UNKNOWN
961 # endif 1052 # endif
962 #endif 1053 #endif
963 #ifndef PNG_NO_READ_OPT_PLTE 1054
964 # define PNG_READ_OPT_PLTE_SUPPORTED /* only affects support of the */ 1055 #ifndef PNG_NO_HANDLE_AS_UNKNOWN
965 #endif /* optional PLTE chunk in RGB and RGBA images */ 1056 # ifndef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
966 #if defined(PNG_READ_iTXt_SUPPORTED) || defined(PNG_READ_tEXt_SUPPORTED) || \ 1057 # define PNG_HANDLE_AS_UNKNOWN_SUPPORTED
967 defined(PNG_READ_zTXt_SUPPORTED) 1058 # endif
968 # define PNG_READ_TEXT_SUPPORTED
969 # define PNG_TEXT_SUPPORTED
970 #endif 1059 #endif
971 1060
972 #endif /* PNG_READ_ANCILLARY_CHUNKS_SUPPORTED */ 1061 #ifdef PNG_WRITE_SUPPORTED
973
974 #ifdef PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED 1062 #ifdef PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED
975 1063
976 #ifdef PNG_NO_WRITE_TEXT 1064 #ifdef PNG_NO_WRITE_TEXT
977 # define PNG_NO_WRITE_iTXt 1065 # define PNG_NO_WRITE_iTXt
978 # define PNG_NO_WRITE_tEXt 1066 # define PNG_NO_WRITE_tEXt
979 # define PNG_NO_WRITE_zTXt 1067 # define PNG_NO_WRITE_zTXt
980 #endif 1068 #endif
981 #ifndef PNG_NO_WRITE_bKGD 1069 #ifndef PNG_NO_WRITE_bKGD
982 # define PNG_WRITE_bKGD_SUPPORTED 1070 # define PNG_WRITE_bKGD_SUPPORTED
983 # ifndef PNG_bKGD_SUPPORTED 1071 # ifndef PNG_bKGD_SUPPORTED
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
1075 # ifndef PNG_tRNS_SUPPORTED 1163 # ifndef PNG_tRNS_SUPPORTED
1076 # define PNG_tRNS_SUPPORTED 1164 # define PNG_tRNS_SUPPORTED
1077 # endif 1165 # endif
1078 #endif 1166 #endif
1079 #ifndef PNG_NO_WRITE_zTXt 1167 #ifndef PNG_NO_WRITE_zTXt
1080 # define PNG_WRITE_zTXt_SUPPORTED 1168 # define PNG_WRITE_zTXt_SUPPORTED
1081 # ifndef PNG_zTXt_SUPPORTED 1169 # ifndef PNG_zTXt_SUPPORTED
1082 # define PNG_zTXt_SUPPORTED 1170 # define PNG_zTXt_SUPPORTED
1083 # endif 1171 # endif
1084 #endif 1172 #endif
1085 #ifndef PNG_NO_WRITE_UNKNOWN_CHUNKS
1086 # define PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED
1087 # ifndef PNG_UNKNOWN_CHUNKS_SUPPORTED
1088 # define PNG_UNKNOWN_CHUNKS_SUPPORTED
1089 # endif
1090 # ifndef PNG_NO_HANDLE_AS_UNKNOWN
1091 # ifndef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
1092 # define PNG_HANDLE_AS_UNKNOWN_SUPPORTED
1093 # endif
1094 # endif
1095 #endif
1096 #if defined(PNG_WRITE_iTXt_SUPPORTED) || defined(PNG_WRITE_tEXt_SUPPORTED) || \ 1173 #if defined(PNG_WRITE_iTXt_SUPPORTED) || defined(PNG_WRITE_tEXt_SUPPORTED) || \
1097 defined(PNG_WRITE_zTXt_SUPPORTED) 1174 defined(PNG_WRITE_zTXt_SUPPORTED)
1098 # define PNG_WRITE_TEXT_SUPPORTED 1175 # define PNG_WRITE_TEXT_SUPPORTED
1099 # ifndef PNG_TEXT_SUPPORTED 1176 # ifndef PNG_TEXT_SUPPORTED
1100 # define PNG_TEXT_SUPPORTED 1177 # define PNG_TEXT_SUPPORTED
1101 # endif 1178 # endif
1102 #endif 1179 #endif
1103 1180
1181 #ifdef PNG_WRITE_tIME_SUPPORTED
1182 # ifndef PNG_NO_CONVERT_tIME
1183 # ifndef _WIN32_WCE
1184 /* The "tm" structure is not supported on WindowsCE */
1185 # ifndef PNG_CONVERT_tIME_SUPPORTED
1186 # define PNG_CONVERT_tIME_SUPPORTED
1187 # endif
1188 # endif
1189 # endif
1190 #endif
1191
1104 #endif /* PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED */ 1192 #endif /* PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED */
1105 1193
1194 #if !defined(PNG_NO_WRITE_FILTER) && !defined(PNG_WRITE_FILTER_SUPPORTED)
1195 # define PNG_WRITE_FILTER_SUPPORTED
1196 #endif
1197
1198 #ifndef PNG_NO_WRITE_UNKNOWN_CHUNKS
1199 # define PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED
1200 # ifndef PNG_UNKNOWN_CHUNKS_SUPPORTED
1201 # define PNG_UNKNOWN_CHUNKS_SUPPORTED
1202 # endif
1203 #endif
1204
1205 #ifndef PNG_NO_HANDLE_AS_UNKNOWN
1206 # ifndef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
1207 # define PNG_HANDLE_AS_UNKNOWN_SUPPORTED
1208 # endif
1209 #endif
1210 #endif /* PNG_WRITE_SUPPORTED */
1211
1106 /* Turn this off to disable png_read_png() and 1212 /* Turn this off to disable png_read_png() and
1107 * png_write_png() and leave the row_pointers member 1213 * png_write_png() and leave the row_pointers member
1108 * out of the info structure. 1214 * out of the info structure.
1109 */ 1215 */
1110 #ifndef PNG_NO_INFO_IMAGE 1216 #ifndef PNG_NO_INFO_IMAGE
1111 # define PNG_INFO_IMAGE_SUPPORTED 1217 # define PNG_INFO_IMAGE_SUPPORTED
1112 #endif 1218 #endif
1113 1219
1114 /* need the time information for reading tIME chunks */ 1220 /* Need the time information for converting tIME chunks */
1115 #if defined(PNG_tIME_SUPPORTED) 1221 #ifdef PNG_CONVERT_tIME_SUPPORTED
1116 # if !defined(_WIN32_WCE)
1117 /* "time.h" functions are not supported on WindowsCE */ 1222 /* "time.h" functions are not supported on WindowsCE */
1118 # include <time.h> 1223 # include <time.h>
1119 # endif
1120 #endif 1224 #endif
1121 1225
1122 /* Some typedefs to get us started. These should be safe on most of the 1226 /* Some typedefs to get us started. These should be safe on most of the
1123 * common platforms. The typedefs should be at least as large as the 1227 * common platforms. The typedefs should be at least as large as the
1124 * numbers suggest (a png_uint_32 must be at least 32 bits long), but they 1228 * numbers suggest (a png_uint_32 must be at least 32 bits long), but they
1125 * don't have to be exactly that size. Some compilers dislike passing 1229 * don't have to be exactly that size. Some compilers dislike passing
1126 * unsigned shorts as function parameters, so you may be better off using 1230 * unsigned shorts as function parameters, so you may be better off using
1127 * unsigned int for png_uint_16. Likewise, for 64-bit systems, you may 1231 * unsigned int for png_uint_16. Likewise, for 64-bit systems, you may
1128 * want to have unsigned int for png_uint_32 instead of unsigned long. 1232 * want to have unsigned int for png_uint_32 instead of unsigned long.
1129 */ 1233 */
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
1178 # endif /* __WIN32__, __FLAT__, __CYGWIN__ */ 1282 # endif /* __WIN32__, __FLAT__, __CYGWIN__ */
1179 #endif /* __BORLANDC__ */ 1283 #endif /* __BORLANDC__ */
1180 1284
1181 1285
1182 /* Suggest testing for specific compiler first before testing for 1286 /* Suggest testing for specific compiler first before testing for
1183 * FAR. The Watcom compiler defines both __MEDIUM__ and M_I86MM, 1287 * FAR. The Watcom compiler defines both __MEDIUM__ and M_I86MM,
1184 * making reliance oncertain keywords suspect. (SJT) 1288 * making reliance oncertain keywords suspect. (SJT)
1185 */ 1289 */
1186 1290
1187 /* MSC Medium model */ 1291 /* MSC Medium model */
1188 #if defined(FAR) 1292 #ifdef FAR
1189 # if defined(M_I86MM) 1293 # ifdef M_I86MM
1190 # define USE_FAR_KEYWORD 1294 # define USE_FAR_KEYWORD
1191 # define FARDATA FAR 1295 # define FARDATA FAR
1192 # include <dos.h> 1296 # include <dos.h>
1193 # endif 1297 # endif
1194 #endif 1298 #endif
1195 1299
1196 /* SJT: default case */ 1300 /* SJT: default case */
1197 #ifndef FAR 1301 #ifndef FAR
1198 # define FAR 1302 # define FAR
1199 #endif 1303 #endif
(...skipping 12 matching lines...) Expand all
1212 typedef png_byte FAR * png_bytep; 1316 typedef png_byte FAR * png_bytep;
1213 typedef png_uint_32 FAR * png_uint_32p; 1317 typedef png_uint_32 FAR * png_uint_32p;
1214 typedef png_int_32 FAR * png_int_32p; 1318 typedef png_int_32 FAR * png_int_32p;
1215 typedef png_uint_16 FAR * png_uint_16p; 1319 typedef png_uint_16 FAR * png_uint_16p;
1216 typedef png_int_16 FAR * png_int_16p; 1320 typedef png_int_16 FAR * png_int_16p;
1217 typedef PNG_CONST char FAR * png_const_charp; 1321 typedef PNG_CONST char FAR * png_const_charp;
1218 typedef char FAR * png_charp; 1322 typedef char FAR * png_charp;
1219 typedef png_fixed_point FAR * png_fixed_point_p; 1323 typedef png_fixed_point FAR * png_fixed_point_p;
1220 1324
1221 #ifndef PNG_NO_STDIO 1325 #ifndef PNG_NO_STDIO
1222 #if defined(_WIN32_WCE) 1326 #ifdef _WIN32_WCE
1223 typedef HANDLE png_FILE_p; 1327 typedef HANDLE png_FILE_p;
1224 #else 1328 #else
1225 typedef FILE * png_FILE_p; 1329 typedef FILE * png_FILE_p;
1226 #endif 1330 #endif
1227 #endif 1331 #endif
1228 1332
1229 #ifdef PNG_FLOATING_POINT_SUPPORTED 1333 #ifdef PNG_FLOATING_POINT_SUPPORTED
1230 typedef double FAR * png_doublep; 1334 typedef double FAR * png_doublep;
1231 #endif 1335 #endif
1232 1336
1233 /* Pointers to pointers; i.e. arrays */ 1337 /* Pointers to pointers; i.e. arrays */
1234 typedef png_byte FAR * FAR * png_bytepp; 1338 typedef png_byte FAR * FAR * png_bytepp;
1235 typedef png_uint_32 FAR * FAR * png_uint_32pp; 1339 typedef png_uint_32 FAR * FAR * png_uint_32pp;
1236 typedef png_int_32 FAR * FAR * png_int_32pp; 1340 typedef png_int_32 FAR * FAR * png_int_32pp;
1237 typedef png_uint_16 FAR * FAR * png_uint_16pp; 1341 typedef png_uint_16 FAR * FAR * png_uint_16pp;
1238 typedef png_int_16 FAR * FAR * png_int_16pp; 1342 typedef png_int_16 FAR * FAR * png_int_16pp;
1239 typedef PNG_CONST char FAR * FAR * png_const_charpp; 1343 typedef PNG_CONST char FAR * FAR * png_const_charpp;
1240 typedef char FAR * FAR * png_charpp; 1344 typedef char FAR * FAR * png_charpp;
1241 typedef png_fixed_point FAR * FAR * png_fixed_point_pp; 1345 typedef png_fixed_point FAR * FAR * png_fixed_point_pp;
1242 #ifdef PNG_FLOATING_POINT_SUPPORTED 1346 #ifdef PNG_FLOATING_POINT_SUPPORTED
1243 typedef double FAR * FAR * png_doublepp; 1347 typedef double FAR * FAR * png_doublepp;
1244 #endif 1348 #endif
1245 1349
1246 /* Pointers to pointers to pointers; i.e., pointer to array */ 1350 /* Pointers to pointers to pointers; i.e., pointer to array */
1247 typedef char FAR * FAR * FAR * png_charppp; 1351 typedef char FAR * FAR * FAR * png_charppp;
1248 1352
1249 #if defined(PNG_1_0_X) || defined(PNG_1_2_X) 1353 #if defined(PNG_1_0_X) || defined(PNG_1_2_X)
1250 /* SPC - Is this stuff deprecated? */ 1354 /* SPC - Is this stuff deprecated? */
1251 /* It'll be removed as of libpng-1.3.0 - GR-P */ 1355 /* It'll be removed as of libpng-1.4.0 - GR-P */
1252 /* libpng typedefs for types in zlib. If zlib changes 1356 /* libpng typedefs for types in zlib. If zlib changes
1253 * or another compression library is used, then change these. 1357 * or another compression library is used, then change these.
1254 * Eliminates need to change all the source files. 1358 * Eliminates need to change all the source files.
1255 */ 1359 */
1256 typedef charf * png_zcharp; 1360 typedef charf * png_zcharp;
1257 typedef charf * FAR * png_zcharpp; 1361 typedef charf * FAR * png_zcharpp;
1258 typedef z_stream FAR * png_zstreamp; 1362 typedef z_stream FAR * png_zstreamp;
1259 #endif /* (PNG_1_0_X) || defined(PNG_1_2_X) */ 1363 #endif /* (PNG_1_0_X) || defined(PNG_1_2_X) */
1260 1364
1261 /* 1365 /*
(...skipping 14 matching lines...) Expand all
1276 * the other flags is defined. 1380 * the other flags is defined.
1277 */ 1381 */
1278 1382
1279 #if !defined(PNG_DLL) && (defined(PNG_BUILD_DLL) || defined(PNG_USE_DLL)) 1383 #if !defined(PNG_DLL) && (defined(PNG_BUILD_DLL) || defined(PNG_USE_DLL))
1280 # define PNG_DLL 1384 # define PNG_DLL
1281 #endif 1385 #endif
1282 /* If CYGWIN, then disallow GLOBAL ARRAYS unless building a static lib. 1386 /* If CYGWIN, then disallow GLOBAL ARRAYS unless building a static lib.
1283 * When building a static lib, default to no GLOBAL ARRAYS, but allow 1387 * When building a static lib, default to no GLOBAL ARRAYS, but allow
1284 * command-line override 1388 * command-line override
1285 */ 1389 */
1286 #if defined(__CYGWIN__) 1390 #ifdef __CYGWIN__
1287 # if !defined(PNG_STATIC) 1391 # ifndef PNG_STATIC
1288 # if defined(PNG_USE_GLOBAL_ARRAYS) 1392 # ifdef PNG_USE_GLOBAL_ARRAYS
1289 # undef PNG_USE_GLOBAL_ARRAYS 1393 # undef PNG_USE_GLOBAL_ARRAYS
1290 # endif 1394 # endif
1291 # if !defined(PNG_USE_LOCAL_ARRAYS) 1395 # ifndef PNG_USE_LOCAL_ARRAYS
1292 # define PNG_USE_LOCAL_ARRAYS 1396 # define PNG_USE_LOCAL_ARRAYS
1293 # endif 1397 # endif
1294 # else 1398 # else
1295 # if defined(PNG_USE_LOCAL_ARRAYS) || defined(PNG_NO_GLOBAL_ARRAYS) 1399 # if defined(PNG_USE_LOCAL_ARRAYS) || defined(PNG_NO_GLOBAL_ARRAYS)
1296 # if defined(PNG_USE_GLOBAL_ARRAYS) 1400 # ifdef PNG_USE_GLOBAL_ARRAYS
1297 # undef PNG_USE_GLOBAL_ARRAYS 1401 # undef PNG_USE_GLOBAL_ARRAYS
1298 # endif 1402 # endif
1299 # endif 1403 # endif
1300 # endif 1404 # endif
1301 # if !defined(PNG_USE_LOCAL_ARRAYS) && !defined(PNG_USE_GLOBAL_ARRAYS) 1405 # if !defined(PNG_USE_LOCAL_ARRAYS) && !defined(PNG_USE_GLOBAL_ARRAYS)
1302 # define PNG_USE_LOCAL_ARRAYS 1406 # define PNG_USE_LOCAL_ARRAYS
1303 # endif 1407 # endif
1304 #endif 1408 #endif
1305 1409
1306 /* Do not use global arrays (helps with building DLL's) 1410 /* Do not use global arrays (helps with building DLL's)
1307 * They are no longer used in libpng itself, since version 1.0.5c, 1411 * They are no longer used in libpng itself, since version 1.0.5c,
1308 * but might be required for some pre-1.0.5c applications. 1412 * but might be required for some pre-1.0.5c applications.
1309 */ 1413 */
1310 #if !defined(PNG_USE_LOCAL_ARRAYS) && !defined(PNG_USE_GLOBAL_ARRAYS) 1414 #if !defined(PNG_USE_LOCAL_ARRAYS) && !defined(PNG_USE_GLOBAL_ARRAYS)
1311 # if defined(PNG_NO_GLOBAL_ARRAYS) || \ 1415 # if defined(PNG_NO_GLOBAL_ARRAYS) || \
1312 (defined(__GNUC__) && defined(PNG_DLL)) || defined(_MSC_VER) 1416 (defined(__GNUC__) && defined(PNG_DLL)) || defined(_MSC_VER)
1313 # define PNG_USE_LOCAL_ARRAYS 1417 # define PNG_USE_LOCAL_ARRAYS
1314 # else 1418 # else
1315 # define PNG_USE_GLOBAL_ARRAYS 1419 # define PNG_USE_GLOBAL_ARRAYS
1316 # endif 1420 # endif
1317 #endif 1421 #endif
1318 1422
1319 #if defined(__CYGWIN__) 1423 #ifdef __CYGWIN__
1320 # undef PNGAPI 1424 # undef PNGAPI
1321 # define PNGAPI __cdecl 1425 # define PNGAPI __cdecl
1322 # undef PNG_IMPEXP 1426 # undef PNG_IMPEXP
1323 # define PNG_IMPEXP 1427 # define PNG_IMPEXP
1324 #endif 1428 #endif
1325 1429
1326 /* If you define PNGAPI, e.g., with compiler option "-DPNGAPI=__stdcall", 1430 /* If you define PNGAPI, e.g., with compiler option "-DPNGAPI=__stdcall",
1327 * you may get warnings regarding the linkage of png_zalloc and png_zfree. 1431 * you may get warnings regarding the linkage of png_zalloc and png_zfree.
1328 * Don't ignore those warnings; you must also reset the default calling 1432 * Don't ignore those warnings; you must also reset the default calling
1329 * convention in your compiler to match your PNGAPI, and you must build 1433 * convention in your compiler to match your PNGAPI, and you must build
1330 * zlib and your applications the same way you build libpng. 1434 * zlib and your applications the same way you build libpng.
1331 */ 1435 */
1332 1436
1333 #if defined(__MINGW32__) && !defined(PNG_MODULEDEF) 1437 #if defined(__MINGW32__) && !defined(PNG_MODULEDEF)
1334 # ifndef PNG_NO_MODULEDEF 1438 # ifndef PNG_NO_MODULEDEF
(...skipping 15 matching lines...) Expand all
1350 # else 1454 # else
1351 # define PNGAPI _cdecl 1455 # define PNGAPI _cdecl
1352 # endif 1456 # endif
1353 # endif 1457 # endif
1354 1458
1355 # if !defined(PNG_IMPEXP) && (!defined(PNG_DLL) || \ 1459 # if !defined(PNG_IMPEXP) && (!defined(PNG_DLL) || \
1356 0 /* WINCOMPILER_WITH_NO_SUPPORT_FOR_DECLIMPEXP */) 1460 0 /* WINCOMPILER_WITH_NO_SUPPORT_FOR_DECLIMPEXP */)
1357 # define PNG_IMPEXP 1461 # define PNG_IMPEXP
1358 # endif 1462 # endif
1359 1463
1360 # if !defined(PNG_IMPEXP) 1464 # ifndef PNG_IMPEXP
1361 1465
1362 # define PNG_EXPORT_TYPE1(type,symbol) PNG_IMPEXP type PNGAPI symbol 1466 # define PNG_EXPORT_TYPE1(type,symbol) PNG_IMPEXP type PNGAPI symbol
1363 # define PNG_EXPORT_TYPE2(type,symbol) type PNG_IMPEXP PNGAPI symbol 1467 # define PNG_EXPORT_TYPE2(type,symbol) type PNG_IMPEXP PNGAPI symbol
1364 1468
1365 /* Borland/Microsoft */ 1469 /* Borland/Microsoft */
1366 # if defined(_MSC_VER) || defined(__BORLANDC__) 1470 # if defined(_MSC_VER) || defined(__BORLANDC__)
1367 # if (_MSC_VER >= 800) || (__BORLANDC__ >= 0x500) 1471 # if (_MSC_VER >= 800) || (__BORLANDC__ >= 0x500)
1368 # define PNG_EXPORT PNG_EXPORT_TYPE1 1472 # define PNG_EXPORT PNG_EXPORT_TYPE1
1369 # else 1473 # else
1370 # define PNG_EXPORT PNG_EXPORT_TYPE2 1474 # define PNG_EXPORT PNG_EXPORT_TYPE2
1371 # if defined(PNG_BUILD_DLL) 1475 # ifdef PNG_BUILD_DLL
1372 # define PNG_IMPEXP __export 1476 # define PNG_IMPEXP __export
1373 # else 1477 # else
1374 # define PNG_IMPEXP /*__import */ /* doesn't exist AFAIK in 1478 # define PNG_IMPEXP /*__import */ /* doesn't exist AFAIK in
1375 VC++ */ 1479 VC++ */
1376 # endif /* Exists in Borland C++ for 1480 # endif /* Exists in Borland C++ for
1377 C++ classes (== huge) */ 1481 C++ classes (== huge) */
1378 # endif 1482 # endif
1379 # endif 1483 # endif
1380 1484
1381 # if !defined(PNG_IMPEXP) 1485 # ifndef PNG_IMPEXP
1382 # if defined(PNG_BUILD_DLL) 1486 # ifdef PNG_BUILD_DLL
1383 # define PNG_IMPEXP __declspec(dllexport) 1487 # define PNG_IMPEXP __declspec(dllexport)
1384 # else 1488 # else
1385 # define PNG_IMPEXP __declspec(dllimport) 1489 # define PNG_IMPEXP __declspec(dllimport)
1386 # endif 1490 # endif
1387 # endif 1491 # endif
1388 # endif /* PNG_IMPEXP */ 1492 # endif /* PNG_IMPEXP */
1389 #else /* !(DLL || non-cygwin WINDOWS) */ 1493 #else /* !(DLL || non-cygwin WINDOWS) */
1390 # if (defined(__IBMC__) || defined(__IBMCPP__)) && defined(__OS2__) 1494 # if (defined(__IBMC__) || defined(__IBMCPP__)) && defined(__OS2__)
1391 # ifndef PNGAPI 1495 # ifndef PNGAPI
1392 # define PNGAPI _System 1496 # define PNGAPI _System
(...skipping 25 matching lines...) Expand all
1418 #ifndef PNG_EXPORT 1522 #ifndef PNG_EXPORT
1419 # define PNG_EXPORT(type,symbol) PNG_IMPEXP type PNGAPI symbol 1523 # define PNG_EXPORT(type,symbol) PNG_IMPEXP type PNGAPI symbol
1420 #endif 1524 #endif
1421 1525
1422 #ifdef PNG_USE_GLOBAL_ARRAYS 1526 #ifdef PNG_USE_GLOBAL_ARRAYS
1423 # ifndef PNG_EXPORT_VAR 1527 # ifndef PNG_EXPORT_VAR
1424 # define PNG_EXPORT_VAR(type) extern PNG_IMPEXP type 1528 # define PNG_EXPORT_VAR(type) extern PNG_IMPEXP type
1425 # endif 1529 # endif
1426 #endif 1530 #endif
1427 1531
1532 #ifdef PNG_PEDANTIC_WARNINGS
1533 # ifndef PNG_PEDANTIC_WARNINGS_SUPPORTED
1534 # define PNG_PEDANTIC_WARNINGS_SUPPORTED
1535 # endif
1536 #endif
1537
1538 #ifdef PNG_PEDANTIC_WARNINGS_SUPPORTED
1539 /* Support for compiler specific function attributes. These are used
1540 * so that where compiler support is available incorrect use of API
1541 * functions in png.h will generate compiler warnings. Added at libpng
1542 * version 1.2.41.
1543 */
1544 # ifdef __GNUC__
1545 # ifndef PNG_USE_RESULT
1546 # define PNG_USE_RESULT __attribute__((__warn_unused_result__))
1547 # endif
1548 # ifndef PNG_NORETURN
1549 # define PNG_NORETURN __attribute__((__noreturn__))
1550 # endif
1551 # ifndef PNG_ALLOCATED
1552 # define PNG_ALLOCATED __attribute__((__malloc__))
1553 # endif
1554
1555 /* This specifically protects structure members that should only be
1556 * accessed from within the library, therefore should be empty during
1557 * a library build.
1558 */
1559 # ifndef PNG_DEPRECATED
1560 # define PNG_DEPRECATED __attribute__((__deprecated__))
1561 # endif
1562 # ifndef PNG_DEPSTRUCT
1563 # define PNG_DEPSTRUCT __attribute__((__deprecated__))
1564 # endif
1565 # ifndef PNG_PRIVATE
1566 # if 0 /* Doesn't work so we use deprecated instead*/
1567 # define PNG_PRIVATE \
1568 __attribute__((warning("This function is not exported by libpng.")))
1569 # else
1570 # define PNG_PRIVATE \
1571 __attribute__((__deprecated__))
1572 # endif
1573 # endif /* PNG_PRIVATE */
1574 # endif /* __GNUC__ */
1575 #endif /* PNG_PEDANTIC_WARNINGS */
1576
1577 #ifndef PNG_DEPRECATED
1578 # define PNG_DEPRECATED /* Use of this function is deprecated */
1579 #endif
1580 #ifndef PNG_USE_RESULT
1581 # define PNG_USE_RESULT /* The result of this function must be checked */
1582 #endif
1583 #ifndef PNG_NORETURN
1584 # define PNG_NORETURN /* This function does not return */
1585 #endif
1586 #ifndef PNG_ALLOCATED
1587 # define PNG_ALLOCATED /* The result of the function is new memory */
1588 #endif
1589 #ifndef PNG_DEPSTRUCT
1590 # define PNG_DEPSTRUCT /* Access to this struct member is deprecated */
1591 #endif
1592 #ifndef PNG_PRIVATE
1593 # define PNG_PRIVATE /* This is a private libpng function */
1594 #endif
1595
1428 /* User may want to use these so they are not in PNG_INTERNAL. Any library 1596 /* User may want to use these so they are not in PNG_INTERNAL. Any library
1429 * functions that are passed far data must be model independent. 1597 * functions that are passed far data must be model independent.
1430 */ 1598 */
1431 1599
1432 #ifndef PNG_ABORT 1600 #ifndef PNG_ABORT
1433 # define PNG_ABORT() abort() 1601 # define PNG_ABORT() abort()
1434 #endif 1602 #endif
1435 1603
1436 #ifdef PNG_SETJMP_SUPPORTED 1604 #ifdef PNG_SETJMP_SUPPORTED
1437 # define png_jmpbuf(png_ptr) ((png_ptr)->jmpbuf) 1605 # define png_jmpbuf(png_ptr) ((png_ptr)->jmpbuf)
1438 #else 1606 #else
1439 # define png_jmpbuf(png_ptr) \ 1607 # define png_jmpbuf(png_ptr) \
1440 (LIBPNG_WAS_COMPILED_WITH__PNG_SETJMP_NOT_SUPPORTED) 1608 (LIBPNG_WAS_COMPILED_WITH__PNG_SETJMP_NOT_SUPPORTED)
1441 #endif 1609 #endif
1442 1610
1443 #if defined(USE_FAR_KEYWORD) /* memory model independent fns */ 1611 #ifdef USE_FAR_KEYWORD /* memory model independent fns */
1444 /* use this to make far-to-near assignments */ 1612 /* Use this to make far-to-near assignments */
1445 # define CHECK 1 1613 # define CHECK 1
1446 # define NOCHECK 0 1614 # define NOCHECK 0
1447 # define CVT_PTR(ptr) (png_far_to_near(png_ptr,ptr,CHECK)) 1615 # define CVT_PTR(ptr) (png_far_to_near(png_ptr,ptr,CHECK))
1448 # define CVT_PTR_NOCHECK(ptr) (png_far_to_near(png_ptr,ptr,NOCHECK)) 1616 # define CVT_PTR_NOCHECK(ptr) (png_far_to_near(png_ptr,ptr,NOCHECK))
1449 # define png_snprintf _fsnprintf /* Added to v 1.2.19 */ 1617 # define png_snprintf _fsnprintf /* Added to v 1.2.19 */
1450 # define png_strlen _fstrlen 1618 # define png_strlen _fstrlen
1451 # define png_memcmp _fmemcmp /* SJT: added */ 1619 # define png_memcmp _fmemcmp /* SJT: added */
1452 # define png_memcpy _fmemcpy 1620 # define png_memcpy _fmemcpy
1453 # define png_memset _fmemset 1621 # define png_memset _fmemset
1454 #else /* use the usual functions */ 1622 #else /* Use the usual functions */
1455 # define CVT_PTR(ptr) (ptr) 1623 # define CVT_PTR(ptr) (ptr)
1456 # define CVT_PTR_NOCHECK(ptr) (ptr) 1624 # define CVT_PTR_NOCHECK(ptr) (ptr)
1457 # ifndef PNG_NO_SNPRINTF 1625 # ifndef PNG_NO_SNPRINTF
1458 # ifdef _MSC_VER 1626 # ifdef _MSC_VER
1459 # define png_snprintf _snprintf /* Added to v 1.2.19 */ 1627 # define png_snprintf _snprintf /* Added to v 1.2.19 */
1460 # define png_snprintf2 _snprintf 1628 # define png_snprintf2 _snprintf
1461 # define png_snprintf6 _snprintf 1629 # define png_snprintf6 _snprintf
1462 # else 1630 # else
1463 # define png_snprintf snprintf /* Added to v 1.2.19 */ 1631 # define png_snprintf snprintf /* Added to v 1.2.19 */
1464 # define png_snprintf2 snprintf 1632 # define png_snprintf2 snprintf
1465 # define png_snprintf6 snprintf 1633 # define png_snprintf6 snprintf
1466 # endif 1634 # endif
1467 # else 1635 # else
1468 /* You don't have or don't want to use snprintf(). Caution: Using 1636 /* You don't have or don't want to use snprintf(). Caution: Using
1469 * sprintf instead of snprintf exposes your application to accidental 1637 * sprintf instead of snprintf exposes your application to accidental
1470 * or malevolent buffer overflows. If you don't have snprintf() 1638 * or malevolent buffer overflows. If you don't have snprintf()
1471 * as a general rule you should provide one (you can get one from 1639 * as a general rule you should provide one (you can get one from
1472 * Portable OpenSSH). */ 1640 * Portable OpenSSH).
1641 */
1473 # define png_snprintf(s1,n,fmt,x1) sprintf(s1,fmt,x1) 1642 # define png_snprintf(s1,n,fmt,x1) sprintf(s1,fmt,x1)
1474 # define png_snprintf2(s1,n,fmt,x1,x2) sprintf(s1,fmt,x1,x2) 1643 # define png_snprintf2(s1,n,fmt,x1,x2) sprintf(s1,fmt,x1,x2)
1475 # define png_snprintf6(s1,n,fmt,x1,x2,x3,x4,x5,x6) \ 1644 # define png_snprintf6(s1,n,fmt,x1,x2,x3,x4,x5,x6) \
1476 sprintf(s1,fmt,x1,x2,x3,x4,x5,x6) 1645 sprintf(s1,fmt,x1,x2,x3,x4,x5,x6)
1477 # endif 1646 # endif
1478 # define png_strlen strlen 1647 # define png_strlen strlen
1479 # define png_memcmp memcmp /* SJT: added */ 1648 # define png_memcmp memcmp /* SJT: added */
1480 # define png_memcpy memcpy 1649 # define png_memcpy memcpy
1481 # define png_memset memset 1650 # define png_memset memset
1482 #endif 1651 #endif
1483 /* End of memory model independent support */ 1652 /* End of memory model independent support */
1484 1653
1485 /* Just a little check that someone hasn't tried to define something 1654 /* Just a little check that someone hasn't tried to define something
1486 * contradictory. 1655 * contradictory.
1487 */ 1656 */
1488 #if (PNG_ZBUF_SIZE > 65536L) && defined(PNG_MAX_MALLOC_64K) 1657 #if (PNG_ZBUF_SIZE > 65536L) && defined(PNG_MAX_MALLOC_64K)
1489 # undef PNG_ZBUF_SIZE 1658 # undef PNG_ZBUF_SIZE
1490 # define PNG_ZBUF_SIZE 65536L 1659 # define PNG_ZBUF_SIZE 65536L
1491 #endif 1660 #endif
1492 1661
1493 /* Added at libpng-1.2.8 */ 1662 /* Added at libpng-1.2.8 */
1494 #endif /* PNG_VERSION_INFO_ONLY */ 1663 #endif /* PNG_VERSION_INFO_ONLY */
1495 1664
1496 #endif /* PNGCONF_H */ 1665 #endif /* PNGCONF_H */
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698