23#ifndef PNG_BUILDING_SYMBOL_TABLE
43#ifdef PNG_STDIO_SUPPORTED
48#ifdef PNG_SETJMP_SUPPORTED
53#ifdef PNG_CONVERT_tIME_SUPPORTED
63#define PNG_CONST const
71#ifndef PNG_READ_INT_FUNCTIONS_SUPPORTED
72# define PNG_USE_READ_MACROS
74#if !defined(PNG_NO_USE_READ_MACROS) && !defined(PNG_USE_READ_MACROS)
75# if PNG_DEFAULT_READ_MACROS
76# define PNG_USE_READ_MACROS
93# define PNGARG(arglist) arglist
182#if defined(_WIN32) || defined(__WIN32__) || defined(__NT__) || \
189# if PNG_API_RULE == 2
195# define PNGCAPI __watcall
198# if defined(__GNUC__) || (defined(_MSC_VER) && (_MSC_VER >= 800))
199# define PNGCAPI __cdecl
200# if PNG_API_RULE == 1
204# define PNGAPI __stdcall
212# define PNGCAPI _cdecl
214# if PNG_API_RULE == 1 && !defined(PNGAPI)
215# define PNGAPI _stdcall
221# if defined(PNGAPI) && !defined(PNG_USER_PRIVATEBUILD)
222# error PNG_USER_PRIVATEBUILD must be defined if PNGAPI is changed
225# define PNG_DLL_EXPORT __declspec(dllexport)
226# ifndef PNG_DLL_IMPORT
227# define PNG_DLL_IMPORT __declspec(dllimport)
231# if (defined(__IBMC__) || defined(__IBMCPP__)) && defined(__OS2__)
232# define PNGAPI _System
245# define PNGCBAPI PNGCAPI
248# define PNGAPI PNGCAPI
256# if defined(PNG_USE_DLL) && defined(PNG_DLL_IMPORT)
258# define PNG_IMPEXP PNG_DLL_IMPORT
274# define PNG_FUNCTION(type, name, args, attributes) attributes type name args
277#ifndef PNG_EXPORT_TYPE
278# define PNG_EXPORT_TYPE(type) PNG_IMPEXP type
287# define PNG_EXPORTA(ordinal, type, name, args, attributes) \
288 PNG_FUNCTION(PNG_EXPORT_TYPE(type), (PNGAPI name), args, \
289 PNG_LINKAGE_API attributes)
297#define PNG_EXPORT(ordinal, type, name, args) \
298 PNG_EXPORTA(ordinal, type, name, args, PNG_EMPTY)
302# define PNG_REMOVED(ordinal, type, name, args, attributes)
306# define PNG_CALLBACK(type, name, args) type (PNGCBAPI name) args
316#ifndef PNG_NO_PEDANTIC_WARNINGS
317# ifndef PNG_PEDANTIC_WARNINGS_SUPPORTED
318# define PNG_PEDANTIC_WARNINGS_SUPPORTED
322#ifdef PNG_PEDANTIC_WARNINGS_SUPPORTED
329# if defined(__clang__) && defined(__has_attribute)
331# if !defined(PNG_USE_RESULT) && __has_attribute(__warn_unused_result__)
332# define PNG_USE_RESULT __attribute__((__warn_unused_result__))
334# if !defined(PNG_NORETURN) && __has_attribute(__noreturn__)
335# define PNG_NORETURN __attribute__((__noreturn__))
337# if !defined(PNG_ALLOCATED) && __has_attribute(__malloc__)
338# define PNG_ALLOCATED __attribute__((__malloc__))
340# if !defined(PNG_DEPRECATED) && __has_attribute(__deprecated__)
341# define PNG_DEPRECATED __attribute__((__deprecated__))
343# if !defined(PNG_PRIVATE)
344# ifdef __has_extension
345# if __has_extension(attribute_unavailable_with_message)
346# define PNG_PRIVATE __attribute__((__unavailable__(\
347 "This function is not exported by libpng.")))
352# define PNG_RESTRICT __restrict
355# elif defined(__GNUC__)
356# ifndef PNG_USE_RESULT
357# define PNG_USE_RESULT __attribute__((__warn_unused_result__))
360# define PNG_NORETURN __attribute__((__noreturn__))
363# ifndef PNG_ALLOCATED
364# define PNG_ALLOCATED __attribute__((__malloc__))
366# ifndef PNG_DEPRECATED
367# define PNG_DEPRECATED __attribute__((__deprecated__))
371# define PNG_PRIVATE \
372 __attribute__((warning("This function is not exported by libpng.")))
374# define PNG_PRIVATE \
375 __attribute__((__deprecated__))
378# if ((__GNUC__ > 3) || !defined(__GNUC_MINOR__) || (__GNUC_MINOR__ >= 1))
380# define PNG_RESTRICT __restrict
385# elif defined(_MSC_VER) && (_MSC_VER >= 1300)
386# ifndef PNG_USE_RESULT
387# define PNG_USE_RESULT
390# define PNG_NORETURN __declspec(noreturn)
392# ifndef PNG_ALLOCATED
393# if (_MSC_VER >= 1400)
394# define PNG_ALLOCATED __declspec(restrict)
397# ifndef PNG_DEPRECATED
398# define PNG_DEPRECATED __declspec(deprecated)
401# define PNG_PRIVATE __declspec(deprecated)
404# if (_MSC_VER >= 1400)
405# define PNG_RESTRICT __restrict
409# elif defined(__WATCOMC__)
411# define PNG_RESTRICT __restrict
416#ifndef PNG_DEPRECATED
417# define PNG_DEPRECATED
419#ifndef PNG_USE_RESULT
420# define PNG_USE_RESULT
426# define PNG_ALLOCATED
436# ifdef PNG_FLOATING_POINT_SUPPORTED
437# define PNG_FP_EXPORT(ordinal, type, name, args)\
438 PNG_EXPORT(ordinal, type, name, args);
440# define PNG_FP_EXPORT(ordinal, type, name, args)
443#ifndef PNG_FIXED_EXPORT
444# ifdef PNG_FIXED_POINT_SUPPORTED
445# define PNG_FIXED_EXPORT(ordinal, type, name, args)\
446 PNG_EXPORT(ordinal, type, name, args);
448# define PNG_FIXED_EXPORT(ordinal, type, name, args)
452#ifndef PNG_BUILDING_SYMBOL_TABLE
467#if CHAR_BIT == 8 && UCHAR_MAX == 255
468 typedef unsigned char png_byte;
470# error libpng requires 8-bit bytes
473#if INT_MIN == -32768 && INT_MAX == 32767
474 typedef int png_int_16;
475#elif SHRT_MIN == -32768 && SHRT_MAX == 32767
476 typedef short png_int_16;
478# error libpng requires a signed 16-bit integer type
482 typedef unsigned int png_uint_16;
483#elif USHRT_MAX == 65535
484 typedef unsigned short png_uint_16;
486# error libpng requires an unsigned 16-bit integer type
489#if INT_MIN < -2147483646 && INT_MAX > 2147483646
490 typedef int png_int_32;
491#elif LONG_MIN < -2147483646 && LONG_MAX > 2147483646
492 typedef long int png_int_32;
494# error libpng requires a signed 32-bit (or longer) integer type
497#if UINT_MAX > 4294967294U
499#elif ULONG_MAX > 4294967294U
502# error libpng requires an unsigned 32-bit (or longer) integer type
518#ifndef PNG_SMALL_SIZE_T
523# if (defined(__TURBOC__) && !defined(__FLAT__)) ||\
524 (defined(_MSC_VER) && defined(MAXSEG_64K))
525# define PNG_SMALL_SIZE_T
541#ifdef PNG_SMALL_SIZE_T
583#ifdef PNG_FLOATING_POINT_SUPPORTED
597#ifdef PNG_FLOATING_POINT_SUPPORTED
604#ifdef PNG_STDIO_SUPPORTED
610typedef FILE * png_FILE_p;
png_int_32 png_fixed_point
png_fixed_point ** png_fixed_point_pp
const png_byte * png_const_bytep
const png_uint_16 * png_const_uint_16p
const png_int_32 * png_const_int_32p
const png_int_16 * png_const_int_16p
png_uint_32 ** png_uint_32pp
png_int_16 ** png_int_16pp
png_uint_16 * png_uint_16p
const char ** png_const_charpp
png_fixed_point * png_fixed_point_p
png_uint_32 * png_uint_32p
const void * png_const_voidp
const png_fixed_point * png_const_fixed_point_p
const png_uint_32 * png_const_uint_32p
png_int_32 ** png_int_32pp
const char * png_const_charp
png_uint_16 ** png_uint_16pp
const size_t * png_const_size_tp
png_double ** png_doublepp
const png_double * png_const_doublep