Changeset 43 for vendor/libpng/pngconf.h
- Timestamp:
- 02/15/10 11:37:15 (2 years ago)
- Files:
-
- 1 modified
-
vendor/libpng/pngconf.h (modified) (28 diffs)
Legend:
- Unmodified
- Added
- Removed
-
vendor/libpng/pngconf.h
r11 r43 2 2 /* pngconf.h - machine configurable file for libpng 3 3 * 4 * libpng version 1.2.4 0 - September 10, 20095 * Copyright (c) 1998-20 09Glenn Randers-Pehrson4 * libpng version 1.2.42 - January 3, 2010 5 * Copyright (c) 1998-2010 Glenn Randers-Pehrson 6 6 * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) 7 7 * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) … … 116 116 #endif 117 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 118 142 /* 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 */ 120 145 #if !defined(PNG_1_0_X) && !defined(PNG_NO_MNG_FEATURES) 121 146 # ifndef PNG_MNG_FEATURES_SUPPORTED … … 175 200 * such as CONSOLE_IO and whether GLOBAL_ARRAYS are allowed. 176 201 */ 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 180 205 # undef PNG_BUILD_DLL 181 206 # endif 182 # if defined(PNG_USE_DLL)207 # ifdef PNG_USE_DLL 183 208 # undef PNG_USE_DLL 184 209 # endif 185 # if defined(PNG_DLL)210 # ifdef PNG_DLL 186 211 # undef PNG_DLL 187 212 # endif 188 # if !defined(PNG_STATIC)213 # ifndef PNG_STATIC 189 214 # define PNG_STATIC 190 215 # endif 191 216 # else 192 # if defined (PNG_BUILD_DLL)193 # if defined(PNG_STATIC)217 # ifdef PNG_BUILD_DLL 218 # ifdef PNG_STATIC 194 219 # undef PNG_STATIC 195 220 # endif 196 # if defined(PNG_USE_DLL)221 # ifdef PNG_USE_DLL 197 222 # undef PNG_USE_DLL 198 223 # endif 199 # if !defined(PNG_DLL)224 # ifndef PNG_DLL 200 225 # define PNG_DLL 201 226 # endif 202 227 # else 203 # if defined(PNG_STATIC)204 # if defined(PNG_USE_DLL)228 # ifdef PNG_STATIC 229 # ifdef PNG_USE_DLL 205 230 # undef PNG_USE_DLL 206 231 # endif 207 # if defined(PNG_DLL)232 # ifdef PNG_DLL 208 233 # undef PNG_DLL 209 234 # endif 210 235 # else 211 # if !defined(PNG_USE_DLL)236 # ifndef PNG_USE_DLL 212 237 # define PNG_USE_DLL 213 238 # endif 214 # if !defined(PNG_DLL)239 # ifndef PNG_DLL 215 240 # define PNG_DLL 216 241 # endif … … 233 258 */ 234 259 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 236 265 # include <windows.h> 237 266 /* Console I/O functions are not supported on WindowsCE */ … … 262 291 # endif 263 292 # else 264 # if !defined(_WIN32_WCE)293 # ifndef _WIN32_WCE 265 294 /* "stdio.h" functions are not supported on WindowsCE */ 266 295 # include <stdio.h> 267 296 # endif 268 297 # endif 298 299 #if !(defined PNG_NO_CONSOLE_IO) && !defined(PNG_CONSOLE_IO_SUPPORTED) 300 # define PNG_CONSOLE_IO_SUPPORTED 301 #endif 269 302 270 303 /* This macro protects us against machines that don't have function … … 379 412 */ 380 413 381 #if defined(PNG_FLOATING_POINT_SUPPORTED)382 # if defined(MACOS)414 #ifdef PNG_FLOATING_POINT_SUPPORTED 415 # ifdef MACOS 383 416 /* We need to check that <math.h> hasn't already been included earlier 384 417 * as it seems it doesn't agree with <fp.h>, yet we should really use … … 590 623 # define PNG_READ_BACKGROUND_SUPPORTED 591 624 # endif 625 #ifndef PNG_1_0_X 592 626 # ifndef PNG_NO_READ_16_TO_8 593 627 # define PNG_READ_16_TO_8_SUPPORTED 594 628 # endif 629 #endif 595 630 # ifndef PNG_NO_READ_FILLER 596 631 # define PNG_READ_FILLER_SUPPORTED … … 599 634 # define PNG_READ_GAMMA_SUPPORTED 600 635 # endif 636 #ifndef PNG_1_0_X 601 637 # ifndef PNG_NO_READ_GRAY_TO_RGB 602 638 # define PNG_READ_GRAY_TO_RGB_SUPPORTED 603 639 # endif 640 #endif 604 641 # ifndef PNG_NO_READ_SWAP_ALPHA 605 642 # define PNG_READ_SWAP_ALPHA_SUPPORTED … … 619 656 #endif /* PNG_READ_TRANSFORMS_SUPPORTED */ 620 657 658 /* PNG_PROGRESSIVE_READ_NOT_SUPPORTED is deprecated. */ 621 659 #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 626 672 627 673 #define PNG_READ_INTERLACING_SUPPORTED /* required in PNG-compliant decoders */ … … 675 721 # define PNG_WRITE_SWAP_ALPHA_SUPPORTED 676 722 # endif 723 #ifndef PNG_1_0_X 677 724 # ifndef PNG_NO_WRITE_INVERT_ALPHA 678 725 # define PNG_WRITE_INVERT_ALPHA_SUPPORTED 679 726 # endif 727 #endif 680 728 # ifndef PNG_NO_WRITE_USER_TRANSFORM 681 729 # define PNG_WRITE_USER_TRANSFORM_SUPPORTED … … 769 817 # endif 770 818 771 # if defined(__APPLE__)819 # ifdef __APPLE__ 772 820 # if !defined(PNG_MMX_CODE_SUPPORTED) && !defined(PNG_NO_MMX_CODE) 773 821 # define PNG_NO_MMX_CODE … … 788 836 /* end of obsolete code to be removed from libpng-1.4.0 */ 789 837 790 #if !defined(PNG_1_0_X) 838 /* Added at libpng-1.2.0 */ 839 #ifndef PNG_1_0_X 791 840 #if !defined(PNG_NO_USER_MEM) && !defined(PNG_USER_MEM_SUPPORTED) 792 841 # define PNG_USER_MEM_SUPPORTED … … 795 844 796 845 /* Added at libpng-1.2.6 */ 797 #if !defined(PNG_1_0_X)798 # ifndef PNG_SET_USER_LIMITS_SUPPORTED799 # if !defined(PNG_NO_SET_USER_LIMITS) && !defined(PNG_SET_USER_LIMITS_SUPPORTED)800 # define PNG_SET_USER_LIMITS_SUPPORTED801 # endif802 # endif846 #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 803 852 #endif /* PNG_1_0_X */ 804 853 … … 813 862 #endif 814 863 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 */ 816 882 #ifndef PNG_STRING_NEWLINE 817 883 #define PNG_STRING_NEWLINE "\n" … … 841 907 #define PNG_NO_POINTER_INDEXING 842 908 */ 909 910 #if !defined(PNG_NO_POINTER_INDEXING) && \ 911 !defined(PNG_POINTER_INDEXING_SUPPORTED) 912 # define PNG_POINTER_INDEXING_SUPPORTED 913 #endif 843 914 844 915 /* These functions are turned off by default, as they will be phased out. */ … … 1100 1171 #endif 1101 1172 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 1102 1184 #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 1103 1189 1104 1190 #ifndef PNG_NO_WRITE_UNKNOWN_CHUNKS … … 1124 1210 #endif 1125 1211 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 1129 1214 /* "time.h" functions are not supported on WindowsCE */ 1130 1215 # include <time.h> 1131 # endif1132 1216 #endif 1133 1217 … … 1198 1282 1199 1283 /* MSC Medium model */ 1200 #if defined(FAR)1201 # if defined(M_I86MM)1284 #ifdef FAR 1285 # ifdef M_I86MM 1202 1286 # define USE_FAR_KEYWORD 1203 1287 # define FARDATA FAR … … 1232 1316 1233 1317 #ifndef PNG_NO_STDIO 1234 #if defined(_WIN32_WCE)1318 #ifdef _WIN32_WCE 1235 1319 typedef HANDLE png_FILE_p; 1236 1320 #else … … 1296 1380 * command-line override 1297 1381 */ 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 1301 1385 # undef PNG_USE_GLOBAL_ARRAYS 1302 1386 # endif 1303 # if !defined(PNG_USE_LOCAL_ARRAYS)1387 # ifndef PNG_USE_LOCAL_ARRAYS 1304 1388 # define PNG_USE_LOCAL_ARRAYS 1305 1389 # endif 1306 1390 # else 1307 1391 # if defined(PNG_USE_LOCAL_ARRAYS) || defined(PNG_NO_GLOBAL_ARRAYS) 1308 # if defined(PNG_USE_GLOBAL_ARRAYS)1392 # ifdef PNG_USE_GLOBAL_ARRAYS 1309 1393 # undef PNG_USE_GLOBAL_ARRAYS 1310 1394 # endif … … 1329 1413 #endif 1330 1414 1331 #if defined(__CYGWIN__)1415 #ifdef __CYGWIN__ 1332 1416 # undef PNGAPI 1333 1417 # define PNGAPI __cdecl … … 1370 1454 # endif 1371 1455 1372 # if !defined(PNG_IMPEXP)1456 # ifndef PNG_IMPEXP 1373 1457 1374 1458 # define PNG_EXPORT_TYPE1(type,symbol) PNG_IMPEXP type PNGAPI symbol … … 1381 1465 # else 1382 1466 # define PNG_EXPORT PNG_EXPORT_TYPE2 1383 # if defined(PNG_BUILD_DLL)1467 # ifdef PNG_BUILD_DLL 1384 1468 # define PNG_IMPEXP __export 1385 1469 # else … … 1391 1475 # endif 1392 1476 1393 # if !defined(PNG_IMPEXP)1394 # if defined(PNG_BUILD_DLL)1477 # ifndef PNG_IMPEXP 1478 # ifdef PNG_BUILD_DLL 1395 1479 # define PNG_IMPEXP __declspec(dllexport) 1396 1480 # else … … 1438 1522 #endif 1439 1523 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 1440 1588 /* User may want to use these so they are not in PNG_INTERNAL. Any library 1441 1589 * functions that are passed far data must be model independent. … … 1453 1601 #endif 1454 1602 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 */ 1457 1605 # define CHECK 1 1458 1606 # define NOCHECK 0 … … 1464 1612 # define png_memcpy _fmemcpy 1465 1613 # define png_memset _fmemset 1466 #else /* use the usual functions */1614 #else /* Use the usual functions */ 1467 1615 # define CVT_PTR(ptr) (ptr) 1468 1616 # define CVT_PTR_NOCHECK(ptr) (ptr) … … 1482 1630 * or malevolent buffer overflows. If you don't have snprintf() 1483 1631 * as a general rule you should provide one (you can get one from 1484 * Portable OpenSSH). */ 1632 * Portable OpenSSH). 1633 */ 1485 1634 # define png_snprintf(s1,n,fmt,x1) sprintf(s1,fmt,x1) 1486 1635 # define png_snprintf2(s1,n,fmt,x1,x2) sprintf(s1,fmt,x1,x2)
