1 /* pngconf.h - machine configurable file for libpng
3 * libpng 1.2.4 - July 8, 2002
4 * For conditions of distribution and use, see copyright notice in png.h
5 * Copyright (c) 1998-2002 Glenn Randers-Pehrson
6 * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
7 * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
10 /* Any machine specific code is near the front of this file, so if you
11 * are configuring libpng for a machine, you may want to read the section
12 * starting here down to where it starts to typedef png_color, png_text,
19 /* This is the size of the compression buffer, and thus the size of
20 * an IDAT chunk. Make this whatever size you feel is best for your
21 * machine. One of these will be allocated per png_struct. When this
22 * is full, it writes the data to the disk, and does some other
23 * calculations. Making this an extremely small size will slow
24 * the library down, but you may want to experiment to determine
25 * where it becomes significant, if you are concerned with memory
26 * usage. Note that zlib allocates at least 32Kb also. For readers,
27 * this describes the size of the buffer available to read the data in.
28 * Unless this gets smaller than the size of a row (compressed),
29 * it should not make much difference how big this is.
33 # define PNG_ZBUF_SIZE 8192
36 /* Enable if you want a write-only libpng */
38 #ifndef PNG_NO_READ_SUPPORTED
39 # define PNG_READ_SUPPORTED
42 /* Enable if you want a read-only libpng */
44 #ifndef PNG_NO_WRITE_SUPPORTED
45 # define PNG_WRITE_SUPPORTED
48 /* Enabled by default in 1.2.0. You can disable this if you don't need to
49 support PNGs that are embedded in MNG datastreams */
50 #if !defined(PNG_1_0_X) && !defined(PNG_NO_MNG_FEATURES)
51 # ifndef PNG_MNG_FEATURES_SUPPORTED
52 # define PNG_MNG_FEATURES_SUPPORTED
56 #ifndef PNG_NO_FLOATING_POINT_SUPPORTED
57 # ifndef PNG_FLOATING_POINT_SUPPORTED
58 # define PNG_FLOATING_POINT_SUPPORTED
62 /* If you are running on a machine where you cannot allocate more
63 * than 64K of memory at once, uncomment this. While libpng will not
64 * normally need that much memory in a chunk (unless you load up a very
65 * large file), zlib needs to know how big of a chunk it can use, and
66 * libpng thus makes sure to check any memory allocation to verify it
67 * will fit into memory.
68 #define PNG_MAX_MALLOC_64K
70 #if defined(MAXSEG_64K) && !defined(PNG_MAX_MALLOC_64K)
71 # define PNG_MAX_MALLOC_64K
74 /* Special munging to support doing things the 'cygwin' way:
75 * 'Normal' png-on-win32 defines/defaults:
76 * PNG_BUILD_DLL -- building dll
77 * PNG_USE_DLL -- building an application, linking to dll
78 * (no define) -- building static library, or building an
79 * application and linking to the static lib
80 * 'Cygwin' defines/defaults:
81 * PNG_BUILD_DLL -- (ignored) building the dll
82 * (no define) -- (ignored) building an application, linking to the dll
83 * PNG_STATIC -- (ignored) building the static lib, or building an
84 * application that links to the static lib.
85 * ALL_STATIC -- (ignored) building various static libs, or building an
86 * application that links to the static libs.
88 * a cygwin user should define either PNG_BUILD_DLL or PNG_STATIC, and
89 * this bit of #ifdefs will define the 'correct' config variables based on
90 * that. If a cygwin user *wants* to define 'PNG_USE_DLL' that's okay, but
93 * Also, the precedence order is:
94 * ALL_STATIC (since we can't #undef something outside our namespace)
97 * (nothing) == PNG_USE_DLL
99 * CYGWIN (2002-01-20): The preceding is now obsolete. With the advent
100 * of auto-import in binutils, we no longer need to worry about
101 * __declspec(dllexport) / __declspec(dllimport) and friends. Therefore,
102 * we don't need to worry about PNG_STATIC or ALL_STATIC when it comes
103 * to __declspec() stuff. However, we DO need to worry about
104 * PNG_BUILD_DLL and PNG_STATIC because those change some defaults
105 * such as CONSOLE_IO and whether GLOBAL_ARRAYS are allowed.
107 #if defined(__CYGWIN__)
108 # if defined(ALL_STATIC)
109 # if defined(PNG_BUILD_DLL)
110 # undef PNG_BUILD_DLL
112 # if defined(PNG_USE_DLL)
115 # if defined(PNG_DLL)
118 # if !defined(PNG_STATIC)
122 # if defined (PNG_BUILD_DLL)
123 # if defined(PNG_STATIC)
126 # if defined(PNG_USE_DLL)
129 # if !defined(PNG_DLL)
133 # if defined(PNG_STATIC)
134 # if defined(PNG_USE_DLL)
137 # if defined(PNG_DLL)
141 # if !defined(PNG_USE_DLL)
144 # if !defined(PNG_DLL)
152 /* This protects us against compilers that run on a windowing system
153 * and thus don't have or would rather us not use the stdio types:
154 * stdin, stdout, and stderr. The only one currently used is stderr
155 * in png_error() and png_warning(). #defining PNG_NO_CONSOLE_IO will
156 * prevent these from being compiled and used. #defining PNG_NO_STDIO
157 * will also prevent these, plus will prevent the entire set of stdio
158 * macros and functions (FILE *, printf, etc.) from being compiled and used,
159 * unless (PNG_DEBUG > 0) has been #defined.
161 * #define PNG_NO_CONSOLE_IO
162 * #define PNG_NO_STDIO
165 #if defined(_WIN32_WCE)
166 # include <windows.h>
167 /* Console I/O functions are not supported on WindowsCE */
168 # define PNG_NO_CONSOLE_IO
175 # ifndef PNG_CONSOLE_IO_SUPPORTED
176 # ifndef PNG_NO_CONSOLE_IO
177 # define PNG_NO_CONSOLE_IO
183 # ifndef PNG_NO_CONSOLE_IO
184 # define PNG_NO_CONSOLE_IO
192 # if !defined(_WIN32_WCE)
193 /* "stdio.h" functions are not supported on WindowsCE */
198 /* This macro protects us against machines that don't have function
199 * prototypes (ie K&R style headers). If your compiler does not handle
200 * function prototypes, define this macro and use the included ansi2knr.
201 * I've always been able to use _NO_PROTO as the indicator, but you may
202 * need to drag the empty declaration out in front of here, or change the
203 * ifdef to suit your own needs.
207 #ifdef OF /* zlib prototype munger */
208 # define PNGARG(arglist) OF(arglist)
212 # define PNGARG(arglist) ()
213 # ifndef PNG_TYPECAST_NULL
214 # define PNG_TYPECAST_NULL
217 # define PNGARG(arglist) arglist
218 #endif /* _NO_PROTO */
224 /* Try to determine if we are compiling on a Mac. Note that testing for
225 * just __MWERKS__ is not good enough, because the Codewarrior is now used
226 * on non-Mac platforms.
229 # if (defined(__MWERKS__) && defined(macintosh)) || defined(applec) || \
230 defined(THINK_C) || defined(__SC__) || defined(TARGET_OS_MAC)
235 /* enough people need this for various reasons to include it here */
236 #if !defined(MACOS) && !defined(RISCOS) && !defined(_WIN32_WCE)
237 # include <sys/types.h>
240 #if !defined(PNG_SETJMP_NOT_SUPPORTED) && !defined(PNG_NO_SETJMP_SUPPORTED)
241 # define PNG_SETJMP_SUPPORTED
244 #ifdef PNG_SETJMP_SUPPORTED
245 /* This is an attempt to force a single setjmp behaviour on Linux. If
246 * the X config stuff didn't define _BSD_SOURCE we wouldn't need this.
251 # define PNG_SAVE_BSD_SOURCE
255 __png
.h__ already includes setjmp
.h
;
256 __dont__ include it again
.;
258 # endif /* __linux__ */
260 /* include setjmp.h for error handling */
264 # ifdef PNG_SAVE_BSD_SOURCE
266 # undef PNG_SAVE_BSD_SOURCE
268 # endif /* __linux__ */
269 #endif /* PNG_SETJMP_SUPPORTED */
272 # include <strings.h>
277 /* Other defines for things like memory and the like can go here. */
282 /* The functions exported by PNG_EXTERN are PNG_INTERNAL functions, which
283 * aren't usually used outside the library (as far as I know), so it is
284 * debatable if they should be exported at all. In the future, when it is
285 * possible to have run-time registry of chunk-handling functions, some of
286 * these will be made available again.
287 #define PNG_EXTERN extern
291 /* Other defines specific to compilers can go here. Try to keep
292 * them inside an appropriate ifdef/endif pair for portability.
295 #if defined(PNG_FLOATING_POINT_SUPPORTED)
297 /* We need to check that <math.h> hasn't already been included earlier
298 * as it seems it doesn't agree with <fp.h>, yet we should really use
299 * <fp.h> if possible.
301 # if !defined(__MATH_H__) && !defined(__MATH_H) && !defined(__cmath__)
307 # if defined(_AMIGA) && defined(__SASC) && defined(_M68881)
308 /* Amiga SAS/C: We must include builtin FPU functions when compiling using
315 /* Codewarrior on NT has linking problems without this. */
316 #if (defined(__MWERKS__) && defined(WIN32)) || defined(__STDC__)
317 # define PNG_ALWAYS_EXTERN
320 /* For some reason, Borland C++ defines memcmp, etc. in mem.h, not
321 * stdlib.h like it should (I think). Or perhaps this is a C++
329 #if defined(_MSC_VER) && (defined(WIN32) || defined(_Windows) || \
330 defined(_WINDOWS) || defined(_WIN32) || defined(__WIN32__))
334 /* This controls how fine the dithering gets. As this allocates
335 * a largish chunk of memory (32K), those who are not as concerned
336 * with dithering quality can decrease some or all of these.
338 #ifndef PNG_DITHER_RED_BITS
339 # define PNG_DITHER_RED_BITS 5
341 #ifndef PNG_DITHER_GREEN_BITS
342 # define PNG_DITHER_GREEN_BITS 5
344 #ifndef PNG_DITHER_BLUE_BITS
345 # define PNG_DITHER_BLUE_BITS 5
348 /* This controls how fine the gamma correction becomes when you
349 * are only interested in 8 bits anyway. Increasing this value
350 * results in more memory being used, and more pow() functions
351 * being called to fill in the gamma tables. Don't set this value
352 * less then 8, and even that may not work (I haven't tested it).
355 #ifndef PNG_MAX_GAMMA_8
356 # define PNG_MAX_GAMMA_8 11
359 /* This controls how much a difference in gamma we can tolerate before
360 * we actually start doing gamma conversion.
362 #ifndef PNG_GAMMA_THRESHOLD
363 # define PNG_GAMMA_THRESHOLD 0.05
366 #endif /* PNG_INTERNAL */
368 /* The following uses const char * instead of char * for error
369 * and warning message functions, so some compilers won't complain.
370 * If you do not want to use const, define PNG_NO_CONST here.
374 # define PNG_CONST const
379 /* The following defines give you the ability to remove code from the
380 * library that you will not be using. I wish I could figure out how to
381 * automate this, but I can't do that without making it seriously hard
382 * on the users. So if you are not using an ability, change the #define
383 * to and #undef, and that part of the library will not be compiled. If
384 * your linker can't find a function, you may want to make sure the
385 * ability is defined here. Some of these depend upon some others being
386 * defined. I haven't figured out all the interactions here, so you may
387 * have to experiment awhile to get everything to compile. If you are
388 * creating or using a shared library, you probably shouldn't touch this,
389 * as it will affect the size of the structures, and this will cause bad
390 * things to happen if the library and/or application ever change.
393 /* Any features you will not be using can be undef'ed here */
395 /* GR-P, 0.96a: Set "*TRANSFORMS_SUPPORTED as default but allow user
396 * to turn it off with "*TRANSFORMS_NOT_SUPPORTED" or *PNG_NO_*_TRANSFORMS
397 * on the compile line, then pick and choose which ones to define without
398 * having to edit this file. It is safe to use the *TRANSFORMS_NOT_SUPPORTED
399 * if you only want to have a png-compliant reader/writer but don't need
400 * any of the extra transformations. This saves about 80 kbytes in a
401 * typical installation of the library. (PNG_NO_* form added in version
402 * 1.0.1c, for consistency)
405 /* The size of the png_text structure changed in libpng-1.0.6 when
406 * iTXt is supported. It is turned off by default, to support old apps
407 * that malloc the png_text structure instead of calling png_set_text()
408 * and letting libpng malloc it. It will be turned on by default in
412 #ifndef PNG_iTXt_SUPPORTED
413 # if !defined(PNG_READ_iTXt_SUPPORTED) && !defined(PNG_NO_READ_iTXt)
414 # define PNG_NO_READ_iTXt
416 # if !defined(PNG_WRITE_iTXt_SUPPORTED) && !defined(PNG_NO_WRITE_iTXt)
417 # define PNG_NO_WRITE_iTXt
421 /* The following support, added after version 1.0.0, can be turned off here en
422 * masse by defining PNG_LEGACY_SUPPORTED in case you need binary compatibility
423 * with old applications that require the length of png_struct and png_info
424 * to remain unchanged.
427 #ifdef PNG_LEGACY_SUPPORTED
428 # define PNG_NO_FREE_ME
429 # define PNG_NO_READ_UNKNOWN_CHUNKS
430 # define PNG_NO_WRITE_UNKNOWN_CHUNKS
431 # define PNG_NO_READ_USER_CHUNKS
432 # define PNG_NO_READ_iCCP
433 # define PNG_NO_WRITE_iCCP
434 # define PNG_NO_READ_iTXt
435 # define PNG_NO_WRITE_iTXt
436 # define PNG_NO_READ_sCAL
437 # define PNG_NO_WRITE_sCAL
438 # define PNG_NO_READ_sPLT
439 # define PNG_NO_WRITE_sPLT
440 # define PNG_NO_INFO_IMAGE
441 # define PNG_NO_READ_RGB_TO_GRAY
442 # define PNG_NO_READ_USER_TRANSFORM
443 # define PNG_NO_WRITE_USER_TRANSFORM
444 # define PNG_NO_USER_MEM
445 # define PNG_NO_READ_EMPTY_PLTE
446 # define PNG_NO_MNG_FEATURES
447 # define PNG_NO_FIXED_POINT_SUPPORTED
450 /* Ignore attempt to turn off both floating and fixed point support */
451 #if !defined(PNG_FLOATING_POINT_SUPPORTED) || \
452 !defined(PNG_NO_FIXED_POINT_SUPPORTED)
453 # define PNG_FIXED_POINT_SUPPORTED
456 #ifndef PNG_NO_FREE_ME
457 # define PNG_FREE_ME_SUPPORTED
460 #if defined(PNG_READ_SUPPORTED)
462 #if !defined(PNG_READ_TRANSFORMS_NOT_SUPPORTED) && \
463 !defined(PNG_NO_READ_TRANSFORMS)
464 # define PNG_READ_TRANSFORMS_SUPPORTED
467 #ifdef PNG_READ_TRANSFORMS_SUPPORTED
468 # ifndef PNG_NO_READ_EXPAND
469 # define PNG_READ_EXPAND_SUPPORTED
471 # ifndef PNG_NO_READ_SHIFT
472 # define PNG_READ_SHIFT_SUPPORTED
474 # ifndef PNG_NO_READ_PACK
475 # define PNG_READ_PACK_SUPPORTED
477 # ifndef PNG_NO_READ_BGR
478 # define PNG_READ_BGR_SUPPORTED
480 # ifndef PNG_NO_READ_SWAP
481 # define PNG_READ_SWAP_SUPPORTED
483 # ifndef PNG_NO_READ_PACKSWAP
484 # define PNG_READ_PACKSWAP_SUPPORTED
486 # ifndef PNG_NO_READ_INVERT
487 # define PNG_READ_INVERT_SUPPORTED
489 # ifndef PNG_NO_READ_DITHER
490 # define PNG_READ_DITHER_SUPPORTED
492 # ifndef PNG_NO_READ_BACKGROUND
493 # define PNG_READ_BACKGROUND_SUPPORTED
495 # ifndef PNG_NO_READ_16_TO_8
496 # define PNG_READ_16_TO_8_SUPPORTED
498 # ifndef PNG_NO_READ_FILLER
499 # define PNG_READ_FILLER_SUPPORTED
501 # ifndef PNG_NO_READ_GAMMA
502 # define PNG_READ_GAMMA_SUPPORTED
504 # ifndef PNG_NO_READ_GRAY_TO_RGB
505 # define PNG_READ_GRAY_TO_RGB_SUPPORTED
507 # ifndef PNG_NO_READ_SWAP_ALPHA
508 # define PNG_READ_SWAP_ALPHA_SUPPORTED
510 # ifndef PNG_NO_READ_INVERT_ALPHA
511 # define PNG_READ_INVERT_ALPHA_SUPPORTED
513 # ifndef PNG_NO_READ_STRIP_ALPHA
514 # define PNG_READ_STRIP_ALPHA_SUPPORTED
516 # ifndef PNG_NO_READ_USER_TRANSFORM
517 # define PNG_READ_USER_TRANSFORM_SUPPORTED
519 # ifndef PNG_NO_READ_RGB_TO_GRAY
520 # define PNG_READ_RGB_TO_GRAY_SUPPORTED
522 #endif /* PNG_READ_TRANSFORMS_SUPPORTED */
524 #if !defined(PNG_NO_PROGRESSIVE_READ) && \
525 !defined(PNG_PROGRESSIVE_READ_NOT_SUPPORTED) /* if you don't do progressive */
526 # define PNG_PROGRESSIVE_READ_SUPPORTED /* reading. This is not talking */
527 #endif /* about interlacing capability! You'll */
528 /* still have interlacing unless you change the following line: */
530 #define PNG_READ_INTERLACING_SUPPORTED /* required for PNG-compliant decoders */
532 #ifndef PNG_NO_READ_COMPOSITE_NODIV
533 # ifndef PNG_NO_READ_COMPOSITED_NODIV /* libpng-1.0.x misspelling */
534 # define PNG_READ_COMPOSITE_NODIV_SUPPORTED /* well tested on Intel, SGI */
538 /* Deprecated, will be removed from version 2.0.0.
539 Use PNG_MNG_FEATURES_SUPPORTED instead. */
540 #ifndef PNG_NO_READ_EMPTY_PLTE
541 # define PNG_READ_EMPTY_PLTE_SUPPORTED
544 #endif /* PNG_READ_SUPPORTED */
546 #if defined(PNG_WRITE_SUPPORTED)
548 # if !defined(PNG_WRITE_TRANSFORMS_NOT_SUPPORTED) && \
549 !defined(PNG_NO_WRITE_TRANSFORMS)
550 # define PNG_WRITE_TRANSFORMS_SUPPORTED
553 #ifdef PNG_WRITE_TRANSFORMS_SUPPORTED
554 # ifndef PNG_NO_WRITE_SHIFT
555 # define PNG_WRITE_SHIFT_SUPPORTED
557 # ifndef PNG_NO_WRITE_PACK
558 # define PNG_WRITE_PACK_SUPPORTED
560 # ifndef PNG_NO_WRITE_BGR
561 # define PNG_WRITE_BGR_SUPPORTED
563 # ifndef PNG_NO_WRITE_SWAP
564 # define PNG_WRITE_SWAP_SUPPORTED
566 # ifndef PNG_NO_WRITE_PACKSWAP
567 # define PNG_WRITE_PACKSWAP_SUPPORTED
569 # ifndef PNG_NO_WRITE_INVERT
570 # define PNG_WRITE_INVERT_SUPPORTED
572 # ifndef PNG_NO_WRITE_FILLER
573 # define PNG_WRITE_FILLER_SUPPORTED /* same as WRITE_STRIP_ALPHA */
575 # ifndef PNG_NO_WRITE_SWAP_ALPHA
576 # define PNG_WRITE_SWAP_ALPHA_SUPPORTED
578 # ifndef PNG_NO_WRITE_INVERT_ALPHA
579 # define PNG_WRITE_INVERT_ALPHA_SUPPORTED
581 # ifndef PNG_NO_WRITE_USER_TRANSFORM
582 # define PNG_WRITE_USER_TRANSFORM_SUPPORTED
584 #endif /* PNG_WRITE_TRANSFORMS_SUPPORTED */
586 #if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \
587 defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
588 # ifndef PNG_NO_USER_TRANSFORM_PTR
589 # define PNG_USER_TRANSFORM_PTR_SUPPORTED
593 #define PNG_WRITE_INTERLACING_SUPPORTED /* not required for PNG-compliant
594 encoders, but can cause trouble
597 #if !defined(PNG_NO_WRITE_WEIGHTED_FILTER) && \
598 defined(PNG_FLOATING_POINT_SUPPORTED)
599 # define PNG_WRITE_WEIGHTED_FILTER_SUPPORTED
603 #ifndef PNG_NO_ERROR_NUMBERS
604 #define PNG_ERROR_NUMBERS_SUPPORTED
606 #endif /* PNG_1_0_X */
608 #ifndef PNG_NO_WRITE_FLUSH
609 # define PNG_WRITE_FLUSH_SUPPORTED
612 /* Deprecated, see PNG_MNG_FEATURES_SUPPORTED, above */
613 #ifndef PNG_NO_WRITE_EMPTY_PLTE
614 # define PNG_WRITE_EMPTY_PLTE_SUPPORTED
617 #endif /* PNG_WRITE_SUPPORTED */
620 # define PNG_TIME_RFC1123_SUPPORTED
623 /* This adds extra functions in pngget.c for accessing data from the
624 * info pointer (added in version 0.99)
625 * png_get_image_width()
626 * png_get_image_height()
627 * png_get_bit_depth()
628 * png_get_color_type()
629 * png_get_compression_type()
630 * png_get_filter_type()
631 * png_get_interlace_type()
632 * png_get_pixel_aspect_ratio()
633 * png_get_pixels_per_meter()
634 * png_get_x_offset_pixels()
635 * png_get_y_offset_pixels()
636 * png_get_x_offset_microns()
637 * png_get_y_offset_microns()
639 #if !defined(PNG_NO_EASY_ACCESS) && !defined(PNG_EASY_ACCESS_SUPPORTED)
640 # define PNG_EASY_ACCESS_SUPPORTED
643 /* PNG_ASSEMBLER_CODE was enabled by default in version 1.2.0
644 even when PNG_USE_PNGVCRD or PNG_USE_PNGGCCRD is not defined */
645 #if defined(PNG_READ_SUPPORTED) && !defined(PNG_NO_ASSEMBLER_CODE)
646 # ifndef PNG_ASSEMBLER_CODE_SUPPORTED
647 # define PNG_ASSEMBLER_CODE_SUPPORTED
649 # if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE)
650 # define PNG_MMX_CODE_SUPPORTED
654 /* If you are sure that you don't need thread safety and you are compiling
655 with PNG_USE_PNGCCRD for an MMX application, you can define this for
656 faster execution. See pnggccrd.c.
657 #define PNG_THREAD_UNSAFE_OK
660 #if !defined(PNG_1_0_X)
661 #if !defined(PNG_NO_USER_MEM) && !defined(PNG_USER_MEM_SUPPORTED)
662 # define PNG_USER_MEM_SUPPORTED
664 #endif /* PNG_1_0_X */
666 /* These are currently experimental features, define them if you want */
668 /* very little testing */
670 #ifdef PNG_READ_SUPPORTED
671 # ifndef PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED
672 # define PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED
677 /* This is only for PowerPC big-endian and 680x0 systems */
680 #ifdef PNG_READ_SUPPORTED
681 # ifndef PNG_PNG_READ_BIG_ENDIAN_SUPPORTED
682 # define PNG_READ_BIG_ENDIAN_SUPPORTED
687 /* Buggy compilers (e.g., gcc 2.7.2.2) need this */
689 #define PNG_NO_POINTER_INDEXING
692 /* These functions are turned off by default, as they will be phased out. */
694 #define PNG_USELESS_TESTS_SUPPORTED
695 #define PNG_CORRECT_PALETTE_SUPPORTED
698 /* Any chunks you are not interested in, you can undef here. The
699 * ones that allocate memory may be expecially important (hIST,
700 * tEXt, zTXt, tRNS, pCAL). Others will just save time and make png_info
704 #if defined(PNG_READ_SUPPORTED) && \
705 !defined(PNG_READ_ANCILLARY_CHUNKS_NOT_SUPPORTED) && \
706 !defined(PNG_NO_READ_ANCILLARY_CHUNKS)
707 # define PNG_READ_ANCILLARY_CHUNKS_SUPPORTED
710 #if defined(PNG_WRITE_SUPPORTED) && \
711 !defined(PNG_WRITE_ANCILLARY_CHUNKS_NOT_SUPPORTED) && \
712 !defined(PNG_NO_WRITE_ANCILLARY_CHUNKS)
713 # define PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED
716 #ifdef PNG_READ_ANCILLARY_CHUNKS_SUPPORTED
718 #ifdef PNG_NO_READ_TEXT
719 # define PNG_NO_READ_iTXt
720 # define PNG_NO_READ_tEXt
721 # define PNG_NO_READ_zTXt
723 #ifndef PNG_NO_READ_bKGD
724 # define PNG_READ_bKGD_SUPPORTED
725 # define PNG_bKGD_SUPPORTED
727 #ifndef PNG_NO_READ_cHRM
728 # define PNG_READ_cHRM_SUPPORTED
729 # define PNG_cHRM_SUPPORTED
731 #ifndef PNG_NO_READ_gAMA
732 # define PNG_READ_gAMA_SUPPORTED
733 # define PNG_gAMA_SUPPORTED
735 #ifndef PNG_NO_READ_hIST
736 # define PNG_READ_hIST_SUPPORTED
737 # define PNG_hIST_SUPPORTED
739 #ifndef PNG_NO_READ_iCCP
740 # define PNG_READ_iCCP_SUPPORTED
741 # define PNG_iCCP_SUPPORTED
743 #ifndef PNG_NO_READ_iTXt
744 # ifndef PNG_READ_iTXt_SUPPORTED
745 # define PNG_READ_iTXt_SUPPORTED
747 # ifndef PNG_iTXt_SUPPORTED
748 # define PNG_iTXt_SUPPORTED
751 #ifndef PNG_NO_READ_oFFs
752 # define PNG_READ_oFFs_SUPPORTED
753 # define PNG_oFFs_SUPPORTED
755 #ifndef PNG_NO_READ_pCAL
756 # define PNG_READ_pCAL_SUPPORTED
757 # define PNG_pCAL_SUPPORTED
759 #ifndef PNG_NO_READ_sCAL
760 # define PNG_READ_sCAL_SUPPORTED
761 # define PNG_sCAL_SUPPORTED
763 #ifndef PNG_NO_READ_pHYs
764 # define PNG_READ_pHYs_SUPPORTED
765 # define PNG_pHYs_SUPPORTED
767 #ifndef PNG_NO_READ_sBIT
768 # define PNG_READ_sBIT_SUPPORTED
769 # define PNG_sBIT_SUPPORTED
771 #ifndef PNG_NO_READ_sPLT
772 # define PNG_READ_sPLT_SUPPORTED
773 # define PNG_sPLT_SUPPORTED
775 #ifndef PNG_NO_READ_sRGB
776 # define PNG_READ_sRGB_SUPPORTED
777 # define PNG_sRGB_SUPPORTED
779 #ifndef PNG_NO_READ_tEXt
780 # define PNG_READ_tEXt_SUPPORTED
781 # define PNG_tEXt_SUPPORTED
783 #ifndef PNG_NO_READ_tIME
784 # define PNG_READ_tIME_SUPPORTED
785 # define PNG_tIME_SUPPORTED
787 #ifndef PNG_NO_READ_tRNS
788 # define PNG_READ_tRNS_SUPPORTED
789 # define PNG_tRNS_SUPPORTED
791 #ifndef PNG_NO_READ_zTXt
792 # define PNG_READ_zTXt_SUPPORTED
793 # define PNG_zTXt_SUPPORTED
795 #ifndef PNG_NO_READ_UNKNOWN_CHUNKS
796 # define PNG_READ_UNKNOWN_CHUNKS_SUPPORTED
797 # ifndef PNG_UNKNOWN_CHUNKS_SUPPORTED
798 # define PNG_UNKNOWN_CHUNKS_SUPPORTED
800 # ifndef PNG_NO_HANDLE_AS_UNKNOWN
801 # define PNG_HANDLE_AS_UNKNOWN_SUPPORTED
804 #if !defined(PNG_NO_READ_USER_CHUNKS) && \
805 defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED)
806 # define PNG_READ_USER_CHUNKS_SUPPORTED
807 # define PNG_USER_CHUNKS_SUPPORTED
808 # ifdef PNG_NO_READ_UNKNOWN_CHUNKS
809 # undef PNG_NO_READ_UNKNOWN_CHUNKS
811 # ifdef PNG_NO_HANDLE_AS_UNKNOWN
812 # undef PNG_NO_HANDLE_AS_UNKNOWN
815 #ifndef PNG_NO_READ_OPT_PLTE
816 # define PNG_READ_OPT_PLTE_SUPPORTED /* only affects support of the */
817 #endif /* optional PLTE chunk in RGB and RGBA images */
818 #if defined(PNG_READ_iTXt_SUPPORTED) || defined(PNG_READ_tEXt_SUPPORTED) || \
819 defined(PNG_READ_zTXt_SUPPORTED)
820 # define PNG_READ_TEXT_SUPPORTED
821 # define PNG_TEXT_SUPPORTED
824 #endif /* PNG_READ_ANCILLARY_CHUNKS_SUPPORTED */
826 #ifdef PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED
828 #ifdef PNG_NO_WRITE_TEXT
829 # define PNG_NO_WRITE_iTXt
830 # define PNG_NO_WRITE_tEXt
831 # define PNG_NO_WRITE_zTXt
833 #ifndef PNG_NO_WRITE_bKGD
834 # define PNG_WRITE_bKGD_SUPPORTED
835 # ifndef PNG_bKGD_SUPPORTED
836 # define PNG_bKGD_SUPPORTED
839 #ifndef PNG_NO_WRITE_cHRM
840 # define PNG_WRITE_cHRM_SUPPORTED
841 # ifndef PNG_cHRM_SUPPORTED
842 # define PNG_cHRM_SUPPORTED
845 #ifndef PNG_NO_WRITE_gAMA
846 # define PNG_WRITE_gAMA_SUPPORTED
847 # ifndef PNG_gAMA_SUPPORTED
848 # define PNG_gAMA_SUPPORTED
851 #ifndef PNG_NO_WRITE_hIST
852 # define PNG_WRITE_hIST_SUPPORTED
853 # ifndef PNG_hIST_SUPPORTED
854 # define PNG_hIST_SUPPORTED
857 #ifndef PNG_NO_WRITE_iCCP
858 # define PNG_WRITE_iCCP_SUPPORTED
859 # ifndef PNG_iCCP_SUPPORTED
860 # define PNG_iCCP_SUPPORTED
863 #ifndef PNG_NO_WRITE_iTXt
864 # ifndef PNG_WRITE_iTXt_SUPPORTED
865 # define PNG_WRITE_iTXt_SUPPORTED
867 # ifndef PNG_iTXt_SUPPORTED
868 # define PNG_iTXt_SUPPORTED
871 #ifndef PNG_NO_WRITE_oFFs
872 # define PNG_WRITE_oFFs_SUPPORTED
873 # ifndef PNG_oFFs_SUPPORTED
874 # define PNG_oFFs_SUPPORTED
877 #ifndef PNG_NO_WRITE_pCAL
878 # define PNG_WRITE_pCAL_SUPPORTED
879 # ifndef PNG_pCAL_SUPPORTED
880 # define PNG_pCAL_SUPPORTED
883 #ifndef PNG_NO_WRITE_sCAL
884 # define PNG_WRITE_sCAL_SUPPORTED
885 # ifndef PNG_sCAL_SUPPORTED
886 # define PNG_sCAL_SUPPORTED
889 #ifndef PNG_NO_WRITE_pHYs
890 # define PNG_WRITE_pHYs_SUPPORTED
891 # ifndef PNG_pHYs_SUPPORTED
892 # define PNG_pHYs_SUPPORTED
895 #ifndef PNG_NO_WRITE_sBIT
896 # define PNG_WRITE_sBIT_SUPPORTED
897 # ifndef PNG_sBIT_SUPPORTED
898 # define PNG_sBIT_SUPPORTED
901 #ifndef PNG_NO_WRITE_sPLT
902 # define PNG_WRITE_sPLT_SUPPORTED
903 # ifndef PNG_sPLT_SUPPORTED
904 # define PNG_sPLT_SUPPORTED
907 #ifndef PNG_NO_WRITE_sRGB
908 # define PNG_WRITE_sRGB_SUPPORTED
909 # ifndef PNG_sRGB_SUPPORTED
910 # define PNG_sRGB_SUPPORTED
913 #ifndef PNG_NO_WRITE_tEXt
914 # define PNG_WRITE_tEXt_SUPPORTED
915 # ifndef PNG_tEXt_SUPPORTED
916 # define PNG_tEXt_SUPPORTED
919 #ifndef PNG_NO_WRITE_tIME
920 # define PNG_WRITE_tIME_SUPPORTED
921 # ifndef PNG_tIME_SUPPORTED
922 # define PNG_tIME_SUPPORTED
925 #ifndef PNG_NO_WRITE_tRNS
926 # define PNG_WRITE_tRNS_SUPPORTED
927 # ifndef PNG_tRNS_SUPPORTED
928 # define PNG_tRNS_SUPPORTED
931 #ifndef PNG_NO_WRITE_zTXt
932 # define PNG_WRITE_zTXt_SUPPORTED
933 # ifndef PNG_zTXt_SUPPORTED
934 # define PNG_zTXt_SUPPORTED
937 #ifndef PNG_NO_WRITE_UNKNOWN_CHUNKS
938 # define PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED
939 # ifndef PNG_UNKNOWN_CHUNKS_SUPPORTED
940 # define PNG_UNKNOWN_CHUNKS_SUPPORTED
942 # ifndef PNG_NO_HANDLE_AS_UNKNOWN
943 # ifndef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
944 # define PNG_HANDLE_AS_UNKNOWN_SUPPORTED
948 #if defined(PNG_WRITE_iTXt_SUPPORTED) || defined(PNG_WRITE_tEXt_SUPPORTED) || \
949 defined(PNG_WRITE_zTXt_SUPPORTED)
950 # define PNG_WRITE_TEXT_SUPPORTED
951 # ifndef PNG_TEXT_SUPPORTED
952 # define PNG_TEXT_SUPPORTED
956 #endif /* PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED */
958 /* Turn this off to disable png_read_png() and
959 * png_write_png() and leave the row_pointers member
960 * out of the info structure.
962 #ifndef PNG_NO_INFO_IMAGE
963 # define PNG_INFO_IMAGE_SUPPORTED
966 /* need the time information for reading tIME chunks */
967 #if defined(PNG_tIME_SUPPORTED)
968 # if !defined(_WIN32_WCE)
969 /* "time.h" functions are not supported on WindowsCE */
974 /* Some typedefs to get us started. These should be safe on most of the
975 * common platforms. The typedefs should be at least as large as the
976 * numbers suggest (a png_uint_32 must be at least 32 bits long), but they
977 * don't have to be exactly that size. Some compilers dislike passing
978 * unsigned shorts as function parameters, so you may be better off using
979 * unsigned int for png_uint_16. Likewise, for 64-bit systems, you may
980 * want to have unsigned int for png_uint_32 instead of unsigned long.
983 typedef unsigned long png_uint_32
;
984 typedef long png_int_32
;
985 typedef unsigned short png_uint_16
;
986 typedef short png_int_16
;
987 typedef unsigned char png_byte
;
989 /* This is usually size_t. It is typedef'ed just in case you need it to
990 change (I'm not sure if you will or not, so I thought I'd be safe) */
991 typedef size_t png_size_t
;
993 /* The following is needed for medium model support. It cannot be in the
994 * PNG_INTERNAL section. Needs modification for other compilers besides
995 * MSC. Model independent support declares all arrays and pointers to be
996 * large using the far keyword. The zlib version used must also support
997 * model independent data. As of version zlib 1.0.4, the necessary changes
998 * have been made in zlib. The USE_FAR_KEYWORD define triggers other
999 * changes that are needed. (Tim Wegner)
1002 /* Separate compiler dependencies (problem here is that zlib.h always
1003 defines FAR. (SJT) */
1005 # if defined(__LARGE__) || defined(__HUGE__) || defined(__COMPACT__)
1010 /* GRR: why is Cygwin in here? Cygwin is not Borland C... */
1011 # if !defined(__WIN32__) && !defined(__FLAT__) && !defined(__CYGWIN__)
1012 # define PNG_MAX_MALLOC_64K
1017 # define USE_FAR_KEYWORD
1018 # endif /* LDATA != 1 */
1019 /* Possibly useful for moving data out of default segment.
1020 * Uncomment it if you want. Could also define FARDATA as
1021 * const if your compiler supports it. (SJT)
1022 # define FARDATA FAR
1024 # endif /* __WIN32__, __FLAT__, __CYGWIN__ */
1025 #endif /* __BORLANDC__ */
1028 /* Suggest testing for specific compiler first before testing for
1029 * FAR. The Watcom compiler defines both __MEDIUM__ and M_I86MM,
1030 * making reliance oncertain keywords suspect. (SJT)
1033 /* MSC Medium model */
1035 # if defined(M_I86MM)
1036 # define USE_FAR_KEYWORD
1037 # define FARDATA FAR
1042 /* SJT: default case */
1047 /* At this point FAR is always defined */
1052 /* Typedef for floating-point numbers that are converted
1053 to fixed-point with a multiple of 100,000, e.g., int_gamma */
1054 typedef png_int_32 png_fixed_point
;
1056 /* Add typedefs for pointers */
1057 typedef void FAR
* png_voidp
;
1058 typedef png_byte FAR
* png_bytep
;
1059 typedef png_uint_32 FAR
* png_uint_32p
;
1060 typedef png_int_32 FAR
* png_int_32p
;
1061 typedef png_uint_16 FAR
* png_uint_16p
;
1062 typedef png_int_16 FAR
* png_int_16p
;
1063 typedef PNG_CONST
char FAR
* png_const_charp
;
1064 typedef char FAR
* png_charp
;
1065 typedef png_fixed_point FAR
* png_fixed_point_p
;
1067 #ifndef PNG_NO_STDIO
1068 #if defined(_WIN32_WCE)
1069 typedef HANDLE png_FILE_p
;
1071 typedef FILE * png_FILE_p
;
1075 #ifdef PNG_FLOATING_POINT_SUPPORTED
1076 typedef double FAR
* png_doublep
;
1079 /* Pointers to pointers; i.e. arrays */
1080 typedef png_byte FAR
* FAR
* png_bytepp
;
1081 typedef png_uint_32 FAR
* FAR
* png_uint_32pp
;
1082 typedef png_int_32 FAR
* FAR
* png_int_32pp
;
1083 typedef png_uint_16 FAR
* FAR
* png_uint_16pp
;
1084 typedef png_int_16 FAR
* FAR
* png_int_16pp
;
1085 typedef PNG_CONST
char FAR
* FAR
* png_const_charpp
;
1086 typedef char FAR
* FAR
* png_charpp
;
1087 typedef png_fixed_point FAR
* FAR
* png_fixed_point_pp
;
1088 #ifdef PNG_FLOATING_POINT_SUPPORTED
1089 typedef double FAR
* FAR
* png_doublepp
;
1092 /* Pointers to pointers to pointers; i.e., pointer to array */
1093 typedef char FAR
* FAR
* FAR
* png_charppp
;
1095 /* libpng typedefs for types in zlib. If zlib changes
1096 * or another compression library is used, then change these.
1097 * Eliminates need to change all the source files.
1099 typedef charf
* png_zcharp
;
1100 typedef charf
* FAR
* png_zcharpp
;
1101 typedef z_stream FAR
* png_zstreamp
;
1104 * Define PNG_BUILD_DLL if the module being built is a Windows
1107 * Define PNG_USE_DLL if you want to *link* to the Windows LIBPNG DLL.
1108 * It is equivalent to Microsoft predefined macro _DLL that is
1109 * automatically defined when you compile using the share
1110 * version of the CRT (C Run-Time library)
1112 * The cygwin mods make this behavior a little different:
1113 * Define PNG_BUILD_DLL if you are building a dll for use with cygwin
1114 * Define PNG_STATIC if you are building a static library for use with cygwin,
1115 * -or- if you are building an application that you want to link to the
1117 * PNG_USE_DLL is defined by default (no user action needed) unless one of
1118 * the other flags is defined.
1121 #if !defined(PNG_DLL) && (defined(PNG_BUILD_DLL) || defined(PNG_USE_DLL))
1124 /* If CYGWIN, then disallow GLOBAL ARRAYS unless building a static lib.
1125 * When building a static lib, default to no GLOBAL ARRAYS, but allow
1126 * command-line override
1128 #if defined(__CYGWIN__)
1129 # if !defined(PNG_STATIC)
1130 # if defined(PNG_USE_GLOBAL_ARRAYS)
1131 # undef PNG_USE_GLOBAL_ARRAYS
1133 # if !defined(PNG_USE_LOCAL_ARRAYS)
1134 # define PNG_USE_LOCAL_ARRAYS
1137 # if defined(PNG_USE_LOCAL_ARRAYS) || defined(PNG_NO_GLOBAL_ARRAYS)
1138 # if defined(PNG_USE_GLOBAL_ARRAYS)
1139 # undef PNG_USE_GLOBAL_ARRAYS
1143 # if !defined(PNG_USE_LOCAL_ARRAYS) && !defined(PNG_USE_GLOBAL_ARRAYS)
1144 # define PNG_USE_LOCAL_ARRAYS
1148 /* Do not use global arrays (helps with building DLL's)
1149 * They are no longer used in libpng itself, since version 1.0.5c,
1150 * but might be required for some pre-1.0.5c applications.
1152 #if !defined(PNG_USE_LOCAL_ARRAYS) && !defined(PNG_USE_GLOBAL_ARRAYS)
1153 # if defined(PNG_NO_GLOBAL_ARRAYS) || (defined(__GNUC__) && defined(PNG_DLL))
1154 # define PNG_USE_LOCAL_ARRAYS
1156 # define PNG_USE_GLOBAL_ARRAYS
1160 #if defined(__CYGWIN__)
1162 # define PNGAPI __cdecl
1167 /* If you define PNGAPI, e.g., with compiler option "-DPNGAPI=__stdcall",
1168 * you may get warnings regarding the linkage of png_zalloc and png_zfree.
1169 * Don't ignore those warnings; you must also reset the default calling
1170 * convention in your compiler to match your PNGAPI, and you must build
1171 * zlib and your applications the same way you build libpng.
1176 #if defined(__MINGW32__) && !defined(PNG_MODULEDEF)
1177 # ifndef PNG_NO_MODULEDEF
1178 # define PNG_NO_MODULEDEF
1182 #if !defined(PNG_IMPEXP) && defined(PNG_BUILD_DLL) && !defined(PNG_NO_MODULEDEF)
1186 #if defined(PNG_DLL) || defined(_DLL) || defined(__DLL__ ) || \
1187 (( defined(_Windows) || defined(_WINDOWS) || \
1188 defined(WIN32) || defined(_WIN32) || defined(__WIN32__) ))
1190 # if defined(__GNUC__) || (defined (_MSC_VER) && (_MSC_VER >= 800))
1191 # define PNGAPI __cdecl
1193 # define PNGAPI _cdecl
1196 # if !defined(PNG_IMPEXP) && (!defined(PNG_DLL) || \
1197 0 /* WINCOMPILER_WITH_NO_SUPPORT_FOR_DECLIMPEXP */)
1201 # if !defined(PNG_IMPEXP)
1203 # define PNG_EXPORT_TYPE1(type,symbol) PNG_IMPEXP type PNGAPI symbol
1204 # define PNG_EXPORT_TYPE2(type,symbol) type PNG_IMPEXP PNGAPI symbol
1206 /* Borland/Microsoft */
1207 # if defined(_MSC_VER) || defined(__BORLANDC__)
1208 # if (_MSC_VER >= 800) || (__BORLANDC__ >= 0x500)
1209 # define PNG_EXPORT PNG_EXPORT_TYPE1
1211 # define PNG_EXPORT PNG_EXPORT_TYPE2
1212 # if defined(PNG_BUILD_DLL)
1213 # define PNG_IMPEXP __export
1215 # define PNG_IMPEXP /*__import */ /* doesn't exist AFAIK in
1217 # endif /* Exists in Borland C++ for
1218 C++ classes (== huge) */
1222 # if !defined(PNG_IMPEXP)
1223 # if defined(PNG_BUILD_DLL)
1224 # define PNG_IMPEXP __declspec(dllexport)
1226 # define PNG_IMPEXP __declspec(dllimport)
1229 # endif /* PNG_IMPEXP */
1230 #else /* !(DLL || non-cygwin WINDOWS) */
1231 # if (defined(__IBMC__) || defined(__IBMCPP__)) && defined(__OS2__)
1232 # define PNGAPI _System
1235 # if 0 /* ... other platforms, with other meanings */
1244 #if defined(__VISAGECPP__)
1245 /* I don't compile with _System linkage, ever! */
1249 # define PNGAPI _Optlink
1251 # define PNG_USE_LOCAL_ARRAYS
1252 # ifdef PNG_USE_GLOBAL_ARRAYS
1253 # undef PNG_USE_GLOBAL_ARRAYS
1255 extern const char png_libpng_ver
[18];
1266 # define PNG_EXPORT(type,symbol) PNG_IMPEXP type PNGAPI symbol
1269 #ifdef PNG_USE_GLOBAL_ARRAYS
1270 # ifndef PNG_EXPORT_VAR
1271 # define PNG_EXPORT_VAR(type) extern PNG_IMPEXP type
1275 /* User may want to use these so they are not in PNG_INTERNAL. Any library
1276 * functions that are passed far data must be model independent.
1280 # define PNG_ABORT() abort()
1283 #ifdef PNG_SETJMP_SUPPORTED
1284 # define png_jmpbuf(png_ptr) ((png_ptr)->jmpbuf)
1286 # define png_jmpbuf(png_ptr) \
1287 (LIBPNG_WAS_COMPILED_WITH__PNG_SETJMP_NOT_SUPPORTED)
1290 #if defined(USE_FAR_KEYWORD) /* memory model independent fns */
1291 /* use this to make far-to-near assignments */
1294 # define CVT_PTR(ptr) (png_far_to_near(png_ptr,ptr,CHECK))
1295 # define CVT_PTR_NOCHECK(ptr) (png_far_to_near(png_ptr,ptr,NOCHECK))
1296 # define png_strcpy _fstrcpy
1297 # define png_strlen _fstrlen
1298 # define png_memcmp _fmemcmp /* SJT: added */
1299 # define png_memcpy _fmemcpy
1300 # define png_memset _fmemset
1301 #else /* use the usual functions */
1302 # define CVT_PTR(ptr) (ptr)
1303 # define CVT_PTR_NOCHECK(ptr) (ptr)
1304 # define png_strcpy strcpy
1305 # define png_strlen strlen
1306 # define png_memcmp memcmp /* SJT: added */
1307 # define png_memcpy memcpy
1308 # define png_memset memset
1310 /* End of memory model independent support */
1312 /* Just a little check that someone hasn't tried to define something
1315 #if (PNG_ZBUF_SIZE > 65536) && defined(PNG_MAX_MALLOC_64K)
1316 # undef PNG_ZBUF_SIZE
1317 # define PNG_ZBUF_SIZE 65536
1320 #ifdef PNG_READ_SUPPORTED
1321 /* Prior to libpng-1.0.9, this block was in pngasmrd.h */
1322 #if defined(PNG_INTERNAL)
1324 /* These are the default thresholds before the MMX code kicks in; if either
1325 * rowbytes or bitdepth is below the threshold, plain C code is used. These
1326 * can be overridden at runtime via the png_set_mmx_thresholds() call in
1327 * libpng 1.2.0 and later. The values below were chosen by Intel.
1330 #ifndef PNG_MMX_ROWBYTES_THRESHOLD_DEFAULT
1331 # define PNG_MMX_ROWBYTES_THRESHOLD_DEFAULT 128 /* >= */
1333 #ifndef PNG_MMX_BITDEPTH_THRESHOLD_DEFAULT
1334 # define PNG_MMX_BITDEPTH_THRESHOLD_DEFAULT 9 /* >= */
1337 /* Set this in the makefile for VC++ on Pentium, not here. */
1338 /* Platform must be Pentium. Makefile must assemble and load pngvcrd.c .
1339 * MMX will be detected at run time and used if present.
1341 #ifdef PNG_USE_PNGVCRD
1342 # define PNG_HAVE_ASSEMBLER_COMBINE_ROW
1343 # define PNG_HAVE_ASSEMBLER_READ_INTERLACE
1344 # define PNG_HAVE_ASSEMBLER_READ_FILTER_ROW
1347 /* Set this in the makefile for gcc/as on Pentium, not here. */
1348 /* Platform must be Pentium. Makefile must assemble and load pnggccrd.c .
1349 * MMX will be detected at run time and used if present.
1351 #ifdef PNG_USE_PNGGCCRD
1352 # define PNG_HAVE_ASSEMBLER_COMBINE_ROW
1353 # define PNG_HAVE_ASSEMBLER_READ_INTERLACE
1354 # define PNG_HAVE_ASSEMBLER_READ_FILTER_ROW
1356 /* - see pnggccrd.c for info about what is currently enabled */
1358 #endif /* PNG_INTERNAL */
1359 #endif /* PNG_READ_SUPPORTED */
1361 #endif /* PNGCONF_H */