Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-05-18 08:30:11

0001 
0002 /* pngconf.h - machine-configurable file for libpng
0003  *
0004  * libpng version 1.6.39
0005  *
0006  * Copyright (c) 2018-2022 Cosmin Truta
0007  * Copyright (c) 1998-2002,2004,2006-2016,2018 Glenn Randers-Pehrson
0008  * Copyright (c) 1996-1997 Andreas Dilger
0009  * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
0010  *
0011  * This code is released under the libpng license.
0012  * For conditions of distribution and use, see the disclaimer
0013  * and license in png.h
0014  *
0015  * Any machine specific code is near the front of this file, so if you
0016  * are configuring libpng for a machine, you may want to read the section
0017  * starting here down to where it starts to typedef png_color, png_text,
0018  * and png_info.
0019  */
0020 
0021 #ifndef PNGCONF_H
0022 #define PNGCONF_H
0023 
0024 #ifndef PNG_BUILDING_SYMBOL_TABLE /* else includes may cause problems */
0025 
0026 /* From libpng 1.6.0 libpng requires an ANSI X3.159-1989 ("ISOC90") compliant C
0027  * compiler for correct compilation.  The following header files are required by
0028  * the standard.  If your compiler doesn't provide these header files, or they
0029  * do not match the standard, you will need to provide/improve them.
0030  */
0031 #include <limits.h>
0032 #include <stddef.h>
0033 
0034 /* Library header files.  These header files are all defined by ISOC90; libpng
0035  * expects conformant implementations, however, an ISOC90 conformant system need
0036  * not provide these header files if the functionality cannot be implemented.
0037  * In this case it will be necessary to disable the relevant parts of libpng in
0038  * the build of pnglibconf.h.
0039  *
0040  * Prior to 1.6.0 string.h was included here; the API changes in 1.6.0 to not
0041  * include this unnecessary header file.
0042  */
0043 
0044 #ifdef PNG_STDIO_SUPPORTED
0045    /* Required for the definition of FILE: */
0046 #  include <stdio.h>
0047 #endif
0048 
0049 #ifdef PNG_SETJMP_SUPPORTED
0050    /* Required for the definition of jmp_buf and the declaration of longjmp: */
0051 #  include <setjmp.h>
0052 #endif
0053 
0054 #ifdef PNG_CONVERT_tIME_SUPPORTED
0055    /* Required for struct tm: */
0056 #  include <time.h>
0057 #endif
0058 
0059 #endif /* PNG_BUILDING_SYMBOL_TABLE */
0060 
0061 /* Prior to 1.6.0, it was possible to turn off 'const' in declarations,
0062  * using PNG_NO_CONST.  This is no longer supported.
0063  */
0064 #define PNG_CONST const /* backward compatibility only */
0065 
0066 /* This controls optimization of the reading of 16-bit and 32-bit
0067  * values from PNG files.  It can be set on a per-app-file basis: it
0068  * just changes whether a macro is used when the function is called.
0069  * The library builder sets the default; if read functions are not
0070  * built into the library the macro implementation is forced on.
0071  */
0072 #ifndef PNG_READ_INT_FUNCTIONS_SUPPORTED
0073 #  define PNG_USE_READ_MACROS
0074 #endif
0075 #if !defined(PNG_NO_USE_READ_MACROS) && !defined(PNG_USE_READ_MACROS)
0076 #  if PNG_DEFAULT_READ_MACROS
0077 #    define PNG_USE_READ_MACROS
0078 #  endif
0079 #endif
0080 
0081 /* COMPILER SPECIFIC OPTIONS.
0082  *
0083  * These options are provided so that a variety of difficult compilers
0084  * can be used.  Some are fixed at build time (e.g. PNG_API_RULE
0085  * below) but still have compiler specific implementations, others
0086  * may be changed on a per-file basis when compiling against libpng.
0087  */
0088 
0089 /* The PNGARG macro was used in versions of libpng prior to 1.6.0 to protect
0090  * against legacy (pre ISOC90) compilers that did not understand function
0091  * prototypes.  It is not required for modern C compilers.
0092  */
0093 #ifndef PNGARG
0094 #  define PNGARG(arglist) arglist
0095 #endif
0096 
0097 /* Function calling conventions.
0098  * =============================
0099  * Normally it is not necessary to specify to the compiler how to call
0100  * a function - it just does it - however on x86 systems derived from
0101  * Microsoft and Borland C compilers ('IBM PC', 'DOS', 'Windows' systems
0102  * and some others) there are multiple ways to call a function and the
0103  * default can be changed on the compiler command line.  For this reason
0104  * libpng specifies the calling convention of every exported function and
0105  * every function called via a user supplied function pointer.  This is
0106  * done in this file by defining the following macros:
0107  *
0108  * PNGAPI    Calling convention for exported functions.
0109  * PNGCBAPI  Calling convention for user provided (callback) functions.
0110  * PNGCAPI   Calling convention used by the ANSI-C library (required
0111  *           for longjmp callbacks and sometimes used internally to
0112  *           specify the calling convention for zlib).
0113  *
0114  * These macros should never be overridden.  If it is necessary to
0115  * change calling convention in a private build this can be done
0116  * by setting PNG_API_RULE (which defaults to 0) to one of the values
0117  * below to select the correct 'API' variants.
0118  *
0119  * PNG_API_RULE=0 Use PNGCAPI - the 'C' calling convention - throughout.
0120  *                This is correct in every known environment.
0121  * PNG_API_RULE=1 Use the operating system convention for PNGAPI and
0122  *                the 'C' calling convention (from PNGCAPI) for
0123  *                callbacks (PNGCBAPI).  This is no longer required
0124  *                in any known environment - if it has to be used
0125  *                please post an explanation of the problem to the
0126  *                libpng mailing list.
0127  *
0128  * These cases only differ if the operating system does not use the C
0129  * calling convention, at present this just means the above cases
0130  * (x86 DOS/Windows systems) and, even then, this does not apply to
0131  * Cygwin running on those systems.
0132  *
0133  * Note that the value must be defined in pnglibconf.h so that what
0134  * the application uses to call the library matches the conventions
0135  * set when building the library.
0136  */
0137 
0138 /* Symbol export
0139  * =============
0140  * When building a shared library it is almost always necessary to tell
0141  * the compiler which symbols to export.  The png.h macro 'PNG_EXPORT'
0142  * is used to mark the symbols.  On some systems these symbols can be
0143  * extracted at link time and need no special processing by the compiler,
0144  * on other systems the symbols are flagged by the compiler and just
0145  * the declaration requires a special tag applied (unfortunately) in a
0146  * compiler dependent way.  Some systems can do either.
0147  *
0148  * A small number of older systems also require a symbol from a DLL to
0149  * be flagged to the program that calls it.  This is a problem because
0150  * we do not know in the header file included by application code that
0151  * the symbol will come from a shared library, as opposed to a statically
0152  * linked one.  For this reason the application must tell us by setting
0153  * the magic flag PNG_USE_DLL to turn on the special processing before
0154  * it includes png.h.
0155  *
0156  * Four additional macros are used to make this happen:
0157  *
0158  * PNG_IMPEXP The magic (if any) to cause a symbol to be exported from
0159  *            the build or imported if PNG_USE_DLL is set - compiler
0160  *            and system specific.
0161  *
0162  * PNG_EXPORT_TYPE(type) A macro that pre or appends PNG_IMPEXP to
0163  *                       'type', compiler specific.
0164  *
0165  * PNG_DLL_EXPORT Set to the magic to use during a libpng build to
0166  *                make a symbol exported from the DLL.  Not used in the
0167  *                public header files; see pngpriv.h for how it is used
0168  *                in the libpng build.
0169  *
0170  * PNG_DLL_IMPORT Set to the magic to force the libpng symbols to come
0171  *                from a DLL - used to define PNG_IMPEXP when
0172  *                PNG_USE_DLL is set.
0173  */
0174 
0175 /* System specific discovery.
0176  * ==========================
0177  * This code is used at build time to find PNG_IMPEXP, the API settings
0178  * and PNG_EXPORT_TYPE(), it may also set a macro to indicate the DLL
0179  * import processing is possible.  On Windows systems it also sets
0180  * compiler-specific macros to the values required to change the calling
0181  * conventions of the various functions.
0182  */
0183 #if defined(_WIN32) || defined(__WIN32__) || defined(__NT__) || \
0184     defined(__CYGWIN__)
0185   /* Windows system (DOS doesn't support DLLs).  Includes builds under Cygwin or
0186    * MinGW on any architecture currently supported by Windows.  Also includes
0187    * Watcom builds but these need special treatment because they are not
0188    * compatible with GCC or Visual C because of different calling conventions.
0189    */
0190 #  if PNG_API_RULE == 2
0191    /* If this line results in an error, either because __watcall is not
0192     * understood or because of a redefine just below you cannot use *this*
0193     * build of the library with the compiler you are using.  *This* build was
0194     * build using Watcom and applications must also be built using Watcom!
0195     */
0196 #    define PNGCAPI __watcall
0197 #  endif
0198 
0199 #  if defined(__GNUC__) || (defined(_MSC_VER) && (_MSC_VER >= 800))
0200 #    define PNGCAPI __cdecl
0201 #    if PNG_API_RULE == 1
0202    /* If this line results in an error __stdcall is not understood and
0203     * PNG_API_RULE should not have been set to '1'.
0204     */
0205 #      define PNGAPI __stdcall
0206 #    endif
0207 #  else
0208    /* An older compiler, or one not detected (erroneously) above,
0209     * if necessary override on the command line to get the correct
0210     * variants for the compiler.
0211     */
0212 #    ifndef PNGCAPI
0213 #      define PNGCAPI _cdecl
0214 #    endif
0215 #    if PNG_API_RULE == 1 && !defined(PNGAPI)
0216 #      define PNGAPI _stdcall
0217 #    endif
0218 #  endif /* compiler/api */
0219 
0220   /* NOTE: PNGCBAPI always defaults to PNGCAPI. */
0221 
0222 #  if defined(PNGAPI) && !defined(PNG_USER_PRIVATEBUILD)
0223 #     error "PNG_USER_PRIVATEBUILD must be defined if PNGAPI is changed"
0224 #  endif
0225 
0226 #  if (defined(_MSC_VER) && _MSC_VER < 800) ||\
0227       (defined(__BORLANDC__) && __BORLANDC__ < 0x500)
0228    /* older Borland and MSC
0229     * compilers used '__export' and required this to be after
0230     * the type.
0231     */
0232 #    ifndef PNG_EXPORT_TYPE
0233 #      define PNG_EXPORT_TYPE(type) type PNG_IMPEXP
0234 #    endif
0235 #    define PNG_DLL_EXPORT __export
0236 #  else /* newer compiler */
0237 #    define PNG_DLL_EXPORT __declspec(dllexport)
0238 #    ifndef PNG_DLL_IMPORT
0239 #      define PNG_DLL_IMPORT __declspec(dllimport)
0240 #    endif
0241 #  endif /* compiler */
0242 
0243 #else /* !Windows */
0244 #  if (defined(__IBMC__) || defined(__IBMCPP__)) && defined(__OS2__)
0245 #    define PNGAPI _System
0246 #  else /* !Windows/x86 && !OS/2 */
0247    /* Use the defaults, or define PNG*API on the command line (but
0248     * this will have to be done for every compile!)
0249     */
0250 #  endif /* other system, !OS/2 */
0251 #endif /* !Windows/x86 */
0252 
0253 /* Now do all the defaulting . */
0254 #ifndef PNGCAPI
0255 #  define PNGCAPI
0256 #endif
0257 #ifndef PNGCBAPI
0258 #  define PNGCBAPI PNGCAPI
0259 #endif
0260 #ifndef PNGAPI
0261 #  define PNGAPI PNGCAPI
0262 #endif
0263 
0264 /* PNG_IMPEXP may be set on the compilation system command line or (if not set)
0265  * then in an internal header file when building the library, otherwise (when
0266  * using the library) it is set here.
0267  */
0268 #ifndef PNG_IMPEXP
0269 #  if defined(PNG_USE_DLL) && defined(PNG_DLL_IMPORT)
0270    /* This forces use of a DLL, disallowing static linking */
0271 #    define PNG_IMPEXP PNG_DLL_IMPORT
0272 #  endif
0273 
0274 #  ifndef PNG_IMPEXP
0275 #    define PNG_IMPEXP
0276 #  endif
0277 #endif
0278 
0279 /* In 1.5.2 the definition of PNG_FUNCTION has been changed to always treat
0280  * 'attributes' as a storage class - the attributes go at the start of the
0281  * function definition, and attributes are always appended regardless of the
0282  * compiler.  This considerably simplifies these macros but may cause problems
0283  * if any compilers both need function attributes and fail to handle them as
0284  * a storage class (this is unlikely.)
0285  */
0286 #ifndef PNG_FUNCTION
0287 #  define PNG_FUNCTION(type, name, args, attributes) attributes type name args
0288 #endif
0289 
0290 #ifndef PNG_EXPORT_TYPE
0291 #  define PNG_EXPORT_TYPE(type) PNG_IMPEXP type
0292 #endif
0293 
0294    /* The ordinal value is only relevant when preprocessing png.h for symbol
0295     * table entries, so we discard it here.  See the .dfn files in the
0296     * scripts directory.
0297     */
0298 
0299 #ifndef PNG_EXPORTA
0300 #  define PNG_EXPORTA(ordinal, type, name, args, attributes) \
0301       PNG_FUNCTION(PNG_EXPORT_TYPE(type), (PNGAPI name), PNGARG(args), \
0302       PNG_LINKAGE_API attributes)
0303 #endif
0304 
0305 /* ANSI-C (C90) does not permit a macro to be invoked with an empty argument,
0306  * so make something non-empty to satisfy the requirement:
0307  */
0308 #define PNG_EMPTY /*empty list*/
0309 
0310 #define PNG_EXPORT(ordinal, type, name, args) \
0311    PNG_EXPORTA(ordinal, type, name, args, PNG_EMPTY)
0312 
0313 /* Use PNG_REMOVED to comment out a removed interface. */
0314 #ifndef PNG_REMOVED
0315 #  define PNG_REMOVED(ordinal, type, name, args, attributes)
0316 #endif
0317 
0318 #ifndef PNG_CALLBACK
0319 #  define PNG_CALLBACK(type, name, args) type (PNGCBAPI name) PNGARG(args)
0320 #endif
0321 
0322 /* Support for compiler specific function attributes.  These are used
0323  * so that where compiler support is available incorrect use of API
0324  * functions in png.h will generate compiler warnings.
0325  *
0326  * Added at libpng-1.2.41.
0327  */
0328 
0329 #ifndef PNG_NO_PEDANTIC_WARNINGS
0330 #  ifndef PNG_PEDANTIC_WARNINGS_SUPPORTED
0331 #    define PNG_PEDANTIC_WARNINGS_SUPPORTED
0332 #  endif
0333 #endif
0334 
0335 #ifdef PNG_PEDANTIC_WARNINGS_SUPPORTED
0336   /* Support for compiler specific function attributes.  These are used
0337    * so that where compiler support is available, incorrect use of API
0338    * functions in png.h will generate compiler warnings.  Added at libpng
0339    * version 1.2.41.  Disabling these removes the warnings but may also produce
0340    * less efficient code.
0341    */
0342 #  if defined(__clang__) && defined(__has_attribute)
0343    /* Clang defines both __clang__ and __GNUC__. Check __clang__ first. */
0344 #    if !defined(PNG_USE_RESULT) && __has_attribute(__warn_unused_result__)
0345 #      define PNG_USE_RESULT __attribute__((__warn_unused_result__))
0346 #    endif
0347 #    if !defined(PNG_NORETURN) && __has_attribute(__noreturn__)
0348 #      define PNG_NORETURN __attribute__((__noreturn__))
0349 #    endif
0350 #    if !defined(PNG_ALLOCATED) && __has_attribute(__malloc__)
0351 #      define PNG_ALLOCATED __attribute__((__malloc__))
0352 #    endif
0353 #    if !defined(PNG_DEPRECATED) && __has_attribute(__deprecated__)
0354 #      define PNG_DEPRECATED __attribute__((__deprecated__))
0355 #    endif
0356 #    if !defined(PNG_PRIVATE)
0357 #      ifdef __has_extension
0358 #        if __has_extension(attribute_unavailable_with_message)
0359 #          define PNG_PRIVATE __attribute__((__unavailable__(\
0360              "This function is not exported by libpng.")))
0361 #        endif
0362 #      endif
0363 #    endif
0364 #    ifndef PNG_RESTRICT
0365 #      define PNG_RESTRICT __restrict
0366 #    endif
0367 
0368 #  elif defined(__GNUC__)
0369 #    ifndef PNG_USE_RESULT
0370 #      define PNG_USE_RESULT __attribute__((__warn_unused_result__))
0371 #    endif
0372 #    ifndef PNG_NORETURN
0373 #      define PNG_NORETURN   __attribute__((__noreturn__))
0374 #    endif
0375 #    if __GNUC__ >= 3
0376 #      ifndef PNG_ALLOCATED
0377 #        define PNG_ALLOCATED  __attribute__((__malloc__))
0378 #      endif
0379 #      ifndef PNG_DEPRECATED
0380 #        define PNG_DEPRECATED __attribute__((__deprecated__))
0381 #      endif
0382 #      ifndef PNG_PRIVATE
0383 #        if 0 /* Doesn't work so we use deprecated instead*/
0384 #          define PNG_PRIVATE \
0385             __attribute__((warning("This function is not exported by libpng.")))
0386 #        else
0387 #          define PNG_PRIVATE \
0388             __attribute__((__deprecated__))
0389 #        endif
0390 #      endif
0391 #      if ((__GNUC__ > 3) || !defined(__GNUC_MINOR__) || (__GNUC_MINOR__ >= 1))
0392 #        ifndef PNG_RESTRICT
0393 #          define PNG_RESTRICT __restrict
0394 #        endif
0395 #      endif /* __GNUC__.__GNUC_MINOR__ > 3.0 */
0396 #    endif /* __GNUC__ >= 3 */
0397 
0398 #  elif defined(_MSC_VER)  && (_MSC_VER >= 1300)
0399 #    ifndef PNG_USE_RESULT
0400 #      define PNG_USE_RESULT /* not supported */
0401 #    endif
0402 #    ifndef PNG_NORETURN
0403 #      define PNG_NORETURN   __declspec(noreturn)
0404 #    endif
0405 #    ifndef PNG_ALLOCATED
0406 #      if (_MSC_VER >= 1400)
0407 #        define PNG_ALLOCATED __declspec(restrict)
0408 #      endif
0409 #    endif
0410 #    ifndef PNG_DEPRECATED
0411 #      define PNG_DEPRECATED __declspec(deprecated)
0412 #    endif
0413 #    ifndef PNG_PRIVATE
0414 #      define PNG_PRIVATE __declspec(deprecated)
0415 #    endif
0416 #    ifndef PNG_RESTRICT
0417 #      if (_MSC_VER >= 1400)
0418 #        define PNG_RESTRICT __restrict
0419 #      endif
0420 #    endif
0421 
0422 #  elif defined(__WATCOMC__)
0423 #    ifndef PNG_RESTRICT
0424 #      define PNG_RESTRICT __restrict
0425 #    endif
0426 #  endif
0427 #endif /* PNG_PEDANTIC_WARNINGS */
0428 
0429 #ifndef PNG_DEPRECATED
0430 #  define PNG_DEPRECATED  /* Use of this function is deprecated */
0431 #endif
0432 #ifndef PNG_USE_RESULT
0433 #  define PNG_USE_RESULT  /* The result of this function must be checked */
0434 #endif
0435 #ifndef PNG_NORETURN
0436 #  define PNG_NORETURN    /* This function does not return */
0437 #endif
0438 #ifndef PNG_ALLOCATED
0439 #  define PNG_ALLOCATED   /* The result of the function is new memory */
0440 #endif
0441 #ifndef PNG_PRIVATE
0442 #  define PNG_PRIVATE     /* This is a private libpng function */
0443 #endif
0444 #ifndef PNG_RESTRICT
0445 #  define PNG_RESTRICT    /* The C99 "restrict" feature */
0446 #endif
0447 
0448 #ifndef PNG_FP_EXPORT     /* A floating point API. */
0449 #  ifdef PNG_FLOATING_POINT_SUPPORTED
0450 #     define PNG_FP_EXPORT(ordinal, type, name, args)\
0451          PNG_EXPORT(ordinal, type, name, args);
0452 #  else                   /* No floating point APIs */
0453 #     define PNG_FP_EXPORT(ordinal, type, name, args)
0454 #  endif
0455 #endif
0456 #ifndef PNG_FIXED_EXPORT  /* A fixed point API. */
0457 #  ifdef PNG_FIXED_POINT_SUPPORTED
0458 #     define PNG_FIXED_EXPORT(ordinal, type, name, args)\
0459          PNG_EXPORT(ordinal, type, name, args);
0460 #  else                   /* No fixed point APIs */
0461 #     define PNG_FIXED_EXPORT(ordinal, type, name, args)
0462 #  endif
0463 #endif
0464 
0465 #ifndef PNG_BUILDING_SYMBOL_TABLE
0466 /* Some typedefs to get us started.  These should be safe on most of the common
0467  * platforms.
0468  *
0469  * png_uint_32 and png_int_32 may, currently, be larger than required to hold a
0470  * 32-bit value however this is not normally advisable.
0471  *
0472  * png_uint_16 and png_int_16 should always be two bytes in size - this is
0473  * verified at library build time.
0474  *
0475  * png_byte must always be one byte in size.
0476  *
0477  * The checks below use constants from limits.h, as defined by the ISOC90
0478  * standard.
0479  */
0480 #if CHAR_BIT == 8 && UCHAR_MAX == 255
0481    typedef unsigned char png_byte;
0482 #else
0483 #  error "libpng requires 8-bit bytes"
0484 #endif
0485 
0486 #if INT_MIN == -32768 && INT_MAX == 32767
0487    typedef int png_int_16;
0488 #elif SHRT_MIN == -32768 && SHRT_MAX == 32767
0489    typedef short png_int_16;
0490 #else
0491 #  error "libpng requires a signed 16-bit type"
0492 #endif
0493 
0494 #if UINT_MAX == 65535
0495    typedef unsigned int png_uint_16;
0496 #elif USHRT_MAX == 65535
0497    typedef unsigned short png_uint_16;
0498 #else
0499 #  error "libpng requires an unsigned 16-bit type"
0500 #endif
0501 
0502 #if INT_MIN < -2147483646 && INT_MAX > 2147483646
0503    typedef int png_int_32;
0504 #elif LONG_MIN < -2147483646 && LONG_MAX > 2147483646
0505    typedef long int png_int_32;
0506 #else
0507 #  error "libpng requires a signed 32-bit (or more) type"
0508 #endif
0509 
0510 #if UINT_MAX > 4294967294U
0511    typedef unsigned int png_uint_32;
0512 #elif ULONG_MAX > 4294967294U
0513    typedef unsigned long int png_uint_32;
0514 #else
0515 #  error "libpng requires an unsigned 32-bit (or more) type"
0516 #endif
0517 
0518 /* Prior to 1.6.0, it was possible to disable the use of size_t and ptrdiff_t.
0519  * From 1.6.0 onwards, an ISO C90 compiler, as well as a standard-compliant
0520  * behavior of sizeof and ptrdiff_t are required.
0521  * The legacy typedefs are provided here for backwards compatibility.
0522  */
0523 typedef size_t png_size_t;
0524 typedef ptrdiff_t png_ptrdiff_t;
0525 
0526 /* libpng needs to know the maximum value of 'size_t' and this controls the
0527  * definition of png_alloc_size_t, below.  This maximum value of size_t limits
0528  * but does not control the maximum allocations the library makes - there is
0529  * direct application control of this through png_set_user_limits().
0530  */
0531 #ifndef PNG_SMALL_SIZE_T
0532    /* Compiler specific tests for systems where size_t is known to be less than
0533     * 32 bits (some of these systems may no longer work because of the lack of
0534     * 'far' support; see above.)
0535     */
0536 #  if (defined(__TURBOC__) && !defined(__FLAT__)) ||\
0537    (defined(_MSC_VER) && defined(MAXSEG_64K))
0538 #     define PNG_SMALL_SIZE_T
0539 #  endif
0540 #endif
0541 
0542 /* png_alloc_size_t is guaranteed to be no smaller than size_t, and no smaller
0543  * than png_uint_32.  Casts from size_t or png_uint_32 to png_alloc_size_t are
0544  * not necessary; in fact, it is recommended not to use them at all, so that
0545  * the compiler can complain when something turns out to be problematic.
0546  *
0547  * Casts in the other direction (from png_alloc_size_t to size_t or
0548  * png_uint_32) should be explicitly applied; however, we do not expect to
0549  * encounter practical situations that require such conversions.
0550  *
0551  * PNG_SMALL_SIZE_T must be defined if the maximum value of size_t is less than
0552  * 4294967295 - i.e. less than the maximum value of png_uint_32.
0553  */
0554 #ifdef PNG_SMALL_SIZE_T
0555    typedef png_uint_32 png_alloc_size_t;
0556 #else
0557    typedef size_t png_alloc_size_t;
0558 #endif
0559 
0560 /* Prior to 1.6.0 libpng offered limited support for Microsoft C compiler
0561  * implementations of Intel CPU specific support of user-mode segmented address
0562  * spaces, where 16-bit pointers address more than 65536 bytes of memory using
0563  * separate 'segment' registers.  The implementation requires two different
0564  * types of pointer (only one of which includes the segment value.)
0565  *
0566  * If required this support is available in version 1.2 of libpng and may be
0567  * available in versions through 1.5, although the correctness of the code has
0568  * not been verified recently.
0569  */
0570 
0571 /* Typedef for floating-point numbers that are converted to fixed-point with a
0572  * multiple of 100,000, e.g., gamma
0573  */
0574 typedef png_int_32 png_fixed_point;
0575 
0576 /* Add typedefs for pointers */
0577 typedef void                  * png_voidp;
0578 typedef const void            * png_const_voidp;
0579 typedef png_byte              * png_bytep;
0580 typedef const png_byte        * png_const_bytep;
0581 typedef png_uint_32           * png_uint_32p;
0582 typedef const png_uint_32     * png_const_uint_32p;
0583 typedef png_int_32            * png_int_32p;
0584 typedef const png_int_32      * png_const_int_32p;
0585 typedef png_uint_16           * png_uint_16p;
0586 typedef const png_uint_16     * png_const_uint_16p;
0587 typedef png_int_16            * png_int_16p;
0588 typedef const png_int_16      * png_const_int_16p;
0589 typedef char                  * png_charp;
0590 typedef const char            * png_const_charp;
0591 typedef png_fixed_point       * png_fixed_point_p;
0592 typedef const png_fixed_point * png_const_fixed_point_p;
0593 typedef size_t                * png_size_tp;
0594 typedef const size_t          * png_const_size_tp;
0595 
0596 #ifdef PNG_STDIO_SUPPORTED
0597 typedef FILE            * png_FILE_p;
0598 #endif
0599 
0600 #ifdef PNG_FLOATING_POINT_SUPPORTED
0601 typedef double       * png_doublep;
0602 typedef const double * png_const_doublep;
0603 #endif
0604 
0605 /* Pointers to pointers; i.e. arrays */
0606 typedef png_byte        * * png_bytepp;
0607 typedef png_uint_32     * * png_uint_32pp;
0608 typedef png_int_32      * * png_int_32pp;
0609 typedef png_uint_16     * * png_uint_16pp;
0610 typedef png_int_16      * * png_int_16pp;
0611 typedef const char      * * png_const_charpp;
0612 typedef char            * * png_charpp;
0613 typedef png_fixed_point * * png_fixed_point_pp;
0614 #ifdef PNG_FLOATING_POINT_SUPPORTED
0615 typedef double          * * png_doublepp;
0616 #endif
0617 
0618 /* Pointers to pointers to pointers; i.e., pointer to array */
0619 typedef char            * * * png_charppp;
0620 
0621 #endif /* PNG_BUILDING_SYMBOL_TABLE */
0622 
0623 #endif /* PNGCONF_H */