Changeset 43 for vendor/libpng/pngconf.h

Show
Ignore:
Timestamp:
02/15/10 11:37:15 (2 years ago)
Author:
Carsten
Message:

Upgraded vendor/libpng from 1.2.40 to 1.2.42.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • vendor/libpng/pngconf.h

    r11 r43  
    22/* pngconf.h - machine configurable file for libpng 
    33 * 
    4  * libpng version 1.2.40 - September 10, 2009 
    5  * Copyright (c) 1998-2009 Glenn Randers-Pehrson 
     4 * libpng version 1.2.42 - January 3, 2010 
     5 * Copyright (c) 1998-2010 Glenn Randers-Pehrson 
    66 * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) 
    77 * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) 
     
    116116#endif 
    117117 
     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 
    118142/* Enabled by default in 1.2.0.  You can disable this if you don't need to 
    119    support PNGs that are embedded in MNG datastreams */ 
     143 * support PNGs that are embedded in MNG datastreams 
     144 */ 
    120145#if !defined(PNG_1_0_X) && !defined(PNG_NO_MNG_FEATURES) 
    121146#  ifndef PNG_MNG_FEATURES_SUPPORTED 
     
    175200 *   such as CONSOLE_IO and whether GLOBAL_ARRAYS are allowed. 
    176201 */ 
    177 #if defined(__CYGWIN__) 
    178 #  if defined(ALL_STATIC) 
    179 #    if defined(PNG_BUILD_DLL) 
     202#ifdef __CYGWIN__ 
     203#  ifdef ALL_STATIC 
     204#    ifdef PNG_BUILD_DLL 
    180205#      undef PNG_BUILD_DLL 
    181206#    endif 
    182 #    if defined(PNG_USE_DLL) 
     207#    ifdef PNG_USE_DLL 
    183208#      undef PNG_USE_DLL 
    184209#    endif 
    185 #    if defined(PNG_DLL) 
     210#    ifdef PNG_DLL 
    186211#      undef PNG_DLL 
    187212#    endif 
    188 #    if !defined(PNG_STATIC) 
     213#    ifndef PNG_STATIC 
    189214#      define PNG_STATIC 
    190215#    endif 
    191216#  else 
    192 #    if defined (PNG_BUILD_DLL) 
    193 #      if defined(PNG_STATIC) 
     217#    ifdef PNG_BUILD_DLL 
     218#      ifdef PNG_STATIC 
    194219#        undef PNG_STATIC 
    195220#      endif 
    196 #      if defined(PNG_USE_DLL) 
     221#      ifdef PNG_USE_DLL 
    197222#        undef PNG_USE_DLL 
    198223#      endif 
    199 #      if !defined(PNG_DLL) 
     224#      ifndef PNG_DLL 
    200225#        define PNG_DLL 
    201226#      endif 
    202227#    else 
    203 #      if defined(PNG_STATIC) 
    204 #        if defined(PNG_USE_DLL) 
     228#      ifdef PNG_STATIC 
     229#        ifdef PNG_USE_DLL 
    205230#          undef PNG_USE_DLL 
    206231#        endif 
    207 #        if defined(PNG_DLL) 
     232#        ifdef PNG_DLL 
    208233#          undef PNG_DLL 
    209234#        endif 
    210235#      else 
    211 #        if !defined(PNG_USE_DLL) 
     236#        ifndef PNG_USE_DLL 
    212237#          define PNG_USE_DLL 
    213238#        endif 
    214 #        if !defined(PNG_DLL) 
     239#        ifndef PNG_DLL 
    215240#          define PNG_DLL 
    216241#        endif 
     
    233258 */ 
    234259 
    235 #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 
    236265#  include <windows.h> 
    237266   /* Console I/O functions are not supported on WindowsCE */ 
     
    262291#    endif 
    263292#  else 
    264 #    if !defined(_WIN32_WCE) 
     293#    ifndef _WIN32_WCE 
    265294/* "stdio.h" functions are not supported on WindowsCE */ 
    266295#      include <stdio.h> 
    267296#    endif 
    268297#  endif 
     298 
     299#if !(defined PNG_NO_CONSOLE_IO) && !defined(PNG_CONSOLE_IO_SUPPORTED) 
     300#  define PNG_CONSOLE_IO_SUPPORTED 
     301#endif 
    269302 
    270303/* This macro protects us against machines that don't have function 
     
    379412 */ 
    380413 
    381 #if defined(PNG_FLOATING_POINT_SUPPORTED) 
    382 #  if defined(MACOS) 
     414#ifdef PNG_FLOATING_POINT_SUPPORTED 
     415#  ifdef MACOS 
    383416     /* We need to check that <math.h> hasn't already been included earlier 
    384417      * as it seems it doesn't agree with <fp.h>, yet we should really use 
     
    590623#    define PNG_READ_BACKGROUND_SUPPORTED 
    591624#  endif 
     625#ifndef PNG_1_0_X 
    592626#  ifndef PNG_NO_READ_16_TO_8 
    593627#    define PNG_READ_16_TO_8_SUPPORTED 
    594628#  endif 
     629#endif 
    595630#  ifndef PNG_NO_READ_FILLER 
    596631#    define PNG_READ_FILLER_SUPPORTED 
     
    599634#    define PNG_READ_GAMMA_SUPPORTED 
    600635#  endif 
     636#ifndef PNG_1_0_X 
    601637#  ifndef PNG_NO_READ_GRAY_TO_RGB 
    602638#    define PNG_READ_GRAY_TO_RGB_SUPPORTED 
    603639#  endif 
     640#endif 
    604641#  ifndef PNG_NO_READ_SWAP_ALPHA 
    605642#    define PNG_READ_SWAP_ALPHA_SUPPORTED 
     
    619656#endif /* PNG_READ_TRANSFORMS_SUPPORTED */ 
    620657 
     658/* PNG_PROGRESSIVE_READ_NOT_SUPPORTED is deprecated. */ 
    621659#if !defined(PNG_NO_PROGRESSIVE_READ) && \ 
    622  !defined(PNG_PROGRESSIVE_READ_SUPPORTED) /* if you don't do progressive   */ 
    623 #  define PNG_PROGRESSIVE_READ_SUPPORTED  /* reading.  This is not talking */ 
    624 #endif                            /* about interlacing capability!  You'll */ 
    625            /* still have interlacing unless you change the following line: */ 
     660 !defined(PNG_PROGRESSIVE_READ_NOT_SUPPORTED)  /* if you don't do progressive */ 
     661#  define PNG_PROGRESSIVE_READ_SUPPORTED     /* reading.  This is not talking */ 
     662#endif                               /* about interlacing capability!  You'll */ 
     663            /* still have interlacing unless you change the following define: */ 
     664#define PNG_READ_INTERLACING_SUPPORTED /* required for PNG-compliant decoders */ 
     665 
     666/* PNG_NO_SEQUENTIAL_READ_SUPPORTED is deprecated. */ 
     667#if !defined(PNG_NO_SEQUENTIAL_READ) && \ 
     668    !defined(PNG_SEQUENTIAL_READ_SUPPORTED) && \ 
     669    !defined(PNG_NO_SEQUENTIAL_READ_SUPPORTED) 
     670#  define PNG_SEQUENTIAL_READ_SUPPORTED 
     671#endif 
    626672 
    627673#define PNG_READ_INTERLACING_SUPPORTED /* required in PNG-compliant decoders */ 
     
    675721#    define PNG_WRITE_SWAP_ALPHA_SUPPORTED 
    676722#  endif 
     723#ifndef PNG_1_0_X 
    677724#  ifndef PNG_NO_WRITE_INVERT_ALPHA 
    678725#    define PNG_WRITE_INVERT_ALPHA_SUPPORTED 
    679726#  endif 
     727#endif 
    680728#  ifndef PNG_NO_WRITE_USER_TRANSFORM 
    681729#    define PNG_WRITE_USER_TRANSFORM_SUPPORTED 
     
    769817#  endif 
    770818 
    771 #  if defined(__APPLE__) 
     819#  ifdef __APPLE__ 
    772820#    if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE) 
    773821#      define PNG_NO_MMX_CODE 
     
    788836/* end of obsolete code to be removed from libpng-1.4.0 */ 
    789837 
    790 #if !defined(PNG_1_0_X) 
     838/* Added at libpng-1.2.0 */ 
     839#ifndef PNG_1_0_X 
    791840#if !defined(PNG_NO_USER_MEM) && !defined(PNG_USER_MEM_SUPPORTED) 
    792841#  define PNG_USER_MEM_SUPPORTED 
     
    795844 
    796845/* Added at libpng-1.2.6 */ 
    797 #if !defined(PNG_1_0_X) 
    798 #ifndef PNG_SET_USER_LIMITS_SUPPORTED 
    799 #if !defined(PNG_NO_SET_USER_LIMITS) && !defined(PNG_SET_USER_LIMITS_SUPPORTED) 
    800 define PNG_SET_USER_LIMITS_SUPPORTED 
    801 #endif 
    802 #endif 
     846#ifndef PNG_1_0_X 
     847#  ifndef PNG_SET_USER_LIMITS_SUPPORTED 
     848#    ifndef PNG_NO_SET_USER_LIMITS 
     849    define PNG_SET_USER_LIMITS_SUPPORTED 
     850#    endif 
     851#  endif 
    803852#endif /* PNG_1_0_X */ 
    804853 
     
    813862#endif 
    814863 
    815 /* Added at libpng-1.2.34 and 1.4.0 */ 
     864#ifndef PNG_1_0_X 
     865/* Added at libpng-1.2.41 */ 
     866#ifndef PNG_USER_CHUNK_CACHE_MAX 
     867#  define PNG_USER_CHUNK_CACHE_MAX 0x7fffffffL 
     868#endif 
     869#endif 
     870 
     871#ifndef PNG_LITERAL_SHARP 
     872#  define PNG_LITERAL_SHARP 0x23 
     873#endif 
     874#ifndef PNG_LITERAL_LEFT_SQUARE_BRACKET 
     875#  define PNG_LITERAL_LEFT_SQUARE_BRACKET 0x5b 
     876#endif 
     877#ifndef PNG_LITERAL_RIGHT_SQUARE_BRACKET 
     878#  define PNG_LITERAL_RIGHT_SQUARE_BRACKET 0x5d 
     879#endif 
     880 
     881/* Added at libpng-1.2.34 */ 
    816882#ifndef PNG_STRING_NEWLINE 
    817883#define PNG_STRING_NEWLINE "\n" 
     
    841907#define PNG_NO_POINTER_INDEXING 
    842908*/ 
     909 
     910#if !defined(PNG_NO_POINTER_INDEXING) && \ 
     911    !defined(PNG_POINTER_INDEXING_SUPPORTED) 
     912#  define PNG_POINTER_INDEXING_SUPPORTED 
     913#endif 
    843914 
    844915/* These functions are turned off by default, as they will be phased out. */ 
     
    11001171#endif 
    11011172 
     1173#ifdef PNG_WRITE_tIME_SUPPORTED 
     1174#  ifndef PNG_NO_CONVERT_tIME 
     1175#    ifndef _WIN32_WCE 
     1176/*   The "tm" structure is not supported on WindowsCE */ 
     1177#      ifndef PNG_CONVERT_tIME_SUPPORTED 
     1178#        define PNG_CONVERT_tIME_SUPPORTED 
     1179#      endif 
     1180#   endif 
     1181#  endif 
     1182#endif 
     1183 
    11021184#endif /* PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED */ 
     1185 
     1186#if !defined(PNG_NO_WRITE_FILTER) && !defined(PNG_WRITE_FILTER_SUPPORTED) 
     1187#  define PNG_WRITE_FILTER_SUPPORTED 
     1188#endif 
    11031189 
    11041190#ifndef PNG_NO_WRITE_UNKNOWN_CHUNKS 
     
    11241210#endif 
    11251211 
    1126 /* need the time information for reading tIME chunks */ 
    1127 #if defined(PNG_tIME_SUPPORTED) 
    1128 #  if !defined(_WIN32_WCE) 
     1212/* Need the time information for converting tIME chunks */ 
     1213#ifdef PNG_CONVERT_tIME_SUPPORTED 
    11291214     /* "time.h" functions are not supported on WindowsCE */ 
    11301215#    include <time.h> 
    1131 #  endif 
    11321216#endif 
    11331217 
     
    11981282 
    11991283/* MSC Medium model */ 
    1200 #if defined(FAR) 
    1201 #  if defined(M_I86MM) 
     1284#ifdef FAR 
     1285#  ifdef M_I86MM 
    12021286#    define USE_FAR_KEYWORD 
    12031287#    define FARDATA FAR 
     
    12321316 
    12331317#ifndef PNG_NO_STDIO 
    1234 #if defined(_WIN32_WCE) 
     1318#ifdef _WIN32_WCE 
    12351319typedef HANDLE                png_FILE_p; 
    12361320#else 
     
    12961380 * command-line override 
    12971381 */ 
    1298 #if defined(__CYGWIN__) 
    1299 #  if !defined(PNG_STATIC) 
    1300 #    if defined(PNG_USE_GLOBAL_ARRAYS) 
     1382#ifdef __CYGWIN__ 
     1383#  ifndef PNG_STATIC 
     1384#    ifdef PNG_USE_GLOBAL_ARRAYS 
    13011385#      undef PNG_USE_GLOBAL_ARRAYS 
    13021386#    endif 
    1303 #    if !defined(PNG_USE_LOCAL_ARRAYS) 
     1387#    ifndef PNG_USE_LOCAL_ARRAYS 
    13041388#      define PNG_USE_LOCAL_ARRAYS 
    13051389#    endif 
    13061390#  else 
    13071391#    if defined(PNG_USE_LOCAL_ARRAYS) || defined(PNG_NO_GLOBAL_ARRAYS) 
    1308 #      if defined(PNG_USE_GLOBAL_ARRAYS) 
     1392#      ifdef PNG_USE_GLOBAL_ARRAYS 
    13091393#        undef PNG_USE_GLOBAL_ARRAYS 
    13101394#      endif 
     
    13291413#endif 
    13301414 
    1331 #if defined(__CYGWIN__) 
     1415#ifdef __CYGWIN__ 
    13321416#  undef PNGAPI 
    13331417#  define PNGAPI __cdecl 
     
    13701454#  endif 
    13711455 
    1372 #  if !defined(PNG_IMPEXP) 
     1456#  ifndef PNG_IMPEXP 
    13731457 
    13741458#     define PNG_EXPORT_TYPE1(type,symbol)  PNG_IMPEXP type PNGAPI symbol 
     
    13811465#        else 
    13821466#           define PNG_EXPORT PNG_EXPORT_TYPE2 
    1383 #           if defined(PNG_BUILD_DLL) 
     1467#           ifdef PNG_BUILD_DLL 
    13841468#              define PNG_IMPEXP __export 
    13851469#           else 
     
    13911475#     endif 
    13921476 
    1393 #     if !defined(PNG_IMPEXP) 
    1394 #        if defined(PNG_BUILD_DLL) 
     1477#     ifndef PNG_IMPEXP 
     1478#        ifdef PNG_BUILD_DLL 
    13951479#           define PNG_IMPEXP __declspec(dllexport) 
    13961480#        else 
     
    14381522#endif 
    14391523 
     1524#ifdef PNG_PEDANTIC_WARNINGS 
     1525#  ifndef PNG_PEDANTIC_WARNINGS_SUPPORTED 
     1526#    define PNG_PEDANTIC_WARNINGS_SUPPORTED 
     1527#  endif 
     1528#endif 
     1529 
     1530#ifdef PNG_PEDANTIC_WARNINGS_SUPPORTED 
     1531/* Support for compiler specific function attributes.  These are used 
     1532 * so that where compiler support is available incorrect use of API 
     1533 * functions in png.h will generate compiler warnings.  Added at libpng 
     1534 * version 1.2.41. 
     1535 */ 
     1536#  ifdef __GNUC__ 
     1537#    ifndef PNG_USE_RESULT 
     1538#      define PNG_USE_RESULT __attribute__((__warn_unused_result__)) 
     1539#    endif 
     1540#    ifndef PNG_NORETURN 
     1541#      define PNG_NORETURN   __attribute__((__noreturn__)) 
     1542#    endif 
     1543#    ifndef PNG_ALLOCATED 
     1544#      define PNG_ALLOCATED  __attribute__((__malloc__)) 
     1545#    endif 
     1546 
     1547    /* This specifically protects structure members that should only be 
     1548     * accessed from within the library, therefore should be empty during 
     1549     * a library build. 
     1550     */ 
     1551#    ifndef PNG_DEPRECATED 
     1552#      define PNG_DEPRECATED __attribute__((__deprecated__)) 
     1553#    endif 
     1554#    ifndef PNG_DEPSTRUCT 
     1555#      define PNG_DEPSTRUCT  __attribute__((__deprecated__)) 
     1556#    endif 
     1557#    ifndef PNG_PRIVATE 
     1558#      if 0 /* Doesn't work so we use deprecated instead*/ 
     1559#        define PNG_PRIVATE \ 
     1560          __attribute__((warning("This function is not exported by libpng."))) 
     1561#      else 
     1562#        define PNG_PRIVATE \ 
     1563          __attribute__((__deprecated__)) 
     1564#      endif 
     1565#    endif /* PNG_PRIVATE */ 
     1566#  endif /* __GNUC__ */ 
     1567#endif /* PNG_PEDANTIC_WARNINGS */ 
     1568 
     1569#ifndef PNG_DEPRECATED 
     1570#  define PNG_DEPRECATED  /* Use of this function is deprecated */ 
     1571#endif 
     1572#ifndef PNG_USE_RESULT 
     1573#  define PNG_USE_RESULT  /* The result of this function must be checked */ 
     1574#endif 
     1575#ifndef PNG_NORETURN 
     1576#  define PNG_NORETURN    /* This function does not return */ 
     1577#endif 
     1578#ifndef PNG_ALLOCATED 
     1579#  define PNG_ALLOCATED   /* The result of the function is new memory */ 
     1580#endif 
     1581#ifndef PNG_DEPSTRUCT 
     1582#  define PNG_DEPSTRUCT   /* Access to this struct member is deprecated */ 
     1583#endif 
     1584#ifndef PNG_PRIVATE 
     1585#  define PNG_PRIVATE     /* This is a private libpng function */ 
     1586#endif 
     1587 
    14401588/* User may want to use these so they are not in PNG_INTERNAL. Any library 
    14411589 * functions that are passed far data must be model independent. 
     
    14531601#endif 
    14541602 
    1455 #if defined(USE_FAR_KEYWORD)  /* memory model independent fns */ 
    1456 /* use this to make far-to-near assignments */ 
     1603#ifdef USE_FAR_KEYWORD  /* memory model independent fns */ 
     1604/* Use this to make far-to-near assignments */ 
    14571605#  define CHECK   1 
    14581606#  define NOCHECK 0 
     
    14641612#  define png_memcpy  _fmemcpy 
    14651613#  define png_memset  _fmemset 
    1466 #else /* use the usual functions */ 
     1614#else /* Use the usual functions */ 
    14671615#  define CVT_PTR(ptr)         (ptr) 
    14681616#  define CVT_PTR_NOCHECK(ptr) (ptr) 
     
    14821630      * or malevolent buffer overflows.  If you don't have snprintf() 
    14831631      * as a general rule you should provide one (you can get one from 
    1484       * Portable OpenSSH). */ 
     1632      * Portable OpenSSH). 
     1633      */ 
    14851634#    define png_snprintf(s1,n,fmt,x1) sprintf(s1,fmt,x1) 
    14861635#    define png_snprintf2(s1,n,fmt,x1,x2) sprintf(s1,fmt,x1,x2)